2 lines
25 KiB
JavaScript
2 lines
25 KiB
JavaScript
|
define(["./RuntimeError-9b4ce3fb","./defaultValue-f6d5e6da","./createTaskProcessorWorker"],(function(e,t,n){"use strict";const i=1953029805,r=2917034100;function a(t,n){if(a.passThroughDataForTesting)return n;const o=t.byteLength;if(0===o||o%4!=0)throw new e.RuntimeError("The length of key must be greater than 0 and a multiple of 4.");const s=new DataView(n),l=s.getUint32(0,!0);if(l===i||l===r)return n;const c=new DataView(t);let d=0;const f=n.byteLength,h=f-f%8,u=o;let w,b=8;for(;d<h;)for(b=(b+8)%24,w=b;d<h&&w<u;)s.setUint32(d,s.getUint32(d,!0)^c.getUint32(w,!0),!0),s.setUint32(d+4,s.getUint32(d+4,!0)^c.getUint32(w+4,!0),!0),d+=8,w+=24;if(d<f)for(w>=u&&(b=(b+8)%24,w=b);d<f;)s.setUint8(d,s.getUint8(d)^c.getUint8(w)),d++,w++}function o(e,t){return 0!=(e&t)}a.passThroughDataForTesting=!1;const s=[1,2,4,8];function l(e,t,n,i,r,a){this._bits=e,this.cnodeVersion=t,this.imageryVersion=n,this.terrainVersion=i,this.imageryProvider=r,this.terrainProvider=a,this.ancestorHasTerrain=!1,this.terrainState=void 0}l.clone=function(e,n){return t.defined(n)?(n._bits=e._bits,n.cnodeVersion=e.cnodeVersion,n.imageryVersion=e.imageryVersion,n.terrainVersion=e.terrainVersion,n.imageryProvider=e.imageryProvider,n.terrainProvider=e.terrainProvider):n=new l(e._bits,e.cnodeVersion,e.imageryVersion,e.terrainVersion,e.imageryProvider,e.terrainProvider),n.ancestorHasTerrain=e.ancestorHasTerrain,n.terrainState=e.terrainState,n},l.prototype.setParent=function(e){this.ancestorHasTerrain=e.ancestorHasTerrain||this.hasTerrain()},l.prototype.hasSubtree=function(){return o(this._bits,16)},l.prototype.hasImagery=function(){return o(this._bits,64)},l.prototype.hasTerrain=function(){return o(this._bits,128)},l.prototype.hasChildren=function(){return o(this._bits,15)},l.prototype.hasChild=function(e){return o(this._bits,s[e])},l.prototype.getChildBitmask=function(){return 15&this._bits};var c={},d={};var f=(e,t,n,i)=>{let r=65535&e|0,a=e>>>16&65535|0,o=0;for(;0!==n;){o=n>2e3?2e3:n,n-=o;do{r=r+t[i++]|0,a=a+r|0}while(--o);r%=65521,a%=65521}return r|a<<16|0};const h=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var u=(e,t,n,i)=>{const r=h,a=i+n;e^=-1;for(let n=i;n<a;n++)e=e>>>8^r[255&(e^t[n])];return-1^e};const w=16209;const b=15,m=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),g=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),k=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),_=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var p={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const y=f,v=u,E=function(e,t){let n,i,r,a,o,s,l,c,d,f,h,u,b,m,g,k,_,p,y,v,E,x,R,A;const T=e.state;n=e.next_in,R=e.input,i=n+(e.avail_in-5),r=e.next_out,A=e.output,a=r-(t-e.avail_out),o=r+(e.avail_out-257),s=T.dmax,l=T.wsize,c=T.whave,d=T.wnext,f=T.window,h=T.hold,u=T.bits,b=T.lencode,m=T.distcode,g=(1<<T.lenbits)-1,k=(1<<T.distbits)-1;e:do{u<15&&(h+=R[n++]<<u,u+=8,h+=R[n++]<<u,u+=8),_=b[h&g];t:for(;;){if(p=_>>>24,h>>>=p,u-=p,p=_>>>16&255,0===p)A[r++]=65535&_;else{if(!(16&p)){if(0==(64&p)){_=b[(65535&_)+(h&(1<<p)-1)];continue t}if(32&p){T.mode=16191;break e}e.msg="invalid literal/length code",T.mode=w;break e}y=65535&_,p&=15,p&&(u<p&&(h+=R[n++]<<u,u+=8),y+=h&(1<<p)-1,h>>>=p,u-=p),u<15&&(h+=R[n++]<<u,u+=8,h+=R[n++]<<u,u+=8),_=m[h&k];n:for(;;){if(p=_>>>24,h>>>=p,u-=p,p=_>>>16&255,!(16&p)){if(0==(64&p)){_=m[(65535&_)+(h&(1<<p)-1)];continue n}e.msg="invalid distance code",T.mode=w;break e}if(v=6
|