@arcgis/core 6.0.0-next.56 → 6.0.0-next.58

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 (695) hide show
  1. package/WebLinkChart.d.ts +0 -12
  2. package/WebLinkChart.js +1 -1
  3. package/applications/Components/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  4. package/applications/WebEditor/sketchUtils.js +1 -1
  5. package/arcade/arcadeCompiler.js +5 -5
  6. package/arcade/containerUtils.js +1 -1
  7. package/arcade/featureset/actions/Adapted.js +1 -1
  8. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  9. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  10. package/arcade/featureset/support/shared.js +1 -1
  11. package/arcade/featureset/support/sqlUtils.js +1 -1
  12. package/assets/esri/core/workers/RemoteClient.js +1 -1
  13. package/assets/esri/core/workers/chunks/00c227bcecc28fe278bb.js +1 -0
  14. package/assets/esri/core/workers/chunks/075e6c60e741482e673f.js +1 -0
  15. package/assets/esri/core/workers/chunks/076c2098570ee885d117.js +1 -0
  16. package/assets/esri/core/workers/chunks/091ce6b3de590e1d9ff6.js +1 -0
  17. package/assets/esri/core/workers/chunks/099dec4103f6e7556eb0.js +1 -0
  18. package/assets/esri/core/workers/chunks/{77267e0807cbbc00496d.js → 0be55d9bab7c3510a7f2.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{da69e8cd52aa77aa4c2c.js → 0fc1facd26c9ef96e081.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{f97dc99afe3375fc8e16.js → 1179a3574c580f7ce390.js} +1 -1
  21. package/assets/esri/core/workers/chunks/129140104be2620c0382.js +1 -0
  22. package/assets/esri/core/workers/chunks/1295fcf866e7347b2d53.js +1 -0
  23. package/assets/esri/core/workers/chunks/16219f0c56d6f6213c24.js +1 -0
  24. package/assets/esri/core/workers/chunks/185b317eec95f3370970.js +1 -0
  25. package/assets/esri/core/workers/chunks/1afc8820c283ef785729.js +1 -0
  26. package/assets/esri/core/workers/chunks/1bdef2e142e78341fec0.js +1 -0
  27. package/assets/esri/core/workers/chunks/1c874f86bfd0963aa3d2.js +1 -0
  28. package/assets/esri/core/workers/chunks/1ce0bf4ff14af8a68a5c.js +1 -0
  29. package/assets/esri/core/workers/chunks/1f1515313baeecc095a2.js +1 -0
  30. package/assets/esri/core/workers/chunks/1f710c91a82f6fd3d0f6.js +1 -0
  31. package/assets/esri/core/workers/chunks/{1894c39dabc78e7a5af8.js → 1fad7a7211bb8c9b58e3.js} +1 -1
  32. package/assets/esri/core/workers/chunks/24374aaa6fb3e12960d1.js +1 -0
  33. package/assets/esri/core/workers/chunks/24aa7b81814b4e519b01.js +1 -0
  34. package/assets/esri/core/workers/chunks/294097140e349e073b7e.js +1 -0
  35. package/assets/esri/core/workers/chunks/{c8c79d21dfce5695a089.js → 2b69fdf51b6f0b2abb75.js} +1 -1
  36. package/assets/esri/core/workers/chunks/2ba9b3b4d49eb2740a42.js +1 -0
  37. package/assets/esri/core/workers/chunks/2eb3297014f063fb4bc9.js +1 -0
  38. package/assets/esri/core/workers/chunks/2eb3cec44ce7587980a4.js +1 -0
  39. package/assets/esri/core/workers/chunks/2ee3cd6b2e5274932d31.js +1 -0
  40. package/assets/esri/core/workers/chunks/2f31766bc0f9d1d70c5a.js +1 -0
  41. package/assets/esri/core/workers/chunks/31df02c6f5b04a143ae6.js +1 -0
  42. package/assets/esri/core/workers/chunks/32d5aae2e0953420216a.js +1 -0
  43. package/assets/esri/core/workers/chunks/35109db6a6be66f895f7.js +1 -0
  44. package/assets/esri/core/workers/chunks/373b140f92eda3857f82.js +1 -0
  45. package/assets/esri/core/workers/chunks/3a1510650ce8de7edec8.js +1 -0
  46. package/assets/esri/core/workers/chunks/3b0933cea2a902a26bb7.js +1 -0
  47. package/assets/esri/core/workers/chunks/3d96676b94e8ecb6a4d1.js +1 -0
  48. package/assets/esri/core/workers/chunks/3edfd8ecf000b00a4a92.js +1 -0
  49. package/assets/esri/core/workers/chunks/3fc4b7d0ee460fc96176.js +1 -0
  50. package/assets/esri/core/workers/chunks/{f053cbfe671bd14c7d5b.js → 419d8116d8e7faccfed5.js} +1 -1
  51. package/assets/esri/core/workers/chunks/41d57b45cc2361305af3.js +1 -0
  52. package/assets/esri/core/workers/chunks/42ee1f8732e644371ea9.js +1 -0
  53. package/assets/esri/core/workers/chunks/4309f3e72c6332e01d75.js +1 -0
  54. package/assets/esri/core/workers/chunks/44ca7a56fb28227fdcbf.js +1 -0
  55. package/assets/esri/core/workers/chunks/4537f0866e903d2e9bb9.js +1 -0
  56. package/assets/esri/core/workers/chunks/49f61832e0d3b24e1608.js +1 -0
  57. package/assets/esri/core/workers/chunks/4a45505fb9a40b503672.js +29 -0
  58. package/assets/esri/core/workers/chunks/4b456c1f26d70392f7d4.js +1 -0
  59. package/assets/esri/core/workers/chunks/{28fae7da8cc4ae7a83e4.js → 4c510b1caffeec80dc6b.js} +1 -1
  60. package/assets/esri/core/workers/chunks/4ce5c9b658ba79a0b668.js +1 -0
  61. package/assets/esri/core/workers/chunks/{41694ee8990e799da225.js → 4d8f23b2e6721fb5b289.js} +1 -1
  62. package/assets/esri/core/workers/chunks/4fb8708666a614df583d.js +1 -0
  63. package/assets/esri/core/workers/chunks/4feec96a312dcc137911.js +1 -0
  64. package/assets/esri/core/workers/chunks/52ad9306fd40d488376d.js +1 -0
  65. package/assets/esri/core/workers/chunks/5375bdf46b602b19fa86.js +1 -0
  66. package/assets/esri/core/workers/chunks/549a8e7313f75ea3f85b.js +1 -0
  67. package/assets/esri/core/workers/chunks/55f97942c58455f47975.js +1 -0
  68. package/assets/esri/core/workers/chunks/566d72534d694c318e30.js +1 -0
  69. package/assets/esri/core/workers/chunks/5ce00674305e5716d27b.js +1 -0
  70. package/assets/esri/core/workers/chunks/5e032d209df500fad321.js +1 -0
  71. package/assets/esri/core/workers/chunks/{dfa1b0308e5e82d1ddfe.js → 5e4de4ddd3bdc74100e0.js} +34 -33
  72. package/assets/esri/core/workers/chunks/5ea8cdc28a81744913cd.js +1 -0
  73. package/assets/esri/core/workers/chunks/61565d4674cf77cbf1dd.js +1 -0
  74. package/assets/esri/core/workers/chunks/651e33be8bb3995d749f.js +1 -0
  75. package/assets/esri/core/workers/chunks/{d296c9561f6a6aeff973.js → 68b8dff748f1ef588653.js} +1 -1
  76. package/assets/esri/core/workers/chunks/690041373d03d02a3044.js +1 -0
  77. package/assets/esri/core/workers/chunks/{6d99e7e1aa007a6f1039.js → 69316db52d7bed746879.js} +1 -1
  78. package/assets/esri/core/workers/chunks/69384a9703abee1903c5.js +1 -0
  79. package/assets/esri/core/workers/chunks/6992a7728451c5a7b673.js +1 -0
  80. package/assets/esri/core/workers/chunks/69e5efe1acbdaddee90d.js +1 -0
  81. package/assets/esri/core/workers/chunks/6b2e09e43f449020d5ad.js +1 -0
  82. package/assets/esri/core/workers/chunks/6b5f8bf8b3480910666d.js +1 -0
  83. package/assets/esri/core/workers/chunks/70fe8b90f174ec64db2e.js +1 -0
  84. package/assets/esri/core/workers/chunks/720356fc6d5e18008471.js +1 -0
  85. package/assets/esri/core/workers/chunks/721f43554b9654481de7.js +1 -0
  86. package/assets/esri/core/workers/chunks/{3869ea1be105eaad4a38.js → 7328aca34c95fd0fc752.js} +1 -1
  87. package/assets/esri/core/workers/chunks/789567124c4a15235952.js +1 -0
  88. package/assets/esri/core/workers/chunks/{a24dc5350af001db417a.js → 7affab0d0692bdb76036.js} +1 -1
  89. package/assets/esri/core/workers/chunks/{b6e628b5d2643af4c19b.js → 7b4063f45b45ad8a7289.js} +1 -1
  90. package/assets/esri/core/workers/chunks/7c22d3669087f38c92b9.js +1 -0
  91. package/assets/esri/core/workers/chunks/7cb7bdc30f970eb9ff7f.js +1 -0
  92. package/assets/esri/core/workers/chunks/7d71cf65bbc1b3308856.js +1 -0
  93. package/assets/esri/core/workers/chunks/81cdb9705f7eee9e792f.js +1 -0
  94. package/assets/esri/core/workers/chunks/821003fe1be30d5d29aa.js +1 -0
  95. package/assets/esri/core/workers/chunks/822b9c1e172c835b9624.js +1 -0
  96. package/assets/esri/core/workers/chunks/{a7dfca326883384d2751.js → 823228f1fa6ba4e8bff2.js} +1 -1
  97. package/assets/esri/core/workers/chunks/84021d57822f374217ef.js +1 -0
  98. package/assets/esri/core/workers/chunks/847ec6b337cfb2e4a15b.js +1 -0
  99. package/assets/esri/core/workers/chunks/84f41ddd7366bfbf5b25.js +1 -0
  100. package/assets/esri/core/workers/chunks/8920d0b11951b57d6a66.js +1 -0
  101. package/assets/esri/core/workers/chunks/{c6e7c95391a54978402b.js → 893363ee500fc1288781.js} +1 -1
  102. package/assets/esri/core/workers/chunks/8b0cdbbf5c81283eae13.js +1 -0
  103. package/assets/esri/core/workers/chunks/{7850e306d7cd12653b23.js → 90de2f93b0ba1eb337fd.js} +1 -1
  104. package/assets/esri/core/workers/chunks/91b0035e3eae9e452fbc.js +1 -0
  105. package/assets/esri/core/workers/chunks/92d97e0fcc20dd5f5ac4.js +1 -0
  106. package/assets/esri/core/workers/chunks/93262d3616ac0cc4b532.js +1 -0
  107. package/assets/esri/core/workers/chunks/9748a0db6451336d51ef.js +1 -0
  108. package/assets/esri/core/workers/chunks/{69a09c6acb5ae03c67f6.js → 985ce51da8ae4984a4db.js} +1 -1
  109. package/assets/esri/core/workers/chunks/9bbff9230298b1bac46a.js +1 -0
  110. package/assets/esri/core/workers/chunks/9ca84fa9423654061d05.js +1 -0
  111. package/assets/esri/core/workers/chunks/9cae59db5b9cb37baea9.js +1 -0
  112. package/assets/esri/core/workers/chunks/{ed2626a895ca1d4a7216.js → 9dbb9e74754392b066a8.js} +1 -1
  113. package/assets/esri/core/workers/chunks/9dd3863b9d7c1a5ea20a.js +1 -0
  114. package/assets/esri/core/workers/chunks/9e62cfcb4e0188d51294.js +1 -0
  115. package/assets/esri/core/workers/chunks/a2a3edec2ee31273d609.js +1 -0
  116. package/assets/esri/core/workers/chunks/{d0e8d0f8b4e4cc13e837.js → a301aa62a03d3618eba9.js} +1 -1
  117. package/assets/esri/core/workers/chunks/a39d595fc11afedc1875.js +1 -0
  118. package/assets/esri/core/workers/chunks/a57b506c538e2186909d.js +1 -0
  119. package/assets/esri/core/workers/chunks/a722114f01e66a608cec.js +1 -0
  120. package/assets/esri/core/workers/chunks/{5bda285f6ecf725676b3.js → a7b4821fd3080cf2756f.js} +1 -1
  121. package/assets/esri/core/workers/chunks/a8d91c2654c5012400b4.js +1 -0
  122. package/assets/esri/core/workers/chunks/aa70d98e6bcbd06a8461.js +1 -0
  123. package/assets/esri/core/workers/chunks/add538f52c7bcfd154da.js +1 -0
  124. package/assets/esri/core/workers/chunks/ae0b0a562f0ab57e1883.js +1 -0
  125. package/assets/esri/core/workers/chunks/b10c534cbe311d17b7d5.js +1 -0
  126. package/assets/esri/core/workers/chunks/b2c3652c8ce9597dcf89.js +1 -0
  127. package/assets/esri/core/workers/chunks/b725d944ecd5da02fd9e.js +1 -0
  128. package/assets/esri/core/workers/chunks/b7fbbbeabaa5bfcdeabc.js +1 -0
  129. package/assets/esri/core/workers/chunks/{70ead4c231cba4084cf4.js → b856ef3a949ca06a4af5.js} +1 -1
  130. package/assets/esri/core/workers/chunks/{ae2cd50c2b938b39417b.js → b8b4f68305a4f654fa75.js} +1 -1
  131. package/assets/esri/core/workers/chunks/{97107e64407fa6825620.js → ba324fd300b6e6a584ae.js} +1 -1
  132. package/assets/esri/core/workers/chunks/bc40b96080346b91e507.js +1 -0
  133. package/assets/esri/core/workers/chunks/c5ca8245113576b35acc.js +1 -0
  134. package/assets/esri/core/workers/chunks/{c7a0c4ca37ebd1d98cf1.js → c629a676b707138e7a1c.js} +1 -1
  135. package/assets/esri/core/workers/chunks/c8a1aa90ec6d455ff82d.js +1 -0
  136. package/assets/esri/core/workers/chunks/c8dd8b67100177109619.js +1 -0
  137. package/assets/esri/core/workers/chunks/c8eb8744f1ed9d1897dc.js +1 -0
  138. package/assets/esri/core/workers/chunks/cb0e3614b78c78040662.js +1 -0
  139. package/assets/esri/core/workers/chunks/ccc89208aad7206aabd9.js +1 -0
  140. package/assets/esri/core/workers/chunks/cebd6732fe573f79849c.js +1 -0
  141. package/assets/esri/core/workers/chunks/d22e3b5d836dffdf91cc.js +1 -0
  142. package/assets/esri/core/workers/chunks/{c5ddf8b347c31fe772a3.js → d45769f8a02abe5d2917.js} +1 -1
  143. package/assets/esri/core/workers/chunks/d4b62e78bb27272a5f83.js +1 -0
  144. package/assets/esri/core/workers/chunks/d52b2a591e5e6abaa133.js +1 -0
  145. package/assets/esri/core/workers/chunks/{0978e12dd6a1cbc50b80.js → d572b125bed40a4d02b1.js} +1 -1
  146. package/assets/esri/core/workers/chunks/d65206fea850b1fc0712.js +1 -0
  147. package/assets/esri/core/workers/chunks/d6a42c936ead00ab7ad4.js +1 -0
  148. package/assets/esri/core/workers/chunks/d77887edc10d5be39ac9.js +1 -0
  149. package/assets/esri/core/workers/chunks/d7b9c16fe73f50a41099.js +1 -0
  150. package/assets/esri/core/workers/chunks/{7b6fd287e7043ad50f4e.js → d9bf0be2323e9df55834.js} +1 -1
  151. package/assets/esri/core/workers/chunks/dab98890d77a6b0b2741.js +1 -0
  152. package/assets/esri/core/workers/chunks/e2ac387e154d68fd10ca.js +1 -0
  153. package/assets/esri/core/workers/chunks/e39259ff441fb67cd3e4.js +1 -0
  154. package/assets/esri/core/workers/chunks/e3c152eeaa1c95f0f2d2.js +1 -0
  155. package/assets/esri/core/workers/chunks/e42e9dd3c933f5f864ab.js +1 -0
  156. package/assets/esri/core/workers/chunks/e4ae0fad312467f218df.js +1 -0
  157. package/assets/esri/core/workers/chunks/e50cc686db878d0a9399.js +1 -0
  158. package/assets/esri/core/workers/chunks/e7cd5eeb15d3783f803d.js +1 -0
  159. package/assets/esri/core/workers/chunks/e8042584e422044ca1d1.js +1 -0
  160. package/assets/esri/core/workers/chunks/e89640667b71c1bb4ee3.js +1 -0
  161. package/assets/esri/core/workers/chunks/e9649aa2d0fdd28d91ac.js +1 -0
  162. package/assets/esri/core/workers/chunks/ee31801144602ce816d3.js +1 -0
  163. package/assets/esri/core/workers/chunks/eff8a1a880e0eb1a6814.js +1 -0
  164. package/assets/esri/core/workers/chunks/f2b7c61462f530d812c4.js +1 -0
  165. package/assets/esri/core/workers/chunks/f56404d401dfbce29473.js +1 -0
  166. package/assets/esri/core/workers/chunks/f87416f2aa791cd1bebe.js +1 -0
  167. package/assets/esri/core/workers/chunks/{f3744b12a5d0d8ca8621.js → fa65aafac2b99478c32a.js} +1 -1
  168. package/assets/esri/core/workers/chunks/fb14a0c8d2edf868838c.js +1 -0
  169. package/assets/esri/core/workers/chunks/fb8a24aa04bd2fa43241.js +1 -0
  170. package/assets/esri/core/workers/chunks/fbb27d2cef962f725180.js +1 -0
  171. package/assets/esri/core/workers/chunks/{3c6e7dcb79d13e8aecc5.js → fc965ace82bef4c6111b.js} +1 -1
  172. package/assets/esri/core/workers/chunks/{5954f02c3901b28d8e73.js → fd9382e5207b6da74b91.js} +1 -1
  173. package/assets/esri/core/workers/chunks/fdb370546be4ad552959.js +1 -0
  174. package/assets/esri/core/workers/chunks/fefac70ebe29dff54b4c.js +1 -0
  175. package/chunks/BlurEmission.glsl.js +4 -17
  176. package/chunks/Bufferer-CclWhXVb.js +1 -1
  177. package/chunks/ColorMaterial.glsl.js +1 -1
  178. package/chunks/Component.glsl.js +2 -1
  179. package/chunks/EmissionComposite.glsl.js +2 -2
  180. package/chunks/Envelope.js +1 -1
  181. package/chunks/Envelope2D.js +1 -1
  182. package/chunks/Fog.glsl.js +3 -3
  183. package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
  184. package/chunks/GlobalIllumination.glsl.js +12 -11
  185. package/chunks/GlobalIlluminationBlur.glsl.js +6 -4
  186. package/chunks/ImageMaterial.glsl.js +1 -1
  187. package/chunks/LineMarker.glsl.js +2 -2
  188. package/chunks/MultiPathImpl.js +1 -1
  189. package/chunks/OperatorGeodesicBuffer.js +1 -1
  190. package/chunks/OperatorGeodeticArea.js +1 -1
  191. package/chunks/OperatorShapePreservingProject.js +1 -1
  192. package/chunks/Point2D.js +1 -1
  193. package/chunks/RealisticAtmosphere.glsl.js +7 -9
  194. package/chunks/RealisticAtmosphereCompositing.glsl.js +6 -10
  195. package/chunks/RibbonLine.glsl.js +2 -2
  196. package/chunks/Terrain.glsl.js +28 -27
  197. package/chunks/UPCPointRenderer.glsl.js +100 -0
  198. package/chunks/UnitFactory.js +1 -1
  199. package/chunks/Water.glsl.js +25 -24
  200. package/chunks/arcade.js +1 -1
  201. package/chunks/arcgis-knowledge-client-core-simd.js +4 -4
  202. package/chunks/arcgis-knowledge-client-core.js +4 -4
  203. package/chunks/array.js +1 -1
  204. package/chunks/basis_encoder.js +3 -3
  205. package/chunks/basis_transcoder.js +2 -2
  206. package/chunks/draco_mesh_decoder.js +2 -2
  207. package/chunks/dxt_encoder.js +3 -3
  208. package/chunks/i3s.js +2 -2
  209. package/chunks/languageUtils.js +1 -1
  210. package/chunks/lclayout.js +3 -3
  211. package/chunks/lerc-wasm.js +1 -1
  212. package/chunks/lyr3DWorker.js +2 -2
  213. package/chunks/pe.js +1 -1
  214. package/chunks/projector.js +1 -1
  215. package/chunks/qb3-wasm.js +1 -1
  216. package/chunks/vxlLayer.js +2 -2
  217. package/colorUtils.js +1 -1
  218. package/config.js +1 -1
  219. package/core/AsyncUpdate.js +1 -1
  220. package/core/Clonable.js +1 -1
  221. package/core/Identifiable.js +1 -1
  222. package/core/Loadable.js +1 -1
  223. package/core/MultiOriginJSONSupport.js +1 -1
  224. package/core/NumericIdentifiable.js +1 -1
  225. package/core/Promise.js +1 -1
  226. package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
  227. package/core/accessorSupport/metadata.js +1 -1
  228. package/core/accessorSupport/trackingUtils.js +1 -1
  229. package/core/asyncUtils.js +1 -1
  230. package/core/handleUtils.js +1 -1
  231. package/core/mapCollectionUtils.js +1 -1
  232. package/core/memoryEstimations.js +1 -1
  233. package/core/reactiveUtils.js +1 -1
  234. package/core/sql/SqlTimestampOffset.js +1 -1
  235. package/core/sql/WhereClause.js +1 -1
  236. package/core/sql/WhereGrammar.js +1 -1
  237. package/core/sql/writeUtils.js +1 -1
  238. package/core/sql.js +1 -1
  239. package/core/urlUtils.js +1 -1
  240. package/core/workers/workers.js +1 -1
  241. package/geohash/GeohashCell.js +1 -1
  242. package/geohash/GeohashTree.js +1 -1
  243. package/geometry/coordinateConversion/CoordinateConversionModel.d.ts +11 -56
  244. package/geometry/coordinateConversion/support/Conversion.d.ts +5 -17
  245. package/geometry/coordinateConversion/support/Format.d.ts +6 -30
  246. package/geometry/coordinateConversion/types.d.ts +15 -15
  247. package/geometry/operators/reshapeOperator.js +1 -1
  248. package/geometry/support/MeshMaterial.js +1 -1
  249. package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
  250. package/geometry/support/meshUtils/elevationSampler.js +1 -1
  251. package/graphic/AggregateGraphicOrigin.js +1 -1
  252. package/graphic/AnnotationFeatureGraphicOrigin.js +1 -1
  253. package/graphic/BuildingGraphicOrigin.js +1 -1
  254. package/graphic/CSVGraphicOrigin.js +1 -1
  255. package/graphic/CatalogGraphicOrigin.js +1 -1
  256. package/graphic/DimensionFeatureGraphicOrigin.js +1 -1
  257. package/graphic/FeatureGraphicOrigin.js +1 -1
  258. package/graphic/GeoJSONGraphicOrigin.js +1 -1
  259. package/graphic/GeoRSSGraphicOrigin.js +1 -1
  260. package/graphic/ImageryGraphicOrigin.js +1 -1
  261. package/graphic/ImageryTileGraphicOrigin.js +1 -1
  262. package/graphic/KMLGraphicOrigin.js +1 -1
  263. package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
  264. package/graphic/LinkChartGraphicOrigin.js +1 -1
  265. package/graphic/MapImageGraphicOrigin.js +1 -1
  266. package/graphic/MapNotesGraphicOrigin.js +1 -1
  267. package/graphic/OGCFeatureGraphicOrigin.js +1 -1
  268. package/graphic/OrientedImageryGraphicOrigin.js +1 -1
  269. package/graphic/ParquetGraphicOrigin.js +1 -1
  270. package/graphic/PointCloudGraphicOrigin.js +1 -1
  271. package/graphic/SceneGraphicOrigin.js +1 -1
  272. package/graphic/SketchGraphicOrigin.js +1 -1
  273. package/graphic/StreamGraphicOrigin.js +1 -1
  274. package/graphic/SubtypeGroupGraphicOrigin.js +1 -1
  275. package/graphic/TileGraphicOrigin.js +1 -1
  276. package/graphic/TrackGraphicOrigin.js +1 -1
  277. package/graphic/VectorTileGraphicOrigin.js +1 -1
  278. package/graphic/VoxelGraphicOrigin.js +1 -1
  279. package/graphic/WCSGraphicOrigin.js +1 -1
  280. package/graphic/WFSGraphicOrigin.js +1 -1
  281. package/graphic/getLayerViewLayer.js +2 -0
  282. package/identity/IdentityManagerBase.js +1 -1
  283. package/interfaces.d.ts +0 -1
  284. package/kernel.js +1 -1
  285. package/layers/ElevationLayer.js +1 -1
  286. package/layers/LinkChartLayer.d.ts +1 -1
  287. package/layers/LinkChartLayer.js +1 -1
  288. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  289. package/layers/PointCloudLayer.js +3 -3
  290. package/layers/VectorTileLayer.d.ts +17 -10
  291. package/layers/VoxelWasmPerSceneView.js +1 -1
  292. package/layers/WMTSLayer.js +1 -1
  293. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  294. package/layers/graphics/dehydratedFeatures.js +1 -1
  295. package/layers/graphics/transferFeatures.js +1 -1
  296. package/layers/knowledgeGraph/KnowledgeGraphSublayerBase.js +1 -1
  297. package/layers/mixins/APIKeyMixin.js +1 -1
  298. package/layers/mixins/ArcGISCachedService.js +1 -1
  299. package/layers/mixins/ArcGISImageService.js +1 -1
  300. package/layers/mixins/ArcGISMapService.js +1 -1
  301. package/layers/mixins/ArcGISService.js +1 -1
  302. package/layers/mixins/BlendLayer.js +1 -1
  303. package/layers/mixins/CustomParametersMixin.js +1 -1
  304. package/layers/mixins/DataElementMixin.js +1 -1
  305. package/layers/mixins/DataSeriesLayer.js +1 -1
  306. package/layers/mixins/DisplayFilteredLayer.js +1 -1
  307. package/layers/mixins/EditBusLayer.js +1 -1
  308. package/layers/mixins/FeatureEffectLayer.js +1 -1
  309. package/layers/mixins/FeatureLayerBase.js +1 -1
  310. package/layers/mixins/FeatureReductionLayer.js +1 -1
  311. package/layers/mixins/HeightModelInfoMixin.js +1 -1
  312. package/layers/mixins/OperationalLayer.js +1 -1
  313. package/layers/mixins/OrderedLayer.js +1 -1
  314. package/layers/mixins/PortalLayer.js +1 -1
  315. package/layers/mixins/PublishableLayer.js +1 -1
  316. package/layers/mixins/RasterJobHandlerMixin.js +1 -1
  317. package/layers/mixins/RasterPresetRendererMixin.js +1 -1
  318. package/layers/mixins/RefreshableLayer.js +1 -1
  319. package/layers/mixins/ReloadableLayer.js +1 -1
  320. package/layers/mixins/ScaleRangeLayer.js +1 -1
  321. package/layers/mixins/SceneService.js +1 -1
  322. package/layers/mixins/SublayersOwner.js +1 -1
  323. package/layers/mixins/TemporalLayer.js +1 -1
  324. package/layers/mixins/TrackableLayer.js +1 -1
  325. package/layers/orientedImagery/transformations/utils.js +1 -1
  326. package/layers/raster/datasets/TIFFRaster.js +1 -1
  327. package/layers/raster/datasets/pixelReader.js +1 -1
  328. package/layers/raster/datasets/xmlUtilities.js +1 -1
  329. package/layers/raster/formats/Lerc.js +1 -1
  330. package/layers/raster/formats/Qb3.js +1 -1
  331. package/layers/raster/formats/TiffDecoder.js +1 -1
  332. package/layers/raster/formats/blosc.js +1 -1
  333. package/layers/raster/formats/tiffParser.js +1 -1
  334. package/layers/raster/formats/tiffSpatialReferenceUtils.js +2 -0
  335. package/layers/raster/formats/tiffTag.js +1 -1
  336. package/layers/raster/functions/colormaps.js +1 -1
  337. package/layers/support/TitleCreator.js +1 -1
  338. package/layers/support/WMTSSublayer.js +1 -1
  339. package/layers/support/fieldUtils.d.ts +129 -57
  340. package/layers/support/fieldUtils.js +1 -1
  341. package/layers/support/geospatialPDFUtils.js +1 -1
  342. package/layers/support/imageUtils.js +1 -1
  343. package/layers/support/labelUtils.js +1 -1
  344. package/layers/support/tiles3DUtils.js +1 -1
  345. package/layers/video/VideoController.js +14 -14
  346. package/legend/ActiveLayerInfo.js +1 -1
  347. package/legend/support/sizeRampUtils.js +1 -1
  348. package/libs/basisu/BasisUEncoder.js +1 -1
  349. package/libs/basisu/BasisUTranscoder.js +1 -1
  350. package/libs/dracoMeshDecoder/dracoMeshDecoder.js +1 -1
  351. package/libs/dxtEncoder/DXTEncoder.js +1 -1
  352. package/libs/i3s/I3SModule.js +1 -1
  353. package/libs/librust-parquet/loadParquetModule.js +1 -1
  354. package/libs/librust-text/loadTextModule.js +1 -1
  355. package/libs/linkchartlayout/LinkChartLayout.js +1 -1
  356. package/libs/maquette-advanced-projector/projector.js +1 -1
  357. package/networks/Network.js +1 -1
  358. package/networks/support/TopologyValidationJobInfo.js +1 -1
  359. package/package.json +2 -2
  360. package/popup/FeaturesModel.d.ts +6 -0
  361. package/popup/FeaturesModel.js +1 -1
  362. package/portal/PortalUser.js +1 -1
  363. package/renderers/mixins/VisualVariablesMixin.js +1 -1
  364. package/renderers/visualVariables/VisualVariableFactory.js +1 -1
  365. package/rest/identify.js +1 -1
  366. package/rest/knowledgeGraph/wasmInterface/knowledgeWasmAccess.js +1 -1
  367. package/rest/layerSources/utils.js +1 -1
  368. package/rest/networks/validateNetworkTopology.js +1 -1
  369. package/rest/support/CameraInfoMixin.js +1 -1
  370. package/rest/support/NormalizationBinParametersMixin.js +1 -1
  371. package/rest/support/generateRendererUtils.js +1 -1
  372. package/smartMapping/raster/renderers/vectorField.js +1 -1
  373. package/smartMapping/renderers/type.js +1 -1
  374. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  375. package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
  376. package/smartMapping/symbology/color.js +1 -1
  377. package/smartMapping/symbology/support/Theme.js +1 -1
  378. package/support/BasemapStyle.js +1 -1
  379. package/support/LayersMixin.js +1 -1
  380. package/support/TablesMixin.js +1 -1
  381. package/support/actions/ActionBase.d.ts +14 -2
  382. package/support/actions/ActionBase.js +1 -1
  383. package/support/actions/ActionButton.js +1 -1
  384. package/support/actions/ActionToggle.js +1 -1
  385. package/support/loadArcade.js +1 -1
  386. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  387. package/views/2d/engine/flow/utils.js +1 -1
  388. package/views/2d/engine/vectorTiles/TextShaping.js +1 -1
  389. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  390. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  391. package/views/2d/engine/vectorTiles/shaders/VTLMaterial.js +1 -1
  392. package/views/2d/engine/webgl/GlyphWorker.js +1 -1
  393. package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +1 -1
  394. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  395. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/bitmapUtils.js +1 -1
  396. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/surface.js +1 -1
  397. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
  398. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  399. package/views/2d/layerViewModuleImportUtils.js +1 -1
  400. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  401. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  402. package/views/2d/layers/LayerView2D.js +1 -1
  403. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  404. package/views/2d/layers/TileLayerView2D.js +1 -1
  405. package/views/2d/layers/features/FeatureContainer.js +1 -1
  406. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  407. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  408. package/views/2d/layers/features/support/DisplayIdGenerator.js +1 -1
  409. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  410. package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
  411. package/views/3d/GroundView3D.js +1 -1
  412. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  413. package/views/3d/layerViewModuleImportUtils.js +1 -1
  414. package/views/3d/layers/BuildingSublayerView3D.js +1 -1
  415. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  416. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  417. package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
  418. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  419. package/views/3d/layers/I3SMeshView3D.js +1 -1
  420. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  421. package/views/3d/layers/LayerView3D.js +1 -1
  422. package/views/3d/layers/Lyr3DWorker.js +1 -1
  423. package/views/3d/layers/PointCloudIntersector.js +2 -0
  424. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  425. package/views/3d/layers/SceneLayerWorker.js +1 -1
  426. package/views/3d/layers/TiledLayerView3D.js +1 -1
  427. package/views/3d/layers/UPCPointRenderer.js +2 -0
  428. package/views/3d/layers/UPCPointRendererNode.js +2 -0
  429. package/views/3d/layers/UpdatablePointCloudLayerView3D.js +2 -0
  430. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  431. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  432. package/views/3d/layers/i3s/PointCloudHighlights.js +1 -1
  433. package/views/3d/layers/i3s/PointCloudNodeHighlights.js +2 -0
  434. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  435. package/views/3d/layers/i3s/PointCloudRendererNode.js +1 -1
  436. package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
  437. package/views/3d/layers/support/GraphicsProcessorLayerView3D.js +1 -1
  438. package/views/3d/layers/support/PopupSceneLayerView.js +1 -1
  439. package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
  440. package/views/3d/layers/support/Tiles3DBVH.js +1 -1
  441. package/views/3d/layers/support/Tiles3DLayerViewRegistration.js +1 -1
  442. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  443. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  444. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  445. package/views/3d/support/GroundAndIMSurface.js +1 -1
  446. package/views/3d/support/QualityProfile.js +1 -1
  447. package/views/3d/support/QualitySettings.js +1 -1
  448. package/views/3d/support/cameraUtils.js +1 -1
  449. package/views/3d/support/engineContent/sdfPrimitives.js +1 -1
  450. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  451. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  452. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  453. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  454. package/views/3d/terrain/TerrainRenderer.js +1 -1
  455. package/views/3d/webgl/RenderNode.js +1 -1
  456. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  457. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
  458. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  459. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  460. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +9 -9
  461. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  462. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  463. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  464. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  465. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +19 -19
  466. package/views/3d/webgl-engine/core/shaderLibrary/lastFrameUniforms.js +1 -1
  467. package/views/3d/webgl-engine/core/shaderLibrary/outputEmission.glsl.js +5 -0
  468. package/views/3d/webgl-engine/core/shaderLibrary/{util/CloudsParallaxShading.glsl.js → renderClouds.glsl.js} +5 -4
  469. package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +2 -2
  470. package/views/3d/webgl-engine/core/shaderLibrary/shading/forwardLocalUp.glsl.js +1 -5
  471. package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +7 -7
  472. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +15 -12
  473. package/views/3d/webgl-engine/core/shaderLibrary/terrain/blendLayers.glsl.js +9 -9
  474. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  475. package/views/3d/webgl-engine/core/shaderModules/glsl.js +1 -1
  476. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  477. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  478. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  479. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphere.glsl.js +1 -1
  480. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphere.js +1 -1
  481. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereCompositing.glsl.js +1 -1
  482. package/views/3d/webgl-engine/effects/atmosphere/RealisticAtmosphereConfiguration.js +1 -1
  483. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  484. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  485. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  486. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  487. package/views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js +1 -1
  488. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +30 -53
  489. package/views/3d/webgl-engine/lib/EmissionComposite.glsl.js +1 -1
  490. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  491. package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
  492. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  493. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  494. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  495. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  496. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  497. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  498. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  499. package/views/3d/webgl-engine/materials/HUDMaterialBaseInstance.js +1 -1
  500. package/views/3d/webgl-engine/materials/LineCalloutMaterialBaseInstance.js +1 -1
  501. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  502. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  503. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  504. package/views/3d/webgl-engine/materials/getWaterColor.glsl.js +89 -0
  505. package/views/3d/webgl-engine/materials/renderers/BufferCache.js +1 -1
  506. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +12 -14
  507. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  508. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  509. package/views/3d/webgl-engine/shaders/UPCPointRenderer.glsl.js +2 -0
  510. package/views/3d/webgl-engine/shaders/UPCPointRendererTechnique.js +2 -0
  511. package/views/3d/webgl-engine/shaders/UPCPointRendererTechniqueConfiguration.js +2 -0
  512. package/views/BreakpointsOwner.js +1 -1
  513. package/views/DOMContainer.js +1 -1
  514. package/views/PopupView.js +1 -1
  515. package/views/View.d.ts +27 -1
  516. package/views/View.js +1 -1
  517. package/views/Viewport2DBaseMixin.js +1 -1
  518. package/views/Viewport2DMixin.js +1 -1
  519. package/views/animation/pointToPoint/Animation.js +1 -1
  520. package/views/interactive/Tooltip.d.ts +1 -1
  521. package/views/interactive/Tooltip.js +1 -1
  522. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  523. package/views/interactive/tooltip/content/TooltipContent.js +1 -1
  524. package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
  525. package/views/interactive/tooltip/infos/TooltipInfoWithCoordinates.js +1 -1
  526. package/views/layers/MapImageLayerView.js +1 -1
  527. package/views/layers/PointCloudLayerView.js +1 -1
  528. package/views/layers/RefreshableLayerView.js +1 -1
  529. package/views/layers/WMSLayerView.js +1 -1
  530. package/views/overlay/ViewOverlay.js +1 -1
  531. package/views/support/flow/utils.js +1 -1
  532. package/views/support/screenshotUtils.js +1 -1
  533. package/views/types.d.ts +15 -0
  534. package/views/webgl/AllocationTracer.js +1 -1
  535. package/views/webgl/InstanceCounter.js +1 -1
  536. package/views/webgl/RenderingContext.js +1 -1
  537. package/views/webgl/ShaderBuilder.js +23 -23
  538. package/views/webgl/ShaderTranspiler.js +1 -1
  539. package/views/webgl/capabilities/DisjointTimerQuery.js +1 -1
  540. package/views/webgl/capabilities.js +1 -1
  541. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +1 -1
  542. package/widgets/CoordinateConversion/support/Conversion.d.ts +1 -0
  543. package/widgets/CoordinateConversion/support/Format.d.ts +1 -0
  544. package/widgets/Editor/EditorViewModel.js +1 -1
  545. package/widgets/Editor/workflowUtils.js +1 -1
  546. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  547. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
  548. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  549. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  550. package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
  551. package/widgets/OrientedImageryViewer/mixins/DrawHandlerMixin.js +1 -1
  552. package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
  553. package/widgets/OrientedImageryViewer/mixins/SketchHandlerMixin.js +1 -1
  554. package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
  555. package/widgets/OrientedImageryViewer/mixins/TriangulatedSketchHandlerMixin.js +1 -1
  556. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  557. package/widgets/Sketch/support/ResponsiveToolbar/ToolbarGroupBase.js +1 -1
  558. package/widgets/smartMapping/support/utils.js +1 -1
  559. package/widgets/support/AnalysisViewModelMixin.js +1 -1
  560. package/widgets/support/AnchorElementViewModel.js +1 -1
  561. package/widgets/support/GoTo.js +1 -1
  562. package/widgets/support/InteractiveToolViewModelMixin.js +1 -1
  563. package/assets/esri/core/workers/chunks/0329fa3aa3403f1c243b.js +0 -1
  564. package/assets/esri/core/workers/chunks/04f09e1afda92cbe09f5.js +0 -1
  565. package/assets/esri/core/workers/chunks/0a97b1974367382cfdf5.js +0 -1
  566. package/assets/esri/core/workers/chunks/0b74d353f80974ff6fea.js +0 -1
  567. package/assets/esri/core/workers/chunks/0e100855bb3832a68e4b.js +0 -1
  568. package/assets/esri/core/workers/chunks/0ede8ba757fd0976d485.js +0 -1
  569. package/assets/esri/core/workers/chunks/0f39576806866cff777d.js +0 -1
  570. package/assets/esri/core/workers/chunks/0fea695721a818955abf.js +0 -1
  571. package/assets/esri/core/workers/chunks/110f78d5e78732750097.js +0 -1
  572. package/assets/esri/core/workers/chunks/1507297550c3cd1268e2.js +0 -1
  573. package/assets/esri/core/workers/chunks/193a73a2c7f4f8482c21.js +0 -1
  574. package/assets/esri/core/workers/chunks/20acb6f3ed5140b6c6c6.js +0 -1
  575. package/assets/esri/core/workers/chunks/21aa29039a95debd7f44.js +0 -1
  576. package/assets/esri/core/workers/chunks/29b74a3ff03d3c8b65dc.js +0 -1
  577. package/assets/esri/core/workers/chunks/2ad6db80a508285a3e5d.js +0 -1
  578. package/assets/esri/core/workers/chunks/2b87d5b8931305b11ff6.js +0 -1
  579. package/assets/esri/core/workers/chunks/2d4788be418a4e5f6606.js +0 -1
  580. package/assets/esri/core/workers/chunks/2f07dc632e51fddb2d48.js +0 -1
  581. package/assets/esri/core/workers/chunks/2f9adf0b809ce8797ebf.js +0 -1
  582. package/assets/esri/core/workers/chunks/3169d639ab54bf508e2c.js +0 -1
  583. package/assets/esri/core/workers/chunks/333140b18aeb5a50b654.js +0 -1
  584. package/assets/esri/core/workers/chunks/3354f1fa90f8ce4c8fde.js +0 -1
  585. package/assets/esri/core/workers/chunks/3809a8b3f31bb811d964.js +0 -1
  586. package/assets/esri/core/workers/chunks/3982409149571a827390.js +0 -1
  587. package/assets/esri/core/workers/chunks/3b11e4d2e69b7aea1d65.js +0 -1
  588. package/assets/esri/core/workers/chunks/3c1651e9e8d2e83d22df.js +0 -1
  589. package/assets/esri/core/workers/chunks/3df6631895d0a7109e00.js +0 -1
  590. package/assets/esri/core/workers/chunks/3e8d70039800f2395d66.js +0 -1
  591. package/assets/esri/core/workers/chunks/3f8d66d8447036f122ae.js +0 -1
  592. package/assets/esri/core/workers/chunks/420c6a14107a77ddad36.js +0 -1
  593. package/assets/esri/core/workers/chunks/421b8244d01736d82e7a.js +0 -1
  594. package/assets/esri/core/workers/chunks/4761cd436abceee858bf.js +0 -1
  595. package/assets/esri/core/workers/chunks/48b60ff59afbae865de1.js +0 -1
  596. package/assets/esri/core/workers/chunks/4953314fd9afd52b6eec.js +0 -1
  597. package/assets/esri/core/workers/chunks/4cf8bddc3e0619e34424.js +0 -1
  598. package/assets/esri/core/workers/chunks/4d0bb5e4a1d789cc0d75.js +0 -1
  599. package/assets/esri/core/workers/chunks/4d8539674fc2e4fea03c.js +0 -1
  600. package/assets/esri/core/workers/chunks/4de08ead94660025075b.js +0 -1
  601. package/assets/esri/core/workers/chunks/5060be52a380fc4920f8.js +0 -1
  602. package/assets/esri/core/workers/chunks/5082cdc3e91e1c6d1070.js +0 -1
  603. package/assets/esri/core/workers/chunks/52ded087d19a93e29d93.js +0 -1
  604. package/assets/esri/core/workers/chunks/53bbb9aa6e4e4a0a8121.js +0 -1
  605. package/assets/esri/core/workers/chunks/54d3cb7d95d948998591.js +0 -1
  606. package/assets/esri/core/workers/chunks/560ebf5524ade7d1f85b.js +0 -1
  607. package/assets/esri/core/workers/chunks/56f227e1a9e51d1fd742.js +0 -1
  608. package/assets/esri/core/workers/chunks/5bd451c7db17ee8f0315.js +0 -1
  609. package/assets/esri/core/workers/chunks/5c34d49a6c9cc34b7626.js +0 -1
  610. package/assets/esri/core/workers/chunks/5d75fcaded78f76efd3e.js +0 -1
  611. package/assets/esri/core/workers/chunks/5f7505ada0991cfbdd84.js +0 -1
  612. package/assets/esri/core/workers/chunks/62ddd3a82864e26f009a.js +0 -1
  613. package/assets/esri/core/workers/chunks/6737b2a4a70bbdafaf67.js +0 -1
  614. package/assets/esri/core/workers/chunks/6a339a47e765b9937dd7.js +0 -1
  615. package/assets/esri/core/workers/chunks/6c21964eb7c25c8b1e9a.js +0 -1
  616. package/assets/esri/core/workers/chunks/6fd10891506925560443.js +0 -29
  617. package/assets/esri/core/workers/chunks/703373f529c1c334cfad.js +0 -1
  618. package/assets/esri/core/workers/chunks/71a05edd6f7f3197e621.js +0 -1
  619. package/assets/esri/core/workers/chunks/72b7e7b518c88b7569dd.js +0 -1
  620. package/assets/esri/core/workers/chunks/733c32d8091427d84de7.js +0 -1
  621. package/assets/esri/core/workers/chunks/73918ca7fdf41272d941.js +0 -1
  622. package/assets/esri/core/workers/chunks/7673217a688d739141e2.js +0 -1
  623. package/assets/esri/core/workers/chunks/76869c14dd7ffaae7eff.js +0 -1
  624. package/assets/esri/core/workers/chunks/7b156905d168bf973518.js +0 -1
  625. package/assets/esri/core/workers/chunks/7baa49055bc31618b56e.js +0 -1
  626. package/assets/esri/core/workers/chunks/7bd5a074d9f4ba137649.js +0 -1
  627. package/assets/esri/core/workers/chunks/7c13d7754fc914a87817.js +0 -1
  628. package/assets/esri/core/workers/chunks/7dc2e714234b2cee8701.js +0 -1
  629. package/assets/esri/core/workers/chunks/835e0315661003caa71f.js +0 -1
  630. package/assets/esri/core/workers/chunks/8570e3df90fb76a8741a.js +0 -1
  631. package/assets/esri/core/workers/chunks/860552f49f17de2f3353.js +0 -1
  632. package/assets/esri/core/workers/chunks/86578c191d76062157ec.js +0 -1
  633. package/assets/esri/core/workers/chunks/87d6e99d83db9a8cda7c.js +0 -1
  634. package/assets/esri/core/workers/chunks/88df1b8b295d3aed649f.js +0 -1
  635. package/assets/esri/core/workers/chunks/8c9934d30655dd2c48da.js +0 -1
  636. package/assets/esri/core/workers/chunks/9117c9b720c9ba6e7a6e.js +0 -1
  637. package/assets/esri/core/workers/chunks/939fb9a8c301ace07186.js +0 -1
  638. package/assets/esri/core/workers/chunks/94a38c9b3d086b37242f.js +0 -1
  639. package/assets/esri/core/workers/chunks/98e1751f888975532afc.js +0 -1
  640. package/assets/esri/core/workers/chunks/9b727f45dfea84357b57.js +0 -1
  641. package/assets/esri/core/workers/chunks/9d61f10f2bef15b5811d.js +0 -1
  642. package/assets/esri/core/workers/chunks/9dcf5be203f8b1e47d9d.js +0 -1
  643. package/assets/esri/core/workers/chunks/9eb00bb8dab995c2dcb3.js +0 -1
  644. package/assets/esri/core/workers/chunks/9ed81757937fe08363ed.js +0 -1
  645. package/assets/esri/core/workers/chunks/9fe07947cf4ec44014e8.js +0 -1
  646. package/assets/esri/core/workers/chunks/a05a2c2aaf0c288f9681.js +0 -1
  647. package/assets/esri/core/workers/chunks/a1d265614d038eb603f7.js +0 -1
  648. package/assets/esri/core/workers/chunks/a3d02885d6962b49eee4.js +0 -1
  649. package/assets/esri/core/workers/chunks/a66d6298236d59a615db.js +0 -1
  650. package/assets/esri/core/workers/chunks/a710c7a0584d9e45a469.js +0 -1
  651. package/assets/esri/core/workers/chunks/ab76170c374fd67ce8cd.js +0 -1
  652. package/assets/esri/core/workers/chunks/ab784764ddf9d7f693a1.js +0 -1
  653. package/assets/esri/core/workers/chunks/ace210d313ce53f3ae10.js +0 -1
  654. package/assets/esri/core/workers/chunks/aebd12488b4004e207a3.js +0 -1
  655. package/assets/esri/core/workers/chunks/b7426e5f290573cb9689.js +0 -1
  656. package/assets/esri/core/workers/chunks/b88e1084097a93a89f61.js +0 -1
  657. package/assets/esri/core/workers/chunks/baa5aa0670b23db86b50.js +0 -1
  658. package/assets/esri/core/workers/chunks/c0867890a84b4c98e0ba.js +0 -1
  659. package/assets/esri/core/workers/chunks/c1a551c4aa77f123d091.js +0 -1
  660. package/assets/esri/core/workers/chunks/c58f859dec9d6675dbd6.js +0 -1
  661. package/assets/esri/core/workers/chunks/c7425fb5e804f0f9d4dd.js +0 -1
  662. package/assets/esri/core/workers/chunks/c7b1c6d57603fa385c54.js +0 -1
  663. package/assets/esri/core/workers/chunks/c85184baccb4004bf42b.js +0 -1
  664. package/assets/esri/core/workers/chunks/ccf4b5fdcdace533bcb7.js +0 -1
  665. package/assets/esri/core/workers/chunks/cd8181600623e18f511c.js +0 -1
  666. package/assets/esri/core/workers/chunks/cef537fa9705dd1cf685.js +0 -1
  667. package/assets/esri/core/workers/chunks/d33403d578fbeecaf844.js +0 -1
  668. package/assets/esri/core/workers/chunks/d5bb6f479c0cdfc21d8a.js +0 -1
  669. package/assets/esri/core/workers/chunks/d689e7c685dd9a444d19.js +0 -1
  670. package/assets/esri/core/workers/chunks/d8b84d21144a58b6b911.js +0 -1
  671. package/assets/esri/core/workers/chunks/d8ffb1502def5c85740b.js +0 -1
  672. package/assets/esri/core/workers/chunks/db96d1d9f6d1a4d7fd2a.js +0 -1
  673. package/assets/esri/core/workers/chunks/ddbfa664e69612295785.js +0 -1
  674. package/assets/esri/core/workers/chunks/de35baceeb815e6befd5.js +0 -1
  675. package/assets/esri/core/workers/chunks/ded81c504bf44806ca7d.js +0 -1
  676. package/assets/esri/core/workers/chunks/e0466387b2ab54d706ca.js +0 -1
  677. package/assets/esri/core/workers/chunks/e164198dbb87ee202ba1.js +0 -1
  678. package/assets/esri/core/workers/chunks/e4eb6fdf5115bed48856.js +0 -1
  679. package/assets/esri/core/workers/chunks/e566102c7ed7a8ebf89e.js +0 -1
  680. package/assets/esri/core/workers/chunks/e59271f8b142a7602b7a.js +0 -1
  681. package/assets/esri/core/workers/chunks/ee70be138831cc2a0f56.js +0 -1
  682. package/assets/esri/core/workers/chunks/eef3fa804e456beac4c1.js +0 -1
  683. package/assets/esri/core/workers/chunks/efd6ea0966f60ab19520.js +0 -1
  684. package/assets/esri/core/workers/chunks/f23c4fd014126ea7abc6.js +0 -1
  685. package/assets/esri/core/workers/chunks/f319b59228b64e7f9008.js +0 -1
  686. package/assets/esri/core/workers/chunks/f42adcea81390fb21c66.js +0 -1
  687. package/assets/esri/core/workers/chunks/f52d081bbde5c95265cf.js +0 -1
  688. package/assets/esri/core/workers/chunks/f6e40f3faf0c80cf1b3a.js +0 -1
  689. package/assets/esri/core/workers/chunks/f7ab4bf14ec8e986ef7c.js +0 -1
  690. package/assets/esri/core/workers/chunks/f92c92c0fd1b5b33ca21.js +0 -1
  691. package/assets/esri/core/workers/chunks/fbd5f3b81cd9f061824d.js +0 -1
  692. package/assets/esri/core/workers/chunks/fdcc5fe4630a4ccf58de.js +0 -1
  693. package/assets/esri/core/workers/chunks/ff0a0819bba5e8264c47.js +0 -1
  694. package/assets/esri/core/workers/chunks/ff225735eba7f9130e19.js +0 -1
  695. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +0 -70
@@ -0,0 +1 @@
1
+ "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[9235],{99235(e,t,r){r.d(t,{vt:()=>Vs,UD:()=>Ds});var s=r(85334),n=r(49186),i=r(4718),o=r(32198),a=r(91429),l=r(94778),u=r(25482);let p=class extends u.o{constructor(){super(...arguments),this.raster=void 0}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"raster",void 0),p=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseFunctionArguments")],p);const c=p;var h;let m=h=class extends c{constructor(){super(...arguments),this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new h({raster:this.raster,raster2:this.raster2,operation:this.operation})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"operation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"raster2",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"rasters",null),m=h=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunctionArguments")],m);const f=m;var g=r(14140),d=r(87186);const y=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let x=class extends u.o{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.rawSourceRasterInfos=null,this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this.isRoot=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){let e=this.getWebGLProcessorDefinition();if(!e)return null;let t=[e],{parameters:r}=e,s=r.rasters||r.raster&&[r.raster];for(;s?.length;){t.unshift(...s);let e=[];for(let t=0;t<s.length;t++){let{parameters:r}=s[t],n=r.rasters||r.raster&&[r.raster];n?.length&&e.push(...n)}s=e}for(let e=t.length-1;e>=0;e--)t[e].isNoopProcess&&t.splice(e,1);let n=!1;for(let e=0;e<t.length;e++){let r=t[e];r.id=t.length-e-1;let{rasters:s}=r.parameters;n||=null!=s&&s.length>1}let i=t.some(({name:e})=>y.has(e.toLowerCase())),{rawSourceRasterInfos:o}=this;return{functions:t,hasBranches:n,hasFocalFunction:i,isSourceSingleBand:1===o?.[0]?.bandCount}}get neighborhoodSize(){let{rows:e,cols:t}=this._getNeighborhoodSize(),r=this.getImmediateChildFunctions();for(let s of r){let r=s.neighborhoodSize;e=Math.max(e,r.rows),t=Math.max(t,r.cols)}return{rows:e,cols:t}}bind(e,t=!1,r=-1){this.id=r+1;let s=this._getRasterValues(),n=!0;for(let r=0;r<s.length;r++){let i=s[r];if(null!=i&&this._isRasterFunctionValue(i)){let s=i.bind(e,t,this.id+r);if(!s.success)return this._bindingResult=s,s;n&&=s.supportsGPU}}return!this.rasterInfo||t?(this.sourceRasterInfos=this._getSourceRasterInfos(e),this._bindingResult=this._bindSourceRasters(),n&&=this._bindingResult.supportsGPU,this._bindingResult.success&&(this._patchRasterInfo(),n&&this.isRoot&&(this.processInputBandIds(),this.swizzleInputBandIds(this.rawInputBandIds)||(n=this.rawInputBandIds.length<=3))),this._bindingResult.supportsGPU=n,this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this._bindingResult)}queryRasterFunction(e){let t=[this];for(;t.length;){let r=t.pop();if(e(r))return r;let s=r.getImmediateChildFunctions();t.push(...s)}}getImmediateChildFunctions(){return this._getRasterValues().filter(e=>e&&"object"==typeof e&&"bind"in e)}process(e,t){let r=this._getRasterValues(),s=0===r.length?e.pixelBlocks??e.primaryPixelBlocks:r.map(r=>this._readRasterValue(r,e,t));return this._processPixels({...e,pixelBlocks:s},t)}processInputBandIds(){let e=this._getRasterValues().filter(this._isRasterFunctionValue);if(e.length>1){let t=e.map(e=>e.processInputBandIds());return this.rawInputBandIds=[...new Set(t.flat())],this.rawInputBandIds}let t=e[0];if(t)return this.rawInputBandIds=t.processInputBandIds(),this.rawInputBandIds;let{bandCount:r}=this.sourceRasterInfos[0],s=Array.from({length:r},(e,t)=>t);return this.rawInputBandIds=this._getInputBandIds(s),this.rawInputBandIds}swizzleInputBandIds(e){let t=this._getRasterValues().filter(this._isRasterFunctionValue),r=!0;for(let s of t)r=s.swizzleInputBandIds(e)&&r;return!!r&&this._swizzleBandIds(e)}getPrimaryRasters(){let e=[],t=[];return this._getPrimaryRasters(this,e,t),{rasters:e,rasterIds:t}}getWebGLProcessorDefinition(){let e=this._getWebGLParameters(),{raster:t,rasters:r}=this.functionArguments;return r&&Array.isArray(r)&&r.length?(e.rasters=r.map(e=>this._isRasterFunctionValue(e)?e.getWebGLProcessorDefinition():"number"==typeof e?{name:"Constant",parameters:{value:e},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:e},pixelType:"f32",id:-1,isNoopProcess:!1}),e.rasters.some(e=>null!=e)||(e.rasters=null)):this._isRasterFunctionValue(t)&&(e.raster=t.getWebGLProcessorDefinition()),{name:this.functionName,parameters:e,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getClippingGeometries(){let e=[];"Clip"===this.functionName&&e.push(this.functionArguments);let{raster:t,rasters:r}=this.functionArguments;if(r&&Array.isArray(r)&&r.length)r.forEach(t=>{if(this._isRasterFunctionValue(t)){let r=t.getClippingGeometries();e.push(...r)}});else if(this._isRasterFunctionValue(t)){let r=t.getClippingGeometries();e.push(...r)}return e}_getOutputPixelType(e){return"unknown"===this.outputPixelType?e:this.outputPixelType??e}_getWebGLParameters(){return{}}_getInputBandIds(e){return e}_swizzleBandIds(e){return!0}_isInputRasterPrimaryOrConstant(){return!this._getRasterValues().some(e=>e&&"object"==typeof e&&"rasterFunction"in e&&e.rasterFunction)}_getNeighborhoodSize(){return{rows:1,cols:1}}_removeStatsHistColormapVAT(e){e.statistics=null,e.histograms=null,e.colormap=null,e.attributeTable=null,e.multidimensionalInfo?.variables.forEach(e=>{e.statistics=void 0,e.histograms=void 0})}_getRasterValues(){let{rasterArgumentNames:e}=this;return"rasters"===e[0]?this.functionArguments.rasters??[]:e.flatMap(e=>this.functionArguments[e])}_getSourceRasterInfos(e){let t=this._getRasterValues(),{rasterInfos:r,rasterIds:s}=e;if(0===t.length)return r;let n=t.map(e=>e&&"object"==typeof e&&"bind"in e&&e.rasterInfo?e.rasterInfo:"string"==typeof e&&s.includes(e)?r[s.indexOf(e)]:"number"!=typeof e?r[0]:void 0),i=n.find(e=>e)??r[0];return n.forEach((e,t)=>{void 0===e&&(n[t]=i)}),n}_getPrimaryRasterId(e){return e?.rasterId}_getPrimaryRasters(e,t=[],r=[]){for(let s=0;s<e.sourceRasters.length;s++){let n=e.sourceRasters[s];if("number"!=typeof n)if("bind"in n)this._getPrimaryRasters(n,t,r);else{let e=n,s=this._getPrimaryRasterId(e);if(null==s)continue;r.includes(s)||(this.mainPrimaryRasterId===s?(t.unshift(e),r.unshift(s)):(t.push(e),r.push(s)))}}}_isRasterFunctionValue(e){return"object"==typeof e&&!!e&&"getWebGLProcessorDefinition"in e}_readRasterValue(e,t,r){let{primaryPixelBlocks:s}=t;if(null==e||"$$"===e){let e=s[0];return null==e?null:e.clone()}if("string"==typeof e){let r=t.primaryRasterIds.indexOf(e);return-1===r?null:s[r]}if("number"==typeof e){let t=s[0];if(null==t)return null;let{width:r,height:n,pixelType:i}=t,o=new Float32Array(r*n);o.fill(e);let a=this.sourceRasterInfos[0].bandCount,l=Array(a).fill(o);return new g.A({width:r,height:n,pixelType:i,pixels:l})}return e.process(t,r)}_patchRasterInfo(){let{rasterInfo:e}=this;if(!e?.keyProperties)return;let{bandCount:t,keyProperties:r,statistics:s,histograms:n}=e,i=r.BandProperties;i&&i.length!==t&&(e.keyProperties={...r,BandProperties:void 0}),s&&s.length!==t&&(e.statistics=s.length>t?s.slice(0,t):null),n&&n.length!==t&&(e.histograms=n.length>t?n.slice(0,t):null),r.BAND_COUNT&&Number(r.BAND_COUNT)!==t&&(e.keyProperties={...r,BAND_COUNT:"string"==typeof r.BAND_COUNT?String(t):t})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}}),(0,a.wg)(e=>e?.toLowerCase())],x.prototype,"outputPixelType",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"mainPrimaryRasterId",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"sourceRasters",void 0),(0,o.Cg)([(0,a.MZ)({type:[d.A],json:{write:!0}})],x.prototype,"sourceRasterInfos",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"rasterInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"readingBufferSize",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"id",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"isNoopProcess",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"supportsGPU",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"rawInputBandIds",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"rawSourceRasterInfos",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"isInputBandIdsSwizzled",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"swizzledBandSelection",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"isBranch",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"isRoot",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"flatWebGLFunctionChain",null),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"neighborhoodSize",null),(0,o.Cg)([(0,a.MZ)()],x.prototype,"_bindingResult",void 0),x=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseRasterFunction")],x);const w=x,A={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},v={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},b={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},C={setNull:50,conditional:78},M={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65,...v,...b,majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75,...C},P=new Map([[b.acos,{domain:[0,Math.PI],isInteger:!1}],[b.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[b.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[b.cos,{domain:[-1,1],isInteger:!1}],[b.sin,{domain:[-1,1],isInteger:!1}],[v.booleanAnd,{domain:[0,1],isInteger:!0}],[v.booleanNot,{domain:[0,1],isInteger:!0}],[v.booleanOr,{domain:[0,1],isInteger:!0}],[v.booleanXOr,{domain:[0,1],isInteger:!0}],[v.equalTo,{domain:[0,1],isInteger:!0}],[v.notEqual,{domain:[0,1],isInteger:!0}],[v.greaterThan,{domain:[0,1],isInteger:!0}],[v.greaterThanEqual,{domain:[0,1],isInteger:!0}],[v.lessThan,{domain:[0,1],isInteger:!0}],[v.lessThanEqual,{domain:[0,1],isInteger:!0}],[v.isNull,{domain:[0,1],isInteger:!0}]]);function T(e){return P.get(e)}const R=[0,2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,2,1,1,1,999,999,1,1,999,1,1,2,999,999,2,2,999,999,999,999,999,999,999,999,999,999,3,999,3];function N(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]+n[e]);return o}function I(e,t,r){let[s]=e,n=s.length,i=g.A.createEmptyBand("f32",n);return i.set(s),i}function k(e,t,r){let[s]=e,n=s.length,i=g.A.createEmptyBand(r,n);for(let e=0;e<n;e++)(!t||t[e])&&(i[e]=s[e]*s[e]);return i}function S(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]-n[e]);return o}function _(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]*n[e]);return o}function F(e,t,r){let[s]=e,n=s.length,i=g.A.createEmptyBand(r,n);for(let e=0;e<n;e++)(!t||t[e])&&(i[e]=Math.sign(s[e])*Math.floor(Math.abs(s[e])));return i}function B(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]/n[e]);return o}function j(e,t,r){return B(e,t,"f32")}function Z(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=Math.floor(s[e]/n[e]));return o}function G(e,t,r,s){let n=e[0],i=n.length,o=g.A.createEmptyBand(r,i);if(s===b.atanh){for(let e=0;e<i;e++)if(t[e]){let r=n[e];Math.abs(r)>=1?t[e]=0:o[e]=Math.atanh(r)}return o}let a=s===b.asin?Math.asin:Math.acos;for(let e=0;e<i;e++)if(t[e]){let r=n[e];Math.abs(r)>1?t[e]=0:o[e]=a(r)}return o}function z(e,t,r,s){let[n]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s(n[e]));return o}function O(e,t,r,s){let[n,i]=e,o=n.length,a=g.A.createEmptyBand(r,o);for(let e=0;e<o;e++)(!t||t[e])&&(a[e]=s(n[e],i[e]));return a}function E(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]&n[e]);return o}function D(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]<<n[e]);return o}function V(e,t,r){let[s]=e,n=s.length,i=g.A.createEmptyBand(r,n);for(let e=0;e<n;e++)(!t||t[e])&&(i[e]=~s[e]);return i}function U(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]|n[e]);return o}function L(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]>>n[e]);return o}function W(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]^n[e]);return o}function K(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]&&n[e]?1:0);return o}function $(e,t,r){let[s]=e,n=s.length,i=g.A.createEmptyBand(r,n);for(let e=0;e<n;e++)(!t||t[e])&&(i[e]=+!s[e]);return i}function H(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]||n[e]?1:0);return o}function q(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+!!s[e]^!!n[e]);return o}function J(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+(s[e]===n[e]));return o}function X(e,t,r,s){let[n]=e,i=n.length,o=g.A.createEmptyBand(r,i),a=s===Math.E;for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=a?Math.exp(n[e]):s**n[e]);return o}function Y(e,t,r){return X(e,t,r,10)}function Q(e,t,r){return X(e,t,r,2)}function ee(e,t,r){return X(e,t,r,Math.E)}function te(e,t,r,s){let[n]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(n[e]<=0?t[e]=0:o[e]=s(n[e]));return o}function re(e,t,r){return te(e,t,r,Math.log10)}function se(e,t,r){return te(e,t,r,Math.log2)}function ne(e,t,r){return te(e,t,r,Math.log)}function ie(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+(s[e]>n[e]));return o}function oe(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+(s[e]>=n[e]));return o}function ae(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+(s[e]<n[e]));return o}function le(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+(s[e]<=n[e]));return o}function ue(e,t,r){let[s]=e,n=s.length,i=g.A.createEmptyBand(r,n);if(!t)return i;for(let e=0;e<n;e++)i[e]=+!t[e];return i}function pe(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]%n[e]);return o}function ce(e,t,r){let[s]=e,n=s.length,i=g.A.createEmptyBand(r,n);for(let e=0;e<n;e++)(!t||t[e])&&(i[e]=-s[e]);return i}function he(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]===n[e]?0:1);return o}function me(e,t,r){let[s,n]=e,i=s.length,o=g.A.createEmptyBand(r,i),a=new Uint8Array(i);for(let e=0;e<i;e++)(null==t||t[e])&&0===s[e]&&(o[e]=n[e],a[e]=255);return{band:o,mask:a}}function fe(e,t,r){let[s,n,i]=e,o=s.length,a=g.A.createEmptyBand(r,o);for(let e=0;e<o;e++)(!t||t[e])&&(a[e]=s[e]?n[e]:i[e]);return a}function ge(e,t,r){let s=e.length;if(s<2)return e[0];let[n]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r]){let t=n[r];for(let n=1;n<s;n++){let s=e[n][r];t<s&&(t=s)}o[r]=t}return o}function de(e,t,r){let s=e.length;if(s<2)return e[0];let[n]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r]){let t=n[r];for(let n=1;n<s;n++){let s=e[n][r];t>s&&(t=s)}o[r]=t}return o}function ye(e,t,r){let s=e.length;if(s<2)return e[0];let[n]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r]){let t=n[r],i=t;for(let n=1;n<s;n++){let s=e[n][r];i<s?i=s:t>s&&(t=s)}o[r]=i-t}return o}function xe(e,t,r){let s=e.length;if(s<2)return e[0];let[n]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r]){let t=0;for(let n=0;n<s;n++)t+=e[n][r];o[r]=t/s}return o}function we(e,t,r){let s=e.length;if(s<2)return e[0];let[n]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r])for(let t=0;t<s;t++){let s=e[t];o[r]+=s[r]}return o}function Ae(e,t,r){let s=e.length;if(s<2)return e[0];let[n]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r]){let t=new Float32Array(s),n=0;for(let i=0;i<s;i++){let s=e[i];n+=s[r],t[i]=s[r]}n/=s;let i=0;for(let e=0;e<s;e++)i+=(t[e]-n)**2;o[r]=Math.sqrt(i/s)}return o}function ve(e,t,r){let s=e.length;if(s<2)return e[0];let n=Math.floor(s/2),[i]=e,o=i.length,a=g.A.createEmptyBand(r,o),l=new Float32Array(s),u=s%2==1;for(let r=0;r<o;r++)if(!t||t[r]){for(let t=0;t<s;t++)l[t]=e[t][r];l.sort(),a[r]=u?l[n]:(l[n]+l[n-1])/2}return a}function be(e,t,r){let[s,n]=e;if(null==n)return s;let i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=s[e]<n[e]?s[e]:n[e]);return o}function Ce(e,t,r){let s=e.length;if(s<=2)return be(e,t,r);let n=e[0].length,i=g.A.createEmptyBand(r,n),o=new Map;for(let r=0;r<n;r++)if(!t||t[r]){o.clear();for(let t=0;t<s;t++){let s=e[t][r];o.set(s,o.has(s)?o.get(s)+1:1)}let t=0,n=0,a=[];for(let e of o.keys())t=o.get(e),t>n?(n=t,a.length=0,a.push(e)):t===n&&a.push(e);a.length>1&&a.sort((e,t)=>e-t),i[r]=a[0]}return i}function Me(e,t,r){let s=e.length;if(s<=2)return be(e,t,r);let n=e[0].length,i=g.A.createEmptyBand(r,n),o=new Map;for(let r=0;r<n;r++)if(!t||t[r]){o.clear();for(let t=0;t<s;t++){let s=e[t][r];o.set(s,o.has(s)?o.get(s)+1:1)}let t=0,n=e.length,a=[];for(let e of o.keys())t=o.get(e),t<n?(n=t,a.length=0,a.push(e)):t===n&&a.push(e);a.length>1&&a.sort((e,t)=>e-t),i[r]=a[0]}return i}function Pe(e,t,r){let s=e.length;if(s<2)return e[0];let[n]=e,i=n.length,o=g.A.createEmptyBand(r,i),a=new Set;for(let r=0;r<i;r++)if(!t||t[r]){let t;a.clear();for(let n=0;n<s;n++)t=e[n][r],a.add(t);o[r]=a.size}return o}const Te=new Map,Re=new Map,Ne=new Map,Ie=new Map;function ke(){Te.size||(Te.set(4,Math.sqrt),Te.set(6,Math.acos),Te.set(7,Math.asin),Te.set(8,Math.atan),Te.set(9,Math.atanh),Te.set(10,Math.abs),Te.set(21,Math.cos),Te.set(22,Math.cosh),Te.set(48,Math.floor),Te.set(49,Math.ceil),Te.set(51,Math.sin),Te.set(52,Math.sinh),Te.set(56,Math.tan),Te.set(57,Math.tanh),Te.set(59,Math.acosh),Te.set(60,Math.asinh),Te.set(65,Math.floor),Re.set(5,Math.pow),Re.set(61,Math.atan2),Ne.set(1,N),Ne.set(2,S),Ne.set(3,_),Ne.set(11,E),Ne.set(12,D),Ne.set(13,V),Ne.set(14,U),Ne.set(15,L),Ne.set(16,W),Ne.set(17,K),Ne.set(18,$),Ne.set(19,H),Ne.set(20,q),Ne.set(23,B),Ne.set(24,J),Ne.set(25,ee),Ne.set(26,Y),Ne.set(27,Q),Ne.set(28,ie),Ne.set(29,oe),Ne.set(30,F),Ne.set(31,ue),Ne.set(32,I),Ne.set(33,ae),Ne.set(34,le),Ne.set(35,ne),Ne.set(36,re),Ne.set(37,se),Ne.set(44,pe),Ne.set(45,ce),Ne.set(46,he),Ne.set(53,k),Ne.set(64,j),Ne.set(65,Z),Ne.set(76,fe),Ne.set(78,fe),Ie.set(38,Ce),Ie.set(39,ge),Ie.set(40,xe),Ie.set(41,ve),Ie.set(42,de),Ie.set(43,Me),Ie.set(47,ye),Ie.set(54,Ae),Ie.set(55,we),Ie.set(58,Pe),Ie.set(66,Ce),Ie.set(67,ge),Ie.set(68,xe),Ie.set(69,ve),Ie.set(70,de),Ie.set(71,Me),Ie.set(72,ye),Ie.set(73,Ae),Ie.set(74,we),Ie.set(75,Pe))}function Se(e,t,r={}){ke();let s=function(e,t=!1){let r=e.map(e=>e.mask),s=r.filter(e=>null!=e),n=e[0].pixels[0].length;if(0===s.length||t&&s.length!==r.length)return new Uint8Array(n).fill(255);let i=s[0],o=new Uint8Array(i);if(1===s.length)return o;if(!t){for(let e=1;e<s.length;e++){let t=s[e];for(let e=0;e<o.length;e++)o[e]&&(o[e]=t[e]?255:0)}return o}for(let e=1;e<s.length;e++){let t=s[e];for(let e=0;e<o.length;e++)0===o[e]&&(o[e]=t[e]?255:0)}return o}(e,t>=66&&t<=75),{outputPixelType:n="f32"}=r,i=!Ie.has(t)||r.processAsMultiband,o=i?e[0].pixels.length:1,a=[];for(let r=0;r<o;r++){let o,u=Ie.has(t)&&!i?e.flatMap(e=>e.pixels):e.map(e=>e.pixels[r]),p=!0;if(t===C.setNull){let e=me(u,s,n);o=e.band,s=e.mask,p=!1}else Ne.has(t)?o=Ne.get(t)(u,s,"f64"):Te.has(t)?o=t===b.asin||t===b.acos||t===b.atanh?G(u,s,"f64",t):z(u,s,"f64",Te.get(t)):Re.has(t)?o=O(u,s,"f64",Re.get(t)):Ie.has(t)?o=Ie.get(t)(u,s,"f64"):(o=u[0],p=!1);if(p&&t!==v.isNull&&!P.has(t)){let e=g.A.createEmptyBand(n,o.length);s||=new Uint8Array(o.length).fill(255),(0,l.$p)(o,s),(0,l.yM)(o,s,n,e),o=e}a.push(o)}let u=e[0];return new g.A({width:u.width,height:u.height,pixelType:n,mask:t===v.isNull?null:s,pixels:a})}let _e=class extends w{constructor(){super(...arguments),this.functionName="Arithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){let{operation:e}=this.functionArguments;if(e<1||e>6)return{success:!1,supportsGPU:!1,error:"unsupported operation"};let t=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,{success:!0,supportsGPU:t.bandCount<=3}}_processPixels(e){let{pixelBlocks:t}=e;return null==t?.[0]||null==t?.[1]?null:function(e,t,r){return Se(e,t=[null,1,2,3,23,5,44][t]??1,{outputPixelType:r})}(t,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){let{operation:e}=this.functionArguments,t=["","plus","minus","times","divide","power","mod"][e],r=this.outputPixelType??"f32",[s,n]=(0,l.hP)(r),i=(0,l.zw)(r);return i&&(s-=1e-4,n+=1e-4),{imageCount:2,operationName:t,domainRange:[s,n],isOutputRounded:i}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],_e.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:f,json:{write:!0,name:"rasterFunctionArguments"}})],_e.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],_e.prototype,"rasterArgumentNames",void 0),_e=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunction")],_e);const Fe=_e;var Be;let je=Be=class extends c{clone(){return new Be({raster:this.raster})}};je=Be=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunctionArguments")],je);const Ze=je;var Ge=r(51181);let ze=class extends w{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let e=this.sourceRasterInfos[0];this.isGCS=e.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");let t=e.clone();return t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),t.statistics=[{min:-1,max:360,avg:180,stddev:30}],t.bandCount=1,this.rasterInfo=t,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{extent:r,primaryPixelSizes:s}=e,n=s?.[0]??(r?{x:r.width/t.width,y:r.height/t.height}:{x:1,y:1});return(0,Ge.di)(t,{resolution:n})}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ze.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ze,json:{write:!0,name:"rasterFunctionArguments"}})],ze.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],ze.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ze.prototype,"isGCS",void 0),ze=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunction")],ze);const Oe=ze;var Ee=r(66552);const De=new Set(["+","-","*","/","(",")"]);function Ve(e,t){return e.toLowerCase().startsWith("b")?t[parseInt(e.slice(1),10)-1]:parseFloat(e)}function Ue(e,t,r,s){if("number"==typeof r&&"number"==typeof s)return r+s;let n,i,o;"number"==typeof r?(o=s,n=o.length,i=new Float32Array(n),i.fill(r)):(n=r.length,i=r,s.constructor===Number?(o=new Float32Array(n),o.fill(s)):o=s);let a=new Float32Array(n);switch(t){case"+":for(let t=0;t<n;t++)(null==e||e[t])&&(a[t]=i[t]+o[t]);break;case"-":for(let t=0;t<n;t++)(null==e||e[t])&&(a[t]=i[t]-o[t]);break;case"*":for(let t=0;t<n;t++)(null==e||e[t])&&(a[t]=i[t]*o[t]);break;case"/":for(let t=0;t<n;t++)(null==e||e[t])&&o[t]&&(a[t]=i[t]/o[t]);break;case"(":case")":throw Error("encountered error with custom band index equation")}return a}function Le(e,t){e.splice(t,1);let r=0,s=0;do{r=0,s=0;for(let t=0;t<e.length;t++)if("("===e[t])r=t;else if(")"===e[t]){s=t;break}s===r+1&&e.splice(r,2)}while(s===r+1);return e}function We(e){if(1===e.length)return{opIndex:0,numIndex:0};let t=0,r=0;for(let s=0;s<e.length;s++)if("("===e[s])t=s;else if(")"===e[s]){r=s;break}let s=0===r?e:e.slice(t+1,r),n=-1;for(let e=0;e<s.length;e++)if("*"===s[e]||"/"===s[e]){n=e;break}if(n>-1)r>0&&(n+=t+1);else{for(let e=0;e<s.length;e++)if("+"===s[e]||"-"===s[e]){n=e;break}r>0&&(n+=t+1)}let i=0;for(let t=0;t<n;t++)"("===e[t]&&i++;return{opIndex:n,numIndex:n-i}}var Ke=r(47520);const $e=new Ee.J({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function He(e,t){if(!(0,Ke.AB)(e))return e;let r,{equation:s,method:n}=t,i=t.bandIndexes.map(e=>e-1),{pixels:o,mask:a}=e;switch(n){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":r=Je(a,o[i[0]],o[i[1]]);break;case"ndwi":r=Je(a,o[i[1]],o[i[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":r=function(e,t,r){let s=r.length,n=new Float32Array(s);for(let i=0;i<s;i++)if(null==e||e[i]){let e=t[i],s=r[i];s&&(n[i]=e/s)}return[n]}(a,o[i[0]],o[i[1]]);break;case"ci-g":case"ci-re":r=function(e,t,r){let s=t.length,n=new Float32Array(s);for(let i=0;i<s;i++)if(null==e||e[i]){let e=t[i],s=r[i];s&&(n[i]=e/s-1)}return[n]}(a,o[i[0]],o[i[1]]);break;case"savi":r=function(e,t,r,s){let n=r.length,i=new Float32Array(n);for(let o=0;o<n;o++)if(null==e||e[o]){let e=r[o],n=t[o],a=n+e+s;a&&(i[o]=(n-e)/a*(1+s))}return[i]}(a,o[i[0]],o[i[1]],i[2]+1);break;case"tsavi":r=function(e,t,r,s,n,i){let o=r.length,a=new Float32Array(o),l=-n*s+i*(1+s*s);for(let i=0;i<o;i++)if(null==e||e[i]){let e=r[i],o=t[i],u=n*o+e+l;u&&(a[i]=s*(o-s*e-n)/u)}return[a]}(a,o[i[0]],o[i[1]],i[2]+1,i[3]+1,i[4]+1);break;case"msavi":r=function(e,t,r){let s=r.length,n=new Float32Array(s);for(let i=0;i<s;i++)if(null==e||e[i]){let e=r[i],s=t[i],o=2*s+1;n[i]=.5*(o-Math.sqrt(o*o-8*(s-e)))}return[n]}(a,o[i[0]],o[i[1]]);break;case"gemi":r=function(e,t,r){let s=r.length,n=new Float32Array(s);for(let i=0;i<s;i++)if(null==e||e[i]){let e=r[i],s=t[i];if(1!==e&&s+e+.5!==0){let t=(2*(s*s-e*e)+1.5*s+.5*e)/(s+e+.5);n[i]=t*(1-.25*t)-(e-.125)/(1-e)}}return[n]}(a,o[i[0]],o[i[1]]);break;case"pvi":r=function(e,t,r,s,n){let i=r.length,o=new Float32Array(i),a=1/Math.sqrt(1+s*s);for(let l=0;l<i;l++)if(null==e||e[l]){let e=r[l],i=t[l];o[l]=(i-s*e-n)*a}return[o]}(a,o[i[0]],o[i[1]],i[2]+1,i[3]+1);break;case"gvitm":r=function(e,t){let[r,s,n,i,o,a]=t,l=r.length,u=new Float32Array(l);for(let t=0;t<l;t++)(null==e||e[t])&&(u[t]=-.2848*r[t]-.2435*s[t]-.5436*n[t]+.7243*i[t]+.084*o[t]-.18*a[t]);return[u]}(a,[o[i[0]],o[i[1]],o[i[2]],o[i[3]],o[i[4]],o[i[5]]]);break;case"sultan":r=function(e,t){let[r,s,n,i,o]=t,a=r.length,l=new Float32Array(a),u=new Float32Array(a),p=new Float32Array(a);for(let t=0;t<a;t++)(null==e||e[t])&&(l[t]=o[t]?i[t]/o[t]*100:0,u[t]=r[t]?i[t]/r[t]*100:0,p[t]=n[t]?s[t]/n[t]*(i[t]/n[t])*100:0);return[l,u,p]}(a,[o[i[0]],o[i[1]],o[i[2]],o[i[3]],o[i[4]]]);break;case"vari":r=function(e,t){let[r,s,n]=t,i=r.length,o=new Float32Array(i);for(let t=0;t<i;t++)if(null==e||e[t])for(t=0;t<i;t++){let e=r[t],i=s[t],a=i+e-n[t];a&&(o[t]=(i-e)/a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"mtvi2":r=function(e,t){let[r,s,n]=t,i=r.length,o=new Float32Array(i);for(let t=0;t<i;t++)if(null==e||e[t])for(t=0;t<i;t++){let e=r[t],i=s[t],a=n[t],l=Math.sqrt((2*e+1)**2-(6*e-5*Math.sqrt(i))-.5);if(l){let r=1.5*(1.2*(e-a)-2.5*(i-a));o[t]=r/l}}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"rtvi-core":r=function(e,t){let[r,s,n]=t,i=r.length,o=new Float32Array(i);for(let t=0;t<i;t++)if(null==e||e[t])for(t=0;t<i;t++){let e=r[t],i=s[t],a=n[t];o[t]=100*(e-i)-10*(e-a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"evi":r=function(e,t){let[r,s,n]=t,i=r.length,o=new Float32Array(i);for(let t=0;t<i;t++)if(null==e||e[t])for(t=0;t<i;t++){let e=r[t],i=s[t],a=e+6*i-7.5*n[t]+1;a&&(o[t]=2.5*(e-i)/a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"wndwi":r=function(e,t,r=.5){let[s,n,i]=t,o=n.length,a=new Float32Array(o);for(let t=0;t<o;t++)if(null==e||e[t])for(t=0;t<o;t++){let e=s[t],o=n[t],l=i[t],u=e+r*o+(1-r)*l;u&&(a[t]=(e-r*o-(1-r)*l)/u)}return[a]}(a,[o[i[0]],o[i[1]],o[i[2]]],i[3]?i[3]+1:.5);break;case"bai":r=function(e,t,r){let s=r.length,n=new Float32Array(s);for(let i=0;i<s;i++)if(null==e||e[i])for(i=0;i<s;i++){let e=(.1-t[i])**2+(.06-r[i])**2;e&&(n[i]=1/e)}return[n]}(a,o[i[0]],o[i[1]]);break;case"custom":r=function(e,t,r){let s,{ops:n,nums:i}=function(e,t){(e=e.replaceAll(" ","")).startsWith("-")&&(e="0"+e),e.startsWith("+")&&(e=e.slice(1));let r=e.split(""),s=[],n=[],i="";for(let e=0;e<r.length;e++){let o=r[e];De.has(o)?(i.length&&n.push(Ve(i,t)),s.push(o),i=""):i=i.concat(o)}return i.length&&n.push(Ve(i,t)),{ops:s,nums:n}}(r,t);if(0===n.length){let e=1===i.length?i[0]:t[0];if(e instanceof Float32Array)return[e];let r=new Float32Array(t[0].length);return"number"==typeof e?r.fill(e):r.set(e),[r]}for(;n.length>0;){let{numIndex:t,opIndex:r}=We(n);if(s=Ue(e,n[r],i[t],i[t+1]),1===n.length)break;n=Le(n,r),i.splice(t,2,s)}return[s]}(a,o,s);break;default:return e}let u,{outputPixelType:p="f32"}=t,c=null!=p&&(0,l.zw)(p);a?(u=new Uint8Array(e.width*e.height),u.set(a)):c&&(u=new Uint8Array(e.width*e.height).fill(255)),c&&(r=r.map(e=>{let t=g.A.createEmptyBand(p,e.length);return(0,l.yM)(e,u,p,t),t}));let h=new g.A({width:e.width,height:e.height,pixelType:p,pixels:r,mask:u});return h.updateStatistics(),h}function qe(e){let t=new Float32Array(9);return t[3*e[0]]=1,t[3*e[1]+1]=1,t[3*e[2]+2]=1,t}function Je(e,t,r){let s=r.length,n=new Float32Array(s);for(let i=0;i<s;i++)if(null==e||e[i]){let e=t[i],s=r[i],o=e+s;o&&(n[i]=(e-s)/o)}return[n]}var Xe,Ye=r(93223);let Qe=Xe=class extends c{constructor(){super(...arguments),this.method="custom"}clone(){return new Xe({method:this.method,bandIndexes:this.bandIndexes,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{type:String,write:!0}})],Qe.prototype,"bandIndexes",void 0),(0,o.Cg)([(0,Ye.e)($e)],Qe.prototype,"method",void 0),Qe=Xe=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunctionArguments")],Qe);const et=Qe,tt=new Set(["vari","mtvi2","rtvi-core","evi"]);let rt=class extends w{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let e=this.sourceRasterInfos[0];if(e.bandCount<2)return{success:!1,supportsGPU:!1,error:"band-arithmetic-function: source raster has insufficient amount of raster bands"};let t=e.clone();return t.pixelType=this.outputPixelType,t.bandCount="sultan"===this.functionArguments.method?3:1,this._removeStatsHistColormapVAT(t),t.keyProperties={...t.keyProperties,BandProperties:void 0},this.rasterInfo=t,{success:!0,supportsGPU:!["custom","gvitm","sultan"].includes(this.functionArguments.method)}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return t;let{method:r,bandIndexes:s}=this.functionArguments,n=s.split(" ").map(e=>parseFloat(e));if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:e}=this,t=tt.has(this.functionArguments.method)?3:2,r=n.slice(0,t).map(t=>e.indexOf(t-1));n.splice(0,t,...r)}return He(t,{method:r,bandIndexes:n,equation:s,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let e=this.functionArguments.bandIndexes.split(" ").map(e=>parseFloat(e)-1);2===e.length&&e.push(0);let t,r,s=this.isInputBandIdsSwizzled?[0,1,2]:e,n=new Float32Array(3),{method:i}=this.functionArguments;switch(i){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":t=qe([s[0],s[1],0]),r="ndxi";break;case"ndwi":t=qe([s[1],s[0],0]),r="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":t=qe([s[0],s[1],0]),r="sr";break;case"ci-g":case"ci-re":t=qe([s[0],s[1],0]),r="ci";break;case"savi":t=qe([s[0],s[1],0]),r="savi",n[0]=e[2]+1;break;case"tsavi":t=qe([s[0],s[1],0]),r="tsavi",n[0]=e[2]+1,n[1]=e[3]+1,n[2]=e[4]+1;break;case"msavi":t=qe([s[0],s[1],0]),r="msavi";break;case"gemi":t=qe([s[0],s[1],0]),r="gemi";break;case"pvi":t=qe([s[0],s[1],0]),r="tsavi",n[0]=e[2]+1,n[1]=e[3]+1;break;case"vari":t=qe([s[0],s[1],s[2]]),r="vari";break;case"mtvi2":t=qe([s[0],s[1],s[2]]),r="mtvi";break;case"rtvi-core":t=qe([s[0],s[1],s[2]]),r="rtvicore";break;case"evi":t=qe([s[0],s[1],s[2]]),r="evi";break;case"wndwi":t=qe([s[0],s[1],0]),r="wndwi",n[0]=e[3]?e[3]+1:.5;break;case"bai":t=qe([s[1],s[0],0]),r="bai";break;default:t=qe([0,1,2]),r="custom"}return{bandIndexMat3:t,indexType:r,adjustments:n,isOutputRounded:(0,l.zw)(this.outputPixelType)}}_getInputBandIds(e){if("custom"===this.functionArguments.method)return e;let t=this.functionArguments.bandIndexes.split(" ").map(e=>parseFloat(e)-1),r=e.length,s=t.map(e=>e>=r?r-1:e),n=tt.has(this.functionArguments.method)?3:2,i=s.slice(0,n).map(t=>e[t]);return 2===i.length&&i.push(0),i}_swizzleBandIds(e){let t=this.functionArguments.bandIndexes.split(" ").map(e=>parseFloat(e)-1);2===t.length&&t.push(0);let{method:r}=this.functionArguments,s=(["vari","mtvi2","rtvi-core","evi"].includes(r)?t.slice(0,3):"bai"===r||"ndwi"===r?[t[1],t[0]]:t.slice(0,2)).map(t=>e.indexOf(t));return s[2]??=s[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=s,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],rt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:et,json:{write:!0,name:"rasterFunctionArguments"}})],rt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],rt.prototype,"rasterArgumentNames",void 0),rt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunction")],rt);const st=rt;var nt,it=r(65864),ot=r(50498);const at=new Ee.J({1:"outside",2:"inside"},{useNumericKeys:!0});let lt=nt=class extends c{constructor(){super(...arguments),this.clippingType="outside"}clone(){return new nt({clippingGeometry:this.clippingGeometry.clone(),clippingType:this.clippingType})}};(0,o.Cg)([(0,a.MZ)({types:ot.yR,json:{read:it.rS,write:!0}})],lt.prototype,"clippingGeometry",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:at.read,write:at.write}})],lt.prototype,"clippingType",void 0),lt=nt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunctionArguments")],lt);const ut=lt;var pt=r(34930),ct=r(37373);let ht=class extends w{constructor(){super(...arguments),this.functionName="Clip",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this.rasterInfo=e;let{functionArguments:t}=this,{clippingGeometry:r,clippingType:s}=t;if(!r)return{success:!1,supportsGPU:!1,error:"missing clipping geometry"};if("outside"===s)try{let{spatialReference:t}=e,s="extent"===r.type?(0,ct._l)(r,t):(0,ct.uk)(r,t).extent;s&&(0,pt.Sd)(e,s)}catch{}return{success:!0,supportsGPU:!0}}_processPixels(e){return e.pixelBlocks?.[0]}_getWebGLParameters(){let{clippingGeometry:e,clippingType:t}=this.functionArguments;return{clippingGeometry:e.toJSON(),clippingType:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ht.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ut,json:{write:!0,name:"rasterFunctionArguments"}})],ht.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],ht.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],ht.prototype,"isNoopProcess",void 0),ht=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunction")],ht);const mt=ht;var ft,gt=r(67369),dt=r(95349),yt=r(36005);let xt=ft=class extends c{castColormapName(e){if(!e)return null;let t=e.toLowerCase();return gt.L7.includes(t)?t:null}readColorRamp(e){return(0,dt.r)(e)}readColorRampName(e,t){if(!e)return null;let r=gt.kH.jsonValues.find(t=>t.toLowerCase()===e.toLowerCase());return r?gt.kH.fromJSON(r):null}clone(){return new ft({colormap:(0,i.o8)(this.colormap),colormapName:this.colormapName,colorRamp:this.colorRamp?.clone(),colorRampName:this.colorRampName})}};(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],xt.prototype,"colormap",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],xt.prototype,"colormapName",void 0),(0,o.Cg)([(0,a.wg)("colormapName")],xt.prototype,"castColormapName",null),(0,o.Cg)([(0,a.MZ)({types:dt.g,json:{write:!0}})],xt.prototype,"colorRamp",void 0),(0,o.Cg)([(0,yt.w)("colorRamp")],xt.prototype,"readColorRamp",null),(0,o.Cg)([(0,a.MZ)({type:gt.kH.apiValues,json:{type:gt.kH.jsonValues,write:gt.kH.write}})],xt.prototype,"colorRampName",void 0),(0,o.Cg)([(0,yt.w)("colorRampName")],xt.prototype,"readColorRampName",null),xt=ft=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunctionArguments")],xt);const wt=xt,At=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[112,75,3],[113,76,3],[114,77,3],[115,77,3],[116,78,3],[117,79,3],[118,79,3],[119,80,3],[121,81,4],[122,82,4],[123,82,4],[124,83,4],[125,84,4],[126,84,4],[127,85,4],[128,86,4],[129,86,4],[130,87,4],[131,88,4],[132,89,4],[133,89,4],[134,90,4],[135,91,4],[136,91,4],[137,92,4],[138,93,4],[139,94,4],[140,94,4],[142,95,5],[143,96,5],[144,96,5],[145,97,5],[146,98,5],[147,99,5],[148,99,5],[149,100,5],[150,101,5],[151,101,5],[152,102,5],[153,103,5],[154,104,5],[155,104,5],[156,105,5],[157,106,5],[158,106,5],[159,107,5],[160,108,5],[161,108,5],[162,109,5],[164,110,6],[165,111,6],[166,111,6],[167,112,6],[168,113,6],[169,113,6],[170,114,6],[171,115,6],[172,116,6],[173,116,6],[174,117,6],[245,0,0],[245,5,0],[245,10,0],[246,15,0],[246,20,0],[246,25,0],[246,30,0],[247,35,0],[247,40,0],[247,45,0],[247,50,0],[247,55,0],[248,60,0],[248,65,0],[248,70,0],[248,75,0],[249,81,0],[249,86,0],[249,91,0],[249,96,0],[250,101,0],[250,106,0],[250,111,0],[250,116,0],[250,121,0],[251,126,0],[251,131,0],[251,136,0],[251,141,0],[252,146,0],[252,151,0],[252,156,0],[252,156,0],[251,159,0],[250,162,0],[249,165,0],[248,168,0],[247,171,0],[246,174,0],[245,177,0],[245,179,0],[244,182,0],[243,185,0],[242,188,0],[241,191,0],[240,194,0],[239,197,0],[238,200,0],[237,203,0],[236,206,0],[235,209,0],[234,212,0],[233,215,0],[232,218,0],[231,221,0],[230,224,0],[230,226,0],[229,229,0],[228,232,0],[227,235,0],[226,238,0],[225,241,0],[224,244,0],[223,247,0],[165,247,0],[163,244,0],[161,240,0],[158,237,0],[156,233,1],[154,230,1],[152,227,1],[149,223,1],[147,220,1],[145,216,1],[143,213,1],[140,210,2],[138,206,2],[136,203,2],[134,200,2],[132,196,2],[129,193,2],[127,189,2],[125,186,3],[123,183,3],[120,179,3],[118,176,3],[116,172,3],[114,169,3],[111,166,3],[109,162,4],[107,159,4],[105,155,4],[103,152,4],[100,149,4],[98,145,4],[96,142,4],[94,138,5],[91,135,5],[89,132,5],[87,128,5],[85,125,5],[82,121,5],[80,118,5],[78,115,6],[76,111,6],[73,108,6],[71,105,6],[69,101,6],[67,98,6],[65,94,6],[62,91,7],[60,88,7],[58,84,7],[56,81,7],[53,77,7],[51,74,7],[49,71,7],[47,67,8],[44,64,8],[42,60,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8]],vt=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[245,20,0],[245,24,0],[245,29,0],[245,31,0],[247,33,0],[247,33,0],[247,37,0],[247,41,0],[247,41,0],[247,41,0],[247,45,0],[247,45,0],[247,47,0],[247,49,0],[247,49,0],[247,54,0],[247,54,0],[247,56,0],[247,58,0],[247,58,0],[250,62,0],[250,62,0],[250,62,0],[250,67,0],[250,67,0],[250,67,0],[250,69,0],[250,71,0],[250,71,0],[250,75,0],[250,75,0],[250,78,0],[250,79,0],[250,79,0],[250,79,0],[250,81,0],[250,83,0],[250,83,0],[250,87,0],[250,87,0],[250,90,0],[250,92,0],[252,93,0],[252,93,0],[252,97,0],[252,97,0],[252,97,0],[252,97,0],[252,101,0],[252,101,0],[252,101,0],[252,101,0],[252,105,0],[252,105,0],[252,107,0],[252,109,0],[252,109,0],[252,113,13],[255,118,20],[255,119,23],[255,121,25],[255,126,33],[255,132,38],[255,133,40],[255,135,43],[255,141,48],[255,144,54],[255,150,59],[255,152,61],[255,153,64],[255,159,69],[255,163,77],[255,165,79],[255,168,82],[255,174,87],[255,176,92],[255,181,97],[255,183,99],[255,186,102],[255,191,107],[255,197,115],[255,201,120],[255,203,123],[255,205,125],[255,209,130],[255,214,138],[255,216,141],[255,218,143],[255,224,150],[255,228,156],[255,234,163],[255,236,165],[255,238,168],[255,243,173],[255,248,181],[255,252,186],[253,252,186],[250,252,187],[244,250,180],[238,247,176],[234,246,173],[231,245,169],[223,240,163],[217,237,157],[211,235,150],[205,233,146],[200,230,142],[195,227,136],[189,224,132],[184,222,126],[180,220,123],[174,217,119],[169,214,114],[163,212,108],[160,210,105],[154,207,101],[148,204,96],[143,201,93],[138,199,88],[134,197,84],[130,194,81],[126,191,77],[117,189,70],[115,186,68],[112,184,64],[106,181,60],[100,179,55],[94,176,49],[92,174,47],[90,173,45],[81,168,37],[75,166,33],[71,163,28],[66,160,24],[62,158,21],[56,156,14],[51,153,0],[51,153,0],[51,153,0],[50,150,0],[50,150,0],[50,150,0],[50,150,0],[49,148,0],[49,148,0],[49,148,0],[48,145,0],[48,145,0],[48,145,0],[48,145,0],[48,143,0],[48,143,0],[48,143,0],[48,143,0],[47,140,0],[47,140,0],[47,140,0],[47,140,0],[46,138,0],[46,138,0],[46,138,0],[46,138,0],[45,135,0],[45,135,0],[45,135,0],[45,135,0],[44,133,0],[44,133,0],[44,133,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[42,128,0],[42,128,0],[42,128,0],[42,125,0],[42,125,0],[42,125,0],[42,125,0],[41,122,0],[41,122,0],[41,122,0],[41,122,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[39,117,0],[39,117,0],[39,117,0],[39,117,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0]];function bt(e,t){let r=[],s=[];for(let t=0;t<e.length-1;t++)r.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:e[t].slice(1),toColor:e[t+1].slice(1)}),s.push(e[t+1][0]-e[t][0]);let n=e[e.length-1][0];return t??=s,(0,gt.iv)({type:"multipart",colorRamps:r},{numColors:n,weights:t})}let Ct=class extends w{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let e=this.sourceRasterInfos[0];if(e.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:t,colormapName:r,colorRamp:s,colorRampName:n}=this.functionArguments;if(!t?.length)if(s)this.colorRamp=s,t=(0,gt.R8)(s,{interpolateAlpha:!0});else if(n){let e=(0,gt.M5)(n);e&&(t=(0,gt.R8)(e),this.colorRamp=(0,dt.r)(e))}else r&&(t=function(e){let t;switch(e){case"elevation":t=bt([[0,0,191,191],[51,0,0,255],[102,255,0,255],[153,255,0,127],[204,191,63,127],[256,20,20,20]]);break;case"gray":t=(0,gt.iv)({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:[0,0,0],toColor:[255,255,255]});break;case"hillshade":t=bt([[0,38,41,54],[69,79,82,90],[131,156,156,156],[256,253,253,241]],[.268,.238,.495]);break;case"ndvi":t=At;break;case"ndvi2":t=function(){let e=bt([[0,255,255,255],[70,0,255,0],[80,205,173,193],[100,150,150,150],[110,120,51,100],[130,120,100,200],[140,28,3,144],[160,6,0,55],[180,10,25,30],[201,6,7,27]]);for(let t=e.length;t<256;t++)e.push([6,27,7]);return e}();break;case"ndvi3":t=vt;break;case"random":t=function(){let e=[];for(let t=0;t<256;t++){let t=[];for(let e=0;e<3;e++)t.push(Math.round(255*Math.random()));e.push(t)}return e}()}return t?t=t.map((e,t)=>[t,...e]):null}(r));if(!t?.length)return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};let i=this._getOutputPixelType(e.pixelType);this.outputPixelType=i.startsWith("f")?"s32":i;let o=e.clone();return o.pixelType=this.outputPixelType,o.colormap=t,o.bandCount=1,this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];return!t||(0,l.zw)(t.pixelType)||(t=t.clone(),t.clamp(this.outputPixelType)),t}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ct.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:wt,json:{write:!0,name:"rasterFunctionArguments"}})],Ct.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Ct.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],Ct.prototype,"isNoopProcess",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ct.prototype,"indexedColormap",void 0),(0,o.Cg)([(0,a.MZ)()],Ct.prototype,"colorRamp",void 0),Ct=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunction")],Ct);const Mt=Ct;var Pt,Tt=r(88178),Rt=r(4151);let Nt=Pt=class extends c{clone(){return new Pt({raster:this.raster})}};Nt=Pt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunctionArguments")],Nt);const It=Nt;let kt=class extends w{constructor(){super(...arguments),this.functionName="ColormapToRGB",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let e=this.sourceRasterInfos[0];if(e.bandCount>1||!e.colormap?.length)return{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: source data must be single band with a colormap"};let t=e.clone();t.pixelType=this.outputPixelType=this._getOutputPixelType("u8"),this._removeStatsHistColormapVAT(t),t.bandCount=3,t.statistics=[{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20}],this.rasterInfo=t;let r=[...e.colormap].sort((e,t)=>e[0]-t[0]),{indexedColormap:s,offset:n}=(0,Ke.zg)({colormap:r});return s?(this.lookup={indexedColormap:s,offset:n},{success:!0,supportsGPU:(0,Tt.WN)(s)}):{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: the colormap is not supported"}}_processPixels(e){let t=e.pixelBlocks?.[0];if(!t||!this.lookup)return t;t=t.clone();let r=t.pixels[0],s=t.mask??new Uint8Array(r.length).fill(255),n=new Uint8Array(r.length),i=new Uint8Array(r.length),o=new Uint8Array(r.length),{indexedColormap:a,offset:l}=this.lookup,u=a.length;for(let e=0;e<r.length;e++)if(s[e]){let t=4*(r[e]-l);t<0||t>u-4?s[e]=0:(n[e]=a[t++],i[e]=a[t++],o[e]=a[t++])}return t.pixels=[n,i,o],t.statistics=[new Rt.A(0,255),new Rt.A(0,255),new Rt.A(0,255)],t.pixelType=this.outputPixelType,t}_getWebGLParameters(){return this.lookup}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],kt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:It,json:{write:!0,name:"rasterFunctionArguments"}})],kt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],kt.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],kt.prototype,"lookup",void 0),kt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunction")],kt);const St=kt;var _t,Ft=r(43937);let Bt=_t=class extends c{constructor(){super(...arguments),this.rasters=[]}writeRasters(e,t){t.rasters=e.map(e=>"number"==typeof e||"string"==typeof e?e:e.toJSON())}clone(){return new _t({rasters:(0,i.o8)(this.rasters)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Bt.prototype,"rasters",void 0),(0,o.Cg)([(0,Ft.K)("rasters")],Bt.prototype,"writeRasters",null),Bt=_t=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunctionArguments")],Bt);const jt=Bt;let Zt=class extends w{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){let{sourceRasterInfos:e}=this,t=e[0];this.outputPixelType=this._getOutputPixelType(t.pixelType);let r=t.clone();if(r.attributeTable=null,r.colormap=null,r.pixelType=this.outputPixelType,r.bandCount=e.map(({bandCount:e})=>e).reduce((e,t)=>e+t),e.every(({statistics:e})=>null!=e&&e.length)){let t=[];e.forEach(({statistics:e})=>null!=e&&t.push(...e)),r.statistics=t}if(e.every(({histograms:e})=>null!=e&&e.length)){let t=[];e.forEach(({histograms:e})=>null!=e&&t.push(...e)),r.histograms=t}r.multidimensionalInfo&&r.multidimensionalInfo.variables.forEach(t=>{let r=e.map(e=>e.multidimensionalInfo?.variables.find(({name:e})=>e===t.name)),s=r.map(e=>e?.statistics?.length?e.statistics:null),n=r.map(e=>e?.histograms?.length?e.histograms:null);t.statistics=s.every(e=>null!=e)?s.flat():null,t.histograms=n.every(e=>null!=e)?n.flat():null}),r.bandCount>1&&(r.colormap=null,r.attributeTable=null);let s=e.every(e=>e.keyProperties.BandProperties?.length)?e.flatMap(e=>e.keyProperties.BandProperties):void 0;return r.keyProperties={...r.keyProperties,BandProperties:s},this.rasterInfo=r,{success:!0,supportsGPU:r.bandCount<=3}}_processPixels(e){let{pixelBlocks:t}=e;return t&&null!=t?.[0]?(0,Ke.Wy)(t):null}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Zt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:jt,json:{write:!0,name:"rasterFunctionArguments"}})],Zt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Zt.prototype,"rasterArgumentNames",void 0),Zt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunction")],Zt);const Gt=Zt;var zt=r(20437);const Ot=new Ee.J({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),Et=new Ee.J({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});var Dt;let Vt=Dt=class extends c{constructor(){super(...arguments),this.method="difference",this.keepMethod="all",this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new Dt({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};(0,o.Cg)([(0,Ye.e)(Ot)],Vt.prototype,"method",void 0),(0,o.Cg)([(0,Ye.e)(Et)],Vt.prototype,"keepMethod",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Vt.prototype,"raster2",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],Vt.prototype,"rasters",null),Vt=Dt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunctionArguments")],Vt);const Ut=Vt;let Lt=class extends w{constructor(){super(...arguments),this.functionName="ComputeChange",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){let{method:e}=this.functionArguments,t=this.sourceRasterInfos[0].clone();if(this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),"categorical"===e){let e=this.sourceRasterInfos.map(e=>e.attributeTable),r=this._getFieldNames(e,"value"),s=e.map(e=>this._getClassFieldName(e));if(null==r[0]||null==r[1]||null==s[0]||null==s[1])return{success:!1,supportsGPU:!1,error:"both inputs must have proper attribute table with value and class fields"};this._updateAttributeTable(t,r,s)}return t.bandCount=1,this.rasterInfo=t,{success:!0,supportsGPU:"difference"===e||"relative-difference"===e}}_processPixels(e){let{pixelBlocks:t}=e;if(null==t?.[0]||null==t?.[1])return null;let{method:r}=this.functionArguments;return function(e,t,r,s){let[n,i]=e,o=(0,l.zw)(r)&&!(0,l.zw)(n.pixelType)&&!(0,l.zw)(i.pixelType),a=[n.mask,i.mask].filter(e=>e),u=g.A.combineBandMasks(a),p=e.map(e=>e.pixels[0]),{width:c,height:h}=n,m=g.A.createEmptyBand(r,c*h);switch(t){case"difference":case"relative-difference":!function(e){let{bands:[t,r],mask:s,isRelative:n,isRoundingNeeded:i,outBand:o}=e,a=t.length;for(let e=0;e<a;e++)if(!s||s[e]){let s=t[e]-r[e];if(n){let n=Math.max(Math.abs(t[e]),Math.abs(r[e]));s=0===n?0:s/n}o[e]=i?Math.round(s):s}}({bands:p,mask:u,outBand:m,isRoundingNeeded:o,isRelative:"relative-difference"===t});break;case"categorical":!function(e){let{bands:[t,r],categoryIndexLookups:[s,n],classNames:[i,o],mask:a,keepMethod:l,outBand:u}=e,p=t.length,c=i.length,h=o.length,m=c*h,f=m+1,g=m+2;for(let e=0;e<p;e++)if(!a||a[e]){let a=t[e],p=r[e],c=s[a],d=n[p],y=i[c],x=o[d];u[e]=null==c||null==d?m:"changed"===l&&y===x?f:"unchanged"===l&&y!==x?g:c*h+d}}({bands:p,mask:u,outBand:m,...s});break;case"euclidean-distance":!function(e){let{pixels:[t,r],mask:s,outBand:n}=e,i=t[0].length,o=t.length;for(let e=0;e<i;e++)if(!s||s[e]){let s=0;for(let n=0;n<o;n++){let i=t[n][e]-r[n][e];s+=i*i}n[e]=Math.sqrt(s)}}({pixels:e.map(e=>e.pixels),mask:u,outBand:m});break;case"angle-difference":!function(e){let{pixels:[t,r],mask:s,outBand:n}=e,i=t[0].length,o=t.length;for(let e=0;e<i;e++)if(!s||s[e]){let s=0,i=0,a=0;for(let n=0;n<o;n++){let o=t[n][e],l=r[n][e];s+=o*l,i+=o*o,a+=l*l}let l=Math.sqrt(i*a);n[e]=l?Math.acos(s/l):1.5707963267948966}}({pixels:e.map(e=>e.pixels),mask:u,outBand:m});break;case"band-with-most-change":!function(e){let{pixels:[t,r],mask:s,outBand:n}=e,i=t[0].length,o=t.length;for(let e=0;e<i;e++)if(!s||s[e]){let s=0,i=0;for(let n=0;n<o;n++){let o=Math.abs(t[n][e]-r[n][e]);o>s&&(s=o,i=n)}n[e]=i}}({pixels:e.map(e=>e.pixels),mask:u,outBand:m})}let f=new g.A({width:c,height:h,pixels:[m],pixelType:r,mask:u});return f.updateStatistics(),f}(t,r,this.outputPixelType,this._categoryConfig)}_getWebGLParameters(){let e=this.outputPixelType??"f32",[t,r]=(0,l.hP)(e),s=(0,l.zw)(e);return s&&(t-=1e-4,r+=1e-4),{method:this.functionArguments.method,domainRange:[t,r],isOutputRounded:s}}_updateAttributeTable(e,t,r){let s=this.sourceRasterInfos.map(e=>e.attributeTable),n=s.map((e,r)=>e.features.map(e=>e.attributes[t[r]])),i=s.map((e,t)=>e.features.map(e=>e.attributes[r[t]])),o=n.map(e=>{let t=[];return e.forEach((e,r)=>t[e]=r),t}),{keepMethod:a}=this.functionArguments;this._categoryConfig={categoryIndexLookups:o,classNames:i,keepMethod:a};let l=s[0].clone();l.fields=[new zt.A({name:"OID",type:"oid"}),new zt.A({name:"Value",type:"integer"}),new zt.A({name:"ClassName",type:"string"}),new zt.A({name:"Class_From",type:"string"}),new zt.A({name:"Class_To",type:"string"})];let u=this._getFieldNames(s,"red"),p=this._getFieldNames(s,"green"),c=this._getFieldNames(s,"blue"),h=[],m=2===u.length&&2===p.length&&2===c.length;m&&(h.push(...s.map((e,t)=>e.features.map(e=>[e.attributes[u[t]],e.attributes[p[t]],e.attributes[c[t]]]))),l.fields.push(new zt.A({name:"Red",type:"integer"}),new zt.A({name:"Green",type:"integer"}),new zt.A({name:"Blue",type:"integer"})));let f=l.features[0].clone();f.geometry=null;let g=[],[d,y]=n.map(e=>e.length),x=1;for(let e=0;e<d;e++){let t=i[0][e];for(let r=0;r<y;r++){let s=i[1][r];if("changed"===a&&t===s||"unchanged"===a&&t!==s)continue;let n=f.clone();n.attributes={OID:x++,Value:e*y+r,ClassName:t===s?t:`${t} -> ${s}`,Class_From:t,Class_To:s},m&&(n.attributes.Red=h[0][e][0]+h[1][r][0]>>1,n.attributes.Green=h[0][e][1]+h[1][r][1]>>1,n.attributes.Blue=h[0][e][2]+h[1][r][2]>>1),g.push(n)}}if("changed"===a){let e=f.clone();e.attributes={OID:x++,Value:d*y+1,ClassName:"No Change",Class_From:"Same",Class_To:"Same"},g.push(e)}else if("unchanged"===a){let e=f.clone();e.attributes={OID:x++,Value:d*y+2,ClassName:"Changed",Class_From:"Any",Class_To:"Any"},g.push(e)}l.features=g,e.attributeTable=l}_getFieldNames(e,t){return e.map(({fields:e})=>e.find(e=>e.name.toLowerCase()===t)?.name).filter(e=>e)}_getClassFieldName(e){return(e.fields.find(e=>"string"===e.type&&e.name.toLowerCase().startsWith("class"))??e.fields.find(e=>"string"===e.type&&e.name.toLowerCase().includes("class")||e.name.toLowerCase().includes("type")||e.name.toLowerCase().includes("name"))??e.fields.find(e=>"string"===e.type))?.name}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Lt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ut,json:{write:!0,name:"rasterFunctionArguments"}})],Lt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Lt.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Lt.prototype,"_categoryConfig",void 0),Lt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunction")],Lt);const Wt=Lt;var Kt;let $t=Kt=class extends c{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new Kt({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],$t.prototype,"contrastOffset",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],$t.prototype,"brightnessOffset",void 0),$t=Kt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunctionArguments")],$t);const Ht=$t;var qt=r(51927);let Jt=class extends w{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){let{sourceRasterInfos:e}=this,t=e[0];if("u8"!==t.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");let r=t.clone();this._removeStatsHistColormapVAT(r),this.rasterInfo=r;let{contrastOffset:s,brightnessOffset:n}=this.functionArguments;return this.lookup=(0,qt.zj)(s,n),{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];return null==t?null:(0,Ke.eH)(t,{lut:t.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){let{contrastOffset:e,brightnessOffset:t}=this.functionArguments;return{contrastOffset:e,brightnessOffset:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Jt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ht,json:{write:!0,name:"rasterFunctionArguments"}})],Jt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Jt.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Jt.prototype,"lookup",void 0),Jt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunction")],Jt);const Xt=Jt;function Yt(e,t,r,s,n){let i=Math.floor(s/2);for(let s=0;s<i;s++)for(let i=0;i<t;i++)e[s*t+i]=e[(n-1-s)*t+i],e[(r-1-s)*t+i]=e[(r-n+s)*t+i];let o=Math.floor(n/2);for(let s=0;s<r;s++){let r=s*t;for(let s=0;s<o;s++)e[r+s]=e[r+n-1-s],e[r+t-s-1]=e[r+t+s-n]}}const Qt=new Map;function er(e,t,r,s,n,i,o){let a=new Float32Array(t*r),l=i.length,u=o?0:s,p=o?s:0,c=o?1:t;for(let o=u;o<r-u;o++){let r=o*t;for(let o=p;o<t-p;o++){if(n&&!n[r+o])continue;let t=0;for(let n=0;n<l;n++)t+=e[r+o+(n-s)*c]*i[n];a[r+o]=t}}return a}function tr(e,t,r,s,n,i,o){let a=new Float32Array(t*r),l=Math.floor(s/2),u=Math.floor(n/2);for(let p=l;p<r-l;p++){let r=p*t;for(let p=u;p<t-u;p++){if(i&&!i[r+p])continue;let c=0;for(let i=0;i<s;i++)for(let s=0;s<n;s++)c+=e[r+p+(i-l)*t+s-u]*o[i*n+s];a[r+p]=c}}return a}var rr;Qt.set(A.none,[0,0,0,0,1,0,0,0,0]),Qt.set(A.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),Qt.set(A.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),Qt.set(A.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),Qt.set(A.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),Qt.set(A.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),Qt.set(A.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),Qt.set(A.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),Qt.set(A.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),Qt.set(A.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),Qt.set(A.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),Qt.set(A.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),Qt.set(A.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),Qt.set(A.smoothing5x5,[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1]),Qt.set(A.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Qt.set(A.sharpening5x5,[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1]),Qt.set(A.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),Qt.set(A.laplacian5x5,[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0]),Qt.set(A.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),Qt.set(A.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),Qt.set(A.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),Qt.set(A.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),Qt.set(A.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let sr=rr=class extends c{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(e){this._set("convolutionType",e);let t=Qt.get(e);if(!t||e===A.userDefined||e===A.none)return;let r=Math.round(Math.sqrt(t.length));this._set("kernel",t),this._set("cols",r),this._set("rows",r)}clone(){return new rr({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{type:Number,write:!0}})],sr.prototype,"rows",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:Number,write:!0,name:"columns"}})],sr.prototype,"cols",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"type",type:Number,write:!0}})],sr.prototype,"convolutionType",null),(0,o.Cg)([(0,a.MZ)({json:{type:[Number],write:!0}})],sr.prototype,"kernel",void 0),sr=rr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunctionArguments")],sr);const nr=sr;let ir=class extends w{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){let{kernel:e,convolutionType:t}=this.functionArguments,r=e.reduce((e,t)=>e+t);return-1===t||0===r||1===r?e:e.map(e=>e/r)}_bindSourceRasters(){let{convolutionType:e,rows:t,cols:r,kernel:s}=this.functionArguments;if(!Object.values(A).includes(e))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${e}`};if(e!==A.none&&t*r!==s.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};let n=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(n.pixelType);let i=n.clone();i.pixelType=this.outputPixelType;let o=[A.none,A.sharpen,A.sharpen2,A.sharpening3x3,A.sharpening5x5];return(-1===e||"u8"!==this.outputPixelType&&!o.includes(e))&&(i.statistics=null,i.histograms=null),i.colormap=null,i.attributeTable=null,this.rasterInfo=i,{success:!0,supportsGPU:s.length<=25}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t||this.functionArguments.convolutionType===A.none)return t;let{rows:r,cols:s}=this.functionArguments,{_normalizedKernel:n}=this;return function(e,t){let r=function(e){let t=Math.sqrt(e.length),r=e.slice(0,t),s=[1];for(let r=1;r<t;r++){let n=null;for(let s=0;s<t;s++){let i=e[s+r*t],o=e[s];if(null==n)if(0===o){if(i)return{separable:!1,row:null,col:null}}else n=i/o;else if(i/o!==n)return{separable:!1,row:null,col:null}}if(null==n)return{separable:!1,row:null,col:null};s.push(n)}return{separable:!0,row:r,col:s}}(t.kernel),s=!1!==t.mirrorEdges,n=r.separable?function(e,t,r,s=!0){let{pixels:n,width:i,height:o,pixelType:a,mask:l}=e,u=n.length,p=[],c=t.length,h=r.length,m=Math.floor(c/2),f=Math.floor(h/2);for(let e=0;e<u;e++){let a=er(n[e],i,o,m,l,t,!0);a=er(a,i,o,f,l,r,!1),s&&Yt(a,i,o,c,h),p.push(a)}return new g.A({width:i,height:o,pixelType:a,pixels:p,mask:l})}(e,r.row,r.col,s):function(e,t,r=!0){let{pixels:s,width:n,height:i,pixelType:o,mask:a}=e,l=s.length,u=[],{kernel:p,rows:c,cols:h}=t;for(let e=0;e<l;e++){let t=tr(s[e],n,i,c,h,a,p);r&&Yt(t,n,i,c,h),u.push(t)}return new g.A({width:n,height:i,pixelType:o,pixels:u,mask:a})}(e,t,s),{outputPixelType:i}=t;return i&&n.clamp(i),n}(t,{kernel:n,rows:r,cols:s,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let e=new Float32Array(25),{rows:t,cols:r}=this.functionArguments,{_normalizedKernel:s}=this;for(let n=0;n<t;n++)for(let t=0;t<r;t++)e[5*n+t]=s[n*r+t];return{kernelRows:t,kernelCols:r,kernel:e,clampRange:(0,l.hP)(this.outputPixelType)}}_getNeighborhoodSize(){let{rows:e,cols:t}=this.functionArguments;return{rows:e,cols:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ir.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:nr,json:{write:!0,name:"rasterFunctionArguments"}})],ir.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],ir.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],ir.prototype,"_normalizedKernel",null),ir=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunction")],ir);const or=ir;var ar;const lr=new Ee.J({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let ur=ar=class extends c{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(e,t){return lr.fromJSON(t.type??t.curvatureType??0)}clone(){return new ar({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:{target:"type"}}}),(0,Ye.e)(lr)],ur.prototype,"curvatureType",void 0),(0,o.Cg)([(0,yt.w)("curvatureType",["type","curvatureType"])],ur.prototype,"readCurvatureType",null),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],ur.prototype,"zFactor",void 0),ur=ar=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunctionArguments")],ur);const pr=ur;let cr=class extends w{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let e=this.sourceRasterInfos[0].clone();return e.pixelType=this.outputPixelType,e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{zFactor:r,curvatureType:s}=this.functionArguments,{extent:n,primaryPixelSizes:i}=e,o=i?.[0]??(n?{x:n.width/t.width,y:n.height/t.height}:{x:1,y:1}),a=this.isGCS&&r>=1?r*Ge.rk:r;return(0,Ge.E0)(t,{zFactor:a,curvatureType:s,resolution:o})}_getWebGLParameters(){let{zFactor:e,curvatureType:t}=this.functionArguments;return{curvatureType:t,zFactor:this.isGCS&&e>=1?e*Ge.rk:e}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],cr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:pr,json:{write:!0,name:"rasterFunctionArguments"}})],cr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],cr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],cr.prototype,"isGCS",void 0),cr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunction")],cr);const hr=cr;var mr;let fr=mr=class extends c{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=0}clone(){return new mr({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],fr.prototype,"bandIds",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],fr.prototype,"bandNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],fr.prototype,"bandWavelengths",void 0),(0,o.Cg)([(0,Ye.e)({0:"name",1:"wavelength",2:"id"})],fr.prototype,"method",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],fr.prototype,"missingBandAction",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],fr.prototype,"wavelengthMatchTolerance",void 0),fr=mr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunctionArguments")],fr);const gr=fr;let dr=class extends w{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{functionArguments:e,sourceRasterInfos:t}=this,r=t[0],{method:s,bandNames:n,bandWavelengths:i,bandIds:o,missingBandAction:a}=e,l=n?.length&&("name"===s||"id"!==s&&!o?.length),u=i?.length&&("wavelength"===s||"id"!==s&&!o?.length),p=1===a,c=l?function(e,t){let r=e.bandInfos.map(({name:e})=>e.toLowerCase()),s=[];for(let e=0;e<t.length;e++){let n=t[e].toLowerCase(),i=r.indexOf(n);if(-1===i&&"nearinfrared"===n&&(i=r.findIndex(e=>e.startsWith("nearinfrared_1")),-1===i&&(i=r.findIndex(e=>e.startsWith("nearinfrared")))),-1===i)return null;s.push(i)}return s}(r,n):u?function(e,t,{wavelengthMatchTolerance:r},s){let{bandInfos:n}=e,i=[];for(let e=0;e<n.length;e++){let{minWavelength:t,maxWavelength:r}=n[e];if(!t||!r)return null;i.push({minWavelength:t,maxWavelength:r})}let o=[];for(let e=0;e<t.length;e++){let n=t[e],a=!1,l=-1,u=Number.MAX_VALUE;for(let e=0;e<i.length;e++){let t=i[e],r=n>=t.minWavelength&&n<=t.maxWavelength,s=Math.abs(n-(t.minWavelength+t.maxWavelength)/2);r?s<u&&(a=!0,l=e,u=s):!a&&s<u&&(l=e,u=s)}if(!a&&r&&u<r&&(a=!0),!a&&s)return null;o.push(l)}return o}(r,i,this.functionArguments,p):function(e,t,r){let{bandCount:s}=e;return!t?.length||r&&t.some(e=>e<0||e>=s)?null:t}(r,o,p);if(null==c)return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${l?"band names":u?"band wavelengths":"band ids"} for the imagery data source`};this.functionArguments.bandIds=c,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType(r.pixelType);let h=r.clone();h.pixelType=this.outputPixelType,h.bandCount=c.length;let{statistics:m,histograms:f}=h;null!=m&&m.length&&(h.statistics=c.map(e=>m[e]||m[m.length-1])),null!=f&&f.length&&(h.histograms=c.map(e=>f[e]||f[f.length-1])),h.multidimensionalInfo&&h.multidimensionalInfo.variables.forEach(e=>{let{statistics:t,histograms:r}=e;null!=t&&t.length&&(e.statistics=c.map(e=>t[e]||t[t.length-1])),null!=r&&r.length&&(e.histograms=c.map(e=>r[e]||r[r.length-1]))});let g=h.keyProperties?.BandProperties;return g?.length&&(g=c.map(e=>e>=g.length?g[g.length-1]:g[e]),h.keyProperties={...h.keyProperties,BandProperties:g}),this.rasterInfo=h,{success:!0,supportsGPU:h.bandCount<=3}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{bandIds:r}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:e}=this;r=r.map(t=>e.indexOf(t))}else{let e=t.pixels.length;r=r.map(t=>t>=e?e-1:t)}return t.extractBands(r)}_getWebGLParameters(){let e;if(this.isInputBandIdsSwizzled)e=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{e=[...this.functionArguments.bandIds],0===e.length?e=[0,1,2]:e.length<3&&(e[1]=e[1]??e[0],e[2]=e[2]??e[1]);for(let t=0;t<3;t++)e[t]=Math.min(e[t],2)}return{bandIndexMat3:qe(e)}}_getInputBandIds(e){let t=e.length;return this.functionArguments.bandIds.map(e=>e>=t?t-1:e).map(t=>e[t])}_swizzleBandIds(e){let t=this.functionArguments.bandIds.map(t=>e.indexOf(t));return this.isInputBandIdsSwizzled=!0,t[1]??=t[0],t[2]??=t[1],this.swizzledBandSelection=t,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],dr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:gr,json:{write:!0,name:"rasterFunctionArguments"}})],dr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],dr.prototype,"rasterArgumentNames",void 0),dr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunction")],dr);const yr=dr;function xr(e,t,r,s){let{pixels:n,width:i,height:o}=e,a=n.length,u=r.startsWith("f"),p=!u,[c,h]=(0,l.hP)(r),m=i*o,f=g.A.createEmptyBand(r,m);for(let e=0;e<o;e++){let r=e*i;for(let e=0;e<i;e++,r++)if(!s||s[r]){let e=0;for(let s=0;s<a;s++)e+=t[s]*n[s][r];u||(e=Math.round(e),p&&(e=e>h?h:e<c?c:e)),f[r]=e}}return f}var wr;let Ar=wr=class extends c{clone(){return new wr({conversionParameters:[...this.conversionParameters],raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],Ar.prototype,"conversionParameters",void 0),Ar=wr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunctionArguments")],Ar);const vr=Ar;let br=class extends w{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){let{conversionParameters:e}=this.functionArguments,t=e.reduce((e,t)=>e+t);return e.map(e=>e/t)}_bindSourceRasters(){let{conversionParameters:e}=this.functionArguments;if(!e?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};let t=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType;let r=3===e.length||3===t.bandCount&&e.length>3;return t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,{success:!0,supportsGPU:r}}_processPixels(e){let t=e.pixelBlocks?.[0];return null==t?null:function(e,t,r){let{width:s,height:n,mask:i,bandMasks:o}=e,a=o?.length?g.A.combineBandMasks(o):i,l=xr(e,t,r,a),u=new g.A({width:s,height:n,pixels:[l],pixelType:r,mask:a});return u.updateStatistics(),u}(t,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],br.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:vr,json:{write:!0,name:"rasterFunctionArguments"}})],br.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],br.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],br.prototype,"_normalizedWeights",null),br=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunction")],br);const Cr=br;var Mr;const Pr=new Ee.J({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),Tr=new Ee.J({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let Rr=Mr=class extends c{constructor(){super(...arguments),this.altitude=45,this.azimuth=315,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.slopeType="degree",this.zFactor=1,this.removeEdgeEffect=!1}clone(){return new Mr({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Rr.prototype,"altitude",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Rr.prototype,"azimuth",void 0),(0,o.Cg)([(0,a.MZ)(),(0,Ye.e)(Pr)],Rr.prototype,"hillshadeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psPower"}})],Rr.prototype,"pixelSizePower",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psZFactor"}})],Rr.prototype,"pixelSizeFactor",void 0),(0,o.Cg)([(0,a.MZ)(),(0,Ye.e)(Tr)],Rr.prototype,"slopeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Rr.prototype,"zFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Rr.prototype,"removeEdgeEffect",void 0),Rr=Mr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunctionArguments")],Rr);const Nr=Rr;let Ir=class extends w{constructor(){super(...arguments),this.functionName="Hillshade",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let e=this.sourceRasterInfos[0];if(e.bandCount>1)return{success:!1,supportsGPU:!1,error:"hillshade-function: source data must be single band"};this.outputPixelType=this._getOutputPixelType("u8");let t=e.clone();return this._removeStatsHistColormapVAT(t),t.pixelType=this.outputPixelType,t.bandCount=1,t.statistics=[{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];if(!t)return null;let{extent:r,primaryPixelSizes:s}=e,n=s?.[0]??(r?{x:r.width/t.width,y:r.height/t.height}:{x:1,y:1}),i=(0,Ge.PP)(this.functionArguments,n,this.isGCS),o=(0,Ge.fw)(t,i);return o.pixelType=this.outputPixelType,o}_getWebGLParameters(){let e=(0,Ge.PP)(this.functionArguments,{x:1,y:1},this.isGCS),t=(0,Ge.ng)(e),{slopeType:r,zFactor:s,pixelSizeFactor:n,pixelSizePower:i}=this.functionArguments,o="scaled"===r,a=(0,l.zw)(this.outputPixelType);return{...t,zFactor:s,gcsFactor:this.isGCS?Ge.rk:1,pixelSizeFactor:o?n:0,pixelSizePower:o?i:0,isOutputRounded:a}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ir.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Nr,json:{write:!0,name:"rasterFunctionArguments"}})],Ir.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Ir.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ir.prototype,"isGCS",void 0),Ir=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunction")],Ir);const kr=Ir;var Sr;let _r=Sr=class extends c{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(e,t){t.rasters=e.map(e=>"number"==typeof e||"string"==typeof e?e:e.toJSON())}clone(){return new Sr({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,i.o8)(this.rasters)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],_r.prototype,"operation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],_r.prototype,"rasters",void 0),(0,o.Cg)([(0,Ft.K)("rasters")],_r.prototype,"writeRasters",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],_r.prototype,"processAsMultiband",void 0),_r=Sr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunctionArguments")],_r);const Fr=_r;let Br=class extends w{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){let{sourceRasterInfos:e}=this,t=e[0],{bandCount:r}=t,{processAsMultiband:s}=this.functionArguments;if(e.some(e=>e.bandCount!==r))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};let{operation:n,rasters:i}=this.functionArguments,o=R[n];if(!(999===o||i.length===o||i.length<=1&&1===o))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${o}`};let a=t.clone();return a.bandCount=999!==o||s?r:1,this._removeStatsHistColormapVAT(a),this._updateStatistics(a),this._updatePixelType(a),this.rasterInfo=a,{success:!0,supportsGPU:1===a.bandCount&&o<=3}}_processPixels(e){let{pixelBlocks:t}=e;return null==t||t.some(e=>null==e)?null:Se(t,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){let{operation:e}=this.functionArguments,t=R[e],r=Object.keys(M).find(t=>M[t]===e)?.toLowerCase()??"undefined",s=this.outputPixelType??"f32",[n,i]=(0,l.hP)(s),o=(0,l.zw)(s);return o&&(n-=1e-4,i+=1e-4),{imageCount:t,operationName:r,domainRange:[n,i],isOutputRounded:o}}_updateStatistics(e){let t=this.sourceRasterInfos[0],{operation:r}=this.functionArguments,s=T(r)?.domain;if(s){e.statistics=[];for(let t=0;t<e.bandCount;t++)e.statistics[t]={min:s[0],max:s[1],avg:(s[0]+s[1])/2,stddev:(s[0]+s[1])/10}}else 45===r&&t.statistics?.length&&(e.statistics=t.statistics.map(e=>({min:-e.max,max:-e.min,avg:null==e.avg?void 0:-e.avg,stddev:null==e.stddev?void 0:-e.stddev})))}_updatePixelType(e){let{statistics:t,pixelType:r}=this.sourceRasterInfos[0],{operation:s}=this.functionArguments,{domain:n,isInteger:i}=T(s)??{domain:null,isInteger:!1},o="f32";if(n&&i)o=(0,l.X1)(n[0],n[1]);else if(30===s){let e=t?.[0];o=e?(0,l.X1)(e.min,e.max):(0,l.zw)(r)?r:"s32"}else if(45===s&&(0,l.zw)(r)){let e=t?.map(({max:e})=>-e),s=t?.map(({min:e})=>-e),n=e?.length?Math.min(...e):null,i=s?.length?Math.min(...s):null;o=null!=n&&null!=i?(0,l.X1)(n,i):r.startsWith("s")?r.replace("s","u"):"u1"===r||"u2"===r||"u4"===r?"s8":"u8"===r?"s16":"s32"}e.pixelType=this.outputPixelType=this._getOutputPixelType(o)}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Br.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Fr,json:{write:!0,name:"rasterFunctionArguments"}})],Br.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Br.prototype,"rasterArgumentNames",void 0),Br=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunction")],Br);const jr=Br;var Zr,Gr=r(34727);let zr=Zr=class extends c{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=0}get normalizedNoDataValues(){let{noDataValues:e}=this;if(!e?.length)return null;let t=!1,r=e.map(e=>{if("number"==typeof e)return t=!0,[e];if("string"==typeof e){let r=e.trim().split(" ").filter(e=>""!==e.trim()).map(e=>Number(e));return t||=r.length>0,0===r.length?null:r}return null});return t?r:null}clone(){return new Zr({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],zr.prototype,"includedRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],zr.prototype,"noDataValues",void 0),(0,o.Cg)([(0,a.MZ)()],zr.prototype,"normalizedNoDataValues",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],zr.prototype,"noDataInterpretation",void 0),zr=Zr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunctionArguments")],zr);const Or=zr;let Er=class extends w{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let e=this.sourceRasterInfos[0].clone(),{pixelType:t}=e;this.outputPixelType=this._getOutputPixelType(t),e.pixelType=this.outputPixelType,this.rasterInfo=e;let{includedRanges:r,normalizedNoDataValues:s}=this.functionArguments;if(!r?.length&&!s?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let n=[];for(let i=0;i<e.bandCount;i++){let e=(0,Ke.Wt)(t,r?.slice(2*i,2*i+2),s?.[i]);if(null==e){n=null;break}n.push(e)}this.lookups=n;let i=null!=s&&s.every(e=>e?.length===s[0]?.length);return{success:!0,supportsGPU:(!r||r.length<=18)&&(!s||i&&s[0].length<=9)}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{outputPixelType:r,lookups:s}=this,{includedRanges:n,noDataInterpretation:i,normalizedNoDataValues:o}=this.functionArguments;return(0,Ke.dK)(t,{includedRanges:n,noDataValues:o,outputPixelType:r,matchAll:1===i,lookups:s})}_getWebGLParameters(){let{includedRanges:e,normalizedNoDataValues:t}=this.functionArguments,r=new Float32Array(9);r.fill(Gr.pq),t?.[0]?.length&&r.set(t[0]);let s=new Float32Array(6);for(let t=0;t<s.length;t+=2)s[t]=e?.[t]??-Gr.pq,s[t+1]=e?.[t+1]??Gr.pq;return e?.length&&s.set(e),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:r,includedRanges:s}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Er.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Or,json:{write:!0,name:"rasterFunctionArguments"}})],Er.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Er.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Er.prototype,"lookups",void 0),Er=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunction")],Er);const Dr=Er;var Vr;let Ur=Vr=class extends c{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){let{visibleBandID:e,infraredBandID:t,scientificOutput:r}=this;return new Vr({visibleBandID:e,infraredBandID:t,scientificOutput:r})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ur.prototype,"visibleBandID",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ur.prototype,"infraredBandID",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ur.prototype,"scientificOutput",void 0),Ur=Vr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunctionArguments")],Ur);const Lr=Ur;let Wr=class extends w{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{scientificOutput:e,visibleBandID:t,infraredBandID:r}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(e?"f32":"u8");let s=this.sourceRasterInfos[0],n=Math.max(t,r);if(s.bandCount<2||n>=s.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};if(t<0||r<0)return{success:!1,supportsGPU:!1,error:"ndvi-function: invalid visible or infrared band id"};let i=s.clone();i.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(i),i.bandCount=1,i.keyProperties={...i.keyProperties,BandProperties:void 0};let[o,a,l,u]=e?[-1,1,0,.1]:[0,200,100,10];return i.statistics=[{min:o,max:a,avg:l,stddev:u}],this.rasterInfo=i,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{visibleBandID:r,infraredBandID:s,scientificOutput:n}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:e}=this;s=e.indexOf(s),r=e.indexOf(r)}return function(e,t,r,s){let{mask:n,pixels:i,width:o,height:a}=e,l=i[r],u=i[t],p=u.length,c=s?new Uint8Array(p):new Float32Array(p),h=s?100:1,m=s?100.5:0;for(let e=0;e<p;e++)if(null==n||n[e]){let t=l[e],r=u[e],s=t+r;s&&(c[e]=(t-r)/s*h+m)}let f=new g.A({width:o,height:a,mask:n,pixelType:s?"u8":"f32",pixels:[c]});return f.updateStatistics(),f}(t,r,s,!n)}_getWebGLParameters(){let{visibleBandID:e,infraredBandID:t,scientificOutput:r}=this.functionArguments;return{bandIndexMat3:qe(this.isInputBandIdsSwizzled?[0,1,2]:[t,e,0]),scaled:!r}}_getInputBandIds(e){let{visibleBandID:t,infraredBandID:r}=this.functionArguments;return[r,t,0].map(t=>e[t])}_swizzleBandIds(e){let{visibleBandID:t,infraredBandID:r}=this.functionArguments,s=[t,r].map(t=>e.indexOf(t));return s[2]=s[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=s,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Wr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Lr,json:{write:!0,name:"rasterFunctionArguments"}})],Wr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Wr.prototype,"rasterArgumentNames",void 0),Wr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunction")],Wr);const Kr=Wr;var $r;let Hr=$r=class extends c{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new $r({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"inputRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"outputValues",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"noDataRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"allowUnmatched",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"replacementValue",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"isLastInputRangeInclusive",void 0),Hr=$r=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunctionArguments")],Hr);const qr=Hr;let Jr=class extends w{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){let e=this.sourceRasterInfos[0].clone(),{pixelType:t}=e;e.bandCount=1;let{statistics:r}=e;this._removeStatsHistColormapVAT(e);let{allowUnmatched:s,replacementValue:n,outputValues:i,inputRanges:o,noDataRanges:a,isLastInputRangeInclusive:u}=this.functionArguments,p="unknown"===this.outputPixelType||null==this.outputPixelType;if(this.outputPixelType=this._getOutputPixelType(t),i?.length){let o=r?.[0];if(s&&null==n){let t=o?.min??i[0],r=o?.max??i[0];t=Math.min.apply(null,[...i,t]),r=Math.max.apply(null,[...i,r]),e.statistics=[{min:t,max:r,avg:o?.avg??0,stddev:o?.stddev??-1}]}else{let t=i[0],r=t;for(let e=0;e<i.length;e++)t=t>i[e]?i[e]:t,r=r>i[e]?r:i[e];s&&null!=n&&(t=Math.min(t,n),r=Math.max(r,n)),e.statistics=[{min:t,max:r,avg:o?.avg??0,stddev:o?.stddev??-1}]}if(p){let{min:r,max:o}=e.statistics[0],a=["u8","s8","u16","s16","u32","s32","f32"],u=a.find(e=>{let[t,s]=(0,l.hP)(e);return r>=t&&o<=s})??"f64";this.outputPixelType=i.some(e=>Math.floor(e)!==e)?"f64"===u?"f64":"f32":s&&null==n&&a.indexOf(t)>a.indexOf(u)?t:u}}return e.pixelType=this.outputPixelType,this.rasterInfo=e,this.lookup=s?null:(0,Ke.XU)({srcPixelType:t,inputRanges:o,outputValues:i,noDataRanges:a,allowUnmatched:s,isLastInputRangeInclusive:u,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!i||i.length<=9)&&(!a||a.length<=9)}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{lookup:r,outputPixelType:s}=this;if(r){let e=(0,Ke.eH)(t,{lut:[r.lut],offset:r.offset,outputPixelType:s});return null!=e&&r.mask&&(e.mask=(0,Ke.UK)(t.pixels[0],t.mask,r.mask,r.offset,"u8")),e}let{inputRanges:n,outputValues:i,noDataRanges:o,allowUnmatched:a,isLastInputRangeInclusive:l,replacementValue:u}=this.functionArguments;return(0,Ke.Ew)(t,{inputRanges:n,outputValues:i,noDataRanges:o,outputPixelType:s,allowUnmatched:a,isLastInputRangeInclusive:l,replacementValue:u})}_getWebGLParameters(){let{allowUnmatched:e,noDataRanges:t,isLastInputRangeInclusive:r}=this.functionArguments,s=this.functionArguments.inputRanges??[],n=this.functionArguments.outputValues??[],i=(0,Ke.bL)(s,n,r),o=new Float32Array(18);return o.fill(Gr.pq),t?.length&&o.set(t),{allowUnmatched:e,rangeMaps:i,noDataRanges:o,clampRange:(0,l.hP)(this.outputPixelType),replacementValue:this.functionArguments.replacementValue}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Jr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:qr,json:{write:!0,name:"rasterFunctionArguments"}})],Jr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Jr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Jr.prototype,"lookup",void 0),Jr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunction")],Jr);const Xr=Jr;var Yr;let Qr=Yr=class extends Nr{readColorRamp(e){if("string"==typeof e){let t=gt.kH.jsonValues.find(t=>t.toLowerCase()===e.toLowerCase());return t?(0,gt.M5)(gt.kH.fromJSON(t)):null}return"toJSON"in e?e.toJSON():e}clone(){return new Yr({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,colorRamp:this.colorRamp,colormap:this.colormap,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Qr.prototype,"colorRamp",void 0),(0,o.Cg)([(0,yt.w)("colorRamp")],Qr.prototype,"readColorRamp",null),(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],Qr.prototype,"colormap",void 0),Qr=Yr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunctionArguments")],Qr);const es=Qr;let ts=class extends w{constructor(){super(...arguments),this.functionName="ShadedRelief",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let e=this.sourceRasterInfos[0];if(e.bandCount>1)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: source data must be single band"};let{colorRamp:t,colormap:r}=this.functionArguments;if(!t&&!r?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a color ramp argument must be specified"};this.outputPixelType=this._getOutputPixelType("u8");let s=e.clone();this._removeStatsHistColormapVAT(s),s.pixelType=this.outputPixelType,s.bandCount=3,s.statistics=[{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=s,this.isGCS=s.spatialReference?.isGeographic??!1,r?.length||(r=(0,gt.R8)(t,{interpolateAlpha:!0}));let{indexedColormap:n,offset:i}=(0,Ke.zg)({colormap:r});if(!n?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a valid colorramp is required"};let o=(0,gt.S2)(n);return this.lookup={indexedColormap:n,offset:i,hsvMap:o},{success:!0,supportsGPU:(0,Tt.WN)(n)}}_processPixels(e){let t=e.pixelBlocks?.[0];if(!t||!this.lookup)return null;let r=e.primaryPixelSizes?.[0];if(null==r){let{extent:s}=e;r=s?{x:s.width/t.width,y:s.height/t.height}:{x:1,y:1}}let s=(0,Ge.PP)(this.functionArguments,r,this.isGCS),n=(0,Ge.fw)(t,s),i=this.sourceRasterInfos[0].statistics?.[0]??{min:0,max:8e3};return(0,Ge.SC)(n,t,this.lookup.hsvMap,i),n.pixelType=this.outputPixelType,n}_getWebGLParameters(){let e=(0,Ge.PP)(this.functionArguments,{x:1,y:1},this.isGCS),t=(0,Ge.ng)(e),{slopeType:r,zFactor:s,pixelSizeFactor:n,pixelSizePower:i}=this.functionArguments,o="scaled"===r,{indexedColormap:a,offset:u}=this.lookup,p=this.sourceRasterInfos[0].statistics?.[0],c=(0,l.zw)(this.outputPixelType);return{...t,indexedColormap:a,offset:u,zFactor:s,gcsFactor:this.isGCS?Ge.rk:1,pixelSizeFactor:o?n:0,pixelSizePower:o?i:0,minValue:p?.min??0,maxValue:p?.max??8e3,isOutputRounded:c}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ts.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:es,json:{write:!0,name:"rasterFunctionArguments"}})],ts.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],ts.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ts.prototype,"isGCS",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ts.prototype,"lookup",void 0),ts=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunction")],ts);const rs=ts;var ss;const ns=new Ee.J({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let is=ss=class extends c{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new ss({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,o.Cg)([(0,Ye.e)(ns)],is.prototype,"slopeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],is.prototype,"zFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"psPower",write:!0}})],is.prototype,"pixelSizePower",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"psZFactor",write:!0}})],is.prototype,"pixelSizeFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],is.prototype,"removeEdgeEffect",void 0),is=ss=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunctionArguments")],is);const os=is;let as=class extends w{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let e=this.sourceRasterInfos[0].clone();return e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),e.statistics="percent-rise"===this.functionArguments.slopeType?null:[{min:0,max:90,avg:1,stddev:1}],e.bandCount=1,this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{zFactor:r,slopeType:s,pixelSizePower:n,pixelSizeFactor:i}=this.functionArguments,{isGCS:o}=this,{extent:a,primaryPixelSizes:l}=e,u=l?.[0]??(a?{x:a.width/t.width,y:a.height/t.height}:{x:1,y:1});return(0,Ge.yy)(t,{zFactor:r,slopeType:s,pixelSizePower:n,pixelSizeFactor:i,isGCS:o,resolution:u})}_getWebGLParameters(){let{zFactor:e,slopeType:t,pixelSizeFactor:r,pixelSizePower:s}=this.functionArguments;return{zFactor:this.isGCS&&e>=1?e*Ge.rk:e,slopeType:t,pixelSizeFactor:r??0,pixelSizePower:s??0,isOutputRounded:(0,l.zw)(this.outputPixelType)}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],as.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:os,json:{write:!0,name:"rasterFunctionArguments"}})],as.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],as.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],as.prototype,"isGCS",void 0),as=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunction")],as);const ls=as;var us;let ps=us=class extends c{clone(){return new us({conversionMatrix:[...this.conversionMatrix],raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],ps.prototype,"conversionMatrix",void 0),ps=us=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunctionArguments")],ps);const cs=ps;let hs=class extends w{constructor(){super(...arguments),this.functionName="SpectralConversion",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let e=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:3===e.bandCount&&9===this.functionArguments.conversionMatrix.length}}_processPixels(e){let t=e.pixelBlocks?.[0];return null==t?null:function(e,t,r){let{width:s,height:n,mask:i,bandMasks:o}=e,a=o?.length?g.A.combineBandMasks(o):i,l=[],u=e.pixels.length;for(let s=0;s<t.length/u;s++){let n=xr(e,t.slice(s*u,(s+1)*u),r,a);l.push(n)}let p=new g.A({width:s,height:n,pixels:l,pixelType:r,mask:a});return p.updateStatistics(),p}(t,this.functionArguments.conversionMatrix,this.outputPixelType)}_getWebGLParameters(){let e=(0,l.hP)(this.outputPixelType),[t,r,s,n,i,o,a,u,p]=this.functionArguments.conversionMatrix;return{weights:[t,n,a,r,i,u,s,o,p],clampRange:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],hs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:cs,json:{write:!0,name:"rasterFunctionArguments"}})],hs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],hs.prototype,"rasterArgumentNames",void 0),hs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunction")],hs);const ms=hs,fs=new Ee.J({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function gs(e,t){let{fillNoDataOnly:r}=t,{band:s,width:n,height:i,mask:o,outBand:a}=e;if(r&&!o)return void a.set(s);let{statisticsType:l,kernelRows:u,kernelCols:p}=t,c="stddev"===l,h=n*i,m=new Float64Array(h),f=new Float64Array(h),g=new Uint32Array(h);for(let e=0;e<i;e++){let t=e*n,r=0,i=0,a=0;for(let e=0;e<p;e++)(!o||o[t+e])&&(r+=s[t+e],c&&(i+=s[t+e]**2),a++);m[t]=r,f[t]=i,g[t]=a;for(let e=1;e<=n-p;e++){let n=t+e-1,l=n+p;o?(o[n]&&(a--,r-=s[n],c&&(i-=s[n]**2)),o[l]&&(a++,r+=s[l],c&&(i+=s[l]**2))):(r-=s[n],r+=s[l],c&&(i-=s[n]**2,i+=s[l]**2)),m[t+e]=r,g[t+e]=a,c&&(f[t+e]=i)}}let d=new Float64Array(h),y=new Float64Array(h),x=new Uint32Array(h),w=u*n;for(let e=0;e<=n-p;e++){let t=0,r=0,s=0;for(let i=0;i<u;i++){let o=i*n+e;t+=m[o],s+=g[o],c&&(r+=f[o])}d[e]=t,y[e]=r,x[e]=s;for(let o=1;o<=i-u;o++){let i=(o-1)*n+e,a=i+w;t-=m[i],t+=m[a],s-=g[i],s+=g[a],c&&(r-=f[i],r+=f[a]),d[o*n+e]=t,y[o*n+e]=r,x[o*n+e]=s}}let A=Math.floor(u/2),v=Math.floor(p/2);for(let e=A;e<i-A;e++){let t=e*n;for(let s=v;s<n-v;s++){let i=(e-A)*n+s-v,l=x[i];if(0===l||r&&(!o||o[t+s]))continue;let u=d[i]/l,p=c?Math.sqrt((y[i]-d[i]*u)/l):u;a[t+s]=p,o&&(o[t+s]=255)}}}function ds(e,t){let{fillNoDataOnly:r}=t,{band:s,width:n,height:i,mask:o,outBand:a}=e;if(r&&!o)return void a.set(s);let{kernelRows:l,kernelCols:u,statisticsType:p}=t,c=Math.floor(l/2),h=Math.floor(u/2),m="min"===p,f=a.slice(),g=new Uint32Array(n*i);for(let e=c;e<i-c;e++){let t=e*n;for(let e=h;e<n-h;e++){let r=m?Number.MAX_VALUE:-Number.MAX_VALUE,i=0;for(let a=0;a<l;a++)for(let l=0;l<u;l++){let u=t+e+(a-c)*n+l-h;(!o||o[u])&&(r=m?Math.min(r,s[u]):Math.max(r,s[u]),i++)}o?(f[t+e]=0===i?0:r,g[t+e]=i):a[t+e]=0===i?0:r}}if(o)for(let e=c;e<i-c;e++){let t=e*n;for(let e=h;e<n-h;e++)if(g[t+e]){if(r&&o[t+e])continue;a[t+e]=f[t+e],o[t+e]=255}}}function ys(e,t){let{fillNoDataOnly:r}=t,{band:s,width:n,height:i,mask:o,outBand:a}=e;if(r&&!o)return void a.set(s);let{kernelRows:l,kernelCols:u}=t,p=Math.floor(l/2),c=Math.floor(u/2),h=a.slice(),m=new Uint32Array(n*i);for(let e=p;e<i-p;e++){let t=e*n;for(let e=c;e<n-c;e++){if(r&&o?.[t+e])continue;let i=[];for(let r=0;r<l;r++)for(let a=0;a<u;a++){let l=t+e+(r-p)*n+a-c;(!o||o[l])&&i.push(s[l])}i.length&&(i.sort((e,t)=>e-t),o?(h[t+e]=i[Math.floor((i.length-1)/2)],m[t+e]=i.length):a[t+e]=i[Math.floor((i.length-1)/2)])}}if(o)for(let e=p;e<i-p;e++){let t=e*n;for(let e=c;e<n-c;e++)if(m[t+e]){if(r&&o[t+e])continue;a[t+e]=h[t+e],o[t+e]=255}}}function xs(e,t){let{fillNoDataOnly:r}=t,{band:s,width:n,height:i,mask:o,outBand:a}=e;if(r&&!o)return void a.set(s);let{kernelRows:l,kernelCols:u}=t,p=Math.floor(l/2),c=Math.floor(u/2),h="majority"===t.statisticsType,m=l*u,f=a.slice(),g=new Uint32Array(n*i);for(let e=p;e<i-p;e++){let t=e*n;for(let e=c;e<n-c;e++){if(r&&o?.[t+e])continue;let i=new Map;for(let r=0;r<l;r++)for(let a=0;a<u;a++){let l=t+e+(r-p)*n+a-c;if(o&&!o[l])continue;let u=s[l];i.set(u,i.has(u)?i.get(u)+1:1)}if(0===i.size)continue;let d=0,y=0,x=h?0:m+1;for(let e of i.keys())y=i.get(e),h===y>x&&(x=y,d=e);o?(f[t+e]=d,g[t+e]=i.size):a[t+e]=d}}if(o)for(let e=p;e<i-p;e++){let t=e*n;for(let e=c;e<n-c;e++)if(g[t+e]){if(r&&o[t+e])continue;a[t+e]=f[t+e],o[t+e]=255}}}var ws;let As=ws=class extends c{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new ws({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelRows","rows"],reader:(e,t)=>Number(e??t?.kernelRows??3)}}})],As.prototype,"rows",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelCols","cols"],reader:(e,t)=>Number(e??t?.kernelCols??3)}}})],As.prototype,"cols",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],As.prototype,"fillNoDataOnly",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:{source:["statisticsType","type"],reader:(e,t)=>fs.fromJSON(t?.statisticsType??t?.type)??"min"},write:{target:"type"}}}),(0,Ye.e)(fs)],As.prototype,"statisticsType",void 0),As=ws=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunctionArguments")],As);const vs=As;let bs=class extends w{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{type:e}=this.functionArguments.toJSON();if(e<1||e>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${e}`};let t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(t.pixelType);let r=t.clone();r.pixelType=this.outputPixelType;let{statisticsType:s}=this.functionArguments;return"stddev"===s&&this._removeStatsHistColormapVAT(r),this.rasterInfo=r,{success:!0,supportsGPU:r.bandCount<=3&&e<5}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return t;let{statisticsType:r,rows:s,cols:n,fillNoDataOnly:i}=this.functionArguments;return function(e,t){let{mask:r}=e,{fillNoDataOnly:s}=t;if(s&&!r)return e;let{pixels:n,width:i,height:o,bandMasks:a,pixelType:l}=e,u=n.length,p=i*o,c=[],{kernelRows:h,kernelCols:m,statisticsType:f,mirrorEdges:d}=t;if(s&&!r)return e;let y=t.outputPixelType??l,x=[];for(let e=0;e<u;e++){let l=n[e],u=g.A.createEmptyBand(y,p);s&&u.set(l);let w=(a?.[e]??r)?.slice()??null,A={band:l,width:i,height:o,mask:w,outBand:u};switch(f){case"min":case"max":ds(A,t);break;case"mean":case"stddev":gs(A,t);break;case"median":ys(A,t);break;case"majority":case"minority":xs(A,t)}d&&!s&&Yt(u,i,o,h,m),c.push(u),w&&x.push(w)}let w=x[0]??r;x.length!==u&&(x.length=0),u>1&&a?.length&&(w=g.A.combineBandMasks(a));let A=new g.A({pixelType:y,width:i,height:o,pixels:c,bandMasks:a&&x.length?x:null,mask:w});return A.updateStatistics(),A}(t,{kernelRows:s,kernelCols:n,fillNoDataOnly:i,outputPixelType:this.outputPixelType,statisticsType:r,mirrorEdges:!0})}_getWebGLParameters(){let{rows:e,cols:t,statisticsType:r,fillNoDataOnly:s}=this.functionArguments;return{fillNoDataOnly:s,kernelRows:e,kernelCols:t,statisticsType:r,clampRange:(0,l.hP)(this.outputPixelType)}}_getNeighborhoodSize(){let{rows:e,cols:t}=this.functionArguments;return{rows:e,cols:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],bs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:vs,json:{write:!0,name:"rasterFunctionArguments"}})],bs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],bs.prototype,"rasterArgumentNames",void 0),bs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunction")],bs);const Cs=bs;var Ms;let Ps=Ms=class extends c{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(e,t){if(!e?.length)return null;let r=[];return e.forEach(e=>{let t={min:e.min,max:e.max,avg:e.avg??e.mean,stddev:e.stddev??e.standardDeviation};r.push(t)}),r}writeStatistics(e,t,r){if(!e?.length)return;let s=[];e.forEach(e=>{let t={...e,mean:e.avg,standardDeviation:e.stddev};delete t.avg,delete t.stddev,s.push(t)}),t[r]=s}clone(){return new Ms({statistics:(0,i.o8)(this.statistics),histograms:(0,i.o8)(this.histograms)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ps.prototype,"statistics",void 0),(0,o.Cg)([(0,yt.w)("statistics")],Ps.prototype,"readStatistics",null),(0,o.Cg)([(0,Ft.K)("statistics")],Ps.prototype,"writeStatistics",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ps.prototype,"histograms",void 0),Ps=Ms=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunctionArguments")],Ps);const Ts=Ps;let Rs=class extends w{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");let t=e.clone(),{statistics:r,histograms:s}=this.functionArguments;return s&&(t.histograms=s),r&&(t.statistics=r),this.rasterInfo=t,{success:!0,supportsGPU:!0}}_processPixels(e){return e.pixelBlocks?.[0]}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Rs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ts,json:{write:!0,name:"rasterFunctionArguments"}})],Rs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Rs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Rs.prototype,"indexedColormap",void 0),(0,o.Cg)([(0,a.MZ)()],Rs.prototype,"isNoopProcess",void 0),Rs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunction")],Rs);const Ns=Rs;var Is;const ks=new Ee.J({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let Ss=Is=class extends c{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(e,t,r){e?.length&&(Array.isArray(e[0])||(e=e.map(e=>[e.min,e.max,e.avg,e.stddev])),t[r]=e)}clone(){return new Is({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:(0,i.o8)(this.statistics),gamma:(0,i.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:(0,i.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Ss.prototype,"computeGamma",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{name:"dra",write:!0}})],Ss.prototype,"dynamicRangeAdjustment",void 0),(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],Ss.prototype,"gamma",void 0),(0,o.Cg)([(0,a.MZ)()],Ss.prototype,"histograms",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ss.prototype,"maxPercent",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ss.prototype,"minPercent",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ss.prototype,"numberOfStandardDeviations",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"max",write:!0}})],Ss.prototype,"outputMax",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"min",write:!0}})],Ss.prototype,"outputMin",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ss.prototype,"sigmoidStrengthLevel",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],Ss.prototype,"statistics",void 0),(0,o.Cg)([(0,Ft.K)("statistics")],Ss.prototype,"writeStatistics",null),(0,o.Cg)([(0,Ye.e)(ks)],Ss.prototype,"stretchType",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Ss.prototype,"useGamma",void 0),Ss=Is=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunctionArguments")],Ss);const _s=Ss;let Fs=class extends w{constructor(){super(...arguments),this.functionName="Stretch",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null,this.cutOffs=null}_bindSourceRasters(){this.lookup=null,this.cutOffs=null;let e=this.sourceRasterInfos[0],{pixelType:t}=e,{functionArguments:r}=this,{dynamicRangeAdjustment:s,gamma:n,useGamma:i}=r;if(!s&&["u8","u16","s8","s16"].includes(t)){let s=(0,qt.DP)(r.toJSON(),{rasterInfo:e}),o=(0,l.zw)(this.outputPixelType)?"round":"float";this.lookup=(0,qt.RP)({pixelType:t,...s,gamma:i?n:null,rounding:o}),this.cutOffs=s}else s||(this.cutOffs=(0,qt.DP)(r.toJSON(),{rasterInfo:e}));this.outputPixelType=this._getOutputPixelType(t);let o=e.clone();o.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(o),"u8"===this.outputPixelType&&(o.keyProperties.DataType="processed");let{outputMin:a=0,outputMax:u=255}=this.functionArguments;o.statistics=[];for(let e=0;e<o.bandCount;e++)o.statistics[e]={min:a,max:u};return this.rasterInfo=o,{success:!0,supportsGPU:!s}}_processPixels(e,t){let r=e.pixelBlocks?.[0];if(null==r)return r;let{lookup:s}=this;if(s)return(0,Ke.eH)(r,{...s,outputPixelType:this.rasterInfo.pixelType});let{functionArguments:n}=this,i=t?.stretchCutoff??this.cutOffs??(0,qt.DP)(n.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:r}),o=n.useGamma?n.gamma:null;return(0,qt._N)(r,{...i,gamma:o,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let{outputMin:e=0,outputMax:t=255,gamma:r,useGamma:s}=this.functionArguments,n=this.rasterInfo.bandCount>=2?3:1,i=s&&r?.length?(0,qt.Nh)(n,r):[1,1,1],{minCutOff:o,maxCutOff:a}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};1===o.length&&(o[1]=o[2]=o[0],a[1]=a[2]=a[0]);let u=a.map((r,s)=>(t-e)/(a[s]-o[s])),p=(0,l.zw)(this.outputPixelType);return{bandCount:n,minOutput:e,maxOutput:t,minCutOff:o,maxCutOff:a,factor:u,useGamma:s,gamma:s&&r?[r[0],r[1]??r[0],r[2]??r[0]]:[1,1,1],gammaCorrection:s?[i[0],i[1]??i[0],i[2]??i[0]]:[1,1,1],stretchType:this.functionArguments.stretchType,isOutputRounded:p,type:"stretch"}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Fs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:_s,json:{write:!0,name:"rasterFunctionArguments"}})],Fs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Fs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Fs.prototype,"lookup",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Fs.prototype,"cutOffs",void 0),Fs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunction")],Fs);const Bs=Fs;var js;let Zs=js=class extends c{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new js({attributeTableAsRecordSet:(0,i.o8)(this.attributeTableAsRecordSet)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Zs.prototype,"attributeTableAsRecordSet",void 0),Zs=js=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunctionArguments")],Zs);const Gs=Zs;let zs=class extends w{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let e=this.sourceRasterInfos[0];if(e.bandCount>1||e.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};let{attributeTableAsRecordSet:t}=this.functionArguments;if(!t)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(e.pixelType);let r=e.clone();return r.pixelType=this.outputPixelType,r.bandCount=1,"thematic"!==r.dataType&&(r.keyProperties=r.keyProperties?{...r.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=r,{success:!0,supportsGPU:!0}}_processPixels(e){return e.pixelBlocks?.[0]}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],zs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Gs,json:{write:!0,name:"rasterFunctionArguments"}})],zs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],zs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],zs.prototype,"isNoopProcess",void 0),zs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunction")],zs);const Os=zs,Es=new Map;function Ds(e,t){let{rasterFunctionArguments:r}=e;r&&(r.rasters||[r.raster,r.raster2]).forEach(e=>{e&&"number"!=typeof e&&("string"==typeof e?e.startsWith("http")&&(t.includes(e)||t.push(e)):"rasterFunctionArguments"in e&&Ds(e,t))})}function Vs(e,t){t??={};try{if("function"in(e=(0,i.o8)(e))&&"arguments"in e&&e.arguments){let r=qs(e,new Map,t);if(Xs(r),!r.renderingRule)throw new n.A("raster-function-helper","Unsupported raster function json.");e=r.renderingRule}if("rasterFunction"in e){let r=Ws(e=Ls(e),t);return r.isRoot=!0,r}}catch{}throw new n.A("raster-function-helper","unsupported raster function json.")}function Us(e){return!!(e&&"object"==typeof e&&e.rasterFunction&&e.rasterFunctionArguments)}function Ls(e){let{rasterFunction:t,rasterFunctionArguments:r}=e,s={};for(let e in r){let t=r[e],n=e.toLowerCase();if("rasters"===n&&Array.isArray(t))s.rasters=t.map(e=>Us(e)?Ls(e):e);else switch(Us(t)&&(t=Ls(t)),n){case"dra":s.dra=t;break;case"pspower":s.psPower=t;break;case"pszfactor":s.psZFactor=t;break;case"bandids":s.bandIds=t;break;default:s[e[0].toLowerCase()+e.slice(1)]=t}}return"Local"===t&&!s.rasters?.length&&(s.rasters=["$$"]),{...e,rasterFunctionArguments:s}}function Ws(e,t){let{rasterFunction:r,rasterFunctionArguments:s}=e,i=e.outputPixelType?.toLowerCase();if(null==r||!Es.has(r))throw new n.A("raster-function-helper",`unsupported raster function: ${r}`);let o=Es.get(r),a=("function"==typeof o.ctor?o.ctor:o.ctor.default).fromJSON({...e,outputPixelType:i}),{rasterArgumentNames:l}=a,u=[],p=function(e,t){return"rasters"===t[0]&&Array.isArray(e.rasters)?e.rasters:t.map(t=>e[t])}(s,l),c="rasters"===l[0]||l.length>1,h=[];for(let e=0;e<p.length;e++){let r,s=p[e];null==s||"string"==typeof s&&s.startsWith("$")?u.push(t?.raster):"string"==typeof s?t[s]&&u.push(t[s]):"number"!=typeof s&&"rasterFunction"in s&&(r=Ws(s,t),c||(a.functionArguments[l[e]]=r),u.push(r)),c&&h.push(r??s)}if(c&&("rasters"===l[0]?a.functionArguments.rasters=h:l.forEach((e,t)=>{a.functionArguments[e]=h[t]})),t){a.sourceRasters=u;let e=t.raster?.url;e&&(a.mainPrimaryRasterId=e)}return a}function Ks(e,t){if(e&&t)for(let r in e){let s=e[r];s&&"object"==typeof s&&"type"in s&&("RasterFunctionTemplate"===s.type?Ks(s.arguments,t):"RasterFunctionVariable"===s.type&&null!=t[s.name]&&(s.value=t[s.name]))}}function $s(e,t){if(!e||"object"!=typeof e)return e;let{value:r}=e;if(!r||"object"!=typeof r)return e.isDataset?"$$":r;if(Array.isArray(r))return 0===r.length?[]:r.map(e=>e&&"object"==typeof e&&"RasterFunctionVariable"===e.type?$s(e,t):e);if("value"in r&&["number","string","boolean"].includes(typeof r.value))return r.value;if(e.isDataset&&"Scalar"!==r.type)return"$$";if(!("type"in r))return r;let s=r;switch(r.type){case"Scalar":s=r.value;break;case"AlgorithmicColorRamp":s=Hs(r);break;case"MultiPartColorRamp":s={type:"multipart",colorRamps:r.ArrayOfColorRamp.map(Hs)};break;case"ArgumentArray":if(r.elements?.length&&"RasterStatistics"!==r.elements[0].type){let e=[];for(let s=0;s<r.elements.length;s++){let i=r.elements[s],{type:o}=i;if(o)if("RasterFunctionTemplate"===o){let{renderingRule:r}=qs(i,t);e.push(r),null!=i._object_id&&t.set(i._object_id,r)}else{if("RasterFunctionVariable"!==o)throw new n.A("raster-function-helper","unsupported raster function json.");{let r=$s(i,t);e.push(r),null!=i._object_id&&t.set(i._object_id,r)}}else e.push(i)}s=e}else s=r.elements}return null!=r._object_id&&t.set(r._object_id,s),s}function Hs(e){let t=e.algorithm??"esriHSVAlgorithm",{FromColor:r,ToColor:n}=e;if(!Array.isArray(r)){let{r:e,g:t,b:n}=(0,s.$)({h:r.Hue,s:r.Saturation,v:r.Value});r=[e,t,n,r.AlphaValue]}if(!Array.isArray(n)){let{r:e,g:t,b:r}=(0,s.$)({h:n.Hue,s:n.Saturation,v:n.Value});n=[e,t,r,n.AlphaValue]}return{type:"algorithmic",algorithm:t,fromColor:r,toColor:n}}function qs(e,t,r){r&&Ks(e,r);let s={renderingRule:{},templates:t};return Js(e,s),s}function Js(e,t){if(!e||!t.renderingRule)return;let{renderingRule:r,templates:s}=t,{function:n,arguments:i,_object_id:o}=e;if(!n||!i)return;null!=o&&s.set(o,r),r.rasterFunction=n.type.replace("Function",""),r.outputPixelType=n.pixelType;let a={};r.rasterFunctionArguments=a;for(let e in i){if("type"===e||"object_id"===e||"_object_ref_id"===e)continue;let t=i[e];!t||"object"!=typeof t||!("type"in t)||"RasterFunctionTemplate"!==t.type&&"RasterFunctionVariable"!==t.type?a[e]=t:("RasterFunctionVariable"===t.type?a[e]=$s(t,s):(r.rasterFunctionArguments[e]={},Js(t,{renderingRule:r.rasterFunctionArguments[e],templates:s})),null!=t._object_id&&s.set(t._object_id,a[e]))}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),r.rasterFunction){case"Stretch":!function(e){e.Statistics?.length&&"object"==typeof e.Statistics&&(e.Statistics=e.Statistics.map(e=>[e.min,e.max,e.mean,e.standardDeviation])),null!=e.NumberOfStandardDeviation&&(e.NumberOfStandardDeviations=e.NumberOfStandardDeviation,delete e.NumberOfStandardDeviation)}(a);break;case"Colormap":!function(e){"randomcolorramp"===e.ColorRamp?.type?.toLowerCase()&&(delete e.ColorRamp,e.ColormapName="Random"),0===e.ColorSchemeType&&delete e.ColorRamp}(a);break;case"Convolution":!function(e){null!=e.ConvolutionType&&(e.Type=e.ConvolutionType,delete e.ConvolutionType)}(a);break;case"Mask":!function(e){e.NoDataValues?.length&&"string"==typeof e.NoDataValues[0]&&(e.NoDataValues=e.NoDataValues.filter(e=>""!==e).map(e=>Number(e)))}(a)}}function Xs(e){let{renderingRule:t,templates:r}=e;if("object"!=typeof t||!t?.rasterFunctionArguments||!r.size)return;let{rasterFunctionArguments:s}=t;for(let e in s){let t=s[e],i="_object_ref_id"===e?t:t&&"object"==typeof t&&"_object_ref_id"in t?t._object_ref_id:null;if(null!=i){if(!r.has(i))throw new n.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${i} does not exist`);let t=r.get(i);"_object_ref_id"===e?t&&"object"==typeof t&&Object.assign(s,t):s[e]=t}else t&&"object"==typeof t&&(t.rasterFunctionArguments&&Xs({renderingRule:t,templates:r}),Array.isArray(t)&&t.forEach((e,s)=>{if(e&&"object"==typeof e)if(null!=e._object_ref_id){if(!r.has(e._object_ref_id))throw new n.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${t} does not exist`);let o=r.get(i);o&&"object"==typeof o?Object.assign(e,o):t[s]=o}else Xs({renderingRule:e,templates:r})}))}}Es.set("Arithmetic",{desc:"Arithmetic Function",ctor:Fe,rasterArgumentNames:["rasters"]}),Es.set("Aspect",{desc:"Aspect Function",ctor:Oe,rasterArgumentNames:["raster"]}),Es.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:st,rasterArgumentNames:["raster"]}),Es.set("Colormap",{desc:"Colormap Function",ctor:Mt,rasterArgumentNames:["raster"]}),Es.set("ColormapToRGB",{desc:"ColormapToRGB Function",ctor:St,rasterArgumentNames:["raster"]}),Es.set("CompositeBand",{desc:"CompositeBand Function",ctor:Gt,rasterArgumentNames:["rasters"]}),Es.set("ComputeChange",{desc:"ComputeChange Function",ctor:Wt,rasterArgumentNames:["rasters"]}),Es.set("Convolution",{desc:"Convolution Function",ctor:or,rasterArgumentNames:["raster"]}),Es.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Xt,rasterArgumentNames:["raster"]}),Es.set("ExtractBand",{desc:"ExtractBand Function",ctor:yr,rasterArgumentNames:["raster"]}),Es.set("Curvature",{desc:"Curvature Function",ctor:hr,rasterArgumentNames:["raster"]}),Es.set("Hillshade",{desc:"Hillshade Function",ctor:kr,rasterArgumentNames:["raster"]}),Es.set("ShadedRelief",{desc:"ShadedRelief Function",ctor:rs,rasterArgumentNames:["raster"]}),Es.set("Grayscale",{desc:"Grayscale Function",ctor:Cr,rasterArgumentNames:["raster"]}),Es.set("Clip",{desc:"Clip Function",ctor:mt,rasterArgumentNames:["raster"]}),Es.set("Local",{desc:"Local Function",ctor:jr,rasterArgumentNames:["rasters"]}),Es.set("Mask",{desc:"Mask Function",ctor:Dr,rasterArgumentNames:["raster"]}),Es.set("NDVI",{desc:"NDVI Function",ctor:Kr,rasterArgumentNames:["raster"]}),Es.set("Remap",{desc:"Remap Function",ctor:Xr,rasterArgumentNames:["raster"]}),Es.set("Slope",{desc:"Slope Function",ctor:ls,rasterArgumentNames:["raster"]}),Es.set("SpectralConversion",{desc:"Spectral Conversion",ctor:ms,rasterArgumentNames:["raster"]}),Es.set("Statistics",{desc:"Focal Statistics Function",ctor:Cs,rasterArgumentNames:["raster"]}),Es.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:Ns,rasterArgumentNames:["raster"]}),Es.set("Stretch",{desc:"Stretch Function",ctor:Bs,rasterArgumentNames:["raster"]}),Es.set("Table",{desc:"Attribute Table Function",ctor:Os,rasterArgumentNames:["raster"]})},37373(e,t,r){r.d(t,{DO:()=>z,FT:()=>B,Hh:()=>b,OM:()=>G,Ps:()=>V,Wo:()=>C,_I:()=>P,_l:()=>S,l0:()=>O,t$:()=>U,uk:()=>_});var s=r(4576),n=r(49186),i=r(86211),o=r(5443),a=r(83290),l=r(86738),u=r(39829),p=r(99917),c=r(16930),h=r(21325);function m(){if(!v)throw new n.A("rasterprojectionhelper-project","projection operator is not loaded")}const f=(e,t,r,s=0)=>{if(1===r[0])return[0,0];let n=1,i=-1,o=1,a=-1;for(let t=0;t<e.length;t+=2)isNaN(e[t])||(n=n>e[t]?e[t]:n,i=i>e[t]?i:e[t],o=o>e[t+1]?e[t+1]:o,a=a>e[t+1]?a:e[t+1]);let{cols:l,rows:u}=t,p=(i-n)/l/r[0],c=(a-o)/u/r[1],h=2*s,m=0,f=!1,g=[0,0];for(let t=0;t<l-3;t++){for(let r=0;r<u-3;r++){let s=t*u*2+2*r,n=(e[s]+e[s+4]+e[s+4*u]+e[s+4*u+4])/4,i=(e[s+1]+e[s+5]+e[s+4*u+1]+e[s+4*u+5])/4,o=Math.abs((n-e[s+2*u+2])/p),a=Math.abs((i-e[s+2*u+3])/c);if(o+a>m&&(m=o+a,g=[o,a]),h&&m>h){f=!0;break}}if(f)break}return g},g={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},d=new Map,y=new Map;let x,w,A,v=!1;async function b(){return x||(x=Promise.withResolvers(),w=await r.e(3276).then(()=>r(83276)),A=await r.e(2158).then(()=>r(12158)),w.projectIsLoaded()||await w.projectLoad(),A.isLoaded()||await A.load(),v=!0,x.resolve()),x.promise}function C(e,t,r,s){let n=e.spatialReference;if(!n||!t||n.equals(t))return e;m();let a=r.center,l=new o.A({xmin:a.x-e.x/2,xmax:a.x+e.x/2,ymin:a.y-e.y/2,ymax:a.y+e.y/2,spatialReference:n}),u=w.projectExecute(l,t,{geographicTransformation:s}),p=B(t);return null==u||null!=p&&u.width>=p?function(e,t,r){let s=(0,i.GA)(t)/(0,i.GA)(r);return{x:e.x*s,y:e.y*s}}(e,n,t):{x:u.width,y:u.height}}function M(e,t=.01){return(0,i.GA)(e)?t/(0,i.GA)(e):0}function P(e,t,r,s=!0){let n=e.spatialReference;if(n.equals(t))return e;m();let i=w.projectExecute(e,t,{geographicTransformation:r});return!s||!i||T([e],[i],n,t),i}function T(e,t,r,s){let n=j(r,!0),i=j(s,!0),o=M(r,500),a=M(s,500);if(o&&null!=n&&null!=i)for(let r=0;r<e.length;r++){let s=t[r];if(!s)continue;let{x:l}=e[r],{x:u}=s;u>=i[1]-a&&Math.abs(l-n[0])<o?s.x-=i[1]-i[0]:u<=i[0]+a&&Math.abs(l-n[1])<o&&(s.x+=i[1]-i[0])}}function R(e){let{inSR:t,outSR:r,preferPE:s}=e;if(t.equals(r)){let{points:t}=k(e,null);return t}return t.isWebMercator&&r.isWGS84||t.isWGS84&&r.isWebMercator?function(e){let{cols:t,rows:r,xres:s,yres:n,usePixelCenter:i,inSR:o,outSR:a}=e,{xmin:u,ymax:c}=e;i&&(u+=s/2,c-=n/2);let h=[],m=[],f=Math.max(t,r);for(let e=0;e<f;e++){let i=u+s*Math.min(t,e),f=c-n*Math.min(r,e),g=(0,p.projectWithoutEngine)(new l.A({x:i,y:f,spatialReference:o}),o,a);e<=t&&h.push(g.x),e<=r&&m.push(g.y)}let g=[];for(let e=0;e<t;e++)for(let t=0;t<r;t++)g.push([h[e],m[t]]);return g}(e):s&&(t.isGeographic||null!=N(t))?function(e){let{inSR:t,outSR:r,datumTransformation:s}=e,{points:n,mask:i}=k(e,N(t));if(!t.isGeographic){let e=t.wkid?a.P.coordsys(t.wkid):a.P.fromString(t.isGeographic?a.a.PE_TYPE_GEOGCS:a.a.PE_TYPE_PROJCS,t.wkt2||t.wkt);a.c.projToGeog(e,n.length,n)}if(null!=s&&s.steps.length){let e,t=179.9955;if(r.isGeographic&&(e=n.map(([e])=>e>t?1:e<-179.9955?-1:0)),s.steps.forEach(e=>{let t=e.wkid?a.P.geogtran(e.wkid):a.P.fromString(a.a.PE_TYPE_GEOGTRAN,e.wkt);a.d.geogToGeog(t,n.length,n,null,e.isInverse?a.a.PE_TRANSFORM_2_TO_1:a.a.PE_TRANSFORM_1_TO_2)}),e)for(let r=0;r<n.length;r++){let s=e[r],i=n[r][0],o=i>t?1:i<-179.9955?-1:0;s&&o&&s!==o&&(n[r][0]=s>0?i+360:i-360)}}if(!r.isGeographic){let e=N(r,!0);!function(e,t){let[r,s]=t;for(let t=0;t<e.length;t++){let n=e[t][1];(n<r||n>s)&&(e[t]=[NaN,NaN])}}(n,null!=e&&e.isEnvelope?[e.bbox[1],e.bbox[3]]:[-90,90]);let t=r.wkid?a.P.coordsys(r.wkid):a.P.fromString(r.isGeographic?a.a.PE_TYPE_GEOGCS:a.a.PE_TYPE_PROJCS,r.wkt2||r.wkt);a.c.geogToProj(t,n.length,n)}let o=n;if(i&&n.length!==i.length){o=[];for(let e=0,t=0;e<i.length;e++)i[e]?o.push(n[t++]):o.push([NaN,NaN])}return o}(e):function(e){let{points:t}=k(e,null),{inSR:r,outSR:s,datumTransformation:n}=e,i=t.map(e=>new l.A({x:e[0],y:e[1],spatialReference:r})),o=w.projectExecuteMany(i,s,{geographicTransformation:n});return n&&T(i,o,r,s),o.map(e=>e?[e.x,e.y]:[NaN,NaN])}(e)}function N(e,t=!1){let r=e.wkid||e.wkt2||e.wkt;if(!r||e.isGeographic)return null;if(r=String(r),d.has(r)){let e=d.get(r);return t?e?.gcs:e?.pcs}let s=e.wkid?a.P.coordsys(e.wkid):a.P.fromString(e.isGeographic?a.a.PE_TYPE_GEOGCS:a.a.PE_TYPE_PROJCS,e.wkt2||e.wkt),n=I(s,M(e,1e-4)),i=I(s,0,!0);return d.set(r,{pcs:n,gcs:i}),t?i:n}function I(e,t=0,r=!1){let s=a.b.generate(e),n=r?e.horizonGcsGenerate():e.horizonPcsGenerate();if(!s||!n?.length)return null;let i=!1,o=n.find(e=>1===e.getInclusive()&&1===e.getKind());if(!o){if(o=n.find(e=>1===e.getInclusive()&&0===e.getKind()),!o)return null;i=!0}let l=r?0:+(2===s.getNorthPoleLocation())|(2===s.getSouthPoleLocation()?2:0),u=s.isPannableRectangle(),p=o.getCoord();if(i)return{isEnvelope:i,isPannable:u,vertices:p,coef:null,bbox:[p[0][0]-t,p[0][1]-t,p[1][0]+t,p[1][1]+t],poleLocation:l};let c=0,h=[],[m,f]=p[0],[g,d]=p[0];for(let e=0,t=p.length;e<t;e++){c++,c===t&&(c=0);let[r,s]=p[e],[n,i]=p[c];if(i===s)h.push([r,n,s,i,2]);else{let e=(n-r)/(i-s||1e-4),t=r-e*s;s<i?h.push([e,t,s,i,0]):h.push([e,t,i,s,1])}m=m<r?m:r,f=f<s?f:s,g=g>r?g:r,d=d>s?d:s}return{isEnvelope:!1,isPannable:u,vertices:p,coef:h,bbox:[m,f,g,d],poleLocation:l}}function k(e,t){let r=[],{cols:s,rows:n,xres:i,yres:o,usePixelCenter:a}=e,{xmin:l,ymax:u}=e;if(a&&(l+=i/2,u-=o/2),null==t){for(let e=0;e<s;e++)for(let t=0;t<n;t++)r.push([l+i*e,u-o*t]);return{points:r}}let p=new Uint8Array(s*n);if(t.isEnvelope){let{isPannable:e,bbox:[a,c,h,m]}=t;for(let t=0,f=0;t<s;t++){let s=l+i*t,g=e||s>=a&&s<=h;for(let e=0;e<n;e++,f++){let t=u-o*e;g&&t>=c&&t<=m&&(r.push([s,t]),p[f]=1)}}return{points:r,mask:p}}let c=t.coef,h=[];for(let e=0;e<n;e++){let t=u-o*e,r=[],s=[];for(let e=0;e<c.length;e++){let[n,i,o,a,l]=c[e];if(t===o&&o===a)r.push(n),r.push(i),s.push(2),s.push(2);else if(t>=o&&t<=a){let e=n*t+i;r.push(e),s.push(l)}}let n=r;if(r.length>2){let e=2===s[0]?0:s[0],t=r[0];n=[];for(let i=1;i<s.length;i++)(2!==s[i]||i===s.length-1)&&(s[i]!==e&&(n.push(0===e?Math.min(t,r[i-1]):Math.max(t,r[i-1])),e=s[i],t=r[i]),i===s.length-1&&n.push(0===s[i]?Math.min(t,r[i]):Math.max(t,r[i])));n.sort((e,t)=>e-t)}else r[0]>r[1]&&(n=[r[1],r[0]]);h.push(n)}for(let e=0,t=0;e<s;e++){let s=l+i*e;for(let e=0;e<n;e++,t++){let n=u-o*e,i=h[e];if(2===i.length)s>=i[0]&&s<=i[1]&&(r.push([s,n]),p[t]=1);else if(i.length>2){let e=!1;for(let t=0;t<i.length;t+=2)if(s>=i[t]&&s<=i[t+1]){e=!0;break}e&&(r.push([s,n]),p[t]=1)}}}return{points:r,mask:p}}function S(e,t,r=null,n=!0){let i=e.spatialReference;if(i.equals(t)||!t)return e;let a=G(e),l=B(i,!0),p=B(t);if(0===a||null==l||null==p){let s=F(e,t,r,n);if(s&&null==l&&null!=p&&Math.abs(s.width-p)<M(t)&&w.projectIsLoaded()){let r=N(i);if(null!=r&&0===r.poleLocation&&e.width<(r.bbox[2]-r.bbox[0])/2)return function(e,t){let r=B(t);if(null==r)return null;let{xmin:s,ymin:n,xmax:i,ymax:a}=e,l=e.spatialReference,p=new u.A({spatialReference:l,rings:[[[s,n],[i,n],[i,a],[s,a],[s,n]]]}),c=w.projectExecute(p,t);if(2!==c.rings.length||!c.rings[0].length||!c.rings[1].length)return null;let{rings:h}=c,m=M(l),f=new o.A({spatialReference:t});for(let e=0;e<2;e++){s=i=h[e][0][0],n=a=h[e][0][1];for(let t=0;t<h[e].length;t++)s=s>h[e][t][0]?h[e][t][0]:s,i=i<h[e][t][0]?h[e][t][0]:i,n=n>h[e][t][1]?h[e][t][1]:n,a=a<h[e][t][1]?h[e][t][1]:a;if(0===e)f.ymin=n,f.ymax=a,f.xmin=s,f.xmax=i;else if(f.ymin=Math.min(f.ymin,n),f.ymax=Math.max(f.ymax,a),Math.abs(i-r/2)<m)f.xmin=s,f.xmax+=r;else{if(!(Math.abs(s+r/2)<m))return null;f.xmax=i+r}}return f}(e,t)||s}return s}let c=e.clone().normalize();if(1===c.length&&e.xmax<l&&e.xmax-l/2>M(i)){let{xmin:t,xmax:r}=e;for(let s=0;s<=a;s++){let n=0===s?t:-l/2,u=s===a?r-l*s:l/2;c[s]=new o.A({xmin:n,xmax:u,ymin:e.ymin,ymax:e.ymax,spatialReference:i})}}let h=c.map(e=>F(e,t,r,n)).filter(s.Ru);return 0===h.length?null:function(e,t){let r=B(e[0].spatialReference);if(e.length<2||null==r||(t??=M(e[0].spatialReference),1===(e=e.filter(e=>e.width>t)).length))return e[0];let{xmin:s,xmax:n,ymin:i,ymax:a}=e[0];for(let t=1;t<e.length;t++){let s=e[t];n=s.xmax+r*t,i=Math.min(i,s.ymin),a=Math.max(a,s.ymax)}return new o.A({xmin:s,xmax:n,ymin:i,ymax:a,spatialReference:e[0].spatialReference})}(h)}function _(e,t,r){if("extent"===e.type){let{xmin:t,ymin:r,xmax:s,ymax:n,spatialReference:i}=e;e=new u.A({rings:[[[t,n],[s,n],[s,r],[t,r],[t,n]]],spatialReference:i})}return e.spatialReference.equals(t)?e:(m(),w.projectExecute(e,t,{geographicTransformation:r}))}function F(e,t,r,s=!0,n=!0){let i=e.spatialReference;if(i.equals(t)||!t)return e;m();let o=w.projectExecute(e,t,{geographicTransformation:r});if(n&&t.isWebMercator&&o&&(o.ymax=Math.min(20037508.342787,o.ymax),o.ymin=Math.max(-20037508.342787,o.ymin),o.ymin>=o.ymax))return null;if(!s||!o)return o;let a=j(i,!0),u=j(t,!0);if(null==a||null==u)return o;let p=M(i,.001),c=M(i,500),h=M(t,.001);if(Math.abs(o.xmin-u[0])<h&&Math.abs(o.xmax-u[1])<h){let s=Math.abs(e.xmin-a[0]),n=Math.abs(a[1]-e.xmax);if(s<p&&n>c){o.xmin=u[0];let s=[];s.push(new l.A({x:e.xmax,y:e.ymin,spatialReference:i})),s.push(new l.A({x:e.xmax,y:(e.ymin+e.ymax)/2,spatialReference:i})),s.push(new l.A({x:e.xmax,y:e.ymax,spatialReference:i}));let n=s.map(e=>P(e,t,r)).filter(e=>!isNaN(e?.x)).map(e=>e.x);o.xmax=Math.max.apply(null,n)}if(n<p&&s>c){o.xmax=u[1];let s=[];s.push(new l.A({x:e.xmin,y:e.ymin,spatialReference:i})),s.push(new l.A({x:e.xmin,y:(e.ymin+e.ymax)/2,spatialReference:i})),s.push(new l.A({x:e.xmin,y:e.ymax,spatialReference:i}));let n=s.map(e=>P(e,t,r)).filter(e=>!isNaN(e?.x)).map(e=>e.x);o.xmin=Math.min.apply(null,n)}}else{let e=M(t,.001);Math.abs(o.xmin-u[0])<e&&(o.xmin=u[0]),Math.abs(o.xmax-u[1])<e&&(o.xmax=u[1])}return o}function B(e,t=!1){if(!e)return null;let r=t?20037508.342787:20037508.342788905;return e.isWebMercator?2*r:e.wkid&&e.isGeographic?360:2*g[e.wkid]||null}function j(e,t=!1){if(e.isGeographic)return[-180,180];let r=B(e,t);return r?[-r/2,r/2]:null}function Z(e,t,r,s){let n=(e-t)/r;return n-Math.floor(n)===0?s&&--n:n=Math.floor(n),n}function G(e,t=!1){let r=B(e.spatialReference);if(null==r)return 0;let s=t?0:-r/2,n=M(e.spatialReference),i=!t&&Math.abs(e.xmax-r/2)<n?r/2:e.xmax,o=!t&&Math.abs(e.xmin+r/2)<n?-r/2:e.xmin;return Z(i,s,r,!0)-Z(o,s,r,!1)}function z(e){let t=e.storageInfo.origin.x,r=B(e.spatialReference,!0);if(null==r)return{originX:t,halfWorldWidth:null,pyramidsInfo:null};let s=r/2,{nativePixelSize:n,storageInfo:i,extent:o}=e,{maximumPyramidLevel:a,blockWidth:l,pyramidBlockWidth:u,pyramidScalingFactor:p}=i,c=n.x,h=[],m=null!=e.transform&&"gcs-shift"===e.transform.type,f=Math.max(0,t+(m?0:s));for(let e=0;e<=a;e++){let s=0===e?l:u??l,n=(o.xmax-t)/c/s,i=n-Math.floor(n)===0?n:Math.ceil(n),a=Math.round(f/c),m=Math.round(r/c)-a,g=Math.ceil(m/s),d=Math.floor(a/s),y=a%s,x=(s-m%s)%s;h.push({resolutionX:c,blockWidth:s,datasetColumnCount:i,worldColumnCountFromOrigin:g,leftMargin:y,rightPadding:x,originColumnOffset:d}),c*=p}return{originX:t,halfWorldWidth:s,pyramidsInfo:h,hasGCSSShiftTransform:m}}function O(e){let t=e.isAdaptive&&null==e.spacing,r=e.spacing||[32,32],s=E(e),n={cols:s.size[0]+1,rows:s.size[1]+1},i=s.outofBoundPointCount>0&&s.outofBoundPointCount<s.offsets.length/2,o=s.outofBoundPointCount===s.offsets.length/2||t&&i?[0,0]:f(s.offsets,n,r,4),l=(o[0]+o[1])/2,u=e.projectedExtent.spatialReference,p=e.srcBufferExtent.spatialReference;if(t&&(i||l>4)&&(u.isGeographic||N(u),r=[4,4],s=E({...e,spacing:r}),n={cols:s.size[0]+1,rows:s.size[1]+1},o=f(s.offsets,n,r,4)),s.error=o,r[0]>1&&(s.coefficients=D(s.offsets,n,i)),e.includeGCSGrid&&!u.isGeographic&&!u.isWebMercator)if(p.isGeographic)s.gcsGrid={offsets:s.offsets,coefficients:s.coefficients,spacing:r};else{let t=N(u);if(null!=t&&!t.isEnvelope){let t=function(e){if(!e||e.isGeographic)return e;let t,r=String(e.wkid||e.wkt2||e.wkt);return y.has(r)?t=y.get(r):(t=(e.wkid?a.P.coordsys(e.wkid):a.P.fromString(a.a.PE_TYPE_PROJCS,e.wkt2||e.wkt)).getGeogcs().getCode(),y.set(r,t)),new c.A({wkid:t})}(u),o=S(e.projectedExtent,t),{offsets:l}=E({...e,srcBufferExtent:o,spacing:r}),p=D(l,n,i);s.gcsGrid={offsets:l,coefficients:p,spacing:r}}}return s}function E(e){let{projectedExtent:t,srcBufferExtent:r,pixelSize:s,datumTransformation:n,rasterTransform:i}=e,o=t.spatialReference,a=r.spatialReference;m();let u,{xmin:p,ymin:c,xmax:h,ymax:f}=t,g=B(a),d=null!=g&&(e.hasWrapAround||"gcs-shift"===i?.type),y=e.spacing||[32,32],x=y[0]*s.x,w=y[1]*s.y,A=1===y[0],v=Math.ceil((h-p)/x-.1/y[0])+ +!A,b=Math.ceil((f-c)/w-.1/y[1])+ +!A,C=R({cols:v,rows:b,xmin:p,ymax:f,xres:x,yres:w,inSR:o,outSR:a,datumTransformation:n,preferPE:y[0]<=4,usePixelCenter:A}),P=[],T=0,I=A?-1:NaN,{xmin:k,xmax:S,ymax:_,width:F,height:j}=r,Z=M(a,500),G=null!=g&&k>0&&S>g/2,z=N(o),O=null!=z&&z.poleLocation>0;for(let e=0;e<v;e++){let t=[];for(let r=0;r<b;r++){let s=C[e*b+r];if(d&&s[0]>S&&s[0]>g/2-Z?s[0]-=g:d&&0===e&&s[0]<0&&G&&!i&&(s[0]+=g),!s||isNaN(s[0])||isNaN(s[1]))P.push(I),P.push(I),t.push(null),T++;else{if(i){let e=i.inverseTransform(new l.A({x:s[0],y:s[1],spatialReference:a}));s=[e.x,e.y]}t.push(s),e>0&&d&&u[r]&&s[0]<u[r][0]&&(s[0]+=g,O&&s[0]>S&&s[0]>g&&(s[0]-=g)),P.push((s[0]-k)/F),P.push((_-s[1])/j)}}u=t}return{offsets:P,error:null,coefficients:null,outofBoundPointCount:T,spacing:y,size:A?[v,b]:[v-1,b-1]}}function D(e,t,r){let{cols:s,rows:n}=t,i=new Float32Array((s-1)*(n-1)*2*6),o=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let t=0;t<s-1;t++){for(let r=0;r<n-1;r++){let l=t*n*2+2*r,u=e[l],p=e[l+1],c=e[l+2],h=e[l+3];l+=2*n;let m=e[l],f=e[l+1],g=e[l+2],d=e[l+3],y=0,x=12*(r*(s-1)+t);for(let e=0;e<3;e++)i[x++]=o[y++]*u+o[y++]*c+o[y++]*g;y=0;for(let e=0;e<3;e++)i[x++]=o[y++]*p+o[y++]*h+o[y++]*d;y=0;for(let e=0;e<3;e++)i[x++]=a[y++]*u+a[y++]*m+a[y++]*g;y=0;for(let e=0;e<3;e++)i[x++]=a[y++]*p+a[y++]*f+a[y++]*d}if(r)for(let e=0;e<i.length;e++)isNaN(i[e])&&(i[e]=-1)}return i}function V(e){let{spatialReference:t}=e,r=(0,h.Vp)(t);if(!r)return e;let[s,n]=r.valid,i=n-s,a=0;if(e.xmin<s){let t=s-e.xmin;a=Math.ceil(t/i)}else if(e.xmin>n){let t=e.xmin-n;a=-Math.ceil(t/i)}return new o.A({spatialReference:e.spatialReference,xmin:e.xmin+a*i,ymin:e.ymin,xmax:e.xmax+a*i,ymax:e.ymax})}function U(e,t,r){let{storageInfo:s,pixelSize:n}=t,o=0,a=!1,{pyramidResolutions:u}=s,p="mixed"===s.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,s.tileInfo.dpi/96)):1,c=(e.x+e.y)/2/p;if(null!=u&&u.length){let e=u[u.length-1],s=(e.x+e.y)/2,p=(n.x+n.y)/2;if(c<=p)o=0;else if(c>=s)o=u.length,a=c/s>8;else{let e,t=p;for(let s=1;s<=u.length;s++){if(e=(u[s-1].x+u[s-1].y)/2,c<=e){c===e?o=s:"down"===r?(o=s-1,a=c/t>8):o="up"===r||c-t>e-c||c/t>2?s:s-1;break}t=e}}let h=0===o?n:u[o-1];return a&&Math.min(h.x,h.y)*(0,i.GA)(t.spatialReference)>19567&&(a=!1),{pyramidLevel:o,pyramidResolution:new l.A({x:h.x,y:h.y,spatialReference:t.spatialReference}),excessiveReading:a}}let h=Math.log(e.x/n.x)/Math.LN2,m=Math.log(e.y/n.y)/Math.LN2,f=t.storageInfo.maximumPyramidLevel||0;o="down"===r?Math.floor(Math.min(h,m)):"up"===r?Math.ceil(Math.max(h,m)):Math.round((h+m)/2),o<0?o=0:o>f&&(a=o>f+3,o=f);let g=2**o;return{pyramidLevel:o,pyramidResolution:new l.A({x:g*t.nativePixelSize.x,y:g*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:a}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[9013],{29013(a,r,e){async function t(a={}){var r,e=a,t="./this.program",n="";try{n=new URL(".","").href}catch{}r=async a=>{if((a=await fetch(a,{credentials:"same-origin"})).ok)return a.arrayBuffer();throw Error(a.status+" : "+a.url)};var o,i,s,u,f,l,h,c,w,d,v,p,m,b,y,g=console.log.bind(console),$=console.error.bind(console),A=!1,k=!1;function C(){var a=Qr.buffer;f=new Int8Array(a),h=new Int16Array(a),l=new Uint8Array(a),c=new Uint16Array(a),w=new Int32Array(a),d=new Uint32Array(a),v=new Float32Array(a),p=new Float64Array(a),m=new BigInt64Array(a),b=new BigUint64Array(a)}function E(a){throw e.onAbort?.(a),$(a="Aborted("+a+")"),A=!0,a=new WebAssembly.RuntimeError(a+". Build with -sASSERTIONS for more info."),u?.(a),a}class x{name="ExitStatus";constructor(a){this.message=`Program terminated with exit(${a})`,this.status=a}}var O=a=>{for(;0<a.length;)a.shift()(e)},T=[],D=[],R=()=>{var a=e.preRun.shift();D.push(a)},S=!0;class P{constructor(a){this.ra=a-24}}var j={},q=a=>{for(;a.length;){var r=a.pop();a.pop()(r)}};function I(a){return this.sa(d[a>>2])}var B={},U={},M={},z=class extends Error{constructor(a){super(a),this.name="InternalError"}},F=(a,r,e)=>{function t(r){if((r=e(r)).length!==a.length)throw new z("Mismatched type converter count");for(var t=0;t<a.length;++t)W(a[t],r[t])}a.forEach(a=>M[a]=r);var n=Array(r.length),o=[],i=0;for(let[a,e]of r.entries())U.hasOwnProperty(e)?n[a]=U[e]:(o.push(e),B.hasOwnProperty(e)||(B[e]=[]),B[e].push(()=>{n[a]=U[e],++i===o.length&&t(n)}));0===o.length&&t(n)},N=a=>{for(var r="";;){var e=l[a++];if(!e)return r;r+=String.fromCharCode(e)}},L=class extends Error{constructor(a){super(a),this.name="BindingError"}};function W(a,r,e={}){return function(a,r,e={}){var t=r.name;if(!a)throw new L(`type "${t}" must have a positive integer typeid pointer`);if(U.hasOwnProperty(a)){if(e.Pb)return;throw new L(`Cannot register type '${t}' twice`)}U[a]=r,delete M[a],B.hasOwnProperty(a)&&(r=B[a],delete B[a],r.forEach(a=>a()))}(a,r,e)}var H=(a,r,e)=>{switch(r){case 1:return e?a=>f[a]:a=>l[a];case 2:return e?a=>h[a>>1]:a=>c[a>>1];case 4:return e?a=>w[a>>2]:a=>d[a>>2];case 8:return e?a=>m[a>>3]:a=>b[a>>3];default:throw TypeError(`invalid integer width (${r}): ${a}`)}},G=a=>{throw new L(a.ma.ta.na.name+" instance already deleted")},J=!1,K=()=>{},_=a=>globalThis.FinalizationRegistry?(J=new FinalizationRegistry(a=>{--(a=a.ma).count.value,0===a.count.value&&(a.xa?a.Ca.Ha(a.xa):a.ta.na.Ha(a.ra))}),_=a=>{var r=a.ma;return r.xa&&J.register(a,{ma:r},a),a},K=a=>{J.unregister(a)},_(a)):(_=a=>a,a);function V(){}var Q=(a,r)=>Object.defineProperty(r,"name",{value:a}),Y={},X=(a,r,e)=>{if(void 0===a[r].ua){var t=a[r];a[r]=function(...t){if(!a[r].ua.hasOwnProperty(t.length))throw new L(`Function '${e}' called with an invalid number of arguments (${t.length}) - expects one of (${a[r].ua})!`);return a[r].ua[t.length].apply(this,t)},a[r].ua=[],a[r].ua[t.Ja]=t}},Z=(a,r,t)=>{if(e.hasOwnProperty(a)){if(void 0===t||void 0!==e[a].ua&&void 0!==e[a].ua[t])throw new L(`Cannot register public name '${a}' twice`);if(X(e,a,a),e[a].ua.hasOwnProperty(t))throw new L(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`);e[a].ua[t]=r}else e[a]=r,e[a].Ja=t};function aa(a,r,e,t,n,o,i,s){this.name=a,this.constructor=r,this.Ma=e,this.Ha=t,this.za=n,this.Kb=o,this.Xa=i,this.Ib=s,this.Vb=[]}var ra=(a,r,e)=>{for(;r!==e;){if(!r.Xa)throw new L(`Expected null or instance of ${e.name}, got an instance of ${r.name}`);a=r.Xa(a),r=r.za}return a},ea=a=>{if(null===a)return"null";var r=typeof a;return"object"===r||"array"===r||"function"===r?a.toString():""+a};function ta(a,r){if(null===r){if(this.lb)throw new L(`null is not a valid ${this.name}`);return 0}if(!r.ma)throw new L(`Cannot pass "${ea(r)}" as a ${this.name}`);if(!r.ma.ra)throw new L(`Cannot pass deleted object as a pointer of type ${this.name}`);return ra(r.ma.ra,r.ma.ta.na,this.na)}function na(a,r){if(null===r){if(this.lb)throw new L(`null is not a valid ${this.name}`);if(this.ab){var e=this.ob();return null!==a&&a.push(this.Ha,e),e}return 0}if(!r||!r.ma)throw new L(`Cannot pass "${ea(r)}" as a ${this.name}`);if(!r.ma.ra)throw new L(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.$a&&r.ma.ta.$a)throw new L(`Cannot convert argument of type ${r.ma.Ca?r.ma.Ca.name:r.ma.ta.name} to parameter type ${this.name}`);if(e=ra(r.ma.ra,r.ma.ta.na,this.na),this.ab){if(void 0===r.ma.xa)throw new L("Passing raw pointer to smart pointer is illegal");switch(this.$b){case 0:if(r.ma.Ca!==this)throw new L(`Cannot convert argument of type ${r.ma.Ca?r.ma.Ca.name:r.ma.ta.name} to parameter type ${this.name}`);e=r.ma.xa;break;case 1:e=r.ma.xa;break;case 2:if(r.ma.Ca===this)e=r.ma.xa;else{var t=r.clone();e=this.Wb(e,Ca(()=>t.delete())),null!==a&&a.push(this.Ha,e)}break;default:throw new L("Unsupported sharing policy")}}return e}function oa(a,r){if(null===r){if(this.lb)throw new L(`null is not a valid ${this.name}`);return 0}if(!r.ma)throw new L(`Cannot pass "${ea(r)}" as a ${this.name}`);if(!r.ma.ra)throw new L(`Cannot pass deleted object as a pointer of type ${this.name}`);if(r.ma.ta.$a)throw new L(`Cannot convert argument of type ${r.ma.ta.name} to parameter type ${this.name}`);return ra(r.ma.ra,r.ma.ta.na,this.na)}var ia=(a,r,e)=>r===e?a:void 0===e.za||null===(a=ia(a,r,e.za))?null:e.Ib(a),sa={},ua=(a,r)=>{if(!r.ta||!r.ra)throw new z("makeClassHandle requires ptr and ptrType");if(!!r.Ca!=!!r.xa)throw new z("Both smartPtrType and smartPtr must be specified");return r.count={value:1},_(Object.create(a,{ma:{value:r,writable:!0}}))};function fa(a,r,e,t,n,o,i,s,u,f,l){this.name=a,this.na=r,this.lb=e,this.$a=t,this.ab=n,this.Ub=o,this.$b=i,this.zb=s,this.ob=u,this.Wb=f,this.Ha=l,n||void 0!==r.za?this.va=na:(this.va=t?ta:oa,this.ya=null)}var la=(a,r,t)=>{if(!e.hasOwnProperty(a))throw new z("Replacing nonexistent public symbol");void 0!==e[a].ua&&void 0!==t?e[a].ua[t]=r:(e[a]=r,e[a].Ja=t)},ha=[],ca=(a,r)=>{var e;if(a=N(a),(e=ha[r])||(ha[r]=e=Yr.get(r)),"function"!=typeof e)throw new L(`unknown function pointer with signature ${a}: ${r}`);return e};class wa extends Error{}var da=a=>{a=Gr(a);var r=N(a);return Kr(a),r},va=(a,r)=>{var e=[],t={};throw r.forEach(function a(r){t[r]||U[r]||(M[r]?M[r].forEach(a):(e.push(r),t[r]=!0))}),new wa(`${a}: `+e.map(da).join([", "]))};function pa(a,r,e,t,n){var o=r.length;if(2>o)throw new L("argTypes array size mismatch! Must at least get return value and 'this' types!");var i=null!==r[1]&&null!==e,s=function(a){for(var r=1;r<a.length;++r)if(null!==a[r]&&void 0===a[r].ya)return!0;return!1}(r),u=!r[0].Qb,f=o-2,l=Array(f),h=[],c=[];return Q(a,function(...a){if(c.length=0,h.length=i?2:1,h[0]=n,i){var e=r[1].va(c,this);h[1]=e}for(var o=0;o<f;++o)l[o]=r[o+2].va(c,a[o]),h.push(l[o]);if(a=t(...h),s)q(c);else for(o=i?1:2;o<r.length;o++){var w=1===o?e:l[o-2];null!==r[o].ya&&r[o].ya(w)}return u?r[0].sa(a):void 0})}var ma=(a,r)=>{for(var e=[],t=0;t<a;t++)e.push(d[r+4*t>>2]);return e},ba=a=>{let r=(a=a.trim()).indexOf("(");return-1===r?a:a.slice(0,r)},ya=(a,r,e)=>{if(!(a instanceof Object))throw new L(`${e} with invalid "this": ${a}`);if(!(a instanceof r.na.constructor))throw new L(`${e} incompatible with "this" of type ${a.constructor.name}`);if(!a.ma.ra)throw new L(`cannot call emscripten binding method ${e} on deleted object`);return ra(a.ma.ra,a.ma.ta.na,r.na)},ga=[],$a=[0,1,,1,null,1,!0,1,!1,1],Aa=a=>{9<a&&0===--$a[a+1]&&($a[a]=void 0,ga.push(a))},ka=a=>{if(!a)throw new L(`Cannot use deleted val. handle = ${a}`);return $a[a]},Ca=a=>{switch(a){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:let r=ga.pop()||$a.length;return $a[r]=a,$a[r+1]=1,r}},Ea={name:"emscripten::val",sa:a=>{var r=ka(a);return Aa(a),r},va:(a,r)=>Ca(r),Aa:I,ya:null},xa=(a,r,e)=>{switch(r){case 1:return e?function(a){return this.sa(f[a])}:function(a){return this.sa(l[a])};case 2:return e?function(a){return this.sa(h[a>>1])}:function(a){return this.sa(c[a>>1])};case 4:return e?function(a){return this.sa(w[a>>2])}:function(a){return this.sa(d[a>>2])};default:throw TypeError(`invalid integer width (${r}): ${a}`)}},Oa=(a,r)=>{var e=U[a];if(void 0===e)throw a=`${r} has unknown type ${da(a)}`,new L(a);return e},Ta=(a,r)=>{switch(r){case 4:return function(a){return this.sa(v[a>>2])};case 8:return function(a){return this.sa(p[a>>3])};default:throw TypeError(`invalid float width (${r}): ${a}`)}},Da=Object.assign({optional:!0},Ea),Ra=(a,r,e,t)=>{if(!(0<t))return 0;var n=e;t=e+t-1;for(var o=0;o<a.length;++o){var i=a.codePointAt(o);if(127>=i){if(e>=t)break;r[e++]=i}else if(2047>=i){if(e+1>=t)break;r[e++]=192|i>>6,r[e++]=128|63&i}else if(65535>=i){if(e+2>=t)break;r[e++]=224|i>>12,r[e++]=128|i>>6&63,r[e++]=128|63&i}else{if(e+3>=t)break;r[e++]=240|i>>18,r[e++]=128|i>>12&63,r[e++]=128|i>>6&63,r[e++]=128|63&i,o++}}return r[e]=0,e-n},Sa=a=>{for(var r=0,e=0;e<a.length;++e){var t=a.charCodeAt(e);127>=t?r++:2047>=t?r+=2:55296<=t&&57343>=t?(r+=4,++e):r+=3}return r},Pa=globalThis.TextDecoder&&new TextDecoder,ja=(a,r,e,t)=>{if(e=r+e,t)return e;for(;a[r]&&!(r>=e);)++r;return r},qa=(a,r=0,e,t)=>{if(16<(e=ja(a,r,e,t))-r&&a.buffer&&Pa)return Pa.decode(a.subarray(r,e));for(t="";r<e;){var n=a[r++];if(128&n){var o=63&a[r++];if(192==(224&n))t+=String.fromCharCode((31&n)<<6|o);else{var i=63&a[r++];65536>(n=224==(240&n)?(15&n)<<12|o<<6|i:(7&n)<<18|o<<12|i<<6|63&a[r++])?t+=String.fromCharCode(n):(n-=65536,t+=String.fromCharCode(55296|n>>10,56320|1023&n))}}else t+=String.fromCharCode(n)}return t},Ia=globalThis.TextDecoder?new TextDecoder("utf-16le"):void 0,Ba=(a,r,e)=>{if(16<(r=ja(c,a>>=1,r/2,e))-a&&Ia)return Ia.decode(c.subarray(a,r));for(e="";a<r;++a)e+=String.fromCharCode(c[a]);return e},Ua=(a,r,e)=>{if(e??=2147483647,2>e)return 0;var t=r;e=(e-=2)<2*a.length?e/2:a.length;for(var n=0;n<e;++n)h[r>>1]=a.charCodeAt(n),r+=2;return h[r>>1]=0,r-t},Ma=a=>2*a.length,za=(a,r,e)=>{var t="";a>>=2;for(var n=0;!(n>=r/4);n++){var o=d[a+n];if(!o&&!e)break;t+=String.fromCodePoint(o)}return t},Fa=(a,r,e)=>{if(e??=2147483647,4>e)return 0;var t=r;e=t+e-4;for(var n=0;n<a.length;++n){var o=a.codePointAt(n);if(65535<o&&n++,w[r>>2]=o,(r+=4)+4>e)break}return w[r>>2]=0,r-t},Na=a=>{for(var r=0,e=0;e<a.length;++e)65535<a.codePointAt(e)&&e++,r+=4;return r},La=0,Wa=[],Ha={},Ga=a=>{var r=Ha[a];return void 0===r?N(a):r},Ja=(a,r)=>{for(var e=0,t=a.length-1;0<=t;t--){var n=a[t];"."===n?a.splice(t,1):".."===n?(a.splice(t,1),e++):e&&(a.splice(t,1),e--)}if(r)for(;e;e--)a.unshift("..");return a},Ka=a=>{var r="/"===a.charAt(0),e="/"===a.slice(-1);return(a=Ja(a.split("/").filter(a=>!!a),!r).join("/"))||r||(a="."),a&&e&&(a+="/"),(r?"/":"")+a},_a=a=>{var r=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1);return a=r[0],r=r[1],a||r?(r&&=r.slice(0,-1),a+r):"."},Va=a=>{(Va=a=>crypto.getRandomValues(a))(a)},Qa=[],Ya=[];function Xa(a,r){Ya[a]={input:[],output:[],Ra:r},Cr(a,Za)}var Za={open(a){var r=Ya[a.node.fb];if(!r)throw new hr(43);a.Da=r,a.seekable=!1},close(a){a.Da.Ra.Za(a.Da)},Za(a){a.Da.Ra.Za(a.Da)},read(a,r,e,t){if(!a.Da||!a.Da.Ra.tb)throw new hr(60);for(var n=0,o=0;o<t;o++){try{var i=a.Da.Ra.tb(a.Da)}catch{throw new hr(29)}if(void 0===i&&0===n)throw new hr(6);if(null==i)break;n++,r[e+o]=i}return n&&(a.node.Na=Date.now()),n},write(a,r,e,t){if(!a.Da||!a.Da.Ra.nb)throw new hr(60);try{for(var n=0;n<t;n++)a.Da.Ra.nb(a.Da,r[e+n])}catch{throw new hr(29)}return t&&(a.node.Ea=a.node.Ba=Date.now()),n}},ar={tb(){a:{if(!Qa.length){var a=null;if(globalThis.window?.prompt&&null!==(a=window.prompt("Input: "))&&(a+="\n"),!a){var r=null;break a}r=Array(Sa(a)+1),a=Ra(a,r,0,r.length),r.length=a,Qa=r}r=Qa.shift()}return r},nb(a,r){null===r||10===r?(g(qa(a.output)),a.output=[]):0!=r&&a.output.push(r)},Za(a){0<a.output?.length&&(g(qa(a.output)),a.output=[])},oc:()=>({fc:25856,ic:5,ec:191,hc:35387,dc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),pc:()=>0,qc:()=>[24,80]},rr={nb(a,r){null===r||10===r?($(qa(a.output)),a.output=[]):0!=r&&a.output.push(r)},Za(a){0<a.output?.length&&($(qa(a.output)),a.output=[])}},er={Ga:null,Ka:()=>er.createNode(null,"/",16895,0),createNode(a,r,e,t){if(24576==(61440&e)||4096==(61440&e))throw new hr(63);return er.Ga||={dir:{node:{La:er.pa.La,Ia:er.pa.Ia,Ua:er.pa.Ua,cb:er.pa.cb,Ab:er.pa.Ab,Eb:er.pa.Eb,Db:er.pa.Db,pb:er.pa.pb,gb:er.pa.gb},stream:{Fa:er.qa.Fa}},file:{node:{La:er.pa.La,Ia:er.pa.Ia},stream:{Fa:er.qa.Fa,read:er.qa.read,write:er.qa.write,wb:er.qa.wb,yb:er.qa.yb}},link:{node:{La:er.pa.La,Ia:er.pa.Ia,Wa:er.pa.Wa},stream:{}},qb:{node:{La:er.pa.La,Ia:er.pa.Ia},stream:kr}},16384==(61440&(e=mr(a,r,e,t)).mode)?(e.pa=er.Ga.dir.node,e.qa=er.Ga.dir.stream,e.oa={}):32768==(61440&e.mode)?(e.pa=er.Ga.file.node,e.qa=er.Ga.file.stream,e.wa=0,e.oa=null):40960==(61440&e.mode)?(e.pa=er.Ga.link.node,e.qa=er.Ga.link.stream):8192==(61440&e.mode)&&(e.pa=er.Ga.qb.node,e.qa=er.Ga.qb.stream),e.Na=e.Ea=e.Ba=Date.now(),a&&(a.oa[r]=e,a.Na=a.Ea=a.Ba=e.Na),e},lc:a=>a.oa?a.oa.subarray?a.oa.subarray(0,a.wa):new Uint8Array(a.oa):new Uint8Array,pa:{La(a){var r={};return r.jc=8192==(61440&a.mode)?a.id:1,r.nc=a.id,r.mode=a.mode,r.rc=1,r.uid=0,r.mc=0,r.fb=a.fb,r.size=16384==(61440&a.mode)?4096:32768==(61440&a.mode)?a.wa:40960==(61440&a.mode)?a.link.length:0,r.Na=new Date(a.Na),r.Ea=new Date(a.Ea),r.Ba=new Date(a.Ba),r.Gb=4096,r.cc=Math.ceil(r.size/r.Gb),r},Ia(a,r){for(var e of["mode","atime","mtime","ctime"])null!=r[e]&&(a[e]=r[e]);void 0!==r.size&&(r=r.size,a.wa!=r&&(0==r?(a.oa=null,a.wa=0):(e=a.oa,a.oa=new Uint8Array(r),e&&a.oa.set(e.subarray(0,Math.min(r,a.wa))),a.wa=r)))},Ua(){throw er.hb||(er.hb=new hr(44),er.hb.stack="<generic error, no stack>"),er.hb},cb:(a,r,e,t)=>er.createNode(a,r,e,t),Ab(a,r,e){try{var t=pr(r,e)}catch{}if(t){if(16384==(61440&a.mode))for(var n in t.oa)throw new hr(55);if(n=vr(t.parent.id,t.name),sr[n]===t)sr[n]=t.Qa;else for(n=sr[n];n;){if(n.Qa===t){n.Qa=t.Qa;break}n=n.Qa}}delete a.parent.oa[a.name],r.oa[e]=a,a.name=e,r.Ba=r.Ea=a.parent.Ba=a.parent.Ea=Date.now()},Eb(a,r){delete a.oa[r],a.Ba=a.Ea=Date.now()},Db(a,r){var e,t=pr(a,r);for(e in t.oa)throw new hr(55);delete a.oa[r],a.Ba=a.Ea=Date.now()},pb:a=>[".","..",...Object.keys(a.oa)],gb:(a,r,e)=>((a=er.createNode(a,r,41471,0)).link=e,a),Wa(a){if(40960!=(61440&a.mode))throw new hr(28);return a.link}},qa:{read(a,r,e,t,n){var o=a.node.oa;if(n>=a.node.wa)return 0;if(8<(a=Math.min(a.node.wa-n,t))&&o.subarray)r.set(o.subarray(n,n+a),e);else for(t=0;t<a;t++)r[e+t]=o[n+t];return a},write(a,r,e,t,n,o){if(r.buffer===f.buffer&&(o=!1),!t)return 0;if((a=a.node).Ea=a.Ba=Date.now(),r.subarray&&(!a.oa||a.oa.subarray)){if(o)return a.oa=r.subarray(e,e+t),a.wa=t;if(0===a.wa&&0===n)return a.oa=r.slice(e,e+t),a.wa=t;if(n+t<=a.wa)return a.oa.set(r.subarray(e,e+t),n),t}o=n+t;var i=a.oa?a.oa.length:0;if(i>=o||(o=Math.max(o,i*(1048576>i?2:1.125)>>>0),0!=i&&(o=Math.max(o,256)),i=a.oa,a.oa=new Uint8Array(o),0<a.wa&&a.oa.set(i.subarray(0,a.wa),0)),a.oa.subarray&&r.subarray)a.oa.set(r.subarray(e,e+t),n);else for(o=0;o<t;o++)a.oa[n+o]=r[e+o];return a.wa=Math.max(a.wa,n+t),t},Fa(a,r,e){if(1===e?r+=a.position:2===e&&32768==(61440&a.node.mode)&&(r+=a.node.wa),0>r)throw new hr(28);return r},wb(a,r,e,t,n){if(32768!=(61440&a.node.mode))throw new hr(43);if(a=a.node.oa,2&n||!a||a.buffer!==f.buffer){n=!0,t=65536*Math.ceil(r/65536);var o=_r(65536,t);if(o&&l.fill(0,o,o+t),!(t=o))throw new hr(48);a&&((0<e||e+r<a.length)&&(a=a.subarray?a.subarray(e,e+r):Array.prototype.slice.call(a,e,e+r)),f.set(a,t))}else n=!1,t=a.byteOffset;return{ra:t,bc:n}},yb:(a,r,e,t)=>(er.qa.write(a,r,0,t,e,!1),0)}},tr=null,nr={},or=[],ir=1,sr=null,ur=!1,fr=!0,lr={},hr=class{name="ErrnoError";constructor(a){this.Ta=a}},cr=class{bb={};node=null;get flags(){return this.bb.flags}set flags(a){this.bb.flags=a}get position(){return this.bb.position}set position(a){this.bb.position=a}},wr=class{pa={};qa={};eb=null;constructor(a,r,e,t){a||=this,this.parent=a,this.Ka=a.Ka,this.id=ir++,this.name=r,this.mode=e,this.fb=t,this.Na=this.Ea=this.Ba=Date.now()}get read(){return!(365&~this.mode)}set read(a){a?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(a){a?this.mode|=146:this.mode&=-147}};function dr(a,r={}){if(!a)throw new hr(44);r.jb??=!0,"/"===a.charAt(0)||(a="//"+a);var e=0;a:for(;40>e;e++){a=a.split("/").filter(a=>!!a);for(var t=tr,n="/",o=0;o<a.length;o++){var i=o===a.length-1;if(i&&r.parent)break;if("."!==a[o])if(".."===a[o]){if(n=_a(n),t===t.parent){a=n+"/"+a.slice(o+1).join("/"),e--;continue a}t=t.parent}else{n=Ka(n+"/"+a[o]);try{t=pr(t,a[o])}catch(a){if(44===a?.Ta&&i&&r.Tb)return{path:n};throw a}if(!t.eb||i&&!r.jb||(t=t.eb.root),40960==(61440&t.mode)&&(!i||r.ib)){if(!t.pa.Wa)throw new hr(52);"/"===(t=t.pa.Wa(t)).charAt(0)||(t=_a(n)+"/"+t),a=t+"/"+a.slice(o+1).join("/");continue a}}}return{path:n,node:t}}throw new hr(32)}function vr(a,r){for(var e=0,t=0;t<r.length;t++)e=(e<<5)-e+r.charCodeAt(t)|0;return(a+e>>>0)%sr.length}function pr(a,r){var e=16384==(61440&a.mode)?(e=yr(a,"x"))?e:a.pa.Ua?0:2:54;if(e)throw new hr(e);for(e=sr[vr(a.id,r)];e;e=e.Qa){var t=e.name;if(e.parent.id===a.id&&t===r)return e}return a.pa.Ua(a,r)}function mr(a,r,e,t){return r=vr((a=new wr(a,r,e,t)).parent.id,a.name),a.Qa=sr[r],sr[r]=a}function br(a){var r=["r","w","rw"][3&a];return 512&a&&(r+="w"),r}function yr(a,r){return fr?0:!r.includes("r")||292&a.mode?r.includes("w")&&!(146&a.mode)||r.includes("x")&&!(73&a.mode)?2:0:2}function gr(a,r){if(16384!=(61440&a.mode))return 54;try{return pr(a,r),20}catch{}return yr(a,"wx")}function $r(a){if(!(a=or[a]))throw new hr(8);return a}function Ar(a,r){var e=void 0,t=e?null:a;if(e??=a.pa.Ia,!e)throw new hr(63);e(t,r)}var kr={open(a){a.qa=nr[a.node.fb].qa,a.qa.open?.(a)},Fa(){throw new hr(70)}};function Cr(a,r){nr[a]={qa:r}}function Er(a,r){var e="/"===r;if(e&&tr)throw new hr(10);if(!e&&r){var t=dr(r,{jb:!1});if(r=t.path,(t=t.node).eb)throw new hr(10);if(16384!=(61440&t.mode))throw new hr(54)}r={type:a,sc:{},xb:r,Sb:[]},(a=a.Ka(r)).Ka=r,r.root=a,e?tr=a:t&&(t.eb=r,t.Ka&&t.Ka.Sb.push(r))}function xr(a,r,e){var t=dr(a,{parent:!0}).node;if(a&&=a.match(/([^\/]+|\/)\/*$/)[1],!a)throw new hr(28);if("."===a||".."===a)throw new hr(20);var n=gr(t,a);if(n)throw new hr(n);if(!t.pa.cb)throw new hr(63);return t.pa.cb(t,a,r,e)}function Or(a){return xr(a,16895,0)}function Tr(a,r,e){void 0===e&&(e=r,r=438),xr(a,8192|r,e)}function Dr(a,r){if(!((...a)=>{for(var r="",e=!1,t=a.length-1;-1<=t&&!e;t--){if("string"!=typeof(e=0<=t?a[t]:"/"))throw TypeError("Arguments to path.resolve must be strings");if(!e)return"";r=e+"/"+r,e="/"===e.charAt(0)}return r=Ja(r.split("/").filter(a=>!!a),!e).join("/"),(e?"/":"")+r||"."})(a))throw new hr(44);var e=dr(r,{parent:!0}).node;if(!e)throw new hr(44);r&&=r.match(/([^\/]+|\/)\/*$/)[1];var t=gr(e,r);if(t)throw new hr(t);if(!e.pa.gb)throw new hr(63);e.pa.gb(e,r,a)}function Rr(a,r){if(""===a)throw new hr(44);if("string"==typeof r){var t={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if(void 0===t)throw Error(`Unknown file open mode: ${r}`);r=t}if(t=64&r?33206:0,"object"==typeof a)var n=a;else{var o=a.endsWith("/");n=(a=dr(a,{ib:!(131072&r),Tb:!0})).node,a=a.path}var i=!1;if(64&r)if(n){if(128&r)throw new hr(20)}else{if(o)throw new hr(31);n=xr(a,511|t,0),i=!0}if(!n)throw new hr(44);if(8192==(61440&n.mode)&&(r&=-513),65536&r&&16384!=(61440&n.mode))throw new hr(54);if(!i&&(o=n?40960==(61440&n.mode)?32:16384==(61440&n.mode)&&("r"!==br(r)||576&r)?31:yr(n,br(r)):44))throw new hr(o);if(512&r&&!i){if(16384==(61440&(o="string"==typeof(o=n)?dr(o,{ib:!0}).node:o).mode))throw new hr(31);if(32768!=(61440&o.mode))throw new hr(28);var s=yr(o,"w");if(s)throw new hr(s);Ar(o,{size:0,timestamp:Date.now()})}for(r&=-131713,o=n;;){if(o===o.parent){o=o.Ka.xb;var u=u?"/"===o[o.length-1]?o+u:`${o}/${u}`:o;break}u=u?`${o.name}/${u}`:o.name,o=o.parent}if(u={node:n,path:u,flags:r,seekable:!0,position:0,qa:n.qa,ac:[],error:!1},o=-1,u=Object.assign(new cr,u),-1==o)a:{for(o=0;4096>=o;o++)if(!or[o])break a;throw new hr(33)}u.Pa=o,or[o]=u,u.qa.open&&u.qa.open(u),i&&(t&=511,Ar(n="string"==typeof n?dr(n,{ib:!0}).node:n,{mode:4095&t|-4096&n.mode,Ba:Date.now(),kc:void 0})),!e.logReadFiles||1&r||a in lr||(lr[a]=1)}function Sr(a,r,e){if(null===a.Pa)throw new hr(8);if(!a.seekable||!a.qa.Fa)throw new hr(70);if(0!=e&&1!=e&&2!=e)throw new hr(28);a.position=a.qa.Fa(a,r,e),a.ac=[]}function Pr(a,r,e){a=Ka("/dev/"+a);var t=((a,r)=>{var e=0;return a&&(e|=365),r&&(e|=146),e})(!!r,!!e);Pr.vb??=64;var n=Pr.vb++<<8;Cr(n,{open(a){a.seekable=!1},close(){e?.buffer?.length&&e(10)},read(a,e,t,n){for(var o=0,i=0;i<n;i++){try{var s=r()}catch{throw new hr(29)}if(void 0===s&&0===o)throw new hr(6);if(null==s)break;o++,e[t+i]=s}return o&&(a.node.Na=Date.now()),o},write(a,r,t,n){for(var o=0;o<n;o++)try{e(r[t+o])}catch{throw new hr(29)}return n&&(a.node.Ea=a.node.Ba=Date.now()),o}}),Tr(a,t,n)}var jr,qr={},Ir={},Br=a=>{if(!(a instanceof x||"unwind"==a))throw a},Ur=a=>{throw i=a,S||0<La||(e.onExit?.(a),A=!0),new x(a)},Mr=[],zr={},Fr=a=>{var r;return(r=/\bwasm-function\[\d+\]:(0x[0-9a-f]+)/.exec(a))?+r[1]:(r=/:(\d+):\d+(?:\)|$)/.exec(a))?2147483648|r[1]:0},Nr=a=>{for(var r of a)(a=Fr(r))&&(zr[a]=r)},Lr=a=>{if(!(a=zr[a]))return 0;var r;if(r=/^\s+at .*\.wasm\.(.*) \(.*\)$/.exec(a))r=r[1];else if(r=/^\s+at (.*) \(.*\)$/.exec(a))r=r[1];else{if(!(r=/^(.+?)@/.exec(a)))return 0;r=r[1]}Kr(Lr.Bb??0),a=Lr;var e=Sa(r)+1,t=Jr(e);return t&&Ra(r,l,t,e),a.Bb=t,Lr.Bb},Wr={},Hr=()=>{if(!jr){var a,r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:(globalThis.navigator?.language??"C").replace("-","_")+".UTF-8",_:t||"./this.program"};for(a in Wr)void 0===Wr[a]?delete r[a]:r[a]=Wr[a];var e=[];for(a in r)e.push(`${a}=${r[a]}`);jr=e}return jr};if((()=>{let a=V.prototype;Object.assign(a,{isAliasOf:function(a){if(!(this instanceof V&&a instanceof V))return!1;var r=this.ma.ta.na,e=this.ma.ra;a.ma=a.ma;var t=a.ma.ta.na;for(a=a.ma.ra;r.za;)e=r.Xa(e),r=r.za;for(;t.za;)a=t.Xa(a),t=t.za;return r===t&&e===a},clone:function(){if(this.ma.ra||G(this),this.ma.Va)return this.ma.count.value+=1,this;var a=_,r=Object,e=r.create,t=Object.getPrototypeOf(this),n=this.ma;return(a=a(e.call(r,t,{ma:{value:{count:n.count,Sa:n.Sa,Va:n.Va,ra:n.ra,ta:n.ta,xa:n.xa,Ca:n.Ca}}}))).ma.count.value+=1,a.ma.Sa=!1,a},delete(){if(this.ma.ra||G(this),this.ma.Sa&&!this.ma.Va)throw new L("Object already scheduled for deletion");K(this);var a=this.ma;--a.count.value,0===a.count.value&&(a.xa?a.Ca.Ha(a.xa):a.ta.na.Ha(a.ra)),this.ma.Va||(this.ma.xa=void 0,this.ma.ra=void 0)},isDeleted:function(){return!this.ma.ra},deleteLater:function(){if(this.ma.ra||G(this),this.ma.Sa&&!this.ma.Va)throw new L("Object already scheduled for deletion");return this.ma.Sa=!0,this}});let r=Symbol.dispose;r&&(a[r]=a.delete)})(),Object.assign(fa.prototype,{Lb(a){return this.zb&&(a=this.zb(a)),a},rb(a){this.Ha?.(a)},Aa:I,sa:function(a){function r(){return this.ab?ua(this.na.Ma,{ta:this.Ub,ra:e,Ca:this,xa:a}):ua(this.na.Ma,{ta:this,ra:a})}var e=this.Lb(a);if(!e)return this.rb(a),null;var t=((a,r)=>{if(void 0===r)throw new L("ptr should not be undefined");for(;a.za;)r=a.Xa(r),a=a.za;return sa[r]})(this.na,e);if(void 0!==t)return 0===t.ma.count.value?(t.ma.ra=e,t.ma.xa=a,t.clone()):(t=t.clone(),this.rb(a),t);if(t=this.na.Kb(e),!(t=Y[t]))return r.call(this);t=this.$a?t.Hb:t.pointerType;var n=ia(e,this.na,t.na);return null===n?r.call(this):this.ab?ua(t.na.Ma,{ta:t,ra:n,Ca:this,xa:a}):ua(t.na.Ma,{ta:t,ra:n})}}),sr=Array(4096),Er(er,"/"),Or("/tmp"),Or("/home"),Or("/home/web_user"),function(){Or("/dev"),Cr(259,{read:()=>0,write:(a,r,e,t)=>t,Fa:()=>0}),Tr("/dev/null",259),Xa(1280,ar),Xa(1536,rr),Tr("/dev/tty",1280),Tr("/dev/tty1",1536);var a=new Uint8Array(1024),r=0,e=()=>(0===r&&(Va(a),r=a.byteLength),a[--r]);Pr("random",e),Pr("urandom",e),Or("/dev/shm"),Or("/dev/shm/tmp")}(),function(){Or("/proc");var a=Or("/proc/self");Or("/proc/self/fd"),Er({Ka(){var r=mr(a,"fd",16895,73);return r.qa={Fa:er.qa.Fa},r.pa={Ua(a,r){var e=$r(a=+r);return(a={parent:null,Ka:{xb:"fake"},pa:{Wa:()=>e.path},id:a+1}).parent=a},pb:()=>Array.from(or.entries()).filter(([,a])=>a).map(([a])=>a.toString())},r}},"/proc/self/fd")}(),e.noExitRuntime&&(S=e.noExitRuntime),e.print&&(g=e.print),e.printErr&&($=e.printErr),e.wasmBinary&&(o=e.wasmBinary),e.thisProgram&&(t=e.thisProgram),e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.shift()();var Gr,Jr,Kr,_r,Vr,Qr,Yr,Xr={251432:()=>typeof wasmOffsetConverter<"u"},Zr={U:function(){return typeof wasmOffsetConverter<"u"},n:(a,r,e)=>{var t=new P(a);throw d[t.ra+16>>2]=0,d[t.ra+4>>2]=r,d[t.ra+8>>2]=e,a},Q:()=>E(""),r:a=>{var r=j[a];delete j[a];var e=r.ob,t=r.Ha,n=r.sb,o=n.map(a=>a.Ob).concat(n.map(a=>a.Yb));F([a],o,a=>{var o,i,s={};for([o,i]of n.entries()){let r=a[o],e=i.Mb,t=i.Nb,u=a[o+n.length],f=i.Xb,l=i.Zb;s[i.Jb]={read:a=>r.sa(e(t,a)),write:(a,r)=>{var e=[];f(l,a,u.va(e,r)),q(e)},optional:r.optional}}return[{name:r.name,sa:a=>{var r,e={};for(r in s)e[r]=s[r].read(a);return t(a),e},va:(a,r)=>{for(var n in s)if(!(n in r)&&!s[n].optional)throw TypeError(`Missing field: "${n}"`);var o=e();for(n in s)s[n].write(o,r[n]);return null!==a&&a.push(t,o),o},Aa:I,ya:t}]})},E:(a,r,e,t,n)=>{r=N(r);let o=a=>a;if(t=0n===t){let a=8*e;o=r=>BigInt.asUintN(a,r),n=o(n)}W(a,{name:r,sa:o,va:(a,r)=>("number"==typeof r&&(r=BigInt(r)),r),Aa:H(r,e,!t),ya:null})},ba:(a,r,e,t)=>{W(a,{name:r=N(r),sa:function(a){return!!a},va:function(a,r){return r?e:t},Aa:function(a){return this.sa(l[a])},ya:null})},e:(a,r,e,t,n,o,i,s,u,f,l,h,c)=>{l=N(l),o=ca(n,o),s&&=ca(i,s),f&&=ca(u,f),c=ca(h,c);var w=(a=>{var r=(a=a.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=r&&57>=r?`_${a}`:a})(l);Z(w,function(){va(`Cannot construct ${l} due to unbound types`,[t])}),F([a,r,e],t?[t]:[],r=>{if(r=r[0],t)var e=r.na,n=e.Ma;else n=V.prototype;r=Q(l,function(...a){if(Object.getPrototypeOf(this)!==i)throw new L(`Use 'new' to construct ${l}`);if(void 0===h.Oa)throw new L(`${l} has no accessible constructor`);var r=h.Oa[a.length];if(void 0===r)throw new L(`Tried to invoke ctor of ${l} with invalid number of parameters (${a.length}) - expected (${Object.keys(h.Oa).toString()}) parameters instead!`);return r.apply(this,a)});var i=Object.create(n,{constructor:{value:r}});r.prototype=i;var u,h=new aa(l,r,i,c,e,o,s,f);return h.za&&((u=h.za).Ya??(u.Ya=[]),h.za.Ya.push(h)),e=new fa(l,h,!0,!1,!1),u=new fa(l+"*",h,!1,!1,!1),n=new fa(l+" const*",h,!1,!0,!1),Y[a]={pointerType:u,Hb:n},la(w,r),[e,u,n]})},v:(a,r,e,t,n,o,i)=>{var s=ma(e,t);r=N(r),r=ba(r),o=ca(n,o),F([],[a],a=>{function t(){va(`Cannot call ${n} due to unbound types`,s)}var n=`${(a=a[0]).name}.${r}`;r.startsWith("@@")&&(r=Symbol[r.substring(2)]);var u=a.na.constructor;return void 0===u[r]?(t.Ja=e-1,u[r]=t):(X(u,r,n),u[r].ua[e-1]=t),F([],s,t=>{if(t=pa(n,[t[0],null].concat(t.slice(1)),null,o,i),void 0===u[r].ua?(t.Ja=e-1,u[r]=t):u[r].ua[e-1]=t,a.na.Ya)for(let e of a.na.Ya)e.constructor.hasOwnProperty(r)||(e.constructor[r]=t);return[]}),[]})},g:(a,r,e,t,n,o)=>{var i=ma(r,e);n=ca(t,n),F([],[a],a=>{var e=`constructor ${(a=a[0]).name}`;if(void 0===a.na.Oa&&(a.na.Oa=[]),void 0!==a.na.Oa[r-1])throw new L(`Cannot register multiple constructors with identical number of parameters (${r-1}) for class '${a.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return a.na.Oa[r-1]=()=>{va(`Cannot construct ${a.name} due to unbound types`,i)},F([],i,t=>(t.splice(1,0,null),a.na.Oa[r-1]=pa(e,t,null,n,o),[])),[]})},b:(a,r,e,t,n,o,i,s)=>{var u=ma(e,t);r=N(r),r=ba(r),o=ca(n,o),F([],[a],a=>{function t(){va(`Cannot call ${n} due to unbound types`,u)}var n=`${(a=a[0]).name}.${r}`;r.startsWith("@@")&&(r=Symbol[r.substring(2)]),s&&a.na.Vb.push(r);var f=a.na.Ma,l=f[r];return void 0===l||void 0===l.ua&&l.className!==a.name&&l.Ja===e-2?(t.Ja=e-2,t.className=a.name,f[r]=t):(X(f,r,n),f[r].ua[e-2]=t),F([],u,t=>(t=pa(n,t,a,o,i),void 0===f[r].ua?(t.Ja=e-2,f[r]=t):f[r].ua[e-2]=t,[])),[]})},c:(a,r,e,t,n,o,i,s,u,f)=>{r=N(r),n=ca(t,n),F([],[a],a=>{var t=`${(a=a[0]).name}.${r}`,l={get(){va(`Cannot access ${t} due to unbound types`,[e,i])},enumerable:!0,configurable:!0};return l.set=u?()=>va(`Cannot access ${t} due to unbound types`,[e,i]):()=>{throw new L(t+" is a read-only property")},Object.defineProperty(a.na.Ma,r,l),F([],u?[e,i]:[e],e=>{var i=e[0],l={get(){var r=ya(this,a,t+" getter");return i.sa(n(o,r))},enumerable:!0};if(u){u=ca(s,u);var h=e[1];l.set=function(r){var e=ya(this,a,t+" setter"),n=[];u(f,e,h.va(n,r)),q(n)}}return Object.defineProperty(a.na.Ma,r,l),[]}),[]})},_:a=>W(a,Ea),m:(a,r,t,n,o)=>{switch(r=N(r),o=0===o?"object":1===o?"number":"string"){case"object":function s(){}s.values={},W(a,{name:r,constructor:s,valueType:o,sa:function(a){return this.constructor.values[a]},va:(a,r)=>r.value,Aa:xa(r,t,n),ya:null}),Z(r,s);break;case"number":var i={};W(a,{name:r,mb:i,valueType:o,sa:a=>a,va:(a,r)=>r,Aa:xa(r,t,n),ya:null}),Z(r,i),delete e[r].Ja;break;case"string":W(a,{name:r,Fb:{},Cb:{},mb:i={},valueType:o,sa:function(a){return this.Cb[a]},va:function(a,r){return this.Fb[r]},Aa:xa(r,t,n),ya:null}),Z(r,i),delete e[r].Ja}},d:(a,r,e)=>{var t=Oa(a,"enum");switch(r=N(r),t.valueType){case"object":a=t.constructor,t=Object.create(t.constructor.prototype,{value:{value:e},constructor:{value:Q(`${t.name}_${r}`,function(){})}}),a.values[e]=t,a[r]=t;break;case"number":t.mb[r]=e;break;case"string":t.Fb[r]=e,t.Cb[e]=r,t.mb[r]=r}},D:(a,r,e)=>{W(a,{name:r=N(r),sa:a=>a,va:(a,r)=>r,Aa:Ta(r,e),ya:null})},da:(a,r,e,t,n,o)=>{var i=ma(r,e);a=N(a),a=ba(a),n=ca(t,n),Z(a,function(){va(`Cannot call ${a} due to unbound types`,i)},r-1),F([],i,e=>(la(a,pa(a,[e[0],null].concat(e.slice(1)),null,n,o),r-1),[]))},w:(a,r,e,t,n)=>{r=N(r);let o=a=>a;if(0===t){var i=32-8*e;o=a=>a<<i>>>i,n=o(n)}W(a,{name:r,sa:o,va:(a,r)=>r,Aa:H(r,e,0!==t),ya:null})},p:(a,r,e)=>{function t(a){return new n(f.buffer,d[a+4>>2],d[a>>2])}var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][r];W(a,{name:e=N(e),sa:t,Aa:t},{Pb:!0})},t:a=>{W(a,Da)},k:(a,r,e,t,n,o,i,s,u,f,l,h)=>{e=N(e),o=ca(n,o),s=ca(i,s),f=ca(u,f),h=ca(l,h),F([a],[r],a=>(a=a[0],[new fa(e,a.na,!1,!1,!0,a,t,o,s,f,h)]))},aa:(a,r)=>{W(a,{name:r=N(r),sa(a){var r=(r=a+4)?qa(l,r,d[a>>2],!0):"";return Kr(a),r},va(a,r){r instanceof ArrayBuffer&&(r=new Uint8Array(r));var e="string"==typeof r;if(!(e||ArrayBuffer.isView(r)&&1==r.BYTES_PER_ELEMENT))throw new L("Cannot pass non-string to std::string");var t=e?Sa(r):r.length,n=Jr(4+t+1),o=n+4;return d[n>>2]=t,e?Ra(r,l,o,t+1):l.set(r,o),null!==a&&a.push(Kr,n),n},Aa:I,ya(a){Kr(a)}})},A:(a,r,e)=>{if(e=N(e),2===r)var t=Ba,n=Ua,o=Ma;else t=za,n=Fa,o=Na;W(a,{name:e,sa:a=>{var e=t(a+4,d[a>>2]*r,!0);return Kr(a),e},va:(a,t)=>{if("string"!=typeof t)throw new L(`Cannot pass non-string to C++ string type ${e}`);var i=o(t),s=Jr(4+i+r);return d[s>>2]=i/r,n(t,s+4,i+r),null!==a&&a.push(Kr,s),s},Aa:I,ya(a){Kr(a)}})},s:(a,r,e,t,n,o)=>{j[a]={name:N(r),ob:ca(e,t),Ha:ca(n,o),sb:[]}},l:(a,r,e,t,n,o,i,s,u,f)=>{j[a].sb.push({Jb:N(r),Ob:e,Mb:ca(t,n),Nb:o,Yb:i,Xb:ca(s,u),Zb:f})},ca:(a,r)=>{W(a,{Qb:!0,name:r=N(r),sa:()=>{},va:()=>{}})},I:()=>{S=!1,La=0},i:(a,r,e)=>{var[t,...n]=((a,r)=>{for(var e=Array(a),t=0;t<a;++t)e[t]=Oa(d[r+4*t>>2],`parameter ${t}`);return e})(a,r),o=t.va.bind(t),i=n.map(a=>a.Aa.bind(a));a--;var s=Array(a);return r=`methodCaller<(${n.map(a=>a.name)}) => ${t.name}>`,(a=>{var r=Wa.length;return Wa.push(a),r})(Q(r,(r,t,n,u)=>{for(var f=0,l=0;l<a;++l)s[l]=i[l](u+f),f+=8;switch(e){case 0:var h=ka(r).apply(null,s);break;case 2:h=Reflect.construct(ka(r),s);break;case 3:h=s[0];break;case 1:h=ka(r)[Ga(t)](...s)}return h=o(r=[],h),r.length&&(d[n>>2]=Ca(r)),h}))},a:Aa,W:a=>a?(a=Ga(a),Ca(globalThis[a])):Ca(globalThis),q:(a,r)=>(a=ka(a),r=ka(r),Ca(a[r])),f:a=>{9<a&&($a[a+1]+=1)},$:(a,r)=>(a=ka(a))instanceof ka(r),j:(a,r,e,t,n)=>Wa[a](r,e,t,n),Z:(a,r,e,t,n)=>Wa[a](r,e,t,n),u:a=>"number"==typeof(a=ka(a)),x:a=>"string"==typeof(a=ka(a)),F:()=>Ca([]),o:a=>Ca(Ga(a)),h:a=>{q(ka(a)),Aa(a)},z:a=>(a=ka(a),Ca(typeof a)),G:(a,r)=>(Ir[a]&&(clearTimeout(Ir[a].id),delete Ir[a]),r&&(Ir[a]={id:setTimeout(()=>{delete Ir[a],(a=>{if(!A)try{if(a(),!(S||0<La))try{i=a=i,Ur(a)}catch(a){Br(a)}}catch(a){Br(a)}})(()=>Vr(a,performance.now()))},r),tc:r}),0),S:(a,r,e,t)=>{var n=(new Date).getFullYear(),o=new Date(n,0,1).getTimezoneOffset();n=new Date(n,6,1).getTimezoneOffset(),d[a>>2]=60*Math.max(o,n),w[r>>2]=Number(o!=n),r=a=>{var r=Math.abs(a);return`UTC${0<=a?"-":"+"}${String(Math.floor(r/60)).padStart(2,"0")}${String(r%60).padStart(2,"0")}`},a=r(o),r=r(n),n<o?(Ra(a,l,e,17),Ra(r,l,t,17)):(Ra(a,l,t,17),Ra(r,l,e,17))},P:function(a,r,e){return 0<=a&&3>=a?(m[e>>3]=BigInt(Math.round(1e6*(0===a?Date.now():performance.now()))),0):28},Y:(a,r,e)=>{Mr.length=0;for(var t;t=l[r++];){var n=105!=t;e+=(n&=112!=t)&&e%8?4:0,Mr.push(112==t?d[e>>2]:106==t?m[e>>3]:105==t?w[e>>2]:p[e>>3]),e+=n?8:4}return Xr[a](...Mr)},C:(a,r)=>$(a?qa(l,a,r):""),y:()=>performance.now(),T:Lr,H:a=>{var r=l.length;if(2147483648<(a>>>=0))return!1;for(var e=1;4>=e;e*=2){var t=r*(1+.2/e);t=Math.min(t,a+100663296);a:{t=(Math.min(2147483648,65536*Math.ceil(Math.max(a,t)/65536))-Qr.buffer.byteLength+65535)/65536|0;try{Qr.grow(t),C();var n=1;break a}catch{}n=void 0}if(n)return!0}return!1},X:()=>{var a=Error().stack.toString().split("\n");return"Error"==a[0]&&a.shift(),Nr(a),zr.ub=Fr(a[3]),zr.Rb=a,zr.ub},V:(a,r,e)=>{if(zr.ub==a)var t=zr.Rb;else"Error"==(t=Error().stack.toString().split("\n"))[0]&&t.shift(),Nr(t);for(var n=3;t[n]&&Fr(t[n])!=a;)++n;for(a=0;a<e&&t[a+n];++a)w[r+4*a>>2]=Fr(t[a+n]);return a},K:(a,r)=>{var e,t=0,n=0;for(e of Hr()){var o=r+t;d[a+n>>2]=o,t+=Ra(e,l,o,1/0)+1,n+=4}return 0},L:(a,r)=>{var e=Hr();for(var t of(d[a>>2]=e.length,a=0,e))a+=Sa(t)+1;return d[r>>2]=a,0},B:a=>{i=a,Ur(a)},O:function(a){try{var r=$r(a);if(null===r.Pa)throw new hr(8);r.kb&&=null;try{r.qa.close&&r.qa.close(r)}catch(a){throw a}finally{or[r.Pa]=null}return r.Pa=null,0}catch(a){if(void 0===qr||"ErrnoError"!==a.name)throw a;return a.Ta}},N:function(a,r,e,t){try{a:{var n=$r(a);a=r;for(var o,i=r=0;i<e;i++){var s=d[a>>2],u=d[a+4>>2];a+=8;var l=n,h=s,c=u,w=o,v=f;if(0>c||0>w)throw new hr(28);if(null===l.Pa||1==(2097155&l.flags))throw new hr(8);if(16384==(61440&l.node.mode))throw new hr(31);if(!l.qa.read)throw new hr(28);var p=void 0!==w;if(p){if(!l.seekable)throw new hr(70)}else w=l.position;var m=l.qa.read(l,v,h,c,w);p||(l.position+=m);var b=m;if(0>b){var y=-1;break a}if(r+=b,b<u)break;void 0!==o&&(o+=b)}y=r}return d[t>>2]=y,0}catch(a){if(void 0===qr||"ErrnoError"!==a.name)throw a;return a.Ta}},J:function(a,r,e,t){r=-9007199254740992>r||9007199254740992<r?NaN:Number(r);try{if(isNaN(r))return 61;var n=$r(a);return Sr(n,r,e),m[t>>3]=BigInt(n.position),n.kb&&0===r&&0===e&&(n.kb=null),0}catch(a){if(void 0===qr||"ErrnoError"!==a.name)throw a;return a.Ta}},M:function(a,r,e,t){try{a:{var n=$r(a);a=r;for(var o,i=r=0;i<e;i++){var s=d[a>>2],u=d[a+4>>2];a+=8;var l=n,h=s,c=u,w=o,v=f;if(0>c||0>w)throw new hr(28);if(null===l.Pa||!(2097155&l.flags))throw new hr(8);if(16384==(61440&l.node.mode))throw new hr(31);if(!l.qa.write)throw new hr(28);l.seekable&&1024&l.flags&&Sr(l,0,2);var p=void 0!==w;if(p){if(!l.seekable)throw new hr(70)}else w=l.position;var m=l.qa.write(l,v,h,c,w,void 0);p||(l.position+=m);var b=m;if(0>b){var y=-1;break a}if(r+=b,b<u)break;void 0!==o&&(o+=b)}y=r}return d[t>>2]=y,0}catch(a){if(void 0===qr||"ErrnoError"!==a.name)throw a;return a.Ta}},R:Ur},ae=await async function(){function a(a){return a=ae=a.exports,Gr=a.ga,Jr=a.ha,Kr=a.ia,_r=a.ka,Vr=a.la,Qr=a.ea,Yr=a.ja,C(),ae}var t={a:Zr};return e.instantiateWasm?new Promise(r=>{e.instantiateWasm(t,(e,t)=>{r(a(e))})}):(y??=e.locateFile?e.locateFile?e.locateFile("arcgis-knowledge-client-core.wasm",n):n+"arcgis-knowledge-client-core.wasm":new URL("arcgis-knowledge-client-core.wasm","").href,a((await async function(a){var e=y;if(!o)try{var t=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(t,a)}catch(a){$(`wasm streaming compile failed: ${a}`),$("falling back to ArrayBuffer instantiation")}return async function(a,e){try{var t=await async function(a){if(!o)try{var e=await r(a);return new Uint8Array(e)}catch{}if(a!=y||!o)throw"both async and sync fetching of the wasm failed";return new Uint8Array(o)}(a);return await WebAssembly.instantiate(t,e)}catch(a){$(`failed to asynchronously prepare wasm: ${a}`),E(a)}}(e,a)}(t)).instance))}();return function(){function a(){if(e.calledRun=!0,!A){var a,r;if(k=!0,e.noFSInit||ur||(ur=!0,a??=e.stdin,r??=e.stdout,t??=e.stderr,a?Pr("stdin",a):Dr("/dev/tty","/dev/stdin"),r?Pr("stdout",null,r):Dr("/dev/tty","/dev/stdout"),t?Pr("stderr",null,t):Dr("/dev/tty1","/dev/stderr"),Rr("/dev/stdin",0),Rr("/dev/stdout",1),Rr("/dev/stderr",1)),ae.fa(),fr=!1,s?.(e),e.onRuntimeInitialized?.(),e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;){var t=e.postRun.shift();T.push(t)}O(T)}}if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)R();O(D),e.setStatus?(e.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>e.setStatus(""),1),a()},1)):a()}(),k?e:new Promise((a,r)=>{s=a,u=r})}e.d(r,{default:()=>t})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[506,1666,7992,8125],{69397(e,t,r){r.d(t,{JY:()=>c,Qf:()=>l,Qh:()=>i,lM:()=>a,ro:()=>h,rq:()=>u});var s=r(44208),n=r(34275);function a(e){if(!e)return 0;let t=f;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r],!1));return t}function i(e){if(!e)return 0;if(Array.isArray(e))return function(e){let t=g;for(let r of e)t+=o(r);return t}(e);if(ArrayBuffer.isView(e)&&"length"in e&&"number"==typeof e.length&&e.length>0)return e.byteLength+m;let t=f;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?i(e):f;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+h(t),0)}function h(e,t=16){return e?(0,n.iu)(e)?e.byteLength+m:Array.isArray(e)?u(e,t):0:0}function u(e,t){return g+e.length*t}const f=32,g=16,c=(0,s.A)("ios")||!(0,s.A)("chrome")&&!(0,s.A)("opr")?8:4,m=145},87992(e,t,r){r.d(t,{JR:()=>V,ME:()=>M,MY:()=>A,NO:()=>C,Nh:()=>P,V2:()=>Y,_s:()=>F,e6:()=>_,gh:()=>E,jm:()=>Z,tr:()=>X,uX:()=>p});var s=r(32198),n=(r(69397),r(92722)),a=r(16930),i=r(19419),o=r(513),l=r(50954),h=r(79567),u=r(52006),f=r(49663),g=r(46068),c=r(60408),m=r(21325);class p{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:a,partCount:i,partOffsets:o,partFlags:l,segmentFlags:h,segmentIndices:u,segmentParams:f,segmentCountArc:g,segmentCountBezier:c}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=a,this.partCount=i,this.partOffsets=o,this.partFlags=l,this.segmentFlags=h,this.segmentIndices=u,this.segmentParams=f,this.segmentCountArc=g,this.segmentCountBezier=c}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){let{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?64+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){let{type:e,vertexCount:t,partCount:r,hasZ:s,hasM:n,segmentCountArc:a,segmentCountBezier:i}=this,o=Y(e,t,r,s,n,this.hasCurves(),a,i);o.spatialReference=this.spatialReference;let{vertexXY:l,vertexZ:h,vertexM:u}=this;if(o.vertexXY.set(l.subarray(0,2*t),0),o.vertexZ?.set(h.subarray(0,t),0),o.vertexM?.set(u.subarray(0,t),0),this.isMultipart()){let{partOffsets:e,partFlags:t}=this;o.partFlags.set(t.subarray(0,r+1)),o.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){let{segmentFlags:e,segmentIndices:r,segmentParams:s,segmentParamCount:n}=this;o.segmentFlags.set(e.subarray(0,t),0),o.segmentIndices.set(r.subarray(0,t),0),o.segmentParams.set(s.subarray(0,n),0)}return o}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,m.aI)(this.spatialReference,e.spatialReference)||this.vertexCount!==e.vertexCount||this.partCount!==e.partCount||this.hasZ!==e.hasZ||this.hasM!==e.hasM||this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;let r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new x(this):[][Symbol.iterator]()}}class x{constructor(e){this.geometry=e,this.value=new y(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class y{constructor(e){this.geometry=e,this.index=-1,this._readVertex=R(e),this._segments=new d(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){let e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class d{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this.value=new v(e.geometry)}get _partIsClosed(){return!!(1&this._part.geometry.partFlags?.[this._part.index])}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;let e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._partIsClosed?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){let{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._partIsClosed?1:2),this.value.indexOfStartVertex=this._partStart-1}}class v{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=R(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){let e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;let t=this.geometry.segmentParams,r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){let e=t[r++],s=t[r++],n=t[r++],a=t[r++];return{b:[this.end,[e,s],[n,a]]}}let s=t[r++],n=t[r++],a=t[r++],i=t[r++],o=t[r++],l=t[r++];r++,r++;let h=t[r++],u=t[r++];if(!(4&s)&&1===a)return{c:[this.end,[h,u]]};let f=2&s?0:1,g=1&s?0:1;return{a:[this.end,[o,l],f,g,i,n,a]}}}function C(e,t){let r={stack:[],error:void 0,hasError:!1};try{return t??=(0,i.Ie)(),(0,s.mS)(r,new O(e,["vertexZ","vertexM","spatialReference"]),!1),(0,i.bx)(t,function(e){let t,{vertexCount:r,vertexXY:n,vertexZ:a,vertexM:o}=e,l=w(e);if(e.hasCurves()){let r={stack:[],error:void 0,hasError:!1};try{(0,s.mS)(r,new O(e,["vertexZ","vertexM"]),!1);let n=(0,i.Ie)();for(let t of e.parts){let e=t.startVertex;for(let{curve:r}of t.segments)(0,h.e)(n,e,r),e=(0,u.yP)(r)}let[a,o,f,g]=n;t={xmin:a,ymin:o,xmax:f,ymax:g,spatialReference:l}}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}else{let e,s,a,i;e=s=1/0,a=i=-1/0;for(let t=0;t<r;++t){let r=n[2*t],o=n[2*t+1];e=Math.min(e,r),a=Math.max(a,r),s=Math.min(s,o),i=Math.max(i,o)}t={xmin:e,ymin:s,xmax:a,ymax:i,spatialReference:l}}if(a){let e=1/0,r=-1/0;for(let t of a)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(o){let e=1/0,r=-1/0;for(let t of o)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}function M(e){let t,r,s;if((0,c.fT)(e)){s="point";let{x:n,y:a,z:i,m:o}=e,l=[n,a];null!=i&&l.push(i),null!=o&&l.push(o),r=[[l]],t=1}else(0,c.U9)(e)?(s="multipoint",r=[e.points],t=e.points.length):(0,c.Rg)(e)?(s="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(s="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,S(t[0],(0,u.yP)(t.at(-1)))&&--e),e),0));let n=Y(s,t,s.includes("point")?0:r.length,(0,c.Pv)(e),(0,c.W0)(e),(0,u.Ed)(e)),{hasZ:a,hasM:i,vertexXY:o,vertexZ:l,vertexM:h}=n;function f(e){o[2*m]=e[0],o[2*m+1]=e[1],a&&(l[m]=e[2]),i&&(h[m]=e[g]),++m}n.spatialReference=e.spatialReference??void 0;let g=n.hasZ?3:2,m=0;if(!n.isMultipart()){if(!a&&!i){for(let[e,t]of r[0])o[2*m]=e,o[2*m+1]=t,++m;return n}for(let e of r[0])f(e);return n}let p="polygon"===s,{partOffsets:x}=n,y=0;if(!(0,u.Ed)(e)){for(let e of r){if(x[y++]=m,0===e.length)continue;let t=e.length;if(p&&S(e[0],e.at(-1))&&--t,a||i)for(let r=0;r<t;++r)f(e[r]);else for(let r=0;r<t;++r){let[t,s]=e[r];o[2*m]=t,o[2*m+1]=s,++m}}return x[y]=m,n}function d(e){let t=v+e;if(t<=(n.segmentParams?.length??0))return;let r=t*N;r=20*Math.ceil(r/20);let s=n.segmentParams;n.segmentParams=new Float64Array(r),null!=s&&n.segmentParams.set(s)}let v=0;for(let e of r){if(n.partOffsets[y++]=m,0===e.length)continue;let t=e[0],r=t;for(let t=1;t<e.length;++t){let s=e[t];f(r);let a=m-1;(0,u.wY)(s)?(d(10),++n.segmentCountArc,v=F(r,s,n,a,v),r=s.a[0]):(0,u.DA)(s)?(d(10),++n.segmentCountArc,v=I(r,s,n,a,v),r=s.a[0]):(0,u.aO)(s)?(d(10),++n.segmentCountArc,v=_(r,s,n,a,v),r=s.c[0]):(0,u.n1)(s)?(d(4),++n.segmentCountBezier,v=X(0,s,n,a,v),r=s.b[0]):r=s}p&&S(t,r)||f(r)}return n.partOffsets[y]=m,n}function E(e){let t=R(e),{vertexCount:r,partCount:s,hasZ:n,hasM:a}=e,i=w(e),o=0;if(!e.isMultipart()){if("point"===e.type){let[t,r]=e.vertexXY;return{x:t,y:r,z:e.vertexZ?.[0],m:e.vertexM?.[0],spatialReference:i}}let s=[];for(;o<r;)s.push(t(o++));return{points:s,spatialReference:i,hasZ:n,hasM:a}}if(!e.hasCurves()){let r=[];for(let n=0;n<s;++n){let s=!!(1&e.partFlags[n]),a=e.partOffsets[n+1],i=[];for(;o<a;)i.push(t(o++));s&&i.length>0&&i.push([...i[0]]),r.push(i)}return"polygon"===e.type?{rings:r,hasZ:n,hasM:a,spatialReference:i}:{paths:r,hasZ:n,hasM:a,spatialReference:i}}let l=[];for(let{segments:t,startVertex:r}of e.parts){let e=[r];for(let{curve:r}of t)e.push(r);l.push(e)}return"polygon"===e.type?{rings:[],curveRings:l,hasZ:n,hasM:a,spatialReference:i}:{paths:[],curvePaths:l,hasZ:n,hasM:a,spatialReference:i}}function P(e,{lengths:t,coords:r,hasZ:s,hasM:n},a){let i=e.includes("point")?0:t.length,o="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(o?i:0);s??=!1,n??=!1;let h=Y(e,l,i,s,n,!1,0,0);if(h.spatialReference=a??void 0,!h.isMultipart()){for(let e=0,t=0;e<l;++e)h.vertexXY[2*e]=r[t++],h.vertexXY[2*e+1]=r[t++],s&&(h.vertexZ[e]=r[t++]),n&&(h.vertexM[e]=r[t++]);return h}let u=2+Number(s)+Number(n),f=0,g=0;h.partOffsets[0]=0;for(let e of t){let t=h.partOffsets[g],a=t+e-Number(o);h.partOffsets[++g]=a;for(let e=t;e<a;++e)h.vertexXY[2*e]=r[f++],h.vertexXY[2*e+1]=r[f++],s&&(h.vertexZ[e]=r[f++]),n&&(h.vertexM[e]=r[f++]);o&&(f+=u)}return h}function V({type:e,vertexCount:t,vertexXY:r,vertexZ:s,vertexM:a,partCount:i,partOffsets:o,partFlags:l,hasZ:h,hasM:u}){let f=new n.A([],[],h,u);i=Math.max(i,1);let g=0;for(let e=0;e<i;++e){let n=o?.[e+1]??t,i=f.coords.length;for(let e=g;e<n;++e)f.coords.push(r[2*e],r[2*e+1]),h&&f.coords.push(s[e]),u&&f.coords.push(a[e]);if(l&&1&l[e]){let e=g;f.coords.push(r[2*e],r[2*e+1]),h&&f.coords.push(s[e]),u&&f.coords.push(a[e])}f.lengths.push((f.coords.length-i)/f.stride),g=n}return"point"===e&&(f.lengths.length=0),f}function Z(...e){let t=new Set;for(let r of e){if(!r)continue;let e=[r.vertexXY,r.vertexZ,r.vertexM,r.partOffsets,r.partFlags,r.segmentFlags,r.segmentIndices,r.segmentParams];for(let r of e){let e=r?.buffer;e&&t.add(e)}}return Array.from(t)}function A(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;let t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let s=e.getLatestID();(s<=0||s===r)&&(s=void 0);let n=e.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:t};let a=n.isCustomWkid()?0:n.getOldID();if(a<=0)return{wkt:t};let i=e.getLatestVerticalID();return(i<=0||i===a)&&(i=void 0),{wkid:r,wkt:t,latestWkid:s,vcsWkid:a,latestVcsWkid:i}}(e.getSpatialReference()),e=e.getGeometry()),new p({...e.toFlatGeometry(),spatialReference:t})}class O{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(let r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function w({spatialReference:e}){return e instanceof a.A?e.toJSON():e}function R({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?s=>[e[2*s],e[2*s+1],t[s],r[s]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function S(e,t){return e.every((e,r)=>e===t[r])}function Y(e,t,r,s,n,a,i,o){i??=0,o??=0;let l=new p({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:i,segmentCountBezier:o}),h=2*Float64Array.BYTES_PER_ELEMENT*t;s&&(h+=Float64Array.BYTES_PER_ELEMENT*t),n&&(h+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(h+=(r+1)*Int32Array.BYTES_PER_ELEMENT,h+=(r+1)*Int8Array.BYTES_PER_ELEMENT),a&&(h+=t*Int8Array.BYTES_PER_ELEMENT,h+=t*Int32Array.BYTES_PER_ELEMENT,h+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);let u=new ArrayBuffer(h),f=0;return l.vertexXY=new Float64Array(u,f,2*t),f+=l.vertexXY.byteLength,s&&(l.vertexZ=new Float64Array(u,f,t),f+=l.vertexZ.byteLength),n&&(l.vertexM=new Float64Array(u,f,t),f+=l.vertexM.byteLength),a&&(l.segmentParams=new Float64Array(u,f,l.segmentParamCount),f+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(u,f,t),l.segmentIndices.fill(z),f+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(u,f,r+1),f+=l.partOffsets.byteLength,l.partFlags=new Int8Array(u,f,r+1),f+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,r).fill(1)),a&&(l.segmentFlags=new Int8Array(u,f,t),l.segmentFlags.fill(1),f+=l.segmentFlags.byteLength),l}function F(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},a,i){r[a]=4,s[a]=i;let[o,[l,h],u,f,c,m,p]=t.a,x=4;f||(x|=1),u||(x|=2);let y=(0,g.SW)(e,t),[d,v]=(0,g.Uk)(y,.5);return n[i++]=x,n[i++]=m,n[i++]=p,n[i++]=c,n[i++]=l,n[i++]=h,n[i++]=y.u2-y.u1,n[i++]=y.u1,n[i++]=d,n[i++]=v,i}function I(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},a,i){r[a]=4,s[a]=i;let l=(0,f.io)(e,t);return b(l,4,...(0,o.mq)(l,.5),n,i)}function _(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},a,i){return r[a]=4,s[a]=i,b((0,l.pM)(e,t),0,...t.c[1],n,i)}function b(e,t,r,s,n,a){let{cx:i,cy:o,thetaStart:l,thetaEnd:h,radius:u}=e;return l>h||(t|=1),Math.abs(h-l)<=Math.PI||(t|=2),n[a++]=t,n[a++]=u,n[a++]=1,n[a++]=0,n[a++]=i,n[a++]=o,n[a++]=h-l,n[a++]=l,n[a++]=r,n[a++]=s,a}function X(e,{b:[t,[r,s],[n,a]]},{segmentFlags:i,segmentIndices:o,segmentParams:l},h,u){return i[h]=2,o[h]=u,l[u++]=r,l[u++]=s,l[u++]=n,l[u++]=a,u}const N=1.61803,z=-1},78125(e,t,r){r.r(t),r.d(t,{fromExtent:()=>x,fromGeometry:()=>p,fromMultipoint:()=>y,fromPoint:()=>d,fromPolygon:()=>v,fromPolyline:()=>C,fromPolylineUsingImportOperator:()=>M,fromSpatialReference:()=>E,getSpatialReference:()=>m,toExtent:()=>V,toGeometry:()=>P,toMultipoint:()=>Z,toPoint:()=>A,toPolygon:()=>O,toPolyline:()=>w});var s=r(83661),n=r(55537),a=r(95213),i=r(88885),o=r(5443),l=r(48526),h=r(86738),u=r(39829),f=r(82799),g=(r(90293),r(83299));const c="_gxVersion";function m(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function p(e){switch(e.type){case"point":return d(e);case"multipoint":return y(e);case"polyline":return C(e);case"polygon":return v(e);case"extent":return x(e);default:throw Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(c)){let t=new a.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(c,t)}return e.getCacheValue(c)}function y(e){if(!e.getCacheValue(c)){let t=new i.M,r=new a.P,s=e.points,n=e.hasM,o=e.hasZ,l=o?3:2;for(let e=0,a=s.length;e<a;e++){let a=s[e];r.setXYCoords(a[0],a[1]),o&&r.setZ(a[2]??0),n&&r.setM(a[l]??NaN),t.add(r)}e.setCacheValue(c,t)}return e.getCacheValue(c)}function d(e){if(!e.getCacheValue(c)){let t=new a.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(c,t)}return e.getCacheValue(c)}function v(e){if(!e.getCacheValue(c)){let{curveRings:t,hasM:r,hasZ:s,rings:n}=e,a=(0,g.fromGeometryToGXGeometry)({curveRings:t,hasM:r,hasZ:s,rings:n});e.setCacheValue(c,a)}return e.getCacheValue(c)}function C(e){if(!e.getCacheValue(c)){let{curvePaths:t,hasM:r,hasZ:s,paths:n}=e,a=(0,g.fromGeometryToGXGeometry)({curvePaths:t,hasM:r,hasZ:s,paths:n});e.setCacheValue(c,a)}return e.getCacheValue(c)}function M(e){if(!e.getCacheValue(c)){let{curvePaths:t,hasM:r,hasZ:s,paths:n}=e,a=(0,g.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:r,hasZ:s,paths:n});e.setCacheValue(c,a)}return e.getCacheValue(c)}function E(e){return e.cache?(e.cache[c]??=(0,g.fromSpatialReference)(e),e.cache[c]):(0,g.fromSpatialReference)(e)}function P(e,t){if(e)switch(e.getGeometryType()){case n.G.enumPoint:return A(e,t);case n.G.enumEnvelope:return V(e,t);case n.G.enumMultiPoint:return Z(e,t);case n.G.enumPolyline:return w(e,t);case n.G.enumPolygon:return O(e,t)}return null}function V(e,t){if(e.isEmpty())return null;let r=new o.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),s=e.getDescription();if(s.hasM()){let t=e.queryInterval(2,0);r.mmin=t.vmin,r.mmax=t.vmax}if(s.hasZ()){let t=e.queryInterval(1,0);r.zmin=t.vmin,r.zmax=t.vmax}return r.setCacheValue(c,e),r}function Z(e,t){if(e.isEmpty())return null;let r=e.getDescription(),s=r.hasM(),n=r.hasZ(),i=[],o=new a.P;for(let t=0,r=e.getPointCount();t<r;t++){e.getPointByVal(t,o);let r=[o.getX(),o.getY()];n&&r.push(o.getZ()),s&&r.push(o.getM()),i.push(r)}let h=new l.A({hasM:s,hasZ:n,points:i,spatialReference:t});return h.setCacheValue(c,e),h}function A(e,t){if(e instanceof s.P)return new h.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;let r=new h.A({x:e.getX(),y:e.getY(),spatialReference:t}),n=e.getDescription();return n.hasM()&&(r.m=e.getM()),n.hasZ()&&(r.z=e.getZ()),r.setCacheValue(c,e),r}function O(e,t){if(e.isEmpty())return null;let r=u.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(c,e),r}function w(e,t){if(e.isEmpty())return null;let r=f.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(c,e),r}},92722(e,t,r){r.d(t,{A:()=>n});var s=r(69397);class n{constructor(e=[],t=[],r=!1,s=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:s}){return new n(e,t,r||!1,s||!1)}static fromRect([e,t,r,s]){let a=r-e,i=s-t;return new n([5],[e,t,a,0,0,i,-a,0,0,-i])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:s}=this,n=this.coords[s*t],a=this.coords[s*t+1];for(let i=1;i<r;i+=1){let r=s*(t+i),o=this.coords[r],l=this.coords[r+1];e+=-.5*(o-n)*(l+a),n=o,a=l}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let s of this.lengths){for(let n=0;n<s;n++){let s=r*(t+n);e(this.coords[s],this.coords[s+1])}t+=s}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,s=0,{stride:n}=this;for(let e of r){for(let r=1;r<e;r++){let e=n*(s+r);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}s+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:s}=this,a=this.coords.slice(0,s*r);return e?(e.set(a),new n(t,e,this.hasZ,this.hasM)):new n(t,Array.from(a),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,s=0;t<r.length;t+=e)r[s++]=this.coords[t],r[s++]=this.coords[t+1];return new n(this.lengths,r,!1,!1)}}}}]);