@arcgis/core 5.1.0-next.67 → 5.1.0-next.69

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 (132) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{2e1aecdf59ad3421bbad.js → 0e2e4cb34ac6aac88ebf.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{38816f95e801f1c5bbad.js → 1c742bfe3b0aa51823d1.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{27262083d37fe623ca9c.js → 210629f3c28d4339c655.js} +1 -1
  5. package/assets/esri/core/workers/chunks/27643750dce502fedef3.js +1 -0
  6. package/assets/esri/core/workers/chunks/29878b52aa12b3815230.js +1 -0
  7. package/assets/esri/core/workers/chunks/{7fb9a5bc22d7581f1d20.js → 29b1a4ce7646b403008e.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{eb7392799a01c2a8497a.js → 2da62687ff678b690839.js} +1 -1
  9. package/assets/esri/core/workers/chunks/2fd4220131bfc3f5e2dd.js +1 -0
  10. package/assets/esri/core/workers/chunks/{a118de5a163ae42bee60.js → 333a0038d782d8a34d58.js} +1 -1
  11. package/assets/esri/core/workers/chunks/38328a785365c4783b1e.js +1 -0
  12. package/assets/esri/core/workers/chunks/{e268e5be096392c2e69b.js → 3eef3c2e94aa2a00d76a.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{a5b395e518e4c5fc95d0.js → 40d6ad030614099155cd.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{427183ea93e759943a78.js → 43678e08a3d9d51c2a6d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{af007ec833ab49e4c958.js → 453280ea87a696a4df81.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{921c30b7f4dfc3e018d9.js → 4605a68e40c5c3ac6e3e.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{abd5c1d4b7b91d9ea1eb.js → 478879ba965798f61bf3.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{aa69cbaa38b49677ddff.js → 499b899bf88aaf29230d.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{8a0f254d45d00b293479.js → 49fb9c47070641bce9a9.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{f8eb14170f927aecfbc8.js → 4f9d027055f3a616173c.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{4e7b084f7104deea1ddb.js → 53b797e384be9628fc94.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{ff0cb1eec14d34214f12.js → 5fe97253f80c797fad7f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{2f8ed1e7c1b10cb30972.js → 678c9f15712cf3d3bb9e.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{4005d37d03c834da7629.js → 68a313155ddc29bd024d.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{684ea7f75a7a5fb52cde.js → 6a21c9a4aeebe806ea39.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{0f196ec93925dfefc69a.js → 6bb090f3e5c18604cb39.js} +1 -1
  27. package/assets/esri/core/workers/chunks/73e000cc3c4da10e9937.js +1 -0
  28. package/assets/esri/core/workers/chunks/{79df97e3f5975b42dc4d.js → 75669912cddcb5db52c8.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{749c368f5cc2366716f1.js → 7bd1d624f4f4a11a31e8.js} +1 -1
  30. package/assets/esri/core/workers/chunks/7cadfd7444a2a05cf2fb.js +1 -0
  31. package/assets/esri/core/workers/chunks/{1515824f11ef5ab95378.js → 7d0350f459844162d3a7.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{4d069a0ebadb9c53b550.js → 7e39e9d4d68843b60e4c.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{8d5bc17557a31ed79ed8.js → 81750c5177d8d52a3e05.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{7d73472696ec76458758.js → 81b2985b83be8f8f1090.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{a8ef9ed9b59de95f2b23.js → 823127b23bec07e1f9d0.js} +2 -2
  36. package/assets/esri/core/workers/chunks/{b8bf3e8b8b870f69f231.js → 8969788c57bcc11bf77b.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{4e7bb224bde9e5039263.js → 8b8f391f27774aec6db9.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{0e90e9ea1ad587eb3495.js → 8ea4584e07ccc85caabd.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{6c40b3c2b9071edb758d.js → 8fb336c2066113300d0d.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{b5648a0b92cf1a2c81ad.js → 915a5e8aecf25f3bc72b.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{7ffcd308087c35adda04.js → 9bd713d96502ddc2ce25.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{9622a83b29acb768fcb5.js → a25acccda8febac71a3d.js} +1 -1
  43. package/assets/esri/core/workers/chunks/a30815a0155a3b8790b4.js +1 -0
  44. package/assets/esri/core/workers/chunks/{90cef6f96df7dc27db39.js → a43decc8ede8b4910553.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{dd26e3a29161ea411e41.js → a94bd20551c1179c7ec5.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{fa7ae035472540999721.js → b2120c4c56656be941ae.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{a59db907ec1e31002100.js → b85c9ceeece1bae67a16.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{c4e936879c6cb25cf586.js → b8a11d32a4847513619b.js} +1 -1
  49. package/assets/esri/core/workers/chunks/bbaf1d9835671c0165ca.js +1 -0
  50. package/assets/esri/core/workers/chunks/{cb9185ed31109781fe59.js → bc887bd62579dba81e2b.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{7e9b790fe01b89acdf6d.js → bcefdf9753d9d2f6f1be.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{927773ed23b1fc245bf7.js → be61ea8e1883b915bbb1.js} +1 -1
  53. package/assets/esri/core/workers/chunks/c02ba921c0a32d2021e3.js +1 -0
  54. package/assets/esri/core/workers/chunks/{9a95c28d4a3b3b4b2c50.js → c49c078be08c38a6088d.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{d94dfb2ce31e59b3306b.js → c79827f879d1d58d3f1b.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{56036327e721f9c42b33.js → c7ca47f5d4b2f3885239.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{d83ac66478a419e08af6.js → d3d9d40556c847bba1a7.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{789357e0f79823f145dd.js → d4e55eb75fa4d3ac1e84.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{fee31d9297648219375d.js → d8d7331600d93bbca2b4.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{e907acaec4c62adac2f2.js → e0fe23019410dea8236b.js} +1 -1
  61. package/assets/esri/core/workers/chunks/{4f847a426973bd350c11.js → e5801b0f3893d4d4f5b0.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{6ab8ed12d162d79a8c55.js → e62d08f5488a74cbda82.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{b4fb4484fa39eede1f62.js → e66b9d00d02fc08cbb2d.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{69520cad347947b09f21.js → ecb7ede6a8e6c05e4c6c.js} +1 -1
  65. package/assets/esri/core/workers/chunks/ef9d74f8d5a502fda809.js +1 -0
  66. package/assets/esri/core/workers/chunks/f0bc5e8e44d53b73d431.js +1 -0
  67. package/assets/esri/core/workers/chunks/f11ea0d3de93ec0392af.js +1 -0
  68. package/assets/esri/core/workers/chunks/{cc8e6d1eb90221103023.js → f1e5626a0cc1631a1efb.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{afea4a4b072c329d3749.js → fc64ae69581e4c38fa8a.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{3f8e8f83ebda07d29ca8.js → fd6bbe47773bbd9f7dd9.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{8418ad9ad7b6481ebe82.js → ffb70e9358c0b171a315.js} +1 -1
  72. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  73. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  74. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  75. package/chunks/arcgis-knowledge-client-core.js +1 -1
  76. package/config.js +1 -1
  77. package/core/string.js +1 -1
  78. package/geometry/support/lineSegment.js +1 -1
  79. package/kernel.js +1 -1
  80. package/layers/GroupLayer.js +1 -1
  81. package/layers/SceneLayer.js +1 -1
  82. package/layers/VoxelWasmPerSceneView.js +1 -1
  83. package/layers/mixins/OperationalLayer.js +1 -1
  84. package/layers/support/arcgisLayers.js +1 -1
  85. package/layers/support/layersCreator.js +1 -1
  86. package/layers/support/{lazyLayerLoader.js → layersLoader.js} +1 -1
  87. package/layers/support/layersMapping.js +2 -0
  88. package/package.json +2 -2
  89. package/popup/Feature.d.ts +3 -3
  90. package/popup/Features.d.ts +1 -13
  91. package/popup/Features.js +1 -1
  92. package/popup/actionUtils.js +1 -1
  93. package/portal/support/portalLayers.js +1 -1
  94. package/rest/knowledgeGraph/GraphQueryResultHeader.js +1 -1
  95. package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
  96. package/support/revision.js +1 -1
  97. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  98. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  99. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  100. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  101. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  102. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  103. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  104. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  105. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  106. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  107. package/views/3d/webgl.js +1 -1
  108. package/views/SelectionManager.d.ts +1 -1
  109. package/views/VideoView.js +1 -1
  110. package/views/draw/DrawManipulator.js +1 -1
  111. package/views/draw/DrawManipulator3D.js +2 -0
  112. package/views/draw/DrawTool.js +1 -1
  113. package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
  114. package/webscene/spec-certification/api.js +1 -1
  115. package/widgets/Compass/CompassViewModel.d.ts +1 -0
  116. package/widgets/Compass/CompassViewModel.js +1 -1
  117. package/widgets/Compass.js +1 -1
  118. package/assets/esri/core/workers/chunks/12294f8c32c34788b6de.js +0 -1
  119. package/assets/esri/core/workers/chunks/151c2766a4cacc6adbd6.js +0 -1
  120. package/assets/esri/core/workers/chunks/1984c0f037065acd21d3.js +0 -1
  121. package/assets/esri/core/workers/chunks/4fd1bf82939e3bb9bc03.js +0 -1
  122. package/assets/esri/core/workers/chunks/61794a861a9209b72622.js +0 -1
  123. package/assets/esri/core/workers/chunks/644dd906bee3ef465ec0.js +0 -1
  124. package/assets/esri/core/workers/chunks/6f079f1fd6d00d2d174c.js +0 -1
  125. package/assets/esri/core/workers/chunks/751f3cfb000045ac78bb.js +0 -1
  126. package/assets/esri/core/workers/chunks/a80eb704e75d13732878.js +0 -1
  127. package/assets/esri/core/workers/chunks/c72e90a952543d06d84b.js +0 -1
  128. package/assets/esri/core/workers/chunks/e9f2b573f482718306e6.js +0 -1
  129. package/assets/esri/core/workers/chunks/f62e42659b406435573d.js +0 -1
  130. package/layers/mixins/operationalLayerModuleMap.js +0 -2
  131. package/layers/mixins/operationalLayers.js +0 -2
  132. /package/assets/esri/core/workers/chunks/{a8ef9ed9b59de95f2b23.js.LICENSE.txt → 823127b23bec07e1f9d0.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7598],{69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>o,RS:()=>s,Ul:()=>d,i5:()=>m,lM:()=>n,qK:()=>p});var i=r(34275);const s=16;function n(e){if(!e)return 0;let t=p;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let r=c;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=p;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):p;case"string":return function(e){return 32+e.length}(e);case"number":return s;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+m:Array.isArray(t)?u(t,s):0:0),0)}function u(e,t){return c+e.length*t}const p=32,c=16,m=145,d=64},62815(e,t,r){r.d(t,{N:()=>a,d:()=>l});var i=r(86211),s=r(73941),n=r(21325),o=r(52006);function a(e,t,r){const i=l(t,r);if(1!==i)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,i);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const r of e.curvePaths)for(const e of r){const r=(0,o.yP)(e);r.length>2&&(r[2]*=t)}if(e.paths)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}}(e,i);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const r of e.curveRings)for(const e of r){const r=(0,o.yP)(e);r.length>2&&(r[2]*=t)}if(e.rings)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}}(e,i);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,i);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,i);default:return}}function l(e,t){return null==e||null==t||t.vcsWkid||(0,n.aI)(e,t)||(0,s.xP)(e)||(0,s.xP)(t)?1:(0,i.G9)(e)/(0,i.G9)(t)}},74379(e,t,r){r.d(t,{V:()=>i,t:()=>s});const i=Symbol("isImageryGraphicOrigin");function s(e){return!!e&&i in e}},87772(e,t,r){r.r(t),r.d(t,{default:()=>yr});var i,s=r(5482),n=r(37838),o=r(69540),a=r(53966),l=r(25728),u=r(17676),p=r(91429),c=r(89808),m=r(99959),d=r(74379);class y extends m.A{get[(i=d.V,c.Q)](){return this.layer}constructor(e){super(),this[i]=!0,this.type="imagery",this.layer=e}get id(){return this.layer.id}}var g=r(4146),h=r(52106),f=r(11254),v=r(49186),w=r(4718),R=r(36708),C=r(84952),b=r(56507),S=r(62788),M=r(5443),x=r(39829),I=r(16930),F=r(21325),A=r(4366),D=r(20758),P=r(34251),T=r(10873),j=r(45617),N=r(25482),O=r(94778);const Z={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 _=r(22796),V=r(67369),q=r(70274),E=r(48940);const J=new Set(["u1","u2","u4","u8","s8","u16","s16"]),G={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)"},z=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function U(e){return z.has(e.type)}function $(e,t){if(!e||!t)return(0,w.o8)(e||t);const r=(0,w.o8)(e);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),L(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(B(r.functionArguments).Raster=t);return r}function L(e,t){for(const r in e)"raster"===r.toLowerCase()&&("RasterFunctionVariable"===e[r].type?(e[r]=t.rasterFunctionDefinition,e[r].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[r].type&&L(e[r].arguments,t))}function K(e){const t=(0,w.o8)(Z[e.functionName+"Function"]),r=e.functionArguments;for(const e in r)"raster"===e.toLowerCase()?(t.arguments[e]=K(r[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=X(r[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=r[e];return e.outputPixelType&&t.function&&(t.function.pixelType=e.outputPixelType.toUpperCase()),t}function B(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?B(t.functionArguments):e}const Q={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function k(e,t){const r=J.has(t)?(0,O.hP)(t):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function H(e){if(null==e)return;const{fields:t}=e,r=t?.find(e=>e?.name&&"value"===e.name.toLowerCase());return r?.name}function W(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find(e=>"fill"===e.type)?.material?.color:e.symbol?.color}function X(e){const t=[],r=[];return e.forEach(e=>{t.push(e[0]),r.push((0,V.vL)([...e.slice(1),255]))}),{type:"RasterColormap",values:t,colors:r}}var Y=r(85675),ee=r(13868),te=r(43937);let re=class extends N.o{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return this.requestRawData||"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}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=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("pixelType"),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 r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new Y.A({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.multidimensionalSubset?.areaOfInterest;return r&&(t=function(e,t){return $(new _.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,r)),this.requestRawData||!e.isRenderedFormat||e.pixelFilter||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:i}=t;return e=e||t.rasterFunction,i&&U(i)?$(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const r=t.convertToRFT,i=new _.A;i.functionName="Stretch";const s=Q[q.u.toJSON(e.stretchType)],n="u8",o=e.customStatistics?.map(e=>[e.min,e.max,e.avg??0,e.stddev??1]),a={StretchType:s,Statistics:o,DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(a.Min=e.outputMin),null!=e.outputMax&&(a.Max=e.outputMax),s===Q.standardDeviation?(a.NumberOfStandardDeviations=e.numberOfStandardDeviations,i.outputPixelType=n):s===Q.percentClip?(a.MinPercent=e.minPercent,a.MaxPercent=e.maxPercent,i.outputPixelType=n):s===Q.minMax?i.outputPixelType=n:s===Q.sigmoid&&(a.SigmoidStrengthLevel=e.sigmoidStrengthLevel),i.functionArguments=a,i.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new _.A;if(r)n.functionArguments={ColorRamp:(0,V.hf)(s)};else{const r=(0,V.hs)(s,!0);if(r)n.functionArguments={colorRampName:r};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.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"),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,V.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=i,r?new _.A({rasterFunctionDefinition:K(n)}):n}return r?new _.A({rasterFunctionDefinition:K(i)}):i}(e,t);case"class-breaks":return function(e,t){const r=[],i=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=H(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach((t,r)=>{const i=t.symbol?.color;let s;i?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach(o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||r===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],i.r,i.g,i.b]))})});const r=a?k(n,a):n,i=new _.A;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=r,i.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:K(i)}):i}e.classBreakInfos.forEach((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?r.push(e.minValue,e.maxValue+o):r.push(e.minValue+o,e.maxValue+o),i.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)});const c=a?k(n,a):n,m=new _.A;m.functionName="Remap",m.functionArguments={InputRanges:r,OutputValues:i,NoDataRanges:s},m.variableName="Raster";const d=new _.A;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new _.A({rasterFunctionDefinition:K(d)}):d}(e,t);case"unique-value":return function(e,t){const r=[],{pixelType:i,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=H(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach(e=>{const r=e.value,i=W(e);null!=r&&i?.a&&t.set(String(r),i.toRgb())});const i=e.field;i&&n.forEach(({attributes:e})=>{const s=String(e[i]),n=e[o],l=t.get(s);l?r.push([n,...l]):a&&r.push([n,...a])})}}else for(let e=0;e<l.length;e++){const t=l[e],i=W(t),s=+t.value;if(i?.a){if(isNaN(s))return null;r.push([s,i.r,i.g,i.b])}}const u=i?k(r,i):r,p=new _.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:K(p)}):p}(e,t);case"raster-colormap":return function(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:i}=t,s=i?k(r,i):r,n=new _.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new _.A({rasterFunctionDefinition:K(n)}):n}(e,t);case"vector-field":return function(e,t){const r=new _.A;r.functionName="VectorFieldRenderer";const{dataType:i,bandNames:s}=t,n="vector-uv"===i;let o,a;if(2===s?.length){const e=s.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 E.A,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:G[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};r.functionArguments=c;const m=K(r);return t.convertToRFT?_.A.fromJSON({rasterFunctionDefinition:m}):r}(e,t);case"raster-shaded-relief":return function(e,t){const r=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 _.A;const i=new _.A;i.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),i.functionArguments=o,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?o.ColorRamp=(0,V.hf)(e.colorRamp):o.Colormap=(0,V.R8)(e.colorRamp)),r?new _.A({rasterFunctionDefinition:K(i)}):i}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(i,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map(({name:e})=>e),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e):e}};(0,s.Cg)([(0,p.MZ)()],re.prototype,"layer",void 0),(0,s.Cg)([(0,p.MZ)()],re.prototype,"requestRawData",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"adjustAspectRatio",null),(0,s.Cg)([(0,te.K)("adjustAspectRatio")],re.prototype,"writeAdjustAspectRatio",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"bandIds",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"compression",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"compressionQuality",null),(0,s.Cg)([(0,te.K)("compressionQuality")],re.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"compressionTolerance",null),(0,s.Cg)([(0,te.K)("compressionTolerance")],re.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"format",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:{reader:ee.SZ.read},write:{writer:ee.SZ.write}}})],re.prototype,"interpolation",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"noData",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:{reader:ee.hm.read},write:{writer:ee.hm.write}}})],re.prototype,"noDataInterpretation",null),(0,s.Cg)([(0,p.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,write:ee.e8.write}})],re.prototype,"pixelType",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"lercVersion",void 0),(0,s.Cg)([(0,te.K)("lercVersion")],re.prototype,"writeLercVersion",null),(0,s.Cg)([(0,p.MZ)({type:Number})],re.prototype,"version",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"mosaicRule",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0,name:"renderingRule"}})],re.prototype,"rasterFunction",null),re=(0,s.Cg)([(0,p.$K)("esri.layers.support.ExportImageServiceParameters")],re);var ie=r(20437),se=r(95466),ne=r(33446),oe=r(43577),ae=r(14140),le=r(74797),ue=r(87186),pe=r(12711),ce=r(85676),me=r(94359),de=r(65864),ye=r(17136),ge=r(2272),he=r(86738);let fe=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0}})],fe.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],fe.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],fe.prototype,"objectIds",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],fe.prototype,"where",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],fe.prototype,"maxCount",void 0),fe=(0,s.Cg)([(0,p.$K)("esri.rest.support.FindImagesParameters")],fe);const ve=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"make",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"model",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"focalLength",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"rows",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"cols",void 0),r=(0,s.Cg)([(0,p.$K)("esri.rest.support.CameraInfoMixin")],r),r};let we=class extends(ve(N.o)){constructor(e){super(e),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"id",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"uri",write:!0}})],we.prototype,"referenceUri",void 0),(0,s.Cg)([(0,p.MZ)({type:Date,json:{write:!0}})],we.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],we.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"cameraID",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],we.prototype,"center",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],we.prototype,"perspectiveCenter",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"orientation",void 0),we=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageInspectionInfo")],we);const Re=we;let Ce=class extends N.o{constructor(e){super(e),this.images=null}};var be;(0,s.Cg)([(0,p.MZ)({type:[Re],json:{write:!0}})],Ce.prototype,"images",void 0),Ce=(0,s.Cg)([(0,p.$K)("esri.rest.support.FindImagesResult")],Ce);let Se=be=class extends N.o{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new be((0,w.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,s.Cg)([(0,p.MZ)({type:[String],json:{name:"angleName",write:!0}})],Se.prototype,"angleNames",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],Se.prototype,"point",void 0),(0,s.Cg)([(0,p.MZ)({type:I.A,json:{write:!0}})],Se.prototype,"spatialReference",void 0),(0,s.Cg)([(0,p.MZ)({type:b.jz,json:{write:!0}})],Se.prototype,"rasterId",void 0),Se=be=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAngleParameters")],Se);let Me=class extends N.o{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],Me.prototype,"north",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],Me.prototype,"up",void 0),(0,s.Cg)([(0,p.MZ)({type:I.A,json:{write:!0}})],Me.prototype,"spatialReference",void 0),Me=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAngleResult")],Me);var xe=r(86211),Ie=r(60408),Fe=r(50498),Ae=r(66552);const De=new Ae.J({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 Pe=class extends N.o{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var Te;(0,s.Cg)([(0,p.MZ)()],Pe.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],Pe.prototype,"measureOperation",void 0),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],Pe.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],Pe.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Pe.prototype,"raster",void 0),Pe=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureParameters")],Pe);let je=Te=class extends Pe{constructor(e){super(e),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Te((0,w.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:!0,write:!0}})],je.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],je.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],je.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],je.prototype,"is3D",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:xe.Sk.read,write:xe.Sk.write}})],je.prototype,"linearUnit",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:xe.dk.read,write:xe.dk.write}})],je.prototype,"areaUnit",void 0),je=Te=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAreaParameters")],je);let Ne=class extends N.o{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ne.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ne.prototype,"sensorName",void 0),Ne=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureResult")],Ne);var Oe=r(64108);let Ze=class extends N.o{constructor(e){super(e),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,s.Cg)([(0,p.MZ)({type:String})],Ze.prototype,"unit",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0}})],Ze.prototype,"value",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ze.prototype,"displayValue",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0}})],Ze.prototype,"uncertainty",void 0),Ze=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureResultValue")],Ze);const _e=Ze;let Ve=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:xe.dk.read,write:xe.dk.write}})],Ve.prototype,"unit",void 0),Ve=(0,s.Cg)([(0,Oe.$)("esri.rest.support.ImageMeasureResultAreaValue")],Ve);const qe=Ve;let Ee=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:xe.Sk.read,write:xe.Sk.write}})],Ee.prototype,"unit",void 0),Ee=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageMeasureResultLengthValue")],Ee);const Je=Ee;let Ge=class extends Ne{constructor(e){super(e),this.area=null,this.perimeter=null}};(0,s.Cg)([(0,p.MZ)({type:qe,json:{read:!0,write:!0}})],Ge.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],Ge.prototype,"perimeter",void 0),Ge=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAreaResult")],Ge);let ze=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.outSpatialReference=null}};(0,s.Cg)([(0,p.MZ)({type:I.A,json:{name:"outSR",write:!0}})],ze.prototype,"outSpatialReference",void 0),ze=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageBoundaryParameters")],ze);var Ue=r(36005);let $e=class extends N.o{constructor(e){super(e),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?x.A.fromJSON(e):M.A.fromJSON(e)}};var Le;(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],$e.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"shape",write:!0}})],$e.prototype,"geometry",void 0),(0,s.Cg)([(0,Ue.w)("geometry")],$e.prototype,"readGeometry",null),$e=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageBoundaryResult")],$e);let Ke=Le=class extends Pe{constructor(e){super(e),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new Le((0,w.o8)({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,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],Ke.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],Ke.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],Ke.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],Ke.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],Ke.prototype,"is3D",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:xe.Sk.read,write:xe.Sk.write}})],Ke.prototype,"linearUnit",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:xe.b$.read,write:xe.b$.write}})],Ke.prototype,"angularUnit",void 0),Ke=Le=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageDistanceParameters")],Ke);let Be=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:xe.b$.read,write:xe.b$.write}})],Be.prototype,"unit",void 0),Be=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageMeasureResultAngleValue")],Be);const Qe=Be;let ke=class extends Ne{constructor(e){super(e),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],ke.prototype,"distance",void 0),(0,s.Cg)([(0,p.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"azimuthAngle",void 0),(0,s.Cg)([(0,p.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"elevationAngle",void 0),ke=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageDistanceResult")],ke);var He=r(58174),We=r(79677),Xe=r(93223);let Ye=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=JSON.stringify(e.toJSON()))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],Ye.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Ye.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ye.prototype,"objectIds",void 0),(0,s.Cg)([(0,Xe.e)(He.x,{ignoreUnknown:!1,name:"spatialRel"})],Ye.prototype,"spatialRelationship",void 0),(0,s.Cg)([(0,p.MZ)({type:We.A,json:{name:"time",write:!0}})],Ye.prototype,"timeExtent",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],Ye.prototype,"where",void 0),Ye=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfoParameters")],Ye);let et=class extends(ve(N.o)){constructor(e){super(e),this.id=null}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],et.prototype,"id",void 0),et=(0,s.Cg)([(0,p.$K)("esri.rest.support.CameraInfo")],et);const tt=et;let rt=class extends N.o{constructor(e){super(e),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"id",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:Date,json:{write:!0}})],rt.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],rt.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"cameraID",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],rt.prototype,"center",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"gps",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"orientation",void 0),rt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfo")],rt);const it=rt;let st=class extends N.o{constructor(e){super(e),this.images=null,this.cameras=null}};var nt;(0,s.Cg)([(0,p.MZ)({type:[it],json:{write:!0}})],st.prototype,"images",void 0),(0,s.Cg)([(0,p.MZ)({type:[tt],json:{write:!0}})],st.prototype,"cameras",void 0),st=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfoResult")],st);let ot=nt=class extends Pe{constructor(e){super(e),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new nt((0,w.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0}})],ot.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],ot.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],ot.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],ot.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],ot.prototype,"operationType",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:xe.Sk.read,write:xe.Sk.write}})],ot.prototype,"linearUnit",void 0),ot=nt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageHeightParameters")],ot);let at=class extends Ne{constructor(e){super(e),this.height=null}};(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],at.prototype,"height",void 0),at=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageHeightResult")],at);var lt,ut=r(22048);let pt=lt=class extends N.o{constructor(e){super(e),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,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Y.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[r]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map(e=>e.rasterFunctionDefinition||e.toJSON())))}writePixelSize(e,t,r){null!=e&&(t[r]=JSON.stringify(e))}writeTimeExtent(e,t,r){if(null!=e){const i=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[r]=null!=i?null!=s?`${i},${s}`:`${i}`:null}}clone(){return new lt((0,w.o8)({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,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{write:!0}})],pt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],pt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],pt.prototype,"mosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],pt.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,p.MZ)({type:_.A,json:{write:!0,name:"renderingRule"}})],pt.prototype,"rasterFunction",null),(0,s.Cg)([(0,te.K)("rasterFunction")],pt.prototype,"writeRasterFunction",null),(0,s.Cg)([(0,p.MZ)({type:[_.A],json:{write:!0,name:"renderingRules"}})],pt.prototype,"rasterFunctions",void 0),(0,s.Cg)([(0,te.K)("rasterFunctions")],pt.prototype,"writeRasterFunctions",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],pt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,te.K)("pixelSize")],pt.prototype,"writePixelSize",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnCatalogItems",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnPixelValues",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],pt.prototype,"maxItemCount",void 0),(0,s.Cg)([(0,p.MZ)({type:We.A,json:{write:{target:"time"}}})],pt.prototype,"timeExtent",void 0),(0,s.Cg)([(0,te.K)("timeExtent")],pt.prototype,"writeTimeExtent",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],pt.prototype,"raster",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],pt.prototype,"viewId",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"processAsMultidimensional",void 0),pt=lt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageIdentifyParameters")],pt);var ct=r(22671);let mt=class extends N.o{constructor(e){super(e),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};var dt;(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"catalogItemVisibilities",void 0),(0,s.Cg)([(0,p.MZ)({type:ct.A,json:{write:!0}})],mt.prototype,"catalogItems",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],mt.prototype,"location",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"objectId",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"processedValues",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"properties",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"value",void 0),mt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageIdentifyResult")],mt);let yt=dt=class extends N.o{constructor(e){super(e),this.geometries=null,this.rasterId=null}writeGeometry(e,t,r){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map(e=>e.toJSON())}}clone(){return new dt({geometries:this.geometries?.map(e=>e.clone())??[],rasterId:this.rasterId})}};(0,s.Cg)([(0,p.MZ)({type:[he.A],json:{write:!0}})],yt.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],yt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:b.jz,json:{write:!0}})],yt.prototype,"rasterId",void 0),yt=dt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePixelLocationParameters")],yt);let gt=class extends N.o{constructor(e){super(e),this.geometries=null}};var ht;(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],gt.prototype,"geometries",void 0),gt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePixelLocationResult")],gt);let ft=ht=class extends Pe{constructor(e){super(e),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=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 ht((0,w.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:de.rS}})],ft.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],ft.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],ft.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],ft.prototype,"is3D",void 0),ft=ht=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePointParameters")],ft);let vt=class extends Ne{constructor(e){super(e),this.point=null}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{name:"point.value",read:!0,write:!0}})],vt.prototype,"point",void 0),vt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePointResult")],vt);var wt=r(34606),Rt=r(29127);let Ct=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,r){t.geometries=e?.length?{geometryType:(0,Ie.$B)(e[0]),geometries:e.map(e=>({...e.toJSON(),spatialReference:void 0}))}:null}};(0,s.Cg)([(0,p.MZ)({types:[Fe.yR]})],Ct.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],Ct.prototype,"writeGeometries",null),(0,s.Cg)([(0,p.MZ)({type:[b.jz],json:{write:!0}})],Ct.prototype,"rasterIds",void 0),(0,s.Cg)([(0,p.MZ)({type:I.A,json:{name:"outSR",write:!0}})],Ct.prototype,"outSpatialReference",void 0),Ct=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageToMapMultirayParameters")],Ct);let bt=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]={...e.toJSON(),spatialReference:void 0})}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],bt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],bt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],bt.prototype,"rasterId",void 0),(0,s.Cg)([(0,p.MZ)({type:I.A,json:{name:"outSR",write:!0}})],bt.prototype,"outSpatialReference",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.DOff",write:!0}})],bt.prototype,"depthOffset",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.Adjust",write:!0}})],bt.prototype,"adjust",void 0),bt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageToMapParameters")],bt);let St=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.referenceUri=null,this.rasterId=null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{name:"uri",write:!0}})],St.prototype,"referenceUri",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],St.prototype,"rasterId",void 0),St=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageUrlParameters")],St);let Mt=class extends N.o{constructor(e){super(e),this.url=null}};(0,s.Cg)([(0,p.MZ)({json:{name:"imageURL",write:!0}})],Mt.prototype,"url",void 0),Mt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageUrlResult")],Mt);const xt=new Ae.J({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0});let It=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,r){e?.length&&(t.geometryType=(0,Ie.$B)(e[0]),t.geometries=e.map(e=>e.toJSON()))}};(0,s.Cg)([(0,p.MZ)({types:[Fe.yR]})],It.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],It.prototype,"writeGeometries",null),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],It.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],It.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],It.prototype,"constantZ",void 0),(0,s.Cg)([(0,p.MZ)({type:xt.apiValues,json:{read:xt.read,write:xt.write}})],It.prototype,"baseType",void 0),It=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolumeParameters")],It);let Ft=class extends N.o{constructor(e){super(e),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"cut",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"fill",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"maxz",write:!0}})],Ft.prototype,"maxZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"minz",write:!0}})],Ft.prototype,"minZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"meanz",write:!0}})],Ft.prototype,"meanZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"cutCellCount",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"fillCellCount",void 0),Ft=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolume")],Ft);const At=Ft;let Dt=class extends N.o{constructor(e){super(e),this.volumes=[]}};(0,s.Cg)([(0,p.MZ)({type:[At],json:{write:!0}})],Dt.prototype,"volumes",void 0),Dt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolumeResult")],Dt);let Pt=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=JSON.stringify(e))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],Pt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Pt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Pt.prototype,"rasterId",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.VisibleOnly",write:!0}})],Pt.prototype,"visibleOnly",void 0),Pt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MapToImageParameters")],Pt);let Tt=class extends N.o{constructor(e){super(e),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),he.A.fromJSON(e)}};var jt;(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"Shape",read:de.rS,write:!0}})],Tt.prototype,"geometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Length",write:!0}})],Tt.prototype,"length",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Area",write:!0}})],Tt.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{name:"Center",write:!0}})],Tt.prototype,"center",void 0),(0,s.Cg)([(0,Ue.w)("center")],Tt.prototype,"readCenter",null),Tt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureAreaFromImageResult")],Tt);let Nt=jt=class extends N.o{constructor(e){super(e),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,w.o8)({geometry:this.geometry,rasterId:this.rasterId});return new jt(e)}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:de.rS,write:!0}})],Nt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Nt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Nt.prototype,"rasterId",void 0),Nt=jt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureFromImageParameters")],Nt);let Ot=class extends N.o{constructor(e){super(e),this.geometry=null,this.length=null}};function Zt(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const r=[];null!=t.start&&r.push(t.start),null==t.end||r.includes(t.end)||r.push(t.end),e.time=r.join(",")}}async function _t(e,t,r){const i=(0,b.PZ)(ut.A,t),s=(0,ge.Dl)(e),n=i.geometry?[i.geometry]:[],o=await(0,ye.el)(n),a=i.toJSON();Zt(a);const l=o?.[0];null!=l&&(a.geometry=Jt(l));const u=(0,ge.lF)({...s.query,f:"json",...a});return(0,ge.jV)(u,r)}async function Vt(e,t,r){const i=(0,b.PZ)(pt,t),s=(0,ge.Dl)(e),n=i.geometry?[i.geometry]:[];return(0,ye.el)(n).then(e=>{const t=i.toJSON(),n=e?.[0];null!=n&&(t.geometry=JSON.stringify(Jt(n)));const o=(0,ge.lF)({...s.query,f:"json",...t}),a=(0,ge.jV)(o,r);return(0,f.A)(s.path+"/identify",a)}).then(e=>mt.fromJSON(e.data))}async function qt(e,t,r,i){const s=(0,ge.Dl)(e),n=await(0,ye.el)(r),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(Jt(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(Jt(n[1])));const a=(0,ge.lF)({...s.query,f:"json",...o}),l=(0,ge.jV)(a,i),{data:u}=await(0,f.A)(s.path+"/measure",l);return u}async function Et(e,t,r){t=(0,b.PZ)(Nt,t);const i=(0,ge.Dl)(e),s=t.toJSON(),n=(0,ge.lF)({...i.query,f:"json",...s}),o=(0,ge.jV)(n,r),{data:a}=await(0,f.A)(i.path+"/measureFromImage",o);return a}function Jt(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=Gt(e.spatialReference)),t}function Gt(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:r}=t;return null!=e?r?{icsid:e,icsns:r}:{icsid:e}:{ics:t}}return e.toJSON()}function zt(e,t){if(!e.imageCoordinateSystem)return(0,F.YX)(e);const r=Gt(e),{icsid:i,icsns:s}=r;return null==i||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(r):`0:${i}`}(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"Shape",read:de.rS,write:!0}})],Ot.prototype,"geometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Length",write:!0}})],Ot.prototype,"length",void 0),Ot=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureLengthFromImageResult")],Ot);var Ut=r(82371),$t=r(20223),Lt=r(20615),Kt=r(74910),Bt=r(78286),Qt=r(99199),kt=r(61956);const Ht=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Wt=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,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 re({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,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?(0,S.F_)(()=>Y.A.fromJSON(t)):null}get fieldsIndex(){return this.fields?new se.A(this.fields):null}set format(e){e&&Ht.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"}get isRenderedFormat(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}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=Y.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?Y.A.fromJSON(r):this._isMosaicRuleSupported(t)?Y.A.fromJSON(t):null}writeMosaicRule(e,t,r){const{mosaicRule:i}=this;this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}readObjectIdField(e,t){if(!e){const r=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=r?.name}return e}get parsedUrl(){return(0,C.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const r=t?.find(({name:t})=>t===e);return r?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer,s=(0,me.LF)(i,r);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!i.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),U(s)||a.A.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,r){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON()}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push((0,le.rZ)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,le.Nd)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push((0,le.dy)()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push((0,le.nq)(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const r=t?.multidimensionalInfo?.variables[0].unit?.trim(),i=(0,le.DV)(r),s=(0,le.y6)();e.push(i,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const r=(0,le.AL)(t.multidimensionalInfo);e.push(...r)}const r=t?.attributeTable;if(null!=r){const t=(0,le.jC)(r);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r?.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?_.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):_.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?I.A.fromJSON(r):null}writePixelType(e,t,r){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[r]=ee.e8.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e,{renderer:i,symbolizer:s,pixelFilter:n}=this;const{isRawData:o}=e;if(o&&"lerc"!==this.format&&(i??=(0,pe.PD)(this.rasterInfo,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}),s||(this.symbolizer=new ce.A({rendererJSON:i.toJSON(),rasterInfo:this.rasterInfo}),s=this.symbolizer)),(o||!this.isRenderedFormat)&&i&&s&&!n){await this._updateSymbolizer(s,i);const n=this.bandIds?.length?this.bandIds:(0,pe.ci)(this.rasterInfo);r=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return r}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new v.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,w.o8)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),async function(e,t,r){const i=(0,b.PZ)(It,t).toJSON();i.geometries=JSON.stringify(i.geometries);const s=(0,ge.Dl)(e),n=(0,ge.lF)({...s.query,f:"json",...i}),o=(0,ge.jV)(n,r),{data:a}=await(0,f.A)(`${s.path}/calculateVolume`,o);return Dt.fromJSON({volumes:a.results})}(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new v.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(Se,t),s=i.toJSON();null!=s.angleName&&(s.angleName=s.angleName.join(",")),i?.point?.spatialReference?.imageCoordinateSystem&&(s.point.spatialReference=Gt(i.point.spatialReference)),i?.spatialReference?.imageCoordinateSystem&&(s.spatialReference=zt(i.spatialReference));const n=(0,ge.Dl)(e),o=(0,ge.lF)({...n.query,f:"json",...s}),a=(0,ge.jV)(o,r),{data:l}=await(0,f.A)(`${n.path}/computeAngles`,a);return l.spatialReference=l.spatialReference?null!=l.spatialReference.geodataXform?new I.A({wkid:0,imageCoordinateSystem:l.spatialReference}):I.A.fromJSON(l.spatialReference):null,"NaN"===l.north&&(l.north=null),"NaN"===l.up&&(l.up=null),new Me(l)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new v.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(yt,t),s=i.toJSON(),{geometries:n}=i;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(s.geometries.geometries[e].spatialReference=Gt(n[e].spatialReference));const o=(0,ge.Dl)(e),a=(0,ge.lF)({...o.query,f:"json",...s}),l=(0,ge.jV)(a,r),{data:u}=await(0,f.A)(`${o.path}/computePixelLocation`,l);return gt.fromJSON(u)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new v.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await _t(e,t,r),s=(0,ge.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeHistograms`,i);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new v.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await _t(e,t,r),s=(0,ge.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeStatisticsHistograms`,i),{statistics:o}=n;return o?.length&&o.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const r=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?r.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?r.mensuration.supportsHeightFromBaseAndTopShadow:r.mensuration.supportsHeightFromTopAndTopShadow))throw new v.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(ot,t),s=await qt(e,i,[i.fromGeometry,i.toGeometry],r);return at.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsAreaAndPerimeter||e.is3D&&!r.mensuration.supports3D)throw new v.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(je,t),s=await qt(e,i,[i.geometry],r);return Ge.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsDistanceAndAngle||e.is3D&&!r.mensuration.supports3D)throw new v.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(Ke,t),s=await qt(e,i,[i.fromGeometry,i.toGeometry],r);return ke.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsPointOrCentroid||e.is3D&&!r.mensuration.supports3D)throw new v.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(ft,t),s=await qt(e,i,[i.geometry],r);return vt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new v.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new v.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return async function(e,t,r){const i=(0,b.PZ)(Nt,t),s=await Et(e,i,r);return Ot.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new v.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new v.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return async function(e,t,r){const i=(0,b.PZ)(Nt,t),s=await Et(e,i,r);return Tt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}async internalFetchImage(e,t,r,s={}){await this._updateCurrentRasterInfo();const{exportImageServiceParameters:n}=this;let o=!1;s.requestRawData&&(await this._initJobHandler(),n.requestRawData||"lerc"===this.format||(o=!0,n.requestRawData=!0));const a=this.getExportImageServiceParameters(e,t,r,s.timeExtent);if(o&&(n.requestRawData=!1,a&&!this.bandIds?.length&&(null==a.bandIds||""===a.bandIds))){const e=(0,pe.ci)(this.rasterInfo);a.bandIds=e?.join(",")}if(null==a){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,s.returnImageBitmap?{imageBitmap:await(0,ne.m)(e,`${i(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*r,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(ae.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ae.A({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const l=!!s.requestAsImageElement&&!this.pixelFilter,u=l&&!!s.returnImageBitmap,p={imageServiceParameters:a,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:l,returnImageBitmap:u,signal:s.signal};return this._requestArrayBuffer(p)}async fetchPixels(e,t,r,i={}){await this._initJobHandler(),i.applyRendering&&this._updateCurrentRasterInfo();const s=i.applyRendering?void 0:new re({layer:this,requestRawData:!0,interpolation:i.interpolation??"nearest",bandIds:i.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,r,i.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,i.bandIds||delete n.bandIds,delete n.compressionQuality;const o={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:i.signal},{pixelData:a}=await this._requestArrayBuffer(o);return a??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return(0,f.A)(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 v.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.A)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>ct.A.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,r){const i=(0,ge.Dl)(e),s=(0,ge.lF)({...i?.query,f:"json"}),n=(0,ge.jV)(s,r),o=`${i?.path}/${t}/info`,a=(0,f.A)(`${o}`,n),l=(0,f.A)(`${o}/keyProperties`,n),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 m=null;p.statistics?.length&&(m=p.statistics.map(e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]})));const d=M.A.fromJSON(p.extent),y=Math.ceil(d.width/p.pixelSizeX-.1),g=Math.ceil(d.height/p.pixelSizeY-.1),h=d.spatialReference,v=new he.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:h}),w=p.histograms?.length?p.histograms:null,R=new $t.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new ue.A({width:y,height:g,bandCount:p.bandCount,extent:d,spatialReference:h,pixelSize:v,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:w,keyProperties:c,storageInfo:R})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,f.A)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await(0,f.A)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,f.A)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,F.YX)(a),outSR:"0:"+e},u=(0,f.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,m=n.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const y={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,F.YX)(a),outSR:"0:"+e},g=(0,f.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(y),...t}).then(e=>e.data).catch(()=>({})),h=await Promise.all([o,u,g]);let v=h[0].ipxf;if(null==v){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(v={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const w=M.A.fromJSON(h[1]?.geometries?.[0]);w&&(w.spatialReference=new I.A({wkid:0,imageCoordinateSystem:s}));const R=h[2].geometries?h[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],C=R.length;if(C<3)return{ics:s,icsToPixelTransform:v,icsExtent:w,northDirection:null};let b=0,S=0,x=0,A=0;for(let e=0;e<C;e++)b+=R[e].x,S+=R[e].y,x+=R[e].x*R[e].x,A+=R[e].x*R[e].y;const D=(C*A-b*S)/(C*x-b*b);let P=0;const T=R[4].x>R[0].x,j=R[4].y>R[0].y;return D===1/0?P=j?90:270:0===D?P=T?0:180:D>0?P=T?180*Math.atan(D)/Math.PI:180*Math.atan(D)/Math.PI+180:D<0&&(P=j?180+180*Math.atan(D)/Math.PI:360+180*Math.atan(D)/Math.PI),{ics:s,icsToPixelTransform:v,icsExtent:w,northDirection:P}}async generateRasterInfo(e,t){const r=(0,b.PZ)(_.A,e),s={...t,query:this._getQueryParams()};if(!r||"none"===r.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(r))return this.serviceRasterInfo??(0,Ut.Tw)(i(this.parsedUrl),this.sourceJSON,s);const n=function(e){const t=JSON.stringify(e),r=t.includes('"rasterFunctionDefinition":{'),i=r?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=i?.map(e=>r?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}(r);if(!n)throw new v.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[n])return this._functionRasterInfos[n];const o=(0,Ut.X6)(i(this.parsedUrl),r,s);this._functionRasterInfos[n]=o;try{return await o}catch(e){throw this._functionRasterInfos[n]=null,e}}getExportImageServiceParameters(e,t,r,s,n){const o=zt((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));n??=this.exportImageServiceParameters;const a=n.toJSON(),{bandIds:l,noData:u}=a;let{renderingRule:p}=a;const c=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,d=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(l?.length&&this._hasRasterFunction(this.rasterFunction)&&!c&&d){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFunctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){const t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;a.bandIds=void 0}else a.bandIds=l?.join(",");Array.isArray(u)&&u.length>0&&(a.noData=u.join(","));const y=this._processMultidimensionalIntersection(null,s,n.mosaicRule);if(y.isOutSide)return null;a.mosaicRule=null!=y.mosaicRule?JSON.stringify(y.mosaicRule):null,s=y.timeExtent,a.renderingRule=this._getRenderingRuleString(_.A.fromJSON(p));const g={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?g.time=""+e:null==e&&null==t||(g.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:o,imageSR:o,size:t+","+r,...a,...g}}async getSamples(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r?.operations.supportsGetSamples)throw new v.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,w.o8)(e);const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,r){const i=(0,b.PZ)(wt.A,t),s=i.toJSON();Zt(s),s.outFields?.length&&(s.outFields=s.outFields.join(","));const n=await(0,ye.el)(i.geometry),o=n?.[0];null!=o&&(s.geometry=Jt(o));const a=(0,ge.Dl)(e),l=(0,ge.lF)({...a.query,f:"json",...s}),u=(0,ge.jV)(l,r),{data:p}=await(0,f.A)(`${a.path}/getSamples`,u),c=p.samples.map(e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map(e=>Number(e));return{...e,pixelValue:t}});return Rt.A.fromJSON({samples:c})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new v.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,w.o8)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=x.A.fromExtent(e.geometry));const r=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(r.isOutSide)throw new v.A("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=r.timeExtent,e.mosaicRule=r.mosaicRule;const{raster:i,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),i&&null==e.raster&&(e.raster=i),Vt(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new v.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(bt,t),s=i.toJSON();i.geometry.spatialReference.imageCoordinateSystem&&(s.geometry=Jt(i.geometry)),i.depthOffset&&i.adjust||delete s.options;const n=(0,ge.Dl)(e),o=(0,ge.lF)({...n.query,f:"json",...s}),a=(0,ge.jV)(o,r),{data:l}=await(0,f.A)(`${n.path}/imageToMap`,a);return(0,de.rS)(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new v.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(Ct,t),s=i.toJSON();i.rasterIds?.length&&(s.rasterIds=i.rasterIds.join(","));const n=(0,ge.Dl)(e),o=(0,ge.lF)({...n.query,f:"json",...s}),a=(0,ge.jV)(o,r),{data:l}=await(0,f.A)(`${n.path}/imageToMapMultiray`,a);return(0,de.rS)(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new v.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(Pt,t),s=i.toJSON(),n=await(0,ye.el)(i.geometry),o=n?.[0];null!=o&&(s.geometry=Jt(o)),i.visibleOnly||delete s.options;const a=o?.spatialReference??i.geometry?.spatialReference;a&&(s.inSR=zt(a));const l=(0,ge.Dl)(e),u=(0,ge.lF)({...l.query,f:"json",...s}),p=(0,ge.jV)(u,r),{data:c}=await(0,f.A)(`${l.path}/mapToImage`,p);return(0,de.rS)(c)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new v.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(fe,t),s=i.toJSON(),n=await(0,ye.el)([i.fromGeometry,i.toGeometry]);null!=n[0]&&(s.fromGeometry=Jt(n[0]),n[0].spatialReference&&(s.inSR=zt(n[0].spatialReference))),null!=n[1]&&(s.toGeometry=Jt(n[1])),i.objectIds?.length&&(s.objectIds=s.objectIds.join(","));const o=(0,ge.Dl)(e),a=(0,ge.lF)({...o.query,f:"json",...s}),l=(0,ge.jV)(a,r),{data:u}=await(0,f.A)(`${o.path}/find`,l);return Ce.fromJSON(u)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new v.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(St,t).toJSON(),s=(0,ge.Dl)(e),n=(0,ge.lF)({...s.query,f:"json",...i}),o=(0,ge.jV)(n,r),{data:a}=await(0,f.A)(`${s.path}/getImageUrl`,o);return Mt.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new kt.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new v.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},async function(e,t,r){const i=(0,b.PZ)(ze,t),s=(0,ge.Dl)(e),n=i.toJSON();i.outSpatialReference&&(n.outSR=zt(i.outSpatialReference));const o=(0,ge.lF)({...s.query,f:"json",...n}),a=(0,ge.jV)(o,r),{data:l}=await(0,f.A)(s.path+"/queryBoundary",a);return $e.fromJSON(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryExtent(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Kt.L)(this.url,e,t)}async queryRasters(e,t){({query:e,requestOptions:t}=await this._prepareForQuery(e,t));const r=await(0,Qt.s)(this.url,e,t),i=this.graphicOrigin;return r.features.forEach(e=>{e.layer=this,e.origin=i}),r}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Bt.V)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new v.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},async function(e,t,r){const i=(0,b.PZ)(Ye,t),s=i.toJSON();Zt(s),s.objectIds?.length&&(s.objectIds=s.objectIds.join(",")),s.geometry||s.objectIds||s.time||s.where||(s.where="1=1");const n=await(0,ye.el)(i.geometry),o=n?.[0];null!=o&&(s.geometry=Jt(o));const a=o?.spatialReference??i.geometry?.spatialReference;a&&(s.inSR=zt(a));const l=(0,ge.Dl)(e),u=(0,ge.lF)({...l.query,f:"json",...s}),p=(0,ge.jV)(u,r),{data:c}=await(0,f.A)(`${l.path}/queryGPSInfo`,p);return st.fromJSON(c)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Lt.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new v.A("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,a=null,l=null;const u=le.F_.servicePixelValue.toLowerCase(),p=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some(e=>!e.toLowerCase().startsWith(u)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(u)&&e.length>u.length).map(e=>{const t=e.slice(u.length+1);return[this._updateRenderingRulesFunctionName(t,p),t]});a=t.map(e=>new _.A({functionName:e[0]})),l=t.map(e=>e[1]);const{rasterFunction:r}=this;0===a.length?r?.functionName?(a.push(r),l.push(r.functionName)):a=null:r?.functionName&&!a.some(e=>e.functionName===r.functionName)&&(a.push(r),l.push(r.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let d=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:r}=(0,A.Rp)(m,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new v.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=r?.timeExtent&&(d=r.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=x.A.fromExtent(g));const h=this._getQueryParams({geometry:g,timeExtent:d,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:a,pixelSize:r,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:s?1:null});delete h.f;const f=new pt(h);try{await this._generateRasterInfo(this.rasterFunction);const r=await Vt(this.url,f,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,a=null!=r.value&&r.value.toLowerCase().includes("nodata"),u=o&&!c&&r?.catalogItems?.features.length&&(n||!a),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?(0,A.XU)({rasterInfo:this.rasterInfo,multidimensionalDefinition:y?.multidimensionalDefinition,timeExtent:d,multidimensionalSubset:this.multidimensionalSubset}):null;if(!u)return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p});const m=this.objectIdField||"ObjectId",g=r.catalogItems?.features??[],h=g.map(e=>e.attributes?.[m]),v=new kt.A({objectIds:h,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[m]}),w=await this.queryRasters(v);return w?.features?.length&&w.features.forEach(t=>{g.forEach(r=>{r.attributes[m]===t.attributes[m]&&t.geometry&&(r.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(r.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new v.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,f.A)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=(0,f.A)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([r,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,A.z2)(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,Ut.Tw)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,Ut.E9)(e,t),e)),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([r,s,n]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),a.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,R.wB)(()=>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 r=this.timeInfo,{multidimensionalInfo:i}=this.serviceRasterInfo;if(null==e||null==i||null==t||null==r?.startField)return e;const{startField:s}=r,n=i.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),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===n&&(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=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new j.A({variableName:"",dimensionName:n,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 v.A("imagery-layer:query-rasters","query operation is not supported on the input image service");const r=null!=e?(0,b.PZ)(kt.A,e):this.createQuery();return t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:r,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:r}=this;return"unique-value"===e.type&&this._hasRasterFunction(r)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,pe.fp)(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:s}=await(0,f.A)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new v.A("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),r=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||r}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:r}=e,i="resample"===t?.toLowerCase(),s=r?.ResampleType||r?.resampleType;return i&&(7===s||10===s)}_configRenderer(e){const{rasterInfo:t}=this;if(!this.isRenderedFormat&&!this.pixelFilter||this._isVectorDataSet()){const r=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,i=(0,pe.I8)({variableName:r,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>=3){const e=i?.bandIds??(0,pe.ci)(t);!e||3===t.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=i?.renderer??(0,pe.PD)(t,{bandIds:this.bandIds,variableName:this.rasterFunction?null:r}));const s=(0,pe.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=t):this.symbolizer=new ce.A({rendererJSON:s,rasterInfo:t}),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:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):(0,D.D)(e,t,r)}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,f.A)(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:s,signal:n}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:o}=await(0,f.A)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,ne.m)(o,r,n),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),a=(0,f.A)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),l=(await Promise.all([a,o]))[0].data,u=t.format||"jpgpng";let p=u;if("bsq"!==p&&"bip"!==p&&(p=(0,D.g)(l)),!p)throw new v.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:n},m=this._decodePixelBlock(l,{width:t.width,height:t.height,format:u,applyJpegMask:!0},c);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,A.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new Y.A;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 r=e.value,{templateRRFunctionNames:i,showNoDataRecords:s,returnDomainValues:n,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 r&&r.toLowerCase().includes("nodata"),m=[];if(r&&!l&&(!c||s)){const e={};e[p]=0,u=[r],l=[new h.A({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,le.eS)(this.rasterFields,e,t.effectiveMultidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);const{itemPixelValue:d,servicePixelValue:y}=le.F_,g=this.rasterFields.some(e=>e.name===d),f=this.graphicOrigin;for(let e=0;e<l.length;e++){const t=l[e];if(null!=r){const n=u[e],o=this.rasterFunction&&a&&a.length>0&&i&&i.length>0&&i.includes(this.rasterFunction.functionName)?a[i.indexOf(this.rasterFunction.functionName)]:r;if("nodata"===n.toLowerCase()&&!s)continue;g&&(t.attributes[d]=n),t.attributes[y]=o,this._updateFeatureWithMagDirValues(t,n);const l=this.fields&&this.fields.length>0;let p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:r:o;this.rasterFunction||(p=l?n:r),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,t.origin=f,n&&this._updateFeatureWithDomainValues(t),i&&a&&i.length===a.length)for(let e=0;e<i.length;e++){const r=`${le.F_.servicePixelValue}.${i[e]}`;t.attributes[r]=a[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,r){const{multidimensionalSubset:i}=this;if(!i)return{isOutSide:!1,timeExtent:t,mosaicRule:r=this._combineMosaicRuleWithTimeExtent(r,t)};if(i){const{isOutside:r,intersection:s}=(0,A.Rp)(i,{geometry:e,timeExtent:t});if(r)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(r=this._combineMosaicRuleWithTimeExtent(r,t),r?.multidimensionalDefinition){const{isOutside:e}=(0,A.Rp)(i,{multidimensionalDefinition:r.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:r}}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==r)return;const{features:i,fields:s}=r,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const o=i.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));o&&o[0]&&s.forEach(t=>{const r=le.ER+t.name;e.attributes[r]=o[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const r=t.split(/,\s*/).map(e=>parseFloat(e)),i=r.map(e=>[e]),s=r.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new ae.A({height:1,width:1,pixelType:"f32",pixels:i,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new M.A(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,P.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[le.F_.magnitude]=o[0],e.attributes[le.F_.direction]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>"coded-value"===e.domain?.type);null!=t&&t.forEach(t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.find(e=>e.code===r);i&&(e.attributes[t.name]=i.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;null!=r&&e.forEach(e=>{if(e?.attributes)for(const i of t){const t=r.get(i)?.name;t&&t!==i&&(e.attributes[i]=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 r=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(r)?t.get(r):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:r,rasterFunction:i}=this;i&&null==e.rasterFunction&&(e.rasterFunction=i),r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:r}=this;r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:r,maxRecordCount:i}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,o=!(!e.spatialReference&&!e.extent?.spatialReference),a=t.includes("edit"),l=t.includes("mensuration")&&o,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),c=this._isMosaicDataset(e)&&t.includes("catalog"),m=t.includes("download"),d=r>=10.7&&n||r>=11.4&&(n||l&&u.includes("3d")),y=c&&e.fields&&e.fields.length>0,g=y&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:r>=11.2&&c,supportsImageToMapMultiray:r>=11.2&&c,supportsMapToImage:r>=11.2&&c,supportsFindImages:r>=11.2&&c,supportsGetImageUrl:r>=11.3&&m,supportsMeasure:l,supportsMeasureFromImage:r>=11.2,supportsDownload:m,supportsQuery:y,supportsGetSamples:r>=10.2&&s,supportsProject:r>=10.3&&s,supportsComputeStatisticsHistograms:r>=10.4&&s,supportsQueryBoundary:r>=10.6&&s,supportsCalculateVolume:d,supportsComputePixelLocation:r>=10.7&&c,supportsComputeAngles:r>=10.91,supportsQueryGPSInfo:r>=11.2&&c,supportsAdd:a,supportsDelete:a,supportsEditing:a,supportsUpdate:a,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:i,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,supportsStatistics:!!g?.supportsStatistics,supportsOrderBy:!!g?.supportsOrderBy,supportsDistinct:!!g?.supportsDistinct,supportsPagination:!!g?.supportsPagination,supportsPaginationOnAggregatedQueries:!!g?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!g?.useStandardizedQueries,supportsPercentileStatistics:!!g?.supportsPercentileStatistics,supportsCentroid:!!g?.supportsReturningGeometryCentroid,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!!g?.supportsQueryWithDistance,supportsExtent:!!g?.supportsReturningQueryExtent,supportsGeometryProperties:!!g?.supportsReturningGeometryProperties,supportsHavingClause:!!g?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:g?.supportsSqlExpression??!!g,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!g?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function i(e){return e?.path??""}return(0,s.Cg)([(0,p.MZ)({clonable:!1})],r.prototype,"_functionRasterInfos",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"_serviceSupportsMosaicRule",void 0),(0,s.Cg)([(0,Ue.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],r.prototype,"readServiceSupportsMosaicRule",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"_rasterFunctionNamesIndex",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"adjustAspectRatio",void 0),(0,s.Cg)([(0,p.MZ)({type:[b.jz],json:{write:!0}})],r.prototype,"bandIds",void 0),(0,s.Cg)([(0,Ue.w)("bandIds")],r.prototype,"readBandIds",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],r.prototype,"capabilities",void 0),(0,s.Cg)([(0,Ue.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],r.prototype,"readCapabilities",null),(0,s.Cg)([(0,p.MZ)({type:Number})],r.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,te.K)("compressionQuality")],r.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,p.MZ)({type:Number})],r.prototype,"compressionTolerance",void 0),(0,s.Cg)([(0,te.K)("compressionTolerance")],r.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"defaultMosaicRule",void 0),(0,s.Cg)([(0,Ue.w)("defaultMosaicRule",["defaultMosaicMethod"])],r.prototype,"readDefaultMosaicRule",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],r.prototype,"definitionExpression",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,constructOnly:!0})],r.prototype,"exportImageServiceParameters",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,type:[ie.A]})],r.prototype,"fields",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"fieldsIndex",null),(0,s.Cg)([(0,p.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],r.prototype,"format",null),(0,s.Cg)([(0,Ue.w)("service","format",["serviceDataType"])],r.prototype,"readFormat",null),(0,s.Cg)([(0,p.MZ)({type:M.A})],r.prototype,"fullExtent",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"hasMultidimensions",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"maxImageHeight"}}})],r.prototype,"imageMaxHeight",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"maxImageWidth"}}})],r.prototype,"imageMaxWidth",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{type:ee.SZ.jsonValues,read:ee.SZ.read,write:ee.SZ.write}})],r.prototype,"interpolation",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"minScale",void 0),(0,s.Cg)([(0,Ue.w)("service","minScale")],r.prototype,"readMinScale",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"maxScale",void 0),(0,s.Cg)([(0,Ue.w)("service","maxScale")],r.prototype,"readMaxScale",null),(0,s.Cg)([(0,p.MZ)({type:Y.A})],r.prototype,"mosaicRule",null),(0,s.Cg)([(0,Ue.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],r.prototype,"readMosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],r.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"multidimensionalInfo",void 0),(0,s.Cg)([(0,p.MZ)({type:oe.A,json:{write:!0}})],r.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,p.MZ)({json:{type:[Number,[Number]],write:!0}})],r.prototype,"noData",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{type:ee.hm.jsonValues,read:ee.hm.read,write:ee.hm.write}})],r.prototype,"noDataInterpretation",void 0),(0,s.Cg)([(0,p.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],r.prototype,"objectIdField",void 0),(0,s.Cg)([(0,Ue.w)("objectIdField")],r.prototype,"readObjectIdField",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"geometryType",void 0),(0,s.Cg)([(0,p.MZ)({})],r.prototype,"typeIdField",void 0),(0,s.Cg)([(0,p.MZ)({})],r.prototype,"types",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,s.Cg)([(0,p.MZ)({type:Function})],r.prototype,"pixelFilter",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"raster",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"sourceType",void 0),(0,s.Cg)([(0,Ue.w)("sourceType",["serviceSourceType","fields"])],r.prototype,"readSourceType",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"viewId",void 0),(0,s.Cg)([(0,p.MZ)({types:me.uy})],r.prototype,"renderer",null),(0,s.Cg)([(0,p.MZ)({types:me.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:me.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],r.prototype,"internalRenderer",null),(0,s.Cg)([(0,Ue.w)("internalRenderer")],r.prototype,"readRenderer",null),(0,s.Cg)([(0,te.K)("internalRenderer")],r.prototype,"writeRenderer",null),(0,s.Cg)([(0,p.MZ)({clonable:!1})],r.prototype,"symbolizer",void 0),(0,s.Cg)([(0,p.MZ)(T.ke)],r.prototype,"opacity",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"rasterFields",null),(0,s.Cg)([(0,p.MZ)({constructOnly:!0})],r.prototype,"rasterFunctionInfos",void 0),(0,s.Cg)([(0,p.MZ)({type:_.A,json:{name:"renderingRule"}})],r.prototype,"rasterFunction",null),(0,s.Cg)([(0,Ue.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],r.prototype,"readRasterFunction",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"serviceDataType",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,type:I.A})],r.prototype,"spatialReference",void 0),(0,s.Cg)([(0,Ue.w)("spatialReference",["spatialReference","extent"])],r.prototype,"readSpatialReference",null),(0,s.Cg)([(0,p.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,type:ee.e8.jsonValues}})],r.prototype,"pixelType",void 0),(0,s.Cg)([(0,te.K)("pixelType")],r.prototype,"writePixelType",null),(0,s.Cg)([(0,p.MZ)({constructOnly:!0,type:ue.A})],r.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,p.MZ)(T.OZ)],r.prototype,"url",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,s.Cg)([(0,Ue.w)("version",["currentVersion","fields","timeInfo"])],r.prototype,"readVersion",null),r=(0,s.Cg)([(0,p.$K)("esri.layers.mixins.ArcGISImageService")],r),r};var Xt=r(18768),Yt=r(63074),er=r(69208),tr=r(16131),rr=r(8303),ir=r(72545),sr=r(56551),nr=r(54310),or=r(25036),ar=r(82935),lr=r(91908),ur=r(24212),pr=r(30291),cr=r(88625),mr=r(59923);let dr=class extends((0,Yt.dM)((0,ar.e)((0,or.j)((0,tr.q)((0,rr.A)((0,sr.H)(Wt((0,ir.G)((0,nr.J)((0,er.d)((0,Xt.b)((0,l.M)((0,o.OU)(g.A)))))))))))))){constructor(...e){super(...e),this.graphicOrigin=new y(this),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.type="imagery",this._debouncedSaveOperations=(0,u.sg)(async(e,t,i)=>{const{save:s,saveAs:n}=await r.e(9838).then(r.bind(r,59838));switch(e){case 0:return s(this,t);case 1:return n(this,i,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(u.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}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)}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:t}=this,r=new Set,i=le.F_.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=le.Oo.toLowerCase(),o=`${le.F_.servicePixelValue.toLowerCase()}.`;for(const e of t){const t=e.name.toLowerCase();t===i||t.startsWith(o)||s&&t.startsWith(n)||r.add(e.name)}const a=(0,pr.tn)({fields:t,title:this.title},{...e,visibleFieldNames:r}),{rasterInfo:l}=this;return a?.fieldInfos&&l&&(0,le.h4)(a.fieldInfos,l),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,t.origin=this.graphicOrigin;return e})}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}serviceSupportsSpatialReference(e){return(0,lr.D)(this,e)}write(e,t){return this._isPreviewLayer?((0,mr.U4)(t,this,"preview layer cannot be saved"),null):super.write(e,t)}_validateElevationInfo(e){(0,ur.XF)(a.A.getLogger(this),(0,ur.$7)("Imagery layers","relative-to-scene",e)),(0,ur.XF)(a.A.getLogger(this),(0,ur.tW)("Imagery layers",e))}};(0,s.Cg)([(0,p.MZ)({type:cr.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],dr.prototype,"elevationInfo",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0,clonable:!1})],dr.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,p.MZ)(T.fV)],dr.prototype,"legendEnabled",null),(0,s.Cg)([(0,p.MZ)({type:["show","hide"]})],dr.prototype,"listMode",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],dr.prototype,"isReference",void 0),(0,s.Cg)([(0,p.MZ)({type:["ArcGISImageServiceLayer"]})],dr.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,p.MZ)(T.M6)],dr.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,p.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],dr.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],dr.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,p.MZ)(T.PY)],dr.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],dr.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],dr.prototype,"_isPreviewLayer",null),dr=(0,s.Cg)([(0,p.$K)("esri.layers.ImageryLayer")],dr);const yr=dr},18768(e,t,r){r.d(t,{b:()=>a});var i=r(5482),s=r(53966),n=r(91429),o=r(60694);const a=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}},56551(e,t,r){r.d(t,{H:()=>c});var i=r(5482),s=r(91429),n=r(69540),o=r(25482),a=r(56507),l=r(94359),u=r(93223);let p=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],p.prototype,"method",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"value",void 0),(0,i.Cg)([(0,s.MZ)({type:[a.jz],json:{write:{isRequired:!0}}})],p.prototype,"bandIds",void 0),(0,i.Cg)([(0,s.MZ)({types:l.uy,json:{write:!0,origins:{"web-scene":{types:l.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],p.prototype,"renderer",void 0),p=(0,i.Cg)([(0,s.$K)("esri.renderers.support.RasterPresetRenderer")],p);const c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],r.prototype,"activePresetRendererName",void 0),(0,i.Cg)([(0,s.MZ)({type:[p],json:{name:"layerDefinition.presetRenderers",write:!0}})],r.prototype,"presetRenderers",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.RasterPresetRendererMixin")],r),r}},33446(e,t,r){r.d(t,{C:()=>o,m:()=>n});var i=r(49186),s=r(17676);async function n(e,t,r){let n;try{n=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),n}async function o(e,t,r,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,s.Te)(o),a}},91908(e,t,r){r.d(t,{D:()=>n});var i=r(60694);const s=[];function n(e,t){if((0,i.Wo)(e.url??""))return!0;const{wkid:r}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}s.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}]),s.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}]),s.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}]),s.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}]),s.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}])},82371(e,t,r){r.d(t,{E9:()=>y,Tw:()=>m,X6:()=>d});var i=r(11254),s=r(5443),n=r(86738),o=r(16930),a=r(87186),l=r(20223),u=r(2272),p=r(22671);async function c(e,t,r){const c=(0,u.Dl)(e),{rasterFunction:m,sourceJSON:d}=t||{},y=m?JSON.stringify(m.rasterFunctionDefinition||m):null,g=(0,u.lF)({...c.query,renderingRule:y,f:"json"}),h=(0,u.jV)(g,r);e=c.path;const f=d||await(0,i.A)(e,h).then(e=>e.data),v=f.hasRasterAttributeTable?(0,i.A)(`${e}/rasterAttributeTable`,h):null,w=f.hasColormap?(0,i.A)(`${e}/colormap`,h):null,R=f.hasHistograms?(0,i.A)(`${e}/histograms`,h):null,C=f.currentVersion>=10.3?(0,i.A)(`${e}/keyProperties`,h):null,b=f.hasMultidimensions?(0,i.A)(`${e}/multidimensionalInfo`,h):null,S=f.currentVersion>=10.81?(0,i.A)(`${e}/statistics`,h):null,M=await Promise.allSettled([v,w,R,C,b,S]),x=s.A.fromJSON(f.extent),I=Math.ceil(x.width/f.pixelSizeX-.1),F=Math.ceil(x.height/f.pixelSizeY-.1),A=o.A.fromJSON(f.spatialReference||f.extent.spatialReference),D="fulfilled"===M[0].status?M[0].value?.data:null,P=D?.features?.length?p.A.fromJSON(D):null,T="fulfilled"===M[1].status?M[1].value?.data.colormap:null,j=T?.length?T:null,N="fulfilled"===M[2].status?M[2].value?.data.histograms:null,O=N?.[0]?.counts?.length?N:null,Z="fulfilled"===M[3].status?M[3].value?.data??{}:{},_="fulfilled"===M[4].status?M[4].value?.data.multidimensionalInfo:null,V=_?.variables?.length?_:null;V&&V.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});let q=null;const E="fulfilled"===M[5].status?M[5].value?.data.statistics:null;if(E&&E.length===f.bandCount)q=E.map(e=>({avg:e.mean,count:e.count,max:e.max,median:e.median,min:e.min,mode:e.mode,stddev:e.standardDeviation,sum:e.sum}));else if(f.minValues&&f.minValues.length===f.bandCount){q=[];for(let e=0;e<f.minValues.length;e++)q.push({min:f.minValues[e],max:f.maxValues[e],avg:f.meanValues[e],stddev:f.stdvValues[e]})}const{defaultVariable:J,serviceDataType:G}=f;J&&J!==Z.DefaultVariable&&(Z.DefaultVariable=J),G?.includes("esriImageServiceDataTypeVector")&&!G.includes(Z.DataType)&&(Z.DataType=G.replace("esriImageServiceDataType",""));let z=f.noDataValue;f.noDataValues?.length&&f.noDataValues.some(e=>e!==z)&&(z=f.noDataValues);const U=f.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:f.extent.xmin,y:f.extent.ymax,spatialReference:A}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(I,F))/Math.LN2-8)),transposeInfo:f.transposeInfo}):void 0;return new a.A({width:I,height:F,bandCount:f.bandCount,extent:s.A.fromJSON(f.extent),spatialReference:A,pixelSize:new n.A({x:f.pixelSizeX,y:f.pixelSizeY,spatialReference:A}),pixelType:f.pixelType.toLowerCase(),statistics:q,attributeTable:P,colormap:j,histograms:O,keyProperties:Z,noDataValue:z,multidimensionalInfo:V,storageInfo:U})}function m(e,t,r){return c(e,{sourceJSON:t},r)}function d(e,t,r){return c(e,{rasterFunction:t},r)}function y(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},20615(e,t,r){r.d(t,{I:()=>o});var i=r(2272),s=r(80893),n=r(61956);function o(e,t,r,o){return(0,s.gW)((0,i.Dl)(e),n.A.from(t),r,o)}},74910(e,t,r){r.d(t,{L:()=>a});var i=r(5443),s=r(2272),n=r(80893),o=r(61956);async function a(e,t,r){const a=(0,s.Dl)(e),l=await(0,n.Jf)(a,o.A.from(t),{...r}),u=l.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.count,extent:null}:{count:l.count,extent:i.A.fromJSON(u)}}},78286(e,t,r){r.d(t,{V:()=>o});var i=r(2272),s=r(80893),n=r(61956);async function o(e,t,r,o){const a=(0,i.Dl)(e),l=await(0,s.Pk)(a,n.A.from(t),r,o);return l.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(l.uniqueIds)??[]}},99199(e,t,r){r.d(t,{e:()=>l,s:()=>a});var i=r(2272),s=r(80893),n=r(22671),o=r(61956);async function a(e,t,r,i){const s=await l(e,t,r,i);return n.A.fromJSON(s)}function l(e,t,r,n){const a=(0,i.Dl)(e),l={...r},u=o.A.from(t);return(0,s.eW)(a,u,u.sourceSpatialReference,l,n)}},58501(e,t,r){r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7598],{69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>o,RS:()=>s,Ul:()=>d,i5:()=>m,lM:()=>n,qK:()=>p});var i=r(34275);const s=16;function n(e){if(!e)return 0;let t=p;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let r=c;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=p;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):p;case"string":return function(e){return 32+e.length}(e);case"number":return s;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+m:Array.isArray(t)?u(t,s):0:0),0)}function u(e,t){return c+e.length*t}const p=32,c=16,m=145,d=64},62815(e,t,r){r.d(t,{N:()=>a,d:()=>l});var i=r(86211),s=r(73941),n=r(21325),o=r(52006);function a(e,t,r){const i=l(t,r);if(1!==i)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,i);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(const r of e.curvePaths)for(const e of r){const r=(0,o.yP)(e);r.length>2&&(r[2]*=t)}if(e.paths)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}}(e,i);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(const r of e.curveRings)for(const e of r){const r=(0,o.yP)(e);r.length>2&&(r[2]*=t)}if(e.rings)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}}(e,i);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,i);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,i);default:return}}function l(e,t){return null==e||null==t||t.vcsWkid||(0,n.aI)(e,t)||(0,s.xP)(e)||(0,s.xP)(t)?1:(0,i.G9)(e)/(0,i.G9)(t)}},74379(e,t,r){r.d(t,{V:()=>i,t:()=>s});const i=Symbol("isImageryGraphicOrigin");function s(e){return!!e&&i in e}},87772(e,t,r){r.r(t),r.d(t,{default:()=>yr});var i,s=r(5482),n=r(37838),o=r(69540),a=r(53966),l=r(25728),u=r(17676),p=r(91429),c=r(89808),m=r(99959),d=r(74379);class y extends m.A{get[(i=d.V,c.Q)](){return this.layer}constructor(e){super(),this[i]=!0,this.type="imagery",this.layer=e}get id(){return this.layer.id}}var g=r(4146),h=r(52106),f=r(11254),v=r(49186),w=r(4718),R=r(36708),C=r(84952),b=r(56507),S=r(62788),M=r(5443),x=r(39829),I=r(16930),F=r(21325),A=r(4366),D=r(20758),P=r(34251),T=r(10873),j=r(45617),N=r(25482),O=r(94778);const Z={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 _=r(22796),V=r(67369),q=r(70274),E=r(48940);const J=new Set(["u1","u2","u4","u8","s8","u16","s16"]),G={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)"},z=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function U(e){return z.has(e.type)}function $(e,t){if(!e||!t)return(0,w.o8)(e||t);const r=(0,w.o8)(e);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),L(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(B(r.functionArguments).Raster=t);return r}function L(e,t){for(const r in e)"raster"===r.toLowerCase()&&("RasterFunctionVariable"===e[r].type?(e[r]=t.rasterFunctionDefinition,e[r].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[r].type&&L(e[r].arguments,t))}function K(e){const t=(0,w.o8)(Z[e.functionName+"Function"]),r=e.functionArguments;for(const e in r)"raster"===e.toLowerCase()?(t.arguments[e]=K(r[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=X(r[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=r[e];return e.outputPixelType&&t.function&&(t.function.pixelType=e.outputPixelType.toUpperCase()),t}function B(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?B(t.functionArguments):e}const Q={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function k(e,t){const r=J.has(t)?(0,O.hP)(t):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function H(e){if(null==e)return;const{fields:t}=e,r=t?.find(e=>e?.name&&"value"===e.name.toLowerCase());return r?.name}function W(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find(e=>"fill"===e.type)?.material?.color:e.symbol?.color}function X(e){const t=[],r=[];return e.forEach(e=>{t.push(e[0]),r.push((0,V.vL)([...e.slice(1),255]))}),{type:"RasterColormap",values:t,colors:r}}var Y=r(85675),ee=r(13868),te=r(43937);let re=class extends N.o{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return this.requestRawData||"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}get pixelType(){const{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=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("pixelType"),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 r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new Y.A({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.multidimensionalSubset?.areaOfInterest;return r&&(t=function(e,t){return $(new _.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,r)),this.requestRawData||!e.isRenderedFormat||e.pixelFilter||"vector-field"===e.renderer?.type||(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:i}=t;return e=e||t.rasterFunction,i&&U(i)?$(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const r=t.convertToRFT,i=new _.A;i.functionName="Stretch";const s=Q[q.u.toJSON(e.stretchType)],n="u8",o=e.customStatistics?.map(e=>[e.min,e.max,e.avg??0,e.stddev??1]),a={StretchType:s,Statistics:o,DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(a.Min=e.outputMin),null!=e.outputMax&&(a.Max=e.outputMax),s===Q.standardDeviation?(a.NumberOfStandardDeviations=e.numberOfStandardDeviations,i.outputPixelType=n):s===Q.percentClip?(a.MinPercent=e.minPercent,a.MaxPercent=e.maxPercent,i.outputPixelType=n):s===Q.minMax?i.outputPixelType=n:s===Q.sigmoid&&(a.SigmoidStrengthLevel=e.sigmoidStrengthLevel),i.functionArguments=a,i.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new _.A;if(r)n.functionArguments={ColorRamp:(0,V.hf)(s)};else{const r=(0,V.hs)(s,!0);if(r)n.functionArguments={colorRampName:r};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.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"),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,V.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=i,r?new _.A({rasterFunctionDefinition:K(n)}):n}return r?new _.A({rasterFunctionDefinition:K(i)}):i}(e,t);case"class-breaks":return function(e,t){const r=[],i=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=H(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach((t,r)=>{const i=t.symbol?.color;let s;i?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach(o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||r===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],i.r,i.g,i.b]))})});const r=a?k(n,a):n,i=new _.A;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=r,i.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:K(i)}):i}e.classBreakInfos.forEach((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?r.push(e.minValue,e.maxValue+o):r.push(e.minValue+o,e.maxValue+o),i.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)});const c=a?k(n,a):n,m=new _.A;m.functionName="Remap",m.functionArguments={InputRanges:r,OutputValues:i,NoDataRanges:s},m.variableName="Raster";const d=new _.A;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new _.A({rasterFunctionDefinition:K(d)}):d}(e,t);case"unique-value":return function(e,t){const r=[],{pixelType:i,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=H(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach(e=>{const r=e.value,i=W(e);null!=r&&i?.a&&t.set(String(r),i.toRgb())});const i=e.field;i&&n.forEach(({attributes:e})=>{const s=String(e[i]),n=e[o],l=t.get(s);l?r.push([n,...l]):a&&r.push([n,...a])})}}else for(let e=0;e<l.length;e++){const t=l[e],i=W(t),s=+t.value;if(i?.a){if(isNaN(s))return null;r.push([s,i.r,i.g,i.b])}}const u=i?k(r,i):r,p=new _.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new _.A({rasterFunctionDefinition:K(p)}):p}(e,t);case"raster-colormap":return function(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:i}=t,s=i?k(r,i):r,n=new _.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new _.A({rasterFunctionDefinition:K(n)}):n}(e,t);case"vector-field":return function(e,t){const r=new _.A;r.functionName="VectorFieldRenderer";const{dataType:i,bandNames:s}=t,n="vector-uv"===i;let o,a;if(2===s?.length){const e=s.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 E.A,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:G[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};r.functionArguments=c;const m=K(r);return t.convertToRFT?_.A.fromJSON({rasterFunctionDefinition:m}):r}(e,t);case"raster-shaded-relief":return function(e,t){const r=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 _.A;const i=new _.A;i.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),i.functionArguments=o,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?o.ColorRamp=(0,V.hf)(e.colorRamp):o.Colormap=(0,V.R8)(e.colorRamp)),r?new _.A({rasterFunctionDefinition:K(i)}):i}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(i,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map(({name:e})=>e),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e):e}};(0,s.Cg)([(0,p.MZ)()],re.prototype,"layer",void 0),(0,s.Cg)([(0,p.MZ)()],re.prototype,"requestRawData",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"adjustAspectRatio",null),(0,s.Cg)([(0,te.K)("adjustAspectRatio")],re.prototype,"writeAdjustAspectRatio",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"bandIds",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"compression",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"compressionQuality",null),(0,s.Cg)([(0,te.K)("compressionQuality")],re.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"compressionTolerance",null),(0,s.Cg)([(0,te.K)("compressionTolerance")],re.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"format",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:{reader:ee.SZ.read},write:{writer:ee.SZ.write}}})],re.prototype,"interpolation",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"noData",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:{reader:ee.hm.read},write:{writer:ee.hm.write}}})],re.prototype,"noDataInterpretation",null),(0,s.Cg)([(0,p.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,write:ee.e8.write}})],re.prototype,"pixelType",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"lercVersion",void 0),(0,s.Cg)([(0,te.K)("lercVersion")],re.prototype,"writeLercVersion",null),(0,s.Cg)([(0,p.MZ)({type:Number})],re.prototype,"version",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],re.prototype,"mosaicRule",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0,name:"renderingRule"}})],re.prototype,"rasterFunction",null),re=(0,s.Cg)([(0,p.$K)("esri.layers.support.ExportImageServiceParameters")],re);var ie=r(20437),se=r(95466),ne=r(33446),oe=r(43577),ae=r(14140),le=r(74797),ue=r(87186),pe=r(12711),ce=r(85676),me=r(94359),de=r(65864),ye=r(17136),ge=r(2272),he=r(86738);let fe=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0}})],fe.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],fe.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],fe.prototype,"objectIds",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],fe.prototype,"where",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],fe.prototype,"maxCount",void 0),fe=(0,s.Cg)([(0,p.$K)("esri.rest.support.FindImagesParameters")],fe);const ve=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"make",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"model",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"focalLength",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"rows",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],r.prototype,"cols",void 0),r=(0,s.Cg)([(0,p.$K)("esri.rest.support.CameraInfoMixin")],r),r};let we=class extends(ve(N.o)){constructor(e){super(e),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"id",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"uri",write:!0}})],we.prototype,"referenceUri",void 0),(0,s.Cg)([(0,p.MZ)({type:Date,json:{write:!0}})],we.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],we.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"cameraID",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],we.prototype,"center",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],we.prototype,"perspectiveCenter",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],we.prototype,"orientation",void 0),we=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageInspectionInfo")],we);const Re=we;let Ce=class extends N.o{constructor(e){super(e),this.images=null}};var be;(0,s.Cg)([(0,p.MZ)({type:[Re],json:{write:!0}})],Ce.prototype,"images",void 0),Ce=(0,s.Cg)([(0,p.$K)("esri.rest.support.FindImagesResult")],Ce);let Se=be=class extends N.o{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new be((0,w.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,s.Cg)([(0,p.MZ)({type:[String],json:{name:"angleName",write:!0}})],Se.prototype,"angleNames",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],Se.prototype,"point",void 0),(0,s.Cg)([(0,p.MZ)({type:I.A,json:{write:!0}})],Se.prototype,"spatialReference",void 0),(0,s.Cg)([(0,p.MZ)({type:b.jz,json:{write:!0}})],Se.prototype,"rasterId",void 0),Se=be=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAngleParameters")],Se);let Me=class extends N.o{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],Me.prototype,"north",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],Me.prototype,"up",void 0),(0,s.Cg)([(0,p.MZ)({type:I.A,json:{write:!0}})],Me.prototype,"spatialReference",void 0),Me=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAngleResult")],Me);var xe=r(86211),Ie=r(60408),Fe=r(50498),Ae=r(66552);const De=new Ae.J({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 Pe=class extends N.o{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var Te;(0,s.Cg)([(0,p.MZ)()],Pe.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],Pe.prototype,"measureOperation",void 0),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],Pe.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],Pe.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Pe.prototype,"raster",void 0),Pe=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureParameters")],Pe);let je=Te=class extends Pe{constructor(e){super(e),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Te((0,w.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:!0,write:!0}})],je.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],je.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],je.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],je.prototype,"is3D",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:xe.Sk.read,write:xe.Sk.write}})],je.prototype,"linearUnit",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:xe.dk.read,write:xe.dk.write}})],je.prototype,"areaUnit",void 0),je=Te=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAreaParameters")],je);let Ne=class extends N.o{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ne.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ne.prototype,"sensorName",void 0),Ne=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureResult")],Ne);var Oe=r(64108);let Ze=class extends N.o{constructor(e){super(e),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,s.Cg)([(0,p.MZ)({type:String})],Ze.prototype,"unit",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0}})],Ze.prototype,"value",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:!0,write:!0}})],Ze.prototype,"displayValue",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{read:!0,write:!0}})],Ze.prototype,"uncertainty",void 0),Ze=(0,s.Cg)([(0,p.$K)("esri.rest.support.BaseImageMeasureResultValue")],Ze);const _e=Ze;let Ve=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:xe.dk.read,write:xe.dk.write}})],Ve.prototype,"unit",void 0),Ve=(0,s.Cg)([(0,Oe.$)("esri.rest.support.ImageMeasureResultAreaValue")],Ve);const qe=Ve;let Ee=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:xe.Sk.read,write:xe.Sk.write}})],Ee.prototype,"unit",void 0),Ee=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageMeasureResultLengthValue")],Ee);const Je=Ee;let Ge=class extends Ne{constructor(e){super(e),this.area=null,this.perimeter=null}};(0,s.Cg)([(0,p.MZ)({type:qe,json:{read:!0,write:!0}})],Ge.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],Ge.prototype,"perimeter",void 0),Ge=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageAreaResult")],Ge);let ze=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.outSpatialReference=null}};(0,s.Cg)([(0,p.MZ)({type:I.A,json:{name:"outSR",write:!0}})],ze.prototype,"outSpatialReference",void 0),ze=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageBoundaryParameters")],ze);var Ue=r(36005);let $e=class extends N.o{constructor(e){super(e),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?x.A.fromJSON(e):M.A.fromJSON(e)}};var Le;(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],$e.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"shape",write:!0}})],$e.prototype,"geometry",void 0),(0,s.Cg)([(0,Ue.w)("geometry")],$e.prototype,"readGeometry",null),$e=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageBoundaryResult")],$e);let Ke=Le=class extends Pe{constructor(e){super(e),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new Le((0,w.o8)({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,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],Ke.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],Ke.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],Ke.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],Ke.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],Ke.prototype,"is3D",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:xe.Sk.read,write:xe.Sk.write}})],Ke.prototype,"linearUnit",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:xe.b$.read,write:xe.b$.write}})],Ke.prototype,"angularUnit",void 0),Ke=Le=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageDistanceParameters")],Ke);let Be=class extends _e{constructor(e){super(e),this.unit=null}};(0,s.Cg)([(0,p.MZ)({json:{read:xe.b$.read,write:xe.b$.write}})],Be.prototype,"unit",void 0),Be=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageMeasureResultAngleValue")],Be);const Qe=Be;let ke=class extends Ne{constructor(e){super(e),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],ke.prototype,"distance",void 0),(0,s.Cg)([(0,p.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"azimuthAngle",void 0),(0,s.Cg)([(0,p.MZ)({type:Qe,json:{read:!0,write:!0}})],ke.prototype,"elevationAngle",void 0),ke=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageDistanceResult")],ke);var He=r(58174),We=r(79677),Xe=r(93223);let Ye=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=JSON.stringify(e.toJSON()))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],Ye.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Ye.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ye.prototype,"objectIds",void 0),(0,s.Cg)([(0,Xe.e)(He.x,{ignoreUnknown:!1,name:"spatialRel"})],Ye.prototype,"spatialRelationship",void 0),(0,s.Cg)([(0,p.MZ)({type:We.A,json:{name:"time",write:!0}})],Ye.prototype,"timeExtent",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],Ye.prototype,"where",void 0),Ye=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfoParameters")],Ye);let et=class extends(ve(N.o)){constructor(e){super(e),this.id=null}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],et.prototype,"id",void 0),et=(0,s.Cg)([(0,p.$K)("esri.rest.support.CameraInfo")],et);const tt=et;let rt=class extends N.o{constructor(e){super(e),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"id",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:Date,json:{write:!0}})],rt.prototype,"acquisitionDate",void 0),(0,s.Cg)([(0,te.K)("acquisitionDate")],rt.prototype,"writeAcquisitionDate",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"cameraID",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],rt.prototype,"center",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"gps",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],rt.prototype,"orientation",void 0),rt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfo")],rt);const it=rt;let st=class extends N.o{constructor(e){super(e),this.images=null,this.cameras=null}};var nt;(0,s.Cg)([(0,p.MZ)({type:[it],json:{write:!0}})],st.prototype,"images",void 0),(0,s.Cg)([(0,p.MZ)({type:[tt],json:{write:!0}})],st.prototype,"cameras",void 0),st=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageGPSInfoResult")],st);let ot=nt=class extends Pe{constructor(e){super(e),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new nt((0,w.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0}})],ot.prototype,"fromGeometry",void 0),(0,s.Cg)([(0,te.K)("fromGeometry")],ot.prototype,"writeFromGeometry",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{read:!0,write:!0}})],ot.prototype,"toGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{write:De.write}})],ot.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],ot.prototype,"operationType",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{read:xe.Sk.read,write:xe.Sk.write}})],ot.prototype,"linearUnit",void 0),ot=nt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageHeightParameters")],ot);let at=class extends Ne{constructor(e){super(e),this.height=null}};(0,s.Cg)([(0,p.MZ)({type:Je,json:{read:!0,write:!0}})],at.prototype,"height",void 0),at=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageHeightResult")],at);var lt,ut=r(22048);let pt=lt=class extends N.o{constructor(e){super(e),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,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Y.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[r]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map(e=>e.rasterFunctionDefinition||e.toJSON())))}writePixelSize(e,t,r){null!=e&&(t[r]=JSON.stringify(e))}writeTimeExtent(e,t,r){if(null!=e){const i=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[r]=null!=i?null!=s?`${i},${s}`:`${i}`:null}}clone(){return new lt((0,w.o8)({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,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{write:!0}})],pt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],pt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],pt.prototype,"mosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],pt.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,p.MZ)({type:_.A,json:{write:!0,name:"renderingRule"}})],pt.prototype,"rasterFunction",null),(0,s.Cg)([(0,te.K)("rasterFunction")],pt.prototype,"writeRasterFunction",null),(0,s.Cg)([(0,p.MZ)({type:[_.A],json:{write:!0,name:"renderingRules"}})],pt.prototype,"rasterFunctions",void 0),(0,s.Cg)([(0,te.K)("rasterFunctions")],pt.prototype,"writeRasterFunctions",null),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],pt.prototype,"pixelSize",void 0),(0,s.Cg)([(0,te.K)("pixelSize")],pt.prototype,"writePixelSize",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnGeometry",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnCatalogItems",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"returnPixelValues",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],pt.prototype,"maxItemCount",void 0),(0,s.Cg)([(0,p.MZ)({type:We.A,json:{write:{target:"time"}}})],pt.prototype,"timeExtent",void 0),(0,s.Cg)([(0,te.K)("timeExtent")],pt.prototype,"writeTimeExtent",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],pt.prototype,"raster",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],pt.prototype,"viewId",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"processAsMultidimensional",void 0),pt=lt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageIdentifyParameters")],pt);var ct=r(22671);let mt=class extends N.o{constructor(e){super(e),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};var dt;(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"catalogItemVisibilities",void 0),(0,s.Cg)([(0,p.MZ)({type:ct.A,json:{write:!0}})],mt.prototype,"catalogItems",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],mt.prototype,"location",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"objectId",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"processedValues",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"properties",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],mt.prototype,"value",void 0),mt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageIdentifyResult")],mt);let yt=dt=class extends N.o{constructor(e){super(e),this.geometries=null,this.rasterId=null}writeGeometry(e,t,r){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map(e=>e.toJSON())}}clone(){return new dt({geometries:this.geometries?.map(e=>e.clone())??[],rasterId:this.rasterId})}};(0,s.Cg)([(0,p.MZ)({type:[he.A],json:{write:!0}})],yt.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],yt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:b.jz,json:{write:!0}})],yt.prototype,"rasterId",void 0),yt=dt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePixelLocationParameters")],yt);let gt=class extends N.o{constructor(e){super(e),this.geometries=null}};var ht;(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],gt.prototype,"geometries",void 0),gt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePixelLocationResult")],gt);let ft=ht=class extends Pe{constructor(e){super(e),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=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 ht((0,w.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:de.rS}})],ft.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],ft.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({type:De.apiValues,json:{read:De.read,write:De.write}})],ft.prototype,"measureOperation",null),(0,s.Cg)([(0,p.MZ)({json:{read:!0}})],ft.prototype,"is3D",void 0),ft=ht=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePointParameters")],ft);let vt=class extends Ne{constructor(e){super(e),this.point=null}};(0,s.Cg)([(0,p.MZ)({type:he.A,json:{name:"point.value",read:!0,write:!0}})],vt.prototype,"point",void 0),vt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImagePointResult")],vt);var wt=r(34606),Rt=r(29127);let Ct=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,r){t.geometries=e?.length?{geometryType:(0,Ie.$B)(e[0]),geometries:e.map(e=>({...e.toJSON(),spatialReference:void 0}))}:null}};(0,s.Cg)([(0,p.MZ)({types:[Fe.yR]})],Ct.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],Ct.prototype,"writeGeometries",null),(0,s.Cg)([(0,p.MZ)({type:[b.jz],json:{write:!0}})],Ct.prototype,"rasterIds",void 0),(0,s.Cg)([(0,p.MZ)({type:I.A,json:{name:"outSR",write:!0}})],Ct.prototype,"outSpatialReference",void 0),Ct=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageToMapMultirayParameters")],Ct);let bt=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]={...e.toJSON(),spatialReference:void 0})}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],bt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],bt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],bt.prototype,"rasterId",void 0),(0,s.Cg)([(0,p.MZ)({type:I.A,json:{name:"outSR",write:!0}})],bt.prototype,"outSpatialReference",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.DOff",write:!0}})],bt.prototype,"depthOffset",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.Adjust",write:!0}})],bt.prototype,"adjust",void 0),bt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageToMapParameters")],bt);let St=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.referenceUri=null,this.rasterId=null}};(0,s.Cg)([(0,p.MZ)({type:String,json:{name:"uri",write:!0}})],St.prototype,"referenceUri",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,json:{write:!0}})],St.prototype,"rasterId",void 0),St=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageUrlParameters")],St);let Mt=class extends N.o{constructor(e){super(e),this.url=null}};(0,s.Cg)([(0,p.MZ)({json:{name:"imageURL",write:!0}})],Mt.prototype,"url",void 0),Mt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageUrlResult")],Mt);const xt=new Ae.J({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0});let It=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,r){e?.length&&(t.geometryType=(0,Ie.$B)(e[0]),t.geometries=e.map(e=>e.toJSON()))}};(0,s.Cg)([(0,p.MZ)({types:[Fe.yR]})],It.prototype,"geometries",void 0),(0,s.Cg)([(0,te.K)("geometries")],It.prototype,"writeGeometries",null),(0,s.Cg)([(0,p.MZ)({type:Y.A,json:{write:!0}})],It.prototype,"mosaicRule",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{write:!0}})],It.prototype,"pixelSize",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],It.prototype,"constantZ",void 0),(0,s.Cg)([(0,p.MZ)({type:xt.apiValues,json:{read:xt.read,write:xt.write}})],It.prototype,"baseType",void 0),It=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolumeParameters")],It);let Ft=class extends N.o{constructor(e){super(e),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"cut",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"fill",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"maxz",write:!0}})],Ft.prototype,"maxZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"minz",write:!0}})],Ft.prototype,"minZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"meanz",write:!0}})],Ft.prototype,"meanZ",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"cutCellCount",void 0),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Ft.prototype,"fillCellCount",void 0),Ft=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolume")],Ft);const At=Ft;let Dt=class extends N.o{constructor(e){super(e),this.volumes=[]}};(0,s.Cg)([(0,p.MZ)({type:[At],json:{write:!0}})],Dt.prototype,"volumes",void 0),Dt=(0,s.Cg)([(0,p.$K)("esri.rest.support.ImageVolumeResult")],Dt);let Pt=class extends((0,o.OU)(N.o)){constructor(e){super(e),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]=JSON.stringify(e))}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{read:de.rS,write:!0}})],Pt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Pt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Pt.prototype,"rasterId",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"options.VisibleOnly",write:!0}})],Pt.prototype,"visibleOnly",void 0),Pt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MapToImageParameters")],Pt);let Tt=class extends N.o{constructor(e){super(e),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),he.A.fromJSON(e)}};var jt;(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"Shape",read:de.rS,write:!0}})],Tt.prototype,"geometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Length",write:!0}})],Tt.prototype,"length",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Area",write:!0}})],Tt.prototype,"area",void 0),(0,s.Cg)([(0,p.MZ)({type:he.A,json:{name:"Center",write:!0}})],Tt.prototype,"center",void 0),(0,s.Cg)([(0,Ue.w)("center")],Tt.prototype,"readCenter",null),Tt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureAreaFromImageResult")],Tt);let Nt=jt=class extends N.o{constructor(e){super(e),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,Ie.$B)(e),t[r]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,w.o8)({geometry:this.geometry,rasterId:this.rasterId});return new jt(e)}};(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"fromGeometry",read:de.rS,write:!0}})],Nt.prototype,"geometry",void 0),(0,s.Cg)([(0,te.K)("geometry")],Nt.prototype,"writeGeometry",null),(0,s.Cg)([(0,p.MZ)({json:{write:!0}})],Nt.prototype,"rasterId",void 0),Nt=jt=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureFromImageParameters")],Nt);let Ot=class extends N.o{constructor(e){super(e),this.geometry=null,this.length=null}};function Zt(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const r=[];null!=t.start&&r.push(t.start),null==t.end||r.includes(t.end)||r.push(t.end),e.time=r.join(",")}}async function _t(e,t,r){const i=(0,b.PZ)(ut.A,t),s=(0,ge.Dl)(e),n=i.geometry?[i.geometry]:[],o=await(0,ye.el)(n),a=i.toJSON();Zt(a);const l=o?.[0];null!=l&&(a.geometry=Jt(l));const u=(0,ge.lF)({...s.query,f:"json",...a});return(0,ge.jV)(u,r)}async function Vt(e,t,r){const i=(0,b.PZ)(pt,t),s=(0,ge.Dl)(e),n=i.geometry?[i.geometry]:[];return(0,ye.el)(n).then(e=>{const t=i.toJSON(),n=e?.[0];null!=n&&(t.geometry=JSON.stringify(Jt(n)));const o=(0,ge.lF)({...s.query,f:"json",...t}),a=(0,ge.jV)(o,r);return(0,f.A)(s.path+"/identify",a)}).then(e=>mt.fromJSON(e.data))}async function qt(e,t,r,i){const s=(0,ge.Dl)(e),n=await(0,ye.el)(r),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(Jt(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(Jt(n[1])));const a=(0,ge.lF)({...s.query,f:"json",...o}),l=(0,ge.jV)(a,i),{data:u}=await(0,f.A)(s.path+"/measure",l);return u}async function Et(e,t,r){t=(0,b.PZ)(Nt,t);const i=(0,ge.Dl)(e),s=t.toJSON(),n=(0,ge.lF)({...i.query,f:"json",...s}),o=(0,ge.jV)(n,r),{data:a}=await(0,f.A)(i.path+"/measureFromImage",o);return a}function Jt(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=Gt(e.spatialReference)),t}function Gt(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:r}=t;return null!=e?r?{icsid:e,icsns:r}:{icsid:e}:{ics:t}}return e.toJSON()}function zt(e,t){if(!e.imageCoordinateSystem)return(0,F.YX)(e);const r=Gt(e),{icsid:i,icsns:s}=r;return null==i||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(r):`0:${i}`}(0,s.Cg)([(0,p.MZ)({types:Fe.yR,json:{name:"Shape",read:de.rS,write:!0}})],Ot.prototype,"geometry",void 0),(0,s.Cg)([(0,p.MZ)({json:{name:"Length",write:!0}})],Ot.prototype,"length",void 0),Ot=(0,s.Cg)([(0,p.$K)("esri.rest.support.MeasureLengthFromImageResult")],Ot);var Ut=r(82371),$t=r(20223),Lt=r(20615),Kt=r(74910),Bt=r(78286),Qt=r(99199),kt=r(61956);const Ht=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Wt=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this._functionRasterInfos={},this._serviceSupportsMosaicRule=null,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 re({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,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?(0,S.F_)(()=>Y.A.fromJSON(t)):null}get fieldsIndex(){return this.fields?new se.A(this.fields):null}set format(e){e&&Ht.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"}get isRenderedFormat(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}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=Y.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?Y.A.fromJSON(r):this._isMosaicRuleSupported(t)?Y.A.fromJSON(t):null}writeMosaicRule(e,t,r){const{mosaicRule:i}=this;this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}readObjectIdField(e,t){if(!e){const r=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=r?.name}return e}get parsedUrl(){return(0,C.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const r=t?.find(({name:t})=>t===e);return r?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer,s=(0,me.LF)(i,r);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!i.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),U(s)||a.A.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,r){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON()}get rasterFields(){const e=this.fields?.map(e=>e.clone())??[];e.push((0,le.rZ)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,le.Nd)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push((0,le.dy)()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push((0,le.nq)(t)));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const r=t?.multidimensionalInfo?.variables[0].unit?.trim(),i=(0,le.DV)(r),s=(0,le.y6)();e.push(i,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const r=(0,le.AL)(t.multidimensionalInfo);e.push(...r)}const r=t?.attributeTable;if(null!=r){const t=(0,le.jC)(r);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=_.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r?.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?_.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):_.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?I.A.fromJSON(r):null}writePixelType(e,t,r){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[r]=ee.e8.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e,{renderer:i,symbolizer:s,pixelFilter:n}=this;const{isRawData:o}=e;if(o&&"lerc"!==this.format&&(i??=(0,pe.PD)(this.rasterInfo,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}),s||(this.symbolizer=new ce.A({rendererJSON:i.toJSON(),rasterInfo:this.rasterInfo}),s=this.symbolizer)),(o||!this.isRenderedFormat)&&i&&s&&!n){await this._updateSymbolizer(s,i);const n=this.bandIds?.length?this.bandIds:(0,pe.ci)(this.rasterInfo);r=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return r}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new v.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,w.o8)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),async function(e,t,r){const i=(0,b.PZ)(It,t).toJSON();i.geometries=JSON.stringify(i.geometries);const s=(0,ge.Dl)(e),n=(0,ge.lF)({...s.query,f:"json",...i}),o=(0,ge.jV)(n,r),{data:a}=await(0,f.A)(`${s.path}/calculateVolume`,o);return Dt.fromJSON({volumes:a.results})}(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new v.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(Se,t),s=i.toJSON();null!=s.angleName&&(s.angleName=s.angleName.join(",")),i?.point?.spatialReference?.imageCoordinateSystem&&(s.point.spatialReference=Gt(i.point.spatialReference)),i?.spatialReference?.imageCoordinateSystem&&(s.spatialReference=zt(i.spatialReference));const n=(0,ge.Dl)(e),o=(0,ge.lF)({...n.query,f:"json",...s}),a=(0,ge.jV)(o,r),{data:l}=await(0,f.A)(`${n.path}/computeAngles`,a);return l.spatialReference=l.spatialReference?null!=l.spatialReference.geodataXform?new I.A({wkid:0,imageCoordinateSystem:l.spatialReference}):I.A.fromJSON(l.spatialReference):null,"NaN"===l.north&&(l.north=null),"NaN"===l.up&&(l.up=null),new Me(l)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new v.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(yt,t),s=i.toJSON(),{geometries:n}=i;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(s.geometries.geometries[e].spatialReference=Gt(n[e].spatialReference));const o=(0,ge.Dl)(e),a=(0,ge.lF)({...o.query,f:"json",...s}),l=(0,ge.jV)(a,r),{data:u}=await(0,f.A)(`${o.path}/computePixelLocation`,l);return gt.fromJSON(u)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new v.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await _t(e,t,r),s=(0,ge.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeHistograms`,i);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new v.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await _t(e,t,r),s=(0,ge.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeStatisticsHistograms`,i),{statistics:o}=n;return o?.length&&o.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const r=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?r.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?r.mensuration.supportsHeightFromBaseAndTopShadow:r.mensuration.supportsHeightFromTopAndTopShadow))throw new v.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(ot,t),s=await qt(e,i,[i.fromGeometry,i.toGeometry],r);return at.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsAreaAndPerimeter||e.is3D&&!r.mensuration.supports3D)throw new v.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(je,t),s=await qt(e,i,[i.geometry],r);return Ge.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsDistanceAndAngle||e.is3D&&!r.mensuration.supports3D)throw new v.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(Ke,t),s=await qt(e,i,[i.fromGeometry,i.toGeometry],r);return ke.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsPointOrCentroid||e.is3D&&!r.mensuration.supports3D)throw new v.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){const i=(0,b.PZ)(ft,t),s=await qt(e,i,[i.geometry],r);return vt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new v.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new v.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return async function(e,t,r){const i=(0,b.PZ)(Nt,t),s=await Et(e,i,r);return Ot.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new v.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new v.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return async function(e,t,r){const i=(0,b.PZ)(Nt,t),s=await Et(e,i,r);return Tt.fromJSON(s)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}async internalFetchImage(e,t,r,s={}){await this._updateCurrentRasterInfo();const{exportImageServiceParameters:n}=this;let o=!1;s.requestRawData&&(await this._initJobHandler(),n.requestRawData||"lerc"===this.format||(o=!0,n.requestRawData=!0));const a=this.getExportImageServiceParameters(e,t,r,s.timeExtent);if(o&&(n.requestRawData=!1,a&&!this.bandIds?.length&&(null==a.bandIds||""===a.bandIds))){const e=(0,pe.ci)(this.rasterInfo);a.bandIds=e?.join(",")}if(null==a){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,s.returnImageBitmap?{imageBitmap:await(0,ne.m)(e,`${i(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*r,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(ae.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ae.A({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const l=!!s.requestAsImageElement&&!this.pixelFilter,u=l&&!!s.returnImageBitmap,p={imageServiceParameters:a,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:l,returnImageBitmap:u,signal:s.signal};return this._requestArrayBuffer(p)}async fetchPixels(e,t,r,i={}){await this._initJobHandler(),i.applyRendering&&this._updateCurrentRasterInfo();const s=i.applyRendering?void 0:new re({layer:this,requestRawData:!0,interpolation:i.interpolation??"nearest",bandIds:i.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,r,i.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,i.bandIds||delete n.bandIds,delete n.compressionQuality;const o={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:i.signal},{pixelData:a}=await this._requestArrayBuffer(o);return a??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return(0,f.A)(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 v.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.A)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>ct.A.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,r){const i=(0,ge.Dl)(e),s=(0,ge.lF)({...i?.query,f:"json"}),n=(0,ge.jV)(s,r),o=`${i?.path}/${t}/info`,a=(0,f.A)(`${o}`,n),l=(0,f.A)(`${o}/keyProperties`,n),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 m=null;p.statistics?.length&&(m=p.statistics.map(e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]})));const d=M.A.fromJSON(p.extent),y=Math.ceil(d.width/p.pixelSizeX-.1),g=Math.ceil(d.height/p.pixelSizeY-.1),h=d.spatialReference,v=new he.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:h}),w=p.histograms?.length?p.histograms:null,R=new $t.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new ue.A({width:y,height:g,bandCount:p.bandCount,extent:d,spatialReference:h,pixelSize:v,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:w,keyProperties:c,storageInfo:R})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,f.A)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await(0,f.A)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,f.A)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,F.YX)(a),outSR:"0:"+e},u=(0,f.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,m=n.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const y={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,F.YX)(a),outSR:"0:"+e},g=(0,f.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(y),...t}).then(e=>e.data).catch(()=>({})),h=await Promise.all([o,u,g]);let v=h[0].ipxf;if(null==v){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(v={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const w=M.A.fromJSON(h[1]?.geometries?.[0]);w&&(w.spatialReference=new I.A({wkid:0,imageCoordinateSystem:s}));const R=h[2].geometries?h[2].geometries.filter(e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],C=R.length;if(C<3)return{ics:s,icsToPixelTransform:v,icsExtent:w,northDirection:null};let b=0,S=0,x=0,A=0;for(let e=0;e<C;e++)b+=R[e].x,S+=R[e].y,x+=R[e].x*R[e].x,A+=R[e].x*R[e].y;const D=(C*A-b*S)/(C*x-b*b);let P=0;const T=R[4].x>R[0].x,j=R[4].y>R[0].y;return D===1/0?P=j?90:270:0===D?P=T?0:180:D>0?P=T?180*Math.atan(D)/Math.PI:180*Math.atan(D)/Math.PI+180:D<0&&(P=j?180+180*Math.atan(D)/Math.PI:360+180*Math.atan(D)/Math.PI),{ics:s,icsToPixelTransform:v,icsExtent:w,northDirection:P}}async generateRasterInfo(e,t){const r=(0,b.PZ)(_.A,e),s={...t,query:this._getQueryParams()};if(!r||"none"===r.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(r))return this.serviceRasterInfo??(0,Ut.Tw)(i(this.parsedUrl),this.sourceJSON,s);const n=function(e){const t=JSON.stringify(e),r=t.includes('"rasterFunctionDefinition":{'),i=r?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=i?.map(e=>r?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}(r);if(!n)throw new v.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[n])return this._functionRasterInfos[n];const o=(0,Ut.X6)(i(this.parsedUrl),r,s);this._functionRasterInfos[n]=o;try{return await o}catch(e){throw this._functionRasterInfos[n]=null,e}}getExportImageServiceParameters(e,t,r,s,n){const o=zt((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));n??=this.exportImageServiceParameters;const a=n.toJSON(),{bandIds:l,noData:u}=a;let{renderingRule:p}=a;const c=this.rasterFunction?.rasterFunctionDefinition,m=this.renderer?.type,d=!m||"raster-stretch"===m||"raster-colormap"===m||"unique-value"===m||"class-breaks"===m||"raster-shaded-relief"===m;if(l?.length&&this._hasRasterFunction(this.rasterFunction)&&!c&&d){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFunctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){const t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;a.bandIds=void 0}else a.bandIds=l?.join(",");Array.isArray(u)&&u.length>0&&(a.noData=u.join(","));const y=this._processMultidimensionalIntersection(null,s,n.mosaicRule);if(y.isOutSide)return null;a.mosaicRule=null!=y.mosaicRule?JSON.stringify(y.mosaicRule):null,s=y.timeExtent,a.renderingRule=this._getRenderingRuleString(_.A.fromJSON(p));const g={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?g.time=""+e:null==e&&null==t||(g.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:o,imageSR:o,size:t+","+r,...a,...g}}async getSamples(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r?.operations.supportsGetSamples)throw new v.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,w.o8)(e);const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,r){const i=(0,b.PZ)(wt.A,t),s=i.toJSON();Zt(s),s.outFields?.length&&(s.outFields=s.outFields.join(","));const n=await(0,ye.el)(i.geometry),o=n?.[0];null!=o&&(s.geometry=Jt(o));const a=(0,ge.Dl)(e),l=(0,ge.lF)({...a.query,f:"json",...s}),u=(0,ge.jV)(l,r),{data:p}=await(0,f.A)(`${a.path}/getSamples`,u),c=p.samples.map(e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map(e=>Number(e));return{...e,pixelValue:t}});return Rt.A.fromJSON({samples:c})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new v.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,w.o8)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=x.A.fromExtent(e.geometry));const r=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(r.isOutSide)throw new v.A("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=r.timeExtent,e.mosaicRule=r.mosaicRule;const{raster:i,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),i&&null==e.raster&&(e.raster=i),Vt(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new v.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(bt,t),s=i.toJSON();i.geometry.spatialReference.imageCoordinateSystem&&(s.geometry=Jt(i.geometry)),i.depthOffset&&i.adjust||delete s.options;const n=(0,ge.Dl)(e),o=(0,ge.lF)({...n.query,f:"json",...s}),a=(0,ge.jV)(o,r),{data:l}=await(0,f.A)(`${n.path}/imageToMap`,a);return(0,de.rS)(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new v.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(Ct,t),s=i.toJSON();i.rasterIds?.length&&(s.rasterIds=i.rasterIds.join(","));const n=(0,ge.Dl)(e),o=(0,ge.lF)({...n.query,f:"json",...s}),a=(0,ge.jV)(o,r),{data:l}=await(0,f.A)(`${n.path}/imageToMapMultiray`,a);return(0,de.rS)(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new v.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(Pt,t),s=i.toJSON(),n=await(0,ye.el)(i.geometry),o=n?.[0];null!=o&&(s.geometry=Jt(o)),i.visibleOnly||delete s.options;const a=o?.spatialReference??i.geometry?.spatialReference;a&&(s.inSR=zt(a));const l=(0,ge.Dl)(e),u=(0,ge.lF)({...l.query,f:"json",...s}),p=(0,ge.jV)(u,r),{data:c}=await(0,f.A)(`${l.path}/mapToImage`,p);return(0,de.rS)(c)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new v.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(fe,t),s=i.toJSON(),n=await(0,ye.el)([i.fromGeometry,i.toGeometry]);null!=n[0]&&(s.fromGeometry=Jt(n[0]),n[0].spatialReference&&(s.inSR=zt(n[0].spatialReference))),null!=n[1]&&(s.toGeometry=Jt(n[1])),i.objectIds?.length&&(s.objectIds=s.objectIds.join(","));const o=(0,ge.Dl)(e),a=(0,ge.lF)({...o.query,f:"json",...s}),l=(0,ge.jV)(a,r),{data:u}=await(0,f.A)(`${o.path}/find`,l);return Ce.fromJSON(u)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new v.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return async function(e,t,r){const i=(0,b.PZ)(St,t).toJSON(),s=(0,ge.Dl)(e),n=(0,ge.lF)({...s.query,f:"json",...i}),o=(0,ge.jV)(n,r),{data:a}=await(0,f.A)(`${s.path}/getImageUrl`,o);return Mt.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new kt.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new v.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},async function(e,t,r){const i=(0,b.PZ)(ze,t),s=(0,ge.Dl)(e),n=i.toJSON();i.outSpatialReference&&(n.outSR=zt(i.outSpatialReference));const o=(0,ge.lF)({...s.query,f:"json",...n}),a=(0,ge.jV)(o,r),{data:l}=await(0,f.A)(s.path+"/queryBoundary",a);return $e.fromJSON(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryExtent(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Kt.L)(this.url,e,t)}async queryRasters(e,t){({query:e,requestOptions:t}=await this._prepareForQuery(e,t));const r=await(0,Qt.s)(this.url,e,t),i=this.graphicOrigin;return r.features.forEach(e=>{e.layer=this,e.origin=i}),r}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Bt.V)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new v.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},async function(e,t,r){const i=(0,b.PZ)(Ye,t),s=i.toJSON();Zt(s),s.objectIds?.length&&(s.objectIds=s.objectIds.join(",")),s.geometry||s.objectIds||s.time||s.where||(s.where="1=1");const n=await(0,ye.el)(i.geometry),o=n?.[0];null!=o&&(s.geometry=Jt(o));const a=o?.spatialReference??i.geometry?.spatialReference;a&&(s.inSR=zt(a));const l=(0,ge.Dl)(e),u=(0,ge.lF)({...l.query,f:"json",...s}),p=(0,ge.jV)(u,r),{data:c}=await(0,f.A)(`${l.path}/queryGPSInfo`,p);return st.fromJSON(c)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Lt.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new v.A("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,a=null,l=null;const u=le.F_.servicePixelValue.toLowerCase(),p=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some(e=>!e.toLowerCase().startsWith(u)),this.version>=10.4)){const t=e.outFields.filter(e=>e.toLowerCase().startsWith(u)&&e.length>u.length).map(e=>{const t=e.slice(u.length+1);return[this._updateRenderingRulesFunctionName(t,p),t]});a=t.map(e=>new _.A({functionName:e[0]})),l=t.map(e=>e[1]);const{rasterFunction:r}=this;0===a.length?r?.functionName?(a.push(r),l.push(r.functionName)):a=null:r?.functionName&&!a.some(e=>e.functionName===r.functionName)&&(a.push(r),l.push(r.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let d=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:r}=(0,A.Rp)(m,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new v.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=r?.timeExtent&&(d=r.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=x.A.fromExtent(g));const h=this._getQueryParams({geometry:g,timeExtent:d,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:a,pixelSize:r,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:s?1:null});delete h.f;const f=new pt(h);try{await this._generateRasterInfo(this.rasterFunction);const r=await Vt(this.url,f,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,a=null!=r.value&&r.value.toLowerCase().includes("nodata"),u=o&&!c&&r?.catalogItems?.features.length&&(n||!a),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?(0,A.XU)({rasterInfo:this.rasterInfo,multidimensionalDefinition:y?.multidimensionalDefinition,timeExtent:d,multidimensionalSubset:this.multidimensionalSubset}):null;if(!u)return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p});const m=this.objectIdField||"ObjectId",g=r.catalogItems?.features??[],h=g.map(e=>e.attributes?.[m]),v=new kt.A({objectIds:h,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[m]}),w=await this.queryRasters(v);return w?.features?.length&&w.features.forEach(t=>{g.forEach(r=>{r.attributes[m]===t.attributes[m]&&t.geometry&&(r.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(r.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new v.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,f.A)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=(0,f.A)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([r,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,A.z2)(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,Ut.Tw)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,Ut.E9)(e,t),e)),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([r,s,n]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),a.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,R.wB)(()=>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 r=this.timeInfo,{multidimensionalInfo:i}=this.serviceRasterInfo;if(null==e||null==i||null==t||null==r?.startField)return e;const{startField:s}=r,n=i.variables.some(e=>e.dimensions.some(e=>e.name===s))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter(e=>e.dimensionName!==n),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),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===n&&(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=n,e.isSlice=u,e.values=p}):e.multidimensionalDefinition.push(new j.A({variableName:"",dimensionName:n,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 v.A("imagery-layer:query-rasters","query operation is not supported on the input image service");const r=null!=e?(0,b.PZ)(kt.A,e):this.createQuery();return t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:r,requestOptions:t}}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:r}=this;return"unique-value"===e.type&&this._hasRasterFunction(r)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,pe.fp)(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:s}=await(0,f.A)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map(e=>e.trim()).indexOf("tilesonly")>-1)throw new v.A("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),r=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||r}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:r}=e,i="resample"===t?.toLowerCase(),s=r?.ResampleType||r?.resampleType;return i&&(7===s||10===s)}_configRenderer(e){const{rasterInfo:t}=this;if(!this.isRenderedFormat&&!this.pixelFilter||this._isVectorDataSet()){const r=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,i=(0,pe.I8)({variableName:r,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>=3){const e=i?.bandIds??(0,pe.ci)(t);!e||3===t.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=i?.renderer??(0,pe.PD)(t,{bandIds:this.bandIds,variableName:this.rasterFunction?null:r}));const s=(0,pe.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=t):this.symbolizer=new ce.A({rendererJSON:s,rasterInfo:t}),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:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler?this._rasterJobHandler.decode({data:e,options:t}):(0,D.D)(e,t,r)}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,f.A)(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:s,signal:n}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:o}=await(0,f.A)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,ne.m)(o,r,n),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),a=(0,f.A)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),l=(await Promise.all([a,o]))[0].data,u=t.format||"jpgpng";let p=u;if("bsq"!==p&&"bip"!==p&&(p=(0,D.g)(l)),!p)throw new v.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:n},m=this._decodePixelBlock(l,{width:t.width,height:t.height,format:u,applyJpegMask:!0},c);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,A.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new Y.A;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 r=e.value,{templateRRFunctionNames:i,showNoDataRecords:s,returnDomainValues:n,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 r&&r.toLowerCase().includes("nodata"),m=[];if(r&&!l&&(!c||s)){const e={};e[p]=0,u=[r],l=[new h.A({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,le.eS)(this.rasterFields,e,t.effectiveMultidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);const{itemPixelValue:d,servicePixelValue:y}=le.F_,g=this.rasterFields.some(e=>e.name===d),f=this.graphicOrigin;for(let e=0;e<l.length;e++){const t=l[e];if(null!=r){const n=u[e],o=this.rasterFunction&&a&&a.length>0&&i&&i.length>0&&i.includes(this.rasterFunction.functionName)?a[i.indexOf(this.rasterFunction.functionName)]:r;if("nodata"===n.toLowerCase()&&!s)continue;g&&(t.attributes[d]=n),t.attributes[y]=o,this._updateFeatureWithMagDirValues(t,n);const l=this.fields&&this.fields.length>0;let p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:r:o;this.rasterFunction||(p=l?n:r),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,t.origin=f,n&&this._updateFeatureWithDomainValues(t),i&&a&&i.length===a.length)for(let e=0;e<i.length;e++){const r=`${le.F_.servicePixelValue}.${i[e]}`;t.attributes[r]=a[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,r){const{multidimensionalSubset:i}=this;if(!i)return{isOutSide:!1,timeExtent:t,mosaicRule:r=this._combineMosaicRuleWithTimeExtent(r,t)};if(i){const{isOutside:r,intersection:s}=(0,A.Rp)(i,{geometry:e,timeExtent:t});if(r)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(r=this._combineMosaicRuleWithTimeExtent(r,t),r?.multidimensionalDefinition){const{isOutside:e}=(0,A.Rp)(i,{multidimensionalDefinition:r.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:r}}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==r)return;const{features:i,fields:s}=r,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;const o=i.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));o&&o[0]&&s.forEach(t=>{const r=le.ER+t.name;e.attributes[r]=o[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const r=t.split(/,\s*/).map(e=>parseFloat(e)),i=r.map(e=>[e]),s=r.map(e=>({minValue:e,maxValue:e,noDataValue:null})),n=new ae.A({height:1,width:1,pixelType:"f32",pixels:i,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new M.A(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,P.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[le.F_.magnitude]=o[0],e.attributes[le.F_.direction]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter(e=>"coded-value"===e.domain?.type);null!=t&&t.forEach(t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.find(e=>e.code===r);i&&(e.attributes[t.name]=i.name)}})}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;null!=r&&e.forEach(e=>{if(e?.attributes)for(const i of t){const t=r.get(i)?.name;t&&t!==i&&(e.attributes[i]=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 r=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(r)?t.get(r):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:r,rasterFunction:i}=this;i&&null==e.rasterFunction&&(e.rasterFunction=i),r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){const t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){const{raster:t,mosaicRule:r}=this;r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:r,maxRecordCount:i}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,o=!(!e.spatialReference&&!e.extent?.spatialReference),a=t.includes("edit"),l=t.includes("mensuration")&&o,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),c=this._isMosaicDataset(e)&&t.includes("catalog"),m=t.includes("download"),d=r>=10.7&&n||r>=11.4&&(n||l&&u.includes("3d")),y=c&&e.fields&&e.fields.length>0,g=y&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:r>=11.2&&c,supportsImageToMapMultiray:r>=11.2&&c,supportsMapToImage:r>=11.2&&c,supportsFindImages:r>=11.2&&c,supportsGetImageUrl:r>=11.3&&m,supportsMeasure:l,supportsMeasureFromImage:r>=11.2,supportsDownload:m,supportsQuery:y,supportsGetSamples:r>=10.2&&s,supportsProject:r>=10.3&&s,supportsComputeStatisticsHistograms:r>=10.4&&s,supportsQueryBoundary:r>=10.6&&s,supportsCalculateVolume:d,supportsComputePixelLocation:r>=10.7&&c,supportsComputeAngles:r>=10.91,supportsQueryGPSInfo:r>=11.2&&c,supportsAdd:a,supportsDelete:a,supportsEditing:a,supportsUpdate:a,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:i,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,supportsStatistics:!!g?.supportsStatistics,supportsOrderBy:!!g?.supportsOrderBy,supportsDistinct:!!g?.supportsDistinct,supportsPagination:!!g?.supportsPagination,supportsPaginationOnAggregatedQueries:!!g?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!g?.useStandardizedQueries,supportsPercentileStatistics:!!g?.supportsPercentileStatistics,supportsCentroid:!!g?.supportsReturningGeometryCentroid,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!!g?.supportsQueryWithDistance,supportsExtent:!!g?.supportsReturningQueryExtent,supportsGeometryProperties:!!g?.supportsReturningGeometryProperties,supportsHavingClause:!!g?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:g?.supportsSqlExpression??!!g,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!g?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function i(e){return e?.path??""}return(0,s.Cg)([(0,p.MZ)({clonable:!1})],r.prototype,"_functionRasterInfos",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"_serviceSupportsMosaicRule",void 0),(0,s.Cg)([(0,Ue.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],r.prototype,"readServiceSupportsMosaicRule",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"_rasterFunctionNamesIndex",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"adjustAspectRatio",void 0),(0,s.Cg)([(0,p.MZ)({type:[b.jz],json:{write:!0}})],r.prototype,"bandIds",void 0),(0,s.Cg)([(0,Ue.w)("bandIds")],r.prototype,"readBandIds",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],r.prototype,"capabilities",void 0),(0,s.Cg)([(0,Ue.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],r.prototype,"readCapabilities",null),(0,s.Cg)([(0,p.MZ)({type:Number})],r.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,te.K)("compressionQuality")],r.prototype,"writeCompressionQuality",null),(0,s.Cg)([(0,p.MZ)({type:Number})],r.prototype,"compressionTolerance",void 0),(0,s.Cg)([(0,te.K)("compressionTolerance")],r.prototype,"writeCompressionTolerance",null),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"defaultMosaicRule",void 0),(0,s.Cg)([(0,Ue.w)("defaultMosaicRule",["defaultMosaicMethod"])],r.prototype,"readDefaultMosaicRule",null),(0,s.Cg)([(0,p.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],r.prototype,"definitionExpression",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,constructOnly:!0})],r.prototype,"exportImageServiceParameters",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"rasterInfo",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,type:[ie.A]})],r.prototype,"fields",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"fieldsIndex",null),(0,s.Cg)([(0,p.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],r.prototype,"format",null),(0,s.Cg)([(0,Ue.w)("service","format",["serviceDataType"])],r.prototype,"readFormat",null),(0,s.Cg)([(0,p.MZ)({type:M.A})],r.prototype,"fullExtent",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"hasMultidimensions",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"maxImageHeight"}}})],r.prototype,"imageMaxHeight",void 0),(0,s.Cg)([(0,p.MZ)({json:{read:{source:"maxImageWidth"}}})],r.prototype,"imageMaxWidth",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{type:ee.SZ.jsonValues,read:ee.SZ.read,write:ee.SZ.write}})],r.prototype,"interpolation",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"minScale",void 0),(0,s.Cg)([(0,Ue.w)("service","minScale")],r.prototype,"readMinScale",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"maxScale",void 0),(0,s.Cg)([(0,Ue.w)("service","maxScale")],r.prototype,"readMaxScale",null),(0,s.Cg)([(0,p.MZ)({type:Y.A})],r.prototype,"mosaicRule",null),(0,s.Cg)([(0,Ue.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],r.prototype,"readMosaicRule",null),(0,s.Cg)([(0,te.K)("mosaicRule")],r.prototype,"writeMosaicRule",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"multidimensionalInfo",void 0),(0,s.Cg)([(0,p.MZ)({type:oe.A,json:{write:!0}})],r.prototype,"multidimensionalSubset",void 0),(0,s.Cg)([(0,p.MZ)({json:{type:[Number,[Number]],write:!0}})],r.prototype,"noData",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{type:ee.hm.jsonValues,read:ee.hm.read,write:ee.hm.write}})],r.prototype,"noDataInterpretation",void 0),(0,s.Cg)([(0,p.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],r.prototype,"objectIdField",void 0),(0,s.Cg)([(0,Ue.w)("objectIdField")],r.prototype,"readObjectIdField",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"geometryType",void 0),(0,s.Cg)([(0,p.MZ)({})],r.prototype,"typeIdField",void 0),(0,s.Cg)([(0,p.MZ)({})],r.prototype,"types",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,s.Cg)([(0,p.MZ)({type:Function})],r.prototype,"pixelFilter",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"raster",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"sourceType",void 0),(0,s.Cg)([(0,Ue.w)("sourceType",["serviceSourceType","fields"])],r.prototype,"readSourceType",null),(0,s.Cg)([(0,p.MZ)()],r.prototype,"viewId",void 0),(0,s.Cg)([(0,p.MZ)({types:me.uy})],r.prototype,"renderer",null),(0,s.Cg)([(0,p.MZ)({types:me.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:me.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],r.prototype,"internalRenderer",null),(0,s.Cg)([(0,Ue.w)("internalRenderer")],r.prototype,"readRenderer",null),(0,s.Cg)([(0,te.K)("internalRenderer")],r.prototype,"writeRenderer",null),(0,s.Cg)([(0,p.MZ)({clonable:!1})],r.prototype,"symbolizer",void 0),(0,s.Cg)([(0,p.MZ)(T.ke)],r.prototype,"opacity",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"rasterFields",null),(0,s.Cg)([(0,p.MZ)({constructOnly:!0})],r.prototype,"rasterFunctionInfos",void 0),(0,s.Cg)([(0,p.MZ)({type:_.A,json:{name:"renderingRule"}})],r.prototype,"rasterFunction",null),(0,s.Cg)([(0,Ue.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],r.prototype,"readRasterFunction",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"serviceDataType",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,type:I.A})],r.prototype,"spatialReference",void 0),(0,s.Cg)([(0,Ue.w)("spatialReference",["spatialReference","extent"])],r.prototype,"readSpatialReference",null),(0,s.Cg)([(0,p.MZ)({type:ee.e8.apiValues,json:{read:ee.e8.read,type:ee.e8.jsonValues}})],r.prototype,"pixelType",void 0),(0,s.Cg)([(0,te.K)("pixelType")],r.prototype,"writePixelType",null),(0,s.Cg)([(0,p.MZ)({constructOnly:!0,type:ue.A})],r.prototype,"serviceRasterInfo",void 0),(0,s.Cg)([(0,p.MZ)()],r.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,p.MZ)(T.OZ)],r.prototype,"url",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,s.Cg)([(0,Ue.w)("version",["currentVersion","fields","timeInfo"])],r.prototype,"readVersion",null),r=(0,s.Cg)([(0,p.$K)("esri.layers.mixins.ArcGISImageService")],r),r};var Xt=r(18768),Yt=r(63074),er=r(69208),tr=r(34287),rr=r(8303),ir=r(72545),sr=r(56551),nr=r(54310),or=r(25036),ar=r(82935),lr=r(91908),ur=r(24212),pr=r(30291),cr=r(88625),mr=r(59923);let dr=class extends((0,Yt.dM)((0,ar.e)((0,or.j)((0,tr.q)((0,rr.A)((0,sr.H)(Wt((0,ir.G)((0,nr.J)((0,er.d)((0,Xt.b)((0,l.M)((0,o.OU)(g.A)))))))))))))){constructor(...e){super(...e),this.graphicOrigin=new y(this),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.type="imagery",this._debouncedSaveOperations=(0,u.sg)(async(e,t,i)=>{const{save:s,saveAs:n}=await r.e(9838).then(r.bind(r,59838));switch(e){case 0:return s(this,t);case 1:return n(this,i,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(u.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}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)}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:t}=this,r=new Set,i=le.F_.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=le.Oo.toLowerCase(),o=`${le.F_.servicePixelValue.toLowerCase()}.`;for(const e of t){const t=e.name.toLowerCase();t===i||t.startsWith(o)||s&&t.startsWith(n)||r.add(e.name)}const a=(0,pr.tn)({fields:t,title:this.title},{...e,visibleFieldNames:r}),{rasterInfo:l}=this;return a?.fieldInfos&&l&&(0,le.h4)(a.fieldInfos,l),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,t.origin=this.graphicOrigin;return e})}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}serviceSupportsSpatialReference(e){return(0,lr.D)(this,e)}write(e,t){return this._isPreviewLayer?((0,mr.U4)(t,this,"preview layer cannot be saved"),null):super.write(e,t)}_validateElevationInfo(e){(0,ur.XF)(a.A.getLogger(this),(0,ur.$7)("Imagery layers","relative-to-scene",e)),(0,ur.XF)(a.A.getLogger(this),(0,ur.tW)("Imagery layers",e))}};(0,s.Cg)([(0,p.MZ)({type:cr.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],dr.prototype,"elevationInfo",null),(0,s.Cg)([(0,p.MZ)({readOnly:!0,clonable:!1})],dr.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,p.MZ)(T.fV)],dr.prototype,"legendEnabled",null),(0,s.Cg)([(0,p.MZ)({type:["show","hide"]})],dr.prototype,"listMode",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],dr.prototype,"isReference",void 0),(0,s.Cg)([(0,p.MZ)({type:["ArcGISImageServiceLayer"]})],dr.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,p.MZ)(T.M6)],dr.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,p.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],dr.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],dr.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,p.MZ)(T.PY)],dr.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],dr.prototype,"type",void 0),(0,s.Cg)([(0,p.MZ)({readOnly:!0})],dr.prototype,"_isPreviewLayer",null),dr=(0,s.Cg)([(0,p.$K)("esri.layers.ImageryLayer")],dr);const yr=dr},18768(e,t,r){r.d(t,{b:()=>a});var i=r(5482),s=r(53966),n=r(91429),o=r(60694);const a=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}},56551(e,t,r){r.d(t,{H:()=>c});var i=r(5482),s=r(91429),n=r(69540),o=r(25482),a=r(56507),l=r(94359),u=r(93223);let p=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],p.prototype,"method",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],p.prototype,"value",void 0),(0,i.Cg)([(0,s.MZ)({type:[a.jz],json:{write:{isRequired:!0}}})],p.prototype,"bandIds",void 0),(0,i.Cg)([(0,s.MZ)({types:l.uy,json:{write:!0,origins:{"web-scene":{types:l.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],p.prototype,"renderer",void 0),p=(0,i.Cg)([(0,s.$K)("esri.renderers.support.RasterPresetRenderer")],p);const c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],r.prototype,"activePresetRendererName",void 0),(0,i.Cg)([(0,s.MZ)({type:[p],json:{name:"layerDefinition.presetRenderers",write:!0}})],r.prototype,"presetRenderers",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.RasterPresetRendererMixin")],r),r}},33446(e,t,r){r.d(t,{C:()=>o,m:()=>n});var i=r(49186),s=r(17676);async function n(e,t,r){let n;try{n=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),n}async function o(e,t,r,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,s.Te)(o),a}},91908(e,t,r){r.d(t,{D:()=>n});var i=r(60694);const s=[];function n(e,t){if((0,i.Wo)(e.url??""))return!0;const{wkid:r}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}s.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}]),s.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}]),s.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}]),s.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}]),s.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}])},82371(e,t,r){r.d(t,{E9:()=>y,Tw:()=>m,X6:()=>d});var i=r(11254),s=r(5443),n=r(86738),o=r(16930),a=r(87186),l=r(20223),u=r(2272),p=r(22671);async function c(e,t,r){const c=(0,u.Dl)(e),{rasterFunction:m,sourceJSON:d}=t||{},y=m?JSON.stringify(m.rasterFunctionDefinition||m):null,g=(0,u.lF)({...c.query,renderingRule:y,f:"json"}),h=(0,u.jV)(g,r);e=c.path;const f=d||await(0,i.A)(e,h).then(e=>e.data),v=f.hasRasterAttributeTable?(0,i.A)(`${e}/rasterAttributeTable`,h):null,w=f.hasColormap?(0,i.A)(`${e}/colormap`,h):null,R=f.hasHistograms?(0,i.A)(`${e}/histograms`,h):null,C=f.currentVersion>=10.3?(0,i.A)(`${e}/keyProperties`,h):null,b=f.hasMultidimensions?(0,i.A)(`${e}/multidimensionalInfo`,h):null,S=f.currentVersion>=10.81?(0,i.A)(`${e}/statistics`,h):null,M=await Promise.allSettled([v,w,R,C,b,S]),x=s.A.fromJSON(f.extent),I=Math.ceil(x.width/f.pixelSizeX-.1),F=Math.ceil(x.height/f.pixelSizeY-.1),A=o.A.fromJSON(f.spatialReference||f.extent.spatialReference),D="fulfilled"===M[0].status?M[0].value?.data:null,P=D?.features?.length?p.A.fromJSON(D):null,T="fulfilled"===M[1].status?M[1].value?.data.colormap:null,j=T?.length?T:null,N="fulfilled"===M[2].status?M[2].value?.data.histograms:null,O=N?.[0]?.counts?.length?N:null,Z="fulfilled"===M[3].status?M[3].value?.data??{}:{},_="fulfilled"===M[4].status?M[4].value?.data.multidimensionalInfo:null,V=_?.variables?.length?_:null;V&&V.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});let q=null;const E="fulfilled"===M[5].status?M[5].value?.data.statistics:null;if(E&&E.length===f.bandCount)q=E.map(e=>({avg:e.mean,count:e.count,max:e.max,median:e.median,min:e.min,mode:e.mode,stddev:e.standardDeviation,sum:e.sum}));else if(f.minValues&&f.minValues.length===f.bandCount){q=[];for(let e=0;e<f.minValues.length;e++)q.push({min:f.minValues[e],max:f.maxValues[e],avg:f.meanValues[e],stddev:f.stdvValues[e]})}const{defaultVariable:J,serviceDataType:G}=f;J&&J!==Z.DefaultVariable&&(Z.DefaultVariable=J),G?.includes("esriImageServiceDataTypeVector")&&!G.includes(Z.DataType)&&(Z.DataType=G.replace("esriImageServiceDataType",""));let z=f.noDataValue;f.noDataValues?.length&&f.noDataValues.some(e=>e!==z)&&(z=f.noDataValues);const U=f.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:f.extent.xmin,y:f.extent.ymax,spatialReference:A}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(I,F))/Math.LN2-8)),transposeInfo:f.transposeInfo}):void 0;return new a.A({width:I,height:F,bandCount:f.bandCount,extent:s.A.fromJSON(f.extent),spatialReference:A,pixelSize:new n.A({x:f.pixelSizeX,y:f.pixelSizeY,spatialReference:A}),pixelType:f.pixelType.toLowerCase(),statistics:q,attributeTable:P,colormap:j,histograms:O,keyProperties:Z,noDataValue:z,multidimensionalInfo:V,storageInfo:U})}function m(e,t,r){return c(e,{sourceJSON:t},r)}function d(e,t,r){return c(e,{rasterFunction:t},r)}function y(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},20615(e,t,r){r.d(t,{I:()=>o});var i=r(2272),s=r(80893),n=r(61956);function o(e,t,r,o){return(0,s.gW)((0,i.Dl)(e),n.A.from(t),r,o)}},74910(e,t,r){r.d(t,{L:()=>a});var i=r(5443),s=r(2272),n=r(80893),o=r(61956);async function a(e,t,r){const a=(0,s.Dl)(e),l=await(0,n.Jf)(a,o.A.from(t),{...r}),u=l.extent;return!u||isNaN(u.xmin)||isNaN(u.ymin)||isNaN(u.xmax)||isNaN(u.ymax)?{count:l.count,extent:null}:{count:l.count,extent:i.A.fromJSON(u)}}},78286(e,t,r){r.d(t,{V:()=>o});var i=r(2272),s=r(80893),n=r(61956);async function o(e,t,r,o){const a=(0,i.Dl)(e),l=await(0,s.Pk)(a,n.A.from(t),r,o);return l.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(l.uniqueIds)??[]}},99199(e,t,r){r.d(t,{e:()=>l,s:()=>a});var i=r(2272),s=r(80893),n=r(22671),o=r(61956);async function a(e,t,r,i){const s=await l(e,t,r,i);return n.A.fromJSON(s)}function l(e,t,r,n){const a=(0,i.Dl)(e),l={...r},u=o.A.from(t);return(0,s.eW)(a,u,u.sourceSpatialReference,l,n)}},58501(e,t,r){r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(s)for(const e of r.features)s(e.geometry)}}}]);