????

Your IP : 13.58.192.154


Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/
Upload File :
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/66.d1132b57c6c83fcf1bc3.js

(function(){var e={"esri/tasks/ImageServiceIdentifyTask":"7ia+","esri/layers/ImageryLayer":"G5N4","esri/layers/mixins/ArcGISImageService":"Odfd","esri/tasks/support/ImageServiceIdentifyResult":"bllj","esri/tasks/support/ImageServiceIdentifyParameters":"nakx","esri/layers/support/MosaicRule":"ouPT","esri/layers/support/ExportImageServiceParameters":"sNli"},t=this||window,r=t.webpackJsonp=t.webpackJsonp||[];r.registerAbsMids?r.registerAbsMids(e):(r.absMidsWaiting=r.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{"7ia+":function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("zp6E"),r("LxLY"),r("Vx27"),r("fw2w"),r("FPqO"),r("bllj")],n=(function(e,t,r,i,n,o,a,s,l){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.execute=function(e,t){var o=this;return a.normalizeCentralMeridian(e.geometry?[e.geometry]:[]).then((function(a){var s=e.toJSON(),l=a&&a[0];n.isSome(l)&&(s.geometry=JSON.stringify(l.toJSON()));var p=o._encode(r.__assign(r.__assign({f:"json"},o.parsedUrl.query),s)),u=r.__assign(r.__assign({query:p},o.requestOptions),t);return i(o.parsedUrl.path+"/identify",u)})).then((function(e){return l.fromJSON(e.data)}))},r.__decorate([o.subclass("esri.tasks.ImageServiceIdentifyTask")],t)}(s)}).apply(null,i),void 0===n||(e.exports=n)},G5N4:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("ifLZ"),r("LxLY"),r("EUqE"),r("qMld"),r("Vx27"),r("0RER"),r("Odfd"),r("2fnV"),r("FEX1"),r("QJ8R"),r("WaJo"),r("OXmT"),r("c/mu"),r("EtsK"),r("begh")],n=(function(e,t,r,i,n,o,a,s,l,p,u,c,d,y,f,m,h,_){return function(e){function t(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=e.apply(this,t)||this;return i.legendEnabled=!0,i.isReference=null,i.operationalLayerType="ArcGISImageServiceLayer",i.popupEnabled=!0,i.popupTemplate=null,i.type="imagery",i}return r.__extends(t,e),t.prototype.normalizeCtorArgs=function(e,t){return"string"==typeof e?r.__assign({url:e},t):e},t.prototype.load=function(e){var t=this,r=n.isSome(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).then((function(){return t._fetchService(r)}),(function(){return t._fetchService(r)}))),a.resolve(this)},Object.defineProperty(t.prototype,"defaultPopupTemplate",{get:function(){return this.createPopupTemplate()},enumerable:!0,configurable:!0}),t.prototype.createPopupTemplate=function(e){var t=this.rasterFields,i=this.title,n=new Set,o=!1,a=!1;this.capabilities&&(a=(o=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0)&&("esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType));var s=new Set;o&&(s.add("raster.itempixelvalue"),a&&s.add("raster.magnitude").add("raster.direction"));for(var l=0,p=t;l<p.length;l++){var u=p[l],c=u.name.toLowerCase();s.has(c)||c.indexOf("raster.servicepixelvalue.")>-1||n.add(u.name)}return _.createPopupTemplate({fields:t,title:i},r.__assign(r.__assign({},e),{visibleFieldNames:n}))},t.prototype.redraw=function(){this.emit("redraw")},r.__decorate([s.property(h.legendEnabled)],t.prototype,"legendEnabled",void 0),r.__decorate([s.property({type:["show","hide"]})],t.prototype,"listMode",void 0),r.__decorate([s.property({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:function(){return{enabled:!1}}}}})],t.prototype,"isReference",void 0),r.__decorate([s.property({type:["ArcGISImageServiceLayer"]})],t.prototype,"operationalLayerType",void 0),r.__decorate([s.property(h.popupEnabled)],t.prototype,"popupEnabled",void 0),r.__decorate([s.property({type:i,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],t.prototype,"popupTemplate",void 0),r.__decorate([s.property({readOnly:!0,dependsOn:["fields","title"]})],t.prototype,"defaultPopupTemplate",null),r.__decorate([s.property({readOnly:!0,json:{read:!1}})],t.prototype,"type",void 0),r.__decorate([s.subclass("esri.layers.ImageryLayer")],t)}(m.TemporalLayer(y.RefreshableLayer(f.ScaleRangeLayer(c.OperationalLayer(d.PortalLayer(p.ArcGISImageService(u.ArcGISService(o.MultiOriginJSONMixin(l)))))))))}).apply(null,i),void 0===n||(e.exports=n)},Odfd:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("TMur"),r("jZlN"),r("+UAu"),r("zp6E"),r("ma1f"),r("ImIS"),r("rg9i"),r("qsST"),r("LxLY"),r("qMld"),r("jfWY"),r("Vx27"),r("1dvD"),r("EtsK"),r("7Rj3"),r("sNli"),r("KQcO"),r("I90O"),r("YM6P"),r("ouPT"),r("dXLH"),r("97bx"),r("Kjnw"),r("T/jF"),r("WSFd"),r("6PsE"),r("7ia+"),r("uajq"),r("w1v0"),r("nakx"),r("IpeC")],n=(function(e,t,r,i,n,o,a,s,l,p,u,c,d,y,f,m,h,_,g,v,b,R,x,w,I,S,O,N,T,P,j,M,J,F){Object.defineProperty(t,"__esModule",{value:!0});var D=u.getLogger("esri.layers.mixins.ArcGISImageService"),C=l.strict()({RSP_NearestNeighbor:"nearest",RSP_BilinearInterpolation:"bilinear",RSP_CubicConvolution:"cubic",RSP_Majority:"majority"}),V=l.strict()({esriNoDataMatchAny:"any",esriNoDataMatchAll:"all"}),A=l.strict()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"});t.ArcGISImageService=function(e){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._functionRasterInfos={},t._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},t._symbolizer=null,t._defaultServiceMosaicRule=null,t.rasterAttributeTableFieldPrefix="Raster.",t.adjustAspectRatio=null,t.bandCount=null,t.bandIds=void 0,t.capabilities=null,t.compressionQuality=void 0,t.compressionTolerance=.01,t.copyright=null,t.definitionExpression=null,t.exportImageServiceParameters=null,t.rasterInfo=null,t.fields=null,t.fullExtent=null,t.hasMultidimensions=!1,t.imageMaxHeight=4100,t.imageMaxWidth=4100,t.interpolation=void 0,t.multidimensionalInfo=null,t.noData=null,t.noDataInterpretation=void 0,t.objectIdField=null,t.pixelSizeX=null,t.pixelSizeY=null,t.pixelFilter=null,t.raster=void 0,t.viewId=void 0,t.renderer=null,t.rasterAttributeTable=null,t.rasterFunctionInfos=null,t.serviceDataType=null,t.spatialReference=null,t.pixelType=null,t.serviceRasterInfo=null,t.sourceJSON=null,t.url=null,t.version=null,t}return r.__extends(t,e),t.prototype.initialize=function(){this._set("exportImageServiceParameters",new g.ExportImageServiceParameters({layer:this}))},t.prototype.readDefaultServiceMosaicRule=function(e,t){return x.fromJSON(t)},Object.defineProperty(t.prototype,"rasterFunctionNamesIndex",{get:function(){var e=new Map;return!this.rasterFunctionInfos||this.rasterFunctionInfos.length<1||this.rasterFunctionInfos.forEach((function(t){e.set(t.name.toLowerCase().replace(/ /gi,"_"),t.name)})),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queryTask",{get:function(){return new j({url:this.url})},enumerable:!0,configurable:!0}),t.prototype.readBandIds=function(e,t){if(Array.isArray(e)&&e.length>0&&e.every((function(e){return"number"==typeof e})))return e},t.prototype.readCapabilities=function(e,t){return this._readCapabilities(t)},t.prototype.writeCompressionQuality=function(e,t,r){null!=e&&"lerc"!==this.format&&(t[r]=e)},t.prototype.writeCompressionTolerance=function(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)},Object.defineProperty(t.prototype,"fieldsIndex",{get:function(){return this.fields?new b(this.fields):null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"format",{get:function(){return this._get("format")||(null!=this.pixelFilter?"lerc":"jpgpng")},set:function(e){e&&["png","png8","png24","png32","jpg","bmp","jpgpng","lerc","tiff"].indexOf(e.toLowerCase())>-1&&this._set("format",e.toLowerCase())},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mosaicRule",{set:function(e){var t=e;t&&t.mosaicMethod&&(t=x.fromJSON(r.__assign(r.__assign({},t.toJSON()),{mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation}))),this._set("mosaicRule",t)},enumerable:!0,configurable:!0}),t.prototype.readMosaicRule=function(e,t){return x.fromJSON(e||t.mosaicRule||t)},t.prototype.writeMosaicRule=function(e,t,r){var i=this.mosaicRule,n=this.definitionExpression;i?n&&n!==i.where&&((i=i.clone()).where=n):n&&(i=new x({where:n})),this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())},t.prototype.writeNoData=function(e,t,r){null!=e&&"number"==typeof e&&(t[r]=e)},t.prototype.readObjectIdField=function(e,t){if(!e){var r=t.fields.filter((function(e){return"esriFieldTypeOID"===e.type||"oid"===e.type}));e=r&&r[0]&&r[0].name}return e},Object.defineProperty(t.prototype,"parsedUrl",{get:function(){return this.url?y.urlToObject(this.url):null},enumerable:!0,configurable:!0}),t.prototype.readRenderer=function(e,t,r){var i=o.read(t&&t.layerDefinition&&t.layerDefinition.drawingInfo&&t.layerDefinition.drawingInfo.renderer,r)||void 0;if(null!=i)return R.isSupportedRendererType(i)||D.warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),i},Object.defineProperty(t.prototype,"rasterFields",{get:function(){var e=this.rasterAttributeTableFieldPrefix||"Raster.",t=new v({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new v({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new v({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),n=this.fields?p.clone(this.fields):[];n.push(r),this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0&&n.push(t),this.version>=10.4&&this.rasterFunctionInfos&&this.rasterFunctionInfos.some((function(e){return"none"===e.name.toLowerCase()}))&&n.push(i),this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((function(e){return"none"!==e.name.toLowerCase()})).forEach((function(e){n.push(new v({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),null==this.pixelFilter||"esriImageServiceDataTypeVector-UV"!==this.serviceDataType&&"esriImageServiceDataTypeVector-MagDir"!==this.serviceDataType||(n.push(new v({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),n.push(new v({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));var o=this.rasterInfo.attributeTable&&this.rasterInfo.attributeTable.fields||null;if(o&&o.length>0){var a=o.filter((function(e){return"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase()})).map((function(t){var r=p.clone(t);return r.name=e+t.name,r}));n=n.concat(a)}return n},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderingRule",{set:function(e){var t=e;t&&t.rasterFunction&&(t=I.fromJSON(r.__assign(r.__assign({},t.toJSON()),{rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments}))),this._set("renderingRule",t)},enumerable:!0,configurable:!0}),t.prototype.readRenderingRule=function(e,t){var r=t.rasterFunctionInfos;return t.renderingRule||r&&r.length&&"None"!==r[0].name?I.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null},t.prototype.writeRenderingRule=function(e,t,r){this._isRFTJson(e)||(t[r]=e.toJSON())},t.prototype.readSpatialReference=function(e,t){var r=e||t.extent.spatialReference;return r?i.SpatialReference.fromJSON(r):null},t.prototype.readPixelType=function(e){return A.fromJSON(e)||e},t.prototype.writePixelType=function(e,t,r){(c.isNone(this.serviceRasterInfo)||this.pixelType!==this.serviceRasterInfo.pixelType)&&(t[r]=A.toJSON(e))},t.prototype.readVersion=function(e,t){var r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r},t.prototype.applyFilter=function(e){var t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t},t.prototype.applyRenderer=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,n,o,a,s;return r.__generator(this,(function(l){switch(l.label){case 0:return i=e,this._isPicture()||!this.renderer||!this._symbolizer||this.pixelFilter?[3,5]:(n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(this.renderer.toJSON()),a=this.bandIds,(o=this._rasterJobHandler.instance)?n?(this._symbolizer.bind(),[4,o.updateSymbolizer(this._symbolizer,t)]):[3,2]:[3,4]);case 1:l.sent(),this._cachedRendererJson=this.renderer.toJSON(),l.label=2;case 2:return[4,o.symbolize(r.__assign({bandIds:a},e),t)];case 3:return s=l.sent(),i={extent:e.extent,pixelBlock:s},[3,5];case 4:i={extent:e.extent,pixelBlock:this._symbolizer.symbolize(r.__assign({bandIds:a},e))},l.label=5;case 5:return[2,i]}}))}))},t.prototype.destroy=function(){this._shutdownJobHandler()},t.prototype.increaseRasterJobHandlerUsage=function(){this._rasterJobHandler.refCount++},t.prototype.decreaseRasterJobHandlerUsage=function(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()},t.prototype.fetchImage=function(e,t,r,i){var n=this;if(void 0===i&&(i={}),null==e||null==t||null==r)return d.reject(new s("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required."));var o=this.renderer||this._symbolizer?this.generateRasterInfo(this.renderingRule,{signal:i.signal}):null;return d.when(o).then((function(o){o&&(n.rasterInfo=o);var a={imageServiceParameters:n.getExportImageServiceParameters(e,t,r,i.timeExtent),imageProps:{extent:e,width:t,height:r,format:n.format},requestAsImageElement:i.requestAsImageElement&&!n.pixelFilter||!1,signal:i.signal};return n._requestArrayBuffer(a)}))},t.prototype.fetchKeyProperties=function(e){var t=e&&e.renderingRule&&e.renderingRule.toJSON();return a(this.parsedUrl.path+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3&&t?JSON.stringify(t):null})}).then((function(e){return e.data}))},t.prototype.fetchRasterAttributeTable=function(e){var t=e&&e.renderingRule&&e.renderingRule.toJSON();return this.version<10.1?d.reject(new s("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):a(this.parsedUrl.path+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3&&t?JSON.stringify(t):null})}).then((function(e){return M.fromJSON(e.data)}))},t.prototype.getCatalogItemRasterInfo=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,o,s,l,p;return r.__generator(this,(function(u){switch(u.label){case 0:return n=a(this.parsedUrl.path+"/"+e+"/info",r.__assign({query:this._getQueryParams()},t)).then((function(e){return e.data})),o=a(this.parsedUrl.path+"/"+e+"/info/keyProperties",r.__assign({query:this._getQueryParams()},t)).then((function(e){return e.data})).catch((function(){})),[4,d.all([n,o])];case 1:return(s=u.sent())[0]?(l=i.Extent.fromJSON(s[0].extent),p=s[0].statistics?s[0].statistics.map((function(e){return{min:e[0],max:e[1],avg:e[2],stddev:e[3]}})):null,[2,new S({bandCount:s[0].bandCount,extent:l,spatialReference:l.sr,pixelSize:new i.Point({x:s[0].pixelSizeX,y:s[0].pixelSizeY,spatialReference:l.sr}),pixelType:s[0].pixelType.toLowerCase(),statistics:p,histograms:s[0].histograms,keyProperties:s[1]})]):[2,void 0]}}))}))},t.prototype.getCatalogItemICSInfo=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var n,o,s,l,p,u,c,y,f,m,h,_,g,v,b,R,x,w,I,S,O,N,T,P,j,M,J,F,D,C;return r.__generator(this,(function(V){switch(V.label){case 0:return[4,a(this.parsedUrl.path+"/"+e+"/info/ics",r.__assign({query:this._getQueryParams()},t))];case 1:if(n=V.sent().data,!(o=n&&n.ics))return[2,void 0];s=null,V.label=2;case 2:return V.trys.push([2,4,,5]),[4,a(this.parsedUrl.path+"/"+e+"/info",r.__assign({query:this._getQueryParams()},t))];case 3:return l=V.sent(),s=l.data.extent,[3,5];case 4:return V.sent(),[3,5];case 5:if(!s||!s.spatialReference)return[2,{ics:o,icsToPixelTransform:null,icsExtent:null,northDirection:null}];for(p=this.version>=10.7?a(this.parsedUrl.path+"/"+e+"/info/icstopixel",r.__assign({query:this._getQueryParams()},t)).then((function(e){return e.data})).catch((function(){return{}})):{},u=s.spatialReference,c={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:u.wkid||u,outSR:"0:"+e},y=a(this.parsedUrl.path+"/project",r.__assign({query:this._getQueryParams(c)},t)).then((function(e){return e.data})).catch((function(){return{}})),m=(s.xmin+s.xmax)/2,_=s.ymin+(h=(s.ymax-s.ymin)/(1+(f=5))),g=[],M=0;M<f;M++)g.push({x:m,y:_+h*M});return v={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:g}),inSR:u.wkid||u,outSR:"0:"+e},b=a(this.parsedUrl.path+"/project",r.__assign({query:this._getQueryParams(v)},t)).then((function(e){return e.data})).catch((function(){return{}})),[4,d.all([p,y,b])];case 6:if(R=V.sent(),null==(x=R[0].ipxf)&&(w=o.geodataXform&&o.geodataXform.xf_0)&&"topup"===w.name.toLowerCase()&&(x={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:w.coefficients,cellsizeRatio:0,type:"GeometricXform"}}),(I=i.Extent.fromJSON(R[1]&&R[1].geometries&&R[1].geometries[0]))&&(I.spatialReference=new i.SpatialReference({wkid:0,imageCoordinateSystem:o})),S=R[2].geometries?R[2].geometries.filter((function(e){return null!=e})):[],(O=S.length)<3)return[2,{ics:o,icsToPixelTransform:x,icsExtent:I,northDirection:null}];for(N=0,T=0,P=0,j=0,M=0;M<O;M++)N+=S[M].x,T+=S[M].y,P+=S[M].x*S[M].x,j+=S[M].x*S[M].y;return F=0,D=S[f-1].x>S[0].x,C=S[f-1].y>S[0].y,(J=(O*j-N*T)/(O*P-N*N))==1/0?F=C?90:270:0===J?F=D?0:180:J>0?F=D?180*Math.atan(J)/Math.PI:180*Math.atan(J)/Math.PI+180:J<0&&(F=C?180+180*Math.atan(J)/Math.PI:360+180*Math.atan(J)/Math.PI),[2,{ics:o,icsToPixelTransform:x,icsExtent:I,northDirection:F}]}}))}))},t.prototype.generateRasterInfo=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,n;return r.__generator(this,(function(r){switch(r.label){case 0:if((!e||"none"===e.functionName.toLowerCase())&&c.isSome(this.serviceRasterInfo))return[2,this.serviceRasterInfo];if(i=function(e){if(!e)return null;var t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),r=null==t?void 0:t.map((function(e){return e.replace('"rasterFunction":"',"").replace('"',"")}));return r?r.join("/"):null}(e),this._functionRasterInfos[i])return[2,this._functionRasterInfos[i]];n=this._generateRasterInfo(e,t),this._functionRasterInfos[i]=n,r.label=1;case 1:return r.trys.push([1,3,,4]),[4,n];case 2:return[2,r.sent()];case 3:return r.sent(),this._functionRasterInfos[i]=null,[2,null];case 4:return[2]}}))}))},t.prototype.getExportImageServiceParameters=function(e,t,i,n){var o,a=(e=e.clone().shiftCentralMeridian()).spatialReference;if(a.imageCoordinateSystem){var s=a.imageCoordinateSystem,l=s.id,p=s.referenceServiceName;o=null!=l?p?this.parsedUrl.path.toLowerCase().indexOf("/"+p.toLowerCase()+"/")>-1?"0:"+l:JSON.stringify({icsid:l,icsns:p}):"0:"+l:JSON.stringify({ics:a.imageCoordinateSystem})}else o=a.wkid||JSON.stringify(a.toJSON());c.isSome(this.serviceRasterInfo)&&this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);var u=this.exportImageServiceParameters.toJSON(),d=u.bandIds,y=u.noData,f=u.mosaicRule,m=u.renderingRule;d instanceof Array&&d.length>0&&(u.bandIds=d.join(",")),y instanceof Array&&y.length>0&&(u.noData=y.join(","));var h=this.timeInfo;f&&f.multidimensionalDefinition&&n&&h&&h.startField&&(f.multidimensionalDefinition=f.multidimensionalDefinition.filter((function(e){return e.dimensionName!==h.startField}))),u.mosaicRule=f&&JSON.stringify(f),u.renderingRule=m&&JSON.stringify(m);var _={};if(n){var g=n.toJSON(),v=g.start,b=g.end;v&&b&&v===b?_.time=""+v:null==v&&null==b||(_.time=(null==v?"null":v)+","+(null==b?"null":b))}return r.__assign(r.__assign({bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:o,imageSR:o,size:t+","+i},u),_)},t.prototype.queryRasters=function(e){return this.queryTask.execute(e)},t.prototype.queryVisibleRasters=function(e,t){var r=this;if(!e)return d.reject(new s("imagery-layer: query-visible-rasters","missing query parameter"));var n=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1},o=n.pixelSize,a=n.returnDomainValues,l=n.returnTopmostRaster,p=n.showNoDataRecords,u=!1,c=null,y=null,f=this.rasterFunctionNamesIndex;if(e.outFields&&(u=e.outFields.some((function(e){return-1===e.toLowerCase().indexOf("raster.servicepixelvalue")})),this.version>=10.4)){var m=e.outFields.filter((function(e){return e.toLowerCase().indexOf("raster.servicepixelvalue")>-1&&e.length>24})).map((function(e){var t=e.slice(25);return[r._updateRenderingRulesFunctionName(t,f),t]}));c=m.map((function(e){return new I({functionName:e[0]})})),y=m.map((function(e){return e[1]})),0===c.length?this.renderingRule?(c.push(this.renderingRule),y.push(this.renderingRule.functionName)):c=null:this.renderingRule&&!c.some((function(e){return e.functionName===r.renderingRule.functionName}))&&(c.push(this.renderingRule),y.push(this.renderingRule.functionName))}var h=!e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),_=this._getQueryParams({geometry:e.geometry,timeExtent:e.timeExtent,mosaicRule:this.exportImageServiceParameters.mosaicRule,renderingRule:this.version<10.4?this.renderingRule:null,renderingRules:c,pixelSize:o,returnCatalogItems:u,returnGeometry:h,maxItemCount:l?1:null});delete _.f;var g=new J(_),v=new P({url:this.url}),b=this.generateRasterInfo(this.renderingRule);return d.create((function(t){b.then((function(){v.execute(g).then((function(n){var o=e.outFields;if(u&&!h&&n.catalogItems&&n.catalogItems.features&&n.catalogItems.features.length>0){var l=r.objectIdField||"ObjectId",c=n.catalogItems.features,d=c.map((function(e){return e.attributes&&e.attributes[l]})),f=new F({objectIds:d,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]});return r.queryRasters(f).then((function(s){s&&s.features&&s.features.length>0&&s.features.forEach((function(t){c.forEach((function(r){r.attributes[l]===t.attributes[l]&&(r.geometry=new i.Polygon(t.geometry),r.geometry.spatialReference=e.outSpatialReference)}))})),t(r._processVisibleRastersResponse(n,{returnDomainValues:a,templateRRFunctionNames:y,showNoDataRecords:p,templateFields:o}))})).catch((function(){throw new s("imagery-layer:query-visible-rasters","encountered error when querying visible rasters geometry")}))}t(r._processVisibleRastersResponse(n,{returnDomainValues:a,templateRRFunctionNames:y,showNoDataRecords:p,templateFields:o}))})).catch((function(){throw new s("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}))}))}))},t.prototype._fetchService=function(e){var t;return r.__awaiter(this,void 0,void 0,(function(){var i,n,o,l,p,u=this;return r.__generator(this,(function(r){switch(r.label){case 0:return(i=this.sourceJSON)?[3,2]:[4,a(this.parsedUrl.path,{query:this._getQueryParams(),signal:e})];case 1:n=r.sent(),o=n.ssl,this.sourceJSON=i=n.data,o&&(this.url=this.url.replace(/^http:/i,"https:")),r.label=2;case 2:if((null===(t=i.capabilities)||void 0===t?void 0:t.toLowerCase().split(",").map((function(e){return e.trim()})).indexOf("tilesonly"))>-1)throw new s("imagery-layer:fetch-metadata","use ImageryTileLayer to open tiles-only image services");return this.read(i,{origin:"service",url:this.parsedUrl}),c.isSome(this.serviceRasterInfo)&&!this.rasterInfo&&(this.rasterInfo=this.serviceRasterInfo),l=c.isSome(this.serviceRasterInfo)?d.resolve(this.serviceRasterInfo):this._fetchAuxiliaryRasterInfo({serviceInfo:i,signal:e}).then((function(e){return u._set("serviceRasterInfo",e),e})),p=this.renderingRule&&"none"!==this.renderingRule.functionName.toLowerCase()?this.generateRasterInfo(this.renderingRule,{signal:e}):null,[2,d.all([l,p]).then((function(e){u._set("rasterInfo",e[1]?e[1]:e[0]),u._configDefaultRenderer(),u.watch("renderer",(function(){return u._configDefaultRenderer()})),u.watch("renderingRule",(function(e){(u.renderer||u._symbolizer||u.popupEnabled&&u.popupTemplate)&&u.generateRasterInfo(e).then((function(e){e&&(u.rasterInfo=e)}))}));var t=c.isSome(u.serviceRasterInfo)&&u.serviceRasterInfo.multidimensionalInfo;t&&u._updateMultidimensionalDefinition(t)}))]}}))}))},t.prototype._initJobHandler=function(){return r.__awaiter(this,void 0,void 0,(function(){var e,t=this;return r.__generator(this,(function(r){switch(r.label){case 0:return null!=this._rasterJobHandler.connectionPromise?[2,this._rasterJobHandler.connectionPromise]:(e=new O,this._rasterJobHandler.connectionPromise=e.initialize().then((function(){t._rasterJobHandler.instance=e}),(function(){return null})),[4,this._rasterJobHandler.connectionPromise]);case 1:return r.sent(),[2]}}))}))},t.prototype._shutdownJobHandler=function(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0},t.prototype._isPicture=function(){return!this.format||this.format.indexOf("jpg")>-1||this.format.indexOf("png")>-1},t.prototype._configDefaultRenderer=function(){if(!this._isPicture()&&!this.pixelFilter){if(!this.bandIds&&this.rasterInfo.bandCount>=3){var e=R.getDefaultBandCombination(this.rasterInfo);!e||3===this.rasterInfo.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}this.renderer||(this.renderer=R.createDefaultRenderer(this.rasterInfo,this.bandIds)),this._symbolizer?(this._symbolizer.renderer=this.renderer,this._symbolizer.rasterInfo=this.rasterInfo):this._symbolizer=new T({renderer:this.renderer,rasterInfo:this.rasterInfo}),this._symbolizer.bind()||(this._symbolizer=null)}},t.prototype._clonePixelData=function(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:e.pixelBlock&&e.pixelBlock.clone()}},t.prototype._getQueryParams=function(e){return r.__assign({raster:this.raster,viewId:this.viewId,f:"json"},e)},t.prototype._decodePixelBlock=function(e,t,r){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):N.decode(e,t,r)},t.prototype._fetchAuxiliaryRasterInfo=function(e){var t=e&&e.serviceInfo;if(!t)return d.reject(new s("imagery-layer:fetch-metadata","valid serviceInfo is required"));var r=e.renderingRule?JSON.stringify(e.renderingRule.toJSON()):null,n=e.signal,o=!!(t.hasRasterAttributeTable&&this.version>=10.1)&&a(this.parsedUrl.path+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.1?r:null}),signal:n}).then((function(e){return M.fromJSON(e.data)})).catch((function(){return null})),l=!!(t.hasColormap&&this.version>=10.1)&&a(this.parsedUrl.path+"/colormap",{query:this._getQueryParams({renderingRule:this.version>=10.6?r:null}),signal:n}).then((function(e){return e.data&&e.data.colormap})),p=!!(t.hasHistograms&&this.version>=10.1)&&a(this.parsedUrl.path+"/histograms",{query:this._getQueryParams({renderingRule:this.version>=10.1?r:null}),signal:n}).then((function(e){return e.data&&e.data.histograms})),u=this.version>=10.3&&a(this.parsedUrl.path+"/keyProperties",{query:this._getQueryParams({renderingRule:r}),signal:n}).then((function(e){return e.data})).catch((function(){})),c=!!(t.hasMultidimensions&&this.version>=10.3)&&a(this.parsedUrl.path+"/multidimensionalInfo",{query:this._getQueryParams(),signal:n}).then((function(e){return e.data&&e.data.multidimensionalInfo}));return d.all([o,l,p,u,c]).then((function(e){var r=null;if(t.minValues&&t.minValues.length===t.bandCount){r=[];for(var n=0;n<t.minValues.length;n++)r.push({min:t.minValues[n],max:t.maxValues[n],avg:t.meanValues[n],stddev:t.stdvValues[n]})}var o=Math.ceil((t.extent.xmax-t.extent.xmin)/t.pixelSizeX-.1),a=Math.ceil((t.extent.ymax-t.extent.ymin)/t.pixelSizeY-.1),s=i.SpatialReference.fromJSON(t.spatialReference||t.extent.spatialReference);return new S({width:o,height:a,bandCount:t.bandCount,extent:i.Extent.fromJSON(t.extent),spatialReference:s,pixelSize:new i.Point({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:s}),pixelType:t.pixelType.toLowerCase(),statistics:r,attributeTable:e[0]||null,colormap:e[1]||null,histograms:e[2]||null,keyProperties:e[3]||null,multidimensionalInfo:e[4]||null})}))},t.prototype._requestArrayBuffer=function(e){var t=this,i=e.imageProps,n=e.signal;if(e.requestAsImageElement&&!this.pixelFilter&&i.format&&i.format.indexOf("png")>-1)return a(this.parsedUrl.path+"/exportImage",{responseType:"image",query:this._getQueryParams(r.__assign({f:"image"},e.imageServiceParameters)),signal:n}).then((function(e){return{imageElement:e.data,params:i}}));var o=this._initJobHandler(),l=a(this.parsedUrl.path+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams(r.__assign({f:"image"},e.imageServiceParameters)),signal:n});return d.all([l,o]).then((function(e){var o=e[0].data,a=i.format||"jpgpng",l=a;if("bsq"!==l&&"bip"!==l&&(l=N.getFormat(o)),!l)throw new s("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(o)));var p=a.indexOf("png")>-1&&("png"===l||"jpg"===l),u={signal:n};return p?N.decode(o,r.__assign({useCanvas:!0},i),u).then((function(e){return{pixelData:{pixelBlock:e,extent:i.extent},params:i}})):t._decodePixelBlock(o,{width:i.width,height:i.height,planes:null,pixelType:null,noDataValue:null,format:a},u).then((function(e){return{pixelData:{pixelBlock:e,extent:i.extent},params:i}}))}))},t.prototype._generateRasterInfo=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i;return r.__generator(this,(function(n){switch(n.label){case 0:return[4,a(this.parsedUrl.path,r.__assign({query:this._getQueryParams({renderingRule:e})},t))];case 1:return i=n.sent().data,[4,this._fetchAuxiliaryRasterInfo(r.__assign({serviceInfo:i,renderingRule:e},t))];case 2:return[2,n.sent()]}}))}))},t.prototype._isValidCustomizedMosaicRule=function(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this._defaultServiceMosaicRule&&this._defaultServiceMosaicRule.toJSON())},t.prototype._updateMultidimensionalDefinition=function(e){if(!this._isValidCustomizedMosaicRule(this.mosaicRule)){var t=e.variables[0].dimensions,r=[];for(var i in t)if(t.hasOwnProperty(i)){var n=t[i],o=n.extent,a=!0,s=[o[0]];n.hasRanges&&!0===n.hasRanges?(a=!1,s=[n.values[0]]):"stdz"===n.name.toLowerCase()&&Math.abs(o[1])<=Math.abs(o[0])&&(s=[o[1]]),r.push(new _({variableName:"",dimensionName:t[i].name,isSlice:a,values:s}))}if(r.length>0){this.mosaicRule=this.mosaicRule||new x;var l=this.mosaicRule.multidimensionalDefinition;(!l||l&&l.length<=0)&&(this.mosaicRule.multidimensionalDefinition=r)}}},t.prototype._formatAttributeValue=function(e,t){if("string"==typeof e){var r=this._getFieldInfo(this.popupTemplate&&this.popupTemplate.fieldInfos,t),i=r&&r.format;if(i){var n=void 0,o=void 0;return e.trim().indexOf(",")>-1?(o=(n=",")+" ",this._formatDelimitedString(e,n,o,i)):e.trim().indexOf(" ")>-1?(n=o=" ",this._formatDelimitedString(e,n,o,i)):this._formatNumberFromString(e,i)}}return e},t.prototype._getFieldInfo=function(e,t){if(e&&e.length&&t){var r=t.toLowerCase(),i=void 0;return e.some((function(e){return!(!e.fieldName||e.fieldName.toLowerCase()!==r&&e.fieldName.toLowerCase()!==r.replace(/ /g,"_")||(i=e,0))})),i}},t.prototype._formatDelimitedString=function(e,t,r,i){var n=this;return e&&t&&r&&i?e.trim().split(t).map((function(e){return n._formatNumberFromString(e,i)})).join(r):e},t.prototype._formatNumberFromString=function(e,t){if(!e||!t)return e;var r=Number(e);return isNaN(r)?e:t.format(r)},t.prototype._processVisibleRastersResponse=function(e,t){var r,i,o,a=e.value,s=(t=t||{}).templateRRFunctionNames,l=t.showNoDataRecords,p=t.returnDomainValues,u=t.templateFields,d=e.processedValues,y=e.catalogItems&&e.catalogItems.features,f=e.properties&&e.properties.Values&&e.properties.Values.map((function(e){return e.replace(/ /gi,", ")}))||[],m=this.objectIdField||"ObjectId",h="string"==typeof a&&a.toLowerCase().indexOf("nodata")>-1,_=[];if(a&&!y&&!h){var g={};g[m]=0,f=[a],y=[new n(this.fullExtent,null,g)]}if(!y)return[];this._updateResponseFieldNames(y,u);for(var v=0;v<y.length;v++){if(r=y[v],null!=a&&!h){if(i=f[v],o=this.renderingRule&&d&&d.length>0&&s&&s.length>0&&s.indexOf(this.renderingRule.functionName)>-1?d[s.indexOf(this.renderingRule.functionName)]:a,"nodata"===i.toLowerCase()&&!l)continue;r.attributes["Raster.ItemPixelValue"]=this._formatAttributeValue(i,"Raster.ItemPixelValue"),r.attributes["Raster.ServicePixelValue"]=this._formatAttributeValue(o,"Raster.ServicePixelValue"),this._updateFeatureWithMagDirValues(r,i);var b=this.fields&&this.fields.length>0,R=this.renderingRule&&c.isSome(this.serviceRasterInfo)&&this.serviceRasterInfo.attributeTable?b?i:a:o;this.renderingRule||(R=b?i:a),this._updateFeatureWithRasterAttributeTableValues(r,R)}if(r.sourceLayer=this,p&&this._updateFeatureWithDomainValues(r),s&&d&&s.length===d.length)for(var x=0;x<s.length;x++){var w="Raster.ServicePixelValue."+s[x];r.attributes[w]=this._formatAttributeValue(d[x],w)}_.push(y[v])}return _},t.prototype._updateFeatureWithRasterAttributeTableValues=function(e,t){var r=this,i=this.rasterInfo&&this.rasterInfo.attributeTable||c.isSome(this.serviceRasterInfo)&&this.serviceRasterInfo.attributeTable,n=i&&i.features;if(n){var o=i.fields,a=o.map((function(e){return e.name})).filter((function(e){return"value"===e.toLowerCase()})),s=a&&a[0];if(s){var l=n.filter((function(e){return e.attributes[s]===(null!=t?parseInt(t,10):null)}));l&&l[0]&&o.forEach((function(t){var i=r.rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=r._formatAttributeValue(l[0].attributes[t.name],i)}))}}},t.prototype._updateFeatureWithMagDirValues=function(e,t){if(this.pixelFilter&&("esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType)){var r=t.replace(" ",",").split(",").map((function(e){return parseFloat(e)})),n=r.map((function(e){return[e]})),o=r.map((function(e){return{minValue:e,maxValue:e,noDataValue:null}})),a=new w({height:1,width:1,pixelType:"f32",pixels:n,statistics:o});this.pixelFilter({pixelBlock:a,extent:new i.Extent(0,0,0,0,this.spatialReference)}),e.attributes["Raster.Magnitude"]=a.pixels[0][0],e.attributes["Raster.Direction"]=a.pixels[1][0]}},t.prototype._updateFeatureWithDomainValues=function(e){var t=this.fields&&this.fields.filter((function(e){return e.domain&&"coded-value"===e.domain.type}));null!=t&&t.forEach((function(t){var r=e.attributes[t.name];if(null!=r){var i=t.domain.codedValues.filter((function(e){return e.code===r}))[0];i&&(e.attributes[t.name]=i.name)}}))},t.prototype._updateResponseFieldNames=function(e,t){if(t&&!(t.length<1)){var r=this.fieldsIndex;r&&e.forEach((function(e){if(e&&e.attributes)for(var i=0,n=t;i<n.length;i++){var o=n[i];if(r.has(o)){var a=r.get(o).name;a!==o&&(e.attributes[o]=e.attributes[a],delete e.attributes[a])}}}))}},t.prototype._updateRenderingRulesFunctionName=function(e,t){if(e&&!(e.length<1)){if("Raw"===e)return e.replace("Raw","None");var r=e.toLowerCase().replace(/ /gi,"_");return t.has(r)?t.get(r):e}},t.prototype._isRFTJson=function(e){return e.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")},t.prototype._readCapabilities=function(e){var t=e.capabilities?e.capabilities.toLowerCase().split(",").map((function(e){return e.trim()})):["image","catalog"],r=e.currentVersion,i=e.advancedQueryCapabilities,n=e.maxRecordCount,o=t.indexOf("image")>-1,a="esriImageServiceDataTypeElevation"===e.serviceDataType,s=!!(e.spatialReference||e.extent&&e.extent.spatialReference);return{operations:{supportsComputeHistograms:o,supportsExportImage:o,supportsIdentify:o,supportsMeasure:t.indexOf("mensuration")>-1&&s,supportsDownload:t.indexOf("download")>-1,supportsQuery:t.indexOf("catalog")>-1&&e.fields&&e.fields.length>0,supportsGetSamples:r>=10.2&&o,supportsProject:r>=10.3&&o,supportsComputeStatisticsHistograms:r>=10.4&&o,supportsQueryBoundary:r>=10.6&&o,supportsCalculateVolume:r>=10.7&&a,supportsComputePixelLocation:r>=10.7&&t.indexOf("catalog")>-1},query:{supportsStatistics:!(!i||!i.supportsStatistics),supportsOrderBy:!(!i||!i.supportsOrderBy),supportsDistinct:!(!i||!i.supportsDistinct),supportsPagination:!(!i||!i.supportsPagination),supportsStandardizedQueriesOnly:!(!i||!i.useStandardizedQueries),maxRecordCount:n}}},r.__decorate([f.property()],t.prototype,"_functionRasterInfos",void 0),r.__decorate([f.property()],t.prototype,"_rasterJobHandler",void 0),r.__decorate([f.property()],t.prototype,"_symbolizer",void 0),r.__decorate([f.property()],t.prototype,"_defaultServiceMosaicRule",void 0),r.__decorate([f.reader("_defaultServiceMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultServiceMosaicRule",null),r.__decorate([f.property()],t.prototype,"_cachedRendererJson",void 0),r.__decorate([f.property()],t.prototype,"rasterAttributeTableFieldPrefix",void 0),r.__decorate([f.property({readOnly:!0,dependsOn:["rasterFunctionInfos"]})],t.prototype,"rasterFunctionNamesIndex",null),r.__decorate([f.property({readOnly:!0,dependsOn:["url"]})],t.prototype,"queryTask",null),r.__decorate([f.property()],t.prototype,"adjustAspectRatio",void 0),r.__decorate([f.property({readOnly:!0}),f.aliasOf("serviceRasterInfo.bandCount")],t.prototype,"bandCount",void 0),r.__decorate([f.property({type:[m.Integer],json:{write:!0}})],t.prototype,"bandIds",void 0),r.__decorate([f.reader("bandIds")],t.prototype,"readBandIds",null),r.__decorate([f.property({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),r.__decorate([f.reader("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),r.__decorate([f.property({type:Number})],t.prototype,"compressionQuality",void 0),r.__decorate([f.writer("compressionQuality")],t.prototype,"writeCompressionQuality",null),r.__decorate([f.property({type:Number})],t.prototype,"compressionTolerance",void 0),r.__decorate([f.writer("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),r.__decorate([f.property({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),r.__decorate([f.property({type:String,json:{read:{source:"layerDefinition.definitionExpression"},write:{target:"layerDefinition.definitionExpression"}}})],t.prototype,"definitionExpression",void 0),r.__decorate([f.property({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),r.__decorate([f.property()],t.prototype,"rasterInfo",void 0),r.__decorate([f.property({readOnly:!0,type:[v]})],t.prototype,"fields",void 0),r.__decorate([f.property({readOnly:!0,dependsOn:["fields"]})],t.prototype,"fieldsIndex",null),r.__decorate([f.property({type:String,json:{write:!0}})],t.prototype,"format",null),r.__decorate([f.property({type:i.Extent})],t.prototype,"fullExtent",void 0),r.__decorate([f.property({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),r.__decorate([f.property({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),r.__decorate([f.property({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),r.__decorate([f.property({type:String,json:{read:{reader:C.read},write:{writer:C.write}}})],t.prototype,"interpolation",void 0),r.__decorate([f.property({type:x})],t.prototype,"mosaicRule",null),r.__decorate([f.reader("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),r.__decorate([f.writer("mosaicRule")],t.prototype,"writeMosaicRule",null),r.__decorate([f.property({readOnly:!0}),f.aliasOf("serviceRasterInfo.multidimensionalInfo")],t.prototype,"multidimensionalInfo",void 0),r.__decorate([f.property()],t.prototype,"noData",void 0),r.__decorate([f.writer("noData")],t.prototype,"writeNoData",null),r.__decorate([f.property({type:String,json:{read:{reader:V.read},write:{writer:V.write}}})],t.prototype,"noDataInterpretation",void 0),r.__decorate([f.property({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),r.__decorate([f.reader("objectIdField")],t.prototype,"readObjectIdField",null),r.__decorate([f.property({readOnly:!0,dependsOn:["url"]})],t.prototype,"parsedUrl",null),r.__decorate([f.property({readOnly:!0}),f.aliasOf("serviceRasterInfo.pixelSize.x")],t.prototype,"pixelSizeX",void 0),r.__decorate([f.property({readOnly:!0}),f.aliasOf("serviceRasterInfo.pixelSize.y")],t.prototype,"pixelSizeY",void 0),r.__decorate([f.property({type:Function})],t.prototype,"pixelFilter",void 0),r.__decorate([f.property()],t.prototype,"raster",void 0),r.__decorate([f.property()],t.prototype,"viewId",void 0),r.__decorate([f.property({types:o.rasterRendererTypes,json:{read:{source:"layerDefinition.drawingInfo.renderer"},write:{target:"layerDefinition.drawingInfo.renderer"}}})],t.prototype,"renderer",void 0),r.__decorate([f.reader("renderer")],t.prototype,"readRenderer",null),r.__decorate([f.property(h.opacityDrawingInfo)],t.prototype,"opacity",void 0),r.__decorate([f.property({readOnly:!0}),f.aliasOf("serviceRasterInfo.attributeTable")],t.prototype,"rasterAttributeTable",void 0),r.__decorate([f.property({readOnly:!0,dependsOn:["fields","rasterInfo","capabilities"]})],t.prototype,"rasterFields",null),r.__decorate([f.property({readOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),r.__decorate([f.property({type:I})],t.prototype,"renderingRule",null),r.__decorate([f.reader("renderingRule",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRenderingRule",null),r.__decorate([f.writer("renderingRule")],t.prototype,"writeRenderingRule",null),r.__decorate([f.property()],t.prototype,"serviceDataType",void 0),r.__decorate([f.property({readOnly:!0,type:i.SpatialReference})],t.prototype,"spatialReference",void 0),r.__decorate([f.reader("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),r.__decorate([f.property()],t.prototype,"pixelType",void 0),r.__decorate([f.reader("pixelType")],t.prototype,"readPixelType",null),r.__decorate([f.writer("pixelType")],t.prototype,"writePixelType",null),r.__decorate([f.property({constructOnly:!0,type:S})],t.prototype,"serviceRasterInfo",void 0),r.__decorate([f.property()],t.prototype,"sourceJSON",void 0),r.__decorate([f.property(h.url)],t.prototype,"url",void 0),r.__decorate([f.property({readOnly:!0})],t.prototype,"version",void 0),r.__decorate([f.reader("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),r.__decorate([f.subclass("esri.layers.mixins.ArcGISImageService")],t)}(e)}}).apply(null,i),void 0===n||(e.exports=n)},bllj:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("ycL1"),r("Vx27"),r("oxlp"),r("w1v0")],n=(function(e,t,r,i,n,o,a){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.catalogItemVisibilities=null,t.catalogItems=null,t.location=null,t.name=null,t.objectId=null,t.processedValues=null,t.properties=null,t.value=null,t}return r.__extends(t,e),r.__decorate([n.property({json:{write:!0}})],t.prototype,"catalogItemVisibilities",void 0),r.__decorate([n.property({type:a,json:{write:!0}})],t.prototype,"catalogItems",void 0),r.__decorate([n.property({type:o,json:{write:!0}})],t.prototype,"location",void 0),r.__decorate([n.property({json:{write:!0}})],t.prototype,"name",void 0),r.__decorate([n.property({json:{write:!0}})],t.prototype,"objectId",void 0),r.__decorate([n.property({json:{write:!0}})],t.prototype,"processedValues",void 0),r.__decorate([n.property({json:{write:!0}})],t.prototype,"properties",void 0),r.__decorate([n.property({json:{write:!0}})],t.prototype,"value",void 0),r.__decorate([n.subclass("esri.tasks.support.ImageServiceIdentifyResult")],t)}(i.JSONSupport)}).apply(null,i),void 0===n||(e.exports=n)},nakx:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("9gfz"),r("ycL1"),r("Vx27"),r("oxlp"),r("Lzvl"),r("ouPT"),r("97bx")],n=(function(e,t,r,i,n,o,a,s,l,p){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.geometry=null,t.renderingRules=null,t.pixelSize=null,t.returnGeometry=!0,t.returnCatalogItems=!0,t.returnPixelValues=!0,t.maxItemCount=null,t.timeExtent=null,t.raster=void 0,t.viewId=void 0,t}return r.__extends(t,e),t.prototype.writeGeometry=function(e,t,r){null!=e&&(t.geometryType=s.getJsonType(e),t[r]=JSON.stringify(e.toJSON()))},Object.defineProperty(t.prototype,"mosaicRule",{set:function(e){var t=e;t&&t.mosaicMethod&&(t=l.fromJSON(r.__assign(r.__assign({},t.toJSON()),{mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation}))),this._set("mosaicRule",t)},enumerable:!0,configurable:!0}),t.prototype.writeMosaicRule=function(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))},Object.defineProperty(t.prototype,"renderingRule",{set:function(e){var t=e;t&&t.rasterFunction&&(t=p.fromJSON(r.__assign(r.__assign({},t.toJSON()),{rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments}))),this._set("renderingRule",t)},enumerable:!0,configurable:!0}),t.prototype.writeRenderingRule=function(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))},t.prototype.writeRenderingRules=function(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map((function(e){return e.toJSON()}))))},t.prototype.writePixelSize=function(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))},t.prototype.writeTimeExtent=function(e,t,r){if(null!=e){var i=e.start?e.start.getTime():null,n=e.end?e.end.getTime():null;t[r]=null!=i?null!=n?i+","+n:""+i:null}},r.__decorate([o.property({json:{write:!0}})],t.prototype,"geometry",void 0),r.__decorate([o.writer("geometry")],t.prototype,"writeGeometry",null),r.__decorate([o.property({type:l,json:{write:!0}})],t.prototype,"mosaicRule",null),r.__decorate([o.writer("mosaicRule")],t.prototype,"writeMosaicRule",null),r.__decorate([o.property({type:p,json:{write:!0}})],t.prototype,"renderingRule",null),r.__decorate([o.writer("renderingRule")],t.prototype,"writeRenderingRule",null),r.__decorate([o.property({type:[p],json:{write:!0}})],t.prototype,"renderingRules",void 0),r.__decorate([o.writer("renderingRules")],t.prototype,"writeRenderingRules",null),r.__decorate([o.property({type:a,json:{write:!0}})],t.prototype,"pixelSize",void 0),r.__decorate([o.writer("pixelSize")],t.prototype,"writePixelSize",null),r.__decorate([o.property({type:Boolean,json:{write:!0}})],t.prototype,"returnGeometry",void 0),r.__decorate([o.property({type:Boolean,json:{write:!0}})],t.prototype,"returnCatalogItems",void 0),r.__decorate([o.property({type:Boolean,json:{write:!0}})],t.prototype,"returnPixelValues",void 0),r.__decorate([o.property({type:Number,json:{write:!0}})],t.prototype,"maxItemCount",void 0),r.__decorate([o.property({type:i,json:{write:{target:"time"}}})],t.prototype,"timeExtent",void 0),r.__decorate([o.writer("timeExtent")],t.prototype,"writeTimeExtent",null),r.__decorate([o.property({json:{write:!0}})],t.prototype,"raster",void 0),r.__decorate([o.property({json:{write:!0}})],t.prototype,"viewId",void 0),r.__decorate([o.subclass("esri.tasks.support.ImageServiceIdentifyParameters")],t)}(n.JSONSupport)}).apply(null,i),void 0===n||(e.exports=n)},ouPT:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("ImIS"),r("ycL1"),r("rg9i"),r("Vx27"),r("oxlp"),r("7Rj3"),r("97bx")],void 0===(n=(function(e,t,r,i,n,o,a,s,l,p){var u=i.strict()({MT_FIRST:"first",MT_LAST:"last",MT_MIN:"min",MT_MAX:"max",MT_MEAN:"mean",MT_BLEND:"blend",MT_SUM:"sum"}),c=i.strict()({esriMosaicNone:"none",esriMosaicCenter:"center",esriMosaicNadir:"nadir",esriMosaicViewpoint:"viewpoint",esriMosaicAttribute:"attribute",esriMosaicLockRaster:"lock-raster",esriMosaicNorthwest:"northwest",esriMosaicSeamline:"seamline"});return function(e){function t(t){var r=e.call(this,t)||this;return r.ascending=!0,r.itemRenderingRule=null,r.lockRasterIds=null,r.method=null,r.multidimensionalDefinition=null,r.objectIds=null,r.operation=null,r.sortField=null,r.sortValue=null,r.viewpoint=null,r.where=null,r}var i;return r.__extends(t,e),i=t,t.prototype.readAscending=function(e,t){return null!=t.ascending?t.ascending:null==t.sortAscending||t.sortAscending},t.prototype.readMethod=function(e,t){return function(e){var t;switch(e?e.toLowerCase().replace("esrimosaic",""):""){case"byattribute":case"attribute":t="esriMosaicAttribute";break;case"lockraster":t="esriMosaicLockRaster";break;case"center":t="esriMosaicCenter";break;case"northwest":t="esriMosaicNorthwest";break;case"nadir":t="esriMosaicNadir";break;case"viewpoint":t="esriMosaicViewpoint";break;case"seamline":t="esriMosaicSeamline";break;default:t="esriMosaicNone"}return c.fromJSON(t)}(t.mosaicMethod||t.defaultMosaicMethod)},t.prototype.readOperation=function(e,t){var r=t.mosaicOperation,i=t.mosaicOperator&&t.mosaicOperator.toLowerCase(),n=r||(i?u.toJSON(i):null);return u.fromJSON(n)||"first"},t.prototype.castSortValue=function(e){return null==e||"string"==typeof e||"number"==typeof e?e:""+e},t.prototype.clone=function(){return new i({ascending:this.ascending,itemRenderingRule:o.clone(this.itemRenderingRule),lockRasterIds:o.clone(this.lockRasterIds),method:this.method,multidimensionalDefinition:o.clone(this.multidimensionalDefinition),objectIds:o.clone(this.objectIds),operation:this.operation,sortField:this.sortField,sortValue:this.sortValue,viewpoint:o.clone(this.viewpoint),where:this.where})},r.__decorate([a.property({type:Boolean,json:{write:!0}})],t.prototype,"ascending",void 0),r.__decorate([a.reader("ascending",["ascending","sortAscending"])],t.prototype,"readAscending",null),r.__decorate([a.property({type:p,json:{write:!0}})],t.prototype,"itemRenderingRule",void 0),r.__decorate([a.property({type:[Number],json:{write:{overridePolicy:function(){return{enabled:"lock-raster"===this.method}}}}})],t.prototype,"lockRasterIds",void 0),r.__decorate([a.property({type:String,json:{type:c.jsonValues,write:{target:"mosaicMethod",writer:c.write}}})],t.prototype,"method",void 0),r.__decorate([a.reader("method",["mosaicMethod","defaultMosaicMethod"])],t.prototype,"readMethod",null),r.__decorate([a.property({type:[l],json:{write:!0}})],t.prototype,"multidimensionalDefinition",void 0),r.__decorate([a.property({type:[Number],json:{read:{source:"fids"},write:{target:"fids"}}})],t.prototype,"objectIds",void 0),r.__decorate([a.property({json:{type:u.jsonValues,read:{reader:u.read},write:{target:"mosaicOperation",writer:u.write}}})],t.prototype,"operation",void 0),r.__decorate([a.reader("operation",["mosaicOperation","mosaicOperator"])],t.prototype,"readOperation",null),r.__decorate([a.property({type:String,json:{write:{overridePolicy:function(){return{enabled:"attribute"===this.method}}}}})],t.prototype,"sortField",void 0),r.__decorate([a.property({type:[String,Number],json:{write:{allowNull:!0,overridePolicy:function(){return{enabled:"attribute"===this.method,allowNull:!0}}}}})],t.prototype,"sortValue",void 0),r.__decorate([a.cast("sortValue")],t.prototype,"castSortValue",null),r.__decorate([a.property({type:s,json:{write:!0}})],t.prototype,"viewpoint",void 0),r.__decorate([a.property({type:String,json:{write:!0}})],t.prototype,"where",void 0),i=r.__decorate([a.subclass("esri.layers.support.MosaicRule")],t)}(n.JSONSupport)}).apply(null,i))||(e.exports=n)},sNli:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r("zOht"),r("ImIS"),r("ycL1"),r("Vx27"),r("YM6P"),r("ouPT")],n=(function(e,t,r,i,n,o,a,s){Object.defineProperty(t,"__esModule",{value:!0});var l=new i.default({RSP_NearestNeighbor:"nearest",RSP_BilinearInterpolation:"bilinear",RSP_CubicConvolution:"cubic",RSP_Majority:"majority"}),p=new i.default({esriNoDataMatchAny:"any",esriNoDataMatchAll:"all"}),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.layer=null,t.adjustAspectRatio=void 0,t.bandIds=void 0,t.compression=void 0,t.compressionQuality=void 0,t.compressionTolerance=.01,t.format=null,t.interpolation=null,t.noData=null,t.noDataInterpretation=void 0,t.pixelType=void 0,t.lercVersion=2,t}return r.__extends(t,e),t.prototype.writeAdjustAspectRatio=function(e,t,r){this.layer.version<10.3||(t[r]=e)},t.prototype.writeCompressionQuality=function(e,t,r){this.format&&this.format.toLowerCase().indexOf("jpg")>-1&&null!=e&&(t[r]=e)},t.prototype.writeCompressionTolerance=function(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)},t.prototype.writeLercVersion=function(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=e)},Object.defineProperty(t.prototype,"version",{get:function(){return(this._get("version")||0)+1},set:function(e){this._set("version",e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"mosaicRule",{get:function(){var e=this.layer,t=e.mosaicRule,r=e.definitionExpression;return t?r&&r!==t.where&&((t=t.clone()).where=r):r&&(t=new s({where:r})),t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderingRule",{get:function(){var e=this.layer,t=e.renderingRule,r=e.pixelFilter;return(!e.format||e.format.indexOf("jpg")>-1||e.format.indexOf("png")>-1)&&!r&&(t=this.combineRendererWithRenderingRule()),t},enumerable:!0,configurable:!0}),t.prototype.combineRendererWithRenderingRule=function(){var e=this.layer,t=e.rasterInfo,r=e.renderingRule,i=e.renderer;return i&&a.isSupportedRendererType(i)?a.combineRenderingRules(a.convertRendererToRenderingRule(i,{rasterAttributeTable:t.attributeTable,pixelType:t.pixelType,convertColorRampToColormap:e.version<10.6,dataType:t.dataType}),r):r},r.__decorate([o.property()],t.prototype,"layer",void 0),r.__decorate([o.property({json:{write:!0}})],t.prototype,"adjustAspectRatio",void 0),r.__decorate([o.writer("adjustAspectRatio")],t.prototype,"writeAdjustAspectRatio",null),r.__decorate([o.property({json:{write:!0}}),o.aliasOf("layer.bandIds")],t.prototype,"bandIds",void 0),r.__decorate([o.property({json:{write:!0}})],t.prototype,"compression",void 0),r.__decorate([o.property({json:{write:!0}}),o.aliasOf("layer.compressionQuality")],t.prototype,"compressionQuality",void 0),r.__decorate([o.writer("compressionQuality")],t.prototype,"writeCompressionQuality",null),r.__decorate([o.property({json:{write:!0}}),o.aliasOf("layer.compressionTolerance")],t.prototype,"compressionTolerance",void 0),r.__decorate([o.writer("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),r.__decorate([o.property({json:{write:!0}}),o.aliasOf("layer.format")],t.prototype,"format",void 0),r.__decorate([o.property({type:String,json:{read:{reader:l.read},write:{writer:l.write}}}),o.aliasOf("layer.interpolation")],t.prototype,"interpolation",void 0),r.__decorate([o.property({json:{write:!0}}),o.aliasOf("layer.noData")],t.prototype,"noData",void 0),r.__decorate([o.property({type:String,json:{read:{reader:p.read},write:{writer:p.write}}}),o.aliasOf("layer.noDataInterpretation")],t.prototype,"noDataInterpretation",void 0),r.__decorate([o.property({json:{write:!0}})],t.prototype,"pixelType",void 0),r.__decorate([o.property({json:{write:!0}})],t.prototype,"lercVersion",void 0),r.__decorate([o.writer("lercVersion")],t.prototype,"writeLercVersion",null),r.__decorate([o.property({type:Number,dependsOn:["layer.adjustAspectRatio","layer.bandIds","layer.format","layer.compressionQuality","layer.compressionTolerance","layer.definitionExpression","layer.interpolation","layer.noData","layer.noDataInterpretation","layer.mosaicRule","layer.renderingRule","layer.pixelFilter","layer.renderer","lercVersion","pixelType"]})],t.prototype,"version",null),r.__decorate([o.property({dependsOn:["layer.mosaicRule","layer.definitionExpression"],json:{write:!0}})],t.prototype,"mosaicRule",null),r.__decorate([o.property({dependsOn:["layer.renderingRule","layer.renderer","layer.rasterInfo","layer.format"],json:{write:!0}})],t.prototype,"renderingRule",null),r.__decorate([o.subclass("esri.layers.mixins.ExportImageServiceParameters")],t)}(n.JSONSupport);t.ExportImageServiceParameters=u}).apply(null,i),void 0===n||(e.exports=n)}}]);