@arcgis/core 4.30.0-next.20240210 → 4.30.0-next.20240213
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/05ebb9cec0e1826b283f.js +1 -0
- package/assets/esri/core/workers/chunks/0d54451c740f54a59f49.js +1 -0
- package/assets/esri/core/workers/chunks/{2b7513fe57eca6cff7c3.js → 0f30059c4e7a9cb85d1d.js} +1 -1
- package/assets/esri/core/workers/chunks/18551a7eb5a9b88aa0dc.js +1 -0
- package/assets/esri/core/workers/chunks/24d19abc680b341d13bb.js +1 -0
- package/assets/esri/core/workers/chunks/{3f4d63436c3de04a6ebb.js → 254b4ee3621bbe345bb1.js} +1 -1
- package/assets/esri/core/workers/chunks/2d682ee6e5d66f2ea5cd.js +1 -0
- package/assets/esri/core/workers/chunks/{d5484d470121de2b403b.js → 36d091be859bbb1a149b.js} +1 -1
- package/assets/esri/core/workers/chunks/50b41f91be903a0977f9.js +1 -0
- package/assets/esri/core/workers/chunks/50bb67f2eeace5d50673.js +1 -0
- package/assets/esri/core/workers/chunks/784b6a8216b97440b180.js +1 -0
- package/assets/esri/core/workers/chunks/{7f7a4de2cd4ab71b9aee.js → 8d119dc0a92ad3612daa.js} +1 -1
- package/assets/esri/core/workers/chunks/966cc0b54008c7348678.js +1 -0
- package/assets/esri/core/workers/chunks/{2853221e88ed7077a447.js → 9850b0e04cce8c1bdddf.js} +1 -1
- package/assets/esri/core/workers/chunks/{0014635097a32ad38895.js → a854611d1a86b838c6ad.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf6970b490b98aa0a117.js → be562536212360943388.js} +1 -1
- package/assets/esri/core/workers/chunks/{50a5abd75fa7dbb571a5.js → ccd53b81c2688dd11584.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2b8e6a0b3f70ada2799.js → e4da908079417cc2f495.js} +1 -1
- package/assets/esri/core/workers/chunks/{af0314c2b5b7dc4f5bbd.js → e6dbf0a7b7b1cf64f23f.js} +1 -1
- package/assets/esri/core/workers/chunks/{eba72ff1726ff6998204.js → f03d62ab7806b68d0b62.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fcda75ed02b8aee3a3c.js → f89278782ddfb154aa9f.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/geometry/Mesh.js +1 -1
- package/geometry/support/meshVertexSpaceUtils.js +1 -1
- package/interfaces.d.ts +174 -16
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterDatasets/MRFRaster.js +1 -1
- package/layers/support/rasterFormats/RasterCodec.js +1 -1
- package/layers/support/rasterFunctions/surfaceUtils.js +1 -1
- package/package.json +2 -2
- package/portal/support/resourceUtils.js +1 -1
- package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/constants.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/versionManagement/support/versionManagementUtils.js +1 -1
- package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
- package/views/2d/engine/webgl/collisions/CollisionGrid.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentScale.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/extentUtils.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/support/automaticLengthMeasurementUtils.js +1 -1
- package/views/support/extentUtils.js +5 -0
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/TableList.js +1 -1
- package/assets/esri/core/workers/chunks/062629a9b4695dea8bf8.js +0 -1
- package/assets/esri/core/workers/chunks/3401157faaa8619aaa47.js +0 -1
- package/assets/esri/core/workers/chunks/37803888bd9a537481a7.js +0 -1
- package/assets/esri/core/workers/chunks/560f677a356c7ebde5d3.js +0 -1
- package/assets/esri/core/workers/chunks/5bfc5ffad705aaaafcd4.js +0 -1
- package/assets/esri/core/workers/chunks/655f4560fb36a0d9ff0b.js +0 -1
- package/assets/esri/core/workers/chunks/b927b655e955abe00d48.js +0 -1
- package/assets/esri/core/workers/chunks/d2417d179d015f1193a1.js +0 -1
- package/assets/esri/core/workers/chunks/f75ec599f53c66cab194.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2124,8648],{75824:(e,t,i)=>{i.d(t,{Md:()=>n,m0:()=>o,qG:()=>s});var r=i(39452);class s{}function n(e){return e instanceof r.C?e===s.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return n(e)?s.instance:e}s.instance=new r._C("Etc/UTC")},7896:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ti});var r=i(41948),s=i(82692),n=i(3856),o=i(20744),a=i(26496),l=i(10860),u=i(1580),p=(i(9456),i(66360)),c=(i(72052),i(12552)),m=i(18996),d=i(81436),h=i(60708),y=i(6444),g=i(87080),f=i(2600),w=i(26832),q=i(62088),v=i(57896),_=i(28176),R=i(53368),b=i(33600),S=i(60544),F=i(21488),I=i(91768),x=i(40504),j=i(75e3),T=i(620);const D={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 O=i(44748),N=i(76688),P=i(91920);const C=new Set(["u1","u2","u4","u8","s8","u16","s16"]),M={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)"},A=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function V(e){return A.has(e.type)}function G(e,t){if(!e||!t)return(0,q.ct)(e||t);const i=(0,q.ct)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),E(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(U(i.functionArguments).Raster=t);return i}function E(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&E(e[i].arguments,t))}function J(e){const t=(0,q.ct)(D[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=J(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=W(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function U(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?U(t.functionArguments):e}const z={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function L(e,t){const i=C.has(t)?(0,T.mO)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function B(e){if(null==e)return;const{fields:t}=e,i=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return i?.name}function H(e){const t=[];return e?.forEach((e=>{const i=e;if(Array.isArray(i))t.push(i);else{if(null==i.min||null==i.max)return;const e=[i.min,i.max,i.avg||0,i.stddev||0];t.push(e)}})),t}function W(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,O.WA)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var Q=i(88392),k=i(59520);let Z=class extends x.am{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new Q.c({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=this._addClipFunction(t,s)),r&&!i&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&V(r)?G(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new j.c;r.functionName="Stretch";const s=z[N.K.toJSON(e.stretchType)],n="u8",o={StretchType:s,Statistics:H(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),s===z.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===z.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=n):s===z.minMax?r.outputPixelType=n:s===z.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new j.c;if(i)n.functionArguments={ColorRamp:(0,O.sl)(s)};else{const i=(0,O.It)(s,!0);if(i)n.functionArguments={colorRampName:i};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,O.Ky)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new j.c({rasterFunctionDefinition:J(n)}):n}return i?new j.c({rasterFunctionDefinition:J(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=B(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,i)=>{const r=t.symbol?.color;let s;r?.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||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],r.r,r.g,r.b]))}))}));const i=a?L(n,a):n,r=new j.c;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new j.c({rasterFunctionDefinition:J(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)}));const c=a?L(n,a):n,m=new j.c;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const d=new j.c;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new j.c({rasterFunctionDefinition:J(d)}):d}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=B(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach((e=>{const i=e.value,r=e.symbol?.color;null!=i&&r?.a&&t.set(String(i),r.toRgb())}));const r=e.field;n.forEach((({attributes:e})=>{const s=String(e[r]),n=e[o],l=t.get(s);l?i.push([n,...l]):a&&i.push([n,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],r=t.symbol?.color,s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r?L(i,r):i,p=new j.c;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new j.c({rasterFunctionDefinition:J(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,s=r?L(i,r):i,n=new j.c;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new j.c({rasterFunctionDefinition:J(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new j.c;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:s}=t,n="vector-uv"===r;let o,a;if(s&&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 P.c,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:M[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const m=J(i);return t.convertToRFT?j.c.fromJSON({rasterFunctionDefinition:m}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new j.c;const r=new j.c;r.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),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,O.sl)(e.colorRamp):o.Colormap=(0,O.Ky)(e.colorRamp)),i?new j.c({rasterFunctionDefinition:J(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new j.c({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new j.c({rasterFunctionDefinition:J(r)}):r,G(r,e)}_addClipFunction(e,t){return G(new j.c({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,r._)([(0,u.qq)()],Z.prototype,"layer",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"adjustAspectRatio",null),(0,r._)([(0,m.G)("adjustAspectRatio")],Z.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"bandIds",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"compression",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"compressionQuality",null),(0,r._)([(0,m.G)("compressionQuality")],Z.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"compressionTolerance",null),(0,r._)([(0,m.G)("compressionTolerance")],Z.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"format",null),(0,r._)([(0,u.qq)({type:String,json:{read:{reader:k.gh.read},write:{writer:k.gh.write}}})],Z.prototype,"interpolation",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"noData",null),(0,r._)([(0,u.qq)({type:String,json:{read:{reader:k.ec.read},write:{writer:k.ec.write}}})],Z.prototype,"noDataInterpretation",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"pixelType",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"lercVersion",void 0),(0,r._)([(0,m.G)("lercVersion")],Z.prototype,"writeLercVersion",null),(0,r._)([(0,u.qq)({type:Number})],Z.prototype,"version",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"mosaicRule",null),(0,r._)([(0,u.qq)({json:{write:!0,name:"renderingRule"}})],Z.prototype,"rasterFunction",null),Z=(0,r._)([(0,c.c)("esri.layers.mixins.ExportImageServiceParameters")],Z);var $=i(600),Y=i(16424),X=i(80428),K=i(72464),ee=i(66820),te=i(64896),ie=i(7368),re=i(56660),se=i(34084),ne=i(32876),oe=i(40996),ae=i(61944),le=i(20480),ue=i(21980),pe=i(67776);const ce=e=>{let t=class extends e{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"make",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"model",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"focalLength",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"pixelSize",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"rows",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"cols",void 0),t=(0,r._)([(0,c.c)("esri.rest.support.CameraInfoMixin")],t),t};let me=class extends(ce(x.am)){constructor(){super(...arguments),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,r._)([(0,u.qq)({json:{write:!0}})],me.prototype,"id",void 0),(0,r._)([(0,u.qq)({json:{name:"uri",write:!0}})],me.prototype,"referenceUri",void 0),(0,r._)([(0,u.qq)({type:Date,json:{write:!0}})],me.prototype,"acquisitionDate",void 0),(0,r._)([(0,m.G)("acquisitionDate")],me.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.qq)({json:{write:!0}})],me.prototype,"cameraID",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],me.prototype,"center",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],me.prototype,"perspectiveCenter",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],me.prototype,"orientation",void 0),me=(0,r._)([(0,c.c)("esri.rest.support.ImageInspectionInfo")],me);const de=me;let he=class extends x.am{constructor(){super(...arguments),this.images=null}};(0,r._)([(0,u.qq)({type:[de],json:{write:!0}})],he.prototype,"images",void 0),he=(0,r._)([(0,c.c)("esri.rest.support.FindImagesResult")],he);const ye=he;var ge=i(56156);let fe=class extends x.am{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],fe.prototype,"north",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],fe.prototype,"up",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{write:!0}})],fe.prototype,"spatialReference",void 0),fe=(0,r._)([(0,c.c)("esri.rest.support.ImageAngleResult")],fe);const we=fe;var qe=i(24296);let ve=class extends x.am{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,u.qq)({type:Number,json:{read:!0,write:!0}})],ve.prototype,"value",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:!0,write:!0}})],ve.prototype,"displayValue",void 0),(0,r._)([(0,u.qq)({type:Number,json:{read:!0,write:!0}})],ve.prototype,"uncertainty",void 0),ve=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultValue")],ve);let _e=class extends ve{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],_e.prototype,"unit",void 0),_e=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultLengthValue")],_e);let Re=class extends ve{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.qq)({type:String,json:{read:qe.iy.read,write:qe.iy.write}})],Re.prototype,"unit",void 0),Re=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultAreaValue")],Re);let be=class extends ve{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.qq)({type:String,json:{read:qe.aq.read,write:qe.aq.write}})],be.prototype,"unit",void 0),be=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultAngleValue")],be);let Se=class extends x.am{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,r._)([(0,u.qq)({type:String,json:{read:!0,write:!0}})],Se.prototype,"name",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:!0,write:!0}})],Se.prototype,"sensorName",void 0),Se=(0,r._)([(0,c.c)("esri.rest.support.BaseImageMeasureResult")],Se);let Fe=class extends Se{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,u.qq)({type:Re,json:{read:!0,write:!0}})],Fe.prototype,"area",void 0),(0,r._)([(0,u.qq)({type:_e,json:{read:!0,write:!0}})],Fe.prototype,"perimeter",void 0),Fe=(0,r._)([(0,c.c)("esri.rest.support.ImageAreaResult")],Fe);const Ie=Fe;var xe=i(95247),je=i(7488);let Te=class extends x.am{constructor(){super(...arguments),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?je.c.fromJSON(e):xe.c.fromJSON(e)}};(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],Te.prototype,"area",void 0),(0,r._)([(0,u.qq)({json:{name:"shape",write:!0}})],Te.prototype,"geometry",void 0),(0,r._)([(0,b.E)("geometry")],Te.prototype,"readGeometry",null),Te=(0,r._)([(0,c.c)("esri.rest.support.ImageBoundaryResult")],Te);const De=Te;let Oe=class extends Se{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,u.qq)({type:_e,json:{read:!0,write:!0}})],Oe.prototype,"distance",void 0),(0,r._)([(0,u.qq)({type:be,json:{read:!0,write:!0}})],Oe.prototype,"azimuthAngle",void 0),(0,r._)([(0,u.qq)({type:be,json:{read:!0,write:!0}})],Oe.prototype,"elevationAngle",void 0),Oe=(0,r._)([(0,c.c)("esri.rest.support.ImageDistanceResult")],Oe);const Ne=Oe;let Pe=class extends(ce(x.am)){constructor(){super(...arguments),this.id=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],Pe.prototype,"id",void 0),Pe=(0,r._)([(0,c.c)("esri.rest.support.CameraInfo")],Pe);const Ce=Pe;let Me=class extends x.am{constructor(){super(...arguments),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,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"id",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"name",void 0),(0,r._)([(0,u.qq)({type:Date,json:{write:!0}})],Me.prototype,"acquisitionDate",void 0),(0,r._)([(0,m.G)("acquisitionDate")],Me.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"cameraID",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],Me.prototype,"center",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"gps",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"orientation",void 0),Me=(0,r._)([(0,c.c)("esri.rest.support.ImageGPSInfo")],Me);const Ae=Me;let Ve=class extends x.am{constructor(){super(...arguments),this.images=null,this.cameras=null}};(0,r._)([(0,u.qq)({type:[Ae],json:{write:!0}})],Ve.prototype,"images",void 0),(0,r._)([(0,u.qq)({type:[Ce],json:{write:!0}})],Ve.prototype,"cameras",void 0),Ve=(0,r._)([(0,c.c)("esri.rest.support.ImageGPSInfoResult")],Ve);const Ge=Ve;let Ee=class extends Se{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,u.qq)({type:_e,json:{read:!0,write:!0}})],Ee.prototype,"height",void 0),Ee=(0,r._)([(0,c.c)("esri.rest.support.ImageHeightResult")],Ee);const Je=Ee;var Ue=i(59500);let ze=class extends x.am{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,u.qq)({type:Ue.c,json:{write:!0}})],ze.prototype,"catalogItems",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],ze.prototype,"location",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"name",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"objectId",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"processedValues",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"properties",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"value",void 0),ze=(0,r._)([(0,c.c)("esri.rest.support.ImageIdentifyResult")],ze);const Le=ze;let Be=class extends x.am{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],Be.prototype,"geometries",void 0),Be=(0,r._)([(0,c.c)("esri.rest.support.ImagePixelLocationResult")],Be);const He=Be;let We=class extends Se{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,u.qq)({type:pe.c,json:{name:"point.value",read:!0,write:!0}})],We.prototype,"point",void 0),We=(0,r._)([(0,c.c)("esri.rest.support.ImagePointResult")],We);const Qe=We;let ke=class extends x.am{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"attributes",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],ke.prototype,"location",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"locationId",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"rasterId",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"resolution",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"pixelValue",void 0),ke=(0,r._)([(0,c.c)("esri.rest.support.ImageSample")],ke);const Ze=ke;let $e=class extends x.am{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,u.qq)({type:[Ze],json:{write:!0}})],$e.prototype,"samples",void 0),$e=(0,r._)([(0,c.c)("esri.rest.support.ImageSampleResult")],$e);const Ye=$e;let Xe=class extends x.am{constructor(){super(...arguments),this.url=null}};(0,r._)([(0,u.qq)({json:{name:"imageURL",write:!0}})],Xe.prototype,"url",void 0),Xe=(0,r._)([(0,c.c)("esri.rest.support.ImageUrlResult")],Xe);const Ke=Xe;var et=i(6704);let tt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),pe.c.fromJSON(e)}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"Shape",read:et.h4,write:!0}})],tt.prototype,"geometry",void 0),(0,r._)([(0,u.qq)({json:{name:"Length",write:!0}})],tt.prototype,"length",void 0),(0,r._)([(0,u.qq)({json:{name:"Area",write:!0}})],tt.prototype,"area",void 0),(0,r._)([(0,u.qq)({json:{name:"Center",write:!0}})],tt.prototype,"center",void 0),(0,r._)([(0,b.E)("center")],tt.prototype,"readCenter",null),tt=(0,r._)([(0,c.c)("esri.rest.support.MeasureAreaFromImageResult")],tt);const it=tt;let rt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.length=null}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"Shape",read:et.h4,write:!0}})],rt.prototype,"geometry",void 0),(0,r._)([(0,u.qq)({json:{name:"Length",write:!0}})],rt.prototype,"length",void 0),rt=(0,r._)([(0,c.c)("esri.rest.support.MeasureLengthFromImageResult")],rt);const st=rt;function nt(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function ot(e,t,i){const r=(0,ue.UX)(e),s=t.geometry?[t.geometry]:[],n=await(0,le.WW)(s),o=t.toJSON();nt(o);const a=n?.[0];null!=a&&(o.geometry=pt(a));const l=(0,ue.OW)({...r.query,f:"json",...o});return(0,ue.sR)(l,i)}async function at(e,t,i){const r=(0,ue.UX)(e),s=t.geometry?[t.geometry]:[];return(0,le.WW)(s).then((e=>{const s=t.toJSON(),n=e?.[0];null!=n&&(s.geometry=JSON.stringify(pt(n)));const o=(0,ue.OW)({...r.query,f:"json",...s}),a=(0,ue.sR)(o,i);return(0,f.c)(r.path+"/identify",a)})).then((e=>Le.fromJSON(e.data)))}async function lt(e,t,i,r){const s=(0,ue.UX)(e),n=await(0,le.WW)(i),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(pt(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(pt(n[1])));const a=(0,ue.OW)({...s.query,f:"json",...o}),l=(0,ue.sR)(a,r),{data:u}=await(0,f.c)(s.path+"/measure",l);return u}async function ut(e,t,i){const r=(0,ue.UX)(e),s=t.toJSON(),n=(0,ue.OW)({...r.query,f:"json",...s}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(r.path+"/measureFromImage",o);return a}function pt(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=ct(e.spatialReference)),t}function ct(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function mt(e,t){if(!e.imageCoordinateSystem)return(0,S.um)(e);const i=ct(e),{icsid:r,icsns:s}=i;return null==r||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}i(88204);var dt=i(99944),ht=(i(6220),i(47620),i(22080),i(77048),i(53648),i(50853),i(53004)),yt=(i(48516),i(44048),i(67932),i(91232),i(95776)),gt=(i(31864),i(19212),i(46788)),ft=i(819),wt=(i(18648),i(9770),i(71599)),qt=i(84452);let vt=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0}})],vt.prototype,"fromGeometry",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],vt.prototype,"toGeometry",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],vt.prototype,"objectIds",void 0),(0,r._)([(0,u.qq)({type:String,json:{write:!0}})],vt.prototype,"where",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],vt.prototype,"maxCount",void 0),vt=(0,r._)([(0,c.c)("esri.rest.support.FindImagesParameters")],vt);const _t=vt;var Rt;let bt=Rt=class extends x.am{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Rt((0,q.ct)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,u.qq)({type:[String],json:{name:"angleName",write:!0}})],bt.prototype,"angleNames",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],bt.prototype,"point",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{write:!0}})],bt.prototype,"spatialReference",void 0),(0,r._)([(0,u.qq)({type:R.Ab,json:{write:!0}})],bt.prototype,"rasterId",void 0),bt=Rt=(0,r._)([(0,c.c)("esri.rest.support.ImageAngleParameters")],bt);const St=bt,Ft=new(i(14628).O)({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 It=class extends x.am{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var xt;(0,r._)([(0,u.qq)()],It.prototype,"type",void 0),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{read:Ft.read,write:Ft.write}})],It.prototype,"measureOperation",void 0),(0,r._)([(0,u.qq)({type:Q.c,json:{write:!0}})],It.prototype,"mosaicRule",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],It.prototype,"pixelSize",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],It.prototype,"raster",void 0),It=(0,r._)([(0,c.c)("esri.rest.support.BaseImageMeasureParameters")],It);let jt=xt=class extends It{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new xt((0,q.ct)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"fromGeometry",read:!0,write:!0}})],jt.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],jt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{write:Ft.write}})],jt.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],jt.prototype,"is3D",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],jt.prototype,"linearUnit",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.iy.read,write:qe.iy.write}})],jt.prototype,"areaUnit",void 0),jt=xt=(0,r._)([(0,c.c)("esri.rest.support.ImageAreaParameters")],jt);const Tt=jt;let Dt=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.outSpatialReference=null}};(0,r._)([(0,u.qq)({type:ge.c,json:{name:"outSR",write:!0}})],Dt.prototype,"outSpatialReference",void 0),Dt=(0,r._)([(0,c.c)("esri.rest.support.ImageBoundaryParameters")],Dt);const Ot=Dt;var Nt;let Pt=Nt=class extends It{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new Nt((0,q.ct)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],Pt.prototype,"fromGeometry",void 0),(0,r._)([(0,m.G)("fromGeometry")],Pt.prototype,"writeFromGeometry",null),(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],Pt.prototype,"toGeometry",void 0),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{write:Ft.write}})],Pt.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],Pt.prototype,"is3D",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],Pt.prototype,"linearUnit",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.aq.read,write:qe.aq.write}})],Pt.prototype,"angularUnit",void 0),Pt=Nt=(0,r._)([(0,c.c)("esri.rest.support.ImageDistanceParameters")],Pt);const Ct=Pt;var Mt=i(25228),At=i(9968),Vt=i(6152);let Gt=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4,write:!0}})],Gt.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],Gt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Gt.prototype,"objectIds",void 0),(0,r._)([(0,At.G)(Vt.K,{ignoreUnknown:!1,name:"spatialRel"})],Gt.prototype,"spatialRelationship",void 0),(0,r._)([(0,u.qq)({type:Mt.c,json:{name:"time",write:!0}})],Gt.prototype,"timeExtent",void 0),(0,r._)([(0,u.qq)({type:String,json:{write:!0}})],Gt.prototype,"where",void 0),Gt=(0,r._)([(0,c.c)("esri.rest.support.ImageGPSInfoParameters")],Gt);const Et=Gt;var Jt;let Ut=Jt=class extends It{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new Jt((0,q.ct)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0}})],Ut.prototype,"fromGeometry",void 0),(0,r._)([(0,m.G)("fromGeometry")],Ut.prototype,"writeFromGeometry",null),(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],Ut.prototype,"toGeometry",void 0),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{write:Ft.write}})],Ut.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],Ut.prototype,"operationType",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],Ut.prototype,"linearUnit",void 0),Ut=Jt=(0,r._)([(0,c.c)("esri.rest.support.ImageHeightParameters")],Ut);const zt=Ut;var Lt,Bt=i(65680);let Ht=Lt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.c.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}get renderingRule(){return(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,w.y2)(p.c.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,w.y2)(p.c.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=j.c.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new Lt((0,q.ct)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.qq)({json:{write:!0}})],Ht.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],Ht.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:Q.c,json:{write:!0}})],Ht.prototype,"mosaicRule",null),(0,r._)([(0,m.G)("mosaicRule")],Ht.prototype,"writeMosaicRule",null),(0,r._)([(0,u.qq)({type:j.c})],Ht.prototype,"renderingRule",null),(0,r._)([(0,u.qq)({type:[j.c]})],Ht.prototype,"renderingRules",null),(0,r._)([(0,u.qq)({type:j.c,json:{write:!0,name:"renderingRule"}})],Ht.prototype,"rasterFunction",null),(0,r._)([(0,m.G)("rasterFunction")],Ht.prototype,"writeRasterFunction",null),(0,r._)([(0,u.qq)({type:[j.c],json:{write:!0,name:"renderingRules"}})],Ht.prototype,"rasterFunctions",void 0),(0,r._)([(0,m.G)("rasterFunctions")],Ht.prototype,"writeRasterFunctions",null),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],Ht.prototype,"pixelSize",void 0),(0,r._)([(0,m.G)("pixelSize")],Ht.prototype,"writePixelSize",null),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"returnGeometry",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"returnCatalogItems",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"returnPixelValues",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],Ht.prototype,"maxItemCount",void 0),(0,r._)([(0,u.qq)({type:Mt.c,json:{write:{target:"time"}}})],Ht.prototype,"timeExtent",void 0),(0,r._)([(0,m.G)("timeExtent")],Ht.prototype,"writeTimeExtent",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Ht.prototype,"raster",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Ht.prototype,"viewId",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"processAsMultidimensional",void 0),Ht=Lt=(0,r._)([(0,c.c)("esri.rest.support.ImageIdentifyParameters")],Ht);const Wt=Ht;var Qt;let kt=Qt=class extends x.am{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new Qt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,u.qq)({type:[pe.c],json:{write:!0}})],kt.prototype,"geometries",void 0),(0,r._)([(0,m.G)("geometries")],kt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:R.Ab,json:{write:!0}})],kt.prototype,"rasterId",void 0),kt=Qt=(0,r._)([(0,c.c)("esri.rest.support.ImagePixelLocationParameters")],kt);const Zt=kt;var $t;let Yt=$t=class extends It{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new $t((0,q.ct)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"fromGeometry",read:et.h4}})],Yt.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],Yt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{read:Ft.read,write:Ft.write}})],Yt.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],Yt.prototype,"is3D",void 0),Yt=$t=(0,r._)([(0,c.c)("esri.rest.support.ImagePointParameters")],Yt);const Xt=Yt;var Kt;let ei=Kt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new ht.c({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new Kt((0,q.ct)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4}})],ei.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],ei.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)()],ei.prototype,"locations",null),(0,r._)([(0,u.qq)({type:String,json:{type:k.gh.jsonValues,read:k.gh.read,write:k.gh.write}})],ei.prototype,"interpolation",void 0),(0,r._)([(0,u.qq)({type:Q.c,json:{write:!0}})],ei.prototype,"mosaicRule",void 0),(0,r._)([(0,u.qq)({type:[String],json:{write:!0}})],ei.prototype,"outFields",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],ei.prototype,"pixelSize",void 0),(0,r._)([(0,u.qq)({type:String,json:{write:!0}})],ei.prototype,"raster",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],ei.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],ei.prototype,"sampleDistance",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],ei.prototype,"sampleCount",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],ei.prototype,"sliceId",void 0),(0,r._)([(0,u.qq)({type:Mt.c,json:{read:{source:"time"},write:{target:"time"}}})],ei.prototype,"timeExtent",void 0),ei=Kt=(0,r._)([(0,c.c)("esri.rest.support.ImageSampleParameters")],ei);const ti=ei;let ii=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,et.Ce)(e[0]),geometries:e.map((e=>({...e.toJSON(),spatialReference:void 0})))}:null}};(0,r._)([(0,u.qq)({types:[h.Su]})],ii.prototype,"geometries",void 0),(0,r._)([(0,m.G)("geometries")],ii.prototype,"writeGeometries",null),(0,r._)([(0,u.qq)({type:[R.Ab],json:{write:!0}})],ii.prototype,"rasterIds",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{name:"outSR",write:!0}})],ii.prototype,"outSpatialReference",void 0),ii=(0,r._)([(0,c.c)("esri.rest.support.ImageToMapMultirayParameters")],ii);const ri=ii;let si=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4,write:!0}})],si.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],si.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],si.prototype,"rasterId",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{name:"outSR",write:!0}})],si.prototype,"outSpatialReference",void 0),(0,r._)([(0,u.qq)({json:{name:"options.DOff",write:!0}})],si.prototype,"depthOffset",void 0),(0,r._)([(0,u.qq)({json:{name:"options.Adjust",write:!0}})],si.prototype,"adjust",void 0),si=(0,r._)([(0,c.c)("esri.rest.support.ImageToMapParameters")],si);const ni=si;let oi=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.referenceUri=null}};(0,r._)([(0,u.qq)({type:String,json:{name:"uri",write:!0}})],oi.prototype,"referenceUri",void 0),oi=(0,r._)([(0,c.c)("esri.rest.support.ImageUrlParameters")],oi);const ai=oi;let li=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=JSON.stringify(e))}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4,write:!0}})],li.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],li.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],li.prototype,"rasterId",void 0),(0,r._)([(0,u.qq)({json:{name:"options.VisibleOnly",write:!0}})],li.prototype,"visibleOnly",void 0),li=(0,r._)([(0,c.c)("esri.rest.support.MapToImageParameters")],li);const ui=li;var pi;let ci=pi=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,q.ct)({geometry:this.geometry,rasterId:this.rasterId});return new pi(e)}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"fromGeometry",read:et.h4,write:!0}})],ci.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],ci.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],ci.prototype,"rasterId",void 0),ci=pi=(0,r._)([(0,c.c)("esri.rest.support.MeasureFromImageParameters")],ci);const mi=ci;var di=i(46320);const hi=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),yi=(0,u.Mu)(R.Oe,{min:0,max:255}),gi=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new Z({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?Q.c.fromJSON(t):null}get fieldsIndex(){return this.fields?new Y.c(this.fields):null}set format(e){e&&hi.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.c.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?Q.c.fromJSON(i):this._isMosaicRuleSupported(t)?Q.c.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const s=this.definitionExpression;r?s&&s!==r.where&&(r=r.clone(),r.where=s):s&&(r=new Q.c({where:s})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=yi(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i?.name}return e}get parsedUrl(){return(0,_.as)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,g.gH)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),V(s)||p.c.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix,t=new $.c({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new $.c({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new $.c({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?(0,q.ct)(this.fields):[];s.push(i),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(r),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new $.c({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new $.c({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new $.c({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:n}=this.rasterInfo??{};if(null!=n){const t=n.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const i=(0,q.ct)(t);return i.name=e+t.name,i}));s=s.concat(t)}return s}get renderingRule(){return(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this.rasterFunction}set renderingRule(e){(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=j.c.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?j.c.fromJSON({rasterFunctionDefinition:t.renderingRule}):j.c.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?ge.c.fromJSON(i):null}readPixelType(e){return k.K0.fromJSON(e)||e}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=k.K0.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&r&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(r.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=r.toJSON());const l=await a.symbolize({bandIds:o,...e},t);i={extent:e.extent,pixelBlock:l}}else i={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return i}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new o.c("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,R.uY)(St,e).clone(),async function(e,t,i){const r=t.toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=ct(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(r.spatialReference=mt(t.spatialReference));const s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new ge.c({wkid:0,imageCoordinateSystem:a.spatialReference}):ge.c.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new we(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o.c("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,R.uY)(Zt,e).clone(),async function(e,t,i){const r=t.toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=ct(s[e].spatialReference));const n=(0,ue.UX)(e),o=(0,ue.OW)({...n.query,f:"json",...r}),a=(0,ue.sR)(o,i),{data:l}=await(0,f.c)(`${n.path}/computePixelLocation`,a);return He.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o.c("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,R.uY)(Bt.c,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await ot(e,t,i),s=(0,ue.UX)(e),{data:n}=await(0,f.c)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new o.c("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,R.uY)(Bt.c,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await ot(e,t,i),s=(0,ue.UX)(e),{data:n}=await(0,f.c)(`${s.path}/computeStatisticsHistograms`,r),{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 i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new o.c("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,R.uY)(zt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.fromGeometry,t.toGeometry],i);return Je.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new o.c("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,R.uY)(Tt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.geometry],i);return Ie.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new o.c("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,R.uY)(Ct,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.fromGeometry,t.toGeometry],i);return Ne.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new o.c("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,R.uY)(Xt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.geometry],i);return Qe.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.c("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new o.c("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return e=(0,R.uY)(mi,e).clone(),async function(e,t,i){const r=await ut(e,t,i);return st.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.c("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new o.c("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return e=(0,R.uY)(mi,e).clone(),async function(e,t,i){const r=await ut(e,t,i);return it.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async fetchImage(e,t,r,s={}){if(null==e||null==t||null==r)throw new o.c("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:s.signal});e&&(this.rasterInfo=e)}const n=this.getExportImageServiceParameters(e,t,r,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,s.returnImageBitmap?{imageBitmap:await(0,X.E)(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(ee.c.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ee.c({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!s.requestAsImageElement&&!this.pixelFilter,l=a&&!!s.returnImageBitmap,u={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:a,returnImageBitmap:l,signal:s.signal};return this._requestArrayBuffer(u)}fetchKeyProperties(e){return(0,f.c)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new o.c("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.c)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>Ue.c.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ue.UX)(e),s=(0,ue.OW)({...r?.query,f:"json"}),n=(0,ue.sR)(s,i),o=`${r?.path}/${t}/info`,a=(0,f.c)(`${o}`,n),l=(0,f.c)(`${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=xe.c.fromJSON(p.extent),h=Math.ceil(d.width/p.pixelSizeX-.1),y=Math.ceil(d.height/p.pixelSizeY-.1),g=d.spatialReference,w=new pe.c({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),q=p.histograms?.length?p.histograms:null,v=new qt.c({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new te.c({width:h,height:y,bandCount:p.bandCount,extent:d,spatialReference:g,pixelSize:w,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:q,keyProperties:c,storageInfo:v})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,f.c)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await(0,f.c)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n||!n.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,f.c)(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,S.um)(a),outSR:"0:"+e},u=(0,f.c)(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 h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,S.um)(a),outSR:"0:"+e},y=(0,f.c)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,y]);let w=g[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const q=xe.c.fromJSON(g[1]?.geometries?.[0]);q&&(q.spatialReference=new ge.c({wkid:0,imageCoordinateSystem:s}));const v=g[2].geometries?g[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],_=v.length;if(_<3)return{ics:s,icsToPixelTransform:w,icsExtent:q,northDirection:null};let R=0,b=0,F=0,I=0;for(let e=0;e<_;e++)R+=v[e].x,b+=v[e].y,F+=v[e].x*v[e].x,I+=v[e].x*v[e].y;const x=(_*I-R*b)/(_*F-R*R);let j=0;const T=v[4].x>v[0].x,D=v[4].y>v[0].y;return x===1/0?j=D?90:270:0===x?j=T?0:180:x>0?j=T?180*Math.atan(x)/Math.PI:180*Math.atan(x)/Math.PI+180:x<0&&(j=D?180+180*Math.atan(x)/Math.PI:360+180*Math.atan(x)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:q,northDirection:j}}async generateRasterInfo(e,t){if(e=(0,R.uY)(j.c,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const r=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),i=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return i?i.join("/"):null}(e);if(!r)throw new o.c("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const s={...t,query:this._getQueryParams()},n=(0,wt.cV)(i(this.parsedUrl),e,s);this._functionRasterInfos[r]=n;try{return await n}catch(e){throw this._functionRasterInfos[r]=null,e}}getExportImageServiceParameters(e,t,r,s){const n=mt((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;o.bandIds=void 0}else o.bandIds=a?.join(",");l instanceof Array&&l.length>0&&(o.noData=l.join(","));const m=this._processMultidimensionalIntersection(null,s,this.exportImageServiceParameters.mosaicRule);if(m.isOutSide)return null;o.mosaicRule=null!=m.mosaicRule?JSON.stringify(m.mosaicRule):null,s=m.timeExtent,o.renderingRule=this._getRenderingRuleString(j.c.fromJSON(u));const d={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?d.time=""+e:null==e&&null==t||(d.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+r,...o,...d}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new o.c("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,R.uY)(ti,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=t.toJSON();nt(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const s=await(0,le.WW)(t.geometry),n=s?.[0];null!=n&&(r.geometry=pt(n));const o=(0,ue.UX)(e),a=(0,ue.OW)({...o.query,f:"json",...r}),l=(0,ue.sR)(a,i),{data:u}=await(0,f.c)(`${o.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return Ye.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o.c("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,R.uY)(Wt,e).clone(),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=je.c.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new o.c("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),r&&null==e.raster&&(e.raster=r),at(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new o.c("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return e=(0,R.uY)(ni,e),async function(e,t,i){const r=t.toJSON();t.geometry.spatialReference.imageCoordinateSystem&&(r.geometry=pt(t.geometry)),t.depthOffset&&t.adjust||delete r.options;const s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/imageToMap`,o);return(0,et.h4)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new o.c("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return e=(0,R.uY)(ri,e),async function(e,t,i){const r=t.toJSON();t.rasterIds?.length&&(r.rasterIds=t.rasterIds.join(","));const s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/imageToMapMultiray`,o);return(0,et.h4)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new o.c("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return e=(0,R.uY)(ui,e),async function(e,t,i){const r=t.toJSON(),s=await(0,le.WW)(t.geometry),n=s?.[0];null!=n&&(r.geometry=pt(n)),t.visibleOnly||delete r.options;const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=mt(o));const a=(0,ue.UX)(e),l=(0,ue.OW)({...a.query,f:"json",...r}),u=(0,ue.sR)(l,i),{data:p}=await(0,f.c)(`${a.path}/mapToImage`,u);return(0,et.h4)(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new o.c("imagery-layer:find-images","findImages operation is not supported on the input image service");return e=(0,R.uY)(_t,e),async function(e,t,i){const r=t.toJSON(),s=await(0,le.WW)([t.fromGeometry,t.toGeometry]);null!=s[0]&&(r.fromGeometry=pt(s[0]),s[0].spatialReference&&(r.inSR=mt(s[0].spatialReference))),null!=s[1]&&(r.toGeometry=pt(s[1])),t.objectIds?.length&&(r.objectIds=r.objectIds.join(","));const n=(0,ue.UX)(e),o=(0,ue.OW)({...n.query,f:"json",...r}),a=(0,ue.sR)(o,i),{data:l}=await(0,f.c)(`${n.path}/find`,a);return ye.fromJSON(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new o.c("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return e=(0,R.uY)(ai,e),async function(e,t,i){const r=t.toJSON(),s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/getImageUrl`,o);return Ke.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){const e=new yt.c;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new o.c("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=(0,R.uY)(Ot,e??{outSpatialReference:this.spatialReference}).clone(),async function(e,t,i){const r=(0,ue.UX)(e),s=t.toJSON();t.outSpatialReference&&(s.outSR=mt(t.outSpatialReference));const n=(0,ue.OW)({...r.query,f:"json",...s}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(r.path+"/queryBoundary",o);return De.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,dt.c)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,ft.g)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new o.c("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=(0,R.uY)(Et,e??{outSpatialReference:this.spatialReference}).clone(),async function(e,t,i){const r=t.toJSON();nt(r),r.objectIds?.length&&(r.objectIds=r.objectIds.join(",")),r.geometry||r.objectIds||r.time||r.where||(r.where="1=1");const s=await(0,le.WW)(t.geometry),n=s?.[0];null!=n&&(r.geometry=pt(n));const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=mt(o));const a=(0,ue.UX)(e),l=(0,ue.OW)({...a.query,f:"json",...r}),u=(0,ue.sR)(l,i),{data:p}=await(0,f.c)(`${a.path}/queryGPSInfo`,u);return Ge.fromJSON(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,gt._)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o.c("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some((e=>!e.toLowerCase().includes(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(p)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new j.c({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some((e=>e.functionName===i.functionName))&&(l.push(i),u.push(i.functionName))}const m=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let h=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:i}=(0,re.W8)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new o.c("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(h=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=je.c.fromExtent(g));const f=this._getQueryParams({geometry:g,timeExtent:h,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:a,returnGeometry:m,raster:this.raster,maxItemCount:s?1:null});delete f.f;const w=new Wt(f);try{await this._generateRasterInfo(this.rasterFunction);const i=await at(this.url,w,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,o=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!a||m||!i?.catalogItems?.features.length||!n&&o)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s});const l=this.objectIdField||"ObjectId",p=i.catalogItems?.features??[],c=p.map((e=>e.attributes?.[l])),d=new yt.c({objectIds:c,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),h=await this.queryRasters(d);return h?.features?.length&&h.features.forEach((t=>{p.forEach((i=>{i.attributes[l]===t.attributes[l]&&(i.geometry=new je.c(t.geometry),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s})}catch{throw new o.c("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,f.c)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,f.c)(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}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,di.__)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,re.aQ)(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,wt.Rk)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,wt.sJ)(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.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),p.c.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,v.aE)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.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 I.c({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 o.c("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,R.uY)(yt.c,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new ie.c;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,oe.RC)(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.c)(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 o.c("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&i.bandCount>=3){const e=(0,oe.oh)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,oe.i)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,oe.uw)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=i):this.symbolizer=new ae.c({rendererJSON:t,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,se.Y)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await(0,f.c)(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.c)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,X.E)(o,r,n),params:t}:{imageOrCanvasElement:o,params:t}}const a=this._initJobHandler(),l=(0,f.c)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),u=(await Promise.all([l,a]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,se.o)(u)),!c)throw new o.c("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const m={signal:n},d="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,se.Y)(u,{useCanvas:!0,...t},m):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},m);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,re.Qz)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new Q.c;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords: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 i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!l&&!c){const e={};e[p]=0,u=[i],l=[new y.c(this.fullExtent,null,e)]}if(!l)return[];let d,h,g;this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);for(let e=0;e<l.length;e++){if(d=l[e],null!=i){if(h=u[e],g=this.rasterFunction&&a&&a.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?a[r.indexOf(this.rasterFunction.functionName)]:i,"nodata"===h.toLowerCase()&&!s)continue;const t="Raster.ItemPixelValue",n="Raster.ServicePixelValue";d.attributes[t]=h,d.attributes[n]=g,this._updateFeatureWithMagDirValues(d,h);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?h:i:g;this.rasterFunction||(l=o?h:i),this._updateFeatureWithRasterAttributeTableValues(d,l)}if(d.sourceLayer=d.layer=this,n&&this._updateFeatureWithDomainValues(d),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];d.attributes[t]=a[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=(0,re.W8)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,re.W8)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map((e=>e.name)).find((e=>"value"===e.toLowerCase()));if(!n)return;const o=r.filter((e=>e.attributes[n]===(null!=t?parseInt(t,10):null)));o&&o[0]&&s.forEach((t=>{const i=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=o[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),s=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new ee.c({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new xe.c(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,ne.KO)([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach((e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&e instanceof Bt.c&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic"),m=this._isMosaicDataset(e)&&t.includes("catalog"),d=t.includes("download");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsImageToMap:i>=11.2&&m,supportsImageToMapMultiray:i>=11.2&&m,supportsMapToImage:i>=11.2&&m,supportsFindImages:i>=11.2&&m,supportsGetImageUrl:i>=11.2&&d,supportsMeasure:u,supportsMeasureFromImage:i>=11.2,supportsDownload:d,supportsQuery:m&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&n,supportsProject:i>=10.3&&n,supportsComputeStatisticsHistograms:i>=10.4&&n,supportsQueryBoundary:i>=10.6&&n,supportsCalculateVolume:i>=10.7&&o,supportsComputePixelLocation:i>=10.7&&m,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&m,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function i(e){return e?.path??""}return(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,b.E)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,u.qq)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,u.qq)({type:[R.Ab],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,b.E)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,u.qq)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,b.E)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,u.qq)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,m.G)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.qq)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,m.G)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.qq)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,u.qq)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,b.E)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,u.qq)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,u.qq)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,u.qq)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,u.qq)({readOnly:!0,type:[$.c]})],t.prototype,"fields",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,u.qq)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,b.E)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,u.qq)({type:xe.c})],t.prototype,"fullExtent",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,u.qq)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,u.qq)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,u.qq)({type:String,json:{type:k.gh.jsonValues,read:k.gh.read,write:k.gh.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,u.qq)()],t.prototype,"minScale",void 0),(0,r._)([(0,b.E)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,u.qq)()],t.prototype,"maxScale",void 0),(0,r._)([(0,b.E)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,u.qq)({type:Q.c})],t.prototype,"mosaicRule",null),(0,r._)([(0,b.E)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,m.G)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,u.qq)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,u.qq)({type:K.c,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,u.qq)({json:{type:R.Ab}})],t.prototype,"noData",void 0),(0,r._)([(0,m.G)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,u.qq)({type:String,json:{type:k.ec.jsonValues,read:k.ec.read,write:k.ec.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,u.qq)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,b.E)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,r._)([(0,u.qq)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,u.qq)({})],t.prototype,"types",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,u.qq)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,u.qq)()],t.prototype,"raster",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,b.E)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,u.qq)()],t.prototype,"viewId",void 0),(0,r._)([(0,u.qq)({types:g._0,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:g.qk,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,r._)([(0,b.E)("renderer")],t.prototype,"readRenderer",null),(0,r._)([(0,m.G)("renderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,r._)([(0,u.qq)(F.o9)],t.prototype,"opacity",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,u.qq)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,u.qq)({type:j.c})],t.prototype,"renderingRule",null),(0,r._)([(0,u.qq)({type:j.c,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,r._)([(0,b.E)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,r._)([(0,u.qq)({readOnly:!0,type:ge.c})],t.prototype,"spatialReference",void 0),(0,r._)([(0,b.E)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,u.qq)({json:{type:k.K0.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,b.E)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,m.G)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,u.qq)({constructOnly:!0,type:te.c})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,u.qq)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,u.qq)(F.qW)],t.prototype,"url",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,b.E)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,c.c)("esri.layers.mixins.ArcGISImageService")],t),t};var fi=i(16660),wi=i(25216),qi=i(28584),vi=i(66576),_i=i(98768),Ri=i(26916),bi=i(3116),Si=i(19560),Fi=i(98984),Ii=i(65548),xi=i(8616);let ji=class extends((0,wi.W)((0,Si.u)((0,bi.I)((0,vi.Y)((0,_i.K)(gi((0,Ri.G)((0,qi.G)((0,fi.u)((0,a.U)((0,n.q)(d.c)))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.Cu)((async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(7448).then(i.bind(i,67448));switch(e){case xi.U.SAVE:return s(this,t);case xi.U.SAVE_AS:return n(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l.CE).then((()=>this._fetchService(t)))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const t=this.rasterFields,i=this.title,r=new Set;let s=!1,n=!1;this.capabilities&&(s=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,n="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;s&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||r.add(e.name)}n&&r.add("raster.magnitude").add("raster.direction");const a=(0,Ii.Ap)({fields:t,title:i},{...e,visibleFieldNames:r});return a?.fieldInfos&&this.rasterInfo?.pixelType.startsWith("f")&&a.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),a}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(xi.U.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(xi.U.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,Fi.o)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.c("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,r._)([(0,u.qq)(F.Uj)],ji.prototype,"legendEnabled",null),(0,r._)([(0,u.qq)({type:["show","hide"]})],ji.prototype,"listMode",null),(0,r._)([(0,u.qq)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ji.prototype,"isReference",void 0),(0,r._)([(0,u.qq)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],ji.prototype,"operationalLayerType",void 0),(0,r._)([(0,m.G)("web-map","operationalLayerType")],ji.prototype,"writeOperationalLayerType",null),(0,r._)([(0,u.qq)(F.Ou)],ji.prototype,"popupEnabled",void 0),(0,r._)([(0,u.qq)({type:s.c,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],ji.prototype,"popupTemplate",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],ji.prototype,"defaultPopupTemplate",null),(0,r._)([(0,u.qq)({readOnly:!0,json:{read:!1}})],ji.prototype,"type",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],ji.prototype,"_isPreviewLayer",null),ji=(0,r._)([(0,c.c)("esri.layers.ImageryLayer")],ji);const Ti=ji},34888:(e,t,i)=>{i.d(t,{ED:()=>s,_M:()=>r});class r{constructor(e=null,t={},i,r){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new r(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new r(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function s(e){return!!e.geometry?.coords?.length}},90412:(e,t,i)=>{i.d(t,{c:()=>r});class r{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},16424:(e,t,i)=>{i.d(t,{c:()=>m});var r=i(20744),s=i(40504),n=i(66360),o=i(86916),a=i(75824),l=i(564),u=i(28484),p=i(39452);const c=new Map;class m{static fromJSON(e){return new m(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new m(e.fields??[],g(e))}static fromLayerJSON(e){return new m(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=h(t);if(t&&r){const s=d(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.gp)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.iW)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.Mz)(e)||(0,l.w1)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.Mz)(e)||(0,l.w1)(e)||e.nullable||void 0!==(0,l.gB)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(d(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.c.getLogger("esri.layers.support.FieldsIndex").error(new r.c("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.Gw):y.has(t.type)?u.OI:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.OI?a.qG.instance:t===u.Gw?p.Kq.utcInstance:(0,o.wJ)(c,t,(()=>p._C.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.eM)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.wt)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function d(e){return e.trim().toLowerCase()}function h(e){return(0,l.gP)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.Mt)(e.dateFieldsTimeReference):null,l=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,u.Mt)(s.dateFieldsTimeReference):a??u.Gw:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,u.Mt)(r.timeReference):a:null,c=new Map([[d(s?.creationDateField??""),l],[d(s?.editDateField??""),l],[d(n),p],[d(o),p]]);for(const{name:r,type:s}of e.fields)if(y.has(s))t.set(r,u.OI);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,u.OI);else{const e=c.get(d(r??""))??a;t.set(r,e)}return t}},80428:(e,t,i)=>{i.d(t,{E:()=>n,G:()=>o});var r=i(20744),s=i(10860);async function n(e,t,i){let n;try{n=await createImageBitmap(e)}catch(e){throw new r.c("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.wp)(i),n}async function o(e,t,i,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.c("request:server",`Unable to load tile ${t}/${i}/${n}`,{error:e,level:t,row:i,col:n})}return(0,s.wp)(o),a}},98984:(e,t,i)=>{i.d(t,{o:()=>n});var r=i(48212);const s=[];function n(e,t){if((0,r.Wq)(e.url??""))return!0;const{wkid:i}=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(i))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}]),s.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),s.push([10.61,()=>new Set([102497])]),s.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}])},46788:(e,t,i)=>{i.d(t,{_:()=>o});var r=i(21980),s=i(32848),n=i(95776);async function o(e,t,i){const o=(0,r.UX)(e);return(0,s.WE)(o,n.c.from(t),{...i}).then((e=>e.data.count))}},819:(e,t,i)=>{i.d(t,{g:()=>o});var r=i(21980),s=i(32848),n=i(95776);async function o(e,t,i){const o=(0,r.UX)(e);return(0,s.Qn)(o,n.c.from(t),{...i}).then((e=>e.data.objectIds))}},99944:(e,t,i)=>{i.d(t,{E:()=>l,c:()=>a});var r=i(21980),s=i(32848),n=i(59500),o=i(95776);async function a(e,t,i){const r=await l(e,t,i);return n.c.fromJSON(r)}async function l(e,t,i){const n=(0,r.UX)(e),a={...i},l=o.c.from(t),{data:u}=await(0,s.EL)(n,l,l.sourceSpatialReference,a);return u}},21012:(e,t,i)=>{i.d(t,{M:()=>s});var r=i(37924);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.O)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},31864:(e,t,i)=>{i.d(t,{c:()=>c});var r,s=i(41948),n=i(40504),o=i(1580),a=i(53368),l=(i(72052),i(9456),i(12552));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=r=class extends n.am{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const s=t.find((e=>e.name===i));return s?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r?.value||null}({tagName:r,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,s._)([(0,o.qq)({type:String})],p.prototype,"contentType",void 0),(0,s._)([(0,o.qq)()],p.prototype,"exifInfo",void 0),(0,s._)([(0,o.qq)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,s._)([(0,o.qq)({type:a.Ab})],p.prototype,"id",void 0),(0,s._)([(0,o.qq)({type:String})],p.prototype,"globalId",void 0),(0,s._)([(0,o.qq)({type:String})],p.prototype,"keywords",void 0),(0,s._)([(0,o.qq)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,o.qq)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,s._)([(0,o.qq)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,s._)([(0,o.qq)({type:a.Ab})],p.prototype,"size",void 0),(0,s._)([(0,o.qq)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,s._)([(0,l.c)("esri.layers.support.AttachmentInfo")],p);const c=p},19212:(e,t,i)=>{i.d(t,{c:()=>m});var r,s=i(41948),n=i(40504),o=i(62088),a=i(1580),l=i(53368),u=i(12552),p=i(18996);let c=r=class extends n.am{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new r((0,o.ct)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,s._)([(0,p.G)("start"),(0,p.G)("num")],c.prototype,"writeStart",null),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=r=(0,s._)([(0,u.c)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.ey)(c);const m=c},18648:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,s=i(41948),n=(i(60708),i(40504)),o=i(62088),a=i(1580),l=i(53368),u=i(12552),p=i(18996),c=i(88204),m=i(56156);let d=r=class extends n.am{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new r((0,o.ct)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.qq)({type:Boolean,json:{write:!0}})],d.prototype,"cacheHint",void 0),(0,s._)([(0,a.qq)({type:c.U,json:{write:!0}})],d.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.qq)({type:String,json:{write:!0}})],d.prototype,"gdbVersion",void 0),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],d.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.qq)({type:Date})],d.prototype,"historicMoment",void 0),(0,s._)([(0,p.G)("historicMoment")],d.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],d.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],d.prototype,"objectIds",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],d.prototype,"orderByFields",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],d.prototype,"outFields",void 0),(0,s._)([(0,a.qq)({type:m.c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],d.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],d.prototype,"relationshipId",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultOffset"}}})],d.prototype,"start",void 0),(0,s._)([(0,p.G)("start"),(0,p.G)("num")],d.prototype,"writeStart",null),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],d.prototype,"num",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],d.prototype,"returnGeometry",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],d.prototype,"returnM",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],d.prototype,"returnZ",void 0),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],d.prototype,"where",void 0),d=r=(0,s._)([(0,u.c)("esri.rest.support.RelationshipQuery")],d),d.from=(0,l.ey)(d);const h=d},9770:(e,t,i)=>{i.d(t,{c:()=>R});var r,s=i(41948),n=i(60708),o=i(25228),a=i(14628),l=i(40504),u=i(62088),p=i(1580),c=i(53368),m=i(12552),d=i(18996),h=i(6704);i(9456),i(66360),i(72052);let y=r=class extends l.am{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new r({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=r=(0,s._)([(0,m.c)("esri.rest.support.TopFilter")],y);const g=y;var f,w=i(56156);const q=new a.O({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),v=new a.O({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let _=f=class extends l.am{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new f((0,u.ct)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,p.qq)({type:Boolean,json:{write:!0}})],_.prototype,"cacheHint",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],_.prototype,"distance",void 0),(0,s._)([(0,p.qq)({types:n.Su,json:{read:h.h4,write:!0}})],_.prototype,"geometry",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:!0}})],_.prototype,"geometryPrecision",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:!0}})],_.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,p.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],_.prototype,"num",void 0),(0,s._)([(0,p.qq)({json:{write:!0}})],_.prototype,"objectIds",void 0),(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],_.prototype,"orderByFields",void 0),(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],_.prototype,"outFields",void 0),(0,s._)([(0,p.qq)({type:w.c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],_.prototype,"outSpatialReference",void 0),(0,s._)([(0,p.qq)({type:String,json:{write:!0}})],_.prototype,"resultType",void 0),(0,s._)([(0,p.qq)({json:{write:!0}})],_.prototype,"returnGeometry",void 0),(0,s._)([(0,p.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnM",void 0),(0,s._)([(0,p.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnZ",void 0),(0,s._)([(0,p.qq)({type:Number,json:{read:{source:"resultOffset"}}})],_.prototype,"start",void 0),(0,s._)([(0,d.G)("start"),(0,d.G)("num")],_.prototype,"writeStart",null),(0,s._)([(0,p.qq)({type:String,json:{read:{source:"spatialRel",reader:q.read},write:{target:"spatialRel",writer:q.write}}})],_.prototype,"spatialRelationship",void 0),(0,s._)([(0,p.qq)({type:o.c,json:{write:!0}})],_.prototype,"timeExtent",void 0),(0,s._)([(0,p.qq)({type:g,json:{write:!0}})],_.prototype,"topFilter",void 0),(0,s._)([(0,p.qq)({type:String,json:{read:v.read,write:{writer:v.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],_.prototype,"units",void 0),(0,s._)([(0,p.qq)({type:String,json:{write:!0}})],_.prototype,"where",void 0),_=f=(0,s._)([(0,m.c)("esri.rest.support.TopFeaturesQuery")],_),_.from=(0,c.ey)(_);const R=_}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2124,8648],{75824:(e,t,i)=>{i.d(t,{Md:()=>n,m0:()=>o,qG:()=>s});var r=i(39452);class s{}function n(e){return e instanceof r.C?e===s.instance:"unknown"===e?.toString().toLowerCase()}function o(e){return n(e)?s.instance:e}s.instance=new r._C("Etc/UTC")},7896:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ti});var r=i(41948),s=i(82692),n=i(3856),o=i(20744),a=i(26496),l=i(10860),u=i(1580),p=(i(9456),i(66360)),c=(i(72052),i(12552)),m=i(18996),d=i(81436),h=i(60708),y=i(6444),g=i(87080),f=i(2600),w=i(26832),q=i(62088),v=i(57896),_=i(28176),R=i(53368),b=i(33600),S=i(60544),F=i(21488),I=i(91768),x=i(40504),j=i(75e3),T=i(620);const D={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 O=i(44748),N=i(76688),P=i(91920);const C=new Set(["u1","u2","u4","u8","s8","u16","s16"]),M={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)"},A=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function V(e){return A.has(e.type)}function G(e,t){if(!e||!t)return(0,q.ct)(e||t);const i=(0,q.ct)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),E(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(U(i.functionArguments).Raster=t);return i}function E(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&E(e[i].arguments,t))}function J(e){const t=(0,q.ct)(D[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=J(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=W(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function U(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?U(t.functionArguments):e}const z={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function L(e,t){const i=C.has(t)?(0,T.mO)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function B(e){if(null==e)return;const{fields:t}=e,i=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return i?.name}function H(e){const t=[];return e?.forEach((e=>{const i=e;if(Array.isArray(i))t.push(i);else{if(null==i.min||null==i.max)return;const e=[i.min,i.max,i.avg||0,i.stddev||0];t.push(e)}})),t}function W(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,O.WA)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var Q=i(88392),k=i(59520);let Z=class extends x.am{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new Q.c({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=this._addClipFunction(t,s)),r&&!i&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&V(r)?G(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new j.c;r.functionName="Stretch";const s=z[N.K.toJSON(e.stretchType)],n="u8",o={StretchType:s,Statistics:H(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),s===z.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===z.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=n):s===z.minMax?r.outputPixelType=n:s===z.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new j.c;if(i)n.functionArguments={ColorRamp:(0,O.sl)(s)};else{const i=(0,O.It)(s,!0);if(i)n.functionArguments={colorRampName:i};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,O.Ky)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new j.c({rasterFunctionDefinition:J(n)}):n}return i?new j.c({rasterFunctionDefinition:J(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=B(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,i)=>{const r=t.symbol?.color;let s;r?.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||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],r.r,r.g,r.b]))}))}));const i=a?L(n,a):n,r=new j.c;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new j.c({rasterFunctionDefinition:J(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)}));const c=a?L(n,a):n,m=new j.c;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const d=new j.c;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new j.c({rasterFunctionDefinition:J(d)}):d}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=B(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach((e=>{const i=e.value,r=e.symbol?.color;null!=i&&r?.a&&t.set(String(i),r.toRgb())}));const r=e.field;n.forEach((({attributes:e})=>{const s=String(e[r]),n=e[o],l=t.get(s);l?i.push([n,...l]):a&&i.push([n,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],r=t.symbol?.color,s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r?L(i,r):i,p=new j.c;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new j.c({rasterFunctionDefinition:J(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,s=r?L(i,r):i,n=new j.c;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new j.c({rasterFunctionDefinition:J(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new j.c;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:s}=t,n="vector-uv"===r;let o,a;if(s&&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 P.c,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:M[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const m=J(i);return t.convertToRFT?j.c.fromJSON({rasterFunctionDefinition:m}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new j.c;const r=new j.c;r.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),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,O.sl)(e.colorRamp):o.Colormap=(0,O.Ky)(e.colorRamp)),i?new j.c({rasterFunctionDefinition:J(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new j.c({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new j.c({rasterFunctionDefinition:J(r)}):r,G(r,e)}_addClipFunction(e,t){return G(new j.c({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,r._)([(0,u.qq)()],Z.prototype,"layer",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"adjustAspectRatio",null),(0,r._)([(0,m.G)("adjustAspectRatio")],Z.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"bandIds",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"compression",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"compressionQuality",null),(0,r._)([(0,m.G)("compressionQuality")],Z.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"compressionTolerance",null),(0,r._)([(0,m.G)("compressionTolerance")],Z.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"format",null),(0,r._)([(0,u.qq)({type:String,json:{read:{reader:k.gh.read},write:{writer:k.gh.write}}})],Z.prototype,"interpolation",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"noData",null),(0,r._)([(0,u.qq)({type:String,json:{read:{reader:k.ec.read},write:{writer:k.ec.write}}})],Z.prototype,"noDataInterpretation",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"pixelType",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"lercVersion",void 0),(0,r._)([(0,m.G)("lercVersion")],Z.prototype,"writeLercVersion",null),(0,r._)([(0,u.qq)({type:Number})],Z.prototype,"version",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Z.prototype,"mosaicRule",null),(0,r._)([(0,u.qq)({json:{write:!0,name:"renderingRule"}})],Z.prototype,"rasterFunction",null),Z=(0,r._)([(0,c.c)("esri.layers.mixins.ExportImageServiceParameters")],Z);var $=i(600),Y=i(16424),X=i(80428),K=i(72464),ee=i(32104),te=i(64896),ie=i(7368),re=i(56660),se=i(34084),ne=i(32876),oe=i(40996),ae=i(61944),le=i(20480),ue=i(21980),pe=i(67776);const ce=e=>{let t=class extends e{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"make",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"model",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"focalLength",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"pixelSize",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"rows",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],t.prototype,"cols",void 0),t=(0,r._)([(0,c.c)("esri.rest.support.CameraInfoMixin")],t),t};let me=class extends(ce(x.am)){constructor(){super(...arguments),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,r._)([(0,u.qq)({json:{write:!0}})],me.prototype,"id",void 0),(0,r._)([(0,u.qq)({json:{name:"uri",write:!0}})],me.prototype,"referenceUri",void 0),(0,r._)([(0,u.qq)({type:Date,json:{write:!0}})],me.prototype,"acquisitionDate",void 0),(0,r._)([(0,m.G)("acquisitionDate")],me.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.qq)({json:{write:!0}})],me.prototype,"cameraID",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],me.prototype,"center",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],me.prototype,"perspectiveCenter",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],me.prototype,"orientation",void 0),me=(0,r._)([(0,c.c)("esri.rest.support.ImageInspectionInfo")],me);const de=me;let he=class extends x.am{constructor(){super(...arguments),this.images=null}};(0,r._)([(0,u.qq)({type:[de],json:{write:!0}})],he.prototype,"images",void 0),he=(0,r._)([(0,c.c)("esri.rest.support.FindImagesResult")],he);const ye=he;var ge=i(56156);let fe=class extends x.am{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],fe.prototype,"north",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],fe.prototype,"up",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{write:!0}})],fe.prototype,"spatialReference",void 0),fe=(0,r._)([(0,c.c)("esri.rest.support.ImageAngleResult")],fe);const we=fe;var qe=i(24296);let ve=class extends x.am{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,u.qq)({type:Number,json:{read:!0,write:!0}})],ve.prototype,"value",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:!0,write:!0}})],ve.prototype,"displayValue",void 0),(0,r._)([(0,u.qq)({type:Number,json:{read:!0,write:!0}})],ve.prototype,"uncertainty",void 0),ve=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultValue")],ve);let _e=class extends ve{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],_e.prototype,"unit",void 0),_e=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultLengthValue")],_e);let Re=class extends ve{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.qq)({type:String,json:{read:qe.iy.read,write:qe.iy.write}})],Re.prototype,"unit",void 0),Re=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultAreaValue")],Re);let be=class extends ve{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.qq)({type:String,json:{read:qe.aq.read,write:qe.aq.write}})],be.prototype,"unit",void 0),be=(0,r._)([(0,c.c)("esri.rest.support.ImageMeasureResultAngleValue")],be);let Se=class extends x.am{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,r._)([(0,u.qq)({type:String,json:{read:!0,write:!0}})],Se.prototype,"name",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:!0,write:!0}})],Se.prototype,"sensorName",void 0),Se=(0,r._)([(0,c.c)("esri.rest.support.BaseImageMeasureResult")],Se);let Fe=class extends Se{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,u.qq)({type:Re,json:{read:!0,write:!0}})],Fe.prototype,"area",void 0),(0,r._)([(0,u.qq)({type:_e,json:{read:!0,write:!0}})],Fe.prototype,"perimeter",void 0),Fe=(0,r._)([(0,c.c)("esri.rest.support.ImageAreaResult")],Fe);const Ie=Fe;var xe=i(95247),je=i(7488);let Te=class extends x.am{constructor(){super(...arguments),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?je.c.fromJSON(e):xe.c.fromJSON(e)}};(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],Te.prototype,"area",void 0),(0,r._)([(0,u.qq)({json:{name:"shape",write:!0}})],Te.prototype,"geometry",void 0),(0,r._)([(0,b.E)("geometry")],Te.prototype,"readGeometry",null),Te=(0,r._)([(0,c.c)("esri.rest.support.ImageBoundaryResult")],Te);const De=Te;let Oe=class extends Se{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,u.qq)({type:_e,json:{read:!0,write:!0}})],Oe.prototype,"distance",void 0),(0,r._)([(0,u.qq)({type:be,json:{read:!0,write:!0}})],Oe.prototype,"azimuthAngle",void 0),(0,r._)([(0,u.qq)({type:be,json:{read:!0,write:!0}})],Oe.prototype,"elevationAngle",void 0),Oe=(0,r._)([(0,c.c)("esri.rest.support.ImageDistanceResult")],Oe);const Ne=Oe;let Pe=class extends(ce(x.am)){constructor(){super(...arguments),this.id=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],Pe.prototype,"id",void 0),Pe=(0,r._)([(0,c.c)("esri.rest.support.CameraInfo")],Pe);const Ce=Pe;let Me=class extends x.am{constructor(){super(...arguments),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,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"id",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"name",void 0),(0,r._)([(0,u.qq)({type:Date,json:{write:!0}})],Me.prototype,"acquisitionDate",void 0),(0,r._)([(0,m.G)("acquisitionDate")],Me.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"cameraID",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],Me.prototype,"center",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"gps",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Me.prototype,"orientation",void 0),Me=(0,r._)([(0,c.c)("esri.rest.support.ImageGPSInfo")],Me);const Ae=Me;let Ve=class extends x.am{constructor(){super(...arguments),this.images=null,this.cameras=null}};(0,r._)([(0,u.qq)({type:[Ae],json:{write:!0}})],Ve.prototype,"images",void 0),(0,r._)([(0,u.qq)({type:[Ce],json:{write:!0}})],Ve.prototype,"cameras",void 0),Ve=(0,r._)([(0,c.c)("esri.rest.support.ImageGPSInfoResult")],Ve);const Ge=Ve;let Ee=class extends Se{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,u.qq)({type:_e,json:{read:!0,write:!0}})],Ee.prototype,"height",void 0),Ee=(0,r._)([(0,c.c)("esri.rest.support.ImageHeightResult")],Ee);const Je=Ee;var Ue=i(59500);let ze=class extends x.am{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,u.qq)({type:Ue.c,json:{write:!0}})],ze.prototype,"catalogItems",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],ze.prototype,"location",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"name",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"objectId",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"processedValues",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"properties",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ze.prototype,"value",void 0),ze=(0,r._)([(0,c.c)("esri.rest.support.ImageIdentifyResult")],ze);const Le=ze;let Be=class extends x.am{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],Be.prototype,"geometries",void 0),Be=(0,r._)([(0,c.c)("esri.rest.support.ImagePixelLocationResult")],Be);const He=Be;let We=class extends Se{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,u.qq)({type:pe.c,json:{name:"point.value",read:!0,write:!0}})],We.prototype,"point",void 0),We=(0,r._)([(0,c.c)("esri.rest.support.ImagePointResult")],We);const Qe=We;let ke=class extends x.am{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"attributes",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],ke.prototype,"location",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"locationId",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"rasterId",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"resolution",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],ke.prototype,"pixelValue",void 0),ke=(0,r._)([(0,c.c)("esri.rest.support.ImageSample")],ke);const Ze=ke;let $e=class extends x.am{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,u.qq)({type:[Ze],json:{write:!0}})],$e.prototype,"samples",void 0),$e=(0,r._)([(0,c.c)("esri.rest.support.ImageSampleResult")],$e);const Ye=$e;let Xe=class extends x.am{constructor(){super(...arguments),this.url=null}};(0,r._)([(0,u.qq)({json:{name:"imageURL",write:!0}})],Xe.prototype,"url",void 0),Xe=(0,r._)([(0,c.c)("esri.rest.support.ImageUrlResult")],Xe);const Ke=Xe;var et=i(6704);let tt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),pe.c.fromJSON(e)}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"Shape",read:et.h4,write:!0}})],tt.prototype,"geometry",void 0),(0,r._)([(0,u.qq)({json:{name:"Length",write:!0}})],tt.prototype,"length",void 0),(0,r._)([(0,u.qq)({json:{name:"Area",write:!0}})],tt.prototype,"area",void 0),(0,r._)([(0,u.qq)({json:{name:"Center",write:!0}})],tt.prototype,"center",void 0),(0,r._)([(0,b.E)("center")],tt.prototype,"readCenter",null),tt=(0,r._)([(0,c.c)("esri.rest.support.MeasureAreaFromImageResult")],tt);const it=tt;let rt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.length=null}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"Shape",read:et.h4,write:!0}})],rt.prototype,"geometry",void 0),(0,r._)([(0,u.qq)({json:{name:"Length",write:!0}})],rt.prototype,"length",void 0),rt=(0,r._)([(0,c.c)("esri.rest.support.MeasureLengthFromImageResult")],rt);const st=rt;function nt(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function ot(e,t,i){const r=(0,ue.UX)(e),s=t.geometry?[t.geometry]:[],n=await(0,le.WW)(s),o=t.toJSON();nt(o);const a=n?.[0];null!=a&&(o.geometry=pt(a));const l=(0,ue.OW)({...r.query,f:"json",...o});return(0,ue.sR)(l,i)}async function at(e,t,i){const r=(0,ue.UX)(e),s=t.geometry?[t.geometry]:[];return(0,le.WW)(s).then((e=>{const s=t.toJSON(),n=e?.[0];null!=n&&(s.geometry=JSON.stringify(pt(n)));const o=(0,ue.OW)({...r.query,f:"json",...s}),a=(0,ue.sR)(o,i);return(0,f.c)(r.path+"/identify",a)})).then((e=>Le.fromJSON(e.data)))}async function lt(e,t,i,r){const s=(0,ue.UX)(e),n=await(0,le.WW)(i),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(pt(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(pt(n[1])));const a=(0,ue.OW)({...s.query,f:"json",...o}),l=(0,ue.sR)(a,r),{data:u}=await(0,f.c)(s.path+"/measure",l);return u}async function ut(e,t,i){const r=(0,ue.UX)(e),s=t.toJSON(),n=(0,ue.OW)({...r.query,f:"json",...s}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(r.path+"/measureFromImage",o);return a}function pt(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=ct(e.spatialReference)),t}function ct(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function mt(e,t){if(!e.imageCoordinateSystem)return(0,S.um)(e);const i=ct(e),{icsid:r,icsns:s}=i;return null==r||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}i(88204);var dt=i(99944),ht=(i(6220),i(47620),i(22080),i(77048),i(53648),i(50853),i(53004)),yt=(i(48516),i(44048),i(67932),i(91232),i(95776)),gt=(i(31864),i(19212),i(46788)),ft=i(819),wt=(i(18648),i(9770),i(71599)),qt=i(84452);let vt=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0}})],vt.prototype,"fromGeometry",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],vt.prototype,"toGeometry",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],vt.prototype,"objectIds",void 0),(0,r._)([(0,u.qq)({type:String,json:{write:!0}})],vt.prototype,"where",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],vt.prototype,"maxCount",void 0),vt=(0,r._)([(0,c.c)("esri.rest.support.FindImagesParameters")],vt);const _t=vt;var Rt;let bt=Rt=class extends x.am{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Rt((0,q.ct)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,u.qq)({type:[String],json:{name:"angleName",write:!0}})],bt.prototype,"angleNames",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],bt.prototype,"point",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{write:!0}})],bt.prototype,"spatialReference",void 0),(0,r._)([(0,u.qq)({type:R.Ab,json:{write:!0}})],bt.prototype,"rasterId",void 0),bt=Rt=(0,r._)([(0,c.c)("esri.rest.support.ImageAngleParameters")],bt);const St=bt,Ft=new(i(14628).O)({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 It=class extends x.am{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var xt;(0,r._)([(0,u.qq)()],It.prototype,"type",void 0),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{read:Ft.read,write:Ft.write}})],It.prototype,"measureOperation",void 0),(0,r._)([(0,u.qq)({type:Q.c,json:{write:!0}})],It.prototype,"mosaicRule",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],It.prototype,"pixelSize",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],It.prototype,"raster",void 0),It=(0,r._)([(0,c.c)("esri.rest.support.BaseImageMeasureParameters")],It);let jt=xt=class extends It{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new xt((0,q.ct)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"fromGeometry",read:!0,write:!0}})],jt.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],jt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{write:Ft.write}})],jt.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],jt.prototype,"is3D",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],jt.prototype,"linearUnit",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.iy.read,write:qe.iy.write}})],jt.prototype,"areaUnit",void 0),jt=xt=(0,r._)([(0,c.c)("esri.rest.support.ImageAreaParameters")],jt);const Tt=jt;let Dt=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.outSpatialReference=null}};(0,r._)([(0,u.qq)({type:ge.c,json:{name:"outSR",write:!0}})],Dt.prototype,"outSpatialReference",void 0),Dt=(0,r._)([(0,c.c)("esri.rest.support.ImageBoundaryParameters")],Dt);const Ot=Dt;var Nt;let Pt=Nt=class extends It{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new Nt((0,q.ct)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],Pt.prototype,"fromGeometry",void 0),(0,r._)([(0,m.G)("fromGeometry")],Pt.prototype,"writeFromGeometry",null),(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],Pt.prototype,"toGeometry",void 0),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{write:Ft.write}})],Pt.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],Pt.prototype,"is3D",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],Pt.prototype,"linearUnit",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.aq.read,write:qe.aq.write}})],Pt.prototype,"angularUnit",void 0),Pt=Nt=(0,r._)([(0,c.c)("esri.rest.support.ImageDistanceParameters")],Pt);const Ct=Pt;var Mt=i(25228),At=i(9968),Vt=i(6152);let Gt=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4,write:!0}})],Gt.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],Gt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Gt.prototype,"objectIds",void 0),(0,r._)([(0,At.G)(Vt.K,{ignoreUnknown:!1,name:"spatialRel"})],Gt.prototype,"spatialRelationship",void 0),(0,r._)([(0,u.qq)({type:Mt.c,json:{name:"time",write:!0}})],Gt.prototype,"timeExtent",void 0),(0,r._)([(0,u.qq)({type:String,json:{write:!0}})],Gt.prototype,"where",void 0),Gt=(0,r._)([(0,c.c)("esri.rest.support.ImageGPSInfoParameters")],Gt);const Et=Gt;var Jt;let Ut=Jt=class extends It{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new Jt((0,q.ct)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0}})],Ut.prototype,"fromGeometry",void 0),(0,r._)([(0,m.G)("fromGeometry")],Ut.prototype,"writeFromGeometry",null),(0,r._)([(0,u.qq)({type:pe.c,json:{read:!0,write:!0}})],Ut.prototype,"toGeometry",void 0),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{write:Ft.write}})],Ut.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],Ut.prototype,"operationType",void 0),(0,r._)([(0,u.qq)({type:String,json:{read:qe.gz.read,write:qe.gz.write}})],Ut.prototype,"linearUnit",void 0),Ut=Jt=(0,r._)([(0,c.c)("esri.rest.support.ImageHeightParameters")],Ut);const zt=Ut;var Lt,Bt=i(65680);let Ht=Lt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.c.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}get renderingRule(){return(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,w.y2)(p.c.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,w.y2)(p.c.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=j.c.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new Lt((0,q.ct)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.qq)({json:{write:!0}})],Ht.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],Ht.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:Q.c,json:{write:!0}})],Ht.prototype,"mosaicRule",null),(0,r._)([(0,m.G)("mosaicRule")],Ht.prototype,"writeMosaicRule",null),(0,r._)([(0,u.qq)({type:j.c})],Ht.prototype,"renderingRule",null),(0,r._)([(0,u.qq)({type:[j.c]})],Ht.prototype,"renderingRules",null),(0,r._)([(0,u.qq)({type:j.c,json:{write:!0,name:"renderingRule"}})],Ht.prototype,"rasterFunction",null),(0,r._)([(0,m.G)("rasterFunction")],Ht.prototype,"writeRasterFunction",null),(0,r._)([(0,u.qq)({type:[j.c],json:{write:!0,name:"renderingRules"}})],Ht.prototype,"rasterFunctions",void 0),(0,r._)([(0,m.G)("rasterFunctions")],Ht.prototype,"writeRasterFunctions",null),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],Ht.prototype,"pixelSize",void 0),(0,r._)([(0,m.G)("pixelSize")],Ht.prototype,"writePixelSize",null),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"returnGeometry",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"returnCatalogItems",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"returnPixelValues",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],Ht.prototype,"maxItemCount",void 0),(0,r._)([(0,u.qq)({type:Mt.c,json:{write:{target:"time"}}})],Ht.prototype,"timeExtent",void 0),(0,r._)([(0,m.G)("timeExtent")],Ht.prototype,"writeTimeExtent",null),(0,r._)([(0,u.qq)({json:{write:!0}})],Ht.prototype,"raster",void 0),(0,r._)([(0,u.qq)({json:{write:!0}})],Ht.prototype,"viewId",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],Ht.prototype,"processAsMultidimensional",void 0),Ht=Lt=(0,r._)([(0,c.c)("esri.rest.support.ImageIdentifyParameters")],Ht);const Wt=Ht;var Qt;let kt=Qt=class extends x.am{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new Qt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,u.qq)({type:[pe.c],json:{write:!0}})],kt.prototype,"geometries",void 0),(0,r._)([(0,m.G)("geometries")],kt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:R.Ab,json:{write:!0}})],kt.prototype,"rasterId",void 0),kt=Qt=(0,r._)([(0,c.c)("esri.rest.support.ImagePixelLocationParameters")],kt);const Zt=kt;var $t;let Yt=$t=class extends It{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new $t((0,q.ct)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"fromGeometry",read:et.h4}})],Yt.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],Yt.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({type:Ft.apiValues,json:{read:Ft.read,write:Ft.write}})],Yt.prototype,"measureOperation",null),(0,r._)([(0,u.qq)({json:{read:!0}})],Yt.prototype,"is3D",void 0),Yt=$t=(0,r._)([(0,c.c)("esri.rest.support.ImagePointParameters")],Yt);const Xt=Yt;var Kt;let ei=Kt=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new ht.c({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new Kt((0,q.ct)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4}})],ei.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],ei.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)()],ei.prototype,"locations",null),(0,r._)([(0,u.qq)({type:String,json:{type:k.gh.jsonValues,read:k.gh.read,write:k.gh.write}})],ei.prototype,"interpolation",void 0),(0,r._)([(0,u.qq)({type:Q.c,json:{write:!0}})],ei.prototype,"mosaicRule",void 0),(0,r._)([(0,u.qq)({type:[String],json:{write:!0}})],ei.prototype,"outFields",void 0),(0,r._)([(0,u.qq)({type:pe.c,json:{write:!0}})],ei.prototype,"pixelSize",void 0),(0,r._)([(0,u.qq)({type:String,json:{write:!0}})],ei.prototype,"raster",void 0),(0,r._)([(0,u.qq)({type:Boolean,json:{write:!0}})],ei.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],ei.prototype,"sampleDistance",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],ei.prototype,"sampleCount",void 0),(0,r._)([(0,u.qq)({type:Number,json:{write:!0}})],ei.prototype,"sliceId",void 0),(0,r._)([(0,u.qq)({type:Mt.c,json:{read:{source:"time"},write:{target:"time"}}})],ei.prototype,"timeExtent",void 0),ei=Kt=(0,r._)([(0,c.c)("esri.rest.support.ImageSampleParameters")],ei);const ti=ei;let ii=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,et.Ce)(e[0]),geometries:e.map((e=>({...e.toJSON(),spatialReference:void 0})))}:null}};(0,r._)([(0,u.qq)({types:[h.Su]})],ii.prototype,"geometries",void 0),(0,r._)([(0,m.G)("geometries")],ii.prototype,"writeGeometries",null),(0,r._)([(0,u.qq)({type:[R.Ab],json:{write:!0}})],ii.prototype,"rasterIds",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{name:"outSR",write:!0}})],ii.prototype,"outSpatialReference",void 0),ii=(0,r._)([(0,c.c)("esri.rest.support.ImageToMapMultirayParameters")],ii);const ri=ii;let si=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4,write:!0}})],si.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],si.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],si.prototype,"rasterId",void 0),(0,r._)([(0,u.qq)({type:ge.c,json:{name:"outSR",write:!0}})],si.prototype,"outSpatialReference",void 0),(0,r._)([(0,u.qq)({json:{name:"options.DOff",write:!0}})],si.prototype,"depthOffset",void 0),(0,r._)([(0,u.qq)({json:{name:"options.Adjust",write:!0}})],si.prototype,"adjust",void 0),si=(0,r._)([(0,c.c)("esri.rest.support.ImageToMapParameters")],si);const ni=si;let oi=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.referenceUri=null}};(0,r._)([(0,u.qq)({type:String,json:{name:"uri",write:!0}})],oi.prototype,"referenceUri",void 0),oi=(0,r._)([(0,c.c)("esri.rest.support.ImageUrlParameters")],oi);const ai=oi;let li=class extends((0,n.q)(x.am)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]=JSON.stringify(e))}};(0,r._)([(0,u.qq)({types:h.Su,json:{read:et.h4,write:!0}})],li.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],li.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],li.prototype,"rasterId",void 0),(0,r._)([(0,u.qq)({json:{name:"options.VisibleOnly",write:!0}})],li.prototype,"visibleOnly",void 0),li=(0,r._)([(0,c.c)("esri.rest.support.MapToImageParameters")],li);const ui=li;var pi;let ci=pi=class extends x.am{constructor(){super(...arguments),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,et.Ce)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,q.ct)({geometry:this.geometry,rasterId:this.rasterId});return new pi(e)}};(0,r._)([(0,u.qq)({types:h.Su,json:{name:"fromGeometry",read:et.h4,write:!0}})],ci.prototype,"geometry",void 0),(0,r._)([(0,m.G)("geometry")],ci.prototype,"writeGeometry",null),(0,r._)([(0,u.qq)({json:{write:!0}})],ci.prototype,"rasterId",void 0),ci=pi=(0,r._)([(0,c.c)("esri.rest.support.MeasureFromImageParameters")],ci);const mi=ci;var di=i(46320);const hi=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),yi=(0,u.Mu)(R.Oe,{min:0,max:255}),gi=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new Z({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?Q.c.fromJSON(t):null}get fieldsIndex(){return this.fields?new Y.c(this.fields):null}set format(e){e&&hi.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=Q.c.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?Q.c.fromJSON(i):this._isMosaicRuleSupported(t)?Q.c.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const s=this.definitionExpression;r?s&&s!==r.where&&(r=r.clone(),r.where=s):s&&(r=new Q.c({where:s})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=yi(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i?.name}return e}get parsedUrl(){return(0,_.as)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,g.gH)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),V(s)||p.c.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix,t=new $.c({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new $.c({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new $.c({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?(0,q.ct)(this.fields):[];s.push(i),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(r),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new $.c({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new $.c({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new $.c({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:n}=this.rasterInfo??{};if(null!=n){const t=n.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const i=(0,q.ct)(t);return i.name=e+t.name,i}));s=s.concat(t)}return s}get renderingRule(){return(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this.rasterFunction}set renderingRule(e){(0,w.y2)(p.c.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=j.c.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?j.c.fromJSON({rasterFunctionDefinition:t.renderingRule}):j.c.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?ge.c.fromJSON(i):null}readPixelType(e){return k.K0.fromJSON(e)||e}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=k.K0.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&r&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(r.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=r.toJSON());const l=await a.symbolize({bandIds:o,...e},t);i={extent:e.extent,pixelBlock:l}}else i={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return i}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new o.c("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,R.uY)(St,e).clone(),async function(e,t,i){const r=t.toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=ct(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(r.spatialReference=mt(t.spatialReference));const s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new ge.c({wkid:0,imageCoordinateSystem:a.spatialReference}):ge.c.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new we(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o.c("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,R.uY)(Zt,e).clone(),async function(e,t,i){const r=t.toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=ct(s[e].spatialReference));const n=(0,ue.UX)(e),o=(0,ue.OW)({...n.query,f:"json",...r}),a=(0,ue.sR)(o,i),{data:l}=await(0,f.c)(`${n.path}/computePixelLocation`,a);return He.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o.c("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,R.uY)(Bt.c,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await ot(e,t,i),s=(0,ue.UX)(e),{data:n}=await(0,f.c)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new o.c("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,R.uY)(Bt.c,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await ot(e,t,i),s=(0,ue.UX)(e),{data:n}=await(0,f.c)(`${s.path}/computeStatisticsHistograms`,r),{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 i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new o.c("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,R.uY)(zt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.fromGeometry,t.toGeometry],i);return Je.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new o.c("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,R.uY)(Tt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.geometry],i);return Ie.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new o.c("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,R.uY)(Ct,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.fromGeometry,t.toGeometry],i);return Ne.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new o.c("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,R.uY)(Xt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await lt(e,t,[t.geometry],i);return Qe.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.c("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new o.c("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return e=(0,R.uY)(mi,e).clone(),async function(e,t,i){const r=await ut(e,t,i);return st.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.c("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new o.c("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return e=(0,R.uY)(mi,e).clone(),async function(e,t,i){const r=await ut(e,t,i);return it.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async fetchImage(e,t,r,s={}){if(null==e||null==t||null==r)throw new o.c("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:s.signal});e&&(this.rasterInfo=e)}const n=this.getExportImageServiceParameters(e,t,r,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,s.returnImageBitmap?{imageBitmap:await(0,X.E)(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(ee.c.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ee.c({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!s.requestAsImageElement&&!this.pixelFilter,l=a&&!!s.returnImageBitmap,u={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:a,returnImageBitmap:l,signal:s.signal};return this._requestArrayBuffer(u)}fetchKeyProperties(e){return(0,f.c)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new o.c("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.c)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>Ue.c.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ue.UX)(e),s=(0,ue.OW)({...r?.query,f:"json"}),n=(0,ue.sR)(s,i),o=`${r?.path}/${t}/info`,a=(0,f.c)(`${o}`,n),l=(0,f.c)(`${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=xe.c.fromJSON(p.extent),h=Math.ceil(d.width/p.pixelSizeX-.1),y=Math.ceil(d.height/p.pixelSizeY-.1),g=d.spatialReference,w=new pe.c({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),q=p.histograms?.length?p.histograms:null,v=new qt.c({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new te.c({width:h,height:y,bandCount:p.bandCount,extent:d,spatialReference:g,pixelSize:w,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:q,keyProperties:c,storageInfo:v})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,f.c)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await(0,f.c)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n||!n.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,f.c)(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,S.um)(a),outSR:"0:"+e},u=(0,f.c)(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 h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,S.um)(a),outSR:"0:"+e},y=(0,f.c)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,y]);let w=g[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const q=xe.c.fromJSON(g[1]?.geometries?.[0]);q&&(q.spatialReference=new ge.c({wkid:0,imageCoordinateSystem:s}));const v=g[2].geometries?g[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],_=v.length;if(_<3)return{ics:s,icsToPixelTransform:w,icsExtent:q,northDirection:null};let R=0,b=0,F=0,I=0;for(let e=0;e<_;e++)R+=v[e].x,b+=v[e].y,F+=v[e].x*v[e].x,I+=v[e].x*v[e].y;const x=(_*I-R*b)/(_*F-R*R);let j=0;const T=v[4].x>v[0].x,D=v[4].y>v[0].y;return x===1/0?j=D?90:270:0===x?j=T?0:180:x>0?j=T?180*Math.atan(x)/Math.PI:180*Math.atan(x)/Math.PI+180:x<0&&(j=D?180+180*Math.atan(x)/Math.PI:360+180*Math.atan(x)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:q,northDirection:j}}async generateRasterInfo(e,t){if(e=(0,R.uY)(j.c,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const r=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),i=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return i?i.join("/"):null}(e);if(!r)throw new o.c("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[r])return this._functionRasterInfos[r];const s={...t,query:this._getQueryParams()},n=(0,wt.cV)(i(this.parsedUrl),e,s);this._functionRasterInfos[r]=n;try{return await n}catch(e){throw this._functionRasterInfos[r]=null,e}}getExportImageServiceParameters(e,t,r,s){const n=mt((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;o.bandIds=void 0}else o.bandIds=a?.join(",");l instanceof Array&&l.length>0&&(o.noData=l.join(","));const m=this._processMultidimensionalIntersection(null,s,this.exportImageServiceParameters.mosaicRule);if(m.isOutSide)return null;o.mosaicRule=null!=m.mosaicRule?JSON.stringify(m.mosaicRule):null,s=m.timeExtent,o.renderingRule=this._getRenderingRuleString(j.c.fromJSON(u));const d={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?d.time=""+e:null==e&&null==t||(d.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+r,...o,...d}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new o.c("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,R.uY)(ti,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=t.toJSON();nt(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const s=await(0,le.WW)(t.geometry),n=s?.[0];null!=n&&(r.geometry=pt(n));const o=(0,ue.UX)(e),a=(0,ue.OW)({...o.query,f:"json",...r}),l=(0,ue.sR)(a,i),{data:u}=await(0,f.c)(`${o.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return Ye.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o.c("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,R.uY)(Wt,e).clone(),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=je.c.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new o.c("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),r&&null==e.raster&&(e.raster=r),at(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new o.c("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return e=(0,R.uY)(ni,e),async function(e,t,i){const r=t.toJSON();t.geometry.spatialReference.imageCoordinateSystem&&(r.geometry=pt(t.geometry)),t.depthOffset&&t.adjust||delete r.options;const s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/imageToMap`,o);return(0,et.h4)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new o.c("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return e=(0,R.uY)(ri,e),async function(e,t,i){const r=t.toJSON();t.rasterIds?.length&&(r.rasterIds=t.rasterIds.join(","));const s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/imageToMapMultiray`,o);return(0,et.h4)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new o.c("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return e=(0,R.uY)(ui,e),async function(e,t,i){const r=t.toJSON(),s=await(0,le.WW)(t.geometry),n=s?.[0];null!=n&&(r.geometry=pt(n)),t.visibleOnly||delete r.options;const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=mt(o));const a=(0,ue.UX)(e),l=(0,ue.OW)({...a.query,f:"json",...r}),u=(0,ue.sR)(l,i),{data:p}=await(0,f.c)(`${a.path}/mapToImage`,u);return(0,et.h4)(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new o.c("imagery-layer:find-images","findImages operation is not supported on the input image service");return e=(0,R.uY)(_t,e),async function(e,t,i){const r=t.toJSON(),s=await(0,le.WW)([t.fromGeometry,t.toGeometry]);null!=s[0]&&(r.fromGeometry=pt(s[0]),s[0].spatialReference&&(r.inSR=mt(s[0].spatialReference))),null!=s[1]&&(r.toGeometry=pt(s[1])),t.objectIds?.length&&(r.objectIds=r.objectIds.join(","));const n=(0,ue.UX)(e),o=(0,ue.OW)({...n.query,f:"json",...r}),a=(0,ue.sR)(o,i),{data:l}=await(0,f.c)(`${n.path}/find`,a);return ye.fromJSON(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new o.c("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return e=(0,R.uY)(ai,e),async function(e,t,i){const r=t.toJSON(),s=(0,ue.UX)(e),n=(0,ue.OW)({...s.query,f:"json",...r}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(`${s.path}/getImageUrl`,o);return Ke.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){const e=new yt.c;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new o.c("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=(0,R.uY)(Ot,e??{outSpatialReference:this.spatialReference}).clone(),async function(e,t,i){const r=(0,ue.UX)(e),s=t.toJSON();t.outSpatialReference&&(s.outSR=mt(t.outSpatialReference));const n=(0,ue.OW)({...r.query,f:"json",...s}),o=(0,ue.sR)(n,i),{data:a}=await(0,f.c)(r.path+"/queryBoundary",o);return De.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,dt.c)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,ft.g)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new o.c("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=(0,R.uY)(Et,e??{outSpatialReference:this.spatialReference}).clone(),async function(e,t,i){const r=t.toJSON();nt(r),r.objectIds?.length&&(r.objectIds=r.objectIds.join(",")),r.geometry||r.objectIds||r.time||r.where||(r.where="1=1");const s=await(0,le.WW)(t.geometry),n=s?.[0];null!=n&&(r.geometry=pt(n));const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=mt(o));const a=(0,ue.UX)(e),l=(0,ue.OW)({...a.query,f:"json",...r}),u=(0,ue.sR)(l,i),{data:p}=await(0,f.c)(`${a.path}/queryGPSInfo`,u);return Ge.fromJSON(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,gt._)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o.c("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some((e=>!e.toLowerCase().includes(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(p)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new j.c({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some((e=>e.functionName===i.functionName))&&(l.push(i),u.push(i.functionName))}const m=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let h=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:i}=(0,re.W8)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new o.c("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(h=i.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=je.c.fromExtent(g));const f=this._getQueryParams({geometry:g,timeExtent:h,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:a,returnGeometry:m,raster:this.raster,maxItemCount:s?1:null});delete f.f;const w=new Wt(f);try{await this._generateRasterInfo(this.rasterFunction);const i=await at(this.url,w,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,o=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!a||m||!i?.catalogItems?.features.length||!n&&o)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s});const l=this.objectIdField||"ObjectId",p=i.catalogItems?.features??[],c=p.map((e=>e.attributes?.[l])),d=new yt.c({objectIds:c,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),h=await this.queryRasters(d);return h?.features?.length&&h.features.forEach((t=>{p.forEach((i=>{i.attributes[l]===t.attributes[l]&&(i.geometry=new je.c(t.geometry),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s})}catch{throw new o.c("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,f.c)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,f.c)(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}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,di.__)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,re.aQ)(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,wt.Rk)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,wt.sJ)(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.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),p.c.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,v.aE)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.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 I.c({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 o.c("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,R.uY)(yt.c,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new ie.c;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,oe.RC)(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.c)(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 o.c("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&i.bandCount>=3){const e=(0,oe.oh)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,oe.i)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,oe.uw)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=i):this.symbolizer=new ae.c({rendererJSON:t,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,se.Y)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await(0,f.c)(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.c)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,X.E)(o,r,n),params:t}:{imageOrCanvasElement:o,params:t}}const a=this._initJobHandler(),l=(0,f.c)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),u=(await Promise.all([l,a]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,se.o)(u)),!c)throw new o.c("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const m={signal:n},d="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,se.Y)(u,{useCanvas:!0,...t},m):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},m);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,re.Qz)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new Q.c;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords: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 i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!l&&!c){const e={};e[p]=0,u=[i],l=[new y.c(this.fullExtent,null,e)]}if(!l)return[];let d,h,g;this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);for(let e=0;e<l.length;e++){if(d=l[e],null!=i){if(h=u[e],g=this.rasterFunction&&a&&a.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?a[r.indexOf(this.rasterFunction.functionName)]:i,"nodata"===h.toLowerCase()&&!s)continue;const t="Raster.ItemPixelValue",n="Raster.ServicePixelValue";d.attributes[t]=h,d.attributes[n]=g,this._updateFeatureWithMagDirValues(d,h);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?h:i:g;this.rasterFunction||(l=o?h:i),this._updateFeatureWithRasterAttributeTableValues(d,l)}if(d.sourceLayer=d.layer=this,n&&this._updateFeatureWithDomainValues(d),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];d.attributes[t]=a[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=(0,re.W8)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,re.W8)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map((e=>e.name)).find((e=>"value"===e.toLowerCase()));if(!n)return;const o=r.filter((e=>e.attributes[n]===(null!=t?parseInt(t,10):null)));o&&o[0]&&s.forEach((t=>{const i=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=o[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),s=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new ee.c({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new xe.c(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,ne.KO)([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach((e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&e instanceof Bt.c&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic"),m=this._isMosaicDataset(e)&&t.includes("catalog"),d=t.includes("download");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsImageToMap:i>=11.2&&m,supportsImageToMapMultiray:i>=11.2&&m,supportsMapToImage:i>=11.2&&m,supportsFindImages:i>=11.2&&m,supportsGetImageUrl:i>=11.2&&d,supportsMeasure:u,supportsMeasureFromImage:i>=11.2,supportsDownload:d,supportsQuery:m&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&n,supportsProject:i>=10.3&&n,supportsComputeStatisticsHistograms:i>=10.4&&n,supportsQueryBoundary:i>=10.6&&n,supportsCalculateVolume:i>=10.7&&o,supportsComputePixelLocation:i>=10.7&&m,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&m,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function i(e){return e?.path??""}return(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,b.E)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,u.qq)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,u.qq)({type:[R.Ab],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,b.E)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,u.qq)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,b.E)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,u.qq)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,m.G)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.qq)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,m.G)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.qq)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,u.qq)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,b.E)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,u.qq)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,u.qq)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,u.qq)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,u.qq)({readOnly:!0,type:[$.c]})],t.prototype,"fields",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,u.qq)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,b.E)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,u.qq)({type:xe.c})],t.prototype,"fullExtent",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,u.qq)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,u.qq)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,u.qq)({type:String,json:{type:k.gh.jsonValues,read:k.gh.read,write:k.gh.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,u.qq)()],t.prototype,"minScale",void 0),(0,r._)([(0,b.E)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,u.qq)()],t.prototype,"maxScale",void 0),(0,r._)([(0,b.E)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,u.qq)({type:Q.c})],t.prototype,"mosaicRule",null),(0,r._)([(0,b.E)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,m.G)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,u.qq)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,u.qq)({type:K.c,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,u.qq)({json:{type:R.Ab}})],t.prototype,"noData",void 0),(0,r._)([(0,m.G)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,u.qq)({type:String,json:{type:k.ec.jsonValues,read:k.ec.read,write:k.ec.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,u.qq)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,b.E)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,r._)([(0,u.qq)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,u.qq)({})],t.prototype,"types",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,u.qq)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,u.qq)()],t.prototype,"raster",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,b.E)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,u.qq)()],t.prototype,"viewId",void 0),(0,r._)([(0,u.qq)({types:g._0,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:g.qk,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,r._)([(0,b.E)("renderer")],t.prototype,"readRenderer",null),(0,r._)([(0,m.G)("renderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,u.qq)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,r._)([(0,u.qq)(F.o9)],t.prototype,"opacity",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,u.qq)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,u.qq)({type:j.c})],t.prototype,"renderingRule",null),(0,r._)([(0,u.qq)({type:j.c,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,r._)([(0,b.E)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,r._)([(0,u.qq)({readOnly:!0,type:ge.c})],t.prototype,"spatialReference",void 0),(0,r._)([(0,b.E)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,u.qq)({json:{type:k.K0.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,b.E)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,m.G)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,u.qq)({constructOnly:!0,type:te.c})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,u.qq)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,u.qq)(F.qW)],t.prototype,"url",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,b.E)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,c.c)("esri.layers.mixins.ArcGISImageService")],t),t};var fi=i(16660),wi=i(25216),qi=i(28584),vi=i(66576),_i=i(98768),Ri=i(26916),bi=i(3116),Si=i(19560),Fi=i(98984),Ii=i(65548),xi=i(8616);let ji=class extends((0,wi.W)((0,Si.u)((0,bi.I)((0,vi.Y)((0,_i.K)(gi((0,Ri.G)((0,qi.G)((0,fi.u)((0,a.U)((0,n.q)(d.c)))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.Cu)((async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(7448).then(i.bind(i,67448));switch(e){case xi.U.SAVE:return s(this,t);case xi.U.SAVE_AS:return n(this,r,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l.CE).then((()=>this._fetchService(t)))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const t=this.rasterFields,i=this.title,r=new Set;let s=!1,n=!1;this.capabilities&&(s=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,n="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;s&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||r.add(e.name)}n&&r.add("raster.magnitude").add("raster.direction");const a=(0,Ii.Ap)({fields:t,title:i},{...e,visibleFieldNames:r});return a?.fieldInfos&&this.rasterInfo?.pixelType.startsWith("f")&&a.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),a}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(xi.U.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(xi.U.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,Fi.o)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.c("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,r._)([(0,u.qq)(F.Uj)],ji.prototype,"legendEnabled",null),(0,r._)([(0,u.qq)({type:["show","hide"]})],ji.prototype,"listMode",null),(0,r._)([(0,u.qq)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ji.prototype,"isReference",void 0),(0,r._)([(0,u.qq)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],ji.prototype,"operationalLayerType",void 0),(0,r._)([(0,m.G)("web-map","operationalLayerType")],ji.prototype,"writeOperationalLayerType",null),(0,r._)([(0,u.qq)(F.Ou)],ji.prototype,"popupEnabled",void 0),(0,r._)([(0,u.qq)({type:s.c,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],ji.prototype,"popupTemplate",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],ji.prototype,"defaultPopupTemplate",null),(0,r._)([(0,u.qq)({readOnly:!0,json:{read:!1}})],ji.prototype,"type",void 0),(0,r._)([(0,u.qq)({readOnly:!0})],ji.prototype,"_isPreviewLayer",null),ji=(0,r._)([(0,c.c)("esri.layers.ImageryLayer")],ji);const Ti=ji},34888:(e,t,i)=>{i.d(t,{ED:()=>s,_M:()=>r});class r{constructor(e=null,t={},i,r){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new r(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new r(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function s(e){return!!e.geometry?.coords?.length}},90412:(e,t,i)=>{i.d(t,{c:()=>r});class r{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new r;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},16424:(e,t,i)=>{i.d(t,{c:()=>m});var r=i(20744),s=i(40504),n=i(66360),o=i(86916),a=i(75824),l=i(564),u=i(28484),p=i(39452);const c=new Map;class m{static fromJSON(e){return new m(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new m(e.fields??[],g(e))}static fromLayerJSON(e){return new m(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,r=h(t);if(t&&r){const s=d(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(r,e),i.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.gp)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.iW)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.Mz)(e)||(0,l.w1)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.Mz)(e)||(0,l.w1)(e)||e.nullable||void 0!==(0,l.gB)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(d(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.c.getLogger("esri.layers.support.FieldsIndex").error(new r.c("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.Gw):y.has(t.type)?u.OI:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.OI?a.qG.instance:t===u.Gw?p.Kq.utcInstance:(0,o.wJ)(c,t,(()=>p._C.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.eM)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.wt)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function d(e){return e.trim().toLowerCase()}function h(e){return(0,l.gP)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:s}=e,n=(r?"startField"in r?r.startField:r.startTimeField:"")??"",o=(r?"endField"in r?r.endField:r.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.Mt)(e.dateFieldsTimeReference):null,l=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,u.Mt)(s.dateFieldsTimeReference):a??u.Gw:null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.timeReference?(0,u.Mt)(r.timeReference):a:null,c=new Map([[d(s?.creationDateField??""),l],[d(s?.editDateField??""),l],[d(n),p],[d(o),p]]);for(const{name:r,type:s}of e.fields)if(y.has(s))t.set(r,u.OI);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(r,null);else if(i)t.set(r,u.OI);else{const e=c.get(d(r??""))??a;t.set(r,e)}return t}},80428:(e,t,i)=>{i.d(t,{E:()=>n,G:()=>o});var r=i(20744),s=i(10860);async function n(e,t,i){let n;try{n=await createImageBitmap(e)}catch(e){throw new r.c("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.wp)(i),n}async function o(e,t,i,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.c("request:server",`Unable to load tile ${t}/${i}/${n}`,{error:e,level:t,row:i,col:n})}return(0,s.wp)(o),a}},98984:(e,t,i)=>{i.d(t,{o:()=>n});var r=i(48212);const s=[];function n(e,t){if((0,r.Wq)(e.url??""))return!0;const{wkid:i}=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(i))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}]),s.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),s.push([10.61,()=>new Set([102497])]),s.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}])},46788:(e,t,i)=>{i.d(t,{_:()=>o});var r=i(21980),s=i(32848),n=i(95776);async function o(e,t,i){const o=(0,r.UX)(e);return(0,s.WE)(o,n.c.from(t),{...i}).then((e=>e.data.count))}},819:(e,t,i)=>{i.d(t,{g:()=>o});var r=i(21980),s=i(32848),n=i(95776);async function o(e,t,i){const o=(0,r.UX)(e);return(0,s.Qn)(o,n.c.from(t),{...i}).then((e=>e.data.objectIds))}},99944:(e,t,i)=>{i.d(t,{E:()=>l,c:()=>a});var r=i(21980),s=i(32848),n=i(59500),o=i(95776);async function a(e,t,i){const r=await l(e,t,i);return n.c.fromJSON(r)}async function l(e,t,i){const n=(0,r.UX)(e),a={...i},l=o.c.from(t),{data:u}=await(0,s.EL)(n,l,l.sourceSpatialReference,a);return u}},21012:(e,t,i)=>{i.d(t,{M:()=>s});var r=i(37924);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.O)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},31864:(e,t,i)=>{i.d(t,{c:()=>c});var r,s=i(41948),n=i(40504),o=i(1580),a=i(53368),l=(i(72052),i(9456),i(12552));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=r=class extends n.am{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const s=t.find((e=>e.name===i));return s?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r?.value||null}({tagName:r,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,s._)([(0,o.qq)({type:String})],p.prototype,"contentType",void 0),(0,s._)([(0,o.qq)()],p.prototype,"exifInfo",void 0),(0,s._)([(0,o.qq)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,s._)([(0,o.qq)({type:a.Ab})],p.prototype,"id",void 0),(0,s._)([(0,o.qq)({type:String})],p.prototype,"globalId",void 0),(0,s._)([(0,o.qq)({type:String})],p.prototype,"keywords",void 0),(0,s._)([(0,o.qq)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,o.qq)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,s._)([(0,o.qq)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,s._)([(0,o.qq)({type:a.Ab})],p.prototype,"size",void 0),(0,s._)([(0,o.qq)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,s._)([(0,l.c)("esri.layers.support.AttachmentInfo")],p);const c=p},19212:(e,t,i)=>{i.d(t,{c:()=>m});var r,s=i(41948),n=i(40504),o=i(62088),a=i(1580),l=i(53368),u=i(12552),p=i(18996);let c=r=class extends n.am{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new r((0,o.ct)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,s._)([(0,p.G)("start"),(0,p.G)("num")],c.prototype,"writeStart",null),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=r=(0,s._)([(0,u.c)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.ey)(c);const m=c},18648:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,s=i(41948),n=(i(60708),i(40504)),o=i(62088),a=i(1580),l=i(53368),u=i(12552),p=i(18996),c=i(88204),m=i(56156);let d=r=class extends n.am{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new r((0,o.ct)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.qq)({type:Boolean,json:{write:!0}})],d.prototype,"cacheHint",void 0),(0,s._)([(0,a.qq)({type:c.U,json:{write:!0}})],d.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.qq)({type:String,json:{write:!0}})],d.prototype,"gdbVersion",void 0),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],d.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.qq)({type:Date})],d.prototype,"historicMoment",void 0),(0,s._)([(0,p.G)("historicMoment")],d.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],d.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],d.prototype,"objectIds",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],d.prototype,"orderByFields",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],d.prototype,"outFields",void 0),(0,s._)([(0,a.qq)({type:m.c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],d.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],d.prototype,"relationshipId",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultOffset"}}})],d.prototype,"start",void 0),(0,s._)([(0,p.G)("start"),(0,p.G)("num")],d.prototype,"writeStart",null),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],d.prototype,"num",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],d.prototype,"returnGeometry",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],d.prototype,"returnM",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],d.prototype,"returnZ",void 0),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],d.prototype,"where",void 0),d=r=(0,s._)([(0,u.c)("esri.rest.support.RelationshipQuery")],d),d.from=(0,l.ey)(d);const h=d},9770:(e,t,i)=>{i.d(t,{c:()=>R});var r,s=i(41948),n=i(60708),o=i(25228),a=i(14628),l=i(40504),u=i(62088),p=i(1580),c=i(53368),m=i(12552),d=i(18996),h=i(6704);i(9456),i(66360),i(72052);let y=r=class extends l.am{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new r({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=r=(0,s._)([(0,m.c)("esri.rest.support.TopFilter")],y);const g=y;var f,w=i(56156);const q=new a.O({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),v=new a.O({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let _=f=class extends l.am{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new f((0,u.ct)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,p.qq)({type:Boolean,json:{write:!0}})],_.prototype,"cacheHint",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],_.prototype,"distance",void 0),(0,s._)([(0,p.qq)({types:n.Su,json:{read:h.h4,write:!0}})],_.prototype,"geometry",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:!0}})],_.prototype,"geometryPrecision",void 0),(0,s._)([(0,p.qq)({type:Number,json:{write:!0}})],_.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,p.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],_.prototype,"num",void 0),(0,s._)([(0,p.qq)({json:{write:!0}})],_.prototype,"objectIds",void 0),(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],_.prototype,"orderByFields",void 0),(0,s._)([(0,p.qq)({type:[String],json:{write:!0}})],_.prototype,"outFields",void 0),(0,s._)([(0,p.qq)({type:w.c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],_.prototype,"outSpatialReference",void 0),(0,s._)([(0,p.qq)({type:String,json:{write:!0}})],_.prototype,"resultType",void 0),(0,s._)([(0,p.qq)({json:{write:!0}})],_.prototype,"returnGeometry",void 0),(0,s._)([(0,p.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnM",void 0),(0,s._)([(0,p.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnZ",void 0),(0,s._)([(0,p.qq)({type:Number,json:{read:{source:"resultOffset"}}})],_.prototype,"start",void 0),(0,s._)([(0,d.G)("start"),(0,d.G)("num")],_.prototype,"writeStart",null),(0,s._)([(0,p.qq)({type:String,json:{read:{source:"spatialRel",reader:q.read},write:{target:"spatialRel",writer:q.write}}})],_.prototype,"spatialRelationship",void 0),(0,s._)([(0,p.qq)({type:o.c,json:{write:!0}})],_.prototype,"timeExtent",void 0),(0,s._)([(0,p.qq)({type:g,json:{write:!0}})],_.prototype,"topFilter",void 0),(0,s._)([(0,p.qq)({type:String,json:{read:v.read,write:{writer:v.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],_.prototype,"units",void 0),(0,s._)([(0,p.qq)({type:String,json:{write:!0}})],_.prototype,"where",void 0),_=f=(0,s._)([(0,m.c)("esri.rest.support.TopFeaturesQuery")],_),_.from=(0,c.ey)(_);const R=_}}]);
|