@arcgis/core 4.34.0-next.24 → 4.34.0-next.26

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 (384) hide show
  1. package/Basemap.js +1 -1
  2. package/analysis/VolumeMeasurement/CutFillOptions.d.ts +4 -0
  3. package/analysis/VolumeMeasurement/CutFillOptions.js +1 -1
  4. package/analysis/VolumeMeasurementAnalysis.js +1 -1
  5. package/applications/Components/imageryUtils.d.ts +7 -0
  6. package/applications/Components/imageryUtils.js +5 -0
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{0867aa688fa8938906da.js → 03bef3f4b6b09b1e864b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/03ee4d63aa8de44958ab.js +1 -0
  10. package/assets/esri/core/workers/chunks/06cdbccc9f325dcc303d.js +1 -0
  11. package/assets/esri/core/workers/chunks/09618761df5c4fdd52a0.js +1 -0
  12. package/assets/esri/core/workers/chunks/0ae00339991f5387203e.js +1 -0
  13. package/assets/esri/core/workers/chunks/0b4b294f3ce74fde5620.js +1 -0
  14. package/assets/esri/core/workers/chunks/{146520d263b910b5bdc7.js → 0e96a3b7228f1ff8e6c5.js} +1 -1
  15. package/assets/esri/core/workers/chunks/109ef17dd4f9430bb686.js +1 -0
  16. package/assets/esri/core/workers/chunks/1597aca21334cab3b802.js +1 -0
  17. package/assets/esri/core/workers/chunks/196564ad230bef6b59cf.js +1 -0
  18. package/assets/esri/core/workers/chunks/19f8d551cbebc11db1eb.js +1 -0
  19. package/assets/esri/core/workers/chunks/1ceee047e3fa617b0600.js +1 -0
  20. package/assets/esri/core/workers/chunks/1d27701832ea139fcc20.js +1 -0
  21. package/assets/esri/core/workers/chunks/1f296f85becf1ca6714d.js +1 -0
  22. package/assets/esri/core/workers/chunks/1f8d7bd44d53c30df383.js +1 -0
  23. package/assets/esri/core/workers/chunks/1fabb5ec59da698c1618.js +1 -0
  24. package/assets/esri/core/workers/chunks/{919d2fd7ebc0c840a759.js → 219b2911668db120452b.js} +1 -1
  25. package/assets/esri/core/workers/chunks/21a8ae88cfa644a30058.js +1 -0
  26. package/assets/esri/core/workers/chunks/2b4b073254fe8b6a081c.js +1 -0
  27. package/assets/esri/core/workers/chunks/2c2128201c80a1b1aeb6.js +1 -0
  28. package/assets/esri/core/workers/chunks/2d3679289b34b7da6bf4.js +1 -0
  29. package/assets/esri/core/workers/chunks/30293b88501b5d6162fc.js +1 -0
  30. package/assets/esri/core/workers/chunks/31533f5e8b76b307f61c.js +1 -0
  31. package/assets/esri/core/workers/chunks/347117e61e1c6edd074f.js +1 -0
  32. package/assets/esri/core/workers/chunks/3616eb2607843524483f.js +1 -0
  33. package/assets/esri/core/workers/chunks/36648facd56ee91afc7c.js +1 -0
  34. package/assets/esri/core/workers/chunks/394477e88be0c6790f02.js +1 -0
  35. package/assets/esri/core/workers/chunks/3b80b01551d124534a1b.js +1 -0
  36. package/assets/esri/core/workers/chunks/{89d91ce2f566dd3f57f7.js → 3be9ec0503a669bcfce6.js} +1 -1
  37. package/assets/esri/core/workers/chunks/3c9cf06ac6aa1db6c4f6.js +1 -0
  38. package/assets/esri/core/workers/chunks/40fc7c43feaeef8b814d.js +1 -0
  39. package/assets/esri/core/workers/chunks/42cddc8f8c8d73e22ee2.js +1 -0
  40. package/assets/esri/core/workers/chunks/437a4100a837ee16df7c.js +1 -0
  41. package/assets/esri/core/workers/chunks/472c677a74d779ce62d7.js +1 -0
  42. package/assets/esri/core/workers/chunks/4ce671bc4d36387b55fa.js +1 -0
  43. package/assets/esri/core/workers/chunks/4de6c479df609398dee0.js +1 -0
  44. package/assets/esri/core/workers/chunks/51cfa2f70ec222e1582b.js +1 -0
  45. package/assets/esri/core/workers/chunks/5284d46aecd6fe0345b8.js +1 -0
  46. package/assets/esri/core/workers/chunks/567385709e18ace93b1e.js +1 -0
  47. package/assets/esri/core/workers/chunks/{4c2f3e43992a918e4c2d.js → 5ef3256c32c4b622bd11.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{55e9b02d70812f7cdac2.js → 63966066a963e9a1fb14.js} +1 -1
  49. package/assets/esri/core/workers/chunks/63f50ff2ae94f684d56b.js +1 -0
  50. package/assets/esri/core/workers/chunks/6b6ab092f578b20c8e56.js +1 -0
  51. package/assets/esri/core/workers/chunks/6deaa08e3a61a455e564.js +1 -0
  52. package/assets/esri/core/workers/chunks/6e9b4bfe2a1497c96100.js +1 -0
  53. package/assets/esri/core/workers/chunks/6efc3d120c9c2c09cb06.js +1 -0
  54. package/assets/esri/core/workers/chunks/7338ce95bceb2c7fab87.js +1 -0
  55. package/assets/esri/core/workers/chunks/7359652de3d7f969a712.js +1 -0
  56. package/assets/esri/core/workers/chunks/{c64fa94cba71ba2794e2.js → 771012f129890f9a089c.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{d1b363c418a67b087306.js → 780ff9314f26ae62f75f.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{04c17957c15234ca0321.js → 7b736885278af9676f3a.js} +1 -1
  59. package/assets/esri/core/workers/chunks/8161b0a674ef9bf536a2.js +1 -0
  60. package/assets/esri/core/workers/chunks/820cf4337b248a0cb63c.js +1 -0
  61. package/assets/esri/core/workers/chunks/{fedbf639a0788417a70f.js → 86abfce1f2ac93cc4d54.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{c94cc026c4ed330408fb.js → 8894483b91bcda845b6f.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{f050ab9d100012b77bb9.js → 8c5b1114cc2a58305a81.js} +1 -1
  64. package/assets/esri/core/workers/chunks/908ec8165d567f052155.js +1 -0
  65. package/assets/esri/core/workers/chunks/{97324f030738fc0d456b.js → 9182fe69b9863e1de714.js} +1 -1
  66. package/assets/esri/core/workers/chunks/91e6030a2845f5404e82.js +1 -0
  67. package/assets/esri/core/workers/chunks/9511e55e4fabb3235eac.js +1 -0
  68. package/assets/esri/core/workers/chunks/9d85e20a3d6ca1161c26.js +1 -0
  69. package/assets/esri/core/workers/chunks/9f8341caab3b1d02f387.js +1 -0
  70. package/assets/esri/core/workers/chunks/a08d018d8c137fc4ca17.js +1 -0
  71. package/assets/esri/core/workers/chunks/a19689f8d1ef48fd2159.js +1 -0
  72. package/assets/esri/core/workers/chunks/{7051bcc178eb512819f6.js → a55338add265d330124b.js} +1 -1
  73. package/assets/esri/core/workers/chunks/a8f37681f8f6feebbd50.js +1 -0
  74. package/assets/esri/core/workers/chunks/{6ca764b4baadef5c1515.js → aeedc543320ee307d14a.js} +1 -1
  75. package/assets/esri/core/workers/chunks/afe4fd3b1b3521712edd.js +1 -0
  76. package/assets/esri/core/workers/chunks/b3794c513a13facc98d3.js +1 -0
  77. package/assets/esri/core/workers/chunks/{9991bd3c7991bffd8260.js → b37f3c416cefc1a6ea2c.js} +1 -1
  78. package/assets/esri/core/workers/chunks/bb50b4a3af627f91d789.js +1 -0
  79. package/assets/esri/core/workers/chunks/{f42155b7a4e6c5e80757.js → bbc2a4976d044b990193.js} +1 -1
  80. package/assets/esri/core/workers/chunks/bbf2c31d217de1b8ba6e.js +1 -0
  81. package/assets/esri/core/workers/chunks/be3977f7fe0c46a1b493.js +1 -0
  82. package/assets/esri/core/workers/chunks/befba7ceeb26a38732c1.js +1 -0
  83. package/assets/esri/core/workers/chunks/bf3fc71881aa559fc931.js +1 -0
  84. package/assets/esri/core/workers/chunks/c1fb5290e0e259b74389.js +1 -0
  85. package/assets/esri/core/workers/chunks/c361bf4d41a1843d4640.js +1 -0
  86. package/assets/esri/core/workers/chunks/c51099eab5a99c88e5de.js +1 -0
  87. package/assets/esri/core/workers/chunks/{909a6218db87cba2c9ba.js → c6c0263fbcf2ca245c1b.js} +3 -3
  88. package/assets/esri/core/workers/chunks/c6c3e703b18e1bb7113a.js +1 -0
  89. package/assets/esri/core/workers/chunks/c82e78590c2fabc67609.js +1 -0
  90. package/assets/esri/core/workers/chunks/{7d7f8f2936ddee65e3da.js → c9e580867f7ac17be329.js} +1 -1
  91. package/assets/esri/core/workers/chunks/d29ae64703a947bfb83b.js +1 -0
  92. package/assets/esri/core/workers/chunks/de1457b07f4e263f1524.js +1 -0
  93. package/assets/esri/core/workers/chunks/{6bf43bc3714d7b3878fa.js → e547318638c8f496c1a0.js} +1 -1
  94. package/assets/esri/core/workers/chunks/{53781ccca16e53d4a8c3.js → f291ccf9da6aa7d7ae23.js} +1 -1
  95. package/assets/esri/core/workers/chunks/f5ee10a8afb7f70833bb.js +346 -0
  96. package/assets/esri/core/workers/chunks/f61a8cc7e2b198e521ba.js +1 -0
  97. package/assets/esri/core/workers/chunks/f9442a281cb91c64c7cd.js +1 -0
  98. package/assets/esri/core/workers/chunks/{4f14e78d0560050c1a81.js → fa7243f080bcf6444929.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{c3213b487c11076985af.js → fbf3240b36718fa5dc76.js} +1 -1
  100. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  101. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  102. package/chunks/ComponentShader.glsl.js +36 -36
  103. package/chunks/RibbonLine.glsl.js +40 -33
  104. package/chunks/persistableUrlUtils.js +1 -1
  105. package/config.js +1 -1
  106. package/core/AsyncUpdate.js +1 -1
  107. package/core/Clonable.js +1 -1
  108. package/core/Evented.js +1 -1
  109. package/core/Identifiable.js +1 -1
  110. package/core/JSONSupport.js +1 -1
  111. package/core/Loadable.js +1 -1
  112. package/core/MapUtils.js +1 -1
  113. package/core/MemCache.js +1 -1
  114. package/core/MultiOriginJSONSupport.js +1 -1
  115. package/core/ObjectPool.js +1 -1
  116. package/core/PooledArray.js +1 -1
  117. package/core/Promise.js +1 -1
  118. package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
  119. package/core/heapSort.js +5 -0
  120. package/core/mathUtils.js +1 -1
  121. package/core/quantity.d.ts +1 -0
  122. package/geometry/support/buffer/BufferPool.js +1 -1
  123. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  124. package/interfaces.d.ts +202 -12
  125. package/kernel.js +1 -1
  126. package/layers/CatalogLayer.js +1 -1
  127. package/layers/FeatureLayer.js +1 -1
  128. package/layers/GeoJSONLayer.js +1 -1
  129. package/layers/SubtypeGroupLayer.js +1 -1
  130. package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.js +1 -1
  131. package/layers/mixins/APIKeyMixin.js +1 -1
  132. package/layers/mixins/ArcGISCachedService.js +1 -1
  133. package/layers/mixins/ArcGISImageService.js +1 -1
  134. package/layers/mixins/ArcGISMapService.js +1 -1
  135. package/layers/mixins/ArcGISService.js +1 -1
  136. package/layers/mixins/BlendLayer.js +1 -1
  137. package/layers/mixins/CustomParametersMixin.js +1 -1
  138. package/layers/mixins/DisplayFilteredLayer.js +1 -1
  139. package/layers/mixins/EditBusLayer.js +1 -1
  140. package/layers/mixins/FeatureEffectLayer.js +1 -1
  141. package/layers/mixins/FeatureLayerBase.js +1 -1
  142. package/layers/mixins/FeatureReductionLayer.js +1 -1
  143. package/layers/mixins/ImageryTileMixin.js +1 -1
  144. package/layers/mixins/OperationalLayer.js +1 -1
  145. package/layers/mixins/OrderedLayer.js +1 -1
  146. package/layers/mixins/PortalLayer.js +1 -1
  147. package/layers/mixins/PublishableLayer.js +1 -1
  148. package/layers/mixins/RasterJobHandlerMixin.js +1 -1
  149. package/layers/mixins/RasterPresetRendererMixin.js +1 -1
  150. package/layers/mixins/RefreshableLayer.js +1 -1
  151. package/layers/mixins/ScaleRangeLayer.js +1 -1
  152. package/layers/mixins/SceneService.js +1 -1
  153. package/layers/mixins/SublayersOwner.js +1 -1
  154. package/layers/mixins/TemporalLayer.js +1 -1
  155. package/layers/mixins/TemporalSceneLayer.js +1 -1
  156. package/layers/mixins/TrackableLayer.js +1 -1
  157. package/layers/ogc/wfsUtils.js +1 -1
  158. package/layers/support/RasterJobHandler.js +1 -1
  159. package/layers/support/RasterWorker.js +1 -1
  160. package/layers/support/Sublayer.js +1 -1
  161. package/layers/support/arcgisLayerUrl.js +1 -1
  162. package/layers/support/multiLayerServiceUtils.js +1 -1
  163. package/layers/support/rasterDatasets/pixelReader.js +5 -0
  164. package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
  165. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  166. package/layers/support/rasterFunctions/stretchUtils.js +1 -1
  167. package/package.json +1 -1
  168. package/renderers/mixins/VisualVariablesMixin.js +1 -1
  169. package/rest/support/CameraInfoMixin.js +1 -1
  170. package/rest/support/NormalizationBinParametersMixin.js +1 -1
  171. package/smartMapping/renderers/color.js +1 -1
  172. package/smartMapping/renderers/heatmap.js +1 -1
  173. package/smartMapping/renderers/pieChart.js +1 -1
  174. package/smartMapping/renderers/size.js +1 -1
  175. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  176. package/smartMapping/renderers/support/rendererUtils.js +1 -1
  177. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  178. package/smartMapping/renderers/type.js +1 -1
  179. package/smartMapping/symbology/color.js +1 -1
  180. package/smartMapping/symbology/support/utils.js +1 -1
  181. package/support/LayersMixin.js +1 -1
  182. package/support/TablesMixin.js +1 -1
  183. package/support/revision.js +1 -1
  184. package/symbols/support/utils.js +1 -1
  185. package/views/2d/engine/ParentChildStage.js +1 -1
  186. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  187. package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
  188. package/views/2d/engine/webgl/meshing/Mesh.js +1 -1
  189. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MultiRasterMixin.js +1 -1
  190. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  191. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  192. package/views/2d/engine/webgl/textureUtils.js +1 -1
  193. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  194. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  195. package/views/2d/layers/LayerView2D.js +1 -1
  196. package/views/2d/layers/MediaLayerView2D.js +1 -1
  197. package/views/2d/layers/TileLayerView2D.js +1 -1
  198. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  199. package/views/2d/layers/support/DebugOverlay.js +1 -1
  200. package/views/2d/tiling/FeatureTileSubscriptionManager.js +1 -1
  201. package/views/3d/analysis/AnalysisView3D.js +1 -1
  202. package/views/3d/analysis/VolumeMeasurement/CutFillVolumeMeasurementController.js +5 -0
  203. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  204. package/views/3d/glTF/DefaultLoadingContext.js +1 -1
  205. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  206. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  207. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  208. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  209. package/views/3d/layers/FlowSubView3D.js +1 -1
  210. package/views/3d/layers/I3SMeshView3D.js +1 -1
  211. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  212. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  213. package/views/3d/layers/LayerView3D.js +1 -1
  214. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  215. package/views/3d/layers/StreamLayerView3D.js +1 -1
  216. package/views/3d/layers/TiledLayerView3D.js +1 -1
  217. package/views/3d/layers/graphics/DeconflictAABR.js +1 -1
  218. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  219. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  220. package/views/3d/layers/graphics/Labeler.js +1 -1
  221. package/views/3d/layers/graphics/StreamController.js +5 -0
  222. package/views/3d/layers/graphics/StreamGraphics3DGraphicsPipeline.js +1 -1
  223. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  224. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  225. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  226. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  227. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  228. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  229. package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
  230. package/views/3d/layers/support/fetchTile.js +1 -1
  231. package/views/3d/support/MemoryController.js +1 -1
  232. package/views/3d/support/ResourceController.js +1 -1
  233. package/views/3d/support/StreamDataLoader.js +1 -1
  234. package/views/3d/support/StreamDataRequester.js +5 -0
  235. package/views/3d/support/StreamTextureCollection.js +1 -1
  236. package/views/3d/support/engineContent/line.js +1 -1
  237. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  238. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  239. package/views/3d/support/flow/StreamlinesResources3D.js +1 -1
  240. package/views/3d/support/flow/geometryUtils.js +1 -1
  241. package/views/3d/support/index.js +1 -1
  242. package/views/3d/terrain/OverlayRenderer.js +1 -1
  243. package/views/3d/terrain/TerrainRenderer.js +1 -1
  244. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  245. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  246. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +3 -3
  247. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  248. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  249. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  250. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  251. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  252. package/views/3d/webgl-engine/materials/DefaultLayouts.js +1 -1
  253. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  254. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  255. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  256. package/views/3d/webgl-engine/shaders/AnimatedLine.glsl.js +17 -0
  257. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  258. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  259. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  260. package/views/BreakpointsOwner.js +1 -1
  261. package/views/DOMContainer.js +1 -1
  262. package/views/PopupView.js +1 -1
  263. package/views/VideoView.js +1 -1
  264. package/views/Viewport2DBaseMixin.js +1 -1
  265. package/views/Viewport2DMixin.js +1 -1
  266. package/views/draw/DrawGraphicTool.js +1 -1
  267. package/views/draw/DrawScreenTool.js +1 -1
  268. package/views/draw/DrawTool.js +1 -1
  269. package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
  270. package/views/layers/CatalogDynamicGroupLayerView.js +1 -1
  271. package/views/layers/CatalogFootprintLayerView.js +1 -1
  272. package/views/layers/CatalogLayerView.js +1 -1
  273. package/views/layers/DimensionLayerView.js +1 -1
  274. package/views/layers/FeatureLayerView.js +1 -1
  275. package/views/layers/ImageryLayerView.js +1 -1
  276. package/views/layers/ImageryTileLayerView.js +1 -1
  277. package/views/layers/LineOfSightLayerView.js +1 -1
  278. package/views/layers/MapImageLayerView.js +1 -1
  279. package/views/layers/MediaLayerView.js +1 -1
  280. package/views/layers/OGCFeatureLayerView.js +1 -1
  281. package/views/layers/PointCloudLayerView.js +1 -1
  282. package/views/layers/RefreshableLayerView.js +1 -1
  283. package/views/layers/StreamLayerView.js +1 -1
  284. package/views/layers/ViewshedLayerView.js +1 -1
  285. package/views/layers/WMSLayerView.js +1 -1
  286. package/views/support/Scheduler.js +1 -1
  287. package/views/video/VideoOperationalDataView.js +1 -1
  288. package/views/webgl/BufferObject.js +1 -1
  289. package/views/webgl/Program.js +1 -1
  290. package/views/webgl/Renderbuffer.js +1 -1
  291. package/views/webgl/Texture.js +1 -1
  292. package/views/webgl/Util.js +1 -1
  293. package/webscene/SunLighting.js +1 -1
  294. package/webscene/VirtualLighting.js +1 -1
  295. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  296. package/widgets/Directions/DirectionsSearchTool.js +1 -1
  297. package/widgets/Editor/EditorViewModel.js +1 -1
  298. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  299. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  300. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  301. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  302. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  303. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
  304. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  305. package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
  306. package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
  307. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
  308. package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +1 -1
  309. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  310. package/widgets/PanoramicViewer/PanoramicZoomConditions.js +1 -1
  311. package/widgets/PanoramicViewer.js +1 -1
  312. package/widgets/Sketch/support/ResponsiveToolbar/ToolbarGroupBase.js +1 -1
  313. package/widgets/support/GoTo.js +1 -1
  314. package/assets/esri/core/workers/chunks/0202c2ac73354e3970b2.js +0 -1
  315. package/assets/esri/core/workers/chunks/02dc6e31b1244e5bb785.js +0 -1
  316. package/assets/esri/core/workers/chunks/080c79d6caca3b6a2db2.js +0 -1
  317. package/assets/esri/core/workers/chunks/084236ca316aad980192.js +0 -1
  318. package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +0 -1
  319. package/assets/esri/core/workers/chunks/0f6203ae32663b2b52db.js +0 -1
  320. package/assets/esri/core/workers/chunks/16a78f5a82f5ca163816.js +0 -1
  321. package/assets/esri/core/workers/chunks/1cc30073f8200b67cff6.js +0 -1
  322. package/assets/esri/core/workers/chunks/1d75cb1747ffb7b8b050.js +0 -1
  323. package/assets/esri/core/workers/chunks/242b216d61940aebe8e1.js +0 -1
  324. package/assets/esri/core/workers/chunks/32756905bcf11699b3f7.js +0 -1
  325. package/assets/esri/core/workers/chunks/35d238a5a6501f89bed7.js +0 -1
  326. package/assets/esri/core/workers/chunks/36a2a8b6547604bad2ab.js +0 -1
  327. package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +0 -1
  328. package/assets/esri/core/workers/chunks/40c1d65039c8f1d6afa0.js +0 -1
  329. package/assets/esri/core/workers/chunks/49dce142ad1ea4c01d00.js +0 -1
  330. package/assets/esri/core/workers/chunks/4b89d5b9e35bf79b321e.js +0 -1
  331. package/assets/esri/core/workers/chunks/4c47d327815e281c457e.js +0 -1
  332. package/assets/esri/core/workers/chunks/4ea96aff38bb301dc40d.js +0 -346
  333. package/assets/esri/core/workers/chunks/54a49a25845897a15ab1.js +0 -1
  334. package/assets/esri/core/workers/chunks/576e408fb0834f3948e8.js +0 -1
  335. package/assets/esri/core/workers/chunks/5ce62d9fff80d014d186.js +0 -1
  336. package/assets/esri/core/workers/chunks/5e805c9e9012dd39ec86.js +0 -1
  337. package/assets/esri/core/workers/chunks/6136bf09950adc46bc33.js +0 -1
  338. package/assets/esri/core/workers/chunks/666afe669866c44830bd.js +0 -1
  339. package/assets/esri/core/workers/chunks/6a0fbc54638f7de138c1.js +0 -1
  340. package/assets/esri/core/workers/chunks/7d0c4e1518a6a63a3f87.js +0 -1
  341. package/assets/esri/core/workers/chunks/843b6029d4c13115e1ac.js +0 -1
  342. package/assets/esri/core/workers/chunks/86d6007c45f2aa643ac8.js +0 -1
  343. package/assets/esri/core/workers/chunks/8bf04be4052bf148777a.js +0 -1
  344. package/assets/esri/core/workers/chunks/8ea34878a1ef24b4ded3.js +0 -1
  345. package/assets/esri/core/workers/chunks/8eea6251aa09725e654e.js +0 -1
  346. package/assets/esri/core/workers/chunks/90145d49a0cec902435c.js +0 -1
  347. package/assets/esri/core/workers/chunks/916691122d7fb38497d6.js +0 -1
  348. package/assets/esri/core/workers/chunks/92ad9098006568358550.js +0 -1
  349. package/assets/esri/core/workers/chunks/9ae18a17f62d91167202.js +0 -1
  350. package/assets/esri/core/workers/chunks/9c510df592befb9ff892.js +0 -1
  351. package/assets/esri/core/workers/chunks/a273f80298417edecc07.js +0 -1
  352. package/assets/esri/core/workers/chunks/a2ed7a3cd518dd136ec7.js +0 -1
  353. package/assets/esri/core/workers/chunks/a6a7279b09d7962147ec.js +0 -1
  354. package/assets/esri/core/workers/chunks/aba520714efc01bead36.js +0 -1
  355. package/assets/esri/core/workers/chunks/acb9c166259872828646.js +0 -1
  356. package/assets/esri/core/workers/chunks/accff253af360c34e8a8.js +0 -1
  357. package/assets/esri/core/workers/chunks/ae6eed26fc932bc08356.js +0 -1
  358. package/assets/esri/core/workers/chunks/b32c1b60896a72e0ae90.js +0 -1
  359. package/assets/esri/core/workers/chunks/b4bb461955a4c2bce072.js +0 -1
  360. package/assets/esri/core/workers/chunks/b98279213f45a0c27600.js +0 -1
  361. package/assets/esri/core/workers/chunks/ba5b24beebeb703b5919.js +0 -1
  362. package/assets/esri/core/workers/chunks/bd7d19ba0c7d9143a455.js +0 -1
  363. package/assets/esri/core/workers/chunks/bffaf1f20f18c75fad4e.js +0 -1
  364. package/assets/esri/core/workers/chunks/c4f8da6c238eb5e91f91.js +0 -1
  365. package/assets/esri/core/workers/chunks/cdabea4718a7e7d34cb8.js +0 -1
  366. package/assets/esri/core/workers/chunks/ce7155ae63e7bb74be00.js +0 -1
  367. package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +0 -1
  368. package/assets/esri/core/workers/chunks/d915d0a30d9beb24bd3a.js +0 -1
  369. package/assets/esri/core/workers/chunks/d9a23fb0c6c936d5e8ec.js +0 -1
  370. package/assets/esri/core/workers/chunks/dc6538a2d5a1e60d0209.js +0 -1
  371. package/assets/esri/core/workers/chunks/dca633ae3bfd4a3f9bb3.js +0 -1
  372. package/assets/esri/core/workers/chunks/dfa7976085f7408a366c.js +0 -1
  373. package/assets/esri/core/workers/chunks/e0a5b499b3ae38c21278.js +0 -1
  374. package/assets/esri/core/workers/chunks/e1a20ba7d6279f59adc0.js +0 -1
  375. package/assets/esri/core/workers/chunks/e49a135a2933306a6105.js +0 -1
  376. package/assets/esri/core/workers/chunks/e9a9174c4d1a0a9effb6.js +0 -1
  377. package/assets/esri/core/workers/chunks/edead1a123860cc74b1b.js +0 -1
  378. package/assets/esri/core/workers/chunks/f90573c9dc36e51cd588.js +0 -1
  379. package/assets/esri/core/workers/chunks/fa9658dbfb921f9c13af.js +0 -1
  380. package/assets/esri/core/workers/chunks/fb5e2b1ced03eef28e96.js +0 -1
  381. package/assets/esri/core/workers/chunks/fd8f4eabb8bbc593dd9c.js +0 -1
  382. package/assets/esri/core/workers/chunks/fe1902d63f610cebd947.js +0 -1
  383. package/core/HeapSort.js +0 -5
  384. package/layers/graphics/controllers/StreamController.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7721,8256],{4146:(t,e,r)=>{r.d(e,{A:()=>v});var i=r(90237),n=r(78888),s=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),d=r(84952),h=r(10107),p=(r(44208),r(87811),r(40608)),y=r(5443),f=r(16930),m=r(92602),g=r(64272);let b=0,v=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(e)}catch(t){const r=e?.portalItem,i=r?.id||"unset",n=r?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch(t=>{(0,c.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,n.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,h.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,i._)([(0,h.MZ)({type:y.A})],v.prototype,"fullExtent",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,h.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,h.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,h.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,h.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,h.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,h.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,h.MZ)({type:f.A})],v.prototype,"spatialReference",void 0),(0,i._)([(0,h.MZ)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,h.MZ)()],v.prototype,"url",void 0),(0,i._)([(0,h.MZ)({type:g.T})],v.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,p.$)("esri.layers.Layer")],v)},4197:(t,e,r)=>{r.d(e,{jh:()=>n,l5:()=>o,xm:()=>s});var i=r(34275);function n(t,e=!1){return t<=i.y9?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function s(t){return((0,i.iu)(t)?t.byteLength/8:t.length)<=i.y9?Array.from(t):new Float64Array(t)}function o(t,e,r){return Array.isArray(t)?t.slice(e,e+r):t.subarray(e,e+r)}},4902:(t,e,r)=>{r.d(e,{A:()=>c});var i=r(90237),n=r(40608);let s=0;const o=t=>{const e=t;let r=class extends e{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return r=(0,i._)([(0,n.$)("esri.core.Identifiable")],r),r},a=t=>{const e=t;let r=class extends e{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return r=(0,i._)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],r),r};let l=class extends(o(class{})){};var u;l=(0,i._)([(0,n.$)("esri.core.Identifiable")],l),(u=l||(l={})).IdentifiableMixin=o,u.NumericIdentifiableMixin=a;const c=l},6867:(t,e,r)=>{r.d(e,{i:()=>d});var i=r(58083),n=r(9093),s=r(38954),o=r(51850),a=r(87317),l=r(91829),u=r(71351),c=r(29878);class d{get ray(){return this._ray}get distanceInRenderSpace(){return null==this.distance?null:((0,s.g)(p,this.ray.direction,this.distance),(0,s.l)(p))}withinDistance(t){return!!h(this)&&this.distanceInRenderSpace<=t}getIntersectionPoint(t){return!!h(this)&&((0,s.g)(p,this.ray.direction,this.distance),(0,s.f)(t,this.ray.origin,p),!0)}getTransformedNormal(t){return(0,s.c)(y,this.normal),y[3]=0,(0,a.t)(y,y,this.transformation),(0,s.c)(t,y),(0,s.n)(t,t)}constructor(t){this.intersector=c.d.OBJECT,this.normal=(0,o.vt)(),this.transformation=(0,n.vt)(),this._ray=(0,u.vt)(),this.init(t)}init(t){this.distance=this.target=this.drapedLayerOrder=this.renderPriority=null,this.intersector=c.d.OBJECT,(0,u.C)(t,this._ray)}set(t,e,r,a,l,u,c){this.intersector=t,this.distance=r,(0,s.c)(this.normal,a??o.Cb),(0,i.C)(this.transformation,l??n.zK),this.target=e,this.drapedLayerOrder=u,this.renderPriority=c}copy(t){(0,u.C)(t.ray,this._ray),this.intersector=t.intersector,this.distance=t.distance,this.target=t.target,this.drapedLayerOrder=t.drapedLayerOrder,this.renderPriority=t.renderPriority,(0,s.c)(this.normal,t.normal),(0,i.C)(this.transformation,t.transformation)}}function h(t){return null!=t?.distance}const p=(0,o.vt)(),y=(0,l.vt)()},29133:(t,e,r)=>{r.d(e,{xH:()=>o,N1:()=>l}),r(38954);var i=r(51850),n=r(71351),s=(r(62258),r(58083),r(70328),r(97937),r(6867),r(65215));function o(t,e){return a(t)===a(e)}function a(t){if(null==t)return null;const e=null!=t.layer?t.layer.id:"";let r=null;return r=null!=t.objectId?t.objectId:null!=t.layer&&"objectIdField"in t.layer&&null!=t.layer.objectIdField&&null!=t.attributes?t.attributes[t.layer.objectIdField]:t.uid,null==r?null:`o-${e}-${r}`}r(29878),s.R,s.H,s.R,s.R,s.R,r(49718),r(87582),(0,i.vt)();const l={json:{write:{writer:function(t,e){null!=t?.layer?.objectIdField&&null!=t.attributes&&(e.feature={layerId:t.layer.id,objectId:t.attributes[t.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String],isRequired:!0},"feature.objectId":{type:[Number,String],isRequired:!0}}},origins:{"web-scene":{read:function(t){if(null!=t.layerId&&null!=t.objectId)return{uid:null,layer:{id:t.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:t.objectId}}}}}}};(0,n.vt)(),(0,i.vt)()},29878:(t,e,r)=>{var i;r.d(e,{d:()=>i}),function(t){t[t.OBJECT=0]="OBJECT",t[t.HUD=1]="HUD",t[t.TERRAIN=2]="TERRAIN",t[t.OVERLAY=3]="OVERLAY",t[t.I3S=4]="I3S",t[t.PCL=5]="PCL",t[t.LOD=6]="LOD",t[t.VOXEL=7]="VOXEL",t[t.TILES3D=8]="TILES3D"}(i||(i={}))},49718:(t,e,r)=>{r(51850);var i=r(6867);r(29878),i.i},62258:(t,e,r)=>{var i,n;(n=i||(i={}))[n.MIN=0]="MIN",n[n.MINMAX=1]="MINMAX",n[n.ALL=2]="ALL"},62885:(t,e,r)=>{r.d(e,{H:()=>s,V:()=>n});var i=r(5503);function n(t,e,r=i.A){return e||(e=new r),e===t||(e.removeAll(),(n=t)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?e.addMany(t):t&&e.add(t)),e;var n}function s(t){return t}},64272:(t,e,r)=>{r.d(e,{T:()=>h});var i,n=r(90237),s=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),c=r(43937),d=r(98623);let h=class extends s.A{static{i=this}static get allTime(){return p}static get empty(){return y}static fromArray(t){return new i({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===i&&r===n}expandTo(t,e=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,t,e));let n=this.end;if(n){const r=(0,o.lL)(n,t,e);n=n.getTime()===r.getTime()?r:(0,o.S1)(r,1,t,e)}return new i({start:r,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,a;return n>=e&&n<=r?o=n:e>=n&&e<=s&&(o=e),r>=n&&r<=s?a=r:s>=e&&s<=r&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(t,e,r=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:s,end:a}=this;return null!=s&&(n.start=(0,o.S1)(s,t,e,r)),null!=a&&(n.end=(0,o.S1)(a,t,e,r)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:r})}};(0,n._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n._)([(0,l.w)("end")],h.prototype,"readEnd",null),(0,n._)([(0,c.K)("end")],h.prototype,"writeEnd",null),(0,n._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n._)([(0,l.w)("start")],h.prototype,"readStart",null),(0,n._)([(0,c.K)("start")],h.prototype,"writeStart",null),h=i=(0,n._)([(0,u.$)("esri.time.TimeExtent")],h);const p=new h,y=new h({start:void 0,end:void 0})},65215:(t,e,r)=>{r.d(e,{H:()=>i,R:()=>n});class i{constructor(t){this.layerViewUid=t}}class n extends i{constructor(t,e){super(t),this.graphicUid=e}}},69540:(t,e,r)=>{r.d(e,{A:()=>h});var i=r(90237),n=r(69622),s=(r(44208),r(4718)),o=(r(53966),r(97768)),a=r(35666),l=r(88620),u=r(40608);const c=t=>{const e=t;let r=class extends e{clone(t){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const r=e.metadata,i=e.store,n={},u=new Map;for(const e in r){const o=r[e],l=i?.originOf(e),c=o.clonable;if(o.readOnly||!1===c||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const d=this[e];let h=null;h="function"==typeof c?c(d,t):"reference"===c?d:(0,s.TU)(d,t),null!=d&&null==h||(l===a.Gr.DEFAULTS?u.set(e,h):n[e]=h)}const c=new(0,Object.getPrototypeOf(this).constructor)(n);if(u.size){const t=(0,l.oY)(c)?.store;if(t)for(const[e,r]of u)t.set(e,r,a.Gr.DEFAULTS)}return c}};return r=(0,i._)([(0,u.$)("esri.core.Clonable")],r),r};let d=class extends(c(n.A)){};d=(0,i._)([(0,u.$)("esri.core.Clonable")],d),(d||(d={})).ClonableMixin=c;const h=d},70328:(t,e,r)=>{r.d(e,{BI:()=>b,Ej:()=>h,Ie:()=>m,Jt:()=>g,Ne:()=>p,RF:()=>c,aI:()=>_,fA:()=>o,gE:()=>l,hZ:()=>f,iT:()=>d,is:()=>v,qv:()=>M,vI:()=>y,vY:()=>a,v_:()=>A,vt:()=>s,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function s(t=A){return[t[0],t[1],t[2],t[3],t[4],t[5]]}function o(t,e,r,i,n,o,a=s()){return a[0]=t,a[1]=e,a[2]=r,a[3]=i,a[4]=n,a[5]=o,a}function a(t,e=s()){return function(t,e,r,i=s()){return f(i,M),function(t,e,r=0,i=e.length/3){let n=t[0],s=t[1],o=t[2],a=t[3],l=t[4],u=t[5];for(let t=0;t<i;t++)n=Math.min(n,e[r+3*t]),s=Math.min(s,e[r+3*t+1]),o=Math.min(o,e[r+3*t+2]),a=Math.max(a,e[r+3*t]),l=Math.max(l,e[r+3*t+1]),u=Math.max(u,e[r+3*t+2]);t[0]=n,t[1]=s,t[2]=o,t[3]=a,t[4]=l,t[5]=u}(i,t,e,r),i}(t,0,t.length/3,e)}function l(t,e=(0,n.jh)(24)){const[r,i,s,o,a,l]=t;return e[0]=r,e[1]=i,e[2]=s,e[3]=r,e[4]=i,e[5]=l,e[6]=r,e[7]=a,e[8]=s,e[9]=r,e[10]=a,e[11]=l,e[12]=o,e[13]=i,e[14]=s,e[15]=o,e[16]=i,e[17]=l,e[18]=o,e[19]=a,e[20]=s,e[21]=o,e[22]=a,e[23]=l,e}function u(t,e){const r=isFinite(t[2])||isFinite(t[5]);return new i.A(r?{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],zmin:t[2],zmax:t[5],spatialReference:e}:{xmin:t[0],xmax:t[3],ymin:t[1],ymax:t[4],spatialReference:e})}function c(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[3]),t[4]=Math.max(t[4],e[4]),t[5]=Math.max(t[5],e[5])}function d(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.min(t[2],e[2]),t[3]=Math.max(t[3],e[0]),t[4]=Math.max(t[4],e[1]),t[5]=Math.max(t[5],e[2])}function h(t,e=[0,0,0]){return e[0]=function(t){return t[0]>=t[3]?0:t[3]-t[0]}(t),e[1]=function(t){return t[1]>=t[4]?0:t[4]-t[1]}(t),e[2]=function(t){return t[2]>=t[5]?0:t[5]-t[2]}(t),e}function p(t,e,r=t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r!==t&&(r[3]=t[3],r[4]=t[4],r[5]=t[5]),r}function y(t,e,r=t){return r[3]=e[0],r[4]=e[1],r[5]=e[2],r!==t&&(r[0]=t[0],r[1]=t[1],r[2]=t[2]),t}function f(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function m(t){return t?f(t,M):s(M)}function g(t,e){return t[0]=e[0],t[1]=e[1],t[2]=Number.NEGATIVE_INFINITY,t[3]=e[2],t[4]=e[3],t[5]=Number.POSITIVE_INFINITY,t}function b(t,e,r,i,n){return t[0]=e,t[1]=r,t[2]=Number.NEGATIVE_INFINITY,t[3]=i,t[4]=n,t[5]=Number.POSITIVE_INFINITY,t}function v(t){return 6===t.length}function _(t,e,r){if(null==t||null==e)return t===e;if(!v(t)||!v(e))return!1;if(r){for(let i=0;i<t.length;i++)if(!r(t[i],e[i]))return!1}else for(let r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}const M=[1/0,1/0,1/0,-1/0,-1/0,-1/0],A=[0,0,0,0,0,0];s()},78553:(t,e,r)=>{r.d(e,{D:()=>s,p:()=>n});var i=r(56507);function n(t){const e=(0,i.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,r)=>{r.d(e,{A:()=>p});var i=r(90237),n=r(69540),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends n.A{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,i._)([(0,s.MZ)()],a.prototype,"type",void 0),a=(0,i._)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],a);const l=a;var u=r(69622),c=r(4902),d=r(25482);let h=0,p=class extends(d.A.JSONSupportMixin(n.A.ClonableMixin(c.A.IdentifiableMixin(u.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${h++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}equals(t){return!0}};(0,i._)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],p.prototype,"id",void 0),(0,i._)([(0,s.MZ)({clonable:!1,value:null})],p.prototype,"parent",null),(0,i._)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":l}}})],p.prototype,"origin",void 0),p=(0,i._)([(0,o.$)("esri.analysis.Analysis")],p)},87582:(t,e,r)=>{r(6867);var i=r(65215);r(29878),i.R},92071:(t,e,r)=>{r.d(e,{P:()=>v,L:()=>_});var i=r(90237),n=r(69622),s=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach((t,r)=>{e.set(r,(0,o.o8)(t),a.Gr.DEFAULTS)});for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach((i,n)=>{t&&t.has(n)||e.set(n,(0,o.o8)(i),r)})}return e}get(t,e){const r=void 0===e?this._values:this._originStores[e];return r?r.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=r){const i=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,r),i!==e}return!1}delete(t,e=a.Gr.USER){const r=this._originStores[e];if(!r)return;const i=r.get(t);if(r.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let r=e-1;r>=0;r--){const e=this._originStores[r];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,r);break}}}return i}has(t,e){const r=void 0===e?this._values:this._originStores[e];return!!r&&r.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const r=this._originStores[e],i=r?.get(t),n=this._values.get(t);return this._values.set(t,i),this._propertyOriginMap.set(t,e),n!==i}originOf(t){return this._propertyOriginMap.get(t)||a.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=r(45917),c=r(88620),d=r(40608);const h=t=>{const e=t;let r=class extends e{constructor(...t){super(...t);const e=(0,c.oY)(this),r=e.store,i=new l;e.store=i,(0,s.k)(e,r,i)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const r=p(this),i=(0,a.aB)(e);if("string"==typeof t)return r.get(t,i);const n={};return t.forEach(t=>{n[t]=r.get(t,i)}),n}originOf(t){return(0,a.OL)(this.originIdOf(t))}originIdOf(t){return p(this).originOf(t)}revert(t,e){const r=p(this),i=(0,a.aB)(e),n=(0,c.oY)(this);let s;s="string"==typeof t?"*"===t?r.keys(i):[t]:t,s.forEach(t=>{n.invalidate(t),r.revert(t,i),n.commit(t)})}};return r=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],r),r};function p(t){return(0,c.oY)(t).store}let y=class extends(h(n.A)){};y=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var f=r(16649),m=r(49422);const g=t=>{const e=t;let r=class extends e{constructor(...t){super(...t)}clear(t,e="user"){(0,c.oY)(this).clearOrigin(t,(0,a.aB)(e))}write(t,e){return(0,m.M)(this,t=t||{},e),t}setAtOrigin(t,e,r){(0,c.oY)(this).setAtOrigin(t,e,(0,a.aB)(r))}removeOrigin(t){const e=b(this),r=(0,a.aB)(t),i=e.keys(r);for(const t of i)e.originOf(t)===r&&e.set(t,e.get(t,r),a.Gr.USER)}updateOrigin(t,e){const r=b(this),i=(0,a.aB)(e),n=(0,f.Jt)(this,t);for(let e=i+1;e<a.AU;++e)r.delete(t,e);r.set(t,n,i)}toJSON(t){return this.write({},t)}};return r=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function b(t){return(0,c.oY)(t).store}const v=t=>{const e=g(h(t));let r=class extends e{constructor(...t){super(...t)}};return r=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],r),r};let _=class extends(v(n.A)){};_=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],_)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[788,3186,3447,3651,4697,7060,8407],{5503:(e,t,i)=>{i.d(t,{A:()=>E});var r,s=i(90237),n=i(98291),a=i(65529),l=i(36563),o=i(4718),u=i(93687);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(r||(r={}));var c,h=i(11932),d=i(56507),f=i(62788),p=i(10107),y=i(7695),_=i(40608),g=i(95488),m=i(12195);class w{constructor(e,t,i,r,s){this.target=e,this.added=t,this.removed=i,this.start=r,this.deleteCount=s}}const b=new u.A(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function F(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function S(e){return e?e instanceof k?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function v(e){if(e?.length)return e[0]}function I(e,t,i,r){const s=Math.min(e.length-i,t.length-r);let n=0;for(;n<s&&e[i+n]===t[r+n];)n++;return n}function A(e,t,i,r){t&&t.forEach((t,s,n)=>{e.push(t),A(e,i.call(r,t,s,n),i,r)})}const T=new Set,x=new Set,C=new Set,D=new Map;let R=0,k=class extends a.A.EventedAccessor{static{c=this}static{this.ofType=e=>{if(!e)return c;if(D.has(e))return D.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const r=e.typeMap[i].prototype.declaredClass;t?t+=` | ${r}`:t=r}let i=class extends c{};return(0,s._)([(0,y.u)({Type:e,ensureType:"function"==typeof e?(0,d.dp)(e):(0,d.aq)(e)})],i.prototype,"itemType",void 0),i=(0,s._)([(0,_.$)(`esri.core.Collection<${t}>`)],i),D.set(e,i),i}}static isCollection(e){return null!=e&&e instanceof c}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new g.I,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:R++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof c?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),this._emitter.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get items(){return(0,f.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(r.ADD)||(this._splice(0,this.length,S(e)),this._emitAfterChanges(r.ADD))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,l.hA)();if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,l.hA)(()=>{i.removed=!0,e.splice(e.indexOf(i),1)})}return this._emitter.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,r=this.on(e,e=>{i()?.call(null,e),r.remove()});return r}add(e,t){if((0,f.gc)(this._observable),this._emitBeforeChanges(r.ADD))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(r.ADD),this}addMany(e,t=this._items.length){if((0,f.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(r.ADD))return this;const i=this.getNextIndex(t);return this._splice(i,0,S(e)),this._emitAfterChanges(r.ADD),this}at(e){if((0,f.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(r.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.map(o.o8)})}concat(...e){(0,f.gc)(this._observable);const t=e.map(S);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return;const i=this._splice(0,this.length),s=i.length;for(let r=0;r<s;r++)e.call(t,i[r],r,i);this._emitAfterChanges(r.REMOVE)}destroyAll(){this.drain(F)}destroyMany(e){const t=this.removeMany(e);return t.forEach(F),t}every(e,t){return(0,f.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,f.gc)(this._observable);const i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,f.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,f.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,f.gc)(this._observable);const i=[];return A(i,this,e,t),new c(i)}forEach(e,t){return(0,f.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,f.gc)(this._observable),this._items[e]}getNextIndex(e){(0,f.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,f.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,f.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,f.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,f.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,f.gc)(this._observable);const i=this._items.map(e,t);return new c({items:i})}reorder(e,t=this.length-1){(0,f.gc)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(r.MOVE))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(r.MOVE)}return e}}pop(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return;const e=v(this._splice(this.length-1,1));return this._emitAfterChanges(r.REMOVE),e}push(...e){return(0,f.gc)(this._observable),this._emitBeforeChanges(r.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(r.ADD)),this.length}reduce(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,f.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,f.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,f.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(r.REMOVE))return;const t=v(this._splice(e,1));return this._emitAfterChanges(r.REMOVE),t}removeMany(e){if((0,f.gc)(this._observable),!e?.length||this._emitBeforeChanges(r.REMOVE))return[];const t=e instanceof c?e.toArray():e,i=this._items,s=[],n=t.length;for(let e=0;e<n;e++){const r=t[e],n=i.indexOf(r);if(n>-1){const r=1+I(t,i,e+1,n+1),a=this._splice(n,r);a&&a.length>0&&s.push.apply(s,a),e+=r-1}}return this._emitAfterChanges(r.REMOVE),s}reverse(){if((0,f.gc)(this._observable),this._emitBeforeChanges(r.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(r.MOVE),this}shift(){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.REMOVE))return;const e=v(this._splice(0,1));return this._emitAfterChanges(r.REMOVE),e}slice(e=0,t=this.length){return(0,f.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,f.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,f.gc)(this._observable),!this.length||this._emitBeforeChanges(r.MOVE)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(r.MOVE),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,f.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const s=(t?r.REMOVE:0)|(i.length?r.ADD:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,i)||[];return this._emitAfterChanges(s),n}toArray(){return(0,f.gc)(this._observable),this._items.slice()}toJSON(e){return(0,f.gc)(this._observable),this.toArray().map(t=>(0,m.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,f.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,f.gc)(this._observable),this._items.toString()}unshift(...e){return(0,f.gc)(this._observable),!e.length||this._emitBeforeChanges(r.ADD)||(this._splice(0,0,e),this._emitAfterChanges(r.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const r=this._items,s=this.itemType;let n,a;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,h._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(a=r.splice(e,t),this.hasEventListener("before-remove")){const t=b.acquire();t.target=this,t.cancellable=!0;for(let i=0,s=a.length;i<s;i++)n=a[i],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(a.splice(i,1),r.splice(e,0,n),e+=1,i-=1,s-=1);b.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=b.acquire();e.target=this,e.cancellable=!1;const t=a.length;for(let i=0;i<t;i++)e.reset(a[i]),this.emit("after-remove",e);b.release(e)}}if(i?.length){if(s){const e=[];for(const t of i){const i=s.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),a=e===this.length;if(t||n){const s=b.acquire();s.target=this,s.cancellable=!0;const l=b.acquire();l.target=this,l.cancellable=!1;for(const o of i)t?(s.reset(o),this.emit("before-add",s),s.defaultPrevented||(a?r.push(o):r.splice(e++,0,o),this._set("length",r.length),n&&(l.reset(o),this.emit("after-add",l)))):(a?r.push(o):r.splice(e++,0,o),this._set("length",r.length),l.reset(o),this.emit("after-add",l));b.release(l),b.release(s)}else{if(a)for(const e of i)r.push(e);else r.splice(e,0,...i);this._set("length",r.length)}}if((i?.length||a?.length)&&this._notifyChangeEvent(i,a),this.hasEventListener("after-splice")){const r=new w(this,i,a,e,t);this.emit("after-splice",r)}return a}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=b.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,b.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=b.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),b.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;T.clear(),x.clear(),C.clear();for(const{added:t,removed:i}of e){if(t)if(0===C.size&&0===x.size)for(const e of t)T.add(e);else for(const e of t)x.has(e)?(C.add(e),x.delete(e)):C.has(e)||T.add(e);if(i)if(0===C.size&&0===T.size)for(const e of i)x.add(e);else for(const e of i)T.has(e)?T.delete(e):(C.delete(e),x.add(e))}const i=n.A.acquire();T.forEach(e=>{i.push(e)});const r=n.A.acquire();x.forEach(e=>{r.push(e)});const s=this._items,a=t.items,l=n.A.acquire();if(C.forEach(e=>{a.indexOf(e)!==s.indexOf(e)&&l.push(e)}),t.listeners&&(i.length||r.length||l.length)){const e={target:this,added:i,removed:r,moved:l},s=t.listeners.length;for(let i=0;i<s;i++){const r=t.listeners[i];r.removed||r.callback.call(this,e)}}n.A.release(i),n.A.release(r),n.A.release(l)}T.clear(),x.clear(),C.clear()}};(0,s._)([(0,p.MZ)()],k.prototype,"_updating",void 0),(0,s._)([(0,p.MZ)()],k.prototype,"length",void 0),(0,s._)([(0,p.MZ)()],k.prototype,"items",null),(0,s._)([(0,p.MZ)({readOnly:!0})],k.prototype,"updating",null),k=c=(0,s._)([(0,_.$)("esri.core.Collection")],k);const E=k},6797:(e,t,i)=>{i.d(t,{Mj:()=>d,Ui:()=>p,w2:()=>f});var r=i(69622),s=i(5503),n=i(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof r.A}function o(e){return e instanceof s.A?Object.keys(e.items):l(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function h(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=o(e),s=o(t);if(0===r.length&&0===s.length)return;if(!r.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter(e=>!r.includes(e)),d=r.filter(e=>!s.includes(e)),f=r.filter(i=>s.includes(i)&&u(e,i)!==u(t,i)).concat(n,d).sort(),p=c(e);if(p&&a.has(p)&&f.length)return{type:"complete",oldValue:e,newValue:t};let y;const _=l(e)&&l(t);for(const r of f){const s=u(e,r),n=u(t,r);let a;if((_||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(i&&i[r]&&"function"==typeof i[r])a=i[r]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;a={type:"complete",oldValue:s,newValue:n}}else a="object"==typeof s&&"object"==typeof n&&c(s)===c(n)?h(s,n):{type:"complete",oldValue:s,newValue:n};null!=a&&(null!=y?y.diff[r]=a:y={type:"partial",diff:{[r]:a}})}}return y}function d(e,t){return function(e,t){if(null==e)return!1;const i=t.split(".");let r=e;for(const e of i){if("complete"===r.type)return!0;if("partial"!==r.type)return!1;{const t=r.diff[e];if(!t)return!1;r=t}}return!0}(e,t)}function f(e,t){if(!e)return!1;if("partial"===e.type){const i=Object.keys(e.diff);return 1===i.length&&i[0]===t}return!1}function p(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},7695:(e,t,i)=>{function r(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>r})},10407:(e,t,i)=>{i.d(t,{It:()=>f,LG:()=>a,OM:()=>u,Sm:()=>c,Y:()=>l,bK:()=>o,mm:()=>d,sQ:()=>h});var r=i(98988),s=i(16930),n=i(28735);function a(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,d.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function c(e,t,i){i?a(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function f(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit");const l="update"===r||"admin"===r;return l?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:l}}}},17311:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(90237),s=i(69622),n=i(4576),a=i(60999),l=i(5503),o=i(10107),u=(i(44208),i(53966),i(40608)),c=i(30524),h=i(43668);let d=class extends s.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,a.UT)(()=>(0,h.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([i.e(4560),i.e(9926)]).then(i.bind(i,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const i=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(i.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:i,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(i,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const i=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of i){const i=t.split("."),r=this.fieldsIndex.get(i.at(-1)??"");r&&e.add(r.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const i of t){const t=this.fieldsIndex.get(i);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,i){const r=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],i)).get(r)??""}async getTitles(e,t,i){const r=new Map,s=i?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:n}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);i?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:a,workingTitle:l}=this,o=l&&a;t.forEach(t=>{const i=t.getObjectId()??t.attributes[e.objectIdField],u=o?n({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:a,globalAttributes:this._createFormattedAttributes(e,t,s).global,layer:e,text:l}):"";r.set(i,u)})}catch{}return r}async _checkAndReQueryGraphics(e,t){const i=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(n.Ru);if(i.length!==t.length)return t;if(t.some(e=>!(0,c.Kl)(e,this.requiredFields))){const r=e.createQuery();r.where="1=1",r.outFields=[...this.requiredFields],r.objectIds=i;const s=await e.queryFeatures(r);if(s?.features.length===t.length)return s.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const i of e){if(!i.fieldName)continue;const e=this.fieldsIndex.get(i.fieldName),r=e?.name??i.fieldName;i.fieldName=r,t.set(r.toLowerCase(),i)}return t}_createFormattedAttributes(e,t,i="system"){const r=this.effectivePopupTemplate?.fieldInfos??[],s={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const i=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{s[`expression/${e.name}`]=e.func({vars:{$feature:i}})}catch{}}const n={...t.attributes,...s};return{global:this._featureUtils.formatAttributes({fieldInfos:r,attributes:n,graphic:t,timeZone:i,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter(e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/")))}};(0,r._)([(0,o.MZ)({readOnly:!0})],d.prototype,"_arcadeTask",null),(0,r._)([(0,o.MZ)()],d.prototype,"_featureUtils",void 0),(0,r._)([(0,o.MZ)({readOnly:!0})],d.prototype,"featureUtilsPromise",null),(0,r._)([(0,o.MZ)({readOnly:!0})],d.prototype,"calculatedExpressions",null),(0,r._)([(0,o.MZ)()],d.prototype,"displayField",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"effectivePopupTemplate",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"expressionsUsedInTitle",null),(0,r._)([(0,o.MZ)()],d.prototype,"fieldsIndex",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"fieldInfoMap",null),(0,r._)([(0,o.MZ)()],d.prototype,"fields",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"objectIdField",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"requiredFields",null),d=(0,r._)([(0,u.$)("esri.layers.support.TitleCreator")],d)},22671:(e,t,i)=>{i.d(t,{A:()=>m});var r,s=i(90237),n=i(52106),a=i(66552),l=i(25482),o=i(4718),u=i(10107),c=(i(44208),i(53966),i(36005)),h=i(40608),d=i(43937),f=i(16930),p=i(65864),y=i(50498),_=i(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let m=r=class extends l.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,p.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=f.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,o.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,s]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((s-e)/i));for(let e=0,t=n.length;e<t;e++)a?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,s],scale:[n,a]}=i;let l=null,o=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;o=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,e=>e*n+r,e=>s-e*a,l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){const r=f.A.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const n=e[t],a=i.fromJSON(n),l=n.geometry?.spatialReference;null==a.geometry||l||(a.geometry.spatialReference=r);const o=n.aggregateGeometries,u=a.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],i=o[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}s.push(a)}return s}_quantizePoints(e,t,i){let r,s;const n=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===s||(n.push([e-r,a-s]),r=e,s=a)}else r=t(l[0]),s=i(l[1]),n.push([r,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,p.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],a=this._quantizePoints(n,t,i);a&&s.push(a)}return s.length>0?((0,p.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,s){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,p.Bi)(e)?e.rings:e.paths;let a,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,s=r.length;e<s;e++){const s=r[e];e>0?(a+=s[0],l+=s[1]):(a=s[0],l=s[1]),s[0]=t(a),s[1]=i(l)}}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=s(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=s(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let a,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(a+=r[0],l+=r[1]):(a=r[0],l=r[1]),r[0]=t(a),r[1]=i(l)}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=s(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,u.MZ)({type:String,json:{write:!0}})],m.prototype,"displayFieldName",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],m.prototype,"features",void 0),(0,s._)([(0,c.w)("features")],m.prototype,"readFeatures",null),(0,s._)([(0,u.MZ)({type:[_.A],json:{write:!0}})],m.prototype,"fields",void 0),(0,s._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],m.prototype,"geometryType",void 0),(0,s._)([(0,d.K)("geometryType")],m.prototype,"writeGeometryType",null),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasM",void 0),(0,s._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasZ",void 0),(0,s._)([(0,u.MZ)({types:y.yR,json:{write:!0}})],m.prototype,"queryGeometry",void 0),(0,s._)([(0,c.w)("queryGeometry")],m.prototype,"readQueryGeometry",null),(0,s._)([(0,u.MZ)({type:f.A,json:{write:!0}})],m.prototype,"spatialReference",void 0),(0,s._)([(0,d.K)("spatialReference")],m.prototype,"writeSpatialReference",null),(0,s._)([(0,u.MZ)({json:{write:!0}})],m.prototype,"transform",void 0),m=r=(0,s._)([(0,h.$)("esri.rest.support.FeatureSet")],m),m.prototype.toJSON.isDefaultToJSON=!0},27865:(e,t,i)=>{i.d(t,{O9:()=>n,dw:()=>a,mj:()=>s});var r=i(59247);function s(e,t){const i=e.length>t.length?e:t;return(e.length>t.length?t:e).every((e,t)=>e.type===i[t].type)}function n(e,t){const i=e.length>t.length?e:t,s=e.length>t.length?t:e;for(let e=s.length;e<i.length;e++)s.push((0,r.sK)(i[e]))}function a(e){const t=e[0];return!!t&&"type"in t}},30235:(e,t,i)=>{i.d(t,{A:()=>p});var r=i(52106),s=i(87449),n=i(11221),a=i(89169),l=i(33325),o=i(80609),u=i(39516),c=i(91075),h=i(13600),d=i(33143),f=i(20437);class p extends n.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type||this._layer.objectIdField===i.name)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=l.zl.Standardised,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return l.J6.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new r.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,s){let n="",c=!1;if(null!==r&&(n=r.constructClause(),c=!0),this.isTable()&&t&&null!==e&&""!==e)return new a.A([],[],!0,null);const h=this._createQuery();h.where=(0,u.mA)(h.where,null===i?null===t?"1=1":"":(0,o.YY)(i,l.zl.Standardised)),h.spatialRelationship=this._makeRelationshipEnum(e),h.outSpatialReference=this.spatialReference,h.orderByFields=""!==n?n.split(","):null,h.geometry=null===t?null:t,h.relationParameter=this._makeRelationshipParam(e);const d=await this._layer.queryFeatures(h);if(null===d)return new a.A([],[],c,null);this._checkCancelled(s);const f=[];return d.features.forEach(e=>{const t=e.attributes[this._layer.objectIdField];f.push(t),this._featureCache[t]=this._changeFeature(e)}),new a.A([],f,c,null)}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _queryAllFeatures(){if(this._wset)return this._wset;if(await this._ensureLoaded(),this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach(t=>{const i=t.attributes[this._layer.objectIdField];e.push(i),this._featureCache[i]=this._changeFeature(t)}),this._wset=new a.A([],e,!1,null),this._wset}const e=this._createQuery();e.where="1=1";const t=await this._layer.queryFeatures(e),i=[];return t.features.forEach(e=>{const t=e.attributes[this._layer.objectIdField];i.push(t),this._featureCache[t]=this._changeFeature(e)}),this._wset=new a.A([],i,!1,null),this._wset}async _getFeatures(e,t,i){const r=[];-1!==t&&void 0===this._featureCache[t]&&r.push(t);for(let s=e._lastFetchedIndex;s<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&r.push(e._known[s]),r.length>i)));s++);if(0===r.length)return"success";throw new s.dr(s.D_.MissingFeatures)}async _refineSetBlock(e){return e}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const i in e)t[i]=e[i];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let i=e.layerDefinition.objectIdField;const r=e.layerDefinition.typeIdField??"",s=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)s.push(d.A.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!i){let t=!1;for(const r of e.layerDefinition.fields)if("oid"===r.type||"esriFieldTypeOID"===r.type){i=r.name,t=!0;break}if(!1===t){let t="FID",r=!0,s=0;for(;r;){let i=!0;for(const r of e.layerDefinition.fields)if(r.name===t){i=!1;break}!0===i?r=!1:(s++,t="FID"+s.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let i=0;i<a.length;i++)n.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),n[i].attributes[t]=i;a=n,i=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof f.A?o.push(t):o.push(f.A.fromJSON(t));let u=n;switch(u||(u=""),u){case"esriGeometryPoint":u="point";break;case"esriGeometryPolyline":u="polyline";break;case"esriGeometryPolygon":u="polygon";break;case"esriGeometryEnvelope":u="extent";break;case"esriGeometryMultipoint":u="multipoint";break;case"":case"esriGeometryNull":u="esriGeometryNull"}if("esriGeometryNull"!==u)for(const e of a)e.geometry&&e.geometry instanceof c.A==0&&(e.geometry.type=u,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const y={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:s,typeIdField:r,objectIdField:i,spatialReference:t},_="esriGeometryNull"===u||null===u;_||(y.geometryType=u);const g=new h.default(y);return e?.layerDefinition?.subtypeField&&e?.layerDefinition?.subtypes&&g.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new p({layer:g,spatialReference:t,isTable:_})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=this._createQuery();t.where=this.objectIdField+"="+e.toString();const i=await this._layer.queryFeatures(t);return 1===i.features.length?i.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return this._layer?.timeInfo}async getFeatureSetInfo(){const e=this._layer.title&&this._layer.parent;return this.fsetInfo??{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},32730:(e,t,i)=>{i.d(t,{BI:()=>_,D3:()=>p,XJ:()=>y,lc:()=>f,mX:()=>m,rU:()=>g,tH:()=>v});var r=i(799);const s="__begin__",n="__end__",a=new RegExp(s,"ig"),l=new RegExp(n,"ig"),o=new RegExp("^"+s,"i"),u=new RegExp(n+"$","i"),c='"',h=c+" + ",d=" + "+c;function f(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function p(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=f(e.labelExpression),t.type="conventional"),t}function _(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return m(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function m(e){let t;return e?(t=(0,r.HC)(e,e=>s+'$feature["'+e+'"]'+n),t=o.test(t)?t.replace(o,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(a,h).replaceAll(l,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,F=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,S=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=b.exec(e)||F.exec(e);return t?t[1]||t[3]:(t=S.exec(e),t?t[2]:null)}},32756:(e,t,i)=>{i.d(t,{Rr:()=>o,fY:()=>c,ne:()=>u});var r=i(90237),s=i(93637),n=i(10107),a=(i(44208),i(53966),i(87811),i(40608)),l=i(91880);function o(e,t,i){if(!e)return null;const r=e.find(e=>!!e.field);if(!r)return null;const s=new l.A;return s.read(r,i),[s]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:o},write:{writer:function(e,t,i,r){const n=e.find(e=>!!e.field);n&&(0,s.sM)(i,[n.toJSON()],t)}}}},c=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,r._)([(0,n.MZ)(u)],i.prototype,"orderBy",void 0),i=(0,r._)([(0,a.$)("esri.layers.mixins.OrderedLayer")],i),i}},33143:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(90237),s=i(69540),n=i(25482),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),o=i(40608),u=i(43937),c=i(80451),h=i(29005);let d=class extends(s.A.ClonableMixin(n.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,c.rS)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,r._)([(0,a.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,r._)([(0,l.w)("domains")],d.prototype,"readDomains",null),(0,r._)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,r._)([(0,a.MZ)({type:[h.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,r._)([(0,o.$)("esri.layers.support.FeatureType")],d)},35704:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(87449),s=i(11221),n=i(89169),a=i(33325),l=i(80609),o=i(74887),u=i(88368),c=i(16930);class h extends s.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof u.A?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new c.A({wkid:4326}),this.geometryType=a.ik.point)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("",null,this._whereclause,null,e);return this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new n.A(t._candidates.slice().concat(t._known.slice()),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new n.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent?._isInFeatureSet(e);return t===a.J6.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?a.J6.Unknown:t)}_getFeature(e,t,i){return this._parent._getFeature(e,t,i)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction){const t=this._whereClauseFunction(e);return(0,o.$X)(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,i){const r=new n.A([],e,!1,null),s=Math.min(t,e.length);if(await(this._parent?._getFeatures(r,-1,s,i)),this._checkCancelled(i),null==this._whereClauseFunction){for(let t=0;t<s;t++){const i=this._parent?._featureFromCache(e[t]);!0===this.executeWhereClause(i)?this._idstates[e[t]]=a.J6.InFeatureSet:this._idstates[e[t]]=a.J6.NotInFeatureSet}return"success"}const l=[];for(let t=0;t<s;t++){const i=this._parent?._featureFromCache(e[t]);l.push(await this.executeWhereClauseDeferred(i))}for(let i=0;i<t;i++)!0===l[i]?this._idstates[e[i]]=a.J6.InFeatureSet:this._idstates[e[i]]=a.J6.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,i,r,s){null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,l.kg)(this._whereclause,i)):i=this._whereclause),await this._ensureLoaded();const a=await this._parent._getFilteredSet(e,t,i,r,s);let o;return this._checkCancelled(s),o=null!==this._whereClauseFunction?new n.A(a._candidates.slice().concat(a._known.slice()),[],a._ordered,this._clonePageDefinition(a.pagesDefinition)):new n.A(a._candidates.slice(),a._known.slice(),a._ordered,this._clonePageDefinition(a.pagesDefinition)),o}async _stat(e,t,i,r,s,n,a){if(null!==this._whereClauseFunction)return null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1};let o=this._whereclause;null!==s&&null!==this._whereclause&&(o=(0,l.kg)(this._whereclause,s));const u=await this._parent._stat(e,t,i,r,o,n,a);return!1===u.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1}:u}async _canDoAggregates(e,t,i,r,s){return null===this._whereClauseFunction&&(null!==s?null!==this._whereclause&&(s=(0,l.kg)(this._whereclause,s)):s=this._whereclause,null!==this._parent&&this._parent._canDoAggregates(e,t,i,r,s))}async _getAggregatePagesDataSourceDefinition(e,t,i,s,n,a,o){if(null===this._parent)throw new r.dr(r.D_.NeverReach);return null!==n?null!==this._whereclause&&(n=(0,l.kg)(this._whereclause,n)):n=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,s,n,a,o)}static registerAction(){s.A._featuresetFunctions.filter=function(e){if("function"==typeof e)return new h({parentfeatureset:this,whereclause:e});let t=null;return e instanceof u.A&&(t=e),new h({parentfeatureset:this,whereclause:t})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},36708:(e,t,i)=>{i.d(t,{C_:()=>d,OH:()=>y,Vh:()=>_,on:()=>h,pc:()=>g,wB:()=>o,z7:()=>u});var r=i(37955),s=i(36563),n=i(97768),a=i(74887),l=i(14012);function o(e,t,i={}){return c(e,t,i,f)}function u(e,t,i={}){return c(e,t,i,p)}function c(e,t,i={},r){let s=null;const a=i.once?(e,i)=>{r(e)&&((0,n.xt)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,l.Cn)(e,a,i.sync,i.equals),i.initial){const t=e();a(t,t)}return s}function h(e,t,i,a={}){let l=null,u=null,c=null;function h(){l&&u&&(u.remove(),a.onListenerRemove?.(l),l=null,u=null)}function d(e){a.once&&a.once&&(0,n.xt)(c),i(e)}const f=o(e,(e,i)=>{h(),(0,r.wb)(e)&&(l=e,u=(0,r.on)(e,t,d),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return c=(0,s.hA)(()=>{f.remove(),h()}),c}function d(e,t){return function(e,t,i){if((0,a.G4)(i))return Promise.reject((0,a.NK)());const r=e();if(t?.(r))return Promise.resolve(r);let l=null;function o(){l=(0,n.xt)(l)}return new Promise((r,n)=>{l=(0,s.vE)([(0,a.u7)(i,()=>{o(),n((0,a.NK)())}),c(e,e=>{o(),r(e)},{sync:!1,once:!0},t??f)])})}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(80559);const y={sync:!0},_={initial:!0},g={sync:!0,initial:!0}},39516:(e,t,i)=>{let r;async function s(){return null==r&&(r=Promise.all([i.e(8368),i.e(4123)]).then(i.bind(i,44123)).then(e=>new e.WhereClauseCache(500,500))),r}async function n(e,t){const i=await s(),r=i.get(e,t);if(null==r)throw i.getError(e,t);return r}function a(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function l(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}i.d(t,{GP:()=>n,IW:()=>l,mA:()=>a})},40334:(e,t,i)=>{i.r(t),i.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>se,constructFeatureSet:()=>ie,constructFeatureSetFromPortalItem:()=>he,constructFeatureSetFromRelationship:()=>ne,constructFeatureSetFromUrl:()=>te,convertToFeatureSet:()=>ce,createFeatureSetCollectionFromMap:()=>oe,createFeatureSetCollectionFromService:()=>ue,initialiseMetaDataCache:()=>X});var r=i(78888);class s{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,i){this._layerById[t]=i,this._layerByName[e]=i}async featureSetByName(e,t=!0,i=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,i=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}var n=i(78878),a=i(35704),l=i(52106),o=i(59534),u=i(68423),c=i(86691),h=i(87449),d=i(11221),f=i(89169),p=i(87594),y=i(33325),_=i(80609),g=i(1262),m=i(88368);class w{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new w;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i,r){const s=new w;s.field=e;const n=m.A.create(t,{fieldsIndex:i,timeZone:r}),a=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new g.L8(g.Z7.MissingStatisticParameters);const t=m.A.create((0,_.Mi)(e.parseTree.args.value[0],y.zl.Standardised,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(n);if(null===a)throw new g.L8(g.Z7.UnsupportedSqlFunction,{function:""});const l=a.name.toUpperCase().trim();if("MIN"===l){if(s.typeofstat="MIN",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"min"})}else if("MAX"===l){if(s.typeofstat="MAX",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"max"})}else if("COUNT"===l)s.typeofstat="COUNT",s.workingexpr=a.expr;else if("STDEV"===l){if(s.typeofstat="STDDEV",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"stdev"})}else if("SUM"===l){if(s.typeofstat="SUM",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"sum"})}else if("MEAN"===l){if(s.typeofstat="AVG",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:l})}else if("AVG"===l){if(s.typeofstat="AVG",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"avg"})}else{if("VAR"!==l)throw new g.L8(g.Z7.UnsupportedSqlFunction,{function:l});if(s.typeofstat="VAR",s.workingexpr=a.expr,null===n)throw new g.L8(g.Z7.InvalidFunctionParameters,{function:"var"})}return s}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var b=i(53966),F=i(80200),S=i(74639),v=i(44729),I=i(55612),A=i(15032),T=i(16930),x=i(20437),C=i(95466);const D=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class R extends d.A{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return y.J6.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const r=this._parent?this._parent.getFieldsIndex():new C.A([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const e of this._config.statsfields){const t=new w;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof m.A?e.expression:m.A.create(e.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),t.typeofstat=D.lookup(e.statistic)??"COUNT",this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof m.A?e.expression:m.A.create(e.expression,{fieldsIndex:r,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField=""}else this.geometryType=y.ik.point,this.typeIdField="",this.types=null,this.subtypes=null,this.subtypeField="",this.spatialReference=new T.A({wkid:4326});this.fields=[];const s=new w;s.field=this._nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=m.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const i=new x.A;if(t.name=this._nextUniqueName(e),i.name=t.tofieldname,i.alias=i.name,(0,_.DA)(t.expression)){const e=this._parent.getField((0,_.YY)(t.expression,y.zl.Standardised));if(!e)throw new h.dr(h.D_.AggregationFieldNotFound);t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),i.type=e.type,t.sqlType=e.type}else{i.type=this._convertToEsriFieldType((0,_.IY)(t.expression,this._parent.fields));const e=new x.A;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new u.Gr(e,t.expression)),this._candosimplegroupby=!1,t.sqlType=i.type}this.fields.push(i)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new u.IO(e));for(let t=0;t<this._decodedStatsfield.length;t++){const i=new x.A;let r=null;const s=this._decodedStatsfield[t];s.field=this._nextUniqueName(e),s.tofieldname===this.objectIdField&&(this._internalObjectIdField=s.field),i.name=s.tofieldname,i.alias=i.name;const n=null!==s.workingexpr&&(0,_.DA)(s.workingexpr)?(0,_.YY)(s.workingexpr,y.zl.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(r=this._parent.getField(n),!r)throw new h.dr(h.D_.AggregationFieldNotFound);i.type=r.type}else i.type="double";break;case"MIN":case"MAX":if(""!==n){if(r=this._parent.getField(n),!r)throw new h.dr(h.D_.AggregationFieldNotFound);i.type=r.type}else i.type="double";break;case"COUNT":i.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(r=this._parent.getField(n),!r))throw new h.dr(h.D_.AggregationFieldNotFound);i.type="double"}this.fields.push(i)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,i,r){-1!==t&&this._featureCache[t];const s=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,s)?(await this._expandPagedSet(e,s,0,0,r),this._getFeatures(e,t,i,r)):"success"}async _getFilteredSet(e,t,i,r,s){if(""!==e)return new f.A([],[],!0,null);let n=null;const l={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==i)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,_.Ju)(i,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,i=null;break}if(null!==r){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===r.scanForField(this._decodedStatsfield[e].tofieldname)){r=null,l.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,l.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;r&&(t=this._reformulateOrderClauseWithoutGroupByFields(r));const a=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(s),n=!0===l.nowhereclause?new f.A(a._candidates.slice().concat(a._known.slice()),[],!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)):new f.A(a._candidates.slice(),a._known.slice(),!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)),n}let o=this._parent;if(this._adaptedFields.length>0&&(o=new u.a({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new f.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:o,orderbyclause:new p.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=o;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a.A({parentfeatureset:e,whereclause:t})}n=new f.A(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new c.A({parentfeatureset:e,orderbyclause:new p.A(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,_.bD)(e,t.tofieldname,(0,_.YY)(t.workingexpr,y.zl.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,_.bD)(e,t.tofieldname,(0,_.YY)(t.expression,y.zl.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,i){return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?(await this._expandPagedSet(e,this._maxQuery,0,0,i),this._refineSetBlock(e,t,i)):(this._checkCancelled(i),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,e)}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}async _getPhysicalPage(e,t,i){if(!0===e.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,i,[]);const r=await this._getAgregagtePhysicalPage(e,t,i);for(const e of r){const t={geometry:e.geometry,attributes:{}},i={};for(const t in e.attributes)i[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=i[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=i[e.field.toLowerCase()];if(null!=this._featureCache[t.attributes[this.objectIdField]])throw b.A.getLogger("esri.arcade.featureset.actions.GroupBy").error(`Duplicate object id returned: ${t.attributes[this.objectIdField]}`),new h.dr(h.D_.NeverReach);this._featureCache[t.attributes[this.objectIdField]]=new l.A(t)}return r.length}_sequentialGetPhysicalItem(e,t,i,r){return new Promise((s,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?s(r.length):this._nextAggregateItem(e,t,i,r,n=>{null===n?s(r.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,i,r)))},n)})}_nextAggregateItem(e,t,i,r,s,a){try{(0,n.a0)(e.pagesDefinition.internal.iterator.next()).then(n=>{if(null===n)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);r.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,s(null)}else e.pagesDefinition.internal.fullyResolved=!0,s(null);else{const l=this._generateAggregateHash(n);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[n],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const i=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return r.push(i),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(i.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[n],id:l},void s(i)}e.pagesDefinition.internal.workingItem.features.push(n)}this._nextAggregateItem(e,t,i,r,s,a)}},a)}catch(e){a(e)}}_calculateFieldStat(e,t,i){const r=[];for(const i of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(i);null!==e&&(e instanceof v.n||e instanceof A.k?r.push(e.toNumber()):e instanceof I.g?r.push(e.toMilliseconds()):r.push(e))}else r.push(null);i.attributes[t.tofieldname]=(0,S.s)(t.typeofstat,[r])}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.features[0].attributes[i.singlefield]:m.A.convertValueToStorageFormat(i.expression.calculateValue(e.features[0]),i.sqlType);t.attributes[i.tofieldname]=r}for(const i of this._decodedStatsfield)this._calculateFieldStat(e,i,t);const i=[];for(let r=0;r<this._decodedStatsfield.length;r++)i.push(this._calculateFieldStat(e,this._decodedStatsfield[r],t));if(null!=this._featureCache[t.attributes[this.objectIdField]])throw b.A.getLogger("esri.arcade.featureset.actions.GroupBy").error(`Duplicate object id returned: ${t.attributes[this.objectIdField]}`),new h.dr(h.D_.NeverReach);return this._featureCache[t.attributes[this.objectIdField]]=new l.A({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,F.d)(t,F.T.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){d.A._featuresetFunctions.groupby=function(e,t){return new R({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var k=i(54784),E=i(54461),L=i(70333),N=i(61454),M=i(66395),O=i(50145),P=i(4576),j=i(39516),G=i(65864),B=i(21325),q=i(13600),U=i(54546),Z=i(61956),V=i(7562);class W extends d.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,y.JB)(e.toJSON());return(0,F.d)(t,F.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=y.zl.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=y.zl.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=y.zl.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=y.zl.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}_isInFeatureSet(){return y.J6.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new Z.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}_createQuery(){const e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){const i="execute"===t?this._layer.queryFeatures.bind(this._layer):"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer);let r=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);r=this.recentlyUsedQueries.getFromCache(t),null===r&&(r=i(e),this.recentlyUsedQueries.addToCache(t,r),r=r.catch(e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e}))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===r&&(r=i(e)),r}async _getFilteredSet(e,t,i,r,s){const n=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e)return new f.A([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=this._createQuery();o.where=(0,j.mA)(o.where,null===i?null===t?"1=1":"":(0,_.YY)(i,n)),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e);let u=await this.executeQuery(o,"executeForIds");return null===u&&(u=[]),this._checkCancelled(s),new f.A([],u,l,null)}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}async _getFilteredSetUsingPaging(e,t,i,r,s){let n="",a=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=r.constructClause(),a=!0);const l=await this.databaseType(),o=null===i?null===t?"1=1":"":(0,_.YY)(i,l);let u=this._maxQueryRate();const c=this._layer.capabilities?.query.maxRecordCount;null!=c&&c<u&&(u=c);let h=null;if(!0===this._pageJustIds)h=new f.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const r=this._overrideFields??this._fieldsIncludingObjectId(["*"]);h=new f.A([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(h,u,0,1,s),h}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,s=r,n=e.pagesDefinition.internal.lastPage,a=this._createQuery();a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields.split(","),a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.geometry=e.pagesDefinition.geometry,a.where=(0,j.mA)(a.where,e.pagesDefinition.where),a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==n)return"done";const o=this._layer.objectIdField;for(let t=0;t<l.features.length;t++)e.pagesDefinition.internal.set[s+t]=l.features[t].attributes[o];if(!1===this._pageJustIds)for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFeatures(e,t,i,r){const s=[];if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,r),this._getFeatures(e,t,i,r);let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[r]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[r]]){const s=t._featureMap[e._known[r]];null!==s&&(i=!0,this._featureCache[e._known[r]]=s)}}if(!1===i&&(e._known[r]!==t&&s.push(e._known[r]),s.length>=this._maxProcessingRate()-1))break}if(n>=i&&0===s.length)break}if(0===s.length)return"success";const a=this._createQuery();a.objectIds=s,a.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),a.returnGeometry=!0,!0===this._removeGeometry&&(a.returnGeometry=!1),a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(r),void 0!==l.error)throw new h.dr(h.D_.RequestFailed,{reason:l.error});const o=this._layer.objectIdField;for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return"success"}async _getDistinctPages(e,t,i,r,s,n,a,l,o){await this._ensureLoaded();const u=await this.databaseType();let c=i.parseTree.column;const d=this._layer.fields??[];for(let e=0;e<d.length;e++)if(d[e].name.toLowerCase()===c.toLowerCase()){c=d[e].name;break}const f=this._createQuery();f.where=(0,j.mA)(f.where,null===n?null===s?"1=1":"":(0,_.YY)(n,u)),f.spatialRelationship=this._makeRelationshipEnum(r),f.relationParameter=this._makeRelationshipParam(r),f.geometry=null===s?null:s,f.returnDistinctValues=!0,f.returnGeometry=!1,f.outFields=[c];const p=await this.executeQuery(f,"execute");if(this._checkCancelled(o),!p.hasOwnProperty("features"))throw new h.dr(h.D_.InvalidStatResponse);let y=!1;for(let e=0;e<d.length;e++)if(d[e].name===c){"date"===d[e].type&&(y=!0);break}for(let e=0;e<p.features.length;e++){if(y){const t=p.features[e].attributes[c];null!==t?l.push(new Date(t)):l.push(t)}else l.push(p.features[e].attributes[c]);if(l.length>=a)break}return 0===p.features.length?l:p.features.length===this._layer.capabilities?.query.maxRecordCount&&l.length<a?{calculated:!0,result:await this._getDistinctPages(e+p.features.length,t,i,r,s,n,a,l,o)}:l}async _distinctStat(e,t,i,r,s,n,a){return{calculated:!0,result:await this._getDistinctPages(0,e,t,i,r,s,n,[],a)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,i,r){const s=await this.databaseType();if(this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};const n=this._createQuery();return n.where=(0,j.mA)(n.where,null===r?null===i?"1=1":"":(0,_.YY)(r,s)),n.spatialRelationship=this._makeRelationshipEnum(t),n.relationParameter=this._makeRelationshipParam(t),n.geometry=null===i?null:i,n.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(n,"executeForCount")}}async _stats(e,t,i,r,s,n,a){await this._ensureLoaded();const l=this._layer.capabilities?.query,o=!!l?.supportsSqlExpression,u=!!l?.supportsStatistics,c=!!l?.supportsDistinct;if("count"===e)return c?this._countstat(e,i,r,s):{calculated:!1};if(!1===u||!1===(0,_.DA)(t)&&!1===o||!1===t.isStandardized)return""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a);if("distinct"===e)return!1===c?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,i,r,s,n,a);const d=await this.databaseType();if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const f=this._createQuery();f.where=(0,j.mA)(f.where,null===s?null===r?"1=1":"":(0,_.YY)(s,d)),f.spatialRelationship=this._makeRelationshipEnum(i),f.relationParameter=this._makeRelationshipParam(i),f.geometry=null===r?null:r;const p=new V.A;p.statisticType=(0,O.Dp)(e),p.onStatisticField=(0,_.YY)(t,d),p.outStatisticFieldName="ARCADE_STAT_RESULT",f.returnGeometry=!1;let y="ARCADE_STAT_RESULT";f.outStatistics=[p];const g=await this.executeQuery(f,"execute");if(!g.hasOwnProperty("features")||0===g.features.length)throw new h.dr(h.D_.InvalidStatResponse);let m=!1;const w=g.fields??[];for(let e=0;e<w.length;e++)if("ARCADE_STAT_RESULT"===w[e].name.toUpperCase()){y=w[e].name,"date"===w[e].type&&(m=!0);break}if(m){let e=g.features[0].attributes[y];return null!==e&&(e=new Date(g.features[0].attributes[y])),{calculated:!0,result:e}}return{calculated:!0,result:g.features[0].attributes[y]}}_stat(e,t,i,r,s,n,a){return this._stats(e,t,i,r,s,n,a)}async _canDoAggregates(e,t){await this._ensureLoaded();let i=!1;const r=this._layer.capabilities?.query,s=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(i=!0),i)for(let e=0;e<t.length-1;e++)(!1===t[e].workingexpr?.isStandardized||!1===(0,_.DA)(t[e].workingexpr)&&!1===s)&&(i=!1);return!1!==i}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,a){await this._ensureLoaded();const l=await this.databaseType();let o=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){const t=this.getFieldsIndex();o={keyFields:e.map((e,i)=>({name:t.normalizeFieldName(e)??e,asc:null==n||1===n._directions[i]}))}}let u="",c=!1;null!=n&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==o||(0,P.MJ)(e,0,e.length,n._fields,0,Math.min(n._fields.length,e.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(u=n.constructClause(),c=!0),""===u&&(u=e.join(","));const h=[];for(let e=0;e<t.length;e++){const i=new V.A;i.onStatisticField=null!==t[e].workingexpr?(0,_.YY)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),h.push(i)}let d=this._maxQueryRate();const p=this._layer.capabilities?.query.maxRecordCount;null!=p&&p<d&&(d=p);const y=null===s?null===r?"1=1":"":(0,_.YY)(s,l);return new f.A([],["GETPAGES"],c,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:!1,generatedOid:a,resultRecordCount:d,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:h,geometry:null===r?null:r,where:y,orderByFields:u,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1,keysetPagination:o}})}async _getAgregagtePhysicalPage(e,t,i){let r=e.pagesDefinition.where;if(!0===e.pagesDefinition.useOIDpagination&&(r=(0,j.mA)(r,e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString())),null!=e.pagesDefinition.internal.keysetPagination?.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new h.dr(h.D_.NotImplemented);r=(0,j.mA)(r,(0,_.YY)(e.pagesDefinition.internal.keysetPagination.clause,await this.databaseType()))}const s=e.pagesDefinition.internal.lastRetrieved,n=s,a=e.pagesDefinition.internal.lastPage,o=this._createQuery();if(o.where=(0,j.mA)(o.where,r),o.spatialRelationship=e.pagesDefinition.spatialRel,o.relationParameter=e.pagesDefinition.relationParam,o.outFields=e.pagesDefinition.outFields,o.outStatistics=e.pagesDefinition.outStatistics,o.geometry=e.pagesDefinition.geometry,o.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,o.num=e.pagesDefinition.resultRecordCount,o.start=e.pagesDefinition.internal.lastPage,o.returnGeometry=e.pagesDefinition.returnGeometry,o.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(i),!u.hasOwnProperty("features"))throw new h.dr(h.D_.InvalidStatResponse);const c=[];if(e.pagesDefinition.internal.lastPage!==a)return[];u.features.length>0&&void 0===u.features[0].attributes[e.pagesDefinition.generatedOid]&&(e.pagesDefinition.generatedOid=e.pagesDefinition.generatedOid.toLowerCase());for(let t=0;t<u.features.length;t++)e.pagesDefinition.internal.set[n+t]=u.features[t].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<u.features.length;e++)c.push(new l.A({attributes:u.features[e].attributes,geometry:null}));return e.pagesDefinition.internal.keysetPagination?0!==u.features.length&&u.exceededTransferLimit?function(e,t){null==e.clause&&(e.clause=function(e){if(0===e.length)throw new h.dr(h.D_.NeverReach);const t=[];for(let i=0;i<e.length;i++){const r=e[i],s=[`"${r.name.replaceAll('"','""')}" ${r.asc?">":"<"} @last_${i}`];for(let t=0;t<i;t++){const i=e[t];s.push(`"${i.name.replaceAll('"','""')}" = @last_${t}`)}t.push(s.join(" AND "))}const i=t.join(" OR ");return m.A.create(i)}(e.keyFields));for(let i=0;i<e.keyFields.length;i++){const r=e.keyFields[i].name;e.clause.parameters[`last_${i}`]=t.attributes[r]}}(e.pagesDefinition.internal.keysetPagination,c.at(-1)):e.pagesDefinition.internal.fullyResolved=!0:!0===e.pagesDefinition.useOIDpagination?0===u.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==e.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=s+u.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,c}static create(e,t,i,r,s){const n=new q.default({url:e,outFields:null===t?["*"]:t});return new W({layer:n,spatialReference:i,lrucache:r,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,y.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,i,r,s){const n=this._layer;if(function(e){const t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(n)){const a={objectIds:[e],returnMetadata:s};(t&&t>0||i&&i>0)&&(a.size=[t&&t>0?t:0,i&&i>0?i:t+1]),r&&r.length>0&&(a.attachmentTypes=r),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:n,query:a,method:"attachments"});const l=await n.queryAttachments(new U.A(a)),o=[];return l&&l[e]&&l[e].forEach(t=>{const i=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let r=null;s&&t.exifInfo&&(r=M.A.convertJsonToArcade(t.exifInfo,"system",!0)),o.push(new N.A(t.id,t.name,t.contentType,t.size,i,r,t.keywords??null))}),o}return[]}async queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields?.join(","),returnGeometry:e.returnGeometry.toString()};void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds&&e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=(0,B.YX)(e.outSpatialReference)),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const i=await(0,r.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(i.data){const e={},t=i.data;if(t?.relatedRecordGroups){const i=t.spatialReference;for(const r of t.relatedRecordGroups){const s=r.objectId,n=[];for(const e of r.relatedRecords){e.geometry&&(e.geometry.spatialReference=i);const t=new l.A({geometry:e.geometry?(0,G.rS)(e.geometry):null,attributes:e.attributes});n.push(t)}e[s]={features:n,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new h.dr(h.D_.InvalidRequest)}async getFeatureByObjectId(e,t){const i=this._createQuery();i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=(0,j.mA)(i.where,this.objectIdField+"="+e.toString()),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const r=await this._layer.queryFeatures(i);return 1===r.features.length?r.features[0]:null}async getIdentityUser(){await this.load();const e=L.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=L.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const i=t.toLowerCase().indexOf("/rest/services");if(t=i>-1?t.slice(0,i):t,t){t+="/rest/info";try{const e=await(0,r.A)(t,{query:{f:"json"}});let i="";return e.data?.owningSystemUrl&&(i=e.data.owningSystemUrl),i}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new W({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this.fsetInfo)return this.fsetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null;const i=this._layer.parsedUrl?.path??null;if(i){const s=await(0,r.A)(i,{responseType:"json",query:{f:"json"}});e=s?.data?.name??null,t=s?.data?.serviceItemId??null}const s=this._layer.title&&null!==(this._layer.parent??null);return this.featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===i?null:i,webMapLayerId:s?this._layer.id??null:null,webMapLayerTitle:s?this._layer.title??null:null,className:null,objectClassId:null},this.fsetInfo}}var J=i(30235),z=i(26591);class Q extends d.A{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return y.gO}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}_isInFeatureSet(){return y.J6.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new l.A({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,s){if(await this.databaseType(),this.isTable()&&t&&null!==e&&""!==e)return new f.A([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new f.A([],[],!0,null);if(n.capabilities?.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&!0===n.capabilities?.queryRelated.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new z.default;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let c=!0;!0===this._removeGeometry&&(c=!1),o.returnGeometry=c,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null;const h=await n.source.queryRelatedFeatures(o);this._checkCancelled(s);const d=h[this._findObjectId]?h[this._findObjectId].features:[],p=[];for(let e=0;e<d.length;e++)this._featureCache[d[e].attributes[this._relatedLayer.objectIdField]]=d[e],p.push(d[e].attributes[this._relatedLayer.objectIdField]);const y=t&&null!==e&&""!==e,_=null!=i;return new f.A(y||_?p:[],y||_?[]:p,l,null)}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice();if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFilteredSetUsingPaging(e,t,i,r,s){let n="",a=!1;const l=this._layer.nativeCapabilities();null!==r&&!0===l.capabilities?.queryRelated.supportsOrderBy&&(n=r.constructClause(),a=!0),await this.databaseType();let o=this._maxQueryRate();const u=l.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const c=t&&null!==e&&""!==e,h=null!=i;let d=null,p=!0;!0===this._removeGeometry&&(p=!1);const y=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]);return d=new f.A(c||h?["GETPAGES"]:[],c||h?[]:["GETPAGES"],a,{outFields:y.join(","),resultRecordCount:o,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(d,o,0,0,s),d}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,s=r,n=e.pagesDefinition.internal.lastPage,a=this._layer.nativeCapabilities(),l=new z.default;!0===this._requestStandardised&&(l.sqlFormat="standard"),l.relationshipId=this.relationship.id,l.objectIds=e.pagesDefinition.objectIds,l.resultOffset=e.pagesDefinition.internal.lastPage,l.resultRecordCount=e.pagesDefinition.resultRecordCount,l.outFields=e.pagesDefinition.outFields.split(","),l.where=e.pagesDefinition.where,l.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,l.returnGeometry=e.pagesDefinition.returnGeometry,l.outSpatialReference=this.spatialReference;const o=await a.source.queryRelatedFeatures(l);if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==n)return 0;const u=o[this._findObjectId]?o[this._findObjectId].features:[];for(let t=0;t<u.length;t++)e.pagesDefinition.internal.set[s+t]=u[t].attributes[this._relatedLayer.objectIdField];for(let e=0;e<u.length;e++)this._featureCache[u[e].attributes[this._relatedLayer.objectIdField]]=u[e];const c=!o[this._findObjectId]||!1===o[this._findObjectId].exceededTransferLimit;return u.length!==e.pagesDefinition.resultRecordCount&&c&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+u.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,u.length}async _getFeatures(e,t,i,r){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return await this._expandPagedSet(e,n,0,0,r),this._getFeatures(e,t,i,r);let a=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(a++,a<=i&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[r]&&void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>i)))&&!(a>=i&&0===s.length);r++);if(0===s.length)return"success";throw new h.dr(h.D_.MissingFeatures)}async _refineSetBlock(e,t,i){return e}async _stat(e,t,i,r,s,n,a){return{calculated:!1}}get gdbVersion(){return this._relatedLayer.gdbVersion}async _canDoAggregates(e,t,i,r,s){return!1}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,i,r,s){return this._relatedLayer.queryAttachments(e,t,i,r,s)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}async getFeatureSetInfo(){return this.fsetInfo??this._layer.featureSetInfo}}var $=i(23732),Y=i(92474),K=i(4146),H=i(80812);function X(){null===$.A.applicationCache&&($.A.applicationCache=new $.A)}async function ee(e,t,i){if($.A.applicationCache){const i=$.A.applicationCache.getLayerInfo(e);if(i){const r=await i;return new q.default({url:e,outFields:t,sourceJSON:r})}const r=new q.default({url:e,outFields:t}),s=(async()=>(await r.load(),r.sourceJSON))();if($.A.applicationCache){$.A.applicationCache.setLayerInfo(e,s);try{return await s,r}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}return await s,r}if(null!=i){const r=i.getCachedLayerMetadata(e);if(r){const i=await r;return new q.default({url:e,outFields:t,sourceJSON:i})}const s=new q.default({url:e,outFields:t}),n=(async()=>(await s.load(),s.sourceJSON))();i.setCachedLayerMetadata(e,n);try{return await n,s}catch(t){throw i.removeCachedLayerMetadata(e,n),t}}return new q.default({url:e,outFields:t})}async function te(e,t,i,r,s,n=null){return ie(await ee(e,["*"],s),t,i,r,s,n)}function ie(e,t=null,i=null,r=!0,s=null,n=null){switch(e.type){case"catalog-footprint":return ie(e.parent,t,i,r,s,n);case"subtype-sublayer":{const a=ie(e.parent,t,i,r,s,n);return a.filter(m.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:a.dateFieldsTimeZoneDefaultUTC}))}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new J.A({layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:n});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{const a={layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:n};return!e.url&&e.source?new J.A(a):new W(a)}default:throw new Error(`Unsupported layer type: ${e.type}`)}}async function re(e,t){if(null!==$.A.applicationCache){const t=$.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){const i=t.getCachedServiceMetadata(e);if(null!=i)return i}const i=(async()=>{const t=await(0,r.A)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(e,i);try{return await i}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,i);try{return await i}catch(r){throw t.removeCachedServiceMetadata(e,i),r}}return i}async function se(e,t,i){const s={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},n=await re(e,null);if(s.metadata=n,void 0!==n.controllerDatasetLayers?.utilityNetworkLayerId&&null!==n.controllerDatasetLayers.utilityNetworkLayerId){if(n.layers)for(const e of n.layers)s.layerNameLkp[e.id]=e.name;if(n.tables)for(const e of n.tables)s.layerNameLkp[e.id]=e.name;const a=n.controllerDatasetLayers.utilityNetworkLayerId;s.networkId=a;const l=await async function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==$.A.applicationCache){const e=$.A.applicationCache.getLayerInfo(i);if(null!==e)return e}const s=(async()=>{const i=await(0,r.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(i.data){const e=i.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new h.dr(h.D_.DataElementsNotFound)})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(i,s);try{return await s}catch(e){throw $.A.applicationCache.clearLayerInfo(i),e}}return s}(e,a);if(l){s.queryelem=l,s.queryelem?.dataElement&&void 0!==s.queryelem.dataElement.schemaGeneration&&(s.unVersion=s.queryelem.dataElement.schemaGeneration),s.lkp={},s.queryelem.dataElement.domainNetworks||(s.queryelem.dataElement.domainNetworks=[]);for(const e of s.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:s.layerNameLkp[t.layerId]??null};s.layerIdLookup.set(e.layerId,e),s.sourceIdLookup.set(e.sourceId,e),e.className&&(s.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:s.layerNameLkp[t.layerId]??null};s.layerIdLookup.set(e.layerId,e),s.sourceIdLookup.set(e.sourceId,e),e.className&&(s.lkp[e.className]=e)}}if(s.queryelem.dataElement.terminalConfigurations)for(const e of s.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)s.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const n=await async function(e){if(null!==$.A.applicationCache){const t=$.A.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,r.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==$.A.applicationCache){$.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw $.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+a);if(void 0!==n.systemLayers?.associationsTableId&&null!==n.systemLayers.associationsTableId){let r=null;if(i&&s.unVersion<8){const i=[];s.unVersion>=4&&(i.push("STATUS"),i.push("PERCENTALONG")),r=await te(e+"/"+n.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...i],!1,null,null),await r.load(),s.unVersion>=4&&(r=r.filter(m.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC})),await r.load())}return{lkp:s.lkp,associations:r,unVersion:s.unVersion,terminals:s.terminals,layerIdLookup:s.layerIdLookup,sourceIdLookup:s.sourceIdLookup}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:s.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function ne(e,t,i,r=null,s=null,n=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await te(o,r,s,n,a,l);return new Q({layer:e,relatedLayer:u,relationship:t,objectId:i,spatialReference:r,outFields:s,includeGeometry:n,lrucache:a,interceptor:l})}a.A.registerAction(),R.registerAction(),c.A.registerAction(),k.A.registerAction(),E.A.registerAction();class ae extends s{constructor(e,t=null,i=null,r=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=i,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const r=ie(e,this._overrideSpatialReference,null===i?["*"]:i,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async featureSetByName(e,t=!0,i=null){if(Y.A.isLoadable(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,i);null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=s)return this._makeAndAddFeatureSet(s,t,i);if(this._map.allTables){const r=this._map.allTables.find(t=>(0,y.eB)(t)&&t.title===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){if(Y.A.isLoadable(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,i);null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=this._map.allLayers.find(t=>(0,y.eB)(t)&&t.id===e);if(s)return this._makeAndAddFeatureSet(s,t,i);if(this._map.allTables){const r=this._map.allTables.find(t=>(0,y.eB)(t)&&t.id===e);if(null!=r)return this._makeAndAddFeatureSet(r,t,i)}return null}}class le extends s{constructor(e,t=null,i=null,r=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=i,this._interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,i=null){const r=ie(e,this._overrideSpatialReference,null===i?["*"]:i,t,this._lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async _loadMetaData(){const e=await re(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new le(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,i=null){null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])t.name===e&&(n=t);if(!n)for(const t of s.tables??[])t.name===e&&(n=t);if(n){const e=await ee(this._url+"/"+n.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){null===i&&(i=["*"]),i=(i=i.slice()).sort();const r=JSON.stringify(i);e=null!=e?e.toString():"";for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(!n)for(const t of s.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(n){const e=await ee(this._url+"/"+n.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,i)}return null}}function oe(e,t,i=null,r=null){return new ae(e,t,i,r)}function ue(e,t,i=null,r=null){return new le(e,t,i,r)}function ce(e,t,i,r,s){if(null===e)return null;if((0,n.m)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof K.A&&(0,y.NI)(e)){const n=e;switch(t){case"datasource":return ie(n,s,"outFields"in n?n.outFields:null,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return ie(n,s,"outFields"in n?n.outFields:null,!0,i,r)}return null}if((0,n.$)(e)){switch(t){case"datasource":return ie(e.parent,s,e.parent.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return ie(e,s,e.parent.outFields,!0,i,r)}return null}return null}async function he(e,t,i,r,s,n,a,l=null){if($.A.applicationCache){const o=$.A.applicationCache.getLayerInfo(e+":"+n.url);if(o)return de(await o,t,i,r,s,a,l)}if(null!=a){const o=a.getCachedPortalItem(n.url,e);if(null!=o)return await de(await o,t,i,r,s,a,l)}const o=new H.default({id:e,portal:n}).load();$.A.applicationCache?$.A.applicationCache.setLayerInfo(e+":"+n.url,o):null!=a&&a.setCachedPortalItem(n.url,e,o);try{return await de(await o,t,i,r,s,a,l)}catch(t){throw $.A.applicationCache&&$.A.applicationCache.clearLayerInfo(e+":"+n.url),null!=a&&a.removeCachedPortalItem(n.url,e,o),t}}async function de(e,t,i,r,s,n,a){let l;if("Feature Service"===e.type||"Map Service"===e.type)l=await ee((0,y.Qi)(e.url??"")+"/"+t,["*"],n);else{if(t)throw new Error(`layerId=${t} provided for ${e.type} item`);if(null!=n){const t=n.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)l=await t;else{const t=K.A.fromPortalItem(e);n.setCachedPortalItemLayer(e.portal.url,e.id,t);try{l=await t}catch(i){throw n.removeCachedPortalItemLayer(e.portal.url,e.id,t),i}}}else l=await K.A.fromPortalItem(e)}return ie(l,i,r,s,n,a)}},41366:(e,t,i)=>{i.d(t,{K:()=>d,Q:()=>u});var r=i(90237),s=i(66552),n=i(53966),a=i(10107),l=(i(44208),i(87811),i(93223)),o=i(40608);const u=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,r._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,r._)([(0,l.e)(u,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,r._)([(0,o.$)("esri.rest.support.NormalizationBinParametersMixin")],i),i}},41560:(e,t,i)=>{i.d(t,{Ch:()=>a,mW:()=>n});var r=i(34727),s=i(39516);function n(e,t){return{...t,filterMode:e.mode}}function a(e,t,i){const n=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:i,maxScale:r}of e.filters)t[0]=Math.max(t[0],c(i)),t[1]=Math.min(t[1],h(r));return t}(e);if(n&&((0,r.gg)(t,n[0])||(0,r.ZH)(i,n[1])))return"";const a=Array.from(l(e,t,i)),o=function(e,t,i){if(0===e.length)return!0;const s=c(e.at(0)?.minScale),n=h(e.at(-1)?.maxScale);if((0,r.ZH)(s,t)||(0,r.gg)(n,i))return!0;for(let t=0;t<e.length-1;t++){const i=e[t],s=e[t+1];if((0,r.ZH)(c(s.minScale),h(i.maxScale)))return!0}return!1}(a,t,i)?"1=1":a.map(e=>e.where||"1=1").reduce((e,t)=>(0,s.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,i){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const r of e.filters)o(r.minScale,r.maxScale,t,i)&&(yield r)}}function o(e,t,i,s){return e=c(e),i=c(i),t=h(t),!(!(0,r.Sp)(i,e)&&(s??i)>e||(0,r.Hx)(t,i)||void 0!==s&&(0,r.Sp)(s,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function h(e){return e||0}},46140:(e,t,i)=>{i.d(t,{R:()=>s});var r=i(49186);let s=class e{constructor(e,t,i=""){this.major=e,this.minor=t,this._context=i}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",i=this._context&&this._context+" ";throw new r.A(t+"unsupported-version",`Required major ${i}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,i=""){const[s,n]=t.split("."),a=/^\s*\d+\s*$/;if(!s?.match||!a.test(s))throw new r.A((i&&i+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!a.test(n))throw new r.A((i&&i+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(s,10),o=parseInt(n,10);return new e(l,o,i)}}},50498:(e,t,i)=>{i.d(t,{Ye:()=>h,gy:()=>c,yR:()=>d});var r=i(66552),s=i(5443),n=i(91075),a=i(48526),l=i(86738),o=i(39829),u=i(82799);const c=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),h=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:n.A,key:"type",typeMap:{extent:s.A,multipoint:a.A,point:l.A,polyline:u.A,polygon:o.A}}},52106:(e,t,i)=>{i.d(t,{A:()=>b});var r,s=i(90237),n=i(13874),a=i(69540),l=i(51447),o=i(25482),u=i(53966),c=i(36708),h=i(24326),d=i(10107),f=(i(44208),i(87811),i(40608)),p=i(12195),y=i(65864),_=i(50498),g=i(54339),m=i(33910);function w(e){if(null==e)return null;const t={};for(const i in e){const r=e[i];r&&(t[i]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let b=class extends(a.A.ClonableMixin(o.A)){static{r=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,h.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const i of[t,this.sourceLayer,this.layer])if(i){if("popupTemplate"in i&&i.popupTemplate)return i.popupTemplate;if(e&&"defaultPopupTemplate"in i&&null!=i.defaultPopupTemplate)return i.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,p.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(s.action=r),"attributes"===e&&(s.attributeName=r),this.layer.graphicChanged(s)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,s._)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const r=(0,y.rS)(e[i]);r&&(t[i]=r)}return 0!==Object.keys(t).length?t:null}}})],b.prototype,"aggregateGeometries",null),(0,s._)([(0,d.MZ)({value:null})],b.prototype,"attributes",null),(0,s._)([(0,d.MZ)({value:null,types:_.yR,json:{read:y.rS}})],b.prototype,"geometry",null),(0,s._)([(0,d.MZ)({type:Boolean})],b.prototype,"isAggregate",void 0),(0,s._)([(0,d.MZ)({clonable:!1})],b.prototype,"layer",void 0),(0,s._)([(0,d.MZ)({clonable:"reference"})],b.prototype,"origin",void 0),(0,s._)([(0,d.MZ)({type:n.A,value:null})],b.prototype,"popupTemplate",null),(0,s._)([(0,d.MZ)({clonable:"reference"})],b.prototype,"sourceLayer",void 0),(0,s._)([(0,d.MZ)({value:null,types:m.Es})],b.prototype,"symbol",null),(0,s._)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],b.prototype,"_version",void 0),(0,s._)([(0,d.MZ)({type:Boolean,value:!0})],b.prototype,"visible",null),b=r=(0,s._)([(0,f.$)("esri.Graphic")],b)},54461:(e,t,i)=>{i.d(t,{A:()=>l});var r=i(87449),s=i(11221),n=i(89169),a=i(33325);class l extends s.A{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getSet(e);return this._wset=new n.A(t._candidates.slice(),t._known.slice(),!1,this._clonePageDefinition(t.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset}return this._wset}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===a.J6.NotInFeatureSet)return t;const i=this._idstates[e];return i===a.J6.InFeatureSet||i===a.J6.NotInFeatureSet?i:t===a.J6.InFeatureSet&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=a.J6.InFeatureSet,this._countedin++,a.J6.InFeatureSet):(this._idstates[e]=a.J6.NotInFeatureSet,a.J6.NotInFeatureSet):a.J6.Unknown}async _expandPagedSet(e,t,i,s,n){if(null===this._parent)throw new r.dr(r.D_.NotImplemented);if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),"success"}const a=await this._parent._expandPagedSet(e,t,i,s,n);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),a}async _getFeatures(e,t,i,r){const s=[],a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return await this._expandPagedSet(e,a,0,0,r),this._getFeatures(e,t,i,r);-1!==t&&void 0===this._featureCache[t]&&s.push(t);let l=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(l++,l<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>a)));r++);if(0===s.length)return"success";const o=new n.A([],s,!1,null),u=Math.min(s.length,i);await this._parent._getFeatures(o,-1,u,r);for(let e=0;e<u;e++){const t=this._parent._featureFromCache(s[e]);void 0!==t&&(this._featureCache[s[e]]=t)}return"success"}async _getFilteredSet(e,t,i,r,s){await this._ensureLoaded();const a=await this._getSet(s);return new n.A(a._candidates.slice().concat(a._known.slice()),[],!1,this._clonePageDefinition(a.pagesDefinition))}_refineKnowns(e,t){let i=0,r=null;const s=[];for(let n=0;n<e._candidates.length;n++){const l=this._isInFeatureSet(e._candidates[n]);if(l===a.J6.InFeatureSet){if(e._known.push(e._candidates[n]),i+=1,null===r?r={start:n,end:n}:r.end===n-1?r.end=n:(s.push(r),r={start:n,end:n}),e._known.length>=this._topnum)break}else if(l===a.J6.NotInFeatureSet)null===r?r={start:n,end:n}:r.end===n-1?r.end=n:(s.push(r),r={start:n,end:n}),i+=1;else if(l===a.J6.Unknown)break;if(i>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}static registerAction(){s.A._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},55674:(e,t,i)=>{i.d(t,{Ad:()=>f,Gj:()=>_,QY:()=>d,lL:()=>g,xR:()=>p});var r=i(66131),s=i(49186),n=(i(44208),i(44729)),a=i(15032),l=i(65864),o=i(95466),u=i(43668),c=i(98623);const h=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const i of h)t.hasArcadeDependency(i)&&e.add(i);return e}function f(e,t){return y.create(e,t,null,["$feature","$view"])}function p(e,t,i){return y.create(e,t,i,["$feature","$view","$config"])}class y{static async create(e,t,i,r){const{arcade:n,Dictionary:a}=await(0,u.l)();let l;try{l=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const o=n.scriptUsesGeometryEngine(l);o&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,l,null,!1,o);const c={vars:r.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},h=n.compileScript(l,c);let d=null;null!=i&&(d=new a(i),d.immutable=!0);const f=new a;return f.immutable=!1,f.setField("scale",0),new y(e,n,l,h,t,f,d,a)}constructor(e,t,i,r,s,n,a,l){this.script=e,this._arcade=t,this._syntaxTree=i,this._compiled=r,this._spatialReference=s,this._viewDict=n,this._configDict=a,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new _,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const i=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=i?r.lY.epochToArcadeDate(s,i):r.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=i?r.lY.epochToArcadeDate(n,i):r.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:i})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class _{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,i){const r=t??new o.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=r.fields,this._boundSchema.fieldsIndex=r,this._boundSchema.spatialReference=i}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const i=this._getField(e);if(i){const t=this._boundTarget.attributes[i.name];if(null==t)return null;switch(i.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return a.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return r.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?r.lY.unknownEpochToArcadeDate(t):r.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const i in e)t.push({name:i,alias:i,type:"string"==typeof e[i]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,i)=>{i.d(t,{q:()=>s});var r=i(62815);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},59247:(e,t,i)=>{i.d(t,{bv:()=>o,Fk:()=>u,yG:()=>c,$b:()=>h,Nd:()=>d,jm:()=>f,sK:()=>_});var r=i(40876),s=i(90629);function n(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const a=n();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:n,fromValues:function(e,t,i,r,s,n,a,l,o,u,c,h,d,f,p,y){const _=new Float32Array(16);return _[0]=e,_[1]=t,_[2]=i,_[3]=r,_[4]=s,_[5]=n,_[6]=a,_[7]=l,_[8]=o,_[9]=u,_[10]=c,_[11]=h,_[12]=d,_[13]=f,_[14]=p,_[15]=y,_}},Symbol.toStringTag,{value:"Module"}));var l=i(58083);class o{constructor(e,t,i){this.strength=e,this.radius=t,this.threshold=i,this.type="bloom"}interpolate(e,t,i){this.strength=p(e.strength,t.strength,i),this.radius=p(e.radius,t.radius,i),this.threshold=p(e.threshold,t.threshold,i)}clone(){return new o(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:y(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,i){this.radius=Math.round(p(e.radius,t.radius,i))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:y(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,i){this.amount=p(e.amount,t.amount,i),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||n();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const i=(0,l.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,l.mg)(i,i)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const i=(0,l.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,l.mg)(i,i)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,i=(0,l.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,l.mg)(i,i)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const i=1-2*t,r=(0,l.hZ)(e,i,0,0,t,0,i,0,t,0,0,i,t,0,0,0,1);return(0,l.mg)(r,r)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const i=(0,l.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,l.mg)(i,i)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,i=(0,l.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,l.mg)(i,i)})(e)}}}class h{constructor(e,t,i,r){this.offsetX=e,this.offsetY=t,this.blurRadius=i,this.color=r,this.type="drop-shadow"}interpolate(e,t,i){this.offsetX=p(e.offsetX,t.offsetX,i),this.offsetY=p(e.offsetY,t.offsetY,i),this.blurRadius=p(e.blurRadius,t.blurRadius,i),this.color[0]=Math.round(p(e.color[0],t.color[0],i)),this.color[1]=Math.round(p(e.color[1],t.color[1],i)),this.color[2]=Math.round(p(e.color[2],t.color[2],i)),this.color[3]=p(e.color[3],t.color[3],i)}clone(){return new h(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:y(this.offsetX),yoffset:y(this.offsetY),blurRadius:y(this.blurRadius),color:e}}}class d{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,i){this.angle=p(e.angle,t.angle,i),this._updateMatrix()}clone(){return new d(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||n();this._colorMatrix=((e,t)=>{const i=Math.sin(t*Math.PI/180),r=Math.cos(t*Math.PI/180),s=(0,l.hZ)(e,.213+.787*r-.213*i,.715-.715*r-.715*i,.072-.072*r+.928*i,0,.213-.213*r+.143*i,.715+.285*r+.14*i,.072-.072*r-.283*i,0,.213-.213*r-.787*i,.715-.715*r+.715*i,.072+.928*r+.072*i,0,0,0,0,1);return(0,l.mg)(s,s)})(e,this.angle)}}class f{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,i){this.amount=p(e.amount,t.amount,i)}clone(){return new f(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function p(e,t,i){return e+(t-e)*i}function y(e){return Math.round(1e3*(0,s.PN)(e))/1e3}function _(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new f(1);case"hue-rotate":return new d(0);case"blur":return new u(0);case"drop-shadow":return new h(0,0,0,[...(0,r.TS)("transparent")]);case"bloom":return new o(0,0,1)}}},60999:(e,t,i)=>{i.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>c,UT:()=>y,jJ:()=>u});var r=i(90237),s=i(69622),n=i(97768),a=i(74887),l=i(10107),o=i(40608);function u(e,t,i){return(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function c(e,t,i){return(await(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function p(e){try{return h(await e)}catch(e){return(0,a.QP)(e),d(e)}}function y(e,t){return new _(e,t)}let _=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r._)([(0,l.MZ)()],_.prototype,"value",null),(0,r._)([(0,l.MZ)()],_.prototype,"error",null),(0,r._)([(0,l.MZ)()],_.prototype,"finished",null),(0,r._)([(0,l.MZ)()],_.prototype,"promise",void 0),(0,r._)([(0,l.MZ)()],_.prototype,"_result",void 0),_=(0,r._)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],_)},61760:(e,t,i)=>{i.d(t,{PU:()=>a,YW:()=>o,ex:()=>s,hv:()=>l,zp:()=>n}),i(34727);var r=i(90629);i(87317),i(91829);const s=2.4;function n(e){return(0,r.PN)(e*s)}function a(e){return(0,r.Lz)(e)/s}function l(e,t,i){const r=Math.sqrt(e**2+t**2)/i;return r>1?0:3/(Math.PI*i**2)*(1-r**2)**2}function o(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},65529:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(90237),s=i(69622),n=i(36563),a=i(40608);class l{constructor(){this._emitter=new l.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){let i=this._listenersMap?.get(e);if(!i)return!1;const r=this._target||this;let s=!1;for(const e of i.slice()){const i="deref"in e?e.deref():e;i?i?.call(r,t):s=!0}return s&&(i=i.filter(e=>!("deref"in e)||null!=e.deref()),this._listenersMap.set(e,i)),i.length>0}on(e,t){if(Array.isArray(e)){const i=e.map(e=>this.on(e,t));return(0,n.vE)(i)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??=new Map;const i=this._listenersMap.get(e)||[];return i.push(t),this._listenersMap.set(e,i),(0,n.hA)(()=>{const i=this._listenersMap?.get(e),r=i?.indexOf(t)??-1;r>=0&&i.splice(r,1)})}once(e,t){const i=this.on(e,e=>{i.remove();const r="deref"in t?t.deref():t;r?.call(null,e)});return i}hasEventListener(e){const t=this._listenersMap?.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{const i=e;let s=class extends i{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,r._)([(0,a.$)("esri.core.Evented")],s),s};let i=class extends s.A{constructor(){super(...arguments),this._emitter=new l.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};i=(0,r._)([(0,a.$)("esri.core.Evented.EventedAccessor")],i),e.EventedAccessor=i}(l||(l={}));const o=l},68423:(e,t,i)=>{i.d(t,{Gr:()=>m,IO:()=>y,a:()=>w,bV:()=>g,p8:()=>_});var r=i(52106),s=i(78502),n=i(87449),a=i(11221),l=i(89169),o=i(33325),u=i(80609),c=i(97768),h=i(1262),d=i(88368),f=i(16930);class p{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class y extends p{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class _ extends p{constructor(e,t,i){super((0,o.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=i}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,u.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class g extends p{constructor(e,t,i){super(e),this.codefield=t,this.lkp=i,this.reverseLkp={};for(const e in i)this.reverseLkp[i[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const i=this.evaluateNodeToWhereClause(e.parseTree,o.zl.Standardised,this.field.name,this.codefield instanceof d.A?(0,u.YY)(this.codefield,o.zl.Standardised):this.codefield,e.parameters);return i.includes(g.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:d.A.create(i,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,i=null,r=null,s){let n,a,l,c;switch(e.type){case"interval":return(0,u.oj)(this.evaluateNodeToWhereClause(e.value,t,i,r,s),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,i,g.BADNESS,s));for(let n=0;n<e.clauses.length;n++)r+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[n].operand,t,i,g.BADNESS,s)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[n].value,t,i,g.BADNESS,s);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,i,g.BADNESS,s)),r+=" END ",r}case"parameter":{const i=s[e.value.toLowerCase()];if("string"==typeof i)return"'"+i.toString().replaceAll("'","''")+"'";if((0,o.$P)(i))return(0,u.bm)(i,t);if((0,o.Lk)(i))return(0,u.bm)(i,t);if((0,o.eg)(i))return(0,u.F1)(i,t);if((0,o.rX)(i))return(0,u.R8)(i,t);if((0,o.f0)(i))return(0,u.Nf)(i,t);if(Array.isArray(i)){const e=[];for(let r=0;r<i.length;r++)"string"==typeof i[r]?e.push("'"+i[r].toString().replaceAll("'","''")+"'"):(0,o.$P)(i[r])||(0,o.Lk)(i[r])?e.push((0,u.bm)(i[r],t)):(0,o.eg)(i[r])?e.push((0,u.F1)(i[r],t)):(0,o.rX)(i[r])?e.push((0,u.R8)(i[r],t)):(0,o.f0)(i[r])?e.push((0,u.Nf)(i[r],t)):e.push(i[r].toString());return e}return i.toString()}case"expression-list":a=[];for(const n of e.value)a.push(this.evaluateNodeToWhereClause(n,t,i,r,s));return a;case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,i,g.BADNESS,s)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" AND "+this.evaluateNodeToWhereClause(e.right,t,i,r,s)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" OR "+this.evaluateNodeToWhereClause(e.right,t,i,r,s)+") ";case"IS":if("null"!==e.right.type)throw new h.L8(h.Z7.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new h.L8(h.Z7.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IS NOT NULL )";case"IN":if(n=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+n.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,s),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" IN ("+c+")) ";case"NOT IN":if(n=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const n=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}n.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+n.join(",")+")) "}return n=this.evaluateNodeToWhereClause(e.right,t,i,r,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+n.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,s),Array.isArray(c)?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,s)+" NOT IN ("+c+")) ";case"BETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"NOTBETWEEN":return l=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" NOT BETWEEN "+l[0]+" AND "+l[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,s)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,s)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return(0,u.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+r+")":(0,u.Kb)(e.column);case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,i,g.BADNESS,s);return(0,u.F6)(e.name,r,t)}}throw new h.L8(h.Z7.UnsupportedSyntax,{node:e.type})}extractValue(e){if(this.codefield instanceof d.A){const t=this.codefield.calculateValueCompiled(e);return this.reverseLkp[d.A.convertValueToStorageFormat(t)]}return this.reverseLkp[e.attributes[this.codefield]]}}class m extends p{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,u.bD)(e,this.field.name,(0,u.YY)(this._sql,o.zl.Standardised),t.getFieldsIndex())}}extractValue(e){return d.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class w extends a.A{static findField(e,t){for(const i of e)if(i.name.toLowerCase()===t.toString().toLowerCase())return i;return null}constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=[],this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}_initialiseFeatureSet(){null!==this._parent?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new f.A({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=o.ik.point,this.typeIdField="",this.types=null,this.subtypeField=null,this.subtypes=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();let t=null;return t=this._extraFilter?await this._getFilteredSet("",null,null,null,e):await(this._parent?._getSet(e)),this._checkCancelled(e),(0,c.Lw)(t),this._wset=new l.A(t._candidates.slice(),t._known.slice(),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}async _getFeatures(e,t,i,n){const a=[];-1!==t&&void 0===this._featureCache[t]&&a.push(t);const o=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,o))return await this._expandPagedSet(e,o,0,0,n),this._getFeatures(e,t,i,n);let u=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(u++,u<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&a.push(e._known[r]),a.length>=o)));r++);if(0===a.length)return"success";e=new l.A([],a,e._ordered,null);const c=Math.min(a.length,i);await(this._parent?._getFeatures(e,-1,c,n)),this._checkCancelled(n);const h=[];for(let e=0;e<c;e++){const t=this._parent?._featureFromCache(a[e]);void 0!==t&&h.push({geometry:t.geometry,attributes:t.attributes,id:a[e]})}for(const e of h){const t=[];for(const i of this.adaptedFields)t[i.field.name]=i.extractValue(e);this._featureCache[e.id]=new r.A({attributes:t,geometry:(0,s.Yq)(e.geometry)})}return"success"}async _fetchAndRefineFeatures(){throw new n.dr(n.D_.NeverReach)}async _getFilteredSet(e,t,i,r,s){let n=!1;const a=this._reformulateWithoutAdaptions(i);n=a.cannot,i=a.where;let o=!1;if(null!==r){o=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof y)&&!0===r.scanForField(t.field.name)){if(!(t instanceof _)){r=null,o=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}r&&e.length>0&&(r=r.replaceFields(e))}null!==i?null!==this._extraFilter&&(i=(0,u.kg)(this._extraFilter,i)):i=this._extraFilter,await this._ensureLoaded();const c=await this._parent._getFilteredSet(e,t,i,r,s);let h;return this._checkCancelled(s),h=!0===n?new l.A(c._candidates.slice().concat(c._known.slice()),[],!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)):new l.A(c._candidates.slice(),c._known.slice(),!0===o&&c._ordered,this._clonePageDefinition(c.pagesDefinition)),h}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const i of this.adaptedFields)if(!0===(0,u.Ju)(e,i.field.name)){const r=i.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}async _stat(e,t,i,r,s,n,a){let l=!1,o=this._reformulateWithoutAdaptions(t);if(l=o.cannot,t=o.where,o=this._reformulateWithoutAdaptions(s),l=l||o.cannot,null!==(s=o.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,!0===l)return null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1};const c=await this._parent._stat(e,t,i,r,s,n,a);return!1===c.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1}:c}async _canDoAggregates(e,t,i,r,s){if(null===this._parent)return!1;for(let t=0;t<e.length;t++)for(const i of this.adaptedFields)if(e[t].toLowerCase()===i.field.name.toLowerCase()&&!(i instanceof y))return!1;const n=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return!1;const t=i.clone();t.workingexpr=e.where,n.push(t)}else n.push(i)}const a=this._reformulateWithoutAdaptions(s);return!a.cannot&&(null!==(s=a.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,n,i,r,s))}async _getAggregatePagesDataSourceDefinition(e,t,i,r,s,a,l){if(null===this._parent)throw new n.dr(n.D_.NeverReach);const o=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)throw new n.dr(n.D_.NeverReach);const t=i.clone();t.workingexpr=e.where,o.push(t)}else o.push(i)}const c=this._reformulateWithoutAdaptions(s);if(c.cannot)throw new n.dr(n.D_.NeverReach);return null!==(s=c.where)?null!==this._extraFilter&&(s=(0,u.kg)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,o,i,r,s,a,l)}}},73681:(e,t,i)=>{i.d(t,{n:()=>o});var r=i(49186),s=i(53966),n=i(46140),a=i(95466),l=i(55674);class o{static async from(e,t,i){const a=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),h={};if(t)for(const e in t)h[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)h.hasOwnProperty(t.name)||(h[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(i))d.delete(e);d.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const f=await(0,l.xR)(e.expression,null,h);if(!f)throw new r.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const p=!a||!a.greaterEqual(4,0);p&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});const y=new u(i,p);return new o(p,c,f,y)}constructor(e,t,i,r){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=i,this._reader=r}get itemNames(){return this._itemNames}evaluate(e,t,i,r){try{return this._reader.bind(e,i,r),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},77548:(e,t,i)=>{i.d(t,{Gh:()=>y,tk:()=>h,BR:()=>c,wI:()=>u,G$:()=>f,$x:()=>d,Ov:()=>l,W_:()=>o,OP:()=>p,TU:()=>a,XX:()=>n});var r=i(70333),s=i(78888);i(5503),i(84952),i(36563),i(36708),new WeakMap;const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const i=r.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const a=`${e.slice(0,n)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,s.A)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function h(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function d(e,t){return null}function f(e){return null}function p(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function y(e,t){if(!t||!p(e))return;const i=(e.url,null);i&&(e.url=i)}},86691:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(78878),s=i(87449),n=i(11221),a=i(89169),l=i(87594);class o extends n.A{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,this._orderbyclause,e);return this._checkCancelled(e),this._wset=t,this._wset}return this._wset}async manualOrderSet(e,t){const i=await this.getIdColumnDictionary(e,[],-1,t);this._orderbyclause?.order(i);const r=new a.A([],[],!0,null);for(let e=0;e<i.length;e++)r._known.push(i[e].id);return r}async getIdColumnDictionary(e,t,i,s){if(i<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return await(0,r.a0)(this._parent._expandPagedSet(e,n,0,0,s)),this.getIdColumnDictionary(e,t,i,s);let a=i+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;i+=l.length;const o=await(0,r.a0)(this._parent._getFeatureBatch(l,s));this._checkCancelled(s);for(const e of o)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,i,s)}return e._candidates.length>0?(await(0,r.a0)(this._refineSetBlock(e,this._maxProcessingRate(),s)),this._checkCancelled(s),this.getIdColumnDictionary(e,t,i,s)):t}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}async _fetchAndRefineFeatures(){throw new s.dr(s.D_.NeverReach)}async _getFilteredSet(e,t,i,r,s){await this._ensureLoaded();const n=await this._parent._getFilteredSet(e,t,i,null===r?this._orderbyclause:r,s);this._checkCancelled(s);const l=new a.A(n._candidates.slice(),n._known.slice(),n._ordered,this._clonePageDefinition(n.pagesDefinition));let o=!0;if(n._candidates.length>0&&(o=!1),!1===l._ordered){let e=await this.manualOrderSet(l,s);return!1===o&&(null===t&&null===i||(e=new a.A(e._candidates.slice().concat(e._known.slice()),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e}return l}static registerAction(){n.A._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new l.A(e)})}}getFieldsIndex(){return this._parent.getFieldsIndex()}}},87594:(e,t,i)=>{function r(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}i.d(t,{A:()=>s});class s{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const i=t[e].match(/\S+/g);this._fields.push(i[0]),2===i.length?"asc"===i[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort((e,t)=>{for(let i=0;i<this._fields.length;i++){const s=this.featureValue(e.feature,this._fields[i],i),n=this.featureValue(t.feature,this._fields[i],i);let a=0;if(a=1===this._directions[i]?r(s,n):-1*r(s,n),0!==a)return a}return 0})}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let i=0;i<this._fields.length;i++){0!==i&&(t+=",");let r=this._fields[i];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[i]?t+=" ASC":t+=" DESC"}return new s(t)}featureValue(e,t,i){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[i]=r,e.attributes[r];return null}}},91880:(e,t,i)=>{i.d(t,{A:()=>c});var r,s=i(90237),n=i(66552),a=i(25482),l=i(10107),o=(i(44208),i(53966),i(87811),i(40608));const u=new n.J({asc:"ascending",desc:"descending"});let c=class extends a.A{static{r=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new r({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,s._)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,s._)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=r=(0,s._)([(0,o.$)("esri.layers.support.OrderByInfo")],c)},92935:(e,t,i)=>{var r;i.d(t,{X:()=>r}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4697,8407],{10407:(e,t,r)=>{r.d(t,{It:()=>y,LG:()=>o,OM:()=>u,Sm:()=>p,Y:()=>a,bK:()=>l,mm:()=>h,sQ:()=>c});var s=r(98988),i=r(16930),n=r(28735);function o(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,h.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?o(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const r=i.A.WGS84;return await(0,s.initializeProjection)(t,r),(0,s.project)(e,r)}(r)}const h={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function y(e){const{portal:t,isOrgItem:r,itemControl:s}=e,i=t.user?.privileges;let n=!i||i.includes("features:user:edit"),o=!!r&&!!i?.includes("features:user:fullEdit");const a="update"===s||"admin"===s;return a?o=n=!0:o&&(n=!0),{features:{edit:n,fullEdit:o},content:{updateItem:a}}}},17311:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(90237),i=r(69622),n=r(4576),o=r(60999),a=r(5503),l=r(10107),u=(r(44208),r(53966),r(40608)),p=r(30524),c=r(43668);let h=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,o.UT)(()=>(0,c.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),s=this.fieldsIndex.get(r.at(-1)??"");s&&e.add(s.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const s=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(s)??""}async getTitles(e,t,r){const s=new Map,i=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:n}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:o,workingTitle:a}=this,l=a&&o;t.forEach(t=>{const r=t.getObjectId()??t.attributes[e.objectIdField],u=l?n({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:o,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:a}):"";s.set(r,u)})}catch{}return s}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(n.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,p.Kl)(e,this.requiredFields))){const s=e.createQuery();s.where="1=1",s.outFields=[...this.requiredFields],s.objectIds=r;const i=await e.queryFeatures(s);if(i?.features.length===t.length)return i.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),s=e?.name??r.fieldName;r.fieldName=s,t.set(s.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const s=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const n={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:s,attributes:n,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,p.nw)(e).filter(e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/")))}};(0,s._)([(0,l.MZ)({readOnly:!0})],h.prototype,"_arcadeTask",null),(0,s._)([(0,l.MZ)()],h.prototype,"_featureUtils",void 0),(0,s._)([(0,l.MZ)({readOnly:!0})],h.prototype,"featureUtilsPromise",null),(0,s._)([(0,l.MZ)({readOnly:!0})],h.prototype,"calculatedExpressions",null),(0,s._)([(0,l.MZ)()],h.prototype,"displayField",void 0),(0,s._)([(0,l.MZ)()],h.prototype,"effectivePopupTemplate",void 0),(0,s._)([(0,l.MZ)()],h.prototype,"expressionsUsedInTitle",null),(0,s._)([(0,l.MZ)()],h.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.MZ)()],h.prototype,"fieldInfoMap",null),(0,s._)([(0,l.MZ)()],h.prototype,"fields",void 0),(0,s._)([(0,l.MZ)()],h.prototype,"objectIdField",void 0),(0,s._)([(0,l.MZ)()],h.prototype,"requiredFields",null),h=(0,s._)([(0,u.$)("esri.layers.support.TitleCreator")],h)},22671:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),n=r(52106),o=r(66552),a=r(25482),l=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937),y=r(16930),f=r(65864),d=r(50498),m=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=s=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=y.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-s)/t),e=>Math.round((i-e)/r));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[n,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*n+s,e=>i-e*o,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const s=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=r.fromJSON(n),a=n.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=s);const l=n.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(o)}return i}_quantizePoints(e,t,r){let s,i;const n=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===s&&o===i||(n.push([e-s,o-i]),s=e,i=o)}else s=t(a[0]),i=r(a[1]),n.push([s,i])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],o=this._quantizePoints(n,t,r);o&&i.push(o)}return i.length>0?((0,f.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],a+=s[1]):(o=s[0],a=s[1]),s[0]=t(o),s[1]=r(a)}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],_.prototype,"features",void 0),(0,i._)([(0,p.w)("features")],_.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,i._)([(0,h.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:d.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,i._)([(0,p.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,i._)([(0,h.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=s=(0,i._)([(0,c.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>p,ne:()=>u});var s=r(90237),i=r(93637),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const s=e.find(e=>!!e.field);if(!s)return null;const i=new a.A;return i.read(s,r),[i]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,s){const n=e.find(e=>!!e.field);n&&(0,i.sM)(r,[n.toJSON()],t)}}}},p=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,s._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(90237),i=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(80451),c=r(29005);let h=class extends(i.A.ClonableMixin(n.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,o.MZ)({json:{write:!0}})],h.prototype,"id",void 0),(0,s._)([(0,o.MZ)({json:{write:!0}})],h.prototype,"name",void 0),(0,s._)([(0,o.MZ)({json:{write:!0}})],h.prototype,"domains",void 0),(0,s._)([(0,a.w)("domains")],h.prototype,"readDomains",null),(0,s._)([(0,u.K)("domains")],h.prototype,"writeDomains",null),(0,s._)([(0,o.MZ)({type:[c.A],json:{write:!0}})],h.prototype,"templates",void 0),h=(0,s._)([(0,l.$)("esri.layers.support.FeatureType")],h)},52106:(e,t,r)=>{r.d(t,{A:()=>v});var s,i=r(90237),n=r(13874),o=r(69540),a=r(51447),l=r(25482),u=r(53966),p=r(36708),c=r(24326),h=r(10107),y=(r(44208),r(87811),r(40608)),f=r(12195),d=r(65864),m=r(50498),g=r(54339),_=r(33910);function b(e){if(null==e)return null;const t={};for(const r in e){const s=e[r];s&&(t[r]=s.toJSON())}return 0!==Object.keys(t).length?t:null}let v=class extends(o.A.ClonableMixin(l.A)){static{s=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new s({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:b(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,s){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=s),"attributes"===e&&(i.attributeName=s),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,p.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,p.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,i._)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const s=(0,d.rS)(e[r]);s&&(t[r]=s)}return 0!==Object.keys(t).length?t:null}}})],v.prototype,"aggregateGeometries",null),(0,i._)([(0,h.MZ)({value:null})],v.prototype,"attributes",null),(0,i._)([(0,h.MZ)({value:null,types:m.yR,json:{read:d.rS}})],v.prototype,"geometry",null),(0,i._)([(0,h.MZ)({type:Boolean})],v.prototype,"isAggregate",void 0),(0,i._)([(0,h.MZ)({clonable:!1})],v.prototype,"layer",void 0),(0,i._)([(0,h.MZ)({clonable:"reference"})],v.prototype,"origin",void 0),(0,i._)([(0,h.MZ)({type:n.A,value:null})],v.prototype,"popupTemplate",null),(0,i._)([(0,h.MZ)({clonable:"reference"})],v.prototype,"sourceLayer",void 0),(0,i._)([(0,h.MZ)({value:null,types:_.Es})],v.prototype,"symbol",null),(0,i._)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],v.prototype,"_version",void 0),(0,i._)([(0,h.MZ)({type:Boolean,value:!0})],v.prototype,"visible",null),v=s=(0,i._)([(0,y.$)("esri.Graphic")],v)},60999:(e,t,r)=>{r.d(t,{DZ:()=>f,Ke:()=>y,Tj:()=>p,UT:()=>d,jJ:()=>u});var s=r(90237),i=r(69622),n=r(97768),o=r(74887),a=r(10107),l=r(40608);function u(e,t,r){return(0,o.Lx)(e.map((e,s)=>t.apply(r,[e,s])))}async function p(e,t,r){return(await(0,o.Lx)(e.map((e,s)=>t.apply(r,[e,s])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function y(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return h(e)}}async function f(e){try{return c(await e)}catch(e){return(0,o.QP)(e),h(e)}}function d(e,t){return new m(e,t)}let m=class extends i.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=h(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,s._)([(0,a.MZ)()],m.prototype,"value",null),(0,s._)([(0,a.MZ)()],m.prototype,"error",null),(0,s._)([(0,a.MZ)()],m.prototype,"finished",null),(0,s._)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,s._)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,s._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m)},77548:(e,t,r)=>{r.d(t,{Gh:()=>d,tk:()=>c,BR:()=>p,wI:()=>u,G$:()=>y,$x:()=>h,Ov:()=>a,W_:()=>l,OP:()=>f,TU:()=>o,XX:()=>n});var s=r(70333),i=r(78888);r(5503),r(84952),r(36563),r(36708),new WeakMap;const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const r=s.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const o=`${e.slice(0,n)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,i.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function p(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function c(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function h(e,t){return null}function y(e){return null}function f(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function d(e,t){if(!t||!f(e))return;const r=(e.url,null);r&&(e.url=r)}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var s,i=r(90237),n=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({asc:"ascending",desc:"descending"});let p=class extends o.A{static{s=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,i._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=s=(0,i._)([(0,l.$)("esri.layers.support.OrderByInfo")],p)},92935:(e,t,r)=>{var s;r.d(t,{X:()=>s}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(s||(s={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4697,8407],{10407:(e,t,r)=>{r.d(t,{It:()=>y,LG:()=>o,OM:()=>u,Sm:()=>p,Y:()=>a,bK:()=>l,mm:()=>h,sQ:()=>c});var s=r(98988),i=r(16930),n=r(28735);function o(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,h.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?o(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const r=i.A.WGS84;return await(0,s.initializeProjection)(t,r),(0,s.project)(e,r)}(r)}const h={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function y(e){const{portal:t,isOrgItem:r,itemControl:s}=e,i=t.user?.privileges;let n=!i||i.includes("features:user:edit"),o=!!r&&!!i?.includes("features:user:fullEdit");const a="update"===s||"admin"===s;return a?o=n=!0:o&&(n=!0),{features:{edit:n,fullEdit:o},content:{updateItem:a}}}},17311:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(90237),i=r(69622),n=r(4576),o=r(60999),a=r(5503),l=r(10107),u=(r(44208),r(53966),r(40608)),p=r(30524),c=r(43668);let h=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,o.UT)(()=>(0,c.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),s=this.fieldsIndex.get(r.at(-1)??"");s&&e.add(s.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return null!=this.objectIdField&&e.add(this.objectIdField),e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){const s=t.getObjectId()??t.attributes[e.objectIdField];return(await this.getTitles(e,[t],r)).get(s)??""}async getTitles(e,t,r){const s=new Map,i=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:n}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:o,workingTitle:a}=this,l=a&&o;t.forEach(t=>{const r=t.getObjectId()??t.attributes[e.objectIdField],u=l?n({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:o,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:a}):"";s.set(r,u)})}catch{}return s}async _checkAndReQueryGraphics(e,t){const r=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(n.Ru);if(r.length!==t.length)return t;if(t.some(e=>!(0,p.Kl)(e,this.requiredFields))){const s=e.createQuery();s.where="1=1",s.outFields=[...this.requiredFields],s.objectIds=r;const i=await e.queryFeatures(s);if(i?.features.length===t.length)return i.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),s=e?.name??r.fieldName;r.fieldName=s,t.set(s.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const s=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const n={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:s,attributes:n,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,p.nw)(e).filter(e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/")))}};(0,s._)([(0,l.MZ)({readOnly:!0})],h.prototype,"_arcadeTask",null),(0,s._)([(0,l.MZ)()],h.prototype,"_featureUtils",void 0),(0,s._)([(0,l.MZ)({readOnly:!0})],h.prototype,"featureUtilsPromise",null),(0,s._)([(0,l.MZ)({readOnly:!0})],h.prototype,"calculatedExpressions",null),(0,s._)([(0,l.MZ)()],h.prototype,"displayField",void 0),(0,s._)([(0,l.MZ)()],h.prototype,"effectivePopupTemplate",void 0),(0,s._)([(0,l.MZ)()],h.prototype,"expressionsUsedInTitle",null),(0,s._)([(0,l.MZ)()],h.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.MZ)()],h.prototype,"fieldInfoMap",null),(0,s._)([(0,l.MZ)()],h.prototype,"fields",void 0),(0,s._)([(0,l.MZ)()],h.prototype,"objectIdField",void 0),(0,s._)([(0,l.MZ)()],h.prototype,"requiredFields",null),h=(0,s._)([(0,u.$)("esri.layers.support.TitleCreator")],h)},22671:(e,t,r)=>{r.d(t,{A:()=>_});var s,i=r(90237),n=r(52106),o=r(66552),a=r(25482),l=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937),y=r(16930),f=r(65864),d=r(50498),m=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=s=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,n.A)}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=y.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-s)/t),e=>Math.round((i-e)/r));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[n,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*n+s,e=>i-e*o,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const s=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=r.fromJSON(n),a=n.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=s);const l=n.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=s)}i.push(o)}return i}_quantizePoints(e,t,r){let s,i;const n=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===s&&o===i||(n.push([e-s,o-i]),s=e,i=o)}else s=t(a[0]),i=r(a[1]),n.push([s,i])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],o=this._quantizePoints(n,t,r);o&&i.push(o)}return i.length>0?((0,f.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.Bi)(e)?e.rings:e.paths;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,a;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],a+=s[1]):(o=s[0],a=s[1]),s[0]=t(o),s[1]=r(a)}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,u.MZ)({type:[n.A],json:{write:!0}})],_.prototype,"features",void 0),(0,i._)([(0,p.w)("features")],_.prototype,"readFeatures",null),(0,i._)([(0,u.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,i._)([(0,h.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,i._)([(0,u.MZ)({types:d.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,i._)([(0,p.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,i._)([(0,u.MZ)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,i._)([(0,h.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=s=(0,i._)([(0,c.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>p,ne:()=>u});var s=r(90237),i=r(93637),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const s=e.find(e=>!!e.field);if(!s)return null;const i=new a.A;return i.read(s,r),[i]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,s){const n=e.find(e=>!!e.field);n&&(0,i.sM)(r,[n.toJSON()],t)}}}},p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,s._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(90237),i=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(80451),c=r(29005);let h=class extends(i.A.ClonableMixin(n.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,o.MZ)({json:{write:!0}})],h.prototype,"id",void 0),(0,s._)([(0,o.MZ)({json:{write:!0}})],h.prototype,"name",void 0),(0,s._)([(0,o.MZ)({json:{write:!0}})],h.prototype,"domains",void 0),(0,s._)([(0,a.w)("domains")],h.prototype,"readDomains",null),(0,s._)([(0,u.K)("domains")],h.prototype,"writeDomains",null),(0,s._)([(0,o.MZ)({type:[c.A],json:{write:!0}})],h.prototype,"templates",void 0),h=(0,s._)([(0,l.$)("esri.layers.support.FeatureType")],h)},52106:(e,t,r)=>{r.d(t,{A:()=>v});var s,i=r(90237),n=r(13874),o=r(69540),a=r(51447),l=r(25482),u=r(53966),p=r(36708),c=r(24326),h=r(10107),y=(r(44208),r(87811),r(40608)),f=r(12195),d=r(65864),m=r(50498),g=r(54339),_=r(33910);function b(e){if(null==e)return null;const t={};for(const r in e){const s=e[r];s&&(t[r]=s.toJSON())}return 0!==Object.keys(t).length?t:null}let v=class extends(o.A.ClonableMixin(l.A)){static{s=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new s({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:b(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,f.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,s){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=s),"attributes"===e&&(i.attributeName=s),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,p.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,p.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,i._)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const s=(0,d.rS)(e[r]);s&&(t[r]=s)}return 0!==Object.keys(t).length?t:null}}})],v.prototype,"aggregateGeometries",null),(0,i._)([(0,h.MZ)({value:null})],v.prototype,"attributes",null),(0,i._)([(0,h.MZ)({value:null,types:m.yR,json:{read:d.rS}})],v.prototype,"geometry",null),(0,i._)([(0,h.MZ)({type:Boolean})],v.prototype,"isAggregate",void 0),(0,i._)([(0,h.MZ)({clonable:!1})],v.prototype,"layer",void 0),(0,i._)([(0,h.MZ)({clonable:"reference"})],v.prototype,"origin",void 0),(0,i._)([(0,h.MZ)({type:n.A,value:null})],v.prototype,"popupTemplate",null),(0,i._)([(0,h.MZ)({clonable:"reference"})],v.prototype,"sourceLayer",void 0),(0,i._)([(0,h.MZ)({value:null,types:_.Es})],v.prototype,"symbol",null),(0,i._)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],v.prototype,"_version",void 0),(0,i._)([(0,h.MZ)({type:Boolean,value:!0})],v.prototype,"visible",null),v=s=(0,i._)([(0,y.$)("esri.Graphic")],v)},60999:(e,t,r)=>{r.d(t,{DZ:()=>f,Ke:()=>y,Tj:()=>p,UT:()=>d,jJ:()=>u});var s=r(90237),i=r(69622),n=r(97768),o=r(74887),a=r(10107),l=r(40608);function u(e,t,r){return(0,o.Lx)(e.map((e,s)=>t.apply(r,[e,s])))}async function p(e,t,r){return(await(0,o.Lx)(e.map((e,s)=>t.apply(r,[e,s])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function y(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return h(e)}}async function f(e){try{return c(await e)}catch(e){return(0,o.QP)(e),h(e)}}function d(e,t){return new m(e,t)}let m=class extends i.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=h(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,s._)([(0,a.MZ)()],m.prototype,"value",null),(0,s._)([(0,a.MZ)()],m.prototype,"error",null),(0,s._)([(0,a.MZ)()],m.prototype,"finished",null),(0,s._)([(0,a.MZ)()],m.prototype,"promise",void 0),(0,s._)([(0,a.MZ)()],m.prototype,"_result",void 0),m=(0,s._)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],m)},77548:(e,t,r)=>{r.d(t,{Gh:()=>d,tk:()=>c,BR:()=>p,wI:()=>u,G$:()=>y,$x:()=>h,Ov:()=>a,W_:()=>l,OP:()=>f,TU:()=>o,XX:()=>n});var s=r(70333),i=r(78888);r(5503),r(84952),r(36563),r(36708),new WeakMap;const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}async function u(e,t){const r=s.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const o=`${e.slice(0,n)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,i.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function p(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function c(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function h(e,t){return null}function y(e){return null}function f(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function d(e,t){if(!t||!f(e))return;const r=(e.url,null);r&&(e.url=r)}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var s,i=r(90237),n=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({asc:"ascending",desc:"descending"});let p=class extends o.A{static{s=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,i._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=s=(0,i._)([(0,l.$)("esri.layers.support.OrderByInfo")],p)},92935:(e,t,r)=>{var s;r.d(t,{X:()=>s}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(s||(s={}))}}]);