qd-changjing/public/leaflet/libs/iClientfor3D/Workers/zlib.min.js

25 lines
18 KiB
JavaScript

/**
* Cesium - https://github.com/AnalyticalGraphicsInc/cesium
*
* Copyright 2011-2017 Cesium Contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Columbus View (Pat. Pend.)
*
* Portions licensed separately.
* See https://github.com/AnalyticalGraphicsInc/cesium/blob/master/LICENSE.md for full licensing details.
*/
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */
!function(){(function(){"use strict";function r(r){throw r}function t(r,t){var e=r.split("."),i=U;!(e[0]in i)&&i.execScript&&i.execScript("var "+e[0]);for(var n;e.length&&(n=e.shift());)e.length||t===k?i=i[n]?i[n]:i[n]={}:i[n]=t}function e(t,e){this.index="number"==typeof e?e:0,this.i=0,this.buffer=t instanceof(m?Uint8Array:Array)?t:new(m?Uint8Array:Array)(32768),2*this.buffer.length<=this.index&&r(Error("invalid index")),this.buffer.length<=this.index&&this.f()}function i(r){this.buffer=new(m?Uint16Array:Array)(2*r),this.length=0}function n(r){var t,e,i,n,s,a,h,f,o,u,c=r.length,l=0,b=Number.POSITIVE_INFINITY;for(f=0;c>f;++f)r[f]>l&&(l=r[f]),r[f]<b&&(b=r[f]);for(t=1<<l,e=new(m?Uint32Array:Array)(t),i=1,n=0,s=2;l>=i;){for(f=0;c>f;++f)if(r[f]===i){for(a=0,h=n,o=0;i>o;++o)a=a<<1|1&h,h>>=1;for(u=i<<16|f,o=a;t>o;o+=s)e[o]=u;++n}++i,n<<=1,s<<=1}return[e,l,b]}function s(r,t){this.h=D,this.w=0,this.input=m&&r instanceof Array?new Uint8Array(r):r,this.b=0,t&&(t.lazy&&(this.w=t.lazy),"number"==typeof t.compressionType&&(this.h=t.compressionType),t.outputBuffer&&(this.a=m&&t.outputBuffer instanceof Array?new Uint8Array(t.outputBuffer):t.outputBuffer),"number"==typeof t.outputIndex&&(this.b=t.outputIndex)),this.a||(this.a=new(m?Uint8Array:Array)(32768))}function a(r,t){this.length=r,this.H=t}function h(t,e){function i(t,e){var i,n=t.H,s=[],a=0;i=S[t.length],s[a++]=65535&i,s[a++]=i>>16&255,s[a++]=i>>24;var h;switch(w){case 1===n:h=[0,n-1,0];break;case 2===n:h=[1,n-2,0];break;case 3===n:h=[2,n-3,0];break;case 4===n:h=[3,n-4,0];break;case 6>=n:h=[4,n-5,1];break;case 8>=n:h=[5,n-7,1];break;case 12>=n:h=[6,n-9,2];break;case 16>=n:h=[7,n-13,2];break;case 24>=n:h=[8,n-17,3];break;case 32>=n:h=[9,n-25,3];break;case 48>=n:h=[10,n-33,4];break;case 64>=n:h=[11,n-49,4];break;case 96>=n:h=[12,n-65,5];break;case 128>=n:h=[13,n-97,5];break;case 192>=n:h=[14,n-129,6];break;case 256>=n:h=[15,n-193,6];break;case 384>=n:h=[16,n-257,7];break;case 512>=n:h=[17,n-385,7];break;case 768>=n:h=[18,n-513,8];break;case 1024>=n:h=[19,n-769,8];break;case 1536>=n:h=[20,n-1025,9];break;case 2048>=n:h=[21,n-1537,9];break;case 3072>=n:h=[22,n-2049,10];break;case 4096>=n:h=[23,n-3073,10];break;case 6144>=n:h=[24,n-4097,11];break;case 8192>=n:h=[25,n-6145,11];break;case 12288>=n:h=[26,n-8193,12];break;case 16384>=n:h=[27,n-12289,12];break;case 24576>=n:h=[28,n-16385,13];break;case 32768>=n:h=[29,n-24577,13];break;default:r("invalid distance")}i=h,s[a++]=i[0],s[a++]=i[1],s[a++]=i[2];var f,o;for(f=0,o=s.length;o>f;++f)p[g++]=s[f];A[s[0]]++,v[s[3]]++,d=t.length+e-1,l=null}var n,s,a,h,o,u,c,l,b,y={},p=m?new Uint16Array(2*e.length):[],g=0,d=0,A=new(m?Uint32Array:Array)(286),v=new(m?Uint32Array:Array)(30),U=t.w;if(!m){for(a=0;285>=a;)A[a++]=0;for(a=0;29>=a;)v[a++]=0}for(A[256]=1,n=0,s=e.length;s>n;++n){for(a=o=0,h=3;h>a&&n+a!==s;++a)o=o<<8|e[n+a];if(y[o]===k&&(y[o]=[]),u=y[o],!(0<d--)){for(;0<u.length&&32768<n-u[0];)u.shift();if(n+3>=s){for(l&&i(l,-1),a=0,h=s-n;h>a;++a)b=e[n+a],p[g++]=b,++A[b];break}0<u.length?(c=f(e,n,u),l?l.length<c.length?(b=e[n-1],p[g++]=b,++A[b],i(c,0)):i(l,-1):c.length<U?l=c:i(c,0)):l?i(l,-1):(b=e[n],p[g++]=b,++A[b])}u.push(n)}return p[g++]=256,A[256]++,t.M=A,t.L=v,m?p.subarray(0,g):p}function f(r,t,e){var i,n,s,h,f,o,u=0,c=r.length;h=0,o=e.length;r:for(;o>h;h++){if(i=e[o-h-1],s=3,u>3){for(f=u;f>3;f--)if(r[i+f-1]!==r[t+f-1])continue r;s=u}for(;258>s&&c>t+s&&r[i+s]===r[t+s];)++s;if(s>u&&(n=i,u=s),258===s)break}return new a(u,t-n)}function o(r,t){var e,n,s,a,h,f=r.length,o=new i(572),c=new(m?Uint8Array:Array)(f);if(!m)for(a=0;f>a;a++)c[a]=0;for(a=0;f>a;++a)0<r[a]&&o.push(a,r[a]);if(e=Array(o.length/2),n=new(m?Uint32Array:Array)(o.length/2),1===e.length)return c[o.pop().index]=1,c;for(a=0,h=o.length/2;h>a;++a)e[a]=o.pop(),n[a]=e[a].value;for(s=u(n,n.length,t),a=0,h=e.length;h>a;++a)c[e[a].index]=s[a];return c}function u(r,t,e){function i(r){var e=b[r][y[r]];e===t?(i(r+1),i(r+1)):--c[e],++y[r]}var n,s,a,h,f,o=new(m?Uint16Array:Array)(e),u=new(m?Uint8Array:Array)(e),c=new(m?Uint8Array:Array)(t),l=Array(e),b=Array(e),y=Array(e),p=(1<<e)-t,g=1<<e-1;for(o[e-1]=t,s=0;e>s;++s)g>p?u[s]=0:(u[s]=1,p-=g),p<<=1,o[e-2-s]=(o[e-1-s]/2|0)+t;for(o[0]=u[0],l[0]=Array(o[0]),b[0]=Array(o[0]),s=1;e>s;++s)o[s]>2*o[s-1]+u[s]&&(o[s]=2*o[s-1]+u[s]),l[s]=Array(o[s]),b[s]=Array(o[s]);for(n=0;t>n;++n)c[n]=e;for(a=0;a<o[e-1];++a)l[e-1][a]=r[a],b[e-1][a]=a;for(n=0;e>n;++n)y[n]=0;for(1===u[e-1]&&(--c[0],++y[e-1]),s=e-2;s>=0;--s){for(h=n=0,f=y[s+1],a=0;a<o[s];a++)h=l[s+1][f]+l[s+1][f+1],h>r[n]?(l[s][a]=h,b[s][a]=t,f+=2):(l[s][a]=r[n],b[s][a]=n,++n);y[s]=0,1===u[s]&&i(s)}return c}function c(r){var t,e,i,n,s=new(m?Uint16Array:Array)(r.length),a=[],h=[],f=0;for(t=0,e=r.length;e>t;t++)a[r[t]]=(0|a[r[t]])+1;for(t=1,e=16;e>=t;t++)h[t]=f,f+=0|a[t],f<<=1;for(t=0,e=r.length;e>t;t++)for(f=h[r[t]],h[r[t]]+=1,i=s[t]=0,n=r[t];n>i;i++)s[t]=s[t]<<1|1&f,f>>>=1;return s}function l(t,e){switch(this.l=[],this.m=32768,this.e=this.g=this.c=this.q=0,this.input=m?new Uint8Array(t):t,this.s=!1,this.n=L,this.C=!1,(e||!(e={}))&&(e.index&&(this.c=e.index),e.bufferSize&&(this.m=e.bufferSize),e.bufferType&&(this.n=e.bufferType),e.resize&&(this.C=e.resize)),this.n){case Z:this.b=32768,this.a=new(m?Uint8Array:Array)(32768+this.m+258);break;case L:this.b=0,this.a=new(m?Uint8Array:Array)(this.m),this.f=this.K,this.t=this.I,this.o=this.J;break;default:r(Error("invalid inflate mode"))}}function b(t,e){for(var i,n=t.g,s=t.e,a=t.input,h=t.c,f=a.length;e>s;)h>=f&&r(Error("input buffer is broken")),n|=a[h++]<<s,s+=8;return i=n&(1<<e)-1,t.g=n>>>e,t.e=s-e,t.c=h,i}function y(r,t){for(var e,i,n=r.g,s=r.e,a=r.input,h=r.c,f=a.length,o=t[0],u=t[1];u>s&&!(h>=f);)n|=a[h++]<<s,s+=8;return e=o[n&(1<<u)-1],i=e>>>16,r.g=n>>i,r.e=s-i,r.c=h,65535&e}function p(r){function t(r,t,e){var i,n,s,a=this.z;for(s=0;r>s;)switch(i=y(this,t)){case 16:for(n=3+b(this,2);n--;)e[s++]=a;break;case 17:for(n=3+b(this,3);n--;)e[s++]=0;a=0;break;case 18:for(n=11+b(this,7);n--;)e[s++]=0;a=0;break;default:a=e[s++]=i}return this.z=a,e}var e,i,s,a,h=b(r,5)+257,f=b(r,5)+1,o=b(r,4)+4,u=new(m?Uint8Array:Array)(G.length);for(a=0;o>a;++a)u[G[a]]=b(r,3);if(!m)for(a=o,o=u.length;o>a;++a)u[G[a]]=0;e=n(u),i=new(m?Uint8Array:Array)(h),s=new(m?Uint8Array:Array)(f),r.z=0,r.o(n(t.call(r,h,e,i)),n(t.call(r,f,e,s)))}function g(r){if("string"==typeof r){var t,e,i=r.split("");for(t=0,e=i.length;e>t;t++)i[t]=(255&i[t].charCodeAt(0))>>>0;r=i}for(var n,s=1,a=0,h=r.length,f=0;h>0;){n=h>1024?1024:h,h-=n;do s+=r[f++],a+=s;while(--n);s%=65521,a%=65521}return(a<<16|s)>>>0}function d(t,e){var i,n;switch(this.input=t,this.c=0,(e||!(e={}))&&(e.index&&(this.c=e.index),e.verify&&(this.N=e.verify)),i=t[this.c++],n=t[this.c++],15&i){case ir:this.method=ir;break;default:r(Error("unsupported compression method"))}0!==((i<<8)+n)%31&&r(Error("invalid fcheck flag:"+((i<<8)+n)%31)),32&n&&r(Error("fdict flag is not supported")),this.B=new l(t,{index:this.c,bufferSize:e.bufferSize,bufferType:e.bufferType,resize:e.resize})}function A(r,t){this.input=r,this.a=new(m?Uint8Array:Array)(32768),this.h=nr.k;var e,i={};!t&&(t={})||"number"!=typeof t.compressionType||(this.h=t.compressionType);for(e in t)i[e]=t[e];i.outputBuffer=this.a,this.A=new s(this.input,i)}function v(r,e){var i,n,s,a;if(Object.keys)i=Object.keys(e);else for(n in i=[],s=0,e)i[s++]=n;for(s=0,a=i.length;a>s;++s)n=i[s],t(r+"."+n,e[n])}var k=void 0,w=!0,U=this,m="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array&&"undefined"!=typeof DataView;e.prototype.f=function(){var r,t=this.buffer,e=t.length,i=new(m?Uint8Array:Array)(e<<1);if(m)i.set(t);else for(r=0;e>r;++r)i[r]=t[r];return this.buffer=i},e.prototype.d=function(r,t,e){var i,n=this.buffer,s=this.index,a=this.i,h=n[s];if(e&&t>1&&(r=t>8?(T[255&r]<<24|T[r>>>8&255]<<16|T[r>>>16&255]<<8|T[r>>>24&255])>>32-t:T[r]>>8-t),8>t+a)h=h<<t|r,a+=t;else for(i=0;t>i;++i)h=h<<1|r>>t-i-1&1,8===++a&&(a=0,n[s++]=T[h],h=0,s===n.length&&(n=this.f()));n[s]=h,this.buffer=n,this.i=a,this.index=s},e.prototype.finish=function(){var r,t=this.buffer,e=this.index;return 0<this.i&&(t[e]<<=8-this.i,t[e]=T[t[e]],e++),m?r=t.subarray(0,e):(t.length=e,r=t),r};var E,x=new(m?Uint8Array:Array)(256);for(E=0;256>E;++E){for(var N=E,I=N,z=7,N=N>>>1;N;N>>>=1)I<<=1,I|=1&N,--z;x[E]=(I<<z&255)>>>0}var T=x;i.prototype.getParent=function(r){return 2*((r-2)/4|0)},i.prototype.push=function(r,t){var e,i,n,s=this.buffer;for(e=this.length,s[this.length++]=t,s[this.length++]=r;e>0&&(i=this.getParent(e),s[e]>s[i]);)n=s[e],s[e]=s[i],s[i]=n,n=s[e+1],s[e+1]=s[i+1],s[i+1]=n,e=i;return this.length},i.prototype.pop=function(){var r,t,e,i,n,s=this.buffer;for(t=s[0],r=s[1],this.length-=2,s[0]=s[this.length],s[1]=s[this.length+1],n=0;(i=2*n+2,!(i>=this.length))&&(i+2<this.length&&s[i+2]>s[i]&&(i+=2),s[i]>s[n]);)e=s[n],s[n]=s[i],s[i]=e,e=s[n+1],s[n+1]=s[i+1],s[i+1]=e,n=i;return{index:r,value:t,length:this.length}};var B,D=2,O={NONE:0,r:1,k:D,O:3},j=[];for(B=0;288>B;B++)switch(w){case 143>=B:j.push([B+48,8]);break;case 255>=B:j.push([B-144+400,9]);break;case 279>=B:j.push([B-256+0,7]);break;case 287>=B:j.push([B-280+192,8]);break;default:r("invalid literal: "+B)}s.prototype.j=function(){var t,i,n,s,a=this.input;switch(this.h){case 0:for(n=0,s=a.length;s>n;){i=m?a.subarray(n,n+65535):a.slice(n,n+65535),n+=i.length;var f=i,u=n===s,l=k,b=k,y=k,p=k,g=k,d=this.a,A=this.b;if(m){for(d=new Uint8Array(this.a.buffer);d.length<=A+f.length+5;)d=new Uint8Array(d.length<<1);d.set(this.a)}if(l=u?1:0,d[A++]=0|l,b=f.length,y=~b+65536&65535,d[A++]=255&b,d[A++]=b>>>8&255,d[A++]=255&y,d[A++]=y>>>8&255,m)d.set(f,A),A+=f.length,d=d.subarray(0,A);else{for(p=0,g=f.length;g>p;++p)d[A++]=f[p];d.length=A}this.b=A,this.a=d}break;case 1:var v=new e(m?new Uint8Array(this.a.buffer):this.a,this.b);v.d(1,1,w),v.d(1,2,w);var U,E,x,N=h(this,a);for(U=0,E=N.length;E>U;U++)if(x=N[U],e.prototype.d.apply(v,j[x]),x>256)v.d(N[++U],N[++U],w),v.d(N[++U],5),v.d(N[++U],N[++U],w);else if(256===x)break;this.a=v.finish(),this.b=this.a.length;break;case D:var I,z,T,B,O,C,S,Z,L,M,P,F,q,G,K,V=new e(m?new Uint8Array(this.a.buffer):this.a,this.b),Y=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],H=Array(19);for(I=D,V.d(1,1,w),V.d(I,2,w),z=h(this,a),C=o(this.M,15),S=c(C),Z=o(this.L,7),L=c(Z),T=286;T>257&&0===C[T-1];T--);for(B=30;B>1&&0===Z[B-1];B--);var J,W,X,_,Q,R,$=T,rr=B,tr=new(m?Uint32Array:Array)($+rr),er=new(m?Uint32Array:Array)(316),ir=new(m?Uint8Array:Array)(19);for(J=W=0;$>J;J++)tr[W++]=C[J];for(J=0;rr>J;J++)tr[W++]=Z[J];if(!m)for(J=0,_=ir.length;_>J;++J)ir[J]=0;for(J=Q=0,_=tr.length;_>J;J+=W){for(W=1;_>J+W&&tr[J+W]===tr[J];++W);if(X=W,0===tr[J])if(3>X)for(;0<X--;)er[Q++]=0,ir[0]++;else for(;X>0;)R=138>X?X:138,R>X-3&&X>R&&(R=X-3),10>=R?(er[Q++]=17,er[Q++]=R-3,ir[17]++):(er[Q++]=18,er[Q++]=R-11,ir[18]++),X-=R;else if(er[Q++]=tr[J],ir[tr[J]]++,X--,3>X)for(;0<X--;)er[Q++]=tr[J],ir[tr[J]]++;else for(;X>0;)R=6>X?X:6,R>X-3&&X>R&&(R=X-3),er[Q++]=16,er[Q++]=R-3,ir[16]++,X-=R}for(t=m?er.subarray(0,Q):er.slice(0,Q),M=o(ir,7),G=0;19>G;G++)H[G]=M[Y[G]];for(O=19;O>4&&0===H[O-1];O--);for(P=c(M),V.d(T-257,5,w),V.d(B-1,5,w),V.d(O-4,4,w),G=0;O>G;G++)V.d(H[G],3,w);for(G=0,K=t.length;K>G;G++)if(F=t[G],V.d(P[F],M[F],w),F>=16){switch(G++,F){case 16:q=2;break;case 17:q=3;break;case 18:q=7;break;default:r("invalid code: "+F)}V.d(t[G],q,w)}var nr,sr,ar,hr,fr,or,ur,cr,lr=[S,C],br=[L,Z];for(fr=lr[0],or=lr[1],ur=br[0],cr=br[1],nr=0,sr=z.length;sr>nr;++nr)if(ar=z[nr],V.d(fr[ar],or[ar],w),ar>256)V.d(z[++nr],z[++nr],w),hr=z[++nr],V.d(ur[hr],cr[hr],w),V.d(z[++nr],z[++nr],w);else if(256===ar)break;this.a=V.finish(),this.b=this.a.length;break;default:r("invalid compression type")}return this.a};var C=function(){function t(t){switch(w){case 3===t:return[257,t-3,0];case 4===t:return[258,t-4,0];case 5===t:return[259,t-5,0];case 6===t:return[260,t-6,0];case 7===t:return[261,t-7,0];case 8===t:return[262,t-8,0];case 9===t:return[263,t-9,0];case 10===t:return[264,t-10,0];case 12>=t:return[265,t-11,1];case 14>=t:return[266,t-13,1];case 16>=t:return[267,t-15,1];case 18>=t:return[268,t-17,1];case 22>=t:return[269,t-19,2];case 26>=t:return[270,t-23,2];case 30>=t:return[271,t-27,2];case 34>=t:return[272,t-31,2];case 42>=t:return[273,t-35,3];case 50>=t:return[274,t-43,3];case 58>=t:return[275,t-51,3];case 66>=t:return[276,t-59,3];case 82>=t:return[277,t-67,4];case 98>=t:return[278,t-83,4];case 114>=t:return[279,t-99,4];case 130>=t:return[280,t-115,4];case 162>=t:return[281,t-131,5];case 194>=t:return[282,t-163,5];case 226>=t:return[283,t-195,5];case 257>=t:return[284,t-227,5];case 258===t:return[285,t-258,0];default:r("invalid length: "+t)}}var e,i,n=[];for(e=3;258>=e;e++)i=t(e),n[e]=i[2]<<24|i[1]<<16|i[0];return n}(),S=m?new Uint32Array(C):C,Z=0,L=1,M={F:Z,D:L};l.prototype.p=function(){for(;!this.s;){var t=b(this,3);switch(1&t&&(this.s=w),t>>>=1){case 0:var e=this.input,i=this.c,n=this.a,s=this.b,a=e.length,h=k,f=k,o=n.length,u=k;switch(this.e=this.g=0,i+1>=a&&r(Error("invalid uncompressed block header: LEN")),h=e[i++]|e[i++]<<8,i+1>=a&&r(Error("invalid uncompressed block header: NLEN")),f=e[i++]|e[i++]<<8,h===~f&&r(Error("invalid uncompressed block header: length verify")),i+h>e.length&&r(Error("input buffer is broken")),this.n){case Z:for(;s+h>n.length;){if(u=o-s,h-=u,m)n.set(e.subarray(i,i+u),s),s+=u,i+=u;else for(;u--;)n[s++]=e[i++];this.b=s,n=this.f(),s=this.b}break;case L:for(;s+h>n.length;)n=this.f({v:2});break;default:r(Error("invalid inflate mode"))}if(m)n.set(e.subarray(i,i+h),s),s+=h,i+=h;else for(;h--;)n[s++]=e[i++];this.c=i,this.b=s,this.a=n;break;case 1:this.o(rr,er);break;case 2:p(this);break;default:r(Error("unknown BTYPE: "+t))}}return this.t()};var P,F,q=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],G=m?new Uint16Array(q):q,K=[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,258,258],V=m?new Uint16Array(K):K,Y=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],H=m?new Uint8Array(Y):Y,J=[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],W=m?new Uint16Array(J):J,X=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],_=m?new Uint8Array(X):X,Q=new(m?Uint8Array:Array)(288);for(P=0,F=Q.length;F>P;++P)Q[P]=143>=P?8:255>=P?9:279>=P?7:8;var R,$,rr=n(Q),tr=new(m?Uint8Array:Array)(30);for(R=0,$=tr.length;$>R;++R)tr[R]=5;var er=n(tr);l.prototype.o=function(r,t){var e=this.a,i=this.b;this.u=r;for(var n,s,a,h,f=e.length-258;256!==(n=y(this,r));)if(256>n)i>=f&&(this.b=i,e=this.f(),i=this.b),e[i++]=n;else for(s=n-257,h=V[s],0<H[s]&&(h+=b(this,H[s])),n=y(this,t),a=W[n],0<_[n]&&(a+=b(this,_[n])),i>=f&&(this.b=i,e=this.f(),i=this.b);h--;)e[i]=e[i++-a];for(;8<=this.e;)this.e-=8,this.c--;this.b=i},l.prototype.J=function(r,t){var e=this.a,i=this.b;this.u=r;for(var n,s,a,h,f=e.length;256!==(n=y(this,r));)if(256>n)i>=f&&(e=this.f(),f=e.length),e[i++]=n;else for(s=n-257,h=V[s],0<H[s]&&(h+=b(this,H[s])),n=y(this,t),a=W[n],0<_[n]&&(a+=b(this,_[n])),i+h>f&&(e=this.f(),f=e.length);h--;)e[i]=e[i++-a];for(;8<=this.e;)this.e-=8,this.c--;this.b=i},l.prototype.f=function(){var r,t,e=new(m?Uint8Array:Array)(this.b-32768),i=this.b-32768,n=this.a;if(m)e.set(n.subarray(32768,e.length));else for(r=0,t=e.length;t>r;++r)e[r]=n[r+32768];if(this.l.push(e),this.q+=e.length,m)n.set(n.subarray(i,i+32768));else for(r=0;32768>r;++r)n[r]=n[i+r];return this.b=32768,n},l.prototype.K=function(r){var t,e,i,n,s=this.input.length/this.c+1|0,a=this.input,h=this.a;return r&&("number"==typeof r.v&&(s=r.v),"number"==typeof r.G&&(s+=r.G)),2>s?(e=(a.length-this.c)/this.u[2],n=258*(e/2)|0,i=n<h.length?h.length+n:h.length<<1):i=h.length*s,m?(t=new Uint8Array(i),t.set(h)):t=h,this.a=t},l.prototype.t=function(){var r,t,e,i,n,s=0,a=this.a,h=this.l,f=new(m?Uint8Array:Array)(this.q+(this.b-32768));if(0===h.length)return m?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);for(t=0,e=h.length;e>t;++t)for(r=h[t],i=0,n=r.length;n>i;++i)f[s++]=r[i];for(t=32768,e=this.b;e>t;++t)f[s++]=a[t];return this.l=[],this.buffer=f},l.prototype.I=function(){var r,t=this.b;return m?this.C?(r=new Uint8Array(t),r.set(this.a.subarray(0,t))):r=this.a.subarray(0,t):(this.a.length>t&&(this.a.length=t),r=this.a),this.buffer=r},d.prototype.p=function(){var t,e,i=this.input;return t=this.B.p(),this.c=this.B.c,this.N&&(e=(i[this.c++]<<24|i[this.c++]<<16|i[this.c++]<<8|i[this.c++])>>>0,e!==g(t)&&r(Error("invalid adler-32 checksum"))),t};var ir=8,nr=O;A.prototype.j=function(){var t,e,i,n,s,a,h,f=0;switch(h=this.a,t=ir){case ir:e=Math.LOG2E*Math.log(32768)-8;break;default:r(Error("invalid compression method"))}switch(i=e<<4|t,h[f++]=i,t){case ir:switch(this.h){case nr.NONE:s=0;break;case nr.r:s=1;break;case nr.k:s=2;break;default:r(Error("unsupported compression type"))}break;default:r(Error("invalid compression method"))}return n=s<<6|0,h[f++]=n|31-(256*i+n)%31,a=g(this.input),this.A.b=f,h=this.A.j(),f=h.length,m&&(h=new Uint8Array(h.buffer),h.length<=f+4&&(this.a=new Uint8Array(h.length+4),this.a.set(h),h=this.a),h=h.subarray(0,f+4)),h[f++]=a>>24&255,h[f++]=a>>16&255,h[f++]=a>>8&255,h[f++]=255&a,h},t("Zlib.Inflate",d),t("Zlib.Inflate.prototype.decompress",d.prototype.p),v("Zlib.Inflate.BufferType",{ADAPTIVE:M.D,BLOCK:M.F}),t("Zlib.Deflate",A),t("Zlib.Deflate.compress",function(r,t){return new A(r,t).j()}),t("Zlib.Deflate.prototype.compress",A.prototype.j),v("Zlib.Deflate.CompressionType",{NONE:nr.NONE,FIXED:nr.r,DYNAMIC:nr.k})}).call(this),define("Workers/zlib.min",function(){})}();