????
Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/ |
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/20.5feefd531c8be6d6c70f.js |
(function(){var e={"esri/rasterRenderers":"+UAu","esri/layers/support/rasterFormats/Raw":"0fRT","esri/renderers/RasterColormapRenderer":"3YLB","esri/renderers/RasterShadedReliefRenderer":"4q6F","esri/renderers/support/RasterSymbolizer":"6PsE","esri/layers/support/rasterFormats/Png":"D34G","esri/layers/support/rasterFormats/JpgPlus":"EZfi","esri/renderers/support/ColormapInfo":"IbdV","esri/layers/support/rasterFormats/TiffTags":"Jhq5","esri/layers/support/RasterInfo":"Kjnw","esri/layers/support/rasterFormats/ImageCanvasDecoder":"QT0f","esri/layers/support/rasterFormats/LercCodec":"Rc7o","esri/renderers/RasterStretchRenderer":"TnfJ","esri/renderers/support/colorRampUtils":"UVEp","esri/layers/support/rasterFormats/RasterCodec":"WSFd","esri/layers/support/rasterFormats/TiffDecoder":"aS1B","esri/renderers/support/stretchRendererUtils":"hBcF","esri/layers/support/rasterFormats/Lerc2Codec":"hP4J","esri/layers/support/rasterDatasets/byteStreamUtils":"n7Tx","esri/layers/support/rasterFunctions/surfaceUtils":"qz+T","esri/layers/support/rasterFormats/Zlib":"r5V0","esri/layers/support/rasterFormats/Jpg":"xIS7"},r=this||window,t=r.webpackJsonp=r.webpackJsonp||[];t.registerAbsMids?t.registerAbsMids(e):(t.absMidsWaiting=t.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[20],{"+UAu":function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("V2ZO"),t("Z/W+"),t("3YLB"),t("4q6F"),t("TnfJ"),t("nHUP")],void 0===(i=(function(e,r,t,o,i,a,n,s){Object.defineProperty(r,"__esModule",{value:!0}),r.ClassBreaksRenderer=o,r.RasterColormapRenderer=i,r.RasterShadedReliefRenderer=a,r.RasterStretchRenderer=n,r.UniqueValueRenderer=s,r.rasterRendererTypes={key:"type",base:null,typeMap:{"unique-value":s,"class-breaks":o,"raster-colormap":i,"raster-stretch":n,"raster-shaded-relief":a}};var l={uniqueValue:s,classBreaks:o,rasterStretch:n,rasterColormap:i,rasterShadedRelief:a};function u(e,r){if(!e)return null;var o=function(e){return e&&l[e.type]||null}(e);if(o){var i=new o;return i.read(e,r),i}return r&&r.messages&&e&&r.messages.push(new t("renderer:unsupported","Renderers of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r})),null}r.read=u,r.fromJSON=function(e,r){return u(e,r)}}).apply(null,o))||(e.exports=i)},"0fRT":function(e,r,t){var o,i;o=[t.dj.c(e.i),r],void 0===(i=(function(e,r){var t=function(e,r){return Math.floor(e.byteLength/(r.width*r.height*o(r.pixelType)))},o=function(e){var r=1;switch(e){case Uint8Array:case Int8Array:r=1;break;case Uint16Array:case Int16Array:r=2;break;case Uint32Array:case Int32Array:case Float32Array:r=4;break;case Float64Array:r=8}return r};return function(){function e(){}return e.decode=function(e,r){var i,a,n,s,l,u=r.pixelType,f=[],p=r.width*r.height,c=t(e,r),d=r.bandIds,h=r.format,m=d&&d.length||t(e,r),g=e.byteLength-e.byteLength%(p*o(u)),y=new u(e,0,p*c);if("bip"===h)for(i=0;i<m;i++){for(s=new u(p),l=d?d[i]:i,a=0;a<p;a++)s[a]=y[a*c+l];f.push(s)}else if("bsq"===h)for(i=0;i<m;i++)f.push(y.subarray((l=d?d[i]:i)*p,(l+1)*p));return g<e.byteLength-1&&(n=function(e,r){if(8*e.byteLength<r)return null;var t=new Uint8Array(e,0,Math.ceil(r/8)),o=new Uint8Array(r),i=0,a=0,n=0,s=0;for(n=0;n<t.length-1;n++)for(a=t[n],s=7;s>=0;s--)o[i++]=a>>s&1;for(s=7;i<r-1;)o[i++]=(a=t[t.length-1])>>s&1,s--;return o}(e.slice(g),p)),{pixels:f,mask:n}},e}()}).apply(null,o))||(e.exports=i)},"3YLB":function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("zOht"),t("ycL1"),t("Vx27"),t("IbdV"),t("UVEp")],void 0===(i=(function(e,r,t,o,i,a,n){return function(e){function r(r){var t=e.call(this,r)||this;return t.colormapInfos=null,t.type="raster-colormap",t}var o;return t.__extends(r,e),o=r,r.createFromColormap=function(e,r){if(!e)return null;function t(e){return r?r[e]||"":String(e[0])}var i=5===e[0].length,n=e.sort((function(e){return e[0][0]-e[1][0]})).map(i?function(e){return a.fromJSON({value:e[0],color:e.slice(1,5),label:t(e[0])})}:function(e){return a.fromJSON({value:e[0],color:e.slice(1,4).concat([255]),label:t(e[0])})});return new o({colormapInfos:n})},r.createFromColorramp=function(e){var r=n.convertColorRampToColormap(e,256);return o.createFromColormap(r)},r.prototype.clone=function(){return new o({colormapInfos:this.colormapInfos.map((function(e){return e.toJSON()}))})},r.prototype.extractColormap=function(){return this.colormapInfos.map((function(e){return[e.value,e.color.r,e.color.g,e.color.b,e.color.a>1?e.color.a:255*e.color.a&255]})).sort((function(e,r){return e[0]-r[0]}))},t.__decorate([i.property({type:[a],json:{write:!0}})],r.prototype,"colormapInfos",void 0),t.__decorate([i.enumeration({rasterColormap:"raster-colormap"})],r.prototype,"type",void 0),o=t.__decorate([i.subclass("esri.renderers.RasterColormapRenderer")],r)}(o.JSONSupport)}).apply(null,o))||(e.exports=i)},"4q6F":function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("zOht"),t("ycL1"),t("rg9i"),t("Vx27"),t("eVYp")],void 0===(i=(function(e,r,t,o,i,a,n){return function(e){function r(r){var t=e.call(this,r)||this;return t.altitude=45,t.azimuth=315,t.colorRamp=null,t.hillshadeType="multi-directional",t.pixelSizePower=.664,t.pixelSizeFactor=.024,t.scalingType="none",t.type="raster-shaded-relief",t.zFactor=1,t}var o;return t.__extends(r,e),o=r,r.prototype.readColorRamp=function(e){return n.fromJSON(e)},r.prototype.clone=function(){return new o({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,scalingType:this.scalingType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,colorRamp:i.clone(this.colorRamp)})},t.__decorate([a.property({type:Number,json:{write:!0}})],r.prototype,"altitude",void 0),t.__decorate([a.property({type:Number,json:{write:!0}})],r.prototype,"azimuth",void 0),t.__decorate([a.property({types:n.types,json:{write:!0}})],r.prototype,"colorRamp",void 0),t.__decorate([a.reader("colorRamp")],r.prototype,"readColorRamp",null),t.__decorate([a.property({type:["traditional","multi-directional"],json:{write:!0}})],r.prototype,"hillshadeType",void 0),t.__decorate([a.property({type:Number,json:{write:!0}})],r.prototype,"pixelSizePower",void 0),t.__decorate([a.property({type:Number,json:{write:!0}})],r.prototype,"pixelSizeFactor",void 0),t.__decorate([a.property({type:["none","adjusted"],json:{write:!0}})],r.prototype,"scalingType",void 0),t.__decorate([a.enumeration({rasterShadedRelief:"raster-shaded-relief"})],r.prototype,"type",void 0),t.__decorate([a.property({type:Number,json:{write:!0}})],r.prototype,"zFactor",void 0),o=t.__decorate([a.subclass("esri.renderers.RasterShadedReliefRenderer")],r)}(o.JSONSupport)}).apply(null,o))||(e.exports=i)},"6PsE":function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("zOht"),t("+UAu"),t("KtQ6"),t("ycL1"),t("qsST"),t("Vx27"),t("Kjnw"),t("SAwq"),t("qz+T"),t("UVEp")],void 0===(i=(function(e,r,t,o,i,a,n,s,l,u,f,p){var c=n.getLogger("esri.renderers.support.RasterSymbolizer");return function(e){function r(r){return e.call(this,r)||this}return t.__extends(r,e),r.prototype.readRenderer=function(e,r,t){return o.read(e,t)},r.prototype.bind=function(){if(!this.renderer)return!1;var e;switch(this.lookup={rendererJson:{}},this.renderer.type){case"unique-value":e=this._updateUVRenderer(this.renderer);break;case"raster-colormap":e=this._updateColormapRenderer(this.renderer);break;case"raster-stretch":e=this._updateStretchRenderer(this.renderer);break;case"class-breaks":e=this._updateClassBreaksRenderer(this.renderer);break;case"raster-shaded-relief":e=this._updateShadedReliefRenderer(this.renderer)}return e},r.prototype.symbolize=function(e){var r=e&&e.pixelBlock;if(!this.isValidPixelBlock(r))return r;if(e.simpleStretchParams&&"raster-stretch"===this.renderer.type)return this.simpleStretch(r,e.simpleStretchParams);try{r.pixels.length>3&&(r=u.extractBands(r,[0,1,2]));var t=void 0;switch(this.renderer.type){case"unique-value":case"raster-colormap":t=this._symbolize_colormap(r);break;case"class-breaks":t=this._symbolize_classBreaks(r);break;case"raster-stretch":t=this._symbolize_stretch(r,e.bandIds);break;case"raster-shaded-relief":var o=e.extent;t=this._symbolize_shadedRelief(r,{isGCS:o.spatialReference.isGeographic,resolution:{x:(o.xmax-o.xmin)/r.width,y:(o.ymax-o.ymin)/r.height}})}return t}catch(e){return c.error("symbolize",e.message),r}},r.prototype.simpleStretch=function(e,r){if(!this.isValidPixelBlock(e))return e;try{return e.pixels.length>3&&(e=u.extractBands(e,[0,1,2])),u.stretch(e,r)}catch(r){return c.error("symbolize",r.message),e}},r.prototype.generateWebGLParameters=function(e){if(["unique-value","raster-colormap","class-breaks"].indexOf(this.renderer.type)>-1){var r=this.lookup.colormapLut;return{colormap:r.indexedColormap,colormapOffset:r.offset,type:"lut"}}var t=e.isGCS,o=e.resolution;return"raster-stretch"===this.renderer.type?this.generateStretchWebGLParams(e.pixelBlock,this.renderer,e.bandIds):"raster-shaded-relief"===this.renderer.type?this.generateShadedReliefWebGLParams(this.renderer,t,o):null},r.prototype._isLUTChanged=function(e){if(!this.lookup||!this.lookup.rendererJson)return!0;if("colorRamp"in this.renderer){if(e)return JSON.stringify(this.renderer.colorRamp.toJSON())!==JSON.stringify(this.lookup.rendererJson.colorRamp);var r=t.__assign({},this.renderer.toJSON()),o=t.__assign({},this.lookup.rendererJson);return r.colorRamp=null,o.colorRamp=null,JSON.stringify(this.renderer.toJSON())!==JSON.stringify(this.lookup.rendererJson)}return JSON.stringify(this.renderer.toJSON())!==JSON.stringify(this.lookup.rendererJson)},r.prototype._symbolize_colormap=function(e){return this._isLUTChanged()&&!this.bind()?e:u.colorize(e,this.lookup.colormapLut)},r.prototype._symbolize_classBreaks=function(e){var r=["u8","u16","s8","s16"].indexOf(this.rasterInfo.pixelType)>-1;return this._isLUTChanged()&&!this.bind()?e:r?u.colorize(e,this.lookup.colormapLut):u.remapColor(e,this.lookup.remapLut)},r.prototype._symbolize_stretch=function(e,r){var o,i,a=this.rasterInfo,n=a.pixelType,s=a.bandCount,l=this.renderer,f=["u8","u16","s8","s16"].indexOf(n)>-1,p=l.gamma,c=l.useGamma;if(f){if(l.dynamicRangeAdjustment){var d=this.getStretchCutoff(l,e,r);o=u.createStretchLUT(t.__assign(t.__assign({pixelType:n},d),{gamma:c?p:null}))}else if(this._isLUTChanged()){if(!this.bind())return e;o=this.lookup?this.lookup.stretchLut:null}else o=this.lookup?this.lookup.stretchLut:null;if(!o)return e;s>1&&(null==r?void 0:r.length)===e.pixels.length&&(null==o?void 0:o.lut.length)===s&&(o={lut:r.map((function(e){return o.lut[e]})),offset:o.offset}),i=u.lookupPixels(e,o)}else d=this.getStretchCutoff(l,e,r),i=u.stretch(e,t.__assign(t.__assign({},d),{gamma:c?p:null}));if(l.colorRamp){if(this._isLUTChanged(!0)&&!this.bind())return e;i=u.colorize(i,this.lookup.colormapLut)}return i},r.prototype._symbolize_shadedRelief=function(e,r){var o,i=this.renderer,a=t.__assign(t.__assign({},i.toJSON()),r),n=f.hillshade(e,a);if(!i.colorRamp)return n;if(this._isLUTChanged(!0)){if(!this.bind())return n;o=this.lookup?this.lookup.hsvMap:null}else o=this.lookup?this.lookup.hsvMap:null;return o?(f.tintHillshade(n,e,o,this.rasterInfo.statistics[0]),n):n},r.prototype._updateUVRenderer=function(e){var r=this.rasterInfo,t=r.bandCount,o=r.attributeTable,i=r.statistics,a=["u8","s8"].indexOf(r.pixelType)>-1&&i&&null!=i[0].min&&null!=i[0].max;if(1!==t||!o&&!a)return!1;var n=e.field;if(!n)return!1;var s=[];if(o){var l=o.fields.filter((function(e){return"value"===e.name.toLowerCase()}))[0];if(!l)return!1;o.features.forEach((function(r){var t=e.uniqueValueInfos.filter((function(e){return String(e.value)===String(r.attributes[n])}))[0],o=t&&t.symbol&&t.symbol.color;o&&s.push([r.attributes[l.name],o.r,o.g,o.b,o.a>1?o.a:Math.round(255*o.a)])}))}else{if("value"!==n.toLowerCase())return!1;e.uniqueValueInfos.forEach((function(e){var r=e&&e.symbol&&e.symbol.color;r&&s.push([parseInt(e.value,10),r.r,r.g,r.b,r.a>1?r.a:Math.round(255*r.a)])}))}if(0===s.length)return!1;var f=u.createColormapLUT({colormap:s});return this.lookup={rendererJson:e.toJSON(),colormapLut:f},this.canRenderInWebGL=!0,!0},r.prototype._updateColormapRenderer=function(e){var r=e.extractColormap();if(!r||0===r.length)return!1;var t=u.createColormapLUT({colormap:r});return this.lookup={rendererJson:e.toJSON(),colormapLut:t},this.canRenderInWebGL=!0,!0},r.prototype._updateShadedReliefRenderer=function(e){if("elevation"!==this.rasterInfo.dataType)return!1;if(e.colorRamp){for(var r=p.convertColorRampToColormap(e.colorRamp,256),t=u.createColormapLUT({colormap:r}),o=[],a=t.indexedColormap,n=0;n<a.length;n+=4){var s=i.toHSV({r:a[n],g:a[n+1],b:a[n+2]});o.push([s.h/60,s.s/100,255*s.v/100])}this.lookup={rendererJson:e.toJSON(),colormapLut:t,hsvMap:o}}else this.lookup=null;return this.canRenderInWebGL=!0,!0},r.prototype._updateClassBreaksRenderer=function(e){var r=["u8","u16","s8","s16"].indexOf(this.rasterInfo.pixelType)>-1,t=e.classBreakInfos;if(!t||0===t.length)return!1;var o=t.sort((function(e,r){return e.minValue-r.minValue})),i=o[o.length-1];if(!r){var a=o.map((function(e){return{value:e.minValue,mappedColor:[e.symbol.color.r,e.symbol.color.g,e.symbol.color.b,e.symbol.color.a>1?e.symbol.color.a:Math.round(255*e.symbol.color.a)]}}));return a.push({value:i.maxValue,mappedColor:[i.symbol.color.g,i.symbol.color.b,i.symbol.color.a>1?i.symbol.color.a:Math.round(255*i.symbol.color.a)]}),this.lookup={rendererJson:e.toJSON(),remapLut:a},this.canRenderInWebGL=!1,!0}var n,s=[],l=0;o.forEach((function(e){n=Math.ceil(e.minValue),l=Math.floor(e.maxValue);for(var r=n;r<l;r++)s.push([r,e.symbol.color.r,e.symbol.color.g,e.symbol.color.b,e.symbol.color.a>1?e.symbol.color.a:Math.round(255*e.symbol.color.a)])})),s.push([i.maxValue,i.symbol.color.r,i.symbol.color.g,i.symbol.color.b,i.symbol.color.a>1?i.symbol.color.a:Math.round(255*i.symbol.color.a)]);var f=u.createColormapLUT({colormap:s,fillUnspecified:!1});return this.lookup={rendererJson:e.toJSON(),colormapLut:f},this.canRenderInWebGL=!0,!0},r.prototype._updateStretchRenderer=function(e){if(!(e.statistics||this.rasterInfo.statistics||e.dynamicRangeAdjustment))return!1;if(!e.dynamicRangeAdjustment&&"percent-clip"===e.stretchType&&!e.histograms&&!this.rasterInfo.histograms)return!1;var r=e.gamma,o=e.useGamma,i=e.colorRamp,a=this.rasterInfo.pixelType;if(!e.dynamicRangeAdjustment&&["u8","u16","s8","s16"].indexOf(a)>-1){var n=this.getStretchCutoff(e),s=u.createStretchLUT(t.__assign(t.__assign({pixelType:a},n),{gamma:o?r:null}));this.lookup={rendererJson:e.toJSON(),stretchLut:s}}if(i){var l=p.convertColorRampToColormap(i,256);this.lookup||(this.lookup={rendererJson:e.toJSON()}),this.lookup.colormapLut=u.createColormapLUT({colormap:l}),this.lookup.rendererJson=e.toJSON()}return this.canRenderInWebGL=!0,!0},r.prototype.getStretchCutoff=function(e,r,t){var o,i,a=e.stretchType;if(e.dynamicRangeAdjustment)if("min-max"===a&&r.statistics)o=r.statistics.map((function(e){return[e.minValue,e.maxValue,0,0]}));else{var n=u.estimateStatisticsHistograms(r);o=n.statistics,i=n.histograms}else o=e.statistics&&e.statistics.length>0?e.statistics:this.rasterInfo.statistics,i=e.histograms||this.rasterInfo.histograms;var s,l,f,p,c,d,h,m,g,y=o||i?(o||i).length:this.rasterInfo.bandCount,v=[],w=[];switch(o[0]instanceof Array||(o=o.map((function(e){return[e.min,e.max,e.avg,e.stddev]}))),a){case"none":for(m=0;m<y;m++)v[m]="u8"===this.rasterInfo.pixelType?0:o?o[m][0]:0,w[m]="u8"===this.rasterInfo.pixelType?255:o?o[m][1]:255;break;case"min-max":for(m=0;m<y;m++)v[m]=o[m][0],w[m]=o[m][1];break;case"standard-deviation":for(m=0;m<y;m++)v[m]=o[m][2]-e.numberOfStandardDeviations*o[m][3],w[m]=o[m][2]+e.numberOfStandardDeviations*o[m][3],v[m]<o[m][0]&&(v[m]=o[m][0]),w[m]>o[m][1]&&(w[m]=o[m][1]);break;case"percent-clip":for(m=0;m<i.length;m++){for(s=i[m],c=new Uint32Array(s.size),p=s.counts,f=0,l=(s.max-s.min)/s.size,h=-.5===s.min&&1===l?.5:0,g=0;g<s.size;g++)c[g]=f+=p[g];for(d=e.minPercent*f/100,g=0;g<s.size;g++)if(c[g]>d){v[m]=s.min+l*(g+h);break}for(d=(1-e.maxPercent/100)*f,g=s.size-2;g>=0;g--)if(c[g]<d){w[m]=s.min+l*(g+2-h);break}}break;default:for(m=0;m<y;m++)v[m]=o[m][0],w[m]=o[m][1]}return this.getSelectedBandCutoffs({minCutOff:v,maxCutOff:w,outMax:e.outputMax||255,outMin:e.outputMin||0},t)},r.prototype.getSelectedBandCutoffs=function(e,r){if(null==r||0===r.length)return e;var t=Math.max.apply(null,r),o=e.minCutOff,i=e.maxCutOff,a=e.outMin,n=e.outMax;return o.length===r.length||o.length<=t?e:{minCutOff:r.map((function(e){return o[e]})),maxCutOff:r.map((function(e){return i[e]})),outMin:a,outMax:n}},r.prototype.generateStretchWebGLParams=function(e,r,t){var o=null,i=null,a=this.lookup&&this.lookup.colormapLut;r.colorRamp&&a&&(o=a.indexedColormap,i=a.offset);var n=r.gamma,s=!!(r.useGamma&&n&&n.some((function(e){return 1!==e}))),l=this.getStretchCutoff(r,e,t),u=l.minCutOff,f=l.maxCutOff,p=l.outMin,c=l.outMax;e&&e.pixels&&2===e.pixels.length&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]);var d,h=Math.min(3,t&&t.length||e&&e.getPlaneCount()||this.rasterInfo.bandCount),m=new Float32Array(h),g=o||s?1:255;for(d=0;d<h;d++)m[d]=(c-p)/(f[d]-u[d])/g;var y=new Float32Array(h);if(s)for(d=0;d<h;d++)y[d]=n[d]>1?n[d]>2?6.5+Math.pow(n[d]-2,2.5):6.5+100*Math.pow(2-n[d],4):1;return{bandCount:h,outMin:p/g,outMax:c/g,minCutOff:u,maxCutOff:f,factor:m,useGamma:s,gamma:s?n:[1,1,1],gammaCorrection:s?y:[1,1,1],colormap:o,colormapOffset:i,type:"stretch"}},r.prototype.generateShadedReliefWebGLParams=function(e,r,o){var i=null,a=null,n=this.lookup&&this.lookup.colormapLut;e.colorRamp&&n&&(i=n.indexedColormap,a=n.offset);var s=t.__assign(t.__assign({},e.toJSON()),{isGCS:r,resolution:o}),l=f.calculateHillshadeParams(s),u=this.rasterInfo.statistics[0];return t.__assign(t.__assign({},l),{minValue:u.min,maxValue:u.max,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:i,colormapOffset:a})},r.prototype.isValidPixelBlock=function(e){return!!(e&&e.pixels&&e.pixels.length>0&&0!==e.validPixelCount)},t.__decorate([s.property({types:o.rasterRendererTypes,json:{write:!0}})],r.prototype,"renderer",void 0),t.__decorate([s.reader("renderer")],r.prototype,"readRenderer",null),t.__decorate([s.property({type:l,json:{write:!0}})],r.prototype,"rasterInfo",void 0),t.__decorate([s.property({json:{write:!0}})],r.prototype,"lookup",void 0),t.__decorate([s.property({})],r.prototype,"canRenderInWebGL",void 0),t.__decorate([s.subclass("esri.renderers.support.RasterSymbolizer")],r)}(a.JSONSupport)}).apply(null,o))||(e.exports=i)},D34G:function(e,r,t){var o,i;o=[t("r5V0")],void 0===(i=(function(e){return function(r){var t,o,i;function a(e){var r,t,o,i,a,n,s,l,u,f,p,c;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(r=this.readUInt32(),s=(function(){var e,r;for(r=[],e=0;e<4;++e)r.push(String.fromCharCode(this.data[this.pos++]));return r}).call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(r);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},o=this.readUInt16(),t=this.readUInt16()||100,i.delay=1e3*o/t,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===s&&(this.pos+=4,r-=4),e=(null!=i?i.data:void 0)||this.imgData,f=0;0<=r?f<r:f>r;0<=r?++f:--f)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(r),(l=255-this.transparency.indexed.length)>0)for(p=0;0<=l?p<l:p>l;0<=l?++p:--p)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(r)[0];break;case 2:this.transparency.rgb=this.read(r)}break;case"tEXt":a=(u=this.read(r)).indexOf(0),n=String.fromCharCode.apply(String,u.slice(0,a)),this.text[n]=String.fromCharCode.apply(String,u.slice(a+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=(function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}).call(this),this.hasAlphaChannel=4===(c=this.colorType)||6===c,this.pixelBitlength=this.bits*(this.colors+(this.hasAlphaChannel?1:0)),this.colorSpace=(function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}).call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=r}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return a.load=function(e,r,t){var o;return"function"==typeof r&&(t=r),(o=new XMLHttpRequest).open("GET",e,!0),o.responseType="arraybuffer",o.onload=function(){var e;return e=new a(new Uint8Array(o.response||o.mozResponseArrayBuffer)),"function"==typeof(null!=r?r.getContext:void 0)&&e.render(r),"function"==typeof t?t(e):void 0},o.send(null)},a.prototype.read=function(e){var r,t;for(t=[],r=0;0<=e?r<e:r>e;0<=e?++r:--r)t.push(this.data[this.pos++]);return t},a.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},a.prototype.decodePixels=function(r){var t,o,i,a,n,s,l,u,f,p,c,d,h,m,g,y,v,w,C,b,T,k;if(null==r&&(r=this.imgData),0===r.length)return new Uint8Array(0);for(r=(r=new e(r)).getBytes(),g=(c=this.pixelBitlength/8)*this.width,d=new Uint8Array(g*this.height),s=r.length,m=0,h=0,o=0;h<s;){switch(r[h++]){case 0:for(a=w=0;w<g;a=w+=1)d[o++]=r[h++];break;case 1:for(a=C=0;C<g;a=C+=1)t=r[h++],n=a<c?0:d[o-c],d[o++]=(t+n)%256;break;case 2:for(a=b=0;b<g;a=b+=1)t=r[h++],i=(a-a%c)/c,d[o++]=((y=m&&d[(m-1)*g+i*c+a%c])+t)%256;break;case 3:for(a=T=0;T<g;a=T+=1)t=r[h++],i=(a-a%c)/c,n=a<c?0:d[o-c],y=m&&d[(m-1)*g+i*c+a%c],d[o++]=(t+Math.floor((n+y)/2))%256;break;case 4:for(a=k=0;k<g;a=k+=1)t=r[h++],i=(a-a%c)/c,0===m?y=v=0:(y=d[(m-1)*g+i*c+a%c],v=i&&d[(m-1)*g+(i-1)*c+a%c]),l=(n=a<c?0:d[o-c])+y-v,u=Math.abs(l-n),f=Math.abs(l-y),p=Math.abs(l-v),d[o++]=(t+(u<=f&&u<=p?n:f<=p?y:v))%256;break;default:throw new Error("Invalid filter algorithm: "+r[h-1])}m++}return d},a.prototype.decodePalette=function(){var e,r,t,o,i,a,n,s,l;for(t=this.palette,a=this.transparency.indexed||[],i=new Uint8Array((a.length||0)+t.length),o=0,e=0,r=n=0,s=t.length;n<s;r=n+=3)i[o++]=t[r],i[o++]=t[r+1],i[o++]=t[r+2],i[o++]=null!=(l=a[e++])?l:255;return i},a.prototype.copyToImageData=function(e,r){var t,o,i,a,n,s,l,u,f,p,c;if(o=this.colors,f=null,t=this.hasAlphaChannel,this.palette.length&&(f=null!=(c=this._decodedPalette)?c:this._decodedPalette=this.decodePalette(),o=4,t=!0),u=(i=e.data||e).length,n=f||r,a=s=0,1===o)for(;a<u;)l=f?4*r[a/4]:s,p=n[l++],i[a++]=p,i[a++]=p,i[a++]=p,i[a++]=t?n[l++]:this.transparency.grayscale&&this.transparency.grayscale===p?0:255,s=l;else for(;a<u;)l=f?4*r[a/4]:s,i[a++]=n[l++],i[a++]=n[l++],i[a++]=n[l++],i[a++]=t?n[l++]:this.transparency.rgb&&this.transparency.rgb[1]===n[l-3]&&this.transparency.rgb[3]===n[l-2]&&this.transparency.rgb[5]===n[l-1]?0:255,s=l},a.prototype.decode=function(){var e;return e=new Uint8Array(this.width*this.height*4),this.copyToImageData(e,this.decodePixels()),e},o=r.document&&r.document.createElement("canvas"),i=o&&o.getContext("2d"),t=function(e){var r;return i.width=e.width,i.height=e.height,i.clearRect(0,0,e.width,e.height),i.putImageData(e,0,0),(r=new Image).src=o.toDataURL(),r},a.prototype.decodeFrames=function(e){var r,o,i,a,n,s,l,u;if(this.animation){for(u=[],o=n=0,s=(l=this.animation.frames).length;n<s;o=++n)i=e.createImageData((r=l[o]).width,r.height),a=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(i,a),r.imageData=i,u.push(r.image=t(i));return u}},a.prototype.renderFrame=function(e,r){var t,o,i;return t=(o=this.animation.frames)[r],i=o[r-1],0===r&&e.clearRect(0,0,this.width,this.height),1===(null!=i?i.disposeOp:void 0)?e.clearRect(i.xOffset,i.yOffset,i.width,i.height):2===(null!=i?i.disposeOp:void 0)&&e.putImageData(i.imageData,i.xOffset,i.yOffset),0===t.blendOp&&e.clearRect(t.xOffset,t.yOffset,t.width,t.height),e.drawImage(t.image,t.xOffset,t.yOffset)},a.prototype.animate=function(e){var r,t,o,i,a,n,s=this;return t=0,i=(n=this.animation).numFrames,o=n.frames,a=n.numPlays,(r=function(){var n,l;if(n=t++%i,l=o[n],s.renderFrame(e,n),i>1&&t/i<a)return s.animation._timeout=setTimeout(r,l.delay)})()},a.prototype.stopAnimation=function(){var e;return clearTimeout(null!=(e=this.animation)?e._timeout:void 0)},a.prototype.render=function(e){var r,t;return e._png&&e._png.stopAnimation(),e._png=this,e.width=this.width,e.height=this.height,r=e.getContext("2d"),this.animation?(this.decodeFrames(r),this.animate(r)):(t=r.createImageData(this.width,this.height),this.copyToImageData(t,this.decodePixels()),r.putImageData(t,0,0))},a}(this)}).apply(null,o))||(e.exports=i)},EZfi:function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("xIS7"),t("r5V0")],void 0===(i=(function(e,r,t,o){return function(){function e(){}return e.decode=function(e){var r=new Uint8Array(e),i=new t;i.parse(r);var a,n=i.width,s=i.height,l=i.numComponents,u=i.eof,f=i.getData(n,s,!0),p=n*s,c=0,d=0,h=0;if(u<r.length-1){var m=new o(r.subarray(u)).getBytes();a=new Uint8Array(p);var g=0;for(c=0;c<m.length;c++)for(h=7;h>=0;h--)a[g++]=m[c]>>h&1}var y,v=null;if(1===l)v=[f,f,f];else{for(v=[],c=0;c<3;c++)y=new Uint8Array(p),v.push(y);for(h=0,d=0;d<p;d++)for(c=0;c<3;c++)v[c][d]=f[h++]}return{width:n,height:s,pixels:v,mask:a}},e}()}).apply(null,o))||(e.exports=i)},IbdV:function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("zOht"),t("QDcU"),t("ycL1"),t("Vx27")],i=(function(e,r,t,o,i,a){return function(e){function r(){var r=null!==e&&e.apply(this,arguments)||this;return r.value=null,r.label=null,r.color=null,r}return t.__extends(r,e),t.__decorate([a.property({type:Number,json:{write:!0}})],r.prototype,"value",void 0),t.__decorate([a.property({type:String,json:{write:!0}})],r.prototype,"label",void 0),t.__decorate([a.property({type:o,json:{write:!0}})],r.prototype,"color",void 0),t.__decorate([a.subclass("esri.renderers.support.ColormapInfo")],r)}(i.JSONSupport)}).apply(null,o),void 0===i||(e.exports=i)},Jhq5:function(e,r,t){var o,i;o=[t.dj.c(e.i),r],void 0===(i=(function(e,r){var t,o=((t=[])[254]="NEWSUBFILETYPE",t[255]="SUBFILETYPE",t[256]="IMAGEWIDTH",t[257]="IMAGELENGTH",t[258]="BITSPERSAMPLE",t[259]="COMPRESSION",t[262]="PHOTOMETRICINTERPRETATION",t[263]="THRESHHOLDING",t[264]="CELLWIDTH",t[265]="CELLLENGTH",t[266]="FILLORDER",t[269]="DOCUMENTNAME",t[270]="IMAGEDESCRIPTION",t[271]="MAKE",t[272]="MODEL",t[273]="STRIPOFFSETS",t[274]="ORIENTATION",t[277]="SAMPLESPERPIXEL",t[278]="ROWSPERSTRIP",t[279]="STRIPBYTECOUNTS",t[280]="MINSAMPLEVALUE",t[281]="MAXSAMPLEVALUE",t[282]="XRESOLUTION",t[283]="YRESOLUTION",t[284]="PLANARCONFIGURATION",t[285]="PAGENAME",t[286]="XPOSITION",t[287]="YPOSITION",t[288]="FREEOFFSETS",t[289]="FREEBYTECOUNTS",t[290]="GRAYRESPONSEUNIT",t[291]="GRAYRESPONSECURVE",t[292]="T4OPTIONS",t[293]="T6OPTIONS",t[296]="RESOLUTIONUNIT",t[297]="PAGENUMBER",t[300]="COLORRESPONSEUNIT",t[301]="TRANSFERFUNCTION",t[305]="SOFTWARE",t[306]="DATETIME",t[315]="ARTIST",t[316]="HOSTCOMPUTER",t[317]="PREDICTOR",t[318]="WHITEPOINT",t[319]="PRIMARYCHROMATICITIES",t[320]="COLORMAP",t[321]="HALFTONEHINTS",t[322]="TILEWIDTH",t[323]="TILELENGTH",t[324]="TILEOFFSETS",t[325]="TILEBYTECOUNTS",t[326]="BADFAXLINES",t[327]="CLEANFAXDATA",t[328]="CONSECUTIVEBADFAXLINES",t[330]="SUBIFD",t[332]="INKSET",t[333]="INKNAMES",t[334]="NUMBEROFINKS",t[336]="DOTRANGE",t[337]="TARGETPRINTER",t[338]="EXTRASAMPLES",t[339]="SAMPLEFORMAT",t[340]="SMINSAMPLEVALUE",t[341]="SMAXSAMPLEVALUE",t[342]="TRANSFERRANGE",t[347]="JPEGTABLES",t[512]="JPEGPROC",t[513]="JPEGIFOFFSET",t[514]="JPEGIFBYTECOUNT",t[515]="JPEGRESTARTINTERVAL",t[517]="JPEGLOSSLESSPREDICTORS",t[518]="JPEGPOINTTRANSFORM",t[519]="JPEGQTABLES",t[520]="JPEGDCTABLES",t[521]="JPEGACTABLES",t[529]="YCBCRCOEFFICIENTS",t[530]="YCBCRSUBSAMPLING",t[531]="YCBCRPOSITIONING",t[532]="REFERENCEBLACKWHITE",t[700]="XMP",t[33550]="GEOPIXELSCALE",t[33922]="GEOTIEPOINTS",t[33432]="COPYRIGHT",t[42112]="GDAL_METADATA",t[42113]="GDAL_NODATA",t[50844]="RPCCOEFFICIENT",t[34264]="GEOTRANSMATRIX",t[34735]="GEOKEYDIRECTORY",t[34736]="GEODOUBLEPARAMS",t[34737]="GEOASCIIPARAMS",t[34665]="EXIFIFD",t[34853]="GPSIFD",t[40965]="INTEROPERABILITYIFD",t),i=function(){var e=[].concat(o);return e[36864]="ExifVersion",e[40960]="FlashpixVersion",e[40961]="ColorSpace",e[42240]="Gamma",e[37121]="ComponentsConfiguration",e[37122]="CompressedBitsPerPixel",e[40962]="PixelXDimension",e[40963]="PixelYDimension",e[37500]="MakerNote",e[37510]="UserComment",e[40964]="RelatedSoundFile",e[36867]="DateTimeOriginal",e[36868]="DateTimeDigitized",e[36880]="OffsetTime",e[36881]="OffsetTimeOriginal",e[36882]="OffsetTimeDigitized",e[37520]="SubSecTime",e[37521]="SubSecTimeOriginal",e[37522]="SubSecTimeDigitized",e[37888]="Temperature",e[37889]="Humidity",e[37890]="Pressure",e[37891]="WaterDepth",e[37892]="Acceleration",e[37893]="CameraElevationAngle",e[42016]="ImageUniqueID",e[42032]="CameraOwnerName",e[42033]="BodySerialNumber",e[42034]="LensSpecification",e[42035]="LensMake",e[42036]="LensModel",e[42037]="LensSerialNumber",e[33434]="ExposureTime",e[33437]="FNumber",e[34850]="ExposureProgram",e[34852]="SpectralSensitivity",e[34855]="PhotographicSensitivity",e[34856]="OECF",e[34864]="SensitivityType",e[34865]="StandardOutputSensitivity",e[34866]="RecommendedExposureIndex",e[34867]="ISOSpeed",e[34868]="ISOSpeedLatitudeyyy",e[34869]="ISOSpeedLatitudezzz",e[37377]="ShutterSpeedValue",e[37378]="ApertureValue",e[37379]="BrightnessValue",e[37380]="ExposureBiasValue",e[37381]="MaxApertureValue",e[37382]="SubjectDistance",e[37383]="MeteringMode",e[37384]="LightSource",e[37385]="Flash",e[37386]="FocalLength",e[37396]="SubjectArea",e[41483]="FlashEnergy",e[41484]="SpatialFrequencyResponse",e[41486]="FocalPlaneXResolution",e[41487]="FocalPlaneYResolution",e[41488]="FocalPlaneResolutionUnit",e[41492]="SubjectLocation",e[41493]="ExposureIndex",e[41495]="SensingMethod",e[41728]="FileSource",e[41729]="SceneType",e[41730]="CFAPattern",e[41985]="CustomRendered",e[41986]="ExposureMode",e[41987]="WhiteBalance",e[41988]="DigitalZoomRatio",e[41989]="FocalLengthIn35mmFilm",e[41990]="SceneCaptureType",e[41991]="GainControl",e[41992]="Contrast",e[41993]="Saturation",e[41994]="Sharpness",e[41995]="DeviceSettingDescription",e[41996]="SubjectDistanceRange",e}(),a=function(){var e=[];return e[1024]="GTModelTypeGeoKey",e[1025]="GTRasterTypeGeoKey",e[1026]="GTCitationGeoKey",e[2048]="GeographicTypeGeoKey",e[2049]="GeogCitationGeoKey",e[2050]="GeogGeodeticDatumGeoKey",e[2051]="GeogPrimeMeridianGeoKey",e[2052]="GeogLinearUnitsGeoKey",e[2053]="GeogLinearUnitSizeGeoKey",e[2054]="GeogAngularUnitsGeoKey",e[2055]="GeogAngularUnitSizeGeoKey",e[2056]="GeogEllipsoidGeoKey",e[2057]="GeogSemiMajorAxisGeoKey",e[2058]="GeogSemiMinorAxisGeoKey",e[2059]="GeogInvFlatteningGeoKey",e[2061]="GeogPrimeMeridianLongGeoKey",e[2060]="GeogAzimuthUnitsGeoKey",e[3072]="ProjectedCSTypeGeoKey",e[3073]="PCSCitationGeoKey",e[3074]="ProjectionGeoKey",e[3075]="ProjCoordTransGeoKey",e[3076]="ProjLinearUnitsGeoKey",e[3077]="ProjLinearUnitSizeGeoKey",e[3078]="ProjStdParallel1GeoKey",e[3079]="ProjStdParallel2GeoKey",e[3080]="ProjNatOriginLongGeoKey",e[3081]="ProjNatOriginLatGeoKey",e[3082]="ProjFalseEastingGeoKey",e[3083]="ProjFalseNorthingGeoKey",e[3084]="ProjFalseOriginLongGeoKey",e[3085]="ProjFalseOriginLatGeoKey",e[3086]="ProjFalseOriginEastingGeoKey",e[3087]="ProjFalseOriginNorthingGeoKey",e[3088]="ProjCenterLongGeoKey",e[3090]="ProjCenterEastingGeoKey",e[3091]="ProjCenterNorthingGeoKey",e[3092]="ProjScaleAtNatOriginGeoKey",e[3093]="ProjScaleAtCenterGeoKey",e[3094]="ProjAzimuthAngleGeoKey",e[3095]="ProjStraightVertPoleLongGeoKey",e[4096]="VerticalCSTypeGeoKey",e[4097]="VerticalCitationGeoKey",e[4098]="VerticalDatumGeoKey",e[4099]="VerticalUnitsGeoKey",e}(),n=new Map;return n.set("EXIFIFD",i),n.set("GPSIFD",["GPSVersionID","GPSLatitudeRef","GPSLatitude","GPSLongitudeRef","GPSLongitude","GPSAltitudeRef","GPSAltitude","GPSTimeStamp","GPSSatellites","GPSStatus","GPSMeasureMode","GPSDOP","GPSSpeedRef","GPSSpeed","GPSTrackRef","GPSTrack","GPSImgDirectionRef","GPSImgDirection","GPSMapDatum","GPSDestLatitudeRef","GPSDestLatitude","GPSDestLongitudeRef","GPSDestLongitude","GPSDestBearingRef","GPSDestBearing","GPSDestDistanceRef","GPSDestDistance","GPSProcessingMethod","GPSAreaInformation","GPSDateStamp","GPSDifferential","GPSHPositioningError"]),{TIFF_TAGS:o,ifdTags:n,GEO_KEYS:a,getTagName:function(e,r){var t=(r||o)[e];return void 0===t&&(t="unknown"+String(e)),t}}}).apply(null,o))||(e.exports=i)},Kjnw:function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("zOht"),t("ycL1"),t("Vx27"),t("N7S/"),t("w1v0")],void 0===(i=(function(e,r,t,o,i,a,n){return function(e){function r(r){var t=e.call(this,r)||this;return t.attributeTable=null,t.bandCount=null,t.colormap=null,t.extent=null,t.format=void 0,t.height=null,t.width=null,t.histograms=null,t.keyProperties=null,t.multidimensionalInfo=null,t.noDataValue=null,t.pixelSize=null,t.pixelType=null,t.spatialReference=null,t.statistics=null,t.storageInfo=null,t}return t.__extends(r,e),Object.defineProperty(r.prototype,"dataType",{get:function(){var e=this.keyProperties&&this.keyProperties.DataType;return e?e.toLowerCase():"generic"},enumerable:!0,configurable:!0}),t.__decorate([i.property({type:n,json:{write:!0}})],r.prototype,"attributeTable",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"bandCount",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"colormap",void 0),t.__decorate([i.property({type:String,readOnly:!0})],r.prototype,"dataType",null),t.__decorate([i.property({type:a,json:{write:!0}})],r.prototype,"extent",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"format",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"height",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"width",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"histograms",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"keyProperties",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"multidimensionalInfo",void 0),t.__decorate([i.property()],r.prototype,"noDataValue",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"pixelSize",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"pixelType",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"spatialReference",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"statistics",void 0),t.__decorate([i.property({json:{write:!0}})],r.prototype,"storageInfo",void 0),t.__decorate([i.subclass("esri.layers.support.RasterInfo")],r)}(o.JSONSupport)}).apply(null,o))||(e.exports=i)},QT0f:function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("ma1f"),t("qMld"),t("qMld"),t("r5V0")],void 0===(i=(function(e,r,t,o,i,a){return function(){function e(e){e&&(this.canvas=e.canvas,this.ctx=e.ctx||e.canvas&&e.canvas.getContext("2d"))}return e.getFormat=function(e){if(!e||e.byteLength<10)return"";var r=new Uint8Array(e,0,10),t="";return 255===r[0]&&216===r[1]?t="jpeg":137===r[0]&&80===r[1]&&78===r[2]&&71===r[3]&&(t="png"),t},e.prototype.decode=function(r,a,n){var s=this;if(!r||r.byteLength<10)throw new t("imagecanvasdecoder: decode","required a valid encoded data as input.");var l=e.getFormat(r);if(""===l)throw new t("imagecanvasdecoder: decode","encoded data format is not a supported format (jpeg or png).");var u=a.width,f=a.height,p=a.applyJpegMask;if(p&&(!u||!f))throw new t("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return o.create((function(t,c){var d=null;"jpeg"===l&&p&&(d=e.getMask(r,a));var h,m=new Blob([new Uint8Array(r)],{type:"image/"+l}),g=URL.createObjectURL(m),y=new Image;y.src=g,y.onload=function(){if(URL.revokeObjectURL(g),o.isAborted(n))c(i.createAbortError());else{u=y.width,f=y.height,s.canvas?(s.canvas.width===u&&s.canvas.height===f||(s.canvas.width=u,s.canvas.height=f),s.ctx.clearRect(0,0,u,f)):(s.canvas=document.createElement("canvas"),s.canvas.width=u,s.canvas.height=f,s.ctx=s.canvas.getContext("2d")),s.ctx.drawImage(y,0,0);var e,r=s.ctx.getImageData(0,0,u,f);if(h=r.data,a.renderOnCanvas){if(d)for(e=0;e<d.length;e++)h[4*e+3]=d[e]?255:0;return s.ctx.putImageData(r,0,0),void t(null)}var l=u*f,p=new Uint8Array(l),m=new Uint8Array(l),v=new Uint8Array(l);if(d)for(e=0;e<l;e++)p[e]=h[4*e],m[e]=h[4*e+1],v[e]=h[4*e+2];else for(d=new Uint8Array(l),e=0;e<l;e++)p[e]=h[4*e],m[e]=h[4*e+1],v[e]=h[4*e+2],d[e]=h[4*e+3];t({width:u,height:f,pixels:[p,m,v],mask:d,pixelType:"u8"})}},y.onerror=function(){URL.revokeObjectURL(g),c("cannot load image")}}))},e.getMask=function(e,r){var t=null;try{var o=new Uint8Array(e),i=Math.ceil(o.length/2),n=0,s=o.length-2;for(n=i;n<s&&(255!==o[n]||217!==o[n+1]);n++);if((n+=2)<o.length-1){var l=new a(o.subarray(n)).getBytes();t=new Uint8Array(r.width*r.height);for(var u=0,f=0;f<l.length;f++)for(var p=7;p>=0;p--)t[u++]=l[f]>>p&1}}catch(e){}return t},e}()}).apply(null,o))||(e.exports=i)},Rc7o:function(e,r,t){var o,i;o=[t("xoE+")],void 0===(i=(function(e){var r={};r.defaultNoDataValue=e.clampFloat32(-1/0),r.decode=function(n,s){var l=(s=s||{}).encodedMaskData||null===s.encodedMaskData,u=a(n,s.inputOffset||0,l),f=null!=s.noDataValue?e.clampFloat32(s.noDataValue):r.defaultNoDataValue,p=t(u,s.pixelType||Float32Array,s.encodedMaskData,f,s.returnMask),c={width:u.width,height:u.height,pixelData:p.resultPixels,minValue:u.pixels.minValue,maxValue:u.pixels.maxValue,noDataValue:f};return p.resultMask&&(c.maskData=p.resultMask),s.returnEncodedMask&&u.mask&&(c.encodedMaskData=u.mask.bitset?u.mask.bitset:null),s.returnFileInfo&&(c.fileInfo=o(u),s.computeUsedBitDepths&&(c.fileInfo.bitDepths=i(u))),c};var t=function(e,r,t,o,i){var a,s,l=0,u=e.pixels.numBlocksX,f=e.pixels.numBlocksY,p=Math.floor(e.width/u),c=Math.floor(e.height/f),d=2*e.maxZError;t=t||(e.mask?e.mask.bitset:null),a=new r(e.width*e.height),i&&t&&(s=new Uint8Array(e.width*e.height));for(var h,m,g=new Float32Array(p*c),y=0;y<=f;y++){var v=y!==f?c:e.height%f;if(0!==v)for(var w=0;w<=u;w++){var C=w!==u?p:e.width%u;if(0!==C){var b,T,k,x,S=y*e.width*c+w*p,I=e.width-C,_=e.pixels.blocks[l];if(_.encoding<2?(0===_.encoding?b=_.rawData:(n(_.stuffedData,_.bitsPerPixel,_.numValidPixels,_.offset,d,g,e.pixels.maxValue),b=g),T=0):k=2===_.encoding?0:_.offset,t)for(m=0;m<v;m++){for(7&S&&(x=t[S>>3],x<<=7&S),h=0;h<C;h++)7&S||(x=t[S>>3]),128&x?(s&&(s[S]=1),a[S++]=_.encoding<2?b[T++]:k):(s&&(s[S]=0),a[S++]=o),x<<=1;S+=I}else if(_.encoding<2)for(m=0;m<v;m++){for(h=0;h<C;h++)a[S++]=b[T++];S+=I}else for(m=0;m<v;m++)if(a.fill)a.fill(k,S,S+C),S+=C+I;else{for(h=0;h<C;h++)a[S++]=k;S+=I}if(1===_.encoding&&T!==_.numValidPixels)throw"Block and Mask do not match";l++}}}return{resultPixels:a,resultMask:s}},o=function(e){return{fileIdentifierString:e.fileIdentifierString,fileVersion:e.fileVersion,imageType:e.imageType,height:e.height,width:e.width,maxZError:e.maxZError,eofOffset:e.eofOffset,mask:e.mask?{numBlocksX:e.mask.numBlocksX,numBlocksY:e.mask.numBlocksY,numBytes:e.mask.numBytes,maxValue:e.mask.maxValue}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,numBytes:e.pixels.numBytes,maxValue:e.pixels.maxValue,minValue:e.pixels.minValue,noDataValue:this.noDataValue}}},i=function(e){for(var r=e.pixels.numBlocksX*e.pixels.numBlocksY,t={},o=0;o<r;o++){var i=e.pixels.blocks[o];0===i.encoding?t.float32=!0:1===i.encoding?t[i.bitsPerPixel]=!0:t[0]=!0}return Object.keys(t)},a=function(e,r,t){var o={},i=new Uint8Array(e,r,10);if(o.fileIdentifierString=String.fromCharCode.apply(null,i),"CntZImage"!=o.fileIdentifierString.trim())throw"Unexpected file identifier string: "+o.fileIdentifierString;r+=10;var a=new DataView(e,r,24);if(o.fileVersion=a.getInt32(0,!0),o.imageType=a.getInt32(4,!0),o.height=a.getUint32(8,!0),o.width=a.getUint32(12,!0),o.maxZError=a.getFloat64(16,!0),r+=24,!t)if(a=new DataView(e,r,16),o.mask={},o.mask.numBlocksY=a.getUint32(0,!0),o.mask.numBlocksX=a.getUint32(4,!0),o.mask.numBytes=a.getUint32(8,!0),o.mask.maxValue=a.getFloat32(12,!0),r+=16,o.mask.numBytes>0){var n=new Uint8Array(Math.ceil(o.width*o.height/8)),s=(a=new DataView(e,r,o.mask.numBytes)).getInt16(0,!0),l=2,u=0;do{if(s>0)for(;s--;)n[u++]=a.getUint8(l++);else{var f=a.getUint8(l++);for(s=-s;s--;)n[u++]=f}s=a.getInt16(l,!0),l+=2}while(l<o.mask.numBytes);if(-32768!==s||u<n.length)throw"Unexpected end of mask RLE encoding";o.mask.bitset=n,r+=o.mask.numBytes}else 0==(o.mask.numBytes|o.mask.numBlocksY|o.mask.maxValue)&&(n=new Uint8Array(Math.ceil(o.width*o.height/8)),o.mask.bitset=n);a=new DataView(e,r,16),o.pixels={},o.pixels.numBlocksY=a.getUint32(0,!0),o.pixels.numBlocksX=a.getUint32(4,!0),o.pixels.numBytes=a.getUint32(8,!0),o.pixels.maxValue=a.getFloat32(12,!0),r+=16;var p=o.pixels.numBlocksX,c=o.pixels.numBlocksY,d=p+(o.width%p>0?1:0),h=c+(o.height%c>0?1:0);o.pixels.blocks=new Array(d*h);for(var m=1e9,g=0,y=0;y<h;y++)for(var v=0;v<d;v++){var w=0;a=new DataView(e,r,Math.min(10,e.byteLength-r));var C={};o.pixels.blocks[g++]=C;var b=a.getUint8(0);if(w++,C.encoding=63&b,C.encoding>3)throw"Invalid block encoding ("+C.encoding+")";if(2!==C.encoding){if(0!==b&&2!==b){if(C.offsetType=b>>=6,2===b)C.offset=a.getInt8(1),w++;else if(1===b)C.offset=a.getInt16(1,!0),w+=2;else{if(0!==b)throw"Invalid block offset type";C.offset=a.getFloat32(1,!0),w+=4}if(m=Math.min(C.offset,m),1===C.encoding)if(b=a.getUint8(w),w++,C.bitsPerPixel=63&b,C.numValidPixelsType=b>>=6,2===b)C.numValidPixels=a.getUint8(w),w++;else if(1===b)C.numValidPixels=a.getUint16(w,!0),w+=2;else{if(0!==b)throw"Invalid valid pixel count type";C.numValidPixels=a.getUint32(w,!0),w+=4}}var T;if(r+=w,3!=C.encoding)if(0===C.encoding){var k=(o.pixels.numBytes-1)/4;if(k!==Math.floor(k))throw"uncompressed block has invalid length";T=new ArrayBuffer(4*k),new Uint8Array(T).set(new Uint8Array(e,r,4*k));for(var x=new Float32Array(T),S=0;S<x.length;S++)m=Math.min(m,x[S]);C.rawData=x,r+=4*k}else if(1===C.encoding){var I=Math.ceil(C.numValidPixels*C.bitsPerPixel/8),_=Math.ceil(I/4);T=new ArrayBuffer(4*_),new Uint8Array(T).set(new Uint8Array(e,r,I)),C.stuffedData=new Uint32Array(T),r+=I}}else r++,m=Math.min(m,0)}return o.pixels.minValue=m,o.eofOffset=r,o},n=function(e,r,t,o,i,a,n){var s,l,u,f=(1<<r)-1,p=0,c=0,d=Math.ceil((n-o)/i),h=4*e.length-Math.ceil(r*t/8);for(e[e.length-1]<<=8*h,s=0;s<t;s++){if(0===c&&(u=e[p++],c=32),c>=r)l=u>>>c-r&f,c-=r;else{var m=r-c;l=(u&f)<<m&f,l+=(u=e[p++])>>>(c=32-m)}a[s]=l<d?o+l*i:n}return a};return r}).apply(null,o))||(e.exports=i)},TnfJ:function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("zOht"),t("ycL1"),t("rg9i"),t("Vx27"),t("hBcF"),t("eVYp")],void 0===(i=(function(e,r,t,o,i,a,n,s){return function(e){function r(r){var t=e.call(this,r)||this;return t.colorRamp=null,t.computeGamma=!1,t.dynamicRangeAdjustment=!1,t.gamma=[],t.maxPercent=null,t.minPercent=null,t.numberOfStandardDeviations=null,t.outputMax=null,t.outputMin=null,t.sigmoidStrengthLevel=null,t.statistics=[],t.histograms=null,t.useGamma=!1,t.stretchType="none",t.type="raster-stretch",t}var o;return t.__extends(r,e),o=r,r.prototype.readColorRamp=function(e){if(e)return s.fromJSON(e)},r.prototype.writeStatistics=function(e,r,t){null==e||0===e.length?e=null:e[0]instanceof Array||(e=e.map((function(e){return[e.min,e.max,e.avg,e.stddev]}))),r[t]=e},r.prototype.readStretchType=function(e,r){var t=r.stretchType;return"number"==typeof t&&(t=n.stretchTypeFunctionEnum[t]),n.stretchTypeJSONDict.read(t)},r.prototype.clone=function(){return new o({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:i.clone(this.statistics),gamma:i.clone(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,colorRamp:i.clone(this.colorRamp),histograms:i.clone(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment})},t.__decorate([a.property({types:s.types,json:{write:!0}})],r.prototype,"colorRamp",void 0),t.__decorate([a.reader("colorRamp")],r.prototype,"readColorRamp",null),t.__decorate([a.property({type:Boolean,json:{write:!0}})],r.prototype,"computeGamma",void 0),t.__decorate([a.property({type:Boolean,json:{write:{target:"dra"},read:{source:"dra"}}})],r.prototype,"dynamicRangeAdjustment",void 0),t.__decorate([a.property({type:[Number],json:{write:{allowNull:!0}}})],r.prototype,"gamma",void 0),t.__decorate([a.property({type:Number,json:{write:{allowNull:!0}}})],r.prototype,"maxPercent",void 0),t.__decorate([a.property({type:Number,json:{write:{allowNull:!0}}})],r.prototype,"minPercent",void 0),t.__decorate([a.property({type:Number,json:{write:{allowNull:!0}}})],r.prototype,"numberOfStandardDeviations",void 0),t.__decorate([a.property({type:Number,json:{read:{source:"max"},write:{target:"max",allowNull:!0}}})],r.prototype,"outputMax",void 0),t.__decorate([a.property({type:Number,json:{read:{source:"min"},write:{target:"min",allowNull:!0}}})],r.prototype,"outputMin",void 0),t.__decorate([a.property({type:Number,json:{write:{allowNull:!0}}})],r.prototype,"sigmoidStrengthLevel",void 0),t.__decorate([a.property({json:{write:{allowNull:!0}}})],r.prototype,"statistics",void 0),t.__decorate([a.property()],r.prototype,"histograms",void 0),t.__decorate([a.writer("statistics")],r.prototype,"writeStatistics",null),t.__decorate([a.property({type:Boolean,json:{write:!0}})],r.prototype,"useGamma",void 0),t.__decorate([a.property({type:n.stretchTypeJSONDict.apiValues,json:{type:n.stretchTypeJSONDict.jsonValues,write:n.stretchTypeJSONDict.write}})],r.prototype,"stretchType",void 0),t.__decorate([a.reader("stretchType",["stretchType"])],r.prototype,"readStretchType",null),t.__decorate([a.enumeration({rasterStretch:"raster-stretch"})],r.prototype,"type",void 0),o=t.__decorate([a.subclass("esri.renderers.RasterStretchRenderer")],r)}(o.JSONSupport)}).apply(null,o))||(e.exports=i)},UVEp:function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("QDcU"),t("KtQ6")],void 0===(i=(function(e,r,t,o){function i(e,r){if(!e||!r||e.length!==r.length)return!1;for(var t=0;t<e.length;t++)if(e[t]>r[t]+2||e[t]<r[t]-2)return!1;return!0}function a(e,r,t){var i=o.toLAB(e),a=o.toLAB(r);return o.toRGB({l:i.l*(1-t)+t*a.l,a:i.a*(1-t)+t*a.a,b:i.b*(1-t)+t*a.b})}function n(e,o){if(e){var a,n=o||r.PREDEFINED_JSON_COLOR_RAMPS,s=null;return"algorithmic"===e.type?n.some((function(r){if(i(e.fromColor.toRgb(),r.fromColor)&&i(e.toColor.toRgb(),r.toColor))return s=r.id,!0})):"multipart"===e.type&&n.some((function(r){if(e.colorRamps&&r.colorRamps&&e.colorRamps.length===r.colorRamps.length&&(a=e.colorRamps,!r.colorRamps.some((function(e,r){if(!i(a[r].fromColor.toRgb(),new t(e.fromColor).toRgb())||!i(a[r].toColor.toRgb(),new t(e.toColor).toRgb()))return!0})))){if(s)return!0;s=r.id}})),s}}Object.defineProperty(r,"__esModule",{value:!0}),r.PREDEFINED_JSON_COLOR_RAMPS=[{id:"aspect_predefined",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"blackToWhite_predefined",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blueBright_predefined",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blueLightToDark_predefined",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blueGreenBright_predefined",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blueGreenLightToDark_predefined",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brownLightToDark_predefined",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brownToBlueGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brownToBlueGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficientBias_predefined",fromColor:[214,214,255],toColor:[0,57,148]},{id:"coldToHotDiverging_predefined",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"conditionNumber_predefined",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyanToPurple_predefined",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyanLightToBlueDark_predefined",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance_predefined",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1_predefined",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2_predefined",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors_predefined",fromColor:[255,235,214],toColor:[196,10,10]},{id:"grayLightToDark_predefined",fromColor:[219,219,219],toColor:[69,69,69]},{id:"greenBright_predefined",fromColor:[204,255,204],toColor:[14,204,14]},{id:"greenLightToDark_predefined",fromColor:[220,245,233],toColor:[34,102,51]},{id:"greenToBlue_predefined",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orangeBright_predefined",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orangeLightToDark_predefined",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partialSpectrum_predefined",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partialSpectrum1Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partialSpectrum2Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pinkToYellowGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pinkToYellowGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation_predefined",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction_predefined",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purpleBright_predefined",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purpleToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purpleToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purpleBlueBright_predefined",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purpleBlueLightToDark_predefined",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purpleRedBright_predefined",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purpleRedLightToDark_predefined",fromColor:[250,215,246],toColor:[143,17,57]},{id:"redBright_predefined",fromColor:[255,204,204],toColor:[219,0,0]},{id:"redLightToDark_predefined",fromColor:[255,224,224],toColor:[143,10,10]},{id:"redToBlueDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"redToBlueDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"redToGreen_predefined",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"redToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"redToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope_predefined",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrumFullBright_predefined",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrumFullDark_predefined",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrumFullLight_predefined",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface_predefined",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature_predefined",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"whiteToBlack_predefined",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellowToDarkRed_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellowToGreenToDarkBlue_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellowToRed_predefined",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellowGreenBright_predefined",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellowGreenLightToDark_predefined",fromColor:[215,240,175],toColor:[96,107,45]}],r.PREDEFINED_COLOR_RAMP_NAME_MAP={aspect_predefined:"Aspect",blackToWhite_predefined:"Black to White",blueBright_predefined:"Blue Bright",blueLightToDark_predefined:"Blue Light to Dark",blueGreenBright_predefined:"Blue-Green Bright",blueGreenLightToDark_predefined:"Blue-Green Light to Dark",brownLightToDark_predefined:"Brown Light to Dark",brownToBlueGreenDivergingBright_predefined:"Brown to Blue Green Diverging, Bright",brownToBlueGreenDivergingDark_predefined:"Brown to Blue Green Diverging, Dark",coefficientBias_predefined:"Coefficient Bias",coldToHotDiverging_predefined:"Cold to Hot Diverging",conditionNumber_predefined:"Condition Number",cyanToPurple_predefined:"Cyan to Purple",cyanLightToBlueDark_predefined:"Cyan-Light to Blue-Dark",distance_predefined:"Distance",elevation1_predefined:"Elevation #1",elevation2_predefined:"Elevation #2",errors_predefined:"Errors",grayLightToDark_predefined:"Gray Light to Dark",greenBright_predefined:"Green Bright",greenLightToDark_predefined:"Green Light to Dark",greenToBlue_predefined:"Green to Blue",orangeBright_predefined:"Orange Bright",orangeLightToDark_predefined:"Orange Light to Dark",partialSpectrum_predefined:"Partial Spectrum",partialSpectrum1Diverging_predefined:"Partial Spectrum 1 Diverging",partialSpectrum2Diverging_predefined:"Partial Spectrum 2 Diverging",pinkToYellowGreenDivergingBright_predefined:"Pink to YellowGreen Diverging, Bright",pinkToYellowGreenDivergingDark_predefined:"Pink to YellowGreen Diverging, Dark",precipitation_predefined:"Precipitation",prediction_predefined:"Prediction",purpleBright_predefined:"Purple Bright",purpleToGreenDivergingBright_predefined:"Purple to Green Diverging, Bright",purpleToGreenDivergingDark_predefined:"Purple to Green Diverging, Dark",purpleBlueBright_predefined:"Purple-Blue Bright",purpleBlueLightToDark_predefined:"Purple-Blue Light to Dark",purpleRedBright_predefined:"Purple-Red Bright",purpleRedLightToDark_predefined:"Purple-Red Light to Dark",redBright_predefined:"Red Bright",redLightToDark_predefined:"Red Light to Dark",redToBlueDivergingBright_predefined:"Red to Blue Diverging, Bright",redToBlueDivergingDark_predefined:"Red to Blue Diverging, Dark",redToGreen_predefined:"Red to Green",redToGreenDivergingBright_predefined:"Red to Green Diverging, Bright",redToGreenDivergingDark_predefined:"Red to Green Diverging, Dark",slope_predefined:"Slope",spectrumFullBright_predefined:"Spectrum-Full Bright",spectrumFullDark_predefined:"Spectrum-Full Dark",spectrumFullLight_predefined:"Spectrum-Full Light",surface_predefined:"Surface",temperature_predefined:"Temperature",whiteToBlack_predefined:"White to Black",yellowToDarkRed_predefined:"Yellow to Dark Red",yellowToGreenToDarkBlue_predefined:"Yellow to Green to Dark Blue",yellowToRed_predefined:"Yellow to Red",yellowGreenBright_predefined:"Yellow-Green Bright",yellowGreenLightToDark_predefined:"Yellow-Green Light to Dark"},r.getColorRampId=n,r.getColorRampName=function(e){var t=n(e);return t?r.PREDEFINED_COLOR_RAMP_NAME_MAP[t]:null},r.convertColorRampToColormap=function(e,r){if(e&&r){for(var o,i,n,s,l,u="multipart"===e.type?e.colorRamps.length:1,f=[],p=[],c=0,d=0;d<u;d++)f[d]={start:null,end:null},f[d].start=c,f[d].end=c+1/u,c=f[d].end;var h=function(u){s=u/r,f.forEach((function(f,c){s>=f.start&&s<f.end&&(l=(s-f.start)/(f.end-f.start),"multipart"===e.type?(o=new t(e.colorRamps[c].fromColor),i=new t(e.colorRamps[c].toColor)):(o=new t(e.fromColor),i=new t(e.toColor)),n=a(o,i,l),0===u?p.push([u,o.r,o.g,o.b]):u===r-1?p.push([u,i.r,i.g,i.b]):(n=a(o,i,l),p.push([u,n.r,n.g,n.b])))}))};for(d=0;d<r;d++)h(d);return p}}}).apply(null,o))||(e.exports=i)},WSFd:function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("zOht"),t("ma1f"),t("dXLH"),t("QT0f"),t("EZfi"),t("hP4J"),t("Rc7o"),t("D34G"),t("0fRT"),t("aS1B")],void 0===(i=(function(e,r,t,o,i,a,n,s,l,u,f,p){var c,d,h=(c=new ArrayBuffer(4),d=new Uint8Array(c),new Uint32Array(c)[0]=1,1===d[0]);function m(e,r){if(!h)throw new o("rasterCoded:decode","lerc decoder is not supported on big endian platform");for(var t,a,n=r.width,s=r.height,u=r.pixelType,f=k(u),p=f.pixelTypeCtor,c=null==r.noDataValue?f.noDataValue:r.noDataValue,d=0,m=0,g=e.byteLength-10;m<g;){var y=l.decode(e,{inputOffset:m,encodedMaskData:t,returnMask:0===d,returnEncodedMask:0===d,returnFileInfo:!0,pixelType:p,noDataValue:c});if(n&&s&&(y.width!==n||y.height!==s))throw new o("rasterCoded:decode","lerc decoded result has width or height different from specified in options");if(m=y.fileInfo.eofOffset,0===d&&(t=y.encodedMaskData,a=new i({width:y.width,height:y.height,pixels:[],pixelType:u,mask:y.maskData,statistics:[]})),d++,a.addData({pixels:y.pixelData,statistics:{minValue:y.minValue,maxValue:y.maxValue,noDataValue:y.noDataValue}}),g-m>10){var v=String.fromCharCode.apply(null,new Uint8Array(e,m,10));m=m+v.indexOf("CntZ")>-1?v.indexOf("CntZ"):0}}return a}function g(e,r){if(!h)throw new o("rasterCoded:decode","lerc decoder is not supported on big endian platform");for(var t,a,n,l=0,u=0,f=0,p=e.byteLength-10,c=[],d=r.width,m=r.height;u<p;){if(a=s.decode(e,{inputOffset:u,maskData:t,returnFileInfo:!0}),d&&m&&(a.width!==d||a.height!==m))throw new o("rasterCoded:decode","lerc2 decoded result has width or height different from what's specified in options");if(u=a.fileInfo.eofOffset,0===l&&(f=a.fileInfo.numValidPixel,t=a.maskData,n=new i({width:a.width,height:a.height,pixels:[],pixelType:a.fileInfo.pixelType,mask:a.maskData,statistics:[]})),a.fileInfo.mask&&a.fileInfo.mask.numBytes>0&&c.push(a.maskData),l++,n.addData({pixels:a.pixelData,statistics:{minValue:a.minValue,maxValue:a.maxValue}}),p-u>10){var g=String.fromCharCode.apply(null,new Uint8Array(e,u,10));u+=g.indexOf("Lerc")>-1?g.indexOf("Lerc"):0}}var y=0,v=0,w=0;if(c.length>1){for(w=n.width*n.height,(t=new Uint8Array(w)).set(c[0]),y=1;y<c.length;y++){var C=c[y];for(v=0;v<w;v++)t[v]=t[v]&C[v]}for(f=0,v=0;v<w;v++)f+=t[v];n.mask=t}return n.validPixelCount=f,n}function y(e){var r=p.decode(e),t=new i({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return t.updateStatistics(),t}function v(e,r){var t=p.decodeTileOrStrip(e,r.customOptions),o=new i({width:t.width,height:t.height,pixels:t.pixels,pixelType:t.pixelType.toLowerCase(),mask:t.mask,statistics:null});return o.updateStatistics(),o}function w(e){var r=n.decode(e),t=new i({width:r.width,height:r.height,pixels:r.pixels,pixelType:"U8",mask:r.mask,statistics:null});return t.updateStatistics(),t}function C(e,r){var t,o=new Uint8Array(e),a=new u(o),n=r.width,s=r.height,l=n*s,f=a.decode(),p=0,c=0,d=new Uint8Array(l);for(p=0;p<l;p++)d[p]=f[4*p+3];var h=new i({width:n,height:s,pixels:[],pixelType:"U8",mask:d,statistics:[]});for(p=0;p<3;p++){for(t=new Uint8Array(l),c=0;c<l;c++)t[c]=f[4*c+p];h.addData({pixels:t})}return h.updateStatistics(),h}function b(e,r,o){return t.__awaiter(this,void 0,void 0,(function(){var n,s,l,u;return t.__generator(this,(function(f){switch(f.label){case 0:return n=new a,s=t.__assign({applyJpegMask:!1},r),[4,n.decode(e,s,o)];case 1:return l=f.sent(),(u=new i(l)).updateStatistics(),[2,u]}}))}))}function T(e){if(null==e)throw new o("rasterCodec:decode","parameter encodeddata is required.");var r=new Uint8Array(e,0,10),t="";return 255===r[0]&&216===r[1]?t="jpg":137===r[0]&&80===r[1]&&78===r[2]&&71===r[3]?t="png":67===r[0]&&110===r[1]&&116===r[2]&&90===r[3]&&73===r[4]&&109===r[5]&&97===r[6]&&103===r[7]&&101===r[8]&&32===r[9]?t="lerc":76===r[0]&&101===r[1]&&114===r[2]&&99===r[3]&&50===r[4]&&32===r[5]?t="lerc2":73===r[0]&&73===r[1]&&42===r[2]&&0===r[3]||77===r[0]&&77===r[1]&&0===r[2]&&42===r[3]?t="tiff":String.fromCharCode.apply(null,r).toLowerCase().indexOf("error")>-1&&(t="error"),t}function k(e){var r=null,t=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":t=Math.pow(2,8)-1,r=Uint8Array;break;case"u16":t=t||Math.pow(2,16)-1,r=Uint16Array;break;case"u32":t=t||Math.pow(2,32)-1,r=Uint32Array;break;case"s8":t=t||0-Math.pow(2,7),r=Int8Array;break;case"s16":t=t||0-Math.pow(2,15),r=Int16Array;break;case"s32":t=t||0-Math.pow(2,31),r=Int32Array;break;default:r=Float32Array}return{pixelTypeCtor:r,noDataValue:t}}return function(){function e(){}return e.getFormat=function(e){var r=T(e);return"lerc2"===r?r="lerc":"error"===r&&(r=""),r},e.decode=function(e,r,a){return t.__awaiter(this,void 0,void 0,(function(){var n,s,l;return t.__generator(this,(function(u){switch(u.label){case 0:if(null==e)throw new o("rasterCodec:decode","missing encodeddata parameter.");if(null==r||null==r.width||null==r.height)throw new o("rasterCodec:decode","requires width and height in options parameter.");return"tiff"===(n=r.format&&r.format.toLowerCase())&&r.customOptions?[2,v(e,r)]:((!n||"bsq"!==n&&"bip"!==n)&&(n=T(e)),!r.useCanvas||"jpg"!==n&&"png"!==n?[3,2]:[4,b(e,r,a)]);case 1:return l=u.sent(),[3,3];case 2:s=function(e){var r=null;switch(e){case"lerc":r=m;break;case"lerc2":r=g;break;case"jpg":r=w;break;case"png":r=C;break;case"bsq":case"bip":r=function(r,t){return function(e,r,t){var o=k(r.pixelType).pixelTypeCtor,a=(0,f.decode)(e,{width:r.width,height:r.height,pixelType:o,format:t}),n=new i({width:r.width,height:r.height,pixels:a.pixels,pixelType:r.pixelType,mask:a.mask,statistics:null});return n.updateStatistics(),n}(r,t,e)};break;case"tiff":r=y;break;case"error":r=function(){throw new o("rasterCodec:decode","input data contains error")};break;default:r=function(){throw new o("rasterCodec:decode","unsupported raster format")}}return r}(n),r.isPoint&&((r=t.__assign({},r)).width++,r.height++),l=s(e,r),r.isPoint&&function(e,r){if(void 0===r&&(r=1),e){var t=e.pixels,o=e.width,a=e.mask;if(t&&0!==t.length){var n,s,l,u,f,p,c,d=t.length,h=o-1,m=e.height-1,g=[],y=i.getPixelArrayConstructor(e.pixelType);if(0===r){for(n=0;n<d;n++){for(f=t[n],p=new y(h*m),s=0;s<m;s++)for(u=s*o,l=0;l<h;l++)p[s*h+l]=f[u+l];g.push(p)}if(a)for(c=new Uint8Array(h*m),s=0;s<m;s++)for(u=s*o,l=0;l<h;l++)c[s*h+l]=a[u+l]}else{for(n=0;n<d;n++){for(f=t[n],p=new y(h*m),s=0;s<m;s++)for(u=s*o,l=0;l<h;l++)p[s*h+l]=(f[u+l]+f[u+l+1]+f[u+o+l]+f[u+o+l+1])/4;g.push(p)}if(a)for(c=new Uint8Array(h*m),s=0;s<m;s++)for(u=s*o,l=0;l<h;l++)c[s*h+l]=Math.min.apply(null,[a[u+l],a[u+l+1],a[u+o+l],a[u+o+l+1]])}e.width=h,e.height=m,e.mask=c,e.pixels=g}}}(l),u.label=3;case 3:return[2,l]}}))}))},e}()}).apply(null,o))||(e.exports=i)},aS1B:function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("zOht"),t("n7Tx"),t("xIS7"),t("Jhq5"),t("r5V0")],void 0===(i=(function(e,r,t,o,i,a,n){Object.defineProperty(r,"__esModule",{value:!0});var s,l,u=(s=new ArrayBuffer(4),l=new Uint8Array(s),new Uint32Array(s)[0]=1,1===l[0]),f=[0,1,1,2,4,8,1,1,2,4,8,4,8];function p(e,r){var t="unknown";return 3===e?t="f32":1===e?1===r?t="u1":2===r?t="u2":4===r?t="u4":r<=8?t="u8":r<=16?t="u16":r<=32&&(t="u32"):2===e&&(r<=8?t="s8":r<=16?t="s16":r<=32&&(t="s32")),t}function c(e){var r=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=Uint8Array;break;case"u16":r=Uint16Array;break;case"u32":r=Uint32Array;break;case"s8":r=Int8Array;break;case"s16":r=Int16Array;break;case"s32":r=Int32Array;break;default:r=Float32Array}return r}function d(e,r){return{x:r[0]*e.x+r[1]*e.y+r[2],y:r[3]*e.x+r[4]*e.y+r[5]}}function h(e,r){var t=e.get(r);return t&&t.values}function m(e,r){var t=e.get(r);return t&&t.values[0]}function g(e,r,t,o,i,n){void 0===o&&(o=0),void 0===i&&(i=a.TIFF_TAGS),void 0===n&&(n=4);var s=new DataView(e,t,2).getUint16(0,r),l=4+2*n,u=2+s*l;if(t+u>e.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:u};for(var f,p,c,d,h,m,g,y=t+u+4<=e.byteLength?new DataView(e,t+u,4).getUint32(0,r):null,w=t+2,C=new Map,b=0;b<s;b++){if(c=(p=new DataView(e,w+l*b,l)).getUint16(0,r),h=p.getUint16(2,r),d=a.getTagName(c,i),2===n)m=p.getUint16(4,r),g=p.getUint16(6,r);else if(4===n)m=p.getUint32(4,r),g=p.getUint32(8,r);else if(8===n)if(m=0,g=0,r)for(var T=0;T<8;T++)m+=p.getUint8(4+T)*Math.pow(2,8*T),g+=p.getUint8(12+T)*Math.pow(2,8*T);else for(T=0;T<8;T++)m+=p.getUint8(4+T)*Math.pow(2,8*(7-T)),g+=p.getUint8(12+T)*Math.pow(2,8*(7-T));v(e,r,f={id:c,type:h,valueCount:m,valueOffset:g,values:null},o),C.set(d,f)}return{success:!0,ifd:C,nextIFD:y,requiredBufferSize:u}}var y=function(e,r,t,o,a){var s,l,f,d,h,g,y=u===r,v=m(t,"BITSPERSAMPLE"),w=p(m(t,"SAMPLEFORMAT")||1,v),C=m(t,"COMPRESSION")[0]||1,b=c(w);if(1===C)f=e.slice(o,o+a),d=new Uint8Array(f);else if(8===C||32946===C)d=new Uint8Array(e,o,a),g=new n(d).getBytes(),f=new ArrayBuffer(g.length),(d=new Uint8Array(f)).set(g);else if(6===C){d=new Uint8Array(e,o,a);var T=new i;T.parse(d);var k=T.getData(T.width,T.height,!0);f=new ArrayBuffer(k.length),(d=new Uint8Array(f)).set(k)}if("u8"===w||"s8"===w||y)l=new b(f);else{switch(f=new ArrayBuffer(d.length),h=new Uint8Array(f),w){case"u16":case"s16":for(s=0;s<d.length;s+=2)h[s]=d[s+1],h[s+1]=d[s];break;case"u32":case"s32":case"f32":for(s=0;s<d.length;s+=4)h[s]=d[s+3],h[s+1]=d[s+2],h[s+2]=d[s+1],h[s+3]=d[s]}l=new b(f)}return l};function v(e,r,t,o,i){if(void 0===o&&(o=0),t.values)return!0;var a,n,s=t.type,l=t.valueCount,u=t.valueOffset,p=[],c=f[s],d=8*c,h=l*c,m=l*f[s]*8;if(m>32&&h>(i?e.byteLength:e?e.byteLength-u+o:0))return t.offlineOffsetSize=[u,h],t.values=null,!1;if(m<=32)if(r||(u>>>=32-m),1===l)p=[u];else for(n=0;n<l;n++)p.push(u<<d*n>>>32-d);else{u-=o,i&&(u=0);for(var g=u;g<u+h;g+=c){switch(s){case 1:case 2:case 7:a=new DataView(e,g,1).getUint8(0);break;case 3:a=new DataView(e,g,2).getUint16(0,r);break;case 4:a=new DataView(e,g,4).getUint32(0,r);break;case 5:a=new DataView(e,g,4).getUint32(0,r)/new DataView(e,g+4,4).getUint32(0,r);break;case 6:a=new DataView(e,g,1).getInt8(0);break;case 8:a=new DataView(e,g,2).getInt16(0,r);break;case 9:a=new DataView(e,g,4).getInt32(0,r);break;case 10:a=new DataView(e,g,4).getInt32(0,r)/new DataView(e,g+4,4).getInt32(0,r);break;case 11:a=new DataView(e,g,4).getFloat32(0,r);break;case 12:a=new DataView(e,g,8).getFloat64(0,r);break;default:a=null}p.push(a)}}if(2===s){var y="",v=p;for(p=[],n=0;n<v.length;n++)0===v[n]&&""!==y?(p.push(y),y=""):y+=String.fromCharCode(v[n]);""===y&&0!==p.length||p.push(y)}return t.values=p,!0}function w(e){var r,t=e[0],o=m(t,"TILEWIDTH"),i=m(t,"TILELENGTH"),a=m(t,"IMAGEWIDTH"),n=m(t,"IMAGELENGTH"),s=m(t,"BITSPERSAMPLE"),l=m(t,"SAMPLESPERPIXEL"),u=m(t,"SAMPLEFORMAT")||1,f=p(u,s),c=!!h(t,"PLANARCONFIGURATION")&&2===h(t,"PLANARCONFIGURATION")[0],g=h(t,"GDAL_NODATA");null!=g&&("string"==typeof g[0]?(r=g.map((function(e){return parseFloat(e)}))).some((function(e){return isNaN(e)}))&&(r=null):"number"==typeof g[0]&&(r=g));var y,v=m(t,"COMPRESSION")||1;switch(v){case 1:y="NONE";break;case 2:case 3:case 4:case 32771:y="CCITT";break;case 5:y="LZW";break;case 6:case 7:y="JPEG";break;case 32773:y="PACKBITS";break;case 8:case 32946:y="DEFLATE";break;case 34712:y="JPEG2000";break;default:y=String(v)}var w=!0,C="";1!==v&&6!==v&&8!==v&&32946!==v&&(w=!1,C+="unsupported tag compression "+v),u>3&&(w=!1,C+="unsupported tag sampleFormat "+u),s%8!=0&&(w=!1,C+="unsupported tag bitsPerSample "+s);var b,T=m(t,"GEOASCIIPARAMS");if(T){var k=T.split("|").filter((function(e){return e.indexOf("ESRI PE String = ")>-1}))[0],x=k?k.replace("ESRI PE String = ",""):"";b=0===x.indexOf("PROJCS")||0===x.indexOf("GEOGCS")?{wkid:null,wkt:x}:null}var S,I,_=h(t,"GEOTIEPOINTS"),A=h(t,"GEOPIXELSCALE"),D=h(t,"GEOTRANSMATRIX"),P=t.has("GEOKEYDIRECTORY")?t.get("GEOKEYDIRECTORY").data:null,R=!1;if(P){R=2===m(P,"GTRasterTypeGeoKey");var M=m(P,"GTModelTypeGeoKey");if(2===M){var E=m(P,"GeographicTypeGeoKey");E>1024&&E<32766&&(b={wkid:E})}else if(1===M){var L=m(P,"ProjectedCSTypeGeoKey");L>1024&&L<32766&&(b={wkid:L})}}if(A&&_&&_.length>=6?(S=[A[0],0,_[3]-_[0]*A[0],0,-Math.abs(A[1]),_[4]-_[1]*A[1]],R&&(S[2]-=.5*S[0]+.5*S[1],S[5]-=.5*S[3]+.5*S[4])):D&&16===D.length&&(S=[D[0],D[1],D[3],D[4],D[5],D[7]]),S){for(var U=[{x:0,y:n},{x:0,y:0},{x:a,y:n},{x:a,y:0}],O=void 0,B=Number.POSITIVE_INFINITY,G=Number.POSITIVE_INFINITY,N=Number.NEGATIVE_INFINITY,F=Number.NEGATIVE_INFINITY,V=0;V<U.length;V++)B=(O=d(U[V],S)).x>B?B:O.x,N=O.x<N?N:O.x,G=O.y>G?G:O.y,F=O.y<F?F:O.y;I={xmin:B,xmax:N,ymin:G,ymax:F,spatialReference:b}}var j,z,J,Y,H,K=e.filter((function(e){return 1===m(e,"NEWSUBFILETYPE")}));K.length>0&&(j=Math.round(Math.log(a/m(K[0],"IMAGEWIDTH"))/Math.LN2),z=Math.round(Math.log(a/m(K[K.length-1],"IMAGEWIDTH"))/Math.LN2),J=m(K[K.length-1],"TILEWIDTH"),Y=m(K[K.length-1],"TILEHEIGHT")),J=z>0?J||o:null,Y=z>0?Y||i:null,o&&(H=[{maxCol:Math.ceil(a/o)-1,maxRow:Math.ceil(n/i)-1,minRow:0,minCol:0}],K.forEach((function(e){H.push({maxCol:Math.ceil(m(e,"IMAGEWIDTH")/m(e,"TILEWIDTH"))-1,maxRow:Math.ceil(m(e,"IMAGELENGTH")/m(e,"TILELENGTH"))-1,minRow:0,minCol:0})})));var W=function(e){if(!e)return null;var r=e.match(/<Item(.*?)Item>/gi);if(!r||0===r.length)return null;for(var t,o,i,a,n,s=new Map,l=0;l<r.length;l++)o=(t=r[l]).slice(6,t.indexOf(">")),(a=t.indexOf("sample="))>-1&&(n=t.slice(a+8,t.indexOf('"',a+8))),(a=t.indexOf("name="))>-1&&(o=t.slice(a+6,t.indexOf('"',a+6))),o&&(i=t.slice(t.indexOf(">")+1,t.indexOf("</Item>")).trim(),null!=n?s.has(o)?s.get(o)[n]=i:s.set(o,[i]):s.set(o,i)),n=null;var u=s.get("STATISTICS_MINIMUM"),f=s.get("STATISTICS_MAXIMUM"),p=s.get("STATISTICS_MEAN"),c=s.get("STATISTICS_STDDEV"),d=null;if(u&&f)for(d=[],l=0;l<u.length;l++)d.push({min:parseFloat(u[l]),max:parseFloat(f[l]),avg:p&&parseFloat(p[l]),stddev:c&&parseFloat(c[l])});var h=s.get("BandName"),m=s.get("WavelengthMin"),g=s.get("WavelengthMax"),y=null;if(h)for(y=[],l=0;l<h.length;l++)y.push({BandName:h[l],WavelengthMin:m&&parseFloat(m[l]),WavelengthMax:g&&parseFloat(g[l])});return{statistics:d,bandProperties:y,dataType:s.get("DataType"),rawMetadata:s}}(m(e[0],"GDAL_METADATA"));return{width:a,height:n,tileWidth:o,tileHeight:i,planes:l,isBSQ:c,pixelType:f,compression:y,noData:r,isSupported:w,message:C,extent:I,firstPyramidLevel:j,maximumPyramidLevel:z,pyramidBlockWidth:J,pyramidBlockHeight:Y,tileBoundary:H,metadata:W}}function C(e){var r=new DataView(e,0,8),o=r.getUint16(0,!1),i=null;if(18761===o)i=!0;else{if(19789!==o)throw"unexpected endianess byte";i=!1}if(42!==r.getUint16(2,i))throw"unexpected tiff identifier";var a,n=r.getUint32(4,i),s=[];do{if(!(a=b(e,i,n)).success)break;s.push(a.ifd),n=a.nextIFD}while(n>0);var l=w(s);return t.__assign(t.__assign({},l),{littleEndian:i,ifds:s})}function b(e,r,t,i,n,s){void 0===i&&(i=0),void 0===n&&(n=a.TIFF_TAGS),void 0===s&&(s=4);var l,u=g(e,r,t,i,n,s),f=u.ifd;if(f){var p;if(a.ifdTags.forEach((function(t,o){f.has(o)&&((l=f.get(o)).data=g(e,r,l.valueOffset-i,i,t).ifd)})),f.has("GEOKEYDIRECTORY")&&(p=(l=f.get("GEOKEYDIRECTORY")).values)&&p.length>4){var c=p[0]+"."+p[1]+"."+p[2];l.data=g(e,r,l.valueOffset+6-i,i,a.GEO_KEYS,2).ifd,l.data&&l.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[c]})}f.has("XMP")&&"number"==typeof(p=(l=f.get("XMP")).values)[0]&&7===l.type&&(l.values=[o.bytesToUTF8(new Uint8Array(p))])}return u}r.parseFieldValues=v,r.getImageInfo=w,r.parseHeader=C,r.parseSignature=function(e){var r=new DataView(e,0,8),t=r.getUint16(0,!1),o=null;if(18761===t)o=!0;else{if(19789!==t)throw"unexpected endianess byte";o=!1}if(42!==r.getUint16(2,o))throw"unexpected tiff identifier";return{littleEndian:o,firstIFD:r.getUint32(4,o)}},r.parseIFD=b,r.decodeTileOrStrip=function(e,r){for(var t,o=r.headerInfo,i=r.ifd,a=y(e,o.littleEndian,i,r.offset||0,r.size||e.byteLength),n=o.pixelType,s=o.isBSQ,l=o.planes,u=c(n),f=a.length/l,p=[],d=0;d<l;d++){if(t=new u(f),s)t=a.slice(f*d,f*(d+1));else for(var h=0;h<f;h++)t[h]=a[h*l+d];p.push(t)}var g,v,w=m(i,"TILEWIDTH"),C=m(i,"TILELENGTH"),b=o.noData?o.noData[0]:null,T=o.metadata?o.metadata.statistics:null,k=T?T.map((function(e){return e.min})):null,x=T?T.map((function(e){return e.max})):null;if(null!=b)if(g=new Uint8Array(f),Math.abs(b)>1e24)for(v=0;v<f;v++)g[v]=Math.abs((p[0][v]-b)/b)<1e-6?0:1;else for(v=0;v<f;v++)g[v]=p[0][v]===b?0:1;else k&&x&&r.applyMinMaxConstraint&&(g=function(e,r,t){if(!(e&&e.length>0&&r&&t))return null;for(var o,i,a,n=e[0].length,s=e.length,l=new Uint8Array(n),u=0;u<s;u++)if(o=e[u],i=r[u],a=t[u],0===u)for(var f=0;f<n;f++)l[f]=o[f]<i||o[f]>a?0:1;else for(f=0;f<n;f++)l[f]&&(l[f]=o[f]<i||o[f]>a?0:1);return l}(p,k,x));return{pixelType:n,width:w,height:C,pixels:p,mask:g,noDataValue:b}},r.decode=function(e,r){var t,o,a=(r=r||C(e)).ifds,s=r.noData;if(0===a.length)throw"no valid image file directory";var l=a[0],f=s?s[0]:null;if(o=r.tileWidth?function(e,r,t){var o=h(t,"TILEOFFSETS");if(void 0===o)return null;for(var i,a,n,s,l,u,f,p,d,m,g,v,w,C=h(t,"TILEBYTECOUNTS"),b=r.tileWidth,T=r.tileHeight,k=r.width,x=r.height,S=r.pixelType,I=r.isBSQ,_=r.planes,A=k*x,D=h(t,"BITSPERSAMPLE")[0],P=c(S),R=[],M=0;M<_;M++)R.push(new P(A));var E=Math.ceil(k/b);if(D%8==0)for(i=0;i<o.length;i++)for(p=(u=Math.floor(i/E)*T)*k+(f=i%E*b),n=y(e,r.littleEndian,t,o[i],C[i]),m=0,d=p,v=Math.min(b,k-f),g=Math.min(T,x-u),a=0;a<_;a++)if(w=R[a],I)for(s=0;s<g;s++)for(d=p+s*k,m=b*T*a+s*b,l=0;l<v;l++,d++,m++)w[d]=n[m];else for(s=0;s<g;s++)for(d=p+s*k,m=s*b*_+a,l=0;l<v;l++,d++,m+=_)w[d]=n[m];return{width:k,height:x,pixelType:S,pixels:R}}(e,r,l):function(e,r,t){var o=u===r.littleEndian,a=h(t,"STRIPOFFSETS");if(void 0===a)return null;var s,l,f,p,d,m,g,y,v,w,C=r.width,b=r.height,T=r.pixelType,k=r.planes,x=C*b,S=h(t,"BITSPERSAMPLE")[0],I=c(T),_=new I(x*k),A=h(t,"STRIPBYTECOUNTS"),D=h(t,"ROWSPERSTRIP")[0],P=h(t,"COMPRESSION")?h(t,"COMPRESSION")[0]:1,R=D;if(S%8==0)for(s=0;s<a.length;s++){if(d=s*(D*C)*k,R=(s+1)*D>b?b-s*D:D,"u8"===T||"s8"===T||o){if(8===P||32946===P)g=new Uint8Array(e,a[s],A[s]),w=new n(g).getBytes(),m=new ArrayBuffer(w.length),(g=new Uint8Array(m)).set(w),g.length!==R*C*k*S/8&&console.log("strip byte counts is different than expected");else if(6===P){g=new Uint8Array(e,a[s],A[s]);var M=new i;M.parse(g);var E=M.getData(M.width,M.height,!0);m=new ArrayBuffer(E.length),(g=new Uint8Array(m)).set(E)}else 1===P&&(A[s]!==R*C*k*S/8&&console.log("strip byte counts is different than expected"),m=e.slice(a[s],a[s]+A[s]));p=new I(m)}else{switch(6===P||8===P||32946===P?(g=new Uint8Array(e,a[s],A[s]),g=new n(g).getBytes(),m=new ArrayBuffer(g.length),y=new Uint8Array(m),g.length!==R*C*k*S/8&&console.log("strip byte counts is different than expected")):1===P&&(A[s]!==R*C*k*S/8&&console.log("strip byte counts is different than expected"),m=new ArrayBuffer(A[s]),g=new Uint8Array(e,a[s],A[s]),y=new Uint8Array(m)),T){case"u16":case"s16":for(f=0;f<g.length;f+=2)y[f]=g[f+1],y[f+1]=g[f];break;case"u32":case"s32":case"f32":for(f=0;f<g.length;f+=4)y[f]=g[f+3],y[f+1]=g[f+2],y[f+2]=g[f+1],y[f+3]=g[f]}p=new I(m)}_.set(p,d)}var L=[];if(1===k)L.push(_);else for(s=0;s<k;s++){for(v=new I(x),l=0;l<x;l++)v[l]=_[l*k+s];L.push(v)}return{width:C,height:b,pixelType:T,pixels:L}}(e,r,l),null!==f){if(o.mask=new Uint8Array(o.width*o.height),Math.abs(f)>1e24)for(t=0;t<o.width*o.height;t++)o.mask[t]=Math.abs((o.pixels[0][t]-f)/f)<1e-6?0:1;else for(t=0;t<o.width*o.height;t++)o.mask[t]=o.pixels[0][t]===f?0:1;o.noDataValue=f}return o}}).apply(null,o))||(e.exports=i)},hBcF:function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("ImIS")],void 0===(i=(function(e,r,t){Object.defineProperty(r,"__esModule",{value:!0}),r.stretchTypeJSONDict=new t.default({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),r.stretchTypeFunctionEnum={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}}).apply(null,o))||(e.exports=i)},hP4J:function(e,r,t){var o;void 0===(o=(function(){"use strict";var e=function(e,r,t,o,i,a,n,s){var l,u,f,p,c,d=(1<<t)-1,h=0,m=0,g=4*e.length-Math.ceil(t*o/8);if(e[e.length-1]<<=8*g,i)for(l=0;l<o;l++)0===m&&(f=e[h++],m=32),m>=t?(u=f>>>m-t&d,m-=t):(u=(f&d)<<(p=t-m)&d,u+=(f=e[h++])>>>(m=32-p)),r[l]=i[u];else for(c=Math.ceil((s-a)/n),l=0;l<o;l++)0===m&&(f=e[h++],m=32),m>=t?(u=f>>>m-t&d,m-=t):(u=(f&d)<<(p=t-m)&d,u+=(f=e[h++])>>>(m=32-p)),r[l]=u<c?a+u*n:s},r=function(e,r,t,o,i,a,n,s){var l,u,f,p,c=(1<<t)-1,d=0,h=0,m=0;if(i)for(l=0;l<o;l++)0===h&&(f=e[d++],h=32,m=0),h>=t?(u=f>>>m&c,h-=t,m+=t):(u=f>>>m&c,h=32-(p=t-h),u|=((f=e[d++])&(1<<p)-1)<<t-p,m=p),r[l]=i[u];else{var g=Math.ceil((s-a)/n);for(l=0;l<o;l++)0===h&&(f=e[d++],h=32,m=0),h>=t?(u=f>>>m&c,h-=t,m+=t):(u=f>>>m&c,h=32-(p=t-h),u|=((f=e[d++])&(1<<p)-1)<<t-p,m=p),r[l]=u<g?a+u*n:s}return r},t={HUFFMAN_LUT_BITS_MAX:12,computeChecksumFletcher32:function(e){for(var r=65535,t=65535,o=e.length,i=Math.floor(o/2),a=0;i;){var n=i>=359?359:i;i-=n;do{r+=e[a++]<<8,t+=r+=e[a++]}while(--n);r=(65535&r)+(r>>>16),t=(65535&t)+(t>>>16)}return 1&o&&(t+=r+=e[a]<<8),((t=(65535&t)+(t>>>16))<<16|(r=(65535&r)+(r>>>16)))>>>0},readHeaderInfo:function(e,r){var t=r.ptr,o=new Uint8Array(e,t,6),i={};if(i.fileIdentifierString=String.fromCharCode.apply(null,o),0!==i.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+i.fileIdentifierString;t+=6;var a=new DataView(e,t,8),n=a.getInt32(0,!0);if(i.fileVersion=n,t+=4,n>=3&&(i.checksum=a.getUint32(4,!0),t+=4),a=new DataView(e,t,12),i.height=a.getUint32(0,!0),i.width=a.getUint32(4,!0),t+=8,n>=4?(i.numDims=a.getUint32(8,!0),t+=4):i.numDims=1,a=new DataView(e,t,40),i.numValidPixel=a.getUint32(0,!0),i.microBlockSize=a.getInt32(4,!0),i.blobSize=a.getInt32(8,!0),i.imageType=a.getInt32(12,!0),i.maxZError=a.getFloat64(16,!0),i.zMin=a.getFloat64(24,!0),i.zMax=a.getFloat64(32,!0),t+=40,r.headerInfo=i,r.ptr=t,n>=3&&this.computeChecksumFletcher32(new Uint8Array(e,t-(n>=4?52:48),i.blobSize-14))!==i.checksum)throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,r){var t=r.headerInfo,o=this.getDataTypeArray(t.imageType),i=t.numDims*this.getDataTypeSize(t.imageType),a=this.readSubArray(e,r.ptr,o,i),n=this.readSubArray(e,r.ptr+i,o,i);r.ptr+=2*i;var s,l=!0;for(s=0;s<t.numDims;s++)if(a[s]!==n[s]){l=!1;break}return t.minValues=a,t.maxValues=n,l},readSubArray:function(e,r,t,o){var i;if(t===Uint8Array)i=new Uint8Array(e,r,o);else{var a=new ArrayBuffer(o);new Uint8Array(a).set(new Uint8Array(e,r,o)),i=new t(a)}return i},readMask:function(e,r){var t,o,i=r.ptr,a=r.headerInfo,n=a.width*a.height,s=a.numValidPixel,l=new DataView(e,i,4),u={};if(u.numBytes=l.getUint32(0,!0),i+=4,(0===s||n===s)&&0!==u.numBytes)throw"invalid mask";if(0===s)t=new Uint8Array(Math.ceil(n/8)),u.bitset=t,o=new Uint8Array(n),r.pixels.resultMask=o,i+=u.numBytes;else if(u.numBytes>0){t=new Uint8Array(Math.ceil(n/8));var f=(l=new DataView(e,i,u.numBytes)).getInt16(0,!0),p=2,c=0,d=0;do{if(f>0)for(;f--;)t[c++]=l.getUint8(p++);else for(d=l.getUint8(p++),f=-f;f--;)t[c++]=d;f=l.getInt16(p,!0),p+=2}while(p<u.numBytes);if(-32768!==f||c<t.length)throw"Unexpected end of mask RLE encoding";o=new Uint8Array(n);var h=0,m=0;for(m=0;m<n;m++)7&m?(h=t[m>>3],h<<=7&m):h=t[m>>3],128&h&&(o[m]=1);r.pixels.resultMask=o,u.bitset=t,i+=u.numBytes}return r.ptr=i,r.mask=u,!0},readDataOneSweep:function(e,r,o){var i,a=r.ptr,n=r.headerInfo,s=n.numDims,l=n.width*n.height,u=n.numValidPixel*t.getDataTypeSize(n.imageType)*s,f=r.pixels.resultMask;if(o===Uint8Array)i=new Uint8Array(e,a,u);else{var p=new ArrayBuffer(u);new Uint8Array(p).set(new Uint8Array(e,a,u)),i=new o(p)}if(i.length===l*s)r.pixels.resultPixels=i;else{r.pixels.resultPixels=new o(l*s);var c=0,d=0,h=0,m=0;if(s>1)for(h=0;h<s;h++)for(m=h*l,d=0;d<l;d++)f[d]&&(r.pixels.resultPixels[m+d]=i[c++]);else for(d=0;d<l;d++)f[d]&&(r.pixels.resultPixels[d]=i[c++])}return r.ptr=a+=u,!0},readHuffmanTree:function(e,r){var i=this.HUFFMAN_LUT_BITS_MAX,a=new DataView(e,r.ptr,16);if(r.ptr+=16,a.getInt32(0,!0)<2)throw"unsupported Huffman version";var n=a.getInt32(4,!0),s=a.getInt32(8,!0),l=a.getInt32(12,!0);if(s>=l)return!1;var u=new Uint32Array(l-s);t.decodeBits(e,r,u);var f,p,c,d,h=[];for(f=s;f<l;f++)h[p=f-(f<n?0:n)]={first:u[f-s],second:null};var m=e.byteLength-r.ptr,g=Math.ceil(m/4),y=new ArrayBuffer(4*g);new Uint8Array(y).set(new Uint8Array(e,r.ptr,m));var v,w=new Uint32Array(y),C=0,b=0;for(v=w[0],f=s;f<l;f++)(d=h[p=f-(f<n?0:n)].first)>0&&(h[p].second=v<<C>>>32-d,32-C>=d?32===(C+=d)&&(C=0,v=w[++b]):(v=w[++b],h[p].second|=v>>>32-(C+=d-32)));var T,k=0,x=new o;for(f=0;f<h.length;f++)void 0!==h[f]&&(k=Math.max(k,h[f].first));T=k>=i?i:k;var S,I,_,A,D,P=[];for(f=s;f<l;f++)if((d=h[p=f-(f<n?0:n)].first)>0)if(S=[d,p],d<=T)for(I=h[p].second<<T-d,_=1<<T-d,c=0;c<_;c++)P[I|c]=S;else for(I=h[p].second,D=x,A=d-1;A>=0;A--)I>>>A&1?(D.right||(D.right=new o),D=D.right):(D.left||(D.left=new o),D=D.left),0!==A||D.val||(D.val=S[1]);return{decodeLut:P,numBitsLUTQick:T,numBitsLUT:k,tree:x,stuffedData:w,srcPtr:b,bitPos:C}},readHuffman:function(e,r,t){var o,i,a,n,s,l,u,f,p,c=r.headerInfo,d=c.numDims,h=r.headerInfo.height,m=r.headerInfo.width,g=m*h,y=this.readHuffmanTree(e,r),v=y.decodeLut,w=y.tree,C=y.stuffedData,b=y.srcPtr,T=y.bitPos,k=y.numBitsLUTQick,x=y.numBitsLUT,S=0===r.headerInfo.imageType?128:0,I=r.pixels.resultMask,_=0;T>0&&(b++,T=0);var A,D=C[b],P=1===r.encodeMode,R=new t(g*d),M=R;for(A=0;A<c.numDims;A++){if(d>1&&(M=new t(R.buffer,g*A,g),_=0),r.headerInfo.numValidPixel===m*h)for(f=0,l=0;l<h;l++)for(u=0;u<m;u++,f++){if(i=0,s=n=D<<T>>>32-k,32-T<k&&(s=n|=C[b+1]>>>64-T-k),v[s])i=v[s][1],T+=v[s][0];else for(s=n=D<<T>>>32-x,32-T<x&&(s=n|=C[b+1]>>>64-T-x),o=w,p=0;p<x;p++)if(!(o=n>>>x-p-1&1?o.right:o.left).left&&!o.right){i=o.val,T=T+p+1;break}T>=32&&(T-=32,D=C[++b]),a=i-S,P?(a+=u>0?_:l>0?M[f-m]:_,M[f]=a&=255,_=a):M[f]=a}else for(f=0,l=0;l<h;l++)for(u=0;u<m;u++,f++)if(I[f]){if(i=0,s=n=D<<T>>>32-k,32-T<k&&(s=n|=C[b+1]>>>64-T-k),v[s])i=v[s][1],T+=v[s][0];else for(s=n=D<<T>>>32-x,32-T<x&&(s=n|=C[b+1]>>>64-T-x),o=w,p=0;p<x;p++)if(!(o=n>>>x-p-1&1?o.right:o.left).left&&!o.right){i=o.val,T=T+p+1;break}T>=32&&(T-=32,D=C[++b]),a=i-S,P?(a+=u>0&&I[f-1]?_:l>0&&I[f-m]?M[f-m]:_,M[f]=a&=255,_=a):M[f]=a}r.ptr=r.ptr+4*(b+1)+(T>0?4:0)}r.pixels.resultPixels=R},decodeBits:function(t,o,i,a,n){var s=o.headerInfo,l=s.fileVersion,u=0,f=new DataView(t,o.ptr,t.byteLength-o.ptr>=5?5:t.byteLength-o.ptr),p=f.getUint8(0);u++;var c=p>>6,d=0===c?4:3-c,h=(32&p)>0,m=31&p,g=0;if(1===d)g=f.getUint8(u),u++;else if(2===d)g=f.getUint16(u,!0),u+=2;else{if(4!==d)throw"Invalid valid pixel count type";g=f.getUint32(u,!0),u+=4}var y,v,w,C,b,T,k,x,S,I=2*s.maxZError,_=s.numDims>1?s.maxValues[n]:s.zMax;if(h){for(o.counter.lut++,x=f.getUint8(u),u++,C=Math.ceil((x-1)*m/8),b=Math.ceil(C/4),v=new ArrayBuffer(4*b),w=new Uint8Array(v),o.ptr+=u,w.set(new Uint8Array(t,o.ptr,C)),k=new Uint32Array(v),o.ptr+=C,S=0;x-1>>>S;)S++;C=Math.ceil(g*S/8),b=Math.ceil(C/4),v=new ArrayBuffer(4*b),(w=new Uint8Array(v)).set(new Uint8Array(t,o.ptr,C)),y=new Uint32Array(v),o.ptr+=C,T=l>=3?function(e,r,t,o,i,a){var n,s=(1<<r)-1,l=0,u=0,f=0,p=0,c=0,d=0,h=[],m=Math.ceil((a-o)/i);for(u=0;u<t;u++)0===p&&(n=e[l++],p=32,d=0),p>=r?(c=n>>>d&s,p-=r,d+=r):(c=n>>>d&s,p=32-(f=r-p),c|=((n=e[l++])&(1<<f)-1)<<r-f,d=f),h[u]=c<m?o+c*i:a;return h.unshift(o),h}(k,m,x-1,a,I,_):function(e,r,t,o,i,a){var n,s=(1<<r)-1,l=0,u=0,f=0,p=0,c=0,d=[],h=4*e.length-Math.ceil(r*t/8);e[e.length-1]<<=8*h;var m=Math.ceil((a-o)/i);for(u=0;u<t;u++)0===p&&(n=e[l++],p=32),p>=r?(c=n>>>p-r&s,p-=r):(c=(n&s)<<(f=r-p)&s,c+=(n=e[l++])>>>(p=32-f)),d[u]=c<m?o+c*i:a;return d.unshift(o),d}(k,m,x-1,a,I,_),l>=3?r(y,i,S,g,T):e(y,i,S,g,T)}else o.counter.bitstuffer++,S=m,o.ptr+=u,S>0&&(C=Math.ceil(g*S/8),b=Math.ceil(C/4),v=new ArrayBuffer(4*b),(w=new Uint8Array(v)).set(new Uint8Array(t,o.ptr,C)),y=new Uint32Array(v),o.ptr+=C,l>=3?null==a?function(e,r,t,o){var i,a,n,s,l=(1<<t)-1,u=0,f=0,p=0;for(i=0;i<o;i++)0===f&&(n=e[u++],f=32,p=0),f>=t?(a=n>>>p&l,f-=t,p+=t):(a=n>>>p&l,f=32-(s=t-f),a|=((n=e[u++])&(1<<s)-1)<<t-s,p=s),r[i]=a}(y,i,S,g):r(y,i,S,g,!1,a,I,_):null==a?function(e,r,t,o){var i,a,n,s,l=(1<<t)-1,u=0,f=0,p=4*e.length-Math.ceil(t*o/8);for(e[e.length-1]<<=8*p,i=0;i<o;i++)0===f&&(n=e[u++],f=32),f>=t?(a=n>>>f-t&l,f-=t):(a=(n&l)<<(s=t-f)&l,a+=(n=e[u++])>>>(f=32-s)),r[i]=a}(y,i,S,g):e(y,i,S,g,!1,a,I,_))},readTiles:function(e,r,o){var i=r.headerInfo,a=i.width,n=i.height,s=i.microBlockSize,l=i.imageType,u=t.getDataTypeSize(l),f=Math.ceil(a/s),p=Math.ceil(n/s);r.pixels.numBlocksY=p,r.pixels.numBlocksX=f,r.pixels.ptr=0;var c,d,h,m,g,y,v,w,C,b,T=0,k=0,x=0,S=0,I=0,_=0,A=0,D=0,P=0,R=0,M=0,E=0,L=0,U=0,O=new o(s*s),B=n%s||s,G=a%s||s,N=i.numDims,F=r.pixels.resultMask,V=r.pixels.resultPixels,j=i.fileVersion>=5?14:15,z=i.zMax;for(x=0;x<p;x++)for(I=x!==p-1?s:B,S=0;S<f;S++)for(P=x*a*s+S*s,R=a-(_=S!==f-1?s:G),w=0;w<N;w++){if(N>1?(b=V,P=x*a*s+S*s,V=new o(r.pixels.resultPixels.buffer,a*n*w*u,a*n),z=i.maxValues[w]):b=null,d={},U=0,U++,D=(A=(c=new DataView(e,r.ptr,Math.min(10,e.byteLength-r.ptr))).getUint8(0))>>6&255,(A>>2&j)!=(S*s>>3&j))throw"integrity issue";if((C=i.fileVersion>=5?4&A:0)&&0===w)throw"integrity issue";if((g=3&A)>3)throw r.ptr+=U,"Invalid block encoding ("+g+")";if(2!==g)if(0===g){if(C)throw"integrity issue";if(r.counter.uncompressed++,r.ptr+=U,M=(M=I*_*u)<(E=e.byteLength-r.ptr)?M:E,h=new ArrayBuffer(M%u==0?M:M+u-M%u),new Uint8Array(h).set(new Uint8Array(e,r.ptr,M)),m=new o(h),L=0,F)for(T=0;T<I;T++){for(k=0;k<_;k++)F[P]&&(V[P]=m[L++]),P++;P+=R}else for(T=0;T<I;T++){for(k=0;k<_;k++)V[P++]=m[L++];P+=R}r.ptr+=L*u}else if(y=t.getDataTypeUsed(C&&l<6?4:l,D),v=t.getOnePixel(d,U,y,c),U+=t.getDataTypeSize(y),3===g)if(r.ptr+=U,r.counter.constantoffset++,F)for(T=0;T<I;T++){for(k=0;k<_;k++)F[P]&&(V[P]=C?Math.min(z,b[P]+v):v),P++;P+=R}else for(T=0;T<I;T++){for(k=0;k<_;k++)V[P]=C?Math.min(z,b[P]+v):v,P++;P+=R}else if(r.ptr+=U,t.decodeBits(e,r,O,v,w),U=0,C)if(F)for(T=0;T<I;T++){for(k=0;k<_;k++)F[P]&&(V[P]=O[U++]+b[P]),P++;P+=R}else for(T=0;T<I;T++){for(k=0;k<_;k++)V[P]=O[U++]+b[P],P++;P+=R}else if(F)for(T=0;T<I;T++){for(k=0;k<_;k++)F[P]&&(V[P]=O[U++]),P++;P+=R}else for(T=0;T<I;T++){for(k=0;k<_;k++)V[P++]=O[U++];P+=R}else{if(C)if(F)for(T=0;T<I;T++)for(k=0;k<_;k++)F[P]&&(V[P]=b[P]),P++;else for(T=0;T<I;T++)for(k=0;k<_;k++)V[P]=b[P],P++;r.counter.constant++,r.ptr+=U}}},formatFileInfo:function(e){return{fileIdentifierString:e.headerInfo.fileIdentifierString,fileVersion:e.headerInfo.fileVersion,imageType:e.headerInfo.imageType,height:e.headerInfo.height,width:e.headerInfo.width,numValidPixel:e.headerInfo.numValidPixel,microBlockSize:e.headerInfo.microBlockSize,blobSize:e.headerInfo.blobSize,maxZError:e.headerInfo.maxZError,pixelType:t.getPixelType(e.headerInfo.imageType),eofOffset:e.eofOffset,mask:e.mask?{numBytes:e.mask.numBytes}:null,pixels:{numBlocksX:e.pixels.numBlocksX,numBlocksY:e.pixels.numBlocksY,maxValue:e.headerInfo.zMax,minValue:e.headerInfo.zMin,noDataValue:e.noDataValue}}},constructConstantSurface:function(e){var r=e.headerInfo.zMax,t=e.headerInfo.numDims,o=e.headerInfo.height*e.headerInfo.width,i=0,a=0,n=0,s=e.pixels.resultMask,l=e.pixels.resultPixels;if(s)if(t>1)for(i=0;i<t;i++)for(n=i*o,r=e.headerInfo.maxValues[i],a=0;a<o;a++)s[a]&&(l[n+a]=r);else for(a=0;a<o;a++)s[a]&&(l[a]=r);else if(t>1)for(i=0;i<t;i++)for(n=i*o,r=e.headerInfo.maxValues[i],a=0;a<o;a++)l[n+a]=r;else for(a=0;a<o;a++)l[a]=r},getDataTypeArray:function(e){var r;switch(e){case 0:r=Int8Array;break;case 1:r=Uint8Array;break;case 2:r=Int16Array;break;case 3:r=Uint16Array;break;case 4:r=Int32Array;break;case 5:r=Uint32Array;break;case 6:default:r=Float32Array;break;case 7:r=Float64Array}return r},getPixelType:function(e){var r;switch(e){case 0:r="S8";break;case 1:r="U8";break;case 2:r="S16";break;case 3:r="U16";break;case 4:r="S32";break;case 5:r="U32";break;case 6:default:r="F32";break;case 7:r="F64"}return r},isValidPixelValue:function(e,r){if(null==r)return!1;var t;switch(e){case 0:t=r>=-128&&r<=127;break;case 1:t=r>=0&&r<=255;break;case 2:t=r>=-32768&&r<=32767;break;case 3:t=r>=0&&r<=65536;break;case 4:t=r>=-2147483648&&r<=2147483647;break;case 5:t=r>=0&&r<=4294967296;break;case 6:t=r>=-34027999387901484e22&&r<=34027999387901484e22;break;case 7:t=r>=5e-324&&r<=17976931348623157e292;break;default:t=!1}return t},getDataTypeSize:function(e){var r=0;switch(e){case 0:case 1:r=1;break;case 2:case 3:r=2;break;case 4:case 5:case 6:r=4;break;case 7:r=8;break;default:r=e}return r},getDataTypeUsed:function(e,r){var t=e;switch(e){case 2:case 4:t=e-r;break;case 3:case 5:t=e-2*r;break;case 6:t=0===r?e:1===r?2:1;break;case 7:t=0===r?e:e-2*r+1;break;default:t=e}return t},getOnePixel:function(e,r,t,o){var i=0;switch(t){case 0:i=o.getInt8(r);break;case 1:i=o.getUint8(r);break;case 2:i=o.getInt16(r,!0);break;case 3:i=o.getUint16(r,!0);break;case 4:i=o.getInt32(r,!0);break;case 5:i=o.getUInt32(r,!0);break;case 6:i=o.getFloat32(r,!0);break;case 7:i=o.getFloat64(r,!0);break;default:throw"the decoder does not understand this pixel type"}return i}},o=function(e,r,t){this.val=e,this.left=r,this.right=t};return{decode:function(e,r){var o=(r=r||{}).noDataValue,i=0,a={};if(a.ptr=r.inputOffset||0,a.pixels={},t.readHeaderInfo(e,a)){var n=a.headerInfo,s=n.fileVersion,l=t.getDataTypeArray(n.imageType);if(s>5)throw"unsupported lerc version 2."+s;t.readMask(e,a),n.numValidPixel===n.width*n.height||a.pixels.resultMask||(a.pixels.resultMask=r.maskData);var u,f=n.width*n.height;if(a.pixels.resultPixels=new l(f*n.numDims),a.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==n.numValidPixel)if(n.zMax===n.zMin)t.constructConstantSurface(a);else if(s>=4&&t.checkMinMaxRanges(e,a))t.constructConstantSurface(a);else{var p=new DataView(e,a.ptr,2),c=p.getUint8(0);if(a.ptr++,c)t.readDataOneSweep(e,a,l);else if(s>1&&n.imageType<=1&&Math.abs(n.maxZError-.5)<1e-5){var d=p.getUint8(1);if(a.ptr++,a.encodeMode=d,d>2||s<4&&d>1)throw"Invalid Huffman flag "+d;d?t.readHuffman(e,a,l):t.readTiles(e,a,l)}else t.readTiles(e,a,l)}a.eofOffset=a.ptr,r.inputOffset?(u=a.headerInfo.blobSize+r.inputOffset-a.ptr,Math.abs(u)>=1&&(a.eofOffset=r.inputOffset+a.headerInfo.blobSize)):(u=a.headerInfo.blobSize-a.ptr,Math.abs(u)>=1&&(a.eofOffset=a.headerInfo.blobSize));var h={width:n.width,height:n.height,pixelData:a.pixels.resultPixels,minValue:n.zMin,maxValue:n.zMax,validPixelCount:n.numValidPixel,dimCount:n.numDims,dimStats:{minValues:n.minValues,maxValues:n.maxValues},maskData:a.pixels.resultMask};if(a.pixels.resultMask&&t.isValidPixelValue(n.imageType,o)){var m=a.pixels.resultMask;for(i=0;i<f;i++)m[i]||(h.pixelData[i]=o);h.noDataValue=o}return a.noDataValue=o,r.returnFileInfo&&(h.fileInfo=t.formatFileInfo(a)),h}},getBandCount:function(e){for(var r=0,o=0,i={ptr:0,pixels:{}};o<e.byteLength-58;)t.readHeaderInfo(e,i),r++,i.ptr=o+=i.headerInfo.blobSize;return r}}}).apply(null,[]))||(e.exports=o)},n7Tx:function(e,r,t){var o,i;o=[t.dj.c(e.i),r],void 0===(i=(function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.bytesToUTF8=function(e,r){for(var t=0,o="",i=0,a=0,n=e.length;t<n;)(i=(a=e[t++])>>4)<8?i=1:15===i?(i=4,a=(7&a)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++]):14===i?(i=3,a=(15&a)<<12|(63&e[t++])<<6|63&e[t++]):(i=2,a=(31&a)<<6|63&e[t++]),(0!==a||r)&&(o+=String.fromCharCode(a));return o}}).apply(null,o))||(e.exports=i)},"qz+T":function(e,r,t){var o,i;o=[t.dj.c(e.i),r,t("dXLH")],void 0===(i=(function(e,r,t){Object.defineProperty(r,"__esModule",{value:!0});var o=function(e){return e&&"esri.layers.support.PixelBlock"===e.declaredClass&&e.pixels&&e.pixels.length>0};function i(e){var r=e.altitude,t=e.azimuth,o=e.hillshadeType,i=e.pixelSizePower,a=e.pixelSizeFactor,n=e.isGCS,s=e.resolution,l="multi-directional"===o?2*e.zFactor:e.zFactor,u=s.x,f=s.y,p=l/(8*u),c=l/(8*f);if(n&&l>.001&&(p/=111e3,c/=111e3),"adjusted"===e.scalingType)if(n){var d=111e3*u,h=111e3*f;p=(l+Math.pow(d,i)*a)/(8*d),c=(l+Math.pow(h,i)*a)/(8*h)}else p=(l+Math.pow(u,i)*a)/(8*u),c=(l+Math.pow(f,i)*a)/(8*f);var m=(90-r)*Math.PI/180,g=Math.cos(m),y=(360-t+90)*Math.PI/180,v=Math.sin(m)*Math.cos(y),w=Math.sin(m)*Math.sin(y),C=[315,270,225,360,180,0],b=[60,60,60,60,60,90],T=new Float32Array([3,5,3,2,1,4]),k=T.reduce((function(e,r){return e+r})),x=T.map((function(e){return e/k})),S="multi-directional"===o?C.length:1,I=new Float32Array(6),_=new Float32Array(6),A=new Float32Array(6);if("multi-directional"===o)for(var D=0;D<S;D++)t=C[D],m=(90-(r=b[D]))*Math.PI/180,g=Math.cos(m),y=(360-t+90)*Math.PI/180,v=Math.sin(m)*Math.cos(y),w=Math.sin(m)*Math.sin(y),I[D]=g,_[D]=v,A[D]=w;else I.fill(g),_.fill(v),A.fill(w);return{resolution:s,factor:[p,c],sinZcosA:v,sinZsinA:w,cosZ:g,sinZcosAs:_,sinZsinAs:A,cosZs:I,weights:x,hillshadeType:["traditional","multi-directional"].indexOf(o)}}r.calculateHillshadeParams=i,r.hillshade=function(e,r){if(!o(e))return e;var a=e.width,n=e.height,s=e.mask,l=new Uint8Array(a*n);s&&l.set(s);for(var u,f,p,c,d,h,m,g,y=i(r),v=y.factor,w=y.sinZcosA,C=y.sinZsinA,b=y.cosZ,T=y.sinZcosAs,k=y.sinZsinAs,x=y.cosZs,S=y.weights,I=v[0],_=v[1],A=r.hillshadeType,D=e.pixels[0],P=new Uint8Array(a*n),R=1;R<n-1;R++)for(var M=R*a,E=1;E<a-1;E++)if(!s||s[M+E]){var L=8;if(s&&(L=s[M-a+E-1]+s[M-a+E]+s[M-a+E+1]+s[M+E-1]+s[M+E+1]+s[M+a+E-1]+s[M+a+E]+s[M+a+E+1])<7)P[M+E]=0,l[M+E]=0;else{7===L?(u=s[M-a+E-1]?D[M-a+E-1]:D[M+E],f=s[M-a+E]?D[M-a+E]:D[M+E],p=s[M-a+E+1]?D[M-a+E+1]:D[M+E],c=s[M+E-1]?D[M+E-1]:D[M+E],d=s[M+E+1]?D[M+E+1]:D[M+E],h=s[M+a+E-1]?D[M+a+E-1]:D[M+E],m=s[M+a+E]?D[M+a+E]:D[M+E],g=s[M+a+E+1]?D[M+a+E+1]:D[M+E]):(u=D[M-a+E-1],f=D[M-a+E],p=D[M-a+E+1],c=D[M+E-1],d=D[M+E+1],h=D[M+a+E-1],m=D[M+a+E],g=D[M+a+E+1]);var U=(p+d+d+g-(u+c+c+h))*I,O=(h+m+m+g-(u+f+f+p))*_,B=Math.sqrt(1+U*U+O*O),G=0;if("traditional"===A)(V=255*(b+C*O-w*U)/B)<0&&(V=0),G=V;else for(var N=k.length,F=0;F<N;F++){var V;(V=255*(x[F]+k[F]*O-T[F]*U)/B)<0&&(V=0),G+=V*S[F]}P[M+E]=255&G}}else P[M+E]=0;for(R=0;R<n;R++)P[R*a]=P[R*a+1],P[(R+1)*a-1]=P[(R+1)*a-2];for(R=1;R<a-1;R++)P[R]=P[R+a],P[R+(n-1)*a]=P[R+(n-2)*a];return new t({width:a,height:n,pixels:[P],mask:s?l:null,pixelType:"u8",validPixelCount:e.validPixelCount,statistics:[{minValue:0,maxValue:255}]})},r.tintHillshade=function(e,r,t,i){if(o(e)&&o(r)){for(var a=i.min,n=e.pixels[0],s=r.mask,l=r.pixels[0],u=255.00001/(i.max-a),f=new Uint8ClampedArray(l.length),p=new Uint8ClampedArray(l.length),c=new Uint8ClampedArray(l.length),d=t.length-1,h=0;h<l.length;h++)if(!s||0!==s[h]){var m=Math.floor((l[h]-a)*u),g=t[m<0?0:m>d?d:m],y=g[0],v=n[h],w=v*g[1],C=w*(1-Math.abs(y%2-1)),b=v-w;switch(Math.floor(y)){case 0:f[h]=w+b,p[h]=C+b,c[h]=b;break;case 1:f[h]=C+b,p[h]=w+b,c[h]=b;break;case 2:f[h]=b,p[h]=w+b,c[h]=C+b;break;case 3:f[h]=b,p[h]=C+b,c[h]=w+b;break;case 4:f[h]=C+b,p[h]=b,c[h]=w+b;break;case 5:case 6:f[h]=w+b,p[h]=b,c[h]=C+b}}e.pixels=[f,p,c],e.updateStatistics()}}}).apply(null,o))||(e.exports=i)},r5V0:function(e,r,t){var o;void 0===(o=(function(){var e=function(){function e(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return e.prototype={ensureBuffer:function(e){var r=this.buffer,t=r?r.byteLength:0;if(e<t)return r;for(var o=512;o<e;)o<<=1;for(var i=new Uint8Array(o),a=0;a<t;++a)i[a]=r[a];return this.buffer=i},getByte:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(e){var r=this.pos;if(e){this.ensureBuffer(r+e);for(var t=r+e;!this.eof&&this.bufferLength<t;)this.readBlock();var o=this.bufferLength;t>o&&(t=o)}else{for(;!this.eof;)this.readBlock();t=this.bufferLength}return this.pos=t,this.buffer.subarray(r,t)},lookChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(e,r,t){for(var o=e+r;this.bufferLength<=o&&!this.eof;)this.readBlock();return new Stream(this.buffer,e,r,t)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0}},e}();return function(){if(!self||!self.Uint32Array)return null;var r=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),o=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),i=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],a=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function n(e){throw new Error(e)}function s(r){var t=0,o=r[t++],i=r[t++];-1!=o&&-1!=i||n("Invalid header in flate stream"),8!=(15&o)&&n("Unknown compression method in flate stream"),((o<<8)+i)%31!=0&&n("Bad FCHECK in flate stream"),32&i&&n("FDICT bit set in flate stream"),this.bytes=r,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,e.call(this)}return(s.prototype=Object.create(e.prototype)).getBits=function(e){for(var r,t=this.codeSize,o=this.codeBuf,i=this.bytes,a=this.bytesPos;t<e;)void 0===(r=i[a++])&&n("Bad encoding in flate stream"),o|=r<<t,t+=8;return r=o&(1<<e)-1,this.codeBuf=o>>e,this.codeSize=t-=e,this.bytesPos=a,r},s.prototype.getCode=function(e){for(var r=e[0],t=e[1],o=this.codeSize,i=this.codeBuf,a=this.bytes,s=this.bytesPos;o<t;){var l;void 0===(l=a[s++])&&n("Bad encoding in flate stream"),i|=l<<o,o+=8}var u=r[i&(1<<t)-1],f=u>>16,p=65535&u;return(0==o||o<f||0==f)&&n("Bad encoding in flate stream"),this.codeBuf=i>>f,this.codeSize=o-f,this.bytesPos=s,p},s.prototype.generateHuffmanTable=function(e){for(var r=e.length,t=0,o=0;o<r;++o)e[o]>t&&(t=e[o]);for(var i=1<<t,a=new Uint32Array(i),n=1,s=0,l=2;n<=t;++n,s<<=1,l<<=1)for(var u=0;u<r;++u)if(e[u]==n){var f=0,p=s;for(o=0;o<n;++o)f=f<<1|1&p,p>>=1;for(o=f;o<i;o+=l)a[o]=n<<16|u;++s}return[a,t]},s.prototype.readBlock=function(){function e(e,r,t,o,i){for(var a=e.getBits(t)+o;a-- >0;)r[h++]=i}var s=this.getBits(3);if(1&s&&(this.eof=!0),0!=(s>>=1)){var l,u;if(1==s)l=i,u=a;else if(2==s){for(var f=this.getBits(5)+257,p=this.getBits(5)+1,c=this.getBits(4)+4,d=Array(r.length),h=0;h<c;)d[r[h++]]=this.getBits(3);for(var m=this.generateHuffmanTable(d),g=0,y=(h=0,f+p),v=new Array(y);h<y;){var w=this.getCode(m);16==w?e(this,v,2,3,g):17==w?e(this,v,3,3,g=0):18==w?e(this,v,7,11,g=0):v[h++]=g=w}l=this.generateHuffmanTable(v.slice(0,f)),u=this.generateHuffmanTable(v.slice(f,y))}else n("Unknown block type in flate stream");for(var C=(M=this.buffer)?M.length:0,b=this.bufferLength;;){var T=this.getCode(l);if(T<256)b+1>=C&&(C=(M=this.ensureBuffer(b+1)).length),M[b++]=T;else{if(256==T)return void(this.bufferLength=b);var k=(T=t[T-=257])>>16;k>0&&(k=this.getBits(k)),g=(65535&T)+k,T=this.getCode(u),(k=(T=o[T])>>16)>0&&(k=this.getBits(k));var x=(65535&T)+k;b+g>=C&&(C=(M=this.ensureBuffer(b+g)).length);for(var S=0;S<g;++S,++b)M[b]=M[b-x]}}}else{var I,_=this.bytes,A=this.bytesPos;void 0===(I=_[A++])&&n("Bad block header in flate stream");var D=I;void 0===(I=_[A++])&&n("Bad block header in flate stream"),D|=I<<8,void 0===(I=_[A++])&&n("Bad block header in flate stream");var P=I;void 0===(I=_[A++])&&n("Bad block header in flate stream"),(P|=I<<8)!=(65535&~D)&&n("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var R=this.bufferLength,M=this.ensureBuffer(R+D),E=R+D;this.bufferLength=E;for(var L=R;L<E;++L){if(void 0===(I=_[A++])){this.eof=!0;break}M[L]=I}this.bytesPos=A}},s}()}).apply(null,[]))||(e.exports=o)},xIS7:function(e,r,t){var o;void 0===(o=(function(){"use strict";var e=function(){function e(e){this.message="JPEG error: "+e}return(e.prototype=new Error).name="JpegError",e.constructor=e,e}();return function(){if(!self||!self.Uint8ClampedArray)return null;var r=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]);function t(){this.decodeTransform=null,this.colorTransform=-1}function o(e,r){for(var t,o,i=0,a=[],n=16;n>0&&!e[n-1];)n--;a.push({children:[],index:0});var s,l=a[0];for(t=0;t<n;t++){for(o=0;o<e[t];o++){for((l=a.pop()).children[l.index]=r[i];l.index>0;)l=a.pop();for(l.index++,a.push(l);a.length<=t;)a.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s;i++}t+1<n&&(a.push(s={children:[],index:0}),l.children[l.index]=s.children,l=s)}return a[0].children}function i(e,r,t){return 64*((e.blocksPerLine+1)*r+t)}function a(t,o,a,n,s,u,f,p,c){var d=a.mcusPerLine,h=o,m=0,g=0;function y(){if(g>0)return g--,m>>g&1;if(255===(m=t[o++])){var r=t[o++];if(r)throw new e("unexpected marker "+(m<<8|r).toString(16))}return g=7,m>>>7}function v(r){for(var t=r;;){if("number"==typeof(t=t[y()]))return t;if("object"!=typeof t)throw new e("invalid huffman sequence")}}function w(e){for(var r=0;e>0;)r=r<<1|y(),e--;return r}function C(e){if(1===e)return 1===y()?1:-1;var r=w(e);return r>=1<<e-1?r:r+(-1<<e)+1}var b,T=0,k=0;function x(e,r,t,o,a){r(e,i(e,(t/d|0)*e.v+o,t%d*e.h+a))}function S(e,r,t){r(e,i(e,t/e.blocksPerLine|0,t%e.blocksPerLine))}var I,_,A,D,P,R,M=n.length;R=a.progressive?0===u?0===p?function(e,r){var t=v(e.huffmanTableDC),o=0===t?0:C(t)<<c;e.blockData[r]=e.pred+=o}:function(e,r){e.blockData[r]|=y()<<c}:0===p?function(e,t){if(T>0)T--;else for(var o=u,i=f;o<=i;){var a=v(e.huffmanTableAC),n=15&a,s=a>>4;if(0!==n){var l=r[o+=s];e.blockData[t+l]=C(n)*(1<<c),o++}else{if(s<15){T=w(s)+(1<<s)-1;break}o+=16}}}:function(t,o){for(var i,a,n=u,s=f,l=0;n<=s;){var p=r[n];switch(k){case 0:if(l=(a=v(t.huffmanTableAC))>>4,0==(i=15&a))l<15?(T=w(l)+(1<<l),k=4):(l=16,k=1);else{if(1!==i)throw new e("invalid ACn encoding");b=C(i),k=l?2:3}continue;case 1:case 2:t.blockData[o+p]?t.blockData[o+p]+=y()<<c:0==--l&&(k=2===k?3:0);break;case 3:t.blockData[o+p]?t.blockData[o+p]+=y()<<c:(t.blockData[o+p]=b<<c,k=0);break;case 4:t.blockData[o+p]&&(t.blockData[o+p]+=y()<<c)}n++}4===k&&0==--T&&(k=0)}:function(e,t){var o=v(e.huffmanTableDC),i=0===o?0:C(o);e.blockData[t]=e.pred+=i;for(var a=1;a<64;){var n=v(e.huffmanTableAC),s=15&n,l=n>>4;if(0!==s){var u=r[a+=l];e.blockData[t+u]=C(s),a++}else{if(l<15)break;a+=16}}};var E,L,U,O,B=0;for(L=1===M?n[0].blocksPerLine*n[0].blocksPerColumn:d*a.mcusPerColumn;B<L;){var G=s?Math.min(L-B,s):L;for(_=0;_<M;_++)n[_].pred=0;if(T=0,1===M)for(I=n[0],P=0;P<G;P++)S(I,R,B),B++;else for(P=0;P<G;P++){for(_=0;_<M;_++)for(U=(I=n[_]).h,O=I.v,A=0;A<O;A++)for(D=0;D<U;D++)x(I,R,B,A,D);B++}g=0,(E=l(t,o))&&E.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+E.invalid),o=E.offset);var N=E&&E.marker;if(!N||N<=65280)throw new e("marker was not found");if(!(N>=65488&&N<=65495))break;o+=2}return(E=l(t,o))&&E.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+E.invalid),o=E.offset),o-h}function n(r,t,o){var i,a,n,s,l,u,f,p,c,d,h,m,g,y,v,w,C,b=r.quantizationTable,T=r.blockData;if(!b)throw new e("missing required Quantization Table.");for(var k=0;k<64;k+=8)c=T[t+k],c*=b[k],0!=((d=T[t+k+1])|(h=T[t+k+2])|(m=T[t+k+3])|(g=T[t+k+4])|(y=T[t+k+5])|(v=T[t+k+6])|(w=T[t+k+7]))?(a=(i=(i=5793*c+128>>8)+(a=5793*(g*=b[k+4])+128>>8)+1>>1)-a,C=3784*(n=h*=b[k+2])+1567*(s=v*=b[k+6])+128>>8,n=1567*n-3784*s+128>>8,f=(l=(l=2896*((d*=b[k+1])-(w*=b[k+7]))+128>>8)+(f=(y*=b[k+5])<<4)+1>>1)-f,u=(p=(p=2896*(d+w)+128>>8)+(u=(m*=b[k+3])<<4)+1>>1)-u,s=(i=i+(s=C)+1>>1)-s,n=(a=a+n+1>>1)-n,C=2276*l+3406*p+2048>>12,l=3406*l-2276*p+2048>>12,p=C,C=799*u+4017*f+2048>>12,u=4017*u-799*f+2048>>12,f=C,o[k]=i+p,o[k+7]=i-p,o[k+1]=a+f,o[k+6]=a-f,o[k+2]=n+u,o[k+5]=n-u,o[k+3]=s+l,o[k+4]=s-l):(o[k]=C=5793*c+512>>10,o[k+1]=C,o[k+2]=C,o[k+3]=C,o[k+4]=C,o[k+5]=C,o[k+6]=C,o[k+7]=C);for(var x=0;x<8;++x)c=o[x],0!=((d=o[x+8])|(h=o[x+16])|(m=o[x+24])|(g=o[x+32])|(y=o[x+40])|(v=o[x+48])|(w=o[x+56]))?(a=(i=4112+((i=5793*c+2048>>12)+(a=5793*g+2048>>12)+1>>1))-a,C=3784*(n=h)+1567*(s=v)+2048>>12,n=1567*n-3784*s+2048>>12,s=C,f=(l=(l=2896*(d-w)+2048>>12)+(f=y)+1>>1)-f,u=(p=(p=2896*(d+w)+2048>>12)+(u=m)+1>>1)-u,C=2276*l+3406*p+2048>>12,l=3406*l-2276*p+2048>>12,p=C,C=799*u+4017*f+2048>>12,u=4017*u-799*f+2048>>12,c=(c=(i=i+s+1>>1)+p)<16?0:c>=4080?255:c>>4,d=(d=(a=a+n+1>>1)+(f=C))<16?0:d>=4080?255:d>>4,h=(h=(n=a-n)+u)<16?0:h>=4080?255:h>>4,m=(m=(s=i-s)+l)<16?0:m>=4080?255:m>>4,g=(g=s-l)<16?0:g>=4080?255:g>>4,y=(y=n-u)<16?0:y>=4080?255:y>>4,v=(v=a-f)<16?0:v>=4080?255:v>>4,w=(w=i-p)<16?0:w>=4080?255:w>>4,T[t+x]=c,T[t+x+8]=d,T[t+x+16]=h,T[t+x+24]=m,T[t+x+32]=g,T[t+x+40]=y,T[t+x+48]=v,T[t+x+56]=w):(C=(C=5793*c+8192>>14)<-2040?0:C>=2024?255:C+2056>>4,T[t+x]=C,T[t+x+8]=C,T[t+x+16]=C,T[t+x+24]=C,T[t+x+32]=C,T[t+x+40]=C,T[t+x+48]=C,T[t+x+56]=C)}function s(e,r){for(var t=r.blocksPerLine,o=r.blocksPerColumn,a=new Int16Array(64),s=0;s<o;s++)for(var l=0;l<t;l++)n(r,i(r,s,l),a);return r.blockData}function l(e,r,t){function o(r){return e[r]<<8|e[r+1]}var i=e.length-1,a=t<r?t:r;if(r>=i)return null;var n=o(r);if(n>=65472&&n<=65534)return{invalid:null,marker:n,offset:r};for(var s=o(a);!(s>=65472&&s<=65534);){if(++a>=i)return null;s=o(a)}return{invalid:n.toString(16),marker:s,offset:a}}return t.prototype={parse:function(t){function i(){var e=t[c]<<8|t[c+1];return c+=2,e}function n(){var e=i(),r=c+e-2,o=l(t,r,c);o&&o.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+o.invalid),r=o.offset);var a=t.subarray(c,r);return c+=a.length,a}function u(e){for(var r=Math.ceil(e.samplesPerLine/8/e.maxH),t=Math.ceil(e.scanLines/8/e.maxV),o=0;o<e.components.length;o++){B=e.components[o];var i=Math.ceil(Math.ceil(e.samplesPerLine/8)*B.h/e.maxH),a=Math.ceil(Math.ceil(e.scanLines/8)*B.v/e.maxV);B.blockData=new Int16Array(t*B.v*64*(r*B.h+1)),B.blocksPerLine=i,B.blocksPerColumn=a}e.mcusPerLine=r,e.mcusPerColumn=t}var f,p,c=0,d=null,h=null,m=[],g=[],y=[],v=i();if(65496!==v)throw new e("SOI not found");for(v=i();65497!==v;){var w,C,b;switch(v){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var T=n();65504===v&&74===T[0]&&70===T[1]&&73===T[2]&&70===T[3]&&0===T[4]&&(d={version:{major:T[5],minor:T[6]},densityUnits:T[7],xDensity:T[8]<<8|T[9],yDensity:T[10]<<8|T[11],thumbWidth:T[12],thumbHeight:T[13],thumbData:T.subarray(14,14+3*T[12]*T[13])}),65518===v&&65===T[0]&&100===T[1]&&111===T[2]&&98===T[3]&&101===T[4]&&(h={version:T[5]<<8|T[6],flags0:T[7]<<8|T[8],flags1:T[9]<<8|T[10],transformCode:T[11]});break;case 65499:for(var k=i()+c-2;c<k;){var x=t[c++],S=new Uint16Array(64);if(x>>4==0)for(C=0;C<64;C++)S[r[C]]=t[c++];else{if(x>>4!=1)throw new e("DQT - invalid table spec");for(C=0;C<64;C++)S[r[C]]=i()}m[15&x]=S}break;case 65472:case 65473:case 65474:if(f)throw new e("Only single frame JPEGs supported");i(),(f={}).extended=65473===v,f.progressive=65474===v,f.precision=t[c++],f.scanLines=i(),f.samplesPerLine=i(),f.components=[],f.componentIds={};var I,_=t[c++],A=0,D=0;for(w=0;w<_;w++){I=t[c];var P=t[c+1]>>4,R=15&t[c+1];A<P&&(A=P),D<R&&(D=R),b=f.components.push({h:P,v:R,quantizationId:t[c+2],quantizationTable:null}),f.componentIds[I]=b-1,c+=3}f.maxH=A,f.maxV=D,u(f);break;case 65476:var M=i();for(w=2;w<M;){var E=t[c++],L=new Uint8Array(16),U=0;for(C=0;C<16;C++,c++)U+=L[C]=t[c];var O=new Uint8Array(U);for(C=0;C<U;C++,c++)O[C]=t[c];w+=17+U,(E>>4==0?y:g)[15&E]=o(L,O)}break;case 65501:i(),p=i();break;case 65498:i();var B,G=t[c++],N=[];for(w=0;w<G;w++){var F=f.componentIds[t[c++]],V=t[c++];(B=f.components[F]).huffmanTableDC=y[V>>4],B.huffmanTableAC=g[15&V],N.push(B)}var j=t[c++],z=t[c++],J=t[c++],Y=a(t,c,f,N,p,j,z,J>>4,15&J);c+=Y;break;case 65535:255!==t[c]&&c--;break;default:if(255===t[c-3]&&t[c-2]>=192&&t[c-2]<=254){c-=3;break}throw new e("unknown marker "+v.toString(16))}v=i()}for(this.width=f.samplesPerLine,this.height=f.scanLines,this.jfif=d,this.eof=c,this.adobe=h,this.components=[],w=0;w<f.components.length;w++){var H=m[(B=f.components[w]).quantizationId];H&&(B.quantizationTable=H),this.components.push({output:s(0,B),scaleX:B.h/f.maxH,scaleY:B.v/f.maxV,blocksPerLine:B.blocksPerLine,blocksPerColumn:B.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(e,r){var t,o,i,a,n,s,l,u,f,p,c,d=this.width/e,h=this.height/r,m=0,g=this.components.length,y=e*r*g,v=new Uint8ClampedArray(y),w=new Uint32Array(e);for(l=0;l<g;l++){for(o=(t=this.components[l]).scaleX*d,i=t.scaleY*h,m=l,c=t.output,a=t.blocksPerLine+1<<3,n=0;n<e;n++)w[n]=(4294967288&(u=0|n*o))<<3|7&u;for(s=0;s<r;s++)for(p=a*(4294967288&(u=0|s*i))|(7&u)<<3,n=0;n<e;n++)v[m]=c[p+w[n]],m+=g}var C=this.decodeTransform;if(C)for(l=0;l<y;)for(u=0,f=0;u<g;u++,l++,f+=2)v[l]=(v[l]*C[f]>>8)+C[f+1];return v},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(e){for(var r,t,o,i=0,a=e.length;i<a;i+=3)t=e[i+1],e[i]=(r=e[i])-179.456+1.402*(o=e[i+2]),e[i+1]=r+135.459-.344*t-.714*o,e[i+2]=r-226.816+1.772*t;return e},_convertYcckToRgb:function(e){for(var r,t,o,i,a=0,n=0,s=e.length;n<s;n+=4)e[a++]=(t=e[n+1])*(-660635669420364e-19*t+.000437130475926232*(o=e[n+2])-54080610064599e-18*(r=e[n])+.00048449797120281*(i=e[n+3])-.154362151871126)-122.67195406894+o*(-.000957964378445773*o+.000817076911346625*r-.00477271405408747*i+1.53380253221734)+r*(.000961250184130688*r-.00266257332283933*i+.48357088451265)+i*(-.000336197177618394*i+.484791561490776),e[a++]=107.268039397724+t*(219927104525741e-19*t-.000640992018297945*o+.000659397001245577*r+.000426105652938837*i-.176491792462875)+o*(-.000778269941513683*o+.00130872261408275*r+.000770482631801132*i-.151051492775562)+r*(.00126935368114843*r-.00265090189010898*i+.25802910206845)+i*(-.000318913117588328*i-.213742400323665),e[a++]=t*(-.000570115196973677*t-263409051004589e-19*o+.0020741088115012*r-.00288260236853442*i+.814272968359295)-20.810012546947+o*(-153496057440975e-19*o-.000132689043961446*r+.000560833691242812*i-.195152027534049)+r*(.00174418132927582*r-.00255243321439347*i+.116935020465145)+i*(-.000343531996510555*i+.24165260232407);return e},_convertYcckToCmyk:function(e){for(var r,t,o,i=0,a=e.length;i<a;i+=4)t=e[i+1],e[i]=434.456-(r=e[i])-1.402*(o=e[i+2]),e[i+1]=119.541-r+.344*t+.714*o,e[i+2]=481.816-r-1.772*t;return e},_convertCmykToRgb:function(e){for(var r,t,o,i,a=0,n=0,s=e.length;n<s;n+=4)e[a++]=255+(r=e[n]*(1/255))*(-4.387332384609988*r+54.48615194189176*(t=e[n+1]*(1/255))+18.82290502165302*(o=e[n+2]*(1/255))+212.25662451639585*(i=e[n+3]*(1/255))-285.2331026137004)+t*(1.7149763477362134*t-5.6096736904047315*o-17.873870861415444*i-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*i+17.5119270841813)-i*(21.86122147463605*i+189.48180835922747),e[a++]=255+r*(8.841041422036149*r+60.118027045597366*t+6.871425592049007*o+31.159100130055922*i-79.2970844816548)+t*(-15.310361306967817*t+17.575251261109482*o+131.35250912493976*i-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*i-24.86741582555878)-i*(20.737325471181034*i+187.80453709719578),e[a++]=255+r*(.8842522430003296*r+8.078677503112928*t+30.89978309703729*o-.23883238689178934*i-14.183576799673286)+t*(10.49593273432072*t+63.02378494754052*o+50.606957656360734*i-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*i-193.58209356861505)-i*(22.33816807309886*i+180.12613974708367);return e},getData:function(r,t,o){if(this.numComponents>4)throw new e("Unsupported color mode");var i=this._getLinearizedBlockData(r,t);if(1===this.numComponents&&o){for(var a=i.length,n=new Uint8ClampedArray(3*a),s=0,l=0;l<a;l++){var u=i[l];n[s++]=u,n[s++]=u,n[s++]=u}return n}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(i);if(4===this.numComponents){if(this._isColorConversionNeeded())return o?this._convertYcckToRgb(i):this._convertYcckToCmyk(i);if(o)return this._convertCmykToRgb(i)}return i}},t}()}).apply(null,[]))||(e.exports=o)}}]);