forked from WofWca/quake3.xdc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompression-streams-polyfill.0.1.7.js
More file actions
1 lines (1 loc) · 17.9 KB
/
compression-streams-polyfill.0.1.7.js
File metadata and controls
1 lines (1 loc) · 17.9 KB
1
!function(t){"function"==typeof define&&define.amd?define(t):t()}(function(){var t={},n=Uint8Array,r=Uint16Array,e=Int32Array,i=new n([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,0]),a=new n([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,0,0]),o=new n([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,n){for(var i=new r(31),a=0;a<31;++a)i[a]=n+=1<<t[a-1];var o=new e(i[30]);for(a=1;a<30;++a)for(var s=i[a];s<i[a+1];++s)o[s]=s-i[a]<<5|a;return{b:i,r:o}},f=s(i,2),h=f.b,u=f.r;h[28]=258,u[258]=28;for(var l=s(a,0),c=l.b,v=l.r,p=new r(32768),d=0;d<32768;++d){var g=(43690&d)>>1|(21845&d)<<1;p[d]=((65280&(g=(61680&(g=(52428&g)>>2|(13107&g)<<2))>>4|(3855&g)<<4))>>8|(255&g)<<8)>>1}var y=function(t,n,e){for(var i=t.length,a=0,o=new r(n);a<i;++a)t[a]&&++o[t[a]-1];var s,f=new r(n);for(a=1;a<n;++a)f[a]=f[a-1]+o[a-1]<<1;if(e){s=new r(1<<n);var h=15-n;for(a=0;a<i;++a)if(t[a])for(var u=a<<4|t[a],l=n-t[a],c=f[t[a]-1]++<<l,v=c|(1<<l)-1;c<=v;++c)s[p[c]>>h]=u}else for(s=new r(i),a=0;a<i;++a)t[a]&&(s[a]=p[f[t[a]-1]++]>>15-t[a]);return s},w=new n(288);for(d=0;d<144;++d)w[d]=8;for(d=144;d<256;++d)w[d]=9;for(d=256;d<280;++d)w[d]=7;for(d=280;d<288;++d)w[d]=8;var b=new n(32);for(d=0;d<32;++d)b[d]=5;var m=/*#__PURE__*/y(w,9,0),z=/*#__PURE__*/y(w,9,1),M=/*#__PURE__*/y(b,5,0),S=/*#__PURE__*/y(b,5,1),k=function(t){for(var n=t[0],r=1;r<t.length;++r)t[r]>n&&(n=t[r]);return n},x=function(t,n,r){var e=n/8|0;return(t[e]|t[e+1]<<8)>>(7&n)&r},A=function(t,n){var r=n/8|0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>(7&n)},T=function(t){return(t+7)/8|0},q=function(t,r,e){return(null==r||r<0)&&(r=0),(null==e||e>t.length)&&(e=t.length),new n(t.subarray(r,e))},E=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],U=function(t,n,r){var e=new Error(n||E[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,U),!r)throw e;return e},O=function(t,r,e,s){var f=t.length,u=s?s.length:0;if(!f||r.f&&!r.l)return e||new n(0);var l=!e,v=l||2!=r.i,p=r.i;l&&(e=new n(3*f));var d=function(t){var r=e.length;if(t>r){var i=new n(Math.max(2*r,t));i.set(e),e=i}},g=r.f||0,w=r.p||0,b=r.b||0,m=r.l,M=r.d,E=r.m,O=r.n,D=8*f;do{if(!m){g=x(t,w,1);var $=x(t,w+1,3);if(w+=3,!$){var L=t[(H=T(w)+4)-4]|t[H-3]<<8,B=H+L;if(B>f){p&&U(0);break}v&&d(b+L),e.set(t.subarray(H,B),b),r.b=b+=L,r.p=w=8*B,r.f=g;continue}if(1==$)m=z,M=S,E=9,O=5;else if(2==$){var C=x(t,w,31)+257,F=x(t,w+10,15)+4,I=C+x(t,w+5,31)+1;w+=14;for(var W=new n(I),j=new n(19),P=0;P<F;++P)j[o[P]]=x(t,w+3*P,7);w+=3*F;var R=k(j),V=(1<<R)-1,G=y(j,R,1);for(P=0;P<I;){var H,J=G[x(t,w,V)];if(w+=15&J,(H=J>>4)<16)W[P++]=H;else{var K=0,N=0;for(16==H?(N=3+x(t,w,3),w+=2,K=W[P-1]):17==H?(N=3+x(t,w,7),w+=3):18==H&&(N=11+x(t,w,127),w+=7);N--;)W[P++]=K}}var Q=W.subarray(0,C),X=W.subarray(C);E=k(Q),O=k(X),m=y(Q,E,1),M=y(X,O,1)}else U(1);if(w>D){p&&U(0);break}}v&&d(b+131072);for(var Y=(1<<E)-1,Z=(1<<O)-1,_=w;;_=w){var tt=(K=m[A(t,w)&Y])>>4;if((w+=15&K)>D){p&&U(0);break}if(K||U(2),tt<256)e[b++]=tt;else{if(256==tt){_=w,m=null;break}var nt=tt-254;tt>264&&(nt=x(t,w,(1<<(it=i[P=tt-257]))-1)+h[P],w+=it);var rt=M[A(t,w)&Z],et=rt>>4;if(rt||U(3),w+=15&rt,X=c[et],et>3){var it=a[et];X+=A(t,w)&(1<<it)-1,w+=it}if(w>D){p&&U(0);break}v&&d(b+131072);var at=b+nt;if(b<X){var ot=u-X,st=Math.min(X,at);for(ot+b<0&&U(3);b<st;++b)e[b]=s[ot+b]}for(;b<at;++b)e[b]=e[b-X]}}r.l=m,r.p=_,r.b=b,r.f=g,m&&(g=1,r.m=E,r.d=M,r.n=O)}while(!g);return b!=e.length&&l?q(e,0,b):e.subarray(0,b)},D=function(t,n,r){var e=n/8|0;t[e]|=r<<=7&n,t[e+1]|=r>>8},$=function(t,n,r){var e=n/8|0;t[e]|=r<<=7&n,t[e+1]|=r>>8,t[e+2]|=r>>16},L=function(t,e){for(var i=[],a=0;a<t.length;++a)t[a]&&i.push({s:a,f:t[a]});var o=i.length,s=i.slice();if(!o)return{t:P,l:0};if(1==o){var f=new n(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var h=i[0],u=i[1],l=0,c=1,v=2;for(i[0]={s:-1,f:h.f+u.f,l:h,r:u};c!=o-1;)h=i[i[l].f<i[v].f?l++:v++],u=i[l!=c&&i[l].f<i[v].f?l++:v++],i[c++]={s:-1,f:h.f+u.f,l:h,r:u};var p=s[0].s;for(a=1;a<o;++a)s[a].s>p&&(p=s[a].s);var d=new r(p+1),g=B(i[c-1],d,0);if(g>e){a=0;var y=0,w=g-e,b=1<<w;for(s.sort(function(t,n){return d[n.s]-d[t.s]||t.f-n.f});a<o;++a){var m=s[a].s;if(!(d[m]>e))break;y+=b-(1<<g-d[m]),d[m]=e}for(y>>=w;y>0;){var z=s[a].s;d[z]<e?y-=1<<e-d[z]++-1:++a}for(;a>=0&&y;--a){var M=s[a].s;d[M]==e&&(--d[M],++y)}g=e}return{t:new n(d),l:g}},B=function(t,n,r){return-1==t.s?Math.max(B(t.l,n,r+1),B(t.r,n,r+1)):n[t.s]=r},C=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new r(++n),i=0,a=t[0],o=1,s=function(t){e[i++]=t},f=1;f<=n;++f)if(t[f]==a&&f!=n)++o;else{if(!a&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(a),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(a);o=1,a=t[f]}return{c:e.subarray(0,i),n:n}},F=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},I=function(t,n,r){var e=r.length,i=T(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},W=function(t,n,e,s,f,h,u,l,c,v,p){D(n,p++,e),++f[256];for(var d=L(f,15),g=d.t,z=d.l,S=L(h,15),k=S.t,x=S.l,A=C(g),T=A.c,q=A.n,E=C(k),U=E.c,O=E.n,B=new r(19),W=0;W<T.length;++W)++B[31&T[W]];for(W=0;W<U.length;++W)++B[31&U[W]];for(var j=L(B,7),P=j.t,R=j.l,V=19;V>4&&!P[o[V-1]];--V);var G,H,J,K,N=v+5<<3,Q=F(f,w)+F(h,b)+u,X=F(f,g)+F(h,k)+u+14+3*V+F(B,P)+2*B[16]+3*B[17]+7*B[18];if(c>=0&&N<=Q&&N<=X)return I(n,p,t.subarray(c,c+v));if(D(n,p,1+(X<Q)),p+=2,X<Q){G=y(g,z,0),H=g,J=y(k,x,0),K=k;var Y=y(P,R,0);for(D(n,p,q-257),D(n,p+5,O-1),D(n,p+10,V-4),p+=14,W=0;W<V;++W)D(n,p+3*W,P[o[W]]);p+=3*V;for(var Z=[T,U],_=0;_<2;++_){var tt=Z[_];for(W=0;W<tt.length;++W)D(n,p,Y[rt=31&tt[W]]),p+=P[rt],rt>15&&(D(n,p,tt[W]>>5&127),p+=tt[W]>>12)}}else G=m,H=w,J=M,K=b;for(W=0;W<l;++W){var nt=s[W];if(nt>255){var rt;$(n,p,G[257+(rt=nt>>18&31)]),p+=H[rt+257],rt>7&&(D(n,p,nt>>23&31),p+=i[rt]);var et=31&nt;$(n,p,J[et]),p+=K[et],et>3&&($(n,p,nt>>5&8191),p+=a[et])}else $(n,p,G[nt]),p+=H[nt]}return $(n,p,G[256]),p+H[256]},j=/*#__PURE__*/new e([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),P=/*#__PURE__*/new n(0),R=function(t,o,s,f,h,l){var c=l.z||t.length,p=new n(f+c+5*(1+Math.ceil(c/7e3))+h),d=p.subarray(f,p.length-h),g=l.l,y=7&(l.r||0);if(o){y&&(d[0]=l.r>>3);for(var w=j[o-1],b=w>>13,m=8191&w,z=(1<<s)-1,M=l.p||new r(32768),S=l.h||new r(z+1),k=Math.ceil(s/3),x=2*k,A=function(n){return(t[n]^t[n+1]<<k^t[n+2]<<x)&z},E=new e(25e3),U=new r(288),O=new r(32),D=0,$=0,L=l.i||0,B=0,C=l.w||0,F=0;L+2<c;++L){var P=A(L),R=32767&L,V=S[P];if(M[R]=V,S[P]=R,C<=L){var G=c-L;if((D>7e3||B>24576)&&(G>423||!g)){y=W(t,d,0,E,U,O,$,B,F,L-F,y),B=D=$=0,F=L;for(var H=0;H<286;++H)U[H]=0;for(H=0;H<30;++H)O[H]=0}var J=2,K=0,N=m,Q=R-V&32767;if(G>2&&P==A(L-Q))for(var X=Math.min(b,G)-1,Y=Math.min(32767,L),Z=Math.min(258,G);Q<=Y&&--N&&R!=V;){if(t[L+J]==t[L+J-Q]){for(var _=0;_<Z&&t[L+_]==t[L+_-Q];++_);if(_>J){if(J=_,K=Q,_>X)break;var tt=Math.min(Q,_-2),nt=0;for(H=0;H<tt;++H){var rt=L-Q+H&32767,et=rt-M[rt]&32767;et>nt&&(nt=et,V=rt)}}}Q+=(R=V)-(V=M[R])&32767}if(K){E[B++]=268435456|u[J]<<18|v[K];var it=31&u[J],at=31&v[K];$+=i[it]+a[at],++U[257+it],++O[at],C=L+J,++D}else E[B++]=t[L],++U[t[L]]}}for(L=Math.max(L,C);L<c;++L)E[B++]=t[L],++U[t[L]];y=W(t,d,g,E,U,O,$,B,F,L-F,y),g||(l.r=7&y|d[y/8|0]<<3,y-=7,l.h=S,l.p=M,l.i=L,l.w=C)}else{for(L=l.w||0;L<c+g;L+=65535){var ot=L+65535;ot>=c&&(d[y/8|0]=g,ot=c),y=I(d,y+1,t.subarray(L,ot))}l.i=c}return q(p,0,f+T(y)+h)},V=/*#__PURE__*/function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),G=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=V[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},H=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,o=0;o!=a;){for(var s=Math.min(o+2655,a);o<s;++o)i+=e+=r[o];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},J=function(t,r,e,i,a){if(!a&&(a={l:1},r.dictionary)){var o=r.dictionary.subarray(-32768),s=new n(o.length+t.length);s.set(o),s.set(t,o.length),t=s,a.w=o.length}return R(t,null==r.level?6:r.level,null==r.mem?a.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+r.mem,e,i,a)},K=function(t,n,r){for(var e=t(),i=t.toString(),a=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),o=0;o<e.length;++o){var s=e[o],f=a[o];if("function"==typeof s){n+=";"+f+"=";var h=s.toString();if(s.prototype)if(-1!=h.indexOf("[native code]")){var u=h.indexOf(" ",8)+1;n+=h.slice(u,h.indexOf("(",u))}else for(var l in n+=h,s.prototype)n+=";"+f+".prototype."+l+"="+s.prototype[l].toString();else n+=h}else r[f]=s}return n},N=[],Q=function(){return[n,r,e,i,a,o,h,c,z,S,p,E,y,k,x,A,T,q,U,O,wt,nt,rt]},X=function(){return[n,r,e,i,a,o,u,v,m,w,M,b,p,j,P,y,D,$,L,B,C,F,I,W,T,q,R,J,dt,nt]},Y=function(){return[ot,ht,at,G,V]},Z=function(){return[st,ft]},_=function(){return[ut,at,H]},tt=function(){return[lt]},nt=function(t){return postMessage(t,[t.buffer])},rt=function(t){return t&&{out:t.size&&new n(t.size),dictionary:t.dictionary}},et=function(t){return t.ondata=function(t,n){return postMessage([t,n],[t.buffer])},function(n){n.data.length?(t.push(n.data[0],n.data[1]),postMessage([n.data[0].length])):t.flush()}},it=function(n,r,e,i,a,o,s){var f,h=function(n,e,i,a){if(!N[i]){for(var o="",f={},u=n.length-1,l=0;l<u;++l)o=K(n[l],o,f);N[i]={c:K(n[u],o,f),e:f}}var c=function(t,n){var r={};for(var e in t)r[e]=t[e];for(var e in n)r[e]=n[e];return r}({},N[i].e);return function(n,r,e,i,a){var o=new Worker(t[r]||(t[r]=URL.createObjectURL(new Blob([n+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(t){var n=t.data,r=n.$e$;if(r){var e=new Error(r[0]);e.code=r[1],e.stack=r[2],a(e,null)}else a(null,n)},o.postMessage(e,i),o}(N[i].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+e.toString()+"}",i,c,function(t){var n=[];for(var r in t)t[r].buffer&&n.push((t[r]=new t[r].constructor(t[r])).buffer);return n}(c),function(t,n){t?(h.terminate(),r.ondata.call(r,t)):Array.isArray(n)?1==n.length?(r.queuedSize-=n[0],r.ondrain&&r.ondrain(n[0])):(n[1]&&h.terminate(),r.ondata.call(r,t,n[0],n[1])):s(n)})}(n,i,a);h.postMessage(e),r.queuedSize=0,r.push=function(t,n){r.ondata||U(5),f&&r.ondata(U(4,0,1),null,!!n),r.queuedSize+=t.length,h.postMessage([t,f=n],[t.buffer])},r.terminate=function(){h.terminate()},o&&(r.flush=function(){h.postMessage([])})},at=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},ot=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&at(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},st=function(t){31==t[0]&&139==t[1]&&8==t[2]||U(6,"invalid gzip data");var n=t[3],r=10;4&n&&(r+=2+(t[10]|t[11]<<8));for(var e=(n>>3&1)+(n>>4&1);e>0;e-=!t[r++]);return r+(2&n)},ft=function(t){var n=t.length;return(t[n-4]|t[n-3]<<8|t[n-2]<<16|t[n-1]<<24)>>>0},ht=function(t){return 10+(t.filename?t.filename.length+1:0)},ut=function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=H();i.p(n.dictionary),at(t,2,i.d())}},lt=function(t,n){return(8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31)&&U(6,"invalid zlib data"),(t[1]>>5&1)==+!n&&U(6,"invalid zlib data: "+(32&t[1]?"need":"unexpected")+" dictionary"),2+(t[1]>>3&4)};function ct(t,n){return"function"==typeof t&&(n=t,t={}),this.ondata=n,t}var vt=/*#__PURE__*/function(){function t(t,r){if("function"==typeof t&&(r=t,t={}),this.ondata=r,this.o=t||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new n(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return t.prototype.p=function(t,n){this.ondata(J(t,this.o,0,0,this.s),n)},t.prototype.push=function(t,r){this.ondata||U(5),this.s.l&&U(4);var e=t.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new n(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;this.b.set(t.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(t.subarray(a),32768),this.s.z=t.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(t,this.s.z),this.s.z+=t.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},t.prototype.flush=function(){this.ondata||U(5),this.s.l&&U(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},t}(),pt=/*#__PURE__*/function(){return function(t,n){it([X,function(){return[et,vt]}],this,ct.call(this,t,n),function(t){var n=new vt(t.data);onmessage=et(n)},6,1)}}();function dt(t,n){return J(t,n||{},0,0)}var gt=/*#__PURE__*/function(){function t(t,r){"function"==typeof t&&(r=t,t={}),this.ondata=r;var e=t&&t.dictionary&&t.dictionary.subarray(-32768);this.s={i:0,b:e?e.length:0},this.o=new n(32768),this.p=new n(0),e&&this.o.set(e)}return t.prototype.e=function(t){if(this.ondata||U(5),this.d&&U(4),this.p.length){if(t.length){var r=new n(this.p.length+t.length);r.set(this.p),r.set(t,this.p.length),this.p=r}}else this.p=t},t.prototype.c=function(t){this.s.i=+(this.d=t||!1);var n=this.s.b,r=O(this.p,this.s,this.o);this.ondata(q(r,n,this.s.b),this.d),this.o=q(r,this.s.b-32768),this.s.b=this.o.length,this.p=q(this.p,this.s.p/8|0),this.s.p&=7},t.prototype.push=function(t,n){this.e(t),this.c(n)},t}(),yt=/*#__PURE__*/function(){return function(t,n){it([Q,function(){return[et,gt]}],this,ct.call(this,t,n),function(t){var n=new gt(t.data);onmessage=et(n)},7,0)}}();function wt(t,n){return O(t,{i:2},n&&n.out,n&&n.dictionary)}var bt=/*#__PURE__*/function(){function t(t,n){this.c=G(),this.l=0,this.v=1,vt.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),this.l+=t.length,vt.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=J(t,this.o,this.v&&ht(this.o),n&&8,this.s);this.v&&(ot(r,this.o),this.v=0),n&&(at(r,r.length-8,this.c.d()),at(r,r.length-4,this.l)),this.ondata(r,n)},t.prototype.flush=function(){vt.prototype.flush.call(this)},t}(),mt=/*#__PURE__*/function(){return function(t,n){it([X,Y,function(){return[et,vt,bt]}],this,ct.call(this,t,n),function(t){var n=new bt(t.data);onmessage=et(n)},8,1)}}(),zt=/*#__PURE__*/function(){function t(t,n){this.v=1,this.r=0,gt.call(this,t,n)}return t.prototype.push=function(t,r){if(gt.prototype.e.call(this,t),this.r+=t.length,this.v){var e=this.p.subarray(this.v-1),i=e.length>3?st(e):4;if(i>e.length){if(!r)return}else this.v>1&&this.onmember&&this.onmember(this.r-e.length);this.p=e.subarray(i),this.v=0}gt.prototype.c.call(this,r),!this.s.f||this.s.l||r||(this.v=T(this.s.p)+9,this.s={i:0},this.o=new n(0),this.push(new n(0),r))},t}(),Mt=/*#__PURE__*/function(){return function(t,n){var r=this;it([Q,Z,function(){return[et,gt,zt]}],this,ct.call(this,t,n),function(t){var n=new zt(t.data);n.onmember=function(t){return postMessage(t)},onmessage=et(n)},9,0,function(t){return r.onmember&&r.onmember(t)})}}(),St=/*#__PURE__*/function(){function t(t,n){this.c=H(),this.v=1,vt.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),vt.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=J(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(ut(r,this.o),this.v=0),n&&at(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){vt.prototype.flush.call(this)},t}(),kt=/*#__PURE__*/function(){return function(t,n){it([X,_,function(){return[et,vt,St]}],this,ct.call(this,t,n),function(t){var n=new St(t.data);onmessage=et(n)},10,1)}}(),xt=/*#__PURE__*/function(){function t(t,n){gt.call(this,t,n),this.v=t&&t.dictionary?2:1}return t.prototype.push=function(t,n){if(gt.prototype.e.call(this,t),this.v){if(this.p.length<6&&!n)return;this.p=this.p.subarray(lt(this.p,this.v-1)),this.v=0}n&&(this.p.length<4&&U(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),gt.prototype.c.call(this,n)},t}(),At=/*#__PURE__*/function(){return function(t,n){it([Q,tt,function(){return[et,gt,xt]}],this,ct.call(this,t,n),function(t){var n=new xt(t.data);onmessage=et(n)},11,0)}}(),Tt="undefined"!=typeof TextDecoder&&/*#__PURE__*/new TextDecoder;try{Tt.decode(P,{stream:!0})}catch(t){}const qt=t=>class{constructor(){this.ondata=void 0,this.ondrain=void 0,this.queuedSize=void 0,this.i=void 0,this.i=new t,this.i.ondata=(t,n)=>{this.ondata(null,t,n)}}push(t,n){try{this.queuedSize+=t.length,this.i.push(t,n),this.queuedSize-=t.length,this.ondrain&&this.ondrain(t.length)}catch(t){this.ondata(t,null,n||!1)}}};let Et=1;try{(new pt).terminate()}catch(U){Et=0}const Ut=Et?{gzip:mt,deflate:kt,"deflate-raw":pt}:{gzip:qt(bt),deflate:qt(St),"deflate-raw":qt(vt)},Ot=Et?{gzip:Mt,deflate:At,"deflate-raw":yt}:{gzip:qt(zt),deflate:qt(xt),"deflate-raw":qt(gt)},Dt=(t,n,r)=>class extends t{constructor(t){if(!arguments.length)throw new TypeError(`Failed to construct '${r}': 1 argument required, but only 0 present.`);const e=n[t];if(!e)throw new TypeError(`Failed to construct '${r}': Unsupported compression format: '${t}'`);let i,a=new e;super({start:t=>{a.ondata=(n,r,e)=>{n?t.error(n):r&&(t.enqueue(r),e&&(i?i():t.terminate()))}},transform:t=>{if(t instanceof ArrayBuffer)t=new Uint8Array(t);else{if(!ArrayBuffer.isView(t))throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");t=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}if(a.push(t),a.queuedSize>=32768)return new Promise(t=>{a.ondrain=()=>{a.queuedSize<32768&&t()}})},flush:()=>new Promise(t=>{i=t,a.push(new Uint8Array(0),!0)})},{size:t=>0|t.byteLength,highWaterMark:65536},{size:t=>0|t.byteLength,highWaterMark:65536})}},$t="undefined"==typeof globalThis?"undefined"==typeof self?"undefined"==typeof global?{}:global:self:globalThis;var Lt;void 0===$t.CompressionStream&&($t.CompressionStream=(Lt=TransformStream,Dt(Lt,Ut,"CompressionStream"))),void 0===$t.DecompressionStream&&($t.DecompressionStream=function(t){return Dt(t,Ot,"DecompressionStream")}(TransformStream))});