@arcgis/core 5.0.0-next.84 → 5.0.0-next.86

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 (845) hide show
  1. package/Basemap.d.ts +2 -2
  2. package/Camera.d.ts +3 -3
  3. package/CameraLayout.d.ts +2 -2
  4. package/Graphic.d.ts +3 -3
  5. package/Ground.d.ts +2 -2
  6. package/Map.d.ts +2 -2
  7. package/PopupTemplate.d.ts +3 -3
  8. package/Viewpoint.d.ts +2 -2
  9. package/WebDocument2D.d.ts +3 -3
  10. package/WebScene.d.ts +3 -3
  11. package/analysis/Analysis.d.ts +3 -3
  12. package/analysis/Dimension/types.d.ts +0 -1
  13. package/analysis/DimensionSimpleStyle.d.ts +3 -3
  14. package/analysis/ElevationProfile/ElevationProfileDisplayUnits.d.ts +2 -2
  15. package/analysis/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  16. package/analysis/ElevationProfile/ElevationProfileLineChartOptions.d.ts +2 -2
  17. package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +2 -2
  18. package/analysis/ElevationProfile/ElevationProfileViewOptions.d.ts +2 -2
  19. package/analysis/LengthDimension.d.ts +3 -3
  20. package/analysis/LineOfSightAnalysisObserver.d.ts +3 -3
  21. package/analysis/LineOfSightAnalysisTarget.d.ts +3 -3
  22. package/analysis/ShadowCast/DiscreteOptions.d.ts +2 -2
  23. package/analysis/ShadowCast/MinDurationOptions.d.ts +2 -2
  24. package/analysis/ShadowCast/TotalDurationOptions.d.ts +2 -2
  25. package/analysis/ShadowCast/types.d.ts +0 -1
  26. package/analysis/SlicePlane.d.ts +3 -3
  27. package/analysis/Viewshed.d.ts +3 -3
  28. package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.d.ts +3 -3
  29. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +3 -3
  30. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +3 -3
  31. package/analysis/VolumeMeasurement/types.d.ts +0 -1
  32. package/analysis/support/AnalysisOriginWebScene.d.ts +2 -2
  33. package/applications/Components/applySetUtils.d.ts +237 -0
  34. package/applications/Components/applySetUtils.js +5 -0
  35. package/applications/Components/editUtils.d.ts +92 -0
  36. package/applications/Components/editUtils.js +5 -0
  37. package/applications/Components/symbolUtils.d.ts +37 -0
  38. package/applications/Components/symbolUtils.js +5 -0
  39. package/applications/Components/templateUtils.d.ts +135 -0
  40. package/applications/Components/templateUtils.js +5 -0
  41. package/assets/esri/core/workers/RemoteClient.js +1 -1
  42. package/assets/esri/core/workers/chunks/001fd3d30e5bb0d180c6.js +1 -0
  43. package/assets/esri/core/workers/chunks/008a555ce169640e2a35.js.LICENSE.txt +1 -1
  44. package/assets/esri/core/workers/chunks/{9919b3c345785e910c38.js → 03d037f9f04f165aac63.js} +1 -1
  45. package/assets/esri/core/workers/chunks/0402b7996940ba0f8cc8.js +2 -0
  46. package/assets/esri/core/workers/chunks/{534ed6574e4a1613ba05.js.LICENSE.txt → 0402b7996940ba0f8cc8.js.LICENSE.txt} +1 -1
  47. package/assets/esri/core/workers/chunks/0889e3d1a034be031c9e.js +2 -0
  48. package/assets/esri/core/workers/chunks/{21ac84b5c7dedcfd747d.js.LICENSE.txt → 0889e3d1a034be031c9e.js.LICENSE.txt} +1 -1
  49. package/assets/esri/core/workers/chunks/09ca0d05b090e9a70e61.js +1 -0
  50. package/assets/esri/core/workers/chunks/{84a4390b1c277c415d44.js → 0c358199ada2ff71e7d9.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{bbb409e54db77bfabdee.js → 0dcf1f3b6aa84cbe03a9.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{59e7a0215791b2b51180.js → 126183819921e6025c90.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{1a41c9127ca5a260d5ef.js → 15132d36e7ccbb3c009e.js} +1 -1
  54. package/assets/esri/core/workers/chunks/1919ed99166e70021917.js +1 -0
  55. package/assets/esri/core/workers/chunks/{9fac9eda0a41f7f4c2c6.js → 198ae9e02366870d3ec8.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{6de843d1809cba61ded3.js → 1aee859eaffa54ef2515.js} +1 -1
  57. package/assets/esri/core/workers/chunks/1c68befc39d39799fcb8.js +1 -0
  58. package/assets/esri/core/workers/chunks/{df40be5a050b8d20617a.js → 1cf27708d17a4de75b68.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{f3fdf9970b3c7acd071d.js → 21163137e345badb1aaf.js} +1 -1
  60. package/assets/esri/core/workers/chunks/21739c37160061f229ef.js +1 -0
  61. package/assets/esri/core/workers/chunks/{5b0ca8d2154ef59da600.js → 32b09ca094377a305881.js} +1 -1
  62. package/assets/esri/core/workers/chunks/365cb8aab4ca56999b47.js +1 -0
  63. package/assets/esri/core/workers/chunks/{c825ca22894bdb4d01ba.js → 3b434f318fdbbe4111e3.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{98e04c2382fa5ba382fc.js → 3dc1ae04cfa2c06daf48.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{c46a4681cbba638b58c1.js → 3ebd4cdafa7682062447.js} +1 -1
  66. package/assets/esri/core/workers/chunks/45c1a3376b138eeee329.js +1 -0
  67. package/assets/esri/core/workers/chunks/{76d6843d56bff0d4c45e.js → 476e51284e6ed7dc5c99.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{18cdd268fc921ffd92e2.js → 47bea83ae7fe0e1acee0.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{304ea784c28dc78e5e65.js → 4a857a7f5e00dfab2b44.js} +1 -1
  70. package/assets/esri/core/workers/chunks/4c07b2d1a14906371fc5.js +2 -0
  71. package/assets/esri/core/workers/chunks/{e3d3fc87789fd711f161.js.LICENSE.txt → 4c07b2d1a14906371fc5.js.LICENSE.txt} +1 -1
  72. package/assets/esri/core/workers/chunks/{04fddd41a8e6a4c1bc57.js → 5139bbe8f94df01467c7.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{e881629bf230a148963d.js → 52ae2073604deef63ea2.js} +1 -1
  74. package/assets/esri/core/workers/chunks/5734aefbce8b6425630c.js +1 -0
  75. package/assets/esri/core/workers/chunks/{3909217130048b5feeae.js → 5852d291ef41201030d5.js} +12 -12
  76. package/assets/esri/core/workers/chunks/{348560f083350ad0bf2e.js → 5a0c5271304189a2401d.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{1fe1a131be1d5e1e23ed.js → 5a1921c177580f17ff96.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{1a13b472e0cf9f88e8de.js → 5d791bfca20791d8e0af.js} +1 -1
  79. package/assets/esri/core/workers/chunks/5eee48b02e1683f022df.js +2 -0
  80. package/assets/esri/core/workers/chunks/{ef519984fa691aad8d87.js.LICENSE.txt → 5eee48b02e1683f022df.js.LICENSE.txt} +1 -1
  81. package/assets/esri/core/workers/chunks/{3b6fc34b6d92eef030e5.js → 6298e71e6c480d6f46e3.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{854adab6a06af861c104.js → 68d0bae1816061d96307.js} +1 -1
  83. package/assets/esri/core/workers/chunks/6d9e92d9c2503d5dc8dd.js +1 -0
  84. package/assets/esri/core/workers/chunks/{156c73a948bde11f0d53.js → 743165f9bc4d85748a0d.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{9ff1e650ce0912afa780.js → 7449af8f3637c1694660.js} +1 -1
  86. package/assets/esri/core/workers/chunks/7f15d15c7e2c5d3e70c3.js +1 -0
  87. package/assets/esri/core/workers/chunks/{5e3dd05f1ecfdb21350e.js → 7f7c4ffbdf7b20dc7a54.js} +1 -1
  88. package/assets/esri/core/workers/chunks/804c9666d0dc548b9f79.js +1 -0
  89. package/assets/esri/core/workers/chunks/8258b1c8ba6d44ba19c3.js +1 -0
  90. package/assets/esri/core/workers/chunks/890833e98e79b8fd3747.js +1 -0
  91. package/assets/esri/core/workers/chunks/{d6e11f05db698d14f21d.js → 8a7f56139b7de0011a37.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{dc57400b835724204909.js → 8b1fa59d436e2815b2f1.js} +2 -2
  93. package/assets/esri/core/workers/chunks/{dc57400b835724204909.js.LICENSE.txt → 8b1fa59d436e2815b2f1.js.LICENSE.txt} +1 -1
  94. package/assets/esri/core/workers/chunks/{ec03d59984782529031a.js → 8b575ac55bc396c0c477.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{db9a9712038df76e3eda.js → 8ef337e25d65670eb73b.js} +1 -1
  96. package/assets/esri/core/workers/chunks/8f2fc50eb988c0228b05.js +1 -0
  97. package/assets/esri/core/workers/chunks/{c500b59cd7da54fe72ec.js → 8f3abaabc61858e929a5.js} +1 -1
  98. package/assets/esri/core/workers/chunks/9264cce4699284eae97c.js +2 -0
  99. package/assets/esri/core/workers/chunks/{5aee84e827e6fcc9c4c4.js.LICENSE.txt → 9264cce4699284eae97c.js.LICENSE.txt} +1 -1
  100. package/assets/esri/core/workers/chunks/{e201bfe3158c025edc99.js → 93faad2a759b08dce619.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{1779e6eabc299831fc9f.js → 94c4ef224ff38eca7b87.js} +1 -1
  102. package/assets/esri/core/workers/chunks/95e93884b39ca4b312d1.js +2 -0
  103. package/assets/esri/core/workers/chunks/{90a53bfe95ed687c28c1.js.LICENSE.txt → 95e93884b39ca4b312d1.js.LICENSE.txt} +1 -1
  104. package/assets/esri/core/workers/chunks/{e8f6305744f87bbed961.js → 96616126aaf319cd1c6f.js} +1 -1
  105. package/assets/esri/core/workers/chunks/{d8c8f54532714d4db2cd.js → 981f05b5ef6f9c3f7e8a.js} +1 -1
  106. package/assets/esri/core/workers/chunks/{841058de8bc6e328fd68.js → 9d77a7d04872b4535e9e.js} +1 -1
  107. package/assets/esri/core/workers/chunks/{338768f94cc49559b209.js → 9ebc4303e29ee0fc1716.js} +1 -1
  108. package/assets/esri/core/workers/chunks/a270e34bb248114ec280.js +1 -0
  109. package/assets/esri/core/workers/chunks/a6b8ce1c2996ee392bdf.js +1 -0
  110. package/assets/esri/core/workers/chunks/{6610d23d8539f06e64ca.js → adecd31fd64d6753682d.js} +1 -1
  111. package/assets/esri/core/workers/chunks/{b91a157fb5f729de6597.js → b5ca894a6cb1a19676d5.js} +1 -1
  112. package/assets/esri/core/workers/chunks/{a2c0c1bb5e775abefc90.js → b6530c66804bede649d7.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{3849dc35941e569fae5f.js → c12c095937b21e39ad3c.js} +1 -1
  114. package/assets/esri/core/workers/chunks/c18a2948ae3cb527d8bb.js +1 -0
  115. package/assets/esri/core/workers/chunks/{4ff3c03cfbec928c0720.js → c4fb3f0b0cfb21e68413.js} +1 -1
  116. package/assets/esri/core/workers/chunks/{f5b32bc3f7ee911e3c59.js → c5d56b85d34026507902.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{181fab86394f1f912490.js → cc464d5a83f8f405e66c.js} +1 -1
  118. package/assets/esri/core/workers/chunks/cee29c3a94376f6740d7.js +1 -0
  119. package/assets/esri/core/workers/chunks/d6d9d56b3733622deab6.js +1 -0
  120. package/assets/esri/core/workers/chunks/{ce9467dc1ff695d795e5.js → d8b72c6f5f9b2d013b7f.js} +1 -1
  121. package/assets/esri/core/workers/chunks/{f0eb2bfe5a8607b251f5.js → dc2c9b584f8e4627de7f.js} +1 -1
  122. package/assets/esri/core/workers/chunks/{b586d7e608e8ba8b88fe.js → e067bbf12f711fd5b9a6.js} +1 -1
  123. package/assets/esri/core/workers/chunks/e271065410ba5c872f53.js +1 -0
  124. package/assets/esri/core/workers/chunks/{d9d2178d436597b1afaf.js → e7e508258ad27468a6a5.js} +1 -1
  125. package/assets/esri/core/workers/chunks/e8a0654cebafa22b5b56.js +1 -0
  126. package/assets/esri/core/workers/chunks/e95f90d59041640727da.js +1 -0
  127. package/assets/esri/core/workers/chunks/eb063660c37093f85349.js +1 -0
  128. package/assets/esri/core/workers/chunks/{2a1898c5b8d7757e39e3.js → f1e1666bede364c069fc.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{ac0949ea3d2cf3eb7383.js → f25eb512592a84a508c1.js} +1 -1
  130. package/assets/esri/core/workers/chunks/f5ed6953a9255f0bed6a.js.LICENSE.txt +1 -1
  131. package/assets/esri/core/workers/chunks/f64ec13167eb51da2f9b.js +1 -0
  132. package/assets/esri/core/workers/chunks/{14f8215ab716c6d9d5f8.js → fbf21fda283836e8633c.js} +1 -1
  133. package/assets/esri/core/workers/chunks/fc763ce37d631e006199.js +1 -0
  134. package/assets/esri/core/workers/chunks/ff2a170acd98edfd0e06.js +1 -0
  135. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  136. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  137. package/assets/esri/themes/dark/main.css +1 -1
  138. package/assets/esri/themes/light/main.css +1 -1
  139. package/assets/esri/themes/light/view.css +1 -1
  140. package/chunks/HUDMaterial.glsl.js +1 -1
  141. package/config.js +1 -1
  142. package/copyright.txt +2 -2
  143. package/core/Clonable.d.ts +0 -2
  144. package/core/Collection.d.ts +1 -1
  145. package/core/Error.d.ts +0 -1
  146. package/core/Evented.d.ts +0 -2
  147. package/core/Identifiable.d.ts +0 -1
  148. package/core/JSONSupport.d.ts +0 -2
  149. package/core/MultiOriginJSONSupport.d.ts +1 -3
  150. package/core/Promise.d.ts +8 -4
  151. package/core/ReadOnlyMultiOriginJSONSupport.d.ts +0 -2
  152. package/core/Version.d.ts +0 -1
  153. package/core/accessorSupport/types.d.ts +0 -1
  154. package/core/sql/types.d.ts +0 -1
  155. package/core/timeUtils.js +1 -1
  156. package/core/types.d.ts +0 -1
  157. package/core/units.d.ts +1 -1
  158. package/editing/sharedTemplates/templateLoader.js +5 -0
  159. package/editing/sharedTemplates/types.d.ts +0 -1
  160. package/editing/templateUtils.js +1 -1
  161. package/effects/FocusArea.d.ts +3 -3
  162. package/effects/FocusAreaOutline.d.ts +3 -3
  163. package/effects/FocusAreas.d.ts +3 -3
  164. package/effects/types.d.ts +0 -1
  165. package/form/ExpressionInfo.d.ts +2 -2
  166. package/form/FormTemplate.d.ts +2 -2
  167. package/form/elements/Element.d.ts +2 -2
  168. package/form/elements/UtilityNetworkAssociationsElement.d.ts +2 -2
  169. package/geometry/Geometry.d.ts +2 -2
  170. package/geometry/HeightModelInfo.d.ts +2 -2
  171. package/geometry/Mesh.d.ts +3 -3
  172. package/geometry/SpatialReference.d.ts +2 -2
  173. package/geometry/geometryEngineTypes.d.ts +0 -1
  174. package/geometry/support/MeshComponent.d.ts +3 -3
  175. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +3 -3
  176. package/geometry/support/MeshLocalVertexSpace.d.ts +3 -3
  177. package/geometry/support/MeshMaterial.d.ts +3 -3
  178. package/geometry/support/MeshTexture.d.ts +3 -3
  179. package/geometry/support/MeshTextureTransform.d.ts +3 -3
  180. package/geometry/support/MeshTransform.d.ts +3 -3
  181. package/geometry/support/MeshVertexAttributes.d.ts +3 -3
  182. package/graphic/GraphicOrigin.d.ts +0 -1
  183. package/ground/NavigationConstraint.d.ts +2 -2
  184. package/identity/Credential.d.ts +2 -2
  185. package/identity/OAuthInfo.d.ts +2 -2
  186. package/identity/ServerInfo.d.ts +2 -2
  187. package/interfaces.d.ts +8 -3
  188. package/intl/locale.d.ts +0 -1
  189. package/intl/messages.d.ts +0 -1
  190. package/intl/number.d.ts +0 -1
  191. package/intl/substitute.d.ts +0 -1
  192. package/intl/t9n.d.ts +0 -1
  193. package/kernel.js +1 -1
  194. package/layers/BaseElevationLayer.d.ts +3 -4
  195. package/layers/BingMapsLayer.d.ts +2 -2
  196. package/layers/BuildingSceneLayer.d.ts +5 -4
  197. package/layers/CatalogLayer.d.ts +3 -3
  198. package/layers/DimensionLayer.d.ts +2 -2
  199. package/layers/ElevationLayer.d.ts +3 -4
  200. package/layers/ElevationLayer.js +1 -1
  201. package/layers/FeatureLayer.d.ts +4 -4
  202. package/layers/GaussianSplatLayer.d.ts +2 -2
  203. package/layers/GeoJSONLayer.d.ts +2 -2
  204. package/layers/GeoRSSLayer.d.ts +2 -2
  205. package/layers/GroupLayer.d.ts +2 -2
  206. package/layers/ImageryLayer.d.ts +3 -3
  207. package/layers/ImageryTileLayer.d.ts +3 -3
  208. package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -2
  209. package/layers/IntegratedMeshLayer.d.ts +5 -4
  210. package/layers/KMLLayer.d.ts +2 -2
  211. package/layers/KnowledgeGraphLayer.d.ts +2 -2
  212. package/layers/Layer.d.ts +2 -2
  213. package/layers/LineOfSightLayer.d.ts +2 -2
  214. package/layers/LinkChartLayer.d.ts +2 -2
  215. package/layers/MapImageLayer.d.ts +2 -2
  216. package/layers/MapNotesLayer.d.ts +2 -2
  217. package/layers/MediaLayer.d.ts +2 -2
  218. package/layers/OGCFeatureLayer.d.ts +2 -2
  219. package/layers/ParquetLayer.d.ts +3 -3
  220. package/layers/PointCloudLayer.d.ts +5 -4
  221. package/layers/RouteLayer.d.ts +2 -2
  222. package/layers/SceneLayer.d.ts +6 -5
  223. package/layers/StreamLayer.d.ts +3 -3
  224. package/layers/SubtypeGroupLayer.d.ts +4 -4
  225. package/layers/TileLayer.d.ts +2 -2
  226. package/layers/UnknownLayer.d.ts +2 -2
  227. package/layers/UnsupportedLayer.d.ts +2 -2
  228. package/layers/VectorTileLayer.d.ts +2 -2
  229. package/layers/VideoLayer.d.ts +2 -2
  230. package/layers/ViewshedLayer.d.ts +2 -2
  231. package/layers/VoxelLayer.d.ts +2 -2
  232. package/layers/WCSLayer.d.ts +3 -3
  233. package/layers/WFSLayer.d.ts +2 -2
  234. package/layers/WMSLayer.d.ts +2 -2
  235. package/layers/WMTSLayer.d.ts +2 -2
  236. package/layers/WebTileLayer.d.ts +2 -2
  237. package/layers/buildingSublayers/BuildingComponentSublayer.d.ts +2 -2
  238. package/layers/buildingSublayers/BuildingGroupSublayer.d.ts +1 -1
  239. package/layers/buildingSublayers/BuildingSublayer.d.ts +2 -2
  240. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -2
  241. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
  242. package/layers/effects/types.d.ts +0 -1
  243. package/layers/knowledgeGraph/IdTypePair.d.ts +0 -1
  244. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  245. package/layers/mixins/APIKeyMixin.d.ts +0 -1
  246. package/layers/mixins/CustomParametersMixin.d.ts +0 -1
  247. package/layers/mixins/EditBusLayer.d.ts +0 -2
  248. package/layers/mixins/ImageryTileMixin.js +1 -1
  249. package/layers/mixins/OperationalLayer.d.ts +0 -1
  250. package/layers/mixins/ScaleRangeLayer.d.ts +0 -1
  251. package/layers/mixins/SceneService.d.ts +0 -6
  252. package/layers/pointCloudFilters/PointCloudFilter.d.ts +2 -2
  253. package/layers/raster/datasets/FunctionRaster.js +1 -1
  254. package/layers/raster/datasets/pixelReader.d.ts +0 -1
  255. package/layers/raster/datasets/types.d.ts +0 -1
  256. package/layers/raster/functions/BaseRasterFunction.js +1 -1
  257. package/layers/raster/functions/StretchFunction.js +1 -1
  258. package/layers/raster/functions/changeDetectionUtils.d.ts +0 -1
  259. package/layers/raster/functions/focalStatUtils.d.ts +0 -1
  260. package/layers/scene/types.d.ts +11 -0
  261. package/layers/support/AggregateField.d.ts +2 -2
  262. package/layers/support/BuildingFilter.d.ts +2 -2
  263. package/layers/support/BuildingFilterBlock.d.ts +2 -2
  264. package/layers/support/BuildingSummaryStatistics.d.ts +3 -3
  265. package/layers/support/CodedValue.d.ts +2 -2
  266. package/layers/support/ControlPoint.d.ts +2 -2
  267. package/layers/support/ControlPointsGeoreference.d.ts +2 -2
  268. package/layers/support/DimensionalDefinition.d.ts +2 -2
  269. package/layers/support/DisplayFilter.d.ts +3 -3
  270. package/layers/support/DisplayFilterInfo.d.ts +3 -3
  271. package/layers/support/Domain.d.ts +2 -2
  272. package/layers/support/EditFieldsInfo.d.ts +3 -3
  273. package/layers/support/ElevationQuery.js +1 -1
  274. package/layers/support/ElevationTileData.js +1 -1
  275. package/layers/support/ExpressionInfo.d.ts +3 -3
  276. package/layers/support/FacilityLayerInfo.d.ts +2 -2
  277. package/layers/support/FeatureEffect.d.ts +2 -2
  278. package/layers/support/FeatureFilter.d.ts +2 -2
  279. package/layers/support/FeatureReductionBinning.d.ts +2 -2
  280. package/layers/support/FeatureReductionCluster.d.ts +2 -2
  281. package/layers/support/FeatureReductionSelection.d.ts +2 -2
  282. package/layers/support/FeatureTemplate.d.ts +3 -3
  283. package/layers/support/FeatureType.d.ts +3 -3
  284. package/layers/support/Field.d.ts +2 -2
  285. package/layers/support/FieldConfiguration.d.ts +3 -3
  286. package/layers/support/GeometryFieldsInfo.d.ts +3 -3
  287. package/layers/support/KMLSublayer.d.ts +3 -3
  288. package/layers/support/LOD.d.ts +2 -2
  289. package/layers/support/LabelClass.d.ts +2 -2
  290. package/layers/support/LabelExpressionInfo.d.ts +2 -2
  291. package/layers/support/LayerFloorInfo.d.ts +2 -2
  292. package/layers/support/LevelLayerInfo.d.ts +2 -2
  293. package/layers/support/LocalMediaElementSource.d.ts +3 -3
  294. package/layers/support/MapImage.d.ts +2 -2
  295. package/layers/support/MediaElementBase.d.ts +2 -2
  296. package/layers/support/MosaicRule.d.ts +2 -2
  297. package/layers/support/MultidimensionalSubset.d.ts +13 -4
  298. package/layers/support/OrderByInfo.d.ts +2 -2
  299. package/layers/support/ParquetGeometryEncodingLocation.d.ts +3 -3
  300. package/layers/support/ParquetGeometryEncodingWkb.d.ts +3 -3
  301. package/layers/support/PixelBlock.d.ts +2 -2
  302. package/layers/support/PlaybackInfo.d.ts +3 -3
  303. package/layers/support/PurgeOptions.d.ts +2 -2
  304. package/layers/support/RasterBandInfo.d.ts +2 -2
  305. package/layers/support/RasterFunction.d.ts +2 -2
  306. package/layers/support/RasterInfo.d.ts +2 -2
  307. package/layers/support/RasterJobHandler.js +1 -1
  308. package/layers/support/RasterSensorInfo.d.ts +2 -2
  309. package/layers/support/RasterWorker.js +1 -1
  310. package/layers/support/Relationship.d.ts +5 -3
  311. package/layers/support/RouteStopSymbols.d.ts +2 -2
  312. package/layers/support/RouteSymbols.d.ts +2 -2
  313. package/layers/support/SceneFilter.d.ts +2 -2
  314. package/layers/support/SceneLayerViewFilter.js +5 -0
  315. package/layers/support/SceneModification.d.ts +2 -2
  316. package/layers/support/SceneModifications.d.ts +1 -1
  317. package/layers/support/SiteLayerInfo.d.ts +2 -2
  318. package/layers/support/Sublayer.d.ts +2 -2
  319. package/layers/support/Subtype.d.ts +3 -3
  320. package/layers/support/SubtypeSublayer.d.ts +3 -3
  321. package/layers/support/TelemetryData.d.ts +3 -3
  322. package/layers/support/TelemetryDisplay.d.ts +3 -3
  323. package/layers/support/TileInfo.d.ts +2 -2
  324. package/layers/support/TileMatrixSet.d.ts +2 -2
  325. package/layers/support/TimeInfo.d.ts +3 -3
  326. package/layers/support/TrackInfo.d.ts +3 -3
  327. package/layers/support/TrackPartInfo.d.ts +3 -3
  328. package/layers/support/VideoTimeExtent.d.ts +3 -3
  329. package/layers/support/WMSSublayer.d.ts +2 -2
  330. package/layers/support/WMTSStyle.d.ts +2 -2
  331. package/layers/support/WMTSSublayer.d.ts +2 -2
  332. package/layers/support/types.d.ts +32 -0
  333. package/layers/video/types.d.ts +0 -1
  334. package/layers/voxel/VoxelColorStop.d.ts +3 -3
  335. package/layers/voxel/VoxelDynamicSection.d.ts +3 -3
  336. package/layers/voxel/VoxelIsosurface.d.ts +3 -3
  337. package/layers/voxel/VoxelOpacityStop.d.ts +3 -3
  338. package/layers/voxel/VoxelRangeFilter.d.ts +3 -3
  339. package/layers/voxel/VoxelSlice.d.ts +3 -3
  340. package/layers/voxel/VoxelTransferFunctionStyle.d.ts +3 -3
  341. package/layers/voxel/VoxelUniqueValue.d.ts +3 -3
  342. package/layers/voxel/VoxelVariable.d.ts +2 -2
  343. package/layers/voxel/VoxelVariableStyle.d.ts +2 -2
  344. package/layers/voxel/VoxelVolumeStyle.d.ts +2 -2
  345. package/layers/wms/types.d.ts +0 -1
  346. package/layers/wmts/types.d.ts +0 -1
  347. package/linkChart/ChronologicalLayoutSettings.d.ts +3 -3
  348. package/linkChart/LayoutSettings.d.ts +3 -3
  349. package/linkChart/LinkChartProperties.d.ts +3 -3
  350. package/linkChart/NonspatialDataDisplay.d.ts +3 -3
  351. package/linkChart/OrganicLayoutSettings.d.ts +3 -3
  352. package/linkChart/types.d.ts +0 -1
  353. package/networks/CircuitManager.d.ts +3 -3
  354. package/networks/Network.d.ts +2 -2
  355. package/networks/UnitIdentifierManager.d.ts +2 -2
  356. package/networks/support/Circuit.d.ts +2 -2
  357. package/networks/support/CircuitLocation.d.ts +2 -2
  358. package/networks/support/CircuitPath.d.ts +2 -2
  359. package/networks/support/CircuitPathConnectivityElement.d.ts +2 -2
  360. package/networks/support/CircuitSection.d.ts +2 -2
  361. package/networks/support/NamedTraceConfiguration.d.ts +2 -2
  362. package/networks/support/Subcircuit.d.ts +2 -2
  363. package/networks/support/Terminal.d.ts +2 -2
  364. package/networks/support/TerminalConfiguration.d.ts +2 -2
  365. package/networks/support/TraceConfiguration.d.ts +2 -2
  366. package/networks/support/UNTraceConfiguration.d.ts +2 -2
  367. package/networks/support/jsonTypes.d.ts +65 -0
  368. package/networks/support/typeUtils.d.ts +0 -1
  369. package/package.json +1 -1
  370. package/popup/ElementExpressionInfo.d.ts +2 -2
  371. package/popup/ExpressionInfo.d.ts +2 -2
  372. package/popup/FieldInfo.d.ts +3 -3
  373. package/popup/LayerOptions.d.ts +2 -2
  374. package/popup/RelatedRecordsInfo.d.ts +2 -2
  375. package/popup/content/AttachmentsContent.d.ts +2 -2
  376. package/popup/content/Content.d.ts +2 -2
  377. package/popup/content/RelationshipContent.d.ts +2 -2
  378. package/popup/content/UtilityNetworkAssociationsContent.d.ts +2 -2
  379. package/popup/content/mixins/MediaInfo.d.ts +2 -2
  380. package/popup/content/support/ChartMediaInfoValue.d.ts +2 -2
  381. package/popup/content/support/ImageMediaInfoValue.d.ts +2 -2
  382. package/popup/support/AttachmentsOrderByInfo.d.ts +3 -3
  383. package/popup/support/FieldInfoFormat.d.ts +3 -3
  384. package/popup/support/RelatedRecordsInfoFieldOrder.d.ts +2 -2
  385. package/popup/support/UtilityNetworkAssociationType.d.ts +3 -3
  386. package/portal/Portal.d.ts +2 -2
  387. package/portal/PortalFolder.d.ts +2 -2
  388. package/portal/PortalGroup.d.ts +2 -2
  389. package/portal/PortalItem.d.ts +2 -2
  390. package/portal/PortalUser.d.ts +2 -2
  391. package/portal/timeUnitKebabDictionary.js +1 -1
  392. package/renderers/FlowRenderer.d.ts +2 -2
  393. package/renderers/PieChartRenderer.d.ts +2 -2
  394. package/renderers/PointCloudRenderer.d.ts +2 -2
  395. package/renderers/RasterColormapRenderer.d.ts +2 -2
  396. package/renderers/RasterShadedReliefRenderer.d.ts +2 -2
  397. package/renderers/RasterStretchRenderer.d.ts +2 -2
  398. package/renderers/Renderer.d.ts +2 -2
  399. package/renderers/VectorFieldRenderer.d.ts +2 -2
  400. package/renderers/support/AttributeColorInfo.d.ts +2 -2
  401. package/renderers/support/AuthoringInfo.d.ts +2 -2
  402. package/renderers/support/AuthoringInfoClassBreakInfo.d.ts +2 -2
  403. package/renderers/support/AuthoringInfoFieldInfo.d.ts +2 -2
  404. package/renderers/support/AuthoringInfoVisualVariable.d.ts +2 -2
  405. package/renderers/support/ClassBreakInfo.d.ts +2 -2
  406. package/renderers/support/ColormapInfo.d.ts +2 -2
  407. package/renderers/support/DotDensityLegendOptions.d.ts +2 -2
  408. package/renderers/support/HeatmapColorStop.d.ts +2 -2
  409. package/renderers/support/HeatmapLegendOptions.d.ts +3 -3
  410. package/renderers/support/OthersCategory.d.ts +3 -3
  411. package/renderers/support/RasterPresetRenderer.d.ts +3 -3
  412. package/renderers/support/RendererLegendOptions.d.ts +3 -3
  413. package/renderers/support/UniqueValue.d.ts +3 -3
  414. package/renderers/support/UniqueValueClass.d.ts +3 -3
  415. package/renderers/support/UniqueValueGroup.d.ts +3 -3
  416. package/renderers/support/UniqueValueInfo.d.ts +2 -2
  417. package/renderers/support/pointCloud/ColorClassBreakInfo.d.ts +2 -2
  418. package/renderers/support/pointCloud/ColorModulation.d.ts +2 -2
  419. package/renderers/support/pointCloud/ColorUniqueValueInfo.d.ts +2 -2
  420. package/renderers/visualVariables/VisualVariable.d.ts +2 -2
  421. package/renderers/visualVariables/support/ColorSizeStop.d.ts +2 -2
  422. package/renderers/visualVariables/support/ColorStop.d.ts +2 -2
  423. package/renderers/visualVariables/support/OpacityStop.d.ts +2 -2
  424. package/renderers/visualVariables/support/SizeStop.d.ts +2 -2
  425. package/renderers/visualVariables/support/VisualVariableLegendOptions.d.ts +3 -3
  426. package/rest/featureService/FeatureService.d.ts +2 -2
  427. package/rest/featureService/types.d.ts +42 -5
  428. package/rest/geoprocessor/GPOptions.d.ts +2 -2
  429. package/rest/geoprocessor/utils.js +1 -1
  430. package/rest/knowledgeGraph/DataModel.d.ts +2 -2
  431. package/rest/knowledgeGraph/FieldIndex.d.ts +2 -2
  432. package/rest/knowledgeGraph/GraphObject.d.ts +2 -2
  433. package/rest/knowledgeGraph/GraphObjectType.d.ts +2 -2
  434. package/rest/knowledgeGraph/GraphProperty.d.ts +2 -2
  435. package/rest/knowledgeGraph/KnowledgeGraph.d.ts +2 -2
  436. package/rest/knowledgeGraph/Path.d.ts +2 -2
  437. package/rest/knowledgeGraph/ServiceDefinition.d.ts +2 -2
  438. package/rest/knowledgeGraph/SourceTypeValueBehavior.d.ts +2 -2
  439. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.d.ts +2 -2
  440. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.d.ts +2 -2
  441. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +2 -2
  442. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsResultJSON.d.ts +0 -1
  443. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +2 -2
  444. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.d.ts +0 -1
  445. package/rest/lastMileDelivery/types.d.ts +0 -1
  446. package/rest/layerSources/DynamicDataLayer.d.ts +2 -2
  447. package/rest/layerSources/DynamicMapLayer.d.ts +2 -2
  448. package/rest/layerSources/JoinTableDataSource.d.ts +2 -2
  449. package/rest/layerSources/QueryTableDataSource.d.ts +2 -2
  450. package/rest/layerSources/RasterDataSource.d.ts +2 -2
  451. package/rest/layerSources/TableDataSource.d.ts +2 -2
  452. package/rest/networks/circuits/exportCircuits.js +1 -1
  453. package/rest/networks/circuits/support/CircuitTraceResult.d.ts +2 -2
  454. package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +11 -3
  455. package/rest/networks/circuits/support/ExportCircuitsParameters.js +1 -1
  456. package/rest/networks/circuits/support/QueryCircuitsParameters.d.ts +2 -2
  457. package/rest/networks/support/AggregatedGeometry.d.ts +2 -2
  458. package/rest/networks/support/Association.d.ts +2 -2
  459. package/rest/networks/support/AssociationGeometriesResult.d.ts +2 -2
  460. package/rest/networks/support/FunctionResult.d.ts +2 -2
  461. package/rest/networks/support/NetworkElement.d.ts +2 -2
  462. package/rest/networks/support/QueryAssociationsParameters.d.ts +2 -2
  463. package/rest/networks/support/QueryAssociationsResult.d.ts +2 -2
  464. package/rest/networks/support/QueryNamedTraceConfigurationsParameters.d.ts +2 -2
  465. package/rest/networks/support/SynthesizeAssociationGeometriesParameters.d.ts +2 -2
  466. package/rest/networks/support/TraceLocation.d.ts +3 -3
  467. package/rest/networks/support/TraceParameters.d.ts +2 -2
  468. package/rest/networks/support/TraceResult.d.ts +2 -2
  469. package/rest/networks/support/ValidateNetworkTopologyParameters.d.ts +2 -2
  470. package/rest/networks/support/ValidateNetworkTopologyResult.d.ts +2 -2
  471. package/rest/query/support/AttachmentInfo.d.ts +2 -2
  472. package/rest/support/AddressCandidate.d.ts +2 -2
  473. package/rest/support/AddressToLocationsParameters.d.ts +2 -2
  474. package/rest/support/AddressesToLocationsParameters.d.ts +2 -2
  475. package/rest/support/ArealUnit.d.ts +2 -2
  476. package/rest/support/AreasAndLengthsParameters.d.ts +2 -2
  477. package/rest/support/AttachmentQuery.d.ts +2 -2
  478. package/rest/support/AttributeBinsFeatureSet.d.ts +2 -2
  479. package/rest/support/AttributeBinsGrouping.d.ts +3 -3
  480. package/rest/support/AttributeBinsQuery.d.ts +3 -3
  481. package/rest/support/BaseImageMeasureParameters.d.ts +2 -2
  482. package/rest/support/BaseImageMeasureResult.d.ts +2 -2
  483. package/rest/support/BaseImageMeasureResultValue.d.ts +2 -2
  484. package/rest/support/BinParametersBase.d.ts +3 -3
  485. package/rest/support/BufferParameters.d.ts +2 -2
  486. package/rest/support/CameraInfo.d.ts +2 -2
  487. package/rest/support/CameraInfoMixin.d.ts +0 -1
  488. package/rest/support/ClosestFacilityParameters.d.ts +3 -3
  489. package/rest/support/ClosestFacilitySolveResult.d.ts +2 -2
  490. package/rest/support/ColorRamp.d.ts +2 -2
  491. package/rest/support/DataFile.d.ts +2 -2
  492. package/rest/support/DataLayer.d.ts +3 -3
  493. package/rest/support/DateBinTimeInterval.d.ts +3 -3
  494. package/rest/support/DensifyParameters.d.ts +2 -2
  495. package/rest/support/DirectionLine.d.ts +3 -3
  496. package/rest/support/DirectionPoint.d.ts +3 -3
  497. package/rest/support/DirectionsEvent.d.ts +2 -2
  498. package/rest/support/DirectionsString.d.ts +2 -2
  499. package/rest/support/FeatureSet.d.ts +2 -2
  500. package/rest/support/FindImagesParameters.d.ts +3 -3
  501. package/rest/support/FindImagesResult.d.ts +2 -2
  502. package/rest/support/FindParameters.d.ts +2 -2
  503. package/rest/support/FindResult.d.ts +2 -2
  504. package/rest/support/GPMessage.d.ts +2 -2
  505. package/rest/support/GeneralizeParameters.d.ts +2 -2
  506. package/rest/support/IdentifyParameters.d.ts +2 -2
  507. package/rest/support/IdentifyResult.d.ts +2 -2
  508. package/rest/support/ImageAngleParameters.d.ts +2 -2
  509. package/rest/support/ImageAngleResult.d.ts +2 -2
  510. package/rest/support/ImageBoundaryParameters.d.ts +3 -3
  511. package/rest/support/ImageBoundaryResult.d.ts +2 -2
  512. package/rest/support/ImageGPSInfo.d.ts +2 -2
  513. package/rest/support/ImageGPSInfoParameters.d.ts +3 -3
  514. package/rest/support/ImageGPSInfoResult.d.ts +2 -2
  515. package/rest/support/ImageHistogramParameters.d.ts +2 -2
  516. package/rest/support/ImageIdentifyParameters.d.ts +2 -2
  517. package/rest/support/ImageIdentifyResult.d.ts +2 -2
  518. package/rest/support/ImageInspectionInfo.d.ts +2 -2
  519. package/rest/support/ImagePixelLocationParameters.d.ts +2 -2
  520. package/rest/support/ImagePixelLocationResult.d.ts +2 -2
  521. package/rest/support/ImageSample.d.ts +2 -2
  522. package/rest/support/ImageSampleParameters.d.ts +2 -2
  523. package/rest/support/ImageSampleResult.d.ts +2 -2
  524. package/rest/support/ImageToMapMultirayParameters.d.ts +3 -3
  525. package/rest/support/ImageToMapParameters.d.ts +3 -3
  526. package/rest/support/ImageUrlParameters.d.ts +3 -3
  527. package/rest/support/ImageUrlResult.d.ts +2 -2
  528. package/rest/support/ImageVolume.d.ts +2 -2
  529. package/rest/support/ImageVolumeParameters.d.ts +3 -3
  530. package/rest/support/ImageVolumeResult.d.ts +2 -2
  531. package/rest/support/JobInfo.d.ts +2 -2
  532. package/rest/support/LastMileDeliveryParameters.d.ts +3 -3
  533. package/rest/support/LegendLayer.d.ts +2 -2
  534. package/rest/support/LengthsParameters.d.ts +2 -2
  535. package/rest/support/LinearUnit.d.ts +2 -2
  536. package/rest/support/LocateSettingBase.d.ts +3 -3
  537. package/rest/support/LocateSettingSource.d.ts +3 -3
  538. package/rest/support/LocateSettings.d.ts +3 -3
  539. package/rest/support/LocateSettingsOverrides.d.ts +3 -3
  540. package/rest/support/LocationToAddressParameters.d.ts +2 -2
  541. package/rest/support/MapToImageParameters.d.ts +3 -3
  542. package/rest/support/MeasureAreaFromImageResult.d.ts +2 -2
  543. package/rest/support/MeasureFromImageParameters.d.ts +2 -2
  544. package/rest/support/MeasureLengthFromImageResult.d.ts +2 -2
  545. package/rest/support/NetworkUrl.d.ts +3 -3
  546. package/rest/support/NormalizationBinParametersMixin.d.ts +0 -1
  547. package/rest/support/OffsetParameters.d.ts +2 -2
  548. package/rest/support/ParameterValue.d.ts +4 -2
  549. package/rest/support/PointBarrier.d.ts +3 -3
  550. package/rest/support/PolygonBarrier.d.ts +3 -3
  551. package/rest/support/PolylineBarrier.d.ts +3 -3
  552. package/rest/support/ProjectParameters.d.ts +2 -2
  553. package/rest/support/QuantizationParameters.d.ts +2 -2
  554. package/rest/support/Query.d.ts +13 -2
  555. package/rest/support/RasterData.d.ts +2 -2
  556. package/rest/support/RelationParameters.d.ts +2 -2
  557. package/rest/support/RelationshipQuery.d.ts +2 -2
  558. package/rest/support/RouteInfo.d.ts +3 -3
  559. package/rest/support/RouteParameters.d.ts +3 -3
  560. package/rest/support/RouteResult.d.ts +2 -2
  561. package/rest/support/RouteSolveResult.d.ts +2 -2
  562. package/rest/support/ServiceAreaParameters.d.ts +3 -3
  563. package/rest/support/ServiceAreaSolveResult.d.ts +2 -2
  564. package/rest/support/StatisticDefinition.d.ts +2 -2
  565. package/rest/support/Stop.d.ts +3 -3
  566. package/rest/support/SuggestLocationsParameters.d.ts +2 -2
  567. package/rest/support/TimeUnit.d.ts +42 -0
  568. package/rest/support/TimeUnit.js +5 -0
  569. package/rest/support/TopFeaturesQuery.d.ts +2 -2
  570. package/rest/support/TopFilter.d.ts +2 -2
  571. package/rest/support/TravelMode.d.ts +3 -3
  572. package/rest/support/TrimExtendParameters.d.ts +2 -2
  573. package/rest/support/parameterValueUtils.js +1 -1
  574. package/rest/types.d.ts +1 -1
  575. package/rest/versionManagement/gdbVersion/support/AlterVersionParameters.d.ts +2 -2
  576. package/rest/versionManagement/gdbVersion/support/ReconcileParameters.d.ts +2 -2
  577. package/rest/versionManagement/support/CreateVersionParameters.d.ts +2 -2
  578. package/rest/versionManagement/support/GetVersionInfosParameters.d.ts +2 -2
  579. package/statistics/types.d.ts +0 -1
  580. package/support/MapFloorInfo.d.ts +2 -2
  581. package/support/revision.js +1 -1
  582. package/symbols/Font.d.ts +2 -2
  583. package/symbols/LineStyleMarker3D.d.ts +3 -3
  584. package/symbols/LineSymbolMarker.d.ts +2 -2
  585. package/symbols/Symbol.d.ts +2 -2
  586. package/symbols/Symbol3DLayer.d.ts +2 -2
  587. package/symbols/callouts/Callout3D.d.ts +2 -2
  588. package/symbols/callouts/LineCallout3DBorder.d.ts +2 -2
  589. package/symbols/edges/Edges3D.d.ts +2 -2
  590. package/symbols/patterns/LinePattern3D.d.ts +2 -2
  591. package/symbols/patterns/Pattern3D.d.ts +2 -2
  592. package/symbols/support/ElevationInfo.d.ts +10 -4
  593. package/symbols/support/FeatureExpressionInfo.d.ts +2 -2
  594. package/symbols/support/IconSymbol3DLayerResource.d.ts +2 -2
  595. package/symbols/support/ObjectSymbol3DLayerResource.d.ts +2 -2
  596. package/symbols/support/OccludedVisibility.d.ts +3 -3
  597. package/symbols/support/Symbol3DFillMaterial.js +1 -1
  598. package/symbols/support/Symbol3DHalo.d.ts +2 -2
  599. package/symbols/support/Symbol3DIconOutline.d.ts +2 -2
  600. package/symbols/support/Symbol3DMaterial.d.ts +6 -4
  601. package/symbols/support/Symbol3DMaterial.js +1 -1
  602. package/symbols/support/Symbol3DOutline.d.ts +2 -2
  603. package/symbols/support/Symbol3DTextBackground.d.ts +3 -3
  604. package/symbols/support/Symbol3DVerticalOffset.d.ts +2 -2
  605. package/symbols/support/symbolUtils.js +1 -1
  606. package/symbols/support/types.d.ts +0 -1
  607. package/tables/AttributeTableTemplate.d.ts +2 -2
  608. package/tables/elements/AttributeTableAttachmentElement.d.ts +2 -2
  609. package/tables/elements/AttributeTableElement.d.ts +2 -2
  610. package/tables/elements/AttributeTableFieldElement.d.ts +2 -2
  611. package/tables/elements/AttributeTableGroupElement.d.ts +2 -2
  612. package/tables/elements/AttributeTableRelationshipElement.d.ts +2 -2
  613. package/tables/support/FieldOrder.d.ts +3 -3
  614. package/time/TimeExtent.d.ts +2 -2
  615. package/time/TimeExtent.js +1 -1
  616. package/time/TimeInterval.d.ts +3 -3
  617. package/time/types.d.ts +0 -1
  618. package/versionManagement/VersionManagementService.d.ts +2 -2
  619. package/versionManagement/VersioningState.d.ts +2 -2
  620. package/versionManagement/support/type.d.ts +0 -1
  621. package/views/2d/ViewState.d.ts +2 -2
  622. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  623. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  624. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  625. package/views/2d/layers/support/MediaLayerInteractionOptions.d.ts +0 -1
  626. package/views/3d/analysis/Dimension/types.d.ts +0 -1
  627. package/views/3d/analysis/Slice/types.d.ts +0 -1
  628. package/views/3d/analysis/Viewshed/types.d.ts +0 -1
  629. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  630. package/views/3d/camera/intersectionUtils.js +1 -1
  631. package/views/3d/constraints/AltitudeConstraint.d.ts +2 -2
  632. package/views/3d/constraints/ClipDistanceConstraint.d.ts +2 -2
  633. package/views/3d/constraints/Constraints.d.ts +2 -2
  634. package/views/3d/constraints/TiltConstraint.d.ts +2 -2
  635. package/views/3d/environment/CloudyWeather.d.ts +2 -2
  636. package/views/3d/environment/FoggyWeather.d.ts +2 -2
  637. package/views/3d/environment/RainyWeather.d.ts +2 -2
  638. package/views/3d/environment/SnowyWeather.d.ts +2 -2
  639. package/views/3d/environment/SunLighting.d.ts +2 -2
  640. package/views/3d/environment/SunnyWeather.d.ts +2 -2
  641. package/views/3d/environment/VirtualLighting.d.ts +2 -2
  642. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  643. package/views/3d/layers/FlowSubView3D.js +1 -1
  644. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  645. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  646. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  647. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  648. package/views/3d/webgl/ManagedFBO.js +1 -1
  649. package/views/3d/webgl/ManagedFBOResource.d.ts +0 -1
  650. package/views/3d/webgl/RenderNode.d.ts +1 -1
  651. package/views/3d/webgl/RenderNode.js +1 -1
  652. package/views/3d/webgl/types.d.ts +0 -1
  653. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  654. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  655. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  656. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  657. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  658. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  659. package/views/3d/webgl-engine/lib/CutFillDepth.js +1 -1
  660. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  661. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  662. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  663. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  664. package/views/3d/webgl.d.ts +16 -8
  665. package/views/3d/webgl.js +1 -1
  666. package/views/Theme.d.ts +2 -2
  667. package/views/VideoView.d.ts +4 -4
  668. package/views/View.d.ts +3 -3
  669. package/views/View2D.d.ts +2 -2
  670. package/views/ViewAnimation.d.ts +2 -2
  671. package/views/Viewport2DMixin.d.ts +0 -2
  672. package/views/analysis/ElevationProfile/ElevationProfileResult.d.ts +2 -2
  673. package/views/animation/types.d.ts +0 -1
  674. package/views/draw/CursorUpdateEvent.d.ts +0 -1
  675. package/views/draw/DrawAction.d.ts +3 -3
  676. package/views/draw/DrawCompleteEvent.d.ts +0 -1
  677. package/views/draw/VertexAddEvent.d.ts +0 -1
  678. package/views/draw/VertexRemoveEvent.d.ts +0 -1
  679. package/views/draw/support/managers/{DrawTooltipManager.js → TooltipManager.js} +1 -1
  680. package/views/draw/types.d.ts +0 -1
  681. package/views/interactive/Tooltip.d.ts +2 -2
  682. package/views/interactive/snapping/SelfSnappingEngine.js +1 -1
  683. package/views/interactive/snapping/SnappingContext.js +1 -1
  684. package/views/interactive/tooltip/types.d.ts +0 -1
  685. package/views/layers/ImageryTileLayerViewMixin.d.ts +0 -1
  686. package/views/layers/LayerView.d.ts +3 -3
  687. package/views/layers/SceneLayerView.js +1 -1
  688. package/views/layers/types.d.ts +0 -1
  689. package/views/navigation/types.d.ts +0 -1
  690. package/views/support/AttributionItem.d.ts +0 -1
  691. package/views/ui/UI.d.ts +2 -2
  692. package/webdoc/GeotriggersInfo.d.ts +3 -3
  693. package/webdoc/IPSInfo.d.ts +3 -3
  694. package/webdoc/Widgets.d.ts +2 -2
  695. package/webdoc/applicationProperties/Search.d.ts +2 -2
  696. package/webdoc/applicationProperties/SearchLayer.d.ts +2 -2
  697. package/webdoc/applicationProperties/SearchLayerField.d.ts +2 -2
  698. package/webdoc/applicationProperties/SearchTable.d.ts +2 -2
  699. package/webdoc/applicationProperties/SearchTableField.d.ts +2 -2
  700. package/webdoc/applicationProperties/Viewing.d.ts +2 -2
  701. package/webdoc/geotriggersInfo/DeviceLocationFeed.d.ts +3 -3
  702. package/webdoc/geotriggersInfo/ExpressionInfo.d.ts +3 -3
  703. package/webdoc/geotriggersInfo/FeatureFenceParameters.d.ts +3 -3
  704. package/webdoc/geotriggersInfo/FeatureFilter.d.ts +3 -3
  705. package/webdoc/geotriggersInfo/FeatureLayerSource.d.ts +3 -3
  706. package/webdoc/geotriggersInfo/Geotrigger.d.ts +3 -3
  707. package/webdoc/geotriggersInfo/GeotriggerNotificationOptions.d.ts +3 -3
  708. package/webdoc/geotriggersInfo/support/typeUtils.d.ts +0 -1
  709. package/webdoc/ips/AppleIPSProperties.d.ts +3 -3
  710. package/webdoc/ips/Configuration.d.ts +3 -3
  711. package/webdoc/ips/GNSSProperties.d.ts +3 -3
  712. package/webdoc/ips/PathSnappingProperties.d.ts +3 -3
  713. package/webdoc/ips/PositioningService.d.ts +3 -3
  714. package/webdoc/ips/SmoothingProperties.d.ts +3 -3
  715. package/webdoc/support/SlideThumbnail.d.ts +3 -3
  716. package/webdoc/support/types.d.ts +0 -1
  717. package/webdoc/widgets/FloorFilter.d.ts +2 -2
  718. package/webdoc/widgets/TimeSlider.d.ts +2 -2
  719. package/webmap/ApplicationProperties.d.ts +2 -2
  720. package/webmap/Bookmark.d.ts +2 -2
  721. package/webmap/InitialViewProperties.d.ts +2 -2
  722. package/webmap/background/ColorBackground.d.ts +2 -2
  723. package/webscene/ApplicationProperties.d.ts +2 -2
  724. package/webscene/Environment.d.ts +2 -2
  725. package/webscene/InitialViewProperties.d.ts +3 -3
  726. package/webscene/Presentation.d.ts +3 -3
  727. package/webscene/Slide.d.ts +4 -4
  728. package/webscene/SlideLegendInfo.d.ts +3 -3
  729. package/webscene/SunLighting.d.ts +2 -2
  730. package/webscene/VirtualLighting.d.ts +2 -2
  731. package/webscene/background/Background.d.ts +2 -2
  732. package/webscene/support/Description.d.ts +3 -3
  733. package/webscene/support/FeatureReference.d.ts +3 -3
  734. package/webscene/support/FeatureReferenceId.d.ts +3 -3
  735. package/webscene/support/LayerReference.d.ts +3 -3
  736. package/webscene/support/SlideElements.d.ts +3 -3
  737. package/webscene/support/SlideEnvironment.d.ts +3 -3
  738. package/webscene/support/SlideGround.d.ts +3 -3
  739. package/webscene/support/SlidePopupInfo.d.ts +3 -3
  740. package/webscene/support/SlideVisibleLayer.d.ts +3 -3
  741. package/webscene/support/Title.d.ts +3 -3
  742. package/widgets/Attachments/types.d.ts +0 -1
  743. package/widgets/BasemapGallery/support/PortalBasemapsSource.d.ts +2 -2
  744. package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +2 -2
  745. package/widgets/BasemapLayerList/types.d.ts +0 -1
  746. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +20 -2
  747. package/widgets/BatchAttributeForm.d.ts +2 -0
  748. package/widgets/BatchAttributeForm.js +1 -1
  749. package/widgets/Bookmarks/BookmarksViewModel.d.ts +2 -2
  750. package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +2 -2
  751. package/widgets/CatalogLayerList/types.d.ts +0 -1
  752. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +2 -2
  753. package/widgets/Daylight/DaylightViewModel.d.ts +2 -2
  754. package/widgets/Daylight/types.d.ts +0 -1
  755. package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +2 -2
  756. package/widgets/DirectionalPad/types.d.ts +0 -1
  757. package/widgets/Directions/DirectionsViewModel.d.ts +2 -2
  758. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  759. package/widgets/Editor/EditorViewModel.d.ts +2 -2
  760. package/widgets/Editor/UpdateFeaturesWorkflowData.d.ts +2 -2
  761. package/widgets/Editor/Workflow.d.ts +2 -2
  762. package/widgets/Editor/workflowUtils.js +1 -1
  763. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  764. package/widgets/Feature/support/featureUtils.js +1 -1
  765. package/widgets/FeatureForm/FeatureFormViewModel.d.ts +3 -3
  766. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +43 -4
  767. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  768. package/widgets/FeatureTable/Grid/GridViewModel.d.ts +2 -2
  769. package/widgets/FeatureTable/Grid/types.d.ts +7 -1
  770. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +3 -3
  771. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.d.ts +0 -1
  772. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  773. package/widgets/FeatureTable/support/TableTemplate.d.ts +3 -3
  774. package/widgets/FeatureTable.d.ts +43 -4
  775. package/widgets/FeatureTable.js +1 -1
  776. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +2 -2
  777. package/widgets/Features/FeaturesViewModel.d.ts +2 -2
  778. package/widgets/Histogram/types.d.ts +0 -1
  779. package/widgets/HistogramRangeSlider/types.d.ts +0 -1
  780. package/widgets/Home/HomeViewModel.d.ts +2 -2
  781. package/widgets/Home.d.ts +1 -2
  782. package/widgets/LayerList/LayerListViewModel.d.ts +2 -2
  783. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  784. package/widgets/LinkChartLayoutSwitcher/LinkChartLayoutSwitcherViewModel.d.ts +2 -2
  785. package/widgets/Measurement/types.d.ts +0 -1
  786. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +3 -3
  787. package/widgets/OrientedImageryViewer/types.d.ts +0 -1
  788. package/widgets/Print/CustomTemplate.d.ts +2 -2
  789. package/widgets/Print/PrintViewModel.d.ts +3 -3
  790. package/widgets/ScaleRangeSlider/types.d.ts +0 -1
  791. package/widgets/Search/SearchSource.d.ts +2 -2
  792. package/widgets/Search/SearchViewModel.d.ts +8 -4
  793. package/widgets/Search/SearchViewModel.js +1 -1
  794. package/widgets/Search/support/layerSearchUtils.js +1 -1
  795. package/widgets/Search.js +1 -1
  796. package/widgets/ShadowCast/types.d.ts +0 -1
  797. package/widgets/Sketch/SketchViewModel.d.ts +2 -2
  798. package/widgets/Swipe/types.d.ts +0 -1
  799. package/widgets/TableList/TableListViewModel.d.ts +2 -2
  800. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +2 -2
  801. package/widgets/Track/types.d.ts +0 -1
  802. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.d.ts +2 -2
  803. package/widgets/ValuePicker/types.d.ts +0 -1
  804. package/widgets/Weather/types.d.ts +0 -1
  805. package/widgets/Widget.d.ts +3 -3
  806. package/widgets/support/GeolocationPositioning.d.ts +2 -2
  807. package/widgets/support/GridControls/GridControlsViewModel.d.ts +2 -2
  808. package/widgets/support/GridControls/types.d.ts +0 -1
  809. package/widgets/support/forms/types.d.ts +0 -1
  810. package/widgets/types.d.ts +1 -2
  811. package/assets/esri/core/workers/chunks/21ac84b5c7dedcfd747d.js +0 -2
  812. package/assets/esri/core/workers/chunks/22503abc06354741d28a.js +0 -1
  813. package/assets/esri/core/workers/chunks/3606fc5537c4d11b9554.js +0 -1
  814. package/assets/esri/core/workers/chunks/3ad7ec46adecf00ae1c2.js +0 -1
  815. package/assets/esri/core/workers/chunks/3b67aa46a60e35469bf8.js +0 -1
  816. package/assets/esri/core/workers/chunks/4b09d92c51c4619b548a.js +0 -1
  817. package/assets/esri/core/workers/chunks/52684c2abc9e8ce793cf.js +0 -1
  818. package/assets/esri/core/workers/chunks/532935f420ed5f13c011.js +0 -1
  819. package/assets/esri/core/workers/chunks/5348e4dc55428de9bba7.js +0 -1
  820. package/assets/esri/core/workers/chunks/534ed6574e4a1613ba05.js +0 -2
  821. package/assets/esri/core/workers/chunks/53a1c6e008287d1f12f0.js +0 -1
  822. package/assets/esri/core/workers/chunks/5aee84e827e6fcc9c4c4.js +0 -2
  823. package/assets/esri/core/workers/chunks/5fc6cada83bf8462d54c.js +0 -1
  824. package/assets/esri/core/workers/chunks/7b2f848947b296c7c785.js +0 -1
  825. package/assets/esri/core/workers/chunks/7f76566d9b3801742387.js +0 -1
  826. package/assets/esri/core/workers/chunks/81e395a93c67749c6487.js +0 -1
  827. package/assets/esri/core/workers/chunks/8deae3a426eceae73186.js +0 -1
  828. package/assets/esri/core/workers/chunks/90a53bfe95ed687c28c1.js +0 -2
  829. package/assets/esri/core/workers/chunks/911912b0ef7ffed875be.js +0 -1
  830. package/assets/esri/core/workers/chunks/a4ee92867ad5cde25aed.js +0 -1
  831. package/assets/esri/core/workers/chunks/ab3e457c82fa9bd0203f.js +0 -1
  832. package/assets/esri/core/workers/chunks/af3d4eba6fe24db3ceba.js +0 -1
  833. package/assets/esri/core/workers/chunks/b1085fa91724e2d3b24f.js +0 -1
  834. package/assets/esri/core/workers/chunks/b48b0f512a1cd7226bdc.js +0 -1
  835. package/assets/esri/core/workers/chunks/c0265669fb616f052b65.js +0 -1
  836. package/assets/esri/core/workers/chunks/c16115cfbca879dd6717.js +0 -1
  837. package/assets/esri/core/workers/chunks/d3c69c9cb3d9c3f5c67a.js +0 -1
  838. package/assets/esri/core/workers/chunks/d477def8bfd8482596d1.js +0 -1
  839. package/assets/esri/core/workers/chunks/dd30c1f5da0af72becd1.js +0 -1
  840. package/assets/esri/core/workers/chunks/dfef6e3d7bbf099de498.js +0 -1
  841. package/assets/esri/core/workers/chunks/e3d3fc87789fd711f161.js +0 -2
  842. package/assets/esri/core/workers/chunks/ef519984fa691aad8d87.js +0 -2
  843. package/layers/support/ElevationTileData.d.ts +0 -32
  844. package/rest/geoprocessor/execute.d.ts +0 -6
  845. /package/layers/buildingSublayers/{utils.d.ts → types.d.ts} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8144],{8144(t,e,n){n.d(e,{vt:()=>Gs,UD:()=>Zs});var s=n(85334),r=n(49186),o=n(4718),i=n(31635),a=n(91429),u=n(94778),l=n(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 f=m;var g=n(14140),d=n(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:n}=t;let s=n.rasters||n.raster&&[n.raster];for(;s?.length;){e.unshift(...s);const t=[];for(let e=0;e<s.length;e++){const{parameters:n}=s[e],r=n.rasters||n.raster&&[n.raster];r?.length&&t.push(...r)}s=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 n=e[t];n.id=e.length-t-1;const{rasters:s}=n.parameters;r=r||null!=s&&s.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,n=-1){this.id=n+1;const s=this._getRasterValues();let r=!0;for(let n=0;n<s.length;n++){const o=s[n];if(null!=o&&this._isRasterFunctionValue(o)){const s=o.bind(t,e,this.id+n);if(!s.success)return this._bindingResult=s,s;r=r&&s.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)}process(t){const e=this._getRasterValues(),n=0===e.length?t.pixelBlocks??t.primaryPixelBlocks:e.map(e=>this._readRasterValue(e,t));return this._processPixels({...t,pixelBlocks:n})}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:n}=this.sourceRasterInfos[0],s=Array.from({length:n},(t,e)=>e);return this.rawInputBandIds=this._getInputBandIds(s),this.rawInputBandIds}swizzleInputBandIds(t){const e=this._getRasterValues().filter(this._isRasterFunctionValue);let n=!0;for(const s of e)n=s.swizzleInputBandIds(t)&&n;return!!n&&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:n}=this.functionArguments;return n&&Array.isArray(n)&&n.length?(t.rasters=n.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:n}=this.functionArguments;if(n&&Array.isArray(n)&&n.length)n.forEach(e=>{if(this._isRasterFunctionValue(e)){const n=e.getClippingGeometries();t.push(...n)}});else if(this._isRasterFunctionValue(e)){const n=e.getClippingGeometries();t.push(...n)}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:n,rasterIds:s}=t;if(0===e.length)return n;const r=e.map(t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&s.includes(t)?n[s.indexOf(t)]:"number"!=typeof t?n[0]:void 0),o=r.find(t=>t)??n[0];return r.forEach((t,e)=>{void 0===t&&(r[e]=o)}),r}_getPrimaryRasterId(t){return t?.rasterId}_getPrimaryRasters(t,e=[],n=[]){for(let s=0;s<t.sourceRasters.length;s++){const r=t.sourceRasters[s];if("number"!=typeof r)if("bind"in r)this._getPrimaryRasters(r,e,n);else{const t=r,s=this._getPrimaryRasterId(t);if(null==s)continue;n.includes(s)||(this.mainPrimaryRasterId===s?(e.unshift(t),n.unshift(s)):(e.push(t),n.push(s)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,e){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)}_patchRasterInfo(){const{rasterInfo:t}=this;if(!t?.keyProperties)return;const{bandCount:e,keyProperties:n,statistics:s,histograms:r}=t,o=n.BandProperties;o&&o.length!==e&&(t.keyProperties={...n,BandProperties:void 0}),s&&s.length!==e&&(t.statistics=s.length>e?s.slice(0,e):null),r&&r.length!==e&&(t.histograms=r.length>e?r.slice(0,e):null),n.BAND_COUNT&&Number(n.BAND_COUNT)!==e&&(t.keyProperties={...n,BAND_COUNT:"string"==typeof n.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:[d.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},b={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},C={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,...b,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,...C},P=new Map([[b.acos,{domain:[0,Math.PI],isInteger:!1}],[b.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[b.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[b.cos,{domain:[-1,1],isInteger:!1}],[b.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 T(t){return P.get(t)}const R=[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 N(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]+r[t]);return i}function k(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand("f32",r);return o.set(s),o}function I(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=s[t]*s[t]);return o}function S(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]-r[t]);return i}function _(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]*r[t]);return i}function F(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=Math.sign(s[t])*Math.floor(Math.abs(s[t])));return o}function B(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]/r[t]);return i}function j(t,e,n){return B(t,e,"f32")}function Z(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=Math.floor(s[t]/r[t]));return i}function G(t,e,n,s){const r=t[0],o=r.length,i=g.A.createEmptyBand(n,o);if(s===b.atanh){for(let t=0;t<o;t++)if(e[t]){const n=r[t];Math.abs(n)>=1?e[t]=0:i[t]=Math.atanh(n)}return i}const a=s===b.asin?Math.asin:Math.acos;for(let t=0;t<o;t++)if(e[t]){const n=r[t];Math.abs(n)>1?e[t]=0:i[t]=a(n)}return i}function z(t,e,n,s){const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s(r[t]));return i}function O(t,e,n,s){const[r,o]=t,i=r.length,a=g.A.createEmptyBand(n,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=s(r[t],o[t]));return a}function E(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]&r[t]);return i}function D(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<<r[t]);return i}function V(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=~s[t]);return o}function U(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]|r[t]);return i}function L(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>>r[t]);return i}function W(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]^r[t]);return i}function $(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]&&r[t]?1:0);return i}function K(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=s[t]?0:1);return o}function H(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]||r[t]?1:0);return i}function q(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=(s[t]?1:0)^(r[t]?1:0));return i}function J(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]===r[t]?1:0);return i}function X(t,e,n,s){const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o),a=s===Math.E;for(let t=0;t<o;t++)e&&!e[t]||(i[t]=a?Math.exp(r[t]):s**r[t]);return i}function Y(t,e,n){return X(t,e,n,10)}function Q(t,e,n){return X(t,e,n,2)}function tt(t,e,n){return X(t,e,n,Math.E)}function et(t,e,n,s){const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(r[t]<=0?e[t]=0:i[t]=s(r[t]));return i}function nt(t,e,n){return et(t,e,n,Math.log10)}function st(t,e,n){return et(t,e,n,Math.log2)}function rt(t,e,n){return et(t,e,n,Math.log)}function ot(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>r[t]?1:0);return i}function it(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>=r[t]?1:0);return i}function at(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<r[t]?1:0);return i}function ut(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<=r[t]?1:0);return i}function lt(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);if(!e)return o;for(let t=0;t<r;t++)o[t]=e[t]?0:1;return o}function ct(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]%r[t]);return i}function pt(t,e,n){const[s]=t,r=s.length,o=g.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=-s[t]);return o}function ht(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]===r[t]?0:1);return i}function mt(t,e,n){const[s,r]=t,o=s.length,i=g.A.createEmptyBand(n,o),a=new Uint8Array(o);for(let t=0;t<o;t++)null!=e&&!e[t]||0!==s[t]||(i[t]=r[t],a[t]=255);return{band:i,mask:a}}function ft(t,e,n){const[s,r,o]=t,i=s.length,a=g.A.createEmptyBand(n,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=s[t]?r[t]:o[t]);return a}function gt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n];for(let r=1;r<s;r++){const s=t[r][n];e<s&&(e=s)}i[n]=e}return i}function dt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n];for(let r=1;r<s;r++){const s=t[r][n];e>s&&(e=s)}i[n]=e}return i}function yt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n],o=e;for(let r=1;r<s;r++){const s=t[r][n];o<s?o=s:e>s&&(e=s)}i[n]=o-e}return i}function xt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=0;for(let r=0;r<s;r++)e+=t[r][n];i[n]=e/s}return i}function wt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n])for(let e=0;e<s;e++){const s=t[e];i[n]+=s[n]}return i}function At(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){const e=new Float32Array(s);let r=0;for(let o=0;o<s;o++){const s=t[o];r+=s[n],e[o]=s[n]}r/=s;let o=0;for(let t=0;t<s;t++)o+=(e[t]-r)**2;i[n]=Math.sqrt(o/s)}return i}function vt(t,e,n){const s=t.length;if(s<2)return t[0];const r=Math.floor(s/2),[o]=t,i=o.length,a=g.A.createEmptyBand(n,i),u=new Float32Array(s),l=s%2==1;for(let n=0;n<i;n++)if(!e||e[n]){for(let e=0;e<s;e++)u[e]=t[e][n];u.sort(),a[n]=l?u[r]:(u[r]+u[r-1])/2}return a}function bt(t,e,n){const[s,r]=t;if(null==r)return s;const o=s.length,i=g.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<r[t]?s[t]:r[t]);return i}function Ct(t,e,n){const s=t.length;if(s<=2)return bt(t,e,n);const r=t[0].length,o=g.A.createEmptyBand(n,r),i=new Map;for(let n=0;n<r;n++)if(!e||e[n]){i.clear();for(let e=0;e<s;e++){const s=t[e][n];i.set(s,i.has(s)?i.get(s)+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[n]=a[0]}return o}function Mt(t,e,n){const s=t.length;if(s<=2)return bt(t,e,n);const r=t[0].length,o=g.A.createEmptyBand(n,r),i=new Map;for(let n=0;n<r;n++)if(!e||e[n]){i.clear();for(let e=0;e<s;e++){const s=t[e][n];i.set(s,i.has(s)?i.get(s)+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[n]=a[0]}return o}function Pt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=g.A.createEmptyBand(n,o),a=new Set;for(let n=0;n<o;n++)if(!e||e[n]){let e;a.clear();for(let r=0;r<s;r++)e=t[r][n],a.add(e);i[n]=a.size}return i}const Tt=new Map,Rt=new Map,Nt=new Map,kt=new Map;function It(){Tt.size||(Tt.set(4,Math.sqrt),Tt.set(6,Math.acos),Tt.set(7,Math.asin),Tt.set(8,Math.atan),Tt.set(9,Math.atanh),Tt.set(10,Math.abs),Tt.set(21,Math.cos),Tt.set(22,Math.cosh),Tt.set(48,Math.floor),Tt.set(49,Math.ceil),Tt.set(51,Math.sin),Tt.set(52,Math.sinh),Tt.set(56,Math.tan),Tt.set(57,Math.tanh),Tt.set(59,Math.acosh),Tt.set(60,Math.asinh),Tt.set(65,Math.floor),Rt.set(5,Math.pow),Rt.set(61,Math.atan2),Nt.set(1,N),Nt.set(2,S),Nt.set(3,_),Nt.set(11,E),Nt.set(12,D),Nt.set(13,V),Nt.set(14,U),Nt.set(15,L),Nt.set(16,W),Nt.set(17,$),Nt.set(18,K),Nt.set(19,H),Nt.set(20,q),Nt.set(23,B),Nt.set(24,J),Nt.set(25,tt),Nt.set(26,Y),Nt.set(27,Q),Nt.set(28,ot),Nt.set(29,it),Nt.set(30,F),Nt.set(31,lt),Nt.set(32,k),Nt.set(33,at),Nt.set(34,ut),Nt.set(35,rt),Nt.set(36,nt),Nt.set(37,st),Nt.set(44,ct),Nt.set(45,pt),Nt.set(46,ht),Nt.set(53,I),Nt.set(64,j),Nt.set(65,Z),Nt.set(76,ft),Nt.set(78,ft),kt.set(38,Ct),kt.set(39,gt),kt.set(40,xt),kt.set(41,vt),kt.set(42,dt),kt.set(43,Mt),kt.set(47,yt),kt.set(54,At),kt.set(55,wt),kt.set(58,Pt),kt.set(66,Ct),kt.set(67,gt),kt.set(68,xt),kt.set(69,vt),kt.set(70,dt),kt.set(71,Mt),kt.set(72,yt),kt.set(73,At),kt.set(74,wt),kt.set(75,Pt))}function St(t,e,n={}){It();let s=function(t,e=!1){const n=t.map(t=>t.mask),s=n.filter(t=>null!=t),r=t[0].pixels[0].length;if(0===s.length||e&&s.length!==n.length)return new Uint8Array(r).fill(255);const o=s[0],i=new Uint8Array(o);if(1===s.length)return i;if(!e){for(let t=1;t<s.length;t++){const e=s[t];for(let t=0;t<i.length;t++)i[t]&&(i[t]=e[t]?255:0)}return i}for(let t=1;t<s.length;t++){const e=s[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"}=n,o=!kt.has(e)||n.processAsMultiband,i=o?t[0].pixels.length:1,a=[];for(let n=0;n<i;n++){const i=kt.has(e)&&!o?t.flatMap(t=>t.pixels):t.map(t=>t.pixels[n]);let l,c=!0;if(e===C.setNull){const t=mt(i,s,r);l=t.band,s=t.mask,c=!1}else Nt.has(e)?l=Nt.get(e)(i,s,"f64"):Tt.has(e)?l=e===b.asin||e===b.acos||e===b.atanh?G(i,s,"f64",e):z(i,s,"f64",Tt.get(e)):Rt.has(e)?l=O(i,s,"f64",Rt.get(e)):kt.has(e)?l=kt.get(e)(i,s,"f64"):(l=i[0],c=!1);if(c&&e!==v.isNull&&!P.has(e)){const t=g.A.createEmptyBand(r,l.length);s||(s=new Uint8Array(l.length).fill(255)),(0,u.$p)(l,s),(0,u.yM)(l,s,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:s,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,n){return St(t,e=[null,1,2,3,23,5,44][e]??1,{outputPixelType:n})}(e,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=["","plus","minus","times","divide","power","mod"][t],n=this.outputPixelType??"f32";let[s,r]=(0,u.hP)(n);const o=(0,u.zw)(n);return o&&(s-=1e-4,r+=1e-4),{imageCount:2,operationName:e,domainRange:[s,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:f,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 Ft=_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 Gt=n(51181);let zt=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:n,primaryPixelSizes:s}=t,r=s?.[0],o=r??(n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1});return(0,Gt.di)(e,{resolution:o})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],zt.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Zt,json:{write:!0,name:"rasterFunctionArguments"}})],zt.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],zt.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],zt.prototype,"isGCS",void 0),zt=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunction")],zt);const Ot=zt;var Et=n(66552);const Dt=new Set(["+","-","*","/","(",")"]);function Vt(t,e){return t.toLowerCase().startsWith("b")?e[parseInt(t.slice(1),10)-1]:parseFloat(t)}function Ut(t,e,n,s){if("number"==typeof n&&"number"==typeof s)return n+s;let r,o,i;"number"==typeof n?(i=s,r=i.length,o=new Float32Array(r),o.fill(n)):(r=n.length,o=n,s.constructor===Number?(i=new Float32Array(r),i.fill(s)):i=s);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 n=0,s=0;do{n=0,s=0;for(let e=0;e<t.length;e++)if("("===t[e])n=e;else if(")"===t[e]){s=e;break}s===n+1&&t.splice(n,2)}while(s===n+1);return t}function Wt(t){if(1===t.length)return{opIndex:0,numIndex:0};let e=0,n=0;for(let s=0;s<t.length;s++)if("("===t[s])e=s;else if(")"===t[s]){n=s;break}const s=0===n?t:t.slice(e+1,n);let r=-1;for(let t=0;t<s.length;t++)if("*"===s[t]||"/"===s[t]){r=t;break}if(r>-1)n>0&&(r+=e+1);else{for(let t=0;t<s.length;t++)if("+"===s[t]||"-"===s[t]){r=t;break}n>0&&(r+=e+1)}let o=0;for(let e=0;e<r;e++)"("===t[e]&&o++;return{opIndex:r,numIndex:r-o}}var $t=n(47520);const Kt=new Et.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,$t.AB)(t))return t;const{equation:n,method:s}=e,r=e.bandIndexes.map(t=>t-1),{pixels:o,mask:i}=t;let a;switch(s){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,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o];s&&(r[o]=t/s)}return[r]}(i,o[r[0]],o[r[1]]);break;case"ci-g":case"ci-re":a=function(t,e,n){const s=e.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o];s&&(r[o]=t/s-1)}return[r]}(i,o[r[0]],o[r[1]]);break;case"savi":a=function(t,e,n,s){const r=n.length,o=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){const t=n[i],r=e[i],a=r+t+s;a&&(o[i]=(r-t)/a*(1+s))}return[o]}(i,o[r[0]],o[r[1]],r[2]+1);break;case"tsavi":a=function(t,e,n,s,r,o){const i=n.length,a=new Float32Array(i),u=-r*s+o*(1+s*s);for(let o=0;o<i;o++)if(null==t||t[o]){const t=n[o],i=e[o],l=r*i+t+u;l&&(a[o]=s*(i-s*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,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=n[o],s=e[o],i=2*s+1;r[o]=.5*(i-Math.sqrt(i*i-8*(s-t)))}return[r]}(i,o[r[0]],o[r[1]]);break;case"gemi":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=n[o],s=e[o];if(1!==t&&s+t+.5!==0){const e=(2*(s*s-t*t)+1.5*s+.5*t)/(s+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,n,s,r){const o=n.length,i=new Float32Array(o),a=1/Math.sqrt(1+s*s);for(let u=0;u<o;u++)if(null==t||t[u]){const t=n[u],o=e[u];i[u]=(o-s*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[n,s,r,o,i,a]=e,u=n.length,l=new Float32Array(u);for(let e=0;e<u;e++)(null==t||t[e])&&(l[e]=-.2848*n[e]-.2435*s[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[n,s,r,o,i]=e,a=n.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]=n[e]?o[e]/n[e]*100:0,c[e]=r[e]?s[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[n,s,r]=e,o=n.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=n[e],o=s[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[n,s,r]=e,o=n.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=n[e],o=s[e],a=r[e],u=Math.sqrt((2*t+1)**2-(6*t-5*Math.sqrt(o))-.5);if(u){const n=1.5*(1.2*(t-a)-2.5*(o-a));i[e]=n/u}}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"rtvi-core":a=function(t,e){const[n,s,r]=e,o=n.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=n[e],o=s[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[n,s,r]=e,o=n.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=n[e],o=s[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,n=.5){const[s,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=s[e],i=r[e],u=o[e],l=t+n*i+(1-n)*u;l&&(a[e]=(t-n*i-(1-n)*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,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o])for(o=0;o<s;o++){const t=(.1-e[o])**2+(.06-n[o])**2;t&&(r[o]=1/t)}return[r]}(i,o[r[0]],o[r[1]]);break;case"custom":a=function(t,e,n){let s,{ops:r,nums:o}=function(t,e){(t=t.replaceAll(" ","")).startsWith("-")&&(t="0"+t),t.startsWith("+")&&(t=t.slice(1));const n=t.split(""),s=[],r=[];let o="";for(let t=0;t<n.length;t++){const i=n[t];Dt.has(i)?(o.length&&r.push(Vt(o,e)),s.push(i),o=""):o=o.concat(i)}return o.length&&r.push(Vt(o,e)),{ops:s,nums:r}}(n,e);if(0===r.length){const t=1===o.length?o[0]:e[0];if(t instanceof Float32Array)return[t];const n=new Float32Array(e[0].length);return"number"==typeof t?n.fill(t):n.set(t),[n]}for(;r.length>0;){const{numIndex:e,opIndex:n}=Wt(r);if(s=Ut(t,r[n],o[e],o[e+1]),1===r.length)break;r=Lt(r,n),o.splice(e,2,s)}return[s]}(i,o,n);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,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o],i=t+s;i&&(r[o]=(t-s)/i)}return[r]}var Xt,Yt=n(93223);let Qt=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}})],Qt.prototype,"bandIndexes",void 0),(0,i.Cg)([(0,Yt.e)(Kt)],Qt.prototype,"method",void 0),Qt=Xt=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunctionArguments")],Qt);const te=Qt,ee=new Set(["vari","mtvi2","rtvi-core","evi"]);let ne=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:n,bandIndexes:s}=this.functionArguments,r=s.split(" ").map(t=>parseFloat(t));if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this,e=ee.has(this.functionArguments.method)?3:2,n=r.slice(0,e).map(e=>t.indexOf(e-1));r.splice(0,e,...n)}return Ht(e,{method:n,bandIndexes:r,equation:s,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 n,s;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":n=qt([e[0],e[1],0]),s="ndxi";break;case"ndwi":n=qt([e[1],e[0],0]),s="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":n=qt([e[0],e[1],0]),s="sr";break;case"ci-g":case"ci-re":n=qt([e[0],e[1],0]),s="ci";break;case"savi":n=qt([e[0],e[1],0]),s="savi",r[0]=t[2]+1;break;case"tsavi":n=qt([e[0],e[1],0]),s="tsavi",r[0]=t[2]+1,r[1]=t[3]+1,r[2]=t[4]+1;break;case"msavi":n=qt([e[0],e[1],0]),s="msavi";break;case"gemi":n=qt([e[0],e[1],0]),s="gemi";break;case"pvi":n=qt([e[0],e[1],0]),s="tsavi",r[0]=t[2]+1,r[1]=t[3]+1;break;case"vari":n=qt([e[0],e[1],e[2]]),s="vari";break;case"mtvi2":n=qt([e[0],e[1],e[2]]),s="mtvi";break;case"rtvi-core":n=qt([e[0],e[1],e[2]]),s="rtvicore";break;case"evi":n=qt([e[0],e[1],e[2]]),s="evi";break;case"wndwi":n=qt([e[0],e[1],0]),s="wndwi",r[0]=t[3]?t[3]+1:.5;break;case"bai":n=qt([e[1],e[0],0]),s="bai";break;default:n=qt([0,1,2]),s="custom"}return{bandIndexMat3:n,indexType:s,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),n=t.length,s=e.map(t=>t>=n?n-1:t),r=ee.has(this.functionArguments.method)?3:2,o=s.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:n}=this.functionArguments,s=(["vari","mtvi2","rtvi-core","evi"].includes(n)?e.slice(0,3):"bai"===n||"ndwi"===n?[e[1],e[0]]:e.slice(0,2)).map(e=>t.indexOf(e));return s[2]??=s[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=s,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ne.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:te,json:{write:!0,name:"rasterFunctionArguments"}})],ne.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],ne.prototype,"rasterArgumentNames",void 0),ne=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunction")],ne);const se=ne;var re,oe=n(65864),ie=n(50498);const ae=new Et.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=n(34930),pe=n(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:n,clippingType:s}=e;if(!n)return{success:!1,supportsGPU:!1,error:"missing clipping geometry"};if("outside"===s)try{const{spatialReference:e}=t,s="extent"===n.type?(0,pe._l)(n,e):(0,pe.uk)(n,e).extent;s&&(0,ce.Sd)(t,s)}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 fe,ge=n(67369),de=n(95349),ye=n(36005);let xe=fe=class extends p{castColormapName(t){if(!t)return null;const e=t.toLowerCase();return ge.L7.includes(e)?e:null}readColorRamp(t){return(0,de.r)(t)}readColorRampName(t,e){if(!t)return null;const n=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return n?ge.kH.fromJSON(n):null}clone(){return new fe({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:de.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=fe=(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 be(t,e){const n=[],s=[];for(let e=0;e<t.length-1;e++)n.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:t[e].slice(1),toColor:t[e+1].slice(1)}),s.push(t[e+1][0]-t[e][0]);const r=t[t.length-1][0];return(0,ge.iv)({type:"multipart",colorRamps:n},{numColors:r,weights:e=e??s})}let Ce=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:n,colorRamp:s,colorRampName:r}=this.functionArguments;if(!e?.length)if(s)this.colorRamp=s,e=(0,ge.R8)(s,{interpolateAlpha:!0});else if(r){const t=(0,ge.M5)(r);t&&(e=(0,ge.R8)(t),this.colorRamp=(0,de.r)(t))}else n&&(e=function(t){let e;switch(t){case"elevation":e=be([[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=be([[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=be([[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}(n));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"}})],Ce.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:we,json:{write:!0,name:"rasterFunctionArguments"}})],Ce.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Ce.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],Ce.prototype,"isNoopProcess",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ce.prototype,"indexedColormap",void 0),(0,i.Cg)([(0,a.MZ)()],Ce.prototype,"colorRamp",void 0),Ce=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunction")],Ce);const Me=Ce;var Pe;let Te=Pe=class extends p{clone(){return new Pe({raster:this.raster})}};Te=Pe=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunctionArguments")],Te);const Re=Te;var Ne=n(4151),ke=n(88178);let Ie=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 n=[...t.colormap].sort((t,e)=>t[0]-e[0]),{indexedColormap:s,offset:r}=(0,$t.zg)({colormap:n});return s?(this.lookup={indexedColormap:s,offset:r},{success:!0,supportsGPU:(0,ke.WN)(s)}):{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 n=e.pixels[0],s=e.mask??new Uint8Array(n.length).fill(255),r=new Uint8Array(n.length),o=new Uint8Array(n.length),i=new Uint8Array(n.length),{indexedColormap:a,offset:u}=this.lookup,l=a.length;for(let t=0;t<n.length;t++)if(s[t]){let e=4*(n[t]-u);e<0||e>l-4?s[t]=0:(r[t]=a[e++],o[t]=a[e++],i[t]=a[e++])}return e.pixels=[r,o,i],e.statistics=[new Ne.A(0,255),new Ne.A(0,255),new Ne.A(0,255)],e.pixelType=this.outputPixelType,e}_getWebGLParameters(){return this.lookup}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ie.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Re,json:{write:!0,name:"rasterFunctionArguments"}})],Ie.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Ie.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ie.prototype,"lookup",void 0),Ie=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunction")],Ie);const Se=Ie;var _e,Fe=n(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,Fe.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 n=e.clone();if(n.attributeTable=null,n.colormap=null,n.pixelType=this.outputPixelType,n.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)),n.statistics=e}if(t.every(({histograms:t})=>null!=t&&t.length)){const e=[];t.forEach(({histograms:t})=>null!=t&&e.push(...t)),n.histograms=e}n.multidimensionalInfo&&n.multidimensionalInfo.variables.forEach(e=>{const n=t.map(t=>t.multidimensionalInfo?.variables.find(({name:t})=>t===e.name)),s=n.map(t=>t?.statistics?.length?t.statistics:null),r=n.map(t=>t?.histograms?.length?t.histograms:null);e.statistics=s.every(t=>null!=t)?s.flat():null,e.histograms=r.every(t=>null!=t)?r.flat():null}),n.bandCount>1&&(n.colormap=null,n.attributeTable=null);const s=t.every(t=>t.keyProperties.BandProperties?.length)?t.flatMap(t=>t.keyProperties.BandProperties):void 0;return n.keyProperties={...n.keyProperties,BandProperties:s},this.rasterInfo=n,{success:!0,supportsGPU:n.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;if(!e)return null;const n=e?.[0];return null==n?null:(0,$t.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 Ge=Ze,ze=new Et.J({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),Oe=new Et.J({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});var Ee;let De=Ee=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 Ee({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};(0,i.Cg)([(0,Yt.e)(ze)],De.prototype,"method",void 0),(0,i.Cg)([(0,Yt.e)(Oe)],De.prototype,"keepMethod",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],De.prototype,"raster2",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],De.prototype,"rasters",null),De=Ee=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunctionArguments")],De);const Ve=De;var Ue=n(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),n=this._getFieldNames(t,"value"),s=t.map(t=>this._getClassFieldName(t));if(null==n[0]||null==n[1]||null==s[0]||null==s[1])return{success:!1,supportsGPU:!1,error:"both inputs must have proper attribute table with value and class fields"};this._updateAttributeTable(e,n,s)}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:n}=this.functionArguments;return function(t,e,n,s){const[r,o]=t,i=(0,u.zw)(n)&&!(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(n,p*h);switch(e){case"difference":case"relative-difference":!function(t){const{bands:[e,n],mask:s,isRelative:r,isRoundingNeeded:o,outBand:i}=t,a=e.length;for(let t=0;t<a;t++)if(!s||s[t]){let s=e[t]-n[t];if(r){const r=Math.max(Math.abs(e[t])-Math.abs(n[t]));s=r>0?s/r:0}i[t]=o?Math.round(s):s}}({bands:c,mask:l,outBand:m,isRoundingNeeded:i,isRelative:"relative-difference"===e});break;case"categorical":!function(t){const{bands:[e,n],categoryIndexLookups:[s,r],classNames:[o,i],mask:a,keepMethod:u,outBand:l}=t,c=e.length,p=o.length,h=i.length,m=p*h,f=m+1,g=m+2;for(let t=0;t<c;t++)if(!a||a[t]){const a=e[t],c=n[t],p=s[a],d=r[c],y=o[p],x=i[d];l[t]=null==p||null==d?m:"changed"===u&&y===x?f:"unchanged"===u&&y!==x?g:p*h+d}}({bands:c,mask:l,outBand:m,...s});break;case"euclidean-distance":!function(t){const{pixels:[e,n],mask:s,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!s||s[t]){let s=0;for(let r=0;r<i;r++){const o=e[r][t]-n[r][t];s+=o*o}r[t]=Math.sqrt(s)}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m});break;case"angle-difference":!function(t){const{pixels:[e,n],mask:s,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!s||s[t]){let s=0,o=0,a=0;for(let r=0;r<i;r++){const i=e[r][t],u=n[r][t];s+=i*u,o+=i*i,a+=u*u}const u=Math.sqrt(o*a);r[t]=u?Math.acos(s/u):1.5707963267948966}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m});break;case"band-with-most-change":!function(t){const{pixels:[e,n],mask:s,outBand:r}=t,o=e[0].length,i=e.length;for(let t=0;t<o;t++)if(!s||s[t]){let s=0,o=0;for(let r=0;r<i;r++){const i=Math.abs(e[r][t]-n[r][t]);i>s&&(s=i,o=r)}r[t]=o}}({pixels:t.map(t=>t.pixels),mask:l,outBand:m})}const f=new g.A({width:p,height:h,pixels:[m],pixelType:n,mask:l});return f.updateStatistics(),f}(e,n,this.outputPixelType,this._categoryConfig)}_getWebGLParameters(){const t=this.outputPixelType??"f32";let[e,n]=(0,u.hP)(t);const s=(0,u.zw)(t);return s&&(e-=1e-4,n+=1e-4),{method:this.functionArguments.method,domainRange:[e,n],isOutputRounded:s}}_updateAttributeTable(t,e,n){const s=this.sourceRasterInfos.map(t=>t.attributeTable),r=s.map((t,n)=>t.features.map(t=>t.attributes[e[n]])),o=s.map((t,e)=>t.features.map(t=>t.attributes[n[e]])),i=r.map(t=>{const e=[];return t.forEach((t,n)=>e[t]=n),e}),{keepMethod:a}=this.functionArguments;this._categoryConfig={categoryIndexLookups:i,classNames:o,keepMethod:a};const u=s[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(s,"red"),c=this._getFieldNames(s,"green"),p=this._getFieldNames(s,"blue"),h=[],m=2===l.length&&2===c.length&&2===p.length;m&&(h.push(...s.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 f=u.features[0].clone();f.geometry=null;const g=[],[d,y]=r.map(t=>t.length);let x=1;for(let t=0;t<d;t++){const e=o[0][t];for(let n=0;n<y;n++){const s=o[1][n];if("changed"===a&&e===s||"unchanged"===a&&e!==s)continue;const r=f.clone();r.attributes={OID:x++,Value:t*y+n,ClassName:e===s?e:`${e} -> ${s}`,Class_From:e,Class_To:s},m&&(r.attributes.Red=h[0][t][0]+h[1][n][0]>>1,r.attributes.Green=h[0][t][1]+h[1][n][1]>>1,r.attributes.Blue=h[0][t][2]+h[1][n][2]>>1),g.push(r)}}if("changed"===a){const t=f.clone();t.attributes={OID:x++,Value:d*y+1,ClassName:"No Change",Class_From:"Same",Class_To:"Same"},g.push(t)}else if("unchanged"===a){const t=f.clone();t.attributes={OID:x++,Value:d*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 We=Le;var $e;let Ke=$e=class extends p{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new $e({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ke.prototype,"contrastOffset",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ke.prototype,"brightnessOffset",void 0),Ke=$e=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunctionArguments")],Ke);const He=Ke;var qe=n(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 n=e.clone();this._removeStatsHistColormapVAT(n),this.rasterInfo=n;const{contrastOffset:s,brightnessOffset:r}=this.functionArguments;return this.lookup=(0,qe.zj)(s,r),{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:(0,$t.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 Ye(t,e,n,s,r){const o=Math.floor(s/2);for(let s=0;s<o;s++)for(let o=0;o<e;o++)t[s*e+o]=t[(r-1-s)*e+o],t[(n-1-s)*e+o]=t[(n-r+s)*e+o];const i=Math.floor(r/2);for(let s=0;s<n;s++){const n=s*e;for(let s=0;s<i;s++)t[n+s]=t[n+r-1-s],t[n+e-s-1]=t[n+e+s-r]}}const Qe=new Map;function tn(t,e,n,s,r,o,i){const a=new Float32Array(e*n),u=o.length,l=i?0:s,c=i?s:0,p=i?1:e;for(let i=l;i<n-l;i++){const n=i*e;for(let i=c;i<e-c;i++){if(r&&!r[n+i])continue;let e=0;for(let r=0;r<u;r++)e+=t[n+i+(r-s)*p]*o[r];a[n+i]=e}}return a}function en(t,e,n,s,r,o,i){const a=new Float32Array(e*n),u=Math.floor(s/2),l=Math.floor(r/2);for(let c=u;c<n-u;c++){const n=c*e;for(let c=l;c<e-l;c++){if(o&&!o[n+c])continue;let p=0;for(let o=0;o<s;o++)for(let s=0;s<r;s++)p+=t[n+c+(o-u)*e+s-l]*i[o*r+s];a[n+c]=p}}return a}var nn;Qe.set(A.none,[0,0,0,0,1,0,0,0,0]),Qe.set(A.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),Qe.set(A.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),Qe.set(A.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),Qe.set(A.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),Qe.set(A.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),Qe.set(A.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),Qe.set(A.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),Qe.set(A.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),Qe.set(A.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),Qe.set(A.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),Qe.set(A.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),Qe.set(A.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),Qe.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]),Qe.set(A.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Qe.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]),Qe.set(A.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),Qe.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]),Qe.set(A.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),Qe.set(A.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),Qe.set(A.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),Qe.set(A.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),Qe.set(A.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let sn=nn=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=Qe.get(t);if(!e||t===A.userDefined||t===A.none)return;const n=Math.sqrt(e.length);this._set("kernel",e),this._set("cols",n),this._set("rows",n)}clone(){return new nn({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}})],sn.prototype,"rows",void 0),(0,i.Cg)([(0,a.MZ)({json:{type:Number,write:!0}})],sn.prototype,"cols",void 0),(0,i.Cg)([(0,a.MZ)({json:{name:"type",type:Number,write:!0}})],sn.prototype,"convolutionType",null),(0,i.Cg)([(0,a.MZ)({json:{type:[Number],write:!0}})],sn.prototype,"kernel",void 0),sn=nn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunctionArguments")],sn);const rn=sn;let on=class extends w{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){const{kernel:t,convolutionType:e}=this.functionArguments,n=t.reduce((t,e)=>t+e);return-1===e||0===n||1===n?t:t.map(t=>t/n)}_bindSourceRasters(){const{convolutionType:t,rows:e,cols:n,kernel:s}=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*n!==s.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:s.length<=25}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e||this.functionArguments.convolutionType===A.none)return e;const{rows:n,cols:s}=this.functionArguments,{_normalizedKernel:r}=this;return function(t,e){const n=function(t){const e=Math.sqrt(t.length),n=t.slice(0,e),s=[1];for(let n=1;n<e;n++){let r=null;for(let s=0;s<e;s++){const o=t[s+n*e],i=t[s];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};s.push(r)}return{separable:!0,row:n,col:s}}(e.kernel),s=!1!==e.mirrorEdges,r=n.separable?function(t,e,n,s=!0){const{pixels:r,width:o,height:i,pixelType:a,mask:u}=t,l=r.length,c=[],p=e.length,h=n.length,m=Math.floor(p/2),f=Math.floor(h/2);for(let t=0;t<l;t++){let a=tn(r[t],o,i,m,u,e,!0);a=tn(a,o,i,f,u,n,!1),s&&Ye(a,o,i,p,h),c.push(a)}return new g.A({width:o,height:i,pixelType:a,pixels:c,mask:u})}(t,n.row,n.col,s):function(t,e,n=!0){const{pixels:s,width:r,height:o,pixelType:i,mask:a}=t,u=s.length,l=[],{kernel:c,rows:p,cols:h}=e;for(let t=0;t<u;t++){const e=en(s[t],r,o,p,h,a,c);n&&Ye(e,r,o,p,h),l.push(e)}return new g.A({width:r,height:o,pixelType:i,pixels:l,mask:a})}(t,e,s),{outputPixelType:o}=e;return o&&r.clamp(o),r}(e,{kernel:r,rows:n,cols:s,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const t=new Float32Array(25),{rows:e,cols:n}=this.functionArguments,{_normalizedKernel:s}=this;for(let r=0;r<e;r++)for(let e=0;e<n;e++)t[5*r+e]=s[r*n+e];return{kernelRows:e,kernelCols:n,kernel:t,clampRange:(0,u.hP)(this.outputPixelType)}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],on.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:rn,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,"_normalizedKernel",null),on=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunction")],on);const an=on;var un;const ln=new Et.J({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let cn=un=class extends p{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(t,e){return ln.fromJSON(e.type??e.curvatureType??0)}clone(){return new un({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({json:{write:{target:"type"}}}),(0,Yt.e)(ln)],cn.prototype,"curvatureType",void 0),(0,i.Cg)([(0,ye.w)("curvatureType",["type","curvatureType"])],cn.prototype,"readCurvatureType",null),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],cn.prototype,"zFactor",void 0),cn=un=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunctionArguments")],cn);const pn=cn;let hn=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:n,curvatureType:s}=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&&n>=1?n*Gt.rk:n;return(0,Gt.E0)(e,{zFactor:u,curvatureType:s,resolution:a})}_getWebGLParameters(){const{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*Gt.rk:t}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],hn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:pn,json:{write:!0,name:"rasterFunctionArguments"}})],hn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],hn.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],hn.prototype,"isGCS",void 0),hn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunction")],hn);const mn=hn;var fn;let gn=fn=class extends p{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=0}clone(){return new fn({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}})],gn.prototype,"bandIds",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],gn.prototype,"bandNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],gn.prototype,"bandWavelengths",void 0),(0,i.Cg)([(0,Yt.e)({0:"name",1:"wavelength",2:"id"})],gn.prototype,"method",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],gn.prototype,"missingBandAction",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],gn.prototype,"wavelengthMatchTolerance",void 0),gn=fn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunctionArguments")],gn);const dn=gn;let yn=class extends w{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{functionArguments:t,sourceRasterInfos:e}=this,n=e[0],{method:s,bandNames:r,bandWavelengths:o,bandIds:i,missingBandAction:a}=t,u=r?.length&&("name"===s||"id"!==s&&!i?.length),l=o?.length&&("wavelength"===s||"id"!==s&&!i?.length),c=1===a,p=u?function(t,e){const n=t.bandInfos.map(({name:t})=>t.toLowerCase()),s=[];for(let t=0;t<e.length;t++){const r=e[t].toLowerCase();let o=n.indexOf(r);if(-1===o&&"nearinfrared"===r&&(o=n.findIndex(t=>t.startsWith("nearinfrared_1")),-1===o&&(o=n.findIndex(t=>t.startsWith("nearinfrared")))),-1===o)return null;s.push(o)}return s}(n,r):l?function(t,e,{wavelengthMatchTolerance:n},s){const{bandInfos:r}=t,o=[];for(let t=0;t<r.length;t++){const{minWavelength:e,maxWavelength:n}=r[t];if(!e||!n)return null;o.push({minWavelength:e,maxWavelength:n})}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],n=r>=e.minWavelength&&r<=e.maxWavelength,s=Math.abs(r-(e.minWavelength+e.maxWavelength)/2);n?s<l&&(a=!0,u=t,l=s):!a&&s<l&&(u=t,l=s)}if(!a&&n&&l<n&&(a=!0),!a&&s)return null;i.push(u)}return i}(n,o,this.functionArguments,c):function(t,e,n){const{bandCount:s}=t;return!e?.length||n&&e.some(t=>t<0||t>=s)?null:e}(n,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("f32");const h=n.clone();h.pixelType=this.outputPixelType,h.bandCount=p.length;const{statistics:m,histograms:f}=h;null!=m&&m.length&&(h.statistics=p.map(t=>m[t]||m[m.length-1])),null!=f&&f.length&&(h.histograms=p.map(t=>f[t]||f[f.length-1])),h.multidimensionalInfo&&h.multidimensionalInfo.variables.forEach(t=>{const{statistics:e,histograms:n}=t;null!=e&&e.length&&(t.statistics=p.map(t=>e[t]||e[e.length-1])),null!=n&&n.length&&(t.histograms=p.map(t=>n[t]||n[n.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:n}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this;n=n.map(e=>t.indexOf(e))}else{const t=e.pixels.length;n=n.map(e=>e>=t?t-1:e)}return e.extractBands(n)}_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"}})],yn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:dn,json:{write:!0,name:"rasterFunctionArguments"}})],yn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],yn.prototype,"rasterArgumentNames",void 0),yn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunction")],yn);const xn=yn;var wn;let An=wn=class extends p{clone(){return new wn({conversionParameters:[...this.conversionParameters],raster:this.raster})}};(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],An.prototype,"conversionParameters",void 0),An=wn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunctionArguments")],An);const vn=An;let bn=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 n=3===t.length||3===e.bandCount&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:n}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:function(t,e,n){const{pixels:s,width:r,height:o,mask:i,bandMasks:a}=t,l=r*o,c=a?.length?g.A.combineBandMasks(a):i,p=Math.min(e.length,s.length),h=n.startsWith("f"),m=!h&&n!==t.pixelType,[f,d]=(0,u.hP)(n),y=g.A.createEmptyBand(n,l);for(let t=0;t<o;t++){let n=t*r;for(let t=0;t<r;t++,n++)if(!c||c[n]){let t=0;for(let r=0;r<p;r++)t+=e[r]*s[r][n];h||(t=Math.round(t),m&&(t=t>d?d:t<f?f:t)),y[n]=t}}const x=new g.A({width:r,height:o,pixels:[y],pixelType:n,mask:c});return x.updateStatistics(),x}(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],bn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:vn,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)()],bn.prototype,"_normalizedWeights",null),bn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunction")],bn);const Cn=bn;var Mn;const Pn=new Et.J({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),Tn=new Et.J({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let Rn=Mn=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 Mn({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}})],Rn.prototype,"altitude",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Rn.prototype,"azimuth",void 0),(0,i.Cg)([(0,a.MZ)(),(0,Yt.e)(Pn)],Rn.prototype,"hillshadeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psPower"}})],Rn.prototype,"pixelSizePower",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psZFactor"}})],Rn.prototype,"pixelSizeFactor",void 0),(0,i.Cg)([(0,a.MZ)(),(0,Yt.e)(Tn)],Rn.prototype,"slopeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Rn.prototype,"zFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Rn.prototype,"removeEdgeEffect",void 0),Rn=Mn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunctionArguments")],Rn);const Nn=Rn;let kn=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:n,primaryPixelSizes:s}=t,r=s?.[0],o=r??(n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1}),i=(0,Gt.PP)(this.functionArguments,o,this.isGCS),a=(0,Gt.fw)(e,i);return a.pixelType=this.outputPixelType,a}_getWebGLParameters(){const t=(0,Gt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,Gt.ng)(t),{slopeType:n,zFactor:s,pixelSizeFactor:r,pixelSizePower:o}=this.functionArguments,i="scaled"===n,a=(0,u.zw)(this.outputPixelType);return{...e,zFactor:s,gcsFactor:this.isGCS?Gt.rk:1,pixelSizeFactor:i?r:0,pixelSizePower:i?o:0,isOutputRounded:a}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],kn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Nn,json:{write:!0,name:"rasterFunctionArguments"}})],kn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],kn.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],kn.prototype,"isGCS",void 0),kn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunction")],kn);const In=kn;var Sn;let _n=Sn=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 Sn({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,o.o8)(this.rasters)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],_n.prototype,"operation",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],_n.prototype,"rasters",void 0),(0,i.Cg)([(0,Fe.K)("rasters")],_n.prototype,"writeRasters",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],_n.prototype,"processAsMultiband",void 0),_n=Sn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunctionArguments")],_n);const Fn=_n;let Bn=class extends w{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0],{bandCount:n}=e,{processAsMultiband:s}=this.functionArguments;if(t.some(t=>t.bandCount!==n))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};const{operation:r,rasters:o}=this.functionArguments,i=R[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||s?n: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:St(e,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=R[t],n=Object.keys(M).find(e=>M[e]===t)?.toLowerCase()??"undefined",s=this.outputPixelType??"f32";let[r,o]=(0,u.hP)(s);const i=(0,u.zw)(s);return i&&(r-=1e-4,o+=1e-4),{imageCount:e,operationName:n,domainRange:[r,o],isOutputRounded:i}}_updateStatistics(t){const e=this.sourceRasterInfos[0],{operation:n}=this.functionArguments,s=T(n)?.domain;if(s){t.statistics=[];for(let e=0;e<t.bandCount;e++)t.statistics[e]={min:s[0],max:s[1],avg:(s[0]+s[1])/2,stddev:(s[0]+s[1])/10}}else 45===n&&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:n}=this.sourceRasterInfos[0],{operation:s}=this.functionArguments,{domain:r,isInteger:o}=T(s)??{domain:null,isInteger:!1};let i="f32";if(r&&o)i=(0,u.X1)(r[0],r[1]);else if(30===s){const t=e?.[0];i=t?(0,u.X1)(t.min,t.max):(0,u.zw)(n)?n:"s32"}else if(45===s&&(0,u.zw)(n)){const t=e?.map(({max:t})=>-t),s=e?.map(({min:t})=>-t),r=t?.length?Math.min(...t):null,o=s?.length?Math.min(...s):null;i=null!=r&&null!=o?(0,u.X1)(r,o):n.startsWith("s")?n.replace("s","u"):"u1"===n||"u2"===n||"u4"===n?"s8":"u8"===n?"s16":"s32"}t.pixelType=this.outputPixelType=this._getOutputPixelType(i)}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Bn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Fn,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.LocalFunction")],Bn);const jn=Bn;var Zn,Gn=n(34727);let zn=Zn=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 n=t.map(t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){const n=t.trim().split(" ").filter(t=>""!==t.trim()).map(t=>Number(t));return e=e||n.length>0,0===n.length?null:n}return null});return e?n:null}clone(){return new Zn({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],zn.prototype,"includedRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],zn.prototype,"noDataValues",void 0),(0,i.Cg)([(0,a.MZ)()],zn.prototype,"normalizedNoDataValues",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],zn.prototype,"noDataInterpretation",void 0),zn=Zn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunctionArguments")],zn);const On=zn;let En=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:n,normalizedNoDataValues:s}=this.functionArguments;if(!n?.length&&!s?.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,$t.Wt)(e,n?.slice(2*o,2*o+2),s?.[o]);if(null==t){r=null;break}r.push(t)}this.lookups=r;const o=null!=s&&s.every(t=>t?.length===s[0]?.length);return{success:!0,supportsGPU:(!n||n.length<=2*$t.et)&&(!s||o&&s[0].length<=$t.et)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{outputPixelType:n,lookups:s}=this,{includedRanges:r,noDataInterpretation:o,normalizedNoDataValues:i}=this.functionArguments;return(0,$t.dK)(e,{includedRanges:r,noDataValues:i,outputPixelType:n,matchAll:1===o,lookups:s})}_getWebGLParameters(){const{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,n=new Float32Array($t.et);n.fill(Gn.pq),e?.[0]?.length&&n.set(e[0]);const s=new Float32Array(6);for(let e=0;e<s.length;e+=2)s[e]=t?.[e]??-Gn.pq,s[e+1]=t?.[e+1]??Gn.pq;return t?.length&&s.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:n,includedRanges:s}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],En.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:On,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,"lookups",void 0),En=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunction")],En);const Dn=En;var Vn;let Un=Vn=class extends p{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){const{visibleBandID:t,infraredBandID:e,scientificOutput:n}=this;return new Vn({visibleBandID:t,infraredBandID:e,scientificOutput:n})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Un.prototype,"visibleBandID",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Un.prototype,"infraredBandID",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Un.prototype,"scientificOutput",void 0),Un=Vn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunctionArguments")],Un);const Ln=Un;let Wn=class extends w{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{scientificOutput:t,visibleBandID:e,infraredBandID:n}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");const s=this.sourceRasterInfos[0],r=Math.max(e,n);if(s.bandCount<2||r>=s.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};if(e<0||n<0)return{success:!1,supportsGPU:!1,error:"ndvi-function: invalid visible or infrared band id"};const o=s.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:n,infraredBandID:s,scientificOutput:r}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){const{rawInputBandIds:t}=this;s=t.indexOf(s),n=t.indexOf(n)}return function(t,e,n,s){const{mask:r,pixels:o,width:i,height:a}=t,u=o[n],l=o[e],c=l.length,p=s?new Uint8Array(c):new Float32Array(c),h=s?100:1,m=s?100.5:0;for(let t=0;t<c;t++)if(null==r||r[t]){const e=u[t],n=l[t],s=e+n;s&&(p[t]=(e-n)/s*h+m)}const f=new g.A({width:i,height:a,mask:r,pixelType:s?"u8":"f32",pixels:[p]});return f.updateStatistics(),f}(e,n,s,!r)}_getWebGLParameters(){const{visibleBandID:t,infraredBandID:e,scientificOutput:n}=this.functionArguments;return{bandIndexMat3:qt(this.isInputBandIdsSwizzled?[0,1,2]:[e,t,0]),scaled:!n}}_getInputBandIds(t){const{visibleBandID:e,infraredBandID:n}=this.functionArguments;return[n,e,0].map(e=>t[e])}_swizzleBandIds(t){const{visibleBandID:e,infraredBandID:n}=this.functionArguments,s=[e,n].map(e=>t.indexOf(e));return s[2]=s[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=s,!1}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Wn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Ln,json:{write:!0,name:"rasterFunctionArguments"}})],Wn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Wn.prototype,"rasterArgumentNames",void 0),Wn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunction")],Wn);const $n=Wn;var Kn;let Hn=Kn=class extends p{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new Kn({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hn.prototype,"inputRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hn.prototype,"outputValues",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hn.prototype,"noDataRanges",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hn.prototype,"allowUnmatched",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hn.prototype,"replacementValue",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Hn.prototype,"isLastInputRangeInclusive",void 0),Hn=Kn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunctionArguments")],Hn);const qn=Hn;let Jn=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:n}=t;this._removeStatsHistColormapVAT(t);const{allowUnmatched:s,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=n?.[0];if(s&&null==r){let e=i?.min??o[0],n=i?.max??o[0];e=Math.min.apply(null,[...o,e]),n=Math.max.apply(null,[...o,n]),t.statistics=[{min:e,max:n,avg:i?.avg??0,stddev:i?.stddev??-1}]}else{let e=o[0],n=e;for(let t=0;t<o.length;t++)e=e>o[t]?o[t]:e,n=n>o[t]?n:o[t];s&&null!=r&&(e=Math.min(e,r),n=Math.max(n,r)),t.statistics=[{min:e,max:n,avg:i?.avg??0,stddev:i?.stddev??-1}]}if(c){const{min:n,max:i}=t.statistics[0],a=["u8","s8","u16","s16","u32","s32","f32"],l=a.find(t=>{const[e,s]=(0,u.hP)(t);return n>=e&&i<=s})??"f64";o.some(t=>Math.floor(t)!==t)?this.outputPixelType="f64"===l?"f64":"f32":this.outputPixelType=s&&null==r&&a.indexOf(e)>a.indexOf(l)?e:l}}return t.pixelType=this.outputPixelType,this.rasterInfo=t,this.lookup=s?null:(0,$t.XU)({srcPixelType:e,inputRanges:i,outputValues:o,noDataRanges:a,allowUnmatched:s,isLastInputRangeInclusive:l,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!o||o.length<=$t.et)&&(!a||a.length<=$t.et)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{lookup:n,outputPixelType:s}=this;if(n){const t=(0,$t.eH)(e,{lut:[n.lut],offset:n.offset,outputPixelType:s});return null!=t&&n.mask&&(t.mask=(0,$t.UK)(e.pixels[0],e.mask,n.mask,n.offset,"u8")),t}const{inputRanges:r,outputValues:o,noDataRanges:i,allowUnmatched:a,isLastInputRangeInclusive:u,replacementValue:l}=this.functionArguments;return(0,$t.Ew)(e,{inputRanges:r,outputValues:o,noDataRanges:i,outputPixelType:s,allowUnmatched:a,isLastInputRangeInclusive:u,replacementValue:l})}_getWebGLParameters(){const{allowUnmatched:t,noDataRanges:e,isLastInputRangeInclusive:n}=this.functionArguments,s=this.functionArguments.inputRanges??[],r=this.functionArguments.outputValues??[],o=(0,$t.bL)(s,r,n),i=new Float32Array(2*$t.et);return i.fill(Gn.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"}})],Jn.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:qn,json:{write:!0,name:"rasterFunctionArguments"}})],Jn.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Jn.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Jn.prototype,"lookup",void 0),Jn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunction")],Jn);const Xn=Jn;var Yn;let Qn=Yn=class extends Nn{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 Yn({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}})],Qn.prototype,"colorRamp",void 0),(0,i.Cg)([(0,ye.w)("colorRamp")],Qn.prototype,"readColorRamp",null),(0,i.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],Qn.prototype,"colormap",void 0),Qn=Yn=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunctionArguments")],Qn);const ts=Qn;let es=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:n}=this.functionArguments;if(!e&&!n?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a color ramp argument must be specified"};this.outputPixelType=this._getOutputPixelType("u8");const s=t.clone();this._removeStatsHistColormapVAT(s),s.pixelType=this.outputPixelType,s.bandCount=3,s.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=s,this.isGCS=s.spatialReference?.isGeographic??!1,n?.length||(n=(0,ge.R8)(e,{interpolateAlpha:!0}));const{indexedColormap:r,offset:o}=(0,$t.zg)({colormap:n});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,ke.WN)(r)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(!e||!this.lookup)return null;let n=t.primaryPixelSizes?.[0];if(null==n){const{extent:s}=t;n=s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1}}const s=(0,Gt.PP)(this.functionArguments,n,this.isGCS),r=(0,Gt.fw)(e,s),o=this.sourceRasterInfos[0].statistics?.[0]??{min:0,max:8e3};return(0,Gt.SC)(r,e,this.lookup.hsvMap,o),r.pixelType=this.outputPixelType,r}_getWebGLParameters(){const t=(0,Gt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,Gt.ng)(t),{slopeType:n,zFactor:s,pixelSizeFactor:r,pixelSizePower:o}=this.functionArguments,i="scaled"===n,{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:s,gcsFactor:this.isGCS?Gt.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"}})],es.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:ts,json:{write:!0,name:"rasterFunctionArguments"}})],es.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],es.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],es.prototype,"isGCS",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],es.prototype,"lookup",void 0),es=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunction")],es);const ns=es;var ss;const rs=new Et.J({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let os=ss=class extends p{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new ss({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,i.Cg)([(0,Yt.e)(rs)],os.prototype,"slopeType",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],os.prototype,"zFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"psPower",write:!0}})],os.prototype,"pixelSizePower",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"psZFactor",write:!0}})],os.prototype,"pixelSizeFactor",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],os.prototype,"removeEdgeEffect",void 0),os=ss=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunctionArguments")],os);const is=os;let as=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:n,slopeType:s,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,Gt.yy)(e,{zFactor:n,slopeType:s,pixelSizePower:r,pixelSizeFactor:o,isGCS:i,resolution:c})}_getWebGLParameters(){const{zFactor:t,slopeType:e,pixelSizeFactor:n,pixelSizePower:s}=this.functionArguments;return{zFactor:this.isGCS&&t>=1?t*Gt.rk:t,slopeType:e,pixelSizeFactor:n??0,pixelSizePower:s??0,isOutputRounded:(0,u.zw)(this.outputPixelType)}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],as.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:is,json:{write:!0,name:"rasterFunctionArguments"}})],as.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],as.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],as.prototype,"isGCS",void 0),as=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunction")],as);const us=as,ls=new Et.J({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function cs(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{statisticsType:u,kernelRows:l,kernelCols:c}=e,p="stddev"===u,h=r*o,m=new Float64Array(h),f=new Float64Array(h),g=new Uint32Array(h);for(let t=0;t<o;t++){const e=t*r;let n=0,o=0,a=0;for(let t=0;t<c;t++)i&&!i[e+t]||(n+=s[e+t],p&&(o+=s[e+t]**2),a++);m[e]=n,f[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--,n-=s[r],p&&(o-=s[r]**2)),i[u]&&(a++,n+=s[u],p&&(o+=s[u]**2))):(n-=s[r],n+=s[u],p&&(o-=s[r]**2,o+=s[u]**2)),m[e+t]=n,g[e+t]=a,p&&(f[e+t]=o)}}const d=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,n=0,s=0;for(let o=0;o<l;o++){const i=o*r+t;e+=m[i],s+=g[i],p&&(n+=f[i])}d[t]=e,y[t]=n,x[t]=s;for(let i=1;i<=o-l;i++){const o=(i-1)*r+t,a=o+w;e-=m[o],e+=m[a],s-=g[o],s+=g[a],p&&(n-=f[o],n+=f[a]),d[i*r+t]=e,y[i*r+t]=n,x[i*r+t]=s}}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 s=v;s<r-v;s++){const o=(t-A)*r+s-v,u=x[o];if(0===u||n&&(!i||i[e+s]))continue;const l=d[o]/u,c=p?Math.sqrt((y[o]-d[o]*l)/u):l;a[e+s]=c,i&&(i[e+s]=255)}}}function ps(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:u,kernelCols:l,statisticsType:c}=e,p=Math.floor(u/2),h=Math.floor(l/2),m="min"===c,f=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 n=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]||(n=m?Math.min(n,s[l]):Math.max(n,s[l]),o++)}i?(f[e+t]=0===o?0:n,g[e+t]=o):a[e+t]=0===o?0:n}}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(n&&i[e+t])continue;a[e+t]=f[e+t],i[e+t]=255}}}function hs(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);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(n&&i?.[e+t])continue;const o=[];for(let n=0;n<u;n++)for(let a=0;a<l;a++){const u=e+t+(n-c)*r+a-p;i&&!i[u]||o.push(s[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(n&&i[e+t])continue;a[e+t]=h[e+t],i[e+t]=255}}}function ms(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:u,kernelCols:l}=e,c=Math.floor(u/2),p=Math.floor(l/2),h="majority"===e.statisticsType,m=u*l,f=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(n&&i?.[e+t])continue;const o=new Map;for(let n=0;n<u;n++)for(let a=0;a<l;a++){const u=e+t+(n-c)*r+a-p;if(i&&!i[u])continue;const l=s[u];o.set(l,o.has(l)?o.get(l)+1:1)}if(0===o.size)continue;let d=0,y=0,x=h?0:m+1;for(const t of o.keys())y=o.get(t),h===y>x&&(x=y,d=t);i?(f[e+t]=d,g[e+t]=o.size):a[e+t]=d}}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(n&&i[e+t])continue;a[e+t]=f[e+t],i[e+t]=255}}}var fs;let gs=fs=class extends p{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new fs({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)}}})],gs.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)}}})],gs.prototype,"cols",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],gs.prototype,"fillNoDataOnly",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:{source:["statisticsType","type"],reader:(t,e)=>ls.fromJSON(e?.statisticsType??e?.type)??"min"},write:{target:"type"}}}),(0,Yt.e)(ls)],gs.prototype,"statisticsType",void 0),gs=fs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunctionArguments")],gs);const ds=gs;let ys=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 n=e.clone();n.pixelType=this.outputPixelType;const{statisticsType:s}=this.functionArguments;return"stddev"===s&&this._removeStatsHistColormapVAT(n),this.rasterInfo=n,{success:!0,supportsGPU:n.bandCount<=3&&t<5}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{statisticsType:n,rows:s,cols:r,fillNoDataOnly:o}=this.functionArguments;return function(t,e){const{mask:n}=t,{fillNoDataOnly:s}=e;if(s&&!n)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:f,mirrorEdges:d}=e;if(s&&!n)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);s&&l.set(u);const w=a?.[t]??n,A=w?.slice()??null,v={band:u,width:o,height:i,mask:A,outBand:l};switch(f){case"min":case"max":ps(v,e);break;case"mean":case"stddev":cs(v,e);break;case"median":hs(v,e);break;case"majority":case"minority":ms(v,e)}d&&!s&&Ye(l,o,i,h,m),p.push(l),A&&x.push(A)}let w=x[0]??n;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:s,kernelCols:r,fillNoDataOnly:o,outputPixelType:this.outputPixelType,statisticsType:n,mirrorEdges:!0})}_getWebGLParameters(){const{rows:t,cols:e,statisticsType:n,fillNoDataOnly:s}=this.functionArguments;return{fillNoDataOnly:s,kernelRows:t,kernelCols:e,statisticsType:n,clampRange:(0,u.hP)(this.outputPixelType)}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ys.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:ds,json:{write:!0,name:"rasterFunctionArguments"}})],ys.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],ys.prototype,"rasterArgumentNames",void 0),ys=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunction")],ys);const xs=ys;var ws;let As=ws=class extends p{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,e){if(!t?.length)return null;const n=[];return t.forEach(t=>{const e={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};n.push(e)}),n}writeStatistics(t,e,n){if(!t?.length)return;const s=[];t.forEach(t=>{const e={...t,mean:t.avg,standardDeviation:t.stddev};delete e.avg,delete e.stddev,s.push(e)}),e[n]=s}clone(){return new ws({statistics:(0,o.o8)(this.statistics),histograms:(0,o.o8)(this.histograms)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],As.prototype,"statistics",void 0),(0,i.Cg)([(0,ye.w)("statistics")],As.prototype,"readStatistics",null),(0,i.Cg)([(0,Fe.K)("statistics")],As.prototype,"writeStatistics",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],As.prototype,"histograms",void 0),As=ws=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunctionArguments")],As);const vs=As;let bs=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:n,histograms:s}=this.functionArguments;return s&&(e.histograms=s),n&&(e.statistics=n),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],bs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:vs,json:{write:!0,name:"rasterFunctionArguments"}})],bs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],bs.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],bs.prototype,"indexedColormap",void 0),(0,i.Cg)([(0,a.MZ)()],bs.prototype,"isNoopProcess",void 0),bs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunction")],bs);const Cs=bs;var Ms;const Ps=new Et.J({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let Ts=Ms=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,n){t?.length&&(Array.isArray(t[0])||(t=t.map(t=>[t.min,t.max,t.avg,t.stddev])),e[n]=t)}clone(){return new Ms({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}})],Ts.prototype,"computeGamma",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{name:"dra",write:!0}})],Ts.prototype,"dynamicRangeAdjustment",void 0),(0,i.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],Ts.prototype,"gamma",void 0),(0,i.Cg)([(0,a.MZ)()],Ts.prototype,"histograms",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ts.prototype,"maxPercent",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ts.prototype,"minPercent",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ts.prototype,"numberOfStandardDeviations",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"max",write:!0}})],Ts.prototype,"outputMax",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{name:"min",write:!0}})],Ts.prototype,"outputMin",void 0),(0,i.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ts.prototype,"sigmoidStrengthLevel",void 0),(0,i.Cg)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],Ts.prototype,"statistics",void 0),(0,i.Cg)([(0,Fe.K)("statistics")],Ts.prototype,"writeStatistics",null),(0,i.Cg)([(0,Yt.e)(Ps)],Ts.prototype,"stretchType",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Ts.prototype,"useGamma",void 0),Ts=Ms=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunctionArguments")],Ts);const Rs=Ts;let Ns=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:n}=this,{dynamicRangeAdjustment:s,gamma:r,useGamma:o}=n;if(!s&&["u8","u16","s8","s16"].includes(e)){const s=(0,qe.DP)(n.toJSON(),{rasterInfo:t}),i=(0,u.zw)(this.outputPixelType)?"round":"float";this.lookup=(0,qe.RP)({pixelType:e,...s,gamma:o?r:null,rounding:i}),this.cutOffs=s}else s||(this.cutOffs=(0,qe.DP)(n.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:!s}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{lookup:n}=this;if(n)return(0,$t.eH)(e,{...n,outputPixelType:this.rasterInfo.pixelType});const{functionArguments:s}=this,r=this.cutOffs||(0,qe.DP)(s.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:e}),o=s.useGamma?s.gamma:null;return(0,qe._N)(e,{...r,gamma:o,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const{outputMin:t=0,outputMax:e=255,gamma:n,useGamma:s}=this.functionArguments,r=this.rasterInfo.bandCount>=2?3:1,o=s&&n?.length?(0,qe.Nh)(r,n):[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((n,s)=>(e-t)/(a[s]-i[s])),c=(0,u.zw)(this.outputPixelType),p=s&&n?[n[0],n[1]??n[0],n[2]??n[0]]:[1,1,1],h=s?[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:s,gamma:p,gammaCorrection:h,stretchType:this.functionArguments.stretchType,isOutputRounded:c,type:"stretch"}}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ns.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:Rs,json:{write:!0,name:"rasterFunctionArguments"}})],Ns.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Ns.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ns.prototype,"lookup",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ns.prototype,"cutOffs",void 0),Ns=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunction")],Ns);const ks=Ns;var Is;let Ss=Is=class extends p{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new Is({attributeTableAsRecordSet:(0,o.o8)(this.attributeTableAsRecordSet)})}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],Ss.prototype,"attributeTableAsRecordSet",void 0),Ss=Is=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunctionArguments")],Ss);const _s=Ss;let Fs=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 n=t.clone();return n.pixelType=this.outputPixelType,n.bandCount=1,"thematic"!==n.dataType&&(n.keyProperties=n.keyProperties?{...n.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=n,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Fs.prototype,"functionName",void 0),(0,i.Cg)([(0,a.MZ)({type:_s,json:{write:!0,name:"rasterFunctionArguments"}})],Fs.prototype,"functionArguments",void 0),(0,i.Cg)([(0,a.MZ)()],Fs.prototype,"rasterArgumentNames",void 0),(0,i.Cg)([(0,a.MZ)()],Fs.prototype,"isNoopProcess",void 0),Fs=(0,i.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunction")],Fs);const Bs=Fs,js=new Map;function Zs(t,e){const{rasterFunctionArguments:n}=t;n&&(n.rasters||[n.raster,n.raster2]).forEach(t=>{t&&"number"!=typeof t&&("string"==typeof t?t.startsWith("http")&&(e.includes(t)||e.push(t)):"rasterFunctionArguments"in t&&Zs(t,e))})}function Gs(t,e){e=e??{};try{if("function"in(t=(0,o.o8)(t))&&"arguments"in t&&t.arguments){const n=Ls(t,new Map,e);if($s(n),!n.renderingRule)throw new r.A("raster-function-helper","Unsupported raster function json.");t=n.renderingRule}if("rasterFunction"in t){const n=Es(t=Os(t),e);return n.isRoot=!0,n}}catch{}throw new r.A("raster-function-helper","unsupported raster function json.")}function zs(t){return!!(t&&"object"==typeof t&&t.rasterFunction&&t.rasterFunctionArguments)}function Os(t){const{rasterFunction:e,rasterFunctionArguments:n}=t,s={};for(const t in n){let e=n[t];const r=t.toLowerCase();if("rasters"===r&&Array.isArray(e))s.rasters=e.map(t=>zs(t)?Os(t):t);else switch(zs(e)&&(e=Os(e)),r){case"dra":s.dra=e;break;case"pspower":s.psPower=e;break;case"pszfactor":s.psZFactor=e;break;case"bandids":s.bandIds=e;break;default:s[t[0].toLowerCase()+t.slice(1)]=e}}return"Local"!==e||s.rasters?.length||(s.rasters=["$$"]),{...t,rasterFunctionArguments:s}}function Es(t,e){const{rasterFunction:n,rasterFunctionArguments:s}=t,o=t.outputPixelType?.toLowerCase();if(null==n||!js.has(n))throw new r.A("raster-function-helper",`unsupported raster function: ${n}`);const i=js.get(n),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])}(s,u),p="rasters"===u[0]||u.length>1,h=[];for(let t=0;t<c.length;t++){const n=c[t];let s;null==n||"string"==typeof n&&n.startsWith("$")?l.push(e?.raster):"string"==typeof n?e[n]&&l.push(e[n]):"number"!=typeof n&&"rasterFunction"in n&&(s=Es(n,e),p||(a.functionArguments[u[t]]=s),l.push(s)),p&&h.push(s??n)}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 Ds(t,e){if(t&&e)for(const n in t){const s=t[n];s&&"object"==typeof s&&"type"in s&&("RasterFunctionTemplate"===s.type?Ds(s.arguments,e):"RasterFunctionVariable"===s.type&&null!=e[s.name]&&(s.value=e[s.name]))}}function Vs(t,e){if(!t||"object"!=typeof t)return t;const{value:n}=t;if(!n||"object"!=typeof n)return t.isDataset?"$$":n;if(Array.isArray(n))return 0===n.length?[]:n.map(t=>t&&"object"==typeof t&&"RasterFunctionVariable"===t.type?Vs(t,e):t);if("value"in n&&["number","string","boolean"].includes(typeof n.value))return n.value;if(t.isDataset&&"Scalar"!==n.type)return"$$";if(!("type"in n))return n;let s=n;switch(n.type){case"Scalar":s=n.value;break;case"AlgorithmicColorRamp":s=Us(n);break;case"MultiPartColorRamp":s={type:"multipart",colorRamps:n.ArrayOfColorRamp.map(Us)};break;case"ArgumentArray":if(n.elements?.length&&"RasterStatistics"!==n.elements[0].type){const t=[];for(let s=0;s<n.elements.length;s++){const o=n.elements[s],{type:i}=o;if(i)if("RasterFunctionTemplate"===i){const{renderingRule:n}=Ls(o,e);t.push(n),null!=o._object_id&&e.set(o._object_id,n)}else{if("RasterFunctionVariable"!==i)throw new r.A("raster-function-helper","unsupported raster function json.");{const n=Vs(o,e);t.push(n),null!=o._object_id&&e.set(o._object_id,n)}}else t.push(o)}s=t}else s=n.elements}return null!=n._object_id&&e.set(n._object_id,s),s}function Us(t){const e=t.algorithm??"esriHSVAlgorithm";let{FromColor:n,ToColor:r}=t;if(!Array.isArray(n)){const{r:t,g:e,b:r}=(0,s.$)({h:n.Hue,s:n.Saturation,v:n.Value});n=[t,e,r,n.AlphaValue]}if(!Array.isArray(r)){const{r:t,g:e,b:n}=(0,s.$)({h:r.Hue,s:r.Saturation,v:r.Value});r=[t,e,n,r.AlphaValue]}return{type:"algorithmic",algorithm:e,fromColor:n,toColor:r}}function Ls(t,e,n){n&&Ds(t,n);const s={renderingRule:{},templates:e};return Ws(t,s),s}function Ws(t,e){if(!t||!e.renderingRule)return;const{renderingRule:n,templates:s}=e,{function:r,arguments:o,_object_id:i}=t;if(!r||!o)return;null!=i&&s.set(i,n),n.rasterFunction=r.type.replace("Function",""),n.outputPixelType=r.pixelType;const a={};n.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]=Vs(e,s):(n.rasterFunctionArguments[t]={},Ws(e,{renderingRule:n.rasterFunctionArguments[t],templates:s})),null!=e._object_id&&s.set(e._object_id,a[t])):a[t]=e}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),n.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 $s(t){const{renderingRule:e,templates:n}=t;if("object"!=typeof e||!e?.rasterFunctionArguments||!n.size)return;const{rasterFunctionArguments:s}=e;for(const t in s){const e=s[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(!n.has(o))throw new r.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${o} does not exist`);const e=n.get(o);"_object_ref_id"!==t?s[t]=e:e&&"object"==typeof e&&Object.assign(s,e);continue}e&&"object"==typeof e&&(e.rasterFunctionArguments&&$s({renderingRule:e,templates:n}),Array.isArray(e)&&e.forEach((t,s)=>{if(t&&"object"==typeof t)if(null!=t._object_ref_id){if(!n.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=n.get(o);i&&"object"==typeof i?Object.assign(t,i):e[s]=i}else $s({renderingRule:t,templates:n})}))}}js.set("Arithmetic",{desc:"Arithmetic Function",ctor:Ft,rasterArgumentNames:["rasters"]}),js.set("Aspect",{desc:"Aspect Function",ctor:Ot,rasterArgumentNames:["raster"]}),js.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:se,rasterArgumentNames:["raster"]}),js.set("Colormap",{desc:"Colormap Function",ctor:Me,rasterArgumentNames:["raster"]}),js.set("ColormapToRGB",{desc:"ColormapToRGB Function",ctor:Se,rasterArgumentNames:["raster"]}),js.set("CompositeBand",{desc:"CompositeBand Function",ctor:Ge,rasterArgumentNames:["rasters"]}),js.set("ComputeChange",{desc:"ComputeChange Function",ctor:We,rasterArgumentNames:["rasters"]}),js.set("Convolution",{desc:"Convolution Function",ctor:an,rasterArgumentNames:["raster"]}),js.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Xe,rasterArgumentNames:["raster"]}),js.set("ExtractBand",{desc:"ExtractBand Function",ctor:xn,rasterArgumentNames:["raster"]}),js.set("Curvature",{desc:"Curvature Function",ctor:mn,rasterArgumentNames:["raster"]}),js.set("Hillshade",{desc:"Hillshade Function",ctor:In,rasterArgumentNames:["raster"]}),js.set("ShadedRelief",{desc:"ShadedRelief Function",ctor:ns,rasterArgumentNames:["raster"]}),js.set("Grayscale",{desc:"Grayscale Function",ctor:Cn,rasterArgumentNames:["raster"]}),js.set("Clip",{desc:"Clip Function",ctor:me,rasterArgumentNames:["raster"]}),js.set("Local",{desc:"Local Function",ctor:jn,rasterArgumentNames:["rasters"]}),js.set("Mask",{desc:"Mask Function",ctor:Dn,rasterArgumentNames:["raster"]}),js.set("NDVI",{desc:"NDVI Function",ctor:$n,rasterArgumentNames:["raster"]}),js.set("Remap",{desc:"Remap Function",ctor:Xn,rasterArgumentNames:["raster"]}),js.set("Slope",{desc:"Slope Function",ctor:us,rasterArgumentNames:["raster"]}),js.set("Statistics",{desc:"Focal Statistics Function",ctor:xs,rasterArgumentNames:["raster"]}),js.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:Cs,rasterArgumentNames:["raster"]}),js.set("Stretch",{desc:"Stretch Function",ctor:ks,rasterArgumentNames:["raster"]}),js.set("Table",{desc:"Attribute Table Function",ctor:Bs,rasterArgumentNames:["raster"]})},34930(t,e,n){n.d(e,{$Q:()=>a,Sd:()=>u,b7:()=>l});var s=n(86211),r=n(5443),o=n(86738),i=n(14140);async function a(t,e,s){if("extent"===s.type)return function(t,e,n){const{width:s,height:r}=t,o=new Uint8Array(s*r),a=e.width/s,u=e.height/r;if(n.width/a<.5||n.height/u<.5)return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,pixels:[...t.pixels]});const{xmin:l,xmax:c,ymin:p,ymax:h}=e,{xmin:m,xmax:f,ymin:g,ymax:d}=n,y=Math.max(l,m),x=Math.min(c,f),w=Math.max(p,g),A=Math.min(h,d),v=.5*a,b=.5*u;if(x-y<v||A-w<b||x<l+v||y>c-v||w>h-b||A<p+b)return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,pixels:[...t.pixels]});const C=Math.max(0,(y-l)/a),M=Math.min(s,Math.max(0,(x-l)/a)),P=Math.max(0,(h-A)/u),T=Math.min(r,Math.max(0,(h-w)/u)),R=Math.round(C),N=Math.round(M)-1,k=Math.round(P),I=Math.round(T)-1;if(R===N&&C%1>.5&&M%1<.5||k===I&&P%1>.5&&T%1<.5)return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,pixels:[...t.pixels]});if(0===R&&0===k&&N===s&&I===r)return t;const S=t.mask;for(let t=k;t<=I;t++)for(let e=R;e<=N;e++){const n=t*s+e;o[n]=S?S[n]:255}return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,pixels:[...t.pixels]})}(t,e,s);const{width:r,height:o}=t,a=new Uint8Array(r*o);return(await Promise.all([n.e(3661),n.e(1878),n.e(5756),n.e(3299),n.e(2767)]).then(n.bind(n,25275))).execute(e,s)?"polyline"===s.type?function(t,e,n){const{width:s,height:r}=t,o=new Uint8Array(s*r),a=e.width/s,u=e.height/r,{xmin:l,ymax:c}=e,{paths:p}=n,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[n,i]=e[t],[p,m]=e[t+1],f=Math.min(i,m),g=Math.max(i,m),d=Math.max(0,Math.floor((c-g)/u)),y=Math.min(r-1,Math.floor((c-f)/u));if(!(y<d))if(d===y){const t=Math.min(n,p),e=Math.max(n,p),r=Math.max(0,Math.floor((t-l)/a)),i=Math.min(s-1,Math.floor((e-l)/a));if(i<r)continue;const u=d*s;for(let t=u+r;t<=u+i;t++)o[t]=h?h[t]:255}else{const t=(n-l)/a,e=(p-n)/(m-i)/a,r=u*e;for(let n=d;n<=y;n++){const a=e*(c-n*u-i)+t,l=Math.max(0,Math.floor(r>0?a-r:a)),p=Math.min(s-1,Math.floor(r>0?a:a-r));if(p<l)continue;const m=n*s;for(let t=m+l;t<=m+p;t++)o[t]=h?h[t]:255}}}}return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,pixels:[...t.pixels]})}(t,e,s):(await Promise.all([n.e(3661),n.e(1878),n.e(5756),n.e(3299),n.e(3446)]).then(n.bind(n,30912))).execute(s,e)?t:function(t,e,n){if(!t)return t;const{width:s,height:r}=t,o=function(t){const{geometry:e,size:n,srcExtent:s,srcMask:r}=t,[o,i]=n;let a;const u=s.width/o,l=s.height/i,{xmin:c,ymax:p}=s;if("extent"===e.type){const t=(e.xmin-c)/u,n=(e.xmax-c)/u,s=(p-e.ymax)/l,r=(p-e.ymin)/l;a=[[[t,s],[t,r],[n,r],[n,s],[t,s]]]}else a=e.rings.map(t=>t.map(([t,e])=>[(t-c)/u,(p-e)/l]));return function(t,e,n){const[s,r]=e,o=new OffscreenCanvas(s,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,s,r).data,a=s*r,u=new Uint8Array(a);let l=!1;for(let t=0;t<a;t++)n&&!n[t]||(i[4*t+3]>127?u[t]=255:l=!0);return l||n?u:void 0}(a,n,r)}({geometry:n,size:[s,r],srcExtent:e,srcMask:t.mask});return new i.A({pixelType:t.pixelType,width:s,height:r,mask:o,maskIsAlpha:!1,pixels:[...t.pixels]})}(t,e,s):new i.A({pixelType:t.pixelType,width:r,height:o,mask:a,maskIsAlpha:!1,pixels:[...t.pixels]})}function u(t,e){const{extent:n}=l(t,e,new o.A({x:t.pixelSize.x,y:t.pixelSize.y,spatialReference:t.spatialReference})),{extent:s}=t.extent;if(n.xmax=Math.min(n.xmax,s.xmax),n.ymax=Math.min(n.ymax,s.ymax),n.xmin<n.xmax&&n.ymin<n.ymax){const{x:e,y:s}=t.pixelSize,r=Math.round(n.width/e),o=Math.round(n.height/s);t.extent=n,t.width=r,t.height=o}}function l(t,e,n,o=!0){const{spatialReference:i}=t,{x:a,y:u}=function(t,e){if(t.spatialReference.equals(e))return t;const n=(0,s.GA)(t.spatialReference),r=(0,s.GA)(e);if(n===r)return t;const o=n/r;return{x:t.x*o,y:t.y*o}}(n,i);let l,c,p;const h="extent"===e.type?e:e.extent;let{xmin:m,xmax:f,ymax:g,ymin:d}=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),f=y+(f>y?a*Math.round((f-y)/a):0),d=x-(d<x?u*Math.round((x-d)/u):0),l=new r.A({xmin:m,ymax:g,xmax:f,ymin:d,spatialReference:i}),c=Math.round(l.width/a),p=Math.round(l.height/u)):(c=Math.floor((f-m)/a+.8),p=Math.floor((g-d)/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),f=m+c*a,d=g-p*u,l=new r.A({xmin:m,ymax:g,xmax:f,ymin:d,spatialReference:i})),{extent:l,width:c,height:p}}},37373(t,e,n){n.d(e,{DO:()=>D,FT:()=>G,Hh:()=>M,OM:()=>E,Ps:()=>W,Wo:()=>P,_I:()=>R,_l:()=>B,l0:()=>V,t$:()=>$,uk:()=>j});var s=n(4576),r=n(49186),o=n(74887),i=n(86211),a=n(5443),u=n(83290),l=n(86738),c=n(39829),p=n(91218),h=n(16930),m=n(21325);function f(){if(!C)throw new r.A("rasterprojectionhelper-project","projection operator is not loaded")}const g=(t,e,n,s=0)=>{if(1===n[0])return[0,0];let r=1,o=-1,i=1,a=-1;for(let e=0;e<t.length;e+=2)isNaN(t[e])||(r=r>t[e]?t[e]:r,o=o>t[e]?o:t[e],i=i>t[e+1]?t[e+1]:i,a=a>t[e+1]?a:t[e+1]);const{cols:u,rows:l}=e,c=(o-r)/u/n[0],p=(a-i)/l/n[1],h=2*s;let m=0,f=!1,g=[0,0];for(let e=0;e<u-3;e++){for(let n=0;n<l-3;n++){const s=e*l*2+2*n,r=(t[s]+t[s+4]+t[s+4*l]+t[s+4*l+4])/4,o=(t[s+1]+t[s+5]+t[s+4*l+1]+t[s+4*l+5])/4,i=Math.abs((r-t[s+2*l+2])/c),a=Math.abs((o-t[s+2*l+3])/p);if(i+a>m&&(m=i+a,g=[i,a]),h&&m>h){f=!0;break}}if(f)break}return g},d={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},y=new Map,x=new Map,w=500;let A,v,b,C=!1;async function M(){return A||(A=(0,o.Tw)(),v=await n.e(895).then(n.bind(n,83276)),b=await n.e(2158).then(n.bind(n,12158)),v.isLoaded()||await v.load(),b.isLoaded()||await b.load(),C=!0,A.resolve()),A.promise}function P(t,e,n,s){const r=t.spatialReference;if(!r||!e||r.equals(e))return t;f();const o=n.center,u=new a.A({xmin:o.x-t.x/2,xmax:o.x+t.x/2,ymin:o.y-t.y/2,ymax:o.y+t.y/2,spatialReference:r}),l=v.execute(u,e,{geographicTransformation:s}),c=G(e);return null==l||null!=c&&l.width>=c?function(t,e,n){const s=(0,i.GA)(e)/(0,i.GA)(n);return{x:t.x*s,y:t.y*s}}(t,r,e):{x:l.width,y:l.height}}function T(t,e=.01){return(0,i.GA)(t)?e/(0,i.GA)(t):0}function R(t,e,n,s=!0){const r=t.spatialReference;if(r.equals(e))return t;f();const o=v.execute(t,e,{geographicTransformation:n});return s&&o?(N([t],[o],r,e),o):o}function N(t,e,n,s){const r=z(n,!0),o=z(s,!0),i=T(n,w),a=T(s,w);if(i&&null!=r&&null!=o)for(let n=0;n<t.length;n++){const s=e[n];if(!s)continue;const{x:u}=t[n],{x:l}=s;l>=o[1]-a&&Math.abs(u-r[0])<i?s.x-=o[1]-o[0]:l<=o[0]+a&&Math.abs(u-r[1])<i&&(s.x+=o[1]-o[0])}}function k(t){const{inSR:e,outSR:n,preferPE:s}=t;if(e.equals(n)){const{points:e}=F(t,null);return e}if(e.isWebMercator&&n.isWGS84||e.isWGS84&&n.isWebMercator)return function(t){const{cols:e,rows:n,xres:s,yres:r,usePixelCenter:o,inSR:i,outSR:a}=t;let{xmin:u,ymax:c}=t;o&&(u+=s/2,c-=r/2);const h=[],m=[],f=Math.max(e,n);for(let t=0;t<f;t++){const o=u+s*Math.min(e,t),f=c-r*Math.min(n,t),g=(0,p.projectWithoutEngine)(new l.A({x:o,y:f,spatialReference:i}),i,a);t<=e&&h.push(g.x),t<=n&&m.push(g.y)}const g=[];for(let t=0;t<e;t++)for(let e=0;e<n;e++)g.push([h[t],m[e]]);return g}(t);if(s){if(e.isGeographic)return I(t);if(null!=S(e))return I(t)}return function(t){const{points:e}=F(t,null),{inSR:n,outSR:s,datumTransformation:r}=t,o=e.map(t=>new l.A(t[0],t[1],n)),i=v.executeMany(o,s,{geographicTransformation:r});return r&&N(o,i,n,s),i.map(t=>t?[t.x,t.y]:[NaN,NaN])}(t)}function I(t){const{inSR:e,outSR:n,datumTransformation:s}=t,r=S(e),{points:o,mask:i}=F(t,r);if(!e.isGeographic){const t=e.wkid?u.P.coordsys(e.wkid):u.P.fromString(e.isGeographic?u.a.PE_TYPE_GEOGCS:u.a.PE_TYPE_PROJCS,e.wkt2||e.wkt);u.h.projToGeog(t,o.length,o)}if(null!=s&&s.steps.length){let t;const e=179.9955;if(n.isGeographic&&(t=o.map(([t])=>t>e?1:t<-e?-1:0)),s.steps.forEach(t=>{const e=t.wkid?u.P.geogtran(t.wkid):u.P.fromString(u.a.PE_TYPE_GEOGTRAN,t.wkt);u.j.geogToGeog(e,o.length,o,null,t.isInverse?u.a.PE_TRANSFORM_2_TO_1:u.a.PE_TRANSFORM_1_TO_2)}),t)for(let n=0;n<o.length;n++){const s=t[n],r=o[n][0],i=r>e?1:r<-e?-1:0;s&&i&&s!==i&&(o[n][0]=s>0?r+360:r-360)}}if(!n.isGeographic){const t=S(n,!0),e=null!=t&&t.isEnvelope?[t.bbox[1],t.bbox[3]]:[-90,90];!function(t,e){const[n,s]=e;for(let e=0;e<t.length;e++){const r=t[e][1];(r<n||r>s)&&(t[e]=[NaN,NaN])}}(o,e);const s=n.wkid?u.P.coordsys(n.wkid):u.P.fromString(n.isGeographic?u.a.PE_TYPE_GEOGCS:u.a.PE_TYPE_PROJCS,n.wkt2||n.wkt);u.h.geogToProj(s,o.length,o)}let a=o;if(i&&o.length!==i.length){a=[];for(let t=0,e=0;t<i.length;t++)i[t]?a.push(o[e++]):a.push([NaN,NaN])}return a}function S(t,e=!1){let n=t.wkid||t.wkt2||t.wkt;if(!n||t.isGeographic)return null;if(n=String(n),y.has(n)){const t=y.get(n);return e?t?.gcs:t?.pcs}const s=t.wkid?u.P.coordsys(t.wkid):u.P.fromString(t.isGeographic?u.a.PE_TYPE_GEOGCS:u.a.PE_TYPE_PROJCS,t.wkt2||t.wkt),r=_(s,T(t,1e-4)),o=_(s,0,!0);return y.set(n,{pcs:r,gcs:o}),e?o:r}function _(t,e=0,n=!1){const s=u.g.generate(t),r=n?t.horizonGcsGenerate():t.horizonPcsGenerate();if(!s||!r?.length)return null;let o=!1,i=r.find(t=>1===t.getInclusive()&&1===t.getKind());if(!i){if(i=r.find(t=>1===t.getInclusive()&&0===t.getKind()),!i)return null;o=!0}const a=n?0:(2===s.getNorthPoleLocation()?1:0)|(2===s.getSouthPoleLocation()?2:0),l=s.isPannableRectangle(),c=i.getCoord();if(o)return{isEnvelope:o,isPannable:l,vertices:c,coef:null,bbox:[c[0][0]-e,c[0][1]-e,c[1][0]+e,c[1][1]+e],poleLocation:a};let p=0;const h=[];let[m,f]=c[0],[g,d]=c[0];for(let t=0,e=c.length;t<e;t++){p++,p===e&&(p=0);const[n,s]=c[t],[r,o]=c[p];if(o===s)h.push([n,r,s,o,2]);else{const t=(r-n)/(o-s||1e-4),e=n-t*s;s<o?h.push([t,e,s,o,0]):h.push([t,e,o,s,1])}m=m<n?m:n,f=f<s?f:s,g=g>n?g:n,d=d>s?d:s}return{isEnvelope:!1,isPannable:l,vertices:c,coef:h,bbox:[m,f,g,d],poleLocation:a}}function F(t,e){const n=[],{cols:s,rows:r,xres:o,yres:i,usePixelCenter:a}=t;let{xmin:u,ymax:l}=t;if(a&&(u+=o/2,l-=i/2),null==e){for(let t=0;t<s;t++)for(let e=0;e<r;e++)n.push([u+o*t,l-i*e]);return{points:n}}const c=new Uint8Array(s*r);if(e.isEnvelope){const{isPannable:t,bbox:[a,p,h,m]}=e;for(let e=0,f=0;e<s;e++){const s=u+o*e,g=t||s>=a&&s<=h;for(let t=0;t<r;t++,f++){const e=l-i*t;g&&e>=p&&e<=m&&(n.push([s,e]),c[f]=1)}}return{points:n,mask:c}}const p=e.coef,h=[];for(let t=0;t<r;t++){const e=l-i*t,n=[],s=[];for(let t=0;t<p.length;t++){const[r,o,i,a,u]=p[t];if(e===i&&i===a)n.push(r),n.push(o),s.push(2),s.push(2);else if(e>=i&&e<=a){const t=r*e+o;n.push(t),s.push(u)}}let r=n;if(n.length>2){let t=2===s[0]?0:s[0],e=n[0];r=[];for(let o=1;o<s.length;o++)2===s[o]&&o!==s.length-1||(s[o]!==t&&(r.push(0===t?Math.min(e,n[o-1]):Math.max(e,n[o-1])),t=s[o],e=n[o]),o===s.length-1&&r.push(0===s[o]?Math.min(e,n[o]):Math.max(e,n[o])));r.sort((t,e)=>t-e)}else n[0]>n[1]&&(r=[n[1],n[0]]);h.push(r)}for(let t=0,e=0;t<s;t++){const s=u+o*t;for(let t=0;t<r;t++,e++){const r=l-i*t,o=h[t];if(2===o.length)s>=o[0]&&s<=o[1]&&(n.push([s,r]),c[e]=1);else if(o.length>2){let t=!1;for(let e=0;e<o.length;e+=2)if(s>=o[e]&&s<=o[e+1]){t=!0;break}t&&(n.push([s,r]),c[e]=1)}}}return{points:n,mask:c}}function B(t,e,n=null,r=!0){const o=t.spatialReference;if(o.equals(e)||!e)return t;const i=E(t),u=G(o,!0),l=G(e);if(0===i||null==u||null==l){const s=Z(t,e,n,r);if(s&&null==u&&null!=l&&Math.abs(s.width-l)<T(e)&&v.isLoaded()){const n=S(o);if(null!=n&&0===n.poleLocation&&t.width<(n.bbox[2]-n.bbox[0])/2)return function(t,e){const n=G(e);if(null==n)return null;let{xmin:s,ymin:r,xmax:o,ymax:i}=t;const u=t.spatialReference,l=new c.A({spatialReference:u,rings:[[[s,r],[o,r],[o,i],[s,i],[s,r]]]}),p=v.execute(l,e);if(2!==p.rings.length||!p.rings[0].length||!p.rings[1].length)return null;const{rings:h}=p,m=T(u),f=new a.A({spatialReference:e});for(let t=0;t<2;t++){s=o=h[t][0][0],r=i=h[t][0][1];for(let e=0;e<h[t].length;e++)s=s>h[t][e][0]?h[t][e][0]:s,o=o<h[t][e][0]?h[t][e][0]:o,r=r>h[t][e][1]?h[t][e][1]:r,i=i<h[t][e][1]?h[t][e][1]:i;if(0===t)f.ymin=r,f.ymax=i,f.xmin=s,f.xmax=o;else if(f.ymin=Math.min(f.ymin,r),f.ymax=Math.max(f.ymax,i),Math.abs(o-n/2)<m)f.xmin=s,f.xmax=f.xmax+n;else{if(!(Math.abs(s+n/2)<m))return null;f.xmax=o+n}}return f}(t,e)||s}return s}const p=t.clone().normalize();if(1===p.length&&t.xmax<u&&t.xmax-u/2>T(o)){const{xmin:e,xmax:n}=t;for(let s=0;s<=i;s++){const r=0===s?e:-u/2,l=s===i?n-u*s:u/2;p[s]=new a.A({xmin:r,xmax:l,ymin:t.ymin,ymax:t.ymax,spatialReference:o})}}const h=p.map(t=>Z(t,e,n,r)).filter(s.Ru);return 0===h.length?null:function(t,e){const n=G(t[0].spatialReference);if(t.length<2||null==n)return t[0];if(e=e??T(t[0].spatialReference),1===(t=t.filter(t=>t.width>e)).length)return t[0];let{xmin:s,xmax:r,ymin:o,ymax:i}=t[0];for(let e=1;e<t.length;e++){const s=t[e];r=s.xmax+n*e,o=Math.min(o,s.ymin),i=Math.max(i,s.ymax)}return new a.A({xmin:s,xmax:r,ymin:o,ymax:i,spatialReference:t[0].spatialReference})}(h)}function j(t,e,n){if("extent"===t.type){const{xmin:e,ymin:n,xmax:s,ymax:r,spatialReference:o}=t;t=new c.A({rings:[[[e,r],[s,r],[s,n],[e,n],[e,r]]],spatialReference:o})}return t.spatialReference.equals(e)?t:(f(),v.execute(t,e,{geographicTransformation:n}))}function Z(t,e,n,s=!0,r=!0){const o=t.spatialReference;if(o.equals(e)||!e)return t;f();const i=v.execute(t,e,{geographicTransformation:n});if(r&&e.isWebMercator&&i&&(i.ymax=Math.min(20037508.342787,i.ymax),i.ymin=Math.max(-20037508.342787,i.ymin),i.ymin>=i.ymax))return null;if(!s||!i)return i;const a=z(o,!0),u=z(e,!0);if(null==a||null==u)return i;const c=T(o,.001),p=T(o,w),h=T(e,.001);if(Math.abs(i.xmin-u[0])<h&&Math.abs(i.xmax-u[1])<h){const s=Math.abs(t.xmin-a[0]),r=Math.abs(a[1]-t.xmax);if(s<c&&r>p){i.xmin=u[0];const s=[];s.push(new l.A(t.xmax,t.ymin,o)),s.push(new l.A(t.xmax,(t.ymin+t.ymax)/2,o)),s.push(new l.A(t.xmax,t.ymax,o));const r=s.map(t=>R(t,e,n)).filter(t=>!isNaN(t?.x)).map(t=>t.x);i.xmax=Math.max.apply(null,r)}if(r<c&&s>p){i.xmax=u[1];const s=[];s.push(new l.A(t.xmin,t.ymin,o)),s.push(new l.A(t.xmin,(t.ymin+t.ymax)/2,o)),s.push(new l.A(t.xmin,t.ymax,o));const r=s.map(t=>R(t,e,n)).filter(t=>!isNaN(t?.x)).map(t=>t.x);i.xmin=Math.min.apply(null,r)}}else{const t=T(e,.001);Math.abs(i.xmin-u[0])<t&&(i.xmin=u[0]),Math.abs(i.xmax-u[1])<t&&(i.xmax=u[1])}return i}function G(t,e=!1){if(!t)return null;const n=e?20037508.342787:20037508.342788905;return t.isWebMercator?2*n:t.wkid&&t.isGeographic?360:2*d[t.wkid]||null}function z(t,e=!1){if(t.isGeographic)return[-180,180];const n=G(t,e);return n?[-n/2,n/2]:null}function O(t,e,n,s){let r=(t-e)/n;return r-Math.floor(r)!==0?r=Math.floor(r):s&&(r-=1),r}function E(t,e=!1){const n=G(t.spatialReference);if(null==n)return 0;const s=e?0:-n/2,r=T(t.spatialReference),o=!e&&Math.abs(t.xmax-n/2)<r?n/2:t.xmax,i=!e&&Math.abs(t.xmin+n/2)<r?-n/2:t.xmin;return O(o,s,n,!0)-O(i,s,n,!1)}function D(t){const e=t.storageInfo.origin.x,n=G(t.spatialReference,!0);if(null==n)return{originX:e,halfWorldWidth:null,pyramidsInfo:null};const s=n/2,{nativePixelSize:r,storageInfo:o,extent:i}=t,{maximumPyramidLevel:a,blockWidth:u,pyramidScalingFactor:l}=o;let c=r.x;const p=[],h=null!=t.transform&&"gcs-shift"===t.transform.type,m=e+(h?0:s),f=h?n-e:s-e;for(let t=0;t<=a;t++){const t=(i.xmax-e)/c/u,n=t-Math.floor(t)===0?t:Math.ceil(t),s=f/c/u,r=s-Math.floor(s)===0?s:Math.ceil(s),o=Math.floor(m/c/u),a=Math.round(m/c)%u,h=(u-Math.round(f/c)%u)%u;p.push({resolutionX:c,blockWidth:u,datasetColumnCount:n,worldColumnCountFromOrigin:r,leftMargin:a,rightPadding:h,originColumnOffset:o}),c*=l}return{originX:e,halfWorldWidth:s,pyramidsInfo:p,hasGCSSShiftTransform:h}}function V(t){const e=t.isAdaptive&&null==t.spacing;let n=t.spacing||[32,32],s=U(t),r={cols:s.size[0]+1,rows:s.size[1]+1};const o=s.outofBoundPointCount>0&&s.outofBoundPointCount<s.offsets.length/2;let i=s.outofBoundPointCount===s.offsets.length/2||e&&o?[0,0]:g(s.offsets,r,n,4);const a=(i[0]+i[1])/2,l=t.projectedExtent.spatialReference,c=t.srcBufferExtent.spatialReference;if(e&&(o||a>4)&&(l.isGeographic||S(l),n=[4,4],s=U({...t,spacing:n}),r={cols:s.size[0]+1,rows:s.size[1]+1},i=g(s.offsets,r,n,4)),s.error=i,n[0]>1&&(s.coefficients=L(s.offsets,r,o)),t.includeGCSGrid&&!l.isGeographic&&!l.isWebMercator)if(c.isGeographic)s.gcsGrid={offsets:s.offsets,coefficients:s.coefficients,spacing:n};else{const e=S(l);if(null!=e&&!e.isEnvelope){const e=function(t){if(!t||t.isGeographic)return t;const e=String(t.wkid||t.wkt2||t.wkt);let n;return x.has(e)?n=x.get(e):(n=(t.wkid?u.P.coordsys(t.wkid):u.P.fromString(u.a.PE_TYPE_PROJCS,t.wkt2||t.wkt)).getGeogcs().getCode(),x.set(e,n)),new h.A({wkid:n})}(l),i=B(t.projectedExtent,e),{offsets:a}=U({...t,srcBufferExtent:i,spacing:n}),c=L(a,r,o);s.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return s}function U(t){const{projectedExtent:e,srcBufferExtent:n,pixelSize:s,datumTransformation:r,rasterTransform:o}=t,i=e.spatialReference,a=n.spatialReference;f();const{xmin:u,ymin:c,xmax:p,ymax:h}=e,m=G(a),g=null!=m&&(t.hasWrapAround||"gcs-shift"===o?.type),d=t.spacing||[32,32],y=d[0]*s.x,x=d[1]*s.y,A=1===d[0],v=Math.ceil((p-u)/y-.1/d[0])+(A?0:1),b=Math.ceil((h-c)/x-.1/d[1])+(A?0:1),C=k({cols:v,rows:b,xmin:u,ymax:h,xres:y,yres:x,inSR:i,outSR:a,datumTransformation:r,preferPE:d[0]<=4,usePixelCenter:A}),M=[];let P,R=0;const N=A?-1:NaN,{xmin:I,xmax:_,ymax:F,width:B,height:j}=n,Z=T(a,w),z=null!=m&&I>0&&_>m/2,O=S(i),E=null!=O&&O.poleLocation>0;for(let t=0;t<v;t++){const e=[];for(let n=0;n<b;n++){let s=C[t*b+n];if(g&&s[0]>_&&s[0]>m/2-Z?s[0]-=m:g&&0===t&&s[0]<0&&z&&!o&&(s[0]+=m),!s||isNaN(s[0])||isNaN(s[1]))M.push(N),M.push(N),e.push(null),R++;else{if(o){const t=o.inverseTransform(new l.A({x:s[0],y:s[1],spatialReference:a}));s=[t.x,t.y]}e.push(s),t>0&&g&&P[n]&&s[0]<P[n][0]&&(s[0]+=m,E&&s[0]>_&&s[0]>m&&(s[0]-=m)),M.push((s[0]-I)/B),M.push((F-s[1])/j)}}P=e}return{offsets:M,error:null,coefficients:null,outofBoundPointCount:R,spacing:d,size:A?[v,b]:[v-1,b-1]}}function L(t,e,n){const{cols:s,rows:r}=e,o=new Float32Array((s-1)*(r-1)*2*6),i=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let e=0;e<s-1;e++){for(let n=0;n<r-1;n++){let u=e*r*2+2*n;const l=t[u],c=t[u+1],p=t[u+2],h=t[u+3];u+=2*r;const m=t[u],f=t[u+1],g=t[u+2],d=t[u+3];let y=0,x=12*(n*(s-1)+e);for(let t=0;t<3;t++)o[x++]=i[y++]*l+i[y++]*p+i[y++]*g;y=0;for(let t=0;t<3;t++)o[x++]=i[y++]*c+i[y++]*h+i[y++]*d;y=0;for(let t=0;t<3;t++)o[x++]=a[y++]*l+a[y++]*m+a[y++]*g;y=0;for(let t=0;t<3;t++)o[x++]=a[y++]*c+a[y++]*f+a[y++]*d}if(n)for(let t=0;t<o.length;t++)isNaN(o[t])&&(o[t]=-1)}return o}function W(t){const{spatialReference:e}=t,n=(0,m.Vp)(e);if(!n)return t;const[s,r]=n.valid,o=r-s;let i=0;if(t.xmin<s){const e=s-t.xmin;i=Math.ceil(e/o)}else if(t.xmin>r){const e=t.xmin-r;i=-Math.ceil(e/o)}return new a.A({spatialReference:t.spatialReference,xmin:t.xmin+i*o,ymin:t.ymin,xmax:t.xmax+i*o,ymax:t.ymax})}function $(t,e,n){const{storageInfo:s,pixelSize:r}=e;let o=0,a=!1;const{pyramidResolutions:u}=s,c="mixed"===s.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,s.tileInfo.dpi/96)):1,p=(t.x+t.y)/2/c;if(null!=u&&u.length){const t=u[u.length-1],s=(t.x+t.y)/2,c=(r.x+r.y)/2;if(p<=c)o=0;else if(p>=s)o=u.length,a=p/s>8;else{let t,e=c;for(let s=1;s<=u.length;s++){if(t=(u[s-1].x+u[s-1].y)/2,p<=t){p===t?o=s:"down"===n?(o=s-1,a=p/e>8):o="up"===n||p-e>t-p||p/e>2?s:s-1;break}e=t}}const h=0===o?r:u[o-1];return a&&Math.min(h.x,h.y)*(0,i.GA)(e.spatialReference)>19567&&(a=!1),{pyramidLevel:o,pyramidResolution:new l.A({x:h.x,y:h.y,spatialReference:e.spatialReference}),excessiveReading:a}}const h=Math.log(t.x/r.x)/Math.LN2,m=Math.log(t.y/r.y)/Math.LN2,f=e.storageInfo.maximumPyramidLevel||0;o="down"===n?Math.floor(Math.min(h,m)):"up"===n?Math.ceil(Math.max(h,m)):Math.round((h+m)/2),o<0?o=0:o>f&&(a=o>f+3,o=f);const g=2**o;return{pyramidLevel:o,pyramidResolution:new l.A({x:g*e.nativePixelSize.x,y:g*e.nativePixelSize.y,spatialReference:e.spatialReference}),excessiveReading:a}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8207],{8303(e,t,i){i.d(t,{A:()=>b});var r=i(31635),s=i(92602),n=i(70333),a=i(11254),o=i(60999),l=i(49186),h=i(53966),c=i(97768),u=i(74887),d=i(84952),p=i(91429),f=i(77548),m=i(20655),g=i(80812),y=i(41318),v=i(10407),_=i(36005),w=i(43937);const b=e=>{const t=e;let b=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,i){if(t.itemId)return new g.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,u.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,u.zf)(e)||h.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,u.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,u.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!n.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let a,o;if(s)a=i.portal.url;else try{a=await(0,f.wI)(this.url,t)}catch(e){(0,u.QP)(e)}if(!a||!(0,d.b8)(a,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,u.QP)(e)}const l=!0,h=!1,c=!1;if(!o)return{features:{edit:l,fullEdit:h},content:{updateItem:c}};try{if(s?await i.reload():(i=new g.default({id:e,portal:{url:a}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,u.QP)(e)}return{features:{edit:l,fullEdit:h},content:{updateItem:c}}}_getUserPrivileges(e,t){const i=(0,v.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,u.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=m.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(r))return s.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,c=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return c.ok?y.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return i&&r&&!(0,d.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.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,r.Cg)([(0,p.MZ)({type:g.default})],b.prototype,"portalItem",null),(0,r.Cg)([(0,_.w)("web-document","portalItem",["itemId"])],b.prototype,"readPortalItem",null),(0,r.Cg)([(0,w.K)("web-document","portalItem",{itemId:{type:String}})],b.prototype,"writePortalItem",null),(0,r.Cg)([(0,p.MZ)({clonable:!1})],b.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],b.prototype,"userHasUpdateItemPrivileges",void 0),b=(0,r.Cg)([(0,p.$K)("esri.layers.mixins.PortalLayer")],b),b},S={credential:null,user:null}},10407(e,t,i){i.d(t,{It:()=>p,LG:()=>a,OM:()=>h,Sm:()=>c,Y:()=>o,bK:()=>l,mm:()=>d,sQ:()=>u});var r=i(91218),s=i(16930),n=i(28735);function a(e,t){if(!o(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return o(e,d.HOSTED_SERVICE)}function h(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function c(e,t,i){i?a(e,t):h(e,t)}async function u(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.ci)(e);const i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit");const o="update"===r||"admin"===r;return o?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:o}}}},18768(e,t,i){i.d(t,{b:()=>o});var r=i(31635),s=i(53966),n=i(91429),a=i(60694);const o=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,n.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,n.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],i),i}},25943(e,t,i){i.d(t,{d:()=>M});var r,s=i(31635),n=i(11254),a=i(69622),o=i(49186),l=i(36563),h=(i(44208),i(66344)),c=i(15142),u=i(74887),d=i(36708),p=i(76030),f=i(84952),m=i(91429),g=i(72802),y=i(4718),v=i(69397),_=i(34275);class w{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,y.o8)(t));const r=this.location.width,s=this.location.height;let n=!0,a=!0;const l=function(e,t=!1){return e<=_.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(r*s/32));let h=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,l[h]|=1<<t):n=!1,31===t&&++h}a?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,v.Qf)(l))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,n=this._availability;return s<0||s>n.length?"unknown":n[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.A,{row:r,col:s,width:a,height:l}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:a,height:l},valid:!0,data:new Array(a*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==a||e.location.height!==l))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:a,height:l}});return w.fromJSON(e)})}static fromJSON(e){return Object.freeze(new w(e))}}function b(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function S(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let M=class extends a.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,d.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),d.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(S(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof w){const s=r.getAvailability(t,i);if("unavailable"===s)throw S(e,t,i);return s}if((0,u.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;const n=this.layer.tileInfo;n.updateTileInfo(r);const a=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,u.zf)(e))throw e;if(n.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,s,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,n){if(!this._prefetchingEnabled)return;const a=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(a))return;const o=new AbortController;n.then(()=>o.abort(),()=>o.abort());let h=!1;const c=(0,l.hA)(()=>{h||(h=!0,o.abort())});if(this.addHandles(c,a),await(0,p.md)(10,o.signal).catch(()=>{}),h||(h=!0,this.removeHandles(a)),(0,u.G4)(o))return;const d=new g.U(e,t,i),f={...s,signal:o.signal},m=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&m.upsampleTile(d);++e){const e=this.fetchAvailability(d.level,d.row,d.col,f);r._prefetches.push(e);const t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new c.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,s);if(n)return Promise.resolve(n);const a=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,u.u7)(a,()=>t((0,u.NK)()));const i=b(s);let n=this._pendingTilemapRequests[i];if(!n){n=w.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,f.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;const s=b(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"layer",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"minLOD",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"maxLOD",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"request",void 0),(0,s.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"size",void 0),M=r=(0,s.Cg)([(0,m.$K)("esri.layers.support.TilemapCache")],M)},35982(e,t,i){i.d(t,{B:()=>l});var r=i(4576),s=i(36563),n=i(53966),a=i(74887),o=i(83027);class l{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,o.h)(e,{...s,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{i.removed=!0,(0,r.TF)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()})}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){if(this._thread){const s=this._transferLists[e],n=s?s(t):[];return this._thread.invoke(e,t,{transferList:n,signal:i,jobPriority:r})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this.invokeMethod(e,t,i))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(h):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}function h(){}},54239(e,t,i){i.d(t,{A:()=>g});var r,s=i(31635),n=i(4576),a=i(66552),o=i(25482),l=i(86211),h=i(67076),c=i(91429),u=i(43937),d=i(36005);const p=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=p.jsonValues.slice();(0,n.Xy)(f,"orthometric");const m=(0,a.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=r=class extends o.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return p.write(e,t,i)}readHeightModel(e,t,i){return p.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return m.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||m.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,c.MZ)({type:p.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,s.Cg)([(0,u.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s.Cg)([(0,d.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s.Cg)([(0,c.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,s.Cg)([(0,d.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s.Cg)([(0,d.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s.Cg)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=r=(0,s.Cg)([(0,c.$K)("esri.geometry.HeightModelInfo")],g)},60999(e,t,i){i.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>m,aD:()=>y,jJ:()=>h});var r=i(31635),s=i(69622),n=i(97768),a=i(74887),o=i(10107),l=i(64108);function h(e,t,i){return(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function c(e,t,i){return(await(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function u(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return u(await e)}catch(e){return d(e)}}async function f(e){try{return u(await e)}catch(e){return(0,a.QP)(e),d(e)}}function m(e,t){return new g(e,t)}let g=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=u(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,o.MZ)()],g.prototype,"value",null),(0,r.Cg)([(0,o.MZ)()],g.prototype,"error",null),(0,r.Cg)([(0,o.MZ)()],g.prototype,"finished",null),(0,r.Cg)([(0,o.MZ)()],g.prototype,"promise",void 0),(0,r.Cg)([(0,o.MZ)()],g.prototype,"_result",void 0),g=(0,r.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},66344(e,t,i){i.d(t,{q:()=>o});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db.clear()}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,a){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,o.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(a,-4)- -3;this._db.set(t,new n(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){const e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach(i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}})});const r={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._users.get(e.split(a)[0])?.removeFunc,n=s?.(t,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[n,o]of this._db)if(0===o.lifetime&&(!r||n.startsWith(r))){const r=t??this._users.get(n.split(a)[0]);if(this._purgeItem(n,o,r),i.size<=.9*e)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(a)[0]);if(this._purgeItem(s,n,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class o{constructor(e,t){this.removeFunc=t,this._storage=new s,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},68611(e,t,i){i.r(t),i.d(t,{default:()=>z});var r=i(31635),s=i(11254),n=i(49186),a=i(97768),o=i(25728),l=i(74887),h=i(84952),c=i(91429),u=i(54239),d=i(4146),p=i(89186),f=i(18768),m=i(16131),g=i(8303),y=i(10873);class v{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var _=i(35982);class w extends _.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(b.forEach((e,t)=>{e===this&&b.delete(t)}),this.destroy())}}const b=new Map;var S=i(36005);let M=class extends((0,p.f)((0,f.b)((0,m.q)((0,g.A)((0,o.M)(d.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=b.get(e);return t||(null!=e?(t=new w(t=>e.immediate.schedule(t)),b.set(e,t)):(t=new w,b.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=r?.signal,a={responseType:"array-buffer",signal:n},o={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,i,r)).then(()=>(0,s.A)(this.getTileUrl(e,t,i),a)).then(e=>this._lercDecoder.decode(e.data,o,n)).then(e=>new v(e))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{query:r}=await i.e(4375).then(i.bind(i,94375));return(0,l.Te)(t),r(this,e,t)}async createElevationSampler(e,t){const{createSampler:r}=await i.e(4375).then(i.bind(i,94375));return(0,l.Te)(t),r(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[C]}};(0,r.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,r.Cg)([(0,S.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,r.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,type:u.A})],M.prototype,"heightModelInfo",void 0),(0,r.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,r.Cg)([(0,c.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,r.Cg)([(0,c.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,c.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,r.Cg)([(0,c.MZ)(y.OZ)],M.prototype,"url",void 0),(0,r.Cg)([(0,c.MZ)()],M.prototype,"version",void 0),(0,r.Cg)([(0,S.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,r.Cg)([(0,c.$K)("esri.layers.ElevationLayer")],M);const C=Symbol("default-fetch-tile");M.prototype.fetchTile[C]=!0;const z=M},69397(e,t,i){i.d(t,{$B:()=>s,Qf:()=>h,Qh:()=>o,RS:()=>n,Ul:()=>f,ez:()=>d,lM:()=>a,qK:()=>u});var r=i(34275);function s(e){return 32+e.length}const n=16;function a(e){if(!e)return 0;let t=u;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return h(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let i=d;for(let r=0;r<t;r++)i+=l(e[r]);return i}(e);let t=u;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):u;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function h(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+p:Array.isArray(t)?c(t,n):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,p=145,f=64},69540(e,t,i){i.d(t,{OU:()=>c,Pw:()=>u});var r=i(31635),s=i(69622),n=(i(44208),i(4718)),a=(i(53966),i(97768)),o=i(88620),l=i(64108);const h=Symbol("ClonableMixin"),c=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=h}clone(e){const t=(0,o.oY)(this);(0,a.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,r=t.store,s={},l=new Map;for(const t in i){const a=i[t],o=r?.originOf(t),h=a.clonable;if(a.readOnly||!1===h||7!==o&&0!==o&&5!==o&&4!==o)continue;const c=this[t];let u=null;if("function"==typeof h)u=h(c,e);else if("reference"===h)u=c;else if(u=(0,n.TU)(c,e),null!=c&&null==u)continue;0===o?l.set(t,u):s[t]=u}const h=new(0,Object.getPrototypeOf(this).constructor)(s);if(l.size){const e=(0,o.oY)(h)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return h}};return s=(0,r.Cg)([(0,l.$)("esri.core.Clonable")],s),s},u=c(s.A)},78553(e,t,i){i.d(t,{D:()=>n,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},83027(e,t,i){i.d(t,{h:()=>r});const r=i(29953).ho},89186(e,t,i){i.d(t,{f:()=>c});var r=i(31635),s=i(91429),n=i(16930),a=i(87045),o=i(65509),l=i(25943),h=i(36005);const c=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const r=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:n,minScale:h,maxScale:c}=t;if(null==s&&null==n&&(0!==h||0!==c)){const e=e=>Math.round(1e4*e)/1e4;h=e(h||t.tileInfo.lods[0].scale),c=e(c||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=h?i.level:s,n=t>=c?i.level:n}}if(r)return new l.d({layer:this,minLOD:s,maxLOD:n});if(t.tileInfo){const e=new a.A;return e.read(t.tileInfo,i),new o.A(e,s,n)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,h.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,h.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:n.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:a.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,h.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9616],{5443(t,e,n){n.d(e,{A:()=>p});var i,r=n(31635),s=n(799),o=n(91429),a=n(91075),l=n(86738),h=n(16930),u=n(94078),c=n(12176),m=n(21325),f=n(28735);function x(t,e,n){return null==e?n:null==n?e:t(e,n)}let p=i=class extends a.A{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,e,n,i,r){return function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?h.A.WGS84:t.spatialReference,t):{xmin:t,ymin:e,xmax:n,ymax:i,spatialReference:r??h.A.WGS84}}static fromPoint(t){return new i({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new l.A({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const e=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-e.x,t.y-e.y,t.z-e.z):this.offset(t.x-e.x,t.y-e.y)}clone(){const t=new i;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),"point"===t.type?(0,u.qz)(this,t):"extent"===t.type&&(0,u.gH)(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const e=.5*(1-t),n=this.width*e,i=this.height*e;if(this.xmin+=n,this.ymin+=i,this.xmax-=n,this.ymax-=i,this.hasZ){const t=(this.zmax-this.zmin)*e;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*e;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const e=this.spatialReference,n=t.spatialReference;return e&&n&&!(0,m.aI)(e,n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),(0,c.xK)(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,e,n){return this.xmin+=t,this.ymin+=e,this.xmax+=t,this.ymax+=e,null!=n&&(this.zmin+=n,this.zmax+=n),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=x(Math.min,this.zmin,t.zmin),this.zmax=x(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=x(Math.min,this.mmin,t.mmin),this.mmax=x(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=x(Math.max,this.zmin,t.zmin),this.zmax=x(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=x(Math.max,this.mmin,t.mmin),this.mmax=x(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=(0,m.Vp)(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,n=this._getCM(t);if(n){const i=e.isWebMercator?(0,f.ci)(n):n;this.xmin-=n.x,this.xmax-=n.x,e.isWebMercator||(i.x=y(i.x,t).x),this.spatialReference=new h.A((0,s.HC)((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:i.x}))}return this}_getCM(t){let e=null;const[n,i]=t.valid,r=this.xmin,s=this.xmax;return r>=n&&r<=i&&s>=n&&s<=i||(e=this.center),e}_normalize(t,e,n){const i=this.spatialReference;if(!i)return this;const r=n??(0,m.Vp)(i);if(null==r)return this;const s=this._getParts(r).map(t=>t.extent);if(s.length<2)return s[0]||this;if(s.length>2)return t?this._shiftCM(r):this.set({xmin:r.valid[0],xmax:r.valid[1]});if(t)return this._shiftCM(r);if(e)return s;let o=!0,a=!0;return s.forEach(t=>{t.hasZ||(o=!1),t.hasM||(a=!1)}),{rings:s.map(t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(o){const n=(t.zmax-t.zmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}if(a){const n=(t.mmax-t.mmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}return e}),hasZ:o,hasM:a,spatialReference:i}}_getParts(t){let e=this.cache._parts;if(!e){e=[];const{ymin:n,ymax:r,spatialReference:s}=this,o=this.width,a=this.xmin,l=this.xmax;let h;t=t||(0,m.Vp)(s);const[u,c]=t.valid;h=y(this.xmin,t);const f=h.x,x=h.frameId;h=y(this.xmax,t);const p=h.x,d=h.frameId,g=f===p&&o>0;if(o>2*c){const t=new i(a<l?f:p,n,c,r,s),o=new i(u,n,a<l?p:f,r,s),h=new i(0,n,c,r,s),m=new i(u,n,0,r,s),y=[],g=[];t.contains(h)&&y.push(x),t.contains(m)&&g.push(x),o.contains(h)&&y.push(d),o.contains(m)&&g.push(d);for(let t=x+1;t<d;t++)y.push(t),g.push(t);e.push({extent:t,frameIds:[x]},{extent:o,frameIds:[d]},{extent:h,frameIds:y},{extent:m,frameIds:g})}else f>p||g?e.push({extent:new i(f,n,c,r,s),frameIds:[x]},{extent:new i(u,n,p,r,s),frameIds:[d]}):e.push({extent:new i(f,n,p,r,s),frameIds:[x]});this.cache._parts=e}const n=this.hasZ,r=this.hasM;if(n||r){const t={};n&&(t.zmin=this.zmin,t.zmax=this.zmax),r&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let n=0;n<e.length;n++)e[n].extent.set(t)}return e}};function y(t,e){const[n,i]=e.valid,r=2*i;let s,o=0;return t>i?(s=Math.ceil(Math.abs(t-i)/r),t-=s*r,o=s):t<n&&(s=Math.ceil(Math.abs(t-n)/r),t+=s*r,o=-s),{x:t,frameId:o}}(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"center",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasM",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasZ",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"height",null),(0,r.Cg)([(0,o.MZ)({type:h.A,json:{write:!0},value:h.A.WGS84})],p.prototype,"spatialReference",void 0),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"width",null),(0,r.Cg)([(0,o.MZ)({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],p.prototype,"xmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"xmax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmax",void 0),p=i=(0,r.Cg)([(0,o.$K)("esri.geometry.Extent")],p),p.prototype.toJSON.isDefaultToJSON=!0},12176(t,e,n){n.d(e,{Ql:()=>y,fA:()=>f,xB:()=>s,xK:()=>d});var i=n(94078);function r(t,e){return(0,i.qz)(t,e)}function s(t,e){const n=t.hasZ&&e.hasZ;let i,r,s;if(t.xmin<=e.xmin){if(i=e.xmin,t.xmax<i)return!1}else if(i=t.xmin,e.xmax<i)return!1;if(t.ymin<=e.ymin){if(r=e.ymin,t.ymax<r)return!1}else if(r=t.ymin,e.ymax<r)return!1;if(n&&e.hasZ)if(t.zmin<=e.zmin){if(s=e.zmin,t.zmax<s)return!1}else if(s=t.zmin,e.zmax<s)return!1;return!0}function o(t,e){const{points:n,hasZ:r}=e,s=r?i.F8:i.CW;for(const e of n)if(s(t,e))return!0;return!1}const a=[0,0],l=[0,0],h=[0,0],u=[0,0],c=[a,l,h,u],m=[[h,a],[a,l],[l,u],[u,h]];function f(t,e){return function(t,e){a[0]=t.xmin,a[1]=t.ymax,l[0]=t.xmax,l[1]=t.ymax,h[0]=t.xmin,h[1]=t.ymin,u[0]=t.xmax,u[1]=t.ymin;for(const t of c)if((0,i.t1)(e,t))return!0;for(const n of e){if(!n.length)continue;let e=n[0];if((0,i.CW)(t,e))return!0;for(let r=1;r<n.length;r++){const s=n[r];if((0,i.CW)(t,s)||p(e,s,m))return!0;e=s}}return!1}(t,e.rings)}function x(t,e){a[0]=t.xmin,a[1]=t.ymax,l[0]=t.xmax,l[1]=t.ymax,h[0]=t.xmin,h[1]=t.ymin,u[0]=t.xmax,u[1]=t.ymin;const n=e.paths;for(const e of n){if(!n.length)continue;let r=e[0];if((0,i.CW)(t,r))return!0;for(let n=1;n<e.length;n++){const s=e[n];if((0,i.CW)(t,s)||p(r,s,m))return!0;r=s}}return!1}function p(t,e,n){for(let i=0;i<n.length;i++)if(y(t,e,n[i][0],n[i][1]))return!0;return!1}function y(t,e,n,i,r){const[s,o]=t,[a,l]=e,[h,u]=n,[c,m]=i,f=c-h,x=s-h,p=a-s,y=m-u,d=o-u,g=l-o,M=y*p-f*g;if(0===M)return!1;const w=(f*d-y*x)/M,v=(p*d-g*x)/M;return w>=0&&w<=1&&v>=0&&v<=1&&(r&&(r[0]=s+w*(a-s),r[1]=o+w*(l-o)),!0)}function d(t){switch(t){case"esriGeometryEnvelope":case"extent":return s;case"esriGeometryMultipoint":case"multipoint":return o;case"esriGeometryPoint":case"point":return r;case"esriGeometryMultiPatch":case"multipatch":case"esriGeometryPolygon":case"polygon":return f;case"esriGeometryPolyline":case"polyline":return x}}},19419(t,e,n){n.d(e,{$9:()=>v,HY:()=>w,IO:()=>c,Ie:()=>b,Rj:()=>M,VL:()=>x,VY:()=>a,Wc:()=>y,aI:()=>R,bx:()=>m,fA:()=>o,fT:()=>f,gR:()=>z,gX:()=>d,ib:()=>g,nw:()=>u,qv:()=>A,tK:()=>h,uJ:()=>p,vt:()=>r,w1:()=>l}),n(34727);var i=n(5443);function r(t=Z){return[t[0],t[1],t[2],t[3]]}function s(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function o(t,e,n,i,s=r()){return s[0]=t,s[1]=e,s[2]=n,s[3]=i,s}function a(t,e=r()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function l(t,e,n=new i.A){return n.xmin=t[0],n.ymin=t[1],n.xmax=t[2],n.ymax=t[3],n.spatialReference=e,n}function h(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function u(t,e){e<t[0]&&(t[0]=e),e>t[2]&&(t[2]=e)}function c(t,e){e<t[1]&&(t[1]=e),e>t[3]&&(t[3]=e)}function m(t,{xmin:e,ymin:n,xmax:i,ymax:r}){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],i),t[3]=Math.max(t[3],r)}function f(t,e,n){if(null!=e)if("length"in e)C(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):2!==e.length&&3!==e.length||(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}else s(n,t)}function x(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function p(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function y(t){return x(t)*p(t)}function d(t,e=[0,0]){return e[0]=(t[0]+t[2])/2,e[1]=(t[1]+t[3])/2,e}function g(t){const e=x(t),n=p(t);return Math.sqrt(e*e+n*n)}function M(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function w(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function v(t,e,n){return Math.max(e[0],t[0])-n<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])-n<=Math.min(e[3],t[3])}function z(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function b(t){return t?s(t,A):r(A)}function C(t){return null!=t&&4===t.length}function R(t,e){return C(t)&&C(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:t===e}const A=[1/0,1/0,-1/0,-1/0],Z=[0,0,0,0]},21276(t,e,n){n.d(e,{H:()=>s,f:()=>r});var i=n(49186);function r(t){if(t&&"object"==typeof t&&"type"in t&&"mesh"===t.type)throw new i.A("internal:mesh","Mesh geometries are not supported for this operation")}function s(t){t.forEach(r)}},28735(t,e,n){n.d(e,{Cv:()=>p,Gh:()=>g,ci:()=>M,je:()=>y,jg:()=>u,tD:()=>d,y7:()=>x});var i=n(4718),r=n(21276),s=n(16930),o=n(79258),a=n(21325);function l(t){return 57.29577951308232*t}function h(t){return.017453292519943*t}function u(t){return Math.PI/2-2*Math.atan(Math.exp(-t/o.$O.radius))}function c(t){return null!=t.wkid||null!=t.wkt}const m=[0,0];function f(t,e,n,i,r){const s=t,o=r;if(o.spatialReference=n,"x"in s&&"x"in o)[o.x,o.y]=e(s.x,s.y,m,i);else if("xmin"in s&&"xmin"in o)[o.xmin,o.ymin]=e(s.xmin,s.ymin,m,i),[o.xmax,o.ymax]=e(s.xmax,s.ymax,m,i);else if("paths"in s&&"paths"in o||"rings"in s&&"rings"in o){const t="paths"in s?s.paths:s.rings,n=[];let r;for(let s=0;s<t.length;s++){const o=t[s];r=[],n.push(r);for(let t=0;t<o.length;t++)r.push(e(o[t][0],o[t][1],[0,0],i)),o[t].length>2&&r[t].push(o[t][2]),o[t].length>3&&r[t].push(o[t][3])}"paths"in o?o.paths=n:o.rings=n}else if("points"in s&&"points"in o){const t=s.points,n=[];for(let r=0;r<t.length;r++)n[r]=e(t[r][0],t[r][1],[0,0],i),t[r].length>2&&n[r].push(t[r][2]),t[r].length>3&&n[r].push(t[r][3]);o.points=n}return r}function x(t,e){const n=t&&(c(t)?t:t.spatialReference),i=e&&(c(e)?e:e.spatialReference);return!(t&&"type"in t&&"mesh"===t.type||e&&"type"in e&&"mesh"===e.type||!n||!i)&&(!!(0,a.aI)(i,n)||(0,a.K8)(i)&&(0,a.oT)(n)||(0,a.K8)(n)&&(0,a.oT)(i))}function p(t,e){if(null==t)return null;const n=t.spatialReference,r=e&&(c(e)?e:e.spatialReference);return x(n,r)?(0,a.aI)(n,r)?(0,i.o8)(t):(0,a.K8)(r)?f(t,y,s.A.WebMercator,!1,(0,i.o8)(t)):(0,a.oT)(r)?f(t,d,s.A.WGS84,!1,(0,i.o8)(t)):null:null}function y(t,e,n=[0,0]){e>89.99999?e=89.99999:e<-89.99999&&(e=-89.99999);const i=h(e);return n[0]=h(t)*o.$O.radius,n[1]=o.$O.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),n}function d(t,e,n=[0,0],i=!1){if(t===a.Mc[0])n[0]=-180;else if(t===a.Mc[1])n[0]=180;else{const e=l(t/o.$O.radius);n[0]=i?e:e-360*Math.floor((e+180)/360)}return n[1]=l(Math.PI/2-2*Math.atan(Math.exp(-e/o.$O.radius))),n}function g(t,e=!1,n=(0,i.o8)(t)){return(0,r.f)(t),(0,r.f)(n),f(t,y,s.A.WebMercator,e,n)}function M(t,e=!1,n=(0,i.o8)(t)){return(0,r.f)(t),(0,r.f)(n),f(t,d,s.A.WGS84,e,n)}},31635(t,e,n){function i(t,e,n,i){var r,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,n,o):r(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o}function r(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(r=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");r&&(i=function(){try{r.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>i,hk:()=>o,mS:()=>r}),Object.create,Object.create;var s="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i};function o(t){function e(e){t.error=t.hasError?new s(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,i=0;return function r(){for(;n=t.stack.pop();)try{if(!n.async&&1===i)return i=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(s).then(r,function(t){return e(t),r()})}else i|=1}catch(t){e(t)}if(1===i)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},49616(t,e,n){n.r(e),n.d(e,{default:()=>h});var i=n(31635),r=n(91429),s=n(58146),o=n(19419),a=n(69052);n(21325);let l=class{constructor(){this._tileData=new Map}async generateStreamlines(t){const{flowData:e,flowExtentInfo:n,needsMagnitude:i,simulationSettings:r,startPositions:o}=t,a=u((0,s.DE)(r,e),r,n.modelSize,i,o);return{result:{streamlines:a},transferList:a?.map(t=>t.vertices.buffer)}}async generateTiledStreamlines(t){const{flowDataTiles:e,flowExtentInfo:n,needsMagnitude:i,reset:r,simulationSettings:l,startPositions:h}=t;this._updateTileData(e,r);const c=u(function(t,e,n){const[i,r]=n.modelSize;let l=null;const h=new Map;e.forEach(e=>{h.set(e.lij,(0,s.DE)(t,e))});const u=(t,e,n)=>(0,o.Rj)(t.extent,e,n);return(s,c)=>{const m=Math.round(s),f=Math.round(c);if(!t.wrapAround&&(m<0||m>=i||f<0||f>=r))return[0,0];const[x,p]=function(t,e,n,i){const{extent:r,modelSize:s,valid:l}=t,[h,u,c]=r,m=function(t,e,n){if(null!=n&&t>e){const[i,r]=n;return r-t+(e-i)}return e-t}(h,c,l);let f=e/s[0]*m+h;return null!=l&&i&&(f=new a.hr(l[0],l[1]).normalize(f)),[f,(s[1]-n)/s[1]*(0,o.uJ)(r)+u]}(n,s,c,!0);if(!function(t,e,n){const{extent:i,valid:r}=t,[s,o,a,l]=i;return!(n<o||n>l)&&(null!=r&&s>a?e>=a||e<=s:e>=s&&e<=a)}(n,x,p))return[0,0];if(null==l||!u(l,x,p)){l=null;for(const[t,n]of e)if(u(n,x,p)){l=n;break}}if(null==l?.data)return[0,0];const y=h.get(l.lij);if(null==y)return[0,0];const{width:d,height:g,extent:M}=l;return y((x-M[0])/(0,o.VL)(M)*d,g-(p-M[1])/(0,o.uJ)(M)*g)}}(l,this._tileData,n),l,n.modelSize,i,h);return{result:{streamlines:c},transferList:c?.map(t=>t.vertices.buffer)??[]}}_updateTileData(t,e){if(e)for(const e of this._tileData.keys())t.has(e)||this._tileData.delete(e);t.forEach((t,e)=>{"delete"===t.type?this._tileData.delete(e):"on-worker"!==t.type&&"invalid"!==t.type&&this._tileData.set(e,t.data)})}};l=(0,i.Cg)([(0,r.$K)("esri.views.3d.support.flow.FlowWorker")],l);const h=l;function u(t,e,n,i,r){if(null==t)return;const o=(0,s.S1)(e,t,n[0],n[1],{positions:r}),a=[],l=function(t){return t?4:3}(i);for(const{vertices:t,stage:e}of o){const n=new Float32Array(t.length*l);for(let e=0;e<t.length;e++)n[e*l]=t[e].x,n[e*l+1]=t[e].y,n[e*l+2]=t[e].time,i&&(n[e*l+3]=t[e].speed);a.push({vertices:n,stage:e,hasMagnitude:i})}return a}},58146(t,e,n){n.d(e,{DE:()=>f,CW:()=>m,S1:()=>y});var i=n(44208),r=n(53966),s=n(34727),o=n(74887),a=n(87811),l=n(78659);function h(t){const e=new Float32Array(u(t));return u(t,e),e}function u(t,e){let n=0;e&&(e[n]=t.length),n++;for(const i of t){e&&(e[n]=i.stage),n++,e&&(e[n]=i.vertices.length),n++;for(const t of i.vertices)e&&(e[n]=t.x,e[n+1]=t.y,e[n+2]=t.time,e[n+3]=t.speed),n+=4}return n}n(5443),n(21325);const c=()=>r.A.getLogger("esri.views.2d.engine.flow.dataUtils");async function m(t,e,n,r,s){const a=performance.now(),l=function(t,e){const{perturb:n}=e;if(n){const{rotation:e}=n;null!=e&&(t=function(t,e){const n=Math.cos(e),i=Math.sin(e);return(e,r)=>{const[s,o]=t(e,r);return[n*s+i*o,-i*s+n*o]}}(t,e));const{scale:i}=n;null!=i&&(t=function(t,e){return(n,i)=>{const[r,s]=t(n,i);return[r*e,s*e]}}(t,i))}return t}(f(e,n),e),u=performance.now(),m=y(e,l,n.width,n.height,r),x=performance.now(),p=function(t){const e=t.reduce((t,e)=>t+e.vertices.length,0),n=new Float32Array(4*e),i=new Array(t.length);let r=0,s=0;for(const{vertices:e}of t){const t=r;for(const t of e)n[4*r]=t.x,n[4*r+1]=t.y,n[4*r+2]=t.time,n[4*r+3]=t.speed,r++;i[s++]={startVertex:t,numberOfVertices:e.length,firstTime:e[0].time,lastTime:e[e.length-1].time}}return{lineVertices:n,lineDescriptors:i}}(m),d=performance.now(),g="Streamlines"===t?function(t,e,n){const{lineVertices:i,lineDescriptors:r}=t;let s=0,o=0;for(const t of r)s+=2*t.numberOfVertices,o+=6*(t.numberOfVertices-1);const a=new Float32Array(9*s),l=new Uint32Array(o);let u=0,c=0;function m(){l[c++]=u-2,l[c++]=u,l[c++]=u-1,l[c++]=u,l[c++]=u+1,l[c++]=u-1}function f(t,e,n,i,r,s,o,l){const h=9*u;let c=0;a[h+c++]=t,a[h+c++]=e,a[h+c++]=1,a[h+c++]=n,a[h+c++]=s,a[h+c++]=o,a[h+c++]=i/2,a[h+c++]=r/2,a[h+c++]=l,u++,a[h+c++]=t,a[h+c++]=e,a[h+c++]=-1,a[h+c++]=n,a[h+c++]=s,a[h+c++]=o,a[h+c++]=-i/2,a[h+c++]=-r/2,a[h+c++]=l,u++}for(const t of r){const{firstTime:e,lastTime:n}=t;let r=null,s=null,o=null,a=null,l=null,h=null;for(let u=0;u<t.numberOfVertices;u++){const c=i[4*(t.startVertex+u)],x=i[4*(t.startVertex+u)+1],p=i[4*(t.startVertex+u)+2],y=i[4*(t.startVertex+u)+3];let d=null,g=null,M=null,w=null;if(u>0){d=c-r,g=x-s;const t=Math.sqrt(d*d+g*g);if(d/=t,g/=t,u>1){let t=d+l,e=g+h;const n=Math.sqrt(t*t+e*e);t/=n,e/=n;const i=Math.min(1/(t*d+e*g),10);t*=i,e*=i,M=-e,w=t}else M=-g,w=d;null!==M&&null!==w&&(f(r,s,o,M,w,e,n,y),m())}r=c,s=x,o=p,l=d,h=g,a=y}f(r,s,o,-h,l,e,n,a)}const x=h(n);return{vertexData:a,indexData:l,pathData:x}}(p,0,m):function(t,e){const{lineVertices:n,lineDescriptors:i}=t;let r=0,s=0;for(const t of i){const e=t.numberOfVertices-1;r+=4*e*2,s+=6*e*2}const o=new Float32Array(16*r),a=new Uint32Array(s);let l,u,c,m,f,x,p,y,d,g,M,w,v,z,b=0,C=0;function R(t,e,n,i,r,s,a,l,h,u,c,m,f,x){const p=16*b;let y=0;for(const d of[1,2])for(const g of[1,2,3,4])o[p+y++]=t,o[p+y++]=e,o[p+y++]=n,o[p+y++]=i,o[p+y++]=a,o[p+y++]=l,o[p+y++]=h,o[p+y++]=u,o[p+y++]=d,o[p+y++]=g,o[p+y++]=f,o[p+y++]=x,o[p+y++]=r/2,o[p+y++]=s/2,o[p+y++]=c/2,o[p+y++]=m/2,b++}function A(t,e){let n=d+M,i=g+w;const r=Math.sqrt(n*n+i*i);n/=r,i/=r;const s=d*n+g*i;n/=s,i/=s;let o=M+v,h=w+z;const A=Math.sqrt(o*o+h*h);o/=A,h/=A;const Z=M*o+w*h;o/=Z,h/=Z,R(l,u,c,m,-i,n,f,x,p,y,-h,o,t,e),a[C++]=b-8,a[C++]=b-7,a[C++]=b-6,a[C++]=b-7,a[C++]=b-5,a[C++]=b-6,a[C++]=b-4,a[C++]=b-3,a[C++]=b-2,a[C++]=b-3,a[C++]=b-1,a[C++]=b-2}function Z(t,e,n,i,r,s){if(d=M,g=w,M=v,w=z,null==d&&null==g&&(d=M,g=w),null!=f&&null!=x){v=t-f,z=e-x;const n=Math.sqrt(v*v+z*z);v/=n,z/=n}null!=d&&null!=g&&A(r,s),l=f,u=x,c=p,m=y,f=t,x=e,p=n,y=i}function P(t,e){d=M,g=w,M=v,w=z,null==d&&null==g&&(d=M,g=w),null!=d&&null!=g&&A(t,e)}for(const t of i){l=null,u=null,c=null,m=null,f=null,x=null,p=null,y=null,d=null,g=null,M=null,w=null,v=null,z=null;const{firstTime:e,lastTime:i}=t;for(let r=0;r<t.numberOfVertices;r++)Z(n[4*(t.startVertex+r)],n[4*(t.startVertex+r)+1],n[4*(t.startVertex+r)+2],n[4*(t.startVertex+r)+3],e,i);P(e,i)}const S=h(e);return{vertexData:o,indexData:a,pathData:S}}(p,m),M=performance.now();return(0,i.A)("esri-2d-profiler")&&(c().info("I.1","_createFlowFieldFromData (ms)",Math.round(u-a)),c().info("I.2","_getStreamlines (ms)",Math.round(x-u)),c().info("I.3","createAnimatedLinesData (ms)",Math.round(d-x)),c().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(M-d)),c().info("I.5","createFlowMesh (ms)",Math.round(M-a)),c().info("I.6","Mesh size (bytes)",g.vertexData.buffer.byteLength+g.indexData.buffer.byteLength)),await Promise.resolve(),(0,o.Te)(s),g}function f(t,e){const n=function(t,e,n,i){if(0===i)return t;const r=Math.round(3*i),s=new Array(2*r+1);let o=0;for(let t=-r;t<=r;t++){const e=Math.exp(-t*t/(i*i));s[t+r]=e,o+=e}for(let t=-r;t<=r;t++)s[t+r]/=o;const a=new Float32Array(t.length);for(let i=0;i<n;i++)for(let n=0;n<e;n++){let o=0,l=0;for(let a=-r;a<=r;a++){if(n+a<0||n+a>=e)continue;const h=s[a+r];o+=h*t[2*(i*e+(n+a))],l+=h*t[2*(i*e+(n+a))+1]}a[2*(i*e+n)]=o,a[2*(i*e+n)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let i=0;i<n;i++){let o=0,h=0;for(let l=-r;l<=r;l++){if(i+l<0||i+l>=n)continue;const u=s[l+r];o+=u*a[2*((i+l)*e+t)],h+=u*a[2*((i+l)*e+t)+1]}l[2*(i*e+t)]=o,l[2*(i*e+t)+1]=h}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,i)=>{const r=Math.floor(t),s=Math.floor(i);if(r<0||r>=e.width)return[0,0];if(s<0||s>=e.height)return[0,0];const o=t-r,a=i-s,l=r,h=s,u=r<e.width-1?r+1:r,c=s<e.height-1?s+1:s,m=n[2*(h*e.width+l)],f=n[2*(h*e.width+u)],x=n[2*(c*e.width+l)],p=n[2*(c*e.width+u)],y=n[2*(h*e.width+l)+1],d=n[2*(h*e.width+u)+1];return[(m*(1-a)+x*a)*(1-o)+(f*(1-a)+p*a)*o,(y*(1-a)+n[2*(c*e.width+l)+1]*a)*(1-o)+(d*(1-a)+n[2*(c*e.width+u)+1]*a)*o]}:(t,i)=>{const r=Math.round(t),s=Math.round(i);return r<0||r>=e.width||s<0||s>=e.height?[0,0]:[n[2*(s*e.width+r)],n[2*(s*e.width+r)+1]]}}function x(t,e,n,i,r,o,a,h){const u=[],{raster:c,width:m,height:f,resolutionFactor:x}=h;let p=i,y=r,d=(0,l.Kp)(0),[g,M]=n(p,y);g*=e.velocityScale,M*=e.velocityScale;const w=Math.sqrt(g*g+M*M);let v,z;u.push({x:p,y,time:d,speed:w});for(let i=0;i<e.verticesPerLine;i++){let[i,r]=n(p,y);i*=e.velocityScale,r*=e.velocityScale;const h=Math.sqrt(i*i+r*r);if(h<e.minSpeedThreshold)return u;const g=t*i/h,M=t*r/h;p+=g*e.segmentLength,y+=M*e.segmentLength,e.wrapAround&&(p=(0,s.OS)(p,o[0]));const w=t*e.segmentLength/h;if(d=(0,l.Kp)(d+w),Math.acos(g*v+M*z)>e.maxTurnAngle)return u;if(e.collisions){let t=Math.round(p*x);const n=Math.round(y*x);if(e.wrapAround&&(t=(0,s.OS)(t,m)),t<0||t>m-1||n<0||n>f-1)return u;const i=c[n*m+t];if(-1!==i&&i!==a)return u;c[n*m+t]=a}u.push({x:p,y,time:d,speed:h}),v=g,z=M}return u}function p(t,e,n,i,r,s,o,a){const l=Math.round((.2+.6*o.getFloat())*t.verticesPerLine),h=t.verticesPerLine-l,u=x(-1,{...t,verticesPerLine:h},e,n,i,r,s,a),c=x(1,{...t,verticesPerLine:l},e,n,i,r,s,a),m=u.reverse();return m.splice(-1,1),m.concat(c)}function y(t,e,n,i,r){if(t.density<=0)return[];const{positions:s}=r,o=[],l=new a.A,h=1/Math.max(t.lineCollisionWidth,1),u=Math.round(n*h),c=Math.round(i*h),m=new Int32Array(u*c);for(let t=0;t<m.length;t++)m[t]=-1;const f={raster:m,width:u,height:c,resolutionFactor:h},y={},d=t.lineSpacing/Math.sqrt(t.density),g=Math.floor(i/d),M=Math.floor(n/d);for(let t=0;t<g;t++){const e=t*d;for(let n=0;n<M;n++){const i=n*d;y[`${n}-${t}`]={x:i,y:e,positions:[]}}}for(const{x:t,y:e}of s){const n=y[`${Math.floor(t/d)}-${Math.floor(e/d)}`];n&&n.positions.push([t,e])}const w=[];for(const t in y){const e=y[t];if(0===e.positions.length)w.push({x:e.x+d/2,y:e.y+d/2,sort:.66+.33*l.getFloat(),stage:0});else{const[t]=e.positions.splice(0,1);w.push({x:t[0],y:t[1],sort:.33*l.getFloat(),stage:1});for(const[t,n]of e.positions)w.push({x:t,y:n,sort:.33+.33*l.getFloat(),stage:2})}}w.sort((t,e)=>t.sort-e.sort);for(const{x:r,y:s,stage:a}of w){const h=t.onlyForwardTracing?x(1,t,e,r,s,[n,i],o.length,f):p(t,e,r,s,[n,i],o.length,l,f);h.length<2||o.push({stage:a,vertices:h})}return o}},69052(t,e,n){n.d(e,{hr:()=>r,ie:()=>l,uC:()=>a});var i=n(34727);class r{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,n=!1){return s(this.range,this.min,this.max,t,e,n)}clamp(t,e=0){return(0,i.qE)(t-e,this.min,this.max)+e}monotonic(t,e,n){return t<e?e:e+o(this.range,t-e,n)}minimalMonotonic(t,e,n){return s(this.range,t,t+this.range,e,n)}center(t,e,n){return e=this.monotonic(t,e,n),this.normalize((t+e)/2,n)}diff(t,e,n){return this.monotonic(t,e,n)-t}shortestSignedDiff(t,e){t=this.normalize(t);const n=(e=this.normalize(e))-t,i=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(n)<Math.abs(i)?n:i}contains(t,e,n){return e=this.minimalMonotonic(t,e),(n=this.minimalMonotonic(t,n))>t&&n<e}}function s(t,e,n,i,r=0,s=!1){return(i-=r)<e?i+=o(t,e-i):i>n&&(i-=o(t,i-n)),s&&i===n&&(i=e),i+r}function o(t,e,n=0){return Math.ceil((e-n)/t)*t+n}const a=new r(0,2*Math.PI),l=(new r(-Math.PI,Math.PI),new r(0,360))},86738(t,e,n){n.d(e,{A:()=>M});var i=n(31635),r=n(69622),s=n(53966),o=n(91429),a=n(56507),l=n(91075),h=n(16930),u=n(21325),c=n(28735);function m({x:t,y:e,spatialReference:n},i=[0,0]){if(n){if((0,u.K8)(n))return(0,c.tD)(t,e,i);if((0,u.EA)(n))return i[0]=t,i[1]=e,i}return null}const f=[0,0];var x,p=n(43937),y=n(36005);const d=[0,0];function g(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let M=x=class extends l.A{static copy(t,e){e._set("x",t._get("x")),e._set("y",t._get("y")),e._set("z",t._get("z")),e._set("m",t._get("m"));const n=t._get("spatialReference");e._set("spatialReference",r.A.isFrozen(n)?n:n.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,n,i,r){let o;if(Array.isArray(t))o=t,r=e,t=o[0],e=o[1],n=o[2],i=o[3];else if(t&&"object"==typeof t){if(o=t,t=null!=o.x?o.x:o.longitude,e=null!=o.y?o.y:o.latitude,n=o.z,i=o.m,(r=o.spatialReference)&&"esri.geometry.SpatialReference"!==r.declaredClass&&(r=new h.A(r)),null!=o.longitude||null!=o.latitude)if(null==o.longitude)s.A.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==o.latitude)s.A.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!o.declaredClass&&r?.isWebMercator){const n=(0,c.je)(o.longitude,o.latitude,d);t=n[0],e=n[1]}}else g(n)?(r=n,n=null):g(i)&&(r=i,i=null);const a={x:t,y:e};return null==a.x&&null!=a.y?s.A.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&s.A.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=r&&(a.spatialReference=r),null!=n&&(a.z=n),null!=i&&(a.m=i),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){return t=this,m(t,f)?.[1]??null;var t}set latitude(t){const{spatialReference:e,x:n}=this;null!=t&&e&&(e.isWebMercator?this._set("y",(0,c.je)(n,t,d)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){return t=this,m(t,f)?.[0]??null;var t}set longitude(t){const{y:e,spatialReference:n}=this;null!=t&&n&&(n.isWebMercator?this._set("x",(0,c.je)(t,e,d)[0]):n.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,n){e[n]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new x;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return x.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:n,z:i,m:r,spatialReference:s}=this,{z:o,m:a}=t;let{x:l,y:h,spatialReference:u}=t;if(!s.equals(u))if(s.isWebMercator&&u.isWGS84)[l,h]=(0,c.je)(l,h),u=s;else{if(!s.isWGS84||!u.isWebMercator)return!1;[l,h]=(0,c.tD)(l,h),u=s}return e===l&&n===h&&i===o&&r===a&&s.wkid===u.wkid}offset(t,e,n){return this.x+=t,this.y+=e,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const t=(0,u.Vp)(this.spatialReference);if(!t)return this;let e=this.x;const[n,i]=t.valid,r=2*i;let s;return e>i?(s=Math.ceil(Math.abs(e-i)/r),e-=s*r):e<n&&(s=Math.ceil(Math.abs(e-n)/r),e+=s*r),this._set("x",e),this}distance(t){return function(t,e){const n=t.x-e.x,i=t.y-e.y,r=null!=t.z&&null!=e.z?t.z-e.z:0;return Math.sqrt(n*n+i*i+r*r)}(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};(0,i.Cg)([(0,o.MZ)({readOnly:!0})],M.prototype,"cache",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],M.prototype,"hasM",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],M.prototype,"hasZ",null),(0,i.Cg)([(0,o.MZ)({type:Number})],M.prototype,"latitude",null),(0,i.Cg)([(0,o.MZ)({type:Number})],M.prototype,"longitude",null),(0,i.Cg)([(0,o.MZ)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,o.wg)(t=>isNaN(t)?t:(0,a.GB)(t))],M.prototype,"x",void 0),(0,i.Cg)([(0,p.K)("x")],M.prototype,"writeX",null),(0,i.Cg)([(0,y.w)("x")],M.prototype,"readX",null),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],M.prototype,"y",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],M.prototype,"z",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],M.prototype,"m",void 0),M=x=(0,i.Cg)([(0,o.$K)("esri.geometry.Point")],M),M.prototype.toJSON.isDefaultToJSON=!0},91075(t,e,n){n.d(e,{A:()=>l});var i=n(31635),r=n(25482),s=n(91429),o=n(16930),a=n(36005);let l=class extends r.o{constructor(...t){super(...t),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=o.A.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(t,e){if(t instanceof o.A)return t;if(null!=t){const n=new o.A;return n.read(t,e),n}return t}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(t){return this.cache[t]}setCacheValue(t,e){this.cache[t]=e}};(0,i.Cg)([(0,s.MZ)()],l.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],l.prototype,"cache",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],l.prototype,"extent",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasM",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasZ",void 0),(0,i.Cg)([(0,s.MZ)({type:o.A,json:{write:!0},value:o.A.WGS84})],l.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.w)("spatialReference")],l.prototype,"readSpatialReference",null),l=(0,i.Cg)([(0,s.$K)("esri.geometry.Geometry")],l)},94078(t,e,n){n.d(e,{CW:()=>a,F8:()=>l,gH:()=>o,m3:()=>u,qz:()=>r,rL:()=>s,t1:()=>c});const i=[0,0];function r(t,e){return null!=e&&h(t,e.x,e.y,e.z)}function s(t,e){if(!e.points?.length)return!1;for(const n of e.points)if(!a(t,n))return!1;return!0}function o(t,e){const{xmin:n,ymin:i,zmin:r,xmax:s,ymax:o,zmax:a}=e;return t.hasZ&&e.hasZ?h(t,n,i,r)&&h(t,n,o,r)&&h(t,s,o,r)&&h(t,s,i,r)&&h(t,n,i,a)&&h(t,n,o,a)&&h(t,s,o,a)&&h(t,s,i,a):h(t,n,i)&&h(t,n,o)&&h(t,s,o)&&h(t,s,i)}function a(t,e){return h(t,e[0],e[1])}function l(t,e){return h(t,e[0],e[1],e[2])}function h(t,e,n,i){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax&&(null==i||!t.hasZ||i>=t.zmin&&i<=t.zmax)}function u(t,e){return i[1]=e.y,i[0]=e.x,function(t,e){return c(t.rings,e)}(t,i)}function c(t,e){if(!t||t.length<1)return!1;if(function(t){return!Array.isArray(t[0][0])}(t))return m(!1,t,e);let n=!1;for(let i=0,r=t.length;i<r;i++)n=m(n,t[i],e);return n}function m(t,e,n){const[i,r]=n;let s=t,o=0;for(let t=0,n=e.length;t<n;t++){o++,o===n&&(o=0);const[a,l]=e[t],[h,u]=e[o];(l<r&&u>=r||u<r&&l>=r)&&a+(r-l)/(u-l)*(h-a)<i&&(s=!s)}return s}}}]);