@arcgis/core 5.2.0-next.166 → 5.2.0-next.168

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 (245) hide show
  1. package/Map.d.ts +6 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/057f245d70e57a1bcb46.js +1 -0
  4. package/assets/esri/core/workers/chunks/{1419bf346978b81b08cc.js → 094eb9677cdebfaa9e1b.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0d52e1b6d38f2670658c.js +1 -0
  6. package/assets/esri/core/workers/chunks/0f7455dbe8c2ee464194.js +1 -0
  7. package/assets/esri/core/workers/chunks/10878932826ddb60fac4.js +1 -0
  8. package/assets/esri/core/workers/chunks/144bad0c2415c345736a.js +1 -0
  9. package/assets/esri/core/workers/chunks/{3dddae78286d05eb10fc.js → 181b58bbbbfe4557ab5d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1a614bac5db42c6263f8.js +1 -0
  11. package/assets/esri/core/workers/chunks/{99a0a434ea2162166754.js → 2095f220dc2b8f8f62db.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{5daa9429808ca31279f2.js → 216a239142dfe1306c6c.js} +1 -1
  13. package/assets/esri/core/workers/chunks/25c3be410d1c03f8f39d.js +1 -0
  14. package/assets/esri/core/workers/chunks/294276ed397023dcda44.js +1 -0
  15. package/assets/esri/core/workers/chunks/2a2a4650dd9b953d317c.js +1 -0
  16. package/assets/esri/core/workers/chunks/2b6684d057d9ad17ac13.js +1 -0
  17. package/assets/esri/core/workers/chunks/{ad96132bc89671e595f3.js → 2d3e0e4442dbc6ec6def.js} +1 -1
  18. package/assets/esri/core/workers/chunks/2d83ba260dd6bbe38206.js +1 -0
  19. package/assets/esri/core/workers/chunks/{69d5f8ef78b9b8b3d33d.js → 3286cf2afeb7f48564d9.js} +1 -1
  20. package/assets/esri/core/workers/chunks/3321cb0d4cb68b2ec8bf.js +1 -0
  21. package/assets/esri/core/workers/chunks/{e99c8c71c757bb161d87.js → 3636c2ac9b77950776d6.js} +1 -1
  22. package/assets/esri/core/workers/chunks/367b2f25cfe37847a48d.js +1 -0
  23. package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +1 -0
  24. package/assets/esri/core/workers/chunks/3c881b1adc8a5dea9a90.js +1 -0
  25. package/assets/esri/core/workers/chunks/{6a2562cc00727155fc01.js → 4024becaf4012c1f15a7.js} +1 -1
  26. package/assets/esri/core/workers/chunks/435ad7e6ed326da2b969.js +1 -0
  27. package/assets/esri/core/workers/chunks/4419732baf3459a80e6d.js +1 -0
  28. package/assets/esri/core/workers/chunks/46f0510846a309a390ca.js +1 -0
  29. package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +1 -0
  30. package/assets/esri/core/workers/chunks/509a74e9334f31b931d4.js +1 -0
  31. package/assets/esri/core/workers/chunks/50e8943d2c0b96fab2c1.js +1 -0
  32. package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +1 -0
  33. package/assets/esri/core/workers/chunks/561c48cb4d49b150765b.js +1 -0
  34. package/assets/esri/core/workers/chunks/{d90a3bfd45b5ed4092e0.js → 590fe0f56bc4c33a50e7.js} +1 -1
  35. package/assets/esri/core/workers/chunks/5d42f0898bf30ae940ea.js +1 -0
  36. package/assets/esri/core/workers/chunks/5f1cb79aec9c4a9b7ddc.js +29 -0
  37. package/assets/esri/core/workers/chunks/{5d2f043ebe1051326c56.js → 63b5418a1c3fe0a97a86.js} +1 -1
  38. package/assets/esri/core/workers/chunks/63c3a573dfe703056f8f.js +1 -0
  39. package/assets/esri/core/workers/chunks/673c61c964524150d9bc.js +1 -0
  40. package/assets/esri/core/workers/chunks/692f0093c444fcc752b5.js +1 -0
  41. package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +1 -0
  42. package/assets/esri/core/workers/chunks/{e6d10136bc08aef255ff.js → 712559f121f76c4e71ab.js} +1 -1
  43. package/assets/esri/core/workers/chunks/71a51795f715332fb4fe.js +1 -0
  44. package/assets/esri/core/workers/chunks/735c1dffc3439bdba3cc.js +1 -0
  45. package/assets/esri/core/workers/chunks/7862abd24fb5c3b12e6b.js +1 -0
  46. package/assets/esri/core/workers/chunks/{44d5508042cacdfcac47.js → 7d2be06dfbd92c8b9484.js} +1 -1
  47. package/assets/esri/core/workers/chunks/7f5b887a753bb67c8486.js +1 -0
  48. package/assets/esri/core/workers/chunks/822f83d7c09ef0a9bbdf.js +1 -0
  49. package/assets/esri/core/workers/chunks/849f446c718e892f39ce.js +1 -0
  50. package/assets/esri/core/workers/chunks/{76196c414e48834f7b92.js → 8f008eedb11685ee2048.js} +1 -1
  51. package/assets/esri/core/workers/chunks/98760040f0c9d47c718d.js +1 -0
  52. package/assets/esri/core/workers/chunks/{4b99b4cf729881e616bc.js → 98d1efb6f2439c6344cf.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{18f20fd43ec9ce03cef1.js → 9e04703ee5f5ec47db43.js} +1 -1
  54. package/assets/esri/core/workers/chunks/9e0b0262dec496451762.js +1 -0
  55. package/assets/esri/core/workers/chunks/{23fd4de56de352f63e2d.js → a2196a49f89d57a0a1c7.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{89c8b0f684c1f27d149e.js → a2f0894218e665780a21.js} +1 -1
  57. package/assets/esri/core/workers/chunks/a79cae328e866272754a.js +1 -0
  58. package/assets/esri/core/workers/chunks/a85cdafbaf1848bb924b.js +1 -0
  59. package/assets/esri/core/workers/chunks/b01688ccc29d33bfc82d.js +1 -0
  60. package/assets/esri/core/workers/chunks/b0a612d8ffa5c46d7db4.js +1 -0
  61. package/assets/esri/core/workers/chunks/b5eff28cf482d920b9ea.js +1 -0
  62. package/assets/esri/core/workers/chunks/b70885deebc6106597ad.js +1 -0
  63. package/assets/esri/core/workers/chunks/bedaa5e64ed81803829a.js +1 -0
  64. package/assets/esri/core/workers/chunks/c0a956d57fa28fd31052.js +1 -0
  65. package/assets/esri/core/workers/chunks/{a88f346786b04bd194dc.js → c0b38f8c808d434af5f6.js} +1 -1
  66. package/assets/esri/core/workers/chunks/c1cf3edce15f09648eb4.js +1 -0
  67. package/assets/esri/core/workers/chunks/c249a91dd23104723fab.js +1 -0
  68. package/assets/esri/core/workers/chunks/c45edd0a7d57263bb7d6.js +1 -0
  69. package/assets/esri/core/workers/chunks/c4bbe4707e90b7cd0379.js +1 -0
  70. package/assets/esri/core/workers/chunks/c52466eb1f3c33ae1f5a.js +1 -0
  71. package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +1 -0
  72. package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +1 -0
  73. package/assets/esri/core/workers/chunks/c7699edd14497d174445.js +1 -0
  74. package/assets/esri/core/workers/chunks/c80a3b039e510c118399.js +1 -0
  75. package/assets/esri/core/workers/chunks/{196979cc6a765be3c5cd.js → c88a70f68c8ce8c30e9b.js} +1 -1
  76. package/assets/esri/core/workers/chunks/c9feffb9884cfed52c4b.js +1 -0
  77. package/assets/esri/core/workers/chunks/caaf6306cc73f618d27d.js +1 -0
  78. package/assets/esri/core/workers/chunks/{b704f489d0f072a0bfcd.js → ccd19c490ca24db6ffb1.js} +1 -1
  79. package/assets/esri/core/workers/chunks/cdacc3e42f01c3b852d6.js +1 -0
  80. package/assets/esri/core/workers/chunks/d1d6154b4af1c9cc497b.js +1 -0
  81. package/assets/esri/core/workers/chunks/d20dcd4ce4b0111d924f.js +1 -0
  82. package/assets/esri/core/workers/chunks/{784a2fba3e18286958d1.js → d56fdf5ce5ff53dc0e69.js} +1 -1
  83. package/assets/esri/core/workers/chunks/d7cf32a8c6060a208f06.js +1 -0
  84. package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +1 -0
  85. package/assets/esri/core/workers/chunks/dd08dff19a2ffd36f284.js +1 -0
  86. package/assets/esri/core/workers/chunks/de3f140058aa0b907b65.js +1 -0
  87. package/assets/esri/core/workers/chunks/df375d1b0dab5ecbd1be.js +1 -0
  88. package/assets/esri/core/workers/chunks/{e2775b4b753306dc8477.js → df7603ef7d2a7cbeaaa2.js} +1 -1
  89. package/assets/esri/core/workers/chunks/e9cdb0b0f074583edebd.js +1 -0
  90. package/assets/esri/core/workers/chunks/eaab787a5f2445be5e5a.js +1 -0
  91. package/assets/esri/core/workers/chunks/edd36a1fc80b1d29907e.js +1 -0
  92. package/assets/esri/core/workers/chunks/{444e5f214abce3d607cd.js → eeb068c265bd3a22a8c1.js} +1 -1
  93. package/assets/esri/core/workers/chunks/f2cfee8a761ae91f7a3e.js +1 -0
  94. package/assets/esri/core/workers/chunks/f3fdf75843ade0ca591e.js +1 -0
  95. package/assets/esri/core/workers/chunks/f5cc78291b53931b91e8.js +1 -0
  96. package/assets/esri/core/workers/chunks/f9dc38761b314d33890f.js +1 -0
  97. package/assets/esri/core/workers/chunks/feb6e041dd0aa1c59c31.js +1 -0
  98. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ar.json +1 -1
  99. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bg.json +1 -1
  100. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bs.json +1 -1
  101. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ca.json +1 -1
  102. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.cs.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.da.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.de.json +1 -1
  105. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.el.json +1 -1
  106. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.es.json +1 -1
  107. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.et.json +1 -1
  108. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fi.json +1 -1
  109. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fr.json +1 -1
  110. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.he.json +1 -1
  111. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hr.json +1 -1
  112. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hu.json +1 -1
  113. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.id.json +1 -1
  114. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.it.json +1 -1
  115. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ja.json +1 -1
  116. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ko.json +1 -1
  117. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lt.json +1 -1
  118. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lv.json +1 -1
  119. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.nl.json +1 -1
  120. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.no.json +1 -1
  121. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pl.json +1 -1
  122. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-BR.json +1 -1
  123. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-PT.json +1 -1
  124. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ro.json +1 -1
  125. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ru.json +1 -1
  126. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sk.json +1 -1
  127. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sl.json +1 -1
  128. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sr.json +1 -1
  129. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sv.json +1 -1
  130. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.th.json +1 -1
  131. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.tr.json +1 -1
  132. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.uk.json +1 -1
  133. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.vi.json +1 -1
  134. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-CN.json +1 -1
  135. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-HK.json +1 -1
  136. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-TW.json +1 -1
  137. package/config.js +1 -1
  138. package/core/workers/workers.js +2 -2
  139. package/core/workers.d.ts +1 -1
  140. package/graphic/MapNotesGraphicOrigin.d.ts +1 -0
  141. package/kernel.js +1 -1
  142. package/layers/ElevationLayer.d.ts +6 -2
  143. package/layers/VectorTileLayer.d.ts +10 -1
  144. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  145. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  146. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  147. package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
  148. package/layers/orientedImagery/transformations/rotationUtils.js +2 -0
  149. package/layers/orientedImagery/transformations/utils.js +1 -1
  150. package/package.json +2 -2
  151. package/support/BasemapStyle.d.ts +2 -2
  152. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
  153. package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
  154. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  155. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  156. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  157. package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +2 -0
  158. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  159. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  160. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  161. package/widgets/OrientedImageryViewer.js +2 -2
  162. package/assets/esri/core/workers/chunks/010f57ec7fdbedf78d02.js +0 -1
  163. package/assets/esri/core/workers/chunks/02e10f44edf911832c2a.js +0 -1
  164. package/assets/esri/core/workers/chunks/07f7177bfaf9de73bc25.js +0 -1
  165. package/assets/esri/core/workers/chunks/090adefe20412e8a5084.js +0 -1
  166. package/assets/esri/core/workers/chunks/0d9c4c6c571ce26d356b.js +0 -1
  167. package/assets/esri/core/workers/chunks/1201b8c5852830836eac.js +0 -1
  168. package/assets/esri/core/workers/chunks/151e5799ede763a03ee2.js +0 -1
  169. package/assets/esri/core/workers/chunks/168a523bdc3653081f8a.js +0 -1
  170. package/assets/esri/core/workers/chunks/175c268e64ccd01f8c25.js +0 -1
  171. package/assets/esri/core/workers/chunks/18787aa685524b958561.js +0 -1
  172. package/assets/esri/core/workers/chunks/1e1c45f75020d5e05dc3.js +0 -1
  173. package/assets/esri/core/workers/chunks/28104681ba161967039f.js +0 -1
  174. package/assets/esri/core/workers/chunks/2a36fe3f3f257a779a1b.js +0 -1
  175. package/assets/esri/core/workers/chunks/30af63b3b750142faadb.js +0 -1
  176. package/assets/esri/core/workers/chunks/3f946c13ad97fbed867b.js +0 -1
  177. package/assets/esri/core/workers/chunks/40d803584eeade4df433.js +0 -1
  178. package/assets/esri/core/workers/chunks/41773d858e212468db88.js +0 -1
  179. package/assets/esri/core/workers/chunks/426b4eb500fdfe9df325.js +0 -1
  180. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +0 -1
  181. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +0 -1
  182. package/assets/esri/core/workers/chunks/4932773663469919d10a.js +0 -1
  183. package/assets/esri/core/workers/chunks/49b967d89d2841cea675.js +0 -1
  184. package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +0 -1
  185. package/assets/esri/core/workers/chunks/4cb751dc8d00bdaeb04c.js +0 -1
  186. package/assets/esri/core/workers/chunks/4d3d7ec407ee5cd5f036.js +0 -1
  187. package/assets/esri/core/workers/chunks/4fd0d9688df6fcc0d0b8.js +0 -1
  188. package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +0 -1
  189. package/assets/esri/core/workers/chunks/548b8f74a6883e364931.js +0 -1
  190. package/assets/esri/core/workers/chunks/5af8fb4ec2c72697e35b.js +0 -1
  191. package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +0 -1
  192. package/assets/esri/core/workers/chunks/5dc604e3691f36f03959.js +0 -1
  193. package/assets/esri/core/workers/chunks/611e3cdf67283c11576f.js +0 -1
  194. package/assets/esri/core/workers/chunks/61552b4b8111a8624d84.js +0 -1
  195. package/assets/esri/core/workers/chunks/6299be5e7e26bf3c6859.js +0 -1
  196. package/assets/esri/core/workers/chunks/632fdf1d95ad69109427.js +0 -1
  197. package/assets/esri/core/workers/chunks/652faf4359ac072c5dde.js +0 -1
  198. package/assets/esri/core/workers/chunks/6b9961261241fdce0e94.js +0 -1
  199. package/assets/esri/core/workers/chunks/710b8251a59884aee31e.js +0 -1
  200. package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +0 -29
  201. package/assets/esri/core/workers/chunks/7393f63043a1da3d05a6.js +0 -1
  202. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +0 -1
  203. package/assets/esri/core/workers/chunks/771dd92cb3e6a3427f66.js +0 -1
  204. package/assets/esri/core/workers/chunks/7748c2886d0122b40eeb.js +0 -1
  205. package/assets/esri/core/workers/chunks/78c4e43cfa1eda06b4d9.js +0 -1
  206. package/assets/esri/core/workers/chunks/7e0f04a5038e2a4f6e4b.js +0 -1
  207. package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +0 -1
  208. package/assets/esri/core/workers/chunks/7f16ae01ccd9b6114d1c.js +0 -1
  209. package/assets/esri/core/workers/chunks/82a022cc21364c9a8539.js +0 -1
  210. package/assets/esri/core/workers/chunks/8924e2f3b7d03afb3a6a.js +0 -1
  211. package/assets/esri/core/workers/chunks/90153b5230b3a4985c14.js +0 -1
  212. package/assets/esri/core/workers/chunks/9189dfe19a2a2ccd5173.js +0 -1
  213. package/assets/esri/core/workers/chunks/9215b59c5ccecf9add58.js +0 -1
  214. package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +0 -1
  215. package/assets/esri/core/workers/chunks/967b4992b400517ee712.js +0 -1
  216. package/assets/esri/core/workers/chunks/9dd1fc56eb1ea6eb705e.js +0 -1
  217. package/assets/esri/core/workers/chunks/a163c6005aba3378edaa.js +0 -1
  218. package/assets/esri/core/workers/chunks/a53823cf03dbdce1aecd.js +0 -1
  219. package/assets/esri/core/workers/chunks/a62c12925303ff802c3d.js +0 -1
  220. package/assets/esri/core/workers/chunks/acb265a22be5e12f38e5.js +0 -1
  221. package/assets/esri/core/workers/chunks/acdfd275dbf8533a67f3.js +0 -1
  222. package/assets/esri/core/workers/chunks/ace802483484519658f3.js +0 -1
  223. package/assets/esri/core/workers/chunks/b3007aedbf731dacaff1.js +0 -1
  224. package/assets/esri/core/workers/chunks/b4334713bacdfe40ce3d.js +0 -1
  225. package/assets/esri/core/workers/chunks/b83cef2d3f528726d492.js +0 -1
  226. package/assets/esri/core/workers/chunks/be97a629e2ae4d13ceb3.js +0 -1
  227. package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +0 -1
  228. package/assets/esri/core/workers/chunks/c47d095434d09b5f10c6.js +0 -1
  229. package/assets/esri/core/workers/chunks/c4b7111dcedd9d6e1c2a.js +0 -1
  230. package/assets/esri/core/workers/chunks/c5d85be6e16bc895e7fb.js +0 -1
  231. package/assets/esri/core/workers/chunks/c8d6bb5cca49926a0214.js +0 -1
  232. package/assets/esri/core/workers/chunks/cb4be68cc5085d421615.js +0 -1
  233. package/assets/esri/core/workers/chunks/cb4db5489388559d6bd9.js +0 -1
  234. package/assets/esri/core/workers/chunks/cc794bb94ebc1cb66024.js +0 -1
  235. package/assets/esri/core/workers/chunks/cc94bf05b235e65291fc.js +0 -1
  236. package/assets/esri/core/workers/chunks/d4af9faa5d901274fad2.js +0 -1
  237. package/assets/esri/core/workers/chunks/d77c68e0fc3b259bf4f9.js +0 -1
  238. package/assets/esri/core/workers/chunks/daf9b691817e83a11f3c.js +0 -1
  239. package/assets/esri/core/workers/chunks/de0f335f702ae85a1df3.js +0 -1
  240. package/assets/esri/core/workers/chunks/e11159e3dc3353b27c57.js +0 -1
  241. package/assets/esri/core/workers/chunks/f8379cd45f750f28a3d8.js +0 -1
  242. package/assets/esri/core/workers/chunks/f905f1a1aa4c123cbe83.js +0 -1
  243. package/assets/esri/core/workers/chunks/fd4635410b27bcedb752.js +0 -1
  244. package/assets/esri/core/workers/chunks/fda83bcb8e40e8044c24.js +0 -1
  245. package/assets/esri/core/workers/chunks/feb4f8c807bb0dca488f.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9235],{99235(t,e,s){s.d(e,{vt:()=>Vr,UD:()=>Er});var r=s(85334),n=s(49186),i=s(4718),o=s(32198),a=s(91429),l=s(94778),u=s(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 d=m;var g=s(14140),f=s(87186);const y=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let w=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 t=this.getWebGLProcessorDefinition();if(!t)return null;let e=[t],{parameters:s}=t,r=s.rasters||s.raster&&[s.raster];for(;r?.length;){e.unshift(...r);let t=[];for(let e=0;e<r.length;e++){let{parameters:s}=r[e],n=s.rasters||s.raster&&[s.raster];n?.length&&t.push(...n)}r=t}for(let t=e.length-1;t>=0;t--)e[t].isNoopProcess&&e.splice(t,1);let n=!1;for(let t=0;t<e.length;t++){let s=e[t];s.id=e.length-t-1;let{rasters:r}=s.parameters;n||=null!=r&&r.length>1}let i=e.some(({name:t})=>y.has(t.toLowerCase())),{rawSourceRasterInfos:o}=this;return{functions:e,hasBranches:n,hasFocalFunction:i,isSourceSingleBand:1===o?.[0]?.bandCount}}get neighborhoodSize(){let{rows:t,cols:e}=this._getNeighborhoodSize(),s=this.getImmediateChildFunctions();for(let r of s){let s=r.neighborhoodSize;t=Math.max(t,s.rows),e=Math.max(e,s.cols)}return{rows:t,cols:e}}bind(t,e=!1,s=-1){this.id=s+1;let r=this._getRasterValues(),n=!0;for(let s=0;s<r.length;s++){let i=r[s];if(null!=i&&this._isRasterFunctionValue(i)){let r=i.bind(t,e,this.id+s);if(!r.success)return this._bindingResult=r,r;n&&=r.supportsGPU}}return!this.rasterInfo||e?(this.sourceRasterInfos=this._getSourceRasterInfos(t),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(t){let e=[this];for(;e.length;){let s=e.pop();if(t(s))return s;let r=s.getImmediateChildFunctions();e.push(...r)}}getImmediateChildFunctions(){return this._getRasterValues().filter(t=>t&&"object"==typeof t&&"bind"in t)}process(t,e){let s=this._getRasterValues(),r=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map(s=>this._readRasterValue(s,t,e));return this._processPixels({...t,pixelBlocks:r},e)}processInputBandIds(){let t=this._getRasterValues().filter(this._isRasterFunctionValue);if(t.length>1){let e=t.map(t=>t.processInputBandIds());return this.rawInputBandIds=[...new Set(e.flat())],this.rawInputBandIds}let e=t[0];if(e)return this.rawInputBandIds=e.processInputBandIds(),this.rawInputBandIds;let{bandCount:s}=this.sourceRasterInfos[0],r=Array.from({length:s},(t,e)=>e);return this.rawInputBandIds=this._getInputBandIds(r),this.rawInputBandIds}swizzleInputBandIds(t){let e=this._getRasterValues().filter(this._isRasterFunctionValue),s=!0;for(let r of e)s=r.swizzleInputBandIds(t)&&s;return!!s&&this._swizzleBandIds(t)}getPrimaryRasters(){let t=[],e=[];return this._getPrimaryRasters(this,t,e),{rasters:t,rasterIds:e}}getWebGLProcessorDefinition(){let t=this._getWebGLParameters(),{raster:e,rasters:s}=this.functionArguments;return s&&Array.isArray(s)&&s.length?(t.rasters=s.map(t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}),t.rasters.some(t=>null!=t)||(t.rasters=null)):this._isRasterFunctionValue(e)&&(t.raster=e.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getClippingGeometries(){let t=[];"Clip"===this.functionName&&t.push(this.functionArguments);let{raster:e,rasters:s}=this.functionArguments;if(s&&Array.isArray(s)&&s.length)s.forEach(e=>{if(this._isRasterFunctionValue(e)){let s=e.getClippingGeometries();t.push(...s)}});else if(this._isRasterFunctionValue(e)){let s=e.getClippingGeometries();t.push(...s)}return t}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_swizzleBandIds(t){return!0}_isInputRasterPrimaryOrConstant(){return!this._getRasterValues().some(t=>t&&"object"==typeof t&&"rasterFunction"in t&&t.rasterFunction)}_getNeighborhoodSize(){return{rows:1,cols:1}}_removeStatsHistColormapVAT(t){t.statistics=null,t.histograms=null,t.colormap=null,t.attributeTable=null,t.multidimensionalInfo?.variables.forEach(t=>{t.statistics=void 0,t.histograms=void 0})}_getRasterValues(){let{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.flatMap(t=>this.functionArguments[t])}_getSourceRasterInfos(t){let e=this._getRasterValues(),{rasterInfos:s,rasterIds:r}=t;if(0===e.length)return s;let n=e.map(t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&r.includes(t)?s[r.indexOf(t)]:"number"!=typeof t?s[0]:void 0),i=n.find(t=>t)??s[0];return n.forEach((t,e)=>{void 0===t&&(n[e]=i)}),n}_getPrimaryRasterId(t){return t?.rasterId}_getPrimaryRasters(t,e=[],s=[]){for(let r=0;r<t.sourceRasters.length;r++){let n=t.sourceRasters[r];if("number"!=typeof n)if("bind"in n)this._getPrimaryRasters(n,e,s);else{let t=n,r=this._getPrimaryRasterId(t);if(null==r)continue;s.includes(r)||(this.mainPrimaryRasterId===r?(e.unshift(t),s.unshift(r)):(e.push(t),s.push(r)))}}}_isRasterFunctionValue(t){return"object"==typeof t&&!!t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,e,s){let{primaryPixelBlocks:r}=e;if(null==t||"$$"===t){let t=r[0];return null==t?null:t.clone()}if("string"==typeof t){let s=e.primaryRasterIds.indexOf(t);return-1===s?null:r[s]}if("number"==typeof t){let e=r[0];if(null==e)return null;let{width:s,height:n,pixelType:i}=e,o=new Float32Array(s*n);o.fill(t);let a=this.sourceRasterInfos[0].bandCount,l=Array(a).fill(o);return new g.A({width:s,height:n,pixelType:i,pixels:l})}return t.process(e,s)}_patchRasterInfo(){let{rasterInfo:t}=this;if(!t?.keyProperties)return;let{bandCount:e,keyProperties:s,statistics:r,histograms:n}=t,i=s.BandProperties;i&&i.length!==e&&(t.keyProperties={...s,BandProperties:void 0}),r&&r.length!==e&&(t.statistics=r.length>e?r.slice(0,e):null),n&&n.length!==e&&(t.histograms=n.length>e?n.slice(0,e):null),s.BAND_COUNT&&Number(s.BAND_COUNT)!==e&&(t.keyProperties={...s,BAND_COUNT:"string"==typeof s.BAND_COUNT?String(e):e})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}}),(0,a.wg)(t=>t?.toLowerCase())],w.prototype,"outputPixelType",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"mainPrimaryRasterId",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"sourceRasters",void 0),(0,o.Cg)([(0,a.MZ)({type:[f.A],json:{write:!0}})],w.prototype,"sourceRasterInfos",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"rasterInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"readingBufferSize",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"id",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"isNoopProcess",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"supportsGPU",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"rawInputBandIds",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"rawSourceRasterInfos",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"isInputBandIdsSwizzled",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"swizzledBandSelection",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"isBranch",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"isRoot",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"flatWebGLFunctionChain",null),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"neighborhoodSize",null),(0,o.Cg)([(0,a.MZ)()],w.prototype,"_bindingResult",void 0),w=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseRasterFunction")],w);const x=w,v={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},A={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},C={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},b={setNull:50,conditional:78},M={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65,...A,...C,majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75,...b},P=new Map([[C.acos,{domain:[0,Math.PI],isInteger:!1}],[C.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[C.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[C.cos,{domain:[-1,1],isInteger:!1}],[C.sin,{domain:[-1,1],isInteger:!1}],[A.booleanAnd,{domain:[0,1],isInteger:!0}],[A.booleanNot,{domain:[0,1],isInteger:!0}],[A.booleanOr,{domain:[0,1],isInteger:!0}],[A.booleanXOr,{domain:[0,1],isInteger:!0}],[A.equalTo,{domain:[0,1],isInteger:!0}],[A.notEqual,{domain:[0,1],isInteger:!0}],[A.greaterThan,{domain:[0,1],isInteger:!0}],[A.greaterThanEqual,{domain:[0,1],isInteger:!0}],[A.lessThan,{domain:[0,1],isInteger:!0}],[A.lessThanEqual,{domain:[0,1],isInteger:!0}],[A.isNull,{domain:[0,1],isInteger:!0}]]);function T(t){return P.get(t)}const N=[0,2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,2,1,1,1,999,999,1,1,999,1,1,2,999,999,2,2,999,999,999,999,999,999,999,999,999,999,3,999,3];function I(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]+n[t]);return o}function R(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand("f32",n);return i.set(r),i}function F(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=r[t]*r[t]);return i}function _(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]-n[t]);return o}function k(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]*n[t]);return o}function S(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=Math.sign(r[t])*Math.floor(Math.abs(r[t])));return i}function B(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]/n[t]);return o}function j(t,e,s){return B(t,e,"f32")}function Z(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=Math.floor(r[t]/n[t]));return o}function z(t,e,s,r){let n=t[0],i=n.length,o=g.A.createEmptyBand(s,i);if(r===C.atanh){for(let t=0;t<i;t++)if(e[t]){let s=n[t];Math.abs(s)>=1?e[t]=0:o[t]=Math.atanh(s)}return o}let a=r===C.asin?Math.asin:Math.acos;for(let t=0;t<i;t++)if(e[t]){let s=n[t];Math.abs(s)>1?e[t]=0:o[t]=a(s)}return o}function G(t,e,s,r){let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r(n[t]));return o}function O(t,e,s,r){let[n,i]=t,o=n.length,a=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)(!e||e[t])&&(a[t]=r(n[t],i[t]));return a}function D(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]&n[t]);return o}function E(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]<<n[t]);return o}function V(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=~r[t]);return i}function U(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]|n[t]);return o}function L(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]>>n[t]);return o}function $(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]^n[t]);return o}function K(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]&&n[t]?1:0);return o}function W(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=+!r[t]);return i}function H(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]||n[t]?1:0);return o}function q(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+!!r[t]^!!n[t]);return o}function J(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]===n[t]));return o}function X(t,e,s,r){let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i),a=r===Math.E;for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=a?Math.exp(n[t]):r**n[t]);return o}function Q(t,e,s){return X(t,e,s,10)}function Y(t,e,s){return X(t,e,s,2)}function tt(t,e,s){return X(t,e,s,Math.E)}function et(t,e,s,r){let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(n[t]<=0?e[t]=0:o[t]=r(n[t]));return o}function st(t,e,s){return et(t,e,s,Math.log10)}function rt(t,e,s){return et(t,e,s,Math.log2)}function nt(t,e,s){return et(t,e,s,Math.log)}function it(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]>n[t]));return o}function ot(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]>=n[t]));return o}function at(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]<n[t]));return o}function lt(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]<=n[t]));return o}function ut(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);if(!e)return i;for(let t=0;t<n;t++)i[t]=+!e[t];return i}function pt(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]%n[t]);return o}function ct(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=-r[t]);return i}function ht(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]===n[t]?0:1);return o}function mt(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i),a=new Uint8Array(i);for(let t=0;t<i;t++)(null==e||e[t])&&0===r[t]&&(o[t]=n[t],a[t]=255);return{band:o,mask:a}}function dt(t,e,s){let[r,n,i]=t,o=r.length,a=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)(!e||e[t])&&(a[t]=r[t]?n[t]:i[t]);return a}function gt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=n[s];for(let n=1;n<r;n++){let r=t[n][s];e<r&&(e=r)}o[s]=e}return o}function ft(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=n[s];for(let n=1;n<r;n++){let r=t[n][s];e>r&&(e=r)}o[s]=e}return o}function yt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=n[s],i=e;for(let n=1;n<r;n++){let r=t[n][s];i<r?i=r:e>r&&(e=r)}o[s]=i-e}return o}function wt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=0;for(let n=0;n<r;n++)e+=t[n][s];o[s]=e/r}return o}function xt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s])for(let e=0;e<r;e++){let r=t[e];o[s]+=r[s]}return o}function vt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=new Float32Array(r),n=0;for(let i=0;i<r;i++){let r=t[i];n+=r[s],e[i]=r[s]}n/=r;let i=0;for(let t=0;t<r;t++)i+=(e[t]-n)**2;o[s]=Math.sqrt(i/r)}return o}function At(t,e,s){let r=t.length;if(r<2)return t[0];let n=Math.floor(r/2),[i]=t,o=i.length,a=g.A.createEmptyBand(s,o),l=new Float32Array(r),u=r%2==1;for(let s=0;s<o;s++)if(!e||e[s]){for(let e=0;e<r;e++)l[e]=t[e][s];l.sort(),a[s]=u?l[n]:(l[n]+l[n-1])/2}return a}function Ct(t,e,s){let[r,n]=t;if(null==n)return r;let i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]<n[t]?r[t]:n[t]);return o}function bt(t,e,s){let r=t.length;if(r<=2)return Ct(t,e,s);let n=t[0].length,i=g.A.createEmptyBand(s,n),o=new Map;for(let s=0;s<n;s++)if(!e||e[s]){o.clear();for(let e=0;e<r;e++){let r=t[e][s];o.set(r,o.has(r)?o.get(r)+1:1)}let e=0,n=0,a=[];for(let t of o.keys())e=o.get(t),e>n?(n=e,a.length=0,a.push(t)):e===n&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),i[s]=a[0]}return i}function Mt(t,e,s){let r=t.length;if(r<=2)return Ct(t,e,s);let n=t[0].length,i=g.A.createEmptyBand(s,n),o=new Map;for(let s=0;s<n;s++)if(!e||e[s]){o.clear();for(let e=0;e<r;e++){let r=t[e][s];o.set(r,o.has(r)?o.get(r)+1:1)}let e=0,n=t.length,a=[];for(let t of o.keys())e=o.get(t),e<n?(n=e,a.length=0,a.push(t)):e===n&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),i[s]=a[0]}return i}function Pt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i),a=new Set;for(let s=0;s<i;s++)if(!e||e[s]){let e;a.clear();for(let n=0;n<r;n++)e=t[n][s],a.add(e);o[s]=a.size}return o}const Tt=new Map,Nt=new Map,It=new Map,Rt=new Map;function Ft(){Tt.size||(Tt.set(4,Math.sqrt),Tt.set(6,Math.acos),Tt.set(7,Math.asin),Tt.set(8,Math.atan),Tt.set(9,Math.atanh),Tt.set(10,Math.abs),Tt.set(21,Math.cos),Tt.set(22,Math.cosh),Tt.set(48,Math.floor),Tt.set(49,Math.ceil),Tt.set(51,Math.sin),Tt.set(52,Math.sinh),Tt.set(56,Math.tan),Tt.set(57,Math.tanh),Tt.set(59,Math.acosh),Tt.set(60,Math.asinh),Tt.set(65,Math.floor),Nt.set(5,Math.pow),Nt.set(61,Math.atan2),It.set(1,I),It.set(2,_),It.set(3,k),It.set(11,D),It.set(12,E),It.set(13,V),It.set(14,U),It.set(15,L),It.set(16,$),It.set(17,K),It.set(18,W),It.set(19,H),It.set(20,q),It.set(23,B),It.set(24,J),It.set(25,tt),It.set(26,Q),It.set(27,Y),It.set(28,it),It.set(29,ot),It.set(30,S),It.set(31,ut),It.set(32,R),It.set(33,at),It.set(34,lt),It.set(35,nt),It.set(36,st),It.set(37,rt),It.set(44,pt),It.set(45,ct),It.set(46,ht),It.set(53,F),It.set(64,j),It.set(65,Z),It.set(76,dt),It.set(78,dt),Rt.set(38,bt),Rt.set(39,gt),Rt.set(40,wt),Rt.set(41,At),Rt.set(42,ft),Rt.set(43,Mt),Rt.set(47,yt),Rt.set(54,vt),Rt.set(55,xt),Rt.set(58,Pt),Rt.set(66,bt),Rt.set(67,gt),Rt.set(68,wt),Rt.set(69,At),Rt.set(70,ft),Rt.set(71,Mt),Rt.set(72,yt),Rt.set(73,vt),Rt.set(74,xt),Rt.set(75,Pt))}function _t(t,e,s={}){Ft();let r=function(t,e=!1){let s=t.map(t=>t.mask),r=s.filter(t=>null!=t),n=t[0].pixels[0].length;if(0===r.length||e&&r.length!==s.length)return new Uint8Array(n).fill(255);let i=r[0],o=new Uint8Array(i);if(1===r.length)return o;if(!e){for(let t=1;t<r.length;t++){let e=r[t];for(let t=0;t<o.length;t++)o[t]&&(o[t]=e[t]?255:0)}return o}for(let t=1;t<r.length;t++){let e=r[t];for(let t=0;t<o.length;t++)0===o[t]&&(o[t]=e[t]?255:0)}return o}(t,e>=66&&e<=75),{outputPixelType:n="f32"}=s,i=!Rt.has(e)||s.processAsMultiband,o=i?t[0].pixels.length:1,a=[];for(let s=0;s<o;s++){let o,u=Rt.has(e)&&!i?t.flatMap(t=>t.pixels):t.map(t=>t.pixels[s]),p=!0;if(e===b.setNull){let t=mt(u,r,n);o=t.band,r=t.mask,p=!1}else It.has(e)?o=It.get(e)(u,r,"f64"):Tt.has(e)?o=e===C.asin||e===C.acos||e===C.atanh?z(u,r,"f64",e):G(u,r,"f64",Tt.get(e)):Nt.has(e)?o=O(u,r,"f64",Nt.get(e)):Rt.has(e)?o=Rt.get(e)(u,r,"f64"):(o=u[0],p=!1);if(p&&e!==A.isNull&&!P.has(e)){let t=g.A.createEmptyBand(n,o.length);r||=new Uint8Array(o.length).fill(255),(0,l.$p)(o,r),(0,l.yM)(o,r,n,t),o=t}a.push(o)}let u=t[0];return new g.A({width:u.width,height:u.height,pixelType:n,mask:e===A.isNull?null:r,pixels:a})}let kt=class extends x{constructor(){super(...arguments),this.functionName="Arithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){let{operation:t}=this.functionArguments;if(t<1||t>6)return{success:!1,supportsGPU:!1,error:"unsupported operation"};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:e.bandCount<=3}}_processPixels(t){let{pixelBlocks:e}=t;return null==e?.[0]||null==e?.[1]?null:function(t,e,s){return _t(t,e=[null,1,2,3,23,5,44][e]??1,{outputPixelType:s})}(e,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){let{operation:t}=this.functionArguments,e=["","plus","minus","times","divide","power","mod"][t],s=this.outputPixelType??"f32",[r,n]=(0,l.hP)(s),i=(0,l.zw)(s);return i&&(r-=1e-4,n+=1e-4),{imageCount:2,operationName:e,domainRange:[r,n],isOutputRounded:i}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],kt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:d,json:{write:!0,name:"rasterFunctionArguments"}})],kt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],kt.prototype,"rasterArgumentNames",void 0),kt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunction")],kt);const St=kt;var Bt;let jt=Bt=class extends c{clone(){return new Bt({raster:this.raster})}};jt=Bt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunctionArguments")],jt);const Zt=jt;var zt=s(51181);let Gt=class extends x{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let t=this.sourceRasterInfos[0];this.isGCS=t.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");let e=t.clone();return e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),e.statistics=[{min:-1,max:360,avg:180,stddev:30}],e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{extent:s,primaryPixelSizes:r}=t,n=r?.[0]??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1});return(0,zt.di)(e,{resolution:n})}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Gt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Zt,json:{write:!0,name:"rasterFunctionArguments"}})],Gt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Gt.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gt.prototype,"isGCS",void 0),Gt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunction")],Gt);const Ot=Gt;var Dt=s(66552);const Et=new Set(["+","-","*","/","(",")"]);function Vt(t,e){return t.toLowerCase().startsWith("b")?e[parseInt(t.slice(1),10)-1]:parseFloat(t)}function Ut(t,e,s,r){if("number"==typeof s&&"number"==typeof r)return s+r;let n,i,o;"number"==typeof s?(o=r,n=o.length,i=new Float32Array(n),i.fill(s)):(n=s.length,i=s,r.constructor===Number?(o=new Float32Array(n),o.fill(r)):o=r);let a=new Float32Array(n);switch(e){case"+":for(let e=0;e<n;e++)(null==t||t[e])&&(a[e]=i[e]+o[e]);break;case"-":for(let e=0;e<n;e++)(null==t||t[e])&&(a[e]=i[e]-o[e]);break;case"*":for(let e=0;e<n;e++)(null==t||t[e])&&(a[e]=i[e]*o[e]);break;case"/":for(let e=0;e<n;e++)(null==t||t[e])&&o[e]&&(a[e]=i[e]/o[e]);break;case"(":case")":throw Error("encountered error with custom band index equation")}return a}function Lt(t,e){t.splice(e,1);let s=0,r=0;do{s=0,r=0;for(let e=0;e<t.length;e++)if("("===t[e])s=e;else if(")"===t[e]){r=e;break}r===s+1&&t.splice(s,2)}while(r===s+1);return t}function $t(t){if(1===t.length)return{opIndex:0,numIndex:0};let e=0,s=0;for(let r=0;r<t.length;r++)if("("===t[r])e=r;else if(")"===t[r]){s=r;break}let r=0===s?t:t.slice(e+1,s),n=-1;for(let t=0;t<r.length;t++)if("*"===r[t]||"/"===r[t]){n=t;break}if(n>-1)s>0&&(n+=e+1);else{for(let t=0;t<r.length;t++)if("+"===r[t]||"-"===r[t]){n=t;break}s>0&&(n+=e+1)}let i=0;for(let e=0;e<n;e++)"("===t[e]&&i++;return{opIndex:n,numIndex:n-i}}var Kt=s(47520);const Wt=new Dt.J({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function Ht(t,e){if(!(0,Kt.AB)(t))return t;let s,{equation:r,method:n}=e,i=e.bandIndexes.map(t=>t-1),{pixels:o,mask:a}=t;switch(n){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":s=Jt(a,o[i[0]],o[i[1]]);break;case"ndwi":s=Jt(a,o[i[1]],o[i[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=e[i],r=s[i];r&&(n[i]=t/r)}return[n]}(a,o[i[0]],o[i[1]]);break;case"ci-g":case"ci-re":s=function(t,e,s){let r=e.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=e[i],r=s[i];r&&(n[i]=t/r-1)}return[n]}(a,o[i[0]],o[i[1]]);break;case"savi":s=function(t,e,s,r){let n=s.length,i=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){let t=s[o],n=e[o],a=n+t+r;a&&(i[o]=(n-t)/a*(1+r))}return[i]}(a,o[i[0]],o[i[1]],i[2]+1);break;case"tsavi":s=function(t,e,s,r,n,i){let o=s.length,a=new Float32Array(o),l=-n*r+i*(1+r*r);for(let i=0;i<o;i++)if(null==t||t[i]){let t=s[i],o=e[i],u=n*o+t+l;u&&(a[i]=r*(o-r*t-n)/u)}return[a]}(a,o[i[0]],o[i[1]],i[2]+1,i[3]+1,i[4]+1);break;case"msavi":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=s[i],r=e[i],o=2*r+1;n[i]=.5*(o-Math.sqrt(o*o-8*(r-t)))}return[n]}(a,o[i[0]],o[i[1]]);break;case"gemi":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=s[i],r=e[i];if(1!==t&&r+t+.5!==0){let e=(2*(r*r-t*t)+1.5*r+.5*t)/(r+t+.5);n[i]=e*(1-.25*e)-(t-.125)/(1-t)}}return[n]}(a,o[i[0]],o[i[1]]);break;case"pvi":s=function(t,e,s,r,n){let i=s.length,o=new Float32Array(i),a=1/Math.sqrt(1+r*r);for(let l=0;l<i;l++)if(null==t||t[l]){let t=s[l],i=e[l];o[l]=(i-r*t-n)*a}return[o]}(a,o[i[0]],o[i[1]],i[2]+1,i[3]+1);break;case"gvitm":s=function(t,e){let[s,r,n,i,o,a]=e,l=s.length,u=new Float32Array(l);for(let e=0;e<l;e++)(null==t||t[e])&&(u[e]=-.2848*s[e]-.2435*r[e]-.5436*n[e]+.7243*i[e]+.084*o[e]-.18*a[e]);return[u]}(a,[o[i[0]],o[i[1]],o[i[2]],o[i[3]],o[i[4]],o[i[5]]]);break;case"sultan":s=function(t,e){let[s,r,n,i,o]=e,a=s.length,l=new Float32Array(a),u=new Float32Array(a),p=new Float32Array(a);for(let e=0;e<a;e++)(null==t||t[e])&&(l[e]=o[e]?i[e]/o[e]*100:0,u[e]=s[e]?i[e]/s[e]*100:0,p[e]=n[e]?r[e]/n[e]*(i[e]/n[e])*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":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=i+t-n[e];a&&(o[e]=(i-t)/a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"mtvi2":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=n[e],l=Math.sqrt((2*t+1)**2-(6*t-5*Math.sqrt(i))-.5);if(l){let s=1.5*(1.2*(t-a)-2.5*(i-a));o[e]=s/l}}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"rtvi-core":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=n[e];o[e]=100*(t-i)-10*(t-a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"evi":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=t+6*i-7.5*n[e]+1;a&&(o[e]=2.5*(t-i)/a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"wndwi":s=function(t,e,s=.5){let[r,n,i]=e,o=n.length,a=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){let t=r[e],o=n[e],l=i[e],u=t+s*o+(1-s)*l;u&&(a[e]=(t-s*o-(1-s)*l)/u)}return[a]}(a,[o[i[0]],o[i[1]],o[i[2]]],i[3]?i[3]+1:.5);break;case"bai":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i])for(i=0;i<r;i++){let t=(.1-e[i])**2+(.06-s[i])**2;t&&(n[i]=1/t)}return[n]}(a,o[i[0]],o[i[1]]);break;case"custom":s=function(t,e,s){let r,{ops:n,nums:i}=function(t,e){(t=t.replaceAll(" ","")).startsWith("-")&&(t="0"+t),t.startsWith("+")&&(t=t.slice(1));let s=t.split(""),r=[],n=[],i="";for(let t=0;t<s.length;t++){let o=s[t];Et.has(o)?(i.length&&n.push(Vt(i,e)),r.push(o),i=""):i=i.concat(o)}return i.length&&n.push(Vt(i,e)),{ops:r,nums:n}}(s,e);if(0===n.length){let t=1===i.length?i[0]:e[0];if(t instanceof Float32Array)return[t];let s=new Float32Array(e[0].length);return"number"==typeof t?s.fill(t):s.set(t),[s]}for(;n.length>0;){let{numIndex:e,opIndex:s}=$t(n);if(r=Ut(t,n[s],i[e],i[e+1]),1===n.length)break;n=Lt(n,s),i.splice(e,2,r)}return[r]}(a,o,r);break;default:return t}let u,{outputPixelType:p="f32"}=e,c=null!=p&&(0,l.zw)(p);a?(u=new Uint8Array(t.width*t.height),u.set(a)):c&&(u=new Uint8Array(t.width*t.height).fill(255)),c&&(s=s.map(t=>{let e=g.A.createEmptyBand(p,t.length);return(0,l.yM)(t,u,p,e),e}));let h=new g.A({width:t.width,height:t.height,pixelType:p,pixels:s,mask:u});return h.updateStatistics(),h}function qt(t){let e=new Float32Array(9);return e[3*t[0]]=1,e[3*t[1]+1]=1,e[3*t[2]+2]=1,e}function Jt(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=e[i],r=s[i],o=t+r;o&&(n[i]=(t-r)/o)}return[n]}var Xt,Qt=s(93223);let Yt=Xt=class extends c{constructor(){super(...arguments),this.method="custom"}clone(){return new Xt({method:this.method,bandIndexes:this.bandIndexes,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{type:String,write:!0}})],Yt.prototype,"bandIndexes",void 0),(0,o.Cg)([(0,Qt.e)(Wt)],Yt.prototype,"method",void 0),Yt=Xt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunctionArguments")],Yt);const te=Yt,ee=new Set(["vari","mtvi2","rtvi-core","evi"]);let se=class extends x{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let t=this.sourceRasterInfos[0];if(t.bandCount<2)return{success:!1,supportsGPU:!1,error:"band-arithmetic-function: source raster has insufficient amount of raster bands"};let e=t.clone();return e.pixelType=this.outputPixelType,e.bandCount="sultan"===this.functionArguments.method?3:1,this._removeStatsHistColormapVAT(e),e.keyProperties={...e.keyProperties,BandProperties:void 0},this.rasterInfo=e,{success:!0,supportsGPU:!["custom","gvitm","sultan"].includes(this.functionArguments.method)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return e;let{method:s,bandIndexes:r}=this.functionArguments,n=r.split(" ").map(t=>parseFloat(t));if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:t}=this,e=ee.has(this.functionArguments.method)?3:2,s=n.slice(0,e).map(e=>t.indexOf(e-1));n.splice(0,e,...s)}return Ht(e,{method:s,bandIndexes:n,equation:r,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let t=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===t.length&&t.push(0);let e,s,r=this.isInputBandIdsSwizzled?[0,1,2]:t,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":e=qt([r[0],r[1],0]),s="ndxi";break;case"ndwi":e=qt([r[1],r[0],0]),s="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":e=qt([r[0],r[1],0]),s="sr";break;case"ci-g":case"ci-re":e=qt([r[0],r[1],0]),s="ci";break;case"savi":e=qt([r[0],r[1],0]),s="savi",n[0]=t[2]+1;break;case"tsavi":e=qt([r[0],r[1],0]),s="tsavi",n[0]=t[2]+1,n[1]=t[3]+1,n[2]=t[4]+1;break;case"msavi":e=qt([r[0],r[1],0]),s="msavi";break;case"gemi":e=qt([r[0],r[1],0]),s="gemi";break;case"pvi":e=qt([r[0],r[1],0]),s="tsavi",n[0]=t[2]+1,n[1]=t[3]+1;break;case"vari":e=qt([r[0],r[1],r[2]]),s="vari";break;case"mtvi2":e=qt([r[0],r[1],r[2]]),s="mtvi";break;case"rtvi-core":e=qt([r[0],r[1],r[2]]),s="rtvicore";break;case"evi":e=qt([r[0],r[1],r[2]]),s="evi";break;case"wndwi":e=qt([r[0],r[1],0]),s="wndwi",n[0]=t[3]?t[3]+1:.5;break;case"bai":e=qt([r[1],r[0],0]),s="bai";break;default:e=qt([0,1,2]),s="custom"}return{bandIndexMat3:e,indexType:s,adjustments:n,isOutputRounded:(0,l.zw)(this.outputPixelType)}}_getInputBandIds(t){if("custom"===this.functionArguments.method)return t;let e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1),s=t.length,r=e.map(t=>t>=s?s-1:t),n=ee.has(this.functionArguments.method)?3:2,i=r.slice(0,n).map(e=>t[e]);return 2===i.length&&i.push(0),i}_swizzleBandIds(t){let e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===e.length&&e.push(0);let{method:s}=this.functionArguments,r=(["vari","mtvi2","rtvi-core","evi"].includes(s)?e.slice(0,3):"bai"===s||"ndwi"===s?[e[1],e[0]]:e.slice(0,2)).map(e=>t.indexOf(e));return r[2]??=r[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=r,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],se.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:te,json:{write:!0,name:"rasterFunctionArguments"}})],se.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],se.prototype,"rasterArgumentNames",void 0),se=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunction")],se);const re=se;var ne,ie=s(65864),oe=s(50498);const ae=new Dt.J({1:"outside",2:"inside"},{useNumericKeys:!0});let le=ne=class extends c{constructor(){super(...arguments),this.clippingType="outside"}clone(){return new ne({clippingGeometry:this.clippingGeometry.clone(),clippingType:this.clippingType})}};(0,o.Cg)([(0,a.MZ)({types:oe.yR,json:{read:ie.rS,write:!0}})],le.prototype,"clippingGeometry",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:ae.read,write:ae.write}})],le.prototype,"clippingType",void 0),le=ne=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunctionArguments")],le);const ue=le;var pe=s(34930),ce=s(37373);let he=class extends x{constructor(){super(...arguments),this.functionName="Clip",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this.rasterInfo=t;let{functionArguments:e}=this,{clippingGeometry:s,clippingType:r}=e;if(!s)return{success:!1,supportsGPU:!1,error:"missing clipping geometry"};if("outside"===r)try{let{spatialReference:e}=t,r="extent"===s.type?(0,ce._l)(s,e):(0,ce.uk)(s,e).extent;r&&(0,pe.Sd)(t,r)}catch{}return{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}_getWebGLParameters(){let{clippingGeometry:t,clippingType:e}=this.functionArguments;return{clippingGeometry:t.toJSON(),clippingType:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],he.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ue,json:{write:!0,name:"rasterFunctionArguments"}})],he.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],he.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],he.prototype,"isNoopProcess",void 0),he=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunction")],he);const me=he;var de,ge=s(67369),fe=s(95349),ye=s(36005);let we=de=class extends c{castColormapName(t){if(!t)return null;let e=t.toLowerCase();return ge.L7.includes(e)?e:null}readColorRamp(t){return(0,fe.r)(t)}readColorRampName(t,e){if(!t)return null;let s=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return s?ge.kH.fromJSON(s):null}clone(){return new de({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}})],we.prototype,"colormap",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],we.prototype,"colormapName",void 0),(0,o.Cg)([(0,a.wg)("colormapName")],we.prototype,"castColormapName",null),(0,o.Cg)([(0,a.MZ)({types:fe.g,json:{write:!0}})],we.prototype,"colorRamp",void 0),(0,o.Cg)([(0,ye.w)("colorRamp")],we.prototype,"readColorRamp",null),(0,o.Cg)([(0,a.MZ)({type:ge.kH.apiValues,json:{type:ge.kH.jsonValues,write:ge.kH.write}})],we.prototype,"colorRampName",void 0),(0,o.Cg)([(0,ye.w)("colorRampName")],we.prototype,"readColorRampName",null),we=de=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunctionArguments")],we);const xe=we,ve=[[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]],Ae=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[245,20,0],[245,24,0],[245,29,0],[245,31,0],[247,33,0],[247,33,0],[247,37,0],[247,41,0],[247,41,0],[247,41,0],[247,45,0],[247,45,0],[247,47,0],[247,49,0],[247,49,0],[247,54,0],[247,54,0],[247,56,0],[247,58,0],[247,58,0],[250,62,0],[250,62,0],[250,62,0],[250,67,0],[250,67,0],[250,67,0],[250,69,0],[250,71,0],[250,71,0],[250,75,0],[250,75,0],[250,78,0],[250,79,0],[250,79,0],[250,79,0],[250,81,0],[250,83,0],[250,83,0],[250,87,0],[250,87,0],[250,90,0],[250,92,0],[252,93,0],[252,93,0],[252,97,0],[252,97,0],[252,97,0],[252,97,0],[252,101,0],[252,101,0],[252,101,0],[252,101,0],[252,105,0],[252,105,0],[252,107,0],[252,109,0],[252,109,0],[252,113,13],[255,118,20],[255,119,23],[255,121,25],[255,126,33],[255,132,38],[255,133,40],[255,135,43],[255,141,48],[255,144,54],[255,150,59],[255,152,61],[255,153,64],[255,159,69],[255,163,77],[255,165,79],[255,168,82],[255,174,87],[255,176,92],[255,181,97],[255,183,99],[255,186,102],[255,191,107],[255,197,115],[255,201,120],[255,203,123],[255,205,125],[255,209,130],[255,214,138],[255,216,141],[255,218,143],[255,224,150],[255,228,156],[255,234,163],[255,236,165],[255,238,168],[255,243,173],[255,248,181],[255,252,186],[253,252,186],[250,252,187],[244,250,180],[238,247,176],[234,246,173],[231,245,169],[223,240,163],[217,237,157],[211,235,150],[205,233,146],[200,230,142],[195,227,136],[189,224,132],[184,222,126],[180,220,123],[174,217,119],[169,214,114],[163,212,108],[160,210,105],[154,207,101],[148,204,96],[143,201,93],[138,199,88],[134,197,84],[130,194,81],[126,191,77],[117,189,70],[115,186,68],[112,184,64],[106,181,60],[100,179,55],[94,176,49],[92,174,47],[90,173,45],[81,168,37],[75,166,33],[71,163,28],[66,160,24],[62,158,21],[56,156,14],[51,153,0],[51,153,0],[51,153,0],[50,150,0],[50,150,0],[50,150,0],[50,150,0],[49,148,0],[49,148,0],[49,148,0],[48,145,0],[48,145,0],[48,145,0],[48,145,0],[48,143,0],[48,143,0],[48,143,0],[48,143,0],[47,140,0],[47,140,0],[47,140,0],[47,140,0],[46,138,0],[46,138,0],[46,138,0],[46,138,0],[45,135,0],[45,135,0],[45,135,0],[45,135,0],[44,133,0],[44,133,0],[44,133,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[42,128,0],[42,128,0],[42,128,0],[42,125,0],[42,125,0],[42,125,0],[42,125,0],[41,122,0],[41,122,0],[41,122,0],[41,122,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[39,117,0],[39,117,0],[39,117,0],[39,117,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0]];function Ce(t,e){let s=[],r=[];for(let e=0;e<t.length-1;e++)s.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:t[e].slice(1),toColor:t[e+1].slice(1)}),r.push(t[e+1][0]-t[e][0]);let n=t[t.length-1][0];return e??=r,(0,ge.iv)({type:"multipart",colorRamps:s},{numColors:n,weights:e})}let be=class extends x{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:e,colormapName:s,colorRamp:r,colorRampName:n}=this.functionArguments;if(!e?.length)if(r)this.colorRamp=r,e=(0,ge.R8)(r,{interpolateAlpha:!0});else if(n){let t=(0,ge.M5)(n);t&&(e=(0,ge.R8)(t),this.colorRamp=(0,fe.r)(t))}else s&&(e=function(t){let e;switch(t){case"elevation":e=Ce([[0,0,191,191],[51,0,0,255],[102,255,0,255],[153,255,0,127],[204,191,63,127],[256,20,20,20]]);break;case"gray":e=(0,ge.iv)({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:[0,0,0],toColor:[255,255,255]});break;case"hillshade":e=Ce([[0,38,41,54],[69,79,82,90],[131,156,156,156],[256,253,253,241]],[.268,.238,.495]);break;case"ndvi":e=ve;break;case"ndvi2":e=function(){let t=Ce([[0,255,255,255],[70,0,255,0],[80,205,173,193],[100,150,150,150],[110,120,51,100],[130,120,100,200],[140,28,3,144],[160,6,0,55],[180,10,25,30],[201,6,7,27]]);for(let e=t.length;e<256;e++)t.push([6,27,7]);return t}();break;case"ndvi3":e=Ae;break;case"random":e=function(){let t=[];for(let e=0;e<256;e++){let e=[];for(let t=0;t<3;t++)e.push(Math.round(255*Math.random()));t.push(e)}return t}()}return e?(e=e.map((t,e)=>[e,...t]),e):null}(s));if(!e?.length)return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};let i=this._getOutputPixelType(t.pixelType);this.outputPixelType=i.startsWith("f")?"s32":i;let o=t.clone();return o.pixelType=this.outputPixelType,o.colormap=e,o.bandCount=1,this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];return!e||(0,l.zw)(e.pixelType)||(e=e.clone(),e.clamp(this.outputPixelType)),e}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],be.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:xe,json:{write:!0,name:"rasterFunctionArguments"}})],be.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],be.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],be.prototype,"isNoopProcess",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],be.prototype,"indexedColormap",void 0),(0,o.Cg)([(0,a.MZ)()],be.prototype,"colorRamp",void 0),be=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunction")],be);const Me=be;var Pe;let Te=Pe=class extends c{clone(){return new Pe({raster:this.raster})}};Te=Pe=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunctionArguments")],Te);const Ne=Te;var Ie=s(4151),Re=s(88178);let Fe=class extends x{constructor(){super(...arguments),this.functionName="ColormapToRGB",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1||!t.colormap?.length)return{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: source data must be single band with a colormap"};let e=t.clone();e.pixelType=this.outputPixelType=this._getOutputPixelType("u8"),this._removeStatsHistColormapVAT(e),e.bandCount=3,e.statistics=[{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20}],this.rasterInfo=e;let s=[...t.colormap].sort((t,e)=>t[0]-e[0]),{indexedColormap:r,offset:n}=(0,Kt.zg)({colormap:s});return r?(this.lookup={indexedColormap:r,offset:n},{success:!0,supportsGPU:(0,Re.WN)(r)}):{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: the colormap is not supported"}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e||!this.lookup)return e;e=e.clone();let s=e.pixels[0],r=e.mask??new Uint8Array(s.length).fill(255),n=new Uint8Array(s.length),i=new Uint8Array(s.length),o=new Uint8Array(s.length),{indexedColormap:a,offset:l}=this.lookup,u=a.length;for(let t=0;t<s.length;t++)if(r[t]){let e=4*(s[t]-l);e<0||e>u-4?r[t]=0:(n[t]=a[e++],i[t]=a[e++],o[t]=a[e++])}return e.pixels=[n,i,o],e.statistics=[new Ie.A(0,255),new Ie.A(0,255),new Ie.A(0,255)],e.pixelType=this.outputPixelType,e}_getWebGLParameters(){return this.lookup}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Fe.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ne,json:{write:!0,name:"rasterFunctionArguments"}})],Fe.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Fe.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Fe.prototype,"lookup",void 0),Fe=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunction")],Fe);const _e=Fe;var ke,Se=s(43937);let Be=ke=class extends c{constructor(){super(...arguments),this.rasters=[]}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new ke({rasters:(0,i.o8)(this.rasters)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Be.prototype,"rasters",void 0),(0,o.Cg)([(0,Se.K)("rasters")],Be.prototype,"writeRasters",null),Be=ke=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunctionArguments")],Be);const je=Be;let Ze=class extends x{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){let{sourceRasterInfos:t}=this,e=t[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);let s=e.clone();if(s.attributeTable=null,s.colormap=null,s.pixelType=this.outputPixelType,s.bandCount=t.map(({bandCount:t})=>t).reduce((t,e)=>t+e),t.every(({statistics:t})=>null!=t&&t.length)){let e=[];t.forEach(({statistics:t})=>null!=t&&e.push(...t)),s.statistics=e}if(t.every(({histograms:t})=>null!=t&&t.length)){let e=[];t.forEach(({histograms:t})=>null!=t&&e.push(...t)),s.histograms=e}s.multidimensionalInfo&&s.multidimensionalInfo.variables.forEach(e=>{let s=t.map(t=>t.multidimensionalInfo?.variables.find(({name:t})=>t===e.name)),r=s.map(t=>t?.statistics?.length?t.statistics:null),n=s.map(t=>t?.histograms?.length?t.histograms:null);e.statistics=r.every(t=>null!=t)?r.flat():null,e.histograms=n.every(t=>null!=t)?n.flat():null}),s.bandCount>1&&(s.colormap=null,s.attributeTable=null);let r=t.every(t=>t.keyProperties.BandProperties?.length)?t.flatMap(t=>t.keyProperties.BandProperties):void 0;return s.keyProperties={...s.keyProperties,BandProperties:r},this.rasterInfo=s,{success:!0,supportsGPU:s.bandCount<=3}}_processPixels(t){let{pixelBlocks:e}=t;return e&&null!=e?.[0]?(0,Kt.Wy)(e):null}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ze.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:je,json:{write:!0,name:"rasterFunctionArguments"}})],Ze.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Ze.prototype,"rasterArgumentNames",void 0),Ze=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunction")],Ze);const ze=Ze,Ge=new Dt.J({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),Oe=new Dt.J({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});var De;let Ee=De=class extends c{constructor(){super(...arguments),this.method="difference",this.keepMethod="all",this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new De({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};(0,o.Cg)([(0,Qt.e)(Ge)],Ee.prototype,"method",void 0),(0,o.Cg)([(0,Qt.e)(Oe)],Ee.prototype,"keepMethod",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ee.prototype,"raster2",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],Ee.prototype,"rasters",null),Ee=De=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunctionArguments")],Ee);const Ve=Ee;var Ue=s(20437);let Le=class extends x{constructor(){super(...arguments),this.functionName="ComputeChange",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){let{method:t}=this.functionArguments,e=this.sourceRasterInfos[0].clone();if(this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),"categorical"===t){let t=this.sourceRasterInfos.map(t=>t.attributeTable),s=this._getFieldNames(t,"value"),r=t.map(t=>this._getClassFieldName(t));if(null==s[0]||null==s[1]||null==r[0]||null==r[1])return{success:!1,supportsGPU:!1,error:"both inputs must have proper attribute table with value and class fields"};this._updateAttributeTable(e,s,r)}return e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:"difference"===t||"relative-difference"===t}}_processPixels(t){let{pixelBlocks:e}=t;if(null==e?.[0]||null==e?.[1])return null;let{method:s}=this.functionArguments;return function(t,e,s,r){let[n,i]=t,o=(0,l.zw)(s)&&!(0,l.zw)(n.pixelType)&&!(0,l.zw)(i.pixelType),a=[n.mask,i.mask].filter(t=>t),u=g.A.combineBandMasks(a),p=t.map(t=>t.pixels[0]),{width:c,height:h}=n,m=g.A.createEmptyBand(s,c*h);switch(e){case"difference":case"relative-difference":!function(t){let{bands:[e,s],mask:r,isRelative:n,isRoundingNeeded:i,outBand:o}=t,a=e.length;for(let t=0;t<a;t++)if(!r||r[t]){let r=e[t]-s[t];if(n){let n=Math.max(Math.abs(e[t]),Math.abs(s[t]));r=0===n?0:r/n}o[t]=i?Math.round(r):r}}({bands:p,mask:u,outBand:m,isRoundingNeeded:o,isRelative:"relative-difference"===e});break;case"categorical":!function(t){let{bands:[e,s],categoryIndexLookups:[r,n],classNames:[i,o],mask:a,keepMethod:l,outBand:u}=t,p=e.length,c=i.length,h=o.length,m=c*h,d=m+1,g=m+2;for(let t=0;t<p;t++)if(!a||a[t]){let a=e[t],p=s[t],c=r[a],f=n[p],y=i[c],w=o[f];u[t]=null==c||null==f?m:"changed"===l&&y===w?d:"unchanged"===l&&y!==w?g:c*h+f}}({bands:p,mask:u,outBand:m,...r});break;case"euclidean-distance":!function(t){let{pixels:[e,s],mask:r,outBand:n}=t,i=e[0].length,o=e.length;for(let t=0;t<i;t++)if(!r||r[t]){let r=0;for(let n=0;n<o;n++){let i=e[n][t]-s[n][t];r+=i*i}n[t]=Math.sqrt(r)}}({pixels:t.map(t=>t.pixels),mask:u,outBand:m});break;case"angle-difference":!function(t){let{pixels:[e,s],mask:r,outBand:n}=t,i=e[0].length,o=e.length;for(let t=0;t<i;t++)if(!r||r[t]){let r=0,i=0,a=0;for(let n=0;n<o;n++){let o=e[n][t],l=s[n][t];r+=o*l,i+=o*o,a+=l*l}let l=Math.sqrt(i*a);n[t]=l?Math.acos(r/l):1.5707963267948966}}({pixels:t.map(t=>t.pixels),mask:u,outBand:m});break;case"band-with-most-change":!function(t){let{pixels:[e,s],mask:r,outBand:n}=t,i=e[0].length,o=e.length;for(let t=0;t<i;t++)if(!r||r[t]){let r=0,i=0;for(let n=0;n<o;n++){let o=Math.abs(e[n][t]-s[n][t]);o>r&&(r=o,i=n)}n[t]=i}}({pixels:t.map(t=>t.pixels),mask:u,outBand:m})}let d=new g.A({width:c,height:h,pixels:[m],pixelType:s,mask:u});return d.updateStatistics(),d}(e,s,this.outputPixelType,this._categoryConfig)}_getWebGLParameters(){let t=this.outputPixelType??"f32",[e,s]=(0,l.hP)(t),r=(0,l.zw)(t);return r&&(e-=1e-4,s+=1e-4),{method:this.functionArguments.method,domainRange:[e,s],isOutputRounded:r}}_updateAttributeTable(t,e,s){let r=this.sourceRasterInfos.map(t=>t.attributeTable),n=r.map((t,s)=>t.features.map(t=>t.attributes[e[s]])),i=r.map((t,e)=>t.features.map(t=>t.attributes[s[e]])),o=n.map(t=>{let e=[];return t.forEach((t,s)=>e[t]=s),e}),{keepMethod:a}=this.functionArguments;this._categoryConfig={categoryIndexLookups:o,classNames:i,keepMethod:a};let l=r[0].clone();l.fields=[new Ue.A({name:"OID",type:"oid"}),new Ue.A({name:"Value",type:"integer"}),new Ue.A({name:"ClassName",type:"string"}),new Ue.A({name:"Class_From",type:"string"}),new Ue.A({name:"Class_To",type:"string"})];let u=this._getFieldNames(r,"red"),p=this._getFieldNames(r,"green"),c=this._getFieldNames(r,"blue"),h=[],m=2===u.length&&2===p.length&&2===c.length;m&&(h.push(...r.map((t,e)=>t.features.map(t=>[t.attributes[u[e]],t.attributes[p[e]],t.attributes[c[e]]]))),l.fields.push(new Ue.A({name:"Red",type:"integer"}),new Ue.A({name:"Green",type:"integer"}),new Ue.A({name:"Blue",type:"integer"})));let d=l.features[0].clone();d.geometry=null;let g=[],[f,y]=n.map(t=>t.length),w=1;for(let t=0;t<f;t++){let e=i[0][t];for(let s=0;s<y;s++){let r=i[1][s];if("changed"===a&&e===r||"unchanged"===a&&e!==r)continue;let n=d.clone();n.attributes={OID:w++,Value:t*y+s,ClassName:e===r?e:`${e} -> ${r}`,Class_From:e,Class_To:r},m&&(n.attributes.Red=h[0][t][0]+h[1][s][0]>>1,n.attributes.Green=h[0][t][1]+h[1][s][1]>>1,n.attributes.Blue=h[0][t][2]+h[1][s][2]>>1),g.push(n)}}if("changed"===a){let t=d.clone();t.attributes={OID:w++,Value:f*y+1,ClassName:"No Change",Class_From:"Same",Class_To:"Same"},g.push(t)}else if("unchanged"===a){let t=d.clone();t.attributes={OID:w++,Value:f*y+2,ClassName:"Changed",Class_From:"Any",Class_To:"Any"},g.push(t)}l.features=g,t.attributeTable=l}_getFieldNames(t,e){return t.map(({fields:t})=>t.find(t=>t.name.toLowerCase()===e)?.name).filter(t=>t)}_getClassFieldName(t){return(t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().startsWith("class"))??t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().includes("class")||t.name.toLowerCase().includes("type")||t.name.toLowerCase().includes("name"))??t.fields.find(t=>"string"===t.type))?.name}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Le.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ve,json:{write:!0,name:"rasterFunctionArguments"}})],Le.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Le.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Le.prototype,"_categoryConfig",void 0),Le=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunction")],Le);const $e=Le;var Ke;let We=Ke=class extends c{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new Ke({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],We.prototype,"contrastOffset",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],We.prototype,"brightnessOffset",void 0),We=Ke=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunctionArguments")],We);const He=We;var qe=s(51927);let Je=class extends x{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){let{sourceRasterInfos:t}=this,e=t[0];if("u8"!==e.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");let s=e.clone();this._removeStatsHistColormapVAT(s),this.rasterInfo=s;let{contrastOffset:r,brightnessOffset:n}=this.functionArguments;return this.lookup=(0,qe.zj)(r,n),{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];return null==e?null:(0,Kt.eH)(e,{lut:e.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){let{contrastOffset:t,brightnessOffset:e}=this.functionArguments;return{contrastOffset:t,brightnessOffset:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Je.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:He,json:{write:!0,name:"rasterFunctionArguments"}})],Je.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Je.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Je.prototype,"lookup",void 0),Je=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunction")],Je);const Xe=Je;function Qe(t,e,s,r,n){let i=Math.floor(r/2);for(let r=0;r<i;r++)for(let i=0;i<e;i++)t[r*e+i]=t[(n-1-r)*e+i],t[(s-1-r)*e+i]=t[(s-n+r)*e+i];let o=Math.floor(n/2);for(let r=0;r<s;r++){let s=r*e;for(let r=0;r<o;r++)t[s+r]=t[s+n-1-r],t[s+e-r-1]=t[s+e+r-n]}}const Ye=new Map;function ts(t,e,s,r,n,i,o){let a=new Float32Array(e*s),l=i.length,u=o?0:r,p=o?r:0,c=o?1:e;for(let o=u;o<s-u;o++){let s=o*e;for(let o=p;o<e-p;o++){if(n&&!n[s+o])continue;let e=0;for(let n=0;n<l;n++)e+=t[s+o+(n-r)*c]*i[n];a[s+o]=e}}return a}function es(t,e,s,r,n,i,o){let a=new Float32Array(e*s),l=Math.floor(r/2),u=Math.floor(n/2);for(let p=l;p<s-l;p++){let s=p*e;for(let p=u;p<e-u;p++){if(i&&!i[s+p])continue;let c=0;for(let i=0;i<r;i++)for(let r=0;r<n;r++)c+=t[s+p+(i-l)*e+r-u]*o[i*n+r];a[s+p]=c}}return a}var ss;Ye.set(v.none,[0,0,0,0,1,0,0,0,0]),Ye.set(v.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),Ye.set(v.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),Ye.set(v.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),Ye.set(v.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),Ye.set(v.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(v.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(v.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),Ye.set(v.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),Ye.set(v.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),Ye.set(v.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),Ye.set(v.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),Ye.set(v.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),Ye.set(v.smoothing5x5,[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1]),Ye.set(v.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Ye.set(v.sharpening5x5,[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1]),Ye.set(v.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),Ye.set(v.laplacian5x5,[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0]),Ye.set(v.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(v.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(v.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),Ye.set(v.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),Ye.set(v.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let rs=ss=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(t){this._set("convolutionType",t);let e=Ye.get(t);if(!e||t===v.userDefined||t===v.none)return;let s=Math.round(Math.sqrt(e.length));this._set("kernel",e),this._set("cols",s),this._set("rows",s)}clone(){return new ss({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{type:Number,write:!0}})],rs.prototype,"rows",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:Number,write:!0,name:"columns"}})],rs.prototype,"cols",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"type",type:Number,write:!0}})],rs.prototype,"convolutionType",null),(0,o.Cg)([(0,a.MZ)({json:{type:[Number],write:!0}})],rs.prototype,"kernel",void 0),rs=ss=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunctionArguments")],rs);const ns=rs;let is=class extends x{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){let{kernel:t,convolutionType:e}=this.functionArguments,s=t.reduce((t,e)=>t+e);return-1===e||0===s||1===s?t:t.map(t=>t/s)}_bindSourceRasters(){let{convolutionType:t,rows:e,cols:s,kernel:r}=this.functionArguments;if(!Object.values(v).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==v.none&&e*s!==r.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=[v.none,v.sharpen,v.sharpen2,v.sharpening3x3,v.sharpening5x5];return(-1===t||"u8"!==this.outputPixelType&&!o.includes(t))&&(i.statistics=null,i.histograms=null),i.colormap=null,i.attributeTable=null,this.rasterInfo=i,{success:!0,supportsGPU:r.length<=25}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e||this.functionArguments.convolutionType===v.none)return e;let{rows:s,cols:r}=this.functionArguments,{_normalizedKernel:n}=this;return function(t,e){let s=function(t){let e=Math.sqrt(t.length),s=t.slice(0,e),r=[1];for(let s=1;s<e;s++){let n=null;for(let r=0;r<e;r++){let i=t[r+s*e],o=t[r];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};r.push(n)}return{separable:!0,row:s,col:r}}(e.kernel),r=!1!==e.mirrorEdges,n=s.separable?function(t,e,s,r=!0){let{pixels:n,width:i,height:o,pixelType:a,mask:l}=t,u=n.length,p=[],c=e.length,h=s.length,m=Math.floor(c/2),d=Math.floor(h/2);for(let t=0;t<u;t++){let a=ts(n[t],i,o,m,l,e,!0);a=ts(a,i,o,d,l,s,!1),r&&Qe(a,i,o,c,h),p.push(a)}return new g.A({width:i,height:o,pixelType:a,pixels:p,mask:l})}(t,s.row,s.col,r):function(t,e,s=!0){let{pixels:r,width:n,height:i,pixelType:o,mask:a}=t,l=r.length,u=[],{kernel:p,rows:c,cols:h}=e;for(let t=0;t<l;t++){let e=es(r[t],n,i,c,h,a,p);s&&Qe(e,n,i,c,h),u.push(e)}return new g.A({width:n,height:i,pixelType:o,pixels:u,mask:a})}(t,e,r),{outputPixelType:i}=e;return i&&n.clamp(i),n}(e,{kernel:n,rows:s,cols:r,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let t=new Float32Array(25),{rows:e,cols:s}=this.functionArguments,{_normalizedKernel:r}=this;for(let n=0;n<e;n++)for(let e=0;e<s;e++)t[5*n+e]=r[n*s+e];return{kernelRows:e,kernelCols:s,kernel:t,clampRange:(0,l.hP)(this.outputPixelType)}}_getNeighborhoodSize(){let{rows:t,cols:e}=this.functionArguments;return{rows:t,cols:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],is.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ns,json:{write:!0,name:"rasterFunctionArguments"}})],is.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],is.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],is.prototype,"_normalizedKernel",null),is=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunction")],is);const os=is;var as;const ls=new Dt.J({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let us=as=class extends c{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(t,e){return ls.fromJSON(e.type??e.curvatureType??0)}clone(){return new as({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:{target:"type"}}}),(0,Qt.e)(ls)],us.prototype,"curvatureType",void 0),(0,o.Cg)([(0,ye.w)("curvatureType",["type","curvatureType"])],us.prototype,"readCurvatureType",null),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],us.prototype,"zFactor",void 0),us=as=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunctionArguments")],us);const ps=us;let cs=class extends x{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{zFactor:s,curvatureType:r}=this.functionArguments,{extent:n,primaryPixelSizes:i}=t,o=i?.[0]??(n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1}),a=this.isGCS&&s>=1?s*zt.rk:s;return(0,zt.E0)(e,{zFactor:a,curvatureType:r,resolution:o})}_getWebGLParameters(){let{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*zt.rk:t}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],cs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ps,json:{write:!0,name:"rasterFunctionArguments"}})],cs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],cs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],cs.prototype,"isGCS",void 0),cs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunction")],cs);const hs=cs;var ms;let ds=ms=class extends c{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=0}clone(){return new ms({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandIds",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandWavelengths",void 0),(0,o.Cg)([(0,Qt.e)({0:"name",1:"wavelength",2:"id"})],ds.prototype,"method",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"missingBandAction",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"wavelengthMatchTolerance",void 0),ds=ms=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunctionArguments")],ds);const gs=ds;let fs=class extends x{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{functionArguments:t,sourceRasterInfos:e}=this,s=e[0],{method:r,bandNames:n,bandWavelengths:i,bandIds:o,missingBandAction:a}=t,l=n?.length&&("name"===r||"id"!==r&&!o?.length),u=i?.length&&("wavelength"===r||"id"!==r&&!o?.length),p=1===a,c=l?function(t,e){let s=t.bandInfos.map(({name:t})=>t.toLowerCase()),r=[];for(let t=0;t<e.length;t++){let n=e[t].toLowerCase(),i=s.indexOf(n);if(-1===i&&"nearinfrared"===n&&(i=s.findIndex(t=>t.startsWith("nearinfrared_1")),-1===i&&(i=s.findIndex(t=>t.startsWith("nearinfrared")))),-1===i)return null;r.push(i)}return r}(s,n):u?function(t,e,{wavelengthMatchTolerance:s},r){let{bandInfos:n}=t,i=[];for(let t=0;t<n.length;t++){let{minWavelength:e,maxWavelength:s}=n[t];if(!e||!s)return null;i.push({minWavelength:e,maxWavelength:s})}let o=[];for(let t=0;t<e.length;t++){let n=e[t],a=!1,l=-1,u=Number.MAX_VALUE;for(let t=0;t<i.length;t++){let e=i[t],s=n>=e.minWavelength&&n<=e.maxWavelength,r=Math.abs(n-(e.minWavelength+e.maxWavelength)/2);s?r<u&&(a=!0,l=t,u=r):!a&&r<u&&(l=t,u=r)}if(!a&&s&&u<s&&(a=!0),!a&&r)return null;o.push(l)}return o}(s,i,this.functionArguments,p):function(t,e,s){let{bandCount:r}=t;return!e?.length||s&&e.some(t=>t<0||t>=r)?null:e}(s,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(s.pixelType);let h=s.clone();h.pixelType=this.outputPixelType,h.bandCount=c.length;let{statistics:m,histograms:d}=h;null!=m&&m.length&&(h.statistics=c.map(t=>m[t]||m[m.length-1])),null!=d&&d.length&&(h.histograms=c.map(t=>d[t]||d[d.length-1])),h.multidimensionalInfo&&h.multidimensionalInfo.variables.forEach(t=>{let{statistics:e,histograms:s}=t;null!=e&&e.length&&(t.statistics=c.map(t=>e[t]||e[e.length-1])),null!=s&&s.length&&(t.histograms=c.map(t=>s[t]||s[s.length-1]))});let g=h.keyProperties?.BandProperties;return g?.length&&(g=c.map(t=>t>=g.length?g[g.length-1]:g[t]),h.keyProperties={...h.keyProperties,BandProperties:g}),this.rasterInfo=h,{success:!0,supportsGPU:h.bandCount<=3}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{bandIds:s}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:t}=this;s=s.map(e=>t.indexOf(e))}else{let t=e.pixels.length;s=s.map(e=>e>=t?t-1:e)}return e.extractBands(s)}_getWebGLParameters(){let t;if(this.isInputBandIdsSwizzled)t=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{t=[...this.functionArguments.bandIds],0===t.length?t=[0,1,2]:t.length<3&&(t[1]=t[1]??t[0],t[2]=t[2]??t[1]);for(let e=0;e<3;e++)t[e]=Math.min(t[e],2)}return{bandIndexMat3:qt(t)}}_getInputBandIds(t){let e=t.length;return this.functionArguments.bandIds.map(t=>t>=e?e-1:t).map(e=>t[e])}_swizzleBandIds(t){let e=this.functionArguments.bandIds.map(e=>t.indexOf(e));return this.isInputBandIdsSwizzled=!0,e[1]??=e[0],e[2]??=e[1],this.swizzledBandSelection=e,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],fs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:gs,json:{write:!0,name:"rasterFunctionArguments"}})],fs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],fs.prototype,"rasterArgumentNames",void 0),fs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunction")],fs);const ys=fs;function ws(t,e,s,r){let{pixels:n,width:i,height:o}=t,a=n.length,u=s.startsWith("f"),p=!u,[c,h]=(0,l.hP)(s),m=i*o,d=g.A.createEmptyBand(s,m);for(let t=0;t<o;t++){let s=t*i;for(let t=0;t<i;t++,s++)if(!r||r[s]){let t=0;for(let r=0;r<a;r++)t+=e[r]*n[r][s];u||(t=Math.round(t),p&&(t=t>h?h:t<c?c:t)),d[s]=t}}return d}var xs;let vs=xs=class extends c{clone(){return new xs({conversionParameters:[...this.conversionParameters],raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],vs.prototype,"conversionParameters",void 0),vs=xs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunctionArguments")],vs);const As=vs;let Cs=class extends x{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){let{conversionParameters:t}=this.functionArguments,e=t.reduce((t,e)=>t+e);return t.map(t=>t/e)}_bindSourceRasters(){let{conversionParameters:t}=this.functionArguments;if(!t?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};let e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType;let s=3===t.length||3===e.bandCount&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:s}}_processPixels(t){let e=t.pixelBlocks?.[0];return null==e?null:function(t,e,s){let{width:r,height:n,mask:i,bandMasks:o}=t,a=o?.length?g.A.combineBandMasks(o):i,l=ws(t,e,s,a),u=new g.A({width:r,height:n,pixels:[l],pixelType:s,mask:a});return u.updateStatistics(),u}(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Cs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:As,json:{write:!0,name:"rasterFunctionArguments"}})],Cs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Cs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],Cs.prototype,"_normalizedWeights",null),Cs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunction")],Cs);const bs=Cs;var Ms;const Ps=new Dt.J({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),Ts=new Dt.J({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let Ns=Ms=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 Ms({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"altitude",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"azimuth",void 0),(0,o.Cg)([(0,a.MZ)(),(0,Qt.e)(Ps)],Ns.prototype,"hillshadeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psPower"}})],Ns.prototype,"pixelSizePower",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psZFactor"}})],Ns.prototype,"pixelSizeFactor",void 0),(0,o.Cg)([(0,a.MZ)(),(0,Qt.e)(Ts)],Ns.prototype,"slopeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"zFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Ns.prototype,"removeEdgeEffect",void 0),Ns=Ms=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunctionArguments")],Ns);const Is=Ns;let Rs=class extends x{constructor(){super(...arguments),this.functionName="Hillshade",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"hillshade-function: source data must be single band"};this.outputPixelType=this._getOutputPixelType("u8");let e=t.clone();return this._removeStatsHistColormapVAT(e),e.pixelType=this.outputPixelType,e.bandCount=1,e.statistics=[{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e)return null;let{extent:s,primaryPixelSizes:r}=t,n=r?.[0]??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1}),i=(0,zt.PP)(this.functionArguments,n,this.isGCS),o=(0,zt.fw)(e,i);return o.pixelType=this.outputPixelType,o}_getWebGLParameters(){let t=(0,zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,zt.ng)(t),{slopeType:s,zFactor:r,pixelSizeFactor:n,pixelSizePower:i}=this.functionArguments,o="scaled"===s,a=(0,l.zw)(this.outputPixelType);return{...e,zFactor:r,gcsFactor:this.isGCS?zt.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"}})],Rs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Is,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,"isGCS",void 0),Rs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunction")],Rs);const Fs=Rs;var _s;let ks=_s=class extends c{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new _s({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,i.o8)(this.rasters)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ks.prototype,"operation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ks.prototype,"rasters",void 0),(0,o.Cg)([(0,Se.K)("rasters")],ks.prototype,"writeRasters",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ks.prototype,"processAsMultiband",void 0),ks=_s=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunctionArguments")],ks);const Ss=ks;let Bs=class extends x{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){let{sourceRasterInfos:t}=this,e=t[0],{bandCount:s}=e,{processAsMultiband:r}=this.functionArguments;if(t.some(t=>t.bandCount!==s))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};let{operation:n,rasters:i}=this.functionArguments,o=N[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=e.clone();return a.bandCount=999!==o||r?s:1,this._removeStatsHistColormapVAT(a),this._updateStatistics(a),this._updatePixelType(a),this.rasterInfo=a,{success:!0,supportsGPU:1===a.bandCount&&o<=3}}_processPixels(t){let{pixelBlocks:e}=t;return null==e||e.some(t=>null==t)?null:_t(e,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){let{operation:t}=this.functionArguments,e=N[t],s=Object.keys(M).find(e=>M[e]===t)?.toLowerCase()??"undefined",r=this.outputPixelType??"f32",[n,i]=(0,l.hP)(r),o=(0,l.zw)(r);return o&&(n-=1e-4,i+=1e-4),{imageCount:e,operationName:s,domainRange:[n,i],isOutputRounded:o}}_updateStatistics(t){let e=this.sourceRasterInfos[0],{operation:s}=this.functionArguments,r=T(s)?.domain;if(r){t.statistics=[];for(let e=0;e<t.bandCount;e++)t.statistics[e]={min:r[0],max:r[1],avg:(r[0]+r[1])/2,stddev:(r[0]+r[1])/10}}else 45===s&&e.statistics?.length&&(t.statistics=e.statistics.map(t=>({min:-t.max,max:-t.min,avg:null==t.avg?void 0:-t.avg,stddev:null==t.stddev?void 0:-t.stddev})))}_updatePixelType(t){let{statistics:e,pixelType:s}=this.sourceRasterInfos[0],{operation:r}=this.functionArguments,{domain:n,isInteger:i}=T(r)??{domain:null,isInteger:!1},o="f32";if(n&&i)o=(0,l.X1)(n[0],n[1]);else if(30===r){let t=e?.[0];o=t?(0,l.X1)(t.min,t.max):(0,l.zw)(s)?s:"s32"}else if(45===r&&(0,l.zw)(s)){let t=e?.map(({max:t})=>-t),r=e?.map(({min:t})=>-t),n=t?.length?Math.min(...t):null,i=r?.length?Math.min(...r):null;o=null!=n&&null!=i?(0,l.X1)(n,i):s.startsWith("s")?s.replace("s","u"):"u1"===s||"u2"===s||"u4"===s?"s8":"u8"===s?"s16":"s32"}t.pixelType=this.outputPixelType=this._getOutputPixelType(o)}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Bs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ss,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.LocalFunction")],Bs);const js=Bs;var Zs,zs=s(34727);let Gs=Zs=class extends c{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=0}get normalizedNoDataValues(){let{noDataValues:t}=this;if(!t?.length)return null;let e=!1,s=t.map(t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){let s=t.trim().split(" ").filter(t=>""!==t.trim()).map(t=>Number(t));return e||=s.length>0,0===s.length?null:s}return null});return e?s:null}clone(){return new Zs({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"includedRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"noDataValues",void 0),(0,o.Cg)([(0,a.MZ)()],Gs.prototype,"normalizedNoDataValues",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"noDataInterpretation",void 0),Gs=Zs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunctionArguments")],Gs);const Os=Gs;let Ds=class extends x{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;let{includedRanges:s,normalizedNoDataValues:r}=this.functionArguments;if(!s?.length&&!r?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let n=[];for(let i=0;i<t.bandCount;i++){let t=(0,Kt.Wt)(e,s?.slice(2*i,2*i+2),r?.[i]);if(null==t){n=null;break}n.push(t)}this.lookups=n;let i=null!=r&&r.every(t=>t?.length===r[0]?.length);return{success:!0,supportsGPU:(!s||s.length<=18)&&(!r||i&&r[0].length<=9)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{outputPixelType:s,lookups:r}=this,{includedRanges:n,noDataInterpretation:i,normalizedNoDataValues:o}=this.functionArguments;return(0,Kt.dK)(e,{includedRanges:n,noDataValues:o,outputPixelType:s,matchAll:1===i,lookups:r})}_getWebGLParameters(){let{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,s=new Float32Array(9);s.fill(zs.pq),e?.[0]?.length&&s.set(e[0]);let r=new Float32Array(6);for(let e=0;e<r.length;e+=2)r[e]=t?.[e]??-zs.pq,r[e+1]=t?.[e+1]??zs.pq;return t?.length&&r.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:s,includedRanges:r}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ds.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Os,json:{write:!0,name:"rasterFunctionArguments"}})],Ds.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Ds.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ds.prototype,"lookups",void 0),Ds=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunction")],Ds);const Es=Ds;var Vs;let Us=Vs=class extends c{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){let{visibleBandID:t,infraredBandID:e,scientificOutput:s}=this;return new Vs({visibleBandID:t,infraredBandID:e,scientificOutput:s})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"visibleBandID",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"infraredBandID",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"scientificOutput",void 0),Us=Vs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunctionArguments")],Us);const Ls=Us;let $s=class extends x{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{scientificOutput:t,visibleBandID:e,infraredBandID:s}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");let r=this.sourceRasterInfos[0],n=Math.max(e,s);if(r.bandCount<2||n>=r.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};if(e<0||s<0)return{success:!1,supportsGPU:!1,error:"ndvi-function: invalid visible or infrared band id"};let i=r.clone();i.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(i),i.bandCount=1,i.keyProperties={...i.keyProperties,BandProperties:void 0};let[o,a,l,u]=t?[-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(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{visibleBandID:s,infraredBandID:r,scientificOutput:n}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:t}=this;r=t.indexOf(r),s=t.indexOf(s)}return function(t,e,s,r){let{mask:n,pixels:i,width:o,height:a}=t,l=i[s],u=i[e],p=u.length,c=r?new Uint8Array(p):new Float32Array(p),h=r?100:1,m=r?100.5:0;for(let t=0;t<p;t++)if(null==n||n[t]){let e=l[t],s=u[t],r=e+s;r&&(c[t]=(e-s)/r*h+m)}let d=new g.A({width:o,height:a,mask:n,pixelType:r?"u8":"f32",pixels:[c]});return d.updateStatistics(),d}(e,s,r,!n)}_getWebGLParameters(){let{visibleBandID:t,infraredBandID:e,scientificOutput:s}=this.functionArguments;return{bandIndexMat3:qt(this.isInputBandIdsSwizzled?[0,1,2]:[e,t,0]),scaled:!s}}_getInputBandIds(t){let{visibleBandID:e,infraredBandID:s}=this.functionArguments;return[s,e,0].map(e=>t[e])}_swizzleBandIds(t){let{visibleBandID:e,infraredBandID:s}=this.functionArguments,r=[e,s].map(e=>t.indexOf(e));return r[2]=r[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=r,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],$s.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ls,json:{write:!0,name:"rasterFunctionArguments"}})],$s.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],$s.prototype,"rasterArgumentNames",void 0),$s=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunction")],$s);const Ks=$s;var Ws;let Hs=Ws=class extends c{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new Ws({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"inputRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"outputValues",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"noDataRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"allowUnmatched",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"replacementValue",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"isLastInputRangeInclusive",void 0),Hs=Ws=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunctionArguments")],Hs);const qs=Hs;let Js=class extends x{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;t.bandCount=1;let{statistics:s}=t;this._removeStatsHistColormapVAT(t);let{allowUnmatched:r,replacementValue:n,outputValues:i,inputRanges:o,noDataRanges:a,isLastInputRangeInclusive:u}=this.functionArguments,p="unknown"===this.outputPixelType||null==this.outputPixelType;if(this.outputPixelType=this._getOutputPixelType(e),i?.length){let o=s?.[0];if(r&&null==n){let e=o?.min??i[0],s=o?.max??i[0];e=Math.min.apply(null,[...i,e]),s=Math.max.apply(null,[...i,s]),t.statistics=[{min:e,max:s,avg:o?.avg??0,stddev:o?.stddev??-1}]}else{let e=i[0],s=e;for(let t=0;t<i.length;t++)e=e>i[t]?i[t]:e,s=s>i[t]?s:i[t];r&&null!=n&&(e=Math.min(e,n),s=Math.max(s,n)),t.statistics=[{min:e,max:s,avg:o?.avg??0,stddev:o?.stddev??-1}]}if(p){let{min:s,max:o}=t.statistics[0],a=["u8","s8","u16","s16","u32","s32","f32"],u=a.find(t=>{let[e,r]=(0,l.hP)(t);return s>=e&&o<=r})??"f64";this.outputPixelType=i.some(t=>Math.floor(t)!==t)?"f64"===u?"f64":"f32":r&&null==n&&a.indexOf(e)>a.indexOf(u)?e:u}}return t.pixelType=this.outputPixelType,this.rasterInfo=t,this.lookup=r?null:(0,Kt.XU)({srcPixelType:e,inputRanges:o,outputValues:i,noDataRanges:a,allowUnmatched:r,isLastInputRangeInclusive:u,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!i||i.length<=9)&&(!a||a.length<=9)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{lookup:s,outputPixelType:r}=this;if(s){let t=(0,Kt.eH)(e,{lut:[s.lut],offset:s.offset,outputPixelType:r});return null!=t&&s.mask&&(t.mask=(0,Kt.UK)(e.pixels[0],e.mask,s.mask,s.offset,"u8")),t}let{inputRanges:n,outputValues:i,noDataRanges:o,allowUnmatched:a,isLastInputRangeInclusive:l,replacementValue:u}=this.functionArguments;return(0,Kt.Ew)(e,{inputRanges:n,outputValues:i,noDataRanges:o,outputPixelType:r,allowUnmatched:a,isLastInputRangeInclusive:l,replacementValue:u})}_getWebGLParameters(){let{allowUnmatched:t,noDataRanges:e,isLastInputRangeInclusive:s}=this.functionArguments,r=this.functionArguments.inputRanges??[],n=this.functionArguments.outputValues??[],i=(0,Kt.bL)(r,n,s),o=new Float32Array(18);return o.fill(zs.pq),e?.length&&o.set(e),{allowUnmatched:t,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"}})],Js.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:qs,json:{write:!0,name:"rasterFunctionArguments"}})],Js.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Js.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Js.prototype,"lookup",void 0),Js=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunction")],Js);const Xs=Js;var Qs;let Ys=Qs=class extends Is{readColorRamp(t){if("string"==typeof t){let e=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return e?(0,ge.M5)(ge.kH.fromJSON(e)):null}return"toJSON"in t?t.toJSON():t}clone(){return new Qs({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,colorRamp:this.colorRamp,colormap:this.colormap,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ys.prototype,"colorRamp",void 0),(0,o.Cg)([(0,ye.w)("colorRamp")],Ys.prototype,"readColorRamp",null),(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],Ys.prototype,"colormap",void 0),Ys=Qs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunctionArguments")],Ys);const tr=Ys;let er=class extends x{constructor(){super(...arguments),this.functionName="ShadedRelief",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: source data must be single band"};let{colorRamp:e,colormap:s}=this.functionArguments;if(!e&&!s?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a color ramp argument must be specified"};this.outputPixelType=this._getOutputPixelType("u8");let r=t.clone();this._removeStatsHistColormapVAT(r),r.pixelType=this.outputPixelType,r.bandCount=3,r.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=r,this.isGCS=r.spatialReference?.isGeographic??!1,s?.length||(s=(0,ge.R8)(e,{interpolateAlpha:!0}));let{indexedColormap:n,offset:i}=(0,Kt.zg)({colormap:s});if(!n?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a valid colorramp is required"};let o=(0,ge.S2)(n);return this.lookup={indexedColormap:n,offset:i,hsvMap:o},{success:!0,supportsGPU:(0,Re.WN)(n)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e||!this.lookup)return null;let s=t.primaryPixelSizes?.[0];if(null==s){let{extent:r}=t;s=r?{x:r.width/e.width,y:r.height/e.height}:{x:1,y:1}}let r=(0,zt.PP)(this.functionArguments,s,this.isGCS),n=(0,zt.fw)(e,r),i=this.sourceRasterInfos[0].statistics?.[0]??{min:0,max:8e3};return(0,zt.SC)(n,e,this.lookup.hsvMap,i),n.pixelType=this.outputPixelType,n}_getWebGLParameters(){let t=(0,zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,zt.ng)(t),{slopeType:s,zFactor:r,pixelSizeFactor:n,pixelSizePower:i}=this.functionArguments,o="scaled"===s,{indexedColormap:a,offset:u}=this.lookup,p=this.sourceRasterInfos[0].statistics?.[0],c=(0,l.zw)(this.outputPixelType);return{...e,indexedColormap:a,offset:u,zFactor:r,gcsFactor:this.isGCS?zt.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"}})],er.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:tr,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,"isGCS",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],er.prototype,"lookup",void 0),er=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunction")],er);const sr=er;var rr;const nr=new Dt.J({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let ir=rr=class extends c{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new rr({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,o.Cg)([(0,Qt.e)(nr)],ir.prototype,"slopeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],ir.prototype,"zFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"psPower",write:!0}})],ir.prototype,"pixelSizePower",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"psZFactor",write:!0}})],ir.prototype,"pixelSizeFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],ir.prototype,"removeEdgeEffect",void 0),ir=rr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunctionArguments")],ir);const or=ir;let ar=class extends x{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),t.statistics="percent-rise"===this.functionArguments.slopeType?null:[{min:0,max:90,avg:1,stddev:1}],t.bandCount=1,this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{zFactor:s,slopeType:r,pixelSizePower:n,pixelSizeFactor:i}=this.functionArguments,{isGCS:o}=this,{extent:a,primaryPixelSizes:l}=t,u=l?.[0]??(a?{x:a.width/e.width,y:a.height/e.height}:{x:1,y:1});return(0,zt.yy)(e,{zFactor:s,slopeType:r,pixelSizePower:n,pixelSizeFactor:i,isGCS:o,resolution:u})}_getWebGLParameters(){let{zFactor:t,slopeType:e,pixelSizeFactor:s,pixelSizePower:r}=this.functionArguments;return{zFactor:this.isGCS&&t>=1?t*zt.rk:t,slopeType:e,pixelSizeFactor:s??0,pixelSizePower:r??0,isOutputRounded:(0,l.zw)(this.outputPixelType)}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ar.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:or,json:{write:!0,name:"rasterFunctionArguments"}})],ar.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],ar.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ar.prototype,"isGCS",void 0),ar=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunction")],ar);const lr=ar;var ur;let pr=ur=class extends c{clone(){return new ur({conversionMatrix:[...this.conversionMatrix],raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],pr.prototype,"conversionMatrix",void 0),pr=ur=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunctionArguments")],pr);const cr=pr;let hr=class extends x{constructor(){super(...arguments),this.functionName="SpectralConversion",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){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:3===t.bandCount&&9===this.functionArguments.conversionMatrix.length}}_processPixels(t){let e=t.pixelBlocks?.[0];return null==e?null:function(t,e,s){let{width:r,height:n,mask:i,bandMasks:o}=t,a=o?.length?g.A.combineBandMasks(o):i,l=[],u=t.pixels.length;for(let r=0;r<e.length/u;r++){let n=ws(t,e.slice(r*u,(r+1)*u),s,a);l.push(n)}let p=new g.A({width:r,height:n,pixels:l,pixelType:s,mask:a});return p.updateStatistics(),p}(e,this.functionArguments.conversionMatrix,this.outputPixelType)}_getWebGLParameters(){let t=(0,l.hP)(this.outputPixelType),[e,s,r,n,i,o,a,u,p]=this.functionArguments.conversionMatrix;return{weights:[e,n,a,s,i,u,r,o,p],clampRange:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],hr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:cr,json:{write:!0,name:"rasterFunctionArguments"}})],hr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],hr.prototype,"rasterArgumentNames",void 0),hr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunction")],hr);const mr=hr,dr=new Dt.J({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function gr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{statisticsType:l,kernelRows:u,kernelCols:p}=e,c="stddev"===l,h=n*i,m=new Float64Array(h),d=new Float64Array(h),g=new Uint32Array(h);for(let t=0;t<i;t++){let e=t*n,s=0,i=0,a=0;for(let t=0;t<p;t++)(!o||o[e+t])&&(s+=r[e+t],c&&(i+=r[e+t]**2),a++);m[e]=s,d[e]=i,g[e]=a;for(let t=1;t<=n-p;t++){let n=e+t-1,l=n+p;o?(o[n]&&(a--,s-=r[n],c&&(i-=r[n]**2)),o[l]&&(a++,s+=r[l],c&&(i+=r[l]**2))):(s-=r[n],s+=r[l],c&&(i-=r[n]**2,i+=r[l]**2)),m[e+t]=s,g[e+t]=a,c&&(d[e+t]=i)}}let f=new Float64Array(h),y=new Float64Array(h),w=new Uint32Array(h),x=u*n;for(let t=0;t<=n-p;t++){let e=0,s=0,r=0;for(let i=0;i<u;i++){let o=i*n+t;e+=m[o],r+=g[o],c&&(s+=d[o])}f[t]=e,y[t]=s,w[t]=r;for(let o=1;o<=i-u;o++){let i=(o-1)*n+t,a=i+x;e-=m[i],e+=m[a],r-=g[i],r+=g[a],c&&(s-=d[i],s+=d[a]),f[o*n+t]=e,y[o*n+t]=s,w[o*n+t]=r}}let v=Math.floor(u/2),A=Math.floor(p/2);for(let t=v;t<i-v;t++){let e=t*n;for(let r=A;r<n-A;r++){let i=(t-v)*n+r-A,l=w[i];if(0===l||s&&(!o||o[e+r]))continue;let u=f[i]/l,p=c?Math.sqrt((y[i]-f[i]*u)/l):u;a[e+r]=p,o&&(o[e+r]=255)}}}function fr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{kernelRows:l,kernelCols:u,statisticsType:p}=e,c=Math.floor(l/2),h=Math.floor(u/2),m="min"===p,d=a.slice(),g=new Uint32Array(n*i);for(let t=c;t<i-c;t++){let e=t*n;for(let t=h;t<n-h;t++){let s=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=e+t+(a-c)*n+l-h;(!o||o[u])&&(s=m?Math.min(s,r[u]):Math.max(s,r[u]),i++)}o?(d[e+t]=0===i?0:s,g[e+t]=i):a[e+t]=0===i?0:s}}if(o)for(let t=c;t<i-c;t++){let e=t*n;for(let t=h;t<n-h;t++)if(g[e+t]){if(s&&o[e+t])continue;a[e+t]=d[e+t],o[e+t]=255}}}function yr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{kernelRows:l,kernelCols:u}=e,p=Math.floor(l/2),c=Math.floor(u/2),h=a.slice(),m=new Uint32Array(n*i);for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++){if(s&&o?.[e+t])continue;let i=[];for(let s=0;s<l;s++)for(let a=0;a<u;a++){let l=e+t+(s-p)*n+a-c;(!o||o[l])&&i.push(r[l])}i.length&&(i.sort((t,e)=>t-e),o?(h[e+t]=i[Math.floor((i.length-1)/2)],m[e+t]=i.length):a[e+t]=i[Math.floor((i.length-1)/2)])}}if(o)for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++)if(m[e+t]){if(s&&o[e+t])continue;a[e+t]=h[e+t],o[e+t]=255}}}function wr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{kernelRows:l,kernelCols:u}=e,p=Math.floor(l/2),c=Math.floor(u/2),h="majority"===e.statisticsType,m=l*u,d=a.slice(),g=new Uint32Array(n*i);for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++){if(s&&o?.[e+t])continue;let i=new Map;for(let s=0;s<l;s++)for(let a=0;a<u;a++){let l=e+t+(s-p)*n+a-c;if(o&&!o[l])continue;let u=r[l];i.set(u,i.has(u)?i.get(u)+1:1)}if(0===i.size)continue;let f=0,y=0,w=h?0:m+1;for(let t of i.keys())y=i.get(t),h===y>w&&(w=y,f=t);o?(d[e+t]=f,g[e+t]=i.size):a[e+t]=f}}if(o)for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++)if(g[e+t]){if(s&&o[e+t])continue;a[e+t]=d[e+t],o[e+t]=255}}}var xr;let vr=xr=class extends c{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new xr({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:(t,e)=>Number(t??e?.kernelRows??3)}}})],vr.prototype,"rows",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelCols","cols"],reader:(t,e)=>Number(t??e?.kernelCols??3)}}})],vr.prototype,"cols",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],vr.prototype,"fillNoDataOnly",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:{source:["statisticsType","type"],reader:(t,e)=>dr.fromJSON(e?.statisticsType??e?.type)??"min"},write:{target:"type"}}}),(0,Qt.e)(dr)],vr.prototype,"statisticsType",void 0),vr=xr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunctionArguments")],vr);const Ar=vr;let Cr=class extends x{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{type:t}=this.functionArguments.toJSON();if(t<1||t>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${t}`};let e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);let s=e.clone();s.pixelType=this.outputPixelType;let{statisticsType:r}=this.functionArguments;return"stddev"===r&&this._removeStatsHistColormapVAT(s),this.rasterInfo=s,{success:!0,supportsGPU:s.bandCount<=3&&t<5}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return e;let{statisticsType:s,rows:r,cols:n,fillNoDataOnly:i}=this.functionArguments;return function(t,e){let{mask:s}=t,{fillNoDataOnly:r}=e;if(r&&!s)return t;let{pixels:n,width:i,height:o,bandMasks:a,pixelType:l}=t,u=n.length,p=i*o,c=[],{kernelRows:h,kernelCols:m,statisticsType:d,mirrorEdges:f}=e;if(r&&!s)return t;let y=e.outputPixelType??l,w=[];for(let t=0;t<u;t++){let l=n[t],u=g.A.createEmptyBand(y,p);r&&u.set(l);let x=(a?.[t]??s)?.slice()??null,v={band:l,width:i,height:o,mask:x,outBand:u};switch(d){case"min":case"max":fr(v,e);break;case"mean":case"stddev":gr(v,e);break;case"median":yr(v,e);break;case"majority":case"minority":wr(v,e)}f&&!r&&Qe(u,i,o,h,m),c.push(u),x&&w.push(x)}let x=w[0]??s;w.length!==u&&(w.length=0),u>1&&a?.length&&(x=g.A.combineBandMasks(a));let v=new g.A({pixelType:y,width:i,height:o,pixels:c,bandMasks:a&&w.length?w:null,mask:x});return v.updateStatistics(),v}(e,{kernelRows:r,kernelCols:n,fillNoDataOnly:i,outputPixelType:this.outputPixelType,statisticsType:s,mirrorEdges:!0})}_getWebGLParameters(){let{rows:t,cols:e,statisticsType:s,fillNoDataOnly:r}=this.functionArguments;return{fillNoDataOnly:r,kernelRows:t,kernelCols:e,statisticsType:s,clampRange:(0,l.hP)(this.outputPixelType)}}_getNeighborhoodSize(){let{rows:t,cols:e}=this.functionArguments;return{rows:t,cols:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Cr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ar,json:{write:!0,name:"rasterFunctionArguments"}})],Cr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Cr.prototype,"rasterArgumentNames",void 0),Cr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunction")],Cr);const br=Cr;var Mr;let Pr=Mr=class extends c{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,e){if(!t?.length)return null;let s=[];return t.forEach(t=>{let e={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};s.push(e)}),s}writeStatistics(t,e,s){if(!t?.length)return;let r=[];t.forEach(t=>{let e={...t,mean:t.avg,standardDeviation:t.stddev};delete e.avg,delete e.stddev,r.push(e)}),e[s]=r}clone(){return new Mr({statistics:(0,i.o8)(this.statistics),histograms:(0,i.o8)(this.histograms)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Pr.prototype,"statistics",void 0),(0,o.Cg)([(0,ye.w)("statistics")],Pr.prototype,"readStatistics",null),(0,o.Cg)([(0,Se.K)("statistics")],Pr.prototype,"writeStatistics",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Pr.prototype,"histograms",void 0),Pr=Mr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunctionArguments")],Pr);const Tr=Pr;let Nr=class extends x{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");let e=t.clone(),{statistics:s,histograms:r}=this.functionArguments;return r&&(e.histograms=r),s&&(e.statistics=s),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Nr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Tr,json:{write:!0,name:"rasterFunctionArguments"}})],Nr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Nr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Nr.prototype,"indexedColormap",void 0),(0,o.Cg)([(0,a.MZ)()],Nr.prototype,"isNoopProcess",void 0),Nr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunction")],Nr);const Ir=Nr;var Rr;const Fr=new Dt.J({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let _r=Rr=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(t,e,s){t?.length&&(Array.isArray(t[0])||(t=t.map(t=>[t.min,t.max,t.avg,t.stddev])),e[s]=t)}clone(){return new Rr({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}})],_r.prototype,"computeGamma",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{name:"dra",write:!0}})],_r.prototype,"dynamicRangeAdjustment",void 0),(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],_r.prototype,"gamma",void 0),(0,o.Cg)([(0,a.MZ)()],_r.prototype,"histograms",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"maxPercent",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"minPercent",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"numberOfStandardDeviations",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"max",write:!0}})],_r.prototype,"outputMax",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"min",write:!0}})],_r.prototype,"outputMin",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"sigmoidStrengthLevel",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],_r.prototype,"statistics",void 0),(0,o.Cg)([(0,Se.K)("statistics")],_r.prototype,"writeStatistics",null),(0,o.Cg)([(0,Qt.e)(Fr)],_r.prototype,"stretchType",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_r.prototype,"useGamma",void 0),_r=Rr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunctionArguments")],_r);const kr=_r;let Sr=class extends x{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 t=this.sourceRasterInfos[0],{pixelType:e}=t,{functionArguments:s}=this,{dynamicRangeAdjustment:r,gamma:n,useGamma:i}=s;if(!r&&["u8","u16","s8","s16"].includes(e)){let r=(0,qe.DP)(s.toJSON(),{rasterInfo:t}),o=(0,l.zw)(this.outputPixelType)?"round":"float";this.lookup=(0,qe.RP)({pixelType:e,...r,gamma:i?n:null,rounding:o}),this.cutOffs=r}else r||(this.cutOffs=(0,qe.DP)(s.toJSON(),{rasterInfo:t}));this.outputPixelType=this._getOutputPixelType(e);let o=t.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 t=0;t<o.bandCount;t++)o.statistics[t]={min:a,max:u};return this.rasterInfo=o,{success:!0,supportsGPU:!r}}_processPixels(t,e){let s=t.pixelBlocks?.[0];if(null==s)return s;let{lookup:r}=this;if(r)return(0,Kt.eH)(s,{...r,outputPixelType:this.rasterInfo.pixelType});let{functionArguments:n}=this,i=e?.stretchCutoff??this.cutOffs??(0,qe.DP)(n.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:s}),o=n.useGamma?n.gamma:null;return(0,qe._N)(s,{...i,gamma:o,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let{outputMin:t=0,outputMax:e=255,gamma:s,useGamma:r}=this.functionArguments,n=this.rasterInfo.bandCount>=2?3:1,i=r&&s?.length?(0,qe.Nh)(n,s):[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((s,r)=>(e-t)/(a[r]-o[r])),p=(0,l.zw)(this.outputPixelType);return{bandCount:n,minOutput:t,maxOutput:e,minCutOff:o,maxCutOff:a,factor:u,useGamma:r,gamma:r&&s?[s[0],s[1]??s[0],s[2]??s[0]]:[1,1,1],gammaCorrection:r?[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"}})],Sr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:kr,json:{write:!0,name:"rasterFunctionArguments"}})],Sr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Sr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Sr.prototype,"lookup",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Sr.prototype,"cutOffs",void 0),Sr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunction")],Sr);const Br=Sr;var jr;let Zr=jr=class extends c{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new jr({attributeTableAsRecordSet:(0,i.o8)(this.attributeTableAsRecordSet)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Zr.prototype,"attributeTableAsRecordSet",void 0),Zr=jr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunctionArguments")],Zr);const zr=Zr;let Gr=class extends x{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1||t.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};let{attributeTableAsRecordSet:e}=this.functionArguments;if(!e)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(t.pixelType);let s=t.clone();return s.pixelType=this.outputPixelType,s.bandCount=1,"thematic"!==s.dataType&&(s.keyProperties=s.keyProperties?{...s.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=s,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Gr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:zr,json:{write:!0,name:"rasterFunctionArguments"}})],Gr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Gr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],Gr.prototype,"isNoopProcess",void 0),Gr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunction")],Gr);const Or=Gr,Dr=new Map;function Er(t,e){let{rasterFunctionArguments:s}=t;s&&(s.rasters||[s.raster,s.raster2]).forEach(t=>{t&&"number"!=typeof t&&("string"==typeof t?t.startsWith("http")&&(e.includes(t)||e.push(t)):"rasterFunctionArguments"in t&&Er(t,e))})}function Vr(t,e){e??={};try{if("function"in(t=(0,i.o8)(t))&&"arguments"in t&&t.arguments){let s=qr(t,new Map,e);if(Xr(s),!s.renderingRule)throw new n.A("raster-function-helper","Unsupported raster function json.");t=s.renderingRule}if("rasterFunction"in t){let s=$r(t=Lr(t),e);return s.isRoot=!0,s}}catch{}throw new n.A("raster-function-helper","unsupported raster function json.")}function Ur(t){return!!(t&&"object"==typeof t&&t.rasterFunction&&t.rasterFunctionArguments)}function Lr(t){let{rasterFunction:e,rasterFunctionArguments:s}=t,r={};for(let t in s){let e=s[t],n=t.toLowerCase();if("rasters"===n&&Array.isArray(e))r.rasters=e.map(t=>Ur(t)?Lr(t):t);else switch(Ur(e)&&(e=Lr(e)),n){case"dra":r.dra=e;break;case"pspower":r.psPower=e;break;case"pszfactor":r.psZFactor=e;break;case"bandids":r.bandIds=e;break;default:r[t[0].toLowerCase()+t.slice(1)]=e}}return"Local"===e&&!r.rasters?.length&&(r.rasters=["$$"]),{...t,rasterFunctionArguments:r}}function $r(t,e){let{rasterFunction:s,rasterFunctionArguments:r}=t,i=t.outputPixelType?.toLowerCase();if(null==s||!Dr.has(s))throw new n.A("raster-function-helper",`unsupported raster function: ${s}`);let o=Dr.get(s),a=("function"==typeof o.ctor?o.ctor:o.ctor.default).fromJSON({...t,outputPixelType:i}),{rasterArgumentNames:l}=a,u=[],p=function(t,e){return"rasters"===e[0]&&Array.isArray(t.rasters)?t.rasters:e.map(e=>t[e])}(r,l),c="rasters"===l[0]||l.length>1,h=[];for(let t=0;t<p.length;t++){let s,r=p[t];null==r||"string"==typeof r&&r.startsWith("$")?u.push(e?.raster):"string"==typeof r?e[r]&&u.push(e[r]):"number"!=typeof r&&"rasterFunction"in r&&(s=$r(r,e),c||(a.functionArguments[l[t]]=s),u.push(s)),c&&h.push(s??r)}if(c&&("rasters"===l[0]?a.functionArguments.rasters=h:l.forEach((t,e)=>{a.functionArguments[t]=h[e]})),e){a.sourceRasters=u;let t=e.raster?.url;t&&(a.mainPrimaryRasterId=t)}return a}function Kr(t,e){if(t&&e)for(let s in t){let r=t[s];r&&"object"==typeof r&&"type"in r&&("RasterFunctionTemplate"===r.type?Kr(r.arguments,e):"RasterFunctionVariable"===r.type&&null!=e[r.name]&&(r.value=e[r.name]))}}function Wr(t,e){if(!t||"object"!=typeof t)return t;let{value:s}=t;if(!s||"object"!=typeof s)return t.isDataset?"$$":s;if(Array.isArray(s))return 0===s.length?[]:s.map(t=>t&&"object"==typeof t&&"RasterFunctionVariable"===t.type?Wr(t,e):t);if("value"in s&&["number","string","boolean"].includes(typeof s.value))return s.value;if(t.isDataset&&"Scalar"!==s.type)return"$$";if(!("type"in s))return s;let r=s;switch(s.type){case"Scalar":r=s.value;break;case"AlgorithmicColorRamp":r=Hr(s);break;case"MultiPartColorRamp":r={type:"multipart",colorRamps:s.ArrayOfColorRamp.map(Hr)};break;case"ArgumentArray":if(s.elements?.length&&"RasterStatistics"!==s.elements[0].type){let t=[];for(let r=0;r<s.elements.length;r++){let i=s.elements[r],{type:o}=i;if(o)if("RasterFunctionTemplate"===o){let{renderingRule:s}=qr(i,e);t.push(s),null!=i._object_id&&e.set(i._object_id,s)}else{if("RasterFunctionVariable"!==o)throw new n.A("raster-function-helper","unsupported raster function json.");{let s=Wr(i,e);t.push(s),null!=i._object_id&&e.set(i._object_id,s)}}else t.push(i)}r=t}else r=s.elements}return null!=s._object_id&&e.set(s._object_id,r),r}function Hr(t){let e=t.algorithm??"esriHSVAlgorithm",{FromColor:s,ToColor:n}=t;if(!Array.isArray(s)){let{r:t,g:e,b:n}=(0,r.$)({h:s.Hue,s:s.Saturation,v:s.Value});s=[t,e,n,s.AlphaValue]}if(!Array.isArray(n)){let{r:t,g:e,b:s}=(0,r.$)({h:n.Hue,s:n.Saturation,v:n.Value});n=[t,e,s,n.AlphaValue]}return{type:"algorithmic",algorithm:e,fromColor:s,toColor:n}}function qr(t,e,s){s&&Kr(t,s);let r={renderingRule:{},templates:e};return Jr(t,r),r}function Jr(t,e){if(!t||!e.renderingRule)return;let{renderingRule:s,templates:r}=e,{function:n,arguments:i,_object_id:o}=t;if(!n||!i)return;null!=o&&r.set(o,s),s.rasterFunction=n.type.replace("Function",""),s.outputPixelType=n.pixelType;let a={};s.rasterFunctionArguments=a;for(let t in i){if("type"===t||"object_id"===t||"_object_ref_id"===t)continue;let e=i[t];e&&"object"==typeof e&&"type"in e&&("RasterFunctionTemplate"===e.type||"RasterFunctionVariable"===e.type)?("RasterFunctionVariable"===e.type?a[t]=Wr(e,r):(s.rasterFunctionArguments[t]={},Jr(e,{renderingRule:s.rasterFunctionArguments[t],templates:r})),null!=e._object_id&&r.set(e._object_id,a[t])):a[t]=e}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),s.rasterFunction){case"Stretch":!function(t){t.Statistics?.length&&"object"==typeof t.Statistics&&(t.Statistics=t.Statistics.map(t=>[t.min,t.max,t.mean,t.standardDeviation])),null!=t.NumberOfStandardDeviation&&(t.NumberOfStandardDeviations=t.NumberOfStandardDeviation,delete t.NumberOfStandardDeviation)}(a);break;case"Colormap":!function(t){"randomcolorramp"===t.ColorRamp?.type?.toLowerCase()&&(delete t.ColorRamp,t.ColormapName="Random"),0===t.ColorSchemeType&&delete t.ColorRamp}(a);break;case"Convolution":!function(t){null!=t.ConvolutionType&&(t.Type=t.ConvolutionType,delete t.ConvolutionType)}(a);break;case"Mask":!function(t){t.NoDataValues?.length&&"string"==typeof t.NoDataValues[0]&&(t.NoDataValues=t.NoDataValues.filter(t=>""!==t).map(t=>Number(t)))}(a)}}function Xr(t){let{renderingRule:e,templates:s}=t;if("object"!=typeof e||!e?.rasterFunctionArguments||!s.size)return;let{rasterFunctionArguments:r}=e;for(let t in r){let e=r[t],i="_object_ref_id"===t?e:e&&"object"==typeof e&&"_object_ref_id"in e?e._object_ref_id:null;if(null!=i){if(!s.has(i))throw new n.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${i} does not exist`);let e=s.get(i);"_object_ref_id"===t?e&&"object"==typeof e&&Object.assign(r,e):r[t]=e;continue}e&&"object"==typeof e&&(e.rasterFunctionArguments&&Xr({renderingRule:e,templates:s}),Array.isArray(e)&&e.forEach((t,r)=>{if(t&&"object"==typeof t)if(null!=t._object_ref_id){if(!s.has(t._object_ref_id))throw new n.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${e} does not exist`);let o=s.get(i);o&&"object"==typeof o?Object.assign(t,o):e[r]=o}else Xr({renderingRule:t,templates:s})}))}}Dr.set("Arithmetic",{desc:"Arithmetic Function",ctor:St,rasterArgumentNames:["rasters"]}),Dr.set("Aspect",{desc:"Aspect Function",ctor:Ot,rasterArgumentNames:["raster"]}),Dr.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:re,rasterArgumentNames:["raster"]}),Dr.set("Colormap",{desc:"Colormap Function",ctor:Me,rasterArgumentNames:["raster"]}),Dr.set("ColormapToRGB",{desc:"ColormapToRGB Function",ctor:_e,rasterArgumentNames:["raster"]}),Dr.set("CompositeBand",{desc:"CompositeBand Function",ctor:ze,rasterArgumentNames:["rasters"]}),Dr.set("ComputeChange",{desc:"ComputeChange Function",ctor:$e,rasterArgumentNames:["rasters"]}),Dr.set("Convolution",{desc:"Convolution Function",ctor:os,rasterArgumentNames:["raster"]}),Dr.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Xe,rasterArgumentNames:["raster"]}),Dr.set("ExtractBand",{desc:"ExtractBand Function",ctor:ys,rasterArgumentNames:["raster"]}),Dr.set("Curvature",{desc:"Curvature Function",ctor:hs,rasterArgumentNames:["raster"]}),Dr.set("Hillshade",{desc:"Hillshade Function",ctor:Fs,rasterArgumentNames:["raster"]}),Dr.set("ShadedRelief",{desc:"ShadedRelief Function",ctor:sr,rasterArgumentNames:["raster"]}),Dr.set("Grayscale",{desc:"Grayscale Function",ctor:bs,rasterArgumentNames:["raster"]}),Dr.set("Clip",{desc:"Clip Function",ctor:me,rasterArgumentNames:["raster"]}),Dr.set("Local",{desc:"Local Function",ctor:js,rasterArgumentNames:["rasters"]}),Dr.set("Mask",{desc:"Mask Function",ctor:Es,rasterArgumentNames:["raster"]}),Dr.set("NDVI",{desc:"NDVI Function",ctor:Ks,rasterArgumentNames:["raster"]}),Dr.set("Remap",{desc:"Remap Function",ctor:Xs,rasterArgumentNames:["raster"]}),Dr.set("Slope",{desc:"Slope Function",ctor:lr,rasterArgumentNames:["raster"]}),Dr.set("SpectralConversion",{desc:"Spectral Conversion",ctor:mr,rasterArgumentNames:["raster"]}),Dr.set("Statistics",{desc:"Focal Statistics Function",ctor:br,rasterArgumentNames:["raster"]}),Dr.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:Ir,rasterArgumentNames:["raster"]}),Dr.set("Stretch",{desc:"Stretch Function",ctor:Br,rasterArgumentNames:["raster"]}),Dr.set("Table",{desc:"Attribute Table Function",ctor:Or,rasterArgumentNames:["raster"]})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3354],{73354(e,t,f){f.d(t,{a:()=>p,b:()=>l,c:()=>n,d:()=>i,e:()=>h,f:()=>a,l:()=>o,n:()=>y,t:()=>u}),f(44208);var r=f(72727);function n(e,t,f){u(e.typedBuffer,t.typedBuffer,f,e.typedBufferStride,t.typedBufferStride)}function u(e,t,f,n=3,u=n){let i=(0,r.k)(e.length,n,3),l=(0,r.k)(t.length,u,3),d=Math.min(i,l),o=f[0],a=f[1],p=f[2],h=f[4],y=f[5],B=f[6],c=f[8],m=f[9],S=f[10],g=f[12],s=f[13],M=f[14],k=0,w=0;for(let f=0;f<d;f++){let f=t[k],r=t[k+1],i=t[k+2];e[w]=o*f+h*r+c*i+g,e[w+1]=a*f+y*r+m*i+s,e[w+2]=p*f+B*r+S*i+M,k+=u,w+=n}return e}function i(e,t,f){l(e.typedBuffer,t.typedBuffer,f,e.typedBufferStride,t.typedBufferStride)}function l(e,t,f,n=3,u=n){let i=(0,r.k)(e.length,n,3),l=(0,r.k)(t.length,u,3),d=Math.min(i,l),o=f[0],a=f[1],p=f[2],h=f[3],y=f[4],B=f[5],c=f[6],m=f[7],S=f[8],g=0,s=0;for(let f=0;f<d;f++){let f=t[g],r=t[g+1],i=t[g+2];e[s]=o*f+h*r+c*i,e[s+1]=a*f+y*r+m*i,e[s+2]=p*f+B*r+S*i,g+=u,s+=n}}function d(e,t,f,r=3,n=r){let u=Math.min(e.length/r,t.length/n),i=0,l=0;for(let d=0;d<u;d++)e[l]=f*t[i],e[l+1]=f*t[i+1],e[l+2]=f*t[i+2],i+=n,l+=r;return e}function o(e,t,f,r){a(e.typedBuffer,t.typedBuffer,f,r,e.typedBufferStride,t.typedBufferStride)}function a(e,t,f,r,n=3,u=n){let i=Math.min(e.length/n,t.length/u),l=0,d=0,o=1/2.2;for(let a=0;a<i;a++)e[d]=r*(f*t[l])**o,e[d+1]=r*(f*t[l+1])**o,e[d+2]=r*(f*t[l+2])**o,l+=u,d+=n}function p(e,t,f,n=3,u=n){let i=(0,r.k)(e.length,n,3),l=(0,r.k)(t.length,u,3),d=Math.min(i,l),o=0,a=0;for(let r=0;r<d;r++)e[a]=t[o]+f[0],e[a+1]=t[o+1]+f[1],e[a+2]=t[o+2]+f[2],o+=u,a+=n;return e}function h(e,t){y(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function y(e,t,f=3,r=f){let n=Math.min(e.length/f,t.length/r),u=0,i=0;for(let l=0;l<n;l++){let n=t[u],l=t[u+1],d=t[u+2],o=n*n+l*l+d*d;if(o>0){let t=1/Math.sqrt(o);e[i]=t*n,e[i+1]=t*l,e[i+2]=t*d}u+=r,i+=f}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:a,linearToSRGBView:o,normalize:y,normalizeView:h,scale:d,scaleView:function(e,t,f){d(e.typedBuffer,t.typedBuffer,f,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,f){let r=Math.min(e.count,t.count),n=e.typedBuffer,u=e.typedBufferStride,i=t.typedBuffer,l=t.typedBufferStride,d=0,o=0;for(let e=0;e<r;e++)n[o]=i[d]>>f,n[o+1]=i[d+1]>>f,n[o+2]=i[d+2]>>f,d+=l,o+=u},transformMat3:l,transformMat3View:i,transformMat4:u,transformMat4View:n,translate:p},Symbol.toStringTag,{value:"Module"}))},72727(e,t,f){function r(e,t,f){if(t<=0)return 0;let r=e-f;return r<0?0:Math.floor(r/t)+1}f.d(t,{k:()=>r}),f(53966)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1549,1560,2938],{19334(e,t,r){r.d(t,{e:()=>o});var i=r(54639),n=r(14112);class l{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function o(e){if(null==e)return null;switch(e.type){case"point":if((0,n.e6)(e))return null;break;case"polygon":if((0,n.Wq)(e))return null;break;case"polyline":if((0,n.IY)(e))return null;break;case"multipoint":if((0,n.DG)(e))return null;break;case"extent":if((0,n.As)(e))return null;break;default:return null}let t=i.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new l(e));return t.asAccessorGeometry(),t}},36983(e,t,r){r.d(t,{R:()=>u,p:()=>d});var i=r(54639),n=r(14112),l=r(16930),o=r(60408),a=r(65864);class s{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){let t=(0,a.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function u(e,t){if("object"!=typeof e||!e)return null;let r=t;if("spatialReference"in e&&(e.spatialReference instanceof l.A?r=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(r=new l.A,r.read(e.spatialReference))),null==r)throw Error("Spatial reference required");return(0,o.fT)(e)?d("point",e,r):(0,o.Rg)(e)?d("polyline",e,r):(0,o.Bi)(e)?d("polygon",e,r):(0,o.U9)(e)?d("multipoint",e,r):(0,o.ZC)(e)?d("extent",e,r):null}function d(e,t,r){if(null==t)return null;let l=!1,o=!1;switch(e){case"point":if((0,n.e6)(t))return null;l=void 0!==t.z,o=void 0!==t.m;break;case"polygon":if((0,n.Wq)(t))return null;l=!0===t.hasZ,o=!0===t.hasM;break;case"polyline":if((0,n.IY)(t))return null;l=!0===t.hasZ,o=!0===t.hasM;break;case"multipoint":if((0,n.DG)(t))return null;l=!0===t.hasZ,o=!0===t.hasM;break;case"extent":if((0,n.As)(t))return null;l=null!=t.zmin&&null!=t.zmax,o=null!=t.mmin&&null!=t.mmax;break;default:throw Error("Unsupported geometry type: "+t.type)}return i.R.of(e,r,l,o,new s(t))}},14112(e,t,r){function i(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function n(e){if(0===(e.curveRings??e.rings).length)return!0;for(let t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function l(e){if(0===(e.curvePaths??e.paths).length)return!0;for(let t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function o(e){return 0===e.points.length}function a(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}r.d(t,{As:()=>a,DG:()=>o,IY:()=>l,Wq:()=>n,e6:()=>i})},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){let[r,l]=e.split("."),o=/^\s*\d+\s*$/;if(!r?.match||!o.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!l?.match||!o.test(l)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new n(parseInt(r,10),parseInt(l,10),t)}}},83508(e,t,r){r.r(t),r.d(t,{default:()=>we});var i=r(32198),n=r(56507),l=r(7762),o=r(49186),a=r(91869),s=r(25728),u=r(17676),d=r(84952),p=r(91429),c=r(4146),f=r(36563),y=r(66344),h=r(32587),m=r(36708),g=r(44794),v=r(78888),b=r(63074),w=r(25036),C=r(10873),M=r(91880),x=r(1873);let F=class extends((0,w.j)((0,b.dM)((0,s.M)(c.A)))){constructor(e){super(e),this._layerCache=new y.q(20,e=>e.destroy()),this._oidToReference=new h.A,this._layerToReference=new Map,this.legendEnabled=!0,this.layers=new l.A,this.maximumVisibleSublayers=10,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.title="Layers in view",this.type="catalog-dynamic-group",this.visible=!0}initialize(){this.addHandles([this.layers.on("after-add",({item:e})=>{e.parent=this}),this.layers.on("after-remove",({item:e})=>{e.parent=null}),(0,m.wB)(()=>this._orderBy,()=>{this._updateLayerSortValues(),this._sortAllLayers()})])}load(e){return this.addResolvingPromise(this.parent.load()),Promise.resolve(this)}destroy(){this._layerCache.destroy(),this._oidToReference.clear(),this._layerToReference.clear()}get _orderBy(){return this.parent?this.parent.orderBy?.find(e=>!e.valueExpression&&e.field)??new M.A({field:this.parent.objectIdField}):null}get _referenceComparator(){let e=this._orderBy;if(!this.parent||!e)return()=>0;let t=this.parent.fieldsIndex.get(e.field),r=(0,x.FM)(t?.toJSON().type,"descending"===e.order,"case-sensitive"),i=(0,x.FM)("esriFieldTypeOID","descending"===e.order);return(e,t)=>r(t.sortValue,e.sortValue)||i(t.objectId,e.objectId)}get fullExtent(){return this.parent?.fullExtent??null}get updating(){return(0,a.Bs)(this._oidToReference,({pending:e})=>null!=e)}acquireLayer(e){if(this.destroyed)return(0,f.hA)();let t=this._getLayerReference(e);return t.count++,(0,f.hA)(()=>{t.count--,t.count||this._destroyLayerReference(t)})}_getLayerReference(e){let t=e.getObjectId();return(0,a.tE)(this._oidToReference,t,()=>{let t=e.getObjectId(),r=`${t}`,i=e.getAttribute(this.parent.itemSourceField),n=new S(e,t,i),l=this._layerCache.pop(r);return l?(this._addLayer(n,l),n):(n.pending=this.parent.createLayerFromFootprint(e).then(e=>{n.count?this._addLayer(n,e):(!this.destroyed&&!this._layerCache.get(r)&&this._layerCache.put(r,e),n.layer=null)}).catch(()=>{}).finally(()=>{n.pending=null}),n)})}_destroyLayerReference(e){e.layer&&=(this._layerToReference.delete(e.layer),this.layers.remove(e.layer),this.destroyed?e.layer.destroy():this._layerCache.put(`${e.objectId}`,e.layer),null),this._oidToReference.delete(e.objectId)}_addLayer(e,t){e.layer=t,t.persistenceEnabled=!1,this._layerToReference.set(t,e),this._updateLayerSortValue(e),this.layers.add(t),this._sortAllLayers()}_updateLayerSortValues(){for(let e of this._layerToReference.values())this._updateLayerSortValue(e)}_updateLayerSortValue(e){this._orderBy&&(e.sortValue=e.footprint.getAttribute(this._orderBy.field))}_sortAllLayers(){this.layers.sort((e,t)=>this._referenceComparator(this._layerToReference.get(e),this._layerToReference.get(t)))}};(0,i.Cg)([(0,p.MZ)()],F.prototype,"_orderBy",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],F.prototype,"_referenceComparator",null),(0,i.Cg)([(0,p.MZ)(C.fV)],F.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"],json:{write:!0}})],F.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],F.prototype,"fullExtent",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0,isRequired:!0}}})],F.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],F.prototype,"layers",void 0),(0,i.Cg)([(0,p.MZ)({type:v.jz,range:{min:0,max:50},json:{write:!0,default:10}})],F.prototype,"maximumVisibleSublayers",void 0),(0,i.Cg)([(0,p.MZ)(C.ke)],F.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],F.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],F.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],F.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],F.prototype,"updating",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],F.prototype,"visible",void 0),F=(0,i.Cg)([(0,p.$K)("esri.layers.catalog.CatalogDynamicGroupLayer")],F);class S{constructor(e,t,r){this.footprint=e,this.objectId=t,this.itemSource=r,this.count=0,this.layer=null,this.sortValue=void 0,this._pending=(0,g.v)(null)}get pending(){return this._pending.value}set pending(e){this._pending.value=e}}var Z=r(40124),I=r(4718),E=r(78247),T=r(41910),j=r(55156),L=r(60950),A=r(89808),_=r(99959);const O=Symbol("isCatalogGraphicOrigin");var P;class V extends _.A{get[(P=O,L.ym)](){return this.layer}get[j.e](){return this.layer}get[A.Q](){return this.layer}get[T.e7](){return this.layer}constructor(e){super(),this[P]=!0,this.type="catalog",this.layer=e}get id(){return this.layer.id}}var R=r(87718),N=r(30279),D=r(16194),q=r(30524),z=r(46499),k=r(39383),B=r(96576),G=r(41214),$=r(30291),U=r(94985),J=r(43937);let K=class extends((0,w.j)((0,R.F)((0,b.dM)((0,s.M)(c.A))))){constructor(e){super(e),this.attributeTableTemplate=null,this.charts=null,this.editingEnabled=!0,this.elevationInfo=null,this.formTemplate=null,this.graphicOrigin=new V(this),this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.opacity=1,this.parent=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.title="Footprints",this.type="catalog-footprint",this.visible=!0}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.parent.load(e),(0,q.yp)(this.renderer,this.fieldsIndex),this.addHandles([this.parent.on("apply-edits",e=>this.emit("apply-edits",e)),this.parent.on("edits",e=>this.emit("edits",e)),this.parent.on("refresh",e=>this.emit("refresh",e))])}get apiKey(){return this.parent?.apiKey}get capabilities(){return this.parent?.capabilities}get customParameters(){return this.parent?.customParameters}get dateFieldsTimeZone(){return this.parent?.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this.parent?.datesInUnknownTimezone??!1}get definitionExpression(){return this.parent?.definitionExpression}get editingInfo(){return this.parent?.editingInfo}get effectiveCapabilities(){return this.parent?.effectiveCapabilities}get createQueryVersion(){return this.parent?.createQueryVersion}get defaultPopupTemplate(){return this.createPopupTemplate()}get displayField(){return this.parent?.displayField}get displayFilterEnabled(){return this.parent?.displayFilterEnabled??!0}get displayFilterInfo(){return this.parent?.displayFilterInfo??null}get effectiveEditingEnabled(){return!1}set fieldConfigurations(e){if(this._override("fieldConfigurations",e),!this.parent?.loaded)return;let t=(0,D.sS)(this,e);t&&this._set("popupTemplate",t)}get fieldConfigurations(){return this._isOverridden("fieldConfigurations")?this._get("fieldConfigurations"):(0,D.QX)(this)||null}get fields(){return this.parent?.fields}get fieldsIndex(){return this.parent?.fieldsIndex}get fullExtent(){return this.parent?.fullExtent}get geometryFieldsInfo(){return this.parent?.geometryFieldsInfo}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?.globalIdField}get hasM(){return this.parent?.hasM??!1}get hasZ(){return this.parent?.hasZ??!1}get objectIdField(){return this.parent?.objectIdField}get orderBy(){return this.parent?.orderBy??null}get outFields(){return this.parent?.outFields}get parsedUrl(){return this.parent?.parsedUrl??null}writePopupTemplate(e,t,r,i){e&&(t[r]=e.toJSON({...i,writeFieldFormat:!0}))}get preferredTimeZone(){return this.parent?.preferredTimeZone??null}set renderer(e){(0,q.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):function(){let e=new U.A({style:"solid",color:[0,0,0,0],outline:{style:"solid",color:[96,96,96,.75],width:.75}});return new B.A({symbol:e})}()}get returnM(){return this.parent?.returnM}get returnZ(){return this.parent?.returnZ}get source(){return this.parent?.source}get timeExtent(){return this.parent?.timeExtent}get timeInfo(){return this.parent?.timeInfo}get timeOffset(){return this.parent?.timeOffset}get typeIdField(){return this.parent?.typeIdField}get types(){return this.parent?.types}get useViewTime(){return this.parent?.useViewTime??!0}get version(){return this.parent?.version}async applyEdits(e,t){return await this.load(),this.parent.applyEdits(e,t)}createFieldConfigurations(){return(0,D.xY)(this)}createPopupTemplate(e){let t={fields:this.fields,objectIdField:this.objectIdField,title:this.title};return(0,$.tn)(t,e)}createQuery(){return this.parent?.createQuery()}getField(e){return this.parent?.getField(e)}getFieldAlias(e){let t=this.getField(e);if(t)return this.getFieldConfiguration(t.name)?.alias||t.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(t=>t.name.toLowerCase()===e)}getFieldDomain(e,t){return this.parent?.getFieldDomain(e,t)}async queryExtent(e,t){return await this.load(),this.parent.queryExtent(e,t)}async queryFeatures(e,t){return await this.load(),this.parent.queryFeatures(e,t)}async queryFeatureCount(e,t){return await this.load(),this.parent.queryFeatureCount(e,t)}async queryObjectIds(e,t){return await this.load(),this.parent.queryObjectIds(e,t)}async queryAttributeBins(e,t){return await this.load(),this.parent.queryAttributeBins(e,t)}};(0,i.Cg)([(0,p.MZ)(C.zQ)],K.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"apiKey",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"capabilities",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"customParameters",null),(0,i.Cg)([(0,p.MZ)()],K.prototype,"dateFieldsTimeZone",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"datesInUnknownTimezone",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"definitionExpression",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"editingInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"effectiveCapabilities",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],K.prototype,"charts",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"createQueryVersion",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"displayField",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],K.prototype,"editingEnabled",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,p.MZ)((()=>{let e=(0,I.o8)(C.Yj);return e.json.origins["web-map"]={read:!1,write:!1},e})())],K.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)({type:[N.A],json:{name:"layerDefinition.fieldConfigurations",write:{overridePolicy(e,t){return{enabled:!0,ignoreOrigin:this.originIdOf(t)<3}}}}})],K.prototype,"fieldConfigurations",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"fields",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"fieldsIndex",null),(0,i.Cg)([(0,p.MZ)({type:E.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],K.prototype,"formTemplate",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"fullExtent",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"geometryFieldsInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"geometryType",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"globalIdField",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0,clonable:!1})],K.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"hasM",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"hasZ",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:[z.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:k.w,write:!0}})],K.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,p.MZ)(C.kF)],K.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,p.MZ)(C.fV)],K.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide"],json:{write:!0}})],K.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)((()=>{let e=(0,I.o8)(C.hG);return e.json.origins.service.read=!1,e})())],K.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)((()=>{let e=(0,I.o8)(C.hn);return e.json.origins.service.read=!1,e})())],K.prototype,"minScale",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"objectIdField",null),(0,i.Cg)([(0,p.MZ)(C.ke)],K.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"orderBy",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"outFields",null),(0,i.Cg)([(0,p.MZ)({clonable:!1})],K.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"parsedUrl",null),(0,i.Cg)([(0,p.MZ)(C.M6)],K.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:Z.A,json:{name:"popupInfo",write:!0}})],K.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,J.K)("popupTemplate")],K.prototype,"writePopupTemplate",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"preferredTimeZone",null),(0,i.Cg)([(0,p.MZ)({types:G.Hg,json:{origins:{"web-scene":{types:G.XJ}},name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(e,t){return{ignoreOrigin:this.originIdOf(t)<3}}}}})],K.prototype,"renderer",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"returnM",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"returnZ",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"source",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"timeExtent",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"timeInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"timeOffset",null),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{ignoreOrigin:!0,isRequired:!0}}})],K.prototype,"title",void 0),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],K.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"typeIdField",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"types",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],K.prototype,"useViewTime",null),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:!0}})],K.prototype,"visible",void 0),K=(0,i.Cg)([(0,p.$K)("esri.layers.catalog.CatalogFootprintLayer")],K);var H=r(60845),Q=r(52136),W=r(18768),Y=r(69208),X=r(6455),ee=r(47685),te=r(10086),re=r(34287),ie=r(32756),ne=r(8303),le=r(54310),oe=r(23502),ae=r(82935),se=r(15426),ue=r(33143),de=r(17036),pe=r(91908),ce=r(20655),fe=r(80812),ye=r(39131),he=r(97552);const me=(0,de.p)();function ge(e,t,r,i){let n=e.write({},i);(function(e){if(null==e)return!0;let t=Object.keys(e);return!t.length||1===t.length&&"id"===t[0]})(n)||(t[r]=n)}let ve=class extends((0,oe.Z)((0,X.FJ)((0,te.j)((0,ee.w6)((0,b.dM)((0,ie.fY)((0,ae.e)((0,w.j)((0,le.J)((0,W.b)((0,re.q)((0,ne.A)((0,s.M)((0,Y.d)((0,Q.p)(c.A)))))))))))))))){constructor(e){super(e),this.legendEnabled=!0,this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField="cd_draworder",this.dynamicGroupLayer=new F({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new K({parent:this}),this.itemNameField="cd_itemname",this.itemSourceField="cd_itemsource",this.itemTypeField="cd_itemtype",this.layers=new l.A([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField="cd_maxscale",this.minScaleField="cd_minscale",this.orderBy=null,this.outFields=null,this.supportedPortalItemTypes=["Feature Service"],this.supportedSourceTypes=new Set(["Catalog Layer"]),this.source=new H.default({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type="catalog",this.typeIdField=null,this.types=null}load(e){let t=null==e?null:e.signal,r=this.loadFromPortal({supportedTypes:this.supportedPortalItemTypes},e).catch(u.QP).then(async()=>{let{url:e,source:r}=this;if(!e)throw new o.A("catalog-layer:missing-url","Catalog layer must be created with a url");if(null==this.layerId){let r=await this._fetchFirstValidLayerId(t);if(null==r)throw new o.A("catalog-layer:missing-layerId","There is no Catalog Layer in the service",{service:e});this.layerId=r}await r.load({signal:t}),this._initLayerProperties(),this._verifyFields()}).then(()=>(0,se.VA)(this,"load",e));return this.addResolvingPromise(r),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(let e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}async applyEdits(e,t){return(0,se.ct)(this,e,t)}async createLayerFromFootprint(e){let t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){let e=new he.A,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=["*"];let{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e.where=this.definitionExpression||"1=1",e}getFeatureType(e){return(0,se.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){let r=t?.feature,i=this.getFeatureType(r);if(i){let t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this.getField(e)?.domain}async reloadFromService(e){await this.source.reload({signal:e}),this._initLayerProperties(),this._verifyFields()}async hasDataChanged(){return(0,se.jp)(this)}async queryFeatures(e,t){let r=await this.load(),i=await r.source.queryFeatures(he.A.from(e)??r.createQuery(),t),n=r.footprintLayer.graphicOrigin;if(i?.features)for(let e of i.features)e.layer=e.sourceLayer=r.footprintLayer,e.origin=n;return i}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(he.A.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(he.A.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(he.A.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&(0,pe.D)(this,e)}read(e,t){if(super.read(e,t),e){let{footprintLayer:r,dynamicGroupLayer:i}=e;r&&this.footprintLayer.read(r,t),i&&this.dynamicGroupLayer.read(i,t)}}async queryAttributeBins(e,t){let{source:i,capabilities:n}=await this.load();(0,se.ZJ)(e,n,"CatalogLayer");let l=await r.e(6956).then(()=>r(14575)),o=await i.queryAttributeBins(l.default.from(e),t);if(o.features)for(let e of o.features)e.layer=e.sourceLayer=this.footprintLayer;return o}_initLayerProperties(){let{portalItem:e,source:t}=this,{sourceJSON:r}=t;r&&(this.sourceJSON=r,this.read(r,{origin:"service",portalItem:e,portal:e?.portal,url:this.parsedUrl}))}_verifyFields(){let e=[this.itemNameField,this.itemSourceField,this.itemTypeField,this.minScaleField,this.maxScaleField],t=e.filter(e=>!this.fieldsIndex.has(e));if(t.length)throw new o.A("catalog-layer:missing-fields","There are missing fields to operate properly",{requiredFields:e,missingFields:t})}async _fetchFirstValidLayerId(e){let{data:t}=await(0,n.A)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(this.applyPreferredHost(t),Array.isArray(t?.layers))return t.layers.find(({type:e})=>!!e&&this.supportedSourceTypes.has(e))?.id}async _createLayer(e){let t=e.getAttribute(this.itemSourceField);if(!t)throw new o.A("catalog-layer:item-source-missing",`The footprint is missing the "${this.itemSourceField}" attribute`);let i=JSON.parse(t);if(function(e){return"object"==typeof e&&!!e&&"itemId"in e&&"portalUrl"in e}(i)){let e,{itemId:t,portalUrl:r}=i,n=(0,ye.qG)(r),l=this.portalItem?.portal,o=ce.A.getDefault(),s=!0;l&&(0,d.ut)(r,l.url)?e=l:(0,d.ut)(r,o.url)?e=o:(e=(0,a.tE)(this._portals,n,()=>new ce.A({url:n})),s=!1);let u=await c.A.fromPortalItem(new fe.default({id:t,portal:e}));return s||await be(u),u}if(function(e){return"object"==typeof e&&!!e&&"url"in e}(i))return c.A.fromArcGISServerUrl({url:i.url});let{default:n}=await r.e(7546).then(()=>r(45165));return new n}_configureLayer(e,t){let r=t.getAttribute(this.itemNameField);r&&(e.title=r);let i=t.getAttribute(this.maxScaleField);null!=i&&"maxScale"in e&&(e.maxScale=i);let n=t.getAttribute(this.minScaleField);null!=n&&"minScale"in e&&(e.minScale=n)}};async function be(e){if("portalItem"in e&&e.portalItem){try{await e.load()}catch{}e.portalItem=null,"group"===e.type&&await Promise.allSettled([...e.layers.map(e=>be(e)),...e.tables.map(e=>be(e))])}}(0,i.Cg)([(0,p.MZ)(C.fV)],ve.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"createQueryVersion",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"drawOrderField",void 0),(0,i.Cg)([(0,p.MZ)({type:F,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:ge}}})],ve.prototype,"dynamicGroupLayer",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"effectiveEditingEnabled",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.elevationInfo",read:!1,write:!1}}}})],ve.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)({...me.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ve.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(me.fieldsIndex)],ve.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.floorInfo",read:!1,write:!1}}}})],ve.prototype,"floorInfo",void 0),(0,i.Cg)([(0,p.MZ)({type:K,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:ge}}})],ve.prototype,"footprintLayer",void 0),(0,i.Cg)([(0,p.MZ)(C.id)],ve.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"itemNameField",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"itemSourceField",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"itemTypeField",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"layers",void 0),(0,i.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],ve.prototype,"listMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"maxScaleField",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"minScaleField",void 0),(0,i.Cg)([(0,p.MZ)({value:"CatalogLayer",type:["CatalogLayer"]})],ve.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{name:"layerDefinition.orderBy",write:!0,read:!0}}}})],ve.prototype,"orderBy",void 0),(0,i.Cg)([(0,p.MZ)(me.outFields)],ve.prototype,"outFields",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ve.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],ve.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)({type:String})],ve.prototype,"typeIdField",void 0),(0,i.Cg)([(0,p.MZ)({type:[ue.A]})],ve.prototype,"types",void 0),ve=(0,i.Cg)([(0,p.$K)("esri.layers.CatalogLayer")],ve);const we=ve},47685(e,t,r){r.d(t,{Mk:()=>f,Zk:()=>p});var i=r(32198),n=r(65529),l=r(4718),o=r(91429),a=r(20816);const s=new n.bk;function u(e){return s.on("apply-edits",new WeakRef(e))}function d(e){return s.on("update-moment",new WeakRef(e))}function p(e,t,r=null,i=!1){let n=Promise.withResolvers();return i=null==t||i,s.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:n.promise}),n}const c=Symbol();function f(e){return"object"==typeof e&&!!e&&c in e}function y(e){return"object"==typeof e&&!!e&&"gdbVersion"in e}function h(e,t,r){let i=new URL(e).host,n=a.Z3.get(i),l=e=>!e||e===n;return l(t)&&l(r)||t===r}r.d(t,["w6",0,e=>{var t;let r=e,n=class extends r{static{t=c}constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{let{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:n,result:o}=e,a=t===this.url,s=null!=r&&null!=this.layerId&&r===this.layerId,u=null!=r&&this.relationships?.some(e=>e.relatedTableId===r),d=y(this),p=y(this)&&h(t,i,this.gdbVersion);if(!a||d&&!p||!s&&!u&&!n)return;let c=o.then(e=>{if(this.lastEditsEventDate=new Date,s&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,l.o8)(e)),e;let r=e.editedFeatures?.find(({layerId:e})=>e===this.layerId);if(r){let{adds:t,updates:i,deletes:n}=r.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:t?t.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],deletedFeatures:n?n.map(({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],updatedFeatures:i?i.map(({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]})):[],editedFeatures:(0,l.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,l.o8)(e.historicMoment)};return this.emit("edits",o),o}let n={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,l.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,l.o8)(e.historicMoment)};return"historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,n.historicMoment)&&this.emit("edits",n),n}).then(e=>("historicMoment"in this&&this._shouldUpdateHistoricMoment(t,i,e.historicMoment)&&(this.historicMoment=e.historicMoment),e));c.catch(()=>{}),this.emit("apply-edits",{result:c})},this._updateMomentHandler=e=>{let{serviceUrl:t,gdbVersion:r,moment:i}=e,n=t===this.url,l=y(this),o=y(this)&&h(t,r,this.gdbVersion),a=y(this)&&!h(t,this.gdbVersion,null);n&&l&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then(()=>{this.addHandles(u(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(d(this._updateMomentHandler))},()=>{})}_shouldUpdateHistoricMoment(e,t,r){return"historicMoment"in this&&this.historicMoment!==r&&(0,a.w5)(e,t)}};return(0,i.Cg)([(0,o.MZ)()],n.prototype,"lastEditsEventDate",void 0),n=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.EditBusLayer")],n),n}])},87718(e,t,r){r.d(t,{F:()=>Z,Y:()=>S});var i,n=r(32198),l=r(91429),o=r(49186),a=r(25482),s=r(93637),u=r(76369),d=r(66552),p=r(4718),c=r(50498),f=r(97552),y=r(79677);const h=new d.J({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),m=new d.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let g=i=class extends a.o{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){let{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:l,units:o,distance:a}=this;return new f.A({geometry:(0,p.o8)(r),objectIds:(0,p.o8)(l),spatialRelationship:i,timeExtent:(0,p.o8)(n),where:t,units:o,distance:a,...e})}clone(){let{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:l,units:o,distance:a}=this;return new i({geometry:(0,p.o8)(t),objectIds:(0,p.o8)(l),spatialRelationship:r,timeExtent:(0,p.o8)(n),where:e,units:o,distance:a})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],g.prototype,"where",void 0),(0,n.Cg)([(0,l.MZ)({types:c.yR,json:{write:!0}})],g.prototype,"geometry",void 0),(0,n.Cg)([(0,l.MZ)({type:h.apiValues,json:{name:"spatialRel",read:{reader:h.read},write:{allowNull:!1,writer:h.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],g.prototype,"spatialRelationship",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"distance",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],g.prototype,"objectIds",void 0),(0,n.Cg)([(0,l.MZ)({type:m.apiValues,json:{read:m.read,write:{writer:m.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"units",void 0),(0,n.Cg)([(0,l.MZ)({type:y.A,json:{write:!0}})],g.prototype,"timeExtent",void 0),g=i=(0,n.Cg)([(0,l.$K)("esri.layers.support.FeatureFilter")],g);const v=g;var b;const w={read:{reader:u.LF},write:{writer:u.M9,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},C={read:{reader:u.LF},write:{writer:u.M9,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},M={name:"showExcludedLabels",default:!0};let x=b=class extends a.o{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){let r=super.write(e,t);if(t?.origin){if(r.filter){let e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new o.A("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new o.A("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new b({filter:null==this.filter?null:this.filter.clone(),includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n.Cg)([(0,l.MZ)({type:v,json:{write:{allowNull:!0,writer(e,t,r,i){let n=e?.write({},i);n&&0!==Object.keys(n).length?(0,s.sM)(r,n,t):(0,s.sM)(r,null,t)}}}})],x.prototype,"filter",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:u.LF,write:{writer:u.M9,allowNull:!0},origins:{"web-map":w,"portal-item":w}}})],x.prototype,"includedEffect",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:u.LF,write:{writer:u.M9,allowNull:!0},origins:{"web-map":C,"portal-item":C}}})],x.prototype,"excludedEffect",void 0),(0,n.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":M,"portal-item":M}}})],x.prototype,"excludedLabelsVisible",void 0),x=b=(0,n.Cg)([(0,l.$K)("esri.layers.support.FeatureEffect")],x);const F={write:{allowNull:!0}},S={type:x,json:{origins:{"web-map":F,"portal-item":F}}},Z=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.featureEffect=null}};return(0,n.Cg)([(0,l.MZ)(S)],r.prototype,"featureEffect",void 0),r=(0,n.Cg)([(0,l.$K)("esri.layers.mixins.FeatureEffectLayer")],r),r}},32756(e,t,r){r.d(t,{Rr:()=>a});var i=r(32198),n=r(93637),l=r(91429),o=r(91880);function a(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let n=new o.A;return n.read(i,r),[n]}const s={type:[o.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){let l=e.find(e=>!!e.field);l&&(0,n.sM)(r,[l.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,l.MZ)(s)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,l.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,s])},29005(e,t,r){r.d(t,{A:()=>u});var i=r(32198),n=r(69540),l=r(66552),o=r(25482),a=r(91429);const s=new l.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:s.read,write:s.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,a.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>p});var i=r(32198),n=r(69540),l=r(25482),o=r(91429),a=r(8631),s=r(29005),u=r(36005),d=r(43937);let p=class extends((0,n.OU)(l.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,a.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"id",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],p.prototype,"domains",void 0),(0,i.Cg)([(0,u.w)("domains")],p.prototype,"readDomains",null),(0,i.Cg)([(0,d.K)("domains")],p.prototype,"writeDomains",null),(0,i.Cg)([(0,o.MZ)({type:[s.A],json:{write:!0}})],p.prototype,"templates",void 0),p=(0,i.Cg)([(0,o.$K)("esri.layers.support.FeatureType")],p)},30279(e,t,r){r.d(t,{A:()=>u});var i=r(32198),n=r(69540),l=r(25482),o=r(10107),a=r(64108),s=r(39663);let u=class extends((0,n.OU)(l.o)){constructor(e){super(e),this.alias=null,this.name=void 0,this.fieldFormat=null}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"alias",void 0),(0,i.Cg)([(0,o.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],u.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({types:s.fg,json:{write:!0}})],u.prototype,"fieldFormat",void 0),u=(0,i.Cg)([(0,a.$)("esri.layers.support.FieldConfiguration")],u)},46499(e,t,r){r.d(t,{A:()=>F});var i,n,l=r(32198),o=(r(44208),r(66552)),a=r(25482),s=r(4718),u=r(90629),d=r(91429),p=r(90360),c=r(73913),f=r(32730),y=r(77548),h=r(59868),m=r(73838),g=r(33910),v=r(36005),b=r(43937);const w=new o.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function C(e,t,r){return{enabled:!(0,y.TU)(r?.layer)}}function M(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function x(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let F=class extends a.o{static{i=f.vK}static{n=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),n=i[3],l=r(t[i[4]],i[5],i[6]);switch(n){case"AND":return e&&l;case"OR":return e||l}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=h.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,f.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,f.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&M(i))e=new c.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let n=e.toJSON(i);n.expression&&(t[r]=n)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,f.XJ)(this)}getLabelExpressionArcade(){return(0,f.BI)(this)}getLabelExpressionSingleField(){return(0,f.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new n({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,s.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,s.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,l.Cg)([(0,d.MZ)({type:String,json:{write:!0}})],F.prototype,"name",void 0),(0,l.Cg)([(0,d.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:C}}}}})],F.prototype,"allowOverrun",void 0),(0,l.Cg)([(0,d.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:C}}}}})],F.prototype,"deconflictionStrategy",void 0),(0,l.Cg)([(0,d.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&x(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],F.prototype,"labelExpression",void 0),(0,l.Cg)([(0,v.w)("labelExpression")],F.prototype,"readLabelExpression",null),(0,l.Cg)([(0,b.K)("labelExpression")],F.prototype,"writeLabelExpression",null),(0,l.Cg)([(0,d.MZ)({type:c.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return M(e)||x(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],F.prototype,"labelExpressionInfo",void 0),(0,l.Cg)([(0,b.K)("labelExpressionInfo")],F.prototype,"writeLabelExpressionInfo",null),(0,l.Cg)([(0,d.MZ)({type:w.apiValues,json:{type:w.jsonValues,read:w.read,write:w.write}})],F.prototype,"labelPlacement",void 0),(0,l.Cg)([(0,d.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],F.prototype,"offsetDistance",void 0),(0,l.Cg)([(0,d.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],F.prototype,"labelPosition",void 0),(0,l.Cg)([(0,d.MZ)({type:Number})],F.prototype,"maxScale",void 0),(0,l.Cg)([(0,b.K)("maxScale")],F.prototype,"writeMaxScale",null),(0,l.Cg)([(0,d.MZ)({type:Number})],F.prototype,"minScale",void 0),(0,l.Cg)([(0,b.K)("minScale")],F.prototype,"writeMinScale",null),(0,l.Cg)([(0,d.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:C}}}}})],F.prototype,"repeatLabel",void 0),(0,l.Cg)([(0,d.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:C}}}}})],F.prototype,"repeatLabelDistance",null),(0,l.Cg)([(0,d.MZ)({types:g.em,json:{types:g.em,origins:{"portal-item":{types:g.em,read:{reader:(0,p.C)({types:g.em})},default:null},"web-scene":{types:g.Rv,read:{reader:(0,p.C)({types:g.Rv})},write:m.oO,default:null}},write:m.oO,default:null}})],F.prototype,"symbol",void 0),(0,l.Cg)([(0,d.MZ)({type:Boolean,json:{write:!0}})],F.prototype,"useCodedValues",void 0),(0,l.Cg)([(0,d.MZ)({type:String,json:{write:!0}})],F.prototype,"where",void 0),F=n=(0,l.Cg)([(0,d.$K)("esri.layers.support.LabelClass")],F)},73913(e,t,r){r.d(t,{A:()=>d});var i,n=r(32198),l=r(25482),o=r(91429),a=r(32730),s=r(36005),u=r(43937);let d=class extends l.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,a.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,a.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],d.prototype,"name",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],d.prototype,"expression",void 0),(0,n.Cg)([(0,s.w)("expression",["expression","value"])],d.prototype,"readExpression",null),(0,n.Cg)([(0,u.K)("expression")],d.prototype,"writeExpression",null),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],d.prototype,"title",void 0),(0,n.Cg)([(0,o.MZ)({json:{read:!1,write:!1}})],d.prototype,"value",void 0),d=i=(0,n.Cg)([(0,o.$K)("esri.layers.support.LabelExpressionInfo")],d)},91880(e,t,r){r.d(t,{A:()=>u});var i,n=r(32198),l=r(66552),o=r(25482),a=r(91429);const s=new l.J({asc:"ascending",desc:"descending"});let u=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,n.Cg)([(0,a.MZ)({type:s.apiValues,json:{type:s.jsonValues,read:s.read,write:s.write}})],u.prototype,"order",void 0),u=i=(0,n.Cg)([(0,a.$K)("esri.layers.support.OrderByInfo")],u)},41560(e,t,r){r.d(t,{Ch:()=>o,mW:()=>l});var i=r(34727),n=r(39516);function l(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){let l=function(e){if("manual"===u(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],d(r)),t[1]=Math.min(t[1],p(i));return t}(e);if(l&&((0,i.gg)(t,l[0])||(0,i.ZH)(r,l[1])))return"";let o=Array.from(a(e,t,r)),s=function(e,t,r){if(0===e.length)return!0;let n=d(e.at(0)?.minScale),l=p(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(l,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],n=e[t+1];if((0,i.ZH)(d(n.minScale),p(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return s&&"1=1"!==s?s:""}function*a(e,t,r){if("manual"===u(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let i of e.filters)s(i.minScale,i.maxScale,t,r)&&(yield i)}}function s(e,t,r,n){return e=d(e),r=d(r),t=p(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function d(e){return e||1/0}function p(e){return e||0}},16194(e,t,r){r.d(t,{QX:()=>s,sS:()=>d,xY:()=>u});var i=r(4718),n=r(30279),l=r(39663),o=r(30524),a=r(41227);function s(e){let{popupTemplate:t,fieldsIndex:r}=e,i=t?.fieldInfos;if(!i?.length||!r)return;let o=[];for(let e of i){let{fieldName:t,label:i}=e,a=r.get(t);if(!a)continue;let s=i&&i!==a.alias?i:null,u=(0,l.iu)(e,a);(s||u)&&o.push(new n.A({name:a.name,alias:s,fieldFormat:u}))}return o.length?o:null}function u(e){let{fields:t}=e;if(!t?.length)return;let r=[];for(let e of t){let t=(0,l.qH)(e)?(0,l.$P)(e):null;t&&r.push(new n.A({name:e.name,fieldFormat:t}))}return r.length?r:null}function d(e,t){let{popupTemplate:r,fieldsIndex:n}=e;if(!r||!n)return;let o=function(e,t,r){t??=[],r=(0,i.o8)(r)??[];let n=!1,o=new Map;for(let r of t){let t=e.fieldsIndex.get(r.name);t&&o.set(t.name,r)}for(let t of r){let r=e.fieldsIndex.get(t.fieldName);if(!r)continue;let i=o.get(r.name);t.label=i?.alias||r.alias,t.format=(0,l.qH)(r)&&i?.fieldFormat?(0,l.PK)(i.fieldFormat,r):null,n=!0,o.delete(r.name)}for(let t of o.values()){let i=p(e,t);i&&(r.push(i),n=!0)}return n?r:null}(e,t,r.fieldInfos);if(!o)return;let a=r.clone();return a.fieldInfos=o,a}function p(e,t){let{name:r,alias:i,fieldFormat:n}=t,s=e.fieldsIndex.get(r);if(!s||!i&&!n)return;let u=i||s.alias,d=(0,l.qH)(s)&&n?(0,l.PK)(n,s):null;return new a.A({fieldName:s.name,label:u,format:d,visible:!1,isEditable:(0,o.R$)(s,e)})}},39383(e,t,r){r.d(t,{w:()=>s,z:()=>p});var i=r(49186),n=r(53966),l=r(46499);const o=()=>n.A.getLogger("esri.layers.support.labelingInfo"),a=/\[([^[\]]+)\]/gi;function s(e,t,r){return e?e.map(e=>{let i=new l.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const u=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],d={esriGeometryPoint:u,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:u,esriGeometryEnvelope:null};function p(e,t){let r=[];for(let n of e){let e=n.labelPlacement,l=d[t];if(!n.symbol)return o().warn("No ILabelClass symbol specified."),[];if(!l)return o().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(l.includes(e))r.push(n);else{let i=l[0];e&&o().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let a=n.clone();a.labelPlacement=i,r.push(a)}}return r}},73681(e,t,r){r.d(t,{n:()=>s});var i=r(49186),n=r(53966),l=r(46140),o=r(95466),a=r(55674);class s{static async from(e,t,r){let o=e.dictionary_version?l.A.parse(e.dictionary_version):null,d=new Set(e.itemsNames),p={};if(t)for(let e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);let c=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))c.delete(e);c.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});let f=await(0,a.xR)(e.expression,null,p);if(!f)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let y=!o||!o.greaterEqual(4,0);y&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});let h=new u(r,y);return new s(y,d,f,h)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},96520(e,t,r){r.d(t,{u:()=>s});var i=r(86211),n=r(21325),l=r(52006);function o(e,t,r){if(null==e.hasM||e.hasZ)for(let e of t)for(let t of e)t.length>2&&(t[2]*=r)}function a(e,t,r){if(null==e.hasM||e.hasZ)for(let e of t)for(let t of e){let e=(0,l.yP)(t);e.length>2&&(e[2]*=r)}}function s(e,t,r){if(!e&&!t||!r)return;let n=(0,i.G9)(r);u(e,r,n),u(t,r,n)}function u(e,t,r){if(e)for(let i of e)d(i.geometry,t,r)}function d(e,t,r){if(!e?.spatialReference||(0,n.aI)(e.spatialReference,t))return;let l=(0,i.G9)(e.spatialReference)/r;if(1!==l)if("x"in e)null!=e.z&&(e.z*=l);else if("curveRings"in e)a(e,e.curveRings,l);else if("curvePaths"in e)a(e,e.curvePaths,l);else if("rings"in e)o(e,e.rings,l);else if("paths"in e)o(e,e.paths,l);else if("points"in e&&(null==e.hasM||e.hasZ))for(let t of e.points)t.length>2&&(t[2]*=l)}},9760(e,t,r){r.d(t,{A:()=>d});var i=r(32198),n=r(66552),l=r(25482),o=r(91429),a=r(93223);const s=new n.J({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),u=new n.J({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let d=class extends l.o{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,i.Cg)([(0,a.e)({classBreaksDef:"class-breaks-definition"})],d.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"breakCount",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"classificationField",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{read:s.read,write:s.write}})],d.prototype,"classificationMethod",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"normalizationType",void 0),(0,i.Cg)([(0,o.MZ)({value:null,json:{write:!0}})],d.prototype,"standardDeviationInterval",null),(0,i.Cg)([(0,o.MZ)({value:null,json:{write:!0}})],d.prototype,"definedInterval",null),d=(0,i.Cg)([(0,o.$K)("esri.rest.support.ClassBreaksDefinition")],d)},22671(e,t,r){r.d(t,{A:()=>v});var i,n=r(32198),l=r(52106),o=r(66552),a=r(25482),s=r(4718),u=r(91429),d=r(16930),p=r(60408),c=r(65864),f=r(50498),y=r(20437),h=r(36005),m=r(43937);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends a.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,l.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);let{features:n}=this;if(n)for(let e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=d.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,s.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,n]}=e,l=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=l.length;e<t;e++)o?.(l[e].geometry)||(l.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,n],scale:[l,o]}=r,a=null,s=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;s=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*l+i,e=>n-e*o,a,s);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=d.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){let l=e[t],o=r.fromJSON(l),a=l.geometry?.spatialReference;null!=o.geometry&&!a&&(o.geometry.spatialReference=i);let s=l.aggregateGeometries,u=o.aggregateGeometries;if(s&&null!=u)for(let e in u){let t=u[e],r=s[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n,l=[];for(let o=0,a=e.length;o<a;o++){let a=e[o];if(o>0){let e=t(a[0]),o=r(a[1]);(e!==i||o!==n)&&(l.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),l.push([i,n])}return l.length>0?l:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,p.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,l=i.length;e<l;e++){let l=i[e],o=this._quantizePoints(l,t,r);o&&n.push(o)}return n.length>0?((0,p.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let l,o,a=(0,p.Bi)(e)?e.rings:e.paths;for(let e=0,i=a.length;e<i;e++){let i=a[e];for(let e=0,n=i.length;e<n;e++){let n=i[e];e>0?(l+=n[0],o+=n[1]):(l=n[0],o=n[1]),n[0]=t(l),n[1]=r(o)}}if(i&&n)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=a.length;e<t;e++){let t=a[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{let l,o,a=e.points;for(let e=0,i=a.length;e<i;e++){let i=a[e];e>0?(l+=i[0],o+=i[1]):(l=i[0],o=i[1]),i[0]=t(l),i[1]=r(o)}if(i&&n)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=i(t[2])}else if(n)for(let e=0,t=a.length;e<t;e++){let t=a[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[l.A],json:{write:!0}})],v.prototype,"features",void 0),(0,n.Cg)([(0,h.w)("features")],v.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,n.Cg)([(0,m.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,h.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:d.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,m.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,n.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},84892(e,t,r){r.d(t,{t:()=>l});var i=r(53966);function n(e,t){return Number(e.toFixed(t))}function l(e,t){let{normalizationTotal:r}=e;return{classBreaks:o(e,t),normalizationTotal:r}}function o(e,t){let r=e.definition,{classificationMethod:i,normalizationType:l,definedInterval:o}=r,u=r.breakCount??1,d=[],p=e.values;if(0===p.length)return[];p=p.sort((e,t)=>e-t);let[c,f]=t??[p.at(0),p.at(-1)];if("equal-interval"===i)if(p.length>=u){let e=(f-c)/u,t=c;for(let r=1;r<u;r++){let i=n(c+r*e,6);d.push({minValue:t,maxValue:i,label:a(t,i,l)}),t=i}d.push({minValue:t,maxValue:f,label:a(t,f,l)})}else p.forEach(e=>{d.push({minValue:e,maxValue:e,label:a(e,e,l)})});else if("natural-breaks"===i){let t=function(e){let t=[],r=[],i=Number.MIN_VALUE,n=1,l=-1;for(let o=0;o<e.length;o++){let a=e[o];a===i?(n++,r[l]=n):null!==a&&(t.push(a),i=a,n=1,r.push(n),l++)}return{uniqueValues:t,valueFrequency:r}}(p),r=e.valueFrequency||t.valueFrequency,i=s(t.uniqueValues,r,u),o=c;for(let e=1;e<u;e++)if(t.uniqueValues.length>e){let r=n(t.uniqueValues[i[e]],6);d.push({minValue:o,maxValue:r,label:a(o,r,l)}),o=r}d.push({minValue:o,maxValue:f,label:a(o,f,l)})}else if("quantile"===i)if(p.length>=u&&c!==f){let e=c,t=Math.ceil(p.length/u),r=0;for(let i=1;i<u;i++){let n=t+r-1;n>p.length&&(n=p.length-1),n<0&&(n=0),d.push({minValue:e,maxValue:p[n],label:a(e,p[n],l)}),e=p[n],r+=t,t=Math.ceil((p.length-r)/(u-i))}d.push({minValue:e,maxValue:f,label:a(e,f,l)})}else{let e=-1;for(let t=0;t<p.length;t++){let r=p[t];r!==e&&(e=r,d.push({minValue:e,maxValue:r,label:a(e,r,l)}),e=r)}}else if("standard-deviation"===i){let e=function(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r];return t/=e.length,t}(p),t=function(e,t){let r=0;for(let i=0;i<e.length;i++){let n=e[i];r+=(n-t)*(n-t)}return r/=e.length,Math.sqrt(r)}(p,e);if(0===t)d.push({minValue:p[0],maxValue:p[0],label:a(p[0],p[0],l)});else{let r=function(e,t,r,i,n){let l=Math.max(i-e,t-i)/n/r;return l=l>=1?1:l>=.5?.5:.25,l}(c,f,u,e,t)*t,i=0,o=c;for(let t=u;t>=1;t--){let s=n(e-(t-.5)*r,6);d.push({minValue:o,maxValue:s,label:a(o,s,l)}),o=s,i++}let s=n(e+.5*r,6);d.push({minValue:o,maxValue:s,label:a(o,s,l)}),o=s,i++;for(let t=1;t<=u;t++)s=i===2*u?f:n(e+(t+.5)*r,6),d.push({minValue:o,maxValue:s,label:a(o,s,l)}),o=s,i++}}else if("defined-interval"===i){if(!o)return d;let[e,r]=t??[p.at(0),p.at(-1)],i=Math.ceil((r-e)/o),s=e;for(let t=1;t<i;t++){let r=n(e+t*o,6);d.push({minValue:s,maxValue:r,label:a(s,r,l)}),s=r}d.push({minValue:s,maxValue:r,label:a(s,r,l)})}return d}function a(e,t,r){let i=null;return i=e===t?r&&"percent-of-total"===r?e+"%":e.toString():r&&"percent-of-total"===r?e+"% - "+t+"%":e+" - "+t,i}function s(e,t,r){let i=e.length,n=[];r>i&&(r=i);for(let e=0;e<r;e++)n.push(Math.round(e*i/r-1));n.push(i-1);let l=u(n,e,t,r);return function(e,t,r,i,n,l){let o=0,a=0,s=0,u=0,p=!0;for(let c=0;c<2&&p;c++){0===c&&(p=!1);for(let c=0;c<l-1;c++)for(;r[c+1]+1!==r[c+2];){r[c+1]=r[c+1]+1;let l=d(c,r,i,n);s=l.sbMean,o=l.sbSdcm;let f=d(c+1,r,i,n);if(u=f.sbMean,a=f.sbSdcm,!(o+a<t[c]+t[c+1])){r[c+1]=r[c+1]-1;break}t[c]=o,t[c+1]=a,e[c]=s,e[c+1]=u,p=!0}for(let c=l-1;c>0;c--)for(;r[c]!==r[c-1]+1;){r[c]=r[c]-1;let l=d(c-1,r,i,n);s=l.sbMean,o=l.sbSdcm;let f=d(c,r,i,n);if(u=f.sbMean,a=f.sbSdcm,!(o+a<t[c-1]+t[c])){r[c]=r[c]+1;break}t[c-1]=o,t[c]=a,e[c-1]=s,e[c]=u,p=!0}}return p}(l.mean,l.sdcm,n,e,t,r)&&(l=u(n,e,t,r)),n}function u(e,t,r,i){let n=[],l=[],o=[],a=0,s=[],u=[];for(let n=0;n<i;n++){let i=d(n,e,t,r);s.push(i.sbMean),u.push(i.sbSdcm),a+=u[n]}let p,c=a,f=!0;for(;f||a<c;){f=!1,n=[];for(let t=0;t<i;t++)n.push(e[t]);for(let r=0;r<i;r++)for(let n=e[r]+1;n<=e[r+1];n++)if(p=t[n],r>0&&n!==e[r+1]&&Math.abs(p-s[r])>Math.abs(p-s[r-1]))e[r]=n;else if(r<i-1&&e[r]!==n-1&&Math.abs(p-s[r])>Math.abs(p-s[r+1])){e[r+1]=n-1;break}c=a,a=0,l=[],o=[];for(let n=0;n<i;n++){l.push(s[n]),o.push(u[n]);let i=d(n,e,t,r);s[n]=i.sbMean,u[n]=i.sbSdcm,a+=u[n]}}if(a>c){for(let t=0;t<i;t++)e[t]=n[t],s[t]=l[t],u[t]=o[t];a=c}return{mean:s,sdcm:u}}function d(e,t,r,n){let l=0,o=0;for(let i=t[e]+1;i<=t[e+1];i++){let e=n[i];l+=r[i]*e,o+=e}o<=0&&i.A.getLogger("esri.rest.support.generateRendererUtils").warn("Exception in Natural Breaks calculation");let a=l/o,s=0;for(let i=t[e]+1;i<=t[e+1];i++)s+=n[i]*(r[i]-a)**2;return{sbMean:a,sbSdcm:s}}},1873(e,t,r){r.d(t,{$y:()=>O,Ak:()=>V,FM:()=>y,G_:()=>c,Rw:()=>A,Vb:()=>d,b3:()=>E,gJ:()=>u,jM:()=>_,lv:()=>j,oZ:()=>I,qg:()=>f,sU:()=>P,z9:()=>p,zS:()=>L});var i=r(9760),n=r(84892);const l=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,o=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),a=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),s=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function u(e){return null==e||"string"==typeof e&&!e?"<Null>":e}function d(e){let t=null!=e.normalizationField||null!=e.normalizationType,r=null!=e.minValue||null!=e.maxValue,i=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!r&&!i}function p(e){let{outStatisticTypes:t}=e,r=e.returnDistinct?[...new Set(e.values)]:e.values,i=r.filter(e=>null!=e).sort(),n=i.length,l={count:n,min:i[0],max:i[n-1]};return e.supportsNullCount&&(l.nullcount=r.length-n),e.percentileParams&&(!t?.include?.length||t.include.includes("median"))&&(!t?.exclude?.length||!t.exclude.includes("median"))&&(l.median=f(r,e.percentileParams)),l}function c(e){let{values:t,useSampleStdDev:r,supportsNullCount:i,outStatisticTypes:n}=e,l=1/0,o=-1/0,a=null,s=null,u=null,d=null,p=0,c=null==e.minValue?-1/0:e.minValue,y=null==e.maxValue?1/0:e.maxValue;for(let e of t)Number.isFinite(e)?e>=c&&e<=y&&(a=null===a?e:a+e,l=Math.min(l,e),o=Math.max(o,e),p++):"string"==typeof e&&p++;if(p&&null!=a){s=a/p;let e=0;for(let r of t)Number.isFinite(r)&&r>=c&&r<=y&&(e+=(r-s)**2);d=r?p>1?e/(p-1):0:p>0?e/p:0,u=Math.sqrt(d)}else l=null,o=null;let h={avg:s,count:p,max:o,min:l,stddev:u,sum:a,variance:d};return i&&(h.nullcount=t.length-p),e.percentileParams&&(!n?.include?.length||n.include.includes("median"))&&(!n?.exclude?.length||!n.exclude.includes("median"))&&(h.median=f(t,e.percentileParams)),h}function f(e,t){let{fieldType:r,value:i,orderBy:n,isDiscrete:l}=t,o=y(r,"desc"===n,"case-insensitive");if(e=[...e].filter(e=>null!=e).sort((e,t)=>o(e,t)),0===e.length)return null;if(i<=0)return e[0];if(i>=1)return e[e.length-1];let a=(e.length-1)*i,s=Math.floor(a),u=s+1,d=a%1,p=e[s],c=e[u];return u>=e.length||l||"string"==typeof p||"string"==typeof c?p:p*(1-d)+c*d}function y(e,t,r="case-sensitive"){if(e){if(o.has(e))return S(t);if(a.has(e))return M(t,!0);if("esriFieldTypeTimestampOffset"===e)return function(e){return e?b:v}(t);let i=M(t,"case-sensitive"===r);if("esriFieldTypeString"===e)return i;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,t)=>i(Z(e),Z(t))}let i=t?1:-1,n=S(t),l=M(t,"case-sensitive"===r),s=g(t);return(e,t)=>"number"==typeof e&&"number"==typeof t?n(e,t):"string"==typeof e&&"string"==typeof t?l(e,t):s(e,t)??i}const h=(e,t)=>null==e?null==t?0:1:null==t?-1:null,m=(e,t)=>null==e?null==t?0:-1:null==t?1:null;function g(e){return e?h:m}const v=(e,t)=>m(e,t)??(e===t?0:new Date(e).getTime()-new Date(t).getTime()),b=(e,t)=>h(e,t)??(e===t?0:new Date(t).getTime()-new Date(e).getTime()),w=(e,t)=>m(e,t)??(e===t?0:e<t?-1:1),C=(e,t)=>h(e,t)??(e===t?0:e<t?1:-1);function M(e,t){if(t)return e?C:w;let r=g(e);return e?(e,t)=>r(e,t)??((e=e.toUpperCase())>(t=t.toUpperCase())?-1:+(e<t)):(e,t)=>r(e,t)??((e=e.toUpperCase())<(t=t.toUpperCase())?-1:+(e>t))}const x=(e,t)=>h(e,t)??t-e,F=(e,t)=>m(e,t)??e-t;function S(e){return e?x:F}function Z(e){return e.slice(24,36)+e.slice(19,23)+e.slice(16,18)+e.slice(14,16)+e.slice(11,13)+e.slice(9,11)+e.slice(6,8)+e.slice(4,6)+e.slice(2,4)+e.slice(0,2)}function I(e,t,r){let i;for(i in e)t?.include?.length&&!t.include.includes(i)||t?.exclude?.length&&t.exclude.includes(i)?delete e[i]:s.includes(i)&&(Number.isFinite(e[i])||(e[i]=null));return r&&["avg","stddev","variance"].forEach(t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))}),e}function E(e){let t={};for(let r of e)(null==r||"string"==typeof r&&""===r.trim())&&(r=null),null==t[r]?t[r]={count:1,data:r}:t[r].count++;return{count:t}}function T(e){return"coded-value"===e?.type?e.codedValues.map(e=>e.code):[]}function j(e,t,r,i){let n=e.count,l=[];if(r&&t){let e=[],r=T(t[0]);for(let n of r)if(t[1]){let r=T(t[1]);for(let l of r)if(t[2]){let r=T(t[2]);for(let t of r)e.push(`${u(n)}${i}${u(l)}${i}${u(t)}`)}else e.push(`${u(n)}${i}${u(l)}`)}else e.push(n);for(let t of e)n.hasOwnProperty(t)||(n[t]={data:t,count:0})}for(let e in n){let t=n[e];l.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:l}}function L(e,t,r,i){let n=null;switch(t){case"log":0!==e&&(n=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(i)&&0!==i&&(n=e/i*100);break;case"field":Number.isFinite(r)&&0!==r&&(n=e/r);break;case"natural-log":e>0&&(n=Math.log(e));break;case"square-root":e>0&&(n=e**.5)}return n}function A(e,t,r){let l=function(e){let{breakCount:t,field:r,normalizationField:n,normalizationType:l}=e,o=e.classificationMethod||"equal-interval",a="standard-deviation"===o?e.standardDeviationInterval||1:void 0,s="defined-interval"===o?e.definedInterval:void 0;return new i.A({breakCount:t,classificationField:r,classificationMethod:o,normalizationField:"field"===l?n:void 0,normalizationType:l,standardDeviationInterval:a,definedInterval:s})}({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,definedInterval:t.definedInterval,breakCount:t.numClasses||5});return e=function(e,t,r){let i=t??-1/0,n=r??1/0;return e.filter(e=>Number.isFinite(e)&&e>=i&&e<=n)}(e,t.minValue,t.maxValue),(0,n.t)({definition:l,values:e,normalizationTotal:t.normalizationTotal},r)}function _(e,t){let r=e.classBreaks,i=r.length,n=r[0]?.minValue,o=r[i-1]?.maxValue,a="standard-deviation"===t,s=l;return r=r.map(e=>{let t=e.label,r={minValue:e.minValue,maxValue:e.maxValue,label:t};if(a&&t){let e=t.match(s)?.map(e=>+e.trim())??[];2===e.length?(r.minStdDev=e[0],r.maxStdDev=e[1],e[0]<0&&e[1]>0&&(r.hasAvg=!0)):1===e.length&&(t.includes("<")?(r.minStdDev=null,r.maxStdDev=e[0]):t.includes(">")&&(r.minStdDev=e[0],r.maxStdDev=null))}return r}),{minValue:n,maxValue:o,classBreakInfos:r,normalizationTotal:e.normalizationTotal}}function O(e,t){let r=P(e,t);if(null==r.min&&null==r.max)return{bins:[],minValue:r.min,maxValue:r.max,normalizationTotal:t.normalizationTotal};let i=r.intervals,n=r.min??0,l=r.max??0,o=i.map((e,t)=>({minValue:i[t][0],maxValue:i[t][1],count:0}));for(let t of e)if(null!=t&&t>=n&&t<=l){let e=V(i,t);e>-1&&o[e].count++}return{bins:o,minValue:n,maxValue:l,normalizationTotal:t.normalizationTotal}}function P(e,t,r=!1){let{field:i,classificationMethod:n,standardDeviationInterval:l,definedInterval:o,normalizationType:a,normalizationField:s,normalizationTotal:u,minValue:p,maxValue:f}=t,y=t.numBins||10,h=null,m=null,g=null;if(n&&"equal-interval"!==n||a){let{classBreaks:t}=A(e,{field:i,normalizationType:a,normalizationField:s,normalizationTotal:u,classificationMethod:n,standardDeviationInterval:l,definedInterval:o,minValue:p,maxValue:f,numClasses:y},null!=p&&null!=f?[p,f]:void 0);h=t[0]?.minValue,m=t[t.length-1]?.maxValue,g=t.map(e=>[e.minValue,e.maxValue])}else{if(null!=p&&null!=f)h=p,m=f;else{let t=c({values:e,minValue:p,maxValue:f,useSampleStdDev:!a,supportsNullCount:d({normalizationType:a,normalizationField:s,minValue:p,maxValue:f})});h=t.min??null,m=t.max??null}g=function(e,t,r){let i,n=(t-e)/r,l=[],o=e;for(let e=1;e<=r;e++)i=o+n,i=Number(i.toFixed(16)),l.push([o,e===r?t:i]),o=i;return l}(h??0,m??0,y)}if(r&&g.length){let e=g.at(-1)[1];g.push([e,e])}return{min:h,max:m,intervals:g}}function V(e,t){let r=-1;for(let i=e.length-1;i>=0;i--)if(t>=e[i][0]){r=i;break}return r}},20816(e,t,r){r.d(t,{We:()=>a,ZJ:()=>s,w5:()=>u});var i=r(56507);const n=(0,r(13069).vD)(),l=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;let n=new URL(e).host,o=l.get(n);if(!o){let t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function s(e,t,i=!1){if(!e||!t)return!0;let l=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(l)?.entries();if(a)for(let[e,o]of a)if(o.name===t){let t=!o.stack?.hasForwardEdits();if(!t&&i){let[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(2186).then(()=>r(32186)),r.e(2558).then(()=>r(32558))]),a=await t(l,e,new i({sessionId:n,moment:o.moment}));return a.success&&o.stack?.clearForwardEdits(),a.success}return t}return!0}function u(e,t){if(!e)return!1;let r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(let[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map,r.d(t,["TA",0,n,"Z3",0,l])}}]);