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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/02120d192eafd7612475.js +1 -0
  3. package/assets/esri/core/workers/chunks/{4d967e98d229f18d61f5.js → 09e8babe75407c2e64c4.js} +1 -1
  4. package/assets/esri/core/workers/chunks/0beebbb0c6dad0e742d7.js +1 -0
  5. package/assets/esri/core/workers/chunks/0d8ca51043c7784aed96.js +1 -0
  6. package/assets/esri/core/workers/chunks/112e89da628bdea5355c.js +1 -0
  7. package/assets/esri/core/workers/chunks/{5e9edd06e624f385fa4b.js → 121a9e148509f2fe2210.js} +1 -1
  8. package/assets/esri/core/workers/chunks/1856d16d738f44f58084.js +1 -0
  9. package/assets/esri/core/workers/chunks/{0526d623d0b4c12929bd.js → 18ab9cc85a1a7988fdfd.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{7c960a2694c4c3123acf.js → 1a36703ebe934749646e.js} +1 -1
  11. package/assets/esri/core/workers/chunks/24a0cf405195421c0d06.js +1 -0
  12. package/assets/esri/core/workers/chunks/24ff267cf253feac22de.js +1 -0
  13. package/assets/esri/core/workers/chunks/{3c8613596659801fd6ab.js → 29cab345819ec02ed60a.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{169a61c6e128b8a16021.js → 2c560a075d9ef2069ed1.js} +1 -1
  15. package/assets/esri/core/workers/chunks/2f8e71dac98135bbc3e6.js +1 -0
  16. package/assets/esri/core/workers/chunks/341fb51b2165522963b3.js +1 -0
  17. package/assets/esri/core/workers/chunks/{ad8e0f82cb1feafa9e2f.js → 36ab90fb34b9716a9983.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{2688213bbff536da7917.js → 3ea0b872436fce84b927.js} +1 -1
  19. package/assets/esri/core/workers/chunks/40633064c290dc2af9ea.js +1 -0
  20. package/assets/esri/core/workers/chunks/42ec4c80b0c2944cd65c.js +1 -0
  21. package/assets/esri/core/workers/chunks/44b870cb53ba68b17c32.js +1 -0
  22. package/assets/esri/core/workers/chunks/{8a7fa4e8b0d14da7c9eb.js → 4cc680fe4c9c39d2f853.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{6730c9f0890191a95fdb.js → 4d81aa50d90f5701a343.js} +1 -1
  24. package/assets/esri/core/workers/chunks/4e0bf30da4281070e453.js +1 -0
  25. package/assets/esri/core/workers/chunks/4e6bf1efe3b0b474cbb4.js +1 -0
  26. package/assets/esri/core/workers/chunks/52cef7cd3aaaa4f45c94.js +1 -0
  27. package/assets/esri/core/workers/chunks/{4e04242e707c0eb3aa4a.js → 5a3ccc0a19ac8fa9e524.js} +1 -1
  28. package/assets/esri/core/workers/chunks/5e907ec0ee1565b5fbbc.js +1 -0
  29. package/assets/esri/core/workers/chunks/66ba749ab0a631bbfdec.js +1 -0
  30. package/assets/esri/core/workers/chunks/6b14d89d689a21014aec.js +1 -0
  31. package/assets/esri/core/workers/chunks/6b1856303d1562f05100.js +1 -0
  32. package/assets/esri/core/workers/chunks/{576269fd1f9049876aa1.js → 6b7b5544ed1f9a84623f.js} +1 -1
  33. package/assets/esri/core/workers/chunks/710a6268de62003af825.js +1 -0
  34. package/assets/esri/core/workers/chunks/77923afde29ae1ff10ca.js +1 -0
  35. package/assets/esri/core/workers/chunks/784ffd52315a4d55d683.js +1 -0
  36. package/assets/esri/core/workers/chunks/7cf7f2b991a7cbdad2ce.js +1 -0
  37. package/assets/esri/core/workers/chunks/{70dffbf49b0633b1a5f1.js → 8f3680fee85a05839489.js} +1 -1
  38. package/assets/esri/core/workers/chunks/97aecf210938015cc7a3.js +1 -0
  39. package/assets/esri/core/workers/chunks/{c7ebd5d431fb996bfcee.js → 9f8207c82a17508a87a8.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{557305b91f77569ce664.js → a01ffe03b1465c21b9e6.js} +1 -1
  41. package/assets/esri/core/workers/chunks/a298c9031962951e55a9.js +1 -0
  42. package/assets/esri/core/workers/chunks/{329669a9beda89b028dd.js → a5a7bbdd8298016535bc.js} +1 -1
  43. package/assets/esri/core/workers/chunks/a877a4826cd6a46ec99b.js +1 -0
  44. package/assets/esri/core/workers/chunks/ad38e456a7cee940a165.js +1 -0
  45. package/assets/esri/core/workers/chunks/adfbc168be8c49b51e1b.js +1 -0
  46. package/assets/esri/core/workers/chunks/b0526633a93ef69ec47b.js +1 -0
  47. package/assets/esri/core/workers/chunks/b99bc08a01e9250b0a31.js +1 -0
  48. package/assets/esri/core/workers/chunks/{36c4b4c3eca57417da2c.js → c260ad3434bb00ba64a7.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{39922ce232338de076ae.js → c459c8d8630eb4b955b1.js} +1 -1
  50. package/assets/esri/core/workers/chunks/c92e75b79aff7b505b31.js +1 -0
  51. package/assets/esri/core/workers/chunks/ca85e88dad30b5f2956b.js +1 -0
  52. package/assets/esri/core/workers/chunks/{8e56d40691b6bf75d7cc.js → ce409944221a784ddb61.js} +1 -1
  53. package/assets/esri/core/workers/chunks/d13f75f233cf313e5a1d.js +1 -0
  54. package/assets/esri/core/workers/chunks/d60d5f006375f7fcc88c.js +1 -0
  55. package/assets/esri/core/workers/chunks/{77958089748dc31757cf.js → d6ded127949160103f69.js} +1 -1
  56. package/assets/esri/core/workers/chunks/d8c696da42f8f8919b83.js +1 -0
  57. package/assets/esri/core/workers/chunks/{304c81f6297ecba3a324.js → d95eed98316e59f8f35d.js} +1 -1
  58. package/assets/esri/core/workers/chunks/df7267892b6e0493e1d7.js +1 -0
  59. package/assets/esri/core/workers/chunks/{52dca349e1a45555954d.js → e52d5a48e83d8df36f92.js} +1 -1
  60. package/assets/esri/core/workers/chunks/e8688b6cc3b3c1010b43.js +1 -0
  61. package/assets/esri/core/workers/chunks/e8c7cc974420c0b92d0e.js +1 -0
  62. package/assets/esri/core/workers/chunks/{b7ef554b1213307499fc.js → e93442c6d92229f3a4b0.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{ef5772ca1848d6d01b88.js → eda86faa708cfe4c9f9a.js} +1 -1
  64. package/assets/esri/core/workers/chunks/f2718e260f594537f7fd.js +1 -0
  65. package/assets/esri/core/workers/chunks/f6b7036114b1d754fdd9.js +1 -0
  66. package/assets/esri/core/workers/chunks/{c4631241dc777ca77aaa.js → f6c0680c535c5a3c73ee.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{a0ea1d3e22d52b8a59a8.js → fa6103e3d4e857b0035b.js} +9 -9
  68. package/assets/esri/core/workers/chunks/fac3e57784d7f37053af.js +1 -0
  69. package/assets/esri/geometry/support/pe-wasm.wasm +0 -0
  70. package/assets/esri/t9n/common.json +1 -1
  71. package/assets/esri/t9n/common_ar.json +1 -1
  72. package/assets/esri/t9n/common_bg.json +1 -1
  73. package/assets/esri/t9n/common_bs.json +1 -1
  74. package/assets/esri/t9n/common_ca.json +1 -1
  75. package/assets/esri/t9n/common_cs.json +1 -1
  76. package/assets/esri/t9n/common_da.json +1 -1
  77. package/assets/esri/t9n/common_de.json +1 -1
  78. package/assets/esri/t9n/common_el.json +1 -1
  79. package/assets/esri/t9n/common_en.json +1 -1
  80. package/assets/esri/t9n/common_es.json +1 -1
  81. package/assets/esri/t9n/common_et.json +1 -1
  82. package/assets/esri/t9n/common_fi.json +1 -1
  83. package/assets/esri/t9n/common_fr.json +1 -1
  84. package/assets/esri/t9n/common_he.json +1 -1
  85. package/assets/esri/t9n/common_hr.json +1 -1
  86. package/assets/esri/t9n/common_hu.json +1 -1
  87. package/assets/esri/t9n/common_id.json +1 -1
  88. package/assets/esri/t9n/common_it.json +1 -1
  89. package/assets/esri/t9n/common_ja.json +1 -1
  90. package/assets/esri/t9n/common_ko.json +1 -1
  91. package/assets/esri/t9n/common_lt.json +1 -1
  92. package/assets/esri/t9n/common_lv.json +1 -1
  93. package/assets/esri/t9n/common_nb.json +1 -1
  94. package/assets/esri/t9n/common_nl.json +1 -1
  95. package/assets/esri/t9n/common_pl.json +1 -1
  96. package/assets/esri/t9n/common_pt-BR.json +1 -1
  97. package/assets/esri/t9n/common_pt-PT.json +1 -1
  98. package/assets/esri/t9n/common_ro.json +1 -1
  99. package/assets/esri/t9n/common_ru.json +1 -1
  100. package/assets/esri/t9n/common_sk.json +1 -1
  101. package/assets/esri/t9n/common_sl.json +1 -1
  102. package/assets/esri/t9n/common_sr.json +1 -1
  103. package/assets/esri/t9n/common_sv.json +1 -1
  104. package/assets/esri/t9n/common_th.json +1 -1
  105. package/assets/esri/t9n/common_tr.json +1 -1
  106. package/assets/esri/t9n/common_uk.json +1 -1
  107. package/assets/esri/t9n/common_vi.json +1 -1
  108. package/assets/esri/t9n/common_zh-CN.json +1 -1
  109. package/assets/esri/t9n/common_zh-HK.json +1 -1
  110. package/assets/esri/t9n/common_zh-TW.json +1 -1
  111. package/assets/esri/themes/base/widgets/_DirectionalPad.scss +2 -1
  112. package/assets/esri/themes/base/widgets/_FeatureForm.scss +0 -1
  113. package/assets/esri/themes/dark/main.css +1 -1
  114. package/assets/esri/themes/light/main.css +1 -1
  115. package/assets/esri/themes/light/view.css +1 -1
  116. package/chunks/pe-wasm.js +1 -1
  117. package/config.js +1 -1
  118. package/core/pbf.js +1 -1
  119. package/geometry/support/WKIDUnitConversion.js +1 -1
  120. package/geometry/support/plane.js +1 -1
  121. package/interfaces.d.ts +37 -39
  122. package/kernel.js +1 -1
  123. package/layers/GroupLayer.js +1 -1
  124. package/layers/SceneLayer.js +1 -1
  125. package/layers/graphics/data/QueryEngine.js +1 -1
  126. package/layers/graphics/data/QueryEngineResult.js +1 -1
  127. package/layers/graphics/editingSupport.js +1 -1
  128. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  129. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  130. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  131. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  132. package/layers/mixins/OperationalLayer.js +1 -1
  133. package/layers/save/featureLayerUtils.js +1 -1
  134. package/layers/save/groupLayerUtils.js +5 -0
  135. package/layers/save/utils.js +1 -1
  136. package/layers/support/LayerLoadContext.js +5 -0
  137. package/layers/support/featureLayerUtils.js +1 -1
  138. package/layers/support/labelFormatUtils.js +1 -1
  139. package/layers/support/layersCreator.js +1 -1
  140. package/layers/support/versionUtils.js +1 -1
  141. package/networks/UtilityNetwork.js +1 -1
  142. package/package.json +1 -1
  143. package/portal/schemas/definitions.js +1 -1
  144. package/portal/support/jsonContext.js +1 -1
  145. package/portal/support/layersLoader.js +1 -1
  146. package/portal/support/loadUtils.js +5 -0
  147. package/portal/support/portalItemUtils.js +1 -1
  148. package/portal/support/portalLayers.js +1 -1
  149. package/renderers/support/RasterSymbolizer.js +1 -1
  150. package/rest/print.js +1 -1
  151. package/support/basemapUtils.js +1 -1
  152. package/support/revision.js +1 -1
  153. package/symbols/PolygonSymbol3D.js +1 -1
  154. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  155. package/views/2d/engine/imagery/colorizer/shadedrelief.js +1 -1
  156. package/views/2d/engine/imagery/colorizer/stretch.js +1 -1
  157. package/views/2d/input/handlers/KeyPan.js +1 -1
  158. package/views/2d/input/handlers/KeyRotate.js +1 -1
  159. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  160. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  161. package/views/2d/layers/features/support/FeatureSetReaderPBFIndirect.js +1 -1
  162. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  163. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  164. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  165. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  166. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  167. package/views/3d/layers/i3s/featureEditing.js +1 -1
  168. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  169. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  170. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  171. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  172. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  173. package/views/DOMContainer.js +1 -1
  174. package/views/draw/DrawGraphicTool.js +1 -1
  175. package/views/draw/DrawOperation.js +1 -1
  176. package/views/draw/support/Box.js +1 -1
  177. package/views/draw/support/Reshape.js +1 -1
  178. package/views/input/VisibilityChange.js +5 -0
  179. package/views/interactive/sketch/constraints.js +1 -1
  180. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  181. package/views/interactive/snapping/FeatureSnappingSourceInfo.js +5 -0
  182. package/views/interactive/snapping/SnappingContext.js +1 -1
  183. package/views/interactive/snapping/SnappingDragPipelineStep.js +1 -1
  184. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  185. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  186. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorkerHandle.js +1 -1
  187. package/views/interactive/snapping/snappingUtils.js +1 -1
  188. package/webdoc/support/saveUtils.js +1 -1
  189. package/webdoc/webdocSaveUtils.js +1 -1
  190. package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
  191. package/widgets/DirectionalPad/constants.js +1 -1
  192. package/widgets/DirectionalPad.js +1 -1
  193. package/widgets/Editor/Upload.js +1 -1
  194. package/widgets/Editor/workflowUtils.js +1 -1
  195. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  196. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  197. package/widgets/FeatureForm/FieldInput.js +1 -1
  198. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  199. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  200. package/widgets/FeatureForm.js +1 -1
  201. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  202. package/widgets/FeatureTable/FieldColumn.js +1 -1
  203. package/widgets/FeatureTable/Grid/Column.js +1 -1
  204. package/widgets/FeatureTable.js +1 -1
  205. package/widgets/ScaleRangeSlider.js +1 -1
  206. package/widgets/support/DatePicker.js +1 -1
  207. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  208. package/widgets/support/Selector2D/SelectionOperation2D.js +1 -1
  209. package/widgets/support/Selector2D.js +1 -1
  210. package/widgets/support/TimePicker.js +1 -1
  211. package/widgets/support/dateUtils.js +1 -1
  212. package/assets/esri/core/workers/chunks/027f8b57565c65fbccda.js +0 -1
  213. package/assets/esri/core/workers/chunks/048265fb5953350e3e33.js +0 -1
  214. package/assets/esri/core/workers/chunks/0b9cf14f8aafb76c578b.js +0 -1
  215. package/assets/esri/core/workers/chunks/0ebf58c927bfc4c9d4fe.js +0 -1
  216. package/assets/esri/core/workers/chunks/10fd951bd296b2beeeba.js +0 -1
  217. package/assets/esri/core/workers/chunks/1224475f3eefdfd59c76.js +0 -1
  218. package/assets/esri/core/workers/chunks/162b0220e24e9ba72655.js +0 -1
  219. package/assets/esri/core/workers/chunks/1e611cad53b745ee146f.js +0 -1
  220. package/assets/esri/core/workers/chunks/24b1bf1a5d80f43a6c9a.js +0 -1
  221. package/assets/esri/core/workers/chunks/29ed31fd4f9d5cf53686.js +0 -1
  222. package/assets/esri/core/workers/chunks/2b6d1c8e4ed759767827.js +0 -1
  223. package/assets/esri/core/workers/chunks/34b44b0fab88f838885c.js +0 -1
  224. package/assets/esri/core/workers/chunks/364f55294a1d7bf163d7.js +0 -1
  225. package/assets/esri/core/workers/chunks/3714ab435dd5ccf9e694.js +0 -1
  226. package/assets/esri/core/workers/chunks/3788009a5ece453011f3.js +0 -1
  227. package/assets/esri/core/workers/chunks/3aafe8160b3bfbaa6935.js +0 -1
  228. package/assets/esri/core/workers/chunks/41c002e4c42c581cda8d.js +0 -1
  229. package/assets/esri/core/workers/chunks/47be4c75dd6372b96fe4.js +0 -1
  230. package/assets/esri/core/workers/chunks/4e8d1e6051f6654a5e83.js +0 -1
  231. package/assets/esri/core/workers/chunks/53746e9976758630159b.js +0 -1
  232. package/assets/esri/core/workers/chunks/5449fdd69e12e5cbd12a.js +0 -1
  233. package/assets/esri/core/workers/chunks/57ce4ece0147afb0d43c.js +0 -1
  234. package/assets/esri/core/workers/chunks/5e83d21400a5dec05c81.js +0 -1
  235. package/assets/esri/core/workers/chunks/6047f4487dcd37cca98e.js +0 -1
  236. package/assets/esri/core/workers/chunks/6967d2b3721678b38774.js +0 -1
  237. package/assets/esri/core/workers/chunks/6ac5ca7de651e3d672a1.js +0 -1
  238. package/assets/esri/core/workers/chunks/6b7ee9164149428edb9e.js +0 -1
  239. package/assets/esri/core/workers/chunks/6c495077cc79e1898927.js +0 -1
  240. package/assets/esri/core/workers/chunks/6d43648d5326e01b4474.js +0 -1
  241. package/assets/esri/core/workers/chunks/74fb07de0f990d45af89.js +0 -1
  242. package/assets/esri/core/workers/chunks/8e9a52062ce059153a89.js +0 -1
  243. package/assets/esri/core/workers/chunks/919a57d372419785cd5e.js +0 -1
  244. package/assets/esri/core/workers/chunks/939f0a1a7d605e389e45.js +0 -1
  245. package/assets/esri/core/workers/chunks/9932f23ba6589df14a3d.js +0 -1
  246. package/assets/esri/core/workers/chunks/a25a38c9f338e0beffef.js +0 -1
  247. package/assets/esri/core/workers/chunks/a97581e584336b46ede7.js +0 -1
  248. package/assets/esri/core/workers/chunks/b1cb932cfadc4dc3f1e4.js +0 -1
  249. package/assets/esri/core/workers/chunks/be3fb6113b0b27b94537.js +0 -1
  250. package/assets/esri/core/workers/chunks/c37119f5692e19aa1ce2.js +0 -1
  251. package/assets/esri/core/workers/chunks/c685f16435d9861bbbd0.js +0 -1
  252. package/assets/esri/core/workers/chunks/d5dfc03673aec8aa57e2.js +0 -1
  253. package/assets/esri/core/workers/chunks/e6416a2684866d677b3e.js +0 -1
  254. package/assets/esri/core/workers/chunks/eb01f4cdb9b918cc61e7.js +0 -1
  255. package/assets/esri/core/workers/chunks/eb4aed4fdb44495a4fe6.js +0 -1
  256. package/assets/esri/core/workers/chunks/ec8258c9dc1491e97fc8.js +0 -1
  257. package/assets/esri/core/workers/chunks/eeac53da496de4cd4182.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4608,5935],{60590:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Lt});var r=i(43697),n=i(51773),s=i(2368),o=i(20102),a=i(16453),l=i(95330),u=i(5600),p=i(75215),c=(i(67676),i(80442),i(52011)),d=i(30556),m=i(87085),h=i(66577),y=i(38171),f=i(30030),g=i(3172),b=i(60235),v=i(22974),w=i(92604),R=i(17445),_=i(17452),S=i(71715),C=i(8744),x=i(21506),F=i(35956),I=i(96674),D=i(45663),T=i(81578);const j={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var N=i(93010),P=i(75509),O=i(23847);const A=new Set(["u1","u2","u4","u8","s8","u16","s16"]),V={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},M=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function Z(e){return M.has(e.type)}function J(e,t){if(!e||!t)return(0,v.d9)(e||t);const i=(0,v.d9)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),E(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(z(i.functionArguments).Raster=t);return i}function E(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&E(e[i].arguments,t))}function q(e){const t=(0,v.d9)(j[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=q(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=U(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function z(e){const t=e?.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?z(t.functionArguments):e}const G={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function H(e,t){const i=A.has(t)?(0,T.r)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function L(e){if(null==e)return;const{fields:t}=e,i=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return i?.name}function B(e){const t=[];return e?.forEach((e=>{const i=e;if(Array.isArray(i))t.push(i);else{if(null==i.min||null==i.max)return;const e=[i.min,i.max,i.avg||0,i.stddev||0];t.push(e)}})),t}function U(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,N.oI)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var Q=i(98974),k=i(69608);let W=class extends I.wq{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new Q.Z({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const n=e.multidimensionalSubset?.areaOfInterest;return n&&(t=this._addClipFunction(t,n)),r&&!i&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&Z(r)?J(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new D.Z;r.functionName="Stretch";const n=G[P.v.toJSON(e.stretchType)],s="u8",o={StretchType:n,Statistics:B(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),n===G.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=s):n===G.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=s):n===G.minMax?r.outputPixelType=s:n===G.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const n=e.colorRamp,s=new D.Z;if(i)s.functionArguments={ColorRamp:(0,N.pM)(n)};else{const i=(0,N.Uh)(n,!0);if(i)s.functionArguments={colorRampName:i};else if(!t.convertColorRampToColormap||"algorithmic"!==n.type&&"multipart"!==n.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),s.functionArguments={colorRamp:t}}else s.functionArguments={Colormap:(0,N.Jw)(n)}}return s.variableName="Raster",s.functionName="Colormap",s.functionArguments.Raster=r,i?new D.Z({rasterFunctionDefinition:q(s)}):s}return i?new D.Z({rasterFunctionDefinition:q(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],n=[],s=[],o=1e-6,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=L(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,i)=>{const r=t.symbol?.color;let n;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(n=o.attributes[e.field],(n>=t.minValue&&n<t.maxValue||i===e.classBreakInfos.length-1&&n>=t.minValue)&&s.push([o.attributes[p],r.r,r.g,r.b]))}))}));const i=a?H(s,a):s,r=new D.Z;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new D.Z({rasterFunctionDefinition:q(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),s.push([t,a.r,a.g,a.b])):n.push(e.minValue,e.maxValue)}));const c=a?H(s,a):s,d=new D.Z;d.functionName="Remap",d.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:n},d.variableName="Raster";const m=new D.Z;return m.functionName="Colormap",m.functionArguments={Colormap:c,Raster:d},t.convertToRFT?new D.Z({rasterFunctionDefinition:q(m)}):m}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:n}=t,s=null==n?null:n.features,o=L(n),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(s){if(o){const t=new Map;l.forEach((e=>{const i=e.value,r=e.symbol?.color;null!=i&&r?.a&&t.set(String(i),r.toRgb())}));const r=e.field;s.forEach((({attributes:e})=>{const n=String(e[r]),s=e[o],l=t.get(n);l?i.push([s,...l]):a&&i.push([s,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],r=t.symbol?.color,n=+t.value;if(r?.a){if(isNaN(n))return null;i.push([n,r.r,r.g,r.b])}}const u=r&&i.length>0?H(i,r):i,p=new D.Z;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new D.Z({rasterFunctionDefinition:q(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,n=r?H(i,r):i,s=new D.Z;return s.functionName="Colormap",s.functionArguments={},s.functionArguments.Colormap=n,t.convertToRFT?new D.Z({rasterFunctionDefinition:q(s)}):s}(e,t);case"vector-field":return function(e,t){const i=new D.Z;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:n}=t,s="vector-uv"===r;let o,a;if(n&&2===n.length){const e=n.map((e=>e.toLowerCase()));o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new O.Z,c={magnitudeBandID:o,directionBandID:a,isUVComponents:s,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:V[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const d=q(i);return t.convertToRFT?D.Z.fromJSON({rasterFunctionDefinition:d}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new D.Z;const r=new D.Z;r.functionName="Hillshade";const n="traditional"===e.hillshadeType?0:1,s="none"===e.scalingType?1:3,o={HillshadeType:n,SlopeType:s,ZFactor:e.zFactor};return 0===n&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===s&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,N.pM)(e.colorRamp):o.Colormap=(0,N.Jw)(e.colorRamp)),i?new D.Z({rasterFunctionDefinition:q(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new D.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new D.Z({rasterFunctionDefinition:q(r)}):r,J(r,e)}_addClipFunction(e,t){return J(new D.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,r._)([(0,u.Cb)()],W.prototype,"layer",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"adjustAspectRatio",null),(0,r._)([(0,d.c)("adjustAspectRatio")],W.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"bandIds",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"compression",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"compressionQuality",null),(0,r._)([(0,d.c)("compressionQuality")],W.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"compressionTolerance",null),(0,r._)([(0,d.c)("compressionTolerance")],W.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"format",null),(0,r._)([(0,u.Cb)({type:String,json:{read:{reader:k.cl.read},write:{writer:k.cl.write}}})],W.prototype,"interpolation",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"noData",null),(0,r._)([(0,u.Cb)({type:String,json:{read:{reader:k.kQ.read},write:{writer:k.kQ.write}}})],W.prototype,"noDataInterpretation",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"pixelType",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"lercVersion",void 0),(0,r._)([(0,d.c)("lercVersion")],W.prototype,"writeLercVersion",null),(0,r._)([(0,u.Cb)({type:Number})],W.prototype,"version",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"mosaicRule",null),(0,r._)([(0,u.Cb)({json:{write:!0,name:"renderingRule"}})],W.prototype,"rasterFunction",null),W=(0,r._)([(0,c.j)("esri.layers.mixins.ExportImageServiceParameters")],W);var $=i(1231),X=i(99514),K=i(90082),Y=i(29876),ee=i(5847),te=i(25972),ie=i(88281),re=i(99815),ne=i(75993),se=i(80676),oe=i(67058),ae=i(72758),le=i(16306),ue=i(11282),pe=i(82971);let ce=class extends I.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],ce.prototype,"north",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],ce.prototype,"up",void 0),(0,r._)([(0,u.Cb)({type:pe.Z,json:{write:!0}})],ce.prototype,"spatialReference",void 0),ce=(0,r._)([(0,c.j)("esri.rest.support.ImageAngleResult")],ce);const de=ce;var me=i(67900);let he=class extends I.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,u.Cb)({type:Number,json:{read:!0,write:!0}})],he.prototype,"value",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],he.prototype,"displayValue",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{read:!0,write:!0}})],he.prototype,"uncertainty",void 0),he=(0,r._)([(0,c.j)("esri.rest.support.ImageMeasureResultValue")],he);let ye=class extends he{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ye.prototype,"unit",void 0),ye=(0,r._)([(0,c.j)("esri.rest.support.ImageMeasureResultLengthValue")],ye);let fe=class extends he{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.Cb)({type:String,json:{read:me.gV.read,write:me.gV.write}})],fe.prototype,"unit",void 0),fe=(0,r._)([(0,c.j)("esri.rest.support.ImageMeasureResultAreaValue")],fe);let ge=class extends he{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.Cb)({type:String,json:{read:me.CN.read,write:me.CN.write}})],ge.prototype,"unit",void 0),ge=(0,r._)([(0,c.j)("esri.rest.support.ImageMeasureResultAngleValue")],ge);let be=class extends I.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,r._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],be.prototype,"name",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],be.prototype,"sensorName",void 0),be=(0,r._)([(0,c.j)("esri.rest.support.BaseImageMeasureResult")],be);let ve=class extends be{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,u.Cb)({type:fe,json:{read:!0,write:!0}})],ve.prototype,"area",void 0),(0,r._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],ve.prototype,"perimeter",void 0),ve=(0,r._)([(0,c.j)("esri.rest.support.ImageAreaResult")],ve);const we=ve;let Re=class extends be{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],Re.prototype,"distance",void 0),(0,r._)([(0,u.Cb)({type:ge,json:{read:!0,write:!0}})],Re.prototype,"azimuthAngle",void 0),(0,r._)([(0,u.Cb)({type:ge,json:{read:!0,write:!0}})],Re.prototype,"elevationAngle",void 0),Re=(0,r._)([(0,c.j)("esri.rest.support.ImageDistanceResult")],Re);const _e=Re;let Se=class extends be{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],Se.prototype,"height",void 0),Se=(0,r._)([(0,c.j)("esri.rest.support.ImageHeightResult")],Se);const Ce=Se;var xe=i(94139),Fe=i(74889);let Ie=class extends I.wq{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,u.Cb)({type:Fe.Z,json:{write:!0}})],Ie.prototype,"catalogItems",void 0),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],Ie.prototype,"location",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"name",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"objectId",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"processedValues",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"properties",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"value",void 0),Ie=(0,r._)([(0,c.j)("esri.rest.support.ImageIdentifyResult")],Ie);const De=Ie;let Te=class extends I.wq{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,u.Cb)({json:{write:!0}})],Te.prototype,"geometries",void 0),Te=(0,r._)([(0,c.j)("esri.rest.support.ImagePixelLocationResult")],Te);const je=Te;let Ne=class extends be{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,u.Cb)({type:xe.Z,json:{name:"point.value",read:!0,write:!0}})],Ne.prototype,"point",void 0),Ne=(0,r._)([(0,c.j)("esri.rest.support.ImagePointResult")],Ne);const Pe=Ne;let Oe=class extends I.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"attributes",void 0),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],Oe.prototype,"location",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"locationId",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"rasterId",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"resolution",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"pixelValue",void 0),Oe=(0,r._)([(0,c.j)("esri.rest.support.ImageSample")],Oe);const Ae=Oe;let Ve=class extends I.wq{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,u.Cb)({type:[Ae],json:{write:!0}})],Ve.prototype,"samples",void 0),Ve=(0,r._)([(0,c.j)("esri.rest.support.ImageSampleResult")],Ve);const Me=Ve;function Ze(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function Je(e,t,i){const r=(0,ue.en)(e),n=t.geometry?[t.geometry]:[],s=await(0,le.aX)(n),o=t.toJSON();Ze(o);const a=s?.[0];null!=a&&(o.geometry=a.toJSON());const l=(0,ue.cv)({...r.query,f:"json",...o});return(0,ue.lA)(l,i)}async function Ee(e,t,i){const r=(0,ue.en)(e),n=t.geometry?[t.geometry]:[];return(0,le.aX)(n).then((e=>{const n=t.toJSON(),s=e?.[0];null!=s&&(n.geometry=JSON.stringify(s.toJSON()));const o=(0,ue.cv)({...r.query,f:"json",...n}),a=(0,ue.lA)(o,i);return(0,g.Z)(r.path+"/identify",a)})).then((e=>De.fromJSON(e.data)))}async function qe(e,t,i,r){const n=(0,ue.en)(e),s=await(0,le.aX)(i),o=t.toJSON();null!=s[0]&&(o.fromGeometry=JSON.stringify(ze(s[0]))),null!=s[1]&&(o.toGeometry=JSON.stringify(ze(s[1])));const a=(0,ue.cv)({...n.query,f:"json",...o}),l=(0,ue.lA)(a,r),{data:u}=await(0,g.Z)(n.path+"/measure",l);return u}function ze(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=Ge(e.spatialReference)),t}function Ge(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function He(e,t){if(!e.imageCoordinateSystem)return(0,C.B9)(e);const i=Ge(e),{icsid:r,icsns:n}=i;return null==r||null!=n&&!t?.toLowerCase().includes("/"+n.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}i(10158);var Le,Be=i(4967),Ue=(i(68773),i(40330),i(2109),i(98732),i(6570)),Qe=(i(9361),i(65091)),ke=i(38913),We=(i(58901),i(45091),i(14165)),$e=(i(98326),i(56545),i(41818)),Xe=i(5396),Ke=(i(75935),i(28141),i(26059)),Ye=i(36679);let et=Le=class extends I.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Le((0,v.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,u.Cb)({type:[String],json:{name:"angleName",write:!0}})],et.prototype,"angleNames",void 0),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],et.prototype,"point",void 0),(0,r._)([(0,u.Cb)({type:pe.Z,json:{write:!0}})],et.prototype,"spatialReference",void 0),(0,r._)([(0,u.Cb)({type:p.z8,json:{write:!0}})],et.prototype,"rasterId",void 0),et=Le=(0,r._)([(0,c.j)("esri.rest.support.ImageAngleParameters")],et);const tt=et;var it=i(33955);const rt=new(i(35454).X)({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let nt=class extends I.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var st;(0,r._)([(0,u.Cb)()],nt.prototype,"type",void 0),(0,r._)([(0,u.Cb)({type:rt.apiValues,json:{read:rt.read,write:rt.write}})],nt.prototype,"measureOperation",void 0),(0,r._)([(0,u.Cb)({type:Q.Z,json:{write:!0}})],nt.prototype,"mosaicRule",void 0),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],nt.prototype,"pixelSize",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],nt.prototype,"raster",void 0),nt=(0,r._)([(0,c.j)("esri.rest.support.BaseImageMeasureParameters")],nt);let ot=st=class extends nt{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new st((0,v.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.Cb)({types:h.qM,json:{name:"fromGeometry",read:!0,write:!0}})],ot.prototype,"geometry",void 0),(0,r._)([(0,d.c)("geometry")],ot.prototype,"writeGeometry",null),(0,r._)([(0,u.Cb)({type:rt.apiValues,json:{write:rt.write}})],ot.prototype,"measureOperation",null),(0,r._)([(0,u.Cb)({json:{read:!0}})],ot.prototype,"is3D",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ot.prototype,"linearUnit",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:me.gV.read,write:me.gV.write}})],ot.prototype,"areaUnit",void 0),ot=st=(0,r._)([(0,c.j)("esri.rest.support.ImageAreaParameters")],ot);const at=ot;var lt;let ut=lt=class extends nt{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new lt((0,v.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.Cb)({type:xe.Z,json:{read:!0,write:!0}})],ut.prototype,"fromGeometry",void 0),(0,r._)([(0,d.c)("fromGeometry")],ut.prototype,"writeFromGeometry",null),(0,r._)([(0,u.Cb)({type:xe.Z,json:{read:!0,write:!0}})],ut.prototype,"toGeometry",void 0),(0,r._)([(0,u.Cb)({type:rt.apiValues,json:{write:rt.write}})],ut.prototype,"measureOperation",null),(0,r._)([(0,u.Cb)({json:{read:!0}})],ut.prototype,"is3D",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ut.prototype,"linearUnit",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:me.CN.read,write:me.CN.write}})],ut.prototype,"angularUnit",void 0),ut=lt=(0,r._)([(0,c.j)("esri.rest.support.ImageDistanceParameters")],ut);const pt=ut;var ct;let dt=ct=class extends nt{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new ct((0,v.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.Cb)({type:xe.Z,json:{read:!0}})],dt.prototype,"fromGeometry",void 0),(0,r._)([(0,d.c)("fromGeometry")],dt.prototype,"writeFromGeometry",null),(0,r._)([(0,u.Cb)({type:xe.Z,json:{read:!0,write:!0}})],dt.prototype,"toGeometry",void 0),(0,r._)([(0,u.Cb)({type:rt.apiValues,json:{write:rt.write}})],dt.prototype,"measureOperation",null),(0,r._)([(0,u.Cb)({json:{read:!0}})],dt.prototype,"operationType",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],dt.prototype,"linearUnit",void 0),dt=ct=(0,r._)([(0,c.j)("esri.rest.support.ImageHeightParameters")],dt);const mt=dt;var ht,yt=i(79681),ft=i(92835);let gt=ht=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}get renderingRule(){return(0,b.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,b.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,b.Mr)(w.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,b.Mr)(w.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=D.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,n=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=n?`${r},${n}`:`${r}`:null}}clone(){return new ht((0,v.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"geometry",void 0),(0,r._)([(0,d.c)("geometry")],gt.prototype,"writeGeometry",null),(0,r._)([(0,u.Cb)({type:Q.Z,json:{write:!0}})],gt.prototype,"mosaicRule",null),(0,r._)([(0,d.c)("mosaicRule")],gt.prototype,"writeMosaicRule",null),(0,r._)([(0,u.Cb)({type:D.Z})],gt.prototype,"renderingRule",null),(0,r._)([(0,u.Cb)({type:[D.Z]})],gt.prototype,"renderingRules",null),(0,r._)([(0,u.Cb)({type:D.Z,json:{write:!0,name:"renderingRule"}})],gt.prototype,"rasterFunction",null),(0,r._)([(0,d.c)("rasterFunction")],gt.prototype,"writeRasterFunction",null),(0,r._)([(0,u.Cb)({type:[D.Z],json:{write:!0,name:"renderingRules"}})],gt.prototype,"rasterFunctions",void 0),(0,r._)([(0,d.c)("rasterFunctions")],gt.prototype,"writeRasterFunctions",null),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],gt.prototype,"pixelSize",void 0),(0,r._)([(0,d.c)("pixelSize")],gt.prototype,"writePixelSize",null),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnGeometry",void 0),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnCatalogItems",void 0),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnPixelValues",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],gt.prototype,"maxItemCount",void 0),(0,r._)([(0,u.Cb)({type:ft.Z,json:{write:{target:"time"}}})],gt.prototype,"timeExtent",void 0),(0,r._)([(0,d.c)("timeExtent")],gt.prototype,"writeTimeExtent",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"raster",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"viewId",void 0),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"processAsMultidimensional",void 0),gt=ht=(0,r._)([(0,c.j)("esri.rest.support.ImageIdentifyParameters")],gt);const bt=gt;var vt;let wt=vt=class extends I.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new vt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,u.Cb)({type:[xe.Z],json:{write:!0}})],wt.prototype,"geometries",void 0),(0,r._)([(0,d.c)("geometries")],wt.prototype,"writeGeometry",null),(0,r._)([(0,u.Cb)({type:p.z8,json:{write:!0}})],wt.prototype,"rasterId",void 0),wt=vt=(0,r._)([(0,c.j)("esri.rest.support.ImagePixelLocationParameters")],wt);const Rt=wt;var _t;let St=_t=class extends nt{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new _t((0,v.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.Cb)({types:h.qM,json:{name:"fromGeometry",read:it.im}})],St.prototype,"geometry",void 0),(0,r._)([(0,d.c)("geometry")],St.prototype,"writeGeometry",null),(0,r._)([(0,u.Cb)({type:rt.apiValues,json:{read:rt.read,write:rt.write}})],St.prototype,"measureOperation",null),(0,r._)([(0,u.Cb)({json:{read:!0}})],St.prototype,"is3D",void 0),St=_t=(0,r._)([(0,c.j)("esri.rest.support.ImagePointParameters")],St);const Ct=St;var xt;let Ft=xt=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new Qe.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new xt((0,v.d9)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.Cb)({types:h.qM,json:{read:it.im}})],Ft.prototype,"geometry",void 0),(0,r._)([(0,d.c)("geometry")],Ft.prototype,"writeGeometry",null),(0,r._)([(0,u.Cb)()],Ft.prototype,"locations",null),(0,r._)([(0,u.Cb)({type:String,json:{type:k.cl.jsonValues,read:k.cl.read,write:k.cl.write}})],Ft.prototype,"interpolation",void 0),(0,r._)([(0,u.Cb)({type:Q.Z,json:{write:!0}})],Ft.prototype,"mosaicRule",void 0),(0,r._)([(0,u.Cb)({type:[String],json:{write:!0}})],Ft.prototype,"outFields",void 0),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],Ft.prototype,"pixelSize",void 0),(0,r._)([(0,u.Cb)({type:String,json:{write:!0}})],Ft.prototype,"raster",void 0),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],Ft.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],Ft.prototype,"sampleDistance",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],Ft.prototype,"sampleCount",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],Ft.prototype,"sliceId",void 0),(0,r._)([(0,u.Cb)({type:ft.Z,json:{read:{source:"time"},write:{target:"time"}}})],Ft.prototype,"timeExtent",void 0),Ft=xt=(0,r._)([(0,c.j)("esri.rest.support.ImageSampleParameters")],Ft);const It=Ft;var Dt=i(23808);const Tt=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),jt=(0,u.Eg)(p.q9,{min:0,max:255}),Nt=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new W({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?Q.Z.fromJSON(t):null}get fieldsIndex(){return this.fields?new X.Z(this.fields):null}set format(e){e&&Tt.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?Q.Z.fromJSON(i):this._isMosaicRuleSupported(t)?Q.Z.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const n=this.definitionExpression;r?n&&n!==r.where&&(r=r.clone(),r.where=n):n&&(r=new Q.Z({where:n})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=jt(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i?.name}return e}get parsedUrl(){return(0,_.mN)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,n=(0,f.ij)(r,i);return null==n?null:("vector-field"===n.type&&t.symbolTileSize&&!r.symbolTileSize&&(n.symbolTileSize=t.symbolTileSize),Z(n)||w.Z.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),n)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix,t=new $.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new $.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new $.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let n=this.fields?(0,v.d9)(this.fields):[];n.push(i),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&n.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&n.push(r),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{n.push(new $.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(n.push(new $.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),n.push(new $.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:s}=this.rasterInfo??{};if(null!=s){const t=s.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const i=(0,v.d9)(t);return i.name=e+t.name,i}));n=n.concat(t)}return n}get renderingRule(){return(0,b.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this.rasterFunction}set renderingRule(e){(0,b.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=D.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?D.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):D.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?pe.Z.fromJSON(i):null}readPixelType(e){return k.sM.fromJSON(e)||e}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=k.sM.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:n,pixelFilter:s,bandIds:o}=this;if(!this._isPicture()&&r&&n&&!s){const s=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(r.toJSON()),a=this._rasterJobHandler.instance;if(a){s&&(n.bind(),await a.updateSymbolizer(n,t),this._cachedRendererJson=r.toJSON());const l=await a.symbolize({bandIds:o,...e},t);i={extent:e.extent,pixelBlock:l}}else i={extent:e.extent,pixelBlock:n.symbolize({bandIds:o,...e})}}return i}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new o.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,p.TJ)(tt,e).clone(),async function(e,t,i){const r=t.toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=Ge(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(r.spatialReference=He(t.spatialReference));const n=(0,ue.en)(e),s=(0,ue.cv)({...n.query,f:"json",...r}),o=(0,ue.lA)(s,i),{data:a}=await(0,g.Z)(`${n.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new pe.Z({wkid:0,imageCoordinateSystem:a.spatialReference}):pe.Z.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new de(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,p.TJ)(Rt,e).clone(),async function(e,t,i){const r=t.toJSON(),{geometries:n}=t;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=Ge(n[e].spatialReference));const s=(0,ue.en)(e),o=(0,ue.cv)({...s.query,f:"json",...r}),a=(0,ue.lA)(o,i),{data:l}=await(0,g.Z)(`${s.path}/computePixelLocation`,a);return je.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,p.TJ)(yt.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Je(e,t,i),n=(0,ue.en)(e),{data:s}=await(0,g.Z)(`${n.path}/computeHistograms`,r);return{histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new o.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,p.TJ)(yt.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Je(e,t,i),n=(0,ue.en)(e),{data:s}=await(0,g.Z)(`${n.path}/computeStatisticsHistograms`,r),{statistics:o}=s;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new o.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,p.TJ)(mt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await qe(e,t,[t.fromGeometry,t.toGeometry],i);return Ce.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new o.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,p.TJ)(at,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await qe(e,t,[t.geometry],i);return we.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new o.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,p.TJ)(pt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await qe(e,t,[t.fromGeometry,t.toGeometry],i);return _e.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new o.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,p.TJ)(Ct,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await qe(e,t,[t.geometry],i);return Pe.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async fetchImage(e,t,r,n={}){if(null==e||null==t||null==r)throw new o.Z("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:n.signal});e&&(this.rasterInfo=e)}const s=this.getExportImageServiceParameters(e,t,r,n.timeExtent);if(null==s){if(n.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,n.returnImageBitmap?{imageBitmap:await(0,K.g)(e,`${i(this.parsedUrl)}/exportImage`,n.signal)}:{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:o}=this,a=(s?.length||o.bandCount)??0,l=t*r,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(ee.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ee.Z({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!n.requestAsImageElement&&!this.pixelFilter,l=a&&!!n.returnImageBitmap,u={imageServiceParameters:s,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:a,returnImageBitmap:l,signal:n.signal};return this._requestArrayBuffer(u)}fetchKeyProperties(e){return(0,g.Z)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new o.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,g.Z)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>Fe.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ue.en)(e),n=(0,ue.cv)({...r?.query,f:"json"}),s=(0,ue.lA)(n,i),o=`${r?.path}/${t}/info`,a=(0,g.Z)(`${o}`,s),l=(0,g.Z)(`${o}/keyProperties`,s),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let d=null;p.statistics?.length&&(d=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const m=Ue.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),y=Math.ceil(m.height/p.pixelSizeY-.1),f=m.spatialReference,b=new xe.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:f}),v=p.histograms?.length?p.histograms:null,w=new Ye.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new te.Z({width:h,height:y,bandCount:p.bandCount,extent:m,spatialReference:f,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:v,keyProperties:c,storageInfo:w})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,g.Z)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),n=r?.ics;if(!n)return;let s=null;try{s=(await(0,g.Z)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s||!s.spatialReference)return{ics:n,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,g.Z)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=s.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:(0,C.B9)(a),outSR:"0:"+e},u=(0,g.Z)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(s.xmin+s.xmax)/2,c=(s.ymax-s.ymin)/6,d=s.ymin+c,m=[];for(let e=0;e<5;e++)m.push({x:p,y:d+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:m}),inSR:(0,C.B9)(a),outSR:"0:"+e},y=(0,g.Z)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),f=await Promise.all([o,u,y]);let b=f[0].ipxf;if(null==b){const e=n.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(b={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=Ue.Z.fromJSON(f[1]?.geometries?.[0]);v&&(v.spatialReference=new pe.Z({wkid:0,imageCoordinateSystem:n}));const w=f[2].geometries?f[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],R=w.length;if(R<3)return{ics:n,icsToPixelTransform:b,icsExtent:v,northDirection:null};let _=0,S=0,x=0,F=0;for(let e=0;e<R;e++)_+=w[e].x,S+=w[e].y,x+=w[e].x*w[e].x,F+=w[e].x*w[e].y;const I=(R*F-_*S)/(R*x-_*_);let D=0;const T=w[4].x>w[0].x,j=w[4].y>w[0].y;return I===1/0?D=j?90:270:0===I?D=T?0:180:I>0?D=T?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(D=j?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:n,icsToPixelTransform:b,icsExtent:v,northDirection:D}}async generateRasterInfo(e,t){if(e=(0,p.TJ)(D.Z,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const r=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),i=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return i?i.join("/"):null}(e);if(!r)throw new o.Z("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const n={...t,query:this._getQueryParams()},s=(0,Ke.Nb)(i(this.parsedUrl),e,n);this._functionRasterInfos[r]=s;try{return await s}catch(e){throw this._functionRasterInfos[r]=null,e}}getExportImageServiceParameters(e,t,r,n){const s=He((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;o.bandIds=void 0}else o.bandIds=a?.join(",");l instanceof Array&&l.length>0&&(o.noData=l.join(","));const d=this._processMultidimensionalIntersection(null,n,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,n=d.timeExtent,o.renderingRule=this._getRenderingRuleString(D.Z.fromJSON(u));const m={};if(null!=n){const{start:e,end:t}=n.toJSON();e&&t&&e===t?m.time=""+e:null==e&&null==t||(m.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:s,imageSR:s,size:t+","+r,...o,...m}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new o.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,p.TJ)(It,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=t.toJSON();Ze(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const n=await(0,le.aX)(t.geometry),s=n?.[0];null!=s&&(r.geometry=s.toJSON());const o=(0,ue.en)(e),a=(0,ue.cv)({...o.query,f:"json",...r}),l=(0,ue.lA)(a,i),{data:u}=await(0,g.Z)(`${o.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return Me.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,p.TJ)(bt,e).clone(),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=ke.Z.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new o.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:n}=this;return n&&null==e.rasterFunction&&(e.rasterFunction=n),r&&null==e.raster&&(e.raster=r),Ee(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new We.Z;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Be.e)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Xe.G)(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,$e.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:n,showNoDataRecords:s}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some((e=>!e.toLowerCase().includes(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(p)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new D.Z({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some((e=>e.functionName===i.functionName))&&(l.push(i),u.push(i.functionName))}const d=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let h=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:i}=(0,re.W2)(m,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new o.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(h=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h);let f=e.geometry;this.version<10.91&&"extent"===f?.type&&(f=ke.Z.fromExtent(f));const g=this._getQueryParams({geometry:f,timeExtent:h,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:a,returnGeometry:d,raster:this.raster,maxItemCount:n?1:null});delete g.f;const b=new bt(g);try{await this._generateRasterInfo(this.rasterFunction);const i=await Ee(this.url,b,{signal:t?.signal,query:{...this.customParameters}}),n=e.outFields,o=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!a||d||!i?.catalogItems?.features.length||!s&&o)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:s,templateFields:n});const l=this.objectIdField||"ObjectId",p=i.catalogItems?.features??[],c=p.map((e=>e.attributes?.[l])),m=new We.Z({objectIds:c,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),h=await this.queryRasters(m);return h?.features?.length&&h.features.forEach((t=>{p.forEach((i=>{i.attributes[l]===t.attributes[l]&&(i.geometry=new ke.Z(t.geometry),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:s,templateFields:n})}catch{throw new o.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,g.Z)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),n=(0,g.Z)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([r,n]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,Dt.GE)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,re.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Ke.gh)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,Ke.n$)(e,t),e))),n=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([r,n,s]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),w.Z.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,R.YP)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:n}=i,s=r.variables.some((e=>e.dimensions.some((e=>e.name===n))))?n:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==s)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter((e=>e.dimensionName===s)),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach((e=>{e.dimensionName===s&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))}));else if(!c){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=s,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new F.Z({variableName:"",dimensionName:s,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new o.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,p.TJ)(We.Z,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new ie.Z;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,oe.U0)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:n}=await(0,g.Z)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,n&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new o.Z("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),n=i?.ResampleType||i?.resampleType;return r&&(7===n||10===n)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&i.bandCount>=3){const e=(0,oe.YD)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,oe.Ob)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,oe.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=i):this.symbolizer=new ae.Z({rendererJSON:t,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,ne.J)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await(0,g.Z)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:n,signal:s}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:o}=await(0,g.Z)(r,{responseType:n?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:s});return o instanceof Blob?{imageBitmap:await(0,K.g)(o,r,s),params:t}:{imageOrCanvasElement:o,params:t}}const a=this._initJobHandler(),l=(0,g.Z)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s}),u=(await Promise.all([l,a]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,ne.y)(u)),!c)throw new o.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const d={signal:s},m="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,ne.J)(u,{useCanvas:!0,...t},d):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},d);return{pixelData:{pixelBlock:await m,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,re.Tj)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new Q.Z;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:n,returnDomainValues:s,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),d=[];if(i&&!l&&!c){const e={};e[p]=0,u=[i],l=[new y.Z(this.fullExtent,null,e)]}if(!l)return[];let m,h,f;this._updateResponseFieldNames(l,o),c&&!n&&(l=[]);for(let e=0;e<l.length;e++){if(m=l[e],null!=i){if(h=u[e],f=this.rasterFunction&&a&&a.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?a[r.indexOf(this.rasterFunction.functionName)]:i,"nodata"===h.toLowerCase()&&!n)continue;const t="Raster.ItemPixelValue",s="Raster.ServicePixelValue";m.attributes[t]=h,m.attributes[s]=f,this._updateFeatureWithMagDirValues(m,h);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?h:i:f;this.rasterFunction||(l=o?h:i),this._updateFeatureWithRasterAttributeTableValues(m,l)}if(m.sourceLayer=m.layer=this,s&&this._updateFeatureWithDomainValues(m),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];m.attributes[t]=a[e]}d.push(l[e])}return d}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:n}=(0,re.W2)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=n?.timeExtent&&(t=n.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,re.W2)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:n}=i,s=n.map((e=>e.name)).find((e=>"value"===e.toLowerCase()));if(!s)return;const o=r.filter((e=>e.attributes[s]===(null!=t?parseInt(t,10):null)));o&&o[0]&&n.forEach((t=>{const i=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=o[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),n=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),s=new ee.Z({height:1,width:1,pixelType:"f32",pixels:r,statistics:n});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:s,extent:new Ue.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[s.pixels[0][0],s.pixels[1][0]]:(0,se.Tg)([s.pixels[0][0],s.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach((e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&e instanceof yt.Z&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:n}=e,s=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:i>=10.7&&o,supportsComputePixelLocation:i>=10.7&&t.includes("catalog"),supportsComputeAngles:i>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:n,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function i(e){return e?.path??""}return(0,r._)([(0,u.Cb)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,u.Cb)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,u.Cb)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,S.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,u.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,u.Cb)({type:[p.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,S.r)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,S.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,u.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,d.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,d.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,S.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,u.Cb)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,type:[$.Z]})],t.prototype,"fields",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,u.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,S.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,u.Cb)({type:Ue.Z})],t.prototype,"fullExtent",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,u.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,u.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,u.Cb)({type:String,json:{type:k.cl.jsonValues,read:k.cl.read,write:k.cl.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,u.Cb)()],t.prototype,"minScale",void 0),(0,r._)([(0,S.r)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,u.Cb)()],t.prototype,"maxScale",void 0),(0,r._)([(0,S.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,u.Cb)({type:Q.Z})],t.prototype,"mosaicRule",null),(0,r._)([(0,S.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,d.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,u.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,u.Cb)({type:Y.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,u.Cb)({json:{type:p.z8}})],t.prototype,"noData",void 0),(0,r._)([(0,d.c)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,u.Cb)({type:String,json:{type:k.kQ.jsonValues,read:k.kQ.read,write:k.kQ.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,S.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,r._)([(0,u.Cb)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,u.Cb)({})],t.prototype,"types",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,u.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,u.Cb)()],t.prototype,"raster",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,S.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,u.Cb)()],t.prototype,"viewId",void 0),(0,r._)([(0,u.Cb)({types:f.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:f.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,r._)([(0,S.r)("renderer")],t.prototype,"readRenderer",null),(0,r._)([(0,d.c)("renderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,u.Cb)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,r._)([(0,u.Cb)(x.Oh)],t.prototype,"opacity",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,u.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,u.Cb)({type:D.Z})],t.prototype,"renderingRule",null),(0,r._)([(0,u.Cb)({type:D.Z,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,r._)([(0,S.r)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,type:pe.Z})],t.prototype,"spatialReference",void 0),(0,r._)([(0,S.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,u.Cb)({json:{type:k.sM.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,S.r)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,d.c)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,u.Cb)({constructOnly:!0,type:te.Z})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,u.Cb)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,u.Cb)(x.HQ)],t.prototype,"url",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,S.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,c.j)("esri.layers.mixins.ArcGISImageService")],t),t};var Pt=i(17287),Ot=i(71612),At=i(17017),Vt=i(38009),Mt=i(16859),Zt=i(34760),Jt=i(72965),Et=i(28294),qt=i(60199),zt=i(32163),Gt=i(12259);let Ht=class extends((0,Ot.h)((0,Et.n)((0,Jt.M)((0,Vt.q)((0,Mt.I)(Nt((0,Zt.Q)((0,At.N)((0,Pt.Y)((0,a.R)((0,s.J)(m.Z)))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.Ds)((async(e,t,r)=>{const{save:n,saveAs:s}=await i.e(4697).then(i.bind(i,64697));switch(e){case Gt.x.SAVE:return n(this,t);case Gt.x.SAVE_AS:return s(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const t=this.rasterFields,i=this.title,r=new Set;let n=!1,s=!1;this.capabilities&&(n=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,s="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;n&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||r.add(e.name)}s&&r.add("raster.magnitude").add("raster.direction");const a=(0,zt.eZ)({fields:t,title:i},{...e,visibleFieldNames:r});return a?.fieldInfos&&this.rasterInfo?.pixelType.startsWith("f")&&a.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),a}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(Gt.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Gt.x.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,qt.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.Z("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,r._)([(0,u.Cb)(x.rn)],Ht.prototype,"legendEnabled",null),(0,r._)([(0,u.Cb)({type:["show","hide"]})],Ht.prototype,"listMode",null),(0,r._)([(0,u.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ht.prototype,"isReference",void 0),(0,r._)([(0,u.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Ht.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.c)("web-map","operationalLayerType")],Ht.prototype,"writeOperationalLayerType",null),(0,r._)([(0,u.Cb)(x.C_)],Ht.prototype,"popupEnabled",void 0),(0,r._)([(0,u.Cb)({type:n.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Ht.prototype,"popupTemplate",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],Ht.prototype,"defaultPopupTemplate",null),(0,r._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],Ht.prototype,"type",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],Ht.prototype,"_isPreviewLayer",null),Ht=(0,r._)([(0,c.j)("esri.layers.ImageryLayer")],Ht);const Lt=Ht},90082:(e,t,i)=>{i.d(t,{V:()=>o,g:()=>s});var r=i(20102),n=i(95330);async function s(e,t,i){let s;try{s=await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.k_)(i),s}async function o(e,t,i,s,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load tile ${t}/${i}/${s}`,{error:e,level:t,row:i,col:s})}return(0,n.k_)(o),a}},60199:(e,t,i)=>{i.d(t,{D:()=>s});var r=i(66677);const n=[];function s(e,t){if((0,r.M8)(e.url??""))return!0;const{wkid:i}=t;for(const t of n){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}n.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102901;t<=102955;t++)e.add(t);return e}]),n.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),n.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),n.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),n.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),n.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),n.push([10.61,()=>new Set([102497])]),n.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}]),n.push([10.51,()=>{const e=new Set([7683,7881,7886,7899,8888,9e3]);for(let t=8013;t<=8032;t++)e.add(t);for(let t=9053;t<=9057;t++)e.add(t);for(let t=104017;t<=104018;t++)e.add(t);for(let t=104971;t<=104974;t++)e.add(t);return e}]),n.push([10.5,()=>{const e=new Set([6962,7035,7037,7039,7041,7084,7086,7133,7798,102399]);for(let t=4087;t<=4088;t++)e.add(t);for(let t=5896;t<=5899;t++)e.add(t);for(let t=7005;t<=7007;t++)e.add(t);for(let t=7057;t<=7070;t++)e.add(t);for(let t=7073;t<=7082;t++)e.add(t);for(let t=7109;t<=7128;t++)e.add(t);for(let t=7844;t<=7859;t++)e.add(t);return e}])},41818:(e,t,i)=>{i.d(t,{P:()=>o});var r=i(11282),n=i(34599),s=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,n.hH)(o,s.Z.from(t),{...i}).then((e=>e.data.count))}},5396:(e,t,i)=>{i.d(t,{G:()=>o});var r=i(11282),n=i(34599),s=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,n.Ev)(o,s.Z.from(t),{...i}).then((e=>e.data.objectIds))}},4967:(e,t,i)=>{i.d(t,{F:()=>l,e:()=>a});var r=i(11282),n=i(34599),s=i(74889),o=i(14165);async function a(e,t,i){const r=await l(e,t,i);return s.Z.fromJSON(r)}async function l(e,t,i){const s=(0,r.en)(e),a={...i},l=o.Z.from(t),{data:u}=await(0,n.JT)(s,l,l.sourceSpatialReference,a);return u}},28694:(e,t,i)=>{i.d(t,{p:()=>n});var r=i(69285);function n(e,t,i){if(!i?.features||!i.hasZ)return;const n=(0,r.k)(i.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of i.features)n(e.geometry)}},98326:(e,t,i)=>{i.d(t,{Z:()=>c});var r,n=i(43697),s=i(96674),o=i(5600),a=i(75215),l=(i(67676),i(80442),i(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=r=class extends s.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const n=t.find((e=>e.name===i));return n?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r?.value||null}({tagName:r,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,o.Cb)({type:String})],p.prototype,"contentType",void 0),(0,n._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,n._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,i)=>{i.d(t,{Z:()=>d});var r,n=i(43697),s=i(96674),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556);let c=r=class extends s.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new r((0,o.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=r=(0,n._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,n=i(43697),s=(i(66577),i(96674)),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556),c=i(10158),d=i(82971);let m=r=class extends s.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new r((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,n._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,n._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,n._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=r=(0,n._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,i)=>{i.d(t,{Z:()=>_});var r,n=i(43697),s=i(66577),o=i(92835),a=i(35454),l=i(96674),u=i(22974),p=i(5600),c=i(75215),d=i(52011),m=i(30556),h=i(33955);i(67676),i(80442);let y=r=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new r({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=r=(0,n._)([(0,d.j)("esri.rest.support.TopFilter")],y);const f=y;var g,b=i(82971);const v=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),w=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=g=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new g((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,n._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],R.prototype,"distance",void 0),(0,n._)([(0,p.Cb)({types:s.qM,json:{read:h.im,write:!0}})],R.prototype,"geometry",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"objectIds",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),(0,n._)([(0,p.Cb)({type:b.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],R.prototype,"outSpatialReference",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"returnGeometry",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnM",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnZ",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),(0,n._)([(0,m.c)("start"),(0,m.c)("num")],R.prototype,"writeStart",null),(0,n._)([(0,p.Cb)({type:String,json:{read:{source:"spatialRel",reader:v.read},write:{target:"spatialRel",writer:v.write}}})],R.prototype,"spatialRelationship",void 0),(0,n._)([(0,p.Cb)({type:o.Z,json:{write:!0}})],R.prototype,"timeExtent",void 0),(0,n._)([(0,p.Cb)({type:f,json:{write:!0}})],R.prototype,"topFilter",void 0),(0,n._)([(0,p.Cb)({type:String,json:{read:w.read,write:{writer:w.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],R.prototype,"units",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"where",void 0),R=g=(0,n._)([(0,d.j)("esri.rest.support.TopFeaturesQuery")],R),R.from=(0,c.se)(R);const _=R}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4608,5935],{60590:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Lt});var r=i(43697),n=i(51773),s=i(2368),o=i(20102),a=i(16453),l=i(95330),u=i(5600),p=i(75215),c=(i(67676),i(80442),i(52011)),d=i(30556),m=i(87085),h=i(66577),y=i(38171),f=i(30030),g=i(3172),b=i(60235),v=i(22974),w=i(92604),R=i(17445),_=i(17452),S=i(71715),C=i(8744),x=i(21506),F=i(35956),I=i(96674),D=i(45663),T=i(81578);const j={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var N=i(93010),P=i(75509),O=i(23847);const A=new Set(["u1","u2","u4","u8","s8","u16","s16"]),V={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},M=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function Z(e){return M.has(e.type)}function J(e,t){if(!e||!t)return(0,v.d9)(e||t);const i=(0,v.d9)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),E(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(z(i.functionArguments).Raster=t);return i}function E(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&E(e[i].arguments,t))}function q(e){const t=(0,v.d9)(j[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=q(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=U(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function z(e){const t=e?.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?z(t.functionArguments):e}const G={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function H(e,t){const i=A.has(t)?(0,T.r)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function L(e){if(null==e)return;const{fields:t}=e,i=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return i?.name}function B(e){const t=[];return e?.forEach((e=>{const i=e;if(Array.isArray(i))t.push(i);else{if(null==i.min||null==i.max)return;const e=[i.min,i.max,i.avg||0,i.stddev||0];t.push(e)}})),t}function U(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,N.oI)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var Q=i(98974),k=i(69608);let W=class extends I.wq{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new Q.Z({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const n=e.multidimensionalSubset?.areaOfInterest;return n&&(t=this._addClipFunction(t,n)),r&&!i&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&Z(r)?J(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new D.Z;r.functionName="Stretch";const n=G[P.v.toJSON(e.stretchType)],s="u8",o={StretchType:n,Statistics:B(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),n===G.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=s):n===G.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=s):n===G.minMax?r.outputPixelType=s:n===G.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const n=e.colorRamp,s=new D.Z;if(i)s.functionArguments={ColorRamp:(0,N.pM)(n)};else{const i=(0,N.Uh)(n,!0);if(i)s.functionArguments={colorRampName:i};else if(!t.convertColorRampToColormap||"algorithmic"!==n.type&&"multipart"!==n.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),s.functionArguments={colorRamp:t}}else s.functionArguments={Colormap:(0,N.Jw)(n)}}return s.variableName="Raster",s.functionName="Colormap",s.functionArguments.Raster=r,i?new D.Z({rasterFunctionDefinition:q(s)}):s}return i?new D.Z({rasterFunctionDefinition:q(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],n=[],s=[],o=1e-6,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=L(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,i)=>{const r=t.symbol?.color;let n;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(n=o.attributes[e.field],(n>=t.minValue&&n<t.maxValue||i===e.classBreakInfos.length-1&&n>=t.minValue)&&s.push([o.attributes[p],r.r,r.g,r.b]))}))}));const i=a?H(s,a):s,r=new D.Z;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new D.Z({rasterFunctionDefinition:q(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),s.push([t,a.r,a.g,a.b])):n.push(e.minValue,e.maxValue)}));const c=a?H(s,a):s,d=new D.Z;d.functionName="Remap",d.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:n},d.variableName="Raster";const m=new D.Z;return m.functionName="Colormap",m.functionArguments={Colormap:c,Raster:d},t.convertToRFT?new D.Z({rasterFunctionDefinition:q(m)}):m}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:n}=t,s=null==n?null:n.features,o=L(n),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(s){if(o){const t=new Map;l.forEach((e=>{const i=e.value,r=e.symbol?.color;null!=i&&r?.a&&t.set(String(i),r.toRgb())}));const r=e.field;s.forEach((({attributes:e})=>{const n=String(e[r]),s=e[o],l=t.get(n);l?i.push([s,...l]):a&&i.push([s,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],r=t.symbol?.color,n=+t.value;if(r?.a){if(isNaN(n))return null;i.push([n,r.r,r.g,r.b])}}const u=r&&i.length>0?H(i,r):i,p=new D.Z;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new D.Z({rasterFunctionDefinition:q(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,n=r?H(i,r):i,s=new D.Z;return s.functionName="Colormap",s.functionArguments={},s.functionArguments.Colormap=n,t.convertToRFT?new D.Z({rasterFunctionDefinition:q(s)}):s}(e,t);case"vector-field":return function(e,t){const i=new D.Z;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:n}=t,s="vector-uv"===r;let o,a;if(n&&2===n.length){const e=n.map((e=>e.toLowerCase()));o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new O.Z,c={magnitudeBandID:o,directionBandID:a,isUVComponents:s,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:V[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const d=q(i);return t.convertToRFT?D.Z.fromJSON({rasterFunctionDefinition:d}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new D.Z;const r=new D.Z;r.functionName="Hillshade";const n="traditional"===e.hillshadeType?0:1,s="none"===e.scalingType?1:3,o={HillshadeType:n,SlopeType:s,ZFactor:e.zFactor};return 0===n&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===s&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,N.pM)(e.colorRamp):o.Colormap=(0,N.Jw)(e.colorRamp)),i?new D.Z({rasterFunctionDefinition:q(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new D.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new D.Z({rasterFunctionDefinition:q(r)}):r,J(r,e)}_addClipFunction(e,t){return J(new D.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,r._)([(0,u.Cb)()],W.prototype,"layer",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"adjustAspectRatio",null),(0,r._)([(0,d.c)("adjustAspectRatio")],W.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"bandIds",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"compression",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"compressionQuality",null),(0,r._)([(0,d.c)("compressionQuality")],W.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"compressionTolerance",null),(0,r._)([(0,d.c)("compressionTolerance")],W.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"format",null),(0,r._)([(0,u.Cb)({type:String,json:{read:{reader:k.cl.read},write:{writer:k.cl.write}}})],W.prototype,"interpolation",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"noData",null),(0,r._)([(0,u.Cb)({type:String,json:{read:{reader:k.kQ.read},write:{writer:k.kQ.write}}})],W.prototype,"noDataInterpretation",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"pixelType",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"lercVersion",void 0),(0,r._)([(0,d.c)("lercVersion")],W.prototype,"writeLercVersion",null),(0,r._)([(0,u.Cb)({type:Number})],W.prototype,"version",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],W.prototype,"mosaicRule",null),(0,r._)([(0,u.Cb)({json:{write:!0,name:"renderingRule"}})],W.prototype,"rasterFunction",null),W=(0,r._)([(0,c.j)("esri.layers.mixins.ExportImageServiceParameters")],W);var $=i(1231),X=i(99514),K=i(90082),Y=i(29876),ee=i(5847),te=i(25972),ie=i(88281),re=i(99815),ne=i(75993),se=i(80676),oe=i(67058),ae=i(72758),le=i(16306),ue=i(11282),pe=i(82971);let ce=class extends I.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],ce.prototype,"north",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],ce.prototype,"up",void 0),(0,r._)([(0,u.Cb)({type:pe.Z,json:{write:!0}})],ce.prototype,"spatialReference",void 0),ce=(0,r._)([(0,c.j)("esri.rest.support.ImageAngleResult")],ce);const de=ce;var me=i(67900);let he=class extends I.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,u.Cb)({type:Number,json:{read:!0,write:!0}})],he.prototype,"value",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],he.prototype,"displayValue",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{read:!0,write:!0}})],he.prototype,"uncertainty",void 0),he=(0,r._)([(0,c.j)("esri.rest.support.ImageMeasureResultValue")],he);let ye=class extends he{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ye.prototype,"unit",void 0),ye=(0,r._)([(0,c.j)("esri.rest.support.ImageMeasureResultLengthValue")],ye);let fe=class extends he{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.Cb)({type:String,json:{read:me.gV.read,write:me.gV.write}})],fe.prototype,"unit",void 0),fe=(0,r._)([(0,c.j)("esri.rest.support.ImageMeasureResultAreaValue")],fe);let ge=class extends he{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.Cb)({type:String,json:{read:me.CN.read,write:me.CN.write}})],ge.prototype,"unit",void 0),ge=(0,r._)([(0,c.j)("esri.rest.support.ImageMeasureResultAngleValue")],ge);let be=class extends I.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,r._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],be.prototype,"name",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],be.prototype,"sensorName",void 0),be=(0,r._)([(0,c.j)("esri.rest.support.BaseImageMeasureResult")],be);let ve=class extends be{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,u.Cb)({type:fe,json:{read:!0,write:!0}})],ve.prototype,"area",void 0),(0,r._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],ve.prototype,"perimeter",void 0),ve=(0,r._)([(0,c.j)("esri.rest.support.ImageAreaResult")],ve);const we=ve;let Re=class extends be{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],Re.prototype,"distance",void 0),(0,r._)([(0,u.Cb)({type:ge,json:{read:!0,write:!0}})],Re.prototype,"azimuthAngle",void 0),(0,r._)([(0,u.Cb)({type:ge,json:{read:!0,write:!0}})],Re.prototype,"elevationAngle",void 0),Re=(0,r._)([(0,c.j)("esri.rest.support.ImageDistanceResult")],Re);const _e=Re;let Se=class extends be{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],Se.prototype,"height",void 0),Se=(0,r._)([(0,c.j)("esri.rest.support.ImageHeightResult")],Se);const Ce=Se;var xe=i(94139),Fe=i(74889);let Ie=class extends I.wq{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,u.Cb)({type:Fe.Z,json:{write:!0}})],Ie.prototype,"catalogItems",void 0),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],Ie.prototype,"location",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"name",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"objectId",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"processedValues",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"properties",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"value",void 0),Ie=(0,r._)([(0,c.j)("esri.rest.support.ImageIdentifyResult")],Ie);const De=Ie;let Te=class extends I.wq{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,u.Cb)({json:{write:!0}})],Te.prototype,"geometries",void 0),Te=(0,r._)([(0,c.j)("esri.rest.support.ImagePixelLocationResult")],Te);const je=Te;let Ne=class extends be{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,u.Cb)({type:xe.Z,json:{name:"point.value",read:!0,write:!0}})],Ne.prototype,"point",void 0),Ne=(0,r._)([(0,c.j)("esri.rest.support.ImagePointResult")],Ne);const Pe=Ne;let Oe=class extends I.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"attributes",void 0),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],Oe.prototype,"location",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"locationId",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"rasterId",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"resolution",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"pixelValue",void 0),Oe=(0,r._)([(0,c.j)("esri.rest.support.ImageSample")],Oe);const Ae=Oe;let Ve=class extends I.wq{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,u.Cb)({type:[Ae],json:{write:!0}})],Ve.prototype,"samples",void 0),Ve=(0,r._)([(0,c.j)("esri.rest.support.ImageSampleResult")],Ve);const Me=Ve;function Ze(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function Je(e,t,i){const r=(0,ue.en)(e),n=t.geometry?[t.geometry]:[],s=await(0,le.aX)(n),o=t.toJSON();Ze(o);const a=s?.[0];null!=a&&(o.geometry=a.toJSON());const l=(0,ue.cv)({...r.query,f:"json",...o});return(0,ue.lA)(l,i)}async function Ee(e,t,i){const r=(0,ue.en)(e),n=t.geometry?[t.geometry]:[];return(0,le.aX)(n).then((e=>{const n=t.toJSON(),s=e?.[0];null!=s&&(n.geometry=JSON.stringify(s.toJSON()));const o=(0,ue.cv)({...r.query,f:"json",...n}),a=(0,ue.lA)(o,i);return(0,g.Z)(r.path+"/identify",a)})).then((e=>De.fromJSON(e.data)))}async function qe(e,t,i,r){const n=(0,ue.en)(e),s=await(0,le.aX)(i),o=t.toJSON();null!=s[0]&&(o.fromGeometry=JSON.stringify(ze(s[0]))),null!=s[1]&&(o.toGeometry=JSON.stringify(ze(s[1])));const a=(0,ue.cv)({...n.query,f:"json",...o}),l=(0,ue.lA)(a,r),{data:u}=await(0,g.Z)(n.path+"/measure",l);return u}function ze(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=Ge(e.spatialReference)),t}function Ge(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function He(e,t){if(!e.imageCoordinateSystem)return(0,C.B9)(e);const i=Ge(e),{icsid:r,icsns:n}=i;return null==r||null!=n&&!t?.toLowerCase().includes("/"+n.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}i(10158);var Le,Be=i(4967),Ue=(i(68773),i(40330),i(2109),i(98732),i(6570)),Qe=(i(9361),i(65091)),ke=i(38913),We=(i(58901),i(45091),i(14165)),$e=(i(98326),i(56545),i(41818)),Xe=i(5396),Ke=(i(75935),i(28141),i(26059)),Ye=i(36679);let et=Le=class extends I.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Le((0,v.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,u.Cb)({type:[String],json:{name:"angleName",write:!0}})],et.prototype,"angleNames",void 0),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],et.prototype,"point",void 0),(0,r._)([(0,u.Cb)({type:pe.Z,json:{write:!0}})],et.prototype,"spatialReference",void 0),(0,r._)([(0,u.Cb)({type:p.z8,json:{write:!0}})],et.prototype,"rasterId",void 0),et=Le=(0,r._)([(0,c.j)("esri.rest.support.ImageAngleParameters")],et);const tt=et;var it=i(33955);const rt=new(i(35454).X)({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let nt=class extends I.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var st;(0,r._)([(0,u.Cb)()],nt.prototype,"type",void 0),(0,r._)([(0,u.Cb)({type:rt.apiValues,json:{read:rt.read,write:rt.write}})],nt.prototype,"measureOperation",void 0),(0,r._)([(0,u.Cb)({type:Q.Z,json:{write:!0}})],nt.prototype,"mosaicRule",void 0),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],nt.prototype,"pixelSize",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],nt.prototype,"raster",void 0),nt=(0,r._)([(0,c.j)("esri.rest.support.BaseImageMeasureParameters")],nt);let ot=st=class extends nt{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new st((0,v.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.Cb)({types:h.qM,json:{name:"fromGeometry",read:!0,write:!0}})],ot.prototype,"geometry",void 0),(0,r._)([(0,d.c)("geometry")],ot.prototype,"writeGeometry",null),(0,r._)([(0,u.Cb)({type:rt.apiValues,json:{write:rt.write}})],ot.prototype,"measureOperation",null),(0,r._)([(0,u.Cb)({json:{read:!0}})],ot.prototype,"is3D",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ot.prototype,"linearUnit",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:me.gV.read,write:me.gV.write}})],ot.prototype,"areaUnit",void 0),ot=st=(0,r._)([(0,c.j)("esri.rest.support.ImageAreaParameters")],ot);const at=ot;var lt;let ut=lt=class extends nt{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new lt((0,v.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.Cb)({type:xe.Z,json:{read:!0,write:!0}})],ut.prototype,"fromGeometry",void 0),(0,r._)([(0,d.c)("fromGeometry")],ut.prototype,"writeFromGeometry",null),(0,r._)([(0,u.Cb)({type:xe.Z,json:{read:!0,write:!0}})],ut.prototype,"toGeometry",void 0),(0,r._)([(0,u.Cb)({type:rt.apiValues,json:{write:rt.write}})],ut.prototype,"measureOperation",null),(0,r._)([(0,u.Cb)({json:{read:!0}})],ut.prototype,"is3D",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ut.prototype,"linearUnit",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:me.CN.read,write:me.CN.write}})],ut.prototype,"angularUnit",void 0),ut=lt=(0,r._)([(0,c.j)("esri.rest.support.ImageDistanceParameters")],ut);const pt=ut;var ct;let dt=ct=class extends nt{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new ct((0,v.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.Cb)({type:xe.Z,json:{read:!0}})],dt.prototype,"fromGeometry",void 0),(0,r._)([(0,d.c)("fromGeometry")],dt.prototype,"writeFromGeometry",null),(0,r._)([(0,u.Cb)({type:xe.Z,json:{read:!0,write:!0}})],dt.prototype,"toGeometry",void 0),(0,r._)([(0,u.Cb)({type:rt.apiValues,json:{write:rt.write}})],dt.prototype,"measureOperation",null),(0,r._)([(0,u.Cb)({json:{read:!0}})],dt.prototype,"operationType",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],dt.prototype,"linearUnit",void 0),dt=ct=(0,r._)([(0,c.j)("esri.rest.support.ImageHeightParameters")],dt);const mt=dt;var ht,yt=i(79681),ft=i(92835);let gt=ht=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}get renderingRule(){return(0,b.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,b.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,b.Mr)(w.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,b.Mr)(w.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=D.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,n=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=n?`${r},${n}`:`${r}`:null}}clone(){return new ht((0,v.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"geometry",void 0),(0,r._)([(0,d.c)("geometry")],gt.prototype,"writeGeometry",null),(0,r._)([(0,u.Cb)({type:Q.Z,json:{write:!0}})],gt.prototype,"mosaicRule",null),(0,r._)([(0,d.c)("mosaicRule")],gt.prototype,"writeMosaicRule",null),(0,r._)([(0,u.Cb)({type:D.Z})],gt.prototype,"renderingRule",null),(0,r._)([(0,u.Cb)({type:[D.Z]})],gt.prototype,"renderingRules",null),(0,r._)([(0,u.Cb)({type:D.Z,json:{write:!0,name:"renderingRule"}})],gt.prototype,"rasterFunction",null),(0,r._)([(0,d.c)("rasterFunction")],gt.prototype,"writeRasterFunction",null),(0,r._)([(0,u.Cb)({type:[D.Z],json:{write:!0,name:"renderingRules"}})],gt.prototype,"rasterFunctions",void 0),(0,r._)([(0,d.c)("rasterFunctions")],gt.prototype,"writeRasterFunctions",null),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],gt.prototype,"pixelSize",void 0),(0,r._)([(0,d.c)("pixelSize")],gt.prototype,"writePixelSize",null),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnGeometry",void 0),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnCatalogItems",void 0),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnPixelValues",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],gt.prototype,"maxItemCount",void 0),(0,r._)([(0,u.Cb)({type:ft.Z,json:{write:{target:"time"}}})],gt.prototype,"timeExtent",void 0),(0,r._)([(0,d.c)("timeExtent")],gt.prototype,"writeTimeExtent",null),(0,r._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"raster",void 0),(0,r._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"viewId",void 0),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"processAsMultidimensional",void 0),gt=ht=(0,r._)([(0,c.j)("esri.rest.support.ImageIdentifyParameters")],gt);const bt=gt;var vt;let wt=vt=class extends I.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new vt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,u.Cb)({type:[xe.Z],json:{write:!0}})],wt.prototype,"geometries",void 0),(0,r._)([(0,d.c)("geometries")],wt.prototype,"writeGeometry",null),(0,r._)([(0,u.Cb)({type:p.z8,json:{write:!0}})],wt.prototype,"rasterId",void 0),wt=vt=(0,r._)([(0,c.j)("esri.rest.support.ImagePixelLocationParameters")],wt);const Rt=wt;var _t;let St=_t=class extends nt{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new _t((0,v.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.Cb)({types:h.qM,json:{name:"fromGeometry",read:it.im}})],St.prototype,"geometry",void 0),(0,r._)([(0,d.c)("geometry")],St.prototype,"writeGeometry",null),(0,r._)([(0,u.Cb)({type:rt.apiValues,json:{read:rt.read,write:rt.write}})],St.prototype,"measureOperation",null),(0,r._)([(0,u.Cb)({json:{read:!0}})],St.prototype,"is3D",void 0),St=_t=(0,r._)([(0,c.j)("esri.rest.support.ImagePointParameters")],St);const Ct=St;var xt;let Ft=xt=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,it.Ji)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new Qe.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new xt((0,v.d9)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.Cb)({types:h.qM,json:{read:it.im}})],Ft.prototype,"geometry",void 0),(0,r._)([(0,d.c)("geometry")],Ft.prototype,"writeGeometry",null),(0,r._)([(0,u.Cb)()],Ft.prototype,"locations",null),(0,r._)([(0,u.Cb)({type:String,json:{type:k.cl.jsonValues,read:k.cl.read,write:k.cl.write}})],Ft.prototype,"interpolation",void 0),(0,r._)([(0,u.Cb)({type:Q.Z,json:{write:!0}})],Ft.prototype,"mosaicRule",void 0),(0,r._)([(0,u.Cb)({type:[String],json:{write:!0}})],Ft.prototype,"outFields",void 0),(0,r._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],Ft.prototype,"pixelSize",void 0),(0,r._)([(0,u.Cb)({type:String,json:{write:!0}})],Ft.prototype,"raster",void 0),(0,r._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],Ft.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],Ft.prototype,"sampleDistance",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],Ft.prototype,"sampleCount",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],Ft.prototype,"sliceId",void 0),(0,r._)([(0,u.Cb)({type:ft.Z,json:{read:{source:"time"},write:{target:"time"}}})],Ft.prototype,"timeExtent",void 0),Ft=xt=(0,r._)([(0,c.j)("esri.rest.support.ImageSampleParameters")],Ft);const It=Ft;var Dt=i(23808);const Tt=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),jt=(0,u.Eg)(p.q9,{min:0,max:255}),Nt=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new W({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?Q.Z.fromJSON(t):null}get fieldsIndex(){return this.fields?new X.Z(this.fields):null}set format(e){e&&Tt.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?Q.Z.fromJSON(i):this._isMosaicRuleSupported(t)?Q.Z.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const n=this.definitionExpression;r?n&&n!==r.where&&(r=r.clone(),r.where=n):n&&(r=new Q.Z({where:n})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=jt(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i?.name}return e}get parsedUrl(){return(0,_.mN)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,n=(0,f.ij)(r,i);return null==n?null:("vector-field"===n.type&&t.symbolTileSize&&!r.symbolTileSize&&(n.symbolTileSize=t.symbolTileSize),Z(n)||w.Z.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),n)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix,t=new $.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new $.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new $.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let n=this.fields?(0,v.d9)(this.fields):[];n.push(i),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&n.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&n.push(r),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{n.push(new $.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(n.push(new $.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),n.push(new $.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:s}=this.rasterInfo??{};if(null!=s){const t=s.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const i=(0,v.d9)(t);return i.name=e+t.name,i}));n=n.concat(t)}return n}get renderingRule(){return(0,b.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this.rasterFunction}set renderingRule(e){(0,b.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=D.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?D.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):D.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?pe.Z.fromJSON(i):null}readPixelType(e){return k.sM.fromJSON(e)||e}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=k.sM.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:n,pixelFilter:s,bandIds:o}=this;if(!this._isPicture()&&r&&n&&!s){const s=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(r.toJSON()),a=this._rasterJobHandler.instance;if(a){s&&(n.bind(),await a.updateSymbolizer(n,t),this._cachedRendererJson=r.toJSON());const l=await a.symbolize({bandIds:o,...e},t);i={extent:e.extent,pixelBlock:l}}else i={extent:e.extent,pixelBlock:n.symbolize({bandIds:o,...e})}}return i}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new o.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,p.TJ)(tt,e).clone(),async function(e,t,i){const r=t.toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=Ge(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(r.spatialReference=He(t.spatialReference));const n=(0,ue.en)(e),s=(0,ue.cv)({...n.query,f:"json",...r}),o=(0,ue.lA)(s,i),{data:a}=await(0,g.Z)(`${n.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new pe.Z({wkid:0,imageCoordinateSystem:a.spatialReference}):pe.Z.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new de(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,p.TJ)(Rt,e).clone(),async function(e,t,i){const r=t.toJSON(),{geometries:n}=t;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=Ge(n[e].spatialReference));const s=(0,ue.en)(e),o=(0,ue.cv)({...s.query,f:"json",...r}),a=(0,ue.lA)(o,i),{data:l}=await(0,g.Z)(`${s.path}/computePixelLocation`,a);return je.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,p.TJ)(yt.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Je(e,t,i),n=(0,ue.en)(e),{data:s}=await(0,g.Z)(`${n.path}/computeHistograms`,r);return{histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new o.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,p.TJ)(yt.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Je(e,t,i),n=(0,ue.en)(e),{data:s}=await(0,g.Z)(`${n.path}/computeStatisticsHistograms`,r),{statistics:o}=s;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new o.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,p.TJ)(mt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await qe(e,t,[t.fromGeometry,t.toGeometry],i);return Ce.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new o.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,p.TJ)(at,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await qe(e,t,[t.geometry],i);return we.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new o.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,p.TJ)(pt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await qe(e,t,[t.fromGeometry,t.toGeometry],i);return _e.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new o.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,p.TJ)(Ct,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await qe(e,t,[t.geometry],i);return Pe.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async fetchImage(e,t,r,n={}){if(null==e||null==t||null==r)throw new o.Z("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:n.signal});e&&(this.rasterInfo=e)}const s=this.getExportImageServiceParameters(e,t,r,n.timeExtent);if(null==s){if(n.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,n.returnImageBitmap?{imageBitmap:await(0,K.g)(e,`${i(this.parsedUrl)}/exportImage`,n.signal)}:{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:o}=this,a=(s?.length||o.bandCount)??0,l=t*r,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(ee.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ee.Z({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!n.requestAsImageElement&&!this.pixelFilter,l=a&&!!n.returnImageBitmap,u={imageServiceParameters:s,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:a,returnImageBitmap:l,signal:n.signal};return this._requestArrayBuffer(u)}fetchKeyProperties(e){return(0,g.Z)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new o.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,g.Z)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>Fe.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ue.en)(e),n=(0,ue.cv)({...r?.query,f:"json"}),s=(0,ue.lA)(n,i),o=`${r?.path}/${t}/info`,a=(0,g.Z)(`${o}`,s),l=(0,g.Z)(`${o}/keyProperties`,s),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let d=null;p.statistics?.length&&(d=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const m=Ue.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),y=Math.ceil(m.height/p.pixelSizeY-.1),f=m.spatialReference,b=new xe.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:f}),v=p.histograms?.length?p.histograms:null,w=new Ye.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new te.Z({width:h,height:y,bandCount:p.bandCount,extent:m,spatialReference:f,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:v,keyProperties:c,storageInfo:w})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,g.Z)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),n=r?.ics;if(!n)return;let s=null;try{s=(await(0,g.Z)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s||!s.spatialReference)return{ics:n,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,g.Z)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=s.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:(0,C.B9)(a),outSR:"0:"+e},u=(0,g.Z)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(s.xmin+s.xmax)/2,c=(s.ymax-s.ymin)/6,d=s.ymin+c,m=[];for(let e=0;e<5;e++)m.push({x:p,y:d+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:m}),inSR:(0,C.B9)(a),outSR:"0:"+e},y=(0,g.Z)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),f=await Promise.all([o,u,y]);let b=f[0].ipxf;if(null==b){const e=n.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(b={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=Ue.Z.fromJSON(f[1]?.geometries?.[0]);v&&(v.spatialReference=new pe.Z({wkid:0,imageCoordinateSystem:n}));const w=f[2].geometries?f[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],R=w.length;if(R<3)return{ics:n,icsToPixelTransform:b,icsExtent:v,northDirection:null};let _=0,S=0,x=0,F=0;for(let e=0;e<R;e++)_+=w[e].x,S+=w[e].y,x+=w[e].x*w[e].x,F+=w[e].x*w[e].y;const I=(R*F-_*S)/(R*x-_*_);let D=0;const T=w[4].x>w[0].x,j=w[4].y>w[0].y;return I===1/0?D=j?90:270:0===I?D=T?0:180:I>0?D=T?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(D=j?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:n,icsToPixelTransform:b,icsExtent:v,northDirection:D}}async generateRasterInfo(e,t){if(e=(0,p.TJ)(D.Z,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const r=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),i=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return i?i.join("/"):null}(e);if(!r)throw new o.Z("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const n={...t,query:this._getQueryParams()},s=(0,Ke.Nb)(i(this.parsedUrl),e,n);this._functionRasterInfos[r]=s;try{return await s}catch(e){throw this._functionRasterInfos[r]=null,e}}getExportImageServiceParameters(e,t,r,n){const s=He((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;o.bandIds=void 0}else o.bandIds=a?.join(",");l instanceof Array&&l.length>0&&(o.noData=l.join(","));const d=this._processMultidimensionalIntersection(null,n,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,n=d.timeExtent,o.renderingRule=this._getRenderingRuleString(D.Z.fromJSON(u));const m={};if(null!=n){const{start:e,end:t}=n.toJSON();e&&t&&e===t?m.time=""+e:null==e&&null==t||(m.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:s,imageSR:s,size:t+","+r,...o,...m}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new o.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,p.TJ)(It,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=t.toJSON();Ze(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const n=await(0,le.aX)(t.geometry),s=n?.[0];null!=s&&(r.geometry=s.toJSON());const o=(0,ue.en)(e),a=(0,ue.cv)({...o.query,f:"json",...r}),l=(0,ue.lA)(a,i),{data:u}=await(0,g.Z)(`${o.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return Me.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,p.TJ)(bt,e).clone(),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=ke.Z.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new o.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:n}=this;return n&&null==e.rasterFunction&&(e.rasterFunction=n),r&&null==e.raster&&(e.raster=r),Ee(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new We.Z;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Be.e)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Xe.G)(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,$e.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:n,showNoDataRecords:s}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some((e=>!e.toLowerCase().includes(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(p)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new D.Z({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some((e=>e.functionName===i.functionName))&&(l.push(i),u.push(i.functionName))}const d=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let h=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:i}=(0,re.W2)(m,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new o.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(h=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h);let f=e.geometry;this.version<10.91&&"extent"===f?.type&&(f=ke.Z.fromExtent(f));const g=this._getQueryParams({geometry:f,timeExtent:h,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:a,returnGeometry:d,raster:this.raster,maxItemCount:n?1:null});delete g.f;const b=new bt(g);try{await this._generateRasterInfo(this.rasterFunction);const i=await Ee(this.url,b,{signal:t?.signal,query:{...this.customParameters}}),n=e.outFields,o=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!a||d||!i?.catalogItems?.features.length||!s&&o)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:s,templateFields:n});const l=this.objectIdField||"ObjectId",p=i.catalogItems?.features??[],c=p.map((e=>e.attributes?.[l])),m=new We.Z({objectIds:c,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),h=await this.queryRasters(m);return h?.features?.length&&h.features.forEach((t=>{p.forEach((i=>{i.attributes[l]===t.attributes[l]&&(i.geometry=new ke.Z(t.geometry),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:s,templateFields:n})}catch{throw new o.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,g.Z)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),n=(0,g.Z)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([r,n]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,Dt.GE)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,re.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Ke.gh)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,Ke.n$)(e,t),e))),n=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([r,n,s]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),w.Z.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,R.YP)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:n}=i,s=r.variables.some((e=>e.dimensions.some((e=>e.name===n))))?n:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==s)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter((e=>e.dimensionName===s)),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach((e=>{e.dimensionName===s&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))}));else if(!c){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=s,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new F.Z({variableName:"",dimensionName:s,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new o.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,p.TJ)(We.Z,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new ie.Z;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,oe.U0)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:n}=await(0,g.Z)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,n&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new o.Z("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),n=i?.ResampleType||i?.resampleType;return r&&(7===n||10===n)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&i.bandCount>=3){const e=(0,oe.YD)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,oe.Ob)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,oe.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=i):this.symbolizer=new ae.Z({rendererJSON:t,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,ne.J)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await(0,g.Z)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:n,signal:s}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:o}=await(0,g.Z)(r,{responseType:n?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:s});return o instanceof Blob?{imageBitmap:await(0,K.g)(o,r,s),params:t}:{imageOrCanvasElement:o,params:t}}const a=this._initJobHandler(),l=(0,g.Z)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s}),u=(await Promise.all([l,a]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,ne.y)(u)),!c)throw new o.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const d={signal:s},m="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,ne.J)(u,{useCanvas:!0,...t},d):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},d);return{pixelData:{pixelBlock:await m,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,re.Tj)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new Q.Z;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:n,returnDomainValues:s,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),d=[];if(i&&!l&&!c){const e={};e[p]=0,u=[i],l=[new y.Z(this.fullExtent,null,e)]}if(!l)return[];let m,h,f;this._updateResponseFieldNames(l,o),c&&!n&&(l=[]);for(let e=0;e<l.length;e++){if(m=l[e],null!=i){if(h=u[e],f=this.rasterFunction&&a&&a.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?a[r.indexOf(this.rasterFunction.functionName)]:i,"nodata"===h.toLowerCase()&&!n)continue;const t="Raster.ItemPixelValue",s="Raster.ServicePixelValue";m.attributes[t]=h,m.attributes[s]=f,this._updateFeatureWithMagDirValues(m,h);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?h:i:f;this.rasterFunction||(l=o?h:i),this._updateFeatureWithRasterAttributeTableValues(m,l)}if(m.sourceLayer=m.layer=this,s&&this._updateFeatureWithDomainValues(m),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];m.attributes[t]=a[e]}d.push(l[e])}return d}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:n}=(0,re.W2)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=n?.timeExtent&&(t=n.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,re.W2)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:n}=i,s=n.map((e=>e.name)).find((e=>"value"===e.toLowerCase()));if(!s)return;const o=r.filter((e=>e.attributes[s]===(null!=t?parseInt(t,10):null)));o&&o[0]&&n.forEach((t=>{const i=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=o[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),n=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),s=new ee.Z({height:1,width:1,pixelType:"f32",pixels:r,statistics:n});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:s,extent:new Ue.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[s.pixels[0][0],s.pixels[1][0]]:(0,se.Tg)([s.pixels[0][0],s.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach((e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&e instanceof yt.Z&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:n}=e,s=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:i>=10.7&&o,supportsComputePixelLocation:i>=10.7&&t.includes("catalog"),supportsComputeAngles:i>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:n,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function i(e){return e?.path??""}return(0,r._)([(0,u.Cb)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,u.Cb)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,u.Cb)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,S.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,u.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,u.Cb)({type:[p.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,S.r)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,S.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,u.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,d.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,d.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,S.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,u.Cb)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,type:[$.Z]})],t.prototype,"fields",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,u.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,S.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,u.Cb)({type:Ue.Z})],t.prototype,"fullExtent",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,u.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,u.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,u.Cb)({type:String,json:{type:k.cl.jsonValues,read:k.cl.read,write:k.cl.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,u.Cb)()],t.prototype,"minScale",void 0),(0,r._)([(0,S.r)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,u.Cb)()],t.prototype,"maxScale",void 0),(0,r._)([(0,S.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,u.Cb)({type:Q.Z})],t.prototype,"mosaicRule",null),(0,r._)([(0,S.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,d.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,u.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,u.Cb)({type:Y.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,u.Cb)({json:{type:p.z8}})],t.prototype,"noData",void 0),(0,r._)([(0,d.c)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,u.Cb)({type:String,json:{type:k.kQ.jsonValues,read:k.kQ.read,write:k.kQ.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,S.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,r._)([(0,u.Cb)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,u.Cb)({})],t.prototype,"types",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,u.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,u.Cb)()],t.prototype,"raster",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,S.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,u.Cb)()],t.prototype,"viewId",void 0),(0,r._)([(0,u.Cb)({types:f.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:f.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,r._)([(0,S.r)("renderer")],t.prototype,"readRenderer",null),(0,r._)([(0,d.c)("renderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,u.Cb)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,r._)([(0,u.Cb)(x.Oh)],t.prototype,"opacity",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,u.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,u.Cb)({type:D.Z})],t.prototype,"renderingRule",null),(0,r._)([(0,u.Cb)({type:D.Z,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,r._)([(0,S.r)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,r._)([(0,u.Cb)({readOnly:!0,type:pe.Z})],t.prototype,"spatialReference",void 0),(0,r._)([(0,S.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,u.Cb)({json:{type:k.sM.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,S.r)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,d.c)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,u.Cb)({constructOnly:!0,type:te.Z})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,u.Cb)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,u.Cb)(x.HQ)],t.prototype,"url",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,S.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,c.j)("esri.layers.mixins.ArcGISImageService")],t),t};var Pt=i(17287),Ot=i(71612),At=i(17017),Vt=i(38009),Mt=i(16859),Zt=i(34760),Jt=i(72965),Et=i(28294),qt=i(60199),zt=i(32163),Gt=i(12259);let Ht=class extends((0,Ot.h)((0,Et.n)((0,Jt.M)((0,Vt.q)((0,Mt.I)(Nt((0,Zt.Q)((0,At.N)((0,Pt.Y)((0,a.R)((0,s.J)(m.Z)))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.Ds)((async(e,t,r)=>{const{save:n,saveAs:s}=await i.e(4697).then(i.bind(i,64697));switch(e){case Gt.x.SAVE:return n(this,t);case Gt.x.SAVE_AS:return s(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const t=this.rasterFields,i=this.title,r=new Set;let n=!1,s=!1;this.capabilities&&(n=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,s="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;n&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||r.add(e.name)}s&&r.add("raster.magnitude").add("raster.direction");const a=(0,zt.eZ)({fields:t,title:i},{...e,visibleFieldNames:r});return a?.fieldInfos&&this.rasterInfo?.pixelType.startsWith("f")&&a.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),a}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(Gt.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Gt.x.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,qt.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.Z("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,r._)([(0,u.Cb)(x.rn)],Ht.prototype,"legendEnabled",null),(0,r._)([(0,u.Cb)({type:["show","hide"]})],Ht.prototype,"listMode",null),(0,r._)([(0,u.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ht.prototype,"isReference",void 0),(0,r._)([(0,u.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Ht.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.c)("web-map","operationalLayerType")],Ht.prototype,"writeOperationalLayerType",null),(0,r._)([(0,u.Cb)(x.C_)],Ht.prototype,"popupEnabled",void 0),(0,r._)([(0,u.Cb)({type:n.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Ht.prototype,"popupTemplate",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],Ht.prototype,"defaultPopupTemplate",null),(0,r._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],Ht.prototype,"type",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],Ht.prototype,"_isPreviewLayer",null),Ht=(0,r._)([(0,c.j)("esri.layers.ImageryLayer")],Ht);const Lt=Ht},90082:(e,t,i)=>{i.d(t,{V:()=>o,g:()=>s});var r=i(20102),n=i(95330);async function s(e,t,i){let s;try{s=await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.k_)(i),s}async function o(e,t,i,s,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load tile ${t}/${i}/${s}`,{error:e,level:t,row:i,col:s})}return(0,n.k_)(o),a}},60199:(e,t,i)=>{i.d(t,{D:()=>s});var r=i(66677);const n=[];function s(e,t){if((0,r.M8)(e.url??""))return!0;const{wkid:i}=t;for(const t of n){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}n.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),n.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),n.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),n.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),n.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),n.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),n.push([10.61,()=>new Set([102497])]),n.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}])},41818:(e,t,i)=>{i.d(t,{P:()=>o});var r=i(11282),n=i(34599),s=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,n.hH)(o,s.Z.from(t),{...i}).then((e=>e.data.count))}},5396:(e,t,i)=>{i.d(t,{G:()=>o});var r=i(11282),n=i(34599),s=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,n.Ev)(o,s.Z.from(t),{...i}).then((e=>e.data.objectIds))}},4967:(e,t,i)=>{i.d(t,{F:()=>l,e:()=>a});var r=i(11282),n=i(34599),s=i(74889),o=i(14165);async function a(e,t,i){const r=await l(e,t,i);return s.Z.fromJSON(r)}async function l(e,t,i){const s=(0,r.en)(e),a={...i},l=o.Z.from(t),{data:u}=await(0,n.JT)(s,l,l.sourceSpatialReference,a);return u}},28694:(e,t,i)=>{i.d(t,{p:()=>n});var r=i(69285);function n(e,t,i){if(!i?.features||!i.hasZ)return;const n=(0,r.k)(i.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of i.features)n(e.geometry)}},98326:(e,t,i)=>{i.d(t,{Z:()=>c});var r,n=i(43697),s=i(96674),o=i(5600),a=i(75215),l=(i(67676),i(80442),i(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=r=class extends s.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const n=t.find((e=>e.name===i));return n?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r?.value||null}({tagName:r,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,o.Cb)({type:String})],p.prototype,"contentType",void 0),(0,n._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,n._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,i)=>{i.d(t,{Z:()=>d});var r,n=i(43697),s=i(96674),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556);let c=r=class extends s.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new r((0,o.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=r=(0,n._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,n=i(43697),s=(i(66577),i(96674)),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556),c=i(10158),d=i(82971);let m=r=class extends s.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new r((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,n._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,n._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,n._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=r=(0,n._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,i)=>{i.d(t,{Z:()=>_});var r,n=i(43697),s=i(66577),o=i(92835),a=i(35454),l=i(96674),u=i(22974),p=i(5600),c=i(75215),d=i(52011),m=i(30556),h=i(33955);i(67676),i(80442);let y=r=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new r({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=r=(0,n._)([(0,d.j)("esri.rest.support.TopFilter")],y);const f=y;var g,b=i(82971);const v=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),w=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=g=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new g((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,n._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],R.prototype,"distance",void 0),(0,n._)([(0,p.Cb)({types:s.qM,json:{read:h.im,write:!0}})],R.prototype,"geometry",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"objectIds",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),(0,n._)([(0,p.Cb)({type:b.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],R.prototype,"outSpatialReference",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"returnGeometry",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnM",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnZ",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),(0,n._)([(0,m.c)("start"),(0,m.c)("num")],R.prototype,"writeStart",null),(0,n._)([(0,p.Cb)({type:String,json:{read:{source:"spatialRel",reader:v.read},write:{target:"spatialRel",writer:v.write}}})],R.prototype,"spatialRelationship",void 0),(0,n._)([(0,p.Cb)({type:o.Z,json:{write:!0}})],R.prototype,"timeExtent",void 0),(0,n._)([(0,p.Cb)({type:f,json:{write:!0}})],R.prototype,"topFilter",void 0),(0,n._)([(0,p.Cb)({type:String,json:{read:w.read,write:{writer:w.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],R.prototype,"units",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"where",void 0),R=g=(0,n._)([(0,d.j)("esri.rest.support.TopFeaturesQuery")],R),R.from=(0,c.se)(R);const _=R}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4697],{65845:(e,t,r)=>{r.d(t,{D:()=>i});var a=r(81153);function i(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>a})},64697:(e,t,r)=>{r.d(t,{save:()=>c,saveAs:()=>d});var a=r(64383),i=r(14661);const n="Image Service",o="imagery-layer-save",l="imagery-layer-save-as",s="imagery-tile-layer-save",p="imagery-tile-layer-save-as";function u(e){if("imagery"===e.type)return{isValid:!0};const{raster:t}=e,r="Function"===t?.datasetFormat?t.primaryRasters?.rasters[0]:t;return{isValid:"RasterTileServer"===r?.datasetFormat&&("Raster"===r.tileType||"Map"===r.tileType),errorMessage:"imagery tile layer should be created from a tiled image service."}}function m(e){const t=e.layerJSON;return Promise.resolve(t&&Object.keys(t).length?t:null)}async function y(e,t){const{parsedUrl:r,title:a,fullExtent:n}=e;t.url=r.path,t.title||=a,t.extent=await(0,i.$o)(n),"imagery-tile"===e.type&&(0,i.qj)(t,i.Kz.TILED_IMAGERY)}async function c(e,t){const r="imagery"===e.type?o:s;return(0,a.a1)({layer:e,itemType:n,validateLayer:u,createItemData:m,errorNamePrefix:r},t)}async function d(e,t,r){const i="imagery"===e.type?l:p;return(0,a.po)({layer:e,itemType:n,validateLayer:u,createItemData:m,errorNamePrefix:i,newItem:t,setItemProperties:y},r)}},64383:(e,t,r)=>{r.d(t,{a1:()=>g,po:()=>v});var a=r(20102),i=r(65845),n=r(48522),o=r(15235),l=r(33516),s=r(14661),p=r(14769);async function u(e){const{layer:t,errorNamePrefix:r,validateLayer:i}=e;await t.load(),function(e,t,r){const i=r(e);if(!i.isValid)throw new a.Z(`${t}:invalid-parameters`,i.errorMessage,{layer:e})}(t,r,i)}function m(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function y(e){const{item:t,itemType:r,errorNamePrefix:i,layer:n,validateItem:o}=e;if((0,p.w)(t),t.type!==r)throw new a.Z(`${i}:portal-item-wrong-type`,`Portal item type should be "${r}"`,{item:t,layer:n});if(o){const e=o(t);if(!e.isValid)throw new a.Z(`${i}:invalid-parameters`,e.errorMessage,{layer:n})}}function c(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:i}=t;if(!i)throw new a.Z(`${r}:portal-item-not-set`,m(t,"requires the portalItem property to be set"));if(!i.loaded)throw new a.Z(`${r}:portal-item-not-loaded`,m(t,"cannot be saved to a portal item that does not exist or is inaccessible"));y({...e,item:i})}function d(e){const{newItem:t,itemType:r}=e;let a=o.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=n.Z.getDefault(),y({...e,item:a}),a}async function f(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const i=e.write({},t);return function(e,t){let r=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.Z(e,t,r)));if(t?.ignoreUnsupported&&(r=r.filter((({name:e})=>"layer:unsupported"!==e&&"symbol:unsupported"!==e&&"symbol-layer:unsupported"!==e&&"property:unsupported"!==e&&"url:unsupported"!==e))),r.length>0)throw new a.Z("layer-write:unsupported","Failed to save layer due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}(t,r),i}function w(e){(0,s.qj)(e,s.Kz.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function g(e,t){const{layer:r,createItemData:a,createJSONContext:n}=e;await u(e),c(e);const o=r.portalItem,s=n?n(o):(0,l.Yv)(o),p=await f(r,s,t),m=await a({layer:r,layerJSON:p},o);return w(o),await o.update({data:m}),(0,i.D)(s),o}async function v(e,t){const{layer:r,createItemData:a,createJSONContext:n,setItemProperties:o}=e;await u(e);const s=d(e),p=n?n(s):(0,l.Yv)(s),m=await f(r,p,t),y=await a({layer:r,layerJSON:m},s);return await o(r,s),w(s),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(s,y,t),r.portalItem=s,(0,i.D)(p),s}},33516:(e,t,r)=>{r.d(t,{M4:()=>s,Yv:()=>o,ht:()=>n,wk:()=>l});var a=r(17452),i=r(48522);function n(e){return{origin:"portal-item",url:(0,a.mN)(e.itemUrl),portal:e.portal||i.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function o(e){return{origin:"portal-item",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||i.Z.getDefault(),portalItem:e}}function l(e){return{origin:"web-map",url:(0,a.mN)(e.itemUrl),portal:e.portal||i.Z.getDefault(),portalItem:e,readResourcePaths:[]}}function s(e){return{origin:"web-map",messages:[],writtenProperties:[],url:e.itemUrl?(0,a.mN)(e.itemUrl):null,portal:e.portal||i.Z.getDefault(),portalItem:e}}},14769:(e,t,r)=>{r.d(t,{w:()=>o});var a=r(68773),i=r(20102),n=r(71058);function o(e){if(a.default.apiKey&&(0,n.r)(e.portal.url))throw new i.Z("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}}}]);