@arcgis/core 4.27.0-next.20230420 → 4.27.0-next.20230421
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WebMap.js +1 -1
- package/WebScene.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{f64f95623d9296a91f95.js → 059ec6fd9b971de4b4c1.js} +1 -1
- package/assets/esri/core/workers/chunks/{1fe31a412479815e5e2d.js → 10770939900946feb20d.js} +1 -1
- package/assets/esri/core/workers/chunks/{5252f3cc244204edc299.js → 1216e939d363f96b6cc6.js} +1 -1
- package/assets/esri/core/workers/chunks/156dad2b7fed6749bae7.js +1 -0
- package/assets/esri/core/workers/chunks/15a97d3e42b00ac42984.js +1 -0
- package/assets/esri/core/workers/chunks/{d72c0c97cc4e30f1e4f2.js → 18704903814b9d73c708.js} +1 -1
- package/assets/esri/core/workers/chunks/{852b4a6c0f3feb57cf54.js → 1db5e4c8244dbc21590c.js} +1 -1
- package/assets/esri/core/workers/chunks/{f0953e41d1653e66ba57.js → 2a1a5a1969e80a10dcca.js} +1 -1
- package/assets/esri/core/workers/chunks/33b735faa582e6f39e9a.js +1 -0
- package/assets/esri/core/workers/chunks/34025ac04ca02531923a.js +1 -0
- package/assets/esri/core/workers/chunks/3e9f3479fd8558d9e3e3.js +1 -0
- package/assets/esri/core/workers/chunks/{d59274ac695dfcff1143.js → 46090b69e9161bc05141.js} +1 -1
- package/assets/esri/core/workers/chunks/{1b647446a6a27798c5cf.js → 47bf38d910e71ac39bb8.js} +1 -1
- package/assets/esri/core/workers/chunks/{3978f4f68ada540ee3a3.js → 4f8a09b61267e5e26712.js} +1 -1
- package/assets/esri/core/workers/chunks/5183ecab7eddae7b70e8.js +1 -0
- package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js → 51a0d1dabe7415515c77.js} +2 -2
- package/assets/esri/core/workers/chunks/541e6efc3b491e507410.js +1 -0
- package/assets/esri/core/workers/chunks/5c64fd3bf057a1a5527f.js +1 -0
- package/assets/esri/core/workers/chunks/6047bdaf4855506f8fdb.js +1 -0
- package/assets/esri/core/workers/chunks/{b2358c2e27be7a5709cf.js → 6adb58f1bffc5d1c03bd.js} +1 -1
- package/assets/esri/core/workers/chunks/770940417e6ddbdbb9d6.js +1 -0
- package/assets/esri/core/workers/chunks/{1c1d8be85297c483a606.js → 77c98121223a144170e3.js} +1 -1
- package/assets/esri/core/workers/chunks/80117007d86be4eb3bc3.js +1 -0
- package/assets/esri/core/workers/chunks/838849b751805615833a.js +1 -0
- package/assets/esri/core/workers/chunks/{9ca395f7bc8d397b5240.js → 88197520501fcc20b6e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{89e8ba4fc325838bf1a9.js → 88f9dededcf60fd011ef.js} +1 -1
- package/assets/esri/core/workers/chunks/88fdd288ef799a7ac48a.js +1 -0
- package/assets/esri/core/workers/chunks/{f11ec68ceb7c973cde74.js → 8ae7fea9f7fda38dd207.js} +1 -1
- package/assets/esri/core/workers/chunks/{0d080dd1ca6a71597409.js → 9265d4e9cfab2c7bbce5.js} +1 -1
- package/assets/esri/core/workers/chunks/{8d41305509fedb3603ac.js → 94041a9ced04aa281d40.js} +1 -1
- package/assets/esri/core/workers/chunks/98540791fcef86069e44.js +1 -0
- package/assets/esri/core/workers/chunks/9c1b2f82877ff79969f5.js +1 -0
- package/assets/esri/core/workers/chunks/a7b3cd537c9127b5e65e.js +1 -0
- package/assets/esri/core/workers/chunks/{3d1c697182237807ab49.js → abea316f2eac0f3086ab.js} +1 -1
- package/assets/esri/core/workers/chunks/ad85ade6a2cfb56cf328.js +1 -0
- package/assets/esri/core/workers/chunks/{25862269952c1bda910f.js → b833b4ea2973bb16792e.js} +1 -1
- package/assets/esri/core/workers/chunks/{e50d1afdc878258c437e.js → be4aa835a7abfc809126.js} +1 -1
- package/assets/esri/core/workers/chunks/{4fed7c08b5f4de23bb75.js → c2ec6e904f96173a7b83.js} +1 -1
- package/assets/esri/core/workers/chunks/{c25aa08b869f2777dc26.js → c4488a8d857c765da30e.js} +1 -1
- package/assets/esri/core/workers/chunks/c5c56b6d99db96a6755a.js +2 -0
- package/assets/esri/core/workers/chunks/{b28883e2a13f360310b3.js → c727d38f71e52bee17e1.js} +1 -1
- package/assets/esri/core/workers/chunks/cf315d255f0dc8d50f21.js +1 -0
- package/assets/esri/core/workers/chunks/cf7676fdc09ad4835680.js +1 -0
- package/assets/esri/core/workers/chunks/cfad34c949cbe8a31ef8.js +1 -0
- package/assets/esri/core/workers/chunks/{a2c9cb23f3e35e88da1d.js → d399b1b9cbf0737d1735.js} +1 -1
- package/assets/esri/core/workers/chunks/{df7dcd035997881cf2ef.js → d5c8119d6d34628d3126.js} +1 -1
- package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +1 -0
- package/assets/esri/core/workers/chunks/{8dfa32cc8453f85faab0.js → dd1f8bade9c5c3b7929b.js} +1 -1
- package/assets/esri/core/workers/chunks/e11e60759821746259c6.js +1 -0
- package/assets/esri/core/workers/chunks/{e4b65c5a4575a5c1c49f.js → e356c576f9a7521a49b3.js} +1 -1
- package/assets/esri/core/workers/chunks/f02edf71645eb33bf92f.js +1 -0
- package/assets/esri/core/workers/chunks/{3dff550c29115dd625fa.js → f1a4165c2710ca90e5ea.js} +1 -1
- package/assets/esri/core/workers/chunks/f57a3ee17869ced3dd33.js +1 -0
- package/assets/esri/core/workers/chunks/fc07f6e103d7f69a9909.js +1 -0
- package/chunks/WaterSurface.glsl.js +35 -20
- package/chunks/index.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/Promise.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/watchUtils.js +1 -1
- package/core/workers/Connection.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/geometry/support/geodesicUtils.js +1 -1
- package/intl/messages.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/support/PromiseQueue.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/TileKey.js +1 -1
- package/layers/support/rasterFormats/TiffDecoder.js +1 -1
- package/networks/Network.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/request.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/styleUtils.js +1 -1
- package/symbols/support/symbolLayerUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/layers/support/webStyleUtils.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/layers/graphics/ElevationQuery.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/symbolComplexity.js +1 -1
- package/views/3d/layers/graphics/webStyleUtils.js +5 -0
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ViewAnimation.js +1 -1
- package/views/input/BrowserEventSource.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/support/QueueProcessor.js +1 -1
- package/views/ui/DefaultUI.js +1 -1
- package/views/ui/UI.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/deprecationUtils.js +1 -1
- package/widgets/Editor/modelUploadUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/Popup.js +1 -1
- package/assets/esri/core/workers/chunks/0cec1c16b25406858ae6.js +0 -1
- package/assets/esri/core/workers/chunks/27353056c3e4e8d8b8d3.js +0 -1
- package/assets/esri/core/workers/chunks/337d59d624ef8a89aae5.js +0 -1
- package/assets/esri/core/workers/chunks/4b6a903d4aeeb4eeb615.js +0 -1
- package/assets/esri/core/workers/chunks/4bf9bc8b52d618f395c5.js +0 -1
- package/assets/esri/core/workers/chunks/5ec4fedbbcbb0053cf74.js +0 -2
- package/assets/esri/core/workers/chunks/60e29d172a2dcf45e8d0.js +0 -1
- package/assets/esri/core/workers/chunks/68a15cc7c51645d31572.js +0 -1
- package/assets/esri/core/workers/chunks/778ecf61f07dafc51bbc.js +0 -1
- package/assets/esri/core/workers/chunks/7e67e071789c6d264280.js +0 -1
- package/assets/esri/core/workers/chunks/80d335bec34d60b7bbdc.js +0 -1
- package/assets/esri/core/workers/chunks/810da30f13151b72a293.js +0 -1
- package/assets/esri/core/workers/chunks/81485a5056aed94b3d8d.js +0 -1
- package/assets/esri/core/workers/chunks/8ebda132068f6b962dd9.js +0 -1
- package/assets/esri/core/workers/chunks/914a0c78c80aa897b1a1.js +0 -1
- package/assets/esri/core/workers/chunks/979ea2e3b1b164334634.js +0 -1
- package/assets/esri/core/workers/chunks/a0e92dd27c8f6b642dbf.js +0 -1
- package/assets/esri/core/workers/chunks/a6240bf258b3886a6661.js +0 -1
- package/assets/esri/core/workers/chunks/b1a8024bf8cdd0cd3884.js +0 -1
- package/assets/esri/core/workers/chunks/b366e0db9b5f27dd53a3.js +0 -1
- package/assets/esri/core/workers/chunks/c564055cb906857c8641.js +0 -1
- package/assets/esri/core/workers/chunks/c646dc9da08b509e39d6.js +0 -1
- package/assets/esri/core/workers/chunks/db5598944b691e43f13e.js +0 -1
- package/assets/esri/core/workers/chunks/eb163a2ddeb27c690308.js +0 -1
- package/assets/esri/core/workers/chunks/f05634909c9449533193.js +0 -1
- package/assets/esri/core/workers/chunks/fcebd70b089dea833c75.js +0 -1
- /package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js.LICENSE.txt → 51a0d1dabe7415515c77.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{5ec4fedbbcbb0053cf74.js.LICENSE.txt → c5c56b6d99db96a6755a.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6610],{97575:(e,t,r)=>{r.d(t,{J:()=>l});var n,o,i,s=r(5732),a={exports:{}};n=a,o=function(){var e=function(){function e(e){this.message="JPEG error: "+e}return e.prototype=new Error,e.prototype.name="JpegError",e.constructor=e,e}();return function(){if(!self||!self.Uint8ClampedArray)return null;var t=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]),r=4017,n=799,o=3406,i=2276,s=1567,a=3784,l=5793,u=2896;function c(){this.decodeTransform=null,this.colorTransform=-1}function h(e,t){for(var r,n,o=0,i=[],s=16;s>0&&!e[s-1];)s--;i.push({children:[],index:0});var a,l=i[0];for(r=0;r<s;r++){for(n=0;n<e[r];n++){for((l=i.pop()).children[l.index]=t[o];l.index>0;)l=i.pop();for(l.index++,i.push(l);i.length<=r;)i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a;o++}r+1<s&&(i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a)}return i[0].children}function f(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function d(r,n,o,i,s,a,l,u,c){var h=o.mcusPerLine,d=o.progressive,p=n,g=0,y=0;function w(){if(y>0)return y--,g>>y&1;if(255===(g=r[n++])){var t=r[n++];if(t)throw new e("unexpected marker "+(g<<8|t).toString(16))}return y=7,g>>>7}function C(t){for(var r=t;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new e("invalid huffman sequence")}}function b(e){for(var t=0;e>0;)t=t<<1|w(),e--;return t}function v(e){if(1===e)return 1===w()?1:-1;var t=b(e);return t>=1<<e-1?t:t+(-1<<e)+1}var x,k=0,T=0;function A(e,t,r,n,o){var i=r%h;t(e,f(e,(r/h|0)*e.v+n,i*e.h+o))}function S(e,t,r){t(e,f(e,r/e.blocksPerLine|0,r%e.blocksPerLine))}var I,M,P,D,E,R,_=i.length;R=d?0===a?0===u?function(e,t){var r=C(e.huffmanTableDC),n=0===r?0:v(r)<<c;e.blockData[t]=e.pred+=n}:function(e,t){e.blockData[t]|=w()<<c}:0===u?function(e,r){if(k>0)k--;else for(var n=a,o=l;n<=o;){var i=C(e.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var h=t[n+=u];e.blockData[r+h]=v(s)*(1<<c),n++}else{if(u<15){k=b(u)+(1<<u)-1;break}n+=16}}}:function(r,n){for(var o,i,s=a,u=l,h=0;s<=u;){var f=t[s];switch(T){case 0:if(h=(i=C(r.huffmanTableAC))>>4,0==(o=15&i))h<15?(k=b(h)+(1<<h),T=4):(h=16,T=1);else{if(1!==o)throw new e("invalid ACn encoding");x=v(o),T=h?2:3}continue;case 1:case 2:r.blockData[n+f]?r.blockData[n+f]+=w()<<c:0==--h&&(T=2===T?3:0);break;case 3:r.blockData[n+f]?r.blockData[n+f]+=w()<<c:(r.blockData[n+f]=x<<c,T=0);break;case 4:r.blockData[n+f]&&(r.blockData[n+f]+=w()<<c)}s++}4===T&&0==--k&&(T=0)}:function(e,r){var n=C(e.huffmanTableDC),o=0===n?0:v(n);e.blockData[r]=e.pred+=o;for(var i=1;i<64;){var s=C(e.huffmanTableAC),a=15&s,l=s>>4;if(0!==a){var u=t[i+=l];e.blockData[r+u]=v(a),i++}else{if(l<15)break;i+=16}}};var L,B,U,G,O=0;for(B=1===_?i[0].blocksPerLine*i[0].blocksPerColumn:h*o.mcusPerColumn;O<B;){var N=s?Math.min(B-O,s):B;for(M=0;M<_;M++)i[M].pred=0;if(k=0,1===_)for(I=i[0],E=0;E<N;E++)S(I,R,O),O++;else for(E=0;E<N;E++){for(M=0;M<_;M++)for(U=(I=i[M]).h,G=I.v,P=0;P<G;P++)for(D=0;D<U;D++)A(I,R,O,P,D);O++}y=0,(L=m(r,n))&&L.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+L.invalid),n=L.offset);var F=L&&L.marker;if(!F||F<=65280)throw new e("marker was not found");if(!(F>=65488&&F<=65495))break;n+=2}return(L=m(r,n))&&L.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+L.invalid),n=L.offset),n-p}function p(t,c,h){var f,d,p,g,m,y,w,C,b,v,x,k,T,A,S,I,M,P=t.quantizationTable,D=t.blockData;if(!P)throw new e("missing required Quantization Table.");for(var E=0;E<64;E+=8)b=D[c+E],v=D[c+E+1],x=D[c+E+2],k=D[c+E+3],T=D[c+E+4],A=D[c+E+5],S=D[c+E+6],I=D[c+E+7],b*=P[E],0!=(v|x|k|T|A|S|I)?(v*=P[E+1],x*=P[E+2],k*=P[E+3],T*=P[E+4],A*=P[E+5],S*=P[E+6],I*=P[E+7],d=(f=(f=l*b+128>>8)+(d=l*T+128>>8)+1>>1)-d,M=(p=x)*a+(g=S)*s+128>>8,p=p*s-g*a+128>>8,w=(m=(m=u*(v-I)+128>>8)+(w=A<<4)+1>>1)-w,y=(C=(C=u*(v+I)+128>>8)+(y=k<<4)+1>>1)-y,g=(f=f+(g=M)+1>>1)-g,p=(d=d+p+1>>1)-p,M=m*i+C*o+2048>>12,m=m*o-C*i+2048>>12,C=M,M=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,w=M,h[E]=f+C,h[E+7]=f-C,h[E+1]=d+w,h[E+6]=d-w,h[E+2]=p+y,h[E+5]=p-y,h[E+3]=g+m,h[E+4]=g-m):(M=l*b+512>>10,h[E]=M,h[E+1]=M,h[E+2]=M,h[E+3]=M,h[E+4]=M,h[E+5]=M,h[E+6]=M,h[E+7]=M);for(var R=0;R<8;++R)b=h[R],0!=((v=h[R+8])|(x=h[R+16])|(k=h[R+24])|(T=h[R+32])|(A=h[R+40])|(S=h[R+48])|(I=h[R+56]))?(d=(f=4112+((f=l*b+2048>>12)+(d=l*T+2048>>12)+1>>1))-d,M=(p=x)*a+(g=S)*s+2048>>12,p=p*s-g*a+2048>>12,g=M,w=(m=(m=u*(v-I)+2048>>12)+(w=A)+1>>1)-w,y=(C=(C=u*(v+I)+2048>>12)+(y=k)+1>>1)-y,M=m*i+C*o+2048>>12,m=m*o-C*i+2048>>12,C=M,M=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,b=(b=(f=f+g+1>>1)+C)<16?0:b>=4080?255:b>>4,v=(v=(d=d+p+1>>1)+(w=M))<16?0:v>=4080?255:v>>4,x=(x=(p=d-p)+y)<16?0:x>=4080?255:x>>4,k=(k=(g=f-g)+m)<16?0:k>=4080?255:k>>4,T=(T=g-m)<16?0:T>=4080?255:T>>4,A=(A=p-y)<16?0:A>=4080?255:A>>4,S=(S=d-w)<16?0:S>=4080?255:S>>4,I=(I=f-C)<16?0:I>=4080?255:I>>4,D[c+R]=b,D[c+R+8]=v,D[c+R+16]=x,D[c+R+24]=k,D[c+R+32]=T,D[c+R+40]=A,D[c+R+48]=S,D[c+R+56]=I):(M=(M=l*b+8192>>14)<-2040?0:M>=2024?255:M+2056>>4,D[c+R]=M,D[c+R+8]=M,D[c+R+16]=M,D[c+R+24]=M,D[c+R+32]=M,D[c+R+40]=M,D[c+R+48]=M,D[c+R+56]=M)}function g(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,o=new Int16Array(64),i=0;i<n;i++)for(var s=0;s<r;s++)p(t,f(t,i,s),o);return t.blockData}function m(e,t,r){function n(t){return e[t]<<8|e[t+1]}var o=e.length-1,i=r<t?r:t;if(t>=o)return null;var s=n(t);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:t};for(var a=n(i);!(a>=65472&&a<=65534);){if(++i>=o)return null;a=n(i)}return{invalid:s.toString(16),marker:a,offset:i}}return c.prototype={parse:function(r){function n(){var e=r[l]<<8|r[l+1];return l+=2,e}function o(){var e=n(),t=l+e-2,o=m(r,t,l);o&&o.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+o.invalid),t=o.offset);var i=r.subarray(l,t);return l+=i.length,i}function i(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n<e.components.length;n++){O=e.components[n];var o=Math.ceil(Math.ceil(e.samplesPerLine/8)*O.h/e.maxH),i=Math.ceil(Math.ceil(e.scanLines/8)*O.v/e.maxV),s=t*O.h,a=r*O.v*64*(s+1);O.blockData=new Int16Array(a),O.blocksPerLine=o,O.blocksPerColumn=i}e.mcusPerLine=t,e.mcusPerColumn=r}var s,a,l=0,u=null,c=null,f=[],p=[],y=[],w=n();if(65496!==w)throw new e("SOI not found");for(w=n();65497!==w;){var C,b,v;switch(w){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 x=o();65504===w&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(u={version:{major:x[5],minor:x[6]},densityUnits:x[7],xDensity:x[8]<<8|x[9],yDensity:x[10]<<8|x[11],thumbWidth:x[12],thumbHeight:x[13],thumbData:x.subarray(14,14+3*x[12]*x[13])}),65518===w&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&(c={version:x[5]<<8|x[6],flags0:x[7]<<8|x[8],flags1:x[9]<<8|x[10],transformCode:x[11]});break;case 65499:for(var k=n()+l-2;l<k;){var T=r[l++],A=new Uint16Array(64);if(T>>4==0)for(b=0;b<64;b++)A[t[b]]=r[l++];else{if(T>>4!=1)throw new e("DQT - invalid table spec");for(b=0;b<64;b++)A[t[b]]=n()}f[15&T]=A}break;case 65472:case 65473:case 65474:if(s)throw new e("Only single frame JPEGs supported");n(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=n(),s.samplesPerLine=n(),s.components=[],s.componentIds={};var S,I=r[l++],M=0,P=0;for(C=0;C<I;C++){S=r[l];var D=r[l+1]>>4,E=15&r[l+1];M<D&&(M=D),P<E&&(P=E);var R=r[l+2];v=s.components.push({h:D,v:E,quantizationId:R,quantizationTable:null}),s.componentIds[S]=v-1,l+=3}s.maxH=M,s.maxV=P,i(s);break;case 65476:var _=n();for(C=2;C<_;){var L=r[l++],B=new Uint8Array(16),U=0;for(b=0;b<16;b++,l++)U+=B[b]=r[l];var G=new Uint8Array(U);for(b=0;b<U;b++,l++)G[b]=r[l];C+=17+U,(L>>4==0?y:p)[15&L]=h(B,G)}break;case 65501:n(),a=n();break;case 65498:n();var O,N=r[l++],F=[];for(C=0;C<N;C++){var V=s.componentIds[r[l++]];O=s.components[V];var z=r[l++];O.huffmanTableDC=y[z>>4],O.huffmanTableAC=p[15&z],F.push(O)}var j=r[l++],Z=r[l++],W=r[l++],J=d(r,l,s,F,a,j,Z,W>>4,15&W);l+=J;break;case 65535:255!==r[l]&&l--;break;default:if(255===r[l-3]&&r[l-2]>=192&&r[l-2]<=254){l-=3;break}throw new e("unknown marker "+w.toString(16))}w=n()}for(this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=u,this.eof=l,this.adobe=c,this.components=[],C=0;C<s.components.length;C++){var H=f[(O=s.components[C]).quantizationId];H&&(O.quantizationTable=H),this.components.push({output:g(0,O),scaleX:O.h/s.maxH,scaleY:O.v/s.maxV,blocksPerLine:O.blocksPerLine,blocksPerColumn:O.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(e,t){var r,n,o,i,s,a,l,u,c,h,f,d=this.width/e,p=this.height/t,g=0,m=this.components.length,y=e*t*m,w=new Uint8ClampedArray(y),C=new Uint32Array(e),b=4294967288;for(l=0;l<m;l++){for(n=(r=this.components[l]).scaleX*d,o=r.scaleY*p,g=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<e;s++)u=0|s*n,C[s]=(u&b)<<3|7&u;for(a=0;a<t;a++)for(h=i*((u=0|a*o)&b)|(7&u)<<3,s=0;s<e;s++)w[g]=f[h+C[s]],g+=m}var v=this.decodeTransform;if(v)for(l=0;l<y;)for(u=0,c=0;u<m;u++,l++,c+=2)w[l]=(w[l]*v[c]>>8)+v[c+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(e){for(var t,r,n,o=0,i=e.length;o<i;o+=3)t=e[o],r=e[o+1],n=e[o+2],e[o]=t-179.456+1.402*n,e[o+1]=t+135.459-.344*r-.714*n,e[o+2]=t-226.816+1.772*r;return e},_convertYcckToRgb:function(e){for(var t,r,n,o,i=0,s=0,a=e.length;s<a;s+=4)t=e[s],r=e[s+1],n=e[s+2],o=e[s+3],e[i++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*o-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*o+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*o+.48357088451265)+o*(-.000336197177618394*o+.484791561490776),e[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*o-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*o-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*o+.25802910206845)+o*(-.000318913117588328*o-.213742400323665),e[i++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*o+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*o-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*o+.116935020465145)+o*(-.000343531996510555*o+.24165260232407);return e},_convertYcckToCmyk:function(e){for(var t,r,n,o=0,i=e.length;o<i;o+=4)t=e[o],r=e[o+1],n=e[o+2],e[o]=434.456-t-1.402*n,e[o+1]=119.541-t+.344*r+.714*n,e[o+2]=481.816-t-1.772*r;return e},_convertCmykToRgb:function(e){for(var t,r,n,o,i=0,s=1/255,a=0,l=e.length;a<l;a+=4)t=e[a]*s,r=e[a+1]*s,n=e[a+2]*s,o=e[a+3]*s,e[i++]=255+t*(-4.387332384609988*t+54.48615194189176*r+18.82290502165302*n+212.25662451639585*o-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*n-17.873870861415444*o-5.497006427196366)+n*(-2.5217340131683033*n-21.248923337353073*o+17.5119270841813)-o*(21.86122147463605*o+189.48180835922747),e[i++]=255+t*(8.841041422036149*t+60.118027045597366*r+6.871425592049007*n+31.159100130055922*o-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*n+131.35250912493976*o-190.9453302588951)+n*(4.444339102852739*n+9.8632861493405*o-24.86741582555878)-o*(20.737325471181034*o+187.80453709719578),e[i++]=255+t*(.8842522430003296*t+8.078677503112928*r+30.89978309703729*n-.23883238689178934*o-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*n+50.606957656360734*o-112.23884253719248)+n*(.03296041114873217*n+115.60384449646641*o-193.58209356861505)-o*(22.33816807309886*o+180.12613974708367);return e},getData:function(t,r,n){if(this.numComponents>4)throw new e("Unsupported color mode");var o=this._getLinearizedBlockData(t,r);if(1===this.numComponents&&n){for(var i=o.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=o[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(o);if(4===this.numComponents){if(this._isColorConversionNeeded())return n?this._convertYcckToRgb(o):this._convertYcckToCmyk(o);if(n)return this._convertCmykToRgb(o)}return o}},c}()},void 0!==(i=o())&&(n.exports=i);const l=(0,s.g)(a.exports)},80899:(e,t,r)=>{r.d(t,{Z:()=>l});var n,o,i,s=r(5732),a={exports:{}};o=a,void 0!==(n=function(){function e(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return e.prototype={ensureBuffer:function(e){var t=this.buffer,r=t?t.byteLength:0;if(e<r)return t;for(var n=512;n<e;)n<<=1;for(var o=new Uint8Array(n),i=0;i<r;++i)o[i]=t[i];return this.buffer=o},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 t=this.pos;if(e){this.ensureBuffer(t+e);for(var r=t+e;!this.eof&&this.bufferLength<r;)this.readBlock();var n=this.bufferLength;r>n&&(r=n)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(t,r)},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,t,r){for(var n=e+t;this.bufferLength<=n&&!this.eof;)this.readBlock();return new Stream(this.buffer,e,t,r)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0}},e}(),i=function(){if(!self||!self.Uint32Array)return null;var e=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]),r=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]),o=[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],i=[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 s(e){throw new Error(e)}function a(e){var t=0,r=e[t++],o=e[t++];-1!=r&&-1!=o||s("Invalid header in flate stream"),8!=(15&r)&&s("Unknown compression method in flate stream"),((r<<8)+o)%31!=0&&s("Bad FCHECK in flate stream"),32&o&&s("FDICT bit set in flate stream"),this.bytes=e,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,n.call(this)}return a.prototype=Object.create(n.prototype),a.prototype.getBits=function(e){for(var t,r=this.codeSize,n=this.codeBuf,o=this.bytes,i=this.bytesPos;r<e;)void 0===(t=o[i++])&&s("Bad encoding in flate stream"),n|=t<<r,r+=8;return t=n&(1<<e)-1,this.codeBuf=n>>e,this.codeSize=r-=e,this.bytesPos=i,t},a.prototype.getCode=function(e){for(var t=e[0],r=e[1],n=this.codeSize,o=this.codeBuf,i=this.bytes,a=this.bytesPos;n<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),o|=l<<n,n+=8}var u=t[o&(1<<r)-1],c=u>>16,h=65535&u;return(0==n||n<c||0==c)&&s("Bad encoding in flate stream"),this.codeBuf=o>>c,this.codeSize=n-c,this.bytesPos=a,h},a.prototype.generateHuffmanTable=function(e){for(var t=e.length,r=0,n=0;n<t;++n)e[n]>r&&(r=e[n]);for(var o=1<<r,i=new Uint32Array(o),s=1,a=0,l=2;s<=r;++s,a<<=1,l<<=1)for(var u=0;u<t;++u)if(e[u]==s){var c=0,h=a;for(n=0;n<s;++n)c=c<<1|1&h,h>>=1;for(n=c;n<o;n+=l)i[n]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function n(e,t,r,n,o){for(var i=e.getBits(r)+n;i-- >0;)t[p++]=o}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=o,u=i;else if(2==a){for(var c=this.getBits(5)+257,h=this.getBits(5)+1,f=this.getBits(4)+4,d=Array(e.length),p=0;p<f;)d[e[p++]]=this.getBits(3);for(var g=this.generateHuffmanTable(d),m=0,y=(p=0,c+h),w=new Array(y);p<y;){var C=this.getCode(g);16==C?n(this,w,2,3,m):17==C?n(this,w,3,3,m=0):18==C?n(this,w,7,11,m=0):w[p++]=m=C}l=this.generateHuffmanTable(w.slice(0,c)),u=this.generateHuffmanTable(w.slice(c,y))}else s("Unknown block type in flate stream");for(var b=(R=this.buffer)?R.length:0,v=this.bufferLength;;){var x=this.getCode(l);if(x<256)v+1>=b&&(b=(R=this.ensureBuffer(v+1)).length),R[v++]=x;else{if(256==x)return void(this.bufferLength=v);var k=(x=t[x-=257])>>16;k>0&&(k=this.getBits(k)),m=(65535&x)+k,x=this.getCode(u),(k=(x=r[x])>>16)>0&&(k=this.getBits(k));var T=(65535&x)+k;v+m>=b&&(b=(R=this.ensureBuffer(v+m)).length);for(var A=0;A<m;++A,++v)R[v]=R[v-T]}}}else{var S,I=this.bytes,M=this.bytesPos;void 0===(S=I[M++])&&s("Bad block header in flate stream");var P=S;void 0===(S=I[M++])&&s("Bad block header in flate stream"),P|=S<<8,void 0===(S=I[M++])&&s("Bad block header in flate stream");var D=S;void 0===(S=I[M++])&&s("Bad block header in flate stream"),(D|=S<<8)!=(65535&~P)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var E=this.bufferLength,R=this.ensureBuffer(E+P),_=E+P;this.bufferLength=_;for(var L=E;L<_;++L){if(void 0===(S=I[M++])){this.eof=!0;break}R[L]=S}this.bytesPos=M}},a}())&&(o.exports=i);const l=(0,s.g)(a.exports)},3892:(e,t,r)=>{function n(e){return"h"in e&&"s"in e&&"v"in e}function o(e){return"l"in e&&"a"in e&&"b"in e}function i(e){return"l"in e&&"c"in e&&"h"in e}r.d(t,{Y3:()=>g,_Y:()=>p,sJ:()=>m,xr:()=>d});const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],a=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(e,t){const r=[];let n,o;if(e[0].length!==t.length)throw new Error("dimensions do not match");const i=e.length,s=e[0].length;let a=0;for(n=0;n<i;n++){for(a=0,o=0;o<s;o++)a+=e[n][o]*t[o];r.push(a)}return r}function u(e){const t=[e.r/255,e.g/255,e.b/255].map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),r=l(s,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function c(e){const t=l(a,[e.x/100,e.y/100,e.z/100]).map((e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))}));return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function h(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map((e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function f(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map((e=>e>6/29?e**3:3*(6/29)**2*(e-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function d(e){return"r"in(t=e)&&"g"in t&&"b"in t?e:i(e)?function(e){return c(f(function(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):o(e)?function(e){return c(f(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?c(e):n(e)?function(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,o=n*r,i=o*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:o,g:i,b:0};break;case 1:s={r:i,g:o,b:0};break;case 2:s={r:0,g:o,b:i};break;case 3:s={r:0,g:i,b:o};break;case 4:s={r:i,g:0,b:o};break;case 5:case 6:s={r:o,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-o),s.g=Math.round(s.g+n-o),s.b=Math.round(s.b+n-o),s}(e):e;var t}function p(e){return n(e)?e:function(e){const t=e.r,r=e.g,n=e.b,o=Math.max(t,r,n),i=o-Math.min(t,r,n);let s=o,a=0===i?0:o===t?(r-n)/i%6:o===r?(n-t)/i+2:(t-r)/i+4,l=0===i?0:i/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(d(e))}function g(e){return o(e)?e:function(e){return h(u(e))}(d(e))}function m(e){return i(e)?e:function(e){return function(e){const t=e.l,r=e.a,n=e.b,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r);return i=i>0?i:i+2*Math.PI,{l:t,c:o,h:i}}(h(u(e)))}(d(e))}},5847:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(43697),o=r(20102),i=r(96674),s=r(22974),a=r(92604),l=r(5600),u=r(90578),c=r(52011);class h{constructor(e=null,t=null,r=null){this.minValue=e,this.maxValue=t,this.noDataValue=r}}var f,d=r(81578);let p=f=class extends i.wq{static createEmptyBand(e,t){return new(f.getPixelArrayConstructor(e))(t)}static getPixelArrayConstructor(e){let t;switch(e){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":t=Float32Array;break;case"f64":t=Float64Array}return t}constructor(e){super(e),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(e){if(!e)return"f32";let t=e.toLowerCase();return["u1","u2","u4"].includes(t)?t="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(t)||(t="f32"),t}getPlaneCount(){return this.pixels?.length}addData(e){if(!e.pixels||e.pixels.length!==this.width*this.height)throw new o.Z("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||(this.pixels=[]),this.statistics||(this.statistics=[]),this.pixels.push(e.pixels),this.statistics.push(e.statistics??new h)}getAsRGBA(){const e=new ArrayBuffer(this.width*this.height*4);switch(this.pixelType){case"s8":case"s16":case"u16":case"s32":case"u32":case"f32":case"f64":this._fillFromNon8Bit(e);break;default:this._fillFrom8Bit(e)}return new Uint8ClampedArray(e)}getAsRGBAFloat(){const e=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(e),e}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map((e=>this._calculateBandStatistics(e,this.mask)));const e=this.mask;let t=0;if(null!=e)for(let r=0;r<e.length;r++)e[r]&&t++;else t=this.width*this.height;this.validPixelCount=t}clamp(e){if(!e||"f64"===e||"f32"===e||!this.pixels)return;const[t,r]=(0,d.r)(e),n=this.pixels,o=this.width*this.height,i=n.length;let s,a,l;const u=[];for(let c=0;c<i;c++){l=f.createEmptyBand(e,o),s=n[c];for(let e=0;e<o;e++)a=s[e],l[e]=a>r?r:a<t?t:a;u.push(l)}this.pixels=u,this.pixelType=e}extractBands(e){const{pixels:t,statistics:r}=this;if(null==e||0===e.length||!t||0===t.length)return this;const n=t.length,o=e.some((e=>e>=t.length)),i=n===e.length&&!e.some(((e,t)=>e!==t));if(o||i)return this;const s=this.bandMasks?.length===n?e.map((e=>this.bandMasks[e])):void 0;let{mask:a,validPixelCount:l}=this;const{width:u,height:c}=this;if(s){if(1===s.length)a=s[0];else{const e=u*c;a=new Uint8Array(e).fill(255);for(let t=0;t<s.length;t++){const r=s[t];for(let t=0;t<e;t++)r[t]||(a[t]=0)}}l=a.filter((e=>!!e)).length}return new f({pixelType:this.pixelType,width:u,height:c,mask:a,bandMasks:s,validPixelCount:l,maskIsAlpha:this.maskIsAlpha,pixels:e.map((e=>t[e])),statistics:r&&e.map((e=>r[e]))})}clone(){const e=new f({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let t;null!=this.mask&&(this.mask instanceof Uint8Array?e.mask=new Uint8Array(this.mask):e.mask=this.mask.slice(0));const r=f.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){e.pixels=[];const n=!!this.pixels[0].slice;for(t=0;t<this.pixels.length;t++)e.pixels[t]=n?this.pixels[t].slice(0,this.pixels[t].length):new r(this.pixels[t])}if(this.statistics)for(e.statistics=[],t=0;t<this.statistics.length;t++)e.statistics[t]=(0,s.d9)(this.statistics[t]);return e.premultiplyAlpha=this.premultiplyAlpha,e}_fillFrom8Bit(e){const{mask:t,maskIsAlpha:r,premultiplyAlpha:n,pixels:o}=this;if(!e||!o||!o.length)return void a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i,s,l,u;i=s=l=o[0],o.length>=3?(s=o[1],l=o[2]):2===o.length&&(s=o[1]);const c=new Uint32Array(e),h=this.width*this.height;if(i.length===h)if(null!=t&&t.length===h)if(r)for(u=0;u<h;u++){const e=t[u];if(e){const t=e/255;c[u]=n?e<<24|l[u]*t<<16|s[u]*t<<8|i[u]*t:e<<24|l[u]<<16|s[u]<<8|i[u]}}else for(u=0;u<h;u++)t[u]&&(c[u]=255<<24|l[u]<<16|s[u]<<8|i[u]);else for(u=0;u<h;u++)c[u]=255<<24|l[u]<<16|s[u]<<8|i[u];else a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(e){const{pixels:t,mask:r,statistics:n}=this;if(!e||!t||!t.length)return void a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const o=this.pixelType;let i=1,s=0,l=1;if(n&&n.length>0){for(const e of n)if(null!=e.minValue&&(s=Math.min(s,e.minValue)),null!=e.maxValue&&null!=e.minValue){const t=e.maxValue-e.minValue;l=Math.max(l,t)}i=255/l}else{let e=255;"s8"===o?(s=-128,e=127):"u16"===o?e=65535:"s16"===o?(s=-32768,e=32767):"u32"===o?e=4294967295:"s32"===o?(s=-2147483648,e=2147483647):"f32"===o?(s=-34e38,e=34e38):"f64"===o&&(s=-Number.MAX_VALUE,e=Number.MAX_VALUE),i=255/(e-s)}const u=new Uint32Array(e),c=this.width*this.height;let h,f,d,p,g;if(h=f=d=t[0],h.length!==c)return a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(t.length>=2)if(f=t[1],t.length>=3&&(d=t[2]),null!=r&&r.length===c)for(p=0;p<c;p++)r[p]&&(u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i);else for(p=0;p<c;p++)u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i;else if(null!=r&&r.length===c)for(p=0;p<c;p++)g=(h[p]-s)*i,r[p]&&(u[p]=255<<24|g<<16|g<<8|g);else for(p=0;p<c;p++)g=(h[p]-s)*i,u[p]=255<<24|g<<16|g<<8|g}_fillFrom32Bit(e){const{pixels:t,mask:r}=this;if(!e||!t||!t.length)return a.Z.getLogger(this.declaredClass).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let n,o,i,s;n=o=i=t[0],t.length>=3?(o=t[1],i=t[2]):2===t.length&&(o=t[1]);const l=this.width*this.height;if(n.length!==l)return a.Z.getLogger(this.declaredClass).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let u=0;if(null!=r&&r.length===l)for(s=0;s<l;s++)e[u++]=n[s],e[u++]=o[s],e[u++]=i[s],e[u++]=1&r[s];else for(s=0;s<l;s++)e[u++]=n[s],e[u++]=o[s],e[u++]=i[s],e[u++]=1}_calculateBandStatistics(e,t){let r=1/0,n=-1/0;const o=e.length;let i,s=0;if(null!=t)for(i=0;i<o;i++)t[i]&&(s=e[i],r=s<r?s:r,n=s>n?s:n);else for(i=0;i<o;i++)s=e[i],r=s<r?s:r,n=s>n?s:n;return new h(r,n)}};(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"width",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"height",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixelType",void 0),(0,n._)([(0,u.p)("pixelType")],p.prototype,"castPixelType",null),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"validPixelCount",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"mask",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"maskIsAlpha",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixels",void 0),(0,n._)([(0,l.Cb)()],p.prototype,"premultiplyAlpha",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"statistics",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"depthCount",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"noDataValues",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"bandMasks",void 0),p=f=(0,n._)([(0,c.j)("esri.layers.support.PixelBlock")],p);const g=p},25972:(e,t,r)=>{r.d(t,{Z:()=>k});var n,o=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(6570),c=r(82971);function h(e){return e=Number(e),isNaN(e)?void 0:e}r(67676),r(80442);let f=n=class extends i.wq{constructor(){super(...arguments),this.name=null,this.minWavelength=void 0,this.maxWavelength=void 0,this.radianceBias=void 0,this.radianceGain=void 0,this.reflectanceBias=void 0,this.reflectanceGain=void 0,this.solarIrradiance=void 0}clone(){return new n({name:this.name,minWavelength:this.minWavelength,maxWavelength:this.maxWavelength,radianceBias:this.radianceBias,radianceGain:this.radianceGain,reflectanceBias:this.reflectanceBias,reflectanceGain:this.reflectanceGain,solarIrradiance:this.solarIrradiance})}};(0,o._)([(0,a.Cb)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,o._)([(0,a.Cb)({json:{name:"WavelengthMin",read:{reader:h},write:!0}})],f.prototype,"minWavelength",void 0),(0,o._)([(0,a.Cb)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,o._)([(0,a.Cb)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,o._)([(0,a.Cb)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,o._)([(0,a.Cb)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,o._)([(0,a.Cb)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,o._)([(0,a.Cb)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=n=(0,o._)([(0,l.j)("esri.layers.support.RasterBandInfo")],f);const d=f;var p,g=r(71715),m=r(30556);function y(e){return e=Number(e),isNaN(e)?void 0:e}let w=p=class extends i.wq{constructor(){super(...arguments),this.acquisitionDate=void 0,this.cloudCover=void 0,this.productName=void 0,this.sensorName=null,this.sensorAzimuth=void 0,this.sensorElevation=void 0,this.sunAzimuth=void 0,this.sunElevation=void 0}readAcquisitionDate(e){return new Date(e)}writeAcquisitionDate(e,t){t.AcquisitionDate=e.getTime()}clone(){return new p({acquisitionDate:this.acquisitionDate,cloudCover:this.cloudCover,productName:this.productName,sensorName:this.sensorName,sensorAzimuth:this.sensorAzimuth,sensorElevation:this.sensorElevation,sunAzimuth:this.sunAzimuth,sunElevation:this.sunElevation})}};(0,o._)([(0,a.Cb)({json:{name:"AcquisitionDate",write:!0}})],w.prototype,"acquisitionDate",void 0),(0,o._)([(0,g.r)("acquisitionDate")],w.prototype,"readAcquisitionDate",null),(0,o._)([(0,m.c)("acquisitionDate")],w.prototype,"writeAcquisitionDate",null),(0,o._)([(0,a.Cb)({json:{name:"CloudCover",read:{reader:y},write:!0}})],w.prototype,"cloudCover",void 0),(0,o._)([(0,a.Cb)({json:{name:"ProductName",write:!0}})],w.prototype,"productName",void 0),(0,o._)([(0,a.Cb)({json:{name:"SensorName",write:!0}})],w.prototype,"sensorName",void 0),(0,o._)([(0,a.Cb)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],w.prototype,"sensorAzimuth",void 0),(0,o._)([(0,a.Cb)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],w.prototype,"sensorElevation",void 0),(0,o._)([(0,a.Cb)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],w.prototype,"sunAzimuth",void 0),(0,o._)([(0,a.Cb)({json:{name:"SunElevation",read:{reader:y},write:!0}})],w.prototype,"sunElevation",void 0),w=p=(0,o._)([(0,l.j)("esri.layers.support.RasterSensorInfo")],w);const C=w;var b,v=r(36679);let x=b=class extends i.wq{constructor(e){super(e),this.attributeTable=null,this.bandCount=null,this.colormap=null,this.extent=null,this.format=void 0,this.height=null,this.width=null,this.histograms=null,this.keyProperties={},this.multidimensionalInfo=null,this.noDataValue=null,this.pixelSize=null,this.pixelType=null,this.isPseudoSpatialReference=!1,this.spatialReference=null,this.statistics=null,this.storageInfo=null,this.transform=null}get bandInfos(){const e=this.keyProperties.BandProperties;if(!e?.length){const e=[];for(let t=1;t<=this.bandCount;t++)e.push(new d({name:"band_"+t}));return e}const t=e.map((e=>d.fromJSON(e)));for(let e=0;e<t.length;e++)t[e].name=t[e].name??"band_"+(e+1);return t}get dataType(){const e=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===e?"standard-time":e}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(e){e&&this._set("nativeExtent",e)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;const e=this.nativeExtent;return{x:e.width/this.width,y:e.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}get sensorInfo(){if(this.keyProperties?.SensorName)return C.fromJSON(this.keyProperties)}clone(){return new b({attributeTable:(0,s.d9)(this.attributeTable),bandCount:this.bandCount,colormap:(0,s.d9)(this.colormap),extent:(0,s.d9)(this.extent),nativePixelSize:(0,s.d9)(this.nativePixelSize),format:this.format,height:this.height,width:this.width,histograms:(0,s.d9)(this.histograms),keyProperties:(0,s.d9)(this.keyProperties),multidimensionalInfo:(0,s.d9)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,s.d9)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,s.d9)(this.spatialReference),statistics:(0,s.d9)(this.statistics),storageInfo:(0,s.d9)(this.storageInfo),transform:(0,s.d9)(this.transform)})}};(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"attributeTable",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"bandCount",void 0),(0,o._)([(0,a.Cb)({readOnly:!0})],x.prototype,"bandInfos",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"colormap",void 0),(0,o._)([(0,a.Cb)({type:String,readOnly:!0})],x.prototype,"dataType",null),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],x.prototype,"extent",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],x.prototype,"nativeExtent",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"nativePixelSize",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"format",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"height",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"width",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"hasMultidimensionalTranspose",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"histograms",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"keyProperties",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"multidimensionalInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"noDataValue",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"pixelSize",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"pixelType",void 0),(0,o._)([(0,a.Cb)()],x.prototype,"isPseudoSpatialReference",void 0),(0,o._)([(0,a.Cb)({readOnly:!0})],x.prototype,"sensorInfo",null),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"statistics",void 0),(0,o._)([(0,a.Cb)({type:v.Z,json:{write:!0}})],x.prototype,"storageInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"transform",void 0),x=b=(0,o._)([(0,l.j)("esri.layers.support.RasterInfo")],x);const k=x},36679:(e,t,r)=>{r.d(t,{Z:()=>h});var n,o=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(94139);let c=n=class extends i.wq{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}clone(){return new n({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.d9)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.d9)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.d9)(this.tileInfo),transposeInfo:(0,s.d9)(this.transposeInfo),blockBoundary:(0,s.d9)(this.blockBoundary)})}};(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],c.prototype,"origin",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,o._)([(0,a.Cb)()],c.prototype,"transposeInfo",void 0),(0,o._)([(0,a.Cb)()],c.prototype,"blockBoundary",void 0),c=n=(0,o._)([(0,l.j)("esri.layers.support.RasterStorageInfo")],c);const h=c},20095:(e,t,r)=>{function n(e,t){let r=0,n="",o=0,i=0;const s=e.length;for(;r<s;)i=e[r++],o=i>>4,o<8?o=1:15===o?(o=4,i=(7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++]):14===o?(o=3,i=(15&i)<<12|(63&e[r++])<<6|63&e[r++]):(o=2,i=(31&i)<<6|63&e[r++]),(0!==i||t)&&(n+=String.fromCharCode(i));return n}r.d(t,{f:()=>n})},72955:(e,t,r)=>{r.d(t,{Jx:()=>h,zD:()=>a});var n=r(99880);const o=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let i=null,s=null;function a(){return i||(i=r.e(6233).then(r.bind(r,26233)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,n.V)(`esri/layers/support/rasterFormats/${e}`)}))).then((e=>{(function(e){const{_malloc:t,_free:r,_lerc_getBlobInfo:n,_lerc_getDataRanges:i,_lerc_decode_4D:s,asm:a}=e;let c;const h=Object.values(a).find((t=>t&&"buffer"in t&&t.buffer===e.HEAPU8.buffer)),f=e=>{const r=e.map((e=>function(e){return 16+(e>>3<<3)}(e))),n=r.reduce(((e,t)=>e+t)),o=t(n);c=new Uint8Array(h.buffer);let i=r[0];r[0]=o;for(let e=1;e<r.length;e++){const t=r[e];r[e]=r[e-1]+i,i=t}return r};l.getBlobInfo=e=>{const t=new Uint8Array(48),o=new Uint8Array(24),[s,a,l]=f([e.length,t.length,o.length]);c.set(e,s),c.set(t,a),c.set(o,l);let d=n(s,e.length,a,l,12,3);if(d)throw r(s),new Error(`lerc-getBlobInfo: error code is ${d}`);c=new Uint8Array(h.buffer),u(c,a,t),u(c,l,o);const p=new Uint32Array(t.buffer),g=new Float64Array(o.buffer),[m,y,,w,C,b,v,x,k,T,A]=p,S={version:m,depthCount:T,width:w,height:C,validPixelCount:v,bandCount:b,blobSize:x,maskCount:k,dataType:y,minValue:g[0],maxValue:g[1],maxZerror:g[2],statistics:[],bandCountWithNoData:A};if(A)return S;if(1===T&&1===b)return r(s),S.statistics.push({minValue:g[0],maxValue:g[1]}),S;const I=T*b*8,M=new Uint8Array(I),P=new Uint8Array(I);let D=s,E=0,R=0,_=!1;if(c.byteLength<s+2*I?(r(s),_=!0,[D,E,R]=f([e.length,I,I]),c.set(e,D)):[E,R]=f([I,I]),c.set(M,E),c.set(P,R),d=i(D,e.length,T,b,E,R),d)throw r(D),_||r(E),new Error(`lerc-getDataRanges: error code is ${d}`);c=new Uint8Array(h.buffer),u(c,E,M),u(c,R,P);const L=new Float64Array(M.buffer),B=new Float64Array(P.buffer),U=S.statistics;for(let e=0;e<b;e++)if(T>1){const t=L.slice(e*T,(e+1)*T),r=B.slice(e*T,(e+1)*T),n=Math.min.apply(null,t),o=Math.max.apply(null,r);U.push({minValue:n,maxValue:o,depthStats:{minValues:t,maxValues:r}})}else U.push({minValue:L[e],maxValue:B[e]});return r(D),_||r(E),S},l.decode=(e,t)=>{const{maskCount:n,depthCount:i,bandCount:a,width:l,height:d,dataType:p,bandCountWithNoData:g}=t,m=o[p],y=l*d,w=new Uint8Array(y*a),C=y*i*a*m.size,b=new Uint8Array(C),v=new Uint8Array(a),x=new Uint8Array(8*a),[k,T,A,S,I]=f([e.length,w.length,b.length,v.length,x.length]);c.set(e,k),c.set(w,T),c.set(b,A),c.set(v,S),c.set(x,I);const M=s(k,e.length,n,T,i,l,d,a,p,A,S,I);if(M)throw r(k),new Error(`lerc-decode: error code is ${M}`);c=new Uint8Array(h.buffer),u(c,A,b),u(c,T,w);let P=null;if(g){u(c,S,v),u(c,I,x),P=[];const e=new Float64Array(x.buffer);for(let t=0;t<v.length;t++)P.push(v[t]?e[t]:null)}return r(k),{data:b,maskData:w,noDataValues:P}}})(e),s=!0})),i)}const l={getBlobInfo:null,decode:null};function u(e,t,r){r.set(e.slice(t,t+r.length))}function c(e,t,r,n,o){if(r<2)return e;const i=new n(t*r);if(o)for(let n=0,o=0;n<t;n++)for(let s=0,a=n;s<r;s++,a+=t)i[a]=e[o++];else for(let n=0,o=0;n<t;n++)for(let s=0,a=n;s<r;s++,a+=t)i[o++]=e[a];return i}function h(e,t={}){const r=t.inputOffset??0,n=e instanceof Uint8Array?e.subarray(r):new Uint8Array(e,r),i=l.getBlobInfo(n),{data:s,maskData:a,noDataValues:u}=l.decode(n,i),{width:h,height:f,bandCount:d,depthCount:p,dataType:g,maskCount:m,statistics:y}=i,w=o[g],C=new w.ctor(s.buffer),b=[],v=[],x=h*f,k=x*p;for(let e=0;e<d;e++){const r=C.subarray(e*k,(e+1)*k);if(t.returnInterleaved)b.push(r);else{const e=c(r,x,p,w.ctor,!0);b.push(e)}v.push(a.subarray(e*k,(e+1)*k))}const T=0===m?null:1===m?v[0]:new Uint8Array(x);if(m>1){T.set(v[0]);for(let e=1;e<v.length;e++){const t=v[e];for(let e=0;e<x;e++)T[e]=T[e]&t[e]}}const{noDataValue:A}=t,S=null!=A&&w.range[0]<=A&&w.range[1]>=A;if(m>0&&S)for(let e=0;e<d;e++){const t=b[e],r=v[e]||T;for(let e=0;e<x;e++)0===r[e]&&(t[e]=A)}const I=m===d&&d>1?v:null,{pixelType:M}=w;return{width:h,height:f,bandCount:d,pixelType:M,depthCount:p,statistics:y,pixels:b,mask:T,bandMasks:I,noDataValues:u}}},88781:(e,t,r)=>{function n(){const e=[];for(let t=0;t<=257;t++)e[t]=[t];return e}function o(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}r.d(t,{J:()=>s});const i=new Set;function s(e,t,r,s=!0){const a=function(e,t,r,n=!0){if(t%4!=0||r%4!=0){const o=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(o),s=new Uint8Array(e,t,r);if(n)for(let e=0;e<i.length;e+=4)i[e]=s[e+3],i[e+1]=s[e+2],i[e+2]=s[e+1],i[e+3]=s[e];else i.set(s);return new Uint32Array(i.buffer)}if(n){const n=new Uint8Array(e,t,r),o=new Uint8Array(n.length);for(let e=0;e<o.length;e+=4)o[e]=n[e+3],o[e+1]=n[e+2],o[e+2]=n[e+1],o[e+3]=n[e];return new Uint32Array(o.buffer)}return new Uint32Array(e,t,r/4)}(e,t,r,s);let l=9,u=n(),c=32,h=u.length,f=[],d=1,p=a[0],g=0;const m=a.length,y=8*(4*m-r),w=[];for(;null!=p;){if(c>=l)c-=l,g=p>>>32-l,p<<=l;else{g=p>>>32-c,p=a[d++];const e=l-c;c=32-e,g=(g<<e)+(p>>>c),p<<=e}if(257===g)break;if(256===g){l=9,u=n(),h=u.length,f=[];continue}const e=u[g];if(null==e){if(g>u.length)throw new Error("data integrity issue: code does not exist on code page");f.push(f[0]),u[h++]=f.slice(),o(w,f)}else o(w,e),f.push(e[0]),f.length>1&&(u[h++]=f.slice()),f=e.slice();if(i.has(h)&&l++,0===c&&(p=a[d++],c=32),d>m||d===m&&c<=y)break}return new Uint8Array(w)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191)},75993:(e,t,r)=>{r.d(t,{J:()=>R,y:()=>E});var n=r(20102),o=r(70586),i=r(5847),s=r(95330),a=r(80899);class l{constructor(e){this._canvas=null,this._ctx=null,e&&(this._canvas=e.canvas,this._ctx=e.ctx||e.canvas&&e.canvas.getContext("2d"))}decode(e,t,r){if(!e||e.byteLength<10)throw new n.Z("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:o=0,height:i=0,format:a}=t;const{applyJpegMask:u}=t;if(u&&(!o||!i))throw new n.Z("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise(((n,c)=>{let h=null;"jpg"===a&&u&&(h=l._getMask(e,{width:o,height:i}));const f=new Blob([new Uint8Array(e)],{type:"image/"+a=="jpg"?"jpeg":a}),d=URL.createObjectURL(f),p=new Image;let g;p.src=d,p.onload=()=>{if(URL.revokeObjectURL(d),(0,s.Hc)(r))return void c((0,s.zE)());o=p.width,i=p.height,this._canvas&&this._ctx?(this._canvas.width===o&&this._canvas.height===i||(this._canvas.width=o,this._canvas.height=i),this._ctx.clearRect(0,0,o,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=o,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(p,0,0);const e=this._ctx.getImageData(0,0,o,i);let a;if(g=e.data,t.renderOnCanvas){if(h)for(a=0;a<h.length;a++)h[a]?g[4*a+3]=255:g[4*a+3]=0;return this._ctx.putImageData(e,0,0),void n(null)}const l=o*i,u=new Uint8Array(l),f=new Uint8Array(l),m=new Uint8Array(l);if(h)for(a=0;a<l;a++)u[a]=g[4*a],f[a]=g[4*a+1],m[a]=g[4*a+2];else for(h=new Uint8Array(l),a=0;a<l;a++)u[a]=g[4*a],f[a]=g[4*a+1],m[a]=g[4*a+2],h[a]=g[4*a+3];n({width:o,height:i,pixels:[u,f,m],mask:h,pixelType:"u8"})},p.onerror=()=>{URL.revokeObjectURL(d),c("cannot load image")}}))}static _getMask(e,t){let r=null;try{const n=new Uint8Array(e),o=Math.ceil(n.length/2);let i=0;const s=n.length-2;for(i=o;i<s&&(255!==n[i]||217!==n[i+1]);i++);if(i+=2,i<n.length-1){const e=new a.Z(n.subarray(i)).getBytes();r=new Uint8Array(t.width*t.height);let o=0;for(let t=0;t<e.length;t++)for(let n=7;n>=0;n--)r[o++]=e[t]>>n&1}}catch(e){}return r}}var u=r(97575);class c{static decode(e,t=!1){const r=new Uint8Array(e),n=new u.J;n.parse(r);const{width:o,height:i,numComponents:s,eof:l}=n,c=n.getData(o,i,!0),h=o*i;let f,d=null,p=0,g=0,m=0;if(!t&&l<r.length-1)try{const e=new a.Z(r.subarray(l)).getBytes();d=new Uint8Array(h);let t=0;for(p=0;p<e.length;p++)for(m=7;m>=0;m--)d[t++]=e[p]>>m&1}catch{}if(1===s&&c.length===o*i){const e=new Uint8Array(c.buffer);f=[e,e,e]}else{for(f=[],p=0;p<3;p++)f.push(new Uint8Array(h));for(m=0,g=0;g<h;g++)for(p=0;p<3;p++)f[p][g]=c[m++]}return{width:o,height:i,pixels:f,mask:d}}}var h=r(72955),f=r(88781),d=r(81578);const p=(e,t)=>{const r=t.width*t.height,n=t.pixelType;return Math.floor(e.byteLength/(r*g(n)))},g=e=>{let t=1;switch(e){case Uint8Array:case Int8Array:t=1;break;case Uint16Array:case Int16Array:t=2;break;case Uint32Array:case Int32Array:case Float32Array:t=4;break;case Float64Array:t=8}return t};class m{static decode(e,t){const r=t.pixelType,n=[],o=t.width*t.height,i=p(e,t),{bandIds:s,format:a}=t,l=s&&s.length||p(e,t),u=e.byteLength-e.byteLength%(o*g(r)),c=new r(e,0,o*i);let h,f,d,m,y=null;if("bip"===a)for(h=0;h<l;h++){for(d=new r(o),m=s?s[h]:h,f=0;f<o;f++)d[f]=c[f*i+m];n.push(d)}else if("bsq"===a)for(h=0;h<l;h++)m=s?s[h]:h,n.push(c.subarray(m*o,(m+1)*o));return u<e.byteLength-1&&(y=((e,t)=>{if(8*e.byteLength<t)return null;const r=new Uint8Array(e,0,Math.ceil(t/8)),n=new Uint8Array(t);let o=0,i=0,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)n[o++]=i>>a&1;for(a=7;o<t-1;)i=r[r.length-1],n[o++]=i>>a&1,a--;return n})(e.slice(u),o)),{pixels:n,mask:y}}}var y=r(94793),w=r(48279),C=function(e){var t,r,n;function o(e){var t,r,n,o,i,s,a,l,u,c,h,f,d;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(t=this.readUInt32(),l=function(){var e,t;for(t=[],e=0;e<4;++e)t.push(String.fromCharCode(this.data[this.pos++]));return t}.call(this).join(""),l){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(t);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(),n=this.readUInt16()||100,i.delay=1e3*o/n,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,t-=4),e=(null!=i?i.data:void 0)||this.imgData,h=0;0<=t?h<t:h>t;0<=t?++h:--h)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(t),(u=255-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":s=(c=this.read(t)).indexOf(0),a=String.fromCharCode.apply(String,c.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,c.slice(s+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===(d=this.colorType)||6===d,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,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+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return o.load=function(e,t,r){var n;return"function"==typeof t&&(r=t),(n=new XMLHttpRequest).open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){var e;return e=new o(new Uint8Array(n.response||n.mozResponseArrayBuffer)),"function"==typeof(null!=t?t.getContext:void 0)&&e.render(t),"function"==typeof r?r(e):void 0},n.send(null)},o.prototype.read=function(e){var t,r;for(r=[],t=0;0<=e?t<e:t>e;0<=e?++t:--t)r.push(this.data[this.pos++]);return r},o.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.decodePixels=function(e){var t,r,n,o,i,s,l,u,c,h,f,d,p,g,m,y,w,C,b,v,x,k,T;if(null==e&&(e=this.imgData),0===e.length)return new Uint8Array(0);for(e=(e=new a.Z(e)).getBytes(),y=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(y*this.height),s=e.length,m=0,g=0,r=0;g<s;){switch(e[g++]){case 0:for(o=b=0;b<y;o=b+=1)p[r++]=e[g++];break;case 1:for(o=v=0;v<y;o=v+=1)t=e[g++],i=o<d?0:p[r-d],p[r++]=(t+i)%256;break;case 2:for(o=x=0;x<y;o=x+=1)t=e[g++],n=(o-o%d)/d,w=m&&p[(m-1)*y+n*d+o%d],p[r++]=(w+t)%256;break;case 3:for(o=k=0;k<y;o=k+=1)t=e[g++],n=(o-o%d)/d,i=o<d?0:p[r-d],w=m&&p[(m-1)*y+n*d+o%d],p[r++]=(t+Math.floor((i+w)/2))%256;break;case 4:for(o=T=0;T<y;o=T+=1)t=e[g++],n=(o-o%d)/d,i=o<d?0:p[r-d],0===m?w=C=0:(w=p[(m-1)*y+n*d+o%d],C=n&&p[(m-1)*y+(n-1)*d+o%d]),l=i+w-C,u=Math.abs(l-i),h=Math.abs(l-w),f=Math.abs(l-C),c=u<=h&&u<=f?i:h<=f?w:C,p[r++]=(t+c)%256;break;default:throw new Error("Invalid filter algorithm: "+e[g-1])}m++}return p},o.prototype.decodePalette=function(){var e,t,r,n,o,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],o=new Uint8Array((i.length||0)+r.length),n=0,r.length,e=0,t=s=0,a=r.length;s<a;t=s+=3)o[n++]=r[t],o[n++]=r[t+1],o[n++]=r[t+2],o[n++]=null!=(l=i[e++])?l:255;return o},o.prototype.copyToImageData=function(e,t){var r,n,o,i,s,a,l,u,c,h,f;if(n=this.colors,c=null,r=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),u=(o=e.data||e).length,s=c||t,i=a=0,1===n)for(;i<u;)l=c?4*t[i/4]:a,h=s[l++],o[i++]=h,o[i++]=h,o[i++]=h,o[i++]=r?s[l++]:this.transparency.grayscale&&this.transparency.grayscale===h?0:255,a=l;else for(;i<u;)l=c?4*t[i/4]:a,o[i++]=s[l++],o[i++]=s[l++],o[i++]=s[l++],o[i++]=r?s[l++]:this.transparency.rgb&&this.transparency.rgb[1]===s[l-3]&&this.transparency.rgb[3]===s[l-2]&&this.transparency.rgb[5]===s[l-1]?0:255,a=l},o.prototype.decode=function(){var e;return e=new Uint8Array(this.width*this.height*4),this.copyToImageData(e,this.decodePixels()),e},r=e.document&&e.document.createElement("canvas"),n=r&&r.getContext("2d"),t=function(e){var t;return n.width=e.width,n.height=e.height,n.clearRect(0,0,e.width,e.height),n.putImageData(e,0,0),(t=new Image).src=r.toDataURL(),t},o.prototype.decodeFrames=function(e){var r,n,o,i,s,a,l,u;if(this.animation){for(u=[],n=s=0,a=(l=this.animation.frames).length;s<a;n=++s)r=l[n],o=e.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(o,i),r.imageData=o,u.push(r.image=t(o));return u}},o.prototype.renderFrame=function(e,t){var r,n,o;return r=(n=this.animation.frames)[t],o=n[t-1],0===t&&e.clearRect(0,0,this.width,this.height),1===(null!=o?o.disposeOp:void 0)?e.clearRect(o.xOffset,o.yOffset,o.width,o.height):2===(null!=o?o.disposeOp:void 0)&&e.putImageData(o.imageData,o.xOffset,o.yOffset),0===r.blendOp&&e.clearRect(r.xOffset,r.yOffset,r.width,r.height),e.drawImage(r.image,r.xOffset,r.yOffset)},o.prototype.animate=function(e){var t,r,n,o,i,s,a=this;return r=0,s=this.animation,o=s.numFrames,n=s.frames,i=s.numPlays,(t=function(){var s,l;if(s=r++%o,l=n[s],a.renderFrame(e,s),o>1&&r/o<i)return a.animation._timeout=setTimeout(t,l.delay)})()},o.prototype.stopAnimation=function(){var e;return clearTimeout(null!=(e=this.animation)?e._timeout:void 0)},o.prototype.render=function(e){var t,r;return e._png&&e._png.stopAnimation(),e._png=this,e.width=this.width,e.height=this.height,t=e.getContext("2d"),this.animation?(this.decodeFrames(t),this.animate(t)):(r=t.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),t.putImageData(r,0,0))},o}(self);const b=new Set(["jpg","png","bmp","gif"]);async function v(e,t){if(!w.f)throw new n.Z("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,h.zD)();const{offset:r}=t,{width:o,height:s,pixelType:a,statistics:l,depthCount:u,noDataValues:c,bandMasks:f,pixels:d,mask:p}=(0,h.Jx)(e,{inputOffset:r,returnInterleaved:t.returnInterleaved});return new i.Z({width:o,height:s,pixelType:a.toLowerCase(),pixels:d,mask:p,statistics:l,bandMasks:f,depthCount:u,noDataValues:c})}async function x(e,t){const r=await(0,y.Jx)(e,{...t,noDataValue:null});(0,o.O3)(r);const n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}function k(e,t){const r=t.pixelType||"u8",n=i.Z.getPixelArrayConstructor(r),o="u8"===r?e:new n(e.buffer),s=[],a=t.planes||1;if(1===a)s.push(o);else for(let r=0;r<a;r++){const i=(t.width||1)*(t.height||e.length),l=new n(i);for(let e=0;e<i;e++)l[e]=o[e*a+r];s.push(l)}const l=new i.Z({width:t.width||1,height:t.height||e.length,pixels:s,pixelType:r,statistics:null});return l.updateStatistics(),l}function T(e,t){return k(new a.Z(new Uint8Array(e)).getBytes(),t)}function A(e,t){return k((0,f.J)(e,t.offset,t.eof,!t.isInputBigEndian),t)}function S(e,t,r){const{pixelTypeCtor:n}=function(e){let t=null,r=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,t=Uint8Array;break;case"u16":r=r||65535,t=Uint16Array;break;case"u32":r=r||2**32-1,t=Uint32Array;break;case"s8":r=r||-128,t=Int8Array;break;case"s16":r=r||-32768,t=Int16Array;break;case"s32":r=r||0-2**31,t=Int32Array;break;default:t=Float32Array}return{pixelTypeCtor:t,noDataValue:r}}(t.pixelType),o=(0,m.decode)(e,{width:t.width,height:t.height,pixelType:n,format:r}),s=new i.Z({width:t.width,height:t.height,pixels:o.pixels,pixelType:t.pixelType,mask:o.mask,statistics:null});return s.updateStatistics(),s}function I(e,t){const r=c.decode(e,t.hasNoZlibMask??void 0),n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:"U8",mask:r.mask,statistics:null});return n.updateStatistics(),n}function M(e,t){const r=new Uint8Array(e),n=new C(r),{width:o,height:s}=t,a=o*s,l=n.decode();let u,c=0,h=0;const f=new Uint8Array(a);for(c=0;c<a;c++)f[c]=l[4*c+3];const d=new i.Z({width:o,height:s,pixels:[],pixelType:"U8",mask:f,statistics:[]});for(c=0;c<3;c++){for(u=new Uint8Array(a),h=0;h<a;h++)u[h]=l[4*h+c];d.addData({pixels:u})}return d.updateStatistics(),d}async function P(e,t,r,n){const o=new l,s={applyJpegMask:!1,format:t,...r},a=await o.decode(e,s,n),u=new i.Z(a);return u.updateStatistics(),u}function D(e){if(null==e)throw new n.Z("rasterCodec:decode","parameter encodeddata is required.");const t=new Uint8Array(e,0,10);let r="";return 255===t[0]&&216===t[1]?r="jpg":137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?r="png":67===t[0]&&110===t[1]&&116===t[2]&&90===t[3]&&73===t[4]&&109===t[5]&&97===t[6]&&103===t[7]&&101===t[8]&&32===t[9]?r="lerc":76===t[0]&&101===t[1]&&114===t[2]&&99===t[3]&&50===t[4]&&32===t[5]?r="lerc2":73===t[0]&&73===t[1]&&42===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&42===t[3]||73===t[0]&&73===t[1]&&43===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&43===t[3]?r="tiff":71===t[0]&&73===t[1]&&70===t[2]?r="gif":66===t[0]&&77===t[1]?r="bmp":String.fromCharCode.apply(null,t).toLowerCase().includes("error")&&(r="error"),r}function E(e){let t=D(e);return"lerc2"===t?t="lerc":"error"===t&&(t=""),t}async function R(e,t={},r){if(null==e)throw new n.Z("rasterCodec:decode","missing encodeddata parameter.");let o=t.format&&t.format.toLowerCase();if(!("bsq"!==o&&"bip"!==o||null!=t.width&&null!=t.height))throw new n.Z("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===o&&t.customOptions)return async function(e,t){const r=await(0,y.Uw)(e,t.customOptions),n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}(e,t);if((!o||"bsq"!==o&&"bip"!==o&&"deflate"!==o&&"lzw"!==o)&&(o=D(e)),t.useCanvas&&b.has(o))return P(e,o,t,r);const s=function(e){let t=null;switch(e){case"lerc":case"lerc2":t=v;break;case"jpg":t=I;break;case"png":t=M;break;case"bsq":case"bip":t=(t,r)=>S(t,r,e);break;case"tiff":t=x;break;case"deflate":t=T;break;case"lzw":t=A;break;case"error":t=()=>{throw new n.Z("rasterCodec:decode","input data contains error")};break;default:t=()=>{throw new n.Z("rasterCodec:decode","unsupported raster format")}}return t}(o);t.isPoint&&(null!=(t={...t}).width&&t.width++,null!=t.height&&t.height++);const a=await s(e,t);return a?("jpg"!==o&&null!=t.noDataValue&&1===a.depthCount&&(0,d.A)(a,t.noDataValue,{customFloatTolerance:t.tolerance}),t.isPoint&&function(e,t=1){if(!e)return;const{pixels:r,width:n,height:o,mask:s}=e;if(!r||0===r.length)return;const a=r.length,l=n-1,u=o-1,c=[];let h,f,d,p,g,m,y=null;const w=i.Z.getPixelArrayConstructor(e.pixelType);if(0===t){for(h=0;h<a;h++){for(g=r[h],m=new w(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)m[f*l+d]=g[p+d];c.push(m)}if(null!=s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)y[f*l+d]=s[p+d]}else{for(h=0;h<a;h++){for(g=r[h],m=new w(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)m[f*l+d]=(g[p+d]+g[p+d+1]+g[p+n+d]+g[p+n+d+1])/4;c.push(m)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)y[f*l+d]=Math.min.apply(null,[s[p+d],s[p+d+1],s[p+n+d],s[p+n+d+1]])}e.width=l,e.height=u,e.mask=y,e.pixels=c}(a),a):a}},94793:(e,t,r)=>{r.d(t,{Dq:()=>D,FI:()=>E,I7:()=>L,If:()=>R,Jx:()=>z,Uw:()=>V,cK:()=>O,ee:()=>_,vr:()=>N});var n=r(20095),o=r(97575),i=r(72955),s=r(88781),a=r(81578),l=r(9832),u=r(48279),c=r(80899);const h=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],f=4294967296,d=new Set([1,5,6,7,8,34712,34887]);function p(e,t){let r="unknown";return 3===e?r=64===t?"f64":"f32":1===e?1===t?r="u1":2===t?r="u2":4===t?r="u4":t<=8?r="u8":t<=16?r="u16":t<=32&&(r="u32"):2===e&&(t<=8?r="s8":t<=16?r="s16":t<=32&&(r="s32")),r}function g(e){let t=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f64":t=Float64Array;break;default:t=Float32Array}return t}function m(e,t){return{x:t[0]*e.x+t[1]*e.y+t[2],y:t[3]*e.x+t[4]*e.y+t[5]}}function y(e,t){return e.get(t)?.values}function w(e,t){return e.get(t)?.values}function C(e,t){return e.get(t)?.values?.[0]}function b(e,t){return e.get(t)?.values?.[0]}function v(e,t,r,n=0,o=l.Z.TIFF_TAGS,i=4){const s=8===i,a=s?B(new DataView(e,r,8),0,t):new DataView(e,r,2).getUint16(0,t),u=4+2*i,c=s?8:2,h=c+a*u;if(r+h>e.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:h};const f=r+h+4<=e.byteLength?G(new DataView(e,r+h,8===i?8:4),0,t,8===i):null,d=r+c,p=new Map;let g,m,y,w,C,b=0,v=0;for(let r=0;r<a;r++){m=new DataView(e,d+u*r,u),y=m.getUint16(0,t),C=m.getUint16(2,t),w=l.Z.getTagName(y,o);const s=[];2===i?(b=m.getUint16(4,t),v=m.getUint16(6,t)):4===i?(b=m.getUint32(4,t),v=m.getUint32(8,t)):8===i&&(b=G(m,4,t,!0),v=G(m,12,t,!0),s.push(m.getUint32(12,t)),s.push(m.getUint32(16,t))),g={id:y,type:C,valueCount:b,valueOffset:v,valueOffsets:s,values:null},D(e,t,g,n,!1,i),p.set(w,g)}return{success:!0,ifd:p,nextIFD:f,requiredBufferSize:h}}const x=(e,t)=>(0,i.Jx)(e,{inputOffset:t}).pixels[0];function k(e,t){if(1!==t&&2!==t&&4!==t)return e;const r=new Uint8Array(e),n=8/t,o=new Uint8Array(e.byteLength*n);let i=0;const s=2**t-1;for(let e=0;e<r.length;e++){const a=r[e];for(let e=0;e<n;e++)o[i++]=a<<t*e>>>8-t&s}return o.buffer}function T(e,t,r){const n=new o.J;n.parse(e),n.colorTransform=6===r?-1:0;const i=n.getData(n.width,n.height,1!==t);return new Uint8Array(i.buffer)}function A(e){const t=new c.Z(e).getBytes(),r=new ArrayBuffer(t.length),n=new Uint8Array(r);return n.set(t),n}async function S(e,t,r,n,o){const a=u.f===t,l=b(r,"BITSPERSAMPLE"),c=b(r,"SAMPLESPERPIXEL"),h=b(r,"PHOTOMETRICINTERPRETATION"),f=p(b(r,"SAMPLEFORMAT")??1,l),d=b(r,"COMPRESSION")??1,m=g(f);let y,w,C;if(34887===d)return await(0,i.zD)(),x(e,n);if(1===d)y=e.slice(n,n+o),w=new Uint8Array(y);else if(8===d||32946===d)w=new Uint8Array(e,n,o),w=A(w),y=w.buffer;else if(6===d)w=new Uint8Array(e,n,o),w=T(w,c,h),y=w.buffer;else if(7===d){const t=r.get("JPEGTABLES").values,i=t.length-2;w=new Uint8Array(i+o-2);for(let e=0;e<i;e++)w[e]=t[e];const s=new Uint8Array(e,n+2,o-2);for(let e=0;e<s.length;e++)w[i+e]=s[e];w=T(w,c,h),y=w.buffer}else{if(5!==d)throw new Error("tiff-decode: unsupport compression "+d);w=(0,s.J)(e,n,o,t),y=w.buffer}if(y=k(y,l),"u8"===f||"s8"===f||a)C=new m(y);else{y=new ArrayBuffer(w.length);const e=new Uint8Array(y);switch(f){case"u16":case"s16":for(let t=0;t<w.length;t+=2)e[t]=w[t+1],e[t+1]=w[t];break;case"u32":case"s32":case"f32":for(let t=0;t<w.length;t+=4)e[t]=w[t+3],e[t+1]=w[t+2],e[t+2]=w[t+1],e[t+3]=w[t]}C=new m(y)}return C}const I=(e,t,r)=>{const n=u.f===t.littleEndian,o=w(r,"STRIPOFFSETS");if(void 0===o)return null;const{width:i,height:a,pixelType:l}=E([r]),c=b(r,"SAMPLESPERPIXEL")||t.planes,h=b(r,"PHOTOMETRICINTERPRETATION"),f=i*a,d=b(r,"BITSPERSAMPLE"),p=g(l),m=new p(f*c),y=w(r,"STRIPBYTECOUNTS"),C=b(r,"ROWSPERSTRIP"),v=b(r,"COMPRESSION")??1;let x,S,I,M,P,D,R,_,L,B=C;if(d%8==0)for(x=0;x<o.length;x++){if(P=x*(C*i)*c,B=(x+1)*C>a?a-x*C:C,"u8"===l||"s8"===l||n)8===v||32946===v?(R=new Uint8Array(e,o[x],y[x]),R=A(R),D=R.buffer):6===v?(R=new Uint8Array(e,o[x],y[x]),R=T(R,c,h),D=R.buffer):5===v?(R=(0,s.J)(e,o[x],y[x],t.littleEndian),D=R.buffer):(y[x]!==B*i*c*d/8&&console.log("strip byte counts is different than expected"),D=e.slice(o[x],o[x]+y[x])),D=k(D,d),M=new p(D);else{switch(6===v||8===v||32946===v?(R=new Uint8Array(e,o[x],y[x]),_=A(R),D=_.buffer):(y[x]!==B*i*c*d/8&&console.log("strip byte counts is different than expected"),D=new ArrayBuffer(y[x]),R=new Uint8Array(e,o[x],y[x]),_=new Uint8Array(D)),l){case"u16":case"s16":for(I=0;I<R.length;I+=2)_[I]=R[I+1],_[I+1]=R[I];break;case"u32":case"s32":case"f32":for(I=0;I<R.length;I+=4)_[I]=R[I+3],_[I+1]=R[I+2],_[I+2]=R[I+1],_[I+3]=R[I]}D=k(D,d),M=new p(D)}m.set(M,P)}const U=[];if(1===c)U.push(m);else for(x=0;x<c;x++){for(L=new p(f),S=0;S<f;S++)L[S]=m[S*c+x];U.push(L)}return{width:i,height:a,pixelType:l,pixels:U}},M=(e,t,r)=>{if(!(e&&e.length>0&&t&&r))return null;let n,o,i;const s=e[0].length,a=e.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(n=e[u],o=t[u],i=r[u],0===u)for(let e=0;e<s;e++)l[e]=n[e]<o||n[e]>i?0:1;else for(let e=0;e<s;e++)l[e]&&(l[e]=n[e]<o||n[e]>i?0:1);return l},P=e=>{if(!e)return null;const t=e.match(/<Item(.*?)Item>/gi);if(!t||0===t.length)return null;const r=new Map;let n,o,i,s,a;for(let e=0;e<t.length;e++)n=t[e],o=n.slice(6,n.indexOf(">")),s=n.indexOf("sample="),s>-1&&(a=n.slice(s+8,n.indexOf('"',s+8))),s=n.indexOf("name="),s>-1&&(o=n.slice(s+6,n.indexOf('"',s+6))),o&&(i=n.slice(n.indexOf(">")+1,n.indexOf("</Item>")).trim(),null!=a?r.has(o)?r.get(o)[a]=i:r.set(o,[i]):r.set(o,i)),a=null;const l=r.get("STATISTICS_MINIMUM"),u=r.get("STATISTICS_MAXIMUM"),c=r.get("STATISTICS_MEAN"),h=r.get("STATISTICS_STDDEV");let f=null;if(l&&u){f=[];for(let e=0;e<l.length;e++)f.push({min:parseFloat(l[e]),max:parseFloat(u[e]),avg:c&&parseFloat(c[e]),stddev:h&&parseFloat(h[e])})}const d=r.get("BandName"),p=r.get("WavelengthMin"),g=r.get("WavelengthMax");let m=null;if(d){m=[];for(let e=0;e<d.length;e++)m.push({BandName:d[e],WavelengthMin:p&&parseFloat(p[e]),WavelengthMax:g&&parseFloat(g[e])})}return{statistics:f,bandProperties:m,dataType:r.get("DataType"),rawMetadata:r}};function D(e,t,r,n=0,o=!1,i=4){if(r.values)return!0;const s=r.type,a=r.valueCount;let l=r.valueOffset,u=[];const c=h[s],d=8*c,p=a*c,g=a*h[s]*8;let m,y;const w=8===i?64:32,C=r.valueOffsets;if(g>w&&p>(o?e.byteLength:e?e.byteLength-l+n:0))return r.offlineOffsetSize=[l,p],r.values=null,!1;if(g<=w){if(!t)if(w<=32)l>>>=32-g;else{const e=C?.length?C[0]:l>>>0,t=C?.length?C[1]:Math.round((l-e)/f);g<=32?(l=e>>>32-g,C[0]=l):(l=e*2**(32-g)+(t>>>32-g),C[0]=e,C[1]=t>>>32-g)}if(1===a&&d===w)u=[l];else if(64===w){const e=C?.length?C[0]:l>>>0,t=C?.length?C[1]:Math.round((l-e)/f);let r=e,n=32;for(y=1;y<=a;y++){const e=32-d*y%32;if(n<d){const o=r<<e>>>32-n,i=t<<32-n>>>32-n;r=t,u.push(o+i*2**(d-n)),n-=32-(d-n)}else u.push(r<<e>>>32-d),n-=d;0===n&&(n=32,r=t)}}else for(y=1;y<=a;y++){const e=32-d*y;u.push(l<<e>>>32-d)}}else{l-=n,o&&(l=0);for(let r=l;r<l+p;r+=c){switch(s){case 1:case 2:case 7:m=new DataView(e,r,1).getUint8(0);break;case 3:m=new DataView(e,r,2).getUint16(0,t);break;case 4:case 13:m=new DataView(e,r,4).getUint32(0,t);break;case 5:m=new DataView(e,r,4).getUint32(0,t)/new DataView(e,r+4,4).getUint32(0,t);break;case 6:m=new DataView(e,r,1).getInt8(0);break;case 8:m=new DataView(e,r,2).getInt16(0,t);break;case 9:m=new DataView(e,r,4).getInt32(0,t);break;case 10:m=new DataView(e,r,4).getInt32(0,t)/new DataView(e,r+4,4).getInt32(0,t);break;case 11:m=new DataView(e,r,4).getFloat32(0,t);break;case 12:m=new DataView(e,r,8).getFloat64(0,t);break;case 16:case 18:m=B(new DataView(e,r,8),0,t);break;case 17:m=U(new DataView(e,r,8),0,t);break;default:m=null}u.push(m)}}if(2===s){let e="";const t=u;for(u=[],y=0;y<t.length;y++)0===t[y]&&""!==e?(u.push(e),e=""):e+=String.fromCharCode(t[y]);""===e&&0!==u.length||u.push(e)}return r.values=u,!0}function E(e){const t=e[0],r=b(t,"TILEWIDTH"),n=b(t,"TILELENGTH"),o=b(t,"IMAGEWIDTH"),i=b(t,"IMAGELENGTH"),s=b(t,"BITSPERSAMPLE"),a=b(t,"SAMPLESPERPIXEL"),l=b(t,"SAMPLEFORMAT")??1,u=p(l,s),c=R(t),h=y(t,"GDAL_NODATA");let f=null;h?.length&&(f=h.map((e=>parseFloat(e))),f.some((e=>isNaN(e)))&&(f=null));const g=b(t,"COMPRESSION")??1;let v;switch(g){case 1:v="NONE";break;case 2:case 3:case 4:case 32771:v="CCITT";break;case 5:v="LZW";break;case 6:case 7:v="JPEG";break;case 32773:v="PACKBITS";break;case 8:case 32946:v="DEFLATE";break;case 34712:v="JPEG2000";break;case 34887:v="LERC";break;default:v=String(g)}let x=!0,k="";d.has(g)||(x=!1,k+="unsupported tag compression "+g),l>3&&(x=!1,k+="unsupported tag sampleFormat "+l),1!==s&&2!==s&&4!==s&&s%8!=0&&(x=!1,k+="unsupported tag bitsPerSample "+s);const T=C(t,"GEOASCIIPARAMS");let A;if(T){const e=T.split("|").find((e=>e.includes("ESRI PE String = "))),t=e?e.replace("ESRI PE String = ",""):"";A=t.startsWith("COMPD_CS")||t.startsWith("PROJCS")||t.startsWith("GEOGCS")?{wkid:null,wkt:t}:null}const S=w(t,"GEOTIEPOINTS"),I=w(t,"GEOPIXELSCALE"),M=w(t,"GEOTRANSMATRIX"),D=t.has("GEOKEYDIRECTORY")?t.get("GEOKEYDIRECTORY").data:null;let E,B,U=!1,G=!1;if(D){U=2===b(D,"GTRasterTypeGeoKey");const e=b(D,"GTModelTypeGeoKey");if(2===e){const e=b(D,"GeographicTypeGeoKey");e>=1024&&e<=32766&&(A={wkid:e}),A||32767!==e||(G=!0,A={wkid:4326})}else if(1===e){const e=b(D,"ProjectedCSTypeGeoKey");e>=1024&&e<=32766&&(A={wkid:e})}}if(I&&S&&S.length>=6?(E=[I[0],0,S[3]-S[0]*I[0],0,-Math.abs(I[1]),S[4]-S[1]*I[1]],U&&(E[2]-=.5*E[0]+.5*E[1],E[5]-=.5*E[3]+.5*E[4])):M&&16===M.length&&(E=U?[M[0],M[1],M[3]-.5*M[0],M[4],M[5],M[7]-.5*M[5]]:[M[0],M[1],M[3],M[4],M[5],M[7]]),E){const e=[{x:0,y:i},{x:0,y:0},{x:o,y:i},{x:o,y:0}];let t,r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let o=0;o<e.length;o++)t=m(e[o],E),r=t.x>r?r:t.x,s=t.x<s?s:t.x,n=t.y>n?n:t.y,a=t.y<a?a:t.y;B={xmin:r,xmax:s,ymin:n,ymax:a,spatialReference:A}}else B={xmin:-.5,ymin:.5-i,xmax:o-.5,ymax:.5,spatialReference:A};G&&(B.xmax-B.xmin>400||Math.max(Math.abs(B.xmin),Math.abs(B.xmax))>361)&&(A=null,B.spatialReference=null);const O=_(e);let N,V,z,j,Z;if(O.length>0){z=Math.round(Math.log(o/b(O[0],"IMAGEWIDTH"))/Math.LN2);const e=O[O.length-1];j=Math.round(Math.log(o/b(e,"IMAGEWIDTH"))/Math.LN2),N=b(e,"TILEWIDTH"),V=b(e,"TILELENGTH")}N=null!=j&&j>0?N||r:null,V=null!=j&&j>0?V||n:null,r&&(Z=[{maxCol:Math.ceil(o/r)-1,maxRow:Math.ceil(i/n)-1,minRow:0,minCol:0}],O.forEach((e=>{Z.push({maxCol:Math.ceil(b(e,"IMAGEWIDTH")/b(e,"TILEWIDTH"))-1,maxRow:Math.ceil(b(e,"IMAGELENGTH")/b(e,"TILELENGTH"))-1,minRow:0,minCol:0})})));const W=C(e[0],"GDAL_METADATA"),J=P(W);return k+=" "+F({width:o,height:i,tileWidth:r,tileHeight:n,planes:a,ifds:e}),{width:o,height:i,tileWidth:r,tileHeight:n,planes:a,isBSQ:c,pixelType:u,compression:v,noData:f,hasMaskBand:L(e).length===O.length+1,isSupported:x,message:k,extent:B,isPseudoGeographic:G,affine:I?null:E,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:N,pyramidBlockHeight:V,tileBoundary:Z,metadata:J}}function R(e,t){const r=y(e,"PLANARCONFIGURATION");return r?2===r[0]:!!t&&t.isBSQ}function _(e){return e.filter((e=>1===b(e,"NEWSUBFILETYPE")))}function L(e){return e.filter((e=>{const t=4==(4&(b(e,"NEWSUBFILETYPE")??0)),r=4===b(e,"PHOTOMETRICINTERPRETATION");return t&&r}))}function B(e,t,r){const n=e.getUint32(t,r),o=e.getUint32(t+4,r);return r?o*f+n:n*f+o}function U(e,t,r){let n=r?e.getInt32(t,r):e.getUint32(t,r),o=r?e.getUint32(t+4,r):e.getInt32(t+4,r);const i=(r?n:o)>=0?1:-1;return r?n*=i:o*=i,i*(r?o*f+n:n*f+o)}function G(e,t,r,n){return n?B(e,t,r):e.getUint32(t,r)}function O(e){const t=new DataView(e,0,16),r=t.getUint16(0,!1);let n=null;if(18761===r)n=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");n=!1}const o=t.getUint16(2,n);if(42!==o&&43!==o)throw new Error("unexpected tiff identifier");let i=4;const s=43===o;if(s){const e=t.getUint16(i,n);if(i+=2,8!==e)throw new Error("unsupported bigtiff version");if(0!==t.getUint16(i,n))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:n,isBigTiff:s,firstIFDPos:G(t,i,n,s)}}function N(e,t,r,o=0,i=l.Z.TIFF_TAGS,s=4){const a=v(e,t,r,o,i,s);let u;const c=a.ifd;if(c){if(l.Z.ifdTags.forEach(((r,n)=>{c.has(n)&&(u=c.get(n),u.data=v(e,t,u.valueOffset-o,o,r).ifd)})),c.has("GEOKEYDIRECTORY")){u=c.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const n=r[0]+"."+r[1]+"."+r[2];u.data=v(e,t,u.valueOffset+6-o,o,l.Z.GEO_KEYS,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}if(c.has("XMP")){u=c.get("XMP");const e=u.values;"number"==typeof e[0]&&7===u.type&&(u.values=[(0,n.f)(new Uint8Array(e))])}}return a}function F(e){const{width:t,height:r,tileHeight:n,tileWidth:o}=e,i=e.planes,s=o?o*n:t*r,a=b(e.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/8:1)&&(l=o?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function V(e,t){const{headerInfo:r,ifd:n,offsets:o,sizes:i}=t,s=[];for(let t=0;t<o.length;t++){const a=await S(e,r.littleEndian,n,o[t],i[t]||e.byteLength);s.push(a)}const l=R(n,r),u=b(n,"BITSPERSAMPLE"),c=p(b(n,"SAMPLEFORMAT")??1,u),h=b(n,"SAMPLESPERPIXEL")||r.planes,f=g(c),d=b(n,"TILEWIDTH"),m=b(n,"TILELENGTH"),y=b(n,"COMPRESSION")??1,w=d*m;let C;const v=[];let x=s[0];const k=34887===y;for(let e=0;e<h;e++){if(C=new f(w),l&&k){if(x=s[e],x.length)for(let t=0;t<w;t++)C[t]=x[t+e]}else if(x.length)if(l||k&&!l)C=x.slice(w*e,w*(e+1));else for(let t=0;t<w;t++)C[t]=x[t*h+e];v.push(C)}const T=r.noData?r.noData[0]:t.noDataValue,A=r.metadata?r.metadata.statistics:null,I=A?A.map((e=>e.min)):null,P=A?A.map((e=>e.max)):null,D={pixelType:c,width:d,height:m,pixels:v,noDataValue:T};return null!=T?(0,a.A)(D,T):I&&P&&t.applyMinMaxConstraint&&(D.mask=M(v,I,P)),D}async function z(e,t={}){const r=t.pyramidLevel||0,n=t.headerInfo||function(e){const{littleEndian:t,isBigTiff:r,firstIFDPos:n}=O(e);let o=n;const i=[];do{const n=N(e,t,o,0,l.Z.TIFF_TAGS,r?8:4);if(!n.success)break;i.push(n.ifd),o=n.nextIFD}while(o>0);return{...E(i),littleEndian:t,isBigTiff:r,ifds:i,pyramidIFDs:_(i),maskIFDs:L(i)}}(e),{ifds:o,noData:i}=n;if(0===o.length)throw new Error("no valid image file directory");const s=F(n);if(s)throw s;let u=null;const c=-1===r?o[o.length-1]:o[r],h=i??t.noDataValue;return u=n.tileWidth?await async function(e,t,r){const n=w(r,"TILEOFFSETS");if(void 0===n)return null;const o=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=E([r]),c=R(r,t),h=b(r,"SAMPLESPERPIXEL")||t.planes,f=i*s,d=b(r,"BITSPERSAMPLE"),p=34887===(b(r,"COMPRESSION")??1),m=g(a),y=[];for(let e=0;e<h;e++)y.push(new m(f));let C,v,x,k,T,A,I,M,P,D,_,L,B;const U=Math.ceil(i/l);if(d%8==0)if(p&&c&&h>1){const a=Math.round(n.length/h);for(C=0;C<a;C++){A=Math.floor(C/U)*u,I=C%U*l,M=A*i+I;for(let a=0;a<h;a++){const c=C*h+a;if(0!==o[c])for(x=await S(e,t.littleEndian,r,n[c],o[c]),D=0,P=M,L=Math.min(l,i-I),_=Math.min(u,s-A),B=y[a],k=0;k<_;k++)for(P=M+k*i,D=k*l,T=0;T<L;T++,P++,D++)B[P]=x[D]}}}else for(C=0;C<n.length;C++)if(0!==o[C])for(A=Math.floor(C/U)*u,I=C%U*l,M=A*i+I,x=await S(e,t.littleEndian,r,n[C],o[C]),D=0,P=M,L=Math.min(l,i-I),_=Math.min(u,s-A),v=0;v<h;v++)if(B=y[v],c||p)for(k=0;k<_;k++)for(P=M+k*i,D=l*u*v+k*l,T=0;T<L;T++,P++,D++)B[P]=x[D];else for(k=0;k<_;k++)for(P=M+k*i,D=k*l*h+v,T=0;T<L;T++,P++,D+=h)B[P]=x[D];return{width:i,height:s,pixelType:a,pixels:y}}(e,n,c):await I(e,n,c),u?(null!=h&&(0,a.A)(u,h),u):u}},9832:(e,t,r)=>{r.d(t,{Z:()=>a});const n=(()=>{const e=[];return e[254]="NEWSUBFILETYPE",e[255]="SUBFILETYPE",e[256]="IMAGEWIDTH",e[257]="IMAGELENGTH",e[258]="BITSPERSAMPLE",e[259]="COMPRESSION",e[262]="PHOTOMETRICINTERPRETATION",e[263]="THRESHHOLDING",e[264]="CELLWIDTH",e[265]="CELLLENGTH",e[266]="FILLORDER",e[269]="DOCUMENTNAME",e[270]="IMAGEDESCRIPTION",e[271]="MAKE",e[272]="MODEL",e[273]="STRIPOFFSETS",e[274]="ORIENTATION",e[277]="SAMPLESPERPIXEL",e[278]="ROWSPERSTRIP",e[279]="STRIPBYTECOUNTS",e[280]="MINSAMPLEVALUE",e[281]="MAXSAMPLEVALUE",e[282]="XRESOLUTION",e[283]="YRESOLUTION",e[284]="PLANARCONFIGURATION",e[285]="PAGENAME",e[286]="XPOSITION",e[287]="YPOSITION",e[288]="FREEOFFSETS",e[289]="FREEBYTECOUNTS",e[290]="GRAYRESPONSEUNIT",e[291]="GRAYRESPONSECURVE",e[292]="T4OPTIONS",e[293]="T6OPTIONS",e[296]="RESOLUTIONUNIT",e[297]="PAGENUMBER",e[300]="COLORRESPONSEUNIT",e[301]="TRANSFERFUNCTION",e[305]="SOFTWARE",e[306]="DATETIME",e[315]="ARTIST",e[316]="HOSTCOMPUTER",e[317]="PREDICTOR",e[318]="WHITEPOINT",e[319]="PRIMARYCHROMATICITIES",e[320]="COLORMAP",e[321]="HALFTONEHINTS",e[322]="TILEWIDTH",e[323]="TILELENGTH",e[324]="TILEOFFSETS",e[325]="TILEBYTECOUNTS",e[326]="BADFAXLINES",e[327]="CLEANFAXDATA",e[328]="CONSECUTIVEBADFAXLINES",e[330]="SUBIFD",e[332]="INKSET",e[333]="INKNAMES",e[334]="NUMBEROFINKS",e[336]="DOTRANGE",e[337]="TARGETPRINTER",e[338]="EXTRASAMPLES",e[339]="SAMPLEFORMAT",e[340]="SMINSAMPLEVALUE",e[341]="SMAXSAMPLEVALUE",e[342]="TRANSFERRANGE",e[347]="JPEGTABLES",e[512]="JPEGPROC",e[513]="JPEGIFOFFSET",e[514]="JPEGIFBYTECOUNT",e[515]="JPEGRESTARTINTERVAL",e[517]="JPEGLOSSLESSPREDICTORS",e[518]="JPEGPOINTTRANSFORM",e[519]="JPEGQTABLES",e[520]="JPEGDCTABLES",e[521]="JPEGACTABLES",e[529]="YCBCRCOEFFICIENTS",e[530]="YCBCRSUBSAMPLING",e[531]="YCBCRPOSITIONING",e[532]="REFERENCEBLACKWHITE",e[700]="XMP",e[33550]="GEOPIXELSCALE",e[33922]="GEOTIEPOINTS",e[33432]="COPYRIGHT",e[42112]="GDAL_METADATA",e[42113]="GDAL_NODATA",e[50844]="RPCCOEFFICIENT",e[34264]="GEOTRANSMATRIX",e[34735]="GEOKEYDIRECTORY",e[34736]="GEODOUBLEPARAMS",e[34737]="GEOASCIIPARAMS",e[34665]="EXIFIFD",e[34853]="GPSIFD",e[40965]="INTEROPERABILITYIFD",e})(),o=(()=>{const e=n.slice();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})(),i=(()=>{const 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})(),s=new Map;s.set("EXIFIFD",o),s.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"]);const a={TIFF_TAGS:n,ifdTags:s,GEO_KEYS:i,getTagName:(e,t)=>{let r=(t||n)[e];return void 0===r&&(r="unknown"+String(e)),r}}},81578:(e,t,r)=>{r.d(t,{A:()=>a,r:()=>s});const n=9999999e31,o=2e-7,i={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE],unknown:void 0,c64:void 0,c128:void 0};function s(e){return i[e]??[-34028234663852886e22,34028234663852886e22]}function a(e,t,r){if(e.depthCount&&e.depthCount>1)return;const{pixels:i,statistics:a,pixelType:l}=e,u=i[0].length,c=e.bandMasks??[],h=e.mask??new Uint8Array(u).fill(255),f="f32"===l||"f64"===l,d=s(l);let p=!1;for(let e=0;e<i.length;e++){const s="number"==typeof t?t:t[e];if(null==s)continue;const g=a?.[e].minValue??d[0],m=a?.[e].maxValue??d[1];if(g>s+Number.EPSILON||m<s-Number.EPSILON)continue;const y=c[e]||new Uint8Array(u).fill(255),w=i[e],C=r?.customFloatTolerance;if(f&&0!==C){let e=C;e||(e=Math.abs(s)>=n?o*Math.abs(s):"f32"===l?2**-23:Number.EPSILON);for(let t=0;t<w.length;t++)y[t]&&Math.abs(w[t]-s)<e&&(w[t]=0,y[t]=0,h[t]=0,p=!0)}else for(let e=0;e<w.length;e++)y[e]&&w[e]===s&&(w[e]=0,y[e]=0,h[e]=0,p=!0);c[e]=y}p&&(e.bandMasks=c,e.mask=h),p&&"updateStatistics"in e&&e.updateStatistics()}},48279:(e,t,r)=>{r.d(t,{f:()=>n});const n=(()=>{const e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]})()},55914:(e,t,r)=>{r.d(t,{CD:()=>o,DX:()=>n,Gd:()=>c,Pz:()=>h,Qh:()=>L,SJ:()=>f,Uk:()=>B,Vl:()=>R,XV:()=>d,a2:()=>m,hd:()=>l,nA:()=>x,nk:()=>u,oB:()=>v,pW:()=>A,sS:()=>b,us:()=>T,wV:()=>p,zp:()=>g});var n,o,i,s=r(5847),a=r(81578);(i=n||(n={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(e){e[e.bestMatch=0]="bestMatch",e[e.fail=1]="fail"}(o||(o={}));const l=6;function u(e){return null!=e&&"esri.layers.support.PixelBlock"===e.declaredClass&&e.pixels&&e.pixels.length>0}function c(e){if(!e?.length||e.some((e=>!u(e))))return null;if(1===e.length)return e[0]?.clone()??null;const t=e,{width:r,height:n,pixelType:o}=t[0];if(t.some((e=>e.width!==r||e.height!==n)))return null;const i=t.map((({mask:e})=>e)).filter((e=>null!=e));let a=null;i.length&&(a=new Uint8Array(r*n),a.set(i[0]),i.length>1&&C(i.slice(1),a));const l=[];t.forEach((({pixels:e})=>l.push(...e)));const c=t.map((({statistics:e})=>e)).filter((e=>e?.length)),h=[];return c.forEach((e=>h.push(...e))),new s.Z({pixelType:o,width:r,height:n,mask:a,pixels:l,statistics:h.length?h:null})}function h(e){if(!e)return;const t=e.colormap;if(!t||0===t.length)return;const r=t.sort(((e,t)=>e[0]-t[0]));let n=0;r[0][0]<0&&(n=r[0][0]);const o=Math.max(256,r[r.length-1][0]-n+1),i=new Uint8Array(4*o),s=[];let a,l=0,u=0;const c=5===r[0].length;if(o>65536)return r.forEach((e=>{s[e[0]-n]=c?e.slice(1):e.slice(1).concat([255])})),{indexed2DColormap:s,offset:n,alphaSpecified:c};if(e.fillUnspecified)for(a=r[u],l=a[0]-n;l<o;l++)i[4*l]=a[1],i[4*l+1]=a[2],i[4*l+2]=a[3],i[4*l+3]=c?a[4]:255,l===a[0]-n&&(a=u===r.length-1?a:r[++u]);else for(l=0;l<r.length;l++)a=r[l],u=4*(a[0]-n),i[u]=a[1],i[u+1]=a[2],i[u+2]=a[3],i[u+3]=c?a[4]:255;return{indexedColormap:i,offset:n,alphaSpecified:c}}function f(e,t){if(!u(e))return e;if(!t||!t.indexedColormap&&!t.indexed2DColormap)return e;const r=e.clone(),n=r.pixels;let o=r.mask;const i=r.width*r.height;if(1!==n.length)return e;const{indexedColormap:s,indexed2DColormap:a,offset:l,alphaSpecified:c}=t;let h=0;const f=n[0],d=new Uint8Array(f.length),p=new Uint8Array(f.length),g=new Uint8Array(f.length);let m,y=0;if(s){const e=s.length-1;if(null!=o)for(h=0;h<i;h++)o[h]&&(y=4*(f[h]-l),y<l||y>e?o[h]=0:(d[h]=s[y],p[h]=s[y+1],g[h]=s[y+2],o[h]=s[y+3]));else{for(o=new Uint8Array(i),h=0;h<i;h++)y=4*(f[h]-l),y<l||y>e?o[h]=0:(d[h]=s[y],p[h]=s[y+1],g[h]=s[y+2],o[h]=s[y+3]);r.mask=o}}else if(a)if(null!=o)for(h=0;h<i;h++)o[h]&&(m=a[f[h]],d[h]=m[0],p[h]=m[1],g[h]=m[2],o[h]=m[3]);else{for(o=new Uint8Array(i),h=0;h<i;h++)m=a[f[h]],d[h]=m[0],p[h]=m[1],g[h]=m[2],o[h]=m[3];r.mask=o}return r.pixels=[d,p,g],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=c,r}function d(e,t){if(!u(e))return null;const{pixels:r,mask:n}=e,o=r.length;let i=t.lut;const{offset:a}=t;i&&1===i[0].length&&(i=r.map((()=>i)));const l=[],c=t.outputPixelType||"u8";for(let e=0;e<o;e++){const t=p(r[e],n,i[e],a||0,c);l.push(t)}const h=new s.Z({width:e.width,height:e.height,pixels:l,mask:n,pixelType:c});return h.updateStatistics(),h}function p(e,t,r,n,o){const i=e.length,a=s.Z.createEmptyBand(o,i);if(t)for(let o=0;o<i;o++)t[o]&&(a[o]=r[e[o]-n]);else for(let t=0;t<i;t++)a[t]=r[e[t]-n];return a}function g(e,t){if(!u(e))return null;const r=e.clone(),{pixels:n}=r,o=r.width*r.height,i=t.length,s=Math.floor(i/2),a=t[Math.floor(s)],l=n[0];let c,h,f,d,p,g,m=!1;const y=new Uint8Array(o),w=new Uint8Array(o),C=new Uint8Array(o);let b=r.mask;const v=4===t[0].mappedColor.length;for(b||(b=new Uint8Array(o),b.fill(v?255:1),r.mask=b),p=0;p<o;p++)if(b[p]){for(c=l[p],m=!1,g=s,h=a,f=0,d=i-1;d-f>1;){if(c===h.value){m=!0;break}c>h.value?f=g:d=g,g=Math.floor((f+d)/2),h=t[Math.floor(g)]}m||(c===t[f].value?(h=t[f],m=!0):c===t[d].value?(h=t[d],m=!0):c<t[f].value?(m=!1,h=null):c>t[f].value&&(c<t[d].value?(h=t[f],m=!0):d===i-1?(m=!1,h=null):(h=t[d],m=!0))),m?(y[p]=h.mappedColor[0],w[p]=h.mappedColor[1],C[p]=h.mappedColor[2],b[p]=h.mappedColor[3]):y[p]=w[p]=C[p]=b[p]=0}return r.pixels=[y,w,C],r.mask=b,r.pixelType="u8",r.maskIsAlpha=v,r}function m(e,t){if(!u(e))return null;const{width:r,height:n}=e,{inputRanges:o,outputValues:i,outputPixelType:l,noDataRanges:c,allowUnmatched:h,isLastInputRangeInclusive:f}=t,d=e.pixels[0],p=s.Z.createEmptyBand(l,d.length),g=e.mask,m=new Uint8Array(r*n);g?m.set(g):m.fill(255);const y=e.pixelType.startsWith("f")?1e-6:0,w=o.map((e=>e-y));w[0]=o[0],w[w.length-1]=o[o.length-1]+(f?1e-6:0);const C=o.length/2,[b,v]=(0,a.r)(l);for(let e=0;e<n;e++)for(let t=0;t<r;t++){const n=e*r+t;if(m[n]){const e=d[n];let t=!1;for(let r=C-1;r>=0;r--)if(e===w[2*r]||e>w[2*r]&&e<w[2*r+1]){p[n]=i[r],t=!0;break}t||(h?p[n]=e>v?v:e<b?b:e:m[n]=0)}}const x=c?.length;if(x)for(let e=0;e<n;e++)for(let t=0;t<r;t++){const n=e*r+t;if(!g||g[n]){const e=d[n];for(let t=0;t<x;t+=2)if(e>=c[t]&&e<=c[t+1]){p[n]=0,m[n]=0;break}}}return new s.Z({width:r,height:n,pixelType:l,pixels:[p],mask:m})}function y(e,t,r,n){const o=null!=r&&r.length>=2?new Set(r):null,i=1===r?.length?r[0]:null,s=!!t?.length;for(let r=0;r<e.length;r++)if(n[r]){const a=e[r];if(s){let e=!1;for(let r=0;r<t.length;r+=2)if(a>=t[r]&&a<=t[r+1]){e=!0;break}e||(n[r]=0)}n[r]&&(a===i||o?.has(a))&&(n[r]=0)}}function w(e,t){const r=e[0].length;for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(e[t][n]){r=!0;break}r||(t[n]=0)}}function C(e,t){const r=e[0].length;for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(0===e[t][n]){r=!0;break}r&&(t[n]=0)}}function b(e,t){if(!u(e))return null;const{width:r,height:n,pixels:o}=e,i=r*n,a=new Uint8Array(i);e.mask?a.set(e.mask):a.fill(255);const l=o.length,{includedRanges:c,noDataValues:h,outputPixelType:f,matchAll:d,lookups:g}=t;if(g){const e=[];for(let t=0;t<l;t++){const r=g[t],n=p(o[t],a,r.lut,r.offset||0,"u8");e.push(n)}1===e.length?a.set(e[0]):d?w(e,a):C(e,a)}else if(d){const e=[];for(let t=0;t<l;t++){const r=new Uint8Array(i);r.set(a),y(o[t],c?.slice(2*t,2*t+2),h?.[t],r),e.push(r)}1===e.length?a.set(e[0]):w(e,a)}else for(let e=0;e<l;e++)y(o[e],c?.slice(2*e,2*e+2),h?.[e],a);return new s.Z({width:r,height:n,pixelType:f,pixels:o,mask:a})}function v(e){const{srcPixelType:t,inputRanges:r,outputValues:n,allowUnmatched:o,noDataRanges:i,isLastInputRangeInclusive:l,outputPixelType:u}=e;if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const c=t.includes("16")?65536:256,h=t.includes("s")?-c/2:0,f=s.Z.createEmptyBand(u,c),d=new Uint8Array(c);o&&d.fill(255);const[p,g]=(0,a.r)(u);if(r?.length&&n?.length){const e=1e-6,t=r.map((t=>t-e));t[0]=r[0],l&&(t[t.length-1]=r[r.length-1]);for(let e=0;e<t.length;e++){const r=n[e]>g?g:n[e]<p?p:n[e],o=Math.ceil(t[2*e]-h),i=Math.floor(t[2*e+1]-h);for(let e=o;e<=i;e++)f[e]=r,d[e]=255}}if(i?.length)for(let e=0;e<i.length;e++){const t=Math.ceil(i[2*e]-h),r=Math.floor(i[2*e+1]-h);for(let e=t;e<=r;e++)d[e]=0}return{lut:f,offset:h,mask:d}}function x(e,t,r){if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const n=e.includes("16")?65536:256,o=e.includes("s")?-n/2:0,i=new Uint8Array(n);if(t)for(let e=0;e<t.length;e++){const r=Math.ceil(t[2*e]-o),n=Math.floor(t[2*e+1]-o);for(let e=r;e<=n;e++)i[e]=255}else i.fill(255);if(r)for(let e=0;e<r.length;e++)i[r[e]-o]=0;return{lut:i,offset:o}}function k(e,t,r,n,o,i){const{width:s,height:a}=r.block,{x:l,y:u}=r.offset,{width:c,height:h}=r.mosaic,f=function(e,t,r,n,o,i,s,a){return{xmin:o<=r*e?0:o<r*e+e?o-r*e:e,ymin:i<=n*t?0:i<n*t+t?i-n*t:t,xmax:o+s<=r*e?0:o+s<r*e+e?o+s-r*e:e,ymax:i+a<=n*t?0:i+a<n*t+t?i+a-n*t:t}}(s,a,n,o,l,u,c,h);let d=0,p=0;if(i){const e=i.hasGCSSShiftTransform?360:i.halfWorldWidth??0,t=s*i.resolutionX,r=i.startX+n*t;r<e&&r+t>e?p=i.rightPadding:r>=e&&(d=i.leftMargin-i.rightPadding,p=0)}if(f.xmax-=p,"number"!=typeof t)for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*c+(n*s-l)+d,h=r*s;for(let r=f.xmin;r<f.xmax;r++)e[i+r]=t[h+r]}else for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*c+(n*s-l)+d;for(let r=f.xmin;r<f.xmax;r++)e[i+r]=t}}function T(e,t,r={}){const{clipOffset:n,clipSize:o,alignmentInfo:i,blockWidths:a}=r;if(a)return function(e,t,r){const n=e.find((e=>null!=e));if(null==n)return null;const o=e.some((e=>null==e||!!e.mask)),{width:i,height:a}=t,l=o?new Uint8Array(i*a):null,{blockWidths:c}=r,h=[],f=n.getPlaneCount(),d=s.Z.getPixelArrayConstructor(n.pixelType);if(o)for(let t=0,r=0;t<e.length;r+=c[t],t++){const n=e[t];if(!u(n))continue;const o=n.mask;for(let e=0;e<a;e++)for(let s=0;s<c[t];s++)l[e*i+s+r]=null==o?255:o[e*n.width+s]}const p=e.some((e=>null!=e&&e.bandMasks&&e.bandMasks.length>1)),g=p?[]:void 0,m=i*a;for(let t=0;t<f;t++){const r=new d(m),n=p?new Uint8Array(m):void 0;for(let o=0,s=0;o<e.length;s+=c[o],o++){const l=e[o];if(!u(l))continue;const h=l.pixels[t];if(null!=h){for(let e=0;e<a;e++)for(let t=0;t<c[o];t++)r[e*i+t+s]=h[e*l.width+t];if(n){const e=l.bandMasks?.[t]??l.mask;for(let t=0;t<a;t++)for(let r=0;r<c[o];r++)n[t*i+r+s]=e?e[t*l.width+r]:255}}}h.push(r),g&&n&&g.push(n)}const y=new s.Z({width:i,height:a,mask:l,bandMasks:g,pixels:h,pixelType:n.pixelType});return y.updateStatistics(),y}(e,t,{blockWidths:a});const l=e.find((e=>u(e)));if(null==l)return null;const c=o?o.width:t.width,h=o?o.height:t.height,f=l.width,d=l.height,p=t.width/f,g=t.height/d,m={offset:n||{x:0,y:0},mosaic:o||t,block:{width:f,height:d}},y=l.pixelType,w=s.Z.getPixelArrayConstructor(y),C=l.pixels.length,b=[];let v,x;for(let t=0;t<C;t++){x=new w(c*h);for(let r=0;r<g;r++)for(let n=0;n<p;n++){const o=e[r*p+n];u(o)&&(v=o.pixels[t],k(x,v,m,n,r,i))}b.push(x)}const T=e.some((e=>null==e||null!=e.mask&&e.mask.length>0)),A=e.some((e=>null!=e&&e.bandMasks&&e.bandMasks.length>1)),S=T?new Uint8Array(c*h):void 0,I=A?[]:void 0;if(S){for(let t=0;t<g;t++)for(let r=0;r<p;r++){const n=e[t*p+r],o=null!=n?n.mask:null;k(S,null!=o?o:n?255:0,m,r,t,i)}if(I)for(let t=0;t<C;t++){const r=new Uint8Array(c*h);for(let n=0;n<g;n++)for(let o=0;o<p;o++){const s=e[n*p+o],a=s?.bandMasks?.[t]??s?.mask;k(r,null!=a?a:s?255:0,m,o,n,i)}I.push(r)}}const M=new s.Z({width:c,height:h,pixels:b,pixelType:y,bandMasks:I,mask:S});return M.updateStatistics(),M}function A(e,t,r){if(!u(e))return null;const{width:n,height:o}=e,i=t.x,s=t.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>n||l>o)return e;if(0===i&&0===s&&a===n&&l===o)return e;e.mask||(e.mask=new Uint8Array(n*o));const c=e.mask;for(let e=0;e<o;e++){const t=e*n;for(let r=0;r<n;r++)c[t+r]=e<s||e>=l||r<i||r>=a?0:1}return e.updateStatistics(),e}function S(e){if(!u(e))return null;const t=e.clone(),{width:r,height:n,pixels:o}=e,i=o[0],s=t.pixels[0],a=e.mask;for(let e=2;e<n-1;e++){const t=new Map;for(let n=e-2;n<e+2;n++)for(let e=0;e<4;e++){const o=n*r+e;P(t,i[o],a?a[o]:1)}s[e*r]=I(t),s[e*r+1]=s[e*r+2]=s[e*r];let n=3;for(;n<r-1;n++){let o=(e-2)*r+n+1;P(t,i[o],a?a[o]:1),o=(e-1)*r+n+1,P(t,i[o],a?a[o]:1),o=e*r+n+1,P(t,i[o],a?a[o]:1),o=(e+1)*r+n+1,P(t,i[o],a?a[o]:1),o=(e-2)*r+n-3,M(t,i[o],a?a[o]:1),o=(e-1)*r+n-3,M(t,i[o],a?a[o]:1),o=e*r+n-3,M(t,i[o],a?a[o]:1),o=(e+1)*r+n-3,M(t,i[o],a?a[o]:1),s[e*r+n]=I(t)}s[e*r+n+1]=s[e*r+n]}for(let e=0;e<r;e++)s[e]=s[r+e]=s[2*r+e],s[(n-1)*r+e]=s[(n-2)*r+e];return t.updateStatistics(),t}function I(e){if(0===e.size)return 0;let t=0,r=-1,n=0;const o=e.keys();let i=o.next();for(;!i.done;)n=e.get(i.value),n>t&&(r=i.value,t=n),i=o.next();return r}function M(e,t,r){if(0===r)return;const n=e.get(t);1===n?e.delete(t):e.set(t,n-1)}function P(e,t,r){0!==r&&e.set(t,e.has(t)?e.get(t)+1:1)}function D(e,t,r){let{x:n,y:o}=t;const{width:i,height:a}=r;if(0===n&&0===o&&a===e.height&&i===e.width)return e;const{width:l,height:c}=e,h=Math.max(0,o),f=Math.max(0,n),d=Math.min(n+i,l),p=Math.min(o+a,c);if(d<0||p<0||!u(e))return null;n=Math.max(0,-n),o=Math.max(0,-o);const{pixels:g}=e,m=i*a,y=g.length,w=[];for(let t=0;t<y;t++){const r=g[t],a=s.Z.createEmptyBand(e.pixelType,m);for(let e=h;e<p;e++){const t=e*l;let s=(e+o-h)*i+n;for(let e=f;e<d;e++)a[s++]=r[t+e]}w.push(a)}const C=new Uint8Array(m),b=e.mask;for(let e=h;e<p;e++){const t=e*l;let r=(e+o-h)*i+n;for(let e=f;e<d;e++)C[r++]=b?b[t+e]:1}const v=new s.Z({width:r.width,height:r.height,pixelType:e.pixelType,pixels:w,mask:C});return v.updateStatistics(),v}function E(e,t=!0){if(!u(e))return null;const{pixels:r,width:n,height:o,mask:i,pixelType:a}=e,l=[],c=Math.round(n/2),h=Math.round(o/2),f=o-1,d=n-1;for(let e=0;e<r.length;e++){const i=r[e],u=s.Z.createEmptyBand(a,c*h);let p=0;for(let e=0;e<o;e+=2)for(let r=0;r<n;r+=2){const o=i[e*n+r];if(t){const t=r===d?o:i[e*n+r+1],s=e===f?o:i[e*n+r+n],a=r===d?s:e===f?t:i[e*n+r+n+1];u[p++]=(o+t+s+a)/4}else u[p++]=o}l.push(u)}let p=null;if(null!=i){p=new Uint8Array(c*h);let e=0;for(let r=0;r<o;r+=2)for(let o=0;o<n;o+=2){const s=i[r*n+o];if(t){const t=o===d?s:i[r*n+o+1],a=r===f?s:i[r*n+o+n],l=o===d?a:r===f?t:i[r*n+o+n+1];p[e++]=s*t*a*l?1:0}else p[e++]=s}}return new s.Z({width:c,height:h,pixelType:a,pixels:l,mask:p})}function R(e,t,r){if(!u(e))return null;const{width:n,height:o}=t;let{width:i,height:s}=e;const a=new Map,l={x:0,y:0},c=null==r?1:1+r;let h=e;for(let e=0;e<c;e++){const r=Math.ceil(i/n),u=Math.ceil(s/o);for(let i=0;i<u;i++){l.y=i*o;for(let o=0;o<r;o++){l.x=o*n;const r=D(h,l,t);a.set(`${e}/${i}/${o}`,r)}}e<c-1&&(h=E(h)),i=Math.round(i/2),s=Math.round(s/2)}return a}function _(e,t,r,n,o=0){const{width:i,height:s}=e,{width:a,height:l}=t,u=n.cols,c=n.rows,h=Math.ceil(a/u-.1/u),f=Math.ceil(l/c-.1/c);let d,p,g,m,y,w,C;const b=h*u,v=b*f*c,x=new Float32Array(v),k=new Float32Array(v),T=new Uint32Array(v),A=new Uint32Array(v);let S,I,M=0;for(let e=0;e<f;e++)for(let t=0;t<h;t++){d=12*(e*h+t),p=r[d],g=r[d+1],m=r[d+2],y=r[d+3],w=r[d+4],C=r[d+5];for(let r=0;r<c;r++){M=(e*c+r)*b+t*u,I=(r+.5)/c;for(let e=0;e<r;e++)S=(e+.5)/u,x[M+e]=(p*S+g*I+m)*i+o,k[M+e]=(y*S+w*I+C)*s+o,T[M+e]=Math.floor(x[M+e]),A[M+e]=Math.floor(k[M+e])}d+=6,p=r[d],g=r[d+1],m=r[d+2],y=r[d+3],w=r[d+4],C=r[d+5];for(let r=0;r<c;r++){M=(e*c+r)*b+t*u,I=(r+.5)/c;for(let e=r;e<u;e++)S=(e+.5)/u,x[M+e]=(p*S+g*I+m)*i+o,k[M+e]=(y*S+w*I+C)*s+o,T[M+e]=Math.floor(x[M+e]),A[M+e]=Math.floor(k[M+e])}}return{offsets_x:x,offsets_y:k,offsets_xi:T,offsets_yi:A,gridWidth:b}}function L(e,t){const{coefficients:r,spacing:n}=t,{offsets_x:o,offsets_y:i,gridWidth:s}=_(e,e,r,{rows:n[0],cols:n[1]}),{width:a,height:l}=e,u=new Float32Array(a*l),c=180/Math.PI;for(let e=0;e<l;e++)for(let t=0;t<a;t++){const r=e*s+t,n=0===e?r:r-s,h=e===l-1?r:r+s,f=o[n]-o[h],d=i[h]-i[n];if(isNaN(f)||isNaN(d))u[e*a+t]=90;else{let r=Math.atan2(d,f)*c;r=(360+r)%360,u[e*a+t]=r}}return u}function B(e,t,r,n,o="nearest"){if(!u(e))return null;"majority"===o&&(e=S(e));const{pixels:i,mask:a,pixelType:l}=e,c=e.width,h=e.height,f=s.Z.getPixelArrayConstructor(l),d=i.length,{width:p,height:g}=t;let m=!1;for(let e=0;e<r.length;e+=3)-1===r[e]&&-1===r[e+1]&&-1===r[e+2]&&(m=!0);const{offsets_x:y,offsets_y:w,offsets_xi:C,offsets_yi:b,gridWidth:v}=_({width:c,height:h},t,r,n,"majority"===o?.5:0);let x;const k=(e,t,r)=>{const n=e instanceof Float32Array||e instanceof Float64Array?0:.5;for(let o=0;o<g;o++){x=o*v;for(let i=0;i<p;i++){if(y[x]<0||w[x]<0)e[o*p+i]=0;else if(r)e[o*p+i]=t[C[x]+b[x]*c];else{const r=Math.floor(y[x]),s=Math.floor(w[x]),l=Math.ceil(y[x]),u=Math.ceil(w[x]),h=y[x]-r,f=w[x]-s;if(!a||a[r+s*c]&&a[l+s*c]&&a[r+u*c]&&a[l+u*c]){const a=(1-h)*t[r+s*c]+h*t[l+s*c],d=(1-h)*t[r+u*c]+h*t[l+u*c];e[o*p+i]=(1-f)*a+f*d+n}else e[o*p+i]=t[C[x]+b[x]*c]}x++}}},T=[];let A;for(let e=0;e<d;e++)A=new f(p*g),k(A,i[e],"nearest"===o||"majority"===o),T.push(A);const I=new s.Z({width:p,height:g,pixelType:l,pixels:T});if(null!=a)I.mask=new Uint8Array(p*g),k(I.mask,a,!0);else if(m){I.mask=new Uint8Array(p*g);for(let e=0;e<p*g;e++)I.mask[e]=y[e]<0||w[e]<0?0:1}return I.updateStatistics(),I}},15612:(e,t,r)=>{r.d(t,{AV:()=>m,Hv:()=>p,Oh:()=>g,ZF:()=>h,dy:()=>w,hE:()=>c,js:()=>d,oc:()=>u,um:()=>y});var n=r(70586),o=r(5847),i=r(81578),s=r(75509);const a=1,l=[.299,.587,.114];function u(e,t=256){t=Math.min(t,256);const{size:r,counts:n}=e,o=new Uint8Array(r),i=n.reduce(((e,r)=>e+r/t),0);let s=0,a=0,l=0,u=i;for(let e=0;e<r;e++)if(l+=n[e],!(e<r-1&&l+n[e+1]<u)){for(;s<t-1&&u<l;)s++,u+=i;for(let t=a;t<=e;t++)o[t]=s;a=e+1}for(let e=a;e<r;e++)o[e]=t-1;return o}function c(e){const{minCutOff:t,maxCutOff:r,gamma:n,pixelType:o,rounding:i}=e,s=e.outMin||0,a=e.outMax||255;if(!["u8","u16","s8","s16"].includes(o))return null;const l=t.length;let u,c,h=0;"s8"===o?h=-127:"s16"===o&&(h=-32767);let f=256;["u16","s16"].includes(o)&&(f=65536);const d=[],p=[],g=a-s;for(u=0;u<l;u++)p[u]=r[u]-t[u],d[u]=0===p[u]?0:g/p[u];let m;const w=[];let C,b,v;if(n&&n.length>=l){const e=y(l,n);for(u=0;u<l;u++){for(v=[],c=0;c<f;c++)if(0!==p[u])if(C=c+h,m=(C-t[u])/p[u],b=1,n[u]>1&&(b-=(1/g)**(m*e[u])),C<r[u]&&C>t[u]){const e=b*g*m**(1/n[u])+s;v[c]="floor"===i?Math.floor(e):"round"===i?Math.round(e):e}else C>=r[u]?v[c]=a:v[c]=s;else v[c]=s;w[u]=v}}else for(u=0;u<l;u++){for(v=[],c=0;c<f;c++)if(C=c+h,C<=t[u])v[c]=s;else if(C>=r[u])v[c]=a;else{const e=(C-t[u])*d[u]+s;v[c]="floor"===i?Math.floor(e):"round"===i?Math.round(e):e}w[u]=v}if(null!=e.contrastOffset){const t=function(e,t){const r=Math.min(Math.max(e,-100),100),n=Math.min(Math.max(t??0,-100),100),o=255;let i=0,s=0;const a=new Uint8Array(256);for(i=0;i<256;i++)r>0&&r<100?s=(200*i-25500+510*n)/(2*(100-r))+128:r<=0&&r>-100?s=(200*i-25500+510*n)*(100+r)/2e4+128:100===r?(s=200*i-25500+256*(100-r)+510*n,s=s>0?o:0):-100===r&&(s=128),a[i]=s>o?o:s<0?0:s;return a}(e.contrastOffset,e.brightnessOffset);for(u=0;u<l;u++)for(v=w[u],c=0;c<f;c++)v[c]=t[v[c]]}return{lut:w,offset:h}}function h(e,t,r){const n=[];for(let o=0;o<t.length;o++){let i=0,s=0,a=0;"min"in t[o]?({min:i,max:s,avg:a}=t[o]):[i,s,a]=t[o];let u=a??0;"u8"!==e&&(u=255*(u-i)/(s-i)),r&&(u*=l[o]),n.push(f(u))}return n}function f(e){if(e<=0||e>=255)return a;let t=0;150!==e&&(t=e<=150?45*Math.cos(.01047*e):17*Math.sin(.021*e));const r=e+t,n=Math.log(e/255),o=Math.log(r/255);if(0===o)return a;const i=n/o;return isNaN(i)?a:Math.min(9.9,Math.max(.01,i))}function d(e){const{pixels:t,mask:r,pixelType:n}=e,o=t.map((e=>function(e,t,r,n){let o=1/0,i=-1/0,s=0,a=0;const l=e.length;for(let r=0;r<l;r++){const n=e[r];t&&!t[r]||(o=n<o?n:o,i=n>i?n:i,s+=n,a++)}if(0===a)return{statistics:{min:0,max:0,avg:0,stddev:0},histogram:null};const u=s/a;let c=0;for(let r=0;r<l;r++)t&&!t[r]||(c+=(e[r]-u)**2);const h=t?t.filter((e=>e)).length:l,f={min:o,max:i,avg:u,stddev:h<=1?0:Math.sqrt(c/(h-1))};if(["u8","s8","u4","u2","u1"].includes(r)){const r=i-o+1,n=new Uint32Array(r);for(let r=0;r<l;r++)t&&!t[r]||n[e[r]-o]++;return{statistics:f,histogram:{min:o-.5,max:i+.5,size:r,counts:n}}}const d=256,p=new Uint32Array(d),g=(i-o)/d;if(0===g)return{statistics:f,histogram:{min:o,max:i,size:1,counts:new Uint32Array(1).fill(a)}};const m=new Uint32Array(257);for(let r=0;r<l;r++)t&&!t[r]||m[Math.floor((e[r]-o)/g)]++;for(let e=0;e<255;e++)p[e]=m[e];return p[255]=m[255]+m[d],{statistics:f,histogram:{min:o,max:i,size:d,counts:p}}}(e,r,n)));return{statistics:o.map((({statistics:e})=>e)),histograms:o.map((({histogram:e})=>e))}}function p(e){if(null==e||!e.pixels?.length)return null;const{pixels:t,mask:r,pixelType:n}=e,o=e.width*e.height,i=t.length;let s,a,l,u,c;const h=[],f=[];let d,p,g,m,y,w,C,b,v,x;const k=256;for(u=0;u<i;u++){if(d=new Uint32Array(k),g=t[u],"u8"===n)if(s=-.5,a=255.5,r)for(c=0;c<o;c++)r[c]&&d[g[c]]++;else for(c=0;c<o;c++)d[g[c]]++;else{let t=!1;e.statistics||(e.updateStatistics(),t=!0);const n=e.statistics;if(s=n[u].minValue,a=n[u].maxValue,l=(a-s)/k,0===l){!n||e.validPixelCount||t||e.updateStatistics();const r=(e.validPixelCount||e.width*e.height)/k;for(let e=0;e<k;e++)d[e]=Math.round(r*(e+1))-Math.round(r*e)}else{for(p=new Uint32Array(257),c=0;c<o;c++)r&&!r[c]||p[Math.floor((g[c]-s)/l)]++;for(c=0;c<255;c++)d[c]=p[c];d[255]=p[255]+p[k]}}for(h.push({min:s,max:a,size:k,counts:d}),m=0,y=0,b=0,c=0;c<k;c++)m+=d[c],y+=c*d[c];for(v=y/m,c=0;c<k;c++)b+=d[c]*(c-v)**2;x=Math.sqrt(b/(m-1)),l=(a-s)/k,w=(v+.5)*l+s,C=x*l,f.push({min:s,max:a,avg:w,stddev:C})}return{statistics:f,histograms:h}}function g(e){const t=[];for(let r=0;r<e.length;r++){const{min:n,max:o,size:i,counts:s}=e[r];let a=0,l=0;for(let e=0;e<i;e++)a+=s[e],l+=e*s[e];const u=l/a;let c=0;for(let e=0;e<i;e++)c+=s[e]*(e-u)**2;const h=(o-n)/i,f=(u+.5)*h+n,d=Math.sqrt(c/(a-1))*h;t.push({min:n,max:o,avg:f,stddev:d})}return t}function m(e,t){const{pixelBlock:r,bandIds:o,returnHistogramLut:a,rasterInfo:l}=t;let c=null,h=null,f=e.stretchType;if("number"==typeof f&&(f=s.J[f]),e.dra)if("minMax"===f&&null!=r&&r.statistics)c=r.statistics.map((e=>[e.minValue,e.maxValue,0,0]));else{const e=p(r);c=null!=e?e.statistics:null,h=null!=e?e.histograms:null}else c=e.statistics?.length>0?e.statistics:l.statistics,h="histograms"in e?e.histograms:void 0,h||(h=l.histograms);"percentClip"!==f&&"histogramEqualization"!==f||h?.length||(f="minMax");const d=c?.length||h?.length||l.bandCount,g=[],m=[];let y,w,C,b,v,x,k,T,A;c&&!Array.isArray(c[0])&&(c=c.map((e=>[e.min,e.max,e.avg,e.stddev])));const[S,I]=(0,i.r)(l.pixelType);if(!c?.length){for(c=[],T=0;T<d;T++)c.push([S,I,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(T=0;T<d;T++)g[T]=S,m[T]=I;break;case"minMax":for(T=0;T<d;T++){const e=c[T];g[T]=e[0],m[T]=e[1]}break;case"standardDeviation":for(T=0;T<d;T++){const t=c[T];g[T]=t[2]-e.numberOfStandardDeviations*t[3],m[T]=t[2]+e.numberOfStandardDeviations*t[3],g[T]<t[0]&&(g[T]=t[0]),m[T]>t[1]&&(m[T]=t[1])}break;case"histogramEqualization":for((0,n.O3)(h),T=0;T<d;T++)g[T]=h[T].min,m[T]=h[T].max;break;case"percentClip":for((0,n.O3)(h),T=0;T<h.length;T++){for(y=h[T],v=new Uint32Array(y.size),b=[...y.counts],b.length>=20&&(b[0]=b[1]=b[2]=b[b.length-1]=b[b.length-2]=0),C=0,w=(y.max-y.min)/y.size,k=-.5===y.min&&1===w?.5:0,A=0;A<y.size;A++)C+=b[A],v[A]=C;for(x=(e.minPercent||0)*C/100,g[T]=y.min+k,A=0;A<y.size;A++)if(v[A]>x){g[T]=y.min+w*(A+k);break}for(x=(1-(e.maxPercent||0)/100)*C,m[T]=y.max+k,A=y.size-2;A>=0;A--)if(v[A]<x){m[T]=y.min+w*(A+2-k);break}if(m[T]<g[T]){const e=g[T];g[T]=m[T],m[T]=e}}break;default:for(T=0;T<d;T++){const e=c[T];g[T]=e[0],m[T]=e[1]}}let M,P,D;return"histogramEqualization"===f?((0,n.O3)(h),P=h[0].size||256,M=0,a&&(D=h.map((e=>u(e))))):(P=e.max||255,M=e.min||0),function(e,t){if(null==t||0===t.length)return e;const r=Math.max.apply(null,t),{minCutOff:n,maxCutOff:o,outMin:i,outMax:s,histogramLut:a}=e;return n.length===t.length||n.length<=r?e:{minCutOff:t.map((e=>n[e])),maxCutOff:t.map((e=>o[e])),histogramLut:a?t.map((e=>a[e])):null,outMin:i,outMax:s}}({minCutOff:g,maxCutOff:m,outMax:P,outMin:M,histogramLut:D},o)}function y(e,t){const r=new Float32Array(e);for(let n=0;n<e;n++)t[n]>1?t[n]>2?r[n]=6.5+(t[n]-2)**2.5:r[n]=6.5+100*(2-t[n])**4:r[n]=1;return r}function w(e,t){if(null==e||!e.pixels?.length)return e;const{mask:r,width:n,height:i,pixels:s}=e,{minCutOff:a,maxCutOff:l,gamma:u}=t,c=t.outMin||0,h=t.outMax||255,f=n*i,d=t.outputPixelType||"u8",p=e.pixels.map((()=>o.Z.createEmptyBand(d,f))),g=p.length;let m,w,C,b,v;const x=h-c,k=[],T=[];for(m=0;m<g;m++)T[m]=l[m]-a[m],k[m]=0===T[m]?0:x/T[m];const A=d.startsWith("u")||d.startsWith("s"),S=u&&u.length>=g,I=!!t.isRenderer;if(S){const e=y(g,u);for(w=0;w<f;w++)if(null==r||r[w])for(m=0;m<g;m++)if(0!==T[m])if(C=s[m][w],v=(C-a[m])/T[m],b=1,u[m]>1&&(b-=(1/x)**(v*e[m])),C<l[m]&&C>a[m]){const e=b*x*v**(1/u[m])+c;p[m][w]=I?Math.floor(e):A?Math.round(e):e}else C>=l[m]?p[m][w]=h:p[m][w]=c;else p[m][w]=c}else for(w=0;w<f;w++)if(null==r||r[w])for(m=0;m<g;m++)if(C=s[m][w],C<l[m]&&C>a[m]){const e=(C-a[m])*k[m]+c;p[m][w]=I?Math.floor(e):A?Math.round(e):e}else C>=l[m]?p[m][w]=h:p[m][w]=c;const M=new o.Z({width:n,height:i,mask:r,pixels:p,pixelType:d});return M.updateStatistics(),M}},63342:(e,t,r)=>{r.d(t,{CX:()=>s,M_:()=>d,Ne:()=>p,TK:()=>a,Ub:()=>h,vC:()=>c,yg:()=>f});var n=r(5847),o=r(55914);const i=1,s=1/111e3;function a(e){let{altitude:t,azimuth:r}=e;const{hillshadeType:n,pixelSizePower:o=1,pixelSizeFactor:i=1,scalingType:a,isGCS:l,resolution:u}=e,c="multi-directional"===n?2*e.zFactor:e.zFactor,{x:h,y:f}=u;let d=c/(8*h),p=c/(8*f);if(l&&c>.001&&(d/=s,p/=s),"adjusted"===a)if(l){const e=h*s,t=f*s;d=(c+e**o*i)/(8*e),p=(c+t**o*i)/(8*t)}else d=(c+h**o*i)/(8*h),p=(c+f**o*i)/(8*f);let g=(90-t)*Math.PI/180,m=Math.cos(g),y=(360-r+90)*Math.PI/180,w=Math.sin(g)*Math.cos(y),C=Math.sin(g)*Math.sin(y);const b=[315,270,225,360,180,0],v=[60,60,60,60,60,90],x=new Float32Array([3,5,3,2,1,4]),k=x.reduce(((e,t)=>e+t)),T=x.map((e=>e/k)),A="multi-directional"===n?b.length:1,S=new Float32Array(6),I=new Float32Array(6),M=new Float32Array(6);if("multi-directional"===n)for(let e=0;e<A;e++)t=v[e],r=b[e],g=(90-t)*Math.PI/180,m=Math.cos(g),y=(360-r+90)*Math.PI/180,w=Math.sin(g)*Math.cos(y),C=Math.sin(g)*Math.sin(y),S[e]=m,I[e]=w,M[e]=C;else S.fill(m),I.fill(w),M.fill(C);return{resolution:u,factor:[d,p],sinZcosA:w,sinZsinA:C,cosZ:m,sinZcosAs:I,sinZsinAs:M,cosZs:S,weights:T,hillshadeType:["traditional","multi-directional"].indexOf(n)}}function l(e,t){const{width:r,height:n}=e,o=r*n,s=new Uint8Array(o),a=null!=e.mask;let l;if(a){l=new Uint8Array(e.mask);for(let e=0;e<l.length;e++)l[e]&&(s[e]=1,l[e]=1)}const u=e.pixels[0],c=new Float32Array(o),h=new Float32Array(o);let f,d=0;if(t){const{resolution:e}=t,r=e?(e.x+e.y)/2:1;d=200*t.zFactor/(r*r),f=new Float32Array(o)}const p=t?.curvatureType;let g,m,y,w,C,b,v,x;for(let e=i;e<n-i;e++){const t=e*r;for(let e=i;e<r-i;e++){const n=t+e;if(!l||0!==l[n]){if(l){if(l[n-r-1]+l[n-r]+l[n-r+1]+l[n-1]+l[n+1]+l[n+r-1]+l[n+r]+l[n+r+1]<7){s[n]=0;continue}g=l[n-r-1]?u[n-r-1]:u[n],m=l[n-r]?u[n-r]:u[n],y=l[n-r+1]?u[n-r+1]:u[n],w=l[n-1]?u[n-1]:u[n],C=l[n+1]?u[n+1]:u[n],b=l[n+r-1]?u[n+r-1]:u[n],v=l[n+r]?u[n+r]:u[n],x=l[n+r+1]?u[n+r+1]:u[n]}else g=u[n-r-1],m=u[n-r],y=u[n-r+1],w=u[n-1],C=u[n+1],b=u[n+r-1],v=u[n+r],x=u[n+r+1];if(c[n]=y+C+C+x-(g+w+w+b),h[n]=b+v+v+x-(g+m+m+y),null!=f){const e=u[n],t=.5*(w+C)-e,r=.5*(m+v)-e;if("standard"===p)f[n]=-d*(t+r);else{const e=(-g+y+b-x)/4,o=(-w+C)/2,i=(m-v)/2,s=o*o,a=i*i,l=s+a;l&&(f[n]="profile"===p?d*(t*s+r*a+e*o*i)/l:-d*(t*a+r*s-e*o*i)/l)}}}}}return{outMask:a?s:null,dzxs:c,dzys:h,curvatures:f}}function u(e,t,r){for(let n=0;n<r;n++)e[n*t]=e[n*t+1],e[(n+1)*t-1]=e[(n+1)*t-2];for(let n=1;n<t-1;n++)e[n]=e[n+t],e[n+(r-1)*t]=e[n+(r-2)*t]}function c(e,t){if(!(0,o.nk)(e))return e;const{factor:r,sinZcosA:s,sinZsinA:c,cosZ:h,sinZcosAs:f,sinZsinAs:d,cosZs:p,weights:g}=a(t),[m,y]=r,w="traditional"===t.hillshadeType,{width:C,height:b}=e,v=new Uint8Array(C*b),{dzxs:x,dzys:k,outMask:T}=l(e);for(let e=i;e<b-i;e++){const t=e*C;for(let e=i;e<C-i;e++){const r=t+e;if(!T||T[r]){const e=x[r]*m,t=k[r]*y,n=Math.sqrt(1+e*e+t*t);let o=0;if(w){let r=255*(h+c*t-s*e)/n;r<0&&(r=0),o=r}else{const r=d.length;for(let i=0;i<r;i++){let r=255*(p[i]+d[i]*t-f[i]*e)/n;r<0&&(r=0),o+=r*g[i]}}v[r]=255&o}}}return u(v,C,b),new n.Z({width:C,height:b,pixels:[v],mask:T,pixelType:"u8",validPixelCount:e.validPixelCount,statistics:[{minValue:0,maxValue:255}]})}function h(e,t,r,n){if(!(0,o.nk)(e)||!(0,o.nk)(t))return;const{min:i,max:s}=n,a=e.pixels[0],{pixels:l,mask:u}=t,c=l[0],h=255.00001/(s-i),f=new Uint8ClampedArray(c.length),d=new Uint8ClampedArray(c.length),p=new Uint8ClampedArray(c.length),g=r.length-1;for(let e=0;e<c.length;e++){if(u&&0===u[e])continue;const t=Math.floor((c[e]-i)*h),[n,o]=r[t<0?0:t>g?g:t],s=a[e],l=s*o,m=l*(1-Math.abs(n%2-1)),y=s-l;switch(Math.floor(n)){case 0:f[e]=l+y,d[e]=m+y,p[e]=y;break;case 1:f[e]=m+y,d[e]=l+y,p[e]=y;break;case 2:f[e]=y,d[e]=l+y,p[e]=m+y;break;case 3:f[e]=y,d[e]=m+y,p[e]=l+y;break;case 4:f[e]=m+y,d[e]=y,p[e]=l+y;break;case 5:case 6:f[e]=l+y,d[e]=y,p[e]=m+y}}e.pixels=[f,d,p],e.updateStatistics()}function f(e,t){if(!(0,o.nk)(e))return e;const r=t.zFactor,a=t.pixelSizePower??1,c=t.pixelSizeFactor??1,h=t.slopeType,f=t.isGCS,{x:d,y:p}=t.resolution;let g=r/(8*d),m=r/(8*p);f&&Math.abs(r-1)<1e-4&&(g/=s,m/=s),"adjusted"===h&&(g=(r+d**a*c)/(8*d),m=(r+p**a*c)/(8*p));const{dzxs:y,dzys:w,outMask:C}=l(e),{width:b,height:v}=e,x=new Float32Array(b*v);for(let e=i;e<v-i;e++){const t=e*b;for(let e=i;e<b-i;e++){const r=t+e;if(!C||C[r]){const n=y[r]*g,o=w[r]*m,i=Math.sqrt(n*n+o*o);x[t+e]="percent-rise"===h?100*i:57.2957795*Math.atan(i)}}}u(x,b,v);const k=new n.Z({width:b,height:v,pixels:[x],mask:C,pixelType:"f32",validPixelCount:e.validPixelCount});return k.updateStatistics(),k}function d(e,t={}){if(!(0,o.nk)(e))return e;const{resolution:r}=t,s=r?1/r.x:1,a=r?1/r.y:1,{dzxs:c,dzys:h,outMask:f}=l(e),{width:d,height:p}=e,g=new Float32Array(d*p);for(let e=i;e<p-i;e++){const t=e*d;for(let e=i;e<d-i;e++){const r=t+e;if(!f||f[r]){const n=c[r]*s,o=h[r]*a;let i=-1;0===n&&0===o||(i=90-57.29578*Math.atan2(o,-n),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),g[t+e]=i}}}return u(g,d,p),new n.Z({width:d,height:p,pixels:[g],mask:f,pixelType:"f32",validPixelCount:e.validPixelCount,statistics:[{minValue:-1,maxValue:360}]})}function p(e,t){if(!(0,o.nk)(e))return e;const{curvatures:r,outMask:i}=l(e,t),{width:s,height:a}=e;u(r,s,a);const c=new n.Z({width:s,height:a,pixels:[r],mask:i,pixelType:"f32",validPixelCount:e.validPixelCount});return c.updateStatistics(),c}},80676:(e,t,r)=>{r.d(t,{KC:()=>p,NL:()=>l,QI:()=>g,Tg:()=>h,Yx:()=>u,xQ:()=>d});var n=r(35454),o=r(5847),i=r(55914);const s=new Map;s.set("meter-per-second",1),s.set("kilometer-per-hour",.277778),s.set("knots",.514444),s.set("feet-per-second",.3048),s.set("mile-per-hour",.44704);const a=180/Math.PI,l=new n.X({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(e,t){return s.get(e)/s.get(t)||1}function c(e){return(450-e)%360}function h(e,t="geographic"){const[r,n]=e,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r)*a;return i=(360+i)%360,"geographic"===t&&(i=c(i)),[o,i]}function f(e,t="geographic"){let r=e[1];"geographic"===t&&(r=c(r)),r%=360;const n=e[0];return[n*Math.cos(r/a),n*Math.sin(r/a)]}function d(e,t,r,n="geographic"){if(!(0,i.nk)(e)||null==r)return e;const o="vector-magdir"===t?e.clone():p(e,t),s=o.pixels[1];for(let e=0;e<s.length;e++)s[e]="geographic"===n?(s[e]+r[e]+270)%360:(s[e]+360-r[e])%360;return"vector-magdir"===t?o:p(o,"vector-magdir")}function p(e,t,r="geographic",n=1){if(!(0,i.nk)(e))return e;const{pixels:s,width:a,height:l}=e,u=a*l,c=s[0],d=s[1],p=e.pixelType.startsWith("f")?e.pixelType:"f32",g=o.Z.createEmptyBand(p,u),m=o.Z.createEmptyBand(p,u);let y=0;for(let e=0;e<l;e++)for(let e=0;e<a;e++)"vector-uv"===t?([g[y],m[y]]=h([c[y],d[y]],r),g[y]*=n):([g[y],m[y]]=f([c[y],d[y]],r),g[y]*=n,m[y]*=n),y++;const w=new o.Z({pixelType:p,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:[g,m]});return w.updateStatistics(),w}function g(e,t,r=1){if(1===r||!(0,i.nk)(e))return e;const n=e.clone(),{pixels:o,width:s,height:a}=n,l=o[0],u=o[1];let c=0;for(let e=0;e<a;e++)for(let e=0;e<s;e++)"vector-uv"===t?(l[c]*=r,u[c]*=r):l[c]*=r,c++;return n.updateStatistics(),n}function m(e,t,r,n=1){const o=Math.sqrt(e*e+t*t)/n,i=(2*Math.PI+Math.atan2(t,e))%(2*Math.PI);return[o,(2*Math.PI+i-r)%(2*Math.PI)]}!function(e=0,t=0,r=Math.PI,n=!0){n&&(r=(2*Math.PI-r)%(2*Math.PI));const o=n?-1:1,i=13*o,s=-7*o,a=-2*o,l=-16*o,u=21.75,[c,h]=m(0,t+i,r,u),[f,d]=m(e-5.5,t+s,r,u),[p,g]=m(e+5.5,t+s,r,u),[y,w]=m(e-1.5,t+a,r,u),[C,b]=m(e+1.5,t+a,r,u),[v,x]=m(e-1.5,t+l,r,u),[k,T]=m(e+1.5,t+l,r,u)}(0,0,0)},72758:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),o=r(3892),i=r(96674),s=r(92604),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),u=r(25972),c=r(55914),h=r(15612),f=r(63342),d=r(93010),p=r(12163);let g=class extends i.wq{constructor(e){super(e)}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e&&e.pixelBlock;if(!m(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=t.extractBands([0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const n=e.extent,o=n.spatialReference.isGeographic,i={x:(n.xmax-n.xmin)/t.width,y:(n.ymax-n.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:o,resolution:i});break}}return r}catch(e){return s.Z.getLogger(this.declaredClass).error("symbolize",e.message),t}}simpleStretch(e,t){if(!m(e))return e;try{return e.pixels.length>3&&(e=e.extractBands([0,1,2])),(0,h.dy)(e,{...t,isRenderer:!0})}catch(t){return s.Z.getLogger(this.declaredClass).error("symbolize",t.message),e}}generateWebGLParameters(e){if(["uniqueValue","rasterColormap","classBreaks"].includes(this.rendererJSON.type)){const{indexedColormap:e,offset:t}=this.lookup.colormapLut||{};return{colormap:e,colormapOffset:t,type:"lut"}}const{pixelBlock:t,isGCS:r,resolution:n,bandIds:o}=e,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(t,i,o):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,r,n??void 0):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(e){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const t=this.rendererJSON.colorRamp;return e?JSON.stringify(t)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(e){return this._isLUTChanged()&&!this.bind().success?e:(0,c.SJ)(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?e:t?(0,c.SJ)(e,this.lookup.colormapLut):(0,c.zp)(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){const{rasterInfo:r}=this,{pixelType:n,bandCount:o}=r,i=this.rendererJSON,s=["u8","u16","s8","s16"].includes(n);let a,l;const{dra:u}=i,{gamma:f}=this.lookup;if("histogramEqualization"===i.stretchType){const n=u?null:this.lookup?.histogramLut,o=(0,h.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t,returnHistogramLut:!n}),s=(0,h.dy)(e,{...o,gamma:f,isRenderer:!0});l=(0,c.XV)(s,{lut:u?o.histogramLut:n,offset:0})}else if(s){if(u){const o=(0,h.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t});a=(0,h.hE)({pixelType:n,...o,gamma:f,rounding:"floor"})}else if(this._isLUTChanged()){if(!this.bind().success)return e;a=this.lookup?this.lookup.stretchLut:null}else a=this.lookup?this.lookup.stretchLut:null;if(!a)return e;o>1&&null!=t&&t.length===e?.pixels.length&&a?.lut.length===o&&(a={lut:t.map((e=>a.lut[e])),offset:a.offset}),l=(0,c.XV)(e,a)}else{const n=(0,h.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t});l=(0,h.dy)(e,{...n,gamma:f,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return e;l=(0,c.SJ)(l,this.lookup?.colormapLut)}return l}_symbolizeShadedRelief(e,t){const r=this.rendererJSON,n={...r,...t},o=(0,f.vC)(e,n);if(!r.colorRamp)return o;let i;if(this._isLUTChanged(!0)){if(!this.bind().success)return o;i=this.lookup?this.lookup.hsvMap:null}else i=this.lookup?this.lookup.hsvMap:null;if(!i)return o;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,f.Ub)(o,e,i,s),o}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:n}=this.rasterInfo,o=e.field1;if(!o)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=e.defaultSymbol,s=1===t&&["u8","s8"].includes(n);if(!(0,p.MG)(this.rasterInfo,o)&&!s)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const a=[];if(null!=r){const t=r.fields.find((e=>"value"===e.name.toLowerCase()));if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach((r=>{const n=e.uniqueValueInfos?.find((e=>String(e.value)===String(r.attributes[o]))),s=n?.symbol?.color;s?a.push([r.attributes[t.name]].concat(s)):i&&a.push([r.attributes[t.name]].concat(i.color))}))}else{if("value"!==o.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not availalbe.'};e.uniqueValueInfos?.forEach((e=>{const t=e?.symbol?.color;t?a.push([parseInt(""+e.value,10)].concat(t)):i&&a.push([parseInt(""+e.value,10)].concat(i?.color))}))}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=(0,c.Pz)({colormap:a});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=!0,{success:!0}}_updateColormapRenderer(e){if(!(0,p.mO)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map((e=>[e.value].concat(e.color))).sort(((e,t)=>e[0]-t[0]));if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=(0,c.Pz)({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=!0,{success:!0}}_updateShadedReliefRenderer(e){if(!(0,p.jX)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){const t=(0,d.Jw)(e.colorRamp,{interpolateAlpha:!0}),r=(0,c.Pz)({colormap:t}),n=[],i=r.indexedColormap;for(let e=0;e<i.length;e+=4){const t=(0,o._Y)({r:i[e],g:i[e+1],b:i[e+2]});n.push([t.h/60,t.s/100,255*t.v/100])}this.lookup={rendererJSON:e,colormapLut:r,hsvMap:n}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){const{attributeTable:t,pixelType:r}=this.rasterInfo,n=null!=t?t.fields.find((e=>"value"===e.name.toLowerCase())):null,o=null!=t?t.fields.find((t=>t.name.toLowerCase()===e.field.toLowerCase())):null,i=null!=n&&null!==o;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:n,tableBreakField:o}}_updateClassBreaksRenderer(e){const{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:n,tableBreakField:o}=this._analyzeClassBreaks(e),i=e.classBreakInfos;if(!i?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const s=i.sort(((e,t)=>e.classMaxValue-t.classMaxValue)),a=s[s.length-1];let l=e.minValue;if(!r){const t=[];for(let e=0;e<s.length;e++)t.push({value:s[e].classMinValue??l,mappedColor:s[e].symbol.color}),l=s[e].classMaxValue;return t.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const u=[];if(null!=t&&null!=n&&null!==o&&n!==o){const r=n.name,i=o.name,a=s[s.length-1],{classMaxValue:c}=a;l=e.minValue;for(const e of t.features){const t=e.attributes[r],n=e.attributes[i],o=n===c?a:n<l?null:s.find((({classMaxValue:e})=>e>n));o&&u.push([t].concat(o.symbol.color))}}else{l=Math.floor(e.minValue);for(let e=0;e<s.length;e++){const t=s[e];for(let e=l;e<t.classMaxValue;e++)u.push([e].concat(t.symbol.color));l=Math.ceil(t.classMaxValue)}a.classMaxValue===l&&u.push([a.classMaxValue].concat(a.symbol.color))}const h=(0,c.Pz)({colormap:u,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:h},this.canRenderInWebGL=!0,{success:!0}}_isHistogramRequired(e){return"percentClip"===e||"histogramEqualization"===e}_isValidRasterStatistics(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||this._isValidRasterStatistics(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const n=e.histograms||this.rasterInfo.histograms;!this._isHistogramRequired(e.stretchType)||n?.length||r||(t="minMax");const{computeGamma:o,useGamma:i,colorRamp:s}=e;let{gamma:a}=e;if(i&&o&&!a?.length){const t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;a=(0,h.ZF)(this.rasterInfo.pixelType,t)}const l=this.rasterInfo.pixelType,u=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===t){const t=n.map((e=>(0,h.oc)(e)));this.lookup={rendererJSON:e,histogramLut:t}}else if(u){const t=(0,h.AV)(e,{rasterInfo:this.rasterInfo}),r=(0,h.hE)({pixelType:l,...t,gamma:i?a:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}if(s){const t=(0,d.Jw)(s,{interpolateAlpha:!0});this.lookup||(this.lookup={rendererJSON:e}),this.lookup.colormapLut=(0,c.Pz)({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL=!0,{success:!0}}_generateStretchWebGLParams(e,t,r){let n=null,o=null;const i=this.lookup&&this.lookup.colormapLut;t.colorRamp&&i&&(n=i.indexedColormap,o=i.offset),"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!!(t.useGamma&&s&&s.some((e=>1!==e))),{minCutOff:l,maxCutOff:u,outMin:c,outMax:f}=(0,h.AV)(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});let d=0;null!=e&&(d=e.getPlaneCount(),2===d&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const{bandCount:p}=this.rasterInfo,g=Math.min(3,r?.length||d||p,p),m=new Float32Array(g),y=n||a?1:255;let w;for(w=0;w<l.length;w++)m[w]=u[w]===l[w]?0:(f-c)/(u[w]-l[w])/y;const C=new Float32Array(g);if(a&&s)for(w=0;w<g;w++)s[w]>1?s[w]>2?C[w]=6.5+(s[w]-2)**2.5:C[w]=6.5+100*(2-s[w])**4:C[w]=1;return{bandCount:g,outMin:c/y,outMax:f/y,minCutOff:l,maxCutOff:u,factor:m,useGamma:a,gamma:a?s:[1,1,1],gammaCorrection:a?C:[1,1,1],colormap:n,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){let n=null,o=null;const i=this.lookup&&this.lookup.colormapLut;e.colorRamp&&i&&(n=i.indexedColormap,o=i.offset);const s={...e,isGCS:t,resolution:r},a=(0,f.TK)(s),l=this.rasterInfo.statistics?.[0];return{...a,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:n,colormapOffset:o}}_generateVectorFieldWebGLParams(e){const{style:t,inputUnit:r,outputUnit:n,visualVariables:o,symbolTileSize:i,flowRepresentation:s}=e;let a;const l=this.rasterInfo.statistics?.[0].min??0,u=this.rasterInfo.statistics?.[0].max??50,c=o?.find((e=>"sizeInfo"===e.type))??{type:"sizeInfo",field:"Magnitude",maxDataValue:u,maxSize:.8*i,minDataValue:l,minSize:.2*i},h=c.minDataValue??l,f=c.maxDataValue??u,d=null!=c.maxSize&&null!=c.minSize?[c.minSize/i,c.maxSize/i]:[.2,.8];if("wind_speed"===t){const e=(d[0]+d[1])/2;d[0]=d[1]=e}const p=null!=h&&null!=f?[h,f]:null;if("classified_arrow"===t)if(null!=h&&null!=f&&null!=c){a=[];const e=(c.maxDataValue-c.minDataValue)/5;for(let t=0;t<6;t++)a.push(c.minDataValue+e*t)}else a=[0,1e-6,3.5,7,10.5,14];const g="flow_to"===s==("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,m=o?.find((e=>"rotationInfo"===e.type));return{breakValues:a,dataRange:p,inputUnit:r,outputUnit:n,symbolTileSize:i,symbolPercentRange:d,style:t||"single_arrow",rotation:g,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":m?.rotationType||e.rotationType,type:"vectorField"}}};function m(e){return(0,c.nk)(e)&&0!==e.validPixelCount}(0,n._)([(0,a.Cb)({json:{write:!0}})],g.prototype,"rendererJSON",void 0),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],g.prototype,"rasterInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],g.prototype,"lookup",void 0),(0,n._)([(0,a.Cb)()],g.prototype,"canRenderInWebGL",void 0),g=(0,n._)([(0,l.j)("esri.renderers.support.RasterSymbolizer")],g);const y=g},93010:(e,t,r)=>{r.d(t,{B4:()=>f,H0:()=>u,Jw:()=>m,Ms:()=>a,Oi:()=>s,Uh:()=>h,XL:()=>g,io:()=>b,pM:()=>y});var n=r(22303),o=r(3892),i=r(35454);const s=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],a=[{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]}],l={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"},u=new i.X({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","urple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function c(e,t){if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]>t[r]+2||e[r]<t[r]-2)return!1;return!0}function h(e){const t=function(e,t){if(!e)return;const r=a;let o=null;return"algorithmic"===e.type?r.some((t=>{if(c(e.fromColor.toRgb(),t.fromColor)&&c(e.toColor.toRgb(),t.toColor))return o=t.id,!0})):"multipart"===e.type&&r.some((t=>{const r=e.colorRamps,i=t.colorRamps;if(r&&i&&r.length===i.length&&!i.some(((e,t)=>{if(!c(r[t].fromColor.toRgb(),new n.Z(e.fromColor).toRgb())||!c(r[t].toColor.toRgb(),new n.Z(e.toColor).toRgb()))return!0}))){if(o)return!0;o=t.id}})),o}(e);return t?l[t]:null}function f(e){const t=u.toJSON(e),r=Object.entries(l).find((e=>e[1]===t))?.[0],n=a.find((e=>e.id===r));return n?n.colorRamps?{type:"multipart",colorRamps:n.colorRamps.map((e=>({type:"algorithmic",algorithm:"esriCIELabAlgorithm",fromColor:e.fromColor,toColor:e.toColor})))}:{type:"algorithmic",algorithm:"esriCIELabAlgorithm",fromColor:n.fromColor,toColor:n.toColor}:null}function d(e){const t=(e=e||{}).numColors||256,r=e.distanceOffset||0,n=null!=e.isCustomInterval?e.isCustomInterval:null!==e.distanceInterval&&e.distanceInterval!==1/(t-1),o=e.distanceInterval||1/(t-1);return{...e,numColors:t,distanceOffset:r,interpolateAlpha:!!e.interpolateAlpha,distanceInterval:o,isCustomInterval:n,weights:e.weights}}function p(e,t){let{fromColor:r,toColor:n}=e;3===r.length&&(r=r.concat([255])),3===n.length&&(n=n.concat([255]));const i=e.algorithm||"esriCIELabAlgorithm",s=d(t),{numColors:a,distanceOffset:l,isCustomInterval:u,interpolateAlpha:c}=s;if(1===a&&0===l)return[r];if(2===a&&0===l&&!u)return[r,n];const h={r:r[0],g:r[1],b:r[2]},f={r:n[0],g:n[1],b:n[2]},p="esriCIELabAlgorithm"===i?function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r;let{l:a,a:l,b:u}=e;const c=(t.l-a)*i,h=(t.a-l)*i,f=(t.b-u)*i,d=[];if(o){const e=o/i;a+=e*c,l+=e*h,u+=e*f}for(let e=0;e<n-1;e++)d.push({l:a,a:l,b:u}),a+=c,l+=h,u+=f;return d.push(s?{l:a,a:l,b:u}:t),d}((0,o.Y3)(h),(0,o.Y3)(f),s):"esriHSVAlgorithm"===i?function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=0===e.s,l=0===t.s;let u=e.h,c=t.h;a&&!l?u=c:l&&!a&&(t={...t,h:u},c=u);let h,f=Math.abs(c-u);const d=360;f<180?h=(c-u)*i:(f=d-f,h=u>c?f*i:-f*i);const p=(t.s-e.s)*i,g=(t.v-e.v)*i;let{s:m,v:y}=e,w=u;if(o){const e=o/i;w=(w+e*h+d)%d,m+=e*p,y+=e*g}const C=[];for(let e=0;e<n-1;e++)C.push({h:w,s:m,v:y}),w=(w+h+d)%d,m+=p,y+=g;return C.push(s?{h:w,s:m,v:y}:t),C}((0,o._Y)(h),(0,o._Y)(f),s):function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=e.h,l=t.h,u=2*Math.PI;let c;if(a<=l){const e=l-a,t=l-a-u;c=Math.abs(t)<Math.abs(e)?t:e}else{const e=l+u-a,t=l-a;c=Math.abs(t)<Math.abs(e)?t:e}const h=c*i,f=(t.l-e.l)*i,d=(t.c-e.c)*i;let{l:p,c:g,h:m}=e;if(o){const e=o/i;p+=e*f,g+=e*d,m=(m+e*h+u)%u}const y=[];for(let e=0;e<n-1;e++)y.push({l:p,c:g,h:m}),p+=f,g+=d,m=(m+h+u)%u;return y.push(s?{l:p,c:g,h:m}:t),y}((0,o.sJ)(h),(0,o.sJ)(f),s),g=[],m=r[3]??255,y=((n[3]??255)-m)/(a-1);for(let e=0;e<a;e++){const{r:t,g:r,b:n}=(0,o.xr)(p[e]),i=c?Math.round(m+y*e):255;g.push([t,r,n,i])}return g}function g(e,t){const r="toJSON"in e?e.toJSON():e;return"multipart"===r.type?function(e,t){const{numColors:r,interpolateAlpha:n}=d(t);let o=t?.weights;const{colorRamps:i}=e;if(o){const e=o.reduce(((e,t)=>e+t));o=o.map((t=>t/e))}else{o=[];for(let e=0;e<i.length;e++)o[e]=1/i.length}const s=[];let a=0,l=0;const u=1/(r-1);let c=!1;for(let e=0;e<i.length;e++){let t=c?0:a*u-l,h=e===i.length-1?r-1-a:(o[e]-t)/u;if(c=Math.ceil(h)===h,h=Math.ceil(h),0===h)continue;t/=o[e];const f=p(i[e],{numColors:h,interpolateAlpha:n,distanceOffset:t,distanceInterval:u/o[e]});a+=f.length,s.push(...f),l+=o[e]}const h=[...i[i.length-1].toColor];return 3===h.length&&h.push(255),s.push(h),s}(r,t):p(r,t)}function m(e,t){const r=g(e,t),n=t?.interpolateAlpha;return r.forEach(((e,t)=>{e.unshift(t),n||e.pop()})),r}function y(e){const t=h(e);if(e){if("algorithmic"===e.type)return{...w(e),Name:t};if(e.colorRamps){const r=e.colorRamps.map(w);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:t}}}}function w(e){if(!e)return;const t=e.toJSON();return{Algorithm:t?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:C(e.fromColor),ToColor:C(e.toColor)}}function C(e){const t=(0,o._Y)(e);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function b(e){const t=e.reverse().map((e=>{const t=e.toString(16);return t.length<2?"0"+t:t}));return 4294967295&Number.parseInt(t.join(""),16)}},12163:(e,t,r)=>{function n(e,t){const{attributeTable:r,bandCount:n}=e;return!((null!=r||(o=e,!["u8","s8"].includes(o.pixelType)||null==o.statistics?.[0]?.min||null==o.statistics[0]?.max||1!==o.bandCount))&&(null==r||n>1||t&&null==r.fields.find((e=>e.name.toLowerCase()===t.toLowerCase()))));var o}function o(e){const{bandCount:t,dataType:r,pixelType:n}=e;return"elevation"===r||"generic"===r&&1===t&&("s16"===n||"s32"===n||"f32"===n||"f64"===n)}function i(e,t=!1){const{bandCount:r,colormap:n,pixelType:o}=e;return 1===r&&(!!n?.length||!t&&"u8"===o)}function s(e,t=!1){const{attributeTable:r,bandCount:n}=e;return 1===n&&(!t||null!=r||null!=e.histograms)}function a(e){const{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}function l(e){const{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}r.d(t,{LV:()=>a,MG:()=>n,aG:()=>l,fI:()=>s,jX:()=>o,mO:()=>i})},75509:(e,t,r)=>{r.d(t,{J:()=>o,v:()=>n});const n=new(r(35454).X)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),o={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},23808:(e,t,r)=>{r.d(t,{GE:()=>u}),r(66577);var n=r(80442),o=r(92604),i=(r(22021),r(95330)),s=r(77734);r(8744),r(6570);const a=o.Z.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(e,t,r,o){const u=performance.now(),c=function(e,t){const r=function(e,t,r,n){if(0===n)return e;const o=Math.round(3*n),i=new Array(2*o+1);let s=0;for(let e=-o;e<=o;e++){const t=Math.exp(-e*e/(n*n));i[e+o]=t,s+=t}for(let e=-o;e<=o;e++)i[e+o]/=s;const a=new Float32Array(e.length);for(let n=0;n<r;n++)for(let r=0;r<t;r++){let s=0,l=0;for(let a=-o;a<=o;a++){if(r+a<0||r+a>=t)continue;const u=i[a+o];s+=u*e[2*(n*t+(r+a))],l+=u*e[2*(n*t+(r+a))+1]}a[2*(n*t+r)]=s,a[2*(n*t+r)+1]=l}const l=new Float32Array(e.length);for(let e=0;e<t;e++)for(let n=0;n<r;n++){let s=0,u=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=r)continue;const c=i[l+o];s+=c*a[2*((n+l)*t+e)],u+=c*a[2*((n+l)*t+e)+1]}l[2*(n*t+e)]=s,l[2*(n*t+e)+1]=u}return l}(t.data,t.width,t.height,e.smoothing);return e.interpolate?(e,n)=>{const o=Math.floor(e),i=Math.floor(n);if(o<0||o>=t.width)return[0,0];if(i<0||i>=t.height)return[0,0];const s=e-o,a=n-i,l=o,u=i,c=o<t.width-1?o+1:o,h=i<t.height-1?i+1:i,f=r[2*(u*t.width+l)],d=r[2*(u*t.width+c)],p=r[2*(h*t.width+l)],g=r[2*(h*t.width+c)],m=r[2*(u*t.width+l)+1],y=r[2*(u*t.width+c)+1];return[(f*(1-a)+p*a)*(1-s)+(d*(1-a)+g*a)*s,(m*(1-a)+r[2*(h*t.width+l)+1]*a)*(1-s)+(y*(1-a)+r[2*(h*t.width+c)+1]*a)*s]}:(e,n)=>{const o=Math.round(e),i=Math.round(n);return o<0||o>=t.width||i<0||i>=t.height?[0,0]:[r[2*(i*t.width+o)],r[2*(i*t.width+o)+1]]}}(t,r),f=performance.now(),d=h(t,c,r.width,r.height),p=performance.now(),g=function(e,t){const r=new s.Z,n=e.reduce(((e,t)=>e+t.length),0),o=new Float32Array(4*n),i=new Array(e.length);let a=0,l=0;for(const t of e){const e=a;for(const e of t)o[4*a]=e.x,o[4*a+1]=e.y,o[4*a+2]=e.t,o[4*a+3]=e.speed,a++;i[l++]={startVertex:e,numberOfVertices:t.length,totalTime:t[t.length-1].t,timeSeed:r.getFloat()}}return{lineVertices:o,lineDescriptors:i}}(d),m=performance.now(),y="Streamlines"===e?function(e,t){const{lineVertices:r,lineDescriptors:n}=e;let o=0,i=0;for(const e of n)o+=2*e.numberOfVertices,i+=6*(e.numberOfVertices-1);const s=new Float32Array(9*o),a=new Uint32Array(i);let l=0,u=0;function c(){a[u++]=l-2,a[u++]=l,a[u++]=l-1,a[u++]=l,a[u++]=l+1,a[u++]=l-1}function h(e,t,r,n,o,i,a,u){const c=9*l;let h=0;s[c+h++]=e,s[c+h++]=t,s[c+h++]=1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=n/2,s[c+h++]=o/2,s[c+h++]=u,l++,s[c+h++]=e,s[c+h++]=t,s[c+h++]=-1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=-n/2,s[c+h++]=-o/2,s[c+h++]=u,l++}for(const e of n){const{totalTime:n,timeSeed:o}=e;let i=null,s=null,a=null,l=null,u=null,f=null;for(let d=0;d<e.numberOfVertices;d++){const p=r[4*(e.startVertex+d)],g=r[4*(e.startVertex+d)+1],m=r[4*(e.startVertex+d)+2],y=r[4*(e.startVertex+d)+3];let w=null,C=null,b=null,v=null;if(d>0){w=p-i,C=g-s;const e=Math.sqrt(w*w+C*C);if(w/=e,C/=e,d>1){let e=w+u,r=C+f;const n=Math.sqrt(e*e+r*r);e/=n,r/=n;const o=Math.min(1/(e*w+r*C),t);e*=o,r*=o,b=-r,v=e}else b=-C,v=w;null!==b&&null!==v&&(h(i,s,a,b,v,n,o,y),c())}i=p,s=g,a=m,u=w,f=C,l=y}h(i,s,a,-f,u,n,o,l)}return{vertexData:s,indexData:a}}(g,l):function(e){const t=16,r=1,n=2,{lineVertices:o,lineDescriptors:i}=e;let s=0,a=0;for(const e of i){const t=e.numberOfVertices-1;s+=4*t*2,a+=6*t*2}const l=new Float32Array(s*t),u=new Uint32Array(a);let c,h,f,d,p,g,m,y,w,C,b,v,x,k,T=0,A=0;function S(){u[A++]=T-8,u[A++]=T-7,u[A++]=T-6,u[A++]=T-7,u[A++]=T-5,u[A++]=T-6,u[A++]=T-4,u[A++]=T-3,u[A++]=T-2,u[A++]=T-3,u[A++]=T-1,u[A++]=T-2}function I(e,o,i,s,a,u,c,h,f,d,p,g,m,y){const w=T*t;let C=0;for(const t of[r,n])for(const r of[1,2,3,4])l[w+C++]=e,l[w+C++]=o,l[w+C++]=i,l[w+C++]=s,l[w+C++]=c,l[w+C++]=h,l[w+C++]=f,l[w+C++]=d,l[w+C++]=t,l[w+C++]=r,l[w+C++]=m,l[w+C++]=y,l[w+C++]=a/2,l[w+C++]=u/2,l[w+C++]=p/2,l[w+C++]=g/2,T++}function M(e,t){let r=w+b,n=C+v;const o=Math.sqrt(r*r+n*n);r/=o,n/=o;const i=w*r+C*n;r/=i,n/=i;let s=b+x,a=v+k;const l=Math.sqrt(s*s+a*a);s/=l,a/=l;const u=b*s+v*a;s/=u,a/=u,I(c,h,f,d,-n,r,p,g,m,y,-a,s,e,t),S()}function P(e,t,r,n,o,i){if(w=b,C=v,b=x,v=k,null==w&&null==C&&(w=b,C=v),null!=p&&null!=g){x=e-p,k=t-g;const r=Math.sqrt(x*x+k*k);x/=r,k/=r}null!=w&&null!=C&&M(o,i),c=p,h=g,f=m,d=y,p=e,g=t,m=r,y=n}function D(e,t){w=b,C=v,b=x,v=k,null==w&&null==C&&(w=b,C=v),null!=w&&null!=C&&M(e,t)}for(const e of i){c=null,h=null,f=null,d=null,p=null,g=null,m=null,y=null,w=null,C=null,b=null,v=null,x=null,k=null;const{totalTime:t,timeSeed:r}=e;for(let n=0;n<e.numberOfVertices;n++)P(o[4*(e.startVertex+n)],o[4*(e.startVertex+n)+1],o[4*(e.startVertex+n)+2],o[4*(e.startVertex+n)+3],t,r);D(t,r)}return{vertexData:l,indexData:u}}(g),w=performance.now();return(0,n.Z)("esri-2d-profiler")&&(a.info("I.1","_createFlowFieldFromData (ms)",Math.round(f-u)),a.info("I.2","_getStreamlines (ms)",Math.round(p-f)),a.info("I.3","createAnimatedLinesData (ms)",Math.round(m-p)),a.info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-m)),a.info("I.5","createFlowMesh (ms)",Math.round(w-u)),a.info("I.6","Mesh size (bytes)",y.vertexData.buffer.byteLength+y.indexData.buffer.byteLength)),await Promise.resolve(),(0,i.k_)(o),y}function c(e,t,r,n,o,i,s,a,l){const u=[];let c=r,h=n,f=0,[d,p]=t(c,h);d*=e.velocityScale,p*=e.velocityScale;const g=Math.sqrt(d*d+p*p);let m,y;u.push({x:c,y:h,t:f,speed:g});for(let r=0;r<e.verticesPerLine;r++){let[r,n]=t(c,h);r*=e.velocityScale,n*=e.velocityScale;const d=Math.sqrt(r*r+n*n);if(d<e.minSpeedThreshold)return u;const p=r/d,g=n/d;if(c+=p*e.segmentLength,h+=g*e.segmentLength,f+=e.segmentLength/d,Math.acos(p*m+g*y)>e.maxTurnAngle)return u;if(e.collisions){const e=Math.round(c*l),t=Math.round(h*l);if(e<0||e>s-1||t<0||t>a-1)return u;const r=i[t*s+e];if(-1!==r&&r!==o)return u;i[t*s+e]=o}u.push({x:c,y:h,t:f,speed:d}),m=p,y=g}return u}function h(e,t,r,n){const o=[],i=new s.Z,a=1/Math.max(e.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(n*a),h=new Int32Array(l*u);for(let e=0;e<h.length;e++)h[e]=-1;const f=[];for(let t=0;t<n;t+=e.lineSpacing)for(let n=0;n<r;n+=e.lineSpacing)f.push({x:n,y:t,sort:i.getFloat()});f.sort(((e,t)=>e.sort-t.sort));for(const{x:r,y:n}of f)if(i.getFloat()<e.density){const i=c(e,t,r,n,o.length,h,l,u,a);if(i.length<2)continue;o.push(i)}return o}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[81],{4757:(e,t,n)=>{n.d(t,{Z:()=>d});var i=n(43697),o=n(15923),s=n(67676),r=n(2368),l=n(10699),u=n(96674),p=n(5600),a=(n(75215),n(80442),n(52011));let c=0,y=class extends((0,u.eC)((0,r.J)((0,l.IG)(o.Z)))){constructor(e){super(e),this.id=`${Date.now().toString(16)}-analysis-${c++}`,this.title=null}get parent(){return this._get("parent")}set parent(e){const t=this.parent;if(null!=t)switch(t.type){case"line-of-sight":case"dimension":t.releaseAnalysis(this);break;case"2d":case"3d":t.analyses.includes(this)&&t.analyses.remove(this)}this._set("parent",e)}get isEditable(){return this.requiredPropertiesForEditing.every(s.pC)}};(0,i._)([(0,p.Cb)({type:String,constructOnly:!0,clonable:!1})],y.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:String})],y.prototype,"title",void 0),(0,i._)([(0,p.Cb)({constructOnly:!0})],y.prototype,"type",void 0),(0,i._)([(0,p.Cb)({clonable:!1,value:null})],y.prototype,"parent",null),(0,i._)([(0,p.Cb)({readOnly:!0})],y.prototype,"isEditable",null),(0,i._)([(0,p.Cb)({readOnly:!0})],y.prototype,"requiredPropertiesForEditing",void 0),y=(0,i._)([(0,a.j)("esri.analysis.Analysis")],y);const d=y},17445:(e,t,n)=>{n.d(t,{N1:()=>y,YP:()=>u,Z_:()=>m,gx:()=>p,nn:()=>b,on:()=>c,tX:()=>f});var i=n(91460),o=n(50758),s=n(70586),r=n(95330),l=n(26258);function u(e,t,n={}){return a(e,t,n,d)}function p(e,t,n={}){return a(e,t,n,h)}function a(e,t,n={},i){let o=null;const r=n.once?(e,n)=>{i(e)&&((0,s.hw)(o),t(e,n))}:(e,n)=>{i(e)&&t(e,n)};if(o=(0,l.aQ)(e,r,n.sync,n.equals),n.initial){const t=e();r(t,t)}return o}function c(e,t,n,r={}){let l=null,p=null,a=null;function c(){l&&p&&(p.remove(),r.onListenerRemove?.(l),l=null,p=null)}function y(e){r.once&&r.once&&(0,s.hw)(a),n(e)}const d=u(e,((e,n)=>{c(),(0,i.vT)(e)&&(l=e,p=(0,i.on)(e,t,y),r.onListenerAdd?.(e))}),{sync:r.sync,initial:!0});return a=(0,o.kB)((()=>{d.remove(),c()})),a}function y(e,t){return function(e,t,n){if((0,r.Hc)(n))return Promise.reject((0,r.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let l=null;function u(){l=(0,s.hw)(l)}return new Promise(((i,s)=>{l=(0,o.AL)([(0,r.fu)(n,(()=>{u(),s((0,r.zE)())})),a(e,(e=>{u(),i(e)}),{sync:!1,once:!0},t??d)])}))}(e,h,t)}function d(e){return!0}function h(e){return!!e}n(87538);const m={sync:!0},b={initial:!0},f={sync:!0,initial:!0}},62357:(e,t,n)=>{n.d(t,{F2:()=>r,Wz:()=>l,t_:()=>u,vW:()=>p});const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,o="screenUtils.toPt: input not recognized!",s=96;function r(e){return e?e/72*s:0}function l(e){return e?72*e/s:0}function u(e){if("string"==typeof e){const t=e.match(i);if(t){const n=Number(t[1]),i=t[3]&&t[3].toLowerCase(),o="-"===e.charAt(0),s="px"===i?l(n):n;return o?-s:s}return console.warn(o),null}return e}function p(e=0,t=0){return{x:e,y:t}}},40081:(e,t,n)=>{n.r(t),n.d(t,{default:()=>k});var i=n(43697),o=n(4757),s=n(22303),r=n(2368),l=n(96674),u=n(62357),p=n(5600),a=n(75215),c=(n(67676),n(80442),n(52011));let y=class extends((0,l.eC)(r.j)){constructor(e){super(e),this.type="simple",this.color=new s.Z("black"),this.lineSize=2,this.fontSize=10,this.textColor=new s.Z("black"),this.textBackgroundColor=new s.Z([255,255,255,.6])}};(0,i._)([(0,p.Cb)({type:["simple"],readOnly:!0,json:{write:{isRequired:!0}}})],y.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:s.Z,nonNullable:!0,json:{type:[a.z8],write:{isRequired:!0}}})],y.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:Number,cast:u.t_,nonNullable:!0,range:{min:(0,u.Wz)(1)},json:{write:{isRequired:!0}}})],y.prototype,"lineSize",void 0),(0,i._)([(0,p.Cb)({type:Number,cast:u.t_,nonNullable:!0,json:{write:{isRequired:!0}}})],y.prototype,"fontSize",void 0),(0,i._)([(0,p.Cb)({type:s.Z,nonNullable:!0,json:{type:[a.z8],write:{isRequired:!0}}})],y.prototype,"textColor",void 0),(0,i._)([(0,p.Cb)({type:s.Z,nonNullable:!0,json:{type:[a.z8],write:{isRequired:!0}}})],y.prototype,"textBackgroundColor",void 0),y=(0,i._)([(0,c.j)("esri.analysis.DimensionSimpleStyle")],y);const d=y;var h;n(66577),function(e){e.Horizontal="horizontal",e.Vertical="vertical",e.Direct="direct"}(h||(h={}));const m=[h.Horizontal,h.Vertical,h.Direct];var b=n(68251),f=n(90578),_=n(94139);let C=class extends((0,l.eC)(r.j)){constructor(e){super(e),this.type="length",this.startPoint=null,this.endPoint=null,this.measureType=h.Direct,this.offset=0,this.orientation=0}};(0,i._)([(0,p.Cb)({type:["length"],json:{write:{isRequired:!0}}})],C.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:_.Z,json:{write:!0}})],C.prototype,"startPoint",void 0),(0,i._)([(0,p.Cb)({type:_.Z,json:{write:!0}})],C.prototype,"endPoint",void 0),(0,i._)([(0,p.Cb)({type:m,nonNullable:!0,json:{write:{isRequired:!0}}})],C.prototype,"measureType",void 0),(0,i._)([(0,p.Cb)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],C.prototype,"offset",void 0),(0,i._)([(0,p.Cb)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,f.p)((e=>b.BV.normalize((0,a.q9)(e),0,!0)))],C.prototype,"orientation",void 0),C=(0,i._)([(0,c.j)("esri.analysis.LengthDimension")],C);const g=C;var v=n(46791),w=n(70921),P=n(17445),x=n(6570),j=n(44547);const R=v.Z.ofType(g);let N=class extends o.Z{constructor(e){super(e),this.type="dimension",this.style=new d,this.extent=null}initialize(){this.addHandles((0,P.YP)((()=>this._computeExtent()),(e=>{null!=e&&null!=e.pending||this._set("extent",null!=e?e.extent:null)}),P.tX))}get dimensions(){return this._get("dimensions")||new R}set dimensions(e){this._set("dimensions",(0,w.Z)(e,this.dimensions,R))}get spatialReference(){for(const e of this.dimensions){if(null!=e.startPoint)return e.startPoint.spatialReference;if(null!=e.endPoint)return e.endPoint.spatialReference}return null}get requiredPropertiesForEditing(){return this.dimensions.reduce(((e,t)=>(e.push(t.startPoint,t.endPoint),e)),[])}async waitComputeExtent(){const e=this._computeExtent();return null!=e?e.pending:Promise.resolve()}_computeExtent(){const e=this.spatialReference;if(null==e)return{pending:null,extent:null};const t=[];for(const e of this.dimensions)null!=e.startPoint&&t.push(e.startPoint),null!=e.endPoint&&t.push(e.endPoint);const n=(0,j.JY)(t,e);if(null!=n.pending)return{pending:n.pending,extent:null};let i=null;return null!=n.geometries&&(i=n.geometries.reduce(((e,t)=>null==e?null!=t?x.Z.fromPoint(t):null:null!=t?e.union(x.Z.fromPoint(t)):e),null)),{pending:null,extent:i}}clear(){this.dimensions.removeAll()}};(0,i._)([(0,p.Cb)({type:["dimension"]})],N.prototype,"type",void 0),(0,i._)([(0,p.Cb)({cast:w.R,type:R,nonNullable:!0})],N.prototype,"dimensions",null),(0,i._)([(0,p.Cb)({readOnly:!0})],N.prototype,"spatialReference",null),(0,i._)([(0,p.Cb)({types:{key:"type",base:null,typeMap:{simple:d}},nonNullable:!0})],N.prototype,"style",void 0),(0,i._)([(0,p.Cb)({value:null,readOnly:!0})],N.prototype,"extent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],N.prototype,"requiredPropertiesForEditing",null),N=(0,i._)([(0,c.j)("esri.analysis.DimensionAnalysis")],N);const z=N;var Z=n(16453),q=n(30556),O=n(87085),E=n(38009);let S=class extends((0,E.q)((0,Z.R)(O.Z))){constructor(e){if(super(e),this.type="dimension",this.operationalLayerType="ArcGISDimensionLayer",this.source=new z,this.opacity=1,e){const{source:t,style:n}=e;t&&n&&(t.style=n)}}initialize(){this.addHandles([(0,P.YP)((()=>this.source),((e,t)=>{null!=t&&t.parent===this&&(t.parent=null),null!=e&&(e.parent=this)}),P.tX)])}async load(){return this.addResolvingPromise(this.source.waitComputeExtent()),this}get spatialReference(){return this.source.spatialReference}get style(){return this.source.style}set style(e){this.source.style=e}get fullExtent(){return this.source.extent}releaseAnalysis(e){this.source===e&&(this.source=new z)}get analysis(){return this.source}set analysis(e){this.source=e}get dimensions(){return this.source.dimensions}set dimensions(e){this.source.dimensions=e}writeDimensions(e,t,n,i){t.dimensions=e.filter((({startPoint:e,endPoint:t})=>null!=e&&null!=t)).map((e=>e.toJSON(i))).toJSON()}};(0,i._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],S.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:["ArcGISDimensionLayer"]})],S.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)({nonNullable:!0})],S.prototype,"source",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],S.prototype,"spatialReference",null),(0,i._)([(0,p.Cb)({types:{key:"type",base:null,typeMap:{simple:d}},json:{write:{ignoreOrigin:!0}}})],S.prototype,"style",null),(0,i._)([(0,p.Cb)({readOnly:!0})],S.prototype,"fullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],S.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:["show","hide"]})],S.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:v.Z.ofType(g),json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{ignoreOrigin:!0}}}}})],S.prototype,"dimensions",null),(0,i._)([(0,q.c)("web-scene","dimensions")],S.prototype,"writeDimensions",null),S=(0,i._)([(0,c.j)("esri.layers.DimensionLayer")],S);const k=S}}]);
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as
|
|
5
|
+
import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js";import{ShaderOutput as r}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SliceDraw as o}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{Transform as i}from"../views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js";import{ObjectAndLayerIdColor as a}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/ObjectAndLayerIdColor.glsl.js";import{OutputHighlight as s}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{EvaluateAmbientLighting as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{MainLighting as t,addMainLightDirection as d,addMainLightIntensity as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{multipassTerrainTest as v}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js";import{NormalUtils as g}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{PBRMode as c}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{ReadShadowMapDraw as m}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{Water as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js";import{WaterDistortion as u}from"../views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js";import{symbolAlphaCutoff as w}from"../views/3d/webgl-engine/core/shaderLibrary/util/AlphaCutoff.js";import{ColorConversion as h}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{addProjViewLocalOrigin as f,addCameraPosition as b}from"../views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js";import{Float4PassUniform as y}from"../views/3d/webgl-engine/core/shaderModules/Float4PassUniform.js";import{FloatPassUniform as j}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as C}from"../views/3d/webgl-engine/core/shaderModules/interfaces.js";import{ShaderBuilder as L}from"../views/3d/webgl-engine/core/shaderModules/ShaderBuilder.js";import{TransparencyPassType as P}from"../views/3d/webgl-engine/lib/TransparencyPassType.js";import{VertexAttribute as M}from"../views/3d/webgl-engine/lib/VertexAttribute.js";function S(S){const x=new L,{vertex:_,fragment:F}=x;f(_,S),x.include(i,S),x.attributes.add(M.POSITION,"vec3"),x.attributes.add(M.UV0,"vec2");const T=new y("waterColor",(e=>e.color));if(S.output===r.Color&&S.isDraped)return x.varyings.add("vpos","vec3"),_.uniforms.add(T),_.code.add(C`
|
|
6
6
|
void main(void) {
|
|
7
|
-
if (waterColor.a < ${
|
|
7
|
+
if (waterColor.a < ${C.float(w)}) {
|
|
8
8
|
// Discard this vertex
|
|
9
9
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
10
10
|
return;
|
|
@@ -13,11 +13,11 @@ import{ForwardLinearDepth as e}from"../views/3d/webgl-engine/core/shaderLibrary/
|
|
|
13
13
|
vpos = position;
|
|
14
14
|
gl_Position = transformPosition(proj, view, vpos);
|
|
15
15
|
}
|
|
16
|
-
`),F.uniforms.add(T),F.code.add(
|
|
16
|
+
`),F.uniforms.add(T),F.code.add(C`void main() {
|
|
17
17
|
fragColor = waterColor;
|
|
18
|
-
}`),
|
|
18
|
+
}`),x;switch(S.output!==r.Color&&S.output!==r.Alpha||(x.include(g,S),x.include(e,S),x.varyings.add("vuv","vec2"),x.varyings.add("vpos","vec3"),x.varyings.add("vnormal","vec3"),x.varyings.add("vtbnMatrix","mat3"),S.hasMultipassTerrain&&x.varyings.add("depth","float"),_.uniforms.add(T),_.code.add(C`
|
|
19
19
|
void main(void) {
|
|
20
|
-
if (waterColor.a < ${
|
|
20
|
+
if (waterColor.a < ${C.float(w)}) {
|
|
21
21
|
// Discard this vertex
|
|
22
22
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
23
23
|
return;
|
|
@@ -29,22 +29,22 @@ fragColor = waterColor;
|
|
|
29
29
|
vnormal = getLocalUp(vpos, localOrigin);
|
|
30
30
|
vtbnMatrix = getTBNMatrix(vnormal);
|
|
31
31
|
|
|
32
|
-
${
|
|
32
|
+
${S.hasMultipassTerrain?"depth = (view * vec4(vpos, 1.0)).z;":""}
|
|
33
33
|
|
|
34
34
|
gl_Position = transformPosition(proj, view, vpos);
|
|
35
|
-
${
|
|
35
|
+
${S.output===r.Color?"forwardLinearDepth();":""}
|
|
36
36
|
}
|
|
37
|
-
`)),
|
|
37
|
+
`)),x.include(v,S),S.output){case r.Alpha:x.include(o,S),F.uniforms.add(T),F.code.add(C`
|
|
38
38
|
void main() {
|
|
39
39
|
discardBySlice(vpos);
|
|
40
|
-
${
|
|
40
|
+
${S.hasMultipassTerrain?"terrainDepthTest(gl_FragCoord, depth);":""}
|
|
41
41
|
|
|
42
42
|
fragColor = vec4(waterColor.a);
|
|
43
43
|
}
|
|
44
|
-
`);break;case r.Color:
|
|
44
|
+
`);break;case r.Color:x.include(t),x.include(n,{pbrMode:c.Disabled,lightingSphericalHarmonicsOrder:2}),x.include(u),x.include(o,S),x.include(m,S),x.include(p,S),F.uniforms.add(T,new j("timeElapsed",(e=>e.timeElapsed)),_.uniforms.get("view"),_.uniforms.get("localOrigin")),b(F,S),F.include(h),d(F),l(F),F.code.add(C`
|
|
45
45
|
void main() {
|
|
46
46
|
discardBySlice(vpos);
|
|
47
|
-
${
|
|
47
|
+
${S.hasMultipassTerrain?"terrainDepthTest(gl_FragCoord, depth);":""}
|
|
48
48
|
vec3 localUp = vnormal;
|
|
49
49
|
// the created normal is in tangent space
|
|
50
50
|
vec4 tangentNormalFoam = getSurfaceNormalAndFoam(vuv, timeElapsed);
|
|
@@ -52,18 +52,18 @@ fragColor = waterColor;
|
|
|
52
52
|
// we rotate the normal according to the tangent-bitangent-normal-Matrix
|
|
53
53
|
vec3 n = normalize(vtbnMatrix * tangentNormalFoam.xyz);
|
|
54
54
|
vec3 v = -normalize(vpos - cameraPosition);
|
|
55
|
-
float shadow = ${
|
|
55
|
+
float shadow = ${S.receiveShadows?C`1.0 - readShadowMap(vpos, linearDepth)`:"1.0"};
|
|
56
56
|
vec4 vPosView = view * vec4(vpos, 1.0);
|
|
57
57
|
vec4 final = vec4(getSeaColor(n, v, mainLightDirection, waterColor.rgb, mainLightIntensity, localUp, shadow, tangentNormalFoam.w, vPosView.xyz, vpos + localOrigin), waterColor.w);
|
|
58
58
|
|
|
59
59
|
// gamma correction
|
|
60
60
|
fragColor = delinearizeGamma(final);
|
|
61
61
|
fragColor = highlightSlice(fragColor, vpos);
|
|
62
|
-
${
|
|
62
|
+
${S.transparencyPassType===P.Color?"fragColor = premultiplyAlpha(fragColor);":""}
|
|
63
63
|
}
|
|
64
|
-
`);break;case r.Normal:
|
|
64
|
+
`);break;case r.Normal:x.include(g,S),x.include(u,S),x.include(o,S),x.varyings.add("vpos","vec3"),x.varyings.add("vuv","vec2"),_.uniforms.add(T),_.code.add(C`
|
|
65
65
|
void main(void) {
|
|
66
|
-
if (waterColor.a < ${
|
|
66
|
+
if (waterColor.a < ${C.float(w)}) {
|
|
67
67
|
// Discard this vertex
|
|
68
68
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
69
69
|
return;
|
|
@@ -74,14 +74,14 @@ fragColor = waterColor;
|
|
|
74
74
|
|
|
75
75
|
gl_Position = transformPosition(proj, view, vpos);
|
|
76
76
|
}
|
|
77
|
-
`),F.uniforms.add(new
|
|
77
|
+
`),F.uniforms.add(new j("timeElapsed",(e=>e.timeElapsed))),F.code.add(C`void main() {
|
|
78
78
|
discardBySlice(vpos);
|
|
79
79
|
vec4 tangentNormalFoam = getSurfaceNormalAndFoam(vuv, timeElapsed);
|
|
80
80
|
tangentNormalFoam.xyz = normalize(tangentNormalFoam.xyz);
|
|
81
81
|
fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w);
|
|
82
|
-
}`);break;case r.Highlight:
|
|
82
|
+
}`);break;case r.Highlight:x.include(s,S),x.varyings.add("vpos","vec3"),_.uniforms.add(T),_.code.add(C`
|
|
83
83
|
void main(void) {
|
|
84
|
-
if (waterColor.a < ${
|
|
84
|
+
if (waterColor.a < ${C.float(w)}) {
|
|
85
85
|
// Discard this vertex
|
|
86
86
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
87
87
|
return;
|
|
@@ -90,7 +90,22 @@ fragColor = vec4((tangentNormalFoam.xyz + vec3(1.0)) * 0.5, tangentNormalFoam.w)
|
|
|
90
90
|
vpos = position;
|
|
91
91
|
gl_Position = transformPosition(proj, view, vpos);
|
|
92
92
|
}
|
|
93
|
-
`),
|
|
93
|
+
`),x.include(o,S),F.code.add(C`void main() {
|
|
94
94
|
discardBySlice(vpos);
|
|
95
95
|
outputHighlight();
|
|
96
|
-
}`)
|
|
96
|
+
}`);break;case r.ObjectAndLayerIdColor:x.include(a,S),x.varyings.add("vpos","vec3"),_.uniforms.add(T),_.code.add(C`
|
|
97
|
+
void main(void) {
|
|
98
|
+
if (waterColor.a < ${C.float(w)}) {
|
|
99
|
+
// Discard this vertex
|
|
100
|
+
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
vpos = position;
|
|
105
|
+
gl_Position = transformPosition(proj, view, vpos);
|
|
106
|
+
forwardObjectAndLayerIdColor();
|
|
107
|
+
}
|
|
108
|
+
`),x.include(o,S),F.code.add(C`void main() {
|
|
109
|
+
discardBySlice(vpos);
|
|
110
|
+
outputObjectAndLayerIdColor();
|
|
111
|
+
}`)}return x}const x=Object.freeze(Object.defineProperty({__proto__:null,build:S},Symbol.toStringTag,{value:"Module"}));export{x as W,S as b};
|