(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f1516bda"],{"0c00":function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return h}));n("e06a");var r=n("b2b2"),i=n("84e3"),o=n("3e27"),s=n("1451"),a=n("9dee"),c=n("b4e0"),l=n("19db"),f=n("8c6a"),u=n("7220"),p=n("2616"),m=n("3af1");class h{convertVectorFieldData(e){const t=o["a"].fromJSON(e.pixelBlock),n=Object(l["b"])(t,e.type);return Promise.resolve(Object(r["k"])(n)&&n.toJSON())}async decode(e){const t=await Object(s["a"])(e.data,e.options);return t&&t.toJSON()}symbolize(e){e.pixelBlock=o["a"].fromJSON(e.pixelBlock),e.extent=e.extent?m["a"].fromJSON(e.extent):null;const t=this.symbolizer.symbolize(e);return Promise.resolve(Object(r["k"])(t)&&t.toJSON())}async updateSymbolizer(e){var t;this.symbolizer=u["a"].fromJSON(e.symbolizerJSON),e.histograms&&"rasterStretch"===(null==(t=this.symbolizer)?void 0:t.rendererJSON.type)&&(this.symbolizer.rendererJSON.histograms=e.histograms)}stretch(e){const t=this.symbolizer.simpleStretch(o["a"].fromJSON(e.srcPixelBlock),e.stretchParams);return Promise.resolve(Object(r["k"])(t)&&t.toJSON())}estimateStatisticsHistograms(e){const t=Object(a["g"])(o["a"].fromJSON(e.srcPixelBlock));return Promise.resolve(t)}split(e){const t=Object(a["p"])(o["a"].fromJSON(e.srcPixelBlock),e.tileSize,e.maximumPyramidLevel);return t&&t.forEach((e,n)=>{t.set(n,null==e?void 0:e.toJSON())}),Promise.resolve(t)}async mosaicAndTransform(e){var t;const n=e.srcPixelBlocks.map(e=>e?new o["a"](e):null),i=Object(a["l"])(n,e.srcMosaicSize,{blockWidths:e.blockWidths,alignmentInfo:e.alignmentInfo,clipOffset:e.clipOffset,clipSize:e.clipSize});let s,c=i;return e.coefs&&(c=Object(a["a"])(i,e.destDimension,e.coefs,e.sampleSpacing,e.interpolation)),e.projectDirections&&e.gcsGrid&&(s=Object(a["i"])(e.destDimension,e.gcsGrid),c=Object(r["t"])(Object(l["a"])(c,e.isUV?"vector-uv":"vector-magdir",s))),{pixelBlock:null==(t=c)?void 0:t.toJSON(),localNorthDirections:s}}async createStreamlinesMesh(e,t){const n={data:new Float32Array(e.flowData.buffer),width:e.flowData.width,height:e.flowData.height},{vertexData:r,indexData:i}=await Object(p["a"])(e.rendererSettings,n,t.signal);return{result:{vertexBuffer:r.buffer,indexBuffer:i.buffer},transferList:[r.buffer,i.buffer]}}async getProjectionOffsetGrid(e){const t=m["a"].fromJSON(e.projectedExtent),n=m["a"].fromJSON(e.srcBufferExtent);let r=null;e.datumTransformationSteps&&(r=new i["a"]({steps:e.datumTransformationSteps})),(e.includeGCSGrid||Object(c["k"])(t.spatialReference,n.spatialReference,r))&&await Object(c["g"])();const o=e.rasterTransform?Object(f["b"])(e.rasterTransform):null;return Object(c["c"])({...e,projectedExtent:t,srcBufferExtent:n,datumTransformation:r,rasterTransform:o})}}},"0f1d":function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n("a4ee"),i=n("6a0ed"),o=n("59b2"),s=(n("b50f"),n("c120"),n("cea0"),n("d386"));let a=class extends i["a"]{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};Object(r["a"])([Object(o["b"])()],a.prototype,"affectsPixelSize",null),Object(r["a"])([Object(o["b"])({json:{write:!0}})],a.prototype,"spatialReference",void 0),a=Object(r["a"])([Object(s["a"])("esri.layers.support.rasterTransforms.BaseRasterTransform")],a);const c=a},"773d":function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n("a4ee"),i=n("59b2"),o=(n("b50f"),n("c120"),n("cea0"),n("448d")),s=n("d386"),a=n("0f1d");let c=class extends a["a"]{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}};Object(r["a"])([Object(o["a"])({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),Object(r["a"])([Object(i["b"])()],c.prototype,"tolerance",void 0),c=Object(r["a"])([Object(s["a"])("esri.layers.support.rasterTransforms.GCSShiftTransform")],c);const l=c},"7fb1":function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n("a4ee"),i=(n("e06a"),n("59b2")),o=(n("b50f"),n("c120"),n("cea0"),n("448d")),s=n("afcf"),a=n("d386"),c=n("09db"),l=n("0f1d"),f=n("4ae5"),u=n("3af1");function p(e,t,n){const{x:r,y:i}=t;if(n<2)return{x:e[0]+r*e[2]+i*e[4],y:e[1]+r*e[3]+i*e[5]};if(2===n){const t=r*r,n=i*i,o=r*i;return{x:e[0]+r*e[2]+i*e[4]+t*e[6]+o*e[8]+n*e[10],y:e[1]+r*e[3]+i*e[5]+t*e[7]+o*e[9]+n*e[11]}}const o=r*r,s=i*i,a=r*i,c=o*r,l=o*i,f=r*s,u=i*s;return{x:e[0]+r*e[2]+i*e[4]+o*e[6]+a*e[8]+s*e[10]+c*e[12]+l*e[14]+f*e[16]+u*e[18],y:e[1]+r*e[3]+i*e[5]+o*e[7]+a*e[9]+s*e[11]+c*e[13]+l*e[15]+f*e[17]+u*e[19]}}function m(e,t,n){const{xmin:r,ymin:i,xmax:o,ymax:s,spatialReference:a}=t;let c=[];if(n<2)c.push({x:r,y:s}),c.push({x:o,y:s}),c.push({x:r,y:i}),c.push({x:o,y:i});else{let e=10;for(let t=0;tp(e,t,n));const l=c.map(e=>e.x),f=c.map(e=>e.y);return new u["a"]({xmin:Math.min.apply(null,l),xmax:Math.max.apply(null,l),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:a})}function h(e){const[t,n,r,i,o,s]=e,a=r*s-o*i,c=o*i-r*s;return[(o*n-t*s)/a,(r*n-t*i)/c,s/a,i/c,-o/a,-r/c]}let x=class extends l["a"]{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:n,coeffY:r}=t;if(null==n||!n.length||null==r||!r.length||n.length!==r.length)return null;const i=[];for(let o=0;o0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new f["a"]({x:t.x,y:t.y,spatialReference:e.spatialReference})}return m(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new f["a"]({x:t.x,y:t.y,spatialReference:e.spatialReference})}return m(this.inverseCoefficients,e,this.polynomialOrder)}};Object(r["a"])([Object(i["b"])({json:{write:!0}})],x.prototype,"polynomialOrder",void 0),Object(r["a"])([Object(i["b"])()],x.prototype,"forwardCoefficients",void 0),Object(r["a"])([Object(s["a"])("forwardCoefficients",["coeffX","coeffY"])],x.prototype,"readForwardCoefficients",null),Object(r["a"])([Object(c["a"])("forwardCoefficients")],x.prototype,"writeForwardCoefficients",null),Object(r["a"])([Object(i["b"])({json:{write:!0}})],x.prototype,"inverseCoefficients",null),Object(r["a"])([Object(s["a"])("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],x.prototype,"readInverseCoefficients",null),Object(r["a"])([Object(c["a"])("inverseCoefficients")],x.prototype,"writeInverseCoefficients",null),Object(r["a"])([Object(i["b"])()],x.prototype,"affectsPixelSize",null),Object(r["a"])([Object(o["a"])({PolynomialXform:"polynomial"})],x.prototype,"type",void 0),x=Object(r["a"])([Object(a["a"])("esri.layers.support.rasterTransforms.PolynomialTransform")],x);const d=x},"8c6a":function(e,t,n){"use strict";n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return h}));var r=n("773d"),i=n("a4ee"),o=(n("e92d"),n("cea0"),n("b50f"),n("c120"),n("2dd4"),n("448d")),s=n("d386"),a=n("0f1d");let c=class extends a["a"]{constructor(){super(...arguments),this.type="identity"}};Object(i["a"])([Object(o["a"])({IdentityXform:"identity"})],c.prototype,"type",void 0),c=Object(i["a"])([Object(s["a"])("esri.layers.support.rasterTransforms.IdentityTransform")],c);const l=c;var f=n("7fb1");const u={GCSShiftXform:r["a"],IdentityXform:l,PolynomialXform:f["a"]},p=Object.keys(u);function m(e){const t=null==e?void 0:e.type;return!e||p.includes(t)}function h(e){if(!(null==e?void 0:e.type))return null;const t=u[null==e?void 0:e.type];if(t){const n=new t;return n.read(e),n}return null}},b4e0:function(e,t,n){"use strict";n.d(t,"a",(function(){return K})),n.d(t,"b",(function(){return j})),n.d(t,"c",(function(){return F})),n.d(t,"d",(function(){return X})),n.d(t,"e",(function(){return J})),n.d(t,"f",(function(){return W})),n.d(t,"g",(function(){return O})),n.d(t,"h",(function(){return z})),n.d(t,"i",(function(){return S})),n.d(t,"j",(function(){return w})),n.d(t,"k",(function(){return u})),n.d(t,"l",(function(){return L})),n.d(t,"m",(function(){return q}));n("e06a");var r=n("ce50"),i=n("b2b2"),o=n("8048"),s=n("9415"),a=n("8188"),c=n("3af1"),l=n("4ae5"),f=n("5996");function u(e,t,n){return!Object(a["b"])(e,t,n)}function p(e,t,n){const i=u(e,t,n);if(i&&!Object(a["h"])())throw new r["a"]("rasterprojectionhelper-project","projection engine is not loaded");return i}const m=function(e,t,n,r=0){if(1===n[0])return[0,0];let i=1,o=-1,s=1,a=-1;for(let d=0;de[d]?e[d]:i,o=o>e[d]?o:e[d],s=s>e[d+1]?e[d+1]:s,a=a>e[d+1]?a:e[d+1]);const{cols:c,rows:l}=t,f=(o-i)/c/n[0],u=(a-s)/l/n[1],p=2*r;let m=0,h=!1,x=[0,0];for(let d=0;dm&&(m=o+s,x=[o,s]),p&&m>p){h=!0;break}}if(h)break}return x},h={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},x=32,d=4,y=d,b=new Map,g=new Map;async function O(){if(Object(a["h"])())return null;await Object(a["i"])()}function j(e,t,n){return p(e.spatialReference,t)?n?Object(a["f"])(t,e.spatialReference,e):Object(a["f"])(e.spatialReference,t,e):null}function w(e,t,n,r=null){const s=e.spatialReference;if(s.equals(t))return e;p(s,t,r);const l=n.center,f=new c["a"]({xmin:l.x-e.x/2,xmax:l.x+e.x/2,ymin:l.y-e.y/2,ymax:l.y+e.y/2,spatialReference:s}),u=Object(a["m"])(f,t,r);if(Object(i["j"])(u))return null;const m={x:u.xmax-u.xmin,y:u.ymax-u.ymin},h=J(t);if(Object(i["k"])(h)&&m.x>=h){const n=Object(o["f"])(s)/Object(o["f"])(t);m.x=e.x*n,m.y=e.y*n}return m}function v(e,t=.01){return Object(o["f"])(e)?t/Object(o["f"])(e):0}function S(e,t,n=null,r=!0){const o=e.spatialReference;if(o.equals(t))return e;p(o,t,n);const s=Object(a["m"])(e,t,n);if(!r||!s)return s;const c=B(o,!0),l=B(t,!0),f=v(o);return f&&Object(i["k"])(c)&&Object(i["k"])(l)&&(s.x>0&&Math.abs(e.x-c[0])new l["a"](t[0],t[1],e.inSR));return Object(a["m"])(n,e.outSR,e.datumTransformation).map(e=>e?[e.x,e.y]:[NaN,NaN])}function k(e){const{inSR:t,outSR:n,datumTransformation:r}=e,o=C(t),{points:a,mask:c}=T(e,o);if(!t.isGeographic){const e=t.wkid?s["a"].coordsys(t.wkid):s["a"].fromString(t.isGeographic?s["b"].PE_TYPE_GEOGCS:s["b"].PE_TYPE_PROJCS,t.wkt);s["c"].projToGeog(e,a.length,a)}if(Object(i["k"])(r)&&r.steps.length&&r.steps.forEach(e=>{const t=e.wkid?s["a"].geogtran(e.wkid):s["a"].fromString(s["b"].PE_TYPE_GEOGTRAN,e.wkt);s["d"].geogToGeog(t,a.length,a,null,e.isInverse?s["b"].PE_TRANSFORM_2_TO_1:s["b"].PE_TRANSFORM_1_TO_2)}),!n.isGeographic){const e=C(n,!0),t=Object(i["k"])(e)&&e.isEnvelope?[e.bbox[1],e.bbox[3]]:[-90,90];G(a,t);const r=n.wkid?s["a"].coordsys(n.wkid):s["a"].fromString(n.isGeographic?s["b"].PE_TYPE_GEOGCS:s["b"].PE_TYPE_PROJCS,n.wkt);s["c"].geogToProj(r,a.length,a)}let l=a;if(c&&a.length!==c.length){l=[];for(let e=0,t=0;e1===e.getInclusive()&&1===e.getKind());if(!a){if(a=i.find(e=>1===e.getInclusive()&&0===e.getKind()),!a)return null;o=!0}const c=r.isPannableRectangle(),l=a.getCoord();if(o)return{isEnvelope:o,isPannable:c,vertices:l,coef:null,bbox:[l[0][0]-t,l[0][1]-t,l[1][0]+t,l[1][1]+t]};let f=0;const u=[];let[p,m]=l[0],[h,x]=l[0];for(let s=0,d=l.length;se?h:e,x=x>t?x:t}return{isEnvelope:!1,isPannable:c,vertices:l,coef:u,bbox:[p,m,h,x]}}function T(e,t){const n=[],{cols:r,rows:o,xres:s,yres:a,usePixelCenter:c}=e;let{xmin:l,ymax:f}=e;if(c&&(l+=s/2,f-=a/2),!Object(i["k"])(t)){for(let e=0;e=e&&r<=c;for(let e=0;e=i&&t<=p&&(n.push([r,t]),u[h]=1)}}return{points:n,mask:u}}const{coef:p}=t,m=[];for(let i=0;i=s&&e<=a){const i=r*e+o;t.push(i),n.push(c)}}let r=t;if(t.length>2){let e=2===n[0]?0:n[0],i=t[0];r=[];for(let o=1;oe-t)}else t[0]>t[1]&&(r=[t[1],t[0]]);m.push(r)}for(let i=0,h=0;i=i[0]&&e<=i[1]&&(n.push([e,r]),u[h]=1);else if(i.length>2){let t=!1;for(let n=0;n=i[n]&&e<=i[n+1]){t=!0;break}t&&(n.push([e,r]),u[h]=1)}}}return{points:n,mask:u}}function G(e,t){const[n,r]=t;for(let i=0;ir)&&(e[i]=[NaN,NaN])}}function E(e){const t=J(e[0].spatialReference);if(e.length<2||!Object(i["k"])(t))return e[0];let{xmin:n,xmax:r,ymin:o,ymax:s}=e[0];for(let i=1;iv(e.spatialReference)){const{xmin:t,xmax:n}=e;for(let r=0;r<=o;r++){const i=0===r?t:-s/2,a=r===o?n-s*r:s/2;l[r]=new c["a"]({xmin:i,xmax:a,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference})}}return E(l.map(e=>_(e,t,n,r)).filter(e=>!!e))}function _(e,t,n=null,r=!0,o=!0){const s=e.spatialReference;if(s.equals(t))return e;p(s,t,n);const c=Object(a["m"])(e,t,n);if(o&&t.isWebMercator&&c&&(c.ymax=Math.min(20037508.342787,c.ymax),c.ymin=Math.max(-20037508.342787,c.ymin),c.ymin>=c.ymax))return null;if(!r||!c)return c;const f=B(s,!0),u=B(t,!0);if(Object(i["j"])(f)||Object(i["j"])(u))return c;const m=v(s,.001),h=v(s,500),x=v(t,.001);if(Math.abs(c.xmin-u[0])h){c.xmin=u[0];const r=[];r.push(new l["a"](e.xmax,e.ymin,s)),r.push(new l["a"](e.xmax,(e.ymin+e.ymax)/2,s)),r.push(new l["a"](e.xmax,e.ymax,s));const i=r.map(e=>S(e,t,n)).filter(e=>!isNaN(null==e?void 0:e.x)).map(e=>e.x);c.xmax=Math.max.apply(null,i)}if(ih){c.xmax=u[1];const r=[];r.push(new l["a"](e.xmin,e.ymin,s)),r.push(new l["a"](e.xmin,(e.ymin+e.ymax)/2,s)),r.push(new l["a"](e.xmin,e.ymax,s));const i=r.map(e=>S(e,t,n)).filter(e=>!isNaN(null==e?void 0:e.x)).map(e=>e.x);c.xmin=Math.min.apply(null,i)}}else{const e=v(t,.001);Math.abs(c.xmin-u[0])0&&r.outofBoundPointCounty)&&(u(l,f,e.datumTransformation)&&(l.isGeographic||Object(i["k"])(C(l))),n=[d,d],r=A({...e,spacing:n}),o={cols:r.size[0]+1,rows:r.size[1]+1},a=m(r.offsets,o,n,y)),r.error=a,n[0]>1&&(r.coefficients=D(r.offsets,o,s)),e.includeGCSGrid&&!l.isGeographic&&!l.isWebMercator)if(f.isGeographic)r.gcsGrid={offsets:r.offsets,coefficients:r.coefficients,spacing:n};else{const t=C(l);if(Object(i["k"])(t)&&!t.isEnvelope){const t=Y(l),i=z(e.projectedExtent,t),{offsets:a}=A({...e,srcBufferExtent:i,spacing:n}),c=D(a,o,s);r.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return r}function A(e){const{projectedExtent:t,srcBufferExtent:n,pixelSize:r,datumTransformation:o,rasterTransform:s}=e,a=t.spatialReference,c=n.spatialReference;p(a,c);const{xmin:f,ymin:u,xmax:m,ymax:h}=t,y=J(c),b=Object(i["k"])(y)&&(e.hasWrapAround||"gcs-shift"===(null==s?void 0:s.type)),g=e.spacing||[x,x],O=g[0]*r.x,j=g[1]*r.y,w=1===g[0],S=Math.ceil((m-f)/O-.1/g[0])+(w?0:1),R=Math.ceil((h-u)/j-.1/g[1])+(w?0:1),k=M({cols:S,rows:R,xmin:f,ymax:h,xres:O,yres:j,inSR:a,outSR:c,datumTransformation:o,preferPE:g[0]<=d,usePixelCenter:w}),P=[];let C,N=0;const T=w?-1:NaN,{xmin:G,xmax:E,ymax:z,width:_,height:B}=n,I=v(c,500);for(let i=0;iE&&n[0]>y/2-I&&(n[0]-=y),!n||isNaN(n[0])||isNaN(n[1]))P.push(T),P.push(T),e.push(null),N++;else{if(s){const e=s.inverseTransform(new l["a"]({x:n[0],y:n[1],spatialReference:c}));n=[e.x,e.y]}e.push(n),i>0&&b&&C[t]&&n[0]=f)s=c.length,a=r/f>8;else{let e,t=u;for(let i=1;i<=c.length;i++){if(e=(c[i-1].x+c[i-1].y)/2,r<=e){r===e?s=i:"down"===n?(s=i-1,a=r/t>8):s="up"===n||r-t>e-r||r/t>2?i:i-1;break}t=e}}const p=0===s?o:c[s-1];return{pyramidLevel:s,pyramidResolution:new l["a"]({x:p.x,y:p.y,spatialReference:t.spatialReference}),excessiveReading:a}}const f=Math.log(e.x/o.x)/Math.LN2,u=Math.log(e.y/o.y)/Math.LN2,p=t.storageInfo.maximumPyramidLevel||0;s="down"===n?Math.floor(Math.min(f,u)):"up"===n?Math.ceil(Math.max(f,u)):Math.round((f+u)/2),s<0?s=0:s>p&&(a=s>p+3,s=p);const m=2**s;return{pyramidLevel:s,pyramidResolution:new l["a"]({x:m*t.nativePixelSize.x,y:m*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:a}}function K(e,t,n=512,r=!0){const{extent:i,spatialReference:s,pixelSize:a}=e,c=w(new l["a"]({x:a.x,y:a.y,spatialReference:s}),t,i);if(null==c)return{projectedPixelSize:null,scales:null,srcResolutions:null,isCustomTilingScheme:!1};const f=(c.x+c.y)/2,u=Object(o["f"])(t),p=f*u*96*39.37,m=t.isGeographic?256/n*295828763.7958547:256/n*591657527.591555;let h="vector-magdir"===e.dataType||"vector-uv"===e.dataType;const x=z(i,t);h||r&&(t.isGeographic||t.isWebMercator)&&(h=x.xmin*x.xmax<0);let d,y=p;const b=1.001;if(h){y=m;const e=t.isGeographic?1341104507446289e-21:.29858214164761665,n=e*(96*u*39.37),r=t.isGeographic?4326:3857;d=w(new l["a"]({x:e,y:e,spatialReference:{wkid:r}}),s,x),d.x*=y/n,d.y*=y/n}else{d={x:a.x,y:a.y};const t=Math.ceil(Math.log(Math.min(e.width,e.height)/32)/Math.LN2);let n=0;for(;y=v;)y/=2,d.x/=2,d.y/=2,g.push(y),O.push({x:d.x,y:d.y});return{projectedPixelSize:c,scales:g,srcResolutions:O,isCustomTilingScheme:!h}}}}]); //# sourceMappingURL=chunk-f1516bda.7ad6921e.js.map