@arcgis/core 4.28.0-next.20231002 → 4.28.0-rc.0

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 (257) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02120d192eafd7612475.js +1 -0
  3. package/assets/esri/core/workers/chunks/{4d967e98d229f18d61f5.js → 09e8babe75407c2e64c4.js} +1 -1
  4. package/assets/esri/core/workers/chunks/0beebbb0c6dad0e742d7.js +1 -0
  5. package/assets/esri/core/workers/chunks/0d8ca51043c7784aed96.js +1 -0
  6. package/assets/esri/core/workers/chunks/112e89da628bdea5355c.js +1 -0
  7. package/assets/esri/core/workers/chunks/{5e9edd06e624f385fa4b.js → 121a9e148509f2fe2210.js} +1 -1
  8. package/assets/esri/core/workers/chunks/1856d16d738f44f58084.js +1 -0
  9. package/assets/esri/core/workers/chunks/{0526d623d0b4c12929bd.js → 18ab9cc85a1a7988fdfd.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{7c960a2694c4c3123acf.js → 1a36703ebe934749646e.js} +1 -1
  11. package/assets/esri/core/workers/chunks/24a0cf405195421c0d06.js +1 -0
  12. package/assets/esri/core/workers/chunks/24ff267cf253feac22de.js +1 -0
  13. package/assets/esri/core/workers/chunks/{3c8613596659801fd6ab.js → 29cab345819ec02ed60a.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{169a61c6e128b8a16021.js → 2c560a075d9ef2069ed1.js} +1 -1
  15. package/assets/esri/core/workers/chunks/2f8e71dac98135bbc3e6.js +1 -0
  16. package/assets/esri/core/workers/chunks/341fb51b2165522963b3.js +1 -0
  17. package/assets/esri/core/workers/chunks/{ad8e0f82cb1feafa9e2f.js → 36ab90fb34b9716a9983.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{2688213bbff536da7917.js → 3ea0b872436fce84b927.js} +1 -1
  19. package/assets/esri/core/workers/chunks/40633064c290dc2af9ea.js +1 -0
  20. package/assets/esri/core/workers/chunks/42ec4c80b0c2944cd65c.js +1 -0
  21. package/assets/esri/core/workers/chunks/44b870cb53ba68b17c32.js +1 -0
  22. package/assets/esri/core/workers/chunks/{8a7fa4e8b0d14da7c9eb.js → 4cc680fe4c9c39d2f853.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{6730c9f0890191a95fdb.js → 4d81aa50d90f5701a343.js} +1 -1
  24. package/assets/esri/core/workers/chunks/4e0bf30da4281070e453.js +1 -0
  25. package/assets/esri/core/workers/chunks/4e6bf1efe3b0b474cbb4.js +1 -0
  26. package/assets/esri/core/workers/chunks/52cef7cd3aaaa4f45c94.js +1 -0
  27. package/assets/esri/core/workers/chunks/{4e04242e707c0eb3aa4a.js → 5a3ccc0a19ac8fa9e524.js} +1 -1
  28. package/assets/esri/core/workers/chunks/5e907ec0ee1565b5fbbc.js +1 -0
  29. package/assets/esri/core/workers/chunks/66ba749ab0a631bbfdec.js +1 -0
  30. package/assets/esri/core/workers/chunks/6b14d89d689a21014aec.js +1 -0
  31. package/assets/esri/core/workers/chunks/6b1856303d1562f05100.js +1 -0
  32. package/assets/esri/core/workers/chunks/{576269fd1f9049876aa1.js → 6b7b5544ed1f9a84623f.js} +1 -1
  33. package/assets/esri/core/workers/chunks/710a6268de62003af825.js +1 -0
  34. package/assets/esri/core/workers/chunks/77923afde29ae1ff10ca.js +1 -0
  35. package/assets/esri/core/workers/chunks/784ffd52315a4d55d683.js +1 -0
  36. package/assets/esri/core/workers/chunks/7cf7f2b991a7cbdad2ce.js +1 -0
  37. package/assets/esri/core/workers/chunks/{70dffbf49b0633b1a5f1.js → 8f3680fee85a05839489.js} +1 -1
  38. package/assets/esri/core/workers/chunks/97aecf210938015cc7a3.js +1 -0
  39. package/assets/esri/core/workers/chunks/{c7ebd5d431fb996bfcee.js → 9f8207c82a17508a87a8.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{557305b91f77569ce664.js → a01ffe03b1465c21b9e6.js} +1 -1
  41. package/assets/esri/core/workers/chunks/a298c9031962951e55a9.js +1 -0
  42. package/assets/esri/core/workers/chunks/{329669a9beda89b028dd.js → a5a7bbdd8298016535bc.js} +1 -1
  43. package/assets/esri/core/workers/chunks/a877a4826cd6a46ec99b.js +1 -0
  44. package/assets/esri/core/workers/chunks/ad38e456a7cee940a165.js +1 -0
  45. package/assets/esri/core/workers/chunks/adfbc168be8c49b51e1b.js +1 -0
  46. package/assets/esri/core/workers/chunks/b0526633a93ef69ec47b.js +1 -0
  47. package/assets/esri/core/workers/chunks/b99bc08a01e9250b0a31.js +1 -0
  48. package/assets/esri/core/workers/chunks/{36c4b4c3eca57417da2c.js → c260ad3434bb00ba64a7.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{39922ce232338de076ae.js → c459c8d8630eb4b955b1.js} +1 -1
  50. package/assets/esri/core/workers/chunks/c92e75b79aff7b505b31.js +1 -0
  51. package/assets/esri/core/workers/chunks/ca85e88dad30b5f2956b.js +1 -0
  52. package/assets/esri/core/workers/chunks/{8e56d40691b6bf75d7cc.js → ce409944221a784ddb61.js} +1 -1
  53. package/assets/esri/core/workers/chunks/d13f75f233cf313e5a1d.js +1 -0
  54. package/assets/esri/core/workers/chunks/d60d5f006375f7fcc88c.js +1 -0
  55. package/assets/esri/core/workers/chunks/{77958089748dc31757cf.js → d6ded127949160103f69.js} +1 -1
  56. package/assets/esri/core/workers/chunks/d8c696da42f8f8919b83.js +1 -0
  57. package/assets/esri/core/workers/chunks/{304c81f6297ecba3a324.js → d95eed98316e59f8f35d.js} +1 -1
  58. package/assets/esri/core/workers/chunks/df7267892b6e0493e1d7.js +1 -0
  59. package/assets/esri/core/workers/chunks/{52dca349e1a45555954d.js → e52d5a48e83d8df36f92.js} +1 -1
  60. package/assets/esri/core/workers/chunks/e8688b6cc3b3c1010b43.js +1 -0
  61. package/assets/esri/core/workers/chunks/e8c7cc974420c0b92d0e.js +1 -0
  62. package/assets/esri/core/workers/chunks/{b7ef554b1213307499fc.js → e93442c6d92229f3a4b0.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{ef5772ca1848d6d01b88.js → eda86faa708cfe4c9f9a.js} +1 -1
  64. package/assets/esri/core/workers/chunks/f2718e260f594537f7fd.js +1 -0
  65. package/assets/esri/core/workers/chunks/f6b7036114b1d754fdd9.js +1 -0
  66. package/assets/esri/core/workers/chunks/{c4631241dc777ca77aaa.js → f6c0680c535c5a3c73ee.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{a0ea1d3e22d52b8a59a8.js → fa6103e3d4e857b0035b.js} +9 -9
  68. package/assets/esri/core/workers/chunks/fac3e57784d7f37053af.js +1 -0
  69. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  70. package/assets/esri/t9n/common.json +1 -1
  71. package/assets/esri/t9n/common_ar.json +1 -1
  72. package/assets/esri/t9n/common_bg.json +1 -1
  73. package/assets/esri/t9n/common_bs.json +1 -1
  74. package/assets/esri/t9n/common_ca.json +1 -1
  75. package/assets/esri/t9n/common_cs.json +1 -1
  76. package/assets/esri/t9n/common_da.json +1 -1
  77. package/assets/esri/t9n/common_de.json +1 -1
  78. package/assets/esri/t9n/common_el.json +1 -1
  79. package/assets/esri/t9n/common_en.json +1 -1
  80. package/assets/esri/t9n/common_es.json +1 -1
  81. package/assets/esri/t9n/common_et.json +1 -1
  82. package/assets/esri/t9n/common_fi.json +1 -1
  83. package/assets/esri/t9n/common_fr.json +1 -1
  84. package/assets/esri/t9n/common_he.json +1 -1
  85. package/assets/esri/t9n/common_hr.json +1 -1
  86. package/assets/esri/t9n/common_hu.json +1 -1
  87. package/assets/esri/t9n/common_id.json +1 -1
  88. package/assets/esri/t9n/common_it.json +1 -1
  89. package/assets/esri/t9n/common_ja.json +1 -1
  90. package/assets/esri/t9n/common_ko.json +1 -1
  91. package/assets/esri/t9n/common_lt.json +1 -1
  92. package/assets/esri/t9n/common_lv.json +1 -1
  93. package/assets/esri/t9n/common_nb.json +1 -1
  94. package/assets/esri/t9n/common_nl.json +1 -1
  95. package/assets/esri/t9n/common_pl.json +1 -1
  96. package/assets/esri/t9n/common_pt-BR.json +1 -1
  97. package/assets/esri/t9n/common_pt-PT.json +1 -1
  98. package/assets/esri/t9n/common_ro.json +1 -1
  99. package/assets/esri/t9n/common_ru.json +1 -1
  100. package/assets/esri/t9n/common_sk.json +1 -1
  101. package/assets/esri/t9n/common_sl.json +1 -1
  102. package/assets/esri/t9n/common_sr.json +1 -1
  103. package/assets/esri/t9n/common_sv.json +1 -1
  104. package/assets/esri/t9n/common_th.json +1 -1
  105. package/assets/esri/t9n/common_tr.json +1 -1
  106. package/assets/esri/t9n/common_uk.json +1 -1
  107. package/assets/esri/t9n/common_vi.json +1 -1
  108. package/assets/esri/t9n/common_zh-CN.json +1 -1
  109. package/assets/esri/t9n/common_zh-HK.json +1 -1
  110. package/assets/esri/t9n/common_zh-TW.json +1 -1
  111. package/assets/esri/themes/base/widgets/_DirectionalPad.scss +2 -1
  112. package/assets/esri/themes/base/widgets/_FeatureForm.scss +0 -1
  113. package/assets/esri/themes/dark/main.css +1 -1
  114. package/assets/esri/themes/light/main.css +1 -1
  115. package/assets/esri/themes/light/view.css +1 -1
  116. package/chunks/pe-wasm.js +1 -1
  117. package/config.js +1 -1
  118. package/core/pbf.js +1 -1
  119. package/geometry/support/WKIDUnitConversion.js +1 -1
  120. package/geometry/support/plane.js +1 -1
  121. package/interfaces.d.ts +37 -39
  122. package/kernel.js +1 -1
  123. package/layers/GroupLayer.js +1 -1
  124. package/layers/SceneLayer.js +1 -1
  125. package/layers/graphics/data/QueryEngine.js +1 -1
  126. package/layers/graphics/data/QueryEngineResult.js +1 -1
  127. package/layers/graphics/editingSupport.js +1 -1
  128. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  129. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  130. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  131. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  132. package/layers/mixins/OperationalLayer.js +1 -1
  133. package/layers/save/featureLayerUtils.js +1 -1
  134. package/layers/save/groupLayerUtils.js +5 -0
  135. package/layers/save/utils.js +1 -1
  136. package/layers/support/LayerLoadContext.js +5 -0
  137. package/layers/support/featureLayerUtils.js +1 -1
  138. package/layers/support/labelFormatUtils.js +1 -1
  139. package/layers/support/layersCreator.js +1 -1
  140. package/layers/support/versionUtils.js +1 -1
  141. package/networks/UtilityNetwork.js +1 -1
  142. package/package.json +1 -1
  143. package/portal/schemas/definitions.js +1 -1
  144. package/portal/support/jsonContext.js +1 -1
  145. package/portal/support/layersLoader.js +1 -1
  146. package/portal/support/loadUtils.js +5 -0
  147. package/portal/support/portalItemUtils.js +1 -1
  148. package/portal/support/portalLayers.js +1 -1
  149. package/renderers/support/RasterSymbolizer.js +1 -1
  150. package/rest/print.js +1 -1
  151. package/support/basemapUtils.js +1 -1
  152. package/support/revision.js +1 -1
  153. package/symbols/PolygonSymbol3D.js +1 -1
  154. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  155. package/views/2d/engine/imagery/colorizer/shadedrelief.js +1 -1
  156. package/views/2d/engine/imagery/colorizer/stretch.js +1 -1
  157. package/views/2d/input/handlers/KeyPan.js +1 -1
  158. package/views/2d/input/handlers/KeyRotate.js +1 -1
  159. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  160. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  161. package/views/2d/layers/features/support/FeatureSetReaderPBFIndirect.js +1 -1
  162. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  163. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  164. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  165. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  167. package/views/3d/layers/i3s/featureEditing.js +1 -1
  168. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  169. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  170. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  171. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  172. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  173. package/views/DOMContainer.js +1 -1
  174. package/views/draw/DrawGraphicTool.js +1 -1
  175. package/views/draw/DrawOperation.js +1 -1
  176. package/views/draw/support/Box.js +1 -1
  177. package/views/draw/support/Reshape.js +1 -1
  178. package/views/input/VisibilityChange.js +5 -0
  179. package/views/interactive/sketch/constraints.js +1 -1
  180. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  181. package/views/interactive/snapping/FeatureSnappingSourceInfo.js +5 -0
  182. package/views/interactive/snapping/SnappingContext.js +1 -1
  183. package/views/interactive/snapping/SnappingDragPipelineStep.js +1 -1
  184. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  185. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  186. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorkerHandle.js +1 -1
  187. package/views/interactive/snapping/snappingUtils.js +1 -1
  188. package/webdoc/support/saveUtils.js +1 -1
  189. package/webdoc/webdocSaveUtils.js +1 -1
  190. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  191. package/widgets/DirectionalPad/constants.js +1 -1
  192. package/widgets/DirectionalPad.js +1 -1
  193. package/widgets/Editor/Upload.js +1 -1
  194. package/widgets/Editor/workflowUtils.js +1 -1
  195. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  196. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  197. package/widgets/FeatureForm/FieldInput.js +1 -1
  198. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  199. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  200. package/widgets/FeatureForm.js +1 -1
  201. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  202. package/widgets/FeatureTable/FieldColumn.js +1 -1
  203. package/widgets/FeatureTable/Grid/Column.js +1 -1
  204. package/widgets/FeatureTable.js +1 -1
  205. package/widgets/ScaleRangeSlider.js +1 -1
  206. package/widgets/support/DatePicker.js +1 -1
  207. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  208. package/widgets/support/Selector2D/SelectionOperation2D.js +1 -1
  209. package/widgets/support/Selector2D.js +1 -1
  210. package/widgets/support/TimePicker.js +1 -1
  211. package/widgets/support/dateUtils.js +1 -1
  212. package/assets/esri/core/workers/chunks/027f8b57565c65fbccda.js +0 -1
  213. package/assets/esri/core/workers/chunks/048265fb5953350e3e33.js +0 -1
  214. package/assets/esri/core/workers/chunks/0b9cf14f8aafb76c578b.js +0 -1
  215. package/assets/esri/core/workers/chunks/0ebf58c927bfc4c9d4fe.js +0 -1
  216. package/assets/esri/core/workers/chunks/10fd951bd296b2beeeba.js +0 -1
  217. package/assets/esri/core/workers/chunks/1224475f3eefdfd59c76.js +0 -1
  218. package/assets/esri/core/workers/chunks/162b0220e24e9ba72655.js +0 -1
  219. package/assets/esri/core/workers/chunks/1e611cad53b745ee146f.js +0 -1
  220. package/assets/esri/core/workers/chunks/24b1bf1a5d80f43a6c9a.js +0 -1
  221. package/assets/esri/core/workers/chunks/29ed31fd4f9d5cf53686.js +0 -1
  222. package/assets/esri/core/workers/chunks/2b6d1c8e4ed759767827.js +0 -1
  223. package/assets/esri/core/workers/chunks/34b44b0fab88f838885c.js +0 -1
  224. package/assets/esri/core/workers/chunks/364f55294a1d7bf163d7.js +0 -1
  225. package/assets/esri/core/workers/chunks/3714ab435dd5ccf9e694.js +0 -1
  226. package/assets/esri/core/workers/chunks/3788009a5ece453011f3.js +0 -1
  227. package/assets/esri/core/workers/chunks/3aafe8160b3bfbaa6935.js +0 -1
  228. package/assets/esri/core/workers/chunks/41c002e4c42c581cda8d.js +0 -1
  229. package/assets/esri/core/workers/chunks/47be4c75dd6372b96fe4.js +0 -1
  230. package/assets/esri/core/workers/chunks/4e8d1e6051f6654a5e83.js +0 -1
  231. package/assets/esri/core/workers/chunks/53746e9976758630159b.js +0 -1
  232. package/assets/esri/core/workers/chunks/5449fdd69e12e5cbd12a.js +0 -1
  233. package/assets/esri/core/workers/chunks/57ce4ece0147afb0d43c.js +0 -1
  234. package/assets/esri/core/workers/chunks/5e83d21400a5dec05c81.js +0 -1
  235. package/assets/esri/core/workers/chunks/6047f4487dcd37cca98e.js +0 -1
  236. package/assets/esri/core/workers/chunks/6967d2b3721678b38774.js +0 -1
  237. package/assets/esri/core/workers/chunks/6ac5ca7de651e3d672a1.js +0 -1
  238. package/assets/esri/core/workers/chunks/6b7ee9164149428edb9e.js +0 -1
  239. package/assets/esri/core/workers/chunks/6c495077cc79e1898927.js +0 -1
  240. package/assets/esri/core/workers/chunks/6d43648d5326e01b4474.js +0 -1
  241. package/assets/esri/core/workers/chunks/74fb07de0f990d45af89.js +0 -1
  242. package/assets/esri/core/workers/chunks/8e9a52062ce059153a89.js +0 -1
  243. package/assets/esri/core/workers/chunks/919a57d372419785cd5e.js +0 -1
  244. package/assets/esri/core/workers/chunks/939f0a1a7d605e389e45.js +0 -1
  245. package/assets/esri/core/workers/chunks/9932f23ba6589df14a3d.js +0 -1
  246. package/assets/esri/core/workers/chunks/a25a38c9f338e0beffef.js +0 -1
  247. package/assets/esri/core/workers/chunks/a97581e584336b46ede7.js +0 -1
  248. package/assets/esri/core/workers/chunks/b1cb932cfadc4dc3f1e4.js +0 -1
  249. package/assets/esri/core/workers/chunks/be3fb6113b0b27b94537.js +0 -1
  250. package/assets/esri/core/workers/chunks/c37119f5692e19aa1ce2.js +0 -1
  251. package/assets/esri/core/workers/chunks/c685f16435d9861bbbd0.js +0 -1
  252. package/assets/esri/core/workers/chunks/d5dfc03673aec8aa57e2.js +0 -1
  253. package/assets/esri/core/workers/chunks/e6416a2684866d677b3e.js +0 -1
  254. package/assets/esri/core/workers/chunks/eb01f4cdb9b918cc61e7.js +0 -1
  255. package/assets/esri/core/workers/chunks/eb4aed4fdb44495a4fe6.js +0 -1
  256. package/assets/esri/core/workers/chunks/ec8258c9dc1491e97fc8.js +0 -1
  257. package/assets/esri/core/workers/chunks/eeac53da496de4cd4182.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6610,5732,2596],{97575:(t,e,r)=>{r.d(e,{J:()=>l});var o,n,i,s=r(5732),a={exports:{}};o=a,n=function(){var t=function(){function t(t){this.message="JPEG error: "+t}return t.prototype=new Error,t.prototype.name="JpegError",t.constructor=t,t}();return function(){if(!self||!self.Uint8ClampedArray)return null;var e=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,o=799,n=3406,i=2276,s=1567,a=3784,l=5793,u=2896;function c(){this.decodeTransform=null,this.colorTransform=-1}function h(t,e){for(var r,o,n=0,i=[],s=16;s>0&&!t[s-1];)s--;i.push({children:[],index:0});var a,l=i[0];for(r=0;r<s;r++){for(o=0;o<t[r];o++){for((l=i.pop()).children[l.index]=e[n];l.index>0;)l=i.pop();for(l.index++,i.push(l);i.length<=r;)i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a;n++}r+1<s&&(i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a)}return i[0].children}function f(t,e,r){return 64*((t.blocksPerLine+1)*e+r)}function d(r,o,n,i,s,a,l,u,c){var h=n.mcusPerLine,d=n.progressive,p=o,m=0,y=0;function w(){if(y>0)return y--,m>>y&1;if(255===(m=r[o++])){var e=r[o++];if(e)throw new t("unexpected marker "+(m<<8|e).toString(16))}return y=7,m>>>7}function b(e){for(var r=e;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new t("invalid huffman sequence")}}function C(t){for(var e=0;t>0;)e=e<<1|w(),t--;return e}function v(t){if(1===t)return 1===w()?1:-1;var e=C(t);return e>=1<<t-1?e:e+(-1<<t)+1}var x,k=0,A=0;function S(t,e,r,o,n){var i=r%h;e(t,f(t,(r/h|0)*t.v+o,i*t.h+n))}function T(t,e,r){e(t,f(t,r/t.blocksPerLine|0,r%t.blocksPerLine))}var I,M,P,E,R,L,U=i.length;L=d?0===a?0===u?function(t,e){var r=b(t.huffmanTableDC),o=0===r?0:v(r)<<c;t.blockData[e]=t.pred+=o}:function(t,e){t.blockData[e]|=w()<<c}:0===u?function(t,r){if(k>0)k--;else for(var o=a,n=l;o<=n;){var i=b(t.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var h=e[o+=u];t.blockData[r+h]=v(s)*(1<<c),o++}else{if(u<15){k=C(u)+(1<<u)-1;break}o+=16}}}:function(r,o){for(var n,i,s=a,u=l,h=0;s<=u;){var f=e[s];switch(A){case 0:if(h=(i=b(r.huffmanTableAC))>>4,0==(n=15&i))h<15?(k=C(h)+(1<<h),A=4):(h=16,A=1);else{if(1!==n)throw new t("invalid ACn encoding");x=v(n),A=h?2:3}continue;case 1:case 2:r.blockData[o+f]?r.blockData[o+f]+=w()<<c:0==--h&&(A=2===A?3:0);break;case 3:r.blockData[o+f]?r.blockData[o+f]+=w()<<c:(r.blockData[o+f]=x<<c,A=0);break;case 4:r.blockData[o+f]&&(r.blockData[o+f]+=w()<<c)}s++}4===A&&0==--k&&(A=0)}:function(t,r){var o=b(t.huffmanTableDC),n=0===o?0:v(o);t.blockData[r]=t.pred+=n;for(var i=1;i<64;){var s=b(t.huffmanTableAC),a=15&s,l=s>>4;if(0!==a){var u=e[i+=l];t.blockData[r+u]=v(a),i++}else{if(l<15)break;i+=16}}};var O,D,G,B,N=0;for(D=1===U?i[0].blocksPerLine*i[0].blocksPerColumn:h*n.mcusPerColumn;N<D;){var _=s?Math.min(D-N,s):D;for(M=0;M<U;M++)i[M].pred=0;if(k=0,1===U)for(I=i[0],R=0;R<_;R++)T(I,L,N),N++;else for(R=0;R<_;R++){for(M=0;M<U;M++)for(G=(I=i[M]).h,B=I.v,P=0;P<B;P++)for(E=0;E<G;E++)S(I,L,N,P,E);N++}y=0,(O=g(r,o))&&O.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+O.invalid),o=O.offset);var F=O&&O.marker;if(!F||F<=65280)throw new t("marker was not found");if(!(F>=65488&&F<=65495))break;o+=2}return(O=g(r,o))&&O.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+O.invalid),o=O.offset),o-p}function p(e,c,h){var f,d,p,m,g,y,w,b,C,v,x,k,A,S,T,I,M,P=e.quantizationTable,E=e.blockData;if(!P)throw new t("missing required Quantization Table.");for(var R=0;R<64;R+=8)C=E[c+R],v=E[c+R+1],x=E[c+R+2],k=E[c+R+3],A=E[c+R+4],S=E[c+R+5],T=E[c+R+6],I=E[c+R+7],C*=P[R],0!=(v|x|k|A|S|T|I)?(v*=P[R+1],x*=P[R+2],k*=P[R+3],A*=P[R+4],S*=P[R+5],T*=P[R+6],I*=P[R+7],d=(f=(f=l*C+128>>8)+(d=l*A+128>>8)+1>>1)-d,M=(p=x)*a+(m=T)*s+128>>8,p=p*s-m*a+128>>8,w=(g=(g=u*(v-I)+128>>8)+(w=S<<4)+1>>1)-w,y=(b=(b=u*(v+I)+128>>8)+(y=k<<4)+1>>1)-y,m=(f=f+(m=M)+1>>1)-m,p=(d=d+p+1>>1)-p,M=g*i+b*n+2048>>12,g=g*n-b*i+2048>>12,b=M,M=y*o+w*r+2048>>12,y=y*r-w*o+2048>>12,w=M,h[R]=f+b,h[R+7]=f-b,h[R+1]=d+w,h[R+6]=d-w,h[R+2]=p+y,h[R+5]=p-y,h[R+3]=m+g,h[R+4]=m-g):(M=l*C+512>>10,h[R]=M,h[R+1]=M,h[R+2]=M,h[R+3]=M,h[R+4]=M,h[R+5]=M,h[R+6]=M,h[R+7]=M);for(var L=0;L<8;++L)C=h[L],0!=((v=h[L+8])|(x=h[L+16])|(k=h[L+24])|(A=h[L+32])|(S=h[L+40])|(T=h[L+48])|(I=h[L+56]))?(d=(f=4112+((f=l*C+2048>>12)+(d=l*A+2048>>12)+1>>1))-d,M=(p=x)*a+(m=T)*s+2048>>12,p=p*s-m*a+2048>>12,m=M,w=(g=(g=u*(v-I)+2048>>12)+(w=S)+1>>1)-w,y=(b=(b=u*(v+I)+2048>>12)+(y=k)+1>>1)-y,M=g*i+b*n+2048>>12,g=g*n-b*i+2048>>12,b=M,M=y*o+w*r+2048>>12,y=y*r-w*o+2048>>12,C=(C=(f=f+m+1>>1)+b)<16?0:C>=4080?255:C>>4,v=(v=(d=d+p+1>>1)+(w=M))<16?0:v>=4080?255:v>>4,x=(x=(p=d-p)+y)<16?0:x>=4080?255:x>>4,k=(k=(m=f-m)+g)<16?0:k>=4080?255:k>>4,A=(A=m-g)<16?0:A>=4080?255:A>>4,S=(S=p-y)<16?0:S>=4080?255:S>>4,T=(T=d-w)<16?0:T>=4080?255:T>>4,I=(I=f-b)<16?0:I>=4080?255:I>>4,E[c+L]=C,E[c+L+8]=v,E[c+L+16]=x,E[c+L+24]=k,E[c+L+32]=A,E[c+L+40]=S,E[c+L+48]=T,E[c+L+56]=I):(M=(M=l*C+8192>>14)<-2040?0:M>=2024?255:M+2056>>4,E[c+L]=M,E[c+L+8]=M,E[c+L+16]=M,E[c+L+24]=M,E[c+L+32]=M,E[c+L+40]=M,E[c+L+48]=M,E[c+L+56]=M)}function m(t,e){for(var r=e.blocksPerLine,o=e.blocksPerColumn,n=new Int16Array(64),i=0;i<o;i++)for(var s=0;s<r;s++)p(e,f(e,i,s),n);return e.blockData}function g(t,e,r){function o(e){return t[e]<<8|t[e+1]}var n=t.length-1,i=r<e?r:e;if(e>=n)return null;var s=o(e);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:e};for(var a=o(i);!(a>=65472&&a<=65534);){if(++i>=n)return null;a=o(i)}return{invalid:s.toString(16),marker:a,offset:i}}return c.prototype={parse:function(r){function o(){var t=r[l]<<8|r[l+1];return l+=2,t}function n(){var t=o(),e=l+t-2,n=g(r,e,l);n&&n.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+n.invalid),e=n.offset);var i=r.subarray(l,e);return l+=i.length,i}function i(t){for(var e=Math.ceil(t.samplesPerLine/8/t.maxH),r=Math.ceil(t.scanLines/8/t.maxV),o=0;o<t.components.length;o++){N=t.components[o];var n=Math.ceil(Math.ceil(t.samplesPerLine/8)*N.h/t.maxH),i=Math.ceil(Math.ceil(t.scanLines/8)*N.v/t.maxV),s=e*N.h,a=r*N.v*64*(s+1);N.blockData=new Int16Array(a),N.blocksPerLine=n,N.blocksPerColumn=i}t.mcusPerLine=e,t.mcusPerColumn=r}var s,a,l=0,u=null,c=null,f=[],p=[],y=[],w=o();if(65496!==w)throw new t("SOI not found");for(w=o();65497!==w;){var b,C,v;switch(w){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var x=n();65504===w&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(u={version:{major:x[5],minor:x[6]},densityUnits:x[7],xDensity:x[8]<<8|x[9],yDensity:x[10]<<8|x[11],thumbWidth:x[12],thumbHeight:x[13],thumbData:x.subarray(14,14+3*x[12]*x[13])}),65518===w&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&(c={version:x[5]<<8|x[6],flags0:x[7]<<8|x[8],flags1:x[9]<<8|x[10],transformCode:x[11]});break;case 65499:for(var k=o()+l-2;l<k;){var A=r[l++],S=new Uint16Array(64);if(A>>4==0)for(C=0;C<64;C++)S[e[C]]=r[l++];else{if(A>>4!=1)throw new t("DQT - invalid table spec");for(C=0;C<64;C++)S[e[C]]=o()}f[15&A]=S}break;case 65472:case 65473:case 65474:if(s)throw new t("Only single frame JPEGs supported");o(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=o(),s.samplesPerLine=o(),s.components=[],s.componentIds={};var T,I=r[l++],M=0,P=0;for(b=0;b<I;b++){T=r[l];var E=r[l+1]>>4,R=15&r[l+1];M<E&&(M=E),P<R&&(P=R);var L=r[l+2];v=s.components.push({h:E,v:R,quantizationId:L,quantizationTable:null}),s.componentIds[T]=v-1,l+=3}s.maxH=M,s.maxV=P,i(s);break;case 65476:var U=o();for(b=2;b<U;){var O=r[l++],D=new Uint8Array(16),G=0;for(C=0;C<16;C++,l++)G+=D[C]=r[l];var B=new Uint8Array(G);for(C=0;C<G;C++,l++)B[C]=r[l];b+=17+G,(O>>4==0?y:p)[15&O]=h(D,B)}break;case 65501:o(),a=o();break;case 65498:o();var N,_=r[l++],F=[];for(b=0;b<_;b++){var V=s.componentIds[r[l++]];N=s.components[V];var z=r[l++];N.huffmanTableDC=y[z>>4],N.huffmanTableAC=p[15&z],F.push(N)}var j=r[l++],Z=r[l++],W=r[l++],J=d(r,l,s,F,a,j,Z,W>>4,15&W);l+=J;break;case 65535:255!==r[l]&&l--;break;default:if(255===r[l-3]&&r[l-2]>=192&&r[l-2]<=254){l-=3;break}throw new t("unknown marker "+w.toString(16))}w=o()}for(this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=u,this.eof=l,this.adobe=c,this.components=[],b=0;b<s.components.length;b++){var H=f[(N=s.components[b]).quantizationId];H&&(N.quantizationTable=H),this.components.push({output:m(0,N),scaleX:N.h/s.maxH,scaleY:N.v/s.maxV,blocksPerLine:N.blocksPerLine,blocksPerColumn:N.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(t,e){var r,o,n,i,s,a,l,u,c,h,f,d=this.width/t,p=this.height/e,m=0,g=this.components.length,y=t*e*g,w=new Uint8ClampedArray(y),b=new Uint32Array(t),C=4294967288;for(l=0;l<g;l++){for(o=(r=this.components[l]).scaleX*d,n=r.scaleY*p,m=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<t;s++)u=0|s*o,b[s]=(u&C)<<3|7&u;for(a=0;a<e;a++)for(h=i*((u=0|a*n)&C)|(7&u)<<3,s=0;s<t;s++)w[m]=f[h+b[s]],m+=g}var v=this.decodeTransform;if(v)for(l=0;l<y;)for(u=0,c=0;u<g;u++,l++,c+=2)w[l]=(w[l]*v[c]>>8)+v[c+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(t){for(var e,r,o,n=0,i=t.length;n<i;n+=3)e=t[n],r=t[n+1],o=t[n+2],t[n]=e-179.456+1.402*o,t[n+1]=e+135.459-.344*r-.714*o,t[n+2]=e-226.816+1.772*r;return t},_convertYcckToRgb:function(t){for(var e,r,o,n,i=0,s=0,a=t.length;s<a;s+=4)e=t[s],r=t[s+1],o=t[s+2],n=t[s+3],t[i++]=r*(-660635669420364e-19*r+.000437130475926232*o-54080610064599e-18*e+.00048449797120281*n-.154362151871126)-122.67195406894+o*(-.000957964378445773*o+.000817076911346625*e-.00477271405408747*n+1.53380253221734)+e*(.000961250184130688*e-.00266257332283933*n+.48357088451265)+n*(-.000336197177618394*n+.484791561490776),t[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*o+.000659397001245577*e+.000426105652938837*n-.176491792462875)+o*(-.000778269941513683*o+.00130872261408275*e+.000770482631801132*n-.151051492775562)+e*(.00126935368114843*e-.00265090189010898*n+.25802910206845)+n*(-.000318913117588328*n-.213742400323665),t[i++]=r*(-.000570115196973677*r-263409051004589e-19*o+.0020741088115012*e-.00288260236853442*n+.814272968359295)-20.810012546947+o*(-153496057440975e-19*o-.000132689043961446*e+.000560833691242812*n-.195152027534049)+e*(.00174418132927582*e-.00255243321439347*n+.116935020465145)+n*(-.000343531996510555*n+.24165260232407);return t},_convertYcckToCmyk:function(t){for(var e,r,o,n=0,i=t.length;n<i;n+=4)e=t[n],r=t[n+1],o=t[n+2],t[n]=434.456-e-1.402*o,t[n+1]=119.541-e+.344*r+.714*o,t[n+2]=481.816-e-1.772*r;return t},_convertCmykToRgb:function(t){for(var e,r,o,n,i=0,s=1/255,a=0,l=t.length;a<l;a+=4)e=t[a]*s,r=t[a+1]*s,o=t[a+2]*s,n=t[a+3]*s,t[i++]=255+e*(-4.387332384609988*e+54.48615194189176*r+18.82290502165302*o+212.25662451639585*n-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*o-17.873870861415444*n-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*n+17.5119270841813)-n*(21.86122147463605*n+189.48180835922747),t[i++]=255+e*(8.841041422036149*e+60.118027045597366*r+6.871425592049007*o+31.159100130055922*n-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*o+131.35250912493976*n-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*n-24.86741582555878)-n*(20.737325471181034*n+187.80453709719578),t[i++]=255+e*(.8842522430003296*e+8.078677503112928*r+30.89978309703729*o-.23883238689178934*n-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*o+50.606957656360734*n-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*n-193.58209356861505)-n*(22.33816807309886*n+180.12613974708367);return t},getData:function(e,r,o){if(this.numComponents>4)throw new t("Unsupported color mode");var n=this._getLinearizedBlockData(e,r);if(1===this.numComponents&&o){for(var i=n.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=n[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(n);if(4===this.numComponents){if(this._isColorConversionNeeded())return o?this._convertYcckToRgb(n):this._convertYcckToCmyk(n);if(o)return this._convertCmykToRgb(n)}return n}},c}()},void 0!==(i=n())&&(o.exports=i);const l=(0,s.g)(a.exports)},80899:(t,e,r)=>{r.d(e,{Z:()=>l});var o,n,i,s=r(5732),a={exports:{}};n=a,void 0!==(o=function(){function t(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return t.prototype={ensureBuffer:function(t){var e=this.buffer,r=e?e.byteLength:0;if(t<r)return e;for(var o=512;o<t;)o<<=1;for(var n=new Uint8Array(o),i=0;i<r;++i)n[i]=e[i];return this.buffer=n},getByte:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(t){var e=this.pos;if(t){this.ensureBuffer(e+t);for(var r=e+t;!this.eof&&this.bufferLength<r;)this.readBlock();var o=this.bufferLength;r>o&&(r=o)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(e,r)},lookChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(t,e,r){for(var o=t+e;this.bufferLength<=o&&!this.eof;)this.readBlock();return new Stream(this.buffer,t,e,r)},skip:function(t){t||(t=1),this.pos+=t},reset:function(){this.pos=0}},t}(),i=function(){if(!self||!self.Uint32Array)return null;var t=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),r=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),n=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],i=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function s(t){throw new Error(t)}function a(t){var e=0,r=t[e++],n=t[e++];-1!=r&&-1!=n||s("Invalid header in flate stream"),8!=(15&r)&&s("Unknown compression method in flate stream"),((r<<8)+n)%31!=0&&s("Bad FCHECK in flate stream"),32&n&&s("FDICT bit set in flate stream"),this.bytes=t,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,o.call(this)}return a.prototype=Object.create(o.prototype),a.prototype.getBits=function(t){for(var e,r=this.codeSize,o=this.codeBuf,n=this.bytes,i=this.bytesPos;r<t;)void 0===(e=n[i++])&&s("Bad encoding in flate stream"),o|=e<<r,r+=8;return e=o&(1<<t)-1,this.codeBuf=o>>t,this.codeSize=r-=t,this.bytesPos=i,e},a.prototype.getCode=function(t){for(var e=t[0],r=t[1],o=this.codeSize,n=this.codeBuf,i=this.bytes,a=this.bytesPos;o<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),n|=l<<o,o+=8}var u=e[n&(1<<r)-1],c=u>>16,h=65535&u;return(0==o||o<c||0==c)&&s("Bad encoding in flate stream"),this.codeBuf=n>>c,this.codeSize=o-c,this.bytesPos=a,h},a.prototype.generateHuffmanTable=function(t){for(var e=t.length,r=0,o=0;o<e;++o)t[o]>r&&(r=t[o]);for(var n=1<<r,i=new Uint32Array(n),s=1,a=0,l=2;s<=r;++s,a<<=1,l<<=1)for(var u=0;u<e;++u)if(t[u]==s){var c=0,h=a;for(o=0;o<s;++o)c=c<<1|1&h,h>>=1;for(o=c;o<n;o+=l)i[o]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function o(t,e,r,o,n){for(var i=t.getBits(r)+o;i-- >0;)e[p++]=n}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=n,u=i;else if(2==a){for(var c=this.getBits(5)+257,h=this.getBits(5)+1,f=this.getBits(4)+4,d=Array(t.length),p=0;p<f;)d[t[p++]]=this.getBits(3);for(var m=this.generateHuffmanTable(d),g=0,y=(p=0,c+h),w=new Array(y);p<y;){var b=this.getCode(m);16==b?o(this,w,2,3,g):17==b?o(this,w,3,3,g=0):18==b?o(this,w,7,11,g=0):w[p++]=g=b}l=this.generateHuffmanTable(w.slice(0,c)),u=this.generateHuffmanTable(w.slice(c,y))}else s("Unknown block type in flate stream");for(var C=(L=this.buffer)?L.length:0,v=this.bufferLength;;){var x=this.getCode(l);if(x<256)v+1>=C&&(C=(L=this.ensureBuffer(v+1)).length),L[v++]=x;else{if(256==x)return void(this.bufferLength=v);var k=(x=e[x-=257])>>16;k>0&&(k=this.getBits(k)),g=(65535&x)+k,x=this.getCode(u),(k=(x=r[x])>>16)>0&&(k=this.getBits(k));var A=(65535&x)+k;v+g>=C&&(C=(L=this.ensureBuffer(v+g)).length);for(var S=0;S<g;++S,++v)L[v]=L[v-A]}}}else{var T,I=this.bytes,M=this.bytesPos;void 0===(T=I[M++])&&s("Bad block header in flate stream");var P=T;void 0===(T=I[M++])&&s("Bad block header in flate stream"),P|=T<<8,void 0===(T=I[M++])&&s("Bad block header in flate stream");var E=T;void 0===(T=I[M++])&&s("Bad block header in flate stream"),(E|=T<<8)!=(65535&~P)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var R=this.bufferLength,L=this.ensureBuffer(R+P),U=R+P;this.bufferLength=U;for(var O=R;O<U;++O){if(void 0===(T=I[M++])){this.eof=!0;break}L[O]=T}this.bytesPos=M}},a}())&&(n.exports=i);const l=(0,s.g)(a.exports)},5732:(t,e,r)=>{r.d(e,{c:()=>o,g:()=>n});var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},3892:(t,e,r)=>{function o(t){return"h"in t&&"s"in t&&"v"in t}function n(t){return"l"in t&&"a"in t&&"b"in t}function i(t){return"l"in t&&"c"in t&&"h"in t}r.d(e,{Y3:()=>m,_Y:()=>p,sJ:()=>g,xr:()=>d}),r(22303),r(98766),r(88669);const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],a=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(t,e){const r=[];let o,n;if(t[0].length!==e.length)throw new Error("dimensions do not match");const i=t.length,s=t[0].length;let a=0;for(o=0;o<i;o++){for(a=0,n=0;n<s;n++)a+=t[o][n]*e[n];r.push(a)}return r}function u(t){const e=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),r=l(s,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function c(t){const e=l(a,[t.x/100,t.y/100,t.z/100]).map((t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))}));return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function h(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function f(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function d(t){return function(t){return"r"in t&&"g"in t&&"b"in t}(t)?t:i(t)?function(t){return c(f(function(t){const e=t.l,r=t.c,o=t.h;return{l:e,a:r*Math.cos(o),b:r*Math.sin(o)}}(t)))}(t):n(t)?function(t){return c(f(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?c(t):o(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,o=t.v/100*255,n=o*r,i=n*(1-Math.abs(e%2-1));let s;switch(Math.floor(e)){case 0:s={r:n,g:i,b:0};break;case 1:s={r:i,g:n,b:0};break;case 2:s={r:0,g:n,b:i};break;case 3:s={r:0,g:i,b:n};break;case 4:s={r:i,g:0,b:n};break;case 5:case 6:s={r:n,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+o-n),s.g=Math.round(s.g+o-n),s.b=Math.round(s.b+o-n),s}(t):t}function p(t){return o(t)?t:function(t){const e=t.r,r=t.g,o=t.b,n=Math.max(e,r,o),i=n-Math.min(e,r,o);let s=n,a=0===i?0:n===e?(r-o)/i%6:n===r?(o-e)/i+2:(e-r)/i+4,l=0===i?0:i/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(d(t))}function m(t){return n(t)?t:function(t){return h(u(t))}(d(t))}function g(t){return i(t)?t:function(t){return function(t){const e=t.l,r=t.a,o=t.b,n=Math.sqrt(r*r+o*o);let i=Math.atan2(o,r);return i=i>0?i:i+2*Math.PI,{l:e,c:n,h:i}}(h(u(t)))}(d(t))}},5847:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),n=r(20102),i=r(96674),s=r(22974),a=r(92604),l=r(5600),u=r(90578),c=r(52011);class h{constructor(t=null,e=null,r=null){this.minValue=t,this.maxValue=e,this.noDataValue=r}}var f,d=r(81578);let p=f=class extends i.wq{static createEmptyBand(t,e){return new(f.getPixelArrayConstructor(t))(e)}static getPixelArrayConstructor(t){let e;switch(t){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":e=Float32Array;break;case"f64":e=Float64Array}return e}constructor(t){super(t),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(t){if(!t)return"f32";let e=t.toLowerCase();return["u1","u2","u4"].includes(e)?e="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(e)||(e="f32"),e}getPlaneCount(){return this.pixels?.length}addData(t){if(!t.pixels||t.pixels.length!==this.width*this.height)throw new n.Z("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||(this.pixels=[]),this.statistics||(this.statistics=[]),this.pixels.push(t.pixels),this.statistics.push(t.statistics??new h)}getAsRGBA(){const t=new ArrayBuffer(this.width*this.height*4);switch(this.pixelType){case"s8":case"s16":case"u16":case"s32":case"u32":case"f32":case"f64":this._fillFromNon8Bit(t);break;default:this._fillFrom8Bit(t)}return new Uint8ClampedArray(t)}getAsRGBAFloat(){const t=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(t),t}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map((t=>this._calculateBandStatistics(t,this.mask)));const t=this.mask;let e=0;if(null!=t)for(let r=0;r<t.length;r++)t[r]&&e++;else e=this.width*this.height;this.validPixelCount=e}clamp(t){if(!t||"f64"===t||"f32"===t||!this.pixels)return;const[e,r]=(0,d.r)(t),o=this.pixels,n=this.width*this.height,i=o.length;let s,a,l;const u=[];for(let c=0;c<i;c++){l=f.createEmptyBand(t,n),s=o[c];for(let t=0;t<n;t++)a=s[t],l[t]=a>r?r:a<e?e:a;u.push(l)}this.pixels=u,this.pixelType=t}extractBands(t){const{pixels:e,statistics:r}=this;if(null==t||0===t.length||!e||0===e.length)return this;const o=e.length,n=t.some((t=>t>=e.length)),i=o===t.length&&!t.some(((t,e)=>t!==e));if(n||i)return this;const s=this.bandMasks?.length===o?t.map((t=>this.bandMasks[t])):void 0;let{mask:a,validPixelCount:l}=this;const{width:u,height:c}=this;if(s){if(1===s.length)a=s[0];else{const t=u*c;a=new Uint8Array(t).fill(255);for(let e=0;e<s.length;e++){const r=s[e];for(let e=0;e<t;e++)r[e]||(a[e]=0)}}l=a.filter((t=>!!t)).length}return new f({pixelType:this.pixelType,width:u,height:c,mask:a,bandMasks:s,validPixelCount:l,maskIsAlpha:this.maskIsAlpha,pixels:t.map((t=>e[t])),statistics:r&&t.map((t=>r[t]))})}clone(){const t=new f({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let e;null!=this.mask&&(this.mask instanceof Uint8Array?t.mask=new Uint8Array(this.mask):t.mask=this.mask.slice(0)),this.bandMasks&&(t.bandMasks=this.bandMasks.map((t=>new Uint8Array(t))));const r=f.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){t.pixels=[];const o=!!this.pixels[0].slice;for(e=0;e<this.pixels.length;e++)t.pixels[e]=o?this.pixels[e].slice(0,this.pixels[e].length):new r(this.pixels[e])}if(this.statistics)for(t.statistics=[],e=0;e<this.statistics.length;e++)t.statistics[e]=(0,s.d9)(this.statistics[e]);return t.premultiplyAlpha=this.premultiplyAlpha,t}_fillFrom8Bit(t){const{mask:e,maskIsAlpha:r,premultiplyAlpha:o,pixels:n}=this;if(!t||!n?.length)return void a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i,s,l,u;i=s=l=n[0],n.length>=3?(s=n[1],l=n[2]):2===n.length&&(s=n[1]);const c=new Uint32Array(t),h=this.width*this.height;if(i.length===h)if(null!=e&&e.length===h)if(r)for(u=0;u<h;u++){const t=e[u];if(t){const e=t/255;c[u]=o?t<<24|l[u]*e<<16|s[u]*e<<8|i[u]*e:t<<24|l[u]<<16|s[u]<<8|i[u]}}else for(u=0;u<h;u++)e[u]&&(c[u]=255<<24|l[u]<<16|s[u]<<8|i[u]);else for(u=0;u<h;u++)c[u]=255<<24|l[u]<<16|s[u]<<8|i[u];else a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(t){const{pixels:e,mask:r,statistics:o}=this;if(!t||!e?.length)return void a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const n=this.pixelType;let i=1,s=0,l=1;if(o&&o.length>0){for(const t of o)if(null!=t.minValue&&(s=Math.min(s,t.minValue)),null!=t.maxValue&&null!=t.minValue){const e=t.maxValue-t.minValue;l=Math.max(l,e)}i=255/l}else{let t=255;"s8"===n?(s=-128,t=127):"u16"===n?t=65535:"s16"===n?(s=-32768,t=32767):"u32"===n?t=4294967295:"s32"===n?(s=-2147483648,t=2147483647):"f32"===n?(s=-34e38,t=34e38):"f64"===n&&(s=-Number.MAX_VALUE,t=Number.MAX_VALUE),i=255/(t-s)}const u=new Uint32Array(t),c=this.width*this.height;let h,f,d,p,m;if(h=f=d=e[0],h.length!==c)return a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(e.length>=2)if(f=e[1],e.length>=3&&(d=e[2]),null!=r&&r.length===c)for(p=0;p<c;p++)r[p]&&(u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i);else for(p=0;p<c;p++)u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i;else if(null!=r&&r.length===c)for(p=0;p<c;p++)m=(h[p]-s)*i,r[p]&&(u[p]=255<<24|m<<16|m<<8|m);else for(p=0;p<c;p++)m=(h[p]-s)*i,u[p]=255<<24|m<<16|m<<8|m}_fillFrom32Bit(t){const{pixels:e,mask:r}=this;if(!t||!e?.length)return a.Z.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let o,n,i,s;o=n=i=e[0],e.length>=3?(n=e[1],i=e[2]):2===e.length&&(n=e[1]);const l=this.width*this.height;if(o.length!==l)return a.Z.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let u=0;if(null!=r&&r.length===l)for(s=0;s<l;s++)t[u++]=o[s],t[u++]=n[s],t[u++]=i[s],t[u++]=1&r[s];else for(s=0;s<l;s++)t[u++]=o[s],t[u++]=n[s],t[u++]=i[s],t[u++]=1}_calculateBandStatistics(t,e){let r=1/0,o=-1/0;const n=t.length;let i,s=0;if(null!=e)for(i=0;i<n;i++)e[i]&&(s=t[i],r=s<r?s:r,o=s>o?s:o);else for(i=0;i<n;i++)s=t[i],r=s<r?s:r,o=s>o?s:o;return new h(r,o)}};(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"width",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"height",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixelType",void 0),(0,o._)([(0,u.p)("pixelType")],p.prototype,"castPixelType",null),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"validPixelCount",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"mask",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"maskIsAlpha",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixels",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"premultiplyAlpha",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"statistics",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"depthCount",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"noDataValues",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"bandMasks",void 0),p=f=(0,o._)([(0,c.j)("esri.layers.support.PixelBlock")],p);const m=p},25972:(t,e,r)=>{r.d(e,{Z:()=>k});var o,n=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(6570),c=r(82971);function h(t){return t=Number(t),isNaN(t)?void 0:t}r(67676),r(80442);let f=o=class extends i.wq{constructor(){super(...arguments),this.name=null,this.minWavelength=void 0,this.maxWavelength=void 0,this.radianceBias=void 0,this.radianceGain=void 0,this.reflectanceBias=void 0,this.reflectanceGain=void 0,this.solarIrradiance=void 0}clone(){return new o({name:this.name,minWavelength:this.minWavelength,maxWavelength:this.maxWavelength,radianceBias:this.radianceBias,radianceGain:this.radianceGain,reflectanceBias:this.reflectanceBias,reflectanceGain:this.reflectanceGain,solarIrradiance:this.solarIrradiance})}};(0,n._)([(0,a.Cb)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.Cb)({json:{name:"WavelengthMin",read:{reader:h},write:!0}})],f.prototype,"minWavelength",void 0),(0,n._)([(0,a.Cb)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,n._)([(0,a.Cb)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,n._)([(0,a.Cb)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,n._)([(0,a.Cb)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,n._)([(0,a.Cb)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,n._)([(0,a.Cb)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=o=(0,n._)([(0,l.j)("esri.layers.support.RasterBandInfo")],f);const d=f;var p,m=r(71715),g=r(30556);function y(t){return t=Number(t),isNaN(t)?void 0:t}let w=p=class extends i.wq{constructor(){super(...arguments),this.acquisitionDate=void 0,this.cloudCover=void 0,this.productName=void 0,this.sensorName=null,this.sensorAzimuth=void 0,this.sensorElevation=void 0,this.sunAzimuth=void 0,this.sunElevation=void 0}readAcquisitionDate(t){return new Date(t)}writeAcquisitionDate(t,e){e.AcquisitionDate=t.getTime()}clone(){return new p({acquisitionDate:this.acquisitionDate,cloudCover:this.cloudCover,productName:this.productName,sensorName:this.sensorName,sensorAzimuth:this.sensorAzimuth,sensorElevation:this.sensorElevation,sunAzimuth:this.sunAzimuth,sunElevation:this.sunElevation})}};(0,n._)([(0,a.Cb)({json:{name:"AcquisitionDate",write:!0}})],w.prototype,"acquisitionDate",void 0),(0,n._)([(0,m.r)("acquisitionDate")],w.prototype,"readAcquisitionDate",null),(0,n._)([(0,g.c)("acquisitionDate")],w.prototype,"writeAcquisitionDate",null),(0,n._)([(0,a.Cb)({json:{name:"CloudCover",read:{reader:y},write:!0}})],w.prototype,"cloudCover",void 0),(0,n._)([(0,a.Cb)({json:{name:"ProductName",write:!0}})],w.prototype,"productName",void 0),(0,n._)([(0,a.Cb)({json:{name:"SensorName",write:!0}})],w.prototype,"sensorName",void 0),(0,n._)([(0,a.Cb)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],w.prototype,"sensorAzimuth",void 0),(0,n._)([(0,a.Cb)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],w.prototype,"sensorElevation",void 0),(0,n._)([(0,a.Cb)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],w.prototype,"sunAzimuth",void 0),(0,n._)([(0,a.Cb)({json:{name:"SunElevation",read:{reader:y},write:!0}})],w.prototype,"sunElevation",void 0),w=p=(0,n._)([(0,l.j)("esri.layers.support.RasterSensorInfo")],w);const b=w;var C,v=r(36679);let x=C=class extends i.wq{constructor(t){super(t),this.attributeTable=null,this.bandCount=null,this.colormap=null,this.extent=null,this.format=void 0,this.height=null,this.width=null,this.histograms=null,this.keyProperties={},this.multidimensionalInfo=null,this.noDataValue=null,this.pixelSize=null,this.pixelType=null,this.isPseudoSpatialReference=!1,this.spatialReference=null,this.statistics=null,this.storageInfo=null,this.transform=null}get bandInfos(){const t=this.keyProperties.BandProperties,{bandCount:e}=this;if(!t?.length||t.length<e){const t=[];for(let r=1;r<=e;r++)t.push(new d({name:"band_"+r}));return t}const r=t.map((t=>d.fromJSON(t)));for(let t=0;t<r.length;t++)r[t].name=r[t].name||"band_"+(t+1);return r}get dataType(){const t=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===t?"standard-time":t}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(t){t&&this._set("nativeExtent",t)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;const t=this.nativeExtent;return{x:t.width/this.width,y:t.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}get sensorInfo(){if(this.keyProperties?.SensorName)return b.fromJSON(this.keyProperties)}clone(){return new C({attributeTable:(0,s.d9)(this.attributeTable),bandCount:this.bandCount,colormap:(0,s.d9)(this.colormap),extent:(0,s.d9)(this.extent),nativePixelSize:(0,s.d9)(this.nativePixelSize),format:this.format,height:this.height,width:this.width,histograms:(0,s.d9)(this.histograms),keyProperties:(0,s.d9)(this.keyProperties),multidimensionalInfo:(0,s.d9)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,s.d9)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,s.d9)(this.spatialReference),statistics:(0,s.d9)(this.statistics),storageInfo:(0,s.d9)(this.storageInfo),transform:(0,s.d9)(this.transform)})}};(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"attributeTable",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"bandCount",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],x.prototype,"bandInfos",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"colormap",void 0),(0,n._)([(0,a.Cb)({type:String,readOnly:!0})],x.prototype,"dataType",null),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],x.prototype,"extent",void 0),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],x.prototype,"nativeExtent",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"nativePixelSize",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"format",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"height",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"width",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"hasMultidimensionalTranspose",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"histograms",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"keyProperties",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"multidimensionalInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"noDataValue",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"pixelSize",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"pixelType",void 0),(0,n._)([(0,a.Cb)()],x.prototype,"isPseudoSpatialReference",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],x.prototype,"sensorInfo",null),(0,n._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"statistics",void 0),(0,n._)([(0,a.Cb)({type:v.Z,json:{write:!0}})],x.prototype,"storageInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"transform",void 0),x=C=(0,n._)([(0,l.j)("esri.layers.support.RasterInfo")],x);const k=x},36679:(t,e,r)=>{r.d(e,{Z:()=>h});var o,n=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(94139);let c=o=class extends i.wq{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}clone(){return new o({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.d9)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.d9)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.d9)(this.tileInfo),transposeInfo:(0,s.d9)(this.transposeInfo),blockBoundary:(0,s.d9)(this.blockBoundary)})}};(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],c.prototype,"origin",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,n._)([(0,a.Cb)()],c.prototype,"transposeInfo",void 0),(0,n._)([(0,a.Cb)()],c.prototype,"blockBoundary",void 0),c=o=(0,n._)([(0,l.j)("esri.layers.support.RasterStorageInfo")],c);const h=c},20095:(t,e,r)=>{function o(t,e){let r=0,o="",n=0,i=0;const s=t.length;for(;r<s;)i=t[r++],n=i>>4,n<8?n=1:15===n?(n=4,i=(7&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++]):14===n?(n=3,i=(15&i)<<12|(63&t[r++])<<6|63&t[r++]):(n=2,i=(31&i)<<6|63&t[r++]),(0!==i||e)&&(o+=String.fromCharCode(i));return o}r.d(e,{f:()=>o})},72955:(t,e,r)=>{r.d(e,{Jx:()=>h,zD:()=>a});var o=r(99880);const n=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let i=null,s=null;function a(){return i||(i=r.e(6233).then(r.bind(r,26233)).then((t=>t.l)).then((({default:t})=>t({locateFile:t=>(0,o.V)(`esri/layers/support/rasterFormats/${t}`)}))).then((t=>{(function(t){const{_malloc:e,_free:r,_lerc_getBlobInfo:o,_lerc_getDataRanges:i,_lerc_decode_4D:s,asm:a}=t;let c;const h=Object.values(a).find((e=>e&&"buffer"in e&&e.buffer===t.HEAPU8.buffer)),f=t=>{const r=t.map((t=>function(t){return 16+(t>>3<<3)}(t))),o=r.reduce(((t,e)=>t+e)),n=e(o);c=new Uint8Array(h.buffer);let i=r[0];r[0]=n;for(let t=1;t<r.length;t++){const e=r[t];r[t]=r[t-1]+i,i=e}return r};l.getBlobInfo=t=>{const e=new Uint8Array(48),n=new Uint8Array(24),[s,a,l]=f([t.length,e.length,n.length]);c.set(t,s),c.set(e,a),c.set(n,l);let d=o(s,t.length,a,l,12,3);if(d)throw r(s),new Error(`lerc-getBlobInfo: error code is ${d}`);c=new Uint8Array(h.buffer),u(c,a,e),u(c,l,n);const p=new Uint32Array(e.buffer),m=new Float64Array(n.buffer),[g,y,,w,b,C,v,x,k,A,S]=p,T={version:g,depthCount:A,width:w,height:b,validPixelCount:v,bandCount:C,blobSize:x,maskCount:k,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:S};if(S)return T;if(1===A&&1===C)return r(s),T.statistics.push({minValue:m[0],maxValue:m[1]}),T;const I=A*C*8,M=new Uint8Array(I),P=new Uint8Array(I);let E=s,R=0,L=0,U=!1;if(c.byteLength<s+2*I?(r(s),U=!0,[E,R,L]=f([t.length,I,I]),c.set(t,E)):[R,L]=f([I,I]),c.set(M,R),c.set(P,L),d=i(E,t.length,A,C,R,L),d)throw r(E),U||r(R),new Error(`lerc-getDataRanges: error code is ${d}`);c=new Uint8Array(h.buffer),u(c,R,M),u(c,L,P);const O=new Float64Array(M.buffer),D=new Float64Array(P.buffer),G=T.statistics;for(let t=0;t<C;t++)if(A>1){const e=O.slice(t*A,(t+1)*A),r=D.slice(t*A,(t+1)*A),o=Math.min.apply(null,e),n=Math.max.apply(null,r);G.push({minValue:o,maxValue:n,depthStats:{minValues:e,maxValues:r}})}else G.push({minValue:O[t],maxValue:D[t]});return r(E),U||r(R),T},l.decode=(t,e)=>{const{maskCount:o,depthCount:i,bandCount:a,width:l,height:d,dataType:p,bandCountWithNoData:m}=e,g=n[p],y=l*d,w=new Uint8Array(y*a),b=y*i*a*g.size,C=new Uint8Array(b),v=new Uint8Array(a),x=new Uint8Array(8*a),[k,A,S,T,I]=f([t.length,w.length,C.length,v.length,x.length]);c.set(t,k),c.set(w,A),c.set(C,S),c.set(v,T),c.set(x,I);const M=s(k,t.length,o,A,i,l,d,a,p,S,T,I);if(M)throw r(k),new Error(`lerc-decode: error code is ${M}`);c=new Uint8Array(h.buffer),u(c,S,C),u(c,A,w);let P=null;if(m){u(c,T,v),u(c,I,x),P=[];const t=new Float64Array(x.buffer);for(let e=0;e<v.length;e++)P.push(v[e]?t[e]:null)}return r(k),{data:C,maskData:w,noDataValues:P}}})(t),s=!0})),i)}const l={getBlobInfo:null,decode:null};function u(t,e,r){r.set(t.slice(e,e+r.length))}function c(t,e,r,o,n){if(r<2)return t;const i=new o(e*r);if(n)for(let o=0,n=0;o<e;o++)for(let s=0,a=o;s<r;s++,a+=e)i[a]=t[n++];else for(let o=0,n=0;o<e;o++)for(let s=0,a=o;s<r;s++,a+=e)i[n++]=t[a];return i}function h(t,e={}){const r=e.inputOffset??0,o=t instanceof Uint8Array?t.subarray(r):new Uint8Array(t,r),i=l.getBlobInfo(o),{data:s,maskData:a,noDataValues:u}=l.decode(o,i),{width:h,height:f,bandCount:d,depthCount:p,dataType:m,maskCount:g,statistics:y}=i,w=n[m],b=new w.ctor(s.buffer),C=[],v=[],x=h*f,k=x*p;for(let t=0;t<d;t++){const r=b.subarray(t*k,(t+1)*k);if(e.returnInterleaved)C.push(r);else{const t=c(r,x,p,w.ctor,!0);C.push(t)}v.push(a.subarray(t*k,(t+1)*k))}const A=0===g?null:1===g?v[0]:new Uint8Array(x);if(g>1){A.set(v[0]);for(let t=1;t<v.length;t++){const e=v[t];for(let t=0;t<x;t++)A[t]=A[t]&e[t]}}const{noDataValue:S}=e,T=null!=S&&w.range[0]<=S&&w.range[1]>=S;if(g>0&&T)for(let t=0;t<d;t++){const e=C[t],r=v[t]||A;for(let t=0;t<x;t++)0===r[t]&&(e[t]=S)}const I=g===d&&d>1?v:null,{pixelType:M}=w;return{width:h,height:f,bandCount:d,pixelType:M,depthCount:p,statistics:y,pixels:C,mask:A,bandMasks:I,noDataValues:u}}},88781:(t,e,r)=>{function o(){const t=[];for(let e=0;e<=257;e++)t[e]=[e];return t}function n(t,e){for(let r=0;r<e.length;r++)t.push(e[r])}r.d(e,{J:()=>s});const i=new Set;function s(t,e,r,s=!0){const a=function(t,e,r,o=!0){if(e%4!=0||r%4!=0){const n=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(n),s=new Uint8Array(t,e,r);if(o)for(let t=0;t<i.length;t+=4)i[t]=s[t+3],i[t+1]=s[t+2],i[t+2]=s[t+1],i[t+3]=s[t];else i.set(s);return new Uint32Array(i.buffer)}if(o){const o=new Uint8Array(t,e,r),n=new Uint8Array(o.length);for(let t=0;t<n.length;t+=4)n[t]=o[t+3],n[t+1]=o[t+2],n[t+2]=o[t+1],n[t+3]=o[t];return new Uint32Array(n.buffer)}return new Uint32Array(t,e,r/4)}(t,e,r,s);let l=9,u=o(),c=32,h=u.length,f=[],d=1,p=a[0],m=0;const g=a.length,y=8*(4*g-r),w=[];for(;null!=p;){if(c>=l)c-=l,m=p>>>32-l,p<<=l;else{m=p>>>32-c,p=a[d++];const t=l-c;c=32-t,m=(m<<t)+(p>>>c),p<<=t}if(257===m)break;if(256===m){l=9,u=o(),h=u.length,f=[];continue}const t=u[m];if(null==t){if(m>u.length)throw new Error("data integrity issue: code does not exist on code page");f.push(f[0]),u[h++]=f.slice(),n(w,f)}else n(w,t),f.push(t[0]),f.length>1&&(u[h++]=f.slice()),f=t.slice();if(i.has(h)&&l++,0===c&&(p=a[d++],c=32),d>g||d===g&&c<=y)break}return new Uint8Array(w)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191)},75993:(t,e,r)=>{r.d(e,{J:()=>L,y:()=>R});var o=r(20102),n=r(70586),i=r(5847),s=r(95330),a=r(80899);class l{constructor(t){this._canvas=null,this._ctx=null,t&&(this._canvas=t.canvas,this._ctx=t.ctx||t.canvas&&t.canvas.getContext("2d"))}decode(t,e,r){if(!t||t.byteLength<10)throw new o.Z("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:n=0,height:i=0,format:a}=e;const{applyJpegMask:u}=e;if(u&&(!n||!i))throw new o.Z("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise(((o,c)=>{let h=null;"jpg"===a&&u&&(h=l._getMask(t,{width:n,height:i}));const f=new Blob([new Uint8Array(t)],{type:"image/"+a=="jpg"?"jpeg":a}),d=URL.createObjectURL(f),p=new Image;let m;p.src=d,p.onload=()=>{if(URL.revokeObjectURL(d),(0,s.Hc)(r))return void c((0,s.zE)());n=p.width,i=p.height,this._canvas&&this._ctx?(this._canvas.width===n&&this._canvas.height===i||(this._canvas.width=n,this._canvas.height=i),this._ctx.clearRect(0,0,n,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=n,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(p,0,0);const t=this._ctx.getImageData(0,0,n,i);let a;if(m=t.data,e.renderOnCanvas){if(h)for(a=0;a<h.length;a++)h[a]?m[4*a+3]=255:m[4*a+3]=0;return this._ctx.putImageData(t,0,0),void o(null)}const l=n*i,u=new Uint8Array(l),f=new Uint8Array(l),g=new Uint8Array(l);if(h)for(a=0;a<l;a++)u[a]=m[4*a],f[a]=m[4*a+1],g[a]=m[4*a+2];else for(h=new Uint8Array(l),a=0;a<l;a++)u[a]=m[4*a],f[a]=m[4*a+1],g[a]=m[4*a+2],h[a]=m[4*a+3];o({width:n,height:i,pixels:[u,f,g],mask:h,pixelType:"u8"})},p.onerror=()=>{URL.revokeObjectURL(d),c("cannot load image")}}))}static _getMask(t,e){let r=null;try{const o=new Uint8Array(t),n=Math.ceil(o.length/2);let i=0;const s=o.length-2;for(i=n;i<s&&(255!==o[i]||217!==o[i+1]);i++);if(i+=2,i<o.length-1){const t=new a.Z(o.subarray(i)).getBytes();r=new Uint8Array(e.width*e.height);let n=0;for(let e=0;e<t.length;e++)for(let o=7;o>=0;o--)r[n++]=t[e]>>o&1}}catch(t){}return r}}var u=r(97575);class c{static decode(t,e=!1){const r=new Uint8Array(t),o=new u.J;o.parse(r);const{width:n,height:i,numComponents:s,eof:l}=o,c=o.getData(n,i,!0),h=n*i;let f,d=null,p=0,m=0,g=0;if(!e&&l<r.length-1)try{const t=new a.Z(r.subarray(l)).getBytes();d=new Uint8Array(h);let e=0;for(p=0;p<t.length;p++)for(g=7;g>=0;g--)d[e++]=t[p]>>g&1}catch{}if(1===s&&c.length===n*i){const t=new Uint8Array(c.buffer);f=[t,t,t]}else{for(f=[],p=0;p<3;p++)f.push(new Uint8Array(h));for(g=0,m=0;m<h;m++)for(p=0;p<3;p++)f[p][m]=c[g++]}return{width:n,height:i,pixels:f,mask:d}}}var h=r(72955),f=r(88781),d=r(81578);const p=(t,e)=>{const r=e.width*e.height,o=e.pixelType;return Math.floor(t.byteLength/(r*m(o)))},m=t=>{let e=1;switch(t){case Uint8Array:case Int8Array:e=1;break;case Uint16Array:case Int16Array:e=2;break;case Uint32Array:case Int32Array:case Float32Array:e=4;break;case Float64Array:e=8}return e};class g{static decode(t,e){const r=e.pixelType,o=[],n=e.width*e.height,i=p(t,e),{bandIds:s,format:a}=e,l=s?.length||p(t,e),u=t.byteLength-t.byteLength%(n*m(r)),c=new r(t,0,n*i);let h,f,d,g,y=null;if("bip"===a)for(h=0;h<l;h++){for(d=new r(n),g=s?s[h]:h,f=0;f<n;f++)d[f]=c[f*i+g];o.push(d)}else if("bsq"===a)for(h=0;h<l;h++)g=s?s[h]:h,o.push(c.subarray(g*n,(g+1)*n));return u<t.byteLength-1&&(y=((t,e)=>{if(8*t.byteLength<e)return null;const r=new Uint8Array(t,0,Math.ceil(e/8)),o=new Uint8Array(e);let n=0,i=0,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)o[n++]=i>>a&1;for(a=7;n<e-1;)i=r[r.length-1],o[n++]=i>>a&1,a--;return o})(t.slice(u),n)),{pixels:o,mask:y}}}var y=r(94793),w=r(48279),b=function(t){var e,r,o;function n(t){var e,r,o,n,i,s,a,l,u,c,h,f,d;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(e=this.readUInt32(),l=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join(""),l){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},n=this.readUInt16(),o=this.readUInt16()||100,i.delay=1e3*n/o,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,e-=4),t=(null!=i?i.data:void 0)||this.imgData,h=0;0<=e?h<e:h>e;0<=e?++h:--h)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),(u=255-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":s=(c=this.read(e)).indexOf(0),a=String.fromCharCode.apply(String,c.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,c.slice(s+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(d=this.colorType)||6===d,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return n.load=function(t,e,r){var o;return"function"==typeof e&&(r=e),(o=new XMLHttpRequest).open("GET",t,!0),o.responseType="arraybuffer",o.onload=function(){var t;return t=new n(new Uint8Array(o.response||o.mozResponseArrayBuffer)),"function"==typeof(null!=e?e.getContext:void 0)&&t.render(e),"function"==typeof r?r(t):void 0},o.send(null)},n.prototype.read=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)r.push(this.data[this.pos++]);return r},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(t){var e,r,o,n,i,s,l,u,c,h,f,d,p,m,g,y,w,b,C,v,x,k,A;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=(t=new a.Z(t)).getBytes(),y=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(y*this.height),s=t.length,g=0,m=0,r=0;m<s;){switch(t[m++]){case 0:for(n=C=0;C<y;n=C+=1)p[r++]=t[m++];break;case 1:for(n=v=0;v<y;n=v+=1)e=t[m++],i=n<d?0:p[r-d],p[r++]=(e+i)%256;break;case 2:for(n=x=0;x<y;n=x+=1)e=t[m++],o=(n-n%d)/d,w=g&&p[(g-1)*y+o*d+n%d],p[r++]=(w+e)%256;break;case 3:for(n=k=0;k<y;n=k+=1)e=t[m++],o=(n-n%d)/d,i=n<d?0:p[r-d],w=g&&p[(g-1)*y+o*d+n%d],p[r++]=(e+Math.floor((i+w)/2))%256;break;case 4:for(n=A=0;A<y;n=A+=1)e=t[m++],o=(n-n%d)/d,i=n<d?0:p[r-d],0===g?w=b=0:(w=p[(g-1)*y+o*d+n%d],b=o&&p[(g-1)*y+(o-1)*d+n%d]),l=i+w-b,u=Math.abs(l-i),h=Math.abs(l-w),f=Math.abs(l-b),c=u<=h&&u<=f?i:h<=f?w:b,p[r++]=(e+c)%256;break;default:throw new Error("Invalid filter algorithm: "+t[m-1])}g++}return p},n.prototype.decodePalette=function(){var t,e,r,o,n,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],n=new Uint8Array((i.length||0)+r.length),o=0,r.length,t=0,e=s=0,a=r.length;s<a;e=s+=3)n[o++]=r[e],n[o++]=r[e+1],n[o++]=r[e+2],n[o++]=null!=(l=i[t++])?l:255;return n},n.prototype.copyToImageData=function(t,e){var r,o,n,i,s,a,l,u,c,h,f;if(o=this.colors,c=null,r=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),o=4,r=!0),u=(n=t.data||t).length,s=c||e,i=a=0,1===o)for(;i<u;)l=c?4*e[i/4]:a,h=s[l++],n[i++]=h,n[i++]=h,n[i++]=h,n[i++]=r?s[l++]:this.transparency.grayscale&&this.transparency.grayscale===h?0:255,a=l;else for(;i<u;)l=c?4*e[i/4]:a,n[i++]=s[l++],n[i++]=s[l++],n[i++]=s[l++],n[i++]=r?s[l++]:this.transparency.rgb&&this.transparency.rgb[1]===s[l-3]&&this.transparency.rgb[3]===s[l-2]&&this.transparency.rgb[5]===s[l-1]?0:255,a=l},n.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t},r=t.document&&t.document.createElement("canvas"),o=r&&r.getContext("2d"),e=function(t){var e;return o.width=t.width,o.height=t.height,o.clearRect(0,0,t.width,t.height),o.putImageData(t,0,0),(e=new Image).src=r.toDataURL(),e},n.prototype.decodeFrames=function(t){var r,o,n,i,s,a,l,u;if(this.animation){for(u=[],o=s=0,a=(l=this.animation.frames).length;s<a;o=++s)r=l[o],n=t.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(n,i),r.imageData=n,u.push(r.image=e(n));return u}},n.prototype.renderFrame=function(t,e){var r,o,n;return r=(o=this.animation.frames)[e],n=o[e-1],0===e&&t.clearRect(0,0,this.width,this.height),1===(null!=n?n.disposeOp:void 0)?t.clearRect(n.xOffset,n.yOffset,n.width,n.height):2===(null!=n?n.disposeOp:void 0)&&t.putImageData(n.imageData,n.xOffset,n.yOffset),0===r.blendOp&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},n.prototype.animate=function(t){var e,r,o,n,i,s,a=this;return r=0,s=this.animation,n=s.numFrames,o=s.frames,i=s.numPlays,(e=function(){var s,l;if(s=r++%n,l=o[s],a.renderFrame(t,s),n>1&&r/n<i)return a.animation._timeout=setTimeout(e,l.delay)})()},n.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},n.prototype.render=function(t){var e,r;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(r=e.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),e.putImageData(r,0,0))},n}(self);const C=new Set(["jpg","png","bmp","gif"]);async function v(t,e){if(!w.f)throw new o.Z("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,h.zD)();const{offset:r}=e,{width:n,height:s,pixelType:a,statistics:l,depthCount:u,noDataValues:c,bandMasks:f,pixels:d,mask:p}=(0,h.Jx)(t,{inputOffset:r,returnInterleaved:e.returnInterleaved});return new i.Z({width:n,height:s,pixelType:a.toLowerCase(),pixels:d,mask:p,statistics:l,bandMasks:f,depthCount:u,noDataValues:c})}async function x(t,e){const r=await(0,y.Jx)(t,{...e,noDataValue:null});(0,n.O3)(r);const o=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,bandMasks:r.bandMasks,statistics:null});return o.updateStatistics(),o}function k(t,e){const r=e.pixelType||"u8",o=i.Z.getPixelArrayConstructor(r),n="u8"===r?t:new o(t.buffer),s=[],a=e.planes||1;if(1===a)s.push(n);else for(let r=0;r<a;r++){const i=(e.width||1)*(e.height||t.length),l=new o(i);for(let t=0;t<i;t++)l[t]=n[t*a+r];s.push(l)}const l=new i.Z({width:e.width||1,height:e.height||t.length,pixels:s,pixelType:r,statistics:null});return l.updateStatistics(),l}function A(t,e){return k(new a.Z(new Uint8Array(t)).getBytes(),e)}function S(t,e){return k((0,f.J)(t,e.offset,e.eof,!e.isInputBigEndian),e)}function T(t,e,r){const{pixelTypeCtor:o}=function(t){let e=null,r=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,e=Uint8Array;break;case"u16":r=r||65535,e=Uint16Array;break;case"u32":r=r||2**32-1,e=Uint32Array;break;case"s8":r=r||-128,e=Int8Array;break;case"s16":r=r||-32768,e=Int16Array;break;case"s32":r=r||0-2**31,e=Int32Array;break;default:e=Float32Array}return{pixelTypeCtor:e,noDataValue:r}}(e.pixelType),n=(0,g.decode)(t,{width:e.width,height:e.height,pixelType:o,format:r}),s=new i.Z({width:e.width,height:e.height,pixels:n.pixels,pixelType:e.pixelType,mask:n.mask,statistics:null});return s.updateStatistics(),s}function I(t,e){const r=c.decode(t,e.hasNoZlibMask??void 0),o=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:"U8",mask:r.mask,statistics:null});return o.updateStatistics(),o}function M(t,e){const r=new Uint8Array(t),o=new b(r),{width:n,height:s}=e,a=n*s,l=o.decode();let u,c=0,h=0;const f=new Uint8Array(a);for(c=0;c<a;c++)f[c]=l[4*c+3];const d=new i.Z({width:n,height:s,pixels:[],pixelType:"U8",mask:f,statistics:[]});for(c=0;c<3;c++){for(u=new Uint8Array(a),h=0;h<a;h++)u[h]=l[4*h+c];d.addData({pixels:u})}return d.updateStatistics(),d}async function P(t,e,r,o){const n=new l,s={applyJpegMask:!1,format:e,...r},a=await n.decode(t,s,o),u=new i.Z(a);return u.updateStatistics(),u}function E(t){if(null==t)throw new o.Z("rasterCodec:decode","parameter encodeddata is required.");const e=new Uint8Array(t,0,10);let r="";return 255===e[0]&&216===e[1]?r="jpg":137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]?r="png":67===e[0]&&110===e[1]&&116===e[2]&&90===e[3]&&73===e[4]&&109===e[5]&&97===e[6]&&103===e[7]&&101===e[8]&&32===e[9]?r="lerc":76===e[0]&&101===e[1]&&114===e[2]&&99===e[3]&&50===e[4]&&32===e[5]?r="lerc2":73===e[0]&&73===e[1]&&42===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&42===e[3]||73===e[0]&&73===e[1]&&43===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&43===e[3]?r="tiff":71===e[0]&&73===e[1]&&70===e[2]?r="gif":66===e[0]&&77===e[1]?r="bmp":String.fromCharCode.apply(null,e).toLowerCase().includes("error")&&(r="error"),r}function R(t){let e=E(t);return"lerc2"===e?e="lerc":"error"===e&&(e=""),e}async function L(t,e={},r){if(null==t)throw new o.Z("rasterCodec:decode","missing encodeddata parameter.");let n=e.format?.toLowerCase();if(!("bsq"!==n&&"bip"!==n||null!=e.width&&null!=e.height))throw new o.Z("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===n&&e.customOptions)return async function(t,e){const r=await(0,y.Uw)(t,e.customOptions),o=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return o.updateStatistics(),o}(t,e);if((!n||"bsq"!==n&&"bip"!==n&&"deflate"!==n&&"lzw"!==n)&&(n=E(t)),e.useCanvas&&C.has(n))return P(t,n,e,r);const s=function(t){let e=null;switch(t){case"lerc":case"lerc2":e=v;break;case"jpg":e=I;break;case"png":e=M;break;case"bsq":case"bip":e=(e,r)=>T(e,r,t);break;case"tiff":e=x;break;case"deflate":e=A;break;case"lzw":e=S;break;case"error":e=()=>{throw new o.Z("rasterCodec:decode","input data contains error")};break;default:e=()=>{throw new o.Z("rasterCodec:decode","unsupported raster format")}}return e}(n);e.isPoint&&(null!=(e={...e}).width&&e.width++,null!=e.height&&e.height++);const a=await s(t,e);return a?("jpg"!==n&&null!=e.noDataValue&&1===a.depthCount&&(0,d.A)(a,e.noDataValue,{customFloatTolerance:e.tolerance}),e.isPoint&&function(t,e=1){if(!t)return;const{pixels:r,width:o,height:n,mask:s}=t;if(!r||0===r.length)return;const a=r.length,l=o-1,u=n-1,c=[];let h,f,d,p,m,g,y=null;const w=i.Z.getPixelArrayConstructor(t.pixelType);if(0===e){for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)g[f*l+d]=m[p+d];c.push(g)}if(null!=s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)y[f*l+d]=s[p+d]}else{for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)g[f*l+d]=(m[p+d]+m[p+d+1]+m[p+o+d]+m[p+o+d+1])/4;c.push(g)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)y[f*l+d]=Math.min.apply(null,[s[p+d],s[p+d+1],s[p+o+d],s[p+o+d+1]])}t.width=l,t.height=u,t.mask=y,t.pixels=c}(a),a):a}},94793:(t,e,r)=>{r.d(e,{Dq:()=>E,FI:()=>R,I7:()=>O,If:()=>L,Jx:()=>z,Uw:()=>V,cK:()=>N,ee:()=>U,vr:()=>_});var o=r(20095),n=r(97575),i=r(72955),s=r(88781),a=r(81578),l=r(9832),u=r(48279),c=r(80899);const h=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],f=4294967296,d=new Set([1,5,6,7,8,34712,34887]);function p(t,e){let r="unknown";return 3===t?r=64===e?"f64":"f32":1===t?1===e?r="u1":2===e?r="u2":4===e?r="u4":e<=8?r="u8":e<=16?r="u16":e<=32&&(r="u32"):2===t&&(e<=8?r="s8":e<=16?r="s16":e<=32&&(r="s32")),r}function m(t){let e=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f64":e=Float64Array;break;default:e=Float32Array}return e}function g(t,e){return{x:e[0]*t.x+e[1]*t.y+e[2],y:e[3]*t.x+e[4]*t.y+e[5]}}function y(t,e){return t.get(e)?.values}function w(t,e){return t.get(e)?.values}function b(t,e){return t.get(e)?.values?.[0]}function C(t,e){return t.get(e)?.values?.[0]}function v(t,e,r,o=0,n=l.Z.tiffTags,i=4){const s=8===i,a=s?D(new DataView(t,r,8),0,e):new DataView(t,r,2).getUint16(0,e),u=4+2*i,c=s?8:2,h=c+a*u;if(r+h>t.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:h};const f=r+h+4<=t.byteLength?B(new DataView(t,r+h,8===i?8:4),0,e,8===i):null,d=r+c,p=new Map;let m,g,y,w,b,C=0,v=0;for(let r=0;r<a;r++){g=new DataView(t,d+u*r,u),y=g.getUint16(0,e),b=g.getUint16(2,e),w=l.Z.getTagName(y,n);const s=[];2===i?(C=g.getUint16(4,e),v=g.getUint16(6,e)):4===i?(C=g.getUint32(4,e),v=g.getUint32(8,e)):8===i&&(C=B(g,4,e,!0),v=B(g,12,e,!0),s.push(g.getUint32(12,e)),s.push(g.getUint32(16,e))),m={id:y,type:b,valueCount:C,valueOffset:v,valueOffsets:s,values:null},E(t,e,m,o,!1,i),p.set(w,m)}return{success:!0,ifd:p,nextIFD:f,requiredBufferSize:h}}const x=(t,e)=>(0,i.Jx)(t,{inputOffset:e}).pixels[0];function k(t,e){if(1!==e&&2!==e&&4!==e)return t;const r=new Uint8Array(t),o=8/e,n=new Uint8Array(t.byteLength*o);let i=0;const s=2**e-1;for(let t=0;t<r.length;t++){const a=r[t];for(let t=0;t<o;t++)n[i++]=a<<e*t>>>8-e&s}return n.buffer}function A(t,e,r){const o=new n.J;o.parse(t),o.colorTransform=6===r?-1:0;const i=o.getData(o.width,o.height,1!==e&&4!==e);return new Uint8Array(i.buffer)}function S(t){const e=new c.Z(t).getBytes(),r=new ArrayBuffer(e.length),o=new Uint8Array(r);return o.set(e),o}async function T(t,e,r,o,n){const a=u.f===e,l=C(r,"BITSPERSAMPLE"),c=C(r,"SAMPLESPERPIXEL")??1,h=C(r,"PHOTOMETRICINTERPRETATION"),f=C(r,"SAMPLEFORMAT")??1,d=p(f,l),g=C(r,"COMPRESSION")??1,y=m(d);let w,b,v;if(34887===g)return await(0,i.zD)(),x(t,o);if(1===g)w=t.slice(o,o+n),b=new Uint8Array(w);else if(8===g||32946===g)b=new Uint8Array(t,o,n),b=S(b),w=b.buffer;else if(6===g)b=new Uint8Array(t,o,n),b=A(b,c,h),w=b.buffer;else if(7===g){const e=r.get("JPEGTABLES").values,i=e.length-2;b=new Uint8Array(i+n-2);for(let t=0;t<i;t++)b[t]=e[t];const s=new Uint8Array(t,o+2,n-2);for(let t=0;t<s.length;t++)b[i+t]=s[t];b=A(b,c,h),w=b.buffer}else{if(5!==g)throw new Error("tiff-decode: unsupport compression "+g);b=(0,s.J)(t,o,n,e),w=b.buffer}if(w=k(w,l),"u8"===d||"s8"===d||a)v=new y(w);else{w=new ArrayBuffer(b.length);const t=new Uint8Array(w);switch(d){case"u16":case"s16":for(let e=0;e<b.length;e+=2)t[e]=b[e+1],t[e+1]=b[e];break;case"u32":case"s32":case"f32":for(let e=0;e<b.length;e+=4)t[e]=b[e+3],t[e+1]=b[e+2],t[e+2]=b[e+1],t[e+3]=b[e]}v=new y(w)}const T=C(r,"PREDICTOR")??1,I=C(r,"TILEWIDTH"),M=C(r,"TILELENGTH");if(T>1&&(5===g||8===g||32946===g)&&I&&M){const t=L(r),e=new y(v.length);e.set(v),v=function(t,e,r,o,n){const i=o?4:1,s=r*i*n;o&&(t=new Uint8Array(t.buffer));for(let r=0;r<e;r++){const e=r*s;for(let r=n;r<s;r++)t[e+r]+=t[e+r-n]}if(!o)return t;const a=new Uint8Array(t.length),l=r*n;for(let r=0;r<e;r++){const e=r*s;for(let r=0;r<l;r++)for(let o=0;o<i;o++)a[e+r*i+o]=t[e+r+(i-o-1)*l]}return new Float32Array(a.buffer)}(e,M,I,3===f&&3===T,t?1:c)}return v}const I=(t,e,r)=>{const o=u.f===e.littleEndian,n=w(r,"STRIPOFFSETS");if(void 0===n)return null;const{width:i,height:a,pixelType:l}=R([r]),c=C(r,"SAMPLESPERPIXEL")||e.planes,h=C(r,"PHOTOMETRICINTERPRETATION"),f=i*a,d=C(r,"BITSPERSAMPLE"),p=m(l),g=new p(f*c),y=w(r,"STRIPBYTECOUNTS"),b=C(r,"ROWSPERSTRIP"),v=C(r,"COMPRESSION")??1;let x,T,I,M,P,E,L,U,O,D=b;if(d%8==0)for(x=0;x<n.length;x++){if(P=x*(b*i)*c,D=(x+1)*b>a?a-x*b:b,"u8"===l||"s8"===l||o)8===v||32946===v?(L=new Uint8Array(t,n[x],y[x]),L=S(L),E=L.buffer):6===v?(L=new Uint8Array(t,n[x],y[x]),L=A(L,c,h),E=L.buffer):5===v?(L=(0,s.J)(t,n[x],y[x],e.littleEndian),E=L.buffer):(y[x]!==D*i*c*d/8&&console.log("strip byte counts is different than expected"),E=t.slice(n[x],n[x]+y[x])),E=k(E,d),M=new p(E);else{switch(6===v||8===v||32946===v?(L=new Uint8Array(t,n[x],y[x]),U=S(L),E=U.buffer):(y[x]!==D*i*c*d/8&&console.log("strip byte counts is different than expected"),E=new ArrayBuffer(y[x]),L=new Uint8Array(t,n[x],y[x]),U=new Uint8Array(E)),l){case"u16":case"s16":for(I=0;I<L.length;I+=2)U[I]=L[I+1],U[I+1]=L[I];break;case"u32":case"s32":case"f32":for(I=0;I<L.length;I+=4)U[I]=L[I+3],U[I+1]=L[I+2],U[I+2]=L[I+1],U[I+3]=L[I]}E=k(E,d),M=new p(E)}g.set(M,P)}const G=[];if(1===c)G.push(g);else for(x=0;x<c;x++){for(O=new p(f),T=0;T<f;T++)O[T]=g[T*c+x];G.push(O)}return{width:i,height:a,pixelType:l,pixels:G}},M=(t,e,r)=>{if(!(t&&t.length>0&&e&&r))return null;let o,n,i;const s=t[0].length,a=t.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(o=t[u],n=e[u],i=r[u],0===u)for(let t=0;t<s;t++)l[t]=o[t]<n||o[t]>i?0:1;else for(let t=0;t<s;t++)l[t]&&(l[t]=o[t]<n||o[t]>i?0:1);return l},P=t=>{if(!t)return null;const e=t.match(/<Item(.*?)Item>/gi);if(!e||0===e.length)return null;const r=new Map;let o,n,i,s,a;for(let t=0;t<e.length;t++)o=e[t],n=o.slice(6,o.indexOf(">")),s=o.indexOf("sample="),s>-1&&(a=o.slice(s+8,o.indexOf('"',s+8))),s=o.indexOf("name="),s>-1&&(n=o.slice(s+6,o.indexOf('"',s+6))),n&&(i=o.slice(o.indexOf(">")+1,o.indexOf("</Item>")).trim(),null!=a?r.has(n)?r.get(n)[a]=i:r.set(n,[i]):r.set(n,i)),a=null;const l=r.get("STATISTICS_MINIMUM"),u=r.get("STATISTICS_MAXIMUM"),c=r.get("STATISTICS_MEAN"),h=r.get("STATISTICS_STDDEV");let f=null;if(l&&u){f=[];for(let t=0;t<l.length;t++)f.push({min:parseFloat(l[t]),max:parseFloat(u[t]),avg:c&&parseFloat(c[t]),stddev:h&&parseFloat(h[t])})}const d=r.get("BandName"),p=r.get("WavelengthMin"),m=r.get("WavelengthMax");let g=null;if(d){g=[];for(let t=0;t<d.length;t++)g.push({BandName:d[t],WavelengthMin:p&&parseFloat(p[t]),WavelengthMax:m&&parseFloat(m[t])})}return{statistics:f,bandProperties:g,dataType:r.get("DataType"),rawMetadata:r}};function E(t,e,r,o=0,n=!1,i=4){if(r.values)return!0;const s=r.type,a=r.valueCount;let l=r.valueOffset,u=[];const c=h[s],d=8*c,p=a*c,m=a*h[s]*8;let g,y;const w=8===i?64:32,b=r.valueOffsets;if(m>w&&p>(n?t.byteLength:t?t.byteLength-l+o:0))return r.offlineOffsetSize=[l,p],r.values=null,!1;if(m<=w){if(!e)if(w<=32)l>>>=32-m;else{const t=b?.length?b[0]:l>>>0,e=b?.length?b[1]:Math.round((l-t)/f);m<=32?(l=t>>>32-m,b[0]=l):(l=t*2**(32-m)+(e>>>32-m),b[0]=t,b[1]=e>>>32-m)}if(1===a&&d===w)u=[l];else if(64===w){const t=b?.length?b[0]:l>>>0,e=b?.length?b[1]:Math.round((l-t)/f);let r=t,o=32;for(y=1;y<=a;y++){const t=32-d*y%32;if(o<d){const n=r<<t>>>32-o,i=e<<32-o>>>32-o;r=e,u.push(n+i*2**(d-o)),o-=32-(d-o)}else u.push(r<<t>>>32-d),o-=d;0===o&&(o=32,r=e)}}else for(y=1;y<=a;y++){const t=32-d*y;u.push(l<<t>>>32-d)}}else{l-=o,n&&(l=0);for(let r=l;r<l+p;r+=c){switch(s){case 1:case 2:case 7:g=new DataView(t,r,1).getUint8(0);break;case 3:g=new DataView(t,r,2).getUint16(0,e);break;case 4:case 13:g=new DataView(t,r,4).getUint32(0,e);break;case 5:g=new DataView(t,r,4).getUint32(0,e)/new DataView(t,r+4,4).getUint32(0,e);break;case 6:g=new DataView(t,r,1).getInt8(0);break;case 8:g=new DataView(t,r,2).getInt16(0,e);break;case 9:g=new DataView(t,r,4).getInt32(0,e);break;case 10:g=new DataView(t,r,4).getInt32(0,e)/new DataView(t,r+4,4).getInt32(0,e);break;case 11:g=new DataView(t,r,4).getFloat32(0,e);break;case 12:g=new DataView(t,r,8).getFloat64(0,e);break;case 16:case 18:g=D(new DataView(t,r,8),0,e);break;case 17:g=G(new DataView(t,r,8),0,e);break;default:g=null}u.push(g)}}if(2===s){let t="";const e=u;for(u=[],y=0;y<e.length;y++)0===e[y]&&""!==t?(u.push(t),t=""):t+=String.fromCharCode(e[y]);""===t&&0!==u.length||u.push(t)}return r.values=u,!0}function R(t){const e=t[0],r=C(e,"TILEWIDTH"),o=C(e,"TILELENGTH"),n=C(e,"IMAGEWIDTH"),i=C(e,"IMAGELENGTH"),s=C(e,"BITSPERSAMPLE"),a=C(e,"SAMPLESPERPIXEL"),l=C(e,"SAMPLEFORMAT")??1,u=p(l,s),c=L(e),h=y(e,"GDAL_NODATA");let f=null;h?.length&&(f=h.map((t=>parseFloat(t))),f.some((t=>isNaN(t)))&&(f=null));const m=C(e,"COMPRESSION")??1;let v;switch(m){case 1:v="NONE";break;case 2:case 3:case 4:case 32771:v="CCITT";break;case 5:v="LZW";break;case 6:case 7:v="JPEG";break;case 32773:v="PACKBITS";break;case 8:case 32946:v="DEFLATE";break;case 34712:v="JPEG2000";break;case 34887:v="LERC";break;default:v=String(m)}let x=!0,k="";d.has(m)||(x=!1,k+="unsupported tag compression "+m),l>3&&(x=!1,k+="unsupported tag sampleFormat "+l),1!==s&&2!==s&&4!==s&&s%8!=0&&(x=!1,k+="unsupported tag bitsPerSample "+s);const A=b(e,"GEOASCIIPARAMS");let S;if(A){const t=A.split("|").find((t=>t.includes("ESRI PE String = "))),e=t?t.replace("ESRI PE String = ",""):"";S=e.startsWith("COMPD_CS")||e.startsWith("PROJCS")||e.startsWith("GEOGCS")?{wkid:null,wkt:e}:null}const T=w(e,"GEOTIEPOINTS"),I=w(e,"GEOPIXELSCALE"),M=w(e,"GEOTRANSMATRIX"),E=e.has("GEOKEYDIRECTORY")?e.get("GEOKEYDIRECTORY").data:null;let R,D,G=!1,B=!1;if(E){G=2===C(E,"GTRasterTypeGeoKey");const t=C(E,"GTModelTypeGeoKey");if(2===t){const t=C(E,"GeographicTypeGeoKey");t>=1024&&t<=32766&&(S={wkid:t}),S||32767!==t||(B=!0,S={wkid:4326})}else if(1===t){const t=C(E,"ProjectedCSTypeGeoKey");t>=1024&&t<=32766&&(S={wkid:t})}}if(I&&T&&T.length>=6?(R=[I[0],0,T[3]-T[0]*I[0],0,-Math.abs(I[1]),T[4]-T[1]*I[1]],G&&(R[2]-=.5*R[0]+.5*R[1],R[5]-=.5*R[3]+.5*R[4])):M&&16===M.length&&(R=G?[M[0],M[1],M[3]-.5*M[0],M[4],M[5],M[7]-.5*M[5]]:[M[0],M[1],M[3],M[4],M[5],M[7]]),R){const t=[{x:0,y:i},{x:0,y:0},{x:n,y:i},{x:n,y:0}];let e,r=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let n=0;n<t.length;n++)e=g(t[n],R),r=e.x>r?r:e.x,s=e.x<s?s:e.x,o=e.y>o?o:e.y,a=e.y<a?a:e.y;D={xmin:r,xmax:s,ymin:o,ymax:a,spatialReference:S}}else D={xmin:-.5,ymin:.5-i,xmax:n-.5,ymax:.5,spatialReference:S};B&&(D.xmax-D.xmin>400||Math.max(Math.abs(D.xmin),Math.abs(D.xmax))>361)&&(S=null,D.spatialReference=null);const N=U(t);let _,V,z,j,Z;if(N.length>0){z=Math.round(Math.log(n/C(N[0],"IMAGEWIDTH"))/Math.LN2);const t=N[N.length-1];j=Math.round(Math.log(n/C(t,"IMAGEWIDTH"))/Math.LN2),_=C(t,"TILEWIDTH"),V=C(t,"TILELENGTH")}_=null!=j&&j>0?_||r:null,V=null!=j&&j>0?V||o:null,r&&(Z=[{maxCol:Math.ceil(n/r)-1,maxRow:Math.ceil(i/o)-1,minRow:0,minCol:0}],N.forEach((t=>{Z.push({maxCol:Math.ceil(C(t,"IMAGEWIDTH")/C(t,"TILEWIDTH"))-1,maxRow:Math.ceil(C(t,"IMAGELENGTH")/C(t,"TILELENGTH"))-1,minRow:0,minCol:0})})));const W=b(t[0],"GDAL_METADATA"),J=P(W);return k+=" "+F({width:n,height:i,tileWidth:r,tileHeight:o,planes:a,ifds:t}),{width:n,height:i,tileWidth:r,tileHeight:o,planes:a,isBSQ:c,pixelType:u,compression:v,noData:f,hasMaskBand:O(t).length===N.length+1,isSupported:x,message:k,extent:D,isPseudoGeographic:B,affine:I?null:R,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:_,pyramidBlockHeight:V,tileBoundary:Z,metadata:J}}function L(t,e){const r=y(t,"PLANARCONFIGURATION");return r?2===r[0]:!!e&&e.isBSQ}function U(t){return t.filter((t=>1===C(t,"NEWSUBFILETYPE")))}function O(t){return t.filter((t=>{const e=4==(4&(C(t,"NEWSUBFILETYPE")??0)),r=4===C(t,"PHOTOMETRICINTERPRETATION");return e&&r}))}function D(t,e,r){const o=t.getUint32(e,r),n=t.getUint32(e+4,r);return r?n*f+o:o*f+n}function G(t,e,r){let o=r?t.getInt32(e,r):t.getUint32(e,r),n=r?t.getUint32(e+4,r):t.getInt32(e+4,r);const i=(r?o:n)>=0?1:-1;return r?o*=i:n*=i,i*(r?n*f+o:o*f+n)}function B(t,e,r,o){return o?D(t,e,r):t.getUint32(e,r)}function N(t){const e=new DataView(t,0,16),r=e.getUint16(0,!1);let o=null;if(18761===r)o=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");o=!1}const n=e.getUint16(2,o);if(42!==n&&43!==n)throw new Error("unexpected tiff identifier");let i=4;const s=43===n;if(s){const t=e.getUint16(i,o);if(i+=2,8!==t)throw new Error("unsupported bigtiff version");if(0!==e.getUint16(i,o))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:o,isBigTiff:s,firstIFDPos:B(e,i,o,s)}}function _(t,e,r,n=0,i=l.Z.tiffTags,s=4){const a=v(t,e,r,n,i,s);let u;const c=a.ifd;if(c){if(l.Z.ifdTags.forEach(((r,o)=>{c.has(o)&&(u=c.get(o),u.data=v(t,e,u.valueOffset-n,n,r).ifd)})),c.has("GEOKEYDIRECTORY")){u=c.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const o=r[0]+"."+r[1]+"."+r[2];u.data=v(t,e,u.valueOffset+6-n,n,l.Z.geoKeys,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[o]})}}if(c.has("XMP")){u=c.get("XMP");const t=u.values;"number"==typeof t[0]&&7===u.type&&(u.values=[(0,o.f)(new Uint8Array(t))])}}return a}function F(t){const{width:e,height:r,tileHeight:o,tileWidth:n}=t,i=t.planes,s=n?n*o:e*r,a=C(t.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/8:1)&&(l=n?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function V(t,e){const{headerInfo:r,ifd:o,offsets:n,sizes:i}=e,s=[];for(let e=0;e<n.length;e++){i[e];const a=await T(t,r.littleEndian,o,n[e],i[e]||t.byteLength);s.push(a)}const l=L(o,r),u=C(o,"BITSPERSAMPLE"),c=p(C(o,"SAMPLEFORMAT")??1,u),h=C(o,"SAMPLESPERPIXEL")||r.planes,f=m(c),d=C(o,"TILEWIDTH"),g=C(o,"TILELENGTH"),y=C(o,"COMPRESSION")??1,w=d*g;let b;const v=[];let x=s[0];const k=34887===y;for(let t=0;t<h;t++){if(b=new f(w),s.length===h)x=s[t],x.length===w&&(b=x);else if(x.length)if(l||k)b=x.length===w?x:x.slice(w*t,w*(t+1));else for(let e=0;e<w;e++)b[e]=x[e*h+t];v.push(b)}const A=r.noData?r.noData[0]:e.noDataValue,S=r.metadata?r.metadata.statistics:null,I=S?S.map((t=>t.min)):null,P=S?S.map((t=>t.max)):null,E={pixelType:c,width:d,height:g,pixels:v,noDataValue:A};return null!=A?(0,a.A)(E,A):I&&P&&e.applyMinMaxConstraint&&(E.mask=M(v,I,P)),E}async function z(t,e={}){const r=e.pyramidLevel||0,o=e.headerInfo||function(t){const{littleEndian:e,isBigTiff:r,firstIFDPos:o}=N(t);let n=o;const i=[];do{const o=_(t,e,n,0,l.Z.tiffTags,r?8:4);if(!o.success)break;i.push(o.ifd),n=o.nextIFD}while(n>0);return{...R(i),littleEndian:e,isBigTiff:r,ifds:i,pyramidIFDs:U(i),maskIFDs:O(i)}}(t),{ifds:n,noData:i}=o;if(0===n.length)throw new Error("no valid image file directory");const s=F(o);if(s)throw s;let u=null;const c=-1===r?n[n.length-1]:n[r],h=i??e.noDataValue;return u=o.tileWidth?await async function(t,e,r){const o=w(r,"TILEOFFSETS");if(void 0===o)return null;const n=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=R([r]),c=L(r,e),h=C(r,"SAMPLESPERPIXEL")||e.planes,f=i*s,d=C(r,"BITSPERSAMPLE"),p=34887===(C(r,"COMPRESSION")??1),g=m(a),y=[];for(let t=0;t<h;t++)y.push(new g(f));let b,v,x,k,A,S,I,M,P,E,U,O,D;const G=Math.ceil(i/l),B=new Uint8Array(f).fill(255);let N=!1;if(d%8==0)if(p&&c&&h>1){const a=Math.round(o.length/h);for(b=0;b<a;b++){S=Math.floor(b/G)*u,I=b%G*l,M=S*i+I;for(let a=0;a<h;a++){const c=b*h+a;for(0===n[c]?(x=null,N=!0):x=await T(t,e.littleEndian,r,o[c],n[c]),E=0,P=M,O=Math.min(l,i-I),U=Math.min(u,s-S),D=y[a],k=0;k<U;k++)for(P=M+k*i,E=k*l,A=0;A<O;A++,P++,E++)x?D[P]=x[E]:B[P]=0}}}else for(b=0;b<o.length;b++)for(S=Math.floor(b/G)*u,I=b%G*l,M=S*i+I,0===n[b]?(x=null,N=!0):x=await T(t,e.littleEndian,r,o[b],n[b]),E=0,P=M,O=Math.min(l,i-I),U=Math.min(u,s-S),v=0;v<h;v++)if(D=y[v],c||p)for(k=0;k<U;k++)for(P=M+k*i,E=l*u*v+k*l,A=0;A<O;A++,P++,E++)x?D[P]=x[E]:B[P]=0;else for(k=0;k<U;k++)for(P=M+k*i,E=k*l*h+v,A=0;A<O;A++,P++,E+=h)x?D[P]=x[E]:B[P]=0;return{width:i,height:s,pixelType:a,pixels:y,mask:N?B:void 0}}(t,o,c):I(t,o,c),u?(null!=h&&(0,a.A)(u,h),u):u}},9832:(t,e,r)=>{r.d(e,{Z:()=>a});const o=(()=>{const t=[];return t[254]="NEWSUBFILETYPE",t[255]="SUBFILETYPE",t[256]="IMAGEWIDTH",t[257]="IMAGELENGTH",t[258]="BITSPERSAMPLE",t[259]="COMPRESSION",t[262]="PHOTOMETRICINTERPRETATION",t[263]="THRESHHOLDING",t[264]="CELLWIDTH",t[265]="CELLLENGTH",t[266]="FILLORDER",t[269]="DOCUMENTNAME",t[270]="IMAGEDESCRIPTION",t[271]="MAKE",t[272]="MODEL",t[273]="STRIPOFFSETS",t[274]="ORIENTATION",t[277]="SAMPLESPERPIXEL",t[278]="ROWSPERSTRIP",t[279]="STRIPBYTECOUNTS",t[280]="MINSAMPLEVALUE",t[281]="MAXSAMPLEVALUE",t[282]="XRESOLUTION",t[283]="YRESOLUTION",t[284]="PLANARCONFIGURATION",t[285]="PAGENAME",t[286]="XPOSITION",t[287]="YPOSITION",t[288]="FREEOFFSETS",t[289]="FREEBYTECOUNTS",t[290]="GRAYRESPONSEUNIT",t[291]="GRAYRESPONSECURVE",t[292]="T4OPTIONS",t[293]="T6OPTIONS",t[296]="RESOLUTIONUNIT",t[297]="PAGENUMBER",t[300]="COLORRESPONSEUNIT",t[301]="TRANSFERFUNCTION",t[305]="SOFTWARE",t[306]="DATETIME",t[315]="ARTIST",t[316]="HOSTCOMPUTER",t[317]="PREDICTOR",t[318]="WHITEPOINT",t[319]="PRIMARYCHROMATICITIES",t[320]="COLORMAP",t[321]="HALFTONEHINTS",t[322]="TILEWIDTH",t[323]="TILELENGTH",t[324]="TILEOFFSETS",t[325]="TILEBYTECOUNTS",t[326]="BADFAXLINES",t[327]="CLEANFAXDATA",t[328]="CONSECUTIVEBADFAXLINES",t[330]="SUBIFD",t[332]="INKSET",t[333]="INKNAMES",t[334]="NUMBEROFINKS",t[336]="DOTRANGE",t[337]="TARGETPRINTER",t[338]="EXTRASAMPLES",t[339]="SAMPLEFORMAT",t[340]="SMINSAMPLEVALUE",t[341]="SMAXSAMPLEVALUE",t[342]="TRANSFERRANGE",t[347]="JPEGTABLES",t[512]="JPEGPROC",t[513]="JPEGIFOFFSET",t[514]="JPEGIFBYTECOUNT",t[515]="JPEGRESTARTINTERVAL",t[517]="JPEGLOSSLESSPREDICTORS",t[518]="JPEGPOINTTRANSFORM",t[519]="JPEGQTABLES",t[520]="JPEGDCTABLES",t[521]="JPEGACTABLES",t[529]="YCBCRCOEFFICIENTS",t[530]="YCBCRSUBSAMPLING",t[531]="YCBCRPOSITIONING",t[532]="REFERENCEBLACKWHITE",t[700]="XMP",t[33550]="GEOPIXELSCALE",t[33922]="GEOTIEPOINTS",t[33432]="COPYRIGHT",t[42112]="GDAL_METADATA",t[42113]="GDAL_NODATA",t[50844]="RPCCOEFFICIENT",t[34264]="GEOTRANSMATRIX",t[34735]="GEOKEYDIRECTORY",t[34736]="GEODOUBLEPARAMS",t[34737]="GEOASCIIPARAMS",t[34665]="EXIFIFD",t[34853]="GPSIFD",t[40965]="INTEROPERABILITYIFD",t})(),n=(()=>{const t=o.slice();return t[36864]="ExifVersion",t[40960]="FlashpixVersion",t[40961]="ColorSpace",t[42240]="Gamma",t[37121]="ComponentsConfiguration",t[37122]="CompressedBitsPerPixel",t[40962]="PixelXDimension",t[40963]="PixelYDimension",t[37500]="MakerNote",t[37510]="UserComment",t[40964]="RelatedSoundFile",t[36867]="DateTimeOriginal",t[36868]="DateTimeDigitized",t[36880]="OffsetTime",t[36881]="OffsetTimeOriginal",t[36882]="OffsetTimeDigitized",t[37520]="SubSecTime",t[37521]="SubSecTimeOriginal",t[37522]="SubSecTimeDigitized",t[37888]="Temperature",t[37889]="Humidity",t[37890]="Pressure",t[37891]="WaterDepth",t[37892]="Acceleration",t[37893]="CameraElevationAngle",t[42016]="ImageUniqueID",t[42032]="CameraOwnerName",t[42033]="BodySerialNumber",t[42034]="LensSpecification",t[42035]="LensMake",t[42036]="LensModel",t[42037]="LensSerialNumber",t[33434]="ExposureTime",t[33437]="FNumber",t[34850]="ExposureProgram",t[34852]="SpectralSensitivity",t[34855]="PhotographicSensitivity",t[34856]="OECF",t[34864]="SensitivityType",t[34865]="StandardOutputSensitivity",t[34866]="RecommendedExposureIndex",t[34867]="ISOSpeed",t[34868]="ISOSpeedLatitudeyyy",t[34869]="ISOSpeedLatitudezzz",t[37377]="ShutterSpeedValue",t[37378]="ApertureValue",t[37379]="BrightnessValue",t[37380]="ExposureBiasValue",t[37381]="MaxApertureValue",t[37382]="SubjectDistance",t[37383]="MeteringMode",t[37384]="LightSource",t[37385]="Flash",t[37386]="FocalLength",t[37396]="SubjectArea",t[41483]="FlashEnergy",t[41484]="SpatialFrequencyResponse",t[41486]="FocalPlaneXResolution",t[41487]="FocalPlaneYResolution",t[41488]="FocalPlaneResolutionUnit",t[41492]="SubjectLocation",t[41493]="ExposureIndex",t[41495]="SensingMethod",t[41728]="FileSource",t[41729]="SceneType",t[41730]="CFAPattern",t[41985]="CustomRendered",t[41986]="ExposureMode",t[41987]="WhiteBalance",t[41988]="DigitalZoomRatio",t[41989]="FocalLengthIn35mmFilm",t[41990]="SceneCaptureType",t[41991]="GainControl",t[41992]="Contrast",t[41993]="Saturation",t[41994]="Sharpness",t[41995]="DeviceSettingDescription",t[41996]="SubjectDistanceRange",t})(),i=(()=>{const t=[];return t[1024]="GTModelTypeGeoKey",t[1025]="GTRasterTypeGeoKey",t[1026]="GTCitationGeoKey",t[2048]="GeographicTypeGeoKey",t[2049]="GeogCitationGeoKey",t[2050]="GeogGeodeticDatumGeoKey",t[2051]="GeogPrimeMeridianGeoKey",t[2052]="GeogLinearUnitsGeoKey",t[2053]="GeogLinearUnitSizeGeoKey",t[2054]="GeogAngularUnitsGeoKey",t[2055]="GeogAngularUnitSizeGeoKey",t[2056]="GeogEllipsoidGeoKey",t[2057]="GeogSemiMajorAxisGeoKey",t[2058]="GeogSemiMinorAxisGeoKey",t[2059]="GeogInvFlatteningGeoKey",t[2061]="GeogPrimeMeridianLongGeoKey",t[2060]="GeogAzimuthUnitsGeoKey",t[3072]="ProjectedCSTypeGeoKey",t[3073]="PCSCitationGeoKey",t[3074]="ProjectionGeoKey",t[3075]="ProjCoordTransGeoKey",t[3076]="ProjLinearUnitsGeoKey",t[3077]="ProjLinearUnitSizeGeoKey",t[3078]="ProjStdParallel1GeoKey",t[3079]="ProjStdParallel2GeoKey",t[3080]="ProjNatOriginLongGeoKey",t[3081]="ProjNatOriginLatGeoKey",t[3082]="ProjFalseEastingGeoKey",t[3083]="ProjFalseNorthingGeoKey",t[3084]="ProjFalseOriginLongGeoKey",t[3085]="ProjFalseOriginLatGeoKey",t[3086]="ProjFalseOriginEastingGeoKey",t[3087]="ProjFalseOriginNorthingGeoKey",t[3088]="ProjCenterLongGeoKey",t[3090]="ProjCenterEastingGeoKey",t[3091]="ProjCenterNorthingGeoKey",t[3092]="ProjScaleAtNatOriginGeoKey",t[3093]="ProjScaleAtCenterGeoKey",t[3094]="ProjAzimuthAngleGeoKey",t[3095]="ProjStraightVertPoleLongGeoKey",t[4096]="VerticalCSTypeGeoKey",t[4097]="VerticalCitationGeoKey",t[4098]="VerticalDatumGeoKey",t[4099]="VerticalUnitsGeoKey",t})(),s=new Map;s.set("EXIFIFD",n),s.set("GPSIFD",["GPSVersionID","GPSLatitudeRef","GPSLatitude","GPSLongitudeRef","GPSLongitude","GPSAltitudeRef","GPSAltitude","GPSTimeStamp","GPSSatellites","GPSStatus","GPSMeasureMode","GPSDOP","GPSSpeedRef","GPSSpeed","GPSTrackRef","GPSTrack","GPSImgDirectionRef","GPSImgDirection","GPSMapDatum","GPSDestLatitudeRef","GPSDestLatitude","GPSDestLongitudeRef","GPSDestLongitude","GPSDestBearingRef","GPSDestBearing","GPSDestDistanceRef","GPSDestDistance","GPSProcessingMethod","GPSAreaInformation","GPSDateStamp","GPSDifferential","GPSHPositioningError"]);const a={tiffTags:o,ifdTags:s,geoKeys:i,getTagName:(t,e)=>{let r=(e||o)[t];return void 0===r&&(r="unknown"+String(t)),r}}},81578:(t,e,r)=>{r.d(e,{A:()=>a,r:()=>s});const o=9999999e31,n=2e-7,i={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE],unknown:void 0,c64:void 0,c128:void 0};function s(t){return i[t]??[-34028234663852886e22,34028234663852886e22]}function a(t,e,r){if(t.depthCount&&t.depthCount>1)return;const{pixels:i,statistics:a,pixelType:l}=t,u=i[0].length,c=t.bandMasks??[],h=t.mask??new Uint8Array(u).fill(255),f="f32"===l||"f64"===l,d=s(l);let p=!1;for(let t=0;t<i.length;t++){const s="number"==typeof e?e:e[t];if(null==s)continue;const u=a?.[t].minValue??d[0],m=a?.[t].maxValue??d[1];if(u>s+Number.EPSILON||m<s-Number.EPSILON)continue;const g=c[t]||h.slice(),y=i[t],w=r?.customFloatTolerance;if(f&&0!==w){let t=w;t||(t=Math.abs(s)>=o?n*Math.abs(s):"f32"===l?2**-23:Number.EPSILON);for(let e=0;e<y.length;e++)g[e]&&Math.abs(y[e]-s)<t&&(y[e]=0,g[e]=0,h[e]=0,p=!0)}else for(let t=0;t<y.length;t++)g[t]&&y[t]===s&&(y[t]=0,g[t]=0,h[t]=0,p=!0);c[t]=g}p&&(t.bandMasks=t.bandMasks||t.pixels.length>1?c:null,t.mask=h),p&&"updateStatistics"in t&&t.updateStatistics()}},48279:(t,e,r)=>{r.d(e,{f:()=>o});const o=(()=>{const t=new ArrayBuffer(4),e=new Uint8Array(t);return new Uint32Array(t)[0]=1,1===e[0]})()},55914:(t,e,r)=>{r.d(e,{$f:()=>l,CD:()=>n,DX:()=>o,Gd:()=>c,Pz:()=>h,Qh:()=>O,SJ:()=>f,Uk:()=>D,Vl:()=>L,XV:()=>d,a2:()=>g,nA:()=>x,nk:()=>u,oB:()=>v,pW:()=>S,sS:()=>C,us:()=>A,wV:()=>p,zp:()=>m});var o,n,i,s=r(5847),a=r(81578);(i=o||(o={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(t){t[t.bestMatch=0]="bestMatch",t[t.fail=1]="fail"}(n||(n={}));const l=6;function u(t){return null!=t&&"esri.layers.support.PixelBlock"===t.declaredClass&&t.pixels&&t.pixels.length>0}function c(t){if(!t?.length||t.some((t=>!u(t))))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:r,height:o,pixelType:n}=e[0];if(e.some((t=>t.width!==r||t.height!==o)))return null;const i=e.map((({mask:t})=>t)).filter((t=>null!=t));let a=null;i.length&&(a=new Uint8Array(r*o),a.set(i[0]),i.length>1&&b(i.slice(1),a));const l=[];e.forEach((({pixels:t})=>l.push(...t)));const c=e.map((({statistics:t})=>t)).filter((t=>t?.length)),h=[];return c.forEach((t=>h.push(...t))),new s.Z({pixelType:n,width:r,height:o,mask:a,pixels:l,statistics:h.length?h:null})}function h(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const r=e.sort(((t,e)=>t[0]-e[0]));let o=0;r[0][0]<0&&(o=r[0][0]);const n=Math.max(256,r[r.length-1][0]-o+1),i=new Uint8Array(4*n),s=[];let a,l=0,u=0;const c=5===r[0].length;if(n>65536)return r.forEach((t=>{s[t[0]-o]=c?t.slice(1):t.slice(1).concat([255])})),{indexed2DColormap:s,offset:o,alphaSpecified:c};if(t.fillUnspecified)for(a=r[u],l=a[0]-o;l<n;l++)i[4*l]=a[1],i[4*l+1]=a[2],i[4*l+2]=a[3],i[4*l+3]=c?a[4]:255,l===a[0]-o&&(a=u===r.length-1?a:r[++u]);else for(l=0;l<r.length;l++)a=r[l],u=4*(a[0]-o),i[u]=a[1],i[u+1]=a[2],i[u+2]=a[3],i[u+3]=c?a[4]:255;return{indexedColormap:i,offset:o,alphaSpecified:c}}function f(t,e){if(!u(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const r=t.clone(),o=r.pixels;let n=r.mask;const i=r.width*r.height;if(1!==o.length)return t;const{indexedColormap:s,indexed2DColormap:a,offset:l,alphaSpecified:c}=e;let h=0;const f=o[0],d=new Uint8Array(f.length),p=new Uint8Array(f.length),m=new Uint8Array(f.length);let g,y=0;if(s){const t=s.length-1;if(null!=n)for(h=0;h<i;h++)n[h]&&(y=4*(f[h]-l),y<l||y>t?n[h]=0:(d[h]=s[y],p[h]=s[y+1],m[h]=s[y+2],n[h]=s[y+3]));else{for(n=new Uint8Array(i),h=0;h<i;h++)y=4*(f[h]-l),y<l||y>t?n[h]=0:(d[h]=s[y],p[h]=s[y+1],m[h]=s[y+2],n[h]=s[y+3]);r.mask=n}}else if(a)if(null!=n)for(h=0;h<i;h++)n[h]&&(g=a[f[h]],d[h]=g[0],p[h]=g[1],m[h]=g[2],n[h]=g[3]);else{for(n=new Uint8Array(i),h=0;h<i;h++)g=a[f[h]],d[h]=g[0],p[h]=g[1],m[h]=g[2],n[h]=g[3];r.mask=n}return r.pixels=[d,p,m],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=c,r}function d(t,e){if(!u(t))return null;const{pixels:r,mask:o}=t,n=r.length;let i=e.lut;const{offset:a}=e;i&&1===i[0].length&&(i=r.map((()=>i)));const l=[],c=e.outputPixelType||"u8";for(let t=0;t<n;t++){const e=p(r[t],o,i[t],a||0,c);l.push(e)}const h=new s.Z({width:t.width,height:t.height,pixels:l,mask:o,pixelType:c});return h.updateStatistics(),h}function p(t,e,r,o,n){const i=t.length,a=s.Z.createEmptyBand(n,i);if(e)for(let n=0;n<i;n++)e[n]&&(a[n]=r[t[n]-o]);else for(let e=0;e<i;e++)a[e]=r[t[e]-o];return a}function m(t,e){if(!u(t))return null;const r=t.clone(),{pixels:o}=r,n=r.width*r.height,i=e.length,s=Math.floor(i/2),a=e[Math.floor(s)],l=o[0];let c,h,f,d,p,m,g=!1;const y=new Uint8Array(n),w=new Uint8Array(n),b=new Uint8Array(n);let C=r.mask;const v=4===e[0].mappedColor.length;for(C||(C=new Uint8Array(n),C.fill(v?255:1),r.mask=C),p=0;p<n;p++)if(C[p]){for(c=l[p],g=!1,m=s,h=a,f=0,d=i-1;d-f>1;){if(c===h.value){g=!0;break}c>h.value?f=m:d=m,m=Math.floor((f+d)/2),h=e[Math.floor(m)]}g||(c===e[f].value?(h=e[f],g=!0):c===e[d].value?(h=e[d],g=!0):c<e[f].value?(g=!1,h=null):c>e[f].value&&(c<e[d].value?(h=e[f],g=!0):d===i-1?(g=!1,h=null):(h=e[d],g=!0))),g?(y[p]=h.mappedColor[0],w[p]=h.mappedColor[1],b[p]=h.mappedColor[2],C[p]=h.mappedColor[3]):y[p]=w[p]=b[p]=C[p]=0}return r.pixels=[y,w,b],r.mask=C,r.pixelType="u8",r.maskIsAlpha=v,r}function g(t,e){if(!u(t))return null;const{width:r,height:o}=t,{inputRanges:n,outputValues:i,outputPixelType:l,noDataRanges:c,allowUnmatched:h,isLastInputRangeInclusive:f}=e,d=t.pixels[0],p=s.Z.createEmptyBand(l,d.length),m=t.mask,g=new Uint8Array(r*o);m?g.set(m):g.fill(255);const y=t.pixelType.startsWith("f")?1e-6:0,w=n.map((t=>t-y));w[0]=n[0],w[w.length-1]=n[n.length-1]+(f?1e-6:0);const b=n.length/2,[C,v]=(0,a.r)(l);for(let t=0;t<o;t++)for(let e=0;e<r;e++){const o=t*r+e;if(g[o]){const t=d[o];let e=!1;for(let r=b-1;r>=0;r--)if(t===w[2*r]||t>w[2*r]&&t<w[2*r+1]){p[o]=i[r],e=!0;break}e||(h?p[o]=t>v?v:t<C?C:t:g[o]=0)}}const x=c?.length;if(x)for(let t=0;t<o;t++)for(let e=0;e<r;e++){const o=t*r+e;if(!m||m[o]){const t=d[o];for(let e=0;e<x;e+=2)if(t>=c[e]&&t<=c[e+1]){p[o]=0,g[o]=0;break}}}return new s.Z({width:r,height:o,pixelType:l,pixels:[p],mask:g})}function y(t,e,r,o){const n=null!=r&&r.length>=2?new Set(r):null,i=1===r?.length?r[0]:null,s=!!e?.length;for(let r=0;r<t.length;r++)if(o[r]){const a=t[r];if(s){let t=!1;for(let r=0;r<e.length;r+=2)if(a>=e[r]&&a<=e[r+1]){t=!0;break}t||(o[r]=0)}o[r]&&(a===i||n?.has(a))&&(o[r]=0)}}function w(t,e){const r=t[0].length;for(let o=0;o<r;o++)if(e[o]){let r=!1;for(let e=0;e<t.length;e++)if(t[e][o]){r=!0;break}r||(e[o]=0)}}function b(t,e){const r=t[0].length;for(let o=0;o<r;o++)if(e[o]){let r=!1;for(let e=0;e<t.length;e++)if(0===t[e][o]){r=!0;break}r&&(e[o]=0)}}function C(t,e){if(!u(t))return null;const{width:r,height:o,pixels:n}=t,i=r*o,a=new Uint8Array(i);t.mask?a.set(t.mask):a.fill(255);const l=n.length,{includedRanges:c,noDataValues:h,outputPixelType:f,matchAll:d,lookups:m}=e;if(m){const t=[];for(let e=0;e<l;e++){const r=m[e],o=p(n[e],a,r.lut,r.offset||0,"u8");t.push(o)}1===t.length?a.set(t[0]):d?w(t,a):b(t,a)}else if(d){const t=[];for(let e=0;e<l;e++){const r=new Uint8Array(i);r.set(a),y(n[e],c?.slice(2*e,2*e+2),h?.[e],r),t.push(r)}1===t.length?a.set(t[0]):w(t,a)}else for(let t=0;t<l;t++)y(n[t],c?.slice(2*t,2*t+2),h?.[t],a);return new s.Z({width:r,height:o,pixelType:f,pixels:n,mask:a})}function v(t){const{srcPixelType:e,inputRanges:r,outputValues:o,allowUnmatched:n,noDataRanges:i,isLastInputRangeInclusive:l,outputPixelType:u}=t;if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const c=e.includes("16")?65536:256,h=e.includes("s")?-c/2:0,f=s.Z.createEmptyBand(u,c),d=new Uint8Array(c);n&&d.fill(255);const[p,m]=(0,a.r)(u);if(r?.length&&o?.length){const t=1e-6,e=r.map((e=>e-t));e[0]=r[0],l&&(e[e.length-1]=r[r.length-1]);for(let t=0;t<e.length;t++){const r=o[t]>m?m:o[t]<p?p:o[t],n=Math.ceil(e[2*t]-h),i=Math.floor(e[2*t+1]-h);for(let t=n;t<=i;t++)f[t]=r,d[t]=255}}if(i?.length)for(let t=0;t<i.length;t++){const e=Math.ceil(i[2*t]-h),r=Math.floor(i[2*t+1]-h);for(let t=e;t<=r;t++)d[t]=0}return{lut:f,offset:h,mask:d}}function x(t,e,r){if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const o=t.includes("16")?65536:256,n=t.includes("s")?-o/2:0,i=new Uint8Array(o);if(e)for(let t=0;t<e.length;t++){const r=Math.ceil(e[2*t]-n),o=Math.floor(e[2*t+1]-n);for(let t=r;t<=o;t++)i[t]=255}else i.fill(255);if(r)for(let t=0;t<r.length;t++)i[r[t]-n]=0;return{lut:i,offset:n}}function k(t,e,r,o,n,i){const{width:s,height:a}=r.block,{x:l,y:u}=r.offset,{width:c,height:h}=r.mosaic,f=function(t,e,r,o,n,i,s,a){return{xmin:n<=r*t?0:n<r*t+t?n-r*t:t,ymin:i<=o*e?0:i<o*e+e?i-o*e:e,xmax:n+s<=r*t?0:n+s<r*t+t?n+s-r*t:t,ymax:i+a<=o*e?0:i+a<o*e+e?i+a-o*e:e}}(s,a,o,n,l,u,c,h);let d=0,p=0;if(i){const t=i.hasGCSSShiftTransform?360:i.halfWorldWidth??0,e=s*i.resolutionX,r=i.startX+o*e;r<t&&r+e>t?p=i.rightPadding:r>=t&&(d=i.leftMargin-i.rightPadding,p=0)}if(f.xmax-=p,"number"!=typeof e)for(let r=f.ymin;r<f.ymax;r++){const i=(n*a+r-u)*c+(o*s-l)+d,h=r*s;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e[h+r]}else for(let r=f.ymin;r<f.ymax;r++){const i=(n*a+r-u)*c+(o*s-l)+d;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e}}function A(t,e,r={}){const{clipOffset:o,clipSize:n,alignmentInfo:i,blockWidths:a}=r;if(a)return function(t,e,r){const o=t.find((t=>null!=t));if(null==o)return null;const n=t.some((t=>null==t||!!t.mask)),{width:i,height:a}=e,l=n?new Uint8Array(i*a):null,{blockWidths:c}=r,h=[],f=o.getPlaneCount(),d=s.Z.getPixelArrayConstructor(o.pixelType);if(n)for(let e=0,r=0;e<t.length;r+=c[e],e++){const o=t[e];if(!u(o))continue;const n=o.mask;for(let t=0;t<a;t++)for(let s=0;s<c[e];s++)l[t*i+s+r]=null==n?255:n[t*o.width+s]}const p=t.some((t=>t?.bandMasks&&t.bandMasks.length>1)),m=p?[]:void 0,g=i*a;for(let e=0;e<f;e++){const r=new d(g),o=p?new Uint8Array(g):void 0;for(let n=0,s=0;n<t.length;s+=c[n],n++){const l=t[n];if(!u(l))continue;const h=l.pixels[e];if(null!=h){for(let t=0;t<a;t++)for(let e=0;e<c[n];e++)r[t*i+e+s]=h[t*l.width+e];if(o){const t=l.bandMasks?.[e]??l.mask;for(let e=0;e<a;e++)for(let r=0;r<c[n];r++)o[e*i+r+s]=t?t[e*l.width+r]:255}}}h.push(r),m&&o&&m.push(o)}const y=new s.Z({width:i,height:a,mask:l,bandMasks:m,pixels:h,pixelType:o.pixelType});return y.updateStatistics(),y}(t,e,{blockWidths:a});const l=t.find((t=>u(t)));if(null==l)return null;const c=n?n.width:e.width,h=n?n.height:e.height,f=l.width,d=l.height,p=e.width/f,m=e.height/d,g={offset:o||{x:0,y:0},mosaic:n||e,block:{width:f,height:d}},y=l.pixelType,w=s.Z.getPixelArrayConstructor(y),b=l.pixels.length,C=[];let v,x;for(let e=0;e<b;e++){x=new w(c*h);for(let r=0;r<m;r++)for(let o=0;o<p;o++){const n=t[r*p+o];u(n)&&(v=n.pixels[e],k(x,v,g,o,r,i))}C.push(x)}const A=t.some((t=>null==t||null!=t.mask&&t.mask.length>0)),S=t.some((t=>t?.bandMasks&&t.bandMasks.length>1)),T=A?new Uint8Array(c*h):void 0,I=S?[]:void 0;if(T){for(let e=0;e<m;e++)for(let r=0;r<p;r++){const o=t[e*p+r],n=null!=o?o.mask:null;k(T,null!=n?n:o?255:0,g,r,e,i)}if(I)for(let e=0;e<b;e++){const r=new Uint8Array(c*h);for(let o=0;o<m;o++)for(let n=0;n<p;n++){const s=t[o*p+n],a=s?.bandMasks?.[e]??s?.mask;k(r,null!=a?a:s?255:0,g,n,o,i)}I.push(r)}}const M=new s.Z({width:c,height:h,pixels:C,pixelType:y,bandMasks:I,mask:T});return M.updateStatistics(),M}function S(t,e,r){if(!u(t))return null;const{width:o,height:n}=t,i=e.x,s=e.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>o||l>n)return t;if(0===i&&0===s&&a===o&&l===n)return t;t.mask||(t.mask=new Uint8Array(o*n));const c=t.mask;for(let t=0;t<n;t++){const e=t*o;for(let r=0;r<o;r++)c[e+r]=t<s||t>=l||r<i||r>=a?0:1}return t.updateStatistics(),t}function T(t){if(!u(t))return null;const e=t.clone(),{width:r,height:o,pixels:n}=t,i=n[0],s=e.pixels[0],a=t.mask;for(let t=2;t<o-1;t++){const e=new Map;for(let o=t-2;o<t+2;o++)for(let t=0;t<4;t++){const n=o*r+t;P(e,i[n],a?a[n]:1)}s[t*r]=I(e),s[t*r+1]=s[t*r+2]=s[t*r];let o=3;for(;o<r-1;o++){let n=(t-2)*r+o+1;P(e,i[n],a?a[n]:1),n=(t-1)*r+o+1,P(e,i[n],a?a[n]:1),n=t*r+o+1,P(e,i[n],a?a[n]:1),n=(t+1)*r+o+1,P(e,i[n],a?a[n]:1),n=(t-2)*r+o-3,M(e,i[n],a?a[n]:1),n=(t-1)*r+o-3,M(e,i[n],a?a[n]:1),n=t*r+o-3,M(e,i[n],a?a[n]:1),n=(t+1)*r+o-3,M(e,i[n],a?a[n]:1),s[t*r+o]=I(e)}s[t*r+o+1]=s[t*r+o]}for(let t=0;t<r;t++)s[t]=s[r+t]=s[2*r+t],s[(o-1)*r+t]=s[(o-2)*r+t];return e.updateStatistics(),e}function I(t){if(0===t.size)return 0;let e=0,r=-1,o=0;const n=t.keys();let i=n.next();for(;!i.done;)o=t.get(i.value),o>e&&(r=i.value,e=o),i=n.next();return r}function M(t,e,r){if(0===r)return;const o=t.get(e);1===o?t.delete(e):t.set(e,o-1)}function P(t,e,r){0!==r&&t.set(e,t.has(e)?t.get(e)+1:1)}function E(t,e,r){let{x:o,y:n}=e;const{width:i,height:a}=r;if(0===o&&0===n&&a===t.height&&i===t.width)return t;const{width:l,height:c}=t,h=Math.max(0,n),f=Math.max(0,o),d=Math.min(o+i,l),p=Math.min(n+a,c);if(d<0||p<0||!u(t))return null;o=Math.max(0,-o),n=Math.max(0,-n);const{pixels:m}=t,g=i*a,y=m.length,w=[];for(let e=0;e<y;e++){const r=m[e],a=s.Z.createEmptyBand(t.pixelType,g);for(let t=h;t<p;t++){const e=t*l;let s=(t+n-h)*i+o;for(let t=f;t<d;t++)a[s++]=r[e+t]}w.push(a)}const b=new Uint8Array(g),C=t.mask;for(let t=h;t<p;t++){const e=t*l;let r=(t+n-h)*i+o;for(let t=f;t<d;t++)b[r++]=C?C[e+t]:1}const v=new s.Z({width:r.width,height:r.height,pixelType:t.pixelType,pixels:w,mask:b});return v.updateStatistics(),v}function R(t,e=!0){if(!u(t))return null;const{pixels:r,width:o,height:n,mask:i,pixelType:a}=t,l=[],c=Math.round(o/2),h=Math.round(n/2),f=n-1,d=o-1;for(let t=0;t<r.length;t++){const i=r[t],u=s.Z.createEmptyBand(a,c*h);let p=0;for(let t=0;t<n;t+=2)for(let r=0;r<o;r+=2){const n=i[t*o+r];if(e){const e=r===d?n:i[t*o+r+1],s=t===f?n:i[t*o+r+o],a=r===d?s:t===f?e:i[t*o+r+o+1];u[p++]=(n+e+s+a)/4}else u[p++]=n}l.push(u)}let p=null;if(null!=i){p=new Uint8Array(c*h);let t=0;for(let r=0;r<n;r+=2)for(let n=0;n<o;n+=2){const s=i[r*o+n];if(e){const e=n===d?s:i[r*o+n+1],a=r===f?s:i[r*o+n+o],l=n===d?a:r===f?e:i[r*o+n+o+1];p[t++]=s*e*a*l?1:0}else p[t++]=s}}return new s.Z({width:c,height:h,pixelType:a,pixels:l,mask:p})}function L(t,e,r){if(!u(t))return null;const{width:o,height:n}=e;let{width:i,height:s}=t;const a=new Map,l={x:0,y:0},c=null==r?1:1+r;let h=t;for(let t=0;t<c;t++){const r=Math.ceil(i/o),u=Math.ceil(s/n);for(let i=0;i<u;i++){l.y=i*n;for(let n=0;n<r;n++){l.x=n*o;const r=E(h,l,e);a.set(`${t}/${i}/${n}`,r)}}t<c-1&&(h=R(h)),i=Math.round(i/2),s=Math.round(s/2)}return a}function U(t,e,r,o,n=0){const{width:i,height:s}=t,{width:a,height:l}=e,u=o.cols,c=o.rows,h=Math.ceil(a/u-.1/u),f=Math.ceil(l/c-.1/c);let d,p,m,g,y,w,b;const C=h*u,v=C*f*c,x=new Float32Array(v),k=new Float32Array(v),A=new Uint32Array(v),S=new Uint32Array(v);let T,I,M=0;for(let t=0;t<f;t++)for(let e=0;e<h;e++){d=12*(t*h+e),p=r[d],m=r[d+1],g=r[d+2],y=r[d+3],w=r[d+4],b=r[d+5];for(let r=0;r<c;r++){M=(t*c+r)*C+e*u,I=(r+.5)/c;for(let t=0;t<r;t++)T=(t+.5)/u,x[M+t]=(p*T+m*I+g)*i+n,k[M+t]=(y*T+w*I+b)*s+n,A[M+t]=Math.floor(x[M+t]),S[M+t]=Math.floor(k[M+t])}d+=6,p=r[d],m=r[d+1],g=r[d+2],y=r[d+3],w=r[d+4],b=r[d+5];for(let r=0;r<c;r++){M=(t*c+r)*C+e*u,I=(r+.5)/c;for(let t=r;t<u;t++)T=(t+.5)/u,x[M+t]=(p*T+m*I+g)*i+n,k[M+t]=(y*T+w*I+b)*s+n,A[M+t]=Math.floor(x[M+t]),S[M+t]=Math.floor(k[M+t])}}return{offsets_x:x,offsets_y:k,offsets_xi:A,offsets_yi:S,gridWidth:C}}function O(t,e){const{coefficients:r,spacing:o}=e,{offsets_x:n,offsets_y:i,gridWidth:s}=U(t,t,r,{rows:o[0],cols:o[1]}),{width:a,height:l}=t,u=new Float32Array(a*l),c=180/Math.PI;for(let t=0;t<l;t++)for(let e=0;e<a;e++){const r=t*s+e,o=0===t?r:r-s,h=t===l-1?r:r+s,f=n[o]-n[h],d=i[h]-i[o];if(isNaN(f)||isNaN(d))u[t*a+e]=90;else{let r=Math.atan2(d,f)*c;r=(360+r)%360,u[t*a+e]=r}}return u}function D(t,e,r,o,n="nearest"){if(!u(t))return null;"majority"===n&&(t=T(t));const{pixels:i,mask:a,bandMasks:l,pixelType:c}=t,h=t.width,f=t.height,d=s.Z.getPixelArrayConstructor(c),p=i.length,{width:m,height:g}=e;let y=!1;for(let t=0;t<r.length;t+=3)-1===r[t]&&-1===r[t+1]&&-1===r[t+2]&&(y=!0);const{offsets_x:w,offsets_y:b,offsets_xi:C,offsets_yi:v,gridWidth:x}=U({width:h,height:f},e,r,o,"majority"===n?.5:0);let k;const A=(t,e,r,o)=>{const n=t instanceof Float32Array||t instanceof Float64Array?0:.5;for(let i=0;i<g;i++){k=i*x;for(let s=0;s<m;s++){if(w[k]<0||b[k]<0)t[i*m+s]=0;else if(o)t[i*m+s]=e[C[k]+v[k]*h];else{const o=Math.floor(w[k]),a=Math.floor(b[k]),l=Math.ceil(w[k]),u=Math.ceil(b[k]),c=w[k]-o,f=b[k]-a;if(!r||r[o+a*h]&&r[l+a*h]&&r[o+u*h]&&r[l+u*h]){const r=(1-c)*e[o+a*h]+c*e[l+a*h],d=(1-c)*e[o+u*h]+c*e[l+u*h];t[i*m+s]=(1-f)*r+f*d+n}else t[i*m+s]=e[C[k]+v[k]*h]}k++}}},S=[];let I;const M=l?.length===p,P=[];for(let t=0;t<p;t++){if(M){const e=new Uint8Array(m*g);A(e,l[t],l[t],!0),P.push(e)}I=new d(m*g),A(I,i[t],M?l[t]:a,"nearest"===n||"majority"===n),S.push(I)}const E=new s.Z({width:m,height:g,pixelType:c,pixels:S,bandMasks:M?P:void 0});if(null!=a)E.mask=new Uint8Array(m*g),A(E.mask,a,a,!0);else if(y){E.mask=new Uint8Array(m*g);for(let t=0;t<m*g;t++)E.mask[t]=w[t]<0||b[t]<0?0:1}return E.updateStatistics(),E}},15612:(t,e,r)=>{r.d(e,{AV:()=>y,Hv:()=>m,Oh:()=>g,ZF:()=>f,dy:()=>b,gI:()=>h,hE:()=>c,js:()=>p,oc:()=>u,um:()=>w});var o=r(70586),n=r(5847),i=r(81578),s=r(75509);const a=1,l=[.299,.587,.114];function u(t,e=256){e=Math.min(e,256);const{size:r,counts:o}=t,n=new Uint8Array(r),i=o.reduce(((t,r)=>t+r/e),0);let s=0,a=0,l=0,u=i;for(let t=0;t<r;t++)if(l+=o[t],!(t<r-1&&l+o[t+1]<u)){for(;s<e-1&&u<l;)s++,u+=i;for(let e=a;e<=t;e++)n[e]=s;a=t+1}for(let t=a;t<r;t++)n[t]=e-1;return n}function c(t){const{minCutOff:e,maxCutOff:r,gamma:o,pixelType:n,rounding:i}=t,s=t.outMin||0,a=t.outMax||255;if(!["u8","u16","s8","s16"].includes(n))return null;const l=e.length;let u,c,f=0;"s8"===n?f=-127:"s16"===n&&(f=-32767);let d=256;["u16","s16"].includes(n)&&(d=65536);const p=[],m=[],g=a-s;for(u=0;u<l;u++)m[u]=r[u]-e[u],p[u]=0===m[u]?0:g/m[u];let y;const b=[];let C,v,x;if(o&&o.length>=l){const t=w(l,o);for(u=0;u<l;u++){for(x=[],c=0;c<d;c++)if(0!==m[u])if(C=c+f,y=(C-e[u])/m[u],v=1,o[u]>1&&(v-=(1/g)**(y*t[u])),C<r[u]&&C>e[u]){const t=v*g*y**(1/o[u])+s;x[c]="floor"===i?Math.floor(t):"round"===i?Math.round(t):t}else C>=r[u]?x[c]=a:x[c]=s;else x[c]=s;b[u]=x}}else for(u=0;u<l;u++){for(x=[],c=0;c<d;c++)if(C=c+f,C<=e[u])x[c]=s;else if(C>=r[u])x[c]=a;else{const t=(C-e[u])*p[u]+s;x[c]="floor"===i?Math.floor(t):"round"===i?Math.round(t):t}b[u]=x}if(null!=t.contrastOffset){const e=h(t.contrastOffset,t.brightnessOffset);for(u=0;u<l;u++)for(x=b[u],c=0;c<d;c++)x[c]=e[x[c]]}return{lut:b,offset:f}}function h(t,e){const r=Math.min(Math.max(t,-100),100),o=Math.min(Math.max(e??0,-100),100);let n=0,i=0;const s=new Uint8Array(256);for(n=0;n<256;n++)r>0&&r<100?i=(200*n-25500+510*o)/(2*(100-r))+128:r<=0&&r>-100?i=(200*n-25500+510*o)*(100+r)/2e4+128:100===r?(i=200*n-25500+256*(100-r)+510*o,i=i>0?255:0):-100===r&&(i=128),s[n]=i>255?255:i<0?0:i;return s}function f(t,e,r){const o=[];for(let n=0;n<e.length;n++){let i=0,s=0,a=0;"min"in e[n]?({min:i,max:s,avg:a}=e[n]):[i,s,a]=e[n];let u=a??0;"u8"!==t&&(u=255*(u-i)/(s-i)),r&&(u*=l[n]),o.push(d(u))}return o}function d(t){if(t<=0||t>=255)return a;let e=0;150!==t&&(e=t<=150?45*Math.cos(.01047*t):17*Math.sin(.021*t));const r=t+e,o=Math.log(t/255),n=Math.log(r/255);if(0===n)return a;const i=o/n;return isNaN(i)?a:Math.min(9.9,Math.max(.01,i))}function p(t){const{pixels:e,mask:r,pixelType:o,bandMasks:n}=t,i=e.map(((t,e)=>function(t,e,r,o){let n=1/0,i=-1/0,s=0,a=0,l=0,u=0;const c=t.length,h=new Map,f=[];for(let r=0;r<c;r++){const o=t[r];if(!e||e[r]){f.push(o);const t=(h.get(o)??0)+1;h.set(o,t),t>u&&(u=t,l=o),n=o<n?o:n,i=o>i?o:i,s+=o,a++}}if(0===a)return{statistics:{min:0,max:0,avg:0,stddev:0,mode:0,median:0},histogram:null};const d=s/a;let p=0;for(let r=0;r<c;r++)e&&!e[r]||(p+=(t[r]-d)**2);const m=e?e.filter((t=>t)).length:c,g=m<=1?0:Math.sqrt(p/(m-1));f.sort(((t,e)=>t-e));const y=a>>>1,w={min:n,max:i,avg:d,stddev:g,mode:l,median:a%2?f[Math.floor(y)]:(f[y-1]+f[y])/2};if(["u8","s8","u4","u2","u1"].includes(r)){const r=i-n+1,o=new Uint32Array(r);for(let r=0;r<c;r++)e&&!e[r]||o[t[r]-n]++;return{statistics:w,histogram:{min:n-.5,max:i+.5,size:r,counts:o}}}const b=256,C=new Uint32Array(b),v=(i-n)/b;if(0===v)return{statistics:w,histogram:{min:n,max:i,size:1,counts:new Uint32Array(1).fill(a)}};const x=new Uint32Array(257);for(let r=0;r<c;r++)e&&!e[r]||x[Math.floor((t[r]-n)/v)]++;for(let t=0;t<255;t++)C[t]=x[t];return C[255]=x[255]+x[b],{statistics:w,histogram:{min:n,max:i,size:b,counts:C}}}(t,n?.[e]??r,o)));return{statistics:i.map((({statistics:t})=>t)),histograms:i.map((({histogram:t})=>t))}}function m(t){if(!t?.pixels?.length)return null;const{pixels:e,mask:r,bandMasks:o,pixelType:n}=t,i=t.width*t.height,s=e.length;let a,l,u,c,h;const f=[],d=[];let p,m,g,y,w,b,C,v,x,k;const A=256;for(c=0;c<s;c++){p=new Uint32Array(A),g=e[c];const s=o?.[c]??r;if("u8"===n)if(a=-.5,l=255.5,s)for(h=0;h<i;h++)s[h]&&p[g[h]]++;else for(h=0;h<i;h++)p[g[h]]++;else{let e=!1;t.statistics||(t.updateStatistics(),e=!0);const r=t.statistics;if(a=r[c].minValue,l=r[c].maxValue,u=(l-a)/A,0===u){!r||t.validPixelCount||e||t.updateStatistics();const o=(t.validPixelCount||t.width*t.height)/A;for(let t=0;t<A;t++)p[t]=Math.round(o*(t+1))-Math.round(o*t)}else{for(m=new Uint32Array(257),h=0;h<i;h++)s&&!s[h]||m[Math.floor((g[h]-a)/u)]++;for(h=0;h<255;h++)p[h]=m[h];p[255]=m[255]+m[A]}}for(f.push({min:a,max:l,size:A,counts:p}),y=0,w=0,v=0,h=0;h<A;h++)y+=p[h],w+=h*p[h];for(x=w/y,h=0;h<A;h++)v+=p[h]*(h-x)**2;k=Math.sqrt(v/(y-1)),u=(l-a)/A,b=(x+.5)*u+a,C=k*u,d.push({min:a,max:l,avg:b,stddev:C})}return{statistics:d,histograms:f}}function g(t){const e=[];for(let r=0;r<t.length;r++){const{min:o,max:n,size:i,counts:s}=t[r];let a=0,l=0;for(let t=0;t<i;t++)a+=s[t],l+=t*s[t];const u=l/a;let c=0;for(let t=0;t<i;t++)c+=s[t]*(t-u)**2;const h=(n-o)/i,f=(u+.5)*h+o,d=Math.sqrt(c/(a-1))*h;e.push({min:o,max:n,avg:f,stddev:d})}return e}function y(t,e){const{pixelBlock:r,bandIds:n,returnHistogramLut:a,rasterInfo:l}=e;let c=null,h=null,f=t.stretchType;if("number"==typeof f&&(f=s.J[f]),t.dra)if("minMax"===f&&r?.statistics)c=r.statistics.map((t=>[t.minValue,t.maxValue,0,0]));else{const t=m(r);c=null!=t?t.statistics:null,h=null!=t?t.histograms:null}else c=t.statistics?.length?t.statistics:l.statistics,h="histograms"in t?t.histograms:void 0,h||(h=l.histograms);"percentClip"!==f&&"histogramEqualization"!==f||h?.length||(f="minMax");const d=c?.length||h?.length||l.bandCount,p=[],g=[];let y,w,b,C,v,x,k,A,S;c&&!Array.isArray(c[0])&&(c=c.map((t=>[t.min,t.max,t.avg,t.stddev])));const[T,I]=(0,i.r)(l.pixelType);if(!c?.length){for(c=[],A=0;A<d;A++)c.push([T,I,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(A=0;A<d;A++)p[A]=T,g[A]=I;break;case"minMax":for(A=0;A<d;A++){const t=c[A];p[A]=t[0],g[A]=t[1]}break;case"standardDeviation":{const{numberOfStandardDeviations:e=2}=t;for(A=0;A<d;A++){const t=c[A];p[A]=t[2]-e*t[3],g[A]=t[2]+e*t[3],p[A]<t[0]&&(p[A]=t[0]),g[A]>t[1]&&(g[A]=t[1])}}break;case"histogramEqualization":for((0,o.O3)(h),A=0;A<d;A++)p[A]=h[A].min,g[A]=h[A].max;break;case"percentClip":for((0,o.O3)(h),A=0;A<h.length;A++){for(y=h[A],v=new Uint32Array(y.size),C=[...y.counts],C.length>=20&&(C[0]=C[1]=C[2]=C[C.length-1]=C[C.length-2]=0),b=0,w=(y.max-y.min)/y.size,k=-.5===y.min&&1===w?.5:0,S=0;S<y.size;S++)b+=C[S],v[S]=b;for(x=(t.minPercent||0)*b/100,p[A]=y.min+k,S=0;S<y.size;S++)if(v[S]>x){p[A]=y.min+w*(S+k);break}for(x=(1-(t.maxPercent||0)/100)*b,g[A]=y.max+k,S=y.size-2;S>=0;S--)if(v[S]<x){g[A]=y.min+w*(S+2-k);break}if(g[A]<p[A]){const t=p[A];p[A]=g[A],g[A]=t}}break;default:for(A=0;A<d;A++){const t=c[A];p[A]=t[0],g[A]=t[1]}}let M,P,E;return"histogramEqualization"===f?((0,o.O3)(h),P=h[0].size||256,M=0,a&&(E=h.map((t=>u(t))))):(P=t.max||255,M=t.min||0),function(t,e){if(null==e||0===e.length)return t;const r=Math.max.apply(null,e),{minCutOff:o,maxCutOff:n,outMin:i,outMax:s,histogramLut:a}=t;return o.length===e.length||o.length<=r?t:{minCutOff:e.map((t=>o[t])),maxCutOff:e.map((t=>n[t])),histogramLut:a?e.map((t=>a[t])):null,outMin:i,outMax:s}}({minCutOff:p,maxCutOff:g,outMax:P,outMin:M,histogramLut:E},n)}function w(t,e){const r=new Float32Array(t);for(let o=0;o<t;o++)e[o]>1?e[o]>2?r[o]=6.5+(e[o]-2)**2.5:r[o]=6.5+100*(2-e[o])**4:r[o]=1;return r}function b(t,e){if(!t?.pixels?.length)return t;const{mask:r,bandMasks:o,width:i,height:s,pixels:a}=t,{minCutOff:l,maxCutOff:u,gamma:c}=e,h=e.outMin||0,f=e.outMax||255,d=i*s,p=e.outputPixelType||"u8",m=t.pixels.map((()=>n.Z.createEmptyBand(p,d))),g=m.length,y=f-h,b=[],C=[];for(let t=0;t<g;t++)C[t]=u[t]-l[t],b[t]=0===C[t]?0:y/C[t];const v=p.startsWith("u")||p.startsWith("s"),x=c&&c.length>=g,k=!!e.isRenderer;if(x){const t=w(g,c);for(let e=0;e<g;e++){const n=o?.[e]??r;for(let r=0;r<d;r++)if(null==n||n[r]){if(0===C[e]){m[e][r]=h;continue}const o=a[e][r],n=(o-l[e])/C[e];let i=1;if(c[e]>1&&(i-=(1/y)**(n*t[e])),o<u[e]&&o>l[e]){const t=i*y*n**(1/c[e])+h;m[e][r]=k?Math.floor(t):v?Math.round(t):t}else o>=u[e]?m[e][r]=f:m[e][r]=h}}}else for(let t=0;t<g;t++){const e=o?.[t]??r;for(let r=0;r<d;r++)if(null==e||e[r]){const e=a[t][r];if(e<u[t]&&e>l[t]){const o=(e-l[t])*b[t]+h;m[t][r]=k?Math.floor(o):v?Math.round(o):o}else e>=u[t]?m[t][r]=f:m[t][r]=h}}const A=new n.Z({width:i,height:s,mask:r,bandMasks:o,pixels:m,pixelType:p});return A.updateStatistics(),A}},63342:(t,e,r)=>{r.d(e,{M_:()=>d,Ne:()=>p,TK:()=>a,Ub:()=>h,_p:()=>s,vC:()=>c,yg:()=>f});var o=r(5847),n=r(55914);const i=1,s=1/111e3;function a(t){let{altitude:e,azimuth:r}=t;const{hillshadeType:o,pixelSizePower:n=1,pixelSizeFactor:i=1,scalingType:a,isGCS:l,resolution:u}=t,c="multi-directional"===o?2*t.zFactor:t.zFactor,{x:h,y:f}=u;let d=c/(8*h),p=c/(8*f);if(l&&c>.001&&(d/=s,p/=s),"adjusted"===a)if(l){const t=h*s,e=f*s;d=(c+t**n*i)/(8*t),p=(c+e**n*i)/(8*e)}else d=(c+h**n*i)/(8*h),p=(c+f**n*i)/(8*f);let m=(90-e)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y);const C=[315,270,225,360,180,0],v=[60,60,60,60,60,90],x=new Float32Array([3,5,3,2,1,4]),k=x.reduce(((t,e)=>t+e)),A=x.map((t=>t/k)),S="multi-directional"===o?C.length:1,T=new Float32Array(6),I=new Float32Array(6),M=new Float32Array(6);if("multi-directional"===o)for(let t=0;t<S;t++)e=v[t],r=C[t],m=(90-e)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y),T[t]=g,I[t]=w,M[t]=b;else T.fill(g),I.fill(w),M.fill(b);return{resolution:u,factor:[d,p],sinZcosA:w,sinZsinA:b,cosZ:g,sinZcosAs:I,sinZsinAs:M,cosZs:T,weights:A,hillshadeType:["traditional","multi-directional"].indexOf(o)}}function l(t,e){const{width:r,height:o}=t,n=r*o,s=new Uint8Array(n),a=null!=t.mask;let l;if(a){l=new Uint8Array(t.mask);for(let t=0;t<l.length;t++)l[t]&&(s[t]=1,l[t]=1)}const u=t.pixels[0],c=new Float32Array(n),h=new Float32Array(n);let f,d=0;if(e){const{resolution:t}=e,r=t?(t.x+t.y)/2:1;d=200*e.zFactor/(r*r),f=new Float32Array(n)}const p=e?.curvatureType;let m,g,y,w,b,C,v,x;for(let t=i;t<o-i;t++){const e=t*r;for(let t=i;t<r-i;t++){const o=e+t;if(!l||0!==l[o]){if(l){if(l[o-r-1]+l[o-r]+l[o-r+1]+l[o-1]+l[o+1]+l[o+r-1]+l[o+r]+l[o+r+1]<7){s[o]=0;continue}m=l[o-r-1]?u[o-r-1]:u[o],g=l[o-r]?u[o-r]:u[o],y=l[o-r+1]?u[o-r+1]:u[o],w=l[o-1]?u[o-1]:u[o],b=l[o+1]?u[o+1]:u[o],C=l[o+r-1]?u[o+r-1]:u[o],v=l[o+r]?u[o+r]:u[o],x=l[o+r+1]?u[o+r+1]:u[o]}else m=u[o-r-1],g=u[o-r],y=u[o-r+1],w=u[o-1],b=u[o+1],C=u[o+r-1],v=u[o+r],x=u[o+r+1];if(c[o]=y+b+b+x-(m+w+w+C),h[o]=C+v+v+x-(m+g+g+y),null!=f){const t=u[o],e=.5*(w+b)-t,r=.5*(g+v)-t;if("standard"===p)f[o]=-d*(e+r);else{const t=(-m+y+C-x)/4,n=(-w+b)/2,i=(g-v)/2,s=n*n,a=i*i,l=s+a;l&&(f[o]="profile"===p?d*(e*s+r*a+t*n*i)/l:-d*(e*a+r*s-t*n*i)/l)}}}}}return{outMask:a?s:null,dzxs:c,dzys:h,curvatures:f}}function u(t,e,r){for(let o=0;o<r;o++)t[o*e]=t[o*e+1],t[(o+1)*e-1]=t[(o+1)*e-2];for(let o=1;o<e-1;o++)t[o]=t[o+e],t[o+(r-1)*e]=t[o+(r-2)*e]}function c(t,e){if(!(0,n.nk)(t))return t;const{factor:r,sinZcosA:s,sinZsinA:c,cosZ:h,sinZcosAs:f,sinZsinAs:d,cosZs:p,weights:m}=a(e),[g,y]=r,w="traditional"===e.hillshadeType,{width:b,height:C}=t,v=new Uint8Array(b*C),{dzxs:x,dzys:k,outMask:A}=l(t);for(let t=i;t<C-i;t++){const e=t*b;for(let t=i;t<b-i;t++){const r=e+t;if(!A||A[r]){const t=x[r]*g,e=k[r]*y,o=Math.sqrt(1+t*t+e*e);let n=0;if(w){let r=255*(h+c*e-s*t)/o;r<0&&(r=0),n=r}else{const r=d.length;for(let i=0;i<r;i++){let r=255*(p[i]+d[i]*e-f[i]*t)/o;r<0&&(r=0),n+=r*m[i]}}v[r]=255&n}}}return u(v,b,C),new o.Z({width:b,height:C,pixels:[v],mask:A,pixelType:"u8",validPixelCount:t.validPixelCount,statistics:[{minValue:0,maxValue:255}]})}function h(t,e,r,o){if(!(0,n.nk)(t)||!(0,n.nk)(e))return;const{min:i,max:s}=o,a=t.pixels[0],{pixels:l,mask:u}=e,c=l[0],h=255.00001/(s-i),f=new Uint8ClampedArray(c.length),d=new Uint8ClampedArray(c.length),p=new Uint8ClampedArray(c.length),m=r.length-1;for(let t=0;t<c.length;t++){if(u&&0===u[t])continue;const e=Math.floor((c[t]-i)*h),[o,n]=r[e<0?0:e>m?m:e],s=a[t],l=s*n,g=l*(1-Math.abs(o%2-1)),y=s-l;switch(Math.floor(o)){case 0:f[t]=l+y,d[t]=g+y,p[t]=y;break;case 1:f[t]=g+y,d[t]=l+y,p[t]=y;break;case 2:f[t]=y,d[t]=l+y,p[t]=g+y;break;case 3:f[t]=y,d[t]=g+y,p[t]=l+y;break;case 4:f[t]=g+y,d[t]=y,p[t]=l+y;break;case 5:case 6:f[t]=l+y,d[t]=y,p[t]=g+y}}t.pixels=[f,d,p],t.updateStatistics()}function f(t,e){if(!(0,n.nk)(t))return t;const r=e.zFactor,a=e.pixelSizePower??1,c=e.pixelSizeFactor??1,h=e.slopeType,f=e.isGCS,{x:d,y:p}=e.resolution;let m=r/(8*d),g=r/(8*p);f&&Math.abs(r-1)<1e-4&&(m/=s,g/=s),"adjusted"===h&&(m=(r+d**a*c)/(8*d),g=(r+p**a*c)/(8*p));const{dzxs:y,dzys:w,outMask:b}=l(t),{width:C,height:v}=t,x=new Float32Array(C*v);for(let t=i;t<v-i;t++){const e=t*C;for(let t=i;t<C-i;t++){const r=e+t;if(!b||b[r]){const o=y[r]*m,n=w[r]*g,i=Math.sqrt(o*o+n*n);x[e+t]="percent-rise"===h?100*i:57.2957795*Math.atan(i)}}}u(x,C,v);const k=new o.Z({width:C,height:v,pixels:[x],mask:b,pixelType:"f32",validPixelCount:t.validPixelCount});return k.updateStatistics(),k}function d(t,e={}){if(!(0,n.nk)(t))return t;const{resolution:r}=e,s=r?1/r.x:1,a=r?1/r.y:1,{dzxs:c,dzys:h,outMask:f}=l(t),{width:d,height:p}=t,m=new Float32Array(d*p);for(let t=i;t<p-i;t++){const e=t*d;for(let t=i;t<d-i;t++){const r=e+t;if(!f||f[r]){const o=c[r]*s,n=h[r]*a;let i=-1;0===o&&0===n||(i=90-57.29578*Math.atan2(n,-o),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),m[e+t]=i}}}return u(m,d,p),new o.Z({width:d,height:p,pixels:[m],mask:f,pixelType:"f32",validPixelCount:t.validPixelCount,statistics:[{minValue:-1,maxValue:360}]})}function p(t,e){if(!(0,n.nk)(t))return t;const{curvatures:r,outMask:i}=l(t,e),{width:s,height:a}=t;u(r,s,a);const c=new o.Z({width:s,height:a,pixels:[r],mask:i,pixelType:"f32",validPixelCount:t.validPixelCount});return c.updateStatistics(),c}},80676:(t,e,r)=>{r.d(e,{KC:()=>p,NL:()=>l,QI:()=>m,Tg:()=>h,Yx:()=>u,xQ:()=>d});var o=r(35454),n=r(5847),i=r(55914);const s=new Map;s.set("meter-per-second",1),s.set("kilometer-per-hour",.277778),s.set("knots",.514444),s.set("feet-per-second",.3048),s.set("mile-per-hour",.44704);const a=180/Math.PI,l=new o.X({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(t,e){return s.get(t)/s.get(e)||1}function c(t){return(450-t)%360}function h(t,e="geographic"){const[r,o]=t,n=Math.sqrt(r*r+o*o);let i=Math.atan2(o,r)*a;return i=(360+i)%360,"geographic"===e&&(i=c(i)),[n,i]}function f(t,e="geographic"){let r=t[1];"geographic"===e&&(r=c(r)),r%=360;const o=t[0];return[o*Math.cos(r/a),o*Math.sin(r/a)]}function d(t,e,r,o="geographic"){if(!(0,i.nk)(t)||null==r)return t;const n="vector-magdir"===e?t.clone():p(t,e),s=n.pixels[1];for(let t=0;t<s.length;t++)s[t]="geographic"===o?(s[t]+r[t]+270)%360:(s[t]+360-r[t])%360;return"vector-magdir"===e?n:p(n,"vector-magdir")}function p(t,e,r="geographic",o=1){if(!(0,i.nk)(t))return t;const{pixels:s,width:a,height:l}=t,u=a*l,c=s[0],d=s[1],p=t.pixelType.startsWith("f")?t.pixelType:"f32",m=n.Z.createEmptyBand(p,u),g=n.Z.createEmptyBand(p,u);let y=0;for(let t=0;t<l;t++)for(let t=0;t<a;t++)"vector-uv"===e?([m[y],g[y]]=h([c[y],d[y]],r),m[y]*=o):([m[y],g[y]]=f([c[y],d[y]],r),m[y]*=o,g[y]*=o),y++;const w=new n.Z({pixelType:p,width:t.width,height:t.height,mask:t.mask,validPixelCount:t.validPixelCount,maskIsAlpha:t.maskIsAlpha,pixels:[m,g]});return w.updateStatistics(),w}function m(t,e,r=1){if(1===r||!(0,i.nk)(t))return t;const o=t.clone(),{pixels:n,width:s,height:a}=o,l=n[0],u=n[1];let c=0;for(let t=0;t<a;t++)for(let t=0;t<s;t++)"vector-uv"===e?(l[c]*=r,u[c]*=r):l[c]*=r,c++;return o.updateStatistics(),o}function g(t,e,r,o=1){const n=Math.sqrt(t*t+e*e)/o,i=(2*Math.PI+Math.atan2(e,t))%(2*Math.PI);return[n,(2*Math.PI+i-r)%(2*Math.PI)]}!function(t=0,e=0,r=Math.PI,o=!0){o&&(r=(2*Math.PI-r)%(2*Math.PI));const n=o?-1:1,i=13*n,s=-7*n,a=-2*n,l=-16*n,u=21.75,[c,h]=g(0,e+i,r,u),[f,d]=g(t-5.5,e+s,r,u),[p,m]=g(t+5.5,e+s,r,u),[y,w]=g(t-1.5,e+a,r,u),[b,C]=g(t+1.5,e+a,r,u),[v,x]=g(t-1.5,e+l,r,u),[k,A]=g(t+1.5,e+l,r,u)}(0,0,0)},72758:(t,e,r)=>{r.d(e,{Z:()=>y});var o=r(43697),n=r(3892),i=r(96674),s=r(92604),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),u=r(25972),c=r(55914),h=r(15612),f=r(63342),d=r(93010),p=r(12163);let m=class extends i.wq{constructor(t){super(t)}bind(){const{rendererJSON:t}=this;if(!t)return{success:!1};let e;switch(this.lookup={rendererJSON:{}},t.type){case"uniqueValue":e=this._updateUVRenderer(t);break;case"rasterColormap":e=this._updateColormapRenderer(t);break;case"rasterStretch":e=this._updateStretchRenderer(t);break;case"classBreaks":e=this._updateClassBreaksRenderer(t);break;case"rasterShadedRelief":e=this._updateShadedReliefRenderer(t);break;case"vectorField":e=this._updateVectorFieldRenderer();break;case"flowRenderer":e=this._updateFlowRenderer()}return e}symbolize(t){let e=t?.pixelBlock;if(!g(e))return e;if(t.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(e,t.simpleStretchParams);try{let r;switch(e.pixels.length>3&&(e=e.extractBands([0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(e);break;case"classBreaks":r=this._symbolizeClassBreaks(e);break;case"rasterStretch":r=this._symbolizeStretch(e,t.bandIds);break;case"rasterShadedRelief":{const o=t.extent,n=o.spatialReference.isGeographic,i={x:(o.xmax-o.xmin)/e.width,y:(o.ymax-o.ymin)/e.height};r=this._symbolizeShadedRelief(e,{isGCS:n,resolution:i});break}}return r}catch(t){return s.Z.getLogger(this).error("symbolize",t.message),e}}simpleStretch(t,e){if(!g(t))return t;try{return t.pixels.length>3&&(t=t.extractBands([0,1,2])),(0,h.dy)(t,{...e,isRenderer:!0})}catch(e){return s.Z.getLogger(this).error("symbolize",e.message),t}}generateWebGLParameters(t){if(["uniqueValue","rasterColormap","classBreaks"].includes(this.rendererJSON.type)){const{indexedColormap:t,offset:e}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:e,type:"lut"}}const{pixelBlock:e,isGCS:r,resolution:o,bandIds:n}=t,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(e,i,n):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,r,o??void 0):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(t){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const e=this.rendererJSON.colorRamp;return t?JSON.stringify(e)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(t){return this._isLUTChanged()&&!this.bind().success?t:(0,c.SJ)(t,this.lookup.colormapLut)}_symbolizeClassBreaks(t){const{canUseIndexedLUT:e}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?t:e?(0,c.SJ)(t,this.lookup.colormapLut):(0,c.zp)(t,this.lookup.remapLut??[])}_symbolizeStretch(t,e){const{rasterInfo:r}=this,{pixelType:o,bandCount:n}=r,i=this.rendererJSON,s=["u8","u16","s8","s16"].includes(o);let a,l;const{dra:u}=i,{gamma:f}=this.lookup;if("histogramEqualization"===i.stretchType){const o=u?null:this.lookup?.histogramLut,n=(0,h.AV)(i,{rasterInfo:r,pixelBlock:t,bandIds:e,returnHistogramLut:!o}),s=(0,h.dy)(t,{...n,gamma:f,isRenderer:!0});l=(0,c.XV)(s,{lut:u?n.histogramLut:o,offset:0})}else if(s){if(u){const n=(0,h.AV)(i,{rasterInfo:r,pixelBlock:t,bandIds:e});a=(0,h.hE)({pixelType:o,...n,gamma:f,rounding:"floor"})}else if(this._isLUTChanged()){if(!this.bind().success)return t;a=this.lookup?this.lookup.stretchLut:null}else a=this.lookup?this.lookup.stretchLut:null;if(!a)return t;n>1&&null!=e&&e.length===t?.pixels.length&&a?.lut.length===n&&(a={lut:e.map((t=>a.lut[t])),offset:a.offset}),l=(0,c.XV)(t,a)}else{const o=(0,h.AV)(i,{rasterInfo:r,pixelBlock:t,bandIds:e});l=(0,h.dy)(t,{...o,gamma:f,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return t;l=(0,c.SJ)(l,this.lookup?.colormapLut)}return l}_symbolizeShadedRelief(t,e){const r=this.rendererJSON,o={...r,...e},n=(0,f.vC)(t,o);if(!r.colorRamp)return n;let i;if(this._isLUTChanged(!0)){if(!this.bind().success)return n;i=this.lookup?this.lookup.hsvMap:null}else i=this.lookup?this.lookup.hsvMap:null;if(!i)return n;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,f.Ub)(n,t,i,s),n}_isVectorFieldData(){const{bandCount:t,dataType:e}=this.rasterInfo;return 2===t&&("vector-magdir"===e||"vector-uv"===e)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(t){const{bandCount:e,attributeTable:r,pixelType:o}=this.rasterInfo,n=t.field1;if(!n)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=t.defaultSymbol,s=1===e&&["u8","s8"].includes(o);if(!(0,p.MG)(this.rasterInfo,n)&&!s)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const a=[];if(null!=r){const e=r.fields.find((t=>"value"===t.name.toLowerCase()));if(!e)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach((r=>{const o=t.uniqueValueInfos?.find((t=>String(t.value)===String(r.attributes[n]))),s=o?.symbol?.color;s?a.push([r.attributes[e.name]].concat(s)):i&&a.push([r.attributes[e.name]].concat(i.color))}))}else{if("value"!==n.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not availalbe.'};t.uniqueValueInfos?.forEach((t=>{const e=t?.symbol?.color;e?a.push([parseInt(""+t.value,10)].concat(e)):i&&a.push([parseInt(""+t.value,10)].concat(i?.color))}))}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=(0,c.Pz)({colormap:a});return this.lookup={rendererJSON:t,colormapLut:l},this.canRenderInWebGL=!0,{success:!0}}_updateColormapRenderer(t){if(!(0,p.mO)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const e=t.colormapInfos.map((t=>[t.value].concat(t.color))).sort(((t,e)=>t[0]-e[0]));if(!e||0===e.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=(0,c.Pz)({colormap:e});return this.lookup={rendererJSON:t,colormapLut:r},this.canRenderInWebGL=!0,{success:!0}}_updateShadedReliefRenderer(t){if(!(0,p.jX)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(t.colorRamp){const e=(0,d.Jw)(t.colorRamp,{interpolateAlpha:!0}),r=(0,c.Pz)({colormap:e}),o=[],i=r.indexedColormap;for(let t=0;t<i.length;t+=4){const e=(0,n._Y)({r:i[t],g:i[t+1],b:i[t+2]});o.push([e.h/60,e.s/100,255*e.v/100])}this.lookup={rendererJSON:t,colormapLut:r,hsvMap:o}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(t){const{attributeTable:e,pixelType:r}=this.rasterInfo,o=null!=e?e.fields.find((t=>"value"===t.name.toLowerCase())):null,n=null!=e?e.fields.find((e=>e.name.toLowerCase()===t.field.toLowerCase())):null,i=null!=o&&null!==n;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:o,tableBreakField:n}}_updateClassBreaksRenderer(t){const{attributeTable:e}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:o,tableBreakField:n}=this._analyzeClassBreaks(t),i=t.classBreakInfos;if(!i?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const s=i.sort(((t,e)=>t.classMaxValue-e.classMaxValue)),a=s[s.length-1];let l=t.minValue;if(!r){const e=[];for(let t=0;t<s.length;t++)e.push({value:s[t].classMinValue??l,mappedColor:s[t].symbol.color}),l=s[t].classMaxValue;return e.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:t,remapLut:e},this.canRenderInWebGL=!1,{success:!0}}const u=[];if(null!=e&&null!=o&&null!==n&&o!==n){const r=o.name,i=n.name,a=s[s.length-1],{classMaxValue:c}=a;l=t.minValue;for(const t of e.features){const e=t.attributes[r],o=t.attributes[i],n=o===c?a:o<l?null:s.find((({classMaxValue:t})=>t>o));n&&u.push([e].concat(n.symbol.color))}}else{l=Math.floor(t.minValue);for(let t=0;t<s.length;t++){const e=s[t];for(let t=l;t<e.classMaxValue;t++)u.push([t].concat(e.symbol.color));l=Math.ceil(e.classMaxValue)}a.classMaxValue===l&&u.push([a.classMaxValue].concat(a.symbol.color))}const h=(0,c.Pz)({colormap:u,fillUnspecified:!1});return this.lookup={rendererJSON:t,colormapLut:h},this.canRenderInWebGL=!0,{success:!0}}_isHistogramRequired(t){return"percentClip"===t||"histogramEqualization"===t}_isValidRasterStatistics(t){return null!=t&&t.length>0&&null!=t[0].min&&null!=t[0].max}_updateStretchRenderer(t){let{stretchType:e,dra:r}=t;if(!("none"===e||t.statistics?.length||this._isValidRasterStatistics(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const o=t.histograms||this.rasterInfo.histograms;!this._isHistogramRequired(t.stretchType)||o?.length||r||(e="minMax");const{computeGamma:n,useGamma:i,colorRamp:s}=t;let{gamma:a}=t;if(i&&n&&!a?.length){const e=t.statistics?.length?t.statistics:this.rasterInfo.statistics;a=(0,h.ZF)(this.rasterInfo.pixelType,e)}const l=this.rasterInfo.pixelType,u=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===e){const e=o.map((t=>(0,h.oc)(t)));this.lookup={rendererJSON:t,histogramLut:e}}else if(u){const e=(0,h.AV)(t,{rasterInfo:this.rasterInfo}),r=(0,h.hE)({pixelType:l,...e,gamma:i?a:null,rounding:"floor"});this.lookup={rendererJSON:t,stretchLut:r}}if(s){const e=(0,d.Jw)(s,{interpolateAlpha:!0});this.lookup||(this.lookup={rendererJSON:t}),this.lookup.colormapLut=(0,c.Pz)({colormap:e}),this.lookup.rendererJSON=t}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL=!0,{success:!0}}_generateStretchWebGLParams(t,e,r){let o=null,n=null;const i=this.lookup?.colormapLut;e.colorRamp&&i&&(o=i.indexedColormap,n=i.offset),"histogramEqualization"===e.stretchType&&(e={...e,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!!(e.useGamma&&s&&s.some((t=>1!==t))),{minCutOff:l,maxCutOff:u,outMin:c,outMax:f}=(0,h.AV)(e,{rasterInfo:this.rasterInfo,pixelBlock:t,bandIds:r});let d=0;null!=t&&(d=t.getPlaneCount(),2===d&&((t=t.clone()).statistics=[t.statistics[0]],t.pixels=[t.pixels[0]]));const{bandCount:p}=this.rasterInfo,m=Math.min(3,r?.length||d||p,p),g=new Float32Array(m),y=o||a?1:255;let w;for(w=0;w<l.length;w++)g[w]=u[w]===l[w]?0:(f-c)/(u[w]-l[w])/y;const b=new Float32Array(m);if(a&&s)for(w=0;w<m;w++)s[w]>1?s[w]>2?b[w]=6.5+(s[w]-2)**2.5:b[w]=6.5+100*(2-s[w])**4:b[w]=1;return{bandCount:m,outMin:c/y,outMax:f/y,minCutOff:l,maxCutOff:u,factor:g,useGamma:a,gamma:a?s:[1,1,1],gammaCorrection:a?b:[1,1,1],colormap:o,colormapOffset:n,stretchType:e.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(t,e=!1,r={x:0,y:0}){let o=null,n=null;const i=this.lookup?.colormapLut;t.colorRamp&&i&&(o=i.indexedColormap,n=i.offset);const s={...t,isGCS:e,resolution:r},a=(0,f.TK)(s),l=this.rasterInfo.statistics?.[0];return{...a,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===t.hillshadeType?0:1,type:"hillshade",colormap:o,colormapOffset:n}}_generateVectorFieldWebGLParams(t){const{style:e,inputUnit:r,outputUnit:o,visualVariables:n,symbolTileSize:i,flowRepresentation:s}=t;let a;const l=this.rasterInfo.statistics?.[0].min??0,u=this.rasterInfo.statistics?.[0].max??50,c=n?.find((t=>"sizeInfo"===t.type))??{type:"sizeInfo",field:"Magnitude",maxDataValue:u,maxSize:.8*i,minDataValue:l,minSize:.2*i},h=c.minDataValue??l,f=c.maxDataValue??u,d=null!=c.maxSize&&null!=c.minSize?[c.minSize/i,c.maxSize/i]:[.2,.8];if("wind_speed"===e){const t=(d[0]+d[1])/2;d[0]=d[1]=t}const p=null!=h&&null!=f?[h,f]:null;if("classified_arrow"===e)if(null!=h&&null!=f&&null!=c){a=[];const t=(c.maxDataValue-c.minDataValue)/5;for(let e=0;e<6;e++)a.push(c.minDataValue+t*e)}else a=[0,1e-6,3.5,7,10.5,14];const m="flow_to"===s==("ocean_current_kn"===e||"ocean_current_m"===e)?0:Math.PI,g=n?.find((t=>"rotationInfo"===t.type));return{breakValues:a,dataRange:p,inputUnit:r,outputUnit:o,symbolTileSize:i,symbolPercentRange:d,style:e||"single_arrow",rotation:m,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":g?.rotationType||t.rotationType,type:"vectorField"}}};function g(t){return(0,c.nk)(t)&&0!==t.validPixelCount}(0,o._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"rendererJSON",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],m.prototype,"rasterInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"lookup",void 0),(0,o._)([(0,a.Cb)()],m.prototype,"canRenderInWebGL",void 0),m=(0,o._)([(0,l.j)("esri.renderers.support.RasterSymbolizer")],m);const y=m},93010:(t,e,r)=>{r.d(e,{B4:()=>p,H0:()=>u,Jw:()=>w,Oi:()=>a,Uh:()=>d,XL:()=>y,oI:()=>x,pM:()=>v,xK:()=>l});var o=r(22303),n=r(3892),i=r(35454),s=r(96674);const a=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],l=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],u=new i.X({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function c(t,e){if(!t||!e||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]>e[r]+2||t[r]<e[r]-2)return!1;return!0}function h(t){const e=t.clone();return e.fromColor=t.toColor,e.toColor=t.fromColor,e.algorithm=t.algorithm,e}function f(t,e){if(!t)return;const r=e??l;let n=null;return"algorithmic"===t.type?r.some((e=>{if(c(t.fromColor.toRgb(),e.fromColor)&&c(t.toColor.toRgb(),e.toColor))return n=e.id,!0})):"multipart"===t.type&&r.some((e=>{const r=t.colorRamps,i=e.colorRamps;if(r&&i&&r.length===i.length&&!i.some(((t,e)=>{if(!c(r[e].fromColor.toRgb(),new o.Z(t.fromColor).toRgb())||!c(r[e].toColor.toRgb(),new o.Z(t.toColor).toRgb()))return!0}))){if(n)return!0;n=e.id}})),n}function d(t,e=!1){const r="string"==typeof t?t:function(t,e,r=!1){if(!t)return;let o=f(t,e);return null!=o||r||(o=f(t=function(t){if("multipart"===t.type){const e=t.clone();return e.colorRamps?.length?(e.colorRamps=e.colorRamps.reverse().map((t=>h(t))),e):e}return h(t)}(t),e)),o}(t,void 0,e);return r?u.toJSON(r):null}function p(t,e="esriCIELabAlgorithm"){const r=l.find((({id:e})=>e===t));return r?r.colorRamps?{type:"multipart",colorRamps:r.colorRamps.map((t=>({type:"algorithmic",algorithm:e,fromColor:[...t.fromColor],toColor:[...t.toColor]})))}:{type:"algorithmic",algorithm:e,fromColor:[...r.fromColor],toColor:[...r.toColor]}:null}function m(t){const e=(t=t||{}).numColors||256,r=t.distanceOffset||0,o=null!=t.isCustomInterval?t.isCustomInterval:null!==t.distanceInterval&&t.distanceInterval!==1/(e-1),n=t.distanceInterval||1/(e-1);return{...t,numColors:e,distanceOffset:r,interpolateAlpha:!!t.interpolateAlpha,distanceInterval:n,isCustomInterval:o,weights:t.weights}}function g(t,e){let{fromColor:r,toColor:o}=t;r=[...r],o=[...o],3===r.length&&(r=r.concat([255])),3===o.length&&(o=o.concat([255]));const i=t.algorithm||"esriCIELabAlgorithm",s=m(e),{numColors:a,distanceOffset:l,isCustomInterval:u,interpolateAlpha:c}=s;if(1===a&&0===l)return[r];if(2===a&&0===l&&!u)return[r,o];const h={r:r[0],g:r[1],b:r[2]},f={r:o[0],g:o[1],b:o[2]},d="esriCIELabAlgorithm"===i?function(t,e,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r;let{l:a,a:l,b:u}=t;const c=(e.l-a)*i,h=(e.a-l)*i,f=(e.b-u)*i,d=[];if(n){const t=n/i;a+=t*c,l+=t*h,u+=t*f}for(let t=0;t<o-1;t++)d.push({l:a,a:l,b:u}),a+=c,l+=h,u+=f;return d.push(s?{l:a,a:l,b:u}:e),d}((0,n.Y3)(h),(0,n.Y3)(f),s):"esriHSVAlgorithm"===i?function(t,e,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r,a=0===t.s,l=0===e.s;let u=t.h,c=e.h;a&&!l?u=c:l&&!a&&(e={...e,h:u},c=u);let h,f=Math.abs(c-u);const d=360;f<180?h=(c-u)*i:(f=d-f,h=u>c?f*i:-f*i);const p=(e.s-t.s)*i,m=(e.v-t.v)*i;let{s:g,v:y}=t,w=u;if(n){const t=n/i;w=(w+t*h+d)%d,g+=t*p,y+=t*m}const b=[];for(let t=0;t<o-1;t++)b.push({h:w,s:g,v:y}),w=(w+h+d)%d,g+=p,y+=m;return b.push(s?{h:w,s:g,v:y}:e),b}((0,n._Y)(h),(0,n._Y)(f),s):function(t,e,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r,a=t.h,l=e.h,u=2*Math.PI;let c;if(a<=l){const t=l-a,e=l-a-u;c=Math.abs(e)<Math.abs(t)?e:t}else{const t=l+u-a,e=l-a;c=Math.abs(e)<Math.abs(t)?e:t}const h=c*i,f=(e.l-t.l)*i,d=(e.c-t.c)*i;let{l:p,c:m,h:g}=t;if(n){const t=n/i;p+=t*f,m+=t*d,g=(g+t*h+u)%u}const y=[];for(let t=0;t<o-1;t++)y.push({l:p,c:m,h:g}),p+=f,m+=d,g=(g+h+u)%u;return y.push(s?{l:p,c:m,h:g}:e),y}((0,n.sJ)(h),(0,n.sJ)(f),s),p=[],g=r[3]??255,y=((o[3]??255)-g)/(a-1);for(let t=0;t<a;t++){const{r:e,g:r,b:o}=(0,n.xr)(d[t]),i=c?Math.round(g+y*t):255;p.push([e,r,o,i])}return p}function y(t,e){const r=(0,s.AK)(t)?t.toJSON():t;return"multipart"===r.type?function(t,e){const{numColors:r,interpolateAlpha:o}=m(e);let n=e?.weights;const{colorRamps:i}=t;if(n){const t=n.reduce(((t,e)=>t+e));n=n.map((e=>e/t))}else{n=[];for(let t=0;t<i.length;t++)n[t]=1/i.length}const s=[];let a=0,l=0;const u=1/(r-1);let c=!1;for(let t=0;t<i.length;t++){let e=c?0:a*u-l,h=t===i.length-1?r-1-a:(n[t]-e)/u;if(c=Math.ceil(h)===h,h=Math.ceil(h),0===h)continue;e/=n[t];const f=g(i[t],{numColors:h,interpolateAlpha:o,distanceOffset:e,distanceInterval:u/n[t]});a+=f.length,s.push(...f),l+=n[t]}const h=[...i[i.length-1].toColor];return 3===h.length&&h.push(255),s.push(h),s}(r,e):g(r,e)}function w(t,e){const r=y(t,e),o=e?.interpolateAlpha;return r.forEach(((t,e)=>{t.unshift(e),o||t.pop()})),r}function b(t){const e=(0,n._Y)(t);return{type:"HsvColor",Hue:e.h,Saturation:e.s,Value:e.v,AlphaValue:255}}function C(t){const e=t.toJSON();return{Algorithm:e?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:b(t.fromColor),ToColor:b(t.toColor)}}function v(t){const e=d(t);if(!e)return null;if("algorithmic"===t.type)return{...C(t),Name:e};if(t.colorRamps){const r=t.colorRamps.map(C);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:e}}return null}function x(t){const e=t.reverse().map((t=>{const e=t.toString(16);return e.length<2?"0"+e:e}));return 4294967295&Number.parseInt(e.join(""),16)}},12163:(t,e,r)=>{function o(t,e){const{attributeTable:r,bandCount:o}=t;return!((null!=r||(n=t,!["u8","s8"].includes(n.pixelType)||null==n.statistics?.[0]?.min||null==n.statistics[0]?.max||1!==n.bandCount))&&(null==r||o>1||e&&null==r.fields.find((t=>t.name.toLowerCase()===e.toLowerCase()))));var n}function n(t){const{bandCount:e,dataType:r,pixelType:o}=t;return"elevation"===r||"generic"===r&&1===e&&("s16"===o||"s32"===o||"f32"===o||"f64"===o)}function i(t,e=!1){const{bandCount:r,colormap:o,pixelType:n}=t;return 1===r&&(!!o?.length||!e&&"u8"===n)}function s(t,e=!1){const{attributeTable:r,bandCount:o}=t;return 1===o&&(!e||null!=r||null!=t.histograms)}function a(t){const{dataType:e}=t;return"vector-uv"===e||"vector-magdir"===e}function l(t){const{dataType:e}=t;return"vector-uv"===e||"vector-magdir"===e}r.d(e,{LV:()=>a,MG:()=>o,aG:()=>l,fI:()=>s,jX:()=>n,mO:()=>i})},75509:(t,e,r)=>{r.d(e,{J:()=>n,v:()=>o});const o=new(r(35454).X)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),n={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},23808:(t,e,r)=>{r.d(e,{GE:()=>u}),r(66577);var o=r(80442),n=r(92604),i=(r(22021),r(95330)),s=r(77734);r(8744),r(6570);const a=n.Z.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(t,e,r,n){const u=performance.now(),c=function(t,e){const r=function(t,e,r,o){if(0===o)return t;const n=Math.round(3*o),i=new Array(2*n+1);let s=0;for(let t=-n;t<=n;t++){const e=Math.exp(-t*t/(o*o));i[t+n]=e,s+=e}for(let t=-n;t<=n;t++)i[t+n]/=s;const a=new Float32Array(t.length);for(let o=0;o<r;o++)for(let r=0;r<e;r++){let s=0,l=0;for(let a=-n;a<=n;a++){if(r+a<0||r+a>=e)continue;const u=i[a+n];s+=u*t[2*(o*e+(r+a))],l+=u*t[2*(o*e+(r+a))+1]}a[2*(o*e+r)]=s,a[2*(o*e+r)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let o=0;o<r;o++){let s=0,u=0;for(let l=-n;l<=n;l++){if(o+l<0||o+l>=r)continue;const c=i[l+n];s+=c*a[2*((o+l)*e+t)],u+=c*a[2*((o+l)*e+t)+1]}l[2*(o*e+t)]=s,l[2*(o*e+t)+1]=u}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,o)=>{const n=Math.floor(t),i=Math.floor(o);if(n<0||n>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-n,a=o-i,l=n,u=i,c=n<e.width-1?n+1:n,h=i<e.height-1?i+1:i,f=r[2*(u*e.width+l)],d=r[2*(u*e.width+c)],p=r[2*(h*e.width+l)],m=r[2*(h*e.width+c)],g=r[2*(u*e.width+l)+1],y=r[2*(u*e.width+c)+1];return[(f*(1-a)+p*a)*(1-s)+(d*(1-a)+m*a)*s,(g*(1-a)+r[2*(h*e.width+l)+1]*a)*(1-s)+(y*(1-a)+r[2*(h*e.width+c)+1]*a)*s]}:(t,o)=>{const n=Math.round(t),i=Math.round(o);return n<0||n>=e.width||i<0||i>=e.height?[0,0]:[r[2*(i*e.width+n)],r[2*(i*e.width+n)+1]]}}(e,r),f=performance.now(),d=h(e,c,r.width,r.height),p=performance.now(),m=function(t,e){const r=new s.Z,o=t.reduce(((t,e)=>t+e.length),0),n=new Float32Array(4*o),i=new Array(t.length);let a=0,l=0;for(const e of t){const t=a;for(const t of e)n[4*a]=t.x,n[4*a+1]=t.y,n[4*a+2]=t.t,n[4*a+3]=t.speed,a++;i[l++]={startVertex:t,numberOfVertices:e.length,totalTime:e[e.length-1].t,timeSeed:r.getFloat()}}return{lineVertices:n,lineDescriptors:i}}(d),g=performance.now(),y="Streamlines"===t?function(t,e){const{lineVertices:r,lineDescriptors:o}=t;let n=0,i=0;for(const t of o)n+=2*t.numberOfVertices,i+=6*(t.numberOfVertices-1);const s=new Float32Array(9*n),a=new Uint32Array(i);let l=0,u=0;function c(){a[u++]=l-2,a[u++]=l,a[u++]=l-1,a[u++]=l,a[u++]=l+1,a[u++]=l-1}function h(t,e,r,o,n,i,a,u){const c=9*l;let h=0;s[c+h++]=t,s[c+h++]=e,s[c+h++]=1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=o/2,s[c+h++]=n/2,s[c+h++]=u,l++,s[c+h++]=t,s[c+h++]=e,s[c+h++]=-1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=-o/2,s[c+h++]=-n/2,s[c+h++]=u,l++}for(const t of o){const{totalTime:o,timeSeed:n}=t;let i=null,s=null,a=null,l=null,u=null,f=null;for(let d=0;d<t.numberOfVertices;d++){const p=r[4*(t.startVertex+d)],m=r[4*(t.startVertex+d)+1],g=r[4*(t.startVertex+d)+2],y=r[4*(t.startVertex+d)+3];let w=null,b=null,C=null,v=null;if(d>0){w=p-i,b=m-s;const t=Math.sqrt(w*w+b*b);if(w/=t,b/=t,d>1){let t=w+u,r=b+f;const o=Math.sqrt(t*t+r*r);t/=o,r/=o;const n=Math.min(1/(t*w+r*b),e);t*=n,r*=n,C=-r,v=t}else C=-b,v=w;null!==C&&null!==v&&(h(i,s,a,C,v,o,n,y),c())}i=p,s=m,a=g,u=w,f=b,l=y}h(i,s,a,-f,u,o,n,l)}return{vertexData:s,indexData:a}}(m,l):function(t){const e=16,r=1,o=2,{lineVertices:n,lineDescriptors:i}=t;let s=0,a=0;for(const t of i){const e=t.numberOfVertices-1;s+=4*e*2,a+=6*e*2}const l=new Float32Array(s*e),u=new Uint32Array(a);let c,h,f,d,p,m,g,y,w,b,C,v,x,k,A=0,S=0;function T(){u[S++]=A-8,u[S++]=A-7,u[S++]=A-6,u[S++]=A-7,u[S++]=A-5,u[S++]=A-6,u[S++]=A-4,u[S++]=A-3,u[S++]=A-2,u[S++]=A-3,u[S++]=A-1,u[S++]=A-2}function I(t,n,i,s,a,u,c,h,f,d,p,m,g,y){const w=A*e;let b=0;for(const e of[r,o])for(const r of[1,2,3,4])l[w+b++]=t,l[w+b++]=n,l[w+b++]=i,l[w+b++]=s,l[w+b++]=c,l[w+b++]=h,l[w+b++]=f,l[w+b++]=d,l[w+b++]=e,l[w+b++]=r,l[w+b++]=g,l[w+b++]=y,l[w+b++]=a/2,l[w+b++]=u/2,l[w+b++]=p/2,l[w+b++]=m/2,A++}function M(t,e){let r=w+C,o=b+v;const n=Math.sqrt(r*r+o*o);r/=n,o/=n;const i=w*r+b*o;r/=i,o/=i;let s=C+x,a=v+k;const l=Math.sqrt(s*s+a*a);s/=l,a/=l;const u=C*s+v*a;s/=u,a/=u,I(c,h,f,d,-o,r,p,m,g,y,-a,s,t,e),T()}function P(t,e,r,o,n,i){if(w=C,b=v,C=x,v=k,null==w&&null==b&&(w=C,b=v),null!=p&&null!=m){x=t-p,k=e-m;const r=Math.sqrt(x*x+k*k);x/=r,k/=r}null!=w&&null!=b&&M(n,i),c=p,h=m,f=g,d=y,p=t,m=e,g=r,y=o}function E(t,e){w=C,b=v,C=x,v=k,null==w&&null==b&&(w=C,b=v),null!=w&&null!=b&&M(t,e)}for(const t of i){c=null,h=null,f=null,d=null,p=null,m=null,g=null,y=null,w=null,b=null,C=null,v=null,x=null,k=null;const{totalTime:e,timeSeed:r}=t;for(let o=0;o<t.numberOfVertices;o++)P(n[4*(t.startVertex+o)],n[4*(t.startVertex+o)+1],n[4*(t.startVertex+o)+2],n[4*(t.startVertex+o)+3],e,r);E(e,r)}return{vertexData:l,indexData:u}}(m),w=performance.now();return(0,o.Z)("esri-2d-profiler")&&(a.info("I.1","_createFlowFieldFromData (ms)",Math.round(f-u)),a.info("I.2","_getStreamlines (ms)",Math.round(p-f)),a.info("I.3","createAnimatedLinesData (ms)",Math.round(g-p)),a.info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-g)),a.info("I.5","createFlowMesh (ms)",Math.round(w-u)),a.info("I.6","Mesh size (bytes)",y.vertexData.buffer.byteLength+y.indexData.buffer.byteLength)),await Promise.resolve(),(0,i.k_)(n),y}function c(t,e,r,o,n,i,s,a,l){const u=[];let c=r,h=o,f=0,[d,p]=e(c,h);d*=t.velocityScale,p*=t.velocityScale;const m=Math.sqrt(d*d+p*p);let g,y;u.push({x:c,y:h,t:f,speed:m});for(let r=0;r<t.verticesPerLine;r++){let[r,o]=e(c,h);r*=t.velocityScale,o*=t.velocityScale;const d=Math.sqrt(r*r+o*o);if(d<t.minSpeedThreshold)return u;const p=r/d,m=o/d;if(c+=p*t.segmentLength,h+=m*t.segmentLength,f+=t.segmentLength/d,Math.acos(p*g+m*y)>t.maxTurnAngle)return u;if(t.collisions){const t=Math.round(c*l),e=Math.round(h*l);if(t<0||t>s-1||e<0||e>a-1)return u;const r=i[e*s+t];if(-1!==r&&r!==n)return u;i[e*s+t]=n}u.push({x:c,y:h,t:f,speed:d}),g=p,y=m}return u}function h(t,e,r,o){const n=[],i=new s.Z,a=1/Math.max(t.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(o*a),h=new Int32Array(l*u);for(let t=0;t<h.length;t++)h[t]=-1;const f=[];for(let e=0;e<o;e+=t.lineSpacing)for(let o=0;o<r;o+=t.lineSpacing)f.push({x:o,y:e,sort:i.getFloat()});f.sort(((t,e)=>t.sort-e.sort));for(const{x:r,y:o}of f)if(i.getFloat()<t.density){const i=c(t,e,r,o,n.length,h,l,u,a);if(i.length<2)continue;n.push(i)}return n}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6610,5732,2596],{97575:(t,e,r)=>{r.d(e,{J:()=>l});var o,n,i,s=r(5732),a={exports:{}};o=a,n=function(){var t=function(){function t(t){this.message="JPEG error: "+t}return t.prototype=new Error,t.prototype.name="JpegError",t.constructor=t,t}();return function(){if(!self||!self.Uint8ClampedArray)return null;var e=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,o=799,n=3406,i=2276,s=1567,a=3784,l=5793,u=2896;function c(){this.decodeTransform=null,this.colorTransform=-1}function h(t,e){for(var r,o,n=0,i=[],s=16;s>0&&!t[s-1];)s--;i.push({children:[],index:0});var a,l=i[0];for(r=0;r<s;r++){for(o=0;o<t[r];o++){for((l=i.pop()).children[l.index]=e[n];l.index>0;)l=i.pop();for(l.index++,i.push(l);i.length<=r;)i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a;n++}r+1<s&&(i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a)}return i[0].children}function f(t,e,r){return 64*((t.blocksPerLine+1)*e+r)}function d(r,o,n,i,s,a,l,u,c){var h=n.mcusPerLine,d=n.progressive,p=o,m=0,y=0;function w(){if(y>0)return y--,m>>y&1;if(255===(m=r[o++])){var e=r[o++];if(e)throw new t("unexpected marker "+(m<<8|e).toString(16))}return y=7,m>>>7}function b(e){for(var r=e;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new t("invalid huffman sequence")}}function C(t){for(var e=0;t>0;)e=e<<1|w(),t--;return e}function v(t){if(1===t)return 1===w()?1:-1;var e=C(t);return e>=1<<t-1?e:e+(-1<<t)+1}var x,k=0,A=0;function S(t,e,r,o,n){var i=r%h;e(t,f(t,(r/h|0)*t.v+o,i*t.h+n))}function T(t,e,r){e(t,f(t,r/t.blocksPerLine|0,r%t.blocksPerLine))}var I,M,P,E,R,L,U=i.length;L=d?0===a?0===u?function(t,e){var r=b(t.huffmanTableDC),o=0===r?0:v(r)<<c;t.blockData[e]=t.pred+=o}:function(t,e){t.blockData[e]|=w()<<c}:0===u?function(t,r){if(k>0)k--;else for(var o=a,n=l;o<=n;){var i=b(t.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var h=e[o+=u];t.blockData[r+h]=v(s)*(1<<c),o++}else{if(u<15){k=C(u)+(1<<u)-1;break}o+=16}}}:function(r,o){for(var n,i,s=a,u=l,h=0;s<=u;){var f=e[s];switch(A){case 0:if(h=(i=b(r.huffmanTableAC))>>4,0==(n=15&i))h<15?(k=C(h)+(1<<h),A=4):(h=16,A=1);else{if(1!==n)throw new t("invalid ACn encoding");x=v(n),A=h?2:3}continue;case 1:case 2:r.blockData[o+f]?r.blockData[o+f]+=w()<<c:0==--h&&(A=2===A?3:0);break;case 3:r.blockData[o+f]?r.blockData[o+f]+=w()<<c:(r.blockData[o+f]=x<<c,A=0);break;case 4:r.blockData[o+f]&&(r.blockData[o+f]+=w()<<c)}s++}4===A&&0==--k&&(A=0)}:function(t,r){var o=b(t.huffmanTableDC),n=0===o?0:v(o);t.blockData[r]=t.pred+=n;for(var i=1;i<64;){var s=b(t.huffmanTableAC),a=15&s,l=s>>4;if(0!==a){var u=e[i+=l];t.blockData[r+u]=v(a),i++}else{if(l<15)break;i+=16}}};var O,D,G,B,N=0;for(D=1===U?i[0].blocksPerLine*i[0].blocksPerColumn:h*n.mcusPerColumn;N<D;){var _=s?Math.min(D-N,s):D;for(M=0;M<U;M++)i[M].pred=0;if(k=0,1===U)for(I=i[0],R=0;R<_;R++)T(I,L,N),N++;else for(R=0;R<_;R++){for(M=0;M<U;M++)for(G=(I=i[M]).h,B=I.v,P=0;P<B;P++)for(E=0;E<G;E++)S(I,L,N,P,E);N++}y=0,(O=g(r,o))&&O.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+O.invalid),o=O.offset);var F=O&&O.marker;if(!F||F<=65280)throw new t("marker was not found");if(!(F>=65488&&F<=65495))break;o+=2}return(O=g(r,o))&&O.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+O.invalid),o=O.offset),o-p}function p(e,c,h){var f,d,p,m,g,y,w,b,C,v,x,k,A,S,T,I,M,P=e.quantizationTable,E=e.blockData;if(!P)throw new t("missing required Quantization Table.");for(var R=0;R<64;R+=8)C=E[c+R],v=E[c+R+1],x=E[c+R+2],k=E[c+R+3],A=E[c+R+4],S=E[c+R+5],T=E[c+R+6],I=E[c+R+7],C*=P[R],0!=(v|x|k|A|S|T|I)?(v*=P[R+1],x*=P[R+2],k*=P[R+3],A*=P[R+4],S*=P[R+5],T*=P[R+6],I*=P[R+7],d=(f=(f=l*C+128>>8)+(d=l*A+128>>8)+1>>1)-d,M=(p=x)*a+(m=T)*s+128>>8,p=p*s-m*a+128>>8,w=(g=(g=u*(v-I)+128>>8)+(w=S<<4)+1>>1)-w,y=(b=(b=u*(v+I)+128>>8)+(y=k<<4)+1>>1)-y,m=(f=f+(m=M)+1>>1)-m,p=(d=d+p+1>>1)-p,M=g*i+b*n+2048>>12,g=g*n-b*i+2048>>12,b=M,M=y*o+w*r+2048>>12,y=y*r-w*o+2048>>12,w=M,h[R]=f+b,h[R+7]=f-b,h[R+1]=d+w,h[R+6]=d-w,h[R+2]=p+y,h[R+5]=p-y,h[R+3]=m+g,h[R+4]=m-g):(M=l*C+512>>10,h[R]=M,h[R+1]=M,h[R+2]=M,h[R+3]=M,h[R+4]=M,h[R+5]=M,h[R+6]=M,h[R+7]=M);for(var L=0;L<8;++L)C=h[L],0!=((v=h[L+8])|(x=h[L+16])|(k=h[L+24])|(A=h[L+32])|(S=h[L+40])|(T=h[L+48])|(I=h[L+56]))?(d=(f=4112+((f=l*C+2048>>12)+(d=l*A+2048>>12)+1>>1))-d,M=(p=x)*a+(m=T)*s+2048>>12,p=p*s-m*a+2048>>12,m=M,w=(g=(g=u*(v-I)+2048>>12)+(w=S)+1>>1)-w,y=(b=(b=u*(v+I)+2048>>12)+(y=k)+1>>1)-y,M=g*i+b*n+2048>>12,g=g*n-b*i+2048>>12,b=M,M=y*o+w*r+2048>>12,y=y*r-w*o+2048>>12,C=(C=(f=f+m+1>>1)+b)<16?0:C>=4080?255:C>>4,v=(v=(d=d+p+1>>1)+(w=M))<16?0:v>=4080?255:v>>4,x=(x=(p=d-p)+y)<16?0:x>=4080?255:x>>4,k=(k=(m=f-m)+g)<16?0:k>=4080?255:k>>4,A=(A=m-g)<16?0:A>=4080?255:A>>4,S=(S=p-y)<16?0:S>=4080?255:S>>4,T=(T=d-w)<16?0:T>=4080?255:T>>4,I=(I=f-b)<16?0:I>=4080?255:I>>4,E[c+L]=C,E[c+L+8]=v,E[c+L+16]=x,E[c+L+24]=k,E[c+L+32]=A,E[c+L+40]=S,E[c+L+48]=T,E[c+L+56]=I):(M=(M=l*C+8192>>14)<-2040?0:M>=2024?255:M+2056>>4,E[c+L]=M,E[c+L+8]=M,E[c+L+16]=M,E[c+L+24]=M,E[c+L+32]=M,E[c+L+40]=M,E[c+L+48]=M,E[c+L+56]=M)}function m(t,e){for(var r=e.blocksPerLine,o=e.blocksPerColumn,n=new Int16Array(64),i=0;i<o;i++)for(var s=0;s<r;s++)p(e,f(e,i,s),n);return e.blockData}function g(t,e,r){function o(e){return t[e]<<8|t[e+1]}var n=t.length-1,i=r<e?r:e;if(e>=n)return null;var s=o(e);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:e};for(var a=o(i);!(a>=65472&&a<=65534);){if(++i>=n)return null;a=o(i)}return{invalid:s.toString(16),marker:a,offset:i}}return c.prototype={parse:function(r){function o(){var t=r[l]<<8|r[l+1];return l+=2,t}function n(){var t=o(),e=l+t-2,n=g(r,e,l);n&&n.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+n.invalid),e=n.offset);var i=r.subarray(l,e);return l+=i.length,i}function i(t){for(var e=Math.ceil(t.samplesPerLine/8/t.maxH),r=Math.ceil(t.scanLines/8/t.maxV),o=0;o<t.components.length;o++){N=t.components[o];var n=Math.ceil(Math.ceil(t.samplesPerLine/8)*N.h/t.maxH),i=Math.ceil(Math.ceil(t.scanLines/8)*N.v/t.maxV),s=e*N.h,a=r*N.v*64*(s+1);N.blockData=new Int16Array(a),N.blocksPerLine=n,N.blocksPerColumn=i}t.mcusPerLine=e,t.mcusPerColumn=r}var s,a,l=0,u=null,c=null,f=[],p=[],y=[],w=o();if(65496!==w)throw new t("SOI not found");for(w=o();65497!==w;){var b,C,v;switch(w){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var x=n();65504===w&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(u={version:{major:x[5],minor:x[6]},densityUnits:x[7],xDensity:x[8]<<8|x[9],yDensity:x[10]<<8|x[11],thumbWidth:x[12],thumbHeight:x[13],thumbData:x.subarray(14,14+3*x[12]*x[13])}),65518===w&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&(c={version:x[5]<<8|x[6],flags0:x[7]<<8|x[8],flags1:x[9]<<8|x[10],transformCode:x[11]});break;case 65499:for(var k=o()+l-2;l<k;){var A=r[l++],S=new Uint16Array(64);if(A>>4==0)for(C=0;C<64;C++)S[e[C]]=r[l++];else{if(A>>4!=1)throw new t("DQT - invalid table spec");for(C=0;C<64;C++)S[e[C]]=o()}f[15&A]=S}break;case 65472:case 65473:case 65474:if(s)throw new t("Only single frame JPEGs supported");o(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=o(),s.samplesPerLine=o(),s.components=[],s.componentIds={};var T,I=r[l++],M=0,P=0;for(b=0;b<I;b++){T=r[l];var E=r[l+1]>>4,R=15&r[l+1];M<E&&(M=E),P<R&&(P=R);var L=r[l+2];v=s.components.push({h:E,v:R,quantizationId:L,quantizationTable:null}),s.componentIds[T]=v-1,l+=3}s.maxH=M,s.maxV=P,i(s);break;case 65476:var U=o();for(b=2;b<U;){var O=r[l++],D=new Uint8Array(16),G=0;for(C=0;C<16;C++,l++)G+=D[C]=r[l];var B=new Uint8Array(G);for(C=0;C<G;C++,l++)B[C]=r[l];b+=17+G,(O>>4==0?y:p)[15&O]=h(D,B)}break;case 65501:o(),a=o();break;case 65498:o();var N,_=r[l++],F=[];for(b=0;b<_;b++){var V=s.componentIds[r[l++]];N=s.components[V];var z=r[l++];N.huffmanTableDC=y[z>>4],N.huffmanTableAC=p[15&z],F.push(N)}var j=r[l++],Z=r[l++],W=r[l++],J=d(r,l,s,F,a,j,Z,W>>4,15&W);l+=J;break;case 65535:255!==r[l]&&l--;break;default:if(255===r[l-3]&&r[l-2]>=192&&r[l-2]<=254){l-=3;break}throw new t("unknown marker "+w.toString(16))}w=o()}for(this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=u,this.eof=l,this.adobe=c,this.components=[],b=0;b<s.components.length;b++){var H=f[(N=s.components[b]).quantizationId];H&&(N.quantizationTable=H),this.components.push({output:m(0,N),scaleX:N.h/s.maxH,scaleY:N.v/s.maxV,blocksPerLine:N.blocksPerLine,blocksPerColumn:N.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(t,e){var r,o,n,i,s,a,l,u,c,h,f,d=this.width/t,p=this.height/e,m=0,g=this.components.length,y=t*e*g,w=new Uint8ClampedArray(y),b=new Uint32Array(t),C=4294967288;for(l=0;l<g;l++){for(o=(r=this.components[l]).scaleX*d,n=r.scaleY*p,m=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<t;s++)u=0|s*o,b[s]=(u&C)<<3|7&u;for(a=0;a<e;a++)for(h=i*((u=0|a*n)&C)|(7&u)<<3,s=0;s<t;s++)w[m]=f[h+b[s]],m+=g}var v=this.decodeTransform;if(v)for(l=0;l<y;)for(u=0,c=0;u<g;u++,l++,c+=2)w[l]=(w[l]*v[c]>>8)+v[c+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(t){for(var e,r,o,n=0,i=t.length;n<i;n+=3)e=t[n],r=t[n+1],o=t[n+2],t[n]=e-179.456+1.402*o,t[n+1]=e+135.459-.344*r-.714*o,t[n+2]=e-226.816+1.772*r;return t},_convertYcckToRgb:function(t){for(var e,r,o,n,i=0,s=0,a=t.length;s<a;s+=4)e=t[s],r=t[s+1],o=t[s+2],n=t[s+3],t[i++]=r*(-660635669420364e-19*r+.000437130475926232*o-54080610064599e-18*e+.00048449797120281*n-.154362151871126)-122.67195406894+o*(-.000957964378445773*o+.000817076911346625*e-.00477271405408747*n+1.53380253221734)+e*(.000961250184130688*e-.00266257332283933*n+.48357088451265)+n*(-.000336197177618394*n+.484791561490776),t[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*o+.000659397001245577*e+.000426105652938837*n-.176491792462875)+o*(-.000778269941513683*o+.00130872261408275*e+.000770482631801132*n-.151051492775562)+e*(.00126935368114843*e-.00265090189010898*n+.25802910206845)+n*(-.000318913117588328*n-.213742400323665),t[i++]=r*(-.000570115196973677*r-263409051004589e-19*o+.0020741088115012*e-.00288260236853442*n+.814272968359295)-20.810012546947+o*(-153496057440975e-19*o-.000132689043961446*e+.000560833691242812*n-.195152027534049)+e*(.00174418132927582*e-.00255243321439347*n+.116935020465145)+n*(-.000343531996510555*n+.24165260232407);return t},_convertYcckToCmyk:function(t){for(var e,r,o,n=0,i=t.length;n<i;n+=4)e=t[n],r=t[n+1],o=t[n+2],t[n]=434.456-e-1.402*o,t[n+1]=119.541-e+.344*r+.714*o,t[n+2]=481.816-e-1.772*r;return t},_convertCmykToRgb:function(t){for(var e,r,o,n,i=0,s=1/255,a=0,l=t.length;a<l;a+=4)e=t[a]*s,r=t[a+1]*s,o=t[a+2]*s,n=t[a+3]*s,t[i++]=255+e*(-4.387332384609988*e+54.48615194189176*r+18.82290502165302*o+212.25662451639585*n-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*o-17.873870861415444*n-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*n+17.5119270841813)-n*(21.86122147463605*n+189.48180835922747),t[i++]=255+e*(8.841041422036149*e+60.118027045597366*r+6.871425592049007*o+31.159100130055922*n-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*o+131.35250912493976*n-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*n-24.86741582555878)-n*(20.737325471181034*n+187.80453709719578),t[i++]=255+e*(.8842522430003296*e+8.078677503112928*r+30.89978309703729*o-.23883238689178934*n-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*o+50.606957656360734*n-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*n-193.58209356861505)-n*(22.33816807309886*n+180.12613974708367);return t},getData:function(e,r,o){if(this.numComponents>4)throw new t("Unsupported color mode");var n=this._getLinearizedBlockData(e,r);if(1===this.numComponents&&o){for(var i=n.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=n[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(n);if(4===this.numComponents){if(this._isColorConversionNeeded())return o?this._convertYcckToRgb(n):this._convertYcckToCmyk(n);if(o)return this._convertCmykToRgb(n)}return n}},c}()},void 0!==(i=n())&&(o.exports=i);const l=(0,s.g)(a.exports)},80899:(t,e,r)=>{r.d(e,{Z:()=>l});var o,n,i,s=r(5732),a={exports:{}};n=a,void 0!==(o=function(){function t(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return t.prototype={ensureBuffer:function(t){var e=this.buffer,r=e?e.byteLength:0;if(t<r)return e;for(var o=512;o<t;)o<<=1;for(var n=new Uint8Array(o),i=0;i<r;++i)n[i]=e[i];return this.buffer=n},getByte:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(t){var e=this.pos;if(t){this.ensureBuffer(e+t);for(var r=e+t;!this.eof&&this.bufferLength<r;)this.readBlock();var o=this.bufferLength;r>o&&(r=o)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(e,r)},lookChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(t,e,r){for(var o=t+e;this.bufferLength<=o&&!this.eof;)this.readBlock();return new Stream(this.buffer,t,e,r)},skip:function(t){t||(t=1),this.pos+=t},reset:function(){this.pos=0}},t}(),i=function(){if(!self||!self.Uint32Array)return null;var t=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),r=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),n=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],i=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function s(t){throw new Error(t)}function a(t){var e=0,r=t[e++],n=t[e++];-1!=r&&-1!=n||s("Invalid header in flate stream"),8!=(15&r)&&s("Unknown compression method in flate stream"),((r<<8)+n)%31!=0&&s("Bad FCHECK in flate stream"),32&n&&s("FDICT bit set in flate stream"),this.bytes=t,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,o.call(this)}return a.prototype=Object.create(o.prototype),a.prototype.getBits=function(t){for(var e,r=this.codeSize,o=this.codeBuf,n=this.bytes,i=this.bytesPos;r<t;)void 0===(e=n[i++])&&s("Bad encoding in flate stream"),o|=e<<r,r+=8;return e=o&(1<<t)-1,this.codeBuf=o>>t,this.codeSize=r-=t,this.bytesPos=i,e},a.prototype.getCode=function(t){for(var e=t[0],r=t[1],o=this.codeSize,n=this.codeBuf,i=this.bytes,a=this.bytesPos;o<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),n|=l<<o,o+=8}var u=e[n&(1<<r)-1],c=u>>16,h=65535&u;return(0==o||o<c||0==c)&&s("Bad encoding in flate stream"),this.codeBuf=n>>c,this.codeSize=o-c,this.bytesPos=a,h},a.prototype.generateHuffmanTable=function(t){for(var e=t.length,r=0,o=0;o<e;++o)t[o]>r&&(r=t[o]);for(var n=1<<r,i=new Uint32Array(n),s=1,a=0,l=2;s<=r;++s,a<<=1,l<<=1)for(var u=0;u<e;++u)if(t[u]==s){var c=0,h=a;for(o=0;o<s;++o)c=c<<1|1&h,h>>=1;for(o=c;o<n;o+=l)i[o]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function o(t,e,r,o,n){for(var i=t.getBits(r)+o;i-- >0;)e[p++]=n}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=n,u=i;else if(2==a){for(var c=this.getBits(5)+257,h=this.getBits(5)+1,f=this.getBits(4)+4,d=Array(t.length),p=0;p<f;)d[t[p++]]=this.getBits(3);for(var m=this.generateHuffmanTable(d),g=0,y=(p=0,c+h),w=new Array(y);p<y;){var b=this.getCode(m);16==b?o(this,w,2,3,g):17==b?o(this,w,3,3,g=0):18==b?o(this,w,7,11,g=0):w[p++]=g=b}l=this.generateHuffmanTable(w.slice(0,c)),u=this.generateHuffmanTable(w.slice(c,y))}else s("Unknown block type in flate stream");for(var C=(L=this.buffer)?L.length:0,v=this.bufferLength;;){var x=this.getCode(l);if(x<256)v+1>=C&&(C=(L=this.ensureBuffer(v+1)).length),L[v++]=x;else{if(256==x)return void(this.bufferLength=v);var k=(x=e[x-=257])>>16;k>0&&(k=this.getBits(k)),g=(65535&x)+k,x=this.getCode(u),(k=(x=r[x])>>16)>0&&(k=this.getBits(k));var A=(65535&x)+k;v+g>=C&&(C=(L=this.ensureBuffer(v+g)).length);for(var S=0;S<g;++S,++v)L[v]=L[v-A]}}}else{var T,I=this.bytes,M=this.bytesPos;void 0===(T=I[M++])&&s("Bad block header in flate stream");var P=T;void 0===(T=I[M++])&&s("Bad block header in flate stream"),P|=T<<8,void 0===(T=I[M++])&&s("Bad block header in flate stream");var E=T;void 0===(T=I[M++])&&s("Bad block header in flate stream"),(E|=T<<8)!=(65535&~P)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var R=this.bufferLength,L=this.ensureBuffer(R+P),U=R+P;this.bufferLength=U;for(var O=R;O<U;++O){if(void 0===(T=I[M++])){this.eof=!0;break}L[O]=T}this.bytesPos=M}},a}())&&(n.exports=i);const l=(0,s.g)(a.exports)},5732:(t,e,r)=>{r.d(e,{c:()=>o,g:()=>n});var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}},3892:(t,e,r)=>{function o(t){return"h"in t&&"s"in t&&"v"in t}function n(t){return"l"in t&&"a"in t&&"b"in t}function i(t){return"l"in t&&"c"in t&&"h"in t}r.d(e,{Y3:()=>m,_Y:()=>p,sJ:()=>g,xr:()=>d}),r(22303),r(98766),r(88669);const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],a=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(t,e){const r=[];let o,n;if(t[0].length!==e.length)throw new Error("dimensions do not match");const i=t.length,s=t[0].length;let a=0;for(o=0;o<i;o++){for(a=0,n=0;n<s;n++)a+=t[o][n]*e[n];r.push(a)}return r}function u(t){const e=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),r=l(s,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function c(t){const e=l(a,[t.x/100,t.y/100,t.z/100]).map((t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))}));return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function h(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function f(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function d(t){return function(t){return"r"in t&&"g"in t&&"b"in t}(t)?t:i(t)?function(t){return c(f(function(t){const e=t.l,r=t.c,o=t.h;return{l:e,a:r*Math.cos(o),b:r*Math.sin(o)}}(t)))}(t):n(t)?function(t){return c(f(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?c(t):o(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,o=t.v/100*255,n=o*r,i=n*(1-Math.abs(e%2-1));let s;switch(Math.floor(e)){case 0:s={r:n,g:i,b:0};break;case 1:s={r:i,g:n,b:0};break;case 2:s={r:0,g:n,b:i};break;case 3:s={r:0,g:i,b:n};break;case 4:s={r:i,g:0,b:n};break;case 5:case 6:s={r:n,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+o-n),s.g=Math.round(s.g+o-n),s.b=Math.round(s.b+o-n),s}(t):t}function p(t){return o(t)?t:function(t){const e=t.r,r=t.g,o=t.b,n=Math.max(e,r,o),i=n-Math.min(e,r,o);let s=n,a=0===i?0:n===e?(r-o)/i%6:n===r?(o-e)/i+2:(e-r)/i+4,l=0===i?0:i/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(d(t))}function m(t){return n(t)?t:function(t){return h(u(t))}(d(t))}function g(t){return i(t)?t:function(t){return function(t){const e=t.l,r=t.a,o=t.b,n=Math.sqrt(r*r+o*o);let i=Math.atan2(o,r);return i=i>0?i:i+2*Math.PI,{l:e,c:n,h:i}}(h(u(t)))}(d(t))}},5847:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),n=r(20102),i=r(96674),s=r(22974),a=r(92604),l=r(5600),u=r(90578),c=r(52011);class h{constructor(t=null,e=null,r=null){this.minValue=t,this.maxValue=e,this.noDataValue=r}}var f,d=r(81578);let p=f=class extends i.wq{static createEmptyBand(t,e){return new(f.getPixelArrayConstructor(t))(e)}static getPixelArrayConstructor(t){let e;switch(t){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":e=Float32Array;break;case"f64":e=Float64Array}return e}constructor(t){super(t),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(t){if(!t)return"f32";let e=t.toLowerCase();return["u1","u2","u4"].includes(e)?e="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(e)||(e="f32"),e}getPlaneCount(){return this.pixels?.length}addData(t){if(!t.pixels||t.pixels.length!==this.width*this.height)throw new n.Z("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||(this.pixels=[]),this.statistics||(this.statistics=[]),this.pixels.push(t.pixels),this.statistics.push(t.statistics??new h)}getAsRGBA(){const t=new ArrayBuffer(this.width*this.height*4);switch(this.pixelType){case"s8":case"s16":case"u16":case"s32":case"u32":case"f32":case"f64":this._fillFromNon8Bit(t);break;default:this._fillFrom8Bit(t)}return new Uint8ClampedArray(t)}getAsRGBAFloat(){const t=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(t),t}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map((t=>this._calculateBandStatistics(t,this.mask)));const t=this.mask;let e=0;if(null!=t)for(let r=0;r<t.length;r++)t[r]&&e++;else e=this.width*this.height;this.validPixelCount=e}clamp(t){if(!t||"f64"===t||"f32"===t||!this.pixels)return;const[e,r]=(0,d.r)(t),o=this.pixels,n=this.width*this.height,i=o.length;let s,a,l;const u=[];for(let c=0;c<i;c++){l=f.createEmptyBand(t,n),s=o[c];for(let t=0;t<n;t++)a=s[t],l[t]=a>r?r:a<e?e:a;u.push(l)}this.pixels=u,this.pixelType=t}extractBands(t){const{pixels:e,statistics:r}=this;if(null==t||0===t.length||!e||0===e.length)return this;const o=e.length,n=t.some((t=>t>=e.length)),i=o===t.length&&!t.some(((t,e)=>t!==e));if(n||i)return this;const s=this.bandMasks?.length===o?t.map((t=>this.bandMasks[t])):void 0;let{mask:a,validPixelCount:l}=this;const{width:u,height:c}=this;if(s){if(1===s.length)a=s[0];else{const t=u*c;a=new Uint8Array(t).fill(255);for(let e=0;e<s.length;e++){const r=s[e];for(let e=0;e<t;e++)r[e]||(a[e]=0)}}l=a.filter((t=>!!t)).length}return new f({pixelType:this.pixelType,width:u,height:c,mask:a,bandMasks:s,validPixelCount:l,maskIsAlpha:this.maskIsAlpha,pixels:t.map((t=>e[t])),statistics:r&&t.map((t=>r[t]))})}clone(){const t=new f({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let e;null!=this.mask&&(this.mask instanceof Uint8Array?t.mask=new Uint8Array(this.mask):t.mask=this.mask.slice(0)),this.bandMasks&&(t.bandMasks=this.bandMasks.map((t=>new Uint8Array(t))));const r=f.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){t.pixels=[];const o=!!this.pixels[0].slice;for(e=0;e<this.pixels.length;e++)t.pixels[e]=o?this.pixels[e].slice(0,this.pixels[e].length):new r(this.pixels[e])}if(this.statistics)for(t.statistics=[],e=0;e<this.statistics.length;e++)t.statistics[e]=(0,s.d9)(this.statistics[e]);return t.premultiplyAlpha=this.premultiplyAlpha,t}_fillFrom8Bit(t){const{mask:e,maskIsAlpha:r,premultiplyAlpha:o,pixels:n}=this;if(!t||!n?.length)return void a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i,s,l,u;i=s=l=n[0],n.length>=3?(s=n[1],l=n[2]):2===n.length&&(s=n[1]);const c=new Uint32Array(t),h=this.width*this.height;if(i.length===h)if(null!=e&&e.length===h)if(r)for(u=0;u<h;u++){const t=e[u];if(t){const e=t/255;c[u]=o?t<<24|l[u]*e<<16|s[u]*e<<8|i[u]*e:t<<24|l[u]<<16|s[u]<<8|i[u]}}else for(u=0;u<h;u++)e[u]&&(c[u]=255<<24|l[u]<<16|s[u]<<8|i[u]);else for(u=0;u<h;u++)c[u]=255<<24|l[u]<<16|s[u]<<8|i[u];else a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(t){const{pixels:e,mask:r,statistics:o}=this;if(!t||!e?.length)return void a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const n=this.pixelType;let i=1,s=0,l=1;if(o&&o.length>0){for(const t of o)if(null!=t.minValue&&(s=Math.min(s,t.minValue)),null!=t.maxValue&&null!=t.minValue){const e=t.maxValue-t.minValue;l=Math.max(l,e)}i=255/l}else{let t=255;"s8"===n?(s=-128,t=127):"u16"===n?t=65535:"s16"===n?(s=-32768,t=32767):"u32"===n?t=4294967295:"s32"===n?(s=-2147483648,t=2147483647):"f32"===n?(s=-34e38,t=34e38):"f64"===n&&(s=-Number.MAX_VALUE,t=Number.MAX_VALUE),i=255/(t-s)}const u=new Uint32Array(t),c=this.width*this.height;let h,f,d,p,m;if(h=f=d=e[0],h.length!==c)return a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(e.length>=2)if(f=e[1],e.length>=3&&(d=e[2]),null!=r&&r.length===c)for(p=0;p<c;p++)r[p]&&(u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i);else for(p=0;p<c;p++)u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i;else if(null!=r&&r.length===c)for(p=0;p<c;p++)m=(h[p]-s)*i,r[p]&&(u[p]=255<<24|m<<16|m<<8|m);else for(p=0;p<c;p++)m=(h[p]-s)*i,u[p]=255<<24|m<<16|m<<8|m}_fillFrom32Bit(t){const{pixels:e,mask:r}=this;if(!t||!e?.length)return a.Z.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let o,n,i,s;o=n=i=e[0],e.length>=3?(n=e[1],i=e[2]):2===e.length&&(n=e[1]);const l=this.width*this.height;if(o.length!==l)return a.Z.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let u=0;if(null!=r&&r.length===l)for(s=0;s<l;s++)t[u++]=o[s],t[u++]=n[s],t[u++]=i[s],t[u++]=1&r[s];else for(s=0;s<l;s++)t[u++]=o[s],t[u++]=n[s],t[u++]=i[s],t[u++]=1}_calculateBandStatistics(t,e){let r=1/0,o=-1/0;const n=t.length;let i,s=0;if(null!=e)for(i=0;i<n;i++)e[i]&&(s=t[i],r=s<r?s:r,o=s>o?s:o);else for(i=0;i<n;i++)s=t[i],r=s<r?s:r,o=s>o?s:o;return new h(r,o)}};(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"width",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"height",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixelType",void 0),(0,o._)([(0,u.p)("pixelType")],p.prototype,"castPixelType",null),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"validPixelCount",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"mask",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"maskIsAlpha",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixels",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"premultiplyAlpha",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"statistics",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"depthCount",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"noDataValues",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"bandMasks",void 0),p=f=(0,o._)([(0,c.j)("esri.layers.support.PixelBlock")],p);const m=p},25972:(t,e,r)=>{r.d(e,{Z:()=>k});var o,n=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(6570),c=r(82971);function h(t){return t=Number(t),isNaN(t)?void 0:t}r(67676),r(80442);let f=o=class extends i.wq{constructor(){super(...arguments),this.name=null,this.minWavelength=void 0,this.maxWavelength=void 0,this.radianceBias=void 0,this.radianceGain=void 0,this.reflectanceBias=void 0,this.reflectanceGain=void 0,this.solarIrradiance=void 0}clone(){return new o({name:this.name,minWavelength:this.minWavelength,maxWavelength:this.maxWavelength,radianceBias:this.radianceBias,radianceGain:this.radianceGain,reflectanceBias:this.reflectanceBias,reflectanceGain:this.reflectanceGain,solarIrradiance:this.solarIrradiance})}};(0,n._)([(0,a.Cb)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.Cb)({json:{name:"WavelengthMin",read:{reader:h},write:!0}})],f.prototype,"minWavelength",void 0),(0,n._)([(0,a.Cb)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,n._)([(0,a.Cb)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,n._)([(0,a.Cb)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,n._)([(0,a.Cb)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,n._)([(0,a.Cb)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,n._)([(0,a.Cb)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=o=(0,n._)([(0,l.j)("esri.layers.support.RasterBandInfo")],f);const d=f;var p,m=r(71715),g=r(30556);function y(t){return t=Number(t),isNaN(t)?void 0:t}let w=p=class extends i.wq{constructor(){super(...arguments),this.acquisitionDate=void 0,this.cloudCover=void 0,this.productName=void 0,this.sensorName=null,this.sensorAzimuth=void 0,this.sensorElevation=void 0,this.sunAzimuth=void 0,this.sunElevation=void 0}readAcquisitionDate(t){return new Date(t)}writeAcquisitionDate(t,e){e.AcquisitionDate=t.getTime()}clone(){return new p({acquisitionDate:this.acquisitionDate,cloudCover:this.cloudCover,productName:this.productName,sensorName:this.sensorName,sensorAzimuth:this.sensorAzimuth,sensorElevation:this.sensorElevation,sunAzimuth:this.sunAzimuth,sunElevation:this.sunElevation})}};(0,n._)([(0,a.Cb)({json:{name:"AcquisitionDate",write:!0}})],w.prototype,"acquisitionDate",void 0),(0,n._)([(0,m.r)("acquisitionDate")],w.prototype,"readAcquisitionDate",null),(0,n._)([(0,g.c)("acquisitionDate")],w.prototype,"writeAcquisitionDate",null),(0,n._)([(0,a.Cb)({json:{name:"CloudCover",read:{reader:y},write:!0}})],w.prototype,"cloudCover",void 0),(0,n._)([(0,a.Cb)({json:{name:"ProductName",write:!0}})],w.prototype,"productName",void 0),(0,n._)([(0,a.Cb)({json:{name:"SensorName",write:!0}})],w.prototype,"sensorName",void 0),(0,n._)([(0,a.Cb)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],w.prototype,"sensorAzimuth",void 0),(0,n._)([(0,a.Cb)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],w.prototype,"sensorElevation",void 0),(0,n._)([(0,a.Cb)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],w.prototype,"sunAzimuth",void 0),(0,n._)([(0,a.Cb)({json:{name:"SunElevation",read:{reader:y},write:!0}})],w.prototype,"sunElevation",void 0),w=p=(0,n._)([(0,l.j)("esri.layers.support.RasterSensorInfo")],w);const b=w;var C,v=r(36679);let x=C=class extends i.wq{constructor(t){super(t),this.attributeTable=null,this.bandCount=null,this.colormap=null,this.extent=null,this.format=void 0,this.height=null,this.width=null,this.histograms=null,this.keyProperties={},this.multidimensionalInfo=null,this.noDataValue=null,this.pixelSize=null,this.pixelType=null,this.isPseudoSpatialReference=!1,this.spatialReference=null,this.statistics=null,this.storageInfo=null,this.transform=null}get bandInfos(){const t=this.keyProperties.BandProperties,{bandCount:e}=this;if(!t?.length||t.length<e){const t=[];for(let r=1;r<=e;r++)t.push(new d({name:"band_"+r}));return t}const r=t.map((t=>d.fromJSON(t)));for(let t=0;t<r.length;t++)r[t].name=r[t].name||"band_"+(t+1);return r}get dataType(){const t=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===t?"standard-time":t}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(t){t&&this._set("nativeExtent",t)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;const t=this.nativeExtent;return{x:t.width/this.width,y:t.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}get sensorInfo(){if(this.keyProperties?.SensorName)return b.fromJSON(this.keyProperties)}clone(){return new C({attributeTable:(0,s.d9)(this.attributeTable),bandCount:this.bandCount,colormap:(0,s.d9)(this.colormap),extent:(0,s.d9)(this.extent),nativePixelSize:(0,s.d9)(this.nativePixelSize),format:this.format,height:this.height,width:this.width,histograms:(0,s.d9)(this.histograms),keyProperties:(0,s.d9)(this.keyProperties),multidimensionalInfo:(0,s.d9)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,s.d9)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,s.d9)(this.spatialReference),statistics:(0,s.d9)(this.statistics),storageInfo:(0,s.d9)(this.storageInfo),transform:(0,s.d9)(this.transform)})}};(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"attributeTable",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"bandCount",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],x.prototype,"bandInfos",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"colormap",void 0),(0,n._)([(0,a.Cb)({type:String,readOnly:!0})],x.prototype,"dataType",null),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],x.prototype,"extent",void 0),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],x.prototype,"nativeExtent",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"nativePixelSize",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"format",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"height",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"width",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"hasMultidimensionalTranspose",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"histograms",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"keyProperties",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"multidimensionalInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"noDataValue",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"pixelSize",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"pixelType",void 0),(0,n._)([(0,a.Cb)()],x.prototype,"isPseudoSpatialReference",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],x.prototype,"sensorInfo",null),(0,n._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"statistics",void 0),(0,n._)([(0,a.Cb)({type:v.Z,json:{write:!0}})],x.prototype,"storageInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"transform",void 0),x=C=(0,n._)([(0,l.j)("esri.layers.support.RasterInfo")],x);const k=x},36679:(t,e,r)=>{r.d(e,{Z:()=>h});var o,n=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(94139);let c=o=class extends i.wq{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}clone(){return new o({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.d9)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.d9)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.d9)(this.tileInfo),transposeInfo:(0,s.d9)(this.transposeInfo),blockBoundary:(0,s.d9)(this.blockBoundary)})}};(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],c.prototype,"origin",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,n._)([(0,a.Cb)()],c.prototype,"transposeInfo",void 0),(0,n._)([(0,a.Cb)()],c.prototype,"blockBoundary",void 0),c=o=(0,n._)([(0,l.j)("esri.layers.support.RasterStorageInfo")],c);const h=c},20095:(t,e,r)=>{function o(t,e){let r=0,o="",n=0,i=0;const s=t.length;for(;r<s;)i=t[r++],n=i>>4,n<8?n=1:15===n?(n=4,i=(7&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++]):14===n?(n=3,i=(15&i)<<12|(63&t[r++])<<6|63&t[r++]):(n=2,i=(31&i)<<6|63&t[r++]),(0!==i||e)&&(o+=String.fromCharCode(i));return o}r.d(e,{f:()=>o})},72955:(t,e,r)=>{r.d(e,{Jx:()=>h,zD:()=>a});var o=r(99880);const n=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let i=null,s=null;function a(){return i||(i=r.e(6233).then(r.bind(r,26233)).then((t=>t.l)).then((({default:t})=>t({locateFile:t=>(0,o.V)(`esri/layers/support/rasterFormats/${t}`)}))).then((t=>{(function(t){const{_malloc:e,_free:r,_lerc_getBlobInfo:o,_lerc_getDataRanges:i,_lerc_decode_4D:s,asm:a}=t;let c;const h=Object.values(a).find((e=>e&&"buffer"in e&&e.buffer===t.HEAPU8.buffer)),f=t=>{const r=t.map((t=>function(t){return 16+(t>>3<<3)}(t))),o=r.reduce(((t,e)=>t+e)),n=e(o);c=new Uint8Array(h.buffer);let i=r[0];r[0]=n;for(let t=1;t<r.length;t++){const e=r[t];r[t]=r[t-1]+i,i=e}return r};l.getBlobInfo=t=>{const e=new Uint8Array(48),n=new Uint8Array(24),[s,a,l]=f([t.length,e.length,n.length]);c.set(t,s),c.set(e,a),c.set(n,l);let d=o(s,t.length,a,l,12,3);if(d)throw r(s),new Error(`lerc-getBlobInfo: error code is ${d}`);c=new Uint8Array(h.buffer),u(c,a,e),u(c,l,n);const p=new Uint32Array(e.buffer),m=new Float64Array(n.buffer),[g,y,,w,b,C,v,x,k,A,S]=p,T={version:g,depthCount:A,width:w,height:b,validPixelCount:v,bandCount:C,blobSize:x,maskCount:k,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:S};if(S)return T;if(1===A&&1===C)return r(s),T.statistics.push({minValue:m[0],maxValue:m[1]}),T;const I=A*C*8,M=new Uint8Array(I),P=new Uint8Array(I);let E=s,R=0,L=0,U=!1;if(c.byteLength<s+2*I?(r(s),U=!0,[E,R,L]=f([t.length,I,I]),c.set(t,E)):[R,L]=f([I,I]),c.set(M,R),c.set(P,L),d=i(E,t.length,A,C,R,L),d)throw r(E),U||r(R),new Error(`lerc-getDataRanges: error code is ${d}`);c=new Uint8Array(h.buffer),u(c,R,M),u(c,L,P);const O=new Float64Array(M.buffer),D=new Float64Array(P.buffer),G=T.statistics;for(let t=0;t<C;t++)if(A>1){const e=O.slice(t*A,(t+1)*A),r=D.slice(t*A,(t+1)*A),o=Math.min.apply(null,e),n=Math.max.apply(null,r);G.push({minValue:o,maxValue:n,depthStats:{minValues:e,maxValues:r}})}else G.push({minValue:O[t],maxValue:D[t]});return r(E),U||r(R),T},l.decode=(t,e)=>{const{maskCount:o,depthCount:i,bandCount:a,width:l,height:d,dataType:p,bandCountWithNoData:m}=e,g=n[p],y=l*d,w=new Uint8Array(y*a),b=y*i*a*g.size,C=new Uint8Array(b),v=new Uint8Array(a),x=new Uint8Array(8*a),[k,A,S,T,I]=f([t.length,w.length,C.length,v.length,x.length]);c.set(t,k),c.set(w,A),c.set(C,S),c.set(v,T),c.set(x,I);const M=s(k,t.length,o,A,i,l,d,a,p,S,T,I);if(M)throw r(k),new Error(`lerc-decode: error code is ${M}`);c=new Uint8Array(h.buffer),u(c,S,C),u(c,A,w);let P=null;if(m){u(c,T,v),u(c,I,x),P=[];const t=new Float64Array(x.buffer);for(let e=0;e<v.length;e++)P.push(v[e]?t[e]:null)}return r(k),{data:C,maskData:w,noDataValues:P}}})(t),s=!0})),i)}const l={getBlobInfo:null,decode:null};function u(t,e,r){r.set(t.slice(e,e+r.length))}function c(t,e,r,o,n){if(r<2)return t;const i=new o(e*r);if(n)for(let o=0,n=0;o<e;o++)for(let s=0,a=o;s<r;s++,a+=e)i[a]=t[n++];else for(let o=0,n=0;o<e;o++)for(let s=0,a=o;s<r;s++,a+=e)i[n++]=t[a];return i}function h(t,e={}){const r=e.inputOffset??0,o=t instanceof Uint8Array?t.subarray(r):new Uint8Array(t,r),i=l.getBlobInfo(o),{data:s,maskData:a,noDataValues:u}=l.decode(o,i),{width:h,height:f,bandCount:d,depthCount:p,dataType:m,maskCount:g,statistics:y}=i,w=n[m],b=new w.ctor(s.buffer),C=[],v=[],x=h*f,k=x*p;for(let t=0;t<d;t++){const r=b.subarray(t*k,(t+1)*k);if(e.returnInterleaved)C.push(r);else{const t=c(r,x,p,w.ctor,!0);C.push(t)}v.push(a.subarray(t*k,(t+1)*k))}const A=0===g?null:1===g?v[0]:new Uint8Array(x);if(g>1){A.set(v[0]);for(let t=1;t<v.length;t++){const e=v[t];for(let t=0;t<x;t++)A[t]=A[t]&e[t]}}const{noDataValue:S}=e,T=null!=S&&w.range[0]<=S&&w.range[1]>=S;if(g>0&&T)for(let t=0;t<d;t++){const e=C[t],r=v[t]||A;for(let t=0;t<x;t++)0===r[t]&&(e[t]=S)}const I=g===d&&d>1?v:null,{pixelType:M}=w;return{width:h,height:f,bandCount:d,pixelType:M,depthCount:p,statistics:y,pixels:C,mask:A,bandMasks:I,noDataValues:u}}},88781:(t,e,r)=>{function o(){const t=[];for(let e=0;e<=257;e++)t[e]=[e];return t}function n(t,e){for(let r=0;r<e.length;r++)t.push(e[r])}r.d(e,{J:()=>s});const i=new Set;function s(t,e,r,s=!0){const a=function(t,e,r,o=!0){if(e%4!=0||r%4!=0){const n=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(n),s=new Uint8Array(t,e,r);if(o)for(let t=0;t<i.length;t+=4)i[t]=s[t+3],i[t+1]=s[t+2],i[t+2]=s[t+1],i[t+3]=s[t];else i.set(s);return new Uint32Array(i.buffer)}if(o){const o=new Uint8Array(t,e,r),n=new Uint8Array(o.length);for(let t=0;t<n.length;t+=4)n[t]=o[t+3],n[t+1]=o[t+2],n[t+2]=o[t+1],n[t+3]=o[t];return new Uint32Array(n.buffer)}return new Uint32Array(t,e,r/4)}(t,e,r,s);let l=9,u=o(),c=32,h=u.length,f=[],d=1,p=a[0],m=0;const g=a.length,y=8*(4*g-r),w=[];for(;null!=p;){if(c>=l)c-=l,m=p>>>32-l,p<<=l;else{m=p>>>32-c,p=a[d++];const t=l-c;c=32-t,m=(m<<t)+(p>>>c),p<<=t}if(257===m)break;if(256===m){l=9,u=o(),h=u.length,f=[];continue}const t=u[m];if(null==t){if(m>u.length)throw new Error("data integrity issue: code does not exist on code page");f.push(f[0]),u[h++]=f.slice(),n(w,f)}else n(w,t),f.push(t[0]),f.length>1&&(u[h++]=f.slice()),f=t.slice();if(i.has(h)&&l++,0===c&&(p=a[d++],c=32),d>g||d===g&&c<=y)break}return new Uint8Array(w)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191)},75993:(t,e,r)=>{r.d(e,{J:()=>L,y:()=>R});var o=r(20102),n=r(70586),i=r(5847),s=r(95330),a=r(80899);class l{constructor(t){this._canvas=null,this._ctx=null,t&&(this._canvas=t.canvas,this._ctx=t.ctx||t.canvas&&t.canvas.getContext("2d"))}decode(t,e,r){if(!t||t.byteLength<10)throw new o.Z("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:n=0,height:i=0,format:a}=e;const{applyJpegMask:u}=e;if(u&&(!n||!i))throw new o.Z("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise(((o,c)=>{let h=null;"jpg"===a&&u&&(h=l._getMask(t,{width:n,height:i}));const f=new Blob([new Uint8Array(t)],{type:"image/"+a=="jpg"?"jpeg":a}),d=URL.createObjectURL(f),p=new Image;let m;p.src=d,p.onload=()=>{if(URL.revokeObjectURL(d),(0,s.Hc)(r))return void c((0,s.zE)());n=p.width,i=p.height,this._canvas&&this._ctx?(this._canvas.width===n&&this._canvas.height===i||(this._canvas.width=n,this._canvas.height=i),this._ctx.clearRect(0,0,n,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=n,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(p,0,0);const t=this._ctx.getImageData(0,0,n,i);let a;if(m=t.data,e.renderOnCanvas){if(h)for(a=0;a<h.length;a++)h[a]?m[4*a+3]=255:m[4*a+3]=0;return this._ctx.putImageData(t,0,0),void o(null)}const l=n*i,u=new Uint8Array(l),f=new Uint8Array(l),g=new Uint8Array(l);if(h)for(a=0;a<l;a++)u[a]=m[4*a],f[a]=m[4*a+1],g[a]=m[4*a+2];else for(h=new Uint8Array(l),a=0;a<l;a++)u[a]=m[4*a],f[a]=m[4*a+1],g[a]=m[4*a+2],h[a]=m[4*a+3];o({width:n,height:i,pixels:[u,f,g],mask:h,pixelType:"u8"})},p.onerror=()=>{URL.revokeObjectURL(d),c("cannot load image")}}))}static _getMask(t,e){let r=null;try{const o=new Uint8Array(t),n=Math.ceil(o.length/2);let i=0;const s=o.length-2;for(i=n;i<s&&(255!==o[i]||217!==o[i+1]);i++);if(i+=2,i<o.length-1){const t=new a.Z(o.subarray(i)).getBytes();r=new Uint8Array(e.width*e.height);let n=0;for(let e=0;e<t.length;e++)for(let o=7;o>=0;o--)r[n++]=t[e]>>o&1}}catch(t){}return r}}var u=r(97575);class c{static decode(t,e=!1){const r=new Uint8Array(t),o=new u.J;o.parse(r);const{width:n,height:i,numComponents:s,eof:l}=o,c=o.getData(n,i,!0),h=n*i;let f,d=null,p=0,m=0,g=0;if(!e&&l<r.length-1)try{const t=new a.Z(r.subarray(l)).getBytes();d=new Uint8Array(h);let e=0;for(p=0;p<t.length;p++)for(g=7;g>=0;g--)d[e++]=t[p]>>g&1}catch{}if(1===s&&c.length===n*i){const t=new Uint8Array(c.buffer);f=[t,t,t]}else{for(f=[],p=0;p<3;p++)f.push(new Uint8Array(h));for(g=0,m=0;m<h;m++)for(p=0;p<3;p++)f[p][m]=c[g++]}return{width:n,height:i,pixels:f,mask:d}}}var h=r(72955),f=r(88781),d=r(81578);const p=(t,e)=>{const r=e.width*e.height,o=e.pixelType;return Math.floor(t.byteLength/(r*m(o)))},m=t=>{let e=1;switch(t){case Uint8Array:case Int8Array:e=1;break;case Uint16Array:case Int16Array:e=2;break;case Uint32Array:case Int32Array:case Float32Array:e=4;break;case Float64Array:e=8}return e};class g{static decode(t,e){const r=e.pixelType,o=[],n=e.width*e.height,i=p(t,e),{bandIds:s,format:a}=e,l=s?.length||p(t,e),u=t.byteLength-t.byteLength%(n*m(r)),c=new r(t,0,n*i);let h,f,d,g,y=null;if("bip"===a)for(h=0;h<l;h++){for(d=new r(n),g=s?s[h]:h,f=0;f<n;f++)d[f]=c[f*i+g];o.push(d)}else if("bsq"===a)for(h=0;h<l;h++)g=s?s[h]:h,o.push(c.subarray(g*n,(g+1)*n));return u<t.byteLength-1&&(y=((t,e)=>{if(8*t.byteLength<e)return null;const r=new Uint8Array(t,0,Math.ceil(e/8)),o=new Uint8Array(e);let n=0,i=0,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)o[n++]=i>>a&1;for(a=7;n<e-1;)i=r[r.length-1],o[n++]=i>>a&1,a--;return o})(t.slice(u),n)),{pixels:o,mask:y}}}var y=r(94793),w=r(48279),b=function(t){var e,r,o;function n(t){var e,r,o,n,i,s,a,l,u,c,h,f,d;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(e=this.readUInt32(),l=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join(""),l){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(e);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},n=this.readUInt16(),o=this.readUInt16()||100,i.delay=1e3*n/o,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,e-=4),t=(null!=i?i.data:void 0)||this.imgData,h=0;0<=e?h<e:h>e;0<=e?++h:--h)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),(u=255-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":s=(c=this.read(e)).indexOf(0),a=String.fromCharCode.apply(String,c.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,c.slice(s+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(d=this.colorType)||6===d,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return n.load=function(t,e,r){var o;return"function"==typeof e&&(r=e),(o=new XMLHttpRequest).open("GET",t,!0),o.responseType="arraybuffer",o.onload=function(){var t;return t=new n(new Uint8Array(o.response||o.mozResponseArrayBuffer)),"function"==typeof(null!=e?e.getContext:void 0)&&t.render(e),"function"==typeof r?r(t):void 0},o.send(null)},n.prototype.read=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)r.push(this.data[this.pos++]);return r},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(t){var e,r,o,n,i,s,l,u,c,h,f,d,p,m,g,y,w,b,C,v,x,k,A;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=(t=new a.Z(t)).getBytes(),y=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(y*this.height),s=t.length,g=0,m=0,r=0;m<s;){switch(t[m++]){case 0:for(n=C=0;C<y;n=C+=1)p[r++]=t[m++];break;case 1:for(n=v=0;v<y;n=v+=1)e=t[m++],i=n<d?0:p[r-d],p[r++]=(e+i)%256;break;case 2:for(n=x=0;x<y;n=x+=1)e=t[m++],o=(n-n%d)/d,w=g&&p[(g-1)*y+o*d+n%d],p[r++]=(w+e)%256;break;case 3:for(n=k=0;k<y;n=k+=1)e=t[m++],o=(n-n%d)/d,i=n<d?0:p[r-d],w=g&&p[(g-1)*y+o*d+n%d],p[r++]=(e+Math.floor((i+w)/2))%256;break;case 4:for(n=A=0;A<y;n=A+=1)e=t[m++],o=(n-n%d)/d,i=n<d?0:p[r-d],0===g?w=b=0:(w=p[(g-1)*y+o*d+n%d],b=o&&p[(g-1)*y+(o-1)*d+n%d]),l=i+w-b,u=Math.abs(l-i),h=Math.abs(l-w),f=Math.abs(l-b),c=u<=h&&u<=f?i:h<=f?w:b,p[r++]=(e+c)%256;break;default:throw new Error("Invalid filter algorithm: "+t[m-1])}g++}return p},n.prototype.decodePalette=function(){var t,e,r,o,n,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],n=new Uint8Array((i.length||0)+r.length),o=0,r.length,t=0,e=s=0,a=r.length;s<a;e=s+=3)n[o++]=r[e],n[o++]=r[e+1],n[o++]=r[e+2],n[o++]=null!=(l=i[t++])?l:255;return n},n.prototype.copyToImageData=function(t,e){var r,o,n,i,s,a,l,u,c,h,f;if(o=this.colors,c=null,r=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),o=4,r=!0),u=(n=t.data||t).length,s=c||e,i=a=0,1===o)for(;i<u;)l=c?4*e[i/4]:a,h=s[l++],n[i++]=h,n[i++]=h,n[i++]=h,n[i++]=r?s[l++]:this.transparency.grayscale&&this.transparency.grayscale===h?0:255,a=l;else for(;i<u;)l=c?4*e[i/4]:a,n[i++]=s[l++],n[i++]=s[l++],n[i++]=s[l++],n[i++]=r?s[l++]:this.transparency.rgb&&this.transparency.rgb[1]===s[l-3]&&this.transparency.rgb[3]===s[l-2]&&this.transparency.rgb[5]===s[l-1]?0:255,a=l},n.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t},r=t.document&&t.document.createElement("canvas"),o=r&&r.getContext("2d"),e=function(t){var e;return o.width=t.width,o.height=t.height,o.clearRect(0,0,t.width,t.height),o.putImageData(t,0,0),(e=new Image).src=r.toDataURL(),e},n.prototype.decodeFrames=function(t){var r,o,n,i,s,a,l,u;if(this.animation){for(u=[],o=s=0,a=(l=this.animation.frames).length;s<a;o=++s)r=l[o],n=t.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(n,i),r.imageData=n,u.push(r.image=e(n));return u}},n.prototype.renderFrame=function(t,e){var r,o,n;return r=(o=this.animation.frames)[e],n=o[e-1],0===e&&t.clearRect(0,0,this.width,this.height),1===(null!=n?n.disposeOp:void 0)?t.clearRect(n.xOffset,n.yOffset,n.width,n.height):2===(null!=n?n.disposeOp:void 0)&&t.putImageData(n.imageData,n.xOffset,n.yOffset),0===r.blendOp&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},n.prototype.animate=function(t){var e,r,o,n,i,s,a=this;return r=0,s=this.animation,n=s.numFrames,o=s.frames,i=s.numPlays,(e=function(){var s,l;if(s=r++%n,l=o[s],a.renderFrame(t,s),n>1&&r/n<i)return a.animation._timeout=setTimeout(e,l.delay)})()},n.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},n.prototype.render=function(t){var e,r;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(r=e.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),e.putImageData(r,0,0))},n}(self);const C=new Set(["jpg","png","bmp","gif"]);async function v(t,e){if(!w.f)throw new o.Z("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,h.zD)();const{offset:r}=e,{width:n,height:s,pixelType:a,statistics:l,depthCount:u,noDataValues:c,bandMasks:f,pixels:d,mask:p}=(0,h.Jx)(t,{inputOffset:r,returnInterleaved:e.returnInterleaved});return new i.Z({width:n,height:s,pixelType:a.toLowerCase(),pixels:d,mask:p,statistics:l,bandMasks:f,depthCount:u,noDataValues:c})}async function x(t,e){const r=await(0,y.Jx)(t,{...e,noDataValue:null});(0,n.O3)(r);const o=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,bandMasks:r.bandMasks,statistics:null});return o.updateStatistics(),o}function k(t,e){const r=e.pixelType||"u8",o=i.Z.getPixelArrayConstructor(r),n="u8"===r?t:new o(t.buffer),s=[],a=e.planes||1;if(1===a)s.push(n);else for(let r=0;r<a;r++){const i=(e.width||1)*(e.height||t.length),l=new o(i);for(let t=0;t<i;t++)l[t]=n[t*a+r];s.push(l)}const l=new i.Z({width:e.width||1,height:e.height||t.length,pixels:s,pixelType:r,statistics:null});return l.updateStatistics(),l}function A(t,e){return k(new a.Z(new Uint8Array(t)).getBytes(),e)}function S(t,e){return k((0,f.J)(t,e.offset,e.eof,!e.isInputBigEndian),e)}function T(t,e,r){const{pixelTypeCtor:o}=function(t){let e=null,r=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,e=Uint8Array;break;case"u16":r=r||65535,e=Uint16Array;break;case"u32":r=r||2**32-1,e=Uint32Array;break;case"s8":r=r||-128,e=Int8Array;break;case"s16":r=r||-32768,e=Int16Array;break;case"s32":r=r||0-2**31,e=Int32Array;break;default:e=Float32Array}return{pixelTypeCtor:e,noDataValue:r}}(e.pixelType),n=(0,g.decode)(t,{width:e.width,height:e.height,pixelType:o,format:r}),s=new i.Z({width:e.width,height:e.height,pixels:n.pixels,pixelType:e.pixelType,mask:n.mask,statistics:null});return s.updateStatistics(),s}function I(t,e){const r=c.decode(t,e.hasNoZlibMask??void 0),o=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:"U8",mask:r.mask,statistics:null});return o.updateStatistics(),o}function M(t,e){const r=new Uint8Array(t),o=new b(r),{width:n,height:s}=e,a=n*s,l=o.decode();let u,c=0,h=0;const f=new Uint8Array(a);for(c=0;c<a;c++)f[c]=l[4*c+3];const d=new i.Z({width:n,height:s,pixels:[],pixelType:"U8",mask:f,statistics:[]});for(c=0;c<3;c++){for(u=new Uint8Array(a),h=0;h<a;h++)u[h]=l[4*h+c];d.addData({pixels:u})}return d.updateStatistics(),d}async function P(t,e,r,o){const n=new l,s={applyJpegMask:!1,format:e,...r},a=await n.decode(t,s,o),u=new i.Z(a);return u.updateStatistics(),u}function E(t){if(null==t)throw new o.Z("rasterCodec:decode","parameter encodeddata is required.");const e=new Uint8Array(t,0,10);let r="";return 255===e[0]&&216===e[1]?r="jpg":137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]?r="png":67===e[0]&&110===e[1]&&116===e[2]&&90===e[3]&&73===e[4]&&109===e[5]&&97===e[6]&&103===e[7]&&101===e[8]&&32===e[9]?r="lerc":76===e[0]&&101===e[1]&&114===e[2]&&99===e[3]&&50===e[4]&&32===e[5]?r="lerc2":73===e[0]&&73===e[1]&&42===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&42===e[3]||73===e[0]&&73===e[1]&&43===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&43===e[3]?r="tiff":71===e[0]&&73===e[1]&&70===e[2]?r="gif":66===e[0]&&77===e[1]?r="bmp":String.fromCharCode.apply(null,e).toLowerCase().includes("error")&&(r="error"),r}function R(t){let e=E(t);return"lerc2"===e?e="lerc":"error"===e&&(e=""),e}async function L(t,e={},r){if(null==t)throw new o.Z("rasterCodec:decode","missing encodeddata parameter.");let n=e.format?.toLowerCase();if(!("bsq"!==n&&"bip"!==n||null!=e.width&&null!=e.height))throw new o.Z("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===n&&e.customOptions)return async function(t,e){const r=await(0,y.Uw)(t,e.customOptions),o=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return o.updateStatistics(),o}(t,e);if((!n||"bsq"!==n&&"bip"!==n&&"deflate"!==n&&"lzw"!==n)&&(n=E(t)),e.useCanvas&&C.has(n))return P(t,n,e,r);const s=function(t){let e=null;switch(t){case"lerc":case"lerc2":e=v;break;case"jpg":e=I;break;case"png":e=M;break;case"bsq":case"bip":e=(e,r)=>T(e,r,t);break;case"tiff":e=x;break;case"deflate":e=A;break;case"lzw":e=S;break;case"error":e=()=>{throw new o.Z("rasterCodec:decode","input data contains error")};break;default:e=()=>{throw new o.Z("rasterCodec:decode","unsupported raster format")}}return e}(n);e.isPoint&&(null!=(e={...e}).width&&e.width++,null!=e.height&&e.height++);const a=await s(t,e);return a?("jpg"!==n&&null!=e.noDataValue&&1===a.depthCount&&(0,d.A)(a,e.noDataValue,{customFloatTolerance:e.tolerance}),e.isPoint&&function(t,e=1){if(!t)return;const{pixels:r,width:o,height:n,mask:s}=t;if(!r||0===r.length)return;const a=r.length,l=o-1,u=n-1,c=[];let h,f,d,p,m,g,y=null;const w=i.Z.getPixelArrayConstructor(t.pixelType);if(0===e){for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)g[f*l+d]=m[p+d];c.push(g)}if(null!=s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)y[f*l+d]=s[p+d]}else{for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)g[f*l+d]=(m[p+d]+m[p+d+1]+m[p+o+d]+m[p+o+d+1])/4;c.push(g)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)y[f*l+d]=Math.min.apply(null,[s[p+d],s[p+d+1],s[p+o+d],s[p+o+d+1]])}t.width=l,t.height=u,t.mask=y,t.pixels=c}(a),a):a}},94793:(t,e,r)=>{r.d(e,{Dq:()=>E,FI:()=>R,I7:()=>O,If:()=>L,Jx:()=>z,Uw:()=>V,cK:()=>N,ee:()=>U,vr:()=>_});var o=r(20095),n=r(97575),i=r(72955),s=r(88781),a=r(81578),l=r(9832),u=r(48279),c=r(80899);const h=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],f=4294967296,d=new Set([1,5,6,7,8,34712,34887]);function p(t,e){let r="unknown";return 3===t?r=64===e?"f64":"f32":1===t?1===e?r="u1":2===e?r="u2":4===e?r="u4":e<=8?r="u8":e<=16?r="u16":e<=32&&(r="u32"):2===t&&(e<=8?r="s8":e<=16?r="s16":e<=32&&(r="s32")),r}function m(t){let e=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f64":e=Float64Array;break;default:e=Float32Array}return e}function g(t,e){return{x:e[0]*t.x+e[1]*t.y+e[2],y:e[3]*t.x+e[4]*t.y+e[5]}}function y(t,e){return t.get(e)?.values}function w(t,e){return t.get(e)?.values}function b(t,e){return t.get(e)?.values?.[0]}function C(t,e){return t.get(e)?.values?.[0]}function v(t,e,r,o=0,n=l.Z.tiffTags,i=4){const s=8===i,a=s?D(new DataView(t,r,8),0,e):new DataView(t,r,2).getUint16(0,e),u=4+2*i,c=s?8:2,h=c+a*u;if(r+h>t.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:h};const f=r+h+4<=t.byteLength?B(new DataView(t,r+h,8===i?8:4),0,e,8===i):null,d=r+c,p=new Map;let m,g,y,w,b,C=0,v=0;for(let r=0;r<a;r++){g=new DataView(t,d+u*r,u),y=g.getUint16(0,e),b=g.getUint16(2,e),w=l.Z.getTagName(y,n);const s=[];2===i?(C=g.getUint16(4,e),v=g.getUint16(6,e)):4===i?(C=g.getUint32(4,e),v=g.getUint32(8,e)):8===i&&(C=B(g,4,e,!0),v=B(g,12,e,!0),s.push(g.getUint32(12,e)),s.push(g.getUint32(16,e))),m={id:y,type:b,valueCount:C,valueOffset:v,valueOffsets:s,values:null},E(t,e,m,o,!1,i),p.set(w,m)}return{success:!0,ifd:p,nextIFD:f,requiredBufferSize:h}}const x=(t,e)=>(0,i.Jx)(t,{inputOffset:e}).pixels[0];function k(t,e){if(1!==e&&2!==e&&4!==e)return t;const r=new Uint8Array(t),o=8/e,n=new Uint8Array(t.byteLength*o);let i=0;const s=2**e-1;for(let t=0;t<r.length;t++){const a=r[t];for(let t=0;t<o;t++)n[i++]=a<<e*t>>>8-e&s}return n.buffer}function A(t,e,r){const o=new n.J;o.parse(t),o.colorTransform=6===r?-1:0;const i=o.getData(o.width,o.height,1!==e&&4!==e);return new Uint8Array(i.buffer)}function S(t){const e=new c.Z(t).getBytes(),r=new ArrayBuffer(e.length),o=new Uint8Array(r);return o.set(e),o}async function T(t,e,r,o,n){const a=u.f===e,l=C(r,"BITSPERSAMPLE"),c=C(r,"SAMPLESPERPIXEL")??1,h=C(r,"PHOTOMETRICINTERPRETATION"),f=C(r,"SAMPLEFORMAT")??1,d=p(f,l),g=C(r,"COMPRESSION")??1,y=m(d);let w,b,v;if(34887===g)return await(0,i.zD)(),x(t,o);if(1===g)w=t.slice(o,o+n),b=new Uint8Array(w);else if(8===g||32946===g)b=new Uint8Array(t,o,n),b=S(b),w=b.buffer;else if(6===g)b=new Uint8Array(t,o,n),b=A(b,c,h),w=b.buffer;else if(7===g){const e=r.get("JPEGTABLES").values,i=e.length-2;b=new Uint8Array(i+n-2);for(let t=0;t<i;t++)b[t]=e[t];const s=new Uint8Array(t,o+2,n-2);for(let t=0;t<s.length;t++)b[i+t]=s[t];b=A(b,c,h),w=b.buffer}else{if(5!==g)throw new Error("tiff-decode: unsupport compression "+g);b=(0,s.J)(t,o,n,e),w=b.buffer}if(w=k(w,l),"u8"===d||"s8"===d||a)v=new y(w);else{w=new ArrayBuffer(b.length);const t=new Uint8Array(w);switch(d){case"u16":case"s16":for(let e=0;e<b.length;e+=2)t[e]=b[e+1],t[e+1]=b[e];break;case"u32":case"s32":case"f32":for(let e=0;e<b.length;e+=4)t[e]=b[e+3],t[e+1]=b[e+2],t[e+2]=b[e+1],t[e+3]=b[e]}v=new y(w)}const T=C(r,"PREDICTOR")??1,I=C(r,"TILEWIDTH"),M=C(r,"TILELENGTH");if(T>1&&(5===g||8===g||32946===g)&&I&&M){const t=L(r),e=new y(v.length);e.set(v),v=function(t,e,r,o,n){const i=o?4:1,s=r*i*n;o&&(t=new Uint8Array(t.buffer));for(let r=0;r<e;r++){const e=r*s;for(let r=n;r<s;r++)t[e+r]+=t[e+r-n]}if(!o)return t;const a=new Uint8Array(t.length),l=r*n;for(let r=0;r<e;r++){const e=r*s;for(let r=0;r<l;r++)for(let o=0;o<i;o++)a[e+r*i+o]=t[e+r+(i-o-1)*l]}return new Float32Array(a.buffer)}(e,M,I,3===f&&3===T,t?1:c)}return v}const I=(t,e,r)=>{const o=u.f===e.littleEndian,n=w(r,"STRIPOFFSETS");if(void 0===n)return null;const{width:i,height:a,pixelType:l}=R([r]),c=C(r,"SAMPLESPERPIXEL")||e.planes,h=C(r,"PHOTOMETRICINTERPRETATION"),f=i*a,d=C(r,"BITSPERSAMPLE"),p=m(l),g=new p(f*c),y=w(r,"STRIPBYTECOUNTS"),b=C(r,"ROWSPERSTRIP"),v=C(r,"COMPRESSION")??1;let x,T,I,M,P,E,L,U,O,D=b;if(d%8==0)for(x=0;x<n.length;x++){if(P=x*(b*i)*c,D=(x+1)*b>a?a-x*b:b,"u8"===l||"s8"===l||o)8===v||32946===v?(L=new Uint8Array(t,n[x],y[x]),L=S(L),E=L.buffer):6===v?(L=new Uint8Array(t,n[x],y[x]),L=A(L,c,h),E=L.buffer):5===v?(L=(0,s.J)(t,n[x],y[x],e.littleEndian),E=L.buffer):(y[x]!==D*i*c*d/8&&console.log("strip byte counts is different than expected"),E=t.slice(n[x],n[x]+y[x])),E=k(E,d),M=new p(E);else{switch(6===v||8===v||32946===v?(L=new Uint8Array(t,n[x],y[x]),U=S(L),E=U.buffer):(y[x]!==D*i*c*d/8&&console.log("strip byte counts is different than expected"),E=new ArrayBuffer(y[x]),L=new Uint8Array(t,n[x],y[x]),U=new Uint8Array(E)),l){case"u16":case"s16":for(I=0;I<L.length;I+=2)U[I]=L[I+1],U[I+1]=L[I];break;case"u32":case"s32":case"f32":for(I=0;I<L.length;I+=4)U[I]=L[I+3],U[I+1]=L[I+2],U[I+2]=L[I+1],U[I+3]=L[I]}E=k(E,d),M=new p(E)}g.set(M,P)}const G=[];if(1===c)G.push(g);else for(x=0;x<c;x++){for(O=new p(f),T=0;T<f;T++)O[T]=g[T*c+x];G.push(O)}return{width:i,height:a,pixelType:l,pixels:G}},M=(t,e,r)=>{if(!(t&&t.length>0&&e&&r))return null;let o,n,i;const s=t[0].length,a=t.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(o=t[u],n=e[u],i=r[u],0===u)for(let t=0;t<s;t++)l[t]=o[t]<n||o[t]>i?0:1;else for(let t=0;t<s;t++)l[t]&&(l[t]=o[t]<n||o[t]>i?0:1);return l},P=t=>{if(!t)return null;const e=t.match(/<Item(.*?)Item>/gi);if(!e||0===e.length)return null;const r=new Map;let o,n,i,s,a;for(let t=0;t<e.length;t++)o=e[t],n=o.slice(6,o.indexOf(">")),s=o.indexOf("sample="),s>-1&&(a=o.slice(s+8,o.indexOf('"',s+8))),s=o.indexOf("name="),s>-1&&(n=o.slice(s+6,o.indexOf('"',s+6))),n&&(i=o.slice(o.indexOf(">")+1,o.indexOf("</Item>")).trim(),null!=a?r.has(n)?r.get(n)[a]=i:r.set(n,[i]):r.set(n,i)),a=null;const l=r.get("STATISTICS_MINIMUM"),u=r.get("STATISTICS_MAXIMUM"),c=r.get("STATISTICS_MEAN"),h=r.get("STATISTICS_STDDEV");let f=null;if(l&&u){f=[];for(let t=0;t<l.length;t++)f.push({min:parseFloat(l[t]),max:parseFloat(u[t]),avg:c&&parseFloat(c[t]),stddev:h&&parseFloat(h[t])})}const d=r.get("BandName"),p=r.get("WavelengthMin"),m=r.get("WavelengthMax");let g=null;if(d){g=[];for(let t=0;t<d.length;t++)g.push({BandName:d[t],WavelengthMin:p&&parseFloat(p[t]),WavelengthMax:m&&parseFloat(m[t])})}return{statistics:f,bandProperties:g,dataType:r.get("DataType"),rawMetadata:r}};function E(t,e,r,o=0,n=!1,i=4){if(r.values)return!0;const s=r.type,a=r.valueCount;let l=r.valueOffset,u=[];const c=h[s],d=8*c,p=a*c,m=a*h[s]*8;let g,y;const w=8===i?64:32,b=r.valueOffsets;if(m>w&&p>(n?t.byteLength:t?t.byteLength-l+o:0))return r.offlineOffsetSize=[l,p],r.values=null,!1;if(m<=w){if(!e)if(w<=32)l>>>=32-m;else{const t=b?.length?b[0]:l>>>0,e=b?.length?b[1]:Math.round((l-t)/f);m<=32?(l=t>>>32-m,b[0]=l):(l=t*2**(32-m)+(e>>>32-m),b[0]=t,b[1]=e>>>32-m)}if(1===a&&d===w)u=[l];else if(64===w){const t=b?.length?b[0]:l>>>0,e=b?.length?b[1]:Math.round((l-t)/f);let r=t,o=32;for(y=1;y<=a;y++){const t=32-d*y%32;if(o<d){const n=r<<t>>>32-o,i=e<<32-o>>>32-o;r=e,u.push(n+i*2**(d-o)),o-=32-(d-o)}else u.push(r<<t>>>32-d),o-=d;0===o&&(o=32,r=e)}}else for(y=1;y<=a;y++){const t=32-d*y;u.push(l<<t>>>32-d)}}else{l-=o,n&&(l=0);for(let r=l;r<l+p;r+=c){switch(s){case 1:case 2:case 7:g=new DataView(t,r,1).getUint8(0);break;case 3:g=new DataView(t,r,2).getUint16(0,e);break;case 4:case 13:g=new DataView(t,r,4).getUint32(0,e);break;case 5:g=new DataView(t,r,4).getUint32(0,e)/new DataView(t,r+4,4).getUint32(0,e);break;case 6:g=new DataView(t,r,1).getInt8(0);break;case 8:g=new DataView(t,r,2).getInt16(0,e);break;case 9:g=new DataView(t,r,4).getInt32(0,e);break;case 10:g=new DataView(t,r,4).getInt32(0,e)/new DataView(t,r+4,4).getInt32(0,e);break;case 11:g=new DataView(t,r,4).getFloat32(0,e);break;case 12:g=new DataView(t,r,8).getFloat64(0,e);break;case 16:case 18:g=D(new DataView(t,r,8),0,e);break;case 17:g=G(new DataView(t,r,8),0,e);break;default:g=null}u.push(g)}}if(2===s){let t="";const e=u;for(u=[],y=0;y<e.length;y++)0===e[y]&&""!==t?(u.push(t),t=""):t+=String.fromCharCode(e[y]);""===t&&0!==u.length||u.push(t)}return r.values=u,!0}function R(t){const e=t[0],r=C(e,"TILEWIDTH"),o=C(e,"TILELENGTH"),n=C(e,"IMAGEWIDTH"),i=C(e,"IMAGELENGTH"),s=C(e,"BITSPERSAMPLE"),a=C(e,"SAMPLESPERPIXEL"),l=C(e,"SAMPLEFORMAT")??1,u=p(l,s),c=L(e),h=y(e,"GDAL_NODATA");let f=null;h?.length&&(f=h.map((t=>parseFloat(t))),f.some((t=>isNaN(t)))&&(f=null));const m=C(e,"COMPRESSION")??1;let v;switch(m){case 1:v="NONE";break;case 2:case 3:case 4:case 32771:v="CCITT";break;case 5:v="LZW";break;case 6:case 7:v="JPEG";break;case 32773:v="PACKBITS";break;case 8:case 32946:v="DEFLATE";break;case 34712:v="JPEG2000";break;case 34887:v="LERC";break;default:v=String(m)}let x=!0,k="";d.has(m)||(x=!1,k+="unsupported tag compression "+m),l>3&&(x=!1,k+="unsupported tag sampleFormat "+l),1!==s&&2!==s&&4!==s&&s%8!=0&&(x=!1,k+="unsupported tag bitsPerSample "+s);const A=b(e,"GEOASCIIPARAMS");let S;if(A){const t=A.split("|").find((t=>t.includes("ESRI PE String = "))),e=t?t.replace("ESRI PE String = ",""):"";S=e.startsWith("COMPD_CS")||e.startsWith("PROJCS")||e.startsWith("GEOGCS")?{wkid:null,wkt:e}:null}const T=w(e,"GEOTIEPOINTS"),I=w(e,"GEOPIXELSCALE"),M=w(e,"GEOTRANSMATRIX"),E=e.has("GEOKEYDIRECTORY")?e.get("GEOKEYDIRECTORY").data:null;let R,D,G=!1,B=!1;if(E){G=2===C(E,"GTRasterTypeGeoKey");const t=C(E,"GTModelTypeGeoKey");if(2===t){const t=C(E,"GeographicTypeGeoKey");t>=1024&&t<=32766&&(S={wkid:t}),S||32767!==t||(B=!0,S={wkid:4326})}else if(1===t){const t=C(E,"ProjectedCSTypeGeoKey");t>=1024&&t<=32766&&(S={wkid:t})}}if(I&&T&&T.length>=6?(R=[I[0],0,T[3]-T[0]*I[0],0,-Math.abs(I[1]),T[4]-T[1]*I[1]],G&&(R[2]-=.5*R[0]+.5*R[1],R[5]-=.5*R[3]+.5*R[4])):M&&16===M.length&&(R=G?[M[0],M[1],M[3]-.5*M[0],M[4],M[5],M[7]-.5*M[5]]:[M[0],M[1],M[3],M[4],M[5],M[7]]),R){const t=[{x:0,y:i},{x:0,y:0},{x:n,y:i},{x:n,y:0}];let e,r=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let n=0;n<t.length;n++)e=g(t[n],R),r=e.x>r?r:e.x,s=e.x<s?s:e.x,o=e.y>o?o:e.y,a=e.y<a?a:e.y;D={xmin:r,xmax:s,ymin:o,ymax:a,spatialReference:S}}else D={xmin:-.5,ymin:.5-i,xmax:n-.5,ymax:.5,spatialReference:S};B&&(D.xmax-D.xmin>400||Math.max(Math.abs(D.xmin),Math.abs(D.xmax))>361)&&(S=null,D.spatialReference=null);const N=U(t);let _,V,z,j,Z;if(N.length>0){z=Math.round(Math.log(n/C(N[0],"IMAGEWIDTH"))/Math.LN2);const t=N[N.length-1];j=Math.round(Math.log(n/C(t,"IMAGEWIDTH"))/Math.LN2),_=C(t,"TILEWIDTH"),V=C(t,"TILELENGTH")}_=null!=j&&j>0?_||r:null,V=null!=j&&j>0?V||o:null,r&&(Z=[{maxCol:Math.ceil(n/r)-1,maxRow:Math.ceil(i/o)-1,minRow:0,minCol:0}],N.forEach((t=>{Z.push({maxCol:Math.ceil(C(t,"IMAGEWIDTH")/C(t,"TILEWIDTH"))-1,maxRow:Math.ceil(C(t,"IMAGELENGTH")/C(t,"TILELENGTH"))-1,minRow:0,minCol:0})})));const W=b(t[0],"GDAL_METADATA"),J=P(W);return k+=" "+F({width:n,height:i,tileWidth:r,tileHeight:o,planes:a,ifds:t}),{width:n,height:i,tileWidth:r,tileHeight:o,planes:a,isBSQ:c,pixelType:u,compression:v,noData:f,hasMaskBand:O(t).length===N.length+1,isSupported:x,message:k,extent:D,isPseudoGeographic:B,affine:I?null:R,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:_,pyramidBlockHeight:V,tileBoundary:Z,metadata:J}}function L(t,e){const r=y(t,"PLANARCONFIGURATION");return r?2===r[0]:!!e&&e.isBSQ}function U(t){return t.filter((t=>1===C(t,"NEWSUBFILETYPE")))}function O(t){return t.filter((t=>{const e=4==(4&(C(t,"NEWSUBFILETYPE")??0)),r=4===C(t,"PHOTOMETRICINTERPRETATION");return e&&r}))}function D(t,e,r){const o=t.getUint32(e,r),n=t.getUint32(e+4,r);return r?n*f+o:o*f+n}function G(t,e,r){let o=r?t.getInt32(e,r):t.getUint32(e,r),n=r?t.getUint32(e+4,r):t.getInt32(e+4,r);const i=(r?o:n)>=0?1:-1;return r?o*=i:n*=i,i*(r?n*f+o:o*f+n)}function B(t,e,r,o){return o?D(t,e,r):t.getUint32(e,r)}function N(t){const e=new DataView(t,0,16),r=e.getUint16(0,!1);let o=null;if(18761===r)o=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");o=!1}const n=e.getUint16(2,o);if(42!==n&&43!==n)throw new Error("unexpected tiff identifier");let i=4;const s=43===n;if(s){const t=e.getUint16(i,o);if(i+=2,8!==t)throw new Error("unsupported bigtiff version");if(0!==e.getUint16(i,o))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:o,isBigTiff:s,firstIFDPos:B(e,i,o,s)}}function _(t,e,r,n=0,i=l.Z.tiffTags,s=4){const a=v(t,e,r,n,i,s);let u;const c=a.ifd;if(c){if(l.Z.ifdTags.forEach(((r,o)=>{c.has(o)&&(u=c.get(o),u.data=v(t,e,u.valueOffset-n,n,r).ifd)})),c.has("GEOKEYDIRECTORY")){u=c.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const o=r[0]+"."+r[1]+"."+r[2];u.data=v(t,e,u.valueOffset+6-n,n,l.Z.geoKeys,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[o]})}}if(c.has("XMP")){u=c.get("XMP");const t=u.values;"number"==typeof t[0]&&7===u.type&&(u.values=[(0,o.f)(new Uint8Array(t))])}}return a}function F(t){const{width:e,height:r,tileHeight:o,tileWidth:n}=t,i=t.planes,s=n?n*o:e*r,a=C(t.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/8:1)&&(l=n?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function V(t,e){const{headerInfo:r,ifd:o,offsets:n,sizes:i}=e,s=[];for(let e=0;e<n.length;e++){i[e];const a=await T(t,r.littleEndian,o,n[e],i[e]||t.byteLength);s.push(a)}const l=L(o,r),u=C(o,"BITSPERSAMPLE"),c=p(C(o,"SAMPLEFORMAT")??1,u),h=C(o,"SAMPLESPERPIXEL")||r.planes,f=m(c),d=C(o,"TILEWIDTH"),g=C(o,"TILELENGTH"),y=C(o,"COMPRESSION")??1,w=d*g;let b;const v=[];let x=s[0];const k=34887===y;for(let t=0;t<h;t++){if(b=new f(w),s.length===h)x=s[t],x.length===w&&(b=x);else if(x.length)if(l||k)b=x.length===w?x:x.slice(w*t,w*(t+1));else for(let e=0;e<w;e++)b[e]=x[e*h+t];v.push(b)}const A=r.noData?r.noData[0]:e.noDataValue,S=r.metadata?r.metadata.statistics:null,I=S?S.map((t=>t.min)):null,P=S?S.map((t=>t.max)):null,E={pixelType:c,width:d,height:g,pixels:v,noDataValue:A};return null!=A?(0,a.A)(E,A):I&&P&&e.applyMinMaxConstraint&&(E.mask=M(v,I,P)),E}async function z(t,e={}){const r=e.pyramidLevel||0,o=e.headerInfo||function(t){const{littleEndian:e,isBigTiff:r,firstIFDPos:o}=N(t);let n=o;const i=[];do{const o=_(t,e,n,0,l.Z.tiffTags,r?8:4);if(!o.success)break;i.push(o.ifd),n=o.nextIFD}while(n>0);return{...R(i),littleEndian:e,isBigTiff:r,ifds:i,pyramidIFDs:U(i),maskIFDs:O(i)}}(t),{ifds:n,noData:i}=o;if(0===n.length)throw new Error("no valid image file directory");const s=F(o);if(s)throw s;let u=null;const c=-1===r?n[n.length-1]:n[r],h=i??e.noDataValue;return u=o.tileWidth?await async function(t,e,r){const o=w(r,"TILEOFFSETS");if(void 0===o)return null;const n=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=R([r]),c=L(r,e),h=C(r,"SAMPLESPERPIXEL")||e.planes,f=i*s,d=C(r,"BITSPERSAMPLE"),p=34887===(C(r,"COMPRESSION")??1),g=m(a),y=[];for(let t=0;t<h;t++)y.push(new g(f));let b,v,x,k,A,S,I,M,P,E,U,O,D;const G=Math.ceil(i/l),B=new Uint8Array(f).fill(255);let N=!1;if(d%8==0)if(p&&c&&h>1){const a=Math.round(o.length/h);for(b=0;b<a;b++){S=Math.floor(b/G)*u,I=b%G*l,M=S*i+I;for(let a=0;a<h;a++){const c=b*h+a;for(0===n[c]?(x=null,N=!0):x=await T(t,e.littleEndian,r,o[c],n[c]),E=0,P=M,O=Math.min(l,i-I),U=Math.min(u,s-S),D=y[a],k=0;k<U;k++)for(P=M+k*i,E=k*l,A=0;A<O;A++,P++,E++)x?D[P]=x[E]:B[P]=0}}}else for(b=0;b<o.length;b++)for(S=Math.floor(b/G)*u,I=b%G*l,M=S*i+I,0===n[b]?(x=null,N=!0):x=await T(t,e.littleEndian,r,o[b],n[b]),E=0,P=M,O=Math.min(l,i-I),U=Math.min(u,s-S),v=0;v<h;v++)if(D=y[v],c||p)for(k=0;k<U;k++)for(P=M+k*i,E=l*u*v+k*l,A=0;A<O;A++,P++,E++)x?D[P]=x[E]:B[P]=0;else for(k=0;k<U;k++)for(P=M+k*i,E=k*l*h+v,A=0;A<O;A++,P++,E+=h)x?D[P]=x[E]:B[P]=0;return{width:i,height:s,pixelType:a,pixels:y,mask:N?B:void 0}}(t,o,c):I(t,o,c),u?(null!=h&&(0,a.A)(u,h),u):u}},9832:(t,e,r)=>{r.d(e,{Z:()=>a});const o=(()=>{const t=[];return t[254]="NEWSUBFILETYPE",t[255]="SUBFILETYPE",t[256]="IMAGEWIDTH",t[257]="IMAGELENGTH",t[258]="BITSPERSAMPLE",t[259]="COMPRESSION",t[262]="PHOTOMETRICINTERPRETATION",t[263]="THRESHHOLDING",t[264]="CELLWIDTH",t[265]="CELLLENGTH",t[266]="FILLORDER",t[269]="DOCUMENTNAME",t[270]="IMAGEDESCRIPTION",t[271]="MAKE",t[272]="MODEL",t[273]="STRIPOFFSETS",t[274]="ORIENTATION",t[277]="SAMPLESPERPIXEL",t[278]="ROWSPERSTRIP",t[279]="STRIPBYTECOUNTS",t[280]="MINSAMPLEVALUE",t[281]="MAXSAMPLEVALUE",t[282]="XRESOLUTION",t[283]="YRESOLUTION",t[284]="PLANARCONFIGURATION",t[285]="PAGENAME",t[286]="XPOSITION",t[287]="YPOSITION",t[288]="FREEOFFSETS",t[289]="FREEBYTECOUNTS",t[290]="GRAYRESPONSEUNIT",t[291]="GRAYRESPONSECURVE",t[292]="T4OPTIONS",t[293]="T6OPTIONS",t[296]="RESOLUTIONUNIT",t[297]="PAGENUMBER",t[300]="COLORRESPONSEUNIT",t[301]="TRANSFERFUNCTION",t[305]="SOFTWARE",t[306]="DATETIME",t[315]="ARTIST",t[316]="HOSTCOMPUTER",t[317]="PREDICTOR",t[318]="WHITEPOINT",t[319]="PRIMARYCHROMATICITIES",t[320]="COLORMAP",t[321]="HALFTONEHINTS",t[322]="TILEWIDTH",t[323]="TILELENGTH",t[324]="TILEOFFSETS",t[325]="TILEBYTECOUNTS",t[326]="BADFAXLINES",t[327]="CLEANFAXDATA",t[328]="CONSECUTIVEBADFAXLINES",t[330]="SUBIFD",t[332]="INKSET",t[333]="INKNAMES",t[334]="NUMBEROFINKS",t[336]="DOTRANGE",t[337]="TARGETPRINTER",t[338]="EXTRASAMPLES",t[339]="SAMPLEFORMAT",t[340]="SMINSAMPLEVALUE",t[341]="SMAXSAMPLEVALUE",t[342]="TRANSFERRANGE",t[347]="JPEGTABLES",t[512]="JPEGPROC",t[513]="JPEGIFOFFSET",t[514]="JPEGIFBYTECOUNT",t[515]="JPEGRESTARTINTERVAL",t[517]="JPEGLOSSLESSPREDICTORS",t[518]="JPEGPOINTTRANSFORM",t[519]="JPEGQTABLES",t[520]="JPEGDCTABLES",t[521]="JPEGACTABLES",t[529]="YCBCRCOEFFICIENTS",t[530]="YCBCRSUBSAMPLING",t[531]="YCBCRPOSITIONING",t[532]="REFERENCEBLACKWHITE",t[700]="XMP",t[33550]="GEOPIXELSCALE",t[33922]="GEOTIEPOINTS",t[33432]="COPYRIGHT",t[42112]="GDAL_METADATA",t[42113]="GDAL_NODATA",t[50844]="RPCCOEFFICIENT",t[34264]="GEOTRANSMATRIX",t[34735]="GEOKEYDIRECTORY",t[34736]="GEODOUBLEPARAMS",t[34737]="GEOASCIIPARAMS",t[34665]="EXIFIFD",t[34853]="GPSIFD",t[40965]="INTEROPERABILITYIFD",t})(),n=(()=>{const t=o.slice();return t[36864]="ExifVersion",t[40960]="FlashpixVersion",t[40961]="ColorSpace",t[42240]="Gamma",t[37121]="ComponentsConfiguration",t[37122]="CompressedBitsPerPixel",t[40962]="PixelXDimension",t[40963]="PixelYDimension",t[37500]="MakerNote",t[37510]="UserComment",t[40964]="RelatedSoundFile",t[36867]="DateTimeOriginal",t[36868]="DateTimeDigitized",t[36880]="OffsetTime",t[36881]="OffsetTimeOriginal",t[36882]="OffsetTimeDigitized",t[37520]="SubSecTime",t[37521]="SubSecTimeOriginal",t[37522]="SubSecTimeDigitized",t[37888]="Temperature",t[37889]="Humidity",t[37890]="Pressure",t[37891]="WaterDepth",t[37892]="Acceleration",t[37893]="CameraElevationAngle",t[42016]="ImageUniqueID",t[42032]="CameraOwnerName",t[42033]="BodySerialNumber",t[42034]="LensSpecification",t[42035]="LensMake",t[42036]="LensModel",t[42037]="LensSerialNumber",t[33434]="ExposureTime",t[33437]="FNumber",t[34850]="ExposureProgram",t[34852]="SpectralSensitivity",t[34855]="PhotographicSensitivity",t[34856]="OECF",t[34864]="SensitivityType",t[34865]="StandardOutputSensitivity",t[34866]="RecommendedExposureIndex",t[34867]="ISOSpeed",t[34868]="ISOSpeedLatitudeyyy",t[34869]="ISOSpeedLatitudezzz",t[37377]="ShutterSpeedValue",t[37378]="ApertureValue",t[37379]="BrightnessValue",t[37380]="ExposureBiasValue",t[37381]="MaxApertureValue",t[37382]="SubjectDistance",t[37383]="MeteringMode",t[37384]="LightSource",t[37385]="Flash",t[37386]="FocalLength",t[37396]="SubjectArea",t[41483]="FlashEnergy",t[41484]="SpatialFrequencyResponse",t[41486]="FocalPlaneXResolution",t[41487]="FocalPlaneYResolution",t[41488]="FocalPlaneResolutionUnit",t[41492]="SubjectLocation",t[41493]="ExposureIndex",t[41495]="SensingMethod",t[41728]="FileSource",t[41729]="SceneType",t[41730]="CFAPattern",t[41985]="CustomRendered",t[41986]="ExposureMode",t[41987]="WhiteBalance",t[41988]="DigitalZoomRatio",t[41989]="FocalLengthIn35mmFilm",t[41990]="SceneCaptureType",t[41991]="GainControl",t[41992]="Contrast",t[41993]="Saturation",t[41994]="Sharpness",t[41995]="DeviceSettingDescription",t[41996]="SubjectDistanceRange",t})(),i=(()=>{const t=[];return t[1024]="GTModelTypeGeoKey",t[1025]="GTRasterTypeGeoKey",t[1026]="GTCitationGeoKey",t[2048]="GeographicTypeGeoKey",t[2049]="GeogCitationGeoKey",t[2050]="GeogGeodeticDatumGeoKey",t[2051]="GeogPrimeMeridianGeoKey",t[2052]="GeogLinearUnitsGeoKey",t[2053]="GeogLinearUnitSizeGeoKey",t[2054]="GeogAngularUnitsGeoKey",t[2055]="GeogAngularUnitSizeGeoKey",t[2056]="GeogEllipsoidGeoKey",t[2057]="GeogSemiMajorAxisGeoKey",t[2058]="GeogSemiMinorAxisGeoKey",t[2059]="GeogInvFlatteningGeoKey",t[2061]="GeogPrimeMeridianLongGeoKey",t[2060]="GeogAzimuthUnitsGeoKey",t[3072]="ProjectedCSTypeGeoKey",t[3073]="PCSCitationGeoKey",t[3074]="ProjectionGeoKey",t[3075]="ProjCoordTransGeoKey",t[3076]="ProjLinearUnitsGeoKey",t[3077]="ProjLinearUnitSizeGeoKey",t[3078]="ProjStdParallel1GeoKey",t[3079]="ProjStdParallel2GeoKey",t[3080]="ProjNatOriginLongGeoKey",t[3081]="ProjNatOriginLatGeoKey",t[3082]="ProjFalseEastingGeoKey",t[3083]="ProjFalseNorthingGeoKey",t[3084]="ProjFalseOriginLongGeoKey",t[3085]="ProjFalseOriginLatGeoKey",t[3086]="ProjFalseOriginEastingGeoKey",t[3087]="ProjFalseOriginNorthingGeoKey",t[3088]="ProjCenterLongGeoKey",t[3090]="ProjCenterEastingGeoKey",t[3091]="ProjCenterNorthingGeoKey",t[3092]="ProjScaleAtNatOriginGeoKey",t[3093]="ProjScaleAtCenterGeoKey",t[3094]="ProjAzimuthAngleGeoKey",t[3095]="ProjStraightVertPoleLongGeoKey",t[4096]="VerticalCSTypeGeoKey",t[4097]="VerticalCitationGeoKey",t[4098]="VerticalDatumGeoKey",t[4099]="VerticalUnitsGeoKey",t})(),s=new Map;s.set("EXIFIFD",n),s.set("GPSIFD",["GPSVersionID","GPSLatitudeRef","GPSLatitude","GPSLongitudeRef","GPSLongitude","GPSAltitudeRef","GPSAltitude","GPSTimeStamp","GPSSatellites","GPSStatus","GPSMeasureMode","GPSDOP","GPSSpeedRef","GPSSpeed","GPSTrackRef","GPSTrack","GPSImgDirectionRef","GPSImgDirection","GPSMapDatum","GPSDestLatitudeRef","GPSDestLatitude","GPSDestLongitudeRef","GPSDestLongitude","GPSDestBearingRef","GPSDestBearing","GPSDestDistanceRef","GPSDestDistance","GPSProcessingMethod","GPSAreaInformation","GPSDateStamp","GPSDifferential","GPSHPositioningError"]);const a={tiffTags:o,ifdTags:s,geoKeys:i,getTagName:(t,e)=>{let r=(e||o)[t];return void 0===r&&(r="unknown"+String(t)),r}}},81578:(t,e,r)=>{r.d(e,{A:()=>a,r:()=>s});const o=9999999e31,n=2e-7,i={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE],unknown:void 0,c64:void 0,c128:void 0};function s(t){return i[t]??[-34028234663852886e22,34028234663852886e22]}function a(t,e,r){if(t.depthCount&&t.depthCount>1)return;const{pixels:i,statistics:a,pixelType:l}=t,u=i[0].length,c=t.bandMasks??[],h=t.mask??new Uint8Array(u).fill(255),f="f32"===l||"f64"===l,d=s(l);let p=!1;for(let t=0;t<i.length;t++){const s="number"==typeof e?e:e[t];if(null==s)continue;const u=a?.[t].minValue??d[0],m=a?.[t].maxValue??d[1];if(u>s+Number.EPSILON||m<s-Number.EPSILON)continue;const g=c[t]||h.slice(),y=i[t],w=r?.customFloatTolerance;if(f&&0!==w){let t=w;t||(t=Math.abs(s)>=o?n*Math.abs(s):"f32"===l?2**-23:Number.EPSILON);for(let e=0;e<y.length;e++)g[e]&&Math.abs(y[e]-s)<t&&(y[e]=0,g[e]=0,h[e]=0,p=!0)}else for(let t=0;t<y.length;t++)g[t]&&y[t]===s&&(y[t]=0,g[t]=0,h[t]=0,p=!0);c[t]=g}p&&(t.bandMasks=t.bandMasks||t.pixels.length>1?c:null,t.mask=h),p&&"updateStatistics"in t&&t.updateStatistics()}},48279:(t,e,r)=>{r.d(e,{f:()=>o});const o=(()=>{const t=new ArrayBuffer(4),e=new Uint8Array(t);return new Uint32Array(t)[0]=1,1===e[0]})()},55914:(t,e,r)=>{r.d(e,{$f:()=>l,CD:()=>n,DX:()=>o,Gd:()=>c,Pz:()=>h,Qh:()=>O,SJ:()=>f,Uk:()=>D,Vl:()=>L,XV:()=>d,a2:()=>g,nA:()=>x,nk:()=>u,oB:()=>v,pW:()=>S,sS:()=>C,us:()=>A,wV:()=>p,zp:()=>m});var o,n,i,s=r(5847),a=r(81578);(i=o||(o={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(t){t[t.bestMatch=0]="bestMatch",t[t.fail=1]="fail"}(n||(n={}));const l=6;function u(t){return null!=t&&"esri.layers.support.PixelBlock"===t.declaredClass&&t.pixels&&t.pixels.length>0}function c(t){if(!t?.length||t.some((t=>!u(t))))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:r,height:o,pixelType:n}=e[0];if(e.some((t=>t.width!==r||t.height!==o)))return null;const i=e.map((({mask:t})=>t)).filter((t=>null!=t));let a=null;i.length&&(a=new Uint8Array(r*o),a.set(i[0]),i.length>1&&b(i.slice(1),a));const l=[];e.forEach((({pixels:t})=>l.push(...t)));const c=e.map((({statistics:t})=>t)).filter((t=>t?.length)),h=[];return c.forEach((t=>h.push(...t))),new s.Z({pixelType:n,width:r,height:o,mask:a,pixels:l,statistics:h.length?h:null})}function h(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const r=e.sort(((t,e)=>t[0]-e[0]));let o=0;r[0][0]<0&&(o=r[0][0]);const n=Math.max(256,r[r.length-1][0]-o+1),i=new Uint8Array(4*n),s=[];let a,l=0,u=0;const c=5===r[0].length;if(n>65536)return r.forEach((t=>{s[t[0]-o]=c?t.slice(1):t.slice(1).concat([255])})),{indexed2DColormap:s,offset:o,alphaSpecified:c};if(t.fillUnspecified)for(a=r[u],l=a[0]-o;l<n;l++)i[4*l]=a[1],i[4*l+1]=a[2],i[4*l+2]=a[3],i[4*l+3]=c?a[4]:255,l===a[0]-o&&(a=u===r.length-1?a:r[++u]);else for(l=0;l<r.length;l++)a=r[l],u=4*(a[0]-o),i[u]=a[1],i[u+1]=a[2],i[u+2]=a[3],i[u+3]=c?a[4]:255;return{indexedColormap:i,offset:o,alphaSpecified:c}}function f(t,e){if(!u(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const r=t.clone(),o=r.pixels;let n=r.mask;const i=r.width*r.height;if(1!==o.length)return t;const{indexedColormap:s,indexed2DColormap:a,offset:l,alphaSpecified:c}=e;let h=0;const f=o[0],d=new Uint8Array(f.length),p=new Uint8Array(f.length),m=new Uint8Array(f.length);let g,y=0;if(s){const t=s.length-1;if(null!=n)for(h=0;h<i;h++)n[h]&&(y=4*(f[h]-l),y<l||y>t?n[h]=0:(d[h]=s[y],p[h]=s[y+1],m[h]=s[y+2],n[h]=s[y+3]));else{for(n=new Uint8Array(i),h=0;h<i;h++)y=4*(f[h]-l),y<l||y>t?n[h]=0:(d[h]=s[y],p[h]=s[y+1],m[h]=s[y+2],n[h]=s[y+3]);r.mask=n}}else if(a)if(null!=n)for(h=0;h<i;h++)n[h]&&(g=a[f[h]],d[h]=g[0],p[h]=g[1],m[h]=g[2],n[h]=g[3]);else{for(n=new Uint8Array(i),h=0;h<i;h++)g=a[f[h]],d[h]=g[0],p[h]=g[1],m[h]=g[2],n[h]=g[3];r.mask=n}return r.pixels=[d,p,m],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=c,r}function d(t,e){if(!u(t))return null;const{pixels:r,mask:o}=t,n=r.length;let i=e.lut;const{offset:a}=e;i&&1===i[0].length&&(i=r.map((()=>i)));const l=[],c=e.outputPixelType||"u8";for(let t=0;t<n;t++){const e=p(r[t],o,i[t],a||0,c);l.push(e)}const h=new s.Z({width:t.width,height:t.height,pixels:l,mask:o,pixelType:c});return h.updateStatistics(),h}function p(t,e,r,o,n){const i=t.length,a=s.Z.createEmptyBand(n,i);if(e)for(let n=0;n<i;n++)e[n]&&(a[n]=r[t[n]-o]);else for(let e=0;e<i;e++)a[e]=r[t[e]-o];return a}function m(t,e){if(!u(t))return null;const r=t.clone(),{pixels:o}=r,n=r.width*r.height,i=e.length,s=Math.floor(i/2),a=e[Math.floor(s)],l=o[0];let c,h,f,d,p,m,g=!1;const y=new Uint8Array(n),w=new Uint8Array(n),b=new Uint8Array(n);let C=r.mask;const v=4===e[0].mappedColor.length;for(C||(C=new Uint8Array(n),C.fill(v?255:1),r.mask=C),p=0;p<n;p++)if(C[p]){for(c=l[p],g=!1,m=s,h=a,f=0,d=i-1;d-f>1;){if(c===h.value){g=!0;break}c>h.value?f=m:d=m,m=Math.floor((f+d)/2),h=e[Math.floor(m)]}g||(c===e[f].value?(h=e[f],g=!0):c===e[d].value?(h=e[d],g=!0):c<e[f].value?(g=!1,h=null):c>e[f].value&&(c<e[d].value?(h=e[f],g=!0):d===i-1?(g=!1,h=null):(h=e[d],g=!0))),g?(y[p]=h.mappedColor[0],w[p]=h.mappedColor[1],b[p]=h.mappedColor[2],C[p]=h.mappedColor[3]):y[p]=w[p]=b[p]=C[p]=0}return r.pixels=[y,w,b],r.mask=C,r.pixelType="u8",r.maskIsAlpha=v,r}function g(t,e){if(!u(t))return null;const{width:r,height:o}=t,{inputRanges:n,outputValues:i,outputPixelType:l,noDataRanges:c,allowUnmatched:h,isLastInputRangeInclusive:f}=e,d=t.pixels[0],p=s.Z.createEmptyBand(l,d.length),m=t.mask,g=new Uint8Array(r*o);m?g.set(m):g.fill(255);const y=t.pixelType.startsWith("f")?1e-6:0,w=n.map((t=>t-y));w[0]=n[0],w[w.length-1]=n[n.length-1]+(f?1e-6:0);const b=n.length/2,[C,v]=(0,a.r)(l);for(let t=0;t<o;t++)for(let e=0;e<r;e++){const o=t*r+e;if(g[o]){const t=d[o];let e=!1;for(let r=b-1;r>=0;r--)if(t===w[2*r]||t>w[2*r]&&t<w[2*r+1]){p[o]=i[r],e=!0;break}e||(h?p[o]=t>v?v:t<C?C:t:g[o]=0)}}const x=c?.length;if(x)for(let t=0;t<o;t++)for(let e=0;e<r;e++){const o=t*r+e;if(!m||m[o]){const t=d[o];for(let e=0;e<x;e+=2)if(t>=c[e]&&t<=c[e+1]){p[o]=0,g[o]=0;break}}}return new s.Z({width:r,height:o,pixelType:l,pixels:[p],mask:g})}function y(t,e,r,o){const n=null!=r&&r.length>=2?new Set(r):null,i=1===r?.length?r[0]:null,s=!!e?.length;for(let r=0;r<t.length;r++)if(o[r]){const a=t[r];if(s){let t=!1;for(let r=0;r<e.length;r+=2)if(a>=e[r]&&a<=e[r+1]){t=!0;break}t||(o[r]=0)}o[r]&&(a===i||n?.has(a))&&(o[r]=0)}}function w(t,e){const r=t[0].length;for(let o=0;o<r;o++)if(e[o]){let r=!1;for(let e=0;e<t.length;e++)if(t[e][o]){r=!0;break}r||(e[o]=0)}}function b(t,e){const r=t[0].length;for(let o=0;o<r;o++)if(e[o]){let r=!1;for(let e=0;e<t.length;e++)if(0===t[e][o]){r=!0;break}r&&(e[o]=0)}}function C(t,e){if(!u(t))return null;const{width:r,height:o,pixels:n}=t,i=r*o,a=new Uint8Array(i);t.mask?a.set(t.mask):a.fill(255);const l=n.length,{includedRanges:c,noDataValues:h,outputPixelType:f,matchAll:d,lookups:m}=e;if(m){const t=[];for(let e=0;e<l;e++){const r=m[e],o=p(n[e],a,r.lut,r.offset||0,"u8");t.push(o)}1===t.length?a.set(t[0]):d?w(t,a):b(t,a)}else if(d){const t=[];for(let e=0;e<l;e++){const r=new Uint8Array(i);r.set(a),y(n[e],c?.slice(2*e,2*e+2),h?.[e],r),t.push(r)}1===t.length?a.set(t[0]):w(t,a)}else for(let t=0;t<l;t++)y(n[t],c?.slice(2*t,2*t+2),h?.[t],a);return new s.Z({width:r,height:o,pixelType:f,pixels:n,mask:a})}function v(t){const{srcPixelType:e,inputRanges:r,outputValues:o,allowUnmatched:n,noDataRanges:i,isLastInputRangeInclusive:l,outputPixelType:u}=t;if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const c=e.includes("16")?65536:256,h=e.includes("s")?-c/2:0,f=s.Z.createEmptyBand(u,c),d=new Uint8Array(c);n&&d.fill(255);const[p,m]=(0,a.r)(u);if(r?.length&&o?.length){const t=1e-6,e=r.map((e=>e-t));e[0]=r[0],l&&(e[e.length-1]=r[r.length-1]);for(let t=0;t<e.length;t++){const r=o[t]>m?m:o[t]<p?p:o[t],n=Math.ceil(e[2*t]-h),i=Math.floor(e[2*t+1]-h);for(let t=n;t<=i;t++)f[t]=r,d[t]=255}}if(i?.length)for(let t=0;t<i.length;t++){const e=Math.ceil(i[2*t]-h),r=Math.floor(i[2*t+1]-h);for(let t=e;t<=r;t++)d[t]=0}return{lut:f,offset:h,mask:d}}function x(t,e,r){if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const o=t.includes("16")?65536:256,n=t.includes("s")?-o/2:0,i=new Uint8Array(o);if(e)for(let t=0;t<e.length;t++){const r=Math.ceil(e[2*t]-n),o=Math.floor(e[2*t+1]-n);for(let t=r;t<=o;t++)i[t]=255}else i.fill(255);if(r)for(let t=0;t<r.length;t++)i[r[t]-n]=0;return{lut:i,offset:n}}function k(t,e,r,o,n,i){const{width:s,height:a}=r.block,{x:l,y:u}=r.offset,{width:c,height:h}=r.mosaic,f=function(t,e,r,o,n,i,s,a){return{xmin:n<=r*t?0:n<r*t+t?n-r*t:t,ymin:i<=o*e?0:i<o*e+e?i-o*e:e,xmax:n+s<=r*t?0:n+s<r*t+t?n+s-r*t:t,ymax:i+a<=o*e?0:i+a<o*e+e?i+a-o*e:e}}(s,a,o,n,l,u,c,h);let d=0,p=0;if(i){const t=i.hasGCSSShiftTransform?360:i.halfWorldWidth??0,e=s*i.resolutionX,r=i.startX+o*e;r<t&&r+e>t?p=i.rightPadding:r>=t&&(d=i.leftMargin-i.rightPadding,p=0)}if(f.xmax-=p,"number"!=typeof e)for(let r=f.ymin;r<f.ymax;r++){const i=(n*a+r-u)*c+(o*s-l)+d,h=r*s;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e[h+r]}else for(let r=f.ymin;r<f.ymax;r++){const i=(n*a+r-u)*c+(o*s-l)+d;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e}}function A(t,e,r={}){const{clipOffset:o,clipSize:n,alignmentInfo:i,blockWidths:a}=r;if(a)return function(t,e,r){const o=t.find((t=>null!=t));if(null==o)return null;const n=t.some((t=>null==t||!!t.mask)),{width:i,height:a}=e,l=n?new Uint8Array(i*a):null,{blockWidths:c}=r,h=[],f=o.getPlaneCount(),d=s.Z.getPixelArrayConstructor(o.pixelType);if(n)for(let e=0,r=0;e<t.length;r+=c[e],e++){const o=t[e];if(!u(o))continue;const n=o.mask;for(let t=0;t<a;t++)for(let s=0;s<c[e];s++)l[t*i+s+r]=null==n?255:n[t*o.width+s]}const p=t.some((t=>t?.bandMasks&&t.bandMasks.length>1)),m=p?[]:void 0,g=i*a;for(let e=0;e<f;e++){const r=new d(g),o=p?new Uint8Array(g):void 0;for(let n=0,s=0;n<t.length;s+=c[n],n++){const l=t[n];if(!u(l))continue;const h=l.pixels[e];if(null!=h){for(let t=0;t<a;t++)for(let e=0;e<c[n];e++)r[t*i+e+s]=h[t*l.width+e];if(o){const t=l.bandMasks?.[e]??l.mask;for(let e=0;e<a;e++)for(let r=0;r<c[n];r++)o[e*i+r+s]=t?t[e*l.width+r]:255}}}h.push(r),m&&o&&m.push(o)}const y=new s.Z({width:i,height:a,mask:l,bandMasks:m,pixels:h,pixelType:o.pixelType});return y.updateStatistics(),y}(t,e,{blockWidths:a});const l=t.find((t=>u(t)));if(null==l)return null;const c=n?n.width:e.width,h=n?n.height:e.height,f=l.width,d=l.height,p=e.width/f,m=e.height/d,g={offset:o||{x:0,y:0},mosaic:n||e,block:{width:f,height:d}},y=l.pixelType,w=s.Z.getPixelArrayConstructor(y),b=l.pixels.length,C=[];let v,x;for(let e=0;e<b;e++){x=new w(c*h);for(let r=0;r<m;r++)for(let o=0;o<p;o++){const n=t[r*p+o];u(n)&&(v=n.pixels[e],k(x,v,g,o,r,i))}C.push(x)}const A=t.some((t=>null==t||null!=t.mask&&t.mask.length>0)),S=t.some((t=>t?.bandMasks&&t.bandMasks.length>1)),T=A?new Uint8Array(c*h):void 0,I=S?[]:void 0;if(T){for(let e=0;e<m;e++)for(let r=0;r<p;r++){const o=t[e*p+r],n=null!=o?o.mask:null;k(T,null!=n?n:o?255:0,g,r,e,i)}if(I)for(let e=0;e<b;e++){const r=new Uint8Array(c*h);for(let o=0;o<m;o++)for(let n=0;n<p;n++){const s=t[o*p+n],a=s?.bandMasks?.[e]??s?.mask;k(r,null!=a?a:s?255:0,g,n,o,i)}I.push(r)}}const M=new s.Z({width:c,height:h,pixels:C,pixelType:y,bandMasks:I,mask:T});return M.updateStatistics(),M}function S(t,e,r){if(!u(t))return null;const{width:o,height:n}=t,i=e.x,s=e.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>o||l>n)return t;if(0===i&&0===s&&a===o&&l===n)return t;t.mask||(t.mask=new Uint8Array(o*n));const c=t.mask;for(let t=0;t<n;t++){const e=t*o;for(let r=0;r<o;r++)c[e+r]=t<s||t>=l||r<i||r>=a?0:1}return t.updateStatistics(),t}function T(t){if(!u(t))return null;const e=t.clone(),{width:r,height:o,pixels:n}=t,i=n[0],s=e.pixels[0],a=t.mask;for(let t=2;t<o-1;t++){const e=new Map;for(let o=t-2;o<t+2;o++)for(let t=0;t<4;t++){const n=o*r+t;P(e,i[n],a?a[n]:1)}s[t*r]=I(e),s[t*r+1]=s[t*r+2]=s[t*r];let o=3;for(;o<r-1;o++){let n=(t-2)*r+o+1;P(e,i[n],a?a[n]:1),n=(t-1)*r+o+1,P(e,i[n],a?a[n]:1),n=t*r+o+1,P(e,i[n],a?a[n]:1),n=(t+1)*r+o+1,P(e,i[n],a?a[n]:1),n=(t-2)*r+o-3,M(e,i[n],a?a[n]:1),n=(t-1)*r+o-3,M(e,i[n],a?a[n]:1),n=t*r+o-3,M(e,i[n],a?a[n]:1),n=(t+1)*r+o-3,M(e,i[n],a?a[n]:1),s[t*r+o]=I(e)}s[t*r+o+1]=s[t*r+o]}for(let t=0;t<r;t++)s[t]=s[r+t]=s[2*r+t],s[(o-1)*r+t]=s[(o-2)*r+t];return e.updateStatistics(),e}function I(t){if(0===t.size)return 0;let e=0,r=-1,o=0;const n=t.keys();let i=n.next();for(;!i.done;)o=t.get(i.value),o>e&&(r=i.value,e=o),i=n.next();return r}function M(t,e,r){if(0===r)return;const o=t.get(e);1===o?t.delete(e):t.set(e,o-1)}function P(t,e,r){0!==r&&t.set(e,t.has(e)?t.get(e)+1:1)}function E(t,e,r){let{x:o,y:n}=e;const{width:i,height:a}=r;if(0===o&&0===n&&a===t.height&&i===t.width)return t;const{width:l,height:c}=t,h=Math.max(0,n),f=Math.max(0,o),d=Math.min(o+i,l),p=Math.min(n+a,c);if(d<0||p<0||!u(t))return null;o=Math.max(0,-o),n=Math.max(0,-n);const{pixels:m}=t,g=i*a,y=m.length,w=[];for(let e=0;e<y;e++){const r=m[e],a=s.Z.createEmptyBand(t.pixelType,g);for(let t=h;t<p;t++){const e=t*l;let s=(t+n-h)*i+o;for(let t=f;t<d;t++)a[s++]=r[e+t]}w.push(a)}const b=new Uint8Array(g),C=t.mask;for(let t=h;t<p;t++){const e=t*l;let r=(t+n-h)*i+o;for(let t=f;t<d;t++)b[r++]=C?C[e+t]:1}const v=new s.Z({width:r.width,height:r.height,pixelType:t.pixelType,pixels:w,mask:b});return v.updateStatistics(),v}function R(t,e=!0){if(!u(t))return null;const{pixels:r,width:o,height:n,mask:i,pixelType:a}=t,l=[],c=Math.round(o/2),h=Math.round(n/2),f=n-1,d=o-1;for(let t=0;t<r.length;t++){const i=r[t],u=s.Z.createEmptyBand(a,c*h);let p=0;for(let t=0;t<n;t+=2)for(let r=0;r<o;r+=2){const n=i[t*o+r];if(e){const e=r===d?n:i[t*o+r+1],s=t===f?n:i[t*o+r+o],a=r===d?s:t===f?e:i[t*o+r+o+1];u[p++]=(n+e+s+a)/4}else u[p++]=n}l.push(u)}let p=null;if(null!=i){p=new Uint8Array(c*h);let t=0;for(let r=0;r<n;r+=2)for(let n=0;n<o;n+=2){const s=i[r*o+n];if(e){const e=n===d?s:i[r*o+n+1],a=r===f?s:i[r*o+n+o],l=n===d?a:r===f?e:i[r*o+n+o+1];p[t++]=s*e*a*l?1:0}else p[t++]=s}}return new s.Z({width:c,height:h,pixelType:a,pixels:l,mask:p})}function L(t,e,r){if(!u(t))return null;const{width:o,height:n}=e;let{width:i,height:s}=t;const a=new Map,l={x:0,y:0},c=null==r?1:1+r;let h=t;for(let t=0;t<c;t++){const r=Math.ceil(i/o),u=Math.ceil(s/n);for(let i=0;i<u;i++){l.y=i*n;for(let n=0;n<r;n++){l.x=n*o;const r=E(h,l,e);a.set(`${t}/${i}/${n}`,r)}}t<c-1&&(h=R(h)),i=Math.round(i/2),s=Math.round(s/2)}return a}function U(t,e,r,o,n=0){const{width:i,height:s}=t,{width:a,height:l}=e,u=o.cols,c=o.rows,h=Math.ceil(a/u-.1/u),f=Math.ceil(l/c-.1/c);let d,p,m,g,y,w,b;const C=h*u,v=C*f*c,x=new Float32Array(v),k=new Float32Array(v),A=new Uint32Array(v),S=new Uint32Array(v);let T,I,M=0;for(let t=0;t<f;t++)for(let e=0;e<h;e++){d=12*(t*h+e),p=r[d],m=r[d+1],g=r[d+2],y=r[d+3],w=r[d+4],b=r[d+5];for(let r=0;r<c;r++){M=(t*c+r)*C+e*u,I=(r+.5)/c;for(let t=0;t<r;t++)T=(t+.5)/u,x[M+t]=(p*T+m*I+g)*i+n,k[M+t]=(y*T+w*I+b)*s+n,A[M+t]=Math.floor(x[M+t]),S[M+t]=Math.floor(k[M+t])}d+=6,p=r[d],m=r[d+1],g=r[d+2],y=r[d+3],w=r[d+4],b=r[d+5];for(let r=0;r<c;r++){M=(t*c+r)*C+e*u,I=(r+.5)/c;for(let t=r;t<u;t++)T=(t+.5)/u,x[M+t]=(p*T+m*I+g)*i+n,k[M+t]=(y*T+w*I+b)*s+n,A[M+t]=Math.floor(x[M+t]),S[M+t]=Math.floor(k[M+t])}}return{offsets_x:x,offsets_y:k,offsets_xi:A,offsets_yi:S,gridWidth:C}}function O(t,e){const{coefficients:r,spacing:o}=e,{offsets_x:n,offsets_y:i,gridWidth:s}=U(t,t,r,{rows:o[0],cols:o[1]}),{width:a,height:l}=t,u=new Float32Array(a*l),c=180/Math.PI;for(let t=0;t<l;t++)for(let e=0;e<a;e++){const r=t*s+e,o=0===t?r:r-s,h=t===l-1?r:r+s,f=n[o]-n[h],d=i[h]-i[o];if(isNaN(f)||isNaN(d))u[t*a+e]=90;else{let r=Math.atan2(d,f)*c;r=(360+r)%360,u[t*a+e]=r}}return u}function D(t,e,r,o,n="nearest"){if(!u(t))return null;"majority"===n&&(t=T(t));const{pixels:i,mask:a,bandMasks:l,pixelType:c}=t,h=t.width,f=t.height,d=s.Z.getPixelArrayConstructor(c),p=i.length,{width:m,height:g}=e;let y=!1;for(let t=0;t<r.length;t+=3)-1===r[t]&&-1===r[t+1]&&-1===r[t+2]&&(y=!0);const{offsets_x:w,offsets_y:b,offsets_xi:C,offsets_yi:v,gridWidth:x}=U({width:h,height:f},e,r,o,"majority"===n?.5:0);let k;const A=(t,e,r,o)=>{const n=t instanceof Float32Array||t instanceof Float64Array?0:.5;for(let i=0;i<g;i++){k=i*x;for(let s=0;s<m;s++){if(w[k]<0||b[k]<0)t[i*m+s]=0;else if(o)t[i*m+s]=e[C[k]+v[k]*h];else{const o=Math.floor(w[k]),a=Math.floor(b[k]),l=Math.ceil(w[k]),u=Math.ceil(b[k]),c=w[k]-o,f=b[k]-a;if(!r||r[o+a*h]&&r[l+a*h]&&r[o+u*h]&&r[l+u*h]){const r=(1-c)*e[o+a*h]+c*e[l+a*h],d=(1-c)*e[o+u*h]+c*e[l+u*h];t[i*m+s]=(1-f)*r+f*d+n}else t[i*m+s]=e[C[k]+v[k]*h]}k++}}},S=[];let I;const M=l?.length===p,P=[];for(let t=0;t<p;t++){if(M){const e=new Uint8Array(m*g);A(e,l[t],l[t],!0),P.push(e)}I=new d(m*g),A(I,i[t],M?l[t]:a,"nearest"===n||"majority"===n),S.push(I)}const E=new s.Z({width:m,height:g,pixelType:c,pixels:S,bandMasks:M?P:void 0});if(null!=a)E.mask=new Uint8Array(m*g),A(E.mask,a,a,!0);else if(y){E.mask=new Uint8Array(m*g);for(let t=0;t<m*g;t++)E.mask[t]=w[t]<0||b[t]<0?0:1}return E.updateStatistics(),E}},15612:(t,e,r)=>{r.d(e,{AV:()=>y,Hv:()=>m,Oh:()=>g,ZF:()=>f,dy:()=>b,gI:()=>h,hE:()=>c,js:()=>p,oc:()=>u,um:()=>w});var o=r(70586),n=r(5847),i=r(81578),s=r(75509);const a=1,l=[.299,.587,.114];function u(t,e=256){e=Math.min(e,256);const{size:r,counts:o}=t,n=new Uint8Array(r),i=o.reduce(((t,r)=>t+r/e),0);let s=0,a=0,l=0,u=i;for(let t=0;t<r;t++)if(l+=o[t],!(t<r-1&&l+o[t+1]<u)){for(;s<e-1&&u<l;)s++,u+=i;for(let e=a;e<=t;e++)n[e]=s;a=t+1}for(let t=a;t<r;t++)n[t]=e-1;return n}function c(t){const{minCutOff:e,maxCutOff:r,gamma:o,pixelType:n,rounding:i}=t,s=t.outMin||0,a=t.outMax||255;if(!["u8","u16","s8","s16"].includes(n))return null;const l=e.length;let u,c,f=0;"s8"===n?f=-127:"s16"===n&&(f=-32767);let d=256;["u16","s16"].includes(n)&&(d=65536);const p=[],m=[],g=a-s;for(u=0;u<l;u++)m[u]=r[u]-e[u],p[u]=0===m[u]?0:g/m[u];let y;const b=[];let C,v,x;if(o&&o.length>=l){const t=w(l,o);for(u=0;u<l;u++){for(x=[],c=0;c<d;c++)if(0!==m[u])if(C=c+f,y=(C-e[u])/m[u],v=1,o[u]>1&&(v-=(1/g)**(y*t[u])),C<r[u]&&C>e[u]){const t=v*g*y**(1/o[u])+s;x[c]="floor"===i?Math.floor(t):"round"===i?Math.round(t):t}else C>=r[u]?x[c]=a:x[c]=s;else x[c]=s;b[u]=x}}else for(u=0;u<l;u++){for(x=[],c=0;c<d;c++)if(C=c+f,C<=e[u])x[c]=s;else if(C>=r[u])x[c]=a;else{const t=(C-e[u])*p[u]+s;x[c]="floor"===i?Math.floor(t):"round"===i?Math.round(t):t}b[u]=x}if(null!=t.contrastOffset){const e=h(t.contrastOffset,t.brightnessOffset);for(u=0;u<l;u++)for(x=b[u],c=0;c<d;c++)x[c]=e[x[c]]}return{lut:b,offset:f}}function h(t,e){const r=Math.min(Math.max(t,-100),100),o=Math.min(Math.max(e??0,-100),100);let n=0,i=0;const s=new Uint8Array(256);for(n=0;n<256;n++)r>0&&r<100?i=(200*n-25500+510*o)/(2*(100-r))+128:r<=0&&r>-100?i=(200*n-25500+510*o)*(100+r)/2e4+128:100===r?(i=200*n-25500+256*(100-r)+510*o,i=i>0?255:0):-100===r&&(i=128),s[n]=i>255?255:i<0?0:i;return s}function f(t,e,r){const o=[];for(let n=0;n<e.length;n++){let i=0,s=0,a=0;"min"in e[n]?({min:i,max:s,avg:a}=e[n]):[i,s,a]=e[n];let u=a??0;"u8"!==t&&(u=255*(u-i)/(s-i)),r&&(u*=l[n]),o.push(d(u))}return o}function d(t){if(t<=0||t>=255)return a;let e=0;150!==t&&(e=t<=150?45*Math.cos(.01047*t):17*Math.sin(.021*t));const r=t+e,o=Math.log(t/255),n=Math.log(r/255);if(0===n)return a;const i=o/n;return isNaN(i)?a:Math.min(9.9,Math.max(.01,i))}function p(t){const{pixels:e,mask:r,pixelType:o,bandMasks:n}=t,i=e.map(((t,e)=>function(t,e,r,o){let n=1/0,i=-1/0,s=0,a=0,l=0,u=0;const c=t.length,h=new Map,f=[];for(let r=0;r<c;r++){const o=t[r];if(!e||e[r]){f.push(o);const t=(h.get(o)??0)+1;h.set(o,t),t>u&&(u=t,l=o),n=o<n?o:n,i=o>i?o:i,s+=o,a++}}if(0===a)return{statistics:{min:0,max:0,avg:0,stddev:0,mode:0,median:0},histogram:null};const d=s/a;let p=0;for(let r=0;r<c;r++)e&&!e[r]||(p+=(t[r]-d)**2);const m=e?e.filter((t=>t)).length:c,g=m<=1?0:Math.sqrt(p/(m-1));f.sort(((t,e)=>t-e));const y=a>>>1,w={min:n,max:i,avg:d,stddev:g,mode:l,median:a%2?f[Math.floor(y)]:(f[y-1]+f[y])/2};if(["u8","s8","u4","u2","u1"].includes(r)){const r=i-n+1,o=new Uint32Array(r);for(let r=0;r<c;r++)e&&!e[r]||o[t[r]-n]++;return{statistics:w,histogram:{min:n-.5,max:i+.5,size:r,counts:o}}}const b=256,C=new Uint32Array(b),v=(i-n)/b;if(0===v)return{statistics:w,histogram:{min:n,max:i,size:1,counts:new Uint32Array(1).fill(a)}};const x=new Uint32Array(257);for(let r=0;r<c;r++)e&&!e[r]||x[Math.floor((t[r]-n)/v)]++;for(let t=0;t<255;t++)C[t]=x[t];return C[255]=x[255]+x[b],{statistics:w,histogram:{min:n,max:i,size:b,counts:C}}}(t,n?.[e]??r,o)));return{statistics:i.map((({statistics:t})=>t)),histograms:i.map((({histogram:t})=>t))}}function m(t){if(!t?.pixels?.length)return null;const{pixels:e,mask:r,bandMasks:o,pixelType:n}=t,i=t.width*t.height,s=e.length;let a,l,u,c,h;const f=[],d=[];let p,m,g,y,w,b,C,v,x,k;const A=256;for(c=0;c<s;c++){p=new Uint32Array(A),g=e[c];const s=o?.[c]??r;if("u8"===n)if(a=-.5,l=255.5,s)for(h=0;h<i;h++)s[h]&&p[g[h]]++;else for(h=0;h<i;h++)p[g[h]]++;else{let e=!1;t.statistics||(t.updateStatistics(),e=!0);const r=t.statistics;if(a=r[c].minValue,l=r[c].maxValue,u=(l-a)/A,0===u){!r||t.validPixelCount||e||t.updateStatistics();const o=(t.validPixelCount||t.width*t.height)/A;for(let t=0;t<A;t++)p[t]=Math.round(o*(t+1))-Math.round(o*t)}else{for(m=new Uint32Array(257),h=0;h<i;h++)s&&!s[h]||m[Math.floor((g[h]-a)/u)]++;for(h=0;h<255;h++)p[h]=m[h];p[255]=m[255]+m[A]}}for(f.push({min:a,max:l,size:A,counts:p}),y=0,w=0,v=0,h=0;h<A;h++)y+=p[h],w+=h*p[h];for(x=w/y,h=0;h<A;h++)v+=p[h]*(h-x)**2;k=Math.sqrt(v/(y-1)),u=(l-a)/A,b=(x+.5)*u+a,C=k*u,d.push({min:a,max:l,avg:b,stddev:C})}return{statistics:d,histograms:f}}function g(t){const e=[];for(let r=0;r<t.length;r++){const{min:o,max:n,size:i,counts:s}=t[r];let a=0,l=0;for(let t=0;t<i;t++)a+=s[t],l+=t*s[t];const u=l/a;let c=0;for(let t=0;t<i;t++)c+=s[t]*(t-u)**2;const h=(n-o)/i,f=(u+.5)*h+o,d=Math.sqrt(c/(a-1))*h;e.push({min:o,max:n,avg:f,stddev:d})}return e}function y(t,e){const{pixelBlock:r,bandIds:n,returnHistogramLut:a,rasterInfo:l}=e;let c=null,h=null,f=t.stretchType;if("number"==typeof f&&(f=s.J[f]),t.dra)if("minMax"===f&&r?.statistics)c=r.statistics.map((t=>[t.minValue,t.maxValue,0,0]));else{const t=m(r);c=null!=t?t.statistics:null,h=null!=t?t.histograms:null}else c=t.statistics?.length?t.statistics:l.statistics,h="histograms"in t?t.histograms:void 0,h||(h=l.histograms);"percentClip"!==f&&"histogramEqualization"!==f||h?.length||(f="minMax");const d=c?.length||h?.length||l.bandCount,p=[],g=[];let y,w,b,C,v,x,k,A,S;c&&!Array.isArray(c[0])&&(c=c.map((t=>[t.min,t.max,t.avg,t.stddev])));const[T,I]=(0,i.r)(l.pixelType);if(!c?.length){for(c=[],A=0;A<d;A++)c.push([T,I,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(A=0;A<d;A++)p[A]=T,g[A]=I;break;case"minMax":for(A=0;A<d;A++){const t=c[A];p[A]=t[0],g[A]=t[1]}break;case"standardDeviation":{const{numberOfStandardDeviations:e=2}=t;for(A=0;A<d;A++){const t=c[A];p[A]=t[2]-e*t[3],g[A]=t[2]+e*t[3],p[A]<t[0]&&(p[A]=t[0]),g[A]>t[1]&&(g[A]=t[1])}}break;case"histogramEqualization":for((0,o.O3)(h),A=0;A<d;A++)p[A]=h[A].min,g[A]=h[A].max;break;case"percentClip":for((0,o.O3)(h),A=0;A<h.length;A++){for(y=h[A],v=new Uint32Array(y.size),C=[...y.counts],C.length>=20&&(C[0]=C[1]=C[2]=C[C.length-1]=C[C.length-2]=0),b=0,w=(y.max-y.min)/y.size,k=-.5===y.min&&1===w?.5:0,S=0;S<y.size;S++)b+=C[S],v[S]=b;for(x=(t.minPercent||0)*b/100,p[A]=y.min+k,S=0;S<y.size;S++)if(v[S]>x){p[A]=y.min+w*(S+k);break}for(x=(1-(t.maxPercent||0)/100)*b,g[A]=y.max+k,S=y.size-2;S>=0;S--)if(v[S]<x){g[A]=y.min+w*(S+2-k);break}if(g[A]<p[A]){const t=p[A];p[A]=g[A],g[A]=t}}break;default:for(A=0;A<d;A++){const t=c[A];p[A]=t[0],g[A]=t[1]}}let M,P,E;return"histogramEqualization"===f?((0,o.O3)(h),P=h[0].size||256,M=0,a&&(E=h.map((t=>u(t))))):(P=t.max||255,M=t.min||0),function(t,e){if(null==e||0===e.length)return t;const r=Math.max.apply(null,e),{minCutOff:o,maxCutOff:n,outMin:i,outMax:s,histogramLut:a}=t;return o.length===e.length||o.length<=r?t:{minCutOff:e.map((t=>o[t])),maxCutOff:e.map((t=>n[t])),histogramLut:a?e.map((t=>a[t])):null,outMin:i,outMax:s}}({minCutOff:p,maxCutOff:g,outMax:P,outMin:M,histogramLut:E},n)}function w(t,e){const r=new Float32Array(t);for(let o=0;o<t;o++)e[o]>1?e[o]>2?r[o]=6.5+(e[o]-2)**2.5:r[o]=6.5+100*(2-e[o])**4:r[o]=1;return r}function b(t,e){if(!t?.pixels?.length)return t;const{mask:r,bandMasks:o,width:i,height:s,pixels:a}=t,{minCutOff:l,maxCutOff:u,gamma:c}=e,h=e.outMin||0,f=e.outMax||255,d=i*s,p=e.outputPixelType||"u8",m=t.pixels.map((()=>n.Z.createEmptyBand(p,d))),g=m.length,y=f-h,b=[],C=[];for(let t=0;t<g;t++)C[t]=u[t]-l[t],b[t]=0===C[t]?0:y/C[t];const v=p.startsWith("u")||p.startsWith("s"),x=c&&c.length>=g,k=!!e.isRenderer;if(x){const t=w(g,c);for(let e=0;e<g;e++){const n=o?.[e]??r;for(let r=0;r<d;r++)if(null==n||n[r]){if(0===C[e]){m[e][r]=h;continue}const o=a[e][r],n=(o-l[e])/C[e];let i=1;if(c[e]>1&&(i-=(1/y)**(n*t[e])),o<u[e]&&o>l[e]){const t=i*y*n**(1/c[e])+h;m[e][r]=k?Math.floor(t):v?Math.round(t):t}else o>=u[e]?m[e][r]=f:m[e][r]=h}}}else for(let t=0;t<g;t++){const e=o?.[t]??r;for(let r=0;r<d;r++)if(null==e||e[r]){const e=a[t][r];if(e<u[t]&&e>l[t]){const o=(e-l[t])*b[t]+h;m[t][r]=k?Math.floor(o):v?Math.round(o):o}else e>=u[t]?m[t][r]=f:m[t][r]=h}}const A=new n.Z({width:i,height:s,mask:r,bandMasks:o,pixels:m,pixelType:p});return A.updateStatistics(),A}},63342:(t,e,r)=>{r.d(e,{M_:()=>d,Ne:()=>p,TK:()=>a,Ub:()=>h,_p:()=>s,vC:()=>c,yg:()=>f});var o=r(5847),n=r(55914);const i=1,s=1/111e3;function a(t){let{altitude:e,azimuth:r}=t;const{hillshadeType:o,pixelSizePower:n=1,pixelSizeFactor:i=1,scalingType:a,isGCS:l,resolution:u}=t,c="multi-directional"===o?2*t.zFactor:t.zFactor,{x:h,y:f}=u;let d=c/(8*h),p=c/(8*f);if(l&&c>.001&&(d/=s,p/=s),"adjusted"===a)if(l){const t=h*s,e=f*s;d=(c+t**n*i)/(8*t),p=(c+e**n*i)/(8*e)}else d=(c+h**n*i)/(8*h),p=(c+f**n*i)/(8*f);let m=(90-e)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y);const C=[315,270,225,360,180,0],v=[60,60,60,60,60,90],x=new Float32Array([3,5,3,2,1,4]),k=x.reduce(((t,e)=>t+e)),A=x.map((t=>t/k)),S="multi-directional"===o?C.length:1,T=new Float32Array(6),I=new Float32Array(6),M=new Float32Array(6);if("multi-directional"===o)for(let t=0;t<S;t++)e=v[t],r=C[t],m=(90-e)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y),T[t]=g,I[t]=w,M[t]=b;else T.fill(g),I.fill(w),M.fill(b);return{resolution:u,factor:[d,p],sinZcosA:w,sinZsinA:b,cosZ:g,sinZcosAs:I,sinZsinAs:M,cosZs:T,weights:A,hillshadeType:["traditional","multi-directional"].indexOf(o)}}function l(t,e){const{width:r,height:o}=t,n=r*o,s=new Uint8Array(n),a=null!=t.mask;let l;if(a){l=new Uint8Array(t.mask);for(let t=0;t<l.length;t++)l[t]&&(s[t]=1,l[t]=1)}const u=t.pixels[0],c=new Float32Array(n),h=new Float32Array(n);let f,d=0;if(e){const{resolution:t}=e,r=t?(t.x+t.y)/2:1;d=200*e.zFactor/(r*r),f=new Float32Array(n)}const p=e?.curvatureType;let m,g,y,w,b,C,v,x;for(let t=i;t<o-i;t++){const e=t*r;for(let t=i;t<r-i;t++){const o=e+t;if(!l||0!==l[o]){if(l){if(l[o-r-1]+l[o-r]+l[o-r+1]+l[o-1]+l[o+1]+l[o+r-1]+l[o+r]+l[o+r+1]<7){s[o]=0;continue}m=l[o-r-1]?u[o-r-1]:u[o],g=l[o-r]?u[o-r]:u[o],y=l[o-r+1]?u[o-r+1]:u[o],w=l[o-1]?u[o-1]:u[o],b=l[o+1]?u[o+1]:u[o],C=l[o+r-1]?u[o+r-1]:u[o],v=l[o+r]?u[o+r]:u[o],x=l[o+r+1]?u[o+r+1]:u[o]}else m=u[o-r-1],g=u[o-r],y=u[o-r+1],w=u[o-1],b=u[o+1],C=u[o+r-1],v=u[o+r],x=u[o+r+1];if(c[o]=y+b+b+x-(m+w+w+C),h[o]=C+v+v+x-(m+g+g+y),null!=f){const t=u[o],e=.5*(w+b)-t,r=.5*(g+v)-t;if("standard"===p)f[o]=-d*(e+r);else{const t=(-m+y+C-x)/4,n=(-w+b)/2,i=(g-v)/2,s=n*n,a=i*i,l=s+a;l&&(f[o]="profile"===p?d*(e*s+r*a+t*n*i)/l:-d*(e*a+r*s-t*n*i)/l)}}}}}return{outMask:a?s:null,dzxs:c,dzys:h,curvatures:f}}function u(t,e,r){for(let o=0;o<r;o++)t[o*e]=t[o*e+1],t[(o+1)*e-1]=t[(o+1)*e-2];for(let o=1;o<e-1;o++)t[o]=t[o+e],t[o+(r-1)*e]=t[o+(r-2)*e]}function c(t,e){if(!(0,n.nk)(t))return t;const{factor:r,sinZcosA:s,sinZsinA:c,cosZ:h,sinZcosAs:f,sinZsinAs:d,cosZs:p,weights:m}=a(e),[g,y]=r,w="traditional"===e.hillshadeType,{width:b,height:C}=t,v=new Uint8Array(b*C),{dzxs:x,dzys:k,outMask:A}=l(t);for(let t=i;t<C-i;t++){const e=t*b;for(let t=i;t<b-i;t++){const r=e+t;if(!A||A[r]){const t=x[r]*g,e=k[r]*y,o=Math.sqrt(1+t*t+e*e);let n=0;if(w){let r=255*(h+c*e-s*t)/o;r<0&&(r=0),n=r}else{const r=d.length;for(let i=0;i<r;i++){let r=255*(p[i]+d[i]*e-f[i]*t)/o;r<0&&(r=0),n+=r*m[i]}}v[r]=255&n}}}return u(v,b,C),new o.Z({width:b,height:C,pixels:[v],mask:A,pixelType:"u8",validPixelCount:t.validPixelCount,statistics:[{minValue:0,maxValue:255}]})}function h(t,e,r,o){if(!(0,n.nk)(t)||!(0,n.nk)(e))return;const{min:i,max:s}=o,a=t.pixels[0],{pixels:l,mask:u}=e,c=l[0],h=255.00001/(s-i),f=new Uint8ClampedArray(c.length),d=new Uint8ClampedArray(c.length),p=new Uint8ClampedArray(c.length),m=r.length-1;for(let t=0;t<c.length;t++){if(u&&0===u[t])continue;const e=Math.floor((c[t]-i)*h),[o,n]=r[e<0?0:e>m?m:e],s=a[t],l=s*n,g=l*(1-Math.abs(o%2-1)),y=s-l;switch(Math.floor(o)){case 0:f[t]=l+y,d[t]=g+y,p[t]=y;break;case 1:f[t]=g+y,d[t]=l+y,p[t]=y;break;case 2:f[t]=y,d[t]=l+y,p[t]=g+y;break;case 3:f[t]=y,d[t]=g+y,p[t]=l+y;break;case 4:f[t]=g+y,d[t]=y,p[t]=l+y;break;case 5:case 6:f[t]=l+y,d[t]=y,p[t]=g+y}}t.pixels=[f,d,p],t.updateStatistics()}function f(t,e){if(!(0,n.nk)(t))return t;const r=e.zFactor,a=e.pixelSizePower??1,c=e.pixelSizeFactor??1,h=e.slopeType,f=e.isGCS,{x:d,y:p}=e.resolution;let m=r/(8*d),g=r/(8*p);f&&Math.abs(r-1)<1e-4&&(m/=s,g/=s),"adjusted"===h&&(m=(r+d**a*c)/(8*d),g=(r+p**a*c)/(8*p));const{dzxs:y,dzys:w,outMask:b}=l(t),{width:C,height:v}=t,x=new Float32Array(C*v);for(let t=i;t<v-i;t++){const e=t*C;for(let t=i;t<C-i;t++){const r=e+t;if(!b||b[r]){const o=y[r]*m,n=w[r]*g,i=Math.sqrt(o*o+n*n);x[e+t]="percent-rise"===h?100*i:57.2957795*Math.atan(i)}}}u(x,C,v);const k=new o.Z({width:C,height:v,pixels:[x],mask:b,pixelType:"f32",validPixelCount:t.validPixelCount});return k.updateStatistics(),k}function d(t,e={}){if(!(0,n.nk)(t))return t;const{resolution:r}=e,s=r?1/r.x:1,a=r?1/r.y:1,{dzxs:c,dzys:h,outMask:f}=l(t),{width:d,height:p}=t,m=new Float32Array(d*p);for(let t=i;t<p-i;t++){const e=t*d;for(let t=i;t<d-i;t++){const r=e+t;if(!f||f[r]){const o=c[r]*s,n=h[r]*a;let i=-1;0===o&&0===n||(i=90-57.29578*Math.atan2(n,-o),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),m[e+t]=i}}}return u(m,d,p),new o.Z({width:d,height:p,pixels:[m],mask:f,pixelType:"f32",validPixelCount:t.validPixelCount,statistics:[{minValue:-1,maxValue:360}]})}function p(t,e){if(!(0,n.nk)(t))return t;const{curvatures:r,outMask:i}=l(t,e),{width:s,height:a}=t;u(r,s,a);const c=new o.Z({width:s,height:a,pixels:[r],mask:i,pixelType:"f32",validPixelCount:t.validPixelCount});return c.updateStatistics(),c}},80676:(t,e,r)=>{r.d(e,{KC:()=>p,NL:()=>l,QI:()=>m,Tg:()=>h,Yx:()=>u,xQ:()=>d});var o=r(35454),n=r(5847),i=r(55914);const s=new Map;s.set("meter-per-second",1),s.set("kilometer-per-hour",.277778),s.set("knots",.514444),s.set("feet-per-second",.3048),s.set("mile-per-hour",.44704);const a=180/Math.PI,l=new o.X({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(t,e){return s.get(t)/s.get(e)||1}function c(t){return(450-t)%360}function h(t,e="geographic"){const[r,o]=t,n=Math.sqrt(r*r+o*o);let i=Math.atan2(o,r)*a;return i=(360+i)%360,"geographic"===e&&(i=c(i)),[n,i]}function f(t,e="geographic"){let r=t[1];"geographic"===e&&(r=c(r)),r%=360;const o=t[0];return[o*Math.cos(r/a),o*Math.sin(r/a)]}function d(t,e,r,o="geographic"){if(!(0,i.nk)(t)||null==r)return t;const n="vector-magdir"===e?t.clone():p(t,e),s=n.pixels[1];for(let t=0;t<s.length;t++)s[t]="geographic"===o?(s[t]+r[t]+270)%360:(s[t]+360-r[t])%360;return"vector-magdir"===e?n:p(n,"vector-magdir")}function p(t,e,r="geographic",o=1){if(!(0,i.nk)(t))return t;const{pixels:s,width:a,height:l}=t,u=a*l,c=s[0],d=s[1],p=t.pixelType.startsWith("f")?t.pixelType:"f32",m=n.Z.createEmptyBand(p,u),g=n.Z.createEmptyBand(p,u);let y=0;for(let t=0;t<l;t++)for(let t=0;t<a;t++)"vector-uv"===e?([m[y],g[y]]=h([c[y],d[y]],r),m[y]*=o):([m[y],g[y]]=f([c[y],d[y]],r),m[y]*=o,g[y]*=o),y++;const w=new n.Z({pixelType:p,width:t.width,height:t.height,mask:t.mask,validPixelCount:t.validPixelCount,maskIsAlpha:t.maskIsAlpha,pixels:[m,g]});return w.updateStatistics(),w}function m(t,e,r=1){if(1===r||!(0,i.nk)(t))return t;const o=t.clone(),{pixels:n,width:s,height:a}=o,l=n[0],u=n[1];let c=0;for(let t=0;t<a;t++)for(let t=0;t<s;t++)"vector-uv"===e?(l[c]*=r,u[c]*=r):l[c]*=r,c++;return o.updateStatistics(),o}function g(t,e,r,o=1){const n=Math.sqrt(t*t+e*e)/o,i=(2*Math.PI+Math.atan2(e,t))%(2*Math.PI);return[n,(2*Math.PI+i-r)%(2*Math.PI)]}!function(t=0,e=0,r=Math.PI,o=!0){o&&(r=(2*Math.PI-r)%(2*Math.PI));const n=o?-1:1,i=13*n,s=-7*n,a=-2*n,l=-16*n,u=21.75,[c,h]=g(0,e+i,r,u),[f,d]=g(t-5.5,e+s,r,u),[p,m]=g(t+5.5,e+s,r,u),[y,w]=g(t-1.5,e+a,r,u),[b,C]=g(t+1.5,e+a,r,u),[v,x]=g(t-1.5,e+l,r,u),[k,A]=g(t+1.5,e+l,r,u)}(0,0,0)},72758:(t,e,r)=>{r.d(e,{Z:()=>y});var o=r(43697),n=r(3892),i=r(96674),s=r(92604),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),u=r(25972),c=r(55914),h=r(15612),f=r(63342),d=r(93010),p=r(12163);let m=class extends i.wq{constructor(t){super(t)}bind(){const{rendererJSON:t}=this;if(!t)return{success:!1};let e;switch(this.lookup={rendererJSON:{}},t.type){case"uniqueValue":e=this._updateUVRenderer(t);break;case"rasterColormap":e=this._updateColormapRenderer(t);break;case"rasterStretch":e=this._updateStretchRenderer(t);break;case"classBreaks":e=this._updateClassBreaksRenderer(t);break;case"rasterShadedRelief":e=this._updateShadedReliefRenderer(t);break;case"vectorField":e=this._updateVectorFieldRenderer();break;case"flowRenderer":e=this._updateFlowRenderer()}return e}symbolize(t){let e=t?.pixelBlock;if(!g(e))return e;if(t.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(e,t.simpleStretchParams);try{let r;switch(e.pixels.length>3&&(e=e.extractBands([0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(e);break;case"classBreaks":r=this._symbolizeClassBreaks(e);break;case"rasterStretch":r=this._symbolizeStretch(e,t.bandIds);break;case"rasterShadedRelief":{const o=t.extent,n=o.spatialReference.isGeographic,i={x:(o.xmax-o.xmin)/e.width,y:(o.ymax-o.ymin)/e.height};r=this._symbolizeShadedRelief(e,{isGCS:n,resolution:i});break}}return r}catch(t){return s.Z.getLogger(this).error("symbolize",t.message),e}}simpleStretch(t,e){if(!g(t))return t;try{return t.pixels.length>3&&(t=t.extractBands([0,1,2])),(0,h.dy)(t,{...e,isRenderer:!0})}catch(e){return s.Z.getLogger(this).error("symbolize",e.message),t}}generateWebGLParameters(t){if(["uniqueValue","rasterColormap","classBreaks"].includes(this.rendererJSON.type)){const{indexedColormap:t,offset:e}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:e,type:"lut"}}const{pixelBlock:e,isGCS:r,resolution:o,bandIds:n}=t,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(e,i,n):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,r,o??void 0):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(t){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const e=this.rendererJSON.colorRamp;return t?JSON.stringify(e)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(t){return this._isLUTChanged()&&!this.bind().success?t:(0,c.SJ)(t,this.lookup.colormapLut)}_symbolizeClassBreaks(t){const{canUseIndexedLUT:e}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?t:e?(0,c.SJ)(t,this.lookup.colormapLut):(0,c.zp)(t,this.lookup.remapLut??[])}_symbolizeStretch(t,e){const{rasterInfo:r}=this,{pixelType:o,bandCount:n}=r,i=this.rendererJSON,s=["u8","u16","s8","s16"].includes(o);let a,l;const{dra:u}=i,{gamma:f}=this.lookup;if("histogramEqualization"===i.stretchType){const o=u?null:this.lookup?.histogramLut,n=(0,h.AV)(i,{rasterInfo:r,pixelBlock:t,bandIds:e,returnHistogramLut:!o}),s=(0,h.dy)(t,{...n,gamma:f,isRenderer:!0});l=(0,c.XV)(s,{lut:u?n.histogramLut:o,offset:0})}else if(s){if(u){const n=(0,h.AV)(i,{rasterInfo:r,pixelBlock:t,bandIds:e});a=(0,h.hE)({pixelType:o,...n,gamma:f,rounding:"floor"})}else if(this._isLUTChanged()){if(!this.bind().success)return t;a=this.lookup?this.lookup.stretchLut:null}else a=this.lookup?this.lookup.stretchLut:null;if(!a)return t;n>1&&null!=e&&e.length===t?.pixels.length&&a?.lut.length===n&&(a={lut:e.map((t=>a.lut[t])),offset:a.offset}),l=(0,c.XV)(t,a)}else{const o=(0,h.AV)(i,{rasterInfo:r,pixelBlock:t,bandIds:e});l=(0,h.dy)(t,{...o,gamma:f,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return t;l=(0,c.SJ)(l,this.lookup?.colormapLut)}return l}_symbolizeShadedRelief(t,e){const r=this.rendererJSON,o={...r,...e},n=(0,f.vC)(t,o);if(!r.colorRamp)return n;let i;if(this._isLUTChanged(!0)){if(!this.bind().success)return n;i=this.lookup?this.lookup.hsvMap:null}else i=this.lookup?this.lookup.hsvMap:null;if(!i)return n;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,f.Ub)(n,t,i,s),n}_isVectorFieldData(){const{bandCount:t,dataType:e}=this.rasterInfo;return 2===t&&("vector-magdir"===e||"vector-uv"===e)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(t){const{bandCount:e,attributeTable:r,pixelType:o}=this.rasterInfo,n=t.field1;if(!n)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=t.defaultSymbol,s=1===e&&["u8","s8"].includes(o);if(!(0,p.MG)(this.rasterInfo,n)&&!s)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const a=[];if(null!=r){const e=r.fields.find((t=>"value"===t.name.toLowerCase()));if(!e)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach((r=>{const o=t.uniqueValueInfos?.find((t=>String(t.value)===String(r.attributes[n]))),s=o?.symbol?.color;s?a.push([r.attributes[e.name]].concat(s)):i&&a.push([r.attributes[e.name]].concat(i.color))}))}else{if("value"!==n.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not availalbe.'};t.uniqueValueInfos?.forEach((t=>{const e=t?.symbol?.color;e?a.push([parseInt(""+t.value,10)].concat(e)):i&&a.push([parseInt(""+t.value,10)].concat(i?.color))}))}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=(0,c.Pz)({colormap:a});return this.lookup={rendererJSON:t,colormapLut:l},this.canRenderInWebGL=!0,{success:!0}}_updateColormapRenderer(t){if(!(0,p.mO)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const e=t.colormapInfos.map((t=>[t.value].concat(t.color))).sort(((t,e)=>t[0]-e[0]));if(!e||0===e.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=(0,c.Pz)({colormap:e});return this.lookup={rendererJSON:t,colormapLut:r},this.canRenderInWebGL=!0,{success:!0}}_updateShadedReliefRenderer(t){if(!(0,p.jX)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(t.colorRamp){const e=(0,d.Jw)(t.colorRamp,{interpolateAlpha:!0}),r=(0,c.Pz)({colormap:e}),o=[],i=r.indexedColormap;for(let t=0;t<i.length;t+=4){const e=(0,n._Y)({r:i[t],g:i[t+1],b:i[t+2]});o.push([e.h/60,e.s/100,255*e.v/100])}this.lookup={rendererJSON:t,colormapLut:r,hsvMap:o}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(t){const{attributeTable:e,pixelType:r}=this.rasterInfo,o=null!=e?e.fields.find((t=>"value"===t.name.toLowerCase())):null,n=null!=e?e.fields.find((e=>e.name.toLowerCase()===t.field.toLowerCase())):null,i=null!=o&&null!==n;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:o,tableBreakField:n}}_updateClassBreaksRenderer(t){const{attributeTable:e}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:o,tableBreakField:n}=this._analyzeClassBreaks(t),i=t.classBreakInfos;if(!i?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const s=i.sort(((t,e)=>t.classMaxValue-e.classMaxValue)),a=s[s.length-1];let l=t.minValue;if(!r){const e=[];for(let t=0;t<s.length;t++)e.push({value:s[t].classMinValue??l,mappedColor:s[t].symbol.color}),l=s[t].classMaxValue;return e.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:t,remapLut:e},this.canRenderInWebGL=!1,{success:!0}}const u=[];if(null!=e&&null!=o&&null!==n&&o!==n){const r=o.name,i=n.name,a=s[s.length-1],{classMaxValue:c}=a;l=t.minValue;for(const t of e.features){const e=t.attributes[r],o=t.attributes[i],n=o===c?a:o<l?null:s.find((({classMaxValue:t})=>t>o));n&&u.push([e].concat(n.symbol.color))}}else{l=Math.floor(t.minValue);for(let t=0;t<s.length;t++){const e=s[t];for(let t=l;t<e.classMaxValue;t++)u.push([t].concat(e.symbol.color));l=Math.ceil(e.classMaxValue)}a.classMaxValue===l&&u.push([a.classMaxValue].concat(a.symbol.color))}const h=(0,c.Pz)({colormap:u,fillUnspecified:!1});return this.lookup={rendererJSON:t,colormapLut:h},this.canRenderInWebGL=!0,{success:!0}}_isHistogramRequired(t){return"percentClip"===t||"histogramEqualization"===t}_isValidRasterStatistics(t){return null!=t&&t.length>0&&null!=t[0].min&&null!=t[0].max}_updateStretchRenderer(t){let{stretchType:e,dra:r}=t;if(!("none"===e||t.statistics?.length||this._isValidRasterStatistics(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const o=t.histograms||this.rasterInfo.histograms;!this._isHistogramRequired(t.stretchType)||o?.length||r||(e="minMax");const{computeGamma:n,useGamma:i,colorRamp:s}=t;let{gamma:a}=t;if(i&&n&&!a?.length){const e=t.statistics?.length?t.statistics:this.rasterInfo.statistics;a=(0,h.ZF)(this.rasterInfo.pixelType,e)}const l=this.rasterInfo.pixelType,u=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===e){const e=o.map((t=>(0,h.oc)(t)));this.lookup={rendererJSON:t,histogramLut:e}}else if(u){const e=(0,h.AV)(t,{rasterInfo:this.rasterInfo}),r=(0,h.hE)({pixelType:l,...e,gamma:i?a:null,rounding:"floor"});this.lookup={rendererJSON:t,stretchLut:r}}if(s&&!this._isStretchColorRampNoop(s)){const e=(0,d.Jw)(s,{interpolateAlpha:!0});this.lookup||(this.lookup={rendererJSON:t}),this.lookup.colormapLut=(0,c.Pz)({colormap:e}),this.lookup.rendererJSON=t}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL=!0,{success:!0}}_isStretchColorRampNoop(t){return"algorithmic"===t.type&&["0,0,0,255","0,0,0"].includes(t.fromColor.join(","))&&["255,255,255,255","255,255,255"].includes(t.toColor.join(","))}_generateStretchWebGLParams(t,e,r){let o=null,n=null;const i=this.lookup?.colormapLut;e.colorRamp&&i&&(o=i.indexedColormap,n=i.offset),"histogramEqualization"===e.stretchType&&(e={...e,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!!(e.useGamma&&s&&s.some((t=>1!==t))),{minCutOff:l,maxCutOff:u,outMin:c,outMax:f}=(0,h.AV)(e,{rasterInfo:this.rasterInfo,pixelBlock:t,bandIds:r});let d=0;null!=t&&(d=t.getPlaneCount(),2===d&&((t=t.clone()).statistics=[t.statistics[0]],t.pixels=[t.pixels[0]]));const{bandCount:p}=this.rasterInfo,m=Math.min(3,r?.length||d||p,p),g=new Float32Array(m),y=o||a?1:255;let w;for(w=0;w<l.length;w++)g[w]=u[w]===l[w]?0:(f-c)/(u[w]-l[w])/y;const b=new Float32Array(m);if(a&&s)for(w=0;w<m;w++)s[w]>1?s[w]>2?b[w]=6.5+(s[w]-2)**2.5:b[w]=6.5+100*(2-s[w])**4:b[w]=1;return{bandCount:m,outMin:c/y,outMax:f/y,minCutOff:l,maxCutOff:u,factor:g,useGamma:a,gamma:a?s:[1,1,1],gammaCorrection:a?b:[1,1,1],colormap:o,colormapOffset:n,stretchType:e.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(t,e=!1,r={x:0,y:0}){let o=null,n=null;const i=this.lookup?.colormapLut;t.colorRamp&&i&&(o=i.indexedColormap,n=i.offset);const s={...t,isGCS:e,resolution:r},a=(0,f.TK)(s),l=this.rasterInfo.statistics?.[0];return{...a,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===t.hillshadeType?0:1,type:"hillshade",colormap:o,colormapOffset:n}}_generateVectorFieldWebGLParams(t){const{style:e,inputUnit:r,outputUnit:o,visualVariables:n,symbolTileSize:i,flowRepresentation:s}=t;let a;const l=this.rasterInfo.statistics?.[0].min??0,u=this.rasterInfo.statistics?.[0].max??50,c=n?.find((t=>"sizeInfo"===t.type))??{type:"sizeInfo",field:"Magnitude",maxDataValue:u,maxSize:.8*i,minDataValue:l,minSize:.2*i},h=c.minDataValue??l,f=c.maxDataValue??u,d=null!=c.maxSize&&null!=c.minSize?[c.minSize/i,c.maxSize/i]:[.2,.8];if("wind_speed"===e){const t=(d[0]+d[1])/2;d[0]=d[1]=t}const p=null!=h&&null!=f?[h,f]:null;if("classified_arrow"===e)if(null!=h&&null!=f&&null!=c){a=[];const t=(c.maxDataValue-c.minDataValue)/5;for(let e=0;e<6;e++)a.push(c.minDataValue+t*e)}else a=[0,1e-6,3.5,7,10.5,14];const m="flow_to"===s==("ocean_current_kn"===e||"ocean_current_m"===e)?0:Math.PI,g=n?.find((t=>"rotationInfo"===t.type));return{breakValues:a,dataRange:p,inputUnit:r,outputUnit:o,symbolTileSize:i,symbolPercentRange:d,style:e||"single_arrow",rotation:m,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":g?.rotationType||t.rotationType,type:"vectorField"}}};function g(t){return(0,c.nk)(t)&&0!==t.validPixelCount}(0,o._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"rendererJSON",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],m.prototype,"rasterInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"lookup",void 0),(0,o._)([(0,a.Cb)()],m.prototype,"canRenderInWebGL",void 0),m=(0,o._)([(0,l.j)("esri.renderers.support.RasterSymbolizer")],m);const y=m},93010:(t,e,r)=>{r.d(e,{B4:()=>p,H0:()=>u,Jw:()=>w,Oi:()=>a,Uh:()=>d,XL:()=>y,oI:()=>x,pM:()=>v,xK:()=>l});var o=r(22303),n=r(3892),i=r(35454),s=r(96674);const a=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],l=[{id:"aspect",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partial-spectrum-1-diverging",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partial-spectrum-2-diverging",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrum-full-dark",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrum-full-light",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],u=new i.X({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","Purple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function c(t,e){if(!t||!e||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]>e[r]+2||t[r]<e[r]-2)return!1;return!0}function h(t){const e=t.clone();return e.fromColor=t.toColor,e.toColor=t.fromColor,e.algorithm=t.algorithm,e}function f(t,e){if(!t)return;const r=e??l;let n=null;return"algorithmic"===t.type?r.some((e=>{if(c(t.fromColor.toRgb(),e.fromColor)&&c(t.toColor.toRgb(),e.toColor))return n=e.id,!0})):"multipart"===t.type&&r.some((e=>{const r=t.colorRamps,i=e.colorRamps;if(r&&i&&r.length===i.length&&!i.some(((t,e)=>{if(!c(r[e].fromColor.toRgb(),new o.Z(t.fromColor).toRgb())||!c(r[e].toColor.toRgb(),new o.Z(t.toColor).toRgb()))return!0}))){if(n)return!0;n=e.id}})),n}function d(t,e=!1){const r="string"==typeof t?t:function(t,e,r=!1){if(!t)return;let o=f(t,e);return null!=o||r||(o=f(t=function(t){if("multipart"===t.type){const e=t.clone();return e.colorRamps?.length?(e.colorRamps=e.colorRamps.reverse().map((t=>h(t))),e):e}return h(t)}(t),e)),o}(t,void 0,e);return r?u.toJSON(r):null}function p(t,e="esriCIELabAlgorithm"){const r=l.find((({id:e})=>e===t));return r?r.colorRamps?{type:"multipart",colorRamps:r.colorRamps.map((t=>({type:"algorithmic",algorithm:e,fromColor:[...t.fromColor],toColor:[...t.toColor]})))}:{type:"algorithmic",algorithm:e,fromColor:[...r.fromColor],toColor:[...r.toColor]}:null}function m(t){const e=(t=t||{}).numColors||256,r=t.distanceOffset||0,o=null!=t.isCustomInterval?t.isCustomInterval:null!==t.distanceInterval&&t.distanceInterval!==1/(e-1),n=t.distanceInterval||1/(e-1);return{...t,numColors:e,distanceOffset:r,interpolateAlpha:!!t.interpolateAlpha,distanceInterval:n,isCustomInterval:o,weights:t.weights}}function g(t,e){let{fromColor:r,toColor:o}=t;r=[...r],o=[...o],3===r.length&&(r=r.concat([255])),3===o.length&&(o=o.concat([255]));const i=t.algorithm||"esriCIELabAlgorithm",s=m(e),{numColors:a,distanceOffset:l,isCustomInterval:u,interpolateAlpha:c}=s;if(1===a&&0===l)return[r];if(2===a&&0===l&&!u)return[r,o];const h={r:r[0],g:r[1],b:r[2]},f={r:o[0],g:o[1],b:o[2]},d="esriCIELabAlgorithm"===i?function(t,e,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r;let{l:a,a:l,b:u}=t;const c=(e.l-a)*i,h=(e.a-l)*i,f=(e.b-u)*i,d=[];if(n){const t=n/i;a+=t*c,l+=t*h,u+=t*f}for(let t=0;t<o-1;t++)d.push({l:a,a:l,b:u}),a+=c,l+=h,u+=f;return d.push(s?{l:a,a:l,b:u}:e),d}((0,n.Y3)(h),(0,n.Y3)(f),s):"esriHSVAlgorithm"===i?function(t,e,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r,a=0===t.s,l=0===e.s;let u=t.h,c=e.h;a&&!l?u=c:l&&!a&&(e={...e,h:u},c=u);let h,f=Math.abs(c-u);const d=360;f<180?h=(c-u)*i:(f=d-f,h=u>c?f*i:-f*i);const p=(e.s-t.s)*i,m=(e.v-t.v)*i;let{s:g,v:y}=t,w=u;if(n){const t=n/i;w=(w+t*h+d)%d,g+=t*p,y+=t*m}const b=[];for(let t=0;t<o-1;t++)b.push({h:w,s:g,v:y}),w=(w+h+d)%d,g+=p,y+=m;return b.push(s?{h:w,s:g,v:y}:e),b}((0,n._Y)(h),(0,n._Y)(f),s):function(t,e,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r,a=t.h,l=e.h,u=2*Math.PI;let c;if(a<=l){const t=l-a,e=l-a-u;c=Math.abs(e)<Math.abs(t)?e:t}else{const t=l+u-a,e=l-a;c=Math.abs(e)<Math.abs(t)?e:t}const h=c*i,f=(e.l-t.l)*i,d=(e.c-t.c)*i;let{l:p,c:m,h:g}=t;if(n){const t=n/i;p+=t*f,m+=t*d,g=(g+t*h+u)%u}const y=[];for(let t=0;t<o-1;t++)y.push({l:p,c:m,h:g}),p+=f,m+=d,g=(g+h+u)%u;return y.push(s?{l:p,c:m,h:g}:e),y}((0,n.sJ)(h),(0,n.sJ)(f),s),p=[],g=r[3]??255,y=((o[3]??255)-g)/(a-1);for(let t=0;t<a;t++){const{r:e,g:r,b:o}=(0,n.xr)(d[t]),i=c?Math.round(g+y*t):255;p.push([e,r,o,i])}return p}function y(t,e){const r=(0,s.AK)(t)?t.toJSON():t;return"multipart"===r.type?function(t,e){const{numColors:r,interpolateAlpha:o}=m(e);let n=e?.weights;const{colorRamps:i}=t;if(n){const t=n.reduce(((t,e)=>t+e));n=n.map((e=>e/t))}else{n=[];for(let t=0;t<i.length;t++)n[t]=1/i.length}const s=[];let a=0,l=0;const u=1/(r-1);let c=!1;for(let t=0;t<i.length;t++){let e=c?0:a*u-l,h=t===i.length-1?r-1-a:(n[t]-e)/u;if(c=Math.ceil(h)===h,h=Math.ceil(h),0===h)continue;e/=n[t];const f=g(i[t],{numColors:h,interpolateAlpha:o,distanceOffset:e,distanceInterval:u/n[t]});a+=f.length,s.push(...f),l+=n[t]}const h=[...i[i.length-1].toColor];return 3===h.length&&h.push(255),s.push(h),s}(r,e):g(r,e)}function w(t,e){const r=y(t,e),o=e?.interpolateAlpha;return r.forEach(((t,e)=>{t.unshift(e),o||t.pop()})),r}function b(t){const e=(0,n._Y)(t);return{type:"HsvColor",Hue:e.h,Saturation:e.s,Value:e.v,AlphaValue:255}}function C(t){const e=t.toJSON();return{Algorithm:e?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:b(t.fromColor),ToColor:b(t.toColor)}}function v(t){const e=d(t);if(!e)return null;if("algorithmic"===t.type)return{...C(t),Name:e};if(t.colorRamps){const r=t.colorRamps.map(C);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:e}}return null}function x(t){const e=t.reverse().map((t=>{const e=t.toString(16);return e.length<2?"0"+e:e}));return 4294967295&Number.parseInt(e.join(""),16)}},12163:(t,e,r)=>{function o(t,e){const{attributeTable:r,bandCount:o}=t;return!((null!=r||(n=t,!["u8","s8"].includes(n.pixelType)||null==n.statistics?.[0]?.min||null==n.statistics[0]?.max||1!==n.bandCount))&&(null==r||o>1||e&&null==r.fields.find((t=>t.name.toLowerCase()===e.toLowerCase()))));var n}function n(t){const{bandCount:e,dataType:r,pixelType:o}=t;return"elevation"===r||"generic"===r&&1===e&&("s16"===o||"s32"===o||"f32"===o||"f64"===o)}function i(t,e=!1){const{bandCount:r,colormap:o,pixelType:n}=t;return 1===r&&(!!o?.length||!e&&"u8"===n)}function s(t,e=!1){const{attributeTable:r,bandCount:o}=t;return 1===o&&(!e||null!=r||null!=t.histograms)}function a(t){const{dataType:e}=t;return"vector-uv"===e||"vector-magdir"===e}function l(t){const{dataType:e}=t;return"vector-uv"===e||"vector-magdir"===e}r.d(e,{LV:()=>a,MG:()=>o,aG:()=>l,fI:()=>s,jX:()=>n,mO:()=>i})},75509:(t,e,r)=>{r.d(e,{J:()=>n,v:()=>o});const o=new(r(35454).X)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),n={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},23808:(t,e,r)=>{r.d(e,{GE:()=>u}),r(66577);var o=r(80442),n=r(92604),i=(r(22021),r(95330)),s=r(77734);r(8744),r(6570);const a=n.Z.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(t,e,r,n){const u=performance.now(),c=function(t,e){const r=function(t,e,r,o){if(0===o)return t;const n=Math.round(3*o),i=new Array(2*n+1);let s=0;for(let t=-n;t<=n;t++){const e=Math.exp(-t*t/(o*o));i[t+n]=e,s+=e}for(let t=-n;t<=n;t++)i[t+n]/=s;const a=new Float32Array(t.length);for(let o=0;o<r;o++)for(let r=0;r<e;r++){let s=0,l=0;for(let a=-n;a<=n;a++){if(r+a<0||r+a>=e)continue;const u=i[a+n];s+=u*t[2*(o*e+(r+a))],l+=u*t[2*(o*e+(r+a))+1]}a[2*(o*e+r)]=s,a[2*(o*e+r)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let o=0;o<r;o++){let s=0,u=0;for(let l=-n;l<=n;l++){if(o+l<0||o+l>=r)continue;const c=i[l+n];s+=c*a[2*((o+l)*e+t)],u+=c*a[2*((o+l)*e+t)+1]}l[2*(o*e+t)]=s,l[2*(o*e+t)+1]=u}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,o)=>{const n=Math.floor(t),i=Math.floor(o);if(n<0||n>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-n,a=o-i,l=n,u=i,c=n<e.width-1?n+1:n,h=i<e.height-1?i+1:i,f=r[2*(u*e.width+l)],d=r[2*(u*e.width+c)],p=r[2*(h*e.width+l)],m=r[2*(h*e.width+c)],g=r[2*(u*e.width+l)+1],y=r[2*(u*e.width+c)+1];return[(f*(1-a)+p*a)*(1-s)+(d*(1-a)+m*a)*s,(g*(1-a)+r[2*(h*e.width+l)+1]*a)*(1-s)+(y*(1-a)+r[2*(h*e.width+c)+1]*a)*s]}:(t,o)=>{const n=Math.round(t),i=Math.round(o);return n<0||n>=e.width||i<0||i>=e.height?[0,0]:[r[2*(i*e.width+n)],r[2*(i*e.width+n)+1]]}}(e,r),f=performance.now(),d=h(e,c,r.width,r.height),p=performance.now(),m=function(t,e){const r=new s.Z,o=t.reduce(((t,e)=>t+e.length),0),n=new Float32Array(4*o),i=new Array(t.length);let a=0,l=0;for(const e of t){const t=a;for(const t of e)n[4*a]=t.x,n[4*a+1]=t.y,n[4*a+2]=t.t,n[4*a+3]=t.speed,a++;i[l++]={startVertex:t,numberOfVertices:e.length,totalTime:e[e.length-1].t,timeSeed:r.getFloat()}}return{lineVertices:n,lineDescriptors:i}}(d),g=performance.now(),y="Streamlines"===t?function(t,e){const{lineVertices:r,lineDescriptors:o}=t;let n=0,i=0;for(const t of o)n+=2*t.numberOfVertices,i+=6*(t.numberOfVertices-1);const s=new Float32Array(9*n),a=new Uint32Array(i);let l=0,u=0;function c(){a[u++]=l-2,a[u++]=l,a[u++]=l-1,a[u++]=l,a[u++]=l+1,a[u++]=l-1}function h(t,e,r,o,n,i,a,u){const c=9*l;let h=0;s[c+h++]=t,s[c+h++]=e,s[c+h++]=1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=o/2,s[c+h++]=n/2,s[c+h++]=u,l++,s[c+h++]=t,s[c+h++]=e,s[c+h++]=-1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=-o/2,s[c+h++]=-n/2,s[c+h++]=u,l++}for(const t of o){const{totalTime:o,timeSeed:n}=t;let i=null,s=null,a=null,l=null,u=null,f=null;for(let d=0;d<t.numberOfVertices;d++){const p=r[4*(t.startVertex+d)],m=r[4*(t.startVertex+d)+1],g=r[4*(t.startVertex+d)+2],y=r[4*(t.startVertex+d)+3];let w=null,b=null,C=null,v=null;if(d>0){w=p-i,b=m-s;const t=Math.sqrt(w*w+b*b);if(w/=t,b/=t,d>1){let t=w+u,r=b+f;const o=Math.sqrt(t*t+r*r);t/=o,r/=o;const n=Math.min(1/(t*w+r*b),e);t*=n,r*=n,C=-r,v=t}else C=-b,v=w;null!==C&&null!==v&&(h(i,s,a,C,v,o,n,y),c())}i=p,s=m,a=g,u=w,f=b,l=y}h(i,s,a,-f,u,o,n,l)}return{vertexData:s,indexData:a}}(m,l):function(t){const e=16,r=1,o=2,{lineVertices:n,lineDescriptors:i}=t;let s=0,a=0;for(const t of i){const e=t.numberOfVertices-1;s+=4*e*2,a+=6*e*2}const l=new Float32Array(s*e),u=new Uint32Array(a);let c,h,f,d,p,m,g,y,w,b,C,v,x,k,A=0,S=0;function T(){u[S++]=A-8,u[S++]=A-7,u[S++]=A-6,u[S++]=A-7,u[S++]=A-5,u[S++]=A-6,u[S++]=A-4,u[S++]=A-3,u[S++]=A-2,u[S++]=A-3,u[S++]=A-1,u[S++]=A-2}function I(t,n,i,s,a,u,c,h,f,d,p,m,g,y){const w=A*e;let b=0;for(const e of[r,o])for(const r of[1,2,3,4])l[w+b++]=t,l[w+b++]=n,l[w+b++]=i,l[w+b++]=s,l[w+b++]=c,l[w+b++]=h,l[w+b++]=f,l[w+b++]=d,l[w+b++]=e,l[w+b++]=r,l[w+b++]=g,l[w+b++]=y,l[w+b++]=a/2,l[w+b++]=u/2,l[w+b++]=p/2,l[w+b++]=m/2,A++}function M(t,e){let r=w+C,o=b+v;const n=Math.sqrt(r*r+o*o);r/=n,o/=n;const i=w*r+b*o;r/=i,o/=i;let s=C+x,a=v+k;const l=Math.sqrt(s*s+a*a);s/=l,a/=l;const u=C*s+v*a;s/=u,a/=u,I(c,h,f,d,-o,r,p,m,g,y,-a,s,t,e),T()}function P(t,e,r,o,n,i){if(w=C,b=v,C=x,v=k,null==w&&null==b&&(w=C,b=v),null!=p&&null!=m){x=t-p,k=e-m;const r=Math.sqrt(x*x+k*k);x/=r,k/=r}null!=w&&null!=b&&M(n,i),c=p,h=m,f=g,d=y,p=t,m=e,g=r,y=o}function E(t,e){w=C,b=v,C=x,v=k,null==w&&null==b&&(w=C,b=v),null!=w&&null!=b&&M(t,e)}for(const t of i){c=null,h=null,f=null,d=null,p=null,m=null,g=null,y=null,w=null,b=null,C=null,v=null,x=null,k=null;const{totalTime:e,timeSeed:r}=t;for(let o=0;o<t.numberOfVertices;o++)P(n[4*(t.startVertex+o)],n[4*(t.startVertex+o)+1],n[4*(t.startVertex+o)+2],n[4*(t.startVertex+o)+3],e,r);E(e,r)}return{vertexData:l,indexData:u}}(m),w=performance.now();return(0,o.Z)("esri-2d-profiler")&&(a.info("I.1","_createFlowFieldFromData (ms)",Math.round(f-u)),a.info("I.2","_getStreamlines (ms)",Math.round(p-f)),a.info("I.3","createAnimatedLinesData (ms)",Math.round(g-p)),a.info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-g)),a.info("I.5","createFlowMesh (ms)",Math.round(w-u)),a.info("I.6","Mesh size (bytes)",y.vertexData.buffer.byteLength+y.indexData.buffer.byteLength)),await Promise.resolve(),(0,i.k_)(n),y}function c(t,e,r,o,n,i,s,a,l){const u=[];let c=r,h=o,f=0,[d,p]=e(c,h);d*=t.velocityScale,p*=t.velocityScale;const m=Math.sqrt(d*d+p*p);let g,y;u.push({x:c,y:h,t:f,speed:m});for(let r=0;r<t.verticesPerLine;r++){let[r,o]=e(c,h);r*=t.velocityScale,o*=t.velocityScale;const d=Math.sqrt(r*r+o*o);if(d<t.minSpeedThreshold)return u;const p=r/d,m=o/d;if(c+=p*t.segmentLength,h+=m*t.segmentLength,f+=t.segmentLength/d,Math.acos(p*g+m*y)>t.maxTurnAngle)return u;if(t.collisions){const t=Math.round(c*l),e=Math.round(h*l);if(t<0||t>s-1||e<0||e>a-1)return u;const r=i[e*s+t];if(-1!==r&&r!==n)return u;i[e*s+t]=n}u.push({x:c,y:h,t:f,speed:d}),g=p,y=m}return u}function h(t,e,r,o){const n=[],i=new s.Z,a=1/Math.max(t.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(o*a),h=new Int32Array(l*u);for(let t=0;t<h.length;t++)h[t]=-1;const f=[];for(let e=0;e<o;e+=t.lineSpacing)for(let o=0;o<r;o+=t.lineSpacing)f.push({x:o,y:e,sort:i.getFloat()});f.sort(((t,e)=>t.sort-e.sort));for(const{x:r,y:o}of f)if(i.getFloat()<t.density){const i=c(t,e,r,o,n.length,h,l,u,a);if(i.length<2)continue;n.push(i)}return n}}}]);