@arcgis/core 5.1.0-next.52 → 5.1.0-next.54

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 (437) hide show
  1. package/applications/Components/SketchTooltipControls.d.ts +3 -2
  2. package/applications/Components/SketchTooltipControls.js +1 -1
  3. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/009db7b459b18f6a668b.js +1 -0
  6. package/assets/esri/core/workers/chunks/097c037705ab485372ee.js +1 -0
  7. package/assets/esri/core/workers/chunks/0ab19ad980fda1cf402a.js +1 -0
  8. package/assets/esri/core/workers/chunks/0b79630ad435a7734104.js +1 -0
  9. package/assets/esri/core/workers/chunks/0f4759efc0982fb0ea03.js +1 -0
  10. package/assets/esri/core/workers/chunks/{386435341e949f5573b4.js → 0fc60b4c44c4e865b699.js} +2 -2
  11. package/assets/esri/core/workers/chunks/{f4d31d96681b649ddc95.js → 0ff12fe9e358100668d9.js} +1 -1
  12. package/assets/esri/core/workers/chunks/11fed97adc9bca0f95e9.js +1 -0
  13. package/assets/esri/core/workers/chunks/123e15c9e068a053d54e.js +1 -0
  14. package/assets/esri/core/workers/chunks/1613123918e9b0f7cfdb.js +1 -0
  15. package/assets/esri/core/workers/chunks/16a46688df5fad5cf8d5.js +1 -0
  16. package/assets/esri/core/workers/chunks/16ed8c0af8bb8b400163.js +1 -0
  17. package/assets/esri/core/workers/chunks/16f5cd740321a3539bf1.js +1 -0
  18. package/assets/esri/core/workers/chunks/173d94e162b210dee0a2.js +1 -0
  19. package/assets/esri/core/workers/chunks/199f70c0373f6008a545.js +1 -0
  20. package/assets/esri/core/workers/chunks/1a198c9e17f7a058669e.js +1 -0
  21. package/assets/esri/core/workers/chunks/1fdd736c4932655ff1d9.js +1 -0
  22. package/assets/esri/core/workers/chunks/{d2af5342fbe80e2d8c60.js → 20f9f3470cad47d01803.js} +1 -1
  23. package/assets/esri/core/workers/chunks/2304f7b8173cf86dd805.js +1 -0
  24. package/assets/esri/core/workers/chunks/2327b368673a974dee8b.js +1 -0
  25. package/assets/esri/core/workers/chunks/23eb204d3cb818adea32.js +1 -0
  26. package/assets/esri/core/workers/chunks/{eedeff8b344ff699b0b9.js → 2714ec856c2b3223425b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/2757cf54656b5d318b11.js +1 -0
  28. package/assets/esri/core/workers/chunks/2aaeaf022af8493281dc.js +1 -0
  29. package/assets/esri/core/workers/chunks/34acecd7a314fed12335.js +1 -0
  30. package/assets/esri/core/workers/chunks/34fe4570eef9e73839b8.js +1 -0
  31. package/assets/esri/core/workers/chunks/{cdeb6aec578a1c07d663.js → 3cb0f020f9bfc6653c5d.js} +1 -1
  32. package/assets/esri/core/workers/chunks/40bcfc4f8efe7de7ec9d.js +1 -0
  33. package/assets/esri/core/workers/chunks/42e084704dea6e4135b6.js +1 -0
  34. package/assets/esri/core/workers/chunks/{5b3bb636e3bec625e515.js → 4301cb9670fa7c907460.js} +1 -1
  35. package/assets/esri/core/workers/chunks/48eca6f51112ba80bd3b.js +1 -0
  36. package/assets/esri/core/workers/chunks/4c38af9ae023fde2b5cd.js +1 -0
  37. package/assets/esri/core/workers/chunks/4c8c69d081ed37bf5bc5.js +1 -0
  38. package/assets/esri/core/workers/chunks/{cc1f3a2f281a2f6e0f94.js → 4d54beab8ae5ff31e7b0.js} +1 -1
  39. package/assets/esri/core/workers/chunks/4e7bb224bde9e5039263.js +1 -0
  40. package/assets/esri/core/workers/chunks/4f847a426973bd350c11.js +1 -0
  41. package/assets/esri/core/workers/chunks/52c90975cf22add7ee2b.js +1 -0
  42. package/assets/esri/core/workers/chunks/55214e1d9f3d98fa7ed9.js +1 -0
  43. package/assets/esri/core/workers/chunks/55bb5b7817c2963c8bfa.js +1 -0
  44. package/assets/esri/core/workers/chunks/57dc80942e51dedd8335.js +1 -0
  45. package/assets/esri/core/workers/chunks/59289867cce97da74e39.js +1 -0
  46. package/assets/esri/core/workers/chunks/5a9620cb66c8e64e4668.js +1 -0
  47. package/assets/esri/core/workers/chunks/5d202f60891fcae7174d.js +1 -0
  48. package/assets/esri/core/workers/chunks/{f7fb121169b7e5a5adbc.js → 6666ef3fd6ce877a4509.js} +1 -1
  49. package/assets/esri/core/workers/chunks/69644b8a6ce340ca1159.js +1 -0
  50. package/assets/esri/core/workers/chunks/6ab8ed12d162d79a8c55.js +1 -0
  51. package/assets/esri/core/workers/chunks/796d27d1bbb2eed53cbd.js +1 -0
  52. package/assets/esri/core/workers/chunks/7d56b2ac5030dd8b748e.js +1 -0
  53. package/assets/esri/core/workers/chunks/7ef1c1f765b6d423e474.js +1 -0
  54. package/assets/esri/core/workers/chunks/{720a33a7f118d2769133.js → 851dd71d28681d4eccfd.js} +1 -1
  55. package/assets/esri/core/workers/chunks/8569ae372fc64641b6b1.js +1 -0
  56. package/assets/esri/core/workers/chunks/{88c6cc90606409b5c884.js → 87d2021e91d025a2a142.js} +1 -1
  57. package/assets/esri/core/workers/chunks/929b26999321519824b9.js +1 -0
  58. package/assets/esri/core/workers/chunks/932a0b39d85a76377d52.js +1 -0
  59. package/assets/esri/core/workers/chunks/94f80c46ccf5e19038b8.js +1 -0
  60. package/assets/esri/core/workers/chunks/{fe7dec83e40014c55a6b.js → 96e799ca97989a6ed448.js} +1 -1
  61. package/assets/esri/core/workers/chunks/979c2f52b6d6e1e8241b.js +1 -0
  62. package/assets/esri/core/workers/chunks/{617328964d480d4a3a45.js → 9806cc96414065ae0afe.js} +1 -1
  63. package/assets/esri/core/workers/chunks/9db2ff1d4cbb5d1b623e.js +1 -0
  64. package/assets/esri/core/workers/chunks/a462aa1c7b68efad6906.js +1 -0
  65. package/assets/esri/core/workers/chunks/{987dc23fdc0a8c7150b9.js → a5bf2718c02a0e645013.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{f5fd59291cb161fdc05b.js → a787fe09d3df9d4254ba.js} +1 -1
  67. package/assets/esri/core/workers/chunks/a7b315a660f0f4e1d197.js +1 -0
  68. package/assets/esri/core/workers/chunks/a8e111a5cfd6151d5dbb.js +1 -0
  69. package/assets/esri/core/workers/chunks/a971e61336f455b953d5.js +1 -0
  70. package/assets/esri/core/workers/chunks/aed45f7e7eee154a21b8.js +1 -0
  71. package/assets/esri/core/workers/chunks/b2b77598048818c957b7.js +1 -0
  72. package/assets/esri/core/workers/chunks/b39b4db86a1049f0b901.js +1 -0
  73. package/assets/esri/core/workers/chunks/{3fa5f102b6f77c523a76.js → b3e5dcb530cef678c8f8.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{c6a0e770c1a89d3b5913.js → b43889ed9737c27e89f1.js} +1 -1
  75. package/assets/esri/core/workers/chunks/b59f03c64e4965d87291.js +1 -0
  76. package/assets/esri/core/workers/chunks/bad82ce3f84f7efb7ab7.js +1 -0
  77. package/assets/esri/core/workers/chunks/bae1d6dd2376dff271e8.js +1 -0
  78. package/assets/esri/core/workers/chunks/bb047157f09471ecea53.js +1 -0
  79. package/assets/esri/core/workers/chunks/bbb9659f79511c2c4690.js +1 -0
  80. package/assets/esri/core/workers/chunks/bc3b22dc08c147b8d425.js +1 -0
  81. package/assets/esri/core/workers/chunks/be60a6e210186ff09ae2.js +1 -0
  82. package/assets/esri/core/workers/chunks/c03190faca955bffc8c1.js +1 -0
  83. package/assets/esri/core/workers/chunks/c1ad062ccc1817cbee4c.js +1 -0
  84. package/assets/esri/core/workers/chunks/{daf65bccc45dc5c400ae.js → c460ca93ed8e20d8b53a.js} +1 -1
  85. package/assets/esri/core/workers/chunks/c86b15f6a18880f921cd.js +1 -0
  86. package/assets/esri/core/workers/chunks/c93454e37ae0f124bcb0.js +1 -0
  87. package/assets/esri/core/workers/chunks/{3fcc8c455af56ae89030.js → ccf845ac0ac354507a25.js} +1 -1
  88. package/assets/esri/core/workers/chunks/cd14b6157862f33ab116.js +1 -0
  89. package/assets/esri/core/workers/chunks/ce59ec4f0cfbdf780bcb.js +1 -0
  90. package/assets/esri/core/workers/chunks/{7480bd6f892abf444cac.js → d1aa1d51662f4a01e793.js} +3 -3
  91. package/assets/esri/core/workers/chunks/d31e68e73527c88b8276.js +1 -0
  92. package/assets/esri/core/workers/chunks/{15a45e26964c2eb381a6.js → d4961d307651431328a8.js} +1 -1
  93. package/assets/esri/core/workers/chunks/{81b830f0d620587966ca.js → d53c6fc10425adc2c0cf.js} +1 -1
  94. package/assets/esri/core/workers/chunks/d69cdee402ba4fc3735f.js +1 -0
  95. package/assets/esri/core/workers/chunks/d6f1ed8d8f76a32bc81d.js +1 -0
  96. package/assets/esri/core/workers/chunks/d7456829e404874a9e2f.js +1 -0
  97. package/assets/esri/core/workers/chunks/d9444dd0d40aa8332b28.js +1 -0
  98. package/assets/esri/core/workers/chunks/da0a61f73d45ea9e71fc.js +1 -0
  99. package/assets/esri/core/workers/chunks/{9ae90a4b281d4103e8bb.js → dc07dc1cd30edc0c4193.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{fdf8fe0f50a9ae548c16.js → ddc7956d80498518551e.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{29c91b5c9ddcea85f39a.js → e23fc5853e2f4016936b.js} +1 -1
  102. package/assets/esri/core/workers/chunks/e2d1d9929ed7744785a1.js +1 -0
  103. package/assets/esri/core/workers/chunks/e543bb228f3f9d937d43.js +1 -0
  104. package/assets/esri/core/workers/chunks/ec21311584e4fb13e510.js +1 -0
  105. package/assets/esri/core/workers/chunks/ec91d5081f423755cb07.js +1 -0
  106. package/assets/esri/core/workers/chunks/{eb36417edc11fa80e312.js → ee8cd91c27e9cdfc3b2e.js} +1 -1
  107. package/assets/esri/core/workers/chunks/f3f26f6116ab9126c2e7.js +1 -0
  108. package/assets/esri/core/workers/chunks/f4472e3486fdc33abb9a.js +1 -0
  109. package/assets/esri/core/workers/chunks/f80f04657762666b9165.js +1 -0
  110. package/assets/esri/core/workers/chunks/f8eb14170f927aecfbc8.js +1 -0
  111. package/assets/esri/core/workers/chunks/f8ee1a99580a7da42cde.js +1 -0
  112. package/assets/esri/core/workers/chunks/fcda652fb5262696d59c.js +1 -0
  113. package/assets/esri/core/workers/chunks/{792219a079c28bcdc003.js → fcfaaced184f8da3e28d.js} +1 -1
  114. package/assets/esri/core/workers/chunks/fe92f54e45fd21ccd75f.js +1 -0
  115. package/assets/esri/core/workers/chunks/ff0cb1eec14d34214f12.js +1 -0
  116. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  117. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  118. package/chunks/OITBlend.glsl.js +2 -2
  119. package/chunks/ShadowHighlight.glsl.js +1 -1
  120. package/chunks/Viewshed.glsl.js +2 -2
  121. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  122. package/chunks/arcgis-knowledge-client-core.js +1 -1
  123. package/config.js +1 -1
  124. package/core/arrayUtils.js +1 -1
  125. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  126. package/core/maybe.js +1 -1
  127. package/geometry/SpatialReference.js +1 -1
  128. package/geometry/operators/support/apiConverter.js +1 -1
  129. package/geometry/support/aaBoundingBox.js +1 -1
  130. package/geometry/support/geometryUtils.js +1 -1
  131. package/kernel.js +1 -1
  132. package/layers/FeatureLayer.js +1 -1
  133. package/layers/OrientedImageryLayer.js +1 -1
  134. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  135. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  136. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  137. package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
  138. package/layers/mixins/ArcGISImageService.js +1 -1
  139. package/layers/mixins/FeatureLayerBase.js +1 -1
  140. package/layers/raster/datasets/FunctionRaster.js +1 -1
  141. package/layers/raster/functions/AspectFunction.js +1 -1
  142. package/layers/raster/functions/BaseRasterFunction.js +1 -1
  143. package/layers/raster/functions/ConvolutionFunction.js +1 -1
  144. package/layers/raster/functions/CurvatureFunction.js +1 -1
  145. package/layers/raster/functions/HillshadeFunction.js +1 -1
  146. package/layers/raster/functions/ShadedReliefFunction.js +1 -1
  147. package/layers/raster/functions/SlopeFunction.js +1 -1
  148. package/layers/raster/functions/StatisticsFunction.js +1 -1
  149. package/layers/raster/functions/pixelUtils.js +1 -1
  150. package/layers/support/capabilities.js +1 -1
  151. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  152. package/package.json +3 -3
  153. package/rest/knowledgeGraph/wasmInterface/knowledgeWasmAccess.js +1 -1
  154. package/support/revision.js +1 -1
  155. package/support/tests/serviceMockDependencies.js +1 -1
  156. package/views/2d/engine/flow/FlowContainer.js +1 -1
  157. package/views/2d/engine/flow/FlowStrategy.js +1 -1
  158. package/views/2d/engine/flow/FlowView2D.js +1 -1
  159. package/views/2d/engine/flow/dataUtils.js +1 -1
  160. package/views/2d/engine/flow/particleConstants.js +2 -0
  161. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  162. package/views/2d/engine/flow/styles/Particles.js +1 -1
  163. package/views/2d/engine/flow/styles/Stack.js +1 -1
  164. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  165. package/views/2d/engine/flow/utils.js +1 -1
  166. package/views/2d/engine/imagery/RasterVFContainer.js +1 -1
  167. package/views/2d/engine/webgl/Painter.js +1 -1
  168. package/views/2d/engine/webgl/Profiler.js +1 -1
  169. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  170. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  171. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
  172. package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
  173. package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
  174. package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
  175. package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
  176. package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
  177. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
  178. package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
  179. package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +2 -0
  180. package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
  181. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  182. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  183. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
  184. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  185. package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
  186. package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
  187. package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
  188. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
  189. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
  190. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
  191. package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
  192. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  193. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +2 -0
  194. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js +2 -0
  195. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js +2 -0
  196. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +2 -0
  197. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
  198. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
  199. package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
  200. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  201. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
  202. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  203. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  204. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  205. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
  206. package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
  207. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  208. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  209. package/views/2d/layers/features/FeatureContainer.js +1 -1
  210. package/views/2d/layers/features/RenderState.js +1 -1
  211. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  212. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  213. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
  214. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  215. package/views/3d/layers/I3SMeshView3D.js +1 -1
  216. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  217. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  218. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  219. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  220. package/views/3d/layers/support/Tiles3DBVH.js +1 -1
  221. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  222. package/views/3d/support/ResourceController.js +1 -1
  223. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  224. package/views/3d/support/orientedBoundingBox.js +1 -1
  225. package/views/3d/terrain/OverlayRenderer.js +1 -1
  226. package/views/3d/terrain/TerrainRenderer.js +1 -1
  227. package/views/3d/webgl/ManagedFBO.d.ts +1 -0
  228. package/views/3d/webgl/ManagedFBOResource.d.ts +1 -0
  229. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  230. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
  231. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  232. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
  233. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  234. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  235. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  236. package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
  237. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
  238. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
  239. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  240. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  241. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  242. package/views/3d/webgl-engine/lib/GLMaterial.js +1 -1
  243. package/views/3d/webgl-engine/lib/GLMaterialLoader.js +2 -0
  244. package/views/3d/webgl-engine/lib/GLMaterialParameters.js +1 -1
  245. package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
  246. package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
  247. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  248. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  249. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  250. package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
  251. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  252. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  253. package/views/3d/webgl-engine/lib/ReprojectionUniforms.js +2 -0
  254. package/views/3d/webgl-engine/lib/ScreenSpaceReflectionsUniforms.js +2 -0
  255. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  256. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  257. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  258. package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
  259. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  260. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  261. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  262. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  263. package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
  264. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  265. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  266. package/views/3d/webgl-engine/materials/TriangleTechniqueConfiguration.js +1 -1
  267. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  268. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  269. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  270. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  271. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  272. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  273. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  274. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
  275. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  276. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  277. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  278. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  279. package/views/3d/webgl.js +1 -1
  280. package/views/draw/DrawTool.js +1 -1
  281. package/views/draw/plugins/ShapePlugin.js +1 -1
  282. package/views/draw/support/managers/GlobalStateManager.js +1 -1
  283. package/views/draw/support/types.d.ts +9 -0
  284. package/views/interactive/SegmentLabels.js +1 -1
  285. package/views/webgl/AllocationTracer.js +1 -1
  286. package/views/webgl/Program.js +1 -1
  287. package/views/webgl/RenderingContext.js +1 -1
  288. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  289. package/widgets/Editor/components/Settings.js +1 -1
  290. package/widgets/Features/FeaturesViewModel.js +1 -1
  291. package/widgets/Features.js +1 -1
  292. package/widgets/Search/SearchViewModel.js +1 -1
  293. package/widgets/Search/support/layerSearchUtils.js +1 -1
  294. package/widgets/Search/support/locatorUtils.js +1 -1
  295. package/widgets/Sketch.js +1 -1
  296. package/widgets/support/SketchTooltipControls.js +1 -1
  297. package/assets/esri/core/workers/chunks/001492854799c35b53bb.js +0 -1
  298. package/assets/esri/core/workers/chunks/004f991251f09b36fb09.js +0 -1
  299. package/assets/esri/core/workers/chunks/01dd849a2d335e9f3e16.js +0 -1
  300. package/assets/esri/core/workers/chunks/027d733a99f50cadcf22.js +0 -1
  301. package/assets/esri/core/workers/chunks/03d85a706669aaf24d49.js +0 -1
  302. package/assets/esri/core/workers/chunks/0450133e81bce4b48b84.js +0 -1
  303. package/assets/esri/core/workers/chunks/085778ecd39f46324a6b.js +0 -1
  304. package/assets/esri/core/workers/chunks/08dce0019b52042b01fa.js +0 -1
  305. package/assets/esri/core/workers/chunks/0b661b90f7ee3ae23425.js +0 -1
  306. package/assets/esri/core/workers/chunks/0d8294982853308225da.js +0 -1
  307. package/assets/esri/core/workers/chunks/156aecac067213642aae.js +0 -1
  308. package/assets/esri/core/workers/chunks/167e4ff7cbc88b42db71.js +0 -1
  309. package/assets/esri/core/workers/chunks/184e9147f7a2f0ae5915.js +0 -1
  310. package/assets/esri/core/workers/chunks/19f59a2a97c33ff92650.js +0 -1
  311. package/assets/esri/core/workers/chunks/1a481f3ae3146682eb00.js +0 -1
  312. package/assets/esri/core/workers/chunks/2b7d020367cb4ebb3c3d.js +0 -1
  313. package/assets/esri/core/workers/chunks/30654845ca1334f1c206.js +0 -1
  314. package/assets/esri/core/workers/chunks/3104b10770903c265626.js +0 -1
  315. package/assets/esri/core/workers/chunks/33f00633131581e06328.js +0 -1
  316. package/assets/esri/core/workers/chunks/34207774bc371e95ba3c.js +0 -1
  317. package/assets/esri/core/workers/chunks/35dbe1eeb6932b03aea2.js +0 -1
  318. package/assets/esri/core/workers/chunks/365ad1ffd496ed86637b.js +0 -1
  319. package/assets/esri/core/workers/chunks/380bb57bccc266d6442a.js +0 -1
  320. package/assets/esri/core/workers/chunks/3874362bf7d43adc41bb.js +0 -1
  321. package/assets/esri/core/workers/chunks/38dc1c4b8721efd4a165.js +0 -1
  322. package/assets/esri/core/workers/chunks/39f3bea123f20c816ab2.js +0 -1
  323. package/assets/esri/core/workers/chunks/3e9700445518b8f9ae1b.js +0 -1
  324. package/assets/esri/core/workers/chunks/42f3fdad1728433b3510.js +0 -1
  325. package/assets/esri/core/workers/chunks/436941ec88439667022e.js +0 -1
  326. package/assets/esri/core/workers/chunks/4812482f28f7205b0938.js +0 -1
  327. package/assets/esri/core/workers/chunks/5317cbef0aac29761575.js +0 -1
  328. package/assets/esri/core/workers/chunks/5351e71ce7839636d06d.js +0 -1
  329. package/assets/esri/core/workers/chunks/54a9e17d6c0fef6a9146.js +0 -1
  330. package/assets/esri/core/workers/chunks/55985c9c48b8e1d1c634.js +0 -1
  331. package/assets/esri/core/workers/chunks/55edd712c6d2d044e550.js +0 -1
  332. package/assets/esri/core/workers/chunks/5e5b358e603b13b4d7d7.js +0 -1
  333. package/assets/esri/core/workers/chunks/63b9e4a7dad358605c38.js +0 -1
  334. package/assets/esri/core/workers/chunks/64da1ad9df9094ef5c12.js +0 -1
  335. package/assets/esri/core/workers/chunks/666f201d222c50ab8428.js +0 -1
  336. package/assets/esri/core/workers/chunks/66d4cbb35d0c290150bf.js +0 -1
  337. package/assets/esri/core/workers/chunks/677d3674cb2c0c05fb7e.js +0 -1
  338. package/assets/esri/core/workers/chunks/6f58ec80abebb7bfbbb0.js +0 -1
  339. package/assets/esri/core/workers/chunks/7100c9038739121c2c4b.js +0 -1
  340. package/assets/esri/core/workers/chunks/7380177f16d914fdbc63.js +0 -1
  341. package/assets/esri/core/workers/chunks/794f604d4267e374f7dd.js +0 -1
  342. package/assets/esri/core/workers/chunks/7ae8f73c8e2afae98ecb.js +0 -1
  343. package/assets/esri/core/workers/chunks/7d4af7e2cb2f234e12eb.js +0 -1
  344. package/assets/esri/core/workers/chunks/7dba4121cdd20dbc4b20.js +0 -1
  345. package/assets/esri/core/workers/chunks/807b12ace0099300b9b9.js +0 -1
  346. package/assets/esri/core/workers/chunks/816a4b03f2ea49238a6c.js +0 -1
  347. package/assets/esri/core/workers/chunks/842b442cc012d0797333.js +0 -1
  348. package/assets/esri/core/workers/chunks/8903ff28896bd6f34b0d.js +0 -1
  349. package/assets/esri/core/workers/chunks/89e9bc8789b100316136.js +0 -1
  350. package/assets/esri/core/workers/chunks/8afe32d3db9669f972bc.js +0 -1
  351. package/assets/esri/core/workers/chunks/91fd28f50477d16e294e.js +0 -1
  352. package/assets/esri/core/workers/chunks/953f671bdeb2ca9b9f37.js +0 -1
  353. package/assets/esri/core/workers/chunks/98011b93acf3d5f0b5a2.js +0 -1
  354. package/assets/esri/core/workers/chunks/9c7fd5db0813bdc38582.js +0 -1
  355. package/assets/esri/core/workers/chunks/a2fee1611319665e6aed.js +0 -1
  356. package/assets/esri/core/workers/chunks/a644e30f65347ce846ed.js +0 -1
  357. package/assets/esri/core/workers/chunks/a64daa4945923a178fe5.js +0 -1
  358. package/assets/esri/core/workers/chunks/a84d67c1a1008bca2075.js +0 -1
  359. package/assets/esri/core/workers/chunks/a85575a8d1da09280cd7.js +0 -1
  360. package/assets/esri/core/workers/chunks/ac4f7309a249132c22da.js +0 -1
  361. package/assets/esri/core/workers/chunks/aeb1900cfdd0e51cc5f8.js +0 -1
  362. package/assets/esri/core/workers/chunks/ba62f3aa811430787863.js +0 -1
  363. package/assets/esri/core/workers/chunks/bb659dcd297b895830df.js +0 -1
  364. package/assets/esri/core/workers/chunks/c03d0091a6f385b9ce8d.js +0 -1
  365. package/assets/esri/core/workers/chunks/c20aaca8085ce897bd12.js +0 -1
  366. package/assets/esri/core/workers/chunks/c3e711dc608eedda2d14.js +0 -1
  367. package/assets/esri/core/workers/chunks/c48d1ee37c207bfb0aac.js +0 -1
  368. package/assets/esri/core/workers/chunks/c4a9006cc6d2938570e0.js +0 -1
  369. package/assets/esri/core/workers/chunks/c692ea68509bddbf7b42.js +0 -1
  370. package/assets/esri/core/workers/chunks/cb8c17daec7055bf99cc.js +0 -1
  371. package/assets/esri/core/workers/chunks/d7439d357f68160844cb.js +0 -1
  372. package/assets/esri/core/workers/chunks/df3e79b56c37156e7895.js +0 -1
  373. package/assets/esri/core/workers/chunks/df8b80b17e371c9be4e6.js +0 -1
  374. package/assets/esri/core/workers/chunks/e77198f8ab47441423c5.js +0 -1
  375. package/assets/esri/core/workers/chunks/e786da40a1c87bed64ca.js +0 -1
  376. package/assets/esri/core/workers/chunks/e8aafef6342c50340a27.js +0 -1
  377. package/assets/esri/core/workers/chunks/ec00348d74e29f48613a.js +0 -1
  378. package/assets/esri/core/workers/chunks/f4201e7dcae224d0caf0.js +0 -1
  379. package/assets/esri/core/workers/chunks/f7cc05fbfc97b4d36eba.js +0 -1
  380. package/assets/esri/core/workers/chunks/f9d369a4683f88ee9d76.js +0 -1
  381. package/assets/esri/core/workers/chunks/fc534c94d55331578195.js +0 -1
  382. package/assets/esri/themes/base/colors/css/brand_colors.css +0 -76
  383. package/assets/esri/themes/base/colors/css/calcite_core_colors.css +0 -169
  384. package/assets/esri/themes/base/colors/css/calcite_core_colors_dark.css +0 -169
  385. package/assets/esri/themes/base/colors/css/calcite_gray_colors.css +0 -43
  386. package/assets/esri/themes/base/colors/css/calcite_gray_colors_dark.css +0 -43
  387. package/assets/esri/themes/base/colors/css/calcite_highlight_colors.css +0 -43
  388. package/assets/esri/themes/base/colors/css/calcite_highlight_colors_dark.css +0 -43
  389. package/assets/esri/themes/base/colors/css/calcite_vibrant_colors.css +0 -67
  390. package/assets/esri/themes/base/colors/css/calcite_vibrant_colors_dark.css +0 -67
  391. package/assets/esri/themes/base/colors/css/complete.css +0 -610
  392. package/assets/esri/themes/base/colors/css/scss/brand_colors.scss +0 -128
  393. package/assets/esri/themes/base/colors/css/scss/calcite_core_colors.scss +0 -289
  394. package/assets/esri/themes/base/colors/css/scss/calcite_core_colors_dark.scss +0 -285
  395. package/assets/esri/themes/base/colors/css/scss/calcite_gray_colors.scss +0 -96
  396. package/assets/esri/themes/base/colors/css/scss/calcite_gray_colors_dark.scss +0 -91
  397. package/assets/esri/themes/base/colors/css/scss/calcite_highlight_colors.scss +0 -69
  398. package/assets/esri/themes/base/colors/css/scss/calcite_highlight_colors_dark.scss +0 -65
  399. package/assets/esri/themes/base/colors/css/scss/calcite_vibrant_colors.scss +0 -128
  400. package/assets/esri/themes/base/colors/css/scss/calcite_vibrant_colors_dark.scss +0 -124
  401. package/assets/esri/themes/base/colors/css/scss/complete.scss +0 -11
  402. package/assets/esri/themes/base/colors/patterns_json/brand_colors.css +0 -366
  403. package/assets/esri/themes/base/colors/patterns_json/calcite_core_colors.css +0 -687
  404. package/assets/esri/themes/base/colors/patterns_json/calcite_core_colors_dark.css +0 -673
  405. package/assets/esri/themes/base/colors/patterns_json/calcite_gray_colors.css +0 -177
  406. package/assets/esri/themes/base/colors/patterns_json/calcite_gray_colors_dark.css +0 -169
  407. package/assets/esri/themes/base/colors/patterns_json/calcite_highlight_colors.css +0 -178
  408. package/assets/esri/themes/base/colors/patterns_json/calcite_highlight_colors_dark.css +0 -169
  409. package/assets/esri/themes/base/colors/patterns_json/calcite_vibrant_colors.css +0 -273
  410. package/assets/esri/themes/base/colors/patterns_json/calcite_vibrant_colors_dark.css +0 -265
  411. package/assets/esri/themes/base/colors/patterns_json/complete.css +0 -2847
  412. package/assets/esri/themes/base/colors/patterns_json/scss/brand_colors.scss +0 -464
  413. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_core_colors.scss +0 -967
  414. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_core_colors_dark.scss +0 -964
  415. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_gray_colors.scss +0 -265
  416. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_gray_colors_dark.scss +0 -263
  417. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_highlight_colors.scss +0 -237
  418. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_highlight_colors_dark.scss +0 -235
  419. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_vibrant_colors.scss +0 -376
  420. package/assets/esri/themes/base/colors/patterns_json/scss/calcite_vibrant_colors_dark.scss +0 -347
  421. package/assets/esri/themes/base/colors/patterns_json/scss/complete.scss +0 -12
  422. package/assets/esri/themes/base/icons/readme/download.png +0 -0
  423. package/assets/esri/themes/base/icons/readme/import-icons.png +0 -0
  424. package/assets/esri/themes/base/icons/readme/import.png +0 -0
  425. package/assets/esri/themes/base/icons/readme/load.png +0 -0
  426. package/assets/esri/themes/base/icons/selection.json +0 -1
  427. package/assets/esri/themes/base/icons/style.css +0 -774
  428. package/views/2d/engine/brushes.js +0 -2
  429. package/views/2d/engine/flow/BrushFlow.js +0 -2
  430. package/views/2d/engine/rasterBrushes.js +0 -2
  431. package/views/2d/engine/webgl/brushes/BrushClip.js +0 -2
  432. package/views/2d/engine/webgl/brushes/WGLBrush.js +0 -2
  433. package/views/2d/engine/webgl/painter/RenderPass.js +0 -2
  434. package/views/2d/engine/webgl/shaders/BackgroundPrograms.js +0 -2
  435. package/views/2d/engine/webgl/shaders/TileInfoPrograms.js +0 -2
  436. package/views/3d/webgl-engine/lib/GLMaterials.js +0 -2
  437. /package/assets/esri/core/workers/chunks/{386435341e949f5573b4.js.LICENSE.txt → 0fc60b4c44c4e865b699.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9235],{34930(t,e,s){s.d(e,{$Q:()=>a,Sd:()=>u,b7:()=>l});var n=s(86211),r=s(5443),o=s(86738),i=s(14140);async function a(t,e,n){if("extent"===n.type)return function(t,e,s){const{width:n,height:r}=t,o=new Uint8Array(n*r),a=e.width/n,u=e.height/r;if(s.width/a<.5||s.height/u<.5)return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,pixels:[...t.pixels]});const{xmin:l,xmax:c,ymin:p,ymax:h}=e,{xmin:m,xmax:d,ymin:g,ymax:f}=s,y=Math.max(l,m),x=Math.min(c,d),w=Math.max(p,g),A=Math.min(h,f),v=.5*a,C=.5*u;if(x-y<v||A-w<C||x<l+v||y>c-v||w>h-C||A<p+C)return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,pixels:[...t.pixels]});const b=Math.max(0,(y-l)/a),M=Math.min(n,Math.max(0,(x-l)/a)),T=Math.max(0,(h-A)/u),P=Math.min(r,Math.max(0,(h-w)/u)),N=Math.round(b),I=Math.round(M)-1,R=Math.round(T),F=Math.round(P)-1;if(N===I&&b%1>.5&&M%1<.5||R===F&&T%1>.5&&P%1<.5)return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,pixels:[...t.pixels]});if(0===N&&0===R&&I===n&&F===r)return t;const k=t.mask;for(let t=R;t<=F;t++)for(let e=N;e<=I;e++){const s=t*n+e;o[s]=k?k[s]:255}return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,pixels:[...t.pixels]})}(t,e,n);const{width:r,height:o}=t,a=new Uint8Array(r*o);return(await Promise.all([s.e(3661),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(1132)]).then(s.bind(s,25275))).execute(e,n)?"polyline"===n.type?function(t,e,s){const{width:n,height:r}=t,o=new Uint8Array(n*r),a=e.width/n,u=e.height/r,{xmin:l,ymax:c}=e,{paths:p}=s,h=t.mask;for(let t=0;t<p.length;t++){const e=p[t];for(let t=0;t<e.length-1;t++){const[s,i]=e[t],[p,m]=e[t+1],d=Math.min(i,m),g=Math.max(i,m),f=Math.max(0,Math.floor((c-g)/u)),y=Math.min(r-1,Math.floor((c-d)/u));if(!(y<f))if(f===y){const t=Math.min(s,p),e=Math.max(s,p),r=Math.max(0,Math.floor((t-l)/a)),i=Math.min(n-1,Math.floor((e-l)/a));if(i<r)continue;const u=f*n;for(let t=u+r;t<=u+i;t++)o[t]=h?h[t]:255}else{const t=(s-l)/a,e=(p-s)/(m-i)/a,r=u*e;for(let s=f;s<=y;s++){const a=e*(c-s*u-i)+t,l=Math.max(0,Math.floor(r>0?a-r:a)),p=Math.min(n-1,Math.floor(r>0?a:a-r));if(p<l)continue;const m=s*n;for(let t=m+l;t<=m+p;t++)o[t]=h?h[t]:255}}}}return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,pixels:[...t.pixels]})}(t,e,n):(await Promise.all([s.e(3661),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(6671)]).then(s.bind(s,30912))).execute(n,e)?t:function(t,e,s){if(!t)return t;const{width:n,height:r}=t,o=function(t){const{geometry:e,size:s,srcExtent:n,srcMask:r}=t,[o,i]=s;let a;const u=n.width/o,l=n.height/i,{xmin:c,ymax:p}=n;if("extent"===e.type){const t=(e.xmin-c)/u,s=(e.xmax-c)/u,n=(p-e.ymax)/l,r=(p-e.ymin)/l;a=[[[t,n],[t,r],[s,r],[s,n],[t,n]]]}else a=e.rings.map(t=>t.map(([t,e])=>[(t-c)/u,(p-e)/l]));return function(t,e,s){const[n,r]=e,o=new OffscreenCanvas(n,r).getContext("2d");o.fillStyle="#f00",o.beginPath(),t.forEach(t=>{o.moveTo(t[0][0],t[0][1]);for(let e=0;e<t.length;e++)o.lineTo(t[e][0],t[e][1]);o.closePath()}),o.fill();const i=o.getImageData(0,0,n,r).data,a=n*r,u=new Uint8Array(a);let l=!1;for(let t=0;t<a;t++)s&&!s[t]||(i[4*t+3]>127?u[t]=255:l=!0);return l||s?u:void 0}(a,s,r)}({geometry:s,size:[n,r],srcExtent:e,srcMask:t.mask});return new i.A({pixelType:t.pixelType,width:n,height:r,mask:o,maskIsAlpha:!1,pixels:[...t.pixels]})}(t,e,n):new i.A({pixelType:t.pixelType,width:r,height:o,mask:a,maskIsAlpha:!1,pixels:[...t.pixels]})}function u(t,e){const{extent:s}=l(t,e,new o.A({x:t.pixelSize.x,y:t.pixelSize.y,spatialReference:t.spatialReference})),{extent:n}=t.extent;if(s.xmax=Math.min(s.xmax,n.xmax),s.ymax=Math.min(s.ymax,n.ymax),s.xmin<s.xmax&&s.ymin<s.ymax){const{x:e,y:n}=t.pixelSize,r=Math.round(s.width/e),o=Math.round(s.height/n);t.extent=s,t.width=r,t.height=o}}function l(t,e,s,o=!0){const{spatialReference:i}=t,{x:a,y:u}=function(t,e){if(t.spatialReference.equals(e))return t;const s=(0,n.GA)(t.spatialReference),r=(0,n.GA)(e);if(s===r)return t;const o=s/r;return{x:t.x*o,y:t.y*o}}(s,i);let l,c,p;const h="extent"===e.type?e:e.extent;let{xmin:m,xmax:d,ymax:g,ymin:f}=h;const{xmin:y,ymax:x}=t.extent;return o?(m=y+(m>y?a*Math.round((m-y)/a):0),g=x-(g<x?u*Math.round((x-g)/u):0),d=y+(d>y?a*Math.round((d-y)/a):0),f=x-(f<x?u*Math.round((x-f)/u):0),l=new r.A({xmin:m,ymax:g,xmax:d,ymin:f,spatialReference:i}),c=Math.round(l.width/a),p=Math.round(l.height/u)):(c=Math.floor((d-m)/a+.8),p=Math.floor((g-f)/u+.8),m=y+(m>y?a*Math.floor((m-y)/a+.1):0),g=x-(g<x?u*Math.floor((x-g)/u+.1):0),d=m+c*a,f=g-p*u,l=new r.A({xmin:m,ymax:g,xmax:d,ymin:f,spatialReference:i})),{extent:l,width:c,height:p}}},99235(t,e,s){s.d(e,{vt:()=>Un,UD:()=>Vn});var n=s(85334),r=s(49186),o=s(4718),i=s(5482),a=s(91429),u=s(94778),l=s(25482);let c=class extends l.o{constructor(){super(...arguments),this.raster=void 0}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],c.prototype,"raster",void 0),c=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseFunctionArguments")],c);const p=c;var h;let m=h=class extends p{constructor(){super(...arguments),this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new h({raster:this.raster,raster2:this.raster2,operation:this.operation})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"operation",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"raster2",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"rasters",null),m=h=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunctionArguments")],m);const d=m;var g=s(14140),f=s(87186);const y=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let x=class extends l.o{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.rawSourceRasterInfos=null,this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this.isRoot=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const e=[t],{parameters:s}=t;let n=s.rasters||s.raster&&[s.raster];for(;n?.length;){e.unshift(...n);const t=[];for(let e=0;e<n.length;e++){const{parameters:s}=n[e],r=s.rasters||s.raster&&[s.raster];r?.length&&t.push(...r)}n=t}for(let t=e.length-1;t>=0;t--)e[t].isNoopProcess&&e.splice(t,1);let r=!1;for(let t=0;t<e.length;t++){const s=e[t];s.id=e.length-t-1;const{rasters:n}=s.parameters;r=r||null!=n&&n.length>1}const o=e.some(({name:t})=>y.has(t.toLowerCase())),{rawSourceRasterInfos:i}=this;return{functions:e,hasBranches:r,hasFocalFunction:o,isSourceSingleBand:1===i?.[0]?.bandCount}}bind(t,e=!1,s=-1){this.id=s+1;const n=this._getRasterValues();let r=!0;for(let s=0;s<n.length;s++){const o=n[s];if(null!=o&&this._isRasterFunctionValue(o)){const n=o.bind(t,e,this.id+s);if(!n.success)return this._bindingResult=n,n;r=r&&n.supportsGPU}}return!this.rasterInfo||e?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),r&&=this._bindingResult.supportsGPU,this._bindingResult.success&&(this._patchRasterInfo(),r&&this.isRoot)&&(this.processInputBandIds(),this.swizzleInputBandIds(this.rawInputBandIds)||(r=this.rawInputBandIds.length<=3)),this._bindingResult.supportsGPU=r,this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this._bindingResult)}queryRasterFunction(t){const e=[this];for(;e.length;){const s=e.pop();if(t(s))return s;const n=s.getImmediateChildFunctions();e.push(...n)}}getImmediateChildFunctions(){return this._getRasterValues().filter(t=>t&&"object"==typeof t&&"bind"in t)}process(t,e){const s=this._getRasterValues(),n=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map(s=>this._readRasterValue(s,t,e));return this._processPixels({...t,pixelBlocks:n},e)}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);if(t.length>1){const e=t.map(t=>t.processInputBandIds());return this.rawInputBandIds=[...new Set(e.flat())],this.rawInputBandIds}const e=t[0];if(e)return this.rawInputBandIds=e.processInputBandIds(),this.rawInputBandIds;const{bandCount:s}=this.sourceRasterInfos[0],n=Array.from({length:s},(t,e)=>e);return this.rawInputBandIds=this._getInputBandIds(n),this.rawInputBandIds}swizzleInputBandIds(t){const e=this._getRasterValues().filter(this._isRasterFunctionValue);let s=!0;for(const n of e)s=n.swizzleInputBandIds(t)&&s;return!!s&&this._swizzleBandIds(t)}getPrimaryRasters(){const t=[],e=[];return this._getPrimaryRasters(this,t,e),{rasters:t,rasterIds:e}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:e,rasters:s}=this.functionArguments;return s&&Array.isArray(s)&&s.length?(t.rasters=s.map(t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}),t.rasters.some(t=>null!=t)||(t.rasters=null)):this._isRasterFunctionValue(e)&&(t.raster=e.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getClippingGeometries(){const t=[];"Clip"===this.functionName&&t.push(this.functionArguments);const{raster:e,rasters:s}=this.functionArguments;if(s&&Array.isArray(s)&&s.length)s.forEach(e=>{if(this._isRasterFunctionValue(e)){const s=e.getClippingGeometries();t.push(...s)}});else if(this._isRasterFunctionValue(e)){const s=e.getClippingGeometries();t.push(...s)}return t}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_swizzleBandIds(t){return!0}_isInputRasterPrimaryOrConstant(){return!this._getRasterValues().some(t=>t&&"object"==typeof t&&"rasterFunction"in t&&t.rasterFunction)}_removeStatsHistColormapVAT(t){t.statistics=null,t.histograms=null,t.colormap=null,t.attributeTable=null,t.multidimensionalInfo?.variables.forEach(t=>{t.statistics=void 0,t.histograms=void 0})}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.flatMap(t=>this.functionArguments[t])}_getSourceRasterInfos(t){const e=this._getRasterValues(),{rasterInfos:s,rasterIds:n}=t;if(0===e.length)return s;const r=e.map(t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&n.includes(t)?s[n.indexOf(t)]:"number"!=typeof t?s[0]:void 0),o=r.find(t=>t)??s[0];return r.forEach((t,e)=>{void 0===t&&(r[e]=o)}),r}_getPrimaryRasterId(t){return t?.rasterId}_getPrimaryRasters(t,e=[],s=[]){for(let n=0;n<t.sourceRasters.length;n++){const r=t.sourceRasters[n];if("number"!=typeof r)if("bind"in r)this._getPrimaryRasters(r,e,s);else{const t=r,n=this._getPrimaryRasterId(t);if(null==n)continue;s.includes(n)||(this.mainPrimaryRasterId===n?(e.unshift(t),s.unshift(n)):(e.push(t),s.push(n)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,e,s){const{primaryPixelBlocks:n}=e;if(null==t||"$$"===t){const t=n[0];return null==t?null:t.clone()}if("string"==typeof t){const s=e.primaryRasterIds.indexOf(t);return-1===s?null:n[s]}if("number"==typeof t){const e=n[0];if(null==e)return null;const{width:s,height:r,pixelType:o}=e,i=new Float32Array(s*r);i.fill(t);const a=this.sourceRasterInfos[0].bandCount,u=new Array(a).fill(i);return new g.A({width:s,height:r,pixelType:o,pixels:u})}return t.process(e,s)}_patchRasterInfo(){const{rasterInfo:t}=this;if(!t?.keyProperties)return;const{bandCount:e,keyProperties:s,statistics:n,histograms:r}=t,o=s.BandProperties;o&&o.length!==e&&(t.keyProperties={...s,BandProperties:void 0}),n&&n.length!==e&&(t.statistics=n.length>e?n.slice(0,e):null),r&&r.length!==e&&(t.histograms=r.length>e?r.slice(0,e):null),s.BAND_COUNT&&Number(s.BAND_COUNT)!==e&&(t.keyProperties={...s,BAND_COUNT:"string"==typeof s.BAND_COUNT?String(e):e})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}}),(0,a.wg)(t=>t?.toLowerCase())],x.prototype,"outputPixelType",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"mainPrimaryRasterId",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"sourceRasters",void 0),(0,i.Cg)([(0,a.MZ)({type:[f.A],json:{write:!0}})],x.prototype,"sourceRasterInfos",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"rasterInfo",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"readingBufferSize",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"isNoopProcess",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"supportsGPU",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"rawInputBandIds",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"rawSourceRasterInfos",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"isInputBandIdsSwizzled",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"swizzledBandSelection",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"isBranch",void 0),(0,i.Cg)([(0,a.MZ)()],x.prototype,"isRoot",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"flatWebGLFunctionChain",null),(0,i.Cg)([(0,a.MZ)()],x.prototype,"_bindingResult",void 0),x=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseRasterFunction")],x);const w=x,A={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},v={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},C={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},b={setNull:50,conditional:78},M={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65,...v,...C,majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75,...b},T=new Map([[C.acos,{domain:[0,Math.PI],isInteger:!1}],[C.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[C.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[C.cos,{domain:[-1,1],isInteger:!1}],[C.sin,{domain:[-1,1],isInteger:!1}],[v.booleanAnd,{domain:[0,1],isInteger:!0}],[v.booleanNot,{domain:[0,1],isInteger:!0}],[v.booleanOr,{domain:[0,1],isInteger:!0}],[v.booleanXOr,{domain:[0,1],isInteger:!0}],[v.equalTo,{domain:[0,1],isInteger:!0}],[v.notEqual,{domain:[0,1],isInteger:!0}],[v.greaterThan,{domain:[0,1],isInteger:!0}],[v.greaterThanEqual,{domain:[0,1],isInteger:!0}],[v.lessThan,{domain:[0,1],isInteger:!0}],[v.lessThanEqual,{domain:[0,1],isInteger:!0}],[v.isNull,{domain:[0,1],isInteger:!0}]]);function P(t){return T.get(t)}const N=[0,2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,2,1,1,1,999,999,1,1,999,1,1,2,999,999,2,2,999,999,999,999,999,999,999,999,999,999,3,999,3];function I(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]+r[t]);return i}function R(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand("f32",r);return o.set(n),o}function F(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=n[t]*n[t]);return o}function k(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]-r[t]);return i}function _(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]*r[t]);return i}function S(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=Math.sign(n[t])*Math.floor(Math.abs(n[t])));return o}function B(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]/r[t]);return i}function j(t,e,s){return B(t,e,"f32")}function Z(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=Math.floor(n[t]/r[t]));return i}function z(t,e,s,n){const r=t[0],o=r.length,i=g.A.createEmptyBand(s,o);if(n===C.atanh){for(let t=0;t<o;t++)if(e[t]){const s=r[t];Math.abs(s)>=1?e[t]=0:i[t]=Math.atanh(s)}return i}const a=n===C.asin?Math.asin:Math.acos;for(let t=0;t<o;t++)if(e[t]){const s=r[t];Math.abs(s)>1?e[t]=0:i[t]=a(s)}return i}function G(t,e,s,n){const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n(r[t]));return i}function O(t,e,s,n){const[r,o]=t,i=r.length,a=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=n(r[t],o[t]));return a}function D(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]&r[t]);return i}function E(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]<<r[t]);return i}function V(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=~n[t]);return o}function U(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]|r[t]);return i}function L(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]>>r[t]);return i}function $(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]^r[t]);return i}function K(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]&&r[t]?1:0);return i}function W(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=n[t]?0:1);return o}function H(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]||r[t]?1:0);return i}function q(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=(n[t]?1:0)^(r[t]?1:0));return i}function J(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]===r[t]?1:0);return i}function X(t,e,s,n){const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o),a=n===Math.E;for(let t=0;t<o;t++)e&&!e[t]||(i[t]=a?Math.exp(r[t]):n**r[t]);return i}function Q(t,e,s){return X(t,e,s,10)}function Y(t,e,s){return X(t,e,s,2)}function tt(t,e,s){return X(t,e,s,Math.E)}function et(t,e,s,n){const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(r[t]<=0?e[t]=0:i[t]=n(r[t]));return i}function st(t,e,s){return et(t,e,s,Math.log10)}function nt(t,e,s){return et(t,e,s,Math.log2)}function rt(t,e,s){return et(t,e,s,Math.log)}function ot(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]>r[t]?1:0);return i}function it(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]>=r[t]?1:0);return i}function at(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]<r[t]?1:0);return i}function ut(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]<=r[t]?1:0);return i}function lt(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);if(!e)return o;for(let t=0;t<r;t++)o[t]=e[t]?0:1;return o}function ct(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]%r[t]);return i}function pt(t,e,s){const[n]=t,r=n.length,o=g.A.createEmptyBand(s,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=-n[t]);return o}function ht(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]===r[t]?0:1);return i}function mt(t,e,s){const[n,r]=t,o=n.length,i=g.A.createEmptyBand(s,o),a=new Uint8Array(o);for(let t=0;t<o;t++)null!=e&&!e[t]||0!==n[t]||(i[t]=r[t],a[t]=255);return{band:i,mask:a}}function dt(t,e,s){const[n,r,o]=t,i=n.length,a=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=n[t]?r[t]:o[t]);return a}function gt(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s]){let e=r[s];for(let r=1;r<n;r++){const n=t[r][s];e<n&&(e=n)}i[s]=e}return i}function ft(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s]){let e=r[s];for(let r=1;r<n;r++){const n=t[r][s];e>n&&(e=n)}i[s]=e}return i}function yt(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s]){let e=r[s],o=e;for(let r=1;r<n;r++){const n=t[r][s];o<n?o=n:e>n&&(e=n)}i[s]=o-e}return i}function xt(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s]){let e=0;for(let r=0;r<n;r++)e+=t[r][s];i[s]=e/n}return i}function wt(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s])for(let e=0;e<n;e++){const n=t[e];i[s]+=n[s]}return i}function At(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o);for(let s=0;s<o;s++)if(!e||e[s]){const e=new Float32Array(n);let r=0;for(let o=0;o<n;o++){const n=t[o];r+=n[s],e[o]=n[s]}r/=n;let o=0;for(let t=0;t<n;t++)o+=(e[t]-r)**2;i[s]=Math.sqrt(o/n)}return i}function vt(t,e,s){const n=t.length;if(n<2)return t[0];const r=Math.floor(n/2),[o]=t,i=o.length,a=g.A.createEmptyBand(s,i),u=new Float32Array(n),l=n%2==1;for(let s=0;s<i;s++)if(!e||e[s]){for(let e=0;e<n;e++)u[e]=t[e][s];u.sort(),a[s]=l?u[r]:(u[r]+u[r-1])/2}return a}function Ct(t,e,s){const[n,r]=t;if(null==r)return n;const o=n.length,i=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=n[t]<r[t]?n[t]:r[t]);return i}function bt(t,e,s){const n=t.length;if(n<=2)return Ct(t,e,s);const r=t[0].length,o=g.A.createEmptyBand(s,r),i=new Map;for(let s=0;s<r;s++)if(!e||e[s]){i.clear();for(let e=0;e<n;e++){const n=t[e][s];i.set(n,i.has(n)?i.get(n)+1:1)}let e=0,r=0;const a=[];for(const t of i.keys())e=i.get(t),e>r?(r=e,a.length=0,a.push(t)):e===r&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),o[s]=a[0]}return o}function Mt(t,e,s){const n=t.length;if(n<=2)return Ct(t,e,s);const r=t[0].length,o=g.A.createEmptyBand(s,r),i=new Map;for(let s=0;s<r;s++)if(!e||e[s]){i.clear();for(let e=0;e<n;e++){const n=t[e][s];i.set(n,i.has(n)?i.get(n)+1:1)}let e=0,r=t.length;const a=[];for(const t of i.keys())e=i.get(t),e<r?(r=e,a.length=0,a.push(t)):e===r&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),o[s]=a[0]}return o}function Tt(t,e,s){const n=t.length;if(n<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(s,o),a=new Set;for(let s=0;s<o;s++)if(!e||e[s]){let e;a.clear();for(let r=0;r<n;r++)e=t[r][s],a.add(e);i[s]=a.size}return i}const Pt=new Map,Nt=new Map,It=new Map,Rt=new Map;function Ft(){Pt.size||(Pt.set(4,Math.sqrt),Pt.set(6,Math.acos),Pt.set(7,Math.asin),Pt.set(8,Math.atan),Pt.set(9,Math.atanh),Pt.set(10,Math.abs),Pt.set(21,Math.cos),Pt.set(22,Math.cosh),Pt.set(48,Math.floor),Pt.set(49,Math.ceil),Pt.set(51,Math.sin),Pt.set(52,Math.sinh),Pt.set(56,Math.tan),Pt.set(57,Math.tanh),Pt.set(59,Math.acosh),Pt.set(60,Math.asinh),Pt.set(65,Math.floor),Nt.set(5,Math.pow),Nt.set(61,Math.atan2),It.set(1,I),It.set(2,k),It.set(3,_),It.set(11,D),It.set(12,E),It.set(13,V),It.set(14,U),It.set(15,L),It.set(16,$),It.set(17,K),It.set(18,W),It.set(19,H),It.set(20,q),It.set(23,B),It.set(24,J),It.set(25,tt),It.set(26,Q),It.set(27,Y),It.set(28,ot),It.set(29,it),It.set(30,S),It.set(31,lt),It.set(32,R),It.set(33,at),It.set(34,ut),It.set(35,rt),It.set(36,st),It.set(37,nt),It.set(44,ct),It.set(45,pt),It.set(46,ht),It.set(53,F),It.set(64,j),It.set(65,Z),It.set(76,dt),It.set(78,dt),Rt.set(38,bt),Rt.set(39,gt),Rt.set(40,xt),Rt.set(41,vt),Rt.set(42,ft),Rt.set(43,Mt),Rt.set(47,yt),Rt.set(54,At),Rt.set(55,wt),Rt.set(58,Tt),Rt.set(66,bt),Rt.set(67,gt),Rt.set(68,xt),Rt.set(69,vt),Rt.set(70,ft),Rt.set(71,Mt),Rt.set(72,yt),Rt.set(73,At),Rt.set(74,wt),Rt.set(75,Tt))}function kt(t,e,s={}){Ft();let n=function(t,e=!1){const s=t.map(t=>t.mask),n=s.filter(t=>null!=t),r=t[0].pixels[0].length;if(0===n.length||e&&n.length!==s.length)return new Uint8Array(r).fill(255);const o=n[0],i=new Uint8Array(o);if(1===n.length)return i;if(!e){for(let t=1;t<n.length;t++){const e=n[t];for(let t=0;t<i.length;t++)i[t]&&(i[t]=e[t]?255:0)}return i}for(let t=1;t<n.length;t++){const e=n[t];for(let t=0;t<i.length;t++)0===i[t]&&(i[t]=e[t]?255:0)}return i}(t,e>=66&&e<=75);const{outputPixelType:r="f32"}=s,o=!Rt.has(e)||s.processAsMultiband,i=o?t[0].pixels.length:1,a=[];for(let s=0;s<i;s++){const i=Rt.has(e)&&!o?t.flatMap(t=>t.pixels):t.map(t=>t.pixels[s]);let l,c=!0;if(e===b.setNull){const t=mt(i,n,r);l=t.band,n=t.mask,c=!1}else It.has(e)?l=It.get(e)(i,n,"f64"):Pt.has(e)?l=e===C.asin||e===C.acos||e===C.atanh?z(i,n,"f64",e):G(i,n,"f64",Pt.get(e)):Nt.has(e)?l=O(i,n,"f64",Nt.get(e)):Rt.has(e)?l=Rt.get(e)(i,n,"f64"):(l=i[0],c=!1);if(c&&e!==v.isNull&&!T.has(e)){const t=g.A.createEmptyBand(r,l.length);n||(n=new Uint8Array(l.length).fill(255)),(0,u.$p)(l,n),(0,u.yM)(l,n,r,t),l=t}a.push(l)}const l=t[0];return new g.A({width:l.width,height:l.height,pixelType:r,mask:e===v.isNull?null:n,pixels:a})}let _t=class extends w{constructor(){super(...arguments),this.functionName="Arithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){const{operation:t}=this.functionArguments;if(t<1||t>6)return{success:!1,supportsGPU:!1,error:"unsupported operation"};const e=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:e.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;return null==e?.[0]||null==e?.[1]?null:function(t,e,s){return kt(t,e=[null,1,2,3,23,5,44][e]??1,{outputPixelType:s})}(e,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=["","plus","minus","times","divide","power","mod"][t],s=this.outputPixelType??"f32";let[n,r]=(0,u.hP)(s);const o=(0,u.zw)(s);return o&&(n-=1e-4,r+=1e-4),{imageCount:2,operationName:e,domainRange:[n,r],isOutputRounded:o}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],_t.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:d,json:{write:!0,name:"rasterFunctionArguments"}})],_t.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],_t.prototype,"rasterArgumentNames",void 0),_t=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunction")],_t);const St=_t;var Bt;let jt=Bt=class extends p{clone(){return new Bt({raster:this.raster})}};jt=Bt=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunctionArguments")],jt);const Zt=jt;var zt=s(51181);let Gt=class extends w{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.isGCS=t.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");const e=t.clone();return e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),e.statistics=[{min:-1,max:360,avg:180,stddev:30}],e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{extent:s,primaryPixelSizes:n}=t,r=n?.[0],o=r??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1});return(0,zt.di)(e,{resolution:o})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Gt.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Zt,json:{write:!0,name:"rasterFunctionArguments"}})],Gt.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Gt.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gt.prototype,"isGCS",void 0),Gt=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunction")],Gt);const Ot=Gt;var Dt=s(66552);const Et=new Set(["+","-","*","/","(",")"]);function Vt(t,e){return t.toLowerCase().startsWith("b")?e[parseInt(t.slice(1),10)-1]:parseFloat(t)}function Ut(t,e,s,n){if("number"==typeof s&&"number"==typeof n)return s+n;let r,o,i;"number"==typeof s?(i=n,r=i.length,o=new Float32Array(r),o.fill(s)):(r=s.length,o=s,n.constructor===Number?(i=new Float32Array(r),i.fill(n)):i=n);const a=new Float32Array(r);switch(e){case"+":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]+i[e]);break;case"-":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]-i[e]);break;case"*":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]*i[e]);break;case"/":for(let e=0;e<r;e++)(null==t||t[e])&&i[e]&&(a[e]=o[e]/i[e]);break;case"(":case")":throw new Error("encountered error with custom band index equation")}return a}function Lt(t,e){t.splice(e,1);let s=0,n=0;do{s=0,n=0;for(let e=0;e<t.length;e++)if("("===t[e])s=e;else if(")"===t[e]){n=e;break}n===s+1&&t.splice(s,2)}while(n===s+1);return t}function $t(t){if(1===t.length)return{opIndex:0,numIndex:0};let e=0,s=0;for(let n=0;n<t.length;n++)if("("===t[n])e=n;else if(")"===t[n]){s=n;break}const n=0===s?t:t.slice(e+1,s);let r=-1;for(let t=0;t<n.length;t++)if("*"===n[t]||"/"===n[t]){r=t;break}if(r>-1)s>0&&(r+=e+1);else{for(let t=0;t<n.length;t++)if("+"===n[t]||"-"===n[t]){r=t;break}s>0&&(r+=e+1)}let o=0;for(let e=0;e<r;e++)"("===t[e]&&o++;return{opIndex:r,numIndex:r-o}}var Kt=s(47520);const Wt=new Dt.J({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function Ht(t,e){if(!(0,Kt.AB)(t))return t;const{equation:s,method:n}=e,r=e.bandIndexes.map(t=>t-1),{pixels:o,mask:i}=t;let a;switch(n){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":a=Jt(i,o[r[0]],o[r[1]]);break;case"ndwi":a=Jt(i,o[r[1]],o[r[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":a=function(t,e,s){const n=s.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){const t=e[o],n=s[o];n&&(r[o]=t/n)}return[r]}(i,o[r[0]],o[r[1]]);break;case"ci-g":case"ci-re":a=function(t,e,s){const n=e.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){const t=e[o],n=s[o];n&&(r[o]=t/n-1)}return[r]}(i,o[r[0]],o[r[1]]);break;case"savi":a=function(t,e,s,n){const r=s.length,o=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){const t=s[i],r=e[i],a=r+t+n;a&&(o[i]=(r-t)/a*(1+n))}return[o]}(i,o[r[0]],o[r[1]],r[2]+1);break;case"tsavi":a=function(t,e,s,n,r,o){const i=s.length,a=new Float32Array(i),u=-r*n+o*(1+n*n);for(let o=0;o<i;o++)if(null==t||t[o]){const t=s[o],i=e[o],l=r*i+t+u;l&&(a[o]=n*(i-n*t-r)/l)}return[a]}(i,o[r[0]],o[r[1]],r[2]+1,r[3]+1,r[4]+1);break;case"msavi":a=function(t,e,s){const n=s.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){const t=s[o],n=e[o],i=2*n+1;r[o]=.5*(i-Math.sqrt(i*i-8*(n-t)))}return[r]}(i,o[r[0]],o[r[1]]);break;case"gemi":a=function(t,e,s){const n=s.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){const t=s[o],n=e[o];if(1!==t&&n+t+.5!==0){const e=(2*(n*n-t*t)+1.5*n+.5*t)/(n+t+.5);r[o]=e*(1-.25*e)-(t-.125)/(1-t)}}return[r]}(i,o[r[0]],o[r[1]]);break;case"pvi":a=function(t,e,s,n,r){const o=s.length,i=new Float32Array(o),a=1/Math.sqrt(1+n*n);for(let u=0;u<o;u++)if(null==t||t[u]){const t=s[u],o=e[u];i[u]=(o-n*t-r)*a}return[i]}(i,o[r[0]],o[r[1]],r[2]+1,r[3]+1);break;case"gvitm":a=function(t,e){const[s,n,r,o,i,a]=e,u=s.length,l=new Float32Array(u);for(let e=0;e<u;e++)(null==t||t[e])&&(l[e]=-.2848*s[e]-.2435*n[e]-.5436*r[e]+.7243*o[e]+.084*i[e]-.18*a[e]);return[l]}(i,[o[r[0]],o[r[1]],o[r[2]],o[r[3]],o[r[4]],o[r[5]]]);break;case"sultan":a=function(t,e){const[s,n,r,o,i]=e,a=s.length,u=new Float32Array(a),l=new Float32Array(a),c=new Float32Array(a);for(let e=0;e<a;e++)(null==t||t[e])&&(u[e]=i[e]?o[e]/i[e]*100:0,l[e]=s[e]?o[e]/s[e]*100:0,c[e]=r[e]?n[e]/r[e]*(o[e]/r[e])*100:0);return[u,l,c]}(i,[o[r[0]],o[r[1]],o[r[2]],o[r[3]],o[r[4]]]);break;case"vari":a=function(t,e){const[s,n,r]=e,o=s.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=s[e],o=n[e],a=o+t-r[e];a&&(i[e]=(o-t)/a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"mtvi2":a=function(t,e){const[s,n,r]=e,o=s.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=s[e],o=n[e],a=r[e],u=Math.sqrt((2*t+1)**2-(6*t-5*Math.sqrt(o))-.5);if(u){const s=1.5*(1.2*(t-a)-2.5*(o-a));i[e]=s/u}}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"rtvi-core":a=function(t,e){const[s,n,r]=e,o=s.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=s[e],o=n[e],a=r[e];i[e]=100*(t-o)-10*(t-a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"evi":a=function(t,e){const[s,n,r]=e,o=s.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=s[e],o=n[e],a=t+6*o-7.5*r[e]+1;a&&(i[e]=2.5*(t-o)/a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"wndwi":a=function(t,e,s=.5){const[n,r,o]=e,i=r.length,a=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){const t=n[e],i=r[e],u=o[e],l=t+s*i+(1-s)*u;l&&(a[e]=(t-s*i-(1-s)*u)/l)}return[a]}(i,[o[r[0]],o[r[1]],o[r[2]]],r[3]?r[3]+1:.5);break;case"bai":a=function(t,e,s){const n=s.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o])for(o=0;o<n;o++){const t=(.1-e[o])**2+(.06-s[o])**2;t&&(r[o]=1/t)}return[r]}(i,o[r[0]],o[r[1]]);break;case"custom":a=function(t,e,s){let n,{ops:r,nums:o}=function(t,e){(t=t.replaceAll(" ","")).startsWith("-")&&(t="0"+t),t.startsWith("+")&&(t=t.slice(1));const s=t.split(""),n=[],r=[];let o="";for(let t=0;t<s.length;t++){const i=s[t];Et.has(i)?(o.length&&r.push(Vt(o,e)),n.push(i),o=""):o=o.concat(i)}return o.length&&r.push(Vt(o,e)),{ops:n,nums:r}}(s,e);if(0===r.length){const t=1===o.length?o[0]:e[0];if(t instanceof Float32Array)return[t];const s=new Float32Array(e[0].length);return"number"==typeof t?s.fill(t):s.set(t),[s]}for(;r.length>0;){const{numIndex:e,opIndex:s}=$t(r);if(n=Ut(t,r[s],o[e],o[e+1]),1===r.length)break;r=Lt(r,s),o.splice(e,2,n)}return[n]}(i,o,s);break;default:return t}const{outputPixelType:l="f32"}=e,c=null!=l&&(0,u.zw)(l);let p;i?(p=new Uint8Array(t.width*t.height),p.set(i)):c&&(p=new Uint8Array(t.width*t.height).fill(255)),c&&(a=a.map(t=>{const e=g.A.createEmptyBand(l,t.length);return(0,u.yM)(t,p,l,e),e}));const h=new g.A({width:t.width,height:t.height,pixelType:l,pixels:a,mask:p});return h.updateStatistics(),h}function qt(t){const e=new Float32Array(9);return e[3*t[0]]=1,e[3*t[1]+1]=1,e[3*t[2]+2]=1,e}function Jt(t,e,s){const n=s.length,r=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){const t=e[o],n=s[o],i=t+n;i&&(r[o]=(t-n)/i)}return[r]}var Xt,Qt=s(93223);let Yt=Xt=class extends p{constructor(){super(...arguments),this.method="custom"}clone(){return new Xt({method:this.method,bandIndexes:this.bandIndexes,raster:(0,o.o8)(this.raster)})}};(0,i.Cg)([(0,a.MZ)({json:{type:String,write:!0}})],Yt.prototype,"bandIndexes",void 0),(0,i.Cg)([(0,Qt.e)(Wt)],Yt.prototype,"method",void 0),Yt=Xt=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunctionArguments")],Yt);const te=Yt,ee=new Set(["vari","mtvi2","rtvi-core","evi"]);let se=class extends w{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0];if(t.bandCount<2)return{success:!1,supportsGPU:!1,error:"band-arithmetic-function: source raster has insufficient amount of raster bands"};const e=t.clone();return e.pixelType=this.outputPixelType,e.bandCount="sultan"===this.functionArguments.method?3:1,this._removeStatsHistColormapVAT(e),e.keyProperties={...e.keyProperties,BandProperties:void 0},this.rasterInfo=e,{success:!0,supportsGPU:!["custom","gvitm","sultan"].includes(this.functionArguments.method)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{method:s,bandIndexes:n}=this.functionArguments,r=n.split(" ").map(t=>parseFloat(t));if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this,e=ee.has(this.functionArguments.method)?3:2,s=r.slice(0,e).map(e=>t.indexOf(e-1));r.splice(0,e,...s)}return Ht(e,{method:s,bandIndexes:r,equation:n,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const t=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===t.length&&t.push(0);const e=this.isInputBandIdsSwizzled?[0,1,2]:t;let s,n;const r=new Float32Array(3),{method:o}=this.functionArguments;switch(o){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":s=qt([e[0],e[1],0]),n="ndxi";break;case"ndwi":s=qt([e[1],e[0],0]),n="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":s=qt([e[0],e[1],0]),n="sr";break;case"ci-g":case"ci-re":s=qt([e[0],e[1],0]),n="ci";break;case"savi":s=qt([e[0],e[1],0]),n="savi",r[0]=t[2]+1;break;case"tsavi":s=qt([e[0],e[1],0]),n="tsavi",r[0]=t[2]+1,r[1]=t[3]+1,r[2]=t[4]+1;break;case"msavi":s=qt([e[0],e[1],0]),n="msavi";break;case"gemi":s=qt([e[0],e[1],0]),n="gemi";break;case"pvi":s=qt([e[0],e[1],0]),n="tsavi",r[0]=t[2]+1,r[1]=t[3]+1;break;case"vari":s=qt([e[0],e[1],e[2]]),n="vari";break;case"mtvi2":s=qt([e[0],e[1],e[2]]),n="mtvi";break;case"rtvi-core":s=qt([e[0],e[1],e[2]]),n="rtvicore";break;case"evi":s=qt([e[0],e[1],e[2]]),n="evi";break;case"wndwi":s=qt([e[0],e[1],0]),n="wndwi",r[0]=t[3]?t[3]+1:.5;break;case"bai":s=qt([e[1],e[0],0]),n="bai";break;default:s=qt([0,1,2]),n="custom"}return{bandIndexMat3:s,indexType:n,adjustments:r,isOutputRounded:(0,u.zw)(this.outputPixelType)}}_getInputBandIds(t){if("custom"===this.functionArguments.method)return t;const e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1),s=t.length,n=e.map(t=>t>=s?s-1:t),r=ee.has(this.functionArguments.method)?3:2,o=n.slice(0,r).map(e=>t[e]);return 2===o.length&&o.push(0),o}_swizzleBandIds(t){const e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===e.length&&e.push(0);const{method:s}=this.functionArguments,n=(["vari","mtvi2","rtvi-core","evi"].includes(s)?e.slice(0,3):"bai"===s||"ndwi"===s?[e[1],e[0]]:e.slice(0,2)).map(e=>t.indexOf(e));return n[2]??=n[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=n,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],se.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:te,json:{write:!0,name:"rasterFunctionArguments"}})],se.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],se.prototype,"rasterArgumentNames",void 0),se=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunction")],se);const ne=se;var re,oe=s(65864),ie=s(50498);const ae=new Dt.J({1:"outside",2:"inside"},{useNumericKeys:!0});let ue=re=class extends p{constructor(){super(...arguments),this.clippingType="outside"}clone(){return new re({clippingGeometry:this.clippingGeometry.clone(),clippingType:this.clippingType})}};(0,i.Cg)([(0,a.MZ)({types:ie.yR,json:{read:oe.rS,write:!0}})],ue.prototype,"clippingGeometry",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:ae.read,write:ae.write}})],ue.prototype,"clippingType",void 0),ue=re=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunctionArguments")],ue);const le=ue;var ce=s(34930),pe=s(37373);let he=class extends w{constructor(){super(...arguments),this.functionName="Clip",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{functionArguments:e}=this,{clippingGeometry:s,clippingType:n}=e;if(!s)return{success:!1,supportsGPU:!1,error:"missing clipping geometry"};if("outside"===n)try{const{spatialReference:e}=t,n="extent"===s.type?(0,pe._l)(s,e):(0,pe.uk)(s,e).extent;n&&(0,ce.Sd)(t,n)}catch{}return{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}_getWebGLParameters(){const{clippingGeometry:t,clippingType:e}=this.functionArguments;return{clippingGeometry:t.toJSON(),clippingType:e}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],he.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:le,json:{write:!0,name:"rasterFunctionArguments"}})],he.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],he.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],he.prototype,"isNoopProcess",void 0),he=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunction")],he);const me=he;var de,ge=s(67369),fe=s(95349),ye=s(36005);let xe=de=class extends p{castColormapName(t){if(!t)return null;const e=t.toLowerCase();return ge.L7.includes(e)?e:null}readColorRamp(t){return(0,fe.r)(t)}readColorRampName(t,e){if(!t)return null;const s=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return s?ge.kH.fromJSON(s):null}clone(){return new de({colormap:(0,o.o8)(this.colormap),colormapName:this.colormapName,colorRamp:this.colorRamp?.clone(),colorRampName:this.colorRampName})}};(0,i.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],xe.prototype,"colormap",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],xe.prototype,"colormapName",void 0),(0,i.Cg)([(0,a.wg)("colormapName")],xe.prototype,"castColormapName",null),(0,i.Cg)([(0,a.MZ)({types:fe.g,json:{write:!0}})],xe.prototype,"colorRamp",void 0),(0,i.Cg)([(0,ye.w)("colorRamp")],xe.prototype,"readColorRamp",null),(0,i.Cg)([(0,a.MZ)({type:ge.kH.apiValues,json:{type:ge.kH.jsonValues,write:ge.kH.write}})],xe.prototype,"colorRampName",void 0),(0,i.Cg)([(0,ye.w)("colorRampName")],xe.prototype,"readColorRampName",null),xe=de=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunctionArguments")],xe);const we=xe,Ae=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[112,75,3],[113,76,3],[114,77,3],[115,77,3],[116,78,3],[117,79,3],[118,79,3],[119,80,3],[121,81,4],[122,82,4],[123,82,4],[124,83,4],[125,84,4],[126,84,4],[127,85,4],[128,86,4],[129,86,4],[130,87,4],[131,88,4],[132,89,4],[133,89,4],[134,90,4],[135,91,4],[136,91,4],[137,92,4],[138,93,4],[139,94,4],[140,94,4],[142,95,5],[143,96,5],[144,96,5],[145,97,5],[146,98,5],[147,99,5],[148,99,5],[149,100,5],[150,101,5],[151,101,5],[152,102,5],[153,103,5],[154,104,5],[155,104,5],[156,105,5],[157,106,5],[158,106,5],[159,107,5],[160,108,5],[161,108,5],[162,109,5],[164,110,6],[165,111,6],[166,111,6],[167,112,6],[168,113,6],[169,113,6],[170,114,6],[171,115,6],[172,116,6],[173,116,6],[174,117,6],[245,0,0],[245,5,0],[245,10,0],[246,15,0],[246,20,0],[246,25,0],[246,30,0],[247,35,0],[247,40,0],[247,45,0],[247,50,0],[247,55,0],[248,60,0],[248,65,0],[248,70,0],[248,75,0],[249,81,0],[249,86,0],[249,91,0],[249,96,0],[250,101,0],[250,106,0],[250,111,0],[250,116,0],[250,121,0],[251,126,0],[251,131,0],[251,136,0],[251,141,0],[252,146,0],[252,151,0],[252,156,0],[252,156,0],[251,159,0],[250,162,0],[249,165,0],[248,168,0],[247,171,0],[246,174,0],[245,177,0],[245,179,0],[244,182,0],[243,185,0],[242,188,0],[241,191,0],[240,194,0],[239,197,0],[238,200,0],[237,203,0],[236,206,0],[235,209,0],[234,212,0],[233,215,0],[232,218,0],[231,221,0],[230,224,0],[230,226,0],[229,229,0],[228,232,0],[227,235,0],[226,238,0],[225,241,0],[224,244,0],[223,247,0],[165,247,0],[163,244,0],[161,240,0],[158,237,0],[156,233,1],[154,230,1],[152,227,1],[149,223,1],[147,220,1],[145,216,1],[143,213,1],[140,210,2],[138,206,2],[136,203,2],[134,200,2],[132,196,2],[129,193,2],[127,189,2],[125,186,3],[123,183,3],[120,179,3],[118,176,3],[116,172,3],[114,169,3],[111,166,3],[109,162,4],[107,159,4],[105,155,4],[103,152,4],[100,149,4],[98,145,4],[96,142,4],[94,138,5],[91,135,5],[89,132,5],[87,128,5],[85,125,5],[82,121,5],[80,118,5],[78,115,6],[76,111,6],[73,108,6],[71,105,6],[69,101,6],[67,98,6],[65,94,6],[62,91,7],[60,88,7],[58,84,7],[56,81,7],[53,77,7],[51,74,7],[49,71,7],[47,67,8],[44,64,8],[42,60,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8]],ve=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[245,20,0],[245,24,0],[245,29,0],[245,31,0],[247,33,0],[247,33,0],[247,37,0],[247,41,0],[247,41,0],[247,41,0],[247,45,0],[247,45,0],[247,47,0],[247,49,0],[247,49,0],[247,54,0],[247,54,0],[247,56,0],[247,58,0],[247,58,0],[250,62,0],[250,62,0],[250,62,0],[250,67,0],[250,67,0],[250,67,0],[250,69,0],[250,71,0],[250,71,0],[250,75,0],[250,75,0],[250,78,0],[250,79,0],[250,79,0],[250,79,0],[250,81,0],[250,83,0],[250,83,0],[250,87,0],[250,87,0],[250,90,0],[250,92,0],[252,93,0],[252,93,0],[252,97,0],[252,97,0],[252,97,0],[252,97,0],[252,101,0],[252,101,0],[252,101,0],[252,101,0],[252,105,0],[252,105,0],[252,107,0],[252,109,0],[252,109,0],[252,113,13],[255,118,20],[255,119,23],[255,121,25],[255,126,33],[255,132,38],[255,133,40],[255,135,43],[255,141,48],[255,144,54],[255,150,59],[255,152,61],[255,153,64],[255,159,69],[255,163,77],[255,165,79],[255,168,82],[255,174,87],[255,176,92],[255,181,97],[255,183,99],[255,186,102],[255,191,107],[255,197,115],[255,201,120],[255,203,123],[255,205,125],[255,209,130],[255,214,138],[255,216,141],[255,218,143],[255,224,150],[255,228,156],[255,234,163],[255,236,165],[255,238,168],[255,243,173],[255,248,181],[255,252,186],[253,252,186],[250,252,187],[244,250,180],[238,247,176],[234,246,173],[231,245,169],[223,240,163],[217,237,157],[211,235,150],[205,233,146],[200,230,142],[195,227,136],[189,224,132],[184,222,126],[180,220,123],[174,217,119],[169,214,114],[163,212,108],[160,210,105],[154,207,101],[148,204,96],[143,201,93],[138,199,88],[134,197,84],[130,194,81],[126,191,77],[117,189,70],[115,186,68],[112,184,64],[106,181,60],[100,179,55],[94,176,49],[92,174,47],[90,173,45],[81,168,37],[75,166,33],[71,163,28],[66,160,24],[62,158,21],[56,156,14],[51,153,0],[51,153,0],[51,153,0],[50,150,0],[50,150,0],[50,150,0],[50,150,0],[49,148,0],[49,148,0],[49,148,0],[48,145,0],[48,145,0],[48,145,0],[48,145,0],[48,143,0],[48,143,0],[48,143,0],[48,143,0],[47,140,0],[47,140,0],[47,140,0],[47,140,0],[46,138,0],[46,138,0],[46,138,0],[46,138,0],[45,135,0],[45,135,0],[45,135,0],[45,135,0],[44,133,0],[44,133,0],[44,133,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[42,128,0],[42,128,0],[42,128,0],[42,125,0],[42,125,0],[42,125,0],[42,125,0],[41,122,0],[41,122,0],[41,122,0],[41,122,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[39,117,0],[39,117,0],[39,117,0],[39,117,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0]];function Ce(t,e){const s=[],n=[];for(let e=0;e<t.length-1;e++)s.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:t[e].slice(1),toColor:t[e+1].slice(1)}),n.push(t[e+1][0]-t[e][0]);const r=t[t.length-1][0];return(0,ge.iv)({type:"multipart",colorRamps:s},{numColors:r,weights:e=e??n})}let be=class extends w{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:e,colormapName:s,colorRamp:n,colorRampName:r}=this.functionArguments;if(!e?.length)if(n)this.colorRamp=n,e=(0,ge.R8)(n,{interpolateAlpha:!0});else if(r){const t=(0,ge.M5)(r);t&&(e=(0,ge.R8)(t),this.colorRamp=(0,fe.r)(t))}else s&&(e=function(t){let e;switch(t){case"elevation":e=Ce([[0,0,191,191],[51,0,0,255],[102,255,0,255],[153,255,0,127],[204,191,63,127],[256,20,20,20]]);break;case"gray":e=(0,ge.iv)({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:[0,0,0],toColor:[255,255,255]});break;case"hillshade":e=Ce([[0,38,41,54],[69,79,82,90],[131,156,156,156],[256,253,253,241]],[.268,.238,.495]);break;case"ndvi":e=Ae;break;case"ndvi2":e=function(){const t=Ce([[0,255,255,255],[70,0,255,0],[80,205,173,193],[100,150,150,150],[110,120,51,100],[130,120,100,200],[140,28,3,144],[160,6,0,55],[180,10,25,30],[201,6,7,27]]);for(let e=t.length;e<256;e++)t.push([6,27,7]);return t}();break;case"ndvi3":e=ve;break;case"random":e=function(){const t=[];for(let e=0;e<256;e++){const e=[];for(let t=0;t<3;t++)e.push(Math.round(255*Math.random()));t.push(e)}return t}()}return e?(e=e.map((t,e)=>[e,...t]),e):null}(s));if(!e?.length)return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};const o=this._getOutputPixelType(t.pixelType);this.outputPixelType=o.startsWith("f")?"s32":o;const i=t.clone();return i.pixelType=this.outputPixelType,i.colormap=e,i.bandCount=1,this.rasterInfo=i,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];return!e||(0,u.zw)(e.pixelType)||(e=e.clone(),e.clamp(this.outputPixelType)),e}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],be.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:we,json:{write:!0,name:"rasterFunctionArguments"}})],be.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],be.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],be.prototype,"isNoopProcess",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],be.prototype,"indexedColormap",void 0),(0,i.Cg)([(0,a.MZ)()],be.prototype,"colorRamp",void 0),be=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunction")],be);const Me=be;var Te;let Pe=Te=class extends p{clone(){return new Te({raster:this.raster})}};Pe=Te=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunctionArguments")],Pe);const Ne=Pe;var Ie=s(4151),Re=s(88178);let Fe=class extends w{constructor(){super(...arguments),this.functionName="ColormapToRGB",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1||!t.colormap?.length)return{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: source data must be single band with a colormap"};const e=t.clone();e.pixelType=this.outputPixelType=this._getOutputPixelType("u8"),this._removeStatsHistColormapVAT(e),e.bandCount=3,e.statistics=[{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20}],this.rasterInfo=e;const s=[...t.colormap].sort((t,e)=>t[0]-e[0]),{indexedColormap:n,offset:r}=(0,Kt.zg)({colormap:s});return n?(this.lookup={indexedColormap:n,offset:r},{success:!0,supportsGPU:(0,Re.WN)(n)}):{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: the colormap is not supported"}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e||!this.lookup)return e;e=e.clone();const s=e.pixels[0],n=e.mask??new Uint8Array(s.length).fill(255),r=new Uint8Array(s.length),o=new Uint8Array(s.length),i=new Uint8Array(s.length),{indexedColormap:a,offset:u}=this.lookup,l=a.length;for(let t=0;t<s.length;t++)if(n[t]){let e=4*(s[t]-u);e<0||e>l-4?n[t]=0:(r[t]=a[e++],o[t]=a[e++],i[t]=a[e++])}return e.pixels=[r,o,i],e.statistics=[new Ie.A(0,255),new Ie.A(0,255),new Ie.A(0,255)],e.pixelType=this.outputPixelType,e}_getWebGLParameters(){return this.lookup}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Fe.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ne,json:{write:!0,name:"rasterFunctionArguments"}})],Fe.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Fe.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Fe.prototype,"lookup",void 0),Fe=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunction")],Fe);const ke=Fe;var _e,Se=s(43937);let Be=_e=class extends p{constructor(){super(...arguments),this.rasters=[]}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new _e({rasters:(0,o.o8)(this.rasters)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Be.prototype,"rasters",void 0),(0,i.Cg)([(0,Se.K)("rasters")],Be.prototype,"writeRasters",null),Be=_e=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunctionArguments")],Be);const je=Be;let Ze=class extends w{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const s=e.clone();if(s.attributeTable=null,s.colormap=null,s.pixelType=this.outputPixelType,s.bandCount=t.map(({bandCount:t})=>t).reduce((t,e)=>t+e),t.every(({statistics:t})=>null!=t&&t.length)){const e=[];t.forEach(({statistics:t})=>null!=t&&e.push(...t)),s.statistics=e}if(t.every(({histograms:t})=>null!=t&&t.length)){const e=[];t.forEach(({histograms:t})=>null!=t&&e.push(...t)),s.histograms=e}s.multidimensionalInfo&&s.multidimensionalInfo.variables.forEach(e=>{const s=t.map(t=>t.multidimensionalInfo?.variables.find(({name:t})=>t===e.name)),n=s.map(t=>t?.statistics?.length?t.statistics:null),r=s.map(t=>t?.histograms?.length?t.histograms:null);e.statistics=n.every(t=>null!=t)?n.flat():null,e.histograms=r.every(t=>null!=t)?r.flat():null}),s.bandCount>1&&(s.colormap=null,s.attributeTable=null);const n=t.every(t=>t.keyProperties.BandProperties?.length)?t.flatMap(t=>t.keyProperties.BandProperties):void 0;return s.keyProperties={...s.keyProperties,BandProperties:n},this.rasterInfo=s,{success:!0,supportsGPU:s.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;if(!e)return null;const s=e?.[0];return null==s?null:(0,Kt.Wy)(e)}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ze.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:je,json:{write:!0,name:"rasterFunctionArguments"}})],Ze.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Ze.prototype,"rasterArgumentNames",void 0),Ze=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunction")],Ze);const ze=Ze,Ge=new Dt.J({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),Oe=new Dt.J({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});var De;let Ee=De=class extends p{constructor(){super(...arguments),this.method="difference",this.keepMethod="all",this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new De({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};(0,i.Cg)([(0,Qt.e)(Ge)],Ee.prototype,"method",void 0),(0,i.Cg)([(0,Qt.e)(Oe)],Ee.prototype,"keepMethod",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ee.prototype,"raster2",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],Ee.prototype,"rasters",null),Ee=De=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunctionArguments")],Ee);const Ve=Ee;var Ue=s(20437);let Le=class extends w{constructor(){super(...arguments),this.functionName="ComputeChange",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){const{method:t}=this.functionArguments,e=this.sourceRasterInfos[0].clone();if(this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),"categorical"===t){const t=this.sourceRasterInfos.map(t=>t.attributeTable),s=this._getFieldNames(t,"value"),n=t.map(t=>this._getClassFieldName(t));if(null==s[0]||null==s[1]||null==n[0]||null==n[1])return{success:!1,supportsGPU:!1,error:"both inputs must have proper attribute table with value and class fields"};this._updateAttributeTable(e,s,n)}return e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:"difference"===t||"relative-difference"===t}}_processPixels(t){const{pixelBlocks:e}=t;if(null==e?.[0]||null==e?.[1])return null;const{method:s}=this.functionArguments;return function(t,e,s,n){const[r,o]=t,i=(0,u.zw)(s)&&!(0,u.zw)(r.pixelType)&&!(0,u.zw)(o.pixelType),a=[r.mask,o.mask].filter(t=>t),l=g.A.combineBandMasks(a),c=t.map(t=>t.pixels[0]),{width:p,height:h}=r,m=g.A.createEmptyBand(s,p*h);switch(e){case"difference":case"relative-difference":!function(t){const{bands:[e,s],mask:n,isRelative:r,isRoundingNeeded:o,outBand:i}=t,a=e.length;for(let t=0;t<a;t++)if(!n||n[t]){let n=e[t]-s[t];if(r){const r=Math.max(Math.abs(e[t])-Math.abs(s[t]));n=r>0?n/r:0}i[t]=o?Math.round(n):n}}({bands:c,mask:l,outBand:m,isRoundingNeeded:i,isRelative:"relative-difference"===e});break;case"categorical":!function(t){const{bands:[e,s],categoryIndexLookups:[n,r],classNames:[o,i],mask:a,keepMethod:u,outBand:l}=t,c=e.length,p=o.length,h=i.length,m=p*h,d=m+1,g=m+2;for(let t=0;t<c;t++)if(!a||a[t]){const a=e[t],c=s[t],p=n[a],f=r[c],y=o[p],x=i[f];l[t]=null==p||null==f?m:"changed"===u&&y===x?d:"unchanged"===u&&y!==x?g:p*h+f}}({bands:c,mask:l,outBand:m,...n});break;case"euclidean-distance":!function(t){const{pixels:[e,s],mask:n,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!n||n[t]){let n=0;for(let r=0;r<i;r++){const o=e[r][t]-s[r][t];n+=o*o}r[t]=Math.sqrt(n)}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m});break;case"angle-difference":!function(t){const{pixels:[e,s],mask:n,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!n||n[t]){let n=0,o=0,a=0;for(let r=0;r<i;r++){const i=e[r][t],u=s[r][t];n+=i*u,o+=i*i,a+=u*u}const u=Math.sqrt(o*a);r[t]=u?Math.acos(n/u):1.5707963267948966}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m});break;case"band-with-most-change":!function(t){const{pixels:[e,s],mask:n,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!n||n[t]){let n=0,o=0;for(let r=0;r<i;r++){const i=Math.abs(e[r][t]-s[r][t]);i>n&&(n=i,o=r)}r[t]=o}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m})}const d=new g.A({width:p,height:h,pixels:[m],pixelType:s,mask:l});return d.updateStatistics(),d}(e,s,this.outputPixelType,this._categoryConfig)}_getWebGLParameters(){const t=this.outputPixelType??"f32";let[e,s]=(0,u.hP)(t);const n=(0,u.zw)(t);return n&&(e-=1e-4,s+=1e-4),{method:this.functionArguments.method,domainRange:[e,s],isOutputRounded:n}}_updateAttributeTable(t,e,s){const n=this.sourceRasterInfos.map(t=>t.attributeTable),r=n.map((t,s)=>t.features.map(t=>t.attributes[e[s]])),o=n.map((t,e)=>t.features.map(t=>t.attributes[s[e]])),i=r.map(t=>{const e=[];return t.forEach((t,s)=>e[t]=s),e}),{keepMethod:a}=this.functionArguments;this._categoryConfig={categoryIndexLookups:i,classNames:o,keepMethod:a};const u=n[0].clone();u.fields=[new Ue.A({name:"OID",type:"oid"}),new Ue.A({name:"Value",type:"integer"}),new Ue.A({name:"ClassName",type:"string"}),new Ue.A({name:"Class_From",type:"string"}),new Ue.A({name:"Class_To",type:"string"})];const l=this._getFieldNames(n,"red"),c=this._getFieldNames(n,"green"),p=this._getFieldNames(n,"blue"),h=[],m=2===l.length&&2===c.length&&2===p.length;m&&(h.push(...n.map((t,e)=>t.features.map(t=>[t.attributes[l[e]],t.attributes[c[e]],t.attributes[p[e]]]))),u.fields.push(new Ue.A({name:"Red",type:"integer"}),new Ue.A({name:"Green",type:"integer"}),new Ue.A({name:"Blue",type:"integer"})));const d=u.features[0].clone();d.geometry=null;const g=[],[f,y]=r.map(t=>t.length);let x=1;for(let t=0;t<f;t++){const e=o[0][t];for(let s=0;s<y;s++){const n=o[1][s];if("changed"===a&&e===n||"unchanged"===a&&e!==n)continue;const r=d.clone();r.attributes={OID:x++,Value:t*y+s,ClassName:e===n?e:`${e} -> ${n}`,Class_From:e,Class_To:n},m&&(r.attributes.Red=h[0][t][0]+h[1][s][0]>>1,r.attributes.Green=h[0][t][1]+h[1][s][1]>>1,r.attributes.Blue=h[0][t][2]+h[1][s][2]>>1),g.push(r)}}if("changed"===a){const t=d.clone();t.attributes={OID:x++,Value:f*y+1,ClassName:"No Change",Class_From:"Same",Class_To:"Same"},g.push(t)}else if("unchanged"===a){const t=d.clone();t.attributes={OID:x++,Value:f*y+2,ClassName:"Changed",Class_From:"Any",Class_To:"Any"},g.push(t)}u.features=g,t.attributeTable=u}_getFieldNames(t,e){return t.map(({fields:t})=>t.find(t=>t.name.toLowerCase()===e)?.name).filter(t=>t)}_getClassFieldName(t){const e=t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().startsWith("class"))??t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().includes("class")||t.name.toLowerCase().includes("type")||t.name.toLowerCase().includes("name"))??t.fields.find(t=>"string"===t.type);return e?.name}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Le.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ve,json:{write:!0,name:"rasterFunctionArguments"}})],Le.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Le.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Le.prototype,"_categoryConfig",void 0),Le=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunction")],Le);const $e=Le;var Ke;let We=Ke=class extends p{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new Ke({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],We.prototype,"contrastOffset",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],We.prototype,"brightnessOffset",void 0),We=Ke=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunctionArguments")],We);const He=We;var qe=s(51927);let Je=class extends w{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];if("u8"!==e.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");const s=e.clone();this._removeStatsHistColormapVAT(s),this.rasterInfo=s;const{contrastOffset:n,brightnessOffset:r}=this.functionArguments;return this.lookup=(0,qe.zj)(n,r),{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:(0,Kt.eH)(e,{lut:e.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){const{contrastOffset:t,brightnessOffset:e}=this.functionArguments;return{contrastOffset:t,brightnessOffset:e}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Je.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:He,json:{write:!0,name:"rasterFunctionArguments"}})],Je.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Je.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Je.prototype,"lookup",void 0),Je=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunction")],Je);const Xe=Je;function Qe(t,e,s,n,r){const o=Math.floor(n/2);for(let n=0;n<o;n++)for(let o=0;o<e;o++)t[n*e+o]=t[(r-1-n)*e+o],t[(s-1-n)*e+o]=t[(s-r+n)*e+o];const i=Math.floor(r/2);for(let n=0;n<s;n++){const s=n*e;for(let n=0;n<i;n++)t[s+n]=t[s+r-1-n],t[s+e-n-1]=t[s+e+n-r]}}const Ye=new Map;function ts(t,e,s,n,r,o,i){const a=new Float32Array(e*s),u=o.length,l=i?0:n,c=i?n:0,p=i?1:e;for(let i=l;i<s-l;i++){const s=i*e;for(let i=c;i<e-c;i++){if(r&&!r[s+i])continue;let e=0;for(let r=0;r<u;r++)e+=t[s+i+(r-n)*p]*o[r];a[s+i]=e}}return a}function es(t,e,s,n,r,o,i){const a=new Float32Array(e*s),u=Math.floor(n/2),l=Math.floor(r/2);for(let c=u;c<s-u;c++){const s=c*e;for(let c=l;c<e-l;c++){if(o&&!o[s+c])continue;let p=0;for(let o=0;o<n;o++)for(let n=0;n<r;n++)p+=t[s+c+(o-u)*e+n-l]*i[o*r+n];a[s+c]=p}}return a}var ss;Ye.set(A.none,[0,0,0,0,1,0,0,0,0]),Ye.set(A.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),Ye.set(A.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),Ye.set(A.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),Ye.set(A.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),Ye.set(A.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(A.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(A.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),Ye.set(A.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),Ye.set(A.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),Ye.set(A.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),Ye.set(A.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),Ye.set(A.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),Ye.set(A.smoothing5x5,[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1]),Ye.set(A.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Ye.set(A.sharpening5x5,[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1]),Ye.set(A.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),Ye.set(A.laplacian5x5,[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0]),Ye.set(A.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(A.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(A.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),Ye.set(A.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),Ye.set(A.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let ns=ss=class extends p{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(t){this._set("convolutionType",t);const e=Ye.get(t);if(!e||t===A.userDefined||t===A.none)return;const s=Math.round(Math.sqrt(e.length));this._set("kernel",e),this._set("cols",s),this._set("rows",s)}clone(){return new ss({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:(0,o.o8)(this.raster)})}};(0,i.Cg)([(0,a.MZ)({json:{type:Number,write:!0}})],ns.prototype,"rows",void 0),(0,i.Cg)([(0,a.MZ)({json:{type:Number,write:!0,name:"columns"}})],ns.prototype,"cols",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"type",type:Number,write:!0}})],ns.prototype,"convolutionType",null),(0,i.Cg)([(0,a.MZ)({json:{type:[Number],write:!0}})],ns.prototype,"kernel",void 0),ns=ss=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunctionArguments")],ns);const rs=ns;let os=class extends w{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){const{kernel:t,convolutionType:e}=this.functionArguments,s=t.reduce((t,e)=>t+e);return-1===e||0===s||1===s?t:t.map(t=>t/s)}_bindSourceRasters(){const{convolutionType:t,rows:e,cols:s,kernel:n}=this.functionArguments;if(!Object.values(A).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==A.none&&e*s!==n.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};const r=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(r.pixelType);const o=r.clone();o.pixelType=this.outputPixelType;const i=[A.none,A.sharpen,A.sharpen2,A.sharpening3x3,A.sharpening5x5];return(-1===t||"u8"!==this.outputPixelType&&!i.includes(t))&&(o.statistics=null,o.histograms=null),o.colormap=null,o.attributeTable=null,this.rasterInfo=o,{success:!0,supportsGPU:n.length<=25}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e||this.functionArguments.convolutionType===A.none)return e;const{rows:s,cols:n}=this.functionArguments,{_normalizedKernel:r}=this;return function(t,e){const s=function(t){const e=Math.sqrt(t.length),s=t.slice(0,e),n=[1];for(let s=1;s<e;s++){let r=null;for(let n=0;n<e;n++){const o=t[n+s*e],i=t[n];if(null==r)if(0===i){if(o)return{separable:!1,row:null,col:null}}else r=o/i;else if(o/i!==r)return{separable:!1,row:null,col:null}}if(null==r)return{separable:!1,row:null,col:null};n.push(r)}return{separable:!0,row:s,col:n}}(e.kernel),n=!1!==e.mirrorEdges,r=s.separable?function(t,e,s,n=!0){const{pixels:r,width:o,height:i,pixelType:a,mask:u}=t,l=r.length,c=[],p=e.length,h=s.length,m=Math.floor(p/2),d=Math.floor(h/2);for(let t=0;t<l;t++){let a=ts(r[t],o,i,m,u,e,!0);a=ts(a,o,i,d,u,s,!1),n&&Qe(a,o,i,p,h),c.push(a)}return new g.A({width:o,height:i,pixelType:a,pixels:c,mask:u})}(t,s.row,s.col,n):function(t,e,s=!0){const{pixels:n,width:r,height:o,pixelType:i,mask:a}=t,u=n.length,l=[],{kernel:c,rows:p,cols:h}=e;for(let t=0;t<u;t++){const e=es(n[t],r,o,p,h,a,c);s&&Qe(e,r,o,p,h),l.push(e)}return new g.A({width:r,height:o,pixelType:i,pixels:l,mask:a})}(t,e,n),{outputPixelType:o}=e;return o&&r.clamp(o),r}(e,{kernel:r,rows:s,cols:n,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const t=new Float32Array(25),{rows:e,cols:s}=this.functionArguments,{_normalizedKernel:n}=this;for(let r=0;r<e;r++)for(let e=0;e<s;e++)t[5*r+e]=n[r*s+e];return{kernelRows:e,kernelCols:s,kernel:t,clampRange:(0,u.hP)(this.outputPixelType)}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],os.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:rs,json:{write:!0,name:"rasterFunctionArguments"}})],os.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],os.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],os.prototype,"_normalizedKernel",null),os=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunction")],os);const is=os;var as;const us=new Dt.J({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let ls=as=class extends p{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(t,e){return us.fromJSON(e.type??e.curvatureType??0)}clone(){return new as({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:{target:"type"}}}),(0,Qt.e)(us)],ls.prototype,"curvatureType",void 0),(0,i.Cg)([(0,ye.w)("curvatureType",["type","curvatureType"])],ls.prototype,"readCurvatureType",null),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],ls.prototype,"zFactor",void 0),ls=as=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunctionArguments")],ls);const cs=ls;let ps=class extends w{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:s,curvatureType:n}=this.functionArguments,{extent:r,primaryPixelSizes:o}=t,i=o?.[0],a=i??(r?{x:r.width/e.width,y:r.height/e.height}:{x:1,y:1}),u=this.isGCS&&s>=1?s*zt.rk:s;return(0,zt.E0)(e,{zFactor:u,curvatureType:n,resolution:a})}_getWebGLParameters(){const{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*zt.rk:t}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ps.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:cs,json:{write:!0,name:"rasterFunctionArguments"}})],ps.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],ps.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ps.prototype,"isGCS",void 0),ps=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunction")],ps);const hs=ps;var ms;let ds=ms=class extends p{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=0}clone(){return new ms({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandIds",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandWavelengths",void 0),(0,i.Cg)([(0,Qt.e)({0:"name",1:"wavelength",2:"id"})],ds.prototype,"method",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"missingBandAction",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"wavelengthMatchTolerance",void 0),ds=ms=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunctionArguments")],ds);const gs=ds;let fs=class extends w{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{functionArguments:t,sourceRasterInfos:e}=this,s=e[0],{method:n,bandNames:r,bandWavelengths:o,bandIds:i,missingBandAction:a}=t,u=r?.length&&("name"===n||"id"!==n&&!i?.length),l=o?.length&&("wavelength"===n||"id"!==n&&!i?.length),c=1===a,p=u?function(t,e){const s=t.bandInfos.map(({name:t})=>t.toLowerCase()),n=[];for(let t=0;t<e.length;t++){const r=e[t].toLowerCase();let o=s.indexOf(r);if(-1===o&&"nearinfrared"===r&&(o=s.findIndex(t=>t.startsWith("nearinfrared_1")),-1===o&&(o=s.findIndex(t=>t.startsWith("nearinfrared")))),-1===o)return null;n.push(o)}return n}(s,r):l?function(t,e,{wavelengthMatchTolerance:s},n){const{bandInfos:r}=t,o=[];for(let t=0;t<r.length;t++){const{minWavelength:e,maxWavelength:s}=r[t];if(!e||!s)return null;o.push({minWavelength:e,maxWavelength:s})}const i=[];for(let t=0;t<e.length;t++){const r=e[t];let a=!1,u=-1,l=Number.MAX_VALUE;for(let t=0;t<o.length;t++){const e=o[t],s=r>=e.minWavelength&&r<=e.maxWavelength,n=Math.abs(r-(e.minWavelength+e.maxWavelength)/2);s?n<l&&(a=!0,u=t,l=n):!a&&n<l&&(u=t,l=n)}if(!a&&s&&l<s&&(a=!0),!a&&n)return null;i.push(u)}return i}(s,o,this.functionArguments,c):function(t,e,s){const{bandCount:n}=t;return!e?.length||s&&e.some(t=>t<0||t>=n)?null:e}(s,i,c);if(null==p)return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${u?"band names":l?"band wavelengths":"band ids"} for the imagery data source`};this.functionArguments.bandIds=p,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType(s.pixelType);const h=s.clone();h.pixelType=this.outputPixelType,h.bandCount=p.length;const{statistics:m,histograms:d}=h;null!=m&&m.length&&(h.statistics=p.map(t=>m[t]||m[m.length-1])),null!=d&&d.length&&(h.histograms=p.map(t=>d[t]||d[d.length-1])),h.multidimensionalInfo&&h.multidimensionalInfo.variables.forEach(t=>{const{statistics:e,histograms:s}=t;null!=e&&e.length&&(t.statistics=p.map(t=>e[t]||e[e.length-1])),null!=s&&s.length&&(t.histograms=p.map(t=>s[t]||s[s.length-1]))});let g=h.keyProperties?.BandProperties;return g?.length&&(g=p.map(t=>t>=g.length?g[g.length-1]:g[t]),h.keyProperties={...h.keyProperties,BandProperties:g}),this.rasterInfo=h,{success:!0,supportsGPU:h.bandCount<=3}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;let{bandIds:s}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this;s=s.map(e=>t.indexOf(e))}else{const t=e.pixels.length;s=s.map(e=>e>=t?t-1:e)}return e.extractBands(s)}_getWebGLParameters(){let t;if(this.isInputBandIdsSwizzled)t=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{t=[...this.functionArguments.bandIds],0===t.length?t=[0,1,2]:t.length<3&&(t[1]=t[1]??t[0],t[2]=t[2]??t[1]);for(let e=0;e<3;e++)t[e]=Math.min(t[e],2)}return{bandIndexMat3:qt(t)}}_getInputBandIds(t){const e=t.length;return this.functionArguments.bandIds.map(t=>t>=e?e-1:t).map(e=>t[e])}_swizzleBandIds(t){const e=this.functionArguments.bandIds.map(e=>t.indexOf(e));return this.isInputBandIdsSwizzled=!0,e[1]??=e[0],e[2]??=e[1],this.swizzledBandSelection=e,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],fs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:gs,json:{write:!0,name:"rasterFunctionArguments"}})],fs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],fs.prototype,"rasterArgumentNames",void 0),fs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunction")],fs);const ys=fs;function xs(t,e,s,n){const{pixels:r,width:o,height:i}=t,a=r.length,l=s.startsWith("f"),c=!l,[p,h]=(0,u.hP)(s),m=o*i,d=g.A.createEmptyBand(s,m);for(let t=0;t<i;t++){let s=t*o;for(let t=0;t<o;t++,s++)if(!n||n[s]){let t=0;for(let n=0;n<a;n++)t+=e[n]*r[n][s];l||(t=Math.round(t),c&&(t=t>h?h:t<p?p:t)),d[s]=t}}return d}var ws;let As=ws=class extends p{clone(){return new ws({conversionParameters:[...this.conversionParameters],raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],As.prototype,"conversionParameters",void 0),As=ws=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunctionArguments")],As);const vs=As;let Cs=class extends w{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){const{conversionParameters:t}=this.functionArguments,e=t.reduce((t,e)=>t+e);return t.map(t=>t/e)}_bindSourceRasters(){const{conversionParameters:t}=this.functionArguments;if(!t?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};const e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType;const s=3===t.length||3===e.bandCount&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:s}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:function(t,e,s){const{width:n,height:r,mask:o,bandMasks:i}=t,a=i?.length?g.A.combineBandMasks(i):o,u=xs(t,e,s,a),l=new g.A({width:n,height:r,pixels:[u],pixelType:s,mask:a});return l.updateStatistics(),l}(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Cs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:vs,json:{write:!0,name:"rasterFunctionArguments"}})],Cs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Cs.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],Cs.prototype,"_normalizedWeights",null),Cs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunction")],Cs);const bs=Cs;var Ms;const Ts=new Dt.J({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),Ps=new Dt.J({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let Ns=Ms=class extends p{constructor(){super(...arguments),this.altitude=45,this.azimuth=315,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.slopeType="degree",this.zFactor=1,this.removeEdgeEffect=!1}clone(){return new Ms({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"altitude",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"azimuth",void 0),(0,i.Cg)([(0,a.MZ)(),(0,Qt.e)(Ts)],Ns.prototype,"hillshadeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psPower"}})],Ns.prototype,"pixelSizePower",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psZFactor"}})],Ns.prototype,"pixelSizeFactor",void 0),(0,i.Cg)([(0,a.MZ)(),(0,Qt.e)(Ps)],Ns.prototype,"slopeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"zFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Ns.prototype,"removeEdgeEffect",void 0),Ns=Ms=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunctionArguments")],Ns);const Is=Ns;let Rs=class extends w{constructor(){super(...arguments),this.functionName="Hillshade",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"hillshade-function: source data must be single band"};this.outputPixelType=this._getOutputPixelType("u8");const e=t.clone();return this._removeStatsHistColormapVAT(e),e.pixelType=this.outputPixelType,e.bandCount=1,e.statistics=[{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(!e)return null;const{extent:s,primaryPixelSizes:n}=t,r=n?.[0],o=r??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1}),i=(0,zt.PP)(this.functionArguments,o,this.isGCS),a=(0,zt.fw)(e,i);return a.pixelType=this.outputPixelType,a}_getWebGLParameters(){const t=(0,zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,zt.ng)(t),{slopeType:s,zFactor:n,pixelSizeFactor:r,pixelSizePower:o}=this.functionArguments,i="scaled"===s,a=(0,u.zw)(this.outputPixelType);return{...e,zFactor:n,gcsFactor:this.isGCS?zt.rk:1,pixelSizeFactor:i?r:0,pixelSizePower:i?o:0,isOutputRounded:a}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Rs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Is,json:{write:!0,name:"rasterFunctionArguments"}})],Rs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Rs.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Rs.prototype,"isGCS",void 0),Rs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunction")],Rs);const Fs=Rs;var ks;let _s=ks=class extends p{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new ks({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,o.o8)(this.rasters)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],_s.prototype,"operation",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],_s.prototype,"rasters",void 0),(0,i.Cg)([(0,Se.K)("rasters")],_s.prototype,"writeRasters",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],_s.prototype,"processAsMultiband",void 0),_s=ks=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunctionArguments")],_s);const Ss=_s;let Bs=class extends w{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0],{bandCount:s}=e,{processAsMultiband:n}=this.functionArguments;if(t.some(t=>t.bandCount!==s))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};const{operation:r,rasters:o}=this.functionArguments,i=N[r];if(!(999===i||o.length===i||o.length<=1&&1===i))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${i}`};const a=e.clone();return a.bandCount=999!==i||n?s:1,this._removeStatsHistColormapVAT(a),this._updateStatistics(a),this._updatePixelType(a),this.rasterInfo=a,{success:!0,supportsGPU:1===a.bandCount&&i<=3}}_processPixels(t){const{pixelBlocks:e}=t;return null==e||e.some(t=>null==t)?null:kt(e,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=N[t],s=Object.keys(M).find(e=>M[e]===t)?.toLowerCase()??"undefined",n=this.outputPixelType??"f32";let[r,o]=(0,u.hP)(n);const i=(0,u.zw)(n);return i&&(r-=1e-4,o+=1e-4),{imageCount:e,operationName:s,domainRange:[r,o],isOutputRounded:i}}_updateStatistics(t){const e=this.sourceRasterInfos[0],{operation:s}=this.functionArguments,n=P(s)?.domain;if(n){t.statistics=[];for(let e=0;e<t.bandCount;e++)t.statistics[e]={min:n[0],max:n[1],avg:(n[0]+n[1])/2,stddev:(n[0]+n[1])/10}}else 45===s&&e.statistics?.length&&(t.statistics=e.statistics.map(t=>({min:-t.max,max:-t.min,avg:null!=t.avg?-t.avg:void 0,stddev:null!=t.stddev?-t.stddev:void 0})))}_updatePixelType(t){const{statistics:e,pixelType:s}=this.sourceRasterInfos[0],{operation:n}=this.functionArguments,{domain:r,isInteger:o}=P(n)??{domain:null,isInteger:!1};let i="f32";if(r&&o)i=(0,u.X1)(r[0],r[1]);else if(30===n){const t=e?.[0];i=t?(0,u.X1)(t.min,t.max):(0,u.zw)(s)?s:"s32"}else if(45===n&&(0,u.zw)(s)){const t=e?.map(({max:t})=>-t),n=e?.map(({min:t})=>-t),r=t?.length?Math.min(...t):null,o=n?.length?Math.min(...n):null;i=null!=r&&null!=o?(0,u.X1)(r,o):s.startsWith("s")?s.replace("s","u"):"u1"===s||"u2"===s||"u4"===s?"s8":"u8"===s?"s16":"s32"}t.pixelType=this.outputPixelType=this._getOutputPixelType(i)}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Bs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ss,json:{write:!0,name:"rasterFunctionArguments"}})],Bs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Bs.prototype,"rasterArgumentNames",void 0),Bs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunction")],Bs);const js=Bs;var Zs,zs=s(34727);let Gs=Zs=class extends p{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=0}get normalizedNoDataValues(){const{noDataValues:t}=this;if(!t?.length)return null;let e=!1;const s=t.map(t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){const s=t.trim().split(" ").filter(t=>""!==t.trim()).map(t=>Number(t));return e=e||s.length>0,0===s.length?null:s}return null});return e?s:null}clone(){return new Zs({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"includedRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"noDataValues",void 0),(0,i.Cg)([(0,a.MZ)()],Gs.prototype,"normalizedNoDataValues",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"noDataInterpretation",void 0),Gs=Zs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunctionArguments")],Gs);const Os=Gs;let Ds=class extends w{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{includedRanges:s,normalizedNoDataValues:n}=this.functionArguments;if(!s?.length&&!n?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let r=[];for(let o=0;o<t.bandCount;o++){const t=(0,Kt.Wt)(e,s?.slice(2*o,2*o+2),n?.[o]);if(null==t){r=null;break}r.push(t)}this.lookups=r;const o=null!=n&&n.every(t=>t?.length===n[0]?.length);return{success:!0,supportsGPU:(!s||s.length<=2*Kt.et)&&(!n||o&&n[0].length<=Kt.et)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{outputPixelType:s,lookups:n}=this,{includedRanges:r,noDataInterpretation:o,normalizedNoDataValues:i}=this.functionArguments;return(0,Kt.dK)(e,{includedRanges:r,noDataValues:i,outputPixelType:s,matchAll:1===o,lookups:n})}_getWebGLParameters(){const{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,s=new Float32Array(Kt.et);s.fill(zs.pq),e?.[0]?.length&&s.set(e[0]);const n=new Float32Array(6);for(let e=0;e<n.length;e+=2)n[e]=t?.[e]??-zs.pq,n[e+1]=t?.[e+1]??zs.pq;return t?.length&&n.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:s,includedRanges:n}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ds.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Os,json:{write:!0,name:"rasterFunctionArguments"}})],Ds.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Ds.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ds.prototype,"lookups",void 0),Ds=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunction")],Ds);const Es=Ds;var Vs;let Us=Vs=class extends p{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){const{visibleBandID:t,infraredBandID:e,scientificOutput:s}=this;return new Vs({visibleBandID:t,infraredBandID:e,scientificOutput:s})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"visibleBandID",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"infraredBandID",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"scientificOutput",void 0),Us=Vs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunctionArguments")],Us);const Ls=Us;let $s=class extends w{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{scientificOutput:t,visibleBandID:e,infraredBandID:s}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");const n=this.sourceRasterInfos[0],r=Math.max(e,s);if(n.bandCount<2||r>=n.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};if(e<0||s<0)return{success:!1,supportsGPU:!1,error:"ndvi-function: invalid visible or infrared band id"};const o=n.clone();o.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(o),o.bandCount=1,o.keyProperties={...o.keyProperties,BandProperties:void 0};const[i,a,u,l]=t?[-1,1,0,.1]:[0,200,100,10];return o.statistics=[{min:i,max:a,avg:u,stddev:l}],this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;let{visibleBandID:s,infraredBandID:n,scientificOutput:r}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this;n=t.indexOf(n),s=t.indexOf(s)}return function(t,e,s,n){const{mask:r,pixels:o,width:i,height:a}=t,u=o[s],l=o[e],c=l.length,p=n?new Uint8Array(c):new Float32Array(c),h=n?100:1,m=n?100.5:0;for(let t=0;t<c;t++)if(null==r||r[t]){const e=u[t],s=l[t],n=e+s;n&&(p[t]=(e-s)/n*h+m)}const d=new g.A({width:i,height:a,mask:r,pixelType:n?"u8":"f32",pixels:[p]});return d.updateStatistics(),d}(e,s,n,!r)}_getWebGLParameters(){const{visibleBandID:t,infraredBandID:e,scientificOutput:s}=this.functionArguments;return{bandIndexMat3:qt(this.isInputBandIdsSwizzled?[0,1,2]:[e,t,0]),scaled:!s}}_getInputBandIds(t){const{visibleBandID:e,infraredBandID:s}=this.functionArguments;return[s,e,0].map(e=>t[e])}_swizzleBandIds(t){const{visibleBandID:e,infraredBandID:s}=this.functionArguments,n=[e,s].map(e=>t.indexOf(e));return n[2]=n[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=n,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],$s.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ls,json:{write:!0,name:"rasterFunctionArguments"}})],$s.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],$s.prototype,"rasterArgumentNames",void 0),$s=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunction")],$s);const Ks=$s;var Ws;let Hs=Ws=class extends p{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new Ws({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"inputRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"outputValues",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"noDataRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"allowUnmatched",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"replacementValue",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"isLastInputRangeInclusive",void 0),Hs=Ws=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunctionArguments")],Hs);const qs=Hs;let Js=class extends w{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;t.bandCount=1;const{statistics:s}=t;this._removeStatsHistColormapVAT(t);const{allowUnmatched:n,replacementValue:r,outputValues:o,inputRanges:i,noDataRanges:a,isLastInputRangeInclusive:l}=this.functionArguments,c="unknown"===this.outputPixelType||null==this.outputPixelType;if(this.outputPixelType=this._getOutputPixelType(e),o?.length){const i=s?.[0];if(n&&null==r){let e=i?.min??o[0],s=i?.max??o[0];e=Math.min.apply(null,[...o,e]),s=Math.max.apply(null,[...o,s]),t.statistics=[{min:e,max:s,avg:i?.avg??0,stddev:i?.stddev??-1}]}else{let e=o[0],s=e;for(let t=0;t<o.length;t++)e=e>o[t]?o[t]:e,s=s>o[t]?s:o[t];n&&null!=r&&(e=Math.min(e,r),s=Math.max(s,r)),t.statistics=[{min:e,max:s,avg:i?.avg??0,stddev:i?.stddev??-1}]}if(c){const{min:s,max:i}=t.statistics[0],a=["u8","s8","u16","s16","u32","s32","f32"],l=a.find(t=>{const[e,n]=(0,u.hP)(t);return s>=e&&i<=n})??"f64";o.some(t=>Math.floor(t)!==t)?this.outputPixelType="f64"===l?"f64":"f32":this.outputPixelType=n&&null==r&&a.indexOf(e)>a.indexOf(l)?e:l}}return t.pixelType=this.outputPixelType,this.rasterInfo=t,this.lookup=n?null:(0,Kt.XU)({srcPixelType:e,inputRanges:i,outputValues:o,noDataRanges:a,allowUnmatched:n,isLastInputRangeInclusive:l,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!o||o.length<=Kt.et)&&(!a||a.length<=Kt.et)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{lookup:s,outputPixelType:n}=this;if(s){const t=(0,Kt.eH)(e,{lut:[s.lut],offset:s.offset,outputPixelType:n});return null!=t&&s.mask&&(t.mask=(0,Kt.UK)(e.pixels[0],e.mask,s.mask,s.offset,"u8")),t}const{inputRanges:r,outputValues:o,noDataRanges:i,allowUnmatched:a,isLastInputRangeInclusive:u,replacementValue:l}=this.functionArguments;return(0,Kt.Ew)(e,{inputRanges:r,outputValues:o,noDataRanges:i,outputPixelType:n,allowUnmatched:a,isLastInputRangeInclusive:u,replacementValue:l})}_getWebGLParameters(){const{allowUnmatched:t,noDataRanges:e,isLastInputRangeInclusive:s}=this.functionArguments,n=this.functionArguments.inputRanges??[],r=this.functionArguments.outputValues??[],o=(0,Kt.bL)(n,r,s),i=new Float32Array(2*Kt.et);return i.fill(zs.pq),e?.length&&i.set(e),{allowUnmatched:t,rangeMaps:o,noDataRanges:i,clampRange:(0,u.hP)(this.outputPixelType),replacementValue:this.functionArguments.replacementValue}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Js.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:qs,json:{write:!0,name:"rasterFunctionArguments"}})],Js.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Js.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Js.prototype,"lookup",void 0),Js=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunction")],Js);const Xs=Js;var Qs;let Ys=Qs=class extends Is{readColorRamp(t){if("string"==typeof t){const e=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return e?(0,ge.M5)(ge.kH.fromJSON(e)):null}return"toJSON"in t?t.toJSON():t}clone(){return new Qs({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,colorRamp:this.colorRamp,colormap:this.colormap,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ys.prototype,"colorRamp",void 0),(0,i.Cg)([(0,ye.w)("colorRamp")],Ys.prototype,"readColorRamp",null),(0,i.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],Ys.prototype,"colormap",void 0),Ys=Qs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunctionArguments")],Ys);const tn=Ys;let en=class extends w{constructor(){super(...arguments),this.functionName="ShadedRelief",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: source data must be single band"};let{colorRamp:e,colormap:s}=this.functionArguments;if(!e&&!s?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a color ramp argument must be specified"};this.outputPixelType=this._getOutputPixelType("u8");const n=t.clone();this._removeStatsHistColormapVAT(n),n.pixelType=this.outputPixelType,n.bandCount=3,n.statistics=[{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=n,this.isGCS=n.spatialReference?.isGeographic??!1,s?.length||(s=(0,ge.R8)(e,{interpolateAlpha:!0}));const{indexedColormap:r,offset:o}=(0,Kt.zg)({colormap:s});if(!r?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a valid colorramp is required"};const i=(0,ge.S2)(r);return this.lookup={indexedColormap:r,offset:o,hsvMap:i},{success:!0,supportsGPU:(0,Re.WN)(r)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(!e||!this.lookup)return null;let s=t.primaryPixelSizes?.[0];if(null==s){const{extent:n}=t;s=n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1}}const n=(0,zt.PP)(this.functionArguments,s,this.isGCS),r=(0,zt.fw)(e,n),o=this.sourceRasterInfos[0].statistics?.[0]??{min:0,max:8e3};return(0,zt.SC)(r,e,this.lookup.hsvMap,o),r.pixelType=this.outputPixelType,r}_getWebGLParameters(){const t=(0,zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,zt.ng)(t),{slopeType:s,zFactor:n,pixelSizeFactor:r,pixelSizePower:o}=this.functionArguments,i="scaled"===s,{indexedColormap:a,offset:l}=this.lookup,c=this.sourceRasterInfos[0].statistics?.[0],p=(0,u.zw)(this.outputPixelType);return{...e,indexedColormap:a,offset:l,zFactor:n,gcsFactor:this.isGCS?zt.rk:1,pixelSizeFactor:i?r:0,pixelSizePower:i?o:0,minValue:c?.min??0,maxValue:c?.max??8e3,isOutputRounded:p}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],en.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:tn,json:{write:!0,name:"rasterFunctionArguments"}})],en.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],en.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],en.prototype,"isGCS",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],en.prototype,"lookup",void 0),en=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunction")],en);const sn=en;var nn;const rn=new Dt.J({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let on=nn=class extends p{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new nn({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,i.Cg)([(0,Qt.e)(rn)],on.prototype,"slopeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],on.prototype,"zFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"psPower",write:!0}})],on.prototype,"pixelSizePower",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"psZFactor",write:!0}})],on.prototype,"pixelSizeFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],on.prototype,"removeEdgeEffect",void 0),on=nn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunctionArguments")],on);const an=on;let un=class extends w{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),t.statistics="percent-rise"!==this.functionArguments.slopeType?[{min:0,max:90,avg:1,stddev:1}]:null,t.bandCount=1,this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:s,slopeType:n,pixelSizePower:r,pixelSizeFactor:o}=this.functionArguments,{isGCS:i}=this,{extent:a,primaryPixelSizes:u}=t,l=u?.[0],c=l??(a?{x:a.width/e.width,y:a.height/e.height}:{x:1,y:1});return(0,zt.yy)(e,{zFactor:s,slopeType:n,pixelSizePower:r,pixelSizeFactor:o,isGCS:i,resolution:c})}_getWebGLParameters(){const{zFactor:t,slopeType:e,pixelSizeFactor:s,pixelSizePower:n}=this.functionArguments;return{zFactor:this.isGCS&&t>=1?t*zt.rk:t,slopeType:e,pixelSizeFactor:s??0,pixelSizePower:n??0,isOutputRounded:(0,u.zw)(this.outputPixelType)}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],un.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:an,json:{write:!0,name:"rasterFunctionArguments"}})],un.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],un.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],un.prototype,"isGCS",void 0),un=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunction")],un);const ln=un;var cn;let pn=cn=class extends p{clone(){return new cn({conversionMatrix:[...this.conversionMatrix],raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],pn.prototype,"conversionMatrix",void 0),pn=cn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunctionArguments")],pn);const hn=pn;let mn=class extends w{constructor(){super(...arguments),this.functionName="SpectralConversion",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,{success:!0,supportsGPU:3===t.bandCount&&9===this.functionArguments.conversionMatrix.length}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:function(t,e,s){const{width:n,height:r,mask:o,bandMasks:i}=t,a=i?.length?g.A.combineBandMasks(i):o,u=[],l=t.pixels.length;for(let n=0;n<e.length/l;n++){const r=xs(t,e.slice(n*l,(n+1)*l),s,a);u.push(r)}const c=new g.A({width:n,height:r,pixels:u,pixelType:s,mask:a});return c.updateStatistics(),c}(e,this.functionArguments.conversionMatrix,this.outputPixelType)}_getWebGLParameters(){const t=(0,u.hP)(this.outputPixelType),[e,s,n,r,o,i,a,l,c]=this.functionArguments.conversionMatrix;return{weights:[e,r,a,s,o,l,n,i,c],clampRange:t}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],mn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:hn,json:{write:!0,name:"rasterFunctionArguments"}})],mn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],mn.prototype,"rasterArgumentNames",void 0),mn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunction")],mn);const dn=mn,gn=new Dt.J({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function fn(t,e){const{fillNoDataOnly:s}=e,{band:n,width:r,height:o,mask:i,outBand:a}=t;if(s&&!i)return void a.set(n);const{statisticsType:u,kernelRows:l,kernelCols:c}=e,p="stddev"===u,h=r*o,m=new Float64Array(h),d=new Float64Array(h),g=new Uint32Array(h);for(let t=0;t<o;t++){const e=t*r;let s=0,o=0,a=0;for(let t=0;t<c;t++)i&&!i[e+t]||(s+=n[e+t],p&&(o+=n[e+t]**2),a++);m[e]=s,d[e]=o,g[e]=a;for(let t=1;t<=r-c;t++){const r=e+t-1,u=r+c;i?(i[r]&&(a--,s-=n[r],p&&(o-=n[r]**2)),i[u]&&(a++,s+=n[u],p&&(o+=n[u]**2))):(s-=n[r],s+=n[u],p&&(o-=n[r]**2,o+=n[u]**2)),m[e+t]=s,g[e+t]=a,p&&(d[e+t]=o)}}const f=new Float64Array(h),y=new Float64Array(h),x=new Uint32Array(h),w=l*r;for(let t=0;t<=r-c;t++){let e=0,s=0,n=0;for(let o=0;o<l;o++){const i=o*r+t;e+=m[i],n+=g[i],p&&(s+=d[i])}f[t]=e,y[t]=s,x[t]=n;for(let i=1;i<=o-l;i++){const o=(i-1)*r+t,a=o+w;e-=m[o],e+=m[a],n-=g[o],n+=g[a],p&&(s-=d[o],s+=d[a]),f[i*r+t]=e,y[i*r+t]=s,x[i*r+t]=n}}const A=Math.floor(l/2),v=Math.floor(c/2);for(let t=A;t<o-A;t++){const e=t*r;for(let n=v;n<r-v;n++){const o=(t-A)*r+n-v,u=x[o];if(0===u||s&&(!i||i[e+n]))continue;const l=f[o]/u,c=p?Math.sqrt((y[o]-f[o]*l)/u):l;a[e+n]=c,i&&(i[e+n]=255)}}}function yn(t,e){const{fillNoDataOnly:s}=e,{band:n,width:r,height:o,mask:i,outBand:a}=t;if(s&&!i)return void a.set(n);const{kernelRows:u,kernelCols:l,statisticsType:c}=e,p=Math.floor(u/2),h=Math.floor(l/2),m="min"===c,d=a.slice(),g=new Uint32Array(r*o);for(let t=p;t<o-p;t++){const e=t*r;for(let t=h;t<r-h;t++){let s=m?Number.MAX_VALUE:-Number.MAX_VALUE,o=0;for(let a=0;a<u;a++)for(let u=0;u<l;u++){const l=e+t+(a-p)*r+u-h;i&&!i[l]||(s=m?Math.min(s,n[l]):Math.max(s,n[l]),o++)}i?(d[e+t]=0===o?0:s,g[e+t]=o):a[e+t]=0===o?0:s}}if(i)for(let t=p;t<o-p;t++){const e=t*r;for(let t=h;t<r-h;t++)if(g[e+t]){if(s&&i[e+t])continue;a[e+t]=d[e+t],i[e+t]=255}}}function xn(t,e){const{fillNoDataOnly:s}=e,{band:n,width:r,height:o,mask:i,outBand:a}=t;if(s&&!i)return void a.set(n);const{kernelRows:u,kernelCols:l}=e,c=Math.floor(u/2),p=Math.floor(l/2),h=a.slice(),m=new Uint32Array(r*o);for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++){if(s&&i?.[e+t])continue;const o=[];for(let s=0;s<u;s++)for(let a=0;a<l;a++){const u=e+t+(s-c)*r+a-p;i&&!i[u]||o.push(n[u])}o.length&&(o.sort((t,e)=>t-e),i?(h[e+t]=o[Math.floor((o.length-1)/2)],m[e+t]=o.length):a[e+t]=o[Math.floor((o.length-1)/2)])}}if(i)for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++)if(m[e+t]){if(s&&i[e+t])continue;a[e+t]=h[e+t],i[e+t]=255}}}function wn(t,e){const{fillNoDataOnly:s}=e,{band:n,width:r,height:o,mask:i,outBand:a}=t;if(s&&!i)return void a.set(n);const{kernelRows:u,kernelCols:l}=e,c=Math.floor(u/2),p=Math.floor(l/2),h="majority"===e.statisticsType,m=u*l,d=a.slice(),g=new Uint32Array(r*o);for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++){if(s&&i?.[e+t])continue;const o=new Map;for(let s=0;s<u;s++)for(let a=0;a<l;a++){const u=e+t+(s-c)*r+a-p;if(i&&!i[u])continue;const l=n[u];o.set(l,o.has(l)?o.get(l)+1:1)}if(0===o.size)continue;let f=0,y=0,x=h?0:m+1;for(const t of o.keys())y=o.get(t),h===y>x&&(x=y,f=t);i?(d[e+t]=f,g[e+t]=o.size):a[e+t]=f}}if(i)for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++)if(g[e+t]){if(s&&i[e+t])continue;a[e+t]=d[e+t],i[e+t]=255}}}var An;let vn=An=class extends p{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new An({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:(0,o.o8)(this.raster)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelRows","rows"],reader:(t,e)=>Number(t??e?.kernelRows??3)}}})],vn.prototype,"rows",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelCols","cols"],reader:(t,e)=>Number(t??e?.kernelCols??3)}}})],vn.prototype,"cols",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],vn.prototype,"fillNoDataOnly",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:{source:["statisticsType","type"],reader:(t,e)=>gn.fromJSON(e?.statisticsType??e?.type)??"min"},write:{target:"type"}}}),(0,Qt.e)(gn)],vn.prototype,"statisticsType",void 0),vn=An=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunctionArguments")],vn);const Cn=vn;let bn=class extends w{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{type:t}=this.functionArguments.toJSON();if(t<1||t>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${t}`};const e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const s=e.clone();s.pixelType=this.outputPixelType;const{statisticsType:n}=this.functionArguments;return"stddev"===n&&this._removeStatsHistColormapVAT(s),this.rasterInfo=s,{success:!0,supportsGPU:s.bandCount<=3&&t<5}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{statisticsType:s,rows:n,cols:r,fillNoDataOnly:o}=this.functionArguments;return function(t,e){const{mask:s}=t,{fillNoDataOnly:n}=e;if(n&&!s)return t;const{pixels:r,width:o,height:i,bandMasks:a,pixelType:u}=t,l=r.length,c=o*i,p=[],{kernelRows:h,kernelCols:m,statisticsType:d,mirrorEdges:f}=e;if(n&&!s)return t;const y=e.outputPixelType??u,x=[];for(let t=0;t<l;t++){const u=r[t],l=g.A.createEmptyBand(y,c);n&&l.set(u);const w=a?.[t]??s,A=w?.slice()??null,v={band:u,width:o,height:i,mask:A,outBand:l};switch(d){case"min":case"max":yn(v,e);break;case"mean":case"stddev":fn(v,e);break;case"median":xn(v,e);break;case"majority":case"minority":wn(v,e)}f&&!n&&Qe(l,o,i,h,m),p.push(l),A&&x.push(A)}let w=x[0]??s;x.length!==l&&(x.length=0),l>1&&a?.length&&(w=g.A.combineBandMasks(a));const A=new g.A({pixelType:y,width:o,height:i,pixels:p,bandMasks:a&&x.length?x:null,mask:w});return A.updateStatistics(),A}(e,{kernelRows:n,kernelCols:r,fillNoDataOnly:o,outputPixelType:this.outputPixelType,statisticsType:s,mirrorEdges:!0})}_getWebGLParameters(){const{rows:t,cols:e,statisticsType:s,fillNoDataOnly:n}=this.functionArguments;return{fillNoDataOnly:n,kernelRows:t,kernelCols:e,statisticsType:s,clampRange:(0,u.hP)(this.outputPixelType)}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],bn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Cn,json:{write:!0,name:"rasterFunctionArguments"}})],bn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],bn.prototype,"rasterArgumentNames",void 0),bn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunction")],bn);const Mn=bn;var Tn;let Pn=Tn=class extends p{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,e){if(!t?.length)return null;const s=[];return t.forEach(t=>{const e={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};s.push(e)}),s}writeStatistics(t,e,s){if(!t?.length)return;const n=[];t.forEach(t=>{const e={...t,mean:t.avg,standardDeviation:t.stddev};delete e.avg,delete e.stddev,n.push(e)}),e[s]=n}clone(){return new Tn({statistics:(0,o.o8)(this.statistics),histograms:(0,o.o8)(this.histograms)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Pn.prototype,"statistics",void 0),(0,i.Cg)([(0,ye.w)("statistics")],Pn.prototype,"readStatistics",null),(0,i.Cg)([(0,Se.K)("statistics")],Pn.prototype,"writeStatistics",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Pn.prototype,"histograms",void 0),Pn=Tn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunctionArguments")],Pn);const Nn=Pn;let In=class extends w{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");const e=t.clone(),{statistics:s,histograms:n}=this.functionArguments;return n&&(e.histograms=n),s&&(e.statistics=s),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],In.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Nn,json:{write:!0,name:"rasterFunctionArguments"}})],In.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],In.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],In.prototype,"indexedColormap",void 0),(0,i.Cg)([(0,a.MZ)()],In.prototype,"isNoopProcess",void 0),In=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunction")],In);const Rn=In;var Fn;const kn=new Dt.J({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let _n=Fn=class extends p{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(t,e,s){t?.length&&(Array.isArray(t[0])||(t=t.map(t=>[t.min,t.max,t.avg,t.stddev])),e[s]=t)}clone(){return new Fn({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:(0,o.o8)(this.statistics),gamma:(0,o.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:(0,o.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_n.prototype,"computeGamma",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{name:"dra",write:!0}})],_n.prototype,"dynamicRangeAdjustment",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],_n.prototype,"gamma",void 0),(0,i.Cg)([(0,a.MZ)()],_n.prototype,"histograms",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"maxPercent",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"minPercent",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"numberOfStandardDeviations",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"max",write:!0}})],_n.prototype,"outputMax",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"min",write:!0}})],_n.prototype,"outputMin",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"sigmoidStrengthLevel",void 0),(0,i.Cg)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],_n.prototype,"statistics",void 0),(0,i.Cg)([(0,Se.K)("statistics")],_n.prototype,"writeStatistics",null),(0,i.Cg)([(0,Qt.e)(kn)],_n.prototype,"stretchType",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_n.prototype,"useGamma",void 0),_n=Fn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunctionArguments")],_n);const Sn=_n;let Bn=class extends w{constructor(){super(...arguments),this.functionName="Stretch",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null,this.cutOffs=null}_bindSourceRasters(){this.lookup=null,this.cutOffs=null;const t=this.sourceRasterInfos[0],{pixelType:e}=t,{functionArguments:s}=this,{dynamicRangeAdjustment:n,gamma:r,useGamma:o}=s;if(!n&&["u8","u16","s8","s16"].includes(e)){const n=(0,qe.DP)(s.toJSON(),{rasterInfo:t}),i=(0,u.zw)(this.outputPixelType)?"round":"float";this.lookup=(0,qe.RP)({pixelType:e,...n,gamma:o?r:null,rounding:i}),this.cutOffs=n}else n||(this.cutOffs=(0,qe.DP)(s.toJSON(),{rasterInfo:t}));this.outputPixelType=this._getOutputPixelType(e);const i=t.clone();i.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(i),"u8"===this.outputPixelType&&(i.keyProperties.DataType="processed");const{outputMin:a=0,outputMax:l=255}=this.functionArguments;i.statistics=[];for(let t=0;t<i.bandCount;t++)i.statistics[t]={min:a,max:l};return this.rasterInfo=i,{success:!0,supportsGPU:!n}}_processPixels(t,e){const s=t.pixelBlocks?.[0];if(null==s)return s;const{lookup:n}=this;if(n)return(0,Kt.eH)(s,{...n,outputPixelType:this.rasterInfo.pixelType});const{functionArguments:r}=this,o=e?.stretchCutoff??this.cutOffs??(0,qe.DP)(r.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:s}),i=r.useGamma?r.gamma:null;return(0,qe._N)(s,{...o,gamma:i,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const{outputMin:t=0,outputMax:e=255,gamma:s,useGamma:n}=this.functionArguments,r=this.rasterInfo.bandCount>=2?3:1,o=n&&s?.length?(0,qe.Nh)(r,s):[1,1,1],{minCutOff:i,maxCutOff:a}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};1===i.length&&(i[1]=i[2]=i[0],a[1]=a[2]=a[0]);const l=a.map((s,n)=>(e-t)/(a[n]-i[n])),c=(0,u.zw)(this.outputPixelType),p=n&&s?[s[0],s[1]??s[0],s[2]??s[0]]:[1,1,1],h=n?[o[0],o[1]??o[0],o[2]??o[0]]:[1,1,1];return{bandCount:r,minOutput:t,maxOutput:e,minCutOff:i,maxCutOff:a,factor:l,useGamma:n,gamma:p,gammaCorrection:h,stretchType:this.functionArguments.stretchType,isOutputRounded:c,type:"stretch"}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Bn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Sn,json:{write:!0,name:"rasterFunctionArguments"}})],Bn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Bn.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Bn.prototype,"lookup",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Bn.prototype,"cutOffs",void 0),Bn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunction")],Bn);const jn=Bn;var Zn;let zn=Zn=class extends p{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new Zn({attributeTableAsRecordSet:(0,o.o8)(this.attributeTableAsRecordSet)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],zn.prototype,"attributeTableAsRecordSet",void 0),zn=Zn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunctionArguments")],zn);const Gn=zn;let On=class extends w{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1||t.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};const{attributeTableAsRecordSet:e}=this.functionArguments;if(!e)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(t.pixelType);const s=t.clone();return s.pixelType=this.outputPixelType,s.bandCount=1,"thematic"!==s.dataType&&(s.keyProperties=s.keyProperties?{...s.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=s,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],On.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Gn,json:{write:!0,name:"rasterFunctionArguments"}})],On.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],On.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],On.prototype,"isNoopProcess",void 0),On=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunction")],On);const Dn=On,En=new Map;function Vn(t,e){const{rasterFunctionArguments:s}=t;s&&(s.rasters||[s.raster,s.raster2]).forEach(t=>{t&&"number"!=typeof t&&("string"==typeof t?t.startsWith("http")&&(e.includes(t)||e.push(t)):"rasterFunctionArguments"in t&&Vn(t,e))})}function Un(t,e){e=e??{};try{if("function"in(t=(0,o.o8)(t))&&"arguments"in t&&t.arguments){const s=Jn(t,new Map,e);if(Qn(s),!s.renderingRule)throw new r.A("raster-function-helper","Unsupported raster function json.");t=s.renderingRule}if("rasterFunction"in t){const s=Kn(t=$n(t),e);return s.isRoot=!0,s}}catch{}throw new r.A("raster-function-helper","unsupported raster function json.")}function Ln(t){return!!(t&&"object"==typeof t&&t.rasterFunction&&t.rasterFunctionArguments)}function $n(t){const{rasterFunction:e,rasterFunctionArguments:s}=t,n={};for(const t in s){let e=s[t];const r=t.toLowerCase();if("rasters"===r&&Array.isArray(e))n.rasters=e.map(t=>Ln(t)?$n(t):t);else switch(Ln(e)&&(e=$n(e)),r){case"dra":n.dra=e;break;case"pspower":n.psPower=e;break;case"pszfactor":n.psZFactor=e;break;case"bandids":n.bandIds=e;break;default:n[t[0].toLowerCase()+t.slice(1)]=e}}return"Local"!==e||n.rasters?.length||(n.rasters=["$$"]),{...t,rasterFunctionArguments:n}}function Kn(t,e){const{rasterFunction:s,rasterFunctionArguments:n}=t,o=t.outputPixelType?.toLowerCase();if(null==s||!En.has(s))throw new r.A("raster-function-helper",`unsupported raster function: ${s}`);const i=En.get(s),a=("function"==typeof i.ctor?i.ctor:i.ctor.default).fromJSON({...t,outputPixelType:o}),{rasterArgumentNames:u}=a,l=[],c=function(t,e){return"rasters"===e[0]&&Array.isArray(t.rasters)?t.rasters:e.map(e=>t[e])}(n,u),p="rasters"===u[0]||u.length>1,h=[];for(let t=0;t<c.length;t++){const s=c[t];let n;null==s||"string"==typeof s&&s.startsWith("$")?l.push(e?.raster):"string"==typeof s?e[s]&&l.push(e[s]):"number"!=typeof s&&"rasterFunction"in s&&(n=Kn(s,e),p||(a.functionArguments[u[t]]=n),l.push(n)),p&&h.push(n??s)}if(p&&("rasters"===u[0]?a.functionArguments.rasters=h:u.forEach((t,e)=>{a.functionArguments[t]=h[e]})),e){a.sourceRasters=l;const t=e.raster?.url;t&&(a.mainPrimaryRasterId=t)}return a}function Wn(t,e){if(t&&e)for(const s in t){const n=t[s];n&&"object"==typeof n&&"type"in n&&("RasterFunctionTemplate"===n.type?Wn(n.arguments,e):"RasterFunctionVariable"===n.type&&null!=e[n.name]&&(n.value=e[n.name]))}}function Hn(t,e){if(!t||"object"!=typeof t)return t;const{value:s}=t;if(!s||"object"!=typeof s)return t.isDataset?"$$":s;if(Array.isArray(s))return 0===s.length?[]:s.map(t=>t&&"object"==typeof t&&"RasterFunctionVariable"===t.type?Hn(t,e):t);if("value"in s&&["number","string","boolean"].includes(typeof s.value))return s.value;if(t.isDataset&&"Scalar"!==s.type)return"$$";if(!("type"in s))return s;let n=s;switch(s.type){case"Scalar":n=s.value;break;case"AlgorithmicColorRamp":n=qn(s);break;case"MultiPartColorRamp":n={type:"multipart",colorRamps:s.ArrayOfColorRamp.map(qn)};break;case"ArgumentArray":if(s.elements?.length&&"RasterStatistics"!==s.elements[0].type){const t=[];for(let n=0;n<s.elements.length;n++){const o=s.elements[n],{type:i}=o;if(i)if("RasterFunctionTemplate"===i){const{renderingRule:s}=Jn(o,e);t.push(s),null!=o._object_id&&e.set(o._object_id,s)}else{if("RasterFunctionVariable"!==i)throw new r.A("raster-function-helper","unsupported raster function json.");{const s=Hn(o,e);t.push(s),null!=o._object_id&&e.set(o._object_id,s)}}else t.push(o)}n=t}else n=s.elements}return null!=s._object_id&&e.set(s._object_id,n),n}function qn(t){const e=t.algorithm??"esriHSVAlgorithm";let{FromColor:s,ToColor:r}=t;if(!Array.isArray(s)){const{r:t,g:e,b:r}=(0,n.$)({h:s.Hue,s:s.Saturation,v:s.Value});s=[t,e,r,s.AlphaValue]}if(!Array.isArray(r)){const{r:t,g:e,b:s}=(0,n.$)({h:r.Hue,s:r.Saturation,v:r.Value});r=[t,e,s,r.AlphaValue]}return{type:"algorithmic",algorithm:e,fromColor:s,toColor:r}}function Jn(t,e,s){s&&Wn(t,s);const n={renderingRule:{},templates:e};return Xn(t,n),n}function Xn(t,e){if(!t||!e.renderingRule)return;const{renderingRule:s,templates:n}=e,{function:r,arguments:o,_object_id:i}=t;if(!r||!o)return;null!=i&&n.set(i,s),s.rasterFunction=r.type.replace("Function",""),s.outputPixelType=r.pixelType;const a={};s.rasterFunctionArguments=a;for(const t in o){if("type"===t||"object_id"===t||"_object_ref_id"===t)continue;const e=o[t];e&&"object"==typeof e&&"type"in e&&("RasterFunctionTemplate"===e.type||"RasterFunctionVariable"===e.type)?("RasterFunctionVariable"===e.type?a[t]=Hn(e,n):(s.rasterFunctionArguments[t]={},Xn(e,{renderingRule:s.rasterFunctionArguments[t],templates:n})),null!=e._object_id&&n.set(e._object_id,a[t])):a[t]=e}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),s.rasterFunction){case"Stretch":!function(t){t.Statistics?.length&&"object"==typeof t.Statistics&&(t.Statistics=t.Statistics.map(t=>[t.min,t.max,t.mean,t.standardDeviation])),null!=t.NumberOfStandardDeviation&&(t.NumberOfStandardDeviations=t.NumberOfStandardDeviation,delete t.NumberOfStandardDeviation)}(a);break;case"Colormap":!function(t){"randomcolorramp"===t.ColorRamp?.type?.toLowerCase()&&(delete t.ColorRamp,t.ColormapName="Random"),0===t.ColorSchemeType&&delete t.ColorRamp}(a);break;case"Convolution":!function(t){null!=t.ConvolutionType&&(t.Type=t.ConvolutionType,delete t.ConvolutionType)}(a);break;case"Mask":!function(t){t.NoDataValues?.length&&"string"==typeof t.NoDataValues[0]&&(t.NoDataValues=t.NoDataValues.filter(t=>""!==t).map(t=>Number(t)))}(a)}}function Qn(t){const{renderingRule:e,templates:s}=t;if("object"!=typeof e||!e?.rasterFunctionArguments||!s.size)return;const{rasterFunctionArguments:n}=e;for(const t in n){const e=n[t],o="_object_ref_id"===t?e:e&&"object"==typeof e&&"_object_ref_id"in e?e._object_ref_id:null;if(null!=o){if(!s.has(o))throw new r.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${o} does not exist`);const e=s.get(o);"_object_ref_id"!==t?n[t]=e:e&&"object"==typeof e&&Object.assign(n,e);continue}e&&"object"==typeof e&&(e.rasterFunctionArguments&&Qn({renderingRule:e,templates:s}),Array.isArray(e)&&e.forEach((t,n)=>{if(t&&"object"==typeof t)if(null!=t._object_ref_id){if(!s.has(t._object_ref_id))throw new r.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${e} does not exist`);const i=s.get(o);i&&"object"==typeof i?Object.assign(t,i):e[n]=i}else Qn({renderingRule:t,templates:s})}))}}En.set("Arithmetic",{desc:"Arithmetic Function",ctor:St,rasterArgumentNames:["rasters"]}),En.set("Aspect",{desc:"Aspect Function",ctor:Ot,rasterArgumentNames:["raster"]}),En.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:ne,rasterArgumentNames:["raster"]}),En.set("Colormap",{desc:"Colormap Function",ctor:Me,rasterArgumentNames:["raster"]}),En.set("ColormapToRGB",{desc:"ColormapToRGB Function",ctor:ke,rasterArgumentNames:["raster"]}),En.set("CompositeBand",{desc:"CompositeBand Function",ctor:ze,rasterArgumentNames:["rasters"]}),En.set("ComputeChange",{desc:"ComputeChange Function",ctor:$e,rasterArgumentNames:["rasters"]}),En.set("Convolution",{desc:"Convolution Function",ctor:is,rasterArgumentNames:["raster"]}),En.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Xe,rasterArgumentNames:["raster"]}),En.set("ExtractBand",{desc:"ExtractBand Function",ctor:ys,rasterArgumentNames:["raster"]}),En.set("Curvature",{desc:"Curvature Function",ctor:hs,rasterArgumentNames:["raster"]}),En.set("Hillshade",{desc:"Hillshade Function",ctor:Fs,rasterArgumentNames:["raster"]}),En.set("ShadedRelief",{desc:"ShadedRelief Function",ctor:sn,rasterArgumentNames:["raster"]}),En.set("Grayscale",{desc:"Grayscale Function",ctor:bs,rasterArgumentNames:["raster"]}),En.set("Clip",{desc:"Clip Function",ctor:me,rasterArgumentNames:["raster"]}),En.set("Local",{desc:"Local Function",ctor:js,rasterArgumentNames:["rasters"]}),En.set("Mask",{desc:"Mask Function",ctor:Es,rasterArgumentNames:["raster"]}),En.set("NDVI",{desc:"NDVI Function",ctor:Ks,rasterArgumentNames:["raster"]}),En.set("Remap",{desc:"Remap Function",ctor:Xs,rasterArgumentNames:["raster"]}),En.set("Slope",{desc:"Slope Function",ctor:ln,rasterArgumentNames:["raster"]}),En.set("SpectralConversion",{desc:"Spectral Conversion",ctor:dn,rasterArgumentNames:["raster"]}),En.set("Statistics",{desc:"Focal Statistics Function",ctor:Mn,rasterArgumentNames:["raster"]}),En.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:Rn,rasterArgumentNames:["raster"]}),En.set("Stretch",{desc:"Stretch Function",ctor:jn,rasterArgumentNames:["raster"]}),En.set("Table",{desc:"Attribute Table Function",ctor:Dn,rasterArgumentNames:["raster"]})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8594],{52106(e,t,r){r.d(t,{A:()=>S});var n,i,s=r(5482),o=r(37838),l=r(69540),a=r(51447),u=r(25482),c=r(53966),f=r(36708),h=r(24326),p=r(91429),d=r(12195),y=r(65864),m=r(50498),g=r(55156),b=r(60950),v=r(54339),M=r(94128),w=r(33910);function _(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let S=class extends((0,l.OU)(u.o)){static{n=M.Z}static{i=this}constructor(e){super(e),this[n]=!0,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,a.eF)(c.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 i({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=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.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=(0,g.I)(this.origin);if(e)return(0,v.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){const e=(0,g.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:_(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,d.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,n){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=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,f.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,f.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.Cg)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,y.rS)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],S.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,p.MZ)({value:null})],S.prototype,"attributes",null),(0,s.Cg)([(0,p.MZ)({value:null,types:m.yR,json:{read:y.rS}})],S.prototype,"geometry",null),(0,s.Cg)([(0,p.MZ)({type:Boolean})],S.prototype,"isAggregate",void 0),(0,s.Cg)([(0,p.MZ)({clonable:!1})],S.prototype,"layer",void 0),(0,s.Cg)([(0,p.MZ)({clonable:"reference"})],S.prototype,"origin",void 0),(0,s.Cg)([(0,p.MZ)({type:o.A,value:null})],S.prototype,"popupTemplate",null),(0,s.Cg)([(0,p.MZ)({clonable:"reference"})],S.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,p.MZ)({value:null,types:w.Es})],S.prototype,"symbol",null),(0,s.Cg)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],S.prototype,"_version",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,value:!0})],S.prototype,"visible",null),S=i=(0,s.Cg)([(0,p.$K)("esri.Graphic")],S)},38961(e,t,r){r.d(t,{A:()=>c});var n=r(5482),i=r(7762),s=r(36708),o=r(10107),l=r(64108),a=r(80559);let u=class extends i.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,a.fm)(()=>this._refresh(),s.OH))}destroy(){this.getCollections=null}_refresh(){const e=this.getCollections?.();if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new i.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n.Cg)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,n.Cg)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,n.Cg)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,n.Cg)([(0,l.$)("esri.core.CollectionFlattener")],u);const c=u},46140(e,t,r){r.d(t,{A:()=>i});var n=r(49186);class i{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new i(this.major,this.minor,this._context)}static parse(e,t=""){const[r,s]=e.split("."),o=/^\s*\d+\s*$/;if(!r?.match||!o.test(r))throw new n.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!s?.match||!o.test(s))throw new n.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const l=parseInt(r,10),a=parseInt(s,10);return new i(l,a,t)}}},6797(e,t,r){r.d(t,{Ui:()=>h});var n=r(69622),i=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof n.A}function a(e){return e instanceof i.A?Object.keys(e.items):l(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function f(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=a(e),i=a(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.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 s=i.filter(e=>!n.includes(e)),h=n.filter(e=>!i.includes(e)),p=n.filter(r=>i.includes(r)&&u(e,r)!==u(t,r)).concat(s,h).sort(),d=c(e);if(d&&o.has(d)&&p.length)return{type:"complete",oldValue:e,newValue:t};let y;const m=l(e)&&l(t);for(const n of p){const i=u(e,n),s=u(t,n);let o;if((m||"function"!=typeof i&&"function"!=typeof s)&&i!==s&&(null!=i||null!=s)){if(r&&r[n]&&"function"==typeof r[n])o=r[n]?.(i,s);else if(i instanceof Date&&s instanceof Date){if(i.getTime()===s.getTime())continue;o={type:"complete",oldValue:i,newValue:s}}else o="object"==typeof i&&"object"==typeof s&&c(i)===c(s)?f(i,s):{type:"complete",oldValue:i,newValue:s};null!=o&&(null!=y?y.diff[n]=o:y={type:"partial",diff:{[n]:o}})}}return y}function h(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}:f(e,t)}},9093(e,t,r){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>i,vt:()=>n,zK:()=>s});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:n,fromValues:function(e,t,r,n,i,s,o,l,a,u,c,f,h,p,d,y){return[e,t,r,n,i,s,o,l,a,u,c,f,h,p,d,y]}},Symbol.toStringTag,{value:"Module"}))},35522(e,t,r){r.d(t,{$A:()=>x,Bw:()=>s,C:()=>o,Cc:()=>A,DI:()=>_,Il:()=>q,Io:()=>b,Ln:()=>g,Om:()=>I,Qr:()=>f,Re:()=>u,S8:()=>S,T9:()=>y,WQ:()=>a,Z0:()=>T,_S:()=>p,aI:()=>E,ei:()=>C,gL:()=>R,hG:()=>v,hZ:()=>l,hs:()=>m,jb:()=>L,jk:()=>d,lo:()=>N,lw:()=>c,m3:()=>M,oW:()=>j,t2:()=>F,tn:()=>h,uE:()=>D,xg:()=>k,ze:()=>w});var n=r(51850),i=r(34304);function s(e){const t=e[0],r=e[1],n=e[2];return Math.sqrt(t*t+r*r+n*n)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function l(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}function a(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function f(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function h(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function d(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function y(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function m(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function g(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}function b(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}function v(e,t){const r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}function M(e){const t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}function w(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function _(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function S(e,t){const r=t[0],n=t[1],i=t[2];let s=r*r+n*n+i*i;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function I(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function x(e,t,r){const n=t[0],i=t[1],s=t[2],o=r[0],l=r[1],a=r[2];return e[0]=i*a-s*l,e[1]=s*o-n*a,e[2]=n*l-i*o,e}function A(e,t,r,n){const i=t[0],s=t[1],o=t[2];return e[0]=i+n*(r[0]-i),e[1]=s+n*(r[1]-s),e[2]=o+n*(r[2]-o),e}function T(e,t,r){const n=t[0],i=t[1],s=t[2];return e[0]=r[0]*n+r[4]*i+r[8]*s+r[12],e[1]=r[1]*n+r[5]*i+r[9]*s+r[13],e[2]=r[2]*n+r[6]*i+r[10]*s+r[14],e}function C(e,t,r){const n=t[0],i=t[1],s=t[2];return e[0]=n*r[0]+i*r[3]+s*r[6],e[1]=n*r[1]+i*r[4]+s*r[7],e[2]=n*r[2]+i*r[5]+s*r[8],e}function R(e,t,r){const n=r[0],i=r[1],s=r[2],o=r[3],l=t[0],a=t[1],u=t[2],c=i*u-s*a,f=s*l-n*u,h=n*a-i*l,p=i*h-s*f,d=s*c-n*h,y=n*f-i*c,m=2*o;return e[0]=l+c*m+2*p,e[1]=a+f*m+2*d,e[2]=u+h*m+2*y,e}const P=(0,n.vt)(),O=(0,n.vt)();function F(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function E(e,t){if(e===t)return!0;const r=e[0],n=e[1],s=e[2],o=t[0],l=t[1],a=t[2],u=(0,i.FD)();return Math.abs(r-o)<=u*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-l)<=u*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(s-a)<=u*Math.max(1,Math.abs(s),Math.abs(a))}function j(e,t,r){const n=r[0]-t[0],i=r[1]-t[1],s=r[2]-t[2];let o=n*n+i*i+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=n*o,e[1]=i*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const L=u,Z=c,G=f,k=b,N=v,q=s,D=M;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:a,angle:function(e,t){S(P,e),S(O,t);const r=I(P,O);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(e,t,r,n,i,s){const o=1-s,l=o*o,a=s*s,u=l*o,c=3*s*l,f=3*a*o,h=a*s;return e[0]=t[0]*u+r[0]*c+n[0]*f+i[0]*h,e[1]=t[1]*u+r[1]*c+n[1]*f+i[1]*h,e[2]=t[2]*u+r[2]*c+n[2]*f+i[2]*h,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,r=1){return e[0]=Math.min(Math.max(e[0],t),r),e[1]=Math.min(Math.max(e[1],t),r),e[2]=Math.min(Math.max(e[2],t),r),e},copy:o,cross:x,crossAndNormalize:function(e,t,r){const n=t[0],i=t[1],s=t[2],o=r[0],l=r[1],a=r[2],u=i*a-s*l,c=s*o-n*a,f=n*l-i*o,h=Math.sqrt(u*u+c*c+f*f);return e[0]=u/h,e[1]=c/h,e[2]=f/h,e},direction:j,dist:k,distance:b,div:G,divide:f,dot:I,equals:E,exactEquals:F,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,r,n,i,s){const o=s*s,l=o*(2*s-3)+1,a=o*(s-2)+s,u=o*(s-1),c=o*(3-2*s);return e[0]=t[0]*l+r[0]*a+n[0]*u+i[0]*c,e[1]=t[1]*l+r[1]*a+n[1]*u+i[1]*c,e[2]=t[2]*l+r[2]*a+n[2]*u+i[2]*c,e},inverse:_,len:q,length:s,lerp:A,max:y,min:d,mul:Z,multiply:c,negate:w,normalize:S,random:function(e,t=1){const r=i.Ov,n=2*r()*Math.PI,s=2*r()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(n)*o,e[1]=Math.sin(n)*o,e[2]=s*t,e},rotateX:function(e,t,r,n){const i=[],s=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],s[0]=i[0],s[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),s[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},rotateY:function(e,t,r,n){const i=[],s=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],s[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),s[1]=i[1],s[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},rotateZ:function(e,t,r,n){const i=[],s=[];return i[0]=t[0]-r[0],i[1]=t[1]-r[1],i[2]=t[2]-r[2],s[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),s[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),s[2]=i[2],e[0]=s[0]+r[0],e[1]=s[1]+r[1],e[2]=s[2]+r[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:m,scaleAndAdd:g,set:l,sign:p,sqrDist:N,sqrLen:D,squaredDistance:v,squaredLength:M,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:L,subtract:u,transformMat3:C,transformMat4:T,transformQuat:R},Symbol.toStringTag,{value:"Module"}))},159(e,t,r){r.d(t,{A:()=>u});var n,i=r(5482),s=r(69540),o=r(25482),l=r(91429),a=r(99157);let u=n=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new n;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,i.Cg)([(0,l.MZ)({type:[a.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=n=(0,i.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,r){r.d(t,{A:()=>a});var n,i=r(5482),s=r(69540),o=r(25482),l=r(91429);let a=n=class extends((0,s.OU)(o.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new n({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,i.Cg)([(0,l.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,r)=>{t[r]=!e}}})],a.prototype,"isInverse",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkt",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkid",void 0),a=n=(0,i.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)},9762(e,t,r){r.r(t),r.d(t,{projectBuffer:()=>i});var n=r(49208);function i(e,t,r,i,s,o,l=Math.floor(e.length/3)){const a=(0,n.jd)(t,s);if(null==a)return!1;if(a===n.pO){if(e===i&&r===o)return!0;const t=r+3*l;for(let n=r,s=o;n<t;n++,s++)i[s]=e[n]??0;return!0}const u=r+3*l;for(let t=r,n=o;t<u;t+=3,n+=3)a(e,t,i,n);return!0}},49208(e,t,r){r.d(t,{Tp:()=>f,jd:()=>c,pO:()=>p,w5:()=>u});var n=r(34727),i=r(86211),s=r(73941),o=r(79258),l=r(34403),a=r(21325);const u={2:{5:p,7:null,9:null,10:p,1:w,6:null,8:null,0:null,3:y,11:m,2:p,4:A},5:{5:p,7:null,9:null,10:p,1:w,6:null,8:null,0:null,3:y,11:m,2:p,4:A},7:{5:null,7:p,9:null,10:p,1:null,6:M,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:p,10:p,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:d,7:null,9:null,10:d,1:function(e,t,r,n){const i=e[t]/F,s=O-2*Math.atan(Math.exp(-e[t+1]/F)),o=F+(e[t+2]??0),l=Math.cos(s)*o;r[n]=Math.cos(i)*l,r[n+1]=Math.sin(i)*l,r[n+2]=Math.sin(s)*o},6:null,8:null,0:null,3:p,11:function(e,t,r,n){d(e,t,r,n),m(r,n,r,n)},2:d,4:function(e,t,r,n){d(e,t,r,n),A(r,n,r,n)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,r,n){T(e,t,r,n),w(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){T(e,t,r,n),y(r,n,r,n)},11:function(e,t,r,n){T(e,t,r,n),m(r,n,r,n)},2:T,4:p},1:{5:x,7:null,9:null,10:x,1:p,6:null,8:null,0:null,3:function(e,t,r,n){x(e,t,r,n),y(r,n,r,n)},11:function(e,t,r,n){x(e,t,r,n),m(r,n,r,n)},2:x,4:function(e,t,r,n){x(e,t,r,n),A(r,n,r,n)}},6:{5:null,7:I,9:null,10:I,1:null,6:p,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:S,10:S,1:null,6:null,8:p,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:p,3:null,11:null,2:null,4:null},10:{5:p,7:p,9:p,10:p,1:w,6:M,8:v,0:null,3:y,11:m,2:p,4:A},11:{5:g,7:null,9:null,10:g,1:function(e,t,r,n){g(e,t,r,n),w(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){g(e,t,r,n),y(r,n,r,n)},11:p,2:g,4:function(e,t,r,n){g(e,t,r,n),A(r,n,r,n)}}};function c(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===t)return C;const r=h(e,C.source),n=h(t,C.dest);return 0===r&&0===n?(0,a.aI)(e,t)?C.projector=p:C.projector=null:C.projector=u[r][n],C}function h(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,a.oT)(e)?t.spatialReferenceId=2:(0,a.K8)(e)?t.spatialReferenceId=3:(0,a.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,s.q8)(e)?t.spatialReferenceId=7:(0,s.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function p(e,t,r,n){e!==r&&(r[n++]=e[t++],r[n++]=e[t++],r[n]=e[t]??0)}function d(e,t,r,n){r[n]=P*(e[t]/F),r[n+1]=P*(O-2*Math.atan(Math.exp(-e[t+1]/F))),r[n+2]=e[t+2]??0}function y(e,t,r,i){!function(e,t,r,i,s){const o=.4999999*Math.PI,l=(0,n.qE)(R*e[t+1],-o,o),a=Math.sin(l);r[i++]=R*e[t]*s.radius,r[i++]=s.halfSemiMajorAxis*Math.log((1+a)/(1-a)),r[i]=e[t+2]??0}(e,t,r,i,o.$O)}function m(e,t,r,n){r[n]=e[t]*E,r[n+1]=e[t+1]*E,r[n+2]=e[t+2]??0}function g(e,t,r,n){r[n]=e[t]*j,r[n+1]=e[t+1]*j,r[n+2]=e[t+2]??0}function b(e,t,r,n,i){const s=i+(e[t+2]??0),o=R*e[t],l=R*e[t+1],a=Math.cos(l)*s;r[n]=Math.cos(o)*a,r[n+1]=Math.sin(o)*a,r[n+2]=Math.sin(l)*s}function v(e,t,r,n){b(e,t,r,n,o.Sw.radius)}function M(e,t,r,n){b(e,t,r,n,o.sH.radius)}function w(e,t,r,n){b(e,t,r,n,o.$O.radius)}function _(e,t,r,i,s){const o=e[t],l=e[t+1],a=e[t+2]??0,u=Math.sqrt(o*o+l*l+a*a),c=(0,n.YN)(a/(0===u?1:u)),f=Math.atan2(l,o);r[i++]=P*f,r[i++]=P*c,r[i]=u-s}function S(e,t,r,n){_(e,t,r,n,o.Sw.radius)}function I(e,t,r,n){_(e,t,r,n,o.sH.radius)}function x(e,t,r,n){_(e,t,r,n,o.$O.radius)}function A(e,t,r,n){!function(e,t,r,n,i){const s=R*e[t],o=R*e[t+1],l=e[t+2]??0,a=Math.sin(o),u=Math.cos(o),c=i.radius/Math.sqrt(1-i.eccentricitySquared*a*a);r[n++]=(c+l)*u*Math.cos(s),r[n++]=(c+l)*u*Math.sin(s),r[n++]=(c*(1-i.eccentricitySquared)+l)*a}(e,t,r,n,o.$O)}function T(e,t,r,n){const i=l.TP,s=e[t],a=e[t+1],u=e[t+2]??0;let c,f,h,p,d,y,m,g,b,v,M,w,_,S,I,x,A,T,C,R,O;c=Math.abs(u),f=s*s+a*a,h=Math.sqrt(f),p=f+u*u,d=Math.sqrt(p),R=Math.atan2(a,s),y=u*u/p,m=f/p,S=i.a2/d,I=i.a3-i.a4/d,m>.3?(g=c/d*(1+m*(i.a1+S+y*I)/d),C=Math.asin(g),v=g*g,b=Math.sqrt(1-v)):(b=h/d*(1-y*(i.a5-S-m*I)/d),C=Math.acos(b),v=1-b*b,g=Math.sqrt(v)),M=1-o.$O.eccentricitySquared*v,w=o.$O.radius/Math.sqrt(M),_=i.a6*w,S=h-w*b,I=c-_*g,A=b*S+g*I,x=b*I-g*S,T=x/(_/M+A),C+=T,O=A+x*T/2,u<0&&(C=-C),r[n++]=P*R,r[n++]=P*C,r[n]=O}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:p},R=(0,n.kU)(1),P=(0,n.KJ)(1),O=.5*Math.PI,F=o.$O.radius,E=F*Math.PI/180,j=180/(F*Math.PI)},91218(e,t,r){r.r(t),r.d(t,{canProjectWithoutEngine:()=>H,initializeProjection:()=>Y,isEqualBaseGCS:()=>V,isLoaded:()=>F,isLoadedOrLoad:()=>E,isLoadedOrLoadFor:()=>j,load:()=>Z,project:()=>G,projectAsync:()=>J,projectExtent:()=>ie,projectMany:()=>k,projectMultipoint:()=>Q,projectOrLoad:()=>q,projectOrLoadMany:()=>D,projectPoint:()=>K,projectPolygon:()=>re,projectPolyline:()=>ee,projectWithoutEngine:()=>B,requiresLoad:()=>L,test:()=>z,tryProject:()=>N,unload:()=>U});var n=r(49186),i=r(17676),s=r(62788),o=r(95488),l=r(51850),a=r(21276),u=r(73941),c=r(5443),f=r(91075),h=r(48526),p=r(86738),d=r(39829),y=r(82799),m=r(16930),g=r(98764),b=r(159),v=r(9762),M=r(49208);function w(e,t,r,n,i,s){return _[0]=e,_[1]=t,_[2]=r,(0,v.projectBuffer)(_,n,0,i,s,0)}const _=(0,l.vt)();var S=r(60408),I=r(21325),x=r(52006);let A=null,T=null,C=null,R=null,P={};const O=new o.I;function F(){return!!(T?.isLoaded()&&C?.isLoaded()&&R?.isLoaded())}function E(){return!!F()||((0,s.gc)(O),Z(),!1)}function j(e,t){return!e||!t||H(e,t)||E()}function L(e,t){return!H(e,t)&&!F()}async function Z(e){null==A&&(A=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(T=e,T.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(C=e,C.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(R=e,R.load()))])),await A,(0,i.Te)(e),O.notify()}function G(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),k(e,e[0].spatialReference,t,r)):((0,a.f)(e),k([e],e.spatialReference,t,r)[0])}function k(e,t,r,n){if(null==t||null==r)return e;if(H(t,r,n))return e.map(e=>B(e,t,r));if(null==n?.geographicTransformation&&(0,u.jA)(t))return k(e.map(e=>B(e,t,m.A.WGS84)),m.A.WGS84,r,{zConversionDisabled:n?.zConversionDisabled});if(null==n?.geographicTransformation&&(0,u.jA)(r))return k(e,t,m.A.WGS84).map(e=>B(e,m.A.WGS84,r));if(!F())throw new $;if(!n?.geographicTransformation)if(n?.extendedParams)n={...n,geographicTransformation:R.getTransformation(t,r,n.areaOfInterestExtent)||new b.A};else if(!n?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let i=P[e];i||(i=R.getTransformation(t,r)||new b.A,P[e]=i),n={geographicTransformation:i,zConversionDisabled:n?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof f.A?T.executeMany(e,r,n):C.executeMany(e,r,n)}function N(e,t,r){try{return G(e,t,r)}catch(e){return null}}function q(e,t){const r=D([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function D(e,t,r){if(!F())for(const r of e)if(null!=r&&!(0,I.aI)(r.spatialReference,t)&&(0,I.fn)(r.spatialReference)&&(0,I.fn)(t)&&!H(r.spatialReference,t))return(0,s.gc)(O),{pending:Z(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,I.aI)(e.spatialReference,t)?e:(0,I.fn)(e.spatialReference)&&(0,I.fn)(t)?G(e,t,r):null)}}class $ extends n.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function U(){A=null,T=null,C=null,R=null,P={}}const z={get loadPromise(){return A}};async function J(e,t,r){if((0,i.Te)(r),!e)return e;const n=D(Array.isArray(e)?e:[e],t,r);if(n.pending)return await n.pending,(0,i.Te)(r),J(e,t,r);const s=n.geometries??[];return Array.isArray(e)?s:s[0]}function H(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,I.aI)(e,t)||(0,I.fn)(e)&&(0,I.fn)(t)&&!!(0,M.jd)(e,t))}function V(e,t){if((0,I.aI)(e,t))return!0;if(!(0,I.fn)(e)||!(0,I.fn)(t))return!1;const r=(0,I.oT)(e)||(0,I.K8)(e)||(0,I.x1)(e),n=(0,I.oT)(t)||(0,I.K8)(t)||(0,I.x1)(t);return r&&n}async function Y(e,t,r,n){if(F())return(0,i.NO)(n);if(Array.isArray(e)){for(const{source:t,dest:r,options:i}of e)if(t&&r&&!H(t,r,i))return Z(n)}else if(e&&t&&!H(e,t,r))return Z(n);return(0,i.NO)(n)}function B(e,t,r){return e?(0,S.fT)(e)?W(e,t,new p.A,r,0):(0,S.ZC)(e)?se(e,t,new c.A,r,0):(0,S.Bi)(e)?ne(e,t,new d.A,r,0):(0,S.Rg)(e)?te(e,t,new y.A,r,0):(0,S.U9)(e)?X(e,t,new h.A,r,0):null:null}function K(e,t,r=t.spatialReference,n=0){return null!=r&&null!=e.spatialReference&&null!=W(e,e.spatialReference,t,r,n)}function W(e,t,r,n,i){ue[0]=e.x,ue[1]=e.y;const s=e.z;return ue[2]=void 0!==s?s:i,(0,v.projectBuffer)(ue,t,0,ue,n,0)?(r.x=ue[0],r.y=ue[1],r.spatialReference=n,void 0!==s||(0,u.xP)(n)?(r.z=ue[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function Q(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,n)}function X(e,t,r,n,i){const{points:s,hasZ:o,hasM:l}=e,a=[],u=s.length,c=[];for(const e of s)c.push(e[0],e[1],o?e[2]:i);if(!(0,v.projectBuffer)(c,t,0,c,n,0,u))return null;const f=ae(o,n);for(let e=0;e<u;++e){const t=3*e,r=c[t],n=c[t+1];f&&l?a.push([r,n,c[t+2],s[e][3]]):f?a.push([r,n,c[t+2]]):l?a.push([r,n,s[e][2]]):a.push([r,n])}return r.points=a,r.spatialReference=n,r.hasZ=o,r.hasM=l,r}function ee(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,n)}function te(e,t,r,n,i){const{curvePaths:s,paths:o,hasZ:l,hasM:a}=e;if(!(s?le(s,l??!1,a??!1,t,r.curvePaths=[],n,i):oe(o,l??!1,a??!1,t,r.paths,n,i)))return null;const u=ae(l,n);return r.spatialReference=n,r.hasZ=u,r.hasM=a,r}function re(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=ne(e,e.spatialReference,t,r,n)}function ne(e,t,r,n,i){const{curveRings:s,rings:o,hasZ:l,hasM:a}=e;return(s?le(s,l??!1,a??!1,t,r.curveRings=[],n,i):oe(o,l??!1,a??!1,t,r.rings,n,i))?(r.spatialReference=n,r.hasZ=ae(l,n),r.hasM=a,r):null}function ie(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=se(e,e.spatialReference,t,r,n)}function se(e,t,r,n,i){const{xmin:s,ymin:o,xmax:l,ymax:a,hasZ:u,hasM:c}=e;if(!w(s,o,u?e.zmin:i,t,ue,n))return null;const f=ae(u,n);return r.xmin=ue[0],r.ymin=ue[1],f&&(r.zmin=ue[2]),w(l,a,u?e.zmax:i,t,ue,n)?(r.xmax=ue[0],r.ymax=ue[1],f&&(r.zmax=ue[2]),c&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=n,r):null}function oe(e,t,r,n,i,s,o=0){const l=new Array;for(const r of e)for(const e of r)l.push(e[0],e[1],t?e[2]:o);if(!(0,v.projectBuffer)(l,n,0,l,s,0))return!1;let a=0;i.length=0;const u=t?3:2,c=ae(t,s);for(const t of e){const e=new Array;for(const n of t){const t=l.slice(a,a+=3);c||t.pop(),r&&t.push(n[u]),e.push(t)}i.push(e)}return!0}function le(e,t,r,n,i,s,o=0){const l=new Array;for(const r of e)for(const e of r){if((0,x.FG)(e))return!1;if((0,x.aO)(e)){const[r,n]=e.c;l.push(r[0],r[1],t?r[2]:o,n[0],n[1],o);continue}if((0,x.n1)(e)){const[r,n,i]=e.b;l.push(r[0],r[1],t?r[2]:o,n[0],n[1],o,i[0],i[1],o);continue}const r=e;l.push(r[0],r[1],t?r[2]:o)}if(!(0,v.projectBuffer)(l,n,0,l,s,0))return!1;let a=0;i.length=0;const u=t?3:2,c=ae(t,s);for(const t of e){const e=new Array;for(const n of t){const t=l.slice(a,a+=3);if(c||t.pop(),r&&t.push((0,x.yP)(n)[u]),(0,x.FG)(n))return!1;if((0,x.aO)(n)){const r=l[a++],n=l[a++];++a,e.push({c:[t,[r,n]]});continue}if((0,x.n1)(n)){const r=l[a++],n=l[a++];++a;const i=l[a++],s=l[a++];++a,e.push({b:[t,[r,n],[i,s]]});continue}e.push(t)}i.push(e)}return!0}function ae(e,t){return e||(0,u.xP)(t)||(0,I.aI)(t,g.Y0)}const ue=(0,l.vt)()},98764(e,t,r){r.d(t,{GD:()=>o,Y0:()=>u,lO:()=>c});var n=r(73941),i=r(16930),s=r(21325);const o=new i.A(n.fv),l=new i.A(n.FY),a=new i.A(n.LJ),u=new i.A(n.Ro);function c(e){const t=f.get(e);if(t)return t;let r=o;if(e)if(e===l)r=l;else if(e===a)r=a;else{const t=e.wkid,n=e.latestWkid;if(null!=t||null!=n)(0,s.tl)(t)||(0,s.tl)(n)?r=l:((0,s.ZL)(t)||(0,s.ZL)(n))&&(r=a);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===h?r=l:e===p&&(r=a)}}}return f.set(e,r),r}const f=new Map,h=l.wkt.toUpperCase(),p=a.wkt.toUpperCase()},4197(e,t,r){r.d(t,{Vj:()=>u,cj:()=>a,jh:()=>s,l5:()=>l,xm:()=>o});var n=r(34275),i=r(9093);function s(e){return e<=n.y9?new Array(e).fill(0):new Float64Array(e)}function o(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function l(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e){return[...e]}function u(e){const t=(0,i.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},70328(e,t,r){r.d(t,{BI:()=>v,DC:()=>f,Ej:()=>p,Ie:()=>g,Jt:()=>b,Ne:()=>d,RF:()=>c,aI:()=>w,fA:()=>o,gE:()=>a,hZ:()=>m,iT:()=>h,is:()=>M,qv:()=>_,vI:()=>y,vY:()=>l,v_:()=>S,vt:()=>s,w1:()=>u}),r(35522);var n=r(5443),i=(r(19419),r(4197));function s(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,n,i,o,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=n,l[4]=i,l[5]=o,l}function l(e,t=s()){return function(e,t,r,n=s()){return m(n,_),function(e,t,r=0,n=t.length/3){let i=e[0],s=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function a(e,t=(0,i.jh)(24)){const[r,n,s,o,l,a]=e;return t[0]=r,t[1]=n,t[2]=s,t[3]=r,t[4]=n,t[5]=a,t[6]=r,t[7]=l,t[8]=s,t[9]=r,t[10]=l,t[11]=a,t[12]=o,t[13]=n,t[14]=s,t[15]=o,t[16]=n,t[17]=a,t[18]=o,t[19]=l,t[20]=s,t[21]=o,t[22]=l,t[23]=a,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function f(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?m(e,_):s(_)}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function v(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function M(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!M(e)||!M(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];s()},34403(e,t,r){r.d(t,{TP:()=>o});var n=r(79258);Math.PI;const i=n.$O.radius,s=n.$O.eccentricitySquared,o={a1:i*s,a2:i*s*i*s,a3:i*s*s/2,a4:i*s*i*s*2.5,a5:i*s+i*s*s/2,a6:1-s};n.$O.radius,n.$O.flattening,n.Sw.radius,n.Sw.flattening,n.sH.radius,n.sH.flattening,n.sH.radius},99959(e,t,r){r.d(t,{A:()=>s});var n=r(5482),i=r(91429);let s=class{};s=(0,n.Cg)([(0,i.$K)("esri.graphic.GraphicOrigin")],s)},55156(e,t,r){r.d(t,{I:()=>i,e:()=>n});const n=Symbol("idFieldsProviderSymbol");function i(e){return(t=e)&&n in t?e[n]:void 0;var t}},89808(e,t,r){r.d(t,{Q:()=>n});const n=Symbol("getSliceableSymbol")},162(e,t,r){r.r(t),r.d(t,{default:()=>Y});var n=r(5482),i=r(7762),s=r(38961),o=r(25728),l=r(17676),a=r(36708),u=r(84952),c=r(91429),f=r(5443),h=r(16930),p=r(4146),d=r(63074),y=r(16131),m=r(8303),g=r(54310),b=r(25036),v=r(10873),M=r(65529),w=r(25482),_=r(92474),S=r(799),I=r(56507),x=r(89808),A=r(99959);const T=Symbol("isKMLGraphicOrigin");var C;class R extends A.A{get[(C=T,x.Q)](){return this.layer}constructor(e,t){super(),this[C]=!0,this.type="kml",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var P=r(92602),O=r(70333),F=(r(37838),r(11254)),E=r(4718),j=r(70328),L=r(537);r(65494),r(22671);const Z={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function G(e){const t=e.folders||[],r=t.slice(),n=new Map,i=new Map,s=new Map,o=new Map,l=new Map,a={esriGeometryPoint:i,esriGeometryPolyline:s,esriGeometryPolygon:o};(e.featureCollection?.layers||[]).forEach(e=>{const t=(0,E.o8)(e);t.featureSet.features=[];const r=e.featureSet.geometryType;n.set(r,t);const l=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?q(i,l,e.featureSet.features):"esriGeometryPolyline"===r?q(s,l,e.featureSet.features):"esriGeometryPolygon"===r&&q(o,l,e.featureSet.features)}),e.groundOverlays&&e.groundOverlays.forEach(e=>{l.set(e.id,e)}),t.forEach(t=>{t.networkLinkIds.forEach(n=>{const i=function(e,t,r){const n=function(e,t){let r;return t.some(t=>t.id===e&&(r=t,!0)),r}(e,r);return n&&(n.parentFolderId=t,n.networkLink=n),n}(n,t.id,e.networkLinks);i&&r.push(i)})}),r.forEach(e=>{if(e.featureInfos){e.points=(0,E.o8)(n.get("esriGeometryPoint")),e.polylines=(0,E.o8)(n.get("esriGeometryPolyline")),e.polygons=(0,E.o8)(n.get("esriGeometryPolygon")),e.mapImages=[];for(const t of e.featureInfos)switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":{const r=a[t.type].get(t.id);r&&e[Z[t.type]]?.featureSet.features.push(r);break}case"GroundOverlay":{const r=l.get(t.id);r&&e.mapImages.push(r);break}}e.fullExtent=D([e])}});const u=D(r);return{folders:t,sublayers:r,extent:u}}function k(e,t,r,n){const i=O.id?.findCredential(e);e=(0,u.a6)(e,{token:i?.token});const s=P.A.kmlServiceUrl;return(0,F.A)(s,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:n})}function N(e,t,r=null,n=[]){const i=[],s={},o=t.sublayers,l=new Set(t.folders.map(e=>e.id));return o.forEach(t=>{const o=new e;if(r?o.read(t,r):o.read(t),n.length&&l.has(o.id)&&(o.visible=n.includes(o.id)),s[t.id]=o,null!=t.parentFolderId&&-1!==t.parentFolderId){const e=s[t.parentFolderId];e.sublayers||(e.sublayers=[]),e.sublayers?.unshift(o)}else i.unshift(o)}),i}function q(e,t,r){r.forEach(r=>{e.set(r.attributes[t],r)})}function D(e){const t=(0,j.vt)(j.qv),r=(0,j.vt)(j.qv);for(const n of e){if(n.polygons?.featureSet?.features)for(const e of n.polygons.featureSet.features)(0,L.LJ)(t,e.geometry),(0,j.RF)(r,t);if(n.polylines?.featureSet?.features)for(const e of n.polylines.featureSet.features)(0,L.LJ)(t,e.geometry),(0,j.RF)(r,t);if(n.points?.featureSet?.features)for(const e of n.points.featureSet.features)(0,L.LJ)(t,e.geometry),(0,j.RF)(r,t);if(n.mapImages)for(const e of n.mapImages)(0,L.LJ)(t,e.extent),(0,j.RF)(r,t)}return(0,j.aI)(r,j.qv)?void 0:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:h.A.WGS84}}var $,U=r(36005);let z=$=class extends((0,M.Zt)((0,w.T)(_.x_))){constructor(...e){super(...e),this.description=null,this.fullExtent=null,this.id=null,this.networkLink=null,this.parent=null,this.sublayers=null,this.title=null,this.sourceJSON=null,this.layer=null,this.addHandles([(0,a.on)(()=>this.sublayers,"after-add",({item:e})=>{e.parent=this,e.layer=this.layer},a.OH),(0,a.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=e.parent=null},a.OH),(0,a.wB)(()=>this.sublayers,(e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer},a.OH),(0,a.wB)(()=>this.layer,e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e},a.OH)])}initialize(){(0,a.C_)(()=>this.networkLink).then(()=>(0,a.C_)(()=>!0===this.visible)).then(()=>this.load())}load(e){if(!this.networkLink)return;if(this.networkLink.viewFormat)return;const t=null!=e?e.signal:null,r=this._fetchService(this._get("networkLink")?.href??"",t).then(e=>{const t=D(e.sublayers);this.fullExtent=f.A.fromJSON(t),this.sourceJSON=e;const r=(0,I.dp)(i.A.ofType($),N($,e));this.sublayers?this.sublayers.addMany(r):this.sublayers=r,this.layer?.emit("sublayer-update"),this.layer&&this.layer.notifyChange("visibleSublayers")});return this.addResolvingPromise(r),Promise.resolve(this)}get visible(){return this._get("visible")}set visible(e){this._get("visible")!==e&&(this._set("visible",e),this.layer&&this.layer.notifyChange("visibleSublayers"))}readVisible(e,t){return!!t.visibility}get origin(){return this.layer?new R(this.layer,this):null}_fetchService(e,t){return k(e,this.layer.outSpatialReference,this.layer.refreshInterval,t).then(e=>G(e.data))}};(0,n.Cg)([(0,c.MZ)()],z.prototype,"description",void 0),(0,n.Cg)([(0,c.MZ)({type:f.A})],z.prototype,"fullExtent",void 0),(0,n.Cg)([(0,c.MZ)()],z.prototype,"id",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0,value:null})],z.prototype,"networkLink",void 0),(0,n.Cg)([(0,c.MZ)({json:{write:{allowNull:!0}}})],z.prototype,"parent",void 0),(0,n.Cg)([(0,c.MZ)({type:i.A.ofType(z),json:{write:{allowNull:!0}}})],z.prototype,"sublayers",void 0),(0,n.Cg)([(0,c.MZ)({value:null,json:{read:{source:"name",reader:e=>(0,S._e)(e)}}})],z.prototype,"title",void 0),(0,n.Cg)([(0,c.MZ)({value:!0})],z.prototype,"visible",null),(0,n.Cg)([(0,U.w)("visible",["visibility"])],z.prototype,"readVisible",null),(0,n.Cg)([(0,c.MZ)()],z.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,c.MZ)()],z.prototype,"layer",void 0),(0,n.Cg)([(0,c.MZ)()],z.prototype,"origin",null),z=$=(0,n.Cg)([(0,c.$K)("esri.layers.support.KMLSublayer")],z);var J=r(43937);const H=["kml","xml"];let V=class extends((0,d.dM)((0,g.J)((0,b.j)((0,y.q)((0,m.A)((0,o.M)(p.A))))))){constructor(...e){super(...e),this._visibleFolders=[],this.allSublayers=new s.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.outSpatialReference=h.A.WGS84,this.path=null,this.legendEnabled=!1,this.operationalLayerType="KML",this.sublayers=null,this.type="kml",this.url=null}initialize(){this.addHandles([(0,a.wB)(()=>this.sublayers,(e,t)=>{t&&t.forEach(e=>{e.parent=null,e.layer=null}),e&&e.forEach(e=>{e.parent=this,e.layer=this})},a.OH),this.on("sublayer-update",()=>this.notifyChange("fullExtent"))])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get sublayerById(){const e=new Map;for(const t of this.allSublayers)e.set(t.id,t);return e}readSublayersFromItemOrWebMap(e,t){this._visibleFolders=t.visibleFolders}readSublayers(e,t,r){return N(z,t,r,this._visibleFolders)}writeSublayers(e,t){const r=[],n=e.toArray();for(;n.length;){const e=n[0];e.networkLink||(e.visible&&r.push(e.id),e.sublayers&&n.push(...e.sublayers.toArray())),n.shift()}t.visibleFolders=r}get title(){const e=this._get("title");return e&&"defaults"!==this.originOf("title")?e:this.url?(0,u.e7)(this.url,H)||"KML":e}set title(e){this._set("title",e)}get visibleSublayers(){const e=this.sublayers,t=[],r=e=>{e.visible&&(t.push(e),e.sublayers&&e.sublayers.forEach(r))};return e?.forEach(r),t}get fullExtent(){return this._recomputeFullExtent()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["KML"],supportsData:!1},e).catch(l.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}destroy(){super.destroy(),this.allSublayers.destroy()}async _fetchService(e){const t=G((await Promise.resolve().then(()=>this.resourceInfo?{ssl:!1,data:this.resourceInfo}:k(this.url??"",this.outSpatialReference,this.refreshInterval,e))).data);t&&this.read(t,{origin:"service"})}_recomputeFullExtent(){let e=null;null!=this.extent&&(e=this.extent.clone());const t=r=>{if(r.sublayers)for(const n of r.sublayers.items)t(n),n.visible&&n.fullExtent&&(null!=e?e.union(n.fullExtent):e=n.fullExtent.clone())};return t(this),e}};(0,n.Cg)([(0,c.MZ)({readOnly:!0})],V.prototype,"allSublayers",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],V.prototype,"sublayerById",null),(0,n.Cg)([(0,c.MZ)({type:h.A})],V.prototype,"outSpatialReference",void 0),(0,n.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],V.prototype,"path",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1}})],V.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],V.prototype,"listMode",void 0),(0,n.Cg)([(0,c.MZ)({type:["KML"]})],V.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,c.MZ)({})],V.prototype,"resourceInfo",void 0),(0,n.Cg)([(0,c.MZ)({type:i.A.ofType(z),json:{write:{ignoreOrigin:!0}}})],V.prototype,"sublayers",void 0),(0,n.Cg)([(0,U.w)(["web-map","portal-item"],"sublayers",["visibleFolders"])],V.prototype,"readSublayersFromItemOrWebMap",null),(0,n.Cg)([(0,U.w)("service","sublayers",["sublayers"])],V.prototype,"readSublayers",null),(0,n.Cg)([(0,J.K)("sublayers")],V.prototype,"writeSublayers",null),(0,n.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],V.prototype,"type",void 0),(0,n.Cg)([(0,c.MZ)({json:{origins:{"web-map":{read:{source:"title"}}},write:{ignoreOrigin:!0}}})],V.prototype,"title",null),(0,n.Cg)([(0,c.MZ)(v.OZ)],V.prototype,"url",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],V.prototype,"visibleSublayers",null),(0,n.Cg)([(0,c.MZ)({type:f.A})],V.prototype,"extent",void 0),(0,n.Cg)([(0,c.MZ)()],V.prototype,"fullExtent",null),V=(0,n.Cg)([(0,c.$K)("esri.layers.KMLLayer")],V);const Y=V},54339(e,t,r){function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const n of t.fieldNames)r.push(e.attributes[n]??null);return JSON.stringify(r)}}}function i(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>n,r:()=>i})},8303(e,t,r){r.d(t,{A:()=>w});var n=r(5482),i=r(92602),s=r(70333),o=r(11254),l=r(60999),a=r(49186),u=r(53966),c=r(97768),f=r(17676),h=r(84952),p=r(91429),d=r(77548),y=r(20655),m=r(80812),g=r(41318),b=r(10407),v=r(36005),M=r(43937);const w=e=>{const t=e;let w=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,f.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,f.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,f.QP)(e),!0)))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,f.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!s.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let o,l;if(i)o=r.portal.url;else try{o=await(0,d.wI)(this.url,t)}catch(e){(0,f.QP)(e)}if(!o||!(0,h.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,f.QP)(e)}const a=!0,u=!1,c=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(i?await r.reload():(r=new m.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,f.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,b.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,f.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=y.A.getDefault();if(i&&i.loaded&&(0,h.S8)(i.restUrl)===(0,h.S8)(n))return i.user;const a=`${n}/community/self`,u=null!=e?e.signal:null,c=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?g.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||y.A.getDefault());return r&&n&&!(0,h.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n.Cg)([(0,p.MZ)({type:m.default})],w.prototype,"portalItem",null),(0,n.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],w.prototype,"readPortalItem",null),(0,n.Cg)([(0,M.K)("web-document","portalItem",{itemId:{type:String}})],w.prototype,"writePortalItem",null),(0,n.Cg)([(0,p.MZ)({clonable:!1})],w.prototype,"resourceReferences",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasEditingPrivileges",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasFullEditingPrivileges",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],w.prototype,"userHasUpdateItemPrivileges",void 0),w=(0,n.Cg)([(0,p.$K)("esri.layers.mixins.PortalLayer")],w),w},_={credential:null,user:null}},10407(e,t,r){r.d(t,{It:()=>p,LG:()=>o,OM:()=>u,Sm:()=>c,Y:()=>l,bK:()=>a,mm:()=>h,sQ:()=>f});var n=r(91218),i=r(16930),s=r(28735);function o(e,t){if(!l(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(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 c(e,t,r){r?o(e,t):u(e,t)}async function f(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,s.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.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 p(e){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let s=!i||i.includes("features:user:edit"),o=!!r&&!!i?.includes("features:user:fullEdit");const l="update"===n||"admin"===n;return l?o=s=!0:o&&(s=!0),{features:{edit:s,fullEdit:o},content:{updateItem:l}}}},96576(e,t,r){r.d(t,{A:()=>f});var n,i=r(5482),s=r(4718),o=r(91429),l=r(92438),a=r(63988),u=r(49849),c=r(93223);let f=n=class extends((0,a.h)(l.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new n({description:this.description,label:this.label,symbol:(0,s.o8)(this.symbol),visualVariables:(0,s.o8)(this.visualVariables),authoringInfo:(0,s.o8)(this.authoringInfo)})}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],f.prototype,"description",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],f.prototype,"label",void 0),(0,i.Cg)([(0,o.MZ)(u.Wp)],f.prototype,"symbol",void 0),(0,i.Cg)([(0,c.e)({simple:"simple"})],f.prototype,"type",void 0),f=n=(0,i.Cg)([(0,o.$K)("esri.renderers.SimpleRenderer")],f)},73681(e,t,r){r.d(t,{n:()=>a});var n=r(49186),i=r(53966),s=r(46140),o=r(95466),l=r(55674);class a{static async from(e,t,r){const o=e.dictionary_version?s.A.parse(e.dictionary_version):null,c=new Set(e.itemsNames),f={};if(t)for(const e in t)f[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)f.hasOwnProperty(t.name)||(f[t.name]=t.value);const h=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))h.delete(e);h.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:h});const p=await(0,l.xR)(e.expression,null,f);if(!p)throw new n.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const d=!o||!o.greaterEqual(4,0);d&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const y=new u(r,d);return new a(d,c,p,y)}constructor(e,t,r,n){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=n}get itemNames(){return this._itemNames}evaluate(e,t,r,n){try{return this._reader.bind(e,r,n),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.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]}}},61760(e,t,r){r.d(t,{PU:()=>o,YW:()=>a,ex:()=>i,hv:()=>l,zp:()=>s}),r(34727);var n=r(90629);r(78955),r(91829);const i=2.4;function s(e){return(0,n.PN)(e*i)}function o(e){return(0,n.Lz)(e)/i}function l(e,t,r){const n=Math.sqrt(e**2+t**2)/r;return n>1?0:3/(Math.PI*r**2)*(1-n**2)**2}function a(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},65494(e,t,r){r.d(t,{L:()=>a,r:()=>o});var n=r(90360),i=r(41214),s=r(59923);function o(e,t){return a(e,null,t)}const l=(0,n.C)({types:i.Hg});function a(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?((0,s.Yc)(r,"warning","renderer",`Only UniqueValueRenderer can be referenced from a web style, but found '${e.type}'`,{definition:e}),null):l(e,t,r):null}},22671(e,t,r){r.d(t,{A:()=>b});var n,i=r(5482),s=r(52106),o=r(66552),l=r(25482),a=r(4718),u=r(91429),c=r(16930),f=r(60408),h=r(65864),p=r(50498),d=r(20437),y=r(36005),m=r(43937);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=n=class extends l.o{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,s.A)}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=c.A.fromJSON(t.spatialReference)),n}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 n(this.cloneProperties())}cloneProperties(){return(0,a.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 n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((i-e)/r));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.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:[n,i],scale:[s,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+n,e=>i-e*o,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=c.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),l=s.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=n);const a=s.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}i.push(o)}return i}_quantizePoints(e,t,r){let n,i;const s=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===n&&o===i||(s.push([e-n,o-i]),n=e,i=o)}else n=t(l[0]),i=r(l[1]),s.push([n,i])}return s.length>0?s: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 n=(0,f.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,s=n.length;e<s;e++){const s=n[e],o=this._quantizePoints(s,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 n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let o,l;for(let e=0,n=s.length;e<n;e++){const n=s[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}}if(n&&i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[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),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,l;for(let e=0,n=s.length;e<n;e++){const n=s[e];e>0?(o+=n[0],l+=n[1]):(o=n[0],l=n[1]),n[0]=t(o),n[1]=r(l)}if(n&&i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}}:null}};(0,i.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,i.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],b.prototype,"features",void 0),(0,i.Cg)([(0,y.w)("features")],b.prototype,"readFeatures",null),(0,i.Cg)([(0,u.MZ)({type:[d.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,i.Cg)([(0,m.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,i.Cg)([(0,u.MZ)({types:p.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,i.Cg)([(0,y.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,i.Cg)([(0,u.MZ)({type:c.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,i.Cg)([(0,m.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=n=(0,i.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},55674(e,t,r){r.d(t,{Ad:()=>p,Gj:()=>m,QY:()=>h,lL:()=>g,xR:()=>d});var n=r(66131),i=r(49186),s=(r(44208),r(44729)),o=r(15032),l=r(65864),a=r(95466),u=r(43668),c=r(98623);const f=["geometry","scale","timeProperties"];function h(e,t){if(null!=t)for(const r of f)t.hasArcadeDependency(r)&&e.add(r);return e}function p(e,t){return y.create(e,t,null,["$feature","$view"])}function d(e,t,r){return y.create(e,t,r,["$feature","$view","$config"])}class y{static async create(e,t,r,n){const{arcade:s,Dictionary:o}=await(0,u.l)();let l;try{l=s.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const a=s.scriptUsesGeometryEngine(l);a&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,l,null,!1,a);const c={vars:n.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},f=s.compileScript(l,c);let h=null;null!=r&&(h=new o(r),h.immutable=!0);const p=new o;return p.immutable=!1,p.setField("scale",0),new y(e,s,l,f,t,p,h,o)}constructor(e,t,r,n,i,s,o,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=n,this._spatialReference=i,this._viewDict=s,this._configDict=o,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new m,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 r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=i?null!=r?n.lY.epochToArcadeDate(i,r):n.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=s?null!=r?n.lY.epochToArcadeDate(s,r):n.lY.unknownEpochToArcadeDate(s):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:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{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,r){const n=t??new a.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=n.fields,this._boundSchema.fieldsIndex=n,this._boundSchema.spatialReference=r}_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}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return n.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?n.lY.unknownEpochToArcadeDate(t):n.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)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}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 r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}}}]);