1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[29114],{63592:function(e,t,i){i.d(t,{F$:function(){return a},G7:function(){return u},HG:function(){return m},Mm:function(){return p},Qi:function(){return c},YL:function(){return s},du:function(){return n},kk:function(){return o}});var r=i(10314);function s(e){return 32+e.length}let n=16;function a(e){if(!e)return 0;let t=p;for(let i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return m+8*e.length;let i=m;for(let r=0;r<t;r++)i+=l(e[r]);return i}(e);let t=p;for(let i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):p;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+(t?(0,r.fU)(t)?t.byteLength+c:Array.isArray(t)?m+t.length*n:0:0),0)}let p=32,m=16,c=145},49282:function(e,t,i){i.r(t),i.d(t,{default:function(){return t7}});var r,s,n,a,o,l,u,p,m=i(73322),c=i(52322),d=i(57864),h=i(21670),y=i(55387),g=i(4580),f=i(86652);i(95263);var b=i(58583);i(42082);var v=i(18301),w=i(87535),R=i(19660),_=i(27568),C=i(63895),S=i(93415),I=i(5057),x=i(57682),F=i(21955),T=i(58413),N=i(20352),D=i(47259),j=i(13603),P=i(93271),O=i(78532),Z=i(11770),M=i(72641),A=i(94931),V=i(20894),J=i(41344);let q={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"}
1,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 E=i(9832),G=i(4778),L=i(56433);let z=new Set(["u1","u2","u4","u8","s8","u16","s16"]),U={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)"},B=new Set(["raster-stretch","unique-value","class-breaks","raster-sh
1aded-relief","vector-field","raster-colormap"]);function Q(e){return B.has(e.type)}function k(e,t){if(!e||!t)return(0,I.d9)(e||t);let i=(0,I.d9)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){let e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),function e(t,i){for(let r in t)"raster"===r.toLowerCase()&&("RasterFunctionVariable"===t[r].type?(t[r]=i.rasterFunctionDefinition,t[r].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===t[r].type&&e(t[r].arguments,i))}(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(function e(t){let i=t?.Raster??t?.raster;return i&&"esri.layers.support.RasterFunction"===i.declaredClass?e(i.functionArguments):t}(i.functionArguments).Raster=t);return i}function H(e){let t=(0,I.d9)(q[e.functionName+"Function"]),i=e.functionArguments;for(let e in i)"raster"===e.toLowerCase()?(t.arguments[e]=H(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=function(e){let t=[],i=[];return e.forEach(e=>{t.push(e[0]),i.push((0,E.oI)([...e.slice(1),255]))}),{type:"RasterColormap",values:t,colors:i}}(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}let $={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function W(e,t){let i=z.has(t)?(0,J.rL)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function Y(e){if(null==e)return;let{fields:t}=e,i=t?.find(e=>e?.name&&"value"===e.name.toLowerCase());return i?.name}function X(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find(e=>"fill"===e.type)?.material?.color:e.symbol?.color}var K=i(51894),ee=i(9138);let et=class extends A.Z{constructor(){super(...arguments),this.layer=null,this.requestRawData=!1,this.compression=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,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 this.requestRawData||"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}get pixelType(){let{layer:e}=this;return e.pixelType!==e.serviceRasterInfo.pixelType?e.pixelType:void 0}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){let e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("pixelType"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){let e=this.layer,t=e.mosaicRule,i=e.definitionExpression;return t?i&&i!==t.where&&((t=t.clone()).where=i):i&&(t=new K.Z({where:i})),t}get rasterFunction(){var e;let t=this.layer,{rasterFunction:i}=t,r=t.pixelFilter,s=!t.format||t.format.includes("jpg")||t.format.includes("png");this.requestRawData||(i=this._addResampleRasterFunction(i));let n=t.multidimensionalSubset?.areaOfInterest;return n&&(e=i,i=k(new V.Z({functionName:"Clip",functionArguments:{ClippingGeometry:n.toJSON(),ClippingType:1}}),e)),this.requestRawData||!s||r||"vector-field"===t.renderer?.type||(i=this.combineRendererWithRenderingRule(i)),i}combineRendererWithRenderingRule(e){let t=this.layer,{rasterInfo:i,renderer:r}=t;
1return(e=e||t.rasterFunction,r&&Q(r))?k(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){let i=t.convertToRFT,r=new V.Z;r.functionName="Stretch";let s=$[G.v.toJSON(e.stretchType)],n={StretchType:s,Statistics:e.customStatistics?.map(e=>[e.min,e.max,e.avg??0,e.stddev??1]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(n.Min=e.outputMin),null!=e.outputMax&&(n.Max=e.outputMax),s===$.standardDeviation?(n.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType="u8"):s===$.percentClip?(n.MinPercent=e.minPercent,n.MaxPercent=e.maxPercent,r.outputPixelType="u8"):s===$.minMax?r.outputPixelType="u8":s===$.sigmoid&&(n.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=n,r.variableName="Raster",e.colorRamp){let s=e.colorRamp,n=new V.Z;if(i)n.functionArguments={ColorRamp:(0,E.pM)(s)};else{let i=(0,E.Uh)(s,!0);if(i)n.functionArguments={colorRampName:i};else if(t.convertColorRampToColormap&&("algorithmic"===s.type||"multipart"===s.type))n.functionArguments={Colormap:(0,E.Jw)(s)};else{let 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}}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new V.Z({rasterFunctionDefinition:H(n)}):n}return i?new V.Z({rasterFunctionDefinition:H(r)}):r}(e,t);case"class-breaks":return function(e,t){let i=[],r=[],s=[],n=[],{pixelType:a,rasterAttributeTable:o}=t,l=null==o?null:o.features,u=Y(o);if(u&&l&&Array.isArray(l)&&e.classBreakInfos){e.classBreakInfos.forEach((t,i)=>{let r;let s=t.symbol?.color;s?.a&&null!=t.minValue&&null!=t.maxValue&&l.forEach(a=>{null!=t.minValue&&null!=t.maxValue&&((r=a.attributes[e.field])>=t.minValue&&r<t.maxValue||i===e.classBreakInfos.length-1&&r>=t.minValue)&&n.push([a.attributes[u],s.r,s.g,s.b])})});let i=a?W(n,a):n,r=new V.Z;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new V.Z({rasterFunctionDefinition:H(r)}):r}e.classBreakInfos.forEach((e,t)=>{if(null==e.minValue||null==e.maxValue)return;let a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+1e-4):i.push(e.minValue+1e-4,e.maxValue+1e-4),r.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)});let p=a?W(n,a):n,m=new V.Z;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";let c=new V.Z;return c.functionName="Colormap",c.functionArguments={Colormap:p,Raster:m},t.convertToRFT?new V.Z({rasterFunctionDefinition:H(c)}):c}(e,t);case"unique-value":return function(e,t){let i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,a=Y(s),o=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l){if(n){if(a){let t=new Map;l.forEach(e=>{let i=e.value,r=X(e);null!=i&&r?.a&&t.set(String(i),r.toRgb())});let r=e.field;
1r&&n.forEach(({attributes:e})=>{let s=String(e[r]),n=e[a],l=t.get(s);l?i.push([n,...l]):o&&i.push([n,...o])})}}else for(let e=0;e<l.length;e++){let t=l[e],r=X(t),s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}}let u=r?W(i,r):i,p=new V.Z;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new V.Z({rasterFunctionDefinition:H(p)}):p}(e,t);case"raster-colormap":return function(e,t){let i=e.extractColormap();if(!i||0===i.length)return null;let{pixelType:r}=t,s=r?W(i,r):i,n=new V.Z;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new V.Z({rasterFunctionDefinition:H(n)}):n}(e,t);case"vector-field":return function(e,t){let i,r;let s=new V.Z;s.functionName="VectorFieldRenderer";let{dataType:n,bandNames:a}=t;if(a&&2===a.length){let e=a.map(e=>e.toLowerCase());i=e.indexOf("magnitude"),r=e.indexOf("direction")}-1!==i&&null!==i||(i=0,r=1);let o="arithmetic"===e.rotationType?1:2,l="flow-from"===e.flowRepresentation?0:1,u=e.visualVariables?e.visualVariables.find(e=>"Magnitude"===e.field):new L.Z,p={magnitudeBandID:i,directionBandID:r,isUVComponents:"vector-uv"===n,referenceSystem:o,massFlowAngleRepresentation:l,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:U[e.style.toLowerCase().replace("-","_")],minimumMagnitude:u.minDataValue,maximumMagnitude:u.maxDataValue,minimumSymbolSize:u.minSize,maximumSymbolSize:u.maxSize};s.functionArguments=p;let m=H(s);return t.convertToRFT?V.Z.fromJSON({rasterFunctionDefinition:m}):s}(e,t);case"raster-shaded-relief":return function(e,t){let 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 V.Z;let r=new V.Z;r.functionName="Hillshade";let s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,a={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(a.Azimuth=e.azimuth,a.Altitude=e.altitude),3===n&&(a.PSPower=e.pixelSizePower,a.PSZFactor=e.pixelSizeFactor),r.functionArguments=a,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?a.ColorRamp=(0,E.pM)(e.colorRamp):a.Colormap=(0,E.Jw)(e.colorRamp)),i?new V.Z({rasterFunctionDefinition:H(r)}):r}(e,t);case"flow":throw 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;let t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize,r=new V.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return k(r=e?.rasterFunctionDefinition?new V.Z({rasterFunctionDefinition:H(r)}):r,e)}};(0,m._)([(0,f.Cb)()],et.prototype,"layer",void 0),(0,m._)([(0,f.Cb)()],et.prototype,"requestRawData",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],et.prototype,"adjustAspectRatio",null),(0,m._)([(0,w.c)("adjustAspectRatio")],et.prototype,"writeAdjustAspectRatio",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],et.prototype,"bandIds",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],et.prototype,"compression",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],et.prototype,"compressionQuality",null),(0,m._)([(0,w.c)("compressionQuality")],et.prototype,"writeCompressionQuality",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],et.prototype,"compressionTolerance",null),(0,m._)([(0,w.c)("compressionTolerance")],et.prototype,"writeCompressionTolerance",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],et.prototype,"format",null),(0,m._)([(0,f.Cb)({type:String,json:{read:{reader:ee.cl.read},write:{writer:ee.cl.write}}})],et.prototype,"interpolation",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],et.prototype,"noData",null),(0,m._)([(0,f.Cb)({type:String,json:{read:{reader:ee.kQ.read},write:{writer:ee.kQ.write}}})],et.prototype,"noDataInterpretation",null),(0,m._)([(0,f.Cb)({type:ee.sM.apiValues,json:{read:ee.sM.read,write:ee.sM.write}})],et.prototype,"pixelType",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],et.prototype,"lercVersion",void 0),(0,m._)([(0,w.c)("lercVersion")],et.prototype,"writeLercVersion",null),(0,m._)([(0,f.Cb)({type:Number}
1)],et.prototype,"version",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],et.prototype,"mosaicRule",null),(0,m._)([(0,f.Cb)({json:{write:!0,name:"renderingRule"}})],et.prototype,"rasterFunction",null),et=(0,m._)([(0,v.j)("esri.layers.support.ExportImageServiceParameters")],et);var ei=i(31476),er=i(93),es=i(89433),en=i(56256),ea=i(28987),eo=i(36968),el=i(49517),eu=i(36792),ep=i(43215),em=i(34292),ec=i(25517),ed=i(68507),eh=i(9647),ey=i(91229),eg=i(93100),ef=i(33521),eb=i(79482);let ev=class extends d.Z.ClonableMixin(A.Z){constructor(){super(...arguments),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,m._)([(0,f.Cb)({type:eb.Z,json:{read:!0}})],ev.prototype,"fromGeometry",void 0),(0,m._)([(0,f.Cb)({type:eb.Z,json:{read:!0,write:!0}})],ev.prototype,"toGeometry",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],ev.prototype,"objectIds",void 0),(0,m._)([(0,f.Cb)({type:String,json:{write:!0}})],ev.prototype,"where",void 0),(0,m._)([(0,f.Cb)({type:Number,json:{write:!0}})],ev.prototype,"maxCount",void 0),ev=(0,m._)([(0,v.j)("esri.rest.support.FindImagesParameters")],ev);let ew=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,m._)([(0,f.Cb)({json:{write:!0}})],t.prototype,"make",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],t.prototype,"model",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],t.prototype,"focalLength",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],t.prototype,"pixelSize",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],t.prototype,"rows",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],t.prototype,"cols",void 0),t=(0,m._)([(0,v.j)("esri.rest.support.CameraInfoMixin")],t)},eR=class extends ew(A.Z){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,m._)([(0,f.Cb)({json:{write:!0}})],eR.prototype,"id",void 0),(0,m._)([(0,f.Cb)({json:{name:"uri",write:!0}})],eR.prototype,"referenceUri",void 0),(0,m._)([(0,f.Cb)({type:Date,json:{write:!0}})],eR.prototype,"acquisitionDate",void 0),(0,m._)([(0,w.c)("acquisitionDate")],eR.prototype,"writeAcquisitionDate",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],eR.prototype,"cameraID",void 0),(0,m._)([(0,f.Cb)({type:eb.Z,json:{write:!0}})],eR.prototype,"center",void 0),(0,m._)([(0,f.Cb)({type:eb.Z,json:{write:!0}})],eR.prototype,"perspectiveCenter",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],eR.prototype,"orientation",void 0);let e_=eR=(0,m._)([(0,v.j)("esri.rest.support.ImageInspectionInfo")],eR),eC=class extends A.Z{constructor(){super(...arguments),this.images=null}};(0,m._)([(0,f.Cb)({type:[e_],json:{write:!0}})],eC.prototype,"images",void 0),eC=(0,m._)([(0,v.j)("esri.rest.support.FindImagesResult")],eC);let eS=r=class extends A.Z{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new r((0,I.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,m._)([(0,f.Cb)({type:[String],json:{name:"angleName",write:!0}})],eS.prototype,"angleNames",void 0),(0,m._)([(0,f.Cb)({type:eb.Z,json:{write:!0}})],eS.prototype,"point",void 0),(0,m._)([(0,f.Cb)({type:P.Z,json:{write:!0}})],eS.prototype,"spatialReference",void 0),(0,m._)([(0,f.Cb)({type:T.z8,json:{write:!0}})],eS.prototype,"rasterId",void 0),eS=r=(0,m._)([(0,v.j)("esri.rest.support.ImageAngleParameters")],eS);let eI=class extends A.Z{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,m._)([(0,f.Cb)({type:Number,json:{write:!0}})],eI.prototype,"north",void 0),(0,m._)([(0,f.Cb)({type:Number,json:{write:!0}})],eI.prototype,"up",void 0),(0,m._)([(0,f.Cb)({type:P.Z,json:{write:!0}})],eI.prototype,"spatialReference",void 0),eI=(0,m._)([(0,v.j)("esri.rest.support.ImageAngleResult")],eI);var ex=i(96805),eF=i(46513),eT=i(24087);let eN=new eT.X({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esri
1MensurationHeightFromBaseAndTop:"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"}),eD=class extends A.Z{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,m._)([(0,f.Cb)({type:Number,json:{read:!0,write:!0}})],eD.prototype,"value",void 0),(0,m._)([(0,f.Cb)({type:String,json:{read:!0,write:!0}})],eD.prototype,"displayValue",void 0),(0,m._)([(0,f.Cb)({type:Number,json:{read:!0,write:!0}})],eD.prototype,"uncertainty",void 0),eD=(0,m._)([(0,v.j)("esri.rest.support.imageMeasureUtils.BaseImageMeasureResultValue")],eD);let ej=class extends eD{constructor(){super(...arguments),this.unit=null}};(0,m._)([(0,f.Cb)({type:String,json:{read:ex.Jo.read,write:ex.Jo.write}})],ej.prototype,"unit",void 0),ej=(0,m._)([(0,v.j)("esri.rest.support.imageMeasureUtils.ImageMeasureResultLengthValue")],ej);let eP=class extends eD{constructor(){super(...arguments),this.unit=null}};(0,m._)([(0,f.Cb)({type:String,json:{read:ex.gV.read,write:ex.gV.write}})],eP.prototype,"unit",void 0),eP=(0,m._)([(0,v.j)("esri.rest.support.imageMeasureUtils.ImageMeasureResultAreaValue")],eP);let eO=class extends eD{constructor(){super(...arguments),this.unit=null}};(0,m._)([(0,f.Cb)({type:String,json:{read:ex.CN.read,write:ex.CN.write}})],eO.prototype,"unit",void 0),eO=(0,m._)([(0,v.j)("esri.rest.support.imageMeasureUtils.ImageMeasureResultAngleValue")],eO);let eZ=class extends A.Z{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};(0,m._)([(0,f.Cb)()],eZ.prototype,"type",void 0),(0,m._)([(0,f.Cb)({type:eN.apiValues,json:{read:eN.read,write:eN.write}})],eZ.prototype,"measureOperation",void 0),(0,m._)([(0,f.Cb)({type:K.Z,json:{write:!0}})],eZ.prototype,"mosaicRule",void 0),(0,m._)([(0,f.Cb)({type:eb.Z,json:{write:!0}})],eZ.prototype,"pixelSize",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],eZ.prototype,"raster",void 0),eZ=(0,m._)([(0,v.j)("esri.rest.support.BaseImageMeasureParameters")],eZ);let eM=s=class extends eZ{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,ey.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new s((0,I.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,m._)([(0,f.Cb)({types:eF.qM,json:{name:"fromGeometry",read:!0,write:!0}})],eM.prototype,"geometry",void 0),(0,m._)([(0,w.c)("geometry")],eM.prototype,"writeGeometry",null),(0,m._)([(0,f.Cb)({type:eN.apiValues,json:{write:eN.write}})],eM.prototype,"measureOperation",null),(0,m._)([(0,f.Cb)({json:{read:!0}})],eM.prototype,"is3D",void 0),(0,m._)([(0,f.Cb)({type:String,json:{read:ex.Jo.read,write:ex.Jo.write}})],eM.prototype,"linearUnit",void 0),(0,m._)([(0,f.Cb)({type:String,json:{read:ex.gV.read,write:ex.gV.write}})],eM.prototype,"areaUnit",void 0),eM=s=(0,m._)([(0,v.j)("esri.rest.support.ImageAreaParameters")],eM);let eA=class extends A.Z{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,m._)([(0,f.Cb)({type:String,json:{read:!0,write:!0}})],eA.prototype,"name",void 0),(0,m._)([(0,f.Cb)({type:String,json:{read:!0,write:!0}})],eA.prototype,"sensorName",void 0),eA=(0,m._)([(0,v.j)("esri.rest.support.BaseImageMeasureResult")],eA);let eV=class extends eA{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,m._)([(0,f.Cb)({type:eP,json:{read:!0,write:!0}})],eV.prototype,"area",void 0),(0,m._)([(0,f.Cb)({type:ej,json:{read:!0,write:!0}})],eV.prototype,"perimeter",void 0),eV=(0,m._)([(0,v.j)("esri.rest.support.ImageAreaResult")],eV);let eJ=class extends d.Z.ClonableMixin(A.Z){constructor(){super(...arguments),this.outSpatialReference=null}};(0,m._)([(0,f.Cb)({type:P.Z,json:{name:"outSR",write:!0}})],eJ.prototype,"outSpatialReference",void 0),eJ=(0,m._)([(0,v.j)("esri.rest.support.ImageBoundaryParameters")],eJ);let eq=class extends A.Z{constructor(){super(...arguments),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?j.Z.fromJSON(e):D.Z.fromJSON(e)}};(0,m._)([(0,f.Cb)({type:Number,json:{write:!0}})],eq.prototype,"area",void 0),(0,m._)([(0,f.Cb)({types:eF.qM,json:{name:"shape",write:!0}})],eq.prototype,"geometry",void 0),(0,m._)([(0,N.r)("geometry")],eq.prototype,"readGeometry",null),eq=(0,m._)([(0,v.j)("esri.rest.support.ImageBoundaryResult")],eq);let eE=n=class extends eZ{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,ey.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new n((0,I.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,m._)([(0,f.Cb)({type:eb.Z,json:{read:!0,write:!0}})],eE.prototype,"fromGeometry",void 0),(0,m._)([(0,w.c)("fromGeometry")],eE.prototype,"writeFromGeometry",null),(0,m._)([(0,f.Cb)({type:eb.Z,json:{read:!0,write:!0}})],eE.prototype,"toGeometry",void 0),(0,m._)([(0,f.Cb)({type:eN.apiValues,json:{write:eN.write}})],eE.prototype,"measureOperation",null),(0,m._)([(0,f.Cb)({json:{read:!0}})],eE.prototype,"is3D",void 0),(0,m._)([(0,f.Cb)({type:String,json:{read:ex.Jo.read,write:ex.Jo.write}})],eE.prototype,"linearUnit",void 0),(0,m._)([(0,f.Cb)({type:String,json:{read:ex.CN.read,write:ex.CN.write}})],eE.prototype,"angularUnit",void 0),eE=n=(0,m._)([(0,v.j)("esri.rest.support.ImageDistanceParameters")],eE);let eG=class extends eA{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,m._)([(0,f.Cb)({type:ej,json:{read:!0,write:!0}})],eG.prototype,"distance",void 0),(0,m._)([(0,f.Cb)({type:eO,json:{read:!0,write:!0}})],eG.prototype,"azimuthAngle",void 0),(0,m._)([(0,f.Cb)({type:eO,json:{read:!0,write:!0}})],eG.prototype,"elevationAngle",void 0),eG=(0,m._)([(0,v.j)("esri.rest.support.ImageDistanceResult")],eG);var eL=i(7669),ez=i(45732),eU=i(88121);let eB=class extends d.Z.ClonableMixin(A.Z){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,ey.Ji)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,m._)([(0,f.Cb)({types:eF.qM,json:{read:ey.im,write:!0}})],eB.prototype,"geometry",void 0),(0,m._)([(0,w.c)("geometry")],eB.prototype,"writeGeometry",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],eB.prototype,"objectIds",void 0),(0,m._)([(0,eL.J)(ez.A,{ignoreUnknown:!1,name:"spatialRel"})],eB.prototype,"spatialRelationship",void 0),(0,m._)([(0,f.Cb)({type:eU.T,json:{name:"time",write:!0}})],eB.prototype,"timeExtent",void 0),(0,m._)([(0,f.Cb)({type:String,json:{write:!0}})],eB.prototype,"where",void 0),eB=(0,m._)([(0,v.j)("esri.rest.support.ImageGPSInfoParameters")],eB);let eQ=class extends ew(A.Z){constructor(){super(...arguments),this.id=null}};(0,m._)([(0,f.Cb)({json:{write:!0}})],eQ.prototype,"id",void 0);let ek=eQ=(0,m._)([(0,v.j)("esri.rest.support.CameraInfo")],eQ),eH=class extends A.Z{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,m._)([(0,f.Cb)({json:{write:!0}})],eH.prototype,"id",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],eH.prototype,"name",void 0),(0,m._)([(0,f.Cb)({type:Date,json:{write:!0}})],eH.prototype,"acquisitionDate",void 0),(0,m._)([(0,w.c)("acquisitionDate")],eH.prototype,"writeAcquisitionDate",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],eH.prototype,"cameraID",void 0),(0,m._)([(0,f.Cb)({type:eb.Z,json:{write:!0}})],eH.prototype,"center",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],eH.prototype,"gps",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],eH.prototype,"orientation",void 0);let e$=eH=(0,m._)([(0,v.j)("esri.rest.support.ImageGPSInfo")],eH),eW=class extends A.Z{constructor(){super(...arguments),this.images=null,this.cameras=null}};(0,m._)([(0,f.Cb)({type:[e$],json:{write:!0}})],eW.prototype,"images",void 0),(0,m._)([(0,f.Cb)({type:[ek],json:{write:!0}})],eW.prototype,"cameras",void 0),eW=(0,m._)([(0,v.j)("esri.rest.support.ImageGPSInfoResult")],eW);let eY=a=class extends eZ{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,ey.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new a((0,I.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,m._)([(0,f.Cb)({type:eb.Z,json:{read:!0}})],eY.prototype,"fromGeometry",void 0),(0,m._)([(0,w.c)("fromGeometry")],eY.prototype,"writeFromGeometry",null),(0,m._)([(0,f.Cb)({type:eb.Z,json:{read:!0,write:!0}})],eY.prototype,"toGeometry",void 0),(0,m._)([(0,f.Cb)({type:eN.apiValues,json:{write:eN.write}})],eY.prototype,"measureOperation",null),(0,m._)([(0,f.Cb)({json:{read:!0}})],eY.prototype,"operationType",void 0),(0,m._)([(0,f.Cb)({type:String,json:{read:ex.Jo.read,write:ex.Jo.write}})],eY.prototype,"linearUnit",void 0),eY=a=(0,m._)([(0,v.j)("esri.rest.support.ImageHeightParameters")],eY);let eX=class extends eA{constructor(){super(...arguments),this.height=null}};(0,m._)([(0,f.Cb)({type:ej,json:{read:!0,write:!0}})],eX.prototype,"height",void 0),eX=(0,m._)([(0,v.j)("esri.rest.support.ImageHeightResult")],eX);var eK=i(91885);let e0=o=class extends A.Z{constructor(){super(...arguments),this.geometry=null,this.rasterFu
1nctions=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,ey.Ji)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=K.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=V.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map(e=>e.rasterFunctionDefinition||e.toJSON())))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){let 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 o((0,I.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,m._)([(0,f.Cb)({types:eF.qM,json:{write:!0}})],e0.prototype,"geometry",void 0),(0,m._)([(0,w.c)("geometry")],e0.prototype,"writeGeometry",null),(0,m._)([(0,f.Cb)({type:K.Z,json:{write:!0}})],e0.prototype,"mosaicRule",null),(0,m._)([(0,w.c)("mosaicRule")],e0.prototype,"writeMosaicRule",null),(0,m._)([(0,f.Cb)({type:V.Z,json:{write:!0,name:"renderingRule"}})],e0.prototype,"rasterFunction",null),(0,m._)([(0,w.c)("rasterFunction")],e0.prototype,"writeRasterFunction",null),(0,m._)([(0,f.Cb)({type:[V.Z],json:{write:!0,name:"renderingRules"}})],e0.prototype,"rasterFunctions",void 0),(0,m._)([(0,w.c)("rasterFunctions")],e0.prototype,"writeRasterFunctions",null),(0,m._)([(0,f.Cb)({type:eb.Z,json:{write:!0}})],e0.prototype,"pixelSize",void 0),(0,m._)([(0,w.c)("pixelSize")],e0.prototype,"writePixelSize",null),(0,m._)([(0,f.Cb)({type:Boolean,json:{write:!0}})],e0.prototype,"returnGeometry",void 0),(0,m._)([(0,f.Cb)({type:Boolean,json:{write:!0}})],e0.prototype,"returnCatalogItems",void 0),(0,m._)([(0,f.Cb)({type:Boolean,json:{write:!0}})],e0.prototype,"returnPixelValues",void 0),(0,m._)([(0,f.Cb)({type:Number,json:{write:!0}})],e0.prototype,"maxItemCount",void 0),(0,m._)([(0,f.Cb)({type:eU.T,json:{write:{target:"time"}}})],e0.prototype,"timeExtent",void 0),(0,m._)([(0,w.c)("timeExtent")],e0.prototype,"writeTimeExtent",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],e0.prototype,"raster",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],e0.prototype,"viewId",void 0),(0,m._)([(0,f.Cb)({type:Boolean,json:{write:!0}})],e0.prototype,"processAsMultidimensional",void 0),e0=o=(0,m._)([(0,v.j)("esri.rest.support.ImageIdentifyParameters")],e0);var e1=i(67530);let e2=class extends A.Z{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,m._)([(0,f.Cb)({json:{write:!0}})],e2.prototype,"catalogItemVisibilities",void 0),(0,m._)([(0,f.Cb)({type:e1.Z,json:{write:!0}})],e2.prototype,"catalogItems",void 0),(0,m._)([(0,f.Cb)({type:eb.Z,json:{write:!0}})],e2.prototype,"location",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],e2.prototype,"name",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],e2.prototype,"objectId",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],e2.prototype,"processedValues",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],e2.prototype,"properties",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],e2.prototype,"value",void 0),e2=(0,m._)([(0,v.j)("esri.rest.support.ImageIdentifyResult")],e2);let e3=l=class extends A.Z{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 l({geometries:this.geometries?.map(e=>e.clone())??[],rasterId:this.rasterId})}};(0,m._)([(0,f.Cb)({type:[eb.Z],json:{write:!0}})],e3.prototype,"geometries",void 0),(0,m._)([(0,w.c)("geometries")],e3.prototype,"writeGeometry",null),(0,m._)([(0,f.Cb)({type:T.z8,json:{write:!0}})],e3.prototype,"rasterId",void 0),e3=l=(0,m._)([(0,v.j)("esri.rest.support.ImagePixelLocationParameters")],e3);let e5=class extends A.Z{constructor(){super(...arguments),this.geometries=null}};(0,m._)([(0,f.Cb)({json:{write:!0}})],e5.prototype,"geometries",void 0),e5=(0,m._)([(0,v.j)("esri.rest.support.ImagePixelLocationResult")],e5);let e8=u=class extends eZ{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,ey.Ji)(e),t[i]=e.toJSON())}get measureOperation(){let{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new u((0,I.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,m._)([(0,f.Cb)({types:eF.qM,json:{name:"fromGeometry",read:ey.im}}
1)],e8.prototype,"geometry",void 0),(0,m._)([(0,w.c)("geometry")],e8.prototype,"writeGeometry",null),(0,m._)([(0,f.Cb)({type:eN.apiValues,json:{read:eN.read,write:eN.write}})],e8.prototype,"measureOperation",null),(0,m._)([(0,f.Cb)({json:{read:!0}})],e8.prototype,"is3D",void 0),e8=u=(0,m._)([(0,v.j)("esri.rest.support.ImagePointParameters")],e8);let e4=class extends eA{constructor(){super(...arguments),this.point=null}};(0,m._)([(0,f.Cb)({type:eb.Z,json:{name:"point.value",read:!0,write:!0}})],e4.prototype,"point",void 0),e4=(0,m._)([(0,v.j)("esri.rest.support.ImagePointResult")],e4);var e6=i(88454),e9=i(53890);let e7=class extends d.Z.ClonableMixin(A.Z){constructor(){super(...arguments),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,ey.Ji)(e[0]),geometries:e.map(e=>({...e.toJSON(),spatialReference:void 0}))}:null}};(0,m._)([(0,f.Cb)({types:[eF.qM]})],e7.prototype,"geometries",void 0),(0,m._)([(0,w.c)("geometries")],e7.prototype,"writeGeometries",null),(0,m._)([(0,f.Cb)({type:[T.z8],json:{write:!0}})],e7.prototype,"rasterIds",void 0),(0,m._)([(0,f.Cb)({type:P.Z,json:{name:"outSR",write:!0}})],e7.prototype,"outSpatialReference",void 0),e7=(0,m._)([(0,v.j)("esri.rest.support.ImageToMapMultirayParameters")],e7);let te=class extends d.Z.ClonableMixin(A.Z){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,ey.Ji)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,m._)([(0,f.Cb)({types:eF.qM,json:{read:ey.im,write:!0}})],te.prototype,"geometry",void 0),(0,m._)([(0,w.c)("geometry")],te.prototype,"writeGeometry",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],te.prototype,"rasterId",void 0),(0,m._)([(0,f.Cb)({type:P.Z,json:{name:"outSR",write:!0}})],te.prototype,"outSpatialReference",void 0),(0,m._)([(0,f.Cb)({json:{name:"options.DOff",write:!0}})],te.prototype,"depthOffset",void 0),(0,m._)([(0,f.Cb)({json:{name:"options.Adjust",write:!0}})],te.prototype,"adjust",void 0),te=(0,m._)([(0,v.j)("esri.rest.support.ImageToMapParameters")],te);let tt=class extends d.Z.ClonableMixin(A.Z){constructor(){super(...arguments),this.referenceUri=null,this.rasterId=null}};(0,m._)([(0,f.Cb)({type:String,json:{name:"uri",write:!0}})],tt.prototype,"referenceUri",void 0),(0,m._)([(0,f.Cb)({type:Number,json:{write:!0}})],tt.prototype,"rasterId",void 0),tt=(0,m._)([(0,v.j)("esri.rest.support.ImageUrlParameters")],tt);let ti=class extends A.Z{constructor(){super(...arguments),this.url=null}};(0,m._)([(0,f.Cb)({json:{name:"imageURL",write:!0}})],ti.prototype,"url",void 0),ti=(0,m._)([(0,v.j)("esri.rest.support.ImageUrlResult")],ti);let tr=new eT.X({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0}),ts=class extends d.Z.ClonableMixin(A.Z){constructor(){super(...arguments),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,i){e?.length&&(t.geometryType=(0,ey.Ji)(e[0]),t.geometries=e.map(e=>e.toJSON()))}};(0,m._)([(0,f.Cb)({types:[eF.qM]})],ts.prototype,"geometries",void 0),(0,m._)([(0,w.c)("geometries")],ts.prototype,"writeGeometries",null),(0,m._)([(0,f.Cb)({type:K.Z,json:{write:!0}})],ts.prototype,"mosaicRule",void 0),(0,m._)([(0,f.Cb)({type:eb.Z,json:{write:!0}})],ts.prototype,"pixelSize",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],ts.prototype,"constantZ",void 0),(0,m._)([(0,f.Cb)({type:tr.apiValues,json:{read:tr.read,write:tr.write}})],ts.prototype,"baseType",void 0),ts=(0,m._)([(0,v.j)("esri.rest.support.ImageVolumeParameters")],ts);let tn=class extends A.Z{constructor(){super(...arguments),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,m._)([(0,f.Cb)({json:{write:!0}})],tn.prototype,"area",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],tn.prototype,"cut",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],tn.prototype,"fill",void 0),(0,m._)([(0,f.Cb)({json:{name:"maxz",write:!0}})],tn.prototype,"maxZ",void 0),(0,m._)([(0,f.Cb)({json:{name:"minz",write:!0}})],tn.prototype,"minZ",void 0),(0,m._)([(0,f.Cb)({json:{name:"meanz",write:!0}})],tn.prototype,"meanZ",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],tn.prototype,"cutCellCount",void 0),(0,m._)([(0,f.Cb)({json:{write:!0}})],tn.prototype,"fillCellCount",void 0);let ta=tn=(0,m._)([(0,v.j)("esri.rest.support.ImageVolume")],tn),to=class extends A.Z{constructor(){super(...arguments),this.volumes=[]}};(0,m._)([(0,f.Cb)({type:[ta],json:{write:!0}})],to.prototype,"volumes",void 0),to=(0,m._)([(0,v.j)("esri.rest.support.ImageVolumeResult")],to);let tl=class extends d.Z.ClonableMixin(A.Z){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,ey.Ji)(e),t[i]=JSON.stringify(e))}};(0,m._)([(0,f.Cb)({types:eF.qM,json:{read:ey.im,write:!0}})],tl.prototype,"geometry",void 0),(0,m._)([(0,w.c)("geometry")],tl.prototype,"writeGeometry",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],tl.prototype,"rasterId",void 0),(0,m._)([(0,f.Cb)({json:{name:"options.VisibleOnly",write:!0}})],tl.prototype,"visibleOnly",void 0),tl=(0,m._)([(0,v.j)("esri.rest.support.MapToImageParameters")],tl);let tu=class extends A.Z{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}),eb.Z.fromJSON(e)}};(0,m._)([(0,f.Cb)({types:eF.qM,json:{name:"Shape",read:ey.im,write:!0}})],tu.prototype,"geometry",void 0),(0,m._)([(0,f.Cb)({json:{name:"Length",write:!0}})],tu.prototype,"length",void 0),(0,m._)([(0,f.Cb)({json:{name:"Area",write:!0}})],tu.prototype,"area",void 0),(0,m._)([(0,f.Cb)({type:eb.Z,json:{name:"Center",write:!0}})],tu.prototype,"center",void 0),(0,m._)([(0,N.r)("center")],tu.prototype,"readCenter",null),tu=(0,m._)([(0,v.j)("esri.rest.support.MeasureAreaFromImageResult")],tu);let tp=p=class extends A.Z{constructor(){super(...arguments),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,ey.Ji)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){let e=(0,I.d9)({geometry:this.geometry,rasterId:this.rasterId});return new p(e)}};(0,m._)([(0,f.Cb)({types:eF.qM,json:{name:"fromGeometry",read:ey.im,write:!0}})],tp.prototype,"geometry",void 0),(0,m._)([(0,w.c)("geometry")],tp.prototype,"writeGeometry",null),(0,m._)([(0,f.Cb)({json:{write:!0}})],tp.prototype,"rasterId",void 0),tp=p=(0,m._)([(0,v.j)("esri.rest.support.MeasureFromImageParameters")],tp);let tm=class extends A.Z{constructor(){super(...arguments),this.geometry=null,this.length=null}};function tc(e){let t=e?.time;if(t&&(null!=t.start||null!=t.end)){let 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 td(e,t,i){t=(0,T.TJ)(eK.Z,t);let r=(0,ef.en)(e),s=t.geometry?[t.geometry]:[],n=await (0,eg.aX)(s),a=t.toJSON();tc(a);let o=n?.[0];null!=o&&(a.geometry=tN(o));let l=(0,ef.cv)({...r.query,f:"json",...a});return(0,ef.lA)(l,i)}async function th(e,t,i){let r=(t=(0,T.TJ)(ts,t)).toJSON();r.geometries=JSON.stringify(r.geometries);let s=(0,ef.en)(e),n=(0,ef.cv)({...s.query,f:"json",...r}),a=(0,ef.lA)(n,i),{data:o}=await (0,C.Z)(`${s.path}/calculateVolume`,a);return to.fromJSON({volumes:o.results})}async function ty(e,t,i){let r=(t=(0,T.TJ)(eS,t)).toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=tD(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(r.spatialReference=tj(t.spatialReference));let s=(0,ef.en)(e),n=(0,ef.cv)({...s.query,f:"json",...r}),a=(0,ef.lA)(n,i),{data:o}=await (0,C.Z)(`${s.path}/computeAngles`,a);return o.spatialReference=o.spatialReference?null!=o.spatialReference.geodataXform?new P.Z({wkid:0,imageCoordinateSystem:o.spatialReference}):P.Z.fromJSON(o.spatialReference):null,"NaN"===o.north&&(o.north=null),"NaN"===o.up&&(o.up=null),new eI(o)}async function tg(e,t,i){let r=(t=(0,T.TJ)(e3,t)).toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=tD(s[e].spatialReference));let n=(0,ef.en)(e),a=(0,ef.cv)({...n.query,f:"json",...r}),o=(0,ef.lA)(a,i),{data:l}=await (0,C.Z)(`${n.path}/computePixelLocation`,o);return e5.fromJSON(l)}async function tf(e,t,i){let r=await td(e,t,i),s=(0,ef.en)(e),{data:n}=await (0,C.Z)(`${s.path}/computeStatisticsHistograms`,r),{statistics:a}=n;
1return a?.length&&a.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:a,histograms:n.histograms}}async function tb(e,t,i){let r=await td(e,t,i),s=(0,ef.en)(e),{data:n}=await (0,C.Z)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}async function tv(e,t,i){let r=(t=(0,T.TJ)(e6.Z,t)).toJSON();tc(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));let s=await (0,eg.aX)(t.geometry),n=s?.[0];null!=n&&(r.geometry=tN(n));let a=(0,ef.en)(e),o=(0,ef.cv)({...a.query,f:"json",...r}),l=(0,ef.lA)(o,i),{data:u}=await (0,C.Z)(`${a.path}/getSamples`,l),p=u.samples.map(e=>{let t="NaN"===e.value||""===e.value?null:e.value.split(" ").map(e=>Number(e));return{...e,pixelValue:t}});return e9.Z.fromJSON({samples:p})}async function tw(e,t,i){t=(0,T.TJ)(e0,t);let r=(0,ef.en)(e),s=t.geometry?[t.geometry]:[];return(0,eg.aX)(s).then(e=>{let s=t.toJSON(),n=e?.[0];null!=n&&(s.geometry=JSON.stringify(tN(n)));let a=(0,ef.cv)({...r.query,f:"json",...s}),o=(0,ef.lA)(a,i);return(0,C.Z)(r.path+"/identify",o)}).then(e=>e2.fromJSON(e.data))}async function tR(e,t,i){t=(0,T.TJ)(eY,t);let r=await tI(e,t,[t.fromGeometry,t.toGeometry],i);return eX.fromJSON(r)}async function t_(e,t,i){t=(0,T.TJ)(eM,t);let r=await tI(e,t,[t.geometry],i);return eV.fromJSON(r)}async function tC(e,t,i){t=(0,T.TJ)(e8,t);let r=await tI(e,t,[t.geometry],i);return e4.fromJSON(r)}async function tS(e,t,i){t=(0,T.TJ)(eE,t);let r=await tI(e,t,[t.fromGeometry,t.toGeometry],i);return eG.fromJSON(r)}async function tI(e,t,i,r){let s=(0,ef.en)(e),n=await (0,eg.aX)(i),a=t.toJSON();null!=n[0]&&(a.fromGeometry=JSON.stringify(tN(n[0]))),null!=n[1]&&(a.toGeometry=JSON.stringify(tN(n[1])));let o=(0,ef.cv)({...s.query,f:"json",...a}),l=(0,ef.lA)(o,r),{data:u}=await (0,C.Z)(s.path+"/measure",l);return u}async function tx(e,t,i){let r=await tT(e,t,i);return tm.fromJSON(r)}async function tF(e,t,i){let r=await tT(e,t,i);return tu.fromJSON(r)}async function tT(e,t,i){t=(0,T.TJ)(tp,t);let r=(0,ef.en)(e),s=t.toJSON(),n=(0,ef.cv)({...r.query,f:"json",...s}),a=(0,ef.lA)(n,i),{data:o}=await (0,C.Z)(r.path+"/measureFromImage",a);return o}function tN(e){let t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=tD(e.spatialReference)),t}function tD(e){let{imageCoordinateSystem:t}=e;if(t){let{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function tj(e,t){if(!e.imageCoordinateSystem)return(0,O.B9)(e);let i=tD(e),{icsid:r,icsns:s}=i;return null!=r&&(null==s||t?.toLowerCase().includes("/"+s.toLowerCase()+"/"))?`0:${r}`:JSON.stringify(i)}async function tP(e,t,i){t=(0,T.TJ)(eJ,t);let r=(0,ef.en)(e),s=t.toJSON();t.outSpatialReference&&(s.outSR=tj(t.outSpatialReference));let n=(0,ef.cv)({...r.query,f:"json",...s}),a=(0,ef.lA)(n,i),{data:o}=await (0,C.Z)(r.path+"/queryBoundary",a);return eq.fromJSON(o)}async function tO(e,t,i){let r=(t=(0,T.TJ)(eB,t)).toJSON();tc(r),r.objectIds?.length&&(r.objectIds=r.objectIds.join(",")),r.geometry||r.objectIds||r.time||r.where||(r.where="1=1");let s=await (0,eg.aX)(t.geometry),n=s?.[0];null!=n&&(r.geometry=tN(n));let a=n?.spatialReference??t.geometry?.spatialReference;a&&(r.inSR=tj(a));let o=(0,ef.en)(e),l=(0,ef.cv)({...o.query,f:"json",...r}),u=(0,ef.lA)(l,i),{data:p}=await (0,C.Z)(`${o.path}/queryGPSInfo`,u);return eW.fromJSON(p)}async function tZ(e,t,i){let r=(t=(0,T.TJ)(te,t)).toJSON();t.geometry.spatialReference.imageCoordinateSystem&&(r.geometry=tN(t.geometry)),t.depthOffset&&t.adjust||delete r.options;let s=(0,ef.en)(e),n=(0,ef.cv)({...s.query,f:"json",...r}),a=(0,ef.lA)(n,i),{data:o}=await (0,C.Z)(`${s.path}/imageToMap`,a);return(0,ey.im)(o)}async function tM(e,t,i){let r=(t=(0,T.TJ)(e7,t)).toJSON();t.rasterIds?.length&&(r.rasterIds=t.rasterIds.join(","));let s=(0,ef.en)(e),n=(0,ef.cv)({...s.query,f:"json",...r}),a=(0,ef.lA)(n,i),{data:o}=await (0,C.Z)(`${s.path}/imageToMapMultiray`,a);return(0,ey.im)(o)}async function tA(e,t,i){let r=(t=(0,T.TJ)(tl,t)).toJSON(),s=await (0,eg.aX)(t.geometry),n=s?.[0];null!=n&&(r.geometry=tN(n)),t.visibleOnly||delete r.options;let a=n?.spatialReference??t.geometry?.spatialReference;a&&(r.inSR=tj(a));let o=(0,ef.en)(e),l=(0,ef.cv)({...o.query,f:"json",...r}),u=(0,ef.lA)(l,i),{data:p}=await (0,C.Z)(`${o.path}/mapToImage`,u);return(0,ey.im)(p)}async function tV(e,t,i){let r=(t=(0,T.TJ)(tt,t)).toJSON(),s=(0,ef.en)(e),n=(0,ef.cv)({...s.query,f:"json",...r}),a=(0,ef.lA)(n,i),{data:o}=await (0,C.Z)(`${s.path}/getImageUrl`,a);return ti.fromJSON(o)}async function tJ(e,t,i){let r=(t=(0,T.TJ)(ev,t)).toJSON(),s=await (0,eg.aX)([t.fromGeometry,t.toGeometry]);null!=s[0]&&(r.fromGeometry=tN(s[0]),s[0].spatialReference&&(r.inSR=tj(s[0].spatialReference))),null!=s[1]&&(r.toGeometry=tN(s[1])),t.objectIds?.length&&(r.objectIds=r.objectIds.join(","));let n=(0,ef.en)(e),a=(0,ef.cv)({...n.query,f:"json",...r}),o=(0,ef.lA)(a,i),{data:l}=await (0,C.Z)(`${n.path}/find`,o);return eC.fromJSON(l)}(0,m._)([(0,f.Cb)({types:eF.qM,json:{name:"Shape",read:ey.im,write:!0}})],tm.prototype,"geometry",void 0),(0,m._)([(0,f.Cb)({json:{name:"Length",write:!0}})],tm.prototype,"length",void 0),tm=(0,m._)([(0,v.j)("esri.rest.support.MeasureLengthFromImageResult")],tm);var tq=i(26290),tE=i(44018);async function tG(e,t,i){let r=(0,ef.en)(e),s=(0,ef.cv)({...r?.query,f:"json"}),n=(0,ef.lA)(s,i),a=`${r?.path}/${t}/info`,o=(0,C.Z)(`${a}`,n),l=(0,C.Z)(`${a}/keyProperties`,n),u=await Promise.allSettled([o,l]),p="fulfilled"===u[0].status?u[0].value.data:null,m="fulfilled"===u[1].status?u[1].value.data:null,c=null;p.statistics?.length&&(c=p.statistics.map(e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]})));let d=D.Z.fromJSON(p.extent),h=Math.ceil(d.width/p.pixelSizeX-.1),y=Math.ceil(d.height/p.pixelSizeY-.1),g=d.spatialReference,f=new eb.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),b=p.histograms?.length?p.histograms:null,v=new tE.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new el.Z({width:h,height:y,bandCount:p.bandCount,extent:d,spatialReference:g,pixelSize:f,pixelType:p.pixelType.toLowerCase(),statistics:c,histograms:b,keyProperties:m,storageInfo:v})}var tL=i(87525),tz=i(50581),tU=i(1975),tB=i(5829);let tQ=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),tk=(0,T.Eg)(T.q9,{min:0,max:255}),tH=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={}
1,this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new et({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){let 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?K.Z.fromJSON(t):null}get fieldsIndex(){return this.fields?new er.Z(this.fields):null}set format(e){e&&tQ.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=K.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){let i=e||t.mosaicRule;return i?K.Z.fromJSON(i):this._isMosaicRuleSupported(t)?K.Z.fromJSON(t):null}writeMosaicRule(e,t,i){let{mosaicRule:r}=this;this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=tk(e))}readObjectIdField(e,t){if(!e){let i=t.fields.find(e=>"esriFieldTypeOID"===e.type||"oid"===e.type);e=i?.name}return e}get parsedUrl(){return(0,F.mN)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){let{activePresetRendererName:e,presetRenderers:t}=this;if(e){let i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){let r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,eh.ij)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),Q(s)||b.Z.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(){let e=this.fields?.map(e=>e.clone())??[];e.push((0,eo.Zp)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,eo.m1)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some(({name:e})=>"none"===e.toLowerCase())&&e.push((0,eo.iV)()),null!=this.rasterFu
1nctionInfos&&this.rasterFunctionInfos.filter(({name:e})=>"none"!==e.toLowerCase()).forEach(({name:t})=>e.push((0,eo.VL)(t)));let{rasterInfo:t}=this;if(this._isVectorDataSet()){let i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=(0,eo.zW)(i),s=(0,eo.P$)();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){let i=(0,eo.Mk)(t.multidimensionalInfo);e.push(...i)}let i=t?.attributeTable;if(null!=i){let t=(0,eo.gE)(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=V.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){let i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?V.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):V.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){let i=e||t.extent.spatialReference;return i?P.Z.fromJSON(i):null}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=ee.sM.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e,{renderer:r,symbolizer:s,pixelFilter:n}=this;if(!this._isPicture()&&r&&s&&!n){await this._updateSymbolizer(s,r);let{bandIds:n}=this;i=await this._symbolize({pixelData:e,bandIds:n,symbolizer:s},t)}return i}destroy(){this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new h.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,I.d9)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),th(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new h.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return ty(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new h.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return tg(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new h.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,I.d9)(e),this._applyMosaicAndRenderingRules(e),tb(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new h.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,I.d9)(e),this._applyMosaicAndRenderingRules(e),tf(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){let 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 h.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,I.d9)(e),this._applyMosaicRule(e),tR(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){let i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsAreaAndPerimeter&&(!e.is3D||i.mensuration.supports3D)))throw new h.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,I.d9)(e),this._applyMosaicRule(e),t_(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){let i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsDistanceAndAngle&&(!e.is3D||i.mensuration.supports3D)))throw new h.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,I.d9)(e),this._applyMosaicRule(e),tS(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){let i=await this._fetchCapabilities(t?.signal);if(!(i.mensuration.supportsPointOrCentroid&&(!e.is3D||i.mensuration.supports3D)))throw new h.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,I.d9)(e),this._applyMosaicRule(e),tC(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new h.Z("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new h.Z("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return tx(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new h.Z("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new h.Z("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return tF(this.url,e,this._getRequestOptions(t))}getField(e){let{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){let i=this.getField(e);return i?i.domain:null}fetchImage(e,t,i,r={}
1){if((0,S.XV)(b.Z.getLogger(this),"`ImageryLayer.fetchImage` is deprecated in favor of 'ImageryLayer.fetchPixels'.",{replacement:"ImageryLayer.fetchPixels",version:"4.33",warnOnce:!0}),null==e||null==t||null==i)throw new h.Z("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");return this.internalFetchImage(e,t,i,r)}async internalFetchImage(e,t,r,s={}){await this._updateCurrentRasterInfo();let n=this.getExportImageServiceParameters(e,t,r,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){let e=document.createElement("canvas");return(e.width=t,e.height=r,s.returnImageBitmap)?{imageBitmap:await (0,es.g)(e,`${i(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}let{bandIds:n,rasterInfo:a}=this,o=(n?.length||a.bandCount)??0,l=t*r,u=a.pixelType,p=[];for(let e=0;e<o;e++)p.push(ea.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ea.Z({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}let a=!!s.requestAsImageElement&&!this.pixelFilter,o=a&&!!s.returnImageBitmap,l={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:a,returnImageBitmap:o,signal:s.signal};return this._requestArrayBuffer(l)}async fetchPixels(e,t,i,r={}){await this._initJobHandler(),r.applyRendering&&await this._updateCurrentRasterInfo();let s=r.applyRendering?void 0:new et({layer:this,requestRawData:!0,interpolation:r.interpolation??"nearest",bandIds:r.bandIds??[]}),n=this.getExportImageServiceParameters(e,t,i,r.timeExtent,s);if(null==n)return{extent:e,pixelBlock:null};delete n.pixelType,delete n.bandIds,delete n.compressionQuality;let a={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:!1,returnImageBitmap:!1,signal:r.signal},{pixelData:o}=await this._requestArrayBuffer(a);return o??{extent:e,pixelBlock:null}}fetchKeyProperties(e){return(0,C.Z)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e.data)}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new h.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,C.Z)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then(e=>e1.Z.fromJSON(e.data))}getCatalogItemRasterInfo(e,t){let r={...t,query:this._getQueryParams()};return tG(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){let{data:r}=await (0,C.Z)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await (0,C.Z)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};let a=this.version>=10.7?(0,C.Z)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then(e=>e.data).catch(()=>({})):{},o=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,O.B9)(o),outSR:"0:"+e},u=(0,C.Z)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then(e=>e.data).catch(()=>({})),p=(n.xmin+n.xmax)/2,m=(n.ymax-n.ymin)/6,c=n.ymin+m,d=[];for(let e=0;e<5;e++)d.push({x:p,y:c+m*e});let h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,O.B9)(o),outSR:"0:"+e},y=(0,C.Z)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then(e=>e.data).catch(()=>({})),g=await Promise.all([a,u,y]),f=g[0].ipxf;if(null==f){let e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(f={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}let b=D.Z.fromJSON(g[1]?.geometries?.[0]);b&&(b.spatialReference=new P.Z({wkid:0,imageCoordinateSystem:s}));let v=g[2].geometries?g[2].geometries.filter(e=>
1null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y):[],w=v.length;if(w<3)return{ics:s,icsToPixelTransform:f,icsExtent:b,northDirection:null};let R=0,_=0,S=0,I=0;for(let e=0;e<w;e++)R+=v[e].x,_+=v[e].y,S+=v[e].x*v[e].x,I+=v[e].x*v[e].y;let x=(w*I-R*_)/(w*S-R*R),F=0,T=v[4].x>v[0].x,N=v[4].y>v[0].y;return x===1/0?F=N?90:270:0===x?F=T?0:180:x>0?F=T?180*Math.atan(x)/Math.PI:180*Math.atan(x)/Math.PI+180:x<0&&(F=N?180+180*Math.atan(x)/Math.PI:360+180*Math.atan(x)/Math.PI),{ics:s,icsToPixelTransform:f,icsExtent:b,northDirection:F}}async generateRasterInfo(e,t){e=(0,T.TJ)(V.Z,e);let r={...t,query:this._getQueryParams()};if(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))return this.serviceRasterInfo??(0,tq.gh)(i(this.parsedUrl),this.sourceJSON,r);let s=function(e){let t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map(e=>i?e.slice(8,-18):e.slice(18,-1));return s?s.join("/"):null}(e);if(!s)throw new h.Z("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[s])return this._functionRasterInfos[s];let n=(0,tq.Nb)(i(this.parsedUrl),e,r);this._functionRasterInfos[s]=n;try{return await n}catch(e){throw this._functionRasterInfos[s]=null,e}}getExportImageServiceParameters(e,t,r,s,n){let a=tj((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl)),o=(n??=this.exportImageServiceParameters).toJSON(),{bandIds:l,noData:u}=o,{renderingRule:p}=o,m=this.rasterFunction?.rasterFunctionDefinition,c=this.renderer?.type;if(l?.length&&this._hasRasterFunction(this.rasterFunction)&&!m&&(!c||"raster-stretch"===c||"raster-colormap"===c||"unique-value"===c||"class-breaks"===c||"raster-shaded-relief"===c)){let e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFu
1nctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){let t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;o.bandIds=void 0}else o.bandIds=l?.join(",");Array.isArray(u)&&u.length>0&&(o.noData=u.join(","));let d=this._processMultidimensionalIntersection(null,s,n.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,s=d.timeExtent,o.renderingRule=this._getRenderingRuleString(V.Z.fromJSON(p));let h={};if(null!=s){let{start:e,end:t}=s.toJSON();e&&t&&e===t?h.time=""+e:null==e&&null==t||(h.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:a,imageSR:a,size:t+","+r,...o,...h}}async getSamples(e,t){let i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new h.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,I.d9)(e);let{raster:r}=this;return r&&null==e.raster&&(e.raster=r),tv(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new h.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,I.d9)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=j.Z.fromExtent(e.geometry));let i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new h.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;let{raster:r,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),r&&null==e.raster&&(e.raster=r),tw(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new h.Z("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return tZ(i(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new h.Z("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return tM(i(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new h.Z("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return tA(i(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new h.Z("imagery-layer:find-images","findImages operation is not supported on the input image service");return tJ(i(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new h.Z("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return tV(i(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new tB.Z({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new h.Z("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},tP(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return{query:e,requestOptions:t}=await this._prepareForQuery(e,t),(0,tU.e)(this.url,e,t)}async queryObjectIds(e,t){return{query:e,requestOptions:t}=await this._prepareForQuery(e,t),(0,tz.G)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new h.Z("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},tO(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return{query:e,requestOptions:t}=await this._prepareForQuery(e,t),(0,tL.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new h.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();let{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1},a=!1,o=null,l=null,u=eo.commonRasterFieldNames.servicePixelValue.toLowerCase(),p=this._rasterFu
1nctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some(e=>!e.toLowerCase().startsWith(u)),this.version>=10.4)){let t=e.outFields.filter(e=>e.toLowerCase().startsWith(u)&&e.length>u.length).map(e=>{let t=e.slice(u.length+1);return[this._updateRenderingRulesFunctionName(t,p),t]});o=t.map(e=>new V.Z({functionName:e[0]})),l=t.map(e=>e[1]);let{rasterFunction:i}=this;0===o.length?i?.functionName?(o.push(i),l.push(i.functionName)):o=null:i?.functionName&&!o.some(e=>e.functionName===i.functionName)&&(o.push(i),l.push(i.functionName))}let m=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:c}=this,d=e.timeExtent||this.timeExtent;if(c){let{isOutside:t,intersection:i}=(0,eu.W2)(c,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new h.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(d=i.timeExtent)}let y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d),g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=j.Z.fromExtent(g));let f=this._getQueryParams({geometry:g,timeExtent:d,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:o,pixelSize:i,returnCatalogItems:a,returnGeometry:m,raster:this.raster,maxItemCount:s?1:null});delete f.f;let b=new e0(f);try{await this._generateRasterInfo(this.rasterFunction);let i=await tw(this.url,b,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,o=null!=i.value&&i.value.toLowerCase().includes("nodata"),u=a&&!m&&i?.catalogItems?.features.length&&(n||!o),p=this.multidimensionalInfo&&"raster-dataset"===this.sourceType?(0,eu.Qm)({rasterInfo:this.rasterInfo,multidimensionalDefinition:y?.multidimensionalDefinition,timeExtent:d,multidimensionalSubset:this.multidimensionalSubset}):null;if(!u)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p});let c=this.objectIdField||"ObjectId",h=i.catalogItems?.features??[],g=h.map(e=>e.attributes?.[c]),f=new tB.Z({objectIds:g,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[c]}),v=await this.queryRasters(f);return v?.features?.length&&v.features.forEach(t=>{h.forEach(i=>{i.attributes[c]===t.attributes[c]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))})}),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s,effectiveMultidimensionalDefinition:p})}catch{throw new h.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){let r=(0,C.Z)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.statistics),s=(0,C.Z)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then(e=>e.data?.histograms),n=await Promise.all([r,s]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),{statistics:n[0]||null,histograms:n[1]||null}}getMultidimensionalSubsetVariables(e){let t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,eu.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);let t=this.sourceJSON;return Promise.all([null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,tq.gh)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then(e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,tq.n$)(e,t),e)),this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,this._getRasterFunctionInfos()]).then(e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFu
1nctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),b.Z.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,x.YP)(()=>this.rasterFunction,e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then(e=>{e&&(this.rasterInfo=e)})})]);let{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)})}_combineMosaicRuleWithTimeExtent(e,t){let i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;let{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||[];let a=e.multidimensionalDefinition.filter(e=>e.dimensionName===n),o=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==o||null==l||o===l,p=u?[o||l]:[[o,l]],m=this.version>=10.8;if(a.length)a.forEach(e=>{e.dimensionName===n&&(m?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))});else if(!m){let 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 M.Z({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 h.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,T.TJ)(tB.Z,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}_isSupportedRenderer(e){let{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,ec.U0)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){let{data:r,ssl:s}=await (0,C.Z)(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 h.Z("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;let 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;let{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){let t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){let t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=(0,ec.RA)({variableName:t,rasterFunctionName:this.rasterFu
1nction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&i.bandCount>=3){let e=r?.bandIds??(0,ec.YD)(i);e&&(3!==i.bandCount||0!==e[0]||1!==e[1]||2!==e[2])&&(this.bandIds=e)}e||(e=r?.renderer??(0,ec.Ob)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));let s=(0,ec.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=i):this.symbolizer=new ed.Z({rendererJSON:s,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));let{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?this._rasterJobHandler.decode({data:e,options:t}):(0,ep.J)(e,t,i)}
1async _getRasterFunctionInfos(e){let 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;let r=await (0,C.Z)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){let{imageProps:t,requestAsImageElement:r,returnImageBitmap:s,signal:n}=e;if(r&&this._canRequestImageElement(t.format)){let r=`${i(this.parsedUrl)}/exportImage`,{data:a}=await (0,C.Z)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return a instanceof Blob?{imageBitmap:await (0,es.g)(a,r,n),params:t}:{imageOrCanvasElement:a,params:t}}let a=this._initJobHandler(),o=(0,C.Z)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),l=(await Promise.all([o,a]))[0].data,u=t.format||"jpgpng",p=u;if("bsq"!==p&&"bip"!==p&&(p=(0,ep.y)(l)),!p)throw new h.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));let m={signal:n},c="gif"===u||"bmp"===u||u.includes("png")&&("png"===p||"jpg"===p)?(0,ep.J)(l,{useCanvas:!0,...t},m):this._decodePixelBlock(l,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:u},m);return{pixelData:{pixelBlock:await c,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,eu.Tj)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new K.Z;let 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||{};let i=e.value,{templateRRFunctionNames:r,showNoDataRecords:s,returnDomainValues:n,templateFields:a}=t,o=e.processedValues,l=e.catalogItems?.features,u=e.properties?.Values?.map(e=>e.replaceAll(/ /gi,", "))||[],p=this.objectIdField||"ObjectId",m="string"==typeof i&&i.toLowerCase().includes("nodata"),c=[];if(i&&!l&&(!m||s)){let e={};e[p]=0,u=[i],l=[new _.Z({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,eo.Qj)(this.rasterFields,e,t.effectiveMultidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,a),m&&!s&&(l=[]);let{itemPixelValue:d,servicePixelValue:h}=eo.commonRasterFieldNames,y=this.rasterFields.some(e=>e.name===d);for(let e=0;e<l.length;e++){let t=l[e];if(null!=i){let n=u[e],a=this.rasterFunction&&o&&o.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?o[r.indexOf(this.rasterFunction.functionName)]:i;if("nodata"===n.toLowerCase()&&!s)continue;y&&(t.attributes[d]=n),t.attributes[h]=a,this._updateFeatureWithMagDirValues(t,n);let l=this.fields&&this.fields.length>0,p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:i:a;this.rasterFunction||(p=l?n:i),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,n&&this._updateFeatureWithDomainValues(t),r&&o&&r.length===o.length)for(let e=0;e<r.length;e++){let i=`${eo.commonRasterFieldNames.servicePixelValue}.${r[e]}`;t.attributes[i]=o[e]}c.push(l[e])}return c}_processMultidimensionalIntersection(e,t,i){let{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){let{isOutside:i,intersection:s}=(0,eu.W2)(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){let{isOutside:e}=(0,eu.W2)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){let i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;let{features:r,fields:s}=i,n=s.map(e=>e.name).find(e=>"value"===e.toLowerCase());if(!n)return;let a=r.filter(e=>e.attributes[n]===(null!=t?parseInt(t,10):null));
1a&&a[0]&&s.forEach(t=>{let i=eo.RI+t.name;e.attributes[i]=a[0].attributes[t.name]})}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;let 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 ea.Z({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new D.Z(0,0,0,0,this.spatialReference)});let a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,em.Tg)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[eo.commonRasterFieldNames.magnitude]=a[0],e.attributes[eo.commonRasterFieldNames.direction]=a[1]}_updateFeatureWithDomainValues(e){let t=this.fields&&this.fields.filter(e=>e.domain&&"coded-value"===e.domain.type);null!=t&&t.forEach(t=>{let i=e.attributes[t.name];if(null!=i){let 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;let i=this.fieldsIndex;null!=i&&e.forEach(e=>{if(e?.attributes)for(let r of t){let 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).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");let 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){let{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}async _updateCurrentRasterInfo(e){if(this.renderer||this.symbolizer){let t=await this._generateRasterInfo(this.rasterFunction,{signal:e});t&&(this.rasterInfo=t)}}_applyMosaicRule(e){let{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){let t=e.capabilities?e.capabilities.toLowerCase().split(",").map(e=>e.trim()):["image","catalog"],{currentVersion:i,maxRecordCount:r}=e,s=t.includes("image"),n="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),o=t.includes("edit"),l=t.includes("mensuration")&&a,u=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map(e=>e.trim()),p=l&&u.includes("basic"),m=this._isMosaicDataset(e)&&t.includes("catalog"),c=t.includes("download"),d=i>=10.7&&n||i>=11.4&&(n||l&&u.includes("3d")),h=m&&e.fields&&e.fields.length>0,y=h&&e.supportsAdvancedQueries?e.advancedQueryCapabilities:void 0;return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsImageToMap:i>=11.2&&m,supportsImageToMapMultiray:i>=11.2&&m,supportsMapToImage:i>=11.2&&m,supportsFindImages:i>=11.2&&m,supportsGetImageUrl:i>=11.3&&c,supportsMeasure:l,supportsMeasureFromImage:i>=11.2,supportsDownload:c,supportsQuery:h,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:d,supportsComputePixelLocation:i>=10.7&&m,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&m,supportsAdd:o,supportsDelete:o,supportsEditing:o,supportsUpdate:o,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:r,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,supportsStatistics:!!y?.supportsStatistics,supportsOrderBy:!!y?.supportsOrderBy,supportsDistinct:!!y?.supportsDistinct,supp
1ortsPagination:!!y?.supportsPagination,supportsPaginationOnAggregatedQueries:!!y?.supportsPaginationOnAggregatedQueries,supportsStandardizedQueriesOnly:!!y?.useStandardizedQueries,supportsPercentileStatistics:!!y?.supportsPercentileStatistics,supportsCentroid:!!y?.supportsReturningGeometryCentroid,supportsCurrentUser:!1,supportsDistance:!!y?.supportsQueryWithDistance,supportsExtent:!!y?.supportsReturningQueryExtent,supportsGeometryProperties:!!y?.supportsReturningGeometryProperties,supportsHavingClause:!!y?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:y?.supportsSqlExpression??!!y,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!y?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:p,supportsAreaAndPerimeter:p,supportsPointOrCentroid:p,supportsHeightFromBaseAndTop:l&&u.includes("base-top height"),supportsHeightFromBaseAndTopShadow:l&&u.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:l&&u.includes("top-top shadow height"),supports3D:l&&u.includes("3d")}}}};function i(e){return e?.path??""}return(0,m._)([(0,f.Cb)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,m._)([(0,f.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,m._)([(0,N.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,m._)([(0,f.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,m._)([(0,f.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,m._)([(0,f.Cb)({type:[T.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,m._)([(0,N.r)("bandIds")],t.prototype,"readBandIds",null),(0,m._)([(0,f.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,m._)([(0,N.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,m._)([(0,f.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,m._)([(0,w.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,m._)([(0,f.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,m._)([(0,w.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,m._)([(0,f.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,m._)([(0,f.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,m._)([(0,N.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,m._)([(0,f.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,m._)([(0,f.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,m._)([(0,f.Cb)()],t.prototype,"rasterInfo",void 0),(0,m._)([(0,f.Cb)({readOnly:!0,type:[ei.Z]})],t.prototype,"fields",void 0),(0,m._)([(0,f.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,m._)([(0,f.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],t.prototype,"format",null),(0,m._)([(0,N.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,m._)([(0,f.Cb)({type:D.Z})],t.prototype,"fullExtent",void 0),(0,m._)([(0,f.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,m._)([(0,f.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,m._)([(0,f.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,m._)([(0,f.Cb)({type:String,json:{type:ee.cl.jsonValues,read:ee.cl.read,write:ee.cl.write}})],t.prototype,"interpolation",void 0),(0,m._)([(0,f.Cb)()],t.prototype,"minScale",void 0),(0,m._)([(0,N.r)("service","minScale")],t.prototype,"readMinScale",null),(0,m._)([(0,f.Cb)()],t.prototype,"maxScale",void 0),(0,m._)([(0,N.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,m._)([(0,f.Cb)({type:K.Z})],t.prototype,"mosaicRule",null),(0,m._)([(0,N.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,m._)([(0,w.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,m._)([(0,f.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,m._)([(0,f.Cb)({type:en.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,m._)([(0,f.Cb)({json:{type:T.z8}})],t.prototype,"noData",void 0),(0,m._)([(0,w.c)("noData")],t.prototype,"writeNoData",null),(0,m._)([(0,f.Cb)({type:String,json:{type:ee.kQ.jsonValues,read:ee.kQ.read,write:ee.kQ.write}})],t.prototype,"noDataInterpretation",void 0),(0,m._)([(0,f.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,m._)([(0,N.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,m._)([(0,f.Cb)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,m._)([(0,f.Cb)({})],t.prototype,"typeIdField",void 0),(0,m._)([(0,f.Cb)({})],t.prototype,"types",void 0),(0,m._)([(0,f.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,m._)([(0,f.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,m._)([(0,f.Cb)()],t.prototype,"raster",void 0),(0,m._)([(0,f.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,m._)([(0,N.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,m._)([(0,f.Cb)()],t.prototype,"viewId",void 0),(0,m._)([(0,f.Cb)()],t.prototype,"renderer",null),(0,m._)([(0,f.Cb)({types:eh.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:eh.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"internalRenderer",null),(0,m._)([(0,N.r)("internalRenderer")],t.prototype,"readRenderer",null),(0,m._)([(0,w.c)("internalRenderer")],t.prototype,"writeRenderer",null),(0,m._)([(0,f.Cb)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,m._)([(0,f.Cb)(Z.Oh)],t.prototype,"opacity",void 0),(0,m._)([(0,f.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,m._)([(0,f.Cb)({constructOnly:!0}
1)],t.prototype,"rasterFunctionInfos",void 0),(0,m._)([(0,f.Cb)({type:V.Z,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,m._)([(0,N.r)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,m._)([(0,f.Cb)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,m._)([(0,f.Cb)({readOnly:!0,type:P.Z})],t.prototype,"spatialReference",void 0),(0,m._)([(0,N.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,m._)([(0,f.Cb)({type:ee.sM.apiValues,json:{read:ee.sM.read,type:ee.sM.jsonValues}})],t.prototype,"pixelType",void 0),(0,m._)([(0,w.c)("pixelType")],t.prototype,"writePixelType",null),(0,m._)([(0,f.Cb)({constructOnly:!0,type:el.Z})],t.prototype,"serviceRasterInfo",void 0),(0,m._)([(0,f.Cb)()],t.prototype,"sourceJSON",void 0),(0,m._)([(0,f.Cb)(Z.HQ)],t.prototype,"url",void 0),(0,m._)([(0,f.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,m._)([(0,N.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,m._)([(0,v.j)("esri.layers.mixins.ArcGISImageService")],t)};var t$=i(66322),tW=i(46661),tY=i(69107),tX=i(41606),tK=i(74412),t0=i(6666),t1=i(90101),t2=i(77333),t3=i(26838),t5=i(72665),t8=i(19805),t4=i(20590),t6=i(72242);let t9=class extends(0,tW.h7)((0,t5.n)((0,t3.M)((0,tX.q)((0,tK.I)((0,t1.Z)(tH((0,t0.f)((0,t2.Q)((0,tY.N)((0,t$.Y)((0,y.R)(d.Z.ClonableMixin(R.Z))))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,g.Ds)(async(e,t,r)=>{let{save:s,saveAs:n}=await i.e(1512).then(i.bind(i,1512));switch(e){case t6.x.SAVE:return s(this,t);case t6.x.SAVE_AS:return n(this,r,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){let t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(g.r9).then(()=>this._fetchService(t))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,i){let 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){let{rasterFields:t}=this,i=new Set,r=eo.commonRasterFieldNames.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=eo.aW.toLowerCase(),a=`${eo.commonRasterFieldNames.servicePixelValue.toLowerCase()}.`;for(let e of t){let t=e.name.toLowerCase();t===r||t.startsWith(a)||s&&t.startsWith(n)||i.add(e.name)}let o=(0,t4.eZ)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:l}=this;return o?.fieldInfos&&l&&(0,eo.hK)(o.fieldInfos,l),o}queryFeatures(e,t){return this.queryRasters(e,t).then(e=>{if(e?.features)for(let 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(t6.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(t6.x.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,t8.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){let e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new h.Z("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,m._)([(0,f.Cb)(Z.rn)],t9.prototype,"legendEnabled",null),(0,m._)([(0,f.Cb)({type:["show","hide"]})],t9.prototype,"listMode",null),(0,m._)([(0,f.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],t9.prototype,"isReference",void 0),(0,m._)([(0,f.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],t9.prototype,"operationalLayerType",void 0),(0,m._)([(0,w.c)("web-map","operationalLayerType")],t9.prototype,"writeOperationalLayerType",null),(0,m._)([(0,f.Cb)(Z.C_)],t9.prototype,"popupEnabled",void 0),(0,m._)([(0,f.Cb)({type:c.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],t9.prototype,"popupTemplate",void 0),(0,m._)([(0,f.Cb)({readOnly:!0})],t9.prototype,"defaultPopupTemplate",null),(0,m._)([(0,f.Cb)({readOnly:!0,json:{read:!1}})],t9.prototype,"type",void 0),(0,m._)([(0,f.Cb)({readOnly:!0})],t9.prototype,"_isPreviewLayer",null);let t7=t9=(0,m._)([(0,v.j)("esri.layers.ImageryLayer")],t9)},38557:function(e,t,i){i.d(t,{S6:function(){return o},u_:function(){return a}});var r=i(63592),s=i(97683),n=i(86188);class a{constructor(e=null,t={},i,r,s=0){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=r,this.displayId=s}static fromJSON(e){let t=e.geometry?n.Z.fromJSON(e.geometry):null,i=e.centroid?n.Z.fromJSON(e.centroid):null,r=e.objectId;return new a(t,e.attributes,i,r)}weakClone(){let e=new a(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e}clone(){let e=new a(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId);return e.displayId=this.displayId,e}ensureCentroid(e){return this.centroid??=(0,s.Y)(new n.Z,this.geometry,e.hasZ,e.hasM),this.centroid}get usedMemory(){return 128+(0,r.F$)(this.attributes)+(this.geometry?.usedMemory??0)}}function o(e){return!!e.geometry?.coords?.length}},34482:function(e,t,i){i.d(t,{Z:function(){return r}});
1class r{constructor(){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(){let e=new r;return 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}}},86188:function(e,t,i){i.d(t,{Z:function(){return s}});var r=i(63592);class s{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new s(e.lengths,e.coords)}static fromRect(e){let[t,i,r,n]=e,a=r-t,o=n-i;return new s([5],[t,i,a,0,0,o,-a,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce((e,t)=>e+t)}get usedMemory(){return 64+(0,r.G7)(this.lengths,this.coords)}area(){let e=0,t=0;if(!this.lengths.length)return 0;for(let i=0;i<this.lengths.length;i++){let r=this.lengths[i];if(r<3)continue;let s=this.coords[2*t],n=this.coords[2*t+1];for(let i=1;i<r;i+=1){let r=this.coords[2*(i+t)],a=this.coords[2*(i+t)+1];e+=-.5*(r-s)*(a+n),s=r,n=a}t+=r}return e}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let i=0;i<this.lengths.length;i++){let r=this.lengths[i];for(let i=0;i<r;i++)e(this.coords[2*(i+t)],this.coords[2*(i+t)+1]);t+=r}}deltaDecode(){let e=this.clone(),{coords:t,lengths:i}=e,r=0;for(let e of i){for(let i=1;i<e;i++)t[2*(r+i)]+=t[2*(r+i)-2],t[2*(r+i)+1]+=t[2*(r+i)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new s([],[this.coords[0],this.coords[1]]);let t=(0===this.lengths.length?1:this.lengths.reduce((e,t)=>e+t))*2,i=this.coords.slice(0,t);return e?(e.set(i),new s(this.lengths,e)):new s(Array.from(this.lengths),Array.from(i))}}},97683:function(e,t,i){function r(e,t){return e?t?4:3:t?3:2}function s(e,t,i,s){if(!t?.lengths.length)return null;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);let n=e.coords,a=[],o=i?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:l,coords:u}=t,p=r(i,s),m=0;for(let e of l){let t=function(e,t,i,s,n,a){let o=r(n,a),l=i,u=i+o,p=0,m=0,c=0,d=0,h=0;for(let i=0,r=s-1;i<r;i++,l+=o,u+=o){let i=t[l],r=t[l+1],s=t[l+2],a=t[u],o=t[u+1],y=t[u+2],g=i*o-a*r;d+=g,p+=(i+a)*g,m+=(r+o)*g,n&&(g=i*y-a*s,c+=(s+y)*g,h+=g),i<e[0]&&(e[0]=i),i>e[1]&&(e[1]=i),r<e[2]&&(e[2]=r),r>e[3]&&(e[3]=r),n&&(s<e[4]&&(e[4]=s),s>e[5]&&(e[5]=s))}if(d>0&&(d*=-1),h>0&&(h*=-1),!d)return null;let y=[p,m,.5*d];return n&&(y[3]=c,y[4]=.5*h),y}(o,u,m,e,i,s);t&&a.push(t),m+=e*p}if(a.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&i&&(r=e[4]-t[4]),r}),a.length){let e=6*a[0][2];n[0]=a[0][0]/e,n[1]=a[0][1]/e,i&&(e=6*a[0][4],n[2]=0!==e?a[0][3]/e:0),(n[0]<o[0]||n[0]>o[1]||n[1]<o[2]||n[1]>o[3]||i&&(n[2]<o[4]||n[2]>o[5]))&&(n.length=0)}if(!n.length){let e=t.lengths[0]?function(e,t,i,s,n){let a=r(s,n),o=0,l=0+a,u=0,p=0,m=0,c=0;for(let t=0,r=i-1;t<r;t++,o+=a,l+=a){let t=e[o],i=e[o+1],r=e[o+2],n=e[l],a=e[l+1],d=e[l+2],h=s?function(e,t,i,r,s,n){let a=r-e,o=s-t,l=n-i;return Math.sqrt(a*a+o*o+l*l)}(t,i,r,n,a,d):function(e,t,i,r){let s=i-e,n=r-t;return Math.sqrt(s*s+n*n)}(t,i,n,a);if(h){if(u+=h,s){let e=[t+.5*(n-t),i+.5*(a-i),r+.5*(d-r)];p+=h*e[0],m+=h*e[1],c+=h*e[2]}else{let e=[t+.5*(n-t),i+.5*(a-i)];p+=h*e[0],m+=h*e[1]}}}return u>0?s?[p/u,m/u,c/u]:[p/u,m/u]:i>0?s?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}(u,0,l[0],i,s):null;if(!e)return null;n[0]=e[0],n[1]=e[1],i&&e.length>2&&(n[2]=e[2])}return e}i.d(t,{Y:function(){return s}})},90101:function(e,t,i){i.d(t,{Z:function(){return c}});var r=i(73322),s=i(86652);i(95263),i(58583),i(42082);var n=i(18301),a=i(57864),o=i(94931),l=i(58413),u=i(7669),p=i(9647);let m=class extends a.Z.ClonableMixin(o.Z){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,r._)([(0,s.Cb)({type:String,json:{write:{isRequired:!0}}})],m.prototype,"name",void 0),(0,r._)([(0,s.Cb)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}
1),(0,u.J)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],m.prototype,"method",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:{isRequired:!0}}})],m.prototype,"value",void 0),(0,r._)([(0,s.Cb)({type:[l.z8],json:{write:{isRequired:!0}}})],m.prototype,"bandIds",void 0),(0,r._)([(0,s.Cb)({types:p.dr,json:{write:!0,origins:{"web-scene":{types:p.FK,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],m.prototype,"renderer",void 0),m=(0,r._)([(0,n.j)("esri.renderers.support.RasterPresetRenderer")],m);let c=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,r._)([(0,s.Cb)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,r._)([(0,s.Cb)({type:[m],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,r._)([(0,n.j)("esri.layers.mixins.RasterPresetRendererMixin")],t)}},89433:function(e,t,i){i.d(t,{V:function(){return a},g:function(){return n}});var r=i(21670),s=i(4580);async function n(e,t,i){let n;try{n=await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(i),n}async function a(e,t,i,n,a){let o;try{o=await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load tile ${t}/${i}/${n}`,{error:e,level:t,row:i,col:n})}return(0,s.k_)(a),o}},26290:function(e,t,i){i.d(t,{Nb:function(){return d},gh:function(){return c},n$:function(){return h}});var r=i(63895),s=i(47259),n=i(79482),a=i(93271),o=i(49517),l=i(44018),u=i(33521),p=i(67530);async function m(e,t,i){let m=(0,u.en)(e),{rasterFunction:c,sourceJSON:d}=t||{},h=c?JSON.stringify(c.rasterFunctionDefinition||c):null,y=(0,u.cv)({...m.query,renderingRule:h,f:"json"}),g=(0,u.lA)(y,i);e=m.path;let f=d||await (0,r.Z)(e,g).then(e=>e.data),b=f.hasRasterAttributeTable?(0,r.Z)(`${e}/rasterAttributeTable`,g):null,v=f.hasColormap?(0,r.Z)(`${e}/colormap`,g):null,w=f.hasHistograms?(0,r.Z)(`${e}/histograms`,g):null,R=f.currentVersion>=10.3?(0,r.Z)(`${e}/keyProperties`,g):null,_=f.hasMultidimensions?(0,r.Z)(`${e}/multidimensionalInfo`,g):null,C=await Promise.allSettled([b,v,w,R,_]),S=null;if(f.minValues&&f.minValues.length===f.bandCount){S=[];for(let e=0;e<f.minValues.length;e++)S.push({min:f.minValues[e],max:f.maxValues[e],avg:f.meanValues[e],stddev:f.stdvValues[e]})}let I=s.Z.fromJSON(f.extent),x=Math.ceil(I.width/f.pixelSizeX-.1),F=Math.ceil(I.height/f.pixelSizeY-.1),T=a.Z.fromJSON(f.spatialReference||f.extent.spatialReference),N="fulfilled"===C[0].status?C[0].value?.data:null,D=N?.features?.length?p.Z.fromJSON(N):null,j="fulfilled"===C[1].status?C[1].value?.data.colormap:null,P=j?.length?j:null,O="fulfilled"===C[2].status?C[2].value?.data.histograms:null,Z=O?.[0]?.counts?.length?O:null,M="fulfilled"===C[3].status?C[3].value?.data??{}:{},A="fulfilled"===C[4].status?C[4].value?.data.multidimensionalInfo:null,V=A?.variables?.length?A:null;
1V&&V.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});let{defaultVariable:J,serviceDataType:q}=f;J&&J!==M.DefaultVariable&&(M.DefaultVariable=J),q?.includes("esriImageServiceDataTypeVector")&&!q.includes(M.DataType)&&(M.DataType=q.replace("esriImageServiceDataType",""));let E=f.noDataValue;f.noDataValues?.length&&f.noDataValues.some(e=>e!==E)&&(E=f.noDataValues);let G=f.transposeInfo?new l.Z({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.Z({x:f.extent.xmin,y:f.extent.ymax,spatialReference:T}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(x,F))/Math.LN2-8)),transposeInfo:f.transposeInfo}):void 0;return new o.Z({width:x,height:F,bandCount:f.bandCount,extent:s.Z.fromJSON(f.extent),spatialReference:T,pixelSize:new n.Z({x:f.pixelSizeX,y:f.pixelSizeY,spatialReference:T}),pixelType:f.pixelType.toLowerCase(),statistics:S,attributeTable:D,colormap:P,histograms:Z,keyProperties:M,noDataValue:E,multidimensionalInfo:V,storageInfo:G})}function c(e,t,i){return m(e,{sourceJSON:t},i)}function d(e,t,i){return m(e,{rasterFunction:t},i)}function h(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},87525:function(e,t,i){i.d(t,{P:function(){return a}});var r=i(33521),s=i(78665),n=i(5829);async function a(e,t,i,a){let o=(0,r.en)(e),{data:l}=await (0,s.hH)(o,n.Z.from(t),i,a);return l.count}},50581:function(e,t,i){i.d(t,{G:function(){return a}});var r=i(33521),s=i(78665),n=i(5829);async function a(e,t,i,a){let o=(0,r.en)(e),{data:l}=await (0,s.Ev)(o,n.Z.from(t),i,a);return l.objectIds??function(e){if(e)return Array.isArray(e[0])?e.map(e=>JSON.stringify(e)):e}(l.uniqueIds)??[]}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.