define(["./Cartesian2-47311507","./EllipsoidTangentPlane-edb321d3","./buildModuleUrl-4e1b81e7","./Cartographic-3309dd0d","./when-b60132fc","./Check-7b2a090c","./TerrainEncoding-c4158481","./Math-119be1a3","./PrimitiveType-a54dc62f","./OrientedBoundingBox-87d59c2a","./GeometryAttribute-3a88ba31","./WebMercatorProjection-01b1b5e7","./RuntimeError-4a5c8994","./createTaskProcessorWorker","./Cartesian4-3ca25aab","./IntersectionTests-7386ffbf","./Plane-7ae8294c","./Event-16a2dfbf","./AttributeCompression-90851096","./ComponentDatatype-c140a87d","./WebGLConstants-4ae0db90","./PolygonPipeline-660e1625","./earcut-2.2.1-20c8012f","./EllipsoidRhumbLine-ed1a6bf4","./FeatureDetection-c3b71206"],(function(e,t,a,i,r,n,s,l,o,f,u,c,d,h,m,g,p,w,x,y,k,b,I,v,U){"use strict";var T=Object.freeze({NONE:0,LERC:1}),M={};M.DEFAULT_STRUCTURE=Object.freeze({heightScale:1,heightOffset:0,elementsPerHeight:1,stride:1,elementMultiplier:256,isBigEndian:!1});var V=new i.Cartesian3,A=new o.Matrix4,B=new i.Cartesian3,D=new i.Cartesian3;M.computeVertices=function(n){var d,h,m,g,p=Math.cos,w=Math.sin,x=Math.sqrt,y=Math.atan,k=Math.exp,b=l.CesiumMath.PI_OVER_TWO,I=l.CesiumMath.toRadians,v=n.heightmap,U=n.width,T=n.height,S=n.skirtHeight,P=r.defaultValue(n.isGeographic,!0),E=r.defaultValue(n.ellipsoid,e.Ellipsoid.WGS84),C=1/E.maximumRadius,F=n.nativeRectangle,L=n.rectangle;r.defined(L)?(d=L.west,h=L.south,m=L.east,g=L.north):P?(d=I(F.west),h=I(F.south),m=I(F.east),g=I(F.north)):(d=F.west*C,h=b-2*y(k(-F.south*C)),m=F.east*C,g=b-2*y(k(-F.north*C)));var O=n.relativeToCenter,N=r.defined(O);O=N?O:i.Cartesian3.ZERO;var R=r.defaultValue(n.exaggeration,1),z=r.defaultValue(n.includeWebMercatorT,!1),_=r.defaultValue(n.structure,M.DEFAULT_STRUCTURE),H=r.defaultValue(_.heightScale,M.DEFAULT_STRUCTURE.heightScale),Y=r.defaultValue(_.heightOffset,M.DEFAULT_STRUCTURE.heightOffset),W=r.defaultValue(_.elementsPerHeight,M.DEFAULT_STRUCTURE.elementsPerHeight),X=r.defaultValue(_.stride,M.DEFAULT_STRUCTURE.stride),Z=r.defaultValue(_.elementMultiplier,M.DEFAULT_STRUCTURE.elementMultiplier),j=r.defaultValue(_.isBigEndian,M.DEFAULT_STRUCTURE.isBigEndian),G=e.Rectangle.computeWidth(F),q=e.Rectangle.computeHeight(F),Q=G/(U-1),J=q/(T-1);P||(G*=C,q*=C);var K,$,ee=E.radiiSquared,te=ee.x,ae=ee.y,ie=ee.z,re=65536,ne=-65536,se=u.Transforms.eastNorthUpToFixedFrame(O,E),le=o.Matrix4.inverseTransformation(se,A);z&&(K=c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(h),$=1/(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(g)-K));var oe=B;oe.x=Number.POSITIVE_INFINITY,oe.y=Number.POSITIVE_INFINITY,oe.z=Number.POSITIVE_INFINITY;var fe=D;fe.x=Number.NEGATIVE_INFINITY,fe.y=Number.NEGATIVE_INFINITY,fe.z=Number.NEGATIVE_INFINITY;var ue=Number.POSITIVE_INFINITY,ce=U*T,de=ce+(S>0?2*U+2*T:0),he=new Array(de),me=new Array(de),ge=new Array(de),pe=z?new Array(de):[],we=0,xe=T,ye=0,ke=U;S>0&&(--we,++xe,--ye,++ke);for(var be=1e-5,Ie=we;Ie=T&&(ve=T-1);var Ue=F.north-J*ve,Te=((Ue=P?I(Ue):b-2*y(k(-Ue*C)))-h)/(g-h);Te=l.CesiumMath.clamp(Te,0,1);var Me=Ie===we,Ve=Ie===xe-1;S>0&&(Me?Ue+=be*q:Ve&&(Ue-=be*q));var Ae,Be=p(Ue),De=w(Ue),Se=ie*De;z&&(Ae=(c.WebMercatorProjection.geodeticLatitudeToMercatorAngle(Ue)-K)*$);for(var Pe=ye;Pe=U&&(Ee=U-1);var Ce,Fe,Le=ve*(U*X)+Ee*X;if(1===W)Ce=v[Le];else if(Ce=0,j)for(Fe=0;Fe=0;--Fe)Ce=Ce*Z+v[Le+Fe];Ce=(Ce*H+Y)*R,ne=Math.max(ne,Ce),re=Math.min(re,Ce);var Oe=F.west+Q*Ee;P?Oe=I(Oe):Oe*=C;var Ne=(Oe-d)/(m-d);Ne=l.CesiumMath.clamp(Ne,0,1);var Re=ve*U+Ee;if(S>0){var ze=Pe===ye,_e=Pe===ke-1,He=Me||Ve||ze||_e;if((Me||Ve)&&(ze||_e))continue;He&&(Ce-=S,ze?(Re=ce+(T-ve-1),Oe-=be*G):Ve?Re=ce+T+(U-Ee-1):_e?(Re=ce+T+U+ve,Oe+=be*G):Me&&(Re=ce+T+U+T+Ee))}var Ye=Be*p(Oe),We=Be*w(Oe),Xe=te*Ye,Ze=ae*We,je=1/x(Xe*Ye+Ze*We+Se*De),Ge=Xe*je,qe=Ze*je,Qe=Se*je,Je=new i.Cartesian3;Je.x=Ge+Ye*Ce,Je.y=qe+We*Ce,Je.z=Qe+De*Ce,he[Re]=Je,me[Re]=Ce,ge[Re]=new e.Cartesian2(Ne,Te),z&&(pe[Re]=Ae),o.Matrix4.multiplyByPoint(le,Je,V),i.Cartesian3.minimumByComponent(V,oe,oe),i.Cartesian3.maximumByComponent(V,fe,fe),ue=Math.min(ue,Ce)}}var Ke,$e,et=a.BoundingSphere.fromPoints(he);(r.defined(L)&&(Ke=f.OrientedBoundingBox.fromRectangle(L,re,ne,E)),N)&&($e=new s.EllipsoidalOccluder(E).computeHorizonCullingPointPossiblyUnderEllipsoid(O,he,re));for(var tt=new t.AxisAlignedBoundingBox(oe,fe,O),at=new s.TerrainEncoding(tt,ue,ne,se,!1,z),it=new Float32Array(de*at.getStride()),rt=0,nt=0;nt>3],M<<=7&V),p=0;p>3]),128&M?(o&&(o[V]=1),g=g>(s=B.encoding<2?v[U++]:T)?s:g,l[V++]=s):(o&&(o[V]=0),l[V++]=i),M<<=1;V+=A}else if(B.encoding<2)for(w=0;w(s=v[U++])?s:g,l[V++]=s;V+=A}else for(g=g>T?T:g,w=0;w0){var s=new Uint8Array(Math.ceil(i.width*i.height/8)),l=(n=new DataView(e,t,i.mask.numBytes)).getInt16(0,!0),o=2,f=0;do{if(l>0)for(;l--;)s[f++]=n.getUint8(o++);else{var u=n.getUint8(o++);for(l=-l;l--;)s[f++]=u}l=n.getInt16(o,!0),o+=2}while(o0?1:0),m=d+(i.height%d>0?1:0);i.pixels.blocks=new Array(h*m);for(var g=0,p=0;p3)throw"Invalid block encoding ("+k.encoding+")";if(2!==k.encoding){if(0!==b&&2!==b){if(b>>=6,k.offsetType=b,2===b)k.offset=n.getInt8(1),x++;else if(1===b)k.offset=n.getInt16(1,!0),x+=2;else{if(0!==b)throw"Invalid block offset type";k.offset=n.getFloat32(1,!0),x+=4}if(1===k.encoding)if(b=n.getUint8(x),x++,k.bitsPerPixel=63&b,b>>=6,k.numValidPixelsType=b,2===b)k.numValidPixels=n.getUint8(x),x++;else if(1===b)k.numValidPixels=n.getUint16(x,!0),x+=2;else{if(0!==b)throw"Invalid valid pixel count type";k.numValidPixels=n.getUint32(x,!0),x+=4}}var I;if(t+=x,3!==k.encoding)if(0===k.encoding){var v=(i.pixels.numBytes-1)/4;if(v!==Math.floor(v))throw"uncompressed block has invalid length";I=new ArrayBuffer(4*v),new Uint8Array(I).set(new Uint8Array(e,t,4*v));var U=new Float32Array(I);k.rawData=U,t+=4*v}else if(1===k.encoding){var T=Math.ceil(k.numValidPixels*k.bitsPerPixel/8),M=Math.ceil(T/4);I=new ArrayBuffer(4*M),new Uint8Array(I).set(new Uint8Array(e,t,T)),k.stuffedData=new Uint32Array(I),t+=T}}else t++}return i.eofOffset=t,i},n=function(e,t,a,i,r,n,s){var l,o,f,u=(1<=t)o=f>>>d-t&u,d-=t;else{var g=t-d;o=(f&u)<>>(d=32-g)}n[l]=o=a?(f=u>>>g-a&h,g-=a):(f=(u&h)<<(c=a-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=r[f];else for(d=Math.ceil((l-n)/s),o=0;o=a?(f=u>>>g-a&h,g-=a):(f=(u&h)<<(c=a-g)&h,f+=(u=e[m++])>>>(g=32-c)),t[o]=f=t?(d=s>>>c-t&l,c-=t):(d=(s&l)<<(u=t-c)&l,d+=(s=e[o++])>>>(c=32-u)),h[f]=d=a?(f=u>>>g&d,m-=a,g+=a):(f=u>>>g&d,m=32-(c=a-m),f|=((u=e[h++])&(1<=a?(f=u>>>g&d,m-=a,g+=a):(f=u>>>g&d,m=32-(c=a-m),f|=((u=e[h++])&(1<=t?(d=s>>>h&l,c-=t,h+=t):(d=s>>>h&l,c=32-(u=t-c),d|=((s=e[o++])&(1<=a?(n=s>>>u-a&o,u-=a):(n=(s&o)<<(l=a-u)&o,n+=(s=e[f++])>>>(u=32-l)),t[r]=n;return t},c=function(e,t,a,i){var r,n,s,l,o=(1<=a?(n=s>>>c&o,u-=a,c+=a):(n=s>>>c&o,u=32-(l=a-u),n|=((s=e[f++])&(1<=359?359:r;r-=s;do{t+=e[n++]<<8,a+=t+=e[n++]}while(--s);t=(65535&t)+(t>>>16),a=(65535&a)+(a>>>16)}return 1&i&&(a+=t+=e[n]<<8),((a=(65535&a)+(a>>>16))<<16|(t=(65535&t)+(t>>>16)))>>>0},readHeaderInfo:function(e,t){var a=t.ptr,i=new Uint8Array(e,a,6),r={};if(r.fileIdentifierString=String.fromCharCode.apply(null,i),0!==r.fileIdentifierString.lastIndexOf("Lerc2",0))throw"Unexpected file identifier string (expect Lerc2 ): "+r.fileIdentifierString;a+=6;var n,s=new DataView(e,a,8),l=s.getInt32(0,!0);if(r.fileVersion=l,a+=4,l>=3&&(r.checksum=s.getUint32(4,!0),a+=4),s=new DataView(e,a,12),r.height=s.getUint32(0,!0),r.width=s.getUint32(4,!0),a+=8,l>=4?(r.numDims=s.getUint32(8,!0),a+=4):r.numDims=1,s=new DataView(e,a,40),r.numValidPixel=s.getUint32(0,!0),r.microBlockSize=s.getInt32(4,!0),r.blobSize=s.getInt32(8,!0),r.imageType=s.getInt32(12,!0),r.maxZError=s.getFloat64(16,!0),r.zMin=s.getFloat64(24,!0),r.zMax=s.getFloat64(32,!0),a+=40,t.headerInfo=r,t.ptr=a,l>=3&&(n=l>=4?52:48,this.computeChecksumFletcher32(new Uint8Array(e,a-n,r.blobSize-14))!==r.checksum))throw"Checksum failed.";return!0},checkMinMaxRanges:function(e,t){var a=t.headerInfo,i=this.getDataTypeArray(a.imageType),r=a.numDims*this.getDataTypeSize(a.imageType),n=this.readSubArray(e,t.ptr,i,r),s=this.readSubArray(e,t.ptr+r,i,r);t.ptr+=2*r;var l,o=!0;for(l=0;l0){a=new Uint8Array(Math.ceil(s/8));var u=(o=new DataView(e,r,f.numBytes)).getInt16(0,!0),c=2,d=0,h=0;do{if(u>0)for(;u--;)a[d++]=o.getUint8(c++);else for(h=o.getUint8(c++),u=-u;u--;)a[d++]=h;u=o.getInt16(c,!0),c+=2}while(c>3],m<<=7&g):m=a[g>>3],128&m&&(i[g]=1);t.pixels.resultMask=i,f.bitset=a,r+=f.numBytes}return t.ptr=r,t.mask=f,!0},readDataOneSweep:function(e,t,a){var i,r=t.ptr,n=t.headerInfo,s=n.numDims,l=n.width*n.height,o=n.imageType,f=n.numValidPixel*d.getDataTypeSize(o)*s,u=t.pixels.resultMask;if(a===Uint8Array)i=new Uint8Array(e,r,f);else{var c=new ArrayBuffer(f);new Uint8Array(c).set(new Uint8Array(e,r,f)),i=new a(c)}if(i.length===l*s)t.pixels.resultPixels=i;else{t.pixels.resultPixels=new a(l*s);var h=0,m=0,g=0,p=0;if(s>1)for(g=0;g=s)return!1;var l=new Uint32Array(s-n);d.decodeBits(e,t,l);var o,f,u,c,m=[];for(o=n;o0&&(m[f].second=x<>>32-c,32-k>=c?32===(k+=c)&&(k=0,x=y[++b]):(k+=c-32,x=y[++b],m[f].second|=x>>>32-k));var I=0,v=0,U=new h;for(o=0;o=a?a:I,I>=30&&console.log("WARning, large NUM LUT BITS IS "+I);var T,M,V,A,B,D=[];for(o=n;o0)if(T=[c,f],c<=v)for(M=m[f].second<=0;A--)M>>>A&1?(B.right||(B.right=new h),B=B.right):(B.left||(B.left=new h),B=B.left),0!==A||B.val||(B.val=T[1]);return{decodeLut:D,numBitsLUTQick:v,numBitsLUT:I,tree:U,stuffedData:y,srcPtr:b,bitPos:k}},readHuffman:function(e,t,a){var i,r,n,s,l,o,f,u,c,d=t.headerInfo,h=d.numDims,m=t.headerInfo.height,g=t.headerInfo.width,p=g*m,w=this.readHuffmanTree(e,t),x=w.decodeLut,y=w.tree,k=w.stuffedData,b=w.srcPtr,I=w.bitPos,v=w.numBitsLUTQick,U=w.numBitsLUT,T=0===t.headerInfo.imageType?128:0,M=t.pixels.resultMask,V=0;I>0&&(b++,I=0);var A,B=k[b],D=1===t.encodeMode,S=new a(p*h),P=S;for(A=0;A1&&(P=new a(S.buffer,p*A,p),V=0),t.headerInfo.numValidPixel===g*m)for(u=0,o=0;o>>32-v,32-I>>64-I-v),x[l])r=x[l][1],I+=x[l][0];else for(l=s=B<>>32-U,32-I>>64-I-U),i=y,c=0;c>>U-c-1&1?i.right:i.left).left&&!i.right){r=i.val,I=I+c+1;break}I>=32&&(I-=32,B=k[++b]),n=r-T,D?(n+=f>0?V:o>0?P[u-g]:V,n&=255,P[u]=n,V=n):P[u]=n}else for(u=0,o=0;o>>32-v,32-I>>64-I-v),x[l])r=x[l][1],I+=x[l][0];else for(l=s=B<>>32-U,32-I>>64-I-U),i=y,c=0;c>>U-c-1&1?i.right:i.left).left&&!i.right){r=i.val,I=I+c+1;break}I>=32&&(I-=32,B=k[++b]),n=r-T,D?(f>0&&M[u-1]?n+=V:o>0&&M[u-g]?n+=P[u-g]:n+=V,n&=255,P[u]=n,V=n):P[u]=n}t.ptr=t.ptr+4*(b+1)+(I>0?4:0)}t.pixels.resultPixels=S},decodeBits:function(e,t,a,i,r){var n=t.headerInfo,d=n.fileVersion,h=0,m=e.byteLength-t.ptr>=5?5:e.byteLength-t.ptr,g=new DataView(e,t.ptr,m),p=g.getUint8(0);h++;var w=p>>6,x=0===w?4:3-w,y=(32&p)>0,k=31&p,b=0;if(1===x)b=g.getUint8(h),h++;else if(2===x)b=g.getUint16(h,!0),h+=2;else{if(4!==x)throw"Invalid valid pixel count type";b=g.getUint32(h,!0),h+=4}var I,v,U,T,M,V,A,B,D,S=2*n.maxZError,P=n.numDims>1?n.maxValues[r]:n.zMax;if(y){for(t.counter.lut++,B=g.getUint8(h),h++,T=Math.ceil((B-1)*k/8),M=Math.ceil(T/4),v=new ArrayBuffer(4*M),U=new Uint8Array(v),t.ptr+=h,U.set(new Uint8Array(e,t.ptr,T)),A=new Uint32Array(v),t.ptr+=T,D=0;B-1>>>D;)D++;T=Math.ceil(b*D/8),M=Math.ceil(T/4),v=new ArrayBuffer(4*M),(U=new Uint8Array(v)).set(new Uint8Array(e,t.ptr,T)),I=new Uint32Array(v),t.ptr+=T,V=d>=3?f(A,k,B-1,i,S,P):l(A,k,B-1,i,S,P),d>=3?o(I,a,D,b,V):s(I,a,D,b,V)}else t.counter.bitstuffer++,D=k,t.ptr+=h,D>0&&(T=Math.ceil(b*D/8),M=Math.ceil(T/4),v=new ArrayBuffer(4*M),(U=new Uint8Array(v)).set(new Uint8Array(e,t.ptr,T)),I=new Uint32Array(v),t.ptr+=T,d>=3?null===i?c(I,a,D,b):o(I,a,D,b,!1,i,S,P):null===i?u(I,a,D,b):s(I,a,D,b,!1,i,S,P))},readTiles:function(e,t,a){var i=t.headerInfo,r=i.width,n=i.height,s=i.microBlockSize,l=i.imageType,o=d.getDataTypeSize(l),f=Math.ceil(r/s),u=Math.ceil(n/s);t.pixels.numBlocksY=u,t.pixels.numBlocksX=f,t.pixels.ptr=0;var c,h,m,g,p,w,x,y,k=0,b=0,I=0,v=0,U=0,T=0,M=0,V=0,A=0,B=0,D=0,S=0,P=0,E=0,C=0,F=new a(s*s),L=n%s||s,O=r%s||s,N=i.numDims,R=t.pixels.resultMask,z=t.pixels.resultPixels;for(I=0;I1&&(z=new a(t.pixels.resultPixels.buffer,r*n*y*o,r*n)),M=e.byteLength-t.ptr,h={},C=0,C++,A=(V=(c=new DataView(e,t.ptr,Math.min(10,M))).getUint8(0))>>6&255,(V>>2&15)!=(v*s>>3&15))throw"integrity issue";if((p=3&V)>3)throw t.ptr+=C,"Invalid block encoding ("+p+")";if(2!==p)if(0===p){if(t.counter.uncompressed++,t.ptr+=C,S=(S=U*T*o)<(P=e.byteLength-t.ptr)?S:P,m=new ArrayBuffer(S%o==0?S:S+o-S%o),new Uint8Array(m).set(new Uint8Array(e,t.ptr,S)),g=new a(m),E=0,R)for(k=0;k1)for(n=0;n=-128&&t<=127;break;case 1:a=t>=0&&t<=255;break;case 2:a=t>=-32768&&t<=32767;break;case 3:a=t>=0&&t<=65536;break;case 4:a=t>=-2147483648&&t<=2147483647;break;case 5:a=t>=0&&t<=4294967296;break;case 6:a=t>=-34027999387901484e22&&t<=34027999387901484e22;break;case 7:a=t>=5e-324&&t<=17976931348623157e292;break;default:a=!1}return a},getDataTypeSize:function(e){var t=0;switch(e){case 0:case 1:t=1;break;case 2:case 3:t=2;break;case 4:case 5:case 6:t=4;break;case 7:t=8;break;default:t=e}return t},getDataTypeUsed:function(e,t){var a=e;switch(e){case 2:case 4:a=e-t;break;case 3:case 5:a=e-2*t;break;case 6:a=0===t?e:1===t?2:1;break;case 7:a=0===t?e:e-2*t+1;break;default:a=e}return a},getOnePixel:function(e,t,a,i){var r=0;switch(a){case 0:r=i.getInt8(t);break;case 1:r=i.getUint8(t);break;case 2:r=i.getInt16(t,!0);break;case 3:r=i.getUint16(t,!0);break;case 4:r=i.getInt32(t,!0);break;case 5:r=i.getUInt32(t,!0);break;case 6:r=i.getFloat32(t,!0);break;case 7:r=i.getFloat64(t,!0);break;default:throw"the decoder does not understand this pixel type"}return r}},h=function(e,t,a){this.val=e,this.left=t,this.right=a},{decode:function(e,t){var a=(t=t||{}).noDataValue,i=0,r={};r.ptr=t.inputOffset||0,r.pixels={},d.readHeaderInfo(e,r);var n=r.headerInfo,s=n.fileVersion,l=d.getDataTypeArray(n.imageType);d.readMask(e,r),n.numValidPixel===n.width*n.height||r.pixels.resultMask||(r.pixels.resultMask=t.maskData);var o,f=n.width*n.height;if(r.pixels.resultPixels=new l(f*n.numDims),r.counter={onesweep:0,uncompressed:0,lut:0,bitstuffer:0,constant:0,constantoffset:0},0!==n.numValidPixel)if(n.zMax===n.zMin)d.constructConstantSurface(r);else if(s>=4&&d.checkMinMaxRanges(e,r))d.constructConstantSurface(r);else{var u=new DataView(e,r.ptr,2),c=u.getUint8(0);if(r.ptr++,c)d.readDataOneSweep(e,r,l);else if(s>1&&n.imageType<=1&&Math.abs(n.maxZError-.5)<1e-5){var h=u.getUint8(1);if(r.ptr++,r.encodeMode=h,h>2||s<4&&h>1)throw"Invalid Huffman flag "+h;h?d.readHuffman(e,r,l):d.readTiles(e,r,l)}else d.readTiles(e,r,l)}r.eofOffset=r.ptr,t.inputOffset?(o=r.headerInfo.blobSize+t.inputOffset-r.ptr,Math.abs(o)>=1&&(r.eofOffset=t.inputOffset+r.headerInfo.blobSize)):(o=r.headerInfo.blobSize-r.ptr,Math.abs(o)>=1&&(r.eofOffset=r.headerInfo.blobSize));var m={width:n.width,height:n.height,pixelData:r.pixels.resultPixels,minValue:n.zMin,maxValue:n.zMax,validPixelCount:n.numValidPixel,dimCount:n.numDims,dimStats:{minValues:n.minValues,maxValues:n.maxValues},maskData:r.pixels.resultMask};if(r.pixels.resultMask&&d.isValidPixelValue(n.imageType,a)){var g=r.pixels.resultMask;for(i=0;i1&&k.fileInfo.mask&&k.fileInfo.mask.numBytes>0&&g.push(k.maskData),h++,y.pixels.push(k.pixelData),y.statistics.push({minValue:k.minValue,maxValue:k.maxValue,noDataValue:k.noDataValue,dimStats:k.dimStats})}if(i>1&&g.length>1){for(d=y.width*y.height,y.bandMasks=g,(f=new Uint8Array(d)).set(g[0]),u=1;u