office-templates 0.1.0 → 0.2.0

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/lib/browser.js CHANGED
@@ -1,30 +1,21 @@
1
- var _e=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},_t={},kr={};kr.byteLength=Ec,kr.toByteArray=xc,kr.fromByteArray=Rc;for(var Xe=[],Fe=[],bc=typeof Uint8Array!="undefined"?Uint8Array:Array,Dn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ft=0,wc=Dn.length;Ft<wc;++Ft)Xe[Ft]=Dn[Ft],Fe[Dn.charCodeAt(Ft)]=Ft;Fe[45]=62,Fe[95]=63;function yo(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var n=t===r?0:4-t%4;return[t,n]}function Ec(e){var r=yo(e),t=r[0],n=r[1];return(t+n)*3/4-n}function Sc(e,r,t){return(r+t)*3/4-t}function xc(e){var r,t=yo(e),n=t[0],u=t[1],a=new bc(Sc(e,n,u)),o=0,i=u>0?n-4:n,c;for(c=0;c<i;c+=4)r=Fe[e.charCodeAt(c)]<<18|Fe[e.charCodeAt(c+1)]<<12|Fe[e.charCodeAt(c+2)]<<6|Fe[e.charCodeAt(c+3)],a[o++]=r>>16&255,a[o++]=r>>8&255,a[o++]=r&255;return u===2&&(r=Fe[e.charCodeAt(c)]<<2|Fe[e.charCodeAt(c+1)]>>4,a[o++]=r&255),u===1&&(r=Fe[e.charCodeAt(c)]<<10|Fe[e.charCodeAt(c+1)]<<4|Fe[e.charCodeAt(c+2)]>>2,a[o++]=r>>8&255,a[o++]=r&255),a}function Tc(e){return Xe[e>>18&63]+Xe[e>>12&63]+Xe[e>>6&63]+Xe[e&63]}function Ac(e,r,t){for(var n,u=[],a=r;a<t;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),u.push(Tc(n));return u.join("")}function Rc(e){for(var r,t=e.length,n=t%3,u=[],a=16383,o=0,i=t-n;o<i;o+=a)u.push(Ac(e,o,o+a>i?i:o+a));return n===1?(r=e[t-1],u.push(Xe[r>>2]+Xe[r<<4&63]+"==")):n===2&&(r=(e[t-2]<<8)+e[t-1],u.push(Xe[r>>10]+Xe[r>>4&63]+Xe[r<<2&63]+"=")),u.join("")}var Fn={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */Fn.read=function(e,r,t,n,u){var a,o,i=u*8-n-1,c=(1<<i)-1,h=c>>1,p=-7,_=t?u-1:0,y=t?-1:1,v=e[r+_];for(_+=y,a=v&(1<<-p)-1,v>>=-p,p+=i;p>0;a=a*256+e[r+_],_+=y,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=n;p>0;o=o*256+e[r+_],_+=y,p-=8);if(a===0)a=1-h;else{if(a===c)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,n),a=a-h}return(v?-1:1)*o*Math.pow(2,a-n)},Fn.write=function(e,r,t,n,u,a){var o,i,c,h=a*8-u-1,p=(1<<h)-1,_=p>>1,y=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:a-1,A=n?1:-1,R=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(i=isNaN(r)?1:0,o=p):(o=Math.floor(Math.log(r)/Math.LN2),r*(c=Math.pow(2,-o))<1&&(o--,c*=2),o+_>=1?r+=y/c:r+=y*Math.pow(2,1-_),r*c>=2&&(o++,c/=2),o+_>=p?(i=0,o=p):o+_>=1?(i=(r*c-1)*Math.pow(2,u),o=o+_):(i=r*Math.pow(2,_-1)*Math.pow(2,u),o=0));u>=8;e[t+v]=i&255,v+=A,i/=256,u-=8);for(o=o<<u|i,h+=u;h>0;e[t+v]=o&255,v+=A,o/=256,h-=8);e[t+v-A]|=R*128};/*!
1
+ var we=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},hi={},xr={};xr.byteLength=ks,xr.toByteArray=Fs,xr.fromByteArray=Rs;for(var Ue=[],ye=[],Ss=typeof Uint8Array!="undefined"?Uint8Array:Array,di="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",It=0,Cs=di.length;It<Cs;++It)Ue[It]=di[It],ye[di.charCodeAt(It)]=It;ye[45]=62,ye[95]=63;function En(e){var r=e.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var t=e.indexOf("=");t===-1&&(t=r);var i=t===r?0:4-t%4;return[t,i]}function ks(e){var r=En(e),t=r[0],i=r[1];return(t+i)*3/4-i}function Bs(e,r,t){return(r+t)*3/4-t}function Fs(e){var r,t=En(e),i=t[0],l=t[1],s=new Ss(Bs(e,i,l)),f=0,a=l>0?i-4:i,m;for(m=0;m<a;m+=4)r=ye[e.charCodeAt(m)]<<18|ye[e.charCodeAt(m+1)]<<12|ye[e.charCodeAt(m+2)]<<6|ye[e.charCodeAt(m+3)],s[f++]=r>>16&255,s[f++]=r>>8&255,s[f++]=r&255;return l===2&&(r=ye[e.charCodeAt(m)]<<2|ye[e.charCodeAt(m+1)]>>4,s[f++]=r&255),l===1&&(r=ye[e.charCodeAt(m)]<<10|ye[e.charCodeAt(m+1)]<<4|ye[e.charCodeAt(m+2)]>>2,s[f++]=r>>8&255,s[f++]=r&255),s}function Ds(e){return Ue[e>>18&63]+Ue[e>>12&63]+Ue[e>>6&63]+Ue[e&63]}function Os(e,r,t){for(var i,l=[],s=r;s<t;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(e[s+2]&255),l.push(Ds(i));return l.join("")}function Rs(e){for(var r,t=e.length,i=t%3,l=[],s=16383,f=0,a=t-i;f<a;f+=s)l.push(Os(e,f,f+s>a?a:f+s));return i===1?(r=e[t-1],l.push(Ue[r>>2]+Ue[r<<4&63]+"==")):i===2&&(r=(e[t-2]<<8)+e[t-1],l.push(Ue[r>>10]+Ue[r>>4&63]+Ue[r<<2&63]+"=")),l.join("")}var pi={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */pi.read=function(e,r,t,i,l){var s,f,a=l*8-i-1,m=(1<<a)-1,h=m>>1,d=-7,I=t?l-1:0,_=t?-1:1,v=e[r+I];for(I+=_,s=v&(1<<-d)-1,v>>=-d,d+=a;d>0;s=s*256+e[r+I],I+=_,d-=8);for(f=s&(1<<-d)-1,s>>=-d,d+=i;d>0;f=f*256+e[r+I],I+=_,d-=8);if(s===0)s=1-h;else{if(s===m)return f?NaN:(v?-1:1)*(1/0);f=f+Math.pow(2,i),s=s-h}return(v?-1:1)*f*Math.pow(2,s-i)},pi.write=function(e,r,t,i,l,s){var f,a,m,h=s*8-l-1,d=(1<<h)-1,I=d>>1,_=l===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=i?0:s-1,w=i?1:-1,S=r<0||r===0&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(a=isNaN(r)?1:0,f=d):(f=Math.floor(Math.log(r)/Math.LN2),r*(m=Math.pow(2,-f))<1&&(f--,m*=2),f+I>=1?r+=_/m:r+=_*Math.pow(2,1-I),r*m>=2&&(f++,m/=2),f+I>=d?(a=0,f=d):f+I>=1?(a=(r*m-1)*Math.pow(2,l),f=f+I):(a=r*Math.pow(2,I-1)*Math.pow(2,l),f=0));l>=8;e[t+v]=a&255,v+=w,a/=256,l-=8);for(f=f<<l|a,h+=l;h>0;e[t+v]=f&255,v+=w,f/=256,h-=8);e[t+v-w]|=S*128};/*!
2
2
  * The buffer module from node.js, for the browser.
3
3
  *
4
4
  * @author Feross Aboukhadijeh <https://feross.org>
5
5
  * @license MIT
6
- */(function(e){const r=kr,t=Fn,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=i,e.SlowBuffer=m,e.INSPECT_MAX_BYTES=50;const u=2147483647;e.kMaxLength=u,i.TYPED_ARRAY_SUPPORT=a(),!i.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function a(){try{const b=new Uint8Array(1),l={foo:function(){return 42}};return Object.setPrototypeOf(l,Uint8Array.prototype),Object.setPrototypeOf(b,l),b.foo()===42}catch(b){return!1}}Object.defineProperty(i.prototype,"parent",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.buffer}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){if(i.isBuffer(this))return this.byteOffset}});function o(b){if(b>u)throw new RangeError('The value "'+b+'" is invalid for option "size"');const l=new Uint8Array(b);return Object.setPrototypeOf(l,i.prototype),l}function i(b,l,d){if(typeof b=="number"){if(typeof l=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _(b)}return c(b,l,d)}i.poolSize=8192;function c(b,l,d){if(typeof b=="string")return y(b,l);if(ArrayBuffer.isView(b))return A(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(ye(b,ArrayBuffer)||b&&ye(b.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ye(b,SharedArrayBuffer)||b&&ye(b.buffer,SharedArrayBuffer)))return R(b,l,d);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const N=b.valueOf&&b.valueOf();if(N!=null&&N!==b)return i.from(N,l,d);const P=S(b);if(P)return P;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return i.from(b[Symbol.toPrimitive]("string"),l,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}i.from=function(b,l,d){return c(b,l,d)},Object.setPrototypeOf(i.prototype,Uint8Array.prototype),Object.setPrototypeOf(i,Uint8Array);function h(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function p(b,l,d){return h(b),b<=0?o(b):l!==void 0?typeof d=="string"?o(b).fill(l,d):o(b).fill(l):o(b)}i.alloc=function(b,l,d){return p(b,l,d)};function _(b){return h(b),o(b<0?0:g(b)|0)}i.allocUnsafe=function(b){return _(b)},i.allocUnsafeSlow=function(b){return _(b)};function y(b,l){if((typeof l!="string"||l==="")&&(l="utf8"),!i.isEncoding(l))throw new TypeError("Unknown encoding: "+l);const d=C(b,l)|0;let N=o(d);const P=N.write(b,l);return P!==d&&(N=N.slice(0,P)),N}function v(b){const l=b.length<0?0:g(b.length)|0,d=o(l);for(let N=0;N<l;N+=1)d[N]=b[N]&255;return d}function A(b){if(ye(b,Uint8Array)){const l=new Uint8Array(b);return R(l.buffer,l.byteOffset,l.byteLength)}return v(b)}function R(b,l,d){if(l<0||b.byteLength<l)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<l+(d||0))throw new RangeError('"length" is outside of buffer bounds');let N;return l===void 0&&d===void 0?N=new Uint8Array(b):d===void 0?N=new Uint8Array(b,l):N=new Uint8Array(b,l,d),Object.setPrototypeOf(N,i.prototype),N}function S(b){if(i.isBuffer(b)){const l=g(b.length)|0,d=o(l);return d.length===0||b.copy(d,0,0,l),d}if(b.length!==void 0)return typeof b.length!="number"||Ae(b.length)?o(0):v(b);if(b.type==="Buffer"&&Array.isArray(b.data))return v(b.data)}function g(b){if(b>=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return b|0}function m(b){return+b!=b&&(b=0),i.alloc(+b)}i.isBuffer=function(l){return l!=null&&l._isBuffer===!0&&l!==i.prototype},i.compare=function(l,d){if(ye(l,Uint8Array)&&(l=i.from(l,l.offset,l.byteLength)),ye(d,Uint8Array)&&(d=i.from(d,d.offset,d.byteLength)),!i.isBuffer(l)||!i.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(l===d)return 0;let N=l.length,P=d.length;for(let z=0,H=Math.min(N,P);z<H;++z)if(l[z]!==d[z]){N=l[z],P=d[z];break}return N<P?-1:P<N?1:0},i.isEncoding=function(l){switch(String(l).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},i.concat=function(l,d){if(!Array.isArray(l))throw new TypeError('"list" argument must be an Array of Buffers');if(l.length===0)return i.alloc(0);let N;if(d===void 0)for(d=0,N=0;N<l.length;++N)d+=l[N].length;const P=i.allocUnsafe(d);let z=0;for(N=0;N<l.length;++N){let H=l[N];if(ye(H,Uint8Array))z+H.length>P.length?(i.isBuffer(H)||(H=i.from(H)),H.copy(P,z)):Uint8Array.prototype.set.call(P,H,z);else if(i.isBuffer(H))H.copy(P,z);else throw new TypeError('"list" argument must be an Array of Buffers');z+=H.length}return P};function C(b,l){if(i.isBuffer(b))return b.length;if(ArrayBuffer.isView(b)||ye(b,ArrayBuffer))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const d=b.length,N=arguments.length>2&&arguments[2]===!0;if(!N&&d===0)return 0;let P=!1;for(;;)switch(l){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return te(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Se(b).length;default:if(P)return N?-1:te(b).length;l=(""+l).toLowerCase(),P=!0}}i.byteLength=C;function x(b,l,d){let N=!1;if((l===void 0||l<0)&&(l=0),l>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,l>>>=0,d<=l))return"";for(b||(b="utf8");;)switch(b){case"hex":return Z(this,l,d);case"utf8":case"utf-8":return re(this,l,d);case"ascii":return F(this,l,d);case"latin1":case"binary":return j(this,l,d);case"base64":return ae(this,l,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return J(this,l,d);default:if(N)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),N=!0}}i.prototype._isBuffer=!0;function k(b,l,d){const N=b[l];b[l]=b[d],b[d]=N}i.prototype.swap16=function(){const l=this.length;if(l%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<l;d+=2)k(this,d,d+1);return this},i.prototype.swap32=function(){const l=this.length;if(l%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<l;d+=4)k(this,d,d+3),k(this,d+1,d+2);return this},i.prototype.swap64=function(){const l=this.length;if(l%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<l;d+=8)k(this,d,d+7),k(this,d+1,d+6),k(this,d+2,d+5),k(this,d+3,d+4);return this},i.prototype.toString=function(){const l=this.length;return l===0?"":arguments.length===0?re(this,0,l):x.apply(this,arguments)},i.prototype.toLocaleString=i.prototype.toString,i.prototype.equals=function(l){if(!i.isBuffer(l))throw new TypeError("Argument must be a Buffer");return this===l?!0:i.compare(this,l)===0},i.prototype.inspect=function(){let l="";const d=e.INSPECT_MAX_BYTES;return l=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(l+=" ... "),"<Buffer "+l+">"},n&&(i.prototype[n]=i.prototype.inspect),i.prototype.compare=function(l,d,N,P,z){if(ye(l,Uint8Array)&&(l=i.from(l,l.offset,l.byteLength)),!i.isBuffer(l))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof l);if(d===void 0&&(d=0),N===void 0&&(N=l?l.length:0),P===void 0&&(P=0),z===void 0&&(z=this.length),d<0||N>l.length||P<0||z>this.length)throw new RangeError("out of range index");if(P>=z&&d>=N)return 0;if(P>=z)return-1;if(d>=N)return 1;if(d>>>=0,N>>>=0,P>>>=0,z>>>=0,this===l)return 0;let H=z-P,oe=N-d;const me=Math.min(H,oe),ge=this.slice(P,z),be=l.slice(d,N);for(let de=0;de<me;++de)if(ge[de]!==be[de]){H=ge[de],oe=be[de];break}return H<oe?-1:oe<H?1:0};function D(b,l,d,N,P){if(b.length===0)return-1;if(typeof d=="string"?(N=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,Ae(d)&&(d=P?0:b.length-1),d<0&&(d=b.length+d),d>=b.length){if(P)return-1;d=b.length-1}else if(d<0)if(P)d=0;else return-1;if(typeof l=="string"&&(l=i.from(l,N)),i.isBuffer(l))return l.length===0?-1:U(b,l,d,N,P);if(typeof l=="number")return l=l&255,typeof Uint8Array.prototype.indexOf=="function"?P?Uint8Array.prototype.indexOf.call(b,l,d):Uint8Array.prototype.lastIndexOf.call(b,l,d):U(b,[l],d,N,P);throw new TypeError("val must be string, number or Buffer")}function U(b,l,d,N,P){let z=1,H=b.length,oe=l.length;if(N!==void 0&&(N=String(N).toLowerCase(),N==="ucs2"||N==="ucs-2"||N==="utf16le"||N==="utf-16le")){if(b.length<2||l.length<2)return-1;z=2,H/=2,oe/=2,d/=2}function me(be,de){return z===1?be[de]:be.readUInt16BE(de*z)}let ge;if(P){let be=-1;for(ge=d;ge<H;ge++)if(me(b,ge)===me(l,be===-1?0:ge-be)){if(be===-1&&(be=ge),ge-be+1===oe)return be*z}else be!==-1&&(ge-=ge-be),be=-1}else for(d+oe>H&&(d=H-oe),ge=d;ge>=0;ge--){let be=!0;for(let de=0;de<oe;de++)if(me(b,ge+de)!==me(l,de)){be=!1;break}if(be)return ge}return-1}i.prototype.includes=function(l,d,N){return this.indexOf(l,d,N)!==-1},i.prototype.indexOf=function(l,d,N){return D(this,l,d,N,!0)},i.prototype.lastIndexOf=function(l,d,N){return D(this,l,d,N,!1)};function q(b,l,d,N){d=Number(d)||0;const P=b.length-d;N?(N=Number(N),N>P&&(N=P)):N=P;const z=l.length;N>z/2&&(N=z/2);let H;for(H=0;H<N;++H){const oe=parseInt(l.substr(H*2,2),16);if(Ae(oe))return H;b[d+H]=oe}return H}function O(b,l,d,N){return pe(te(l,b.length-d),b,d,N)}function Y(b,l,d,N){return pe(ce(l),b,d,N)}function V(b,l,d,N){return pe(Se(l),b,d,N)}function K(b,l,d,N){return pe(W(l,b.length-d),b,d,N)}i.prototype.write=function(l,d,N,P){if(d===void 0)P="utf8",N=this.length,d=0;else if(N===void 0&&typeof d=="string")P=d,N=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(N)?(N=N>>>0,P===void 0&&(P="utf8")):(P=N,N=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const z=this.length-d;if((N===void 0||N>z)&&(N=z),l.length>0&&(N<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");P||(P="utf8");let H=!1;for(;;)switch(P){case"hex":return q(this,l,d,N);case"utf8":case"utf-8":return O(this,l,d,N);case"ascii":case"latin1":case"binary":return Y(this,l,d,N);case"base64":return V(this,l,d,N);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,l,d,N);default:if(H)throw new TypeError("Unknown encoding: "+P);P=(""+P).toLowerCase(),H=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ae(b,l,d){return l===0&&d===b.length?r.fromByteArray(b):r.fromByteArray(b.slice(l,d))}function re(b,l,d){d=Math.min(b.length,d);const N=[];let P=l;for(;P<d;){const z=b[P];let H=null,oe=z>239?4:z>223?3:z>191?2:1;if(P+oe<=d){let me,ge,be,de;switch(oe){case 1:z<128&&(H=z);break;case 2:me=b[P+1],(me&192)===128&&(de=(z&31)<<6|me&63,de>127&&(H=de));break;case 3:me=b[P+1],ge=b[P+2],(me&192)===128&&(ge&192)===128&&(de=(z&15)<<12|(me&63)<<6|ge&63,de>2047&&(de<55296||de>57343)&&(H=de));break;case 4:me=b[P+1],ge=b[P+2],be=b[P+3],(me&192)===128&&(ge&192)===128&&(be&192)===128&&(de=(z&15)<<18|(me&63)<<12|(ge&63)<<6|be&63,de>65535&&de<1114112&&(H=de))}}H===null?(H=65533,oe=1):H>65535&&(H-=65536,N.push(H>>>10&1023|55296),H=56320|H&1023),N.push(H),P+=oe}return ue(N)}const fe=4096;function ue(b){const l=b.length;if(l<=fe)return String.fromCharCode.apply(String,b);let d="",N=0;for(;N<l;)d+=String.fromCharCode.apply(String,b.slice(N,N+=fe));return d}function F(b,l,d){let N="";d=Math.min(b.length,d);for(let P=l;P<d;++P)N+=String.fromCharCode(b[P]&127);return N}function j(b,l,d){let N="";d=Math.min(b.length,d);for(let P=l;P<d;++P)N+=String.fromCharCode(b[P]);return N}function Z(b,l,d){const N=b.length;(!l||l<0)&&(l=0),(!d||d<0||d>N)&&(d=N);let P="";for(let z=l;z<d;++z)P+=Ie[b[z]];return P}function J(b,l,d){const N=b.slice(l,d);let P="";for(let z=0;z<N.length-1;z+=2)P+=String.fromCharCode(N[z]+N[z+1]*256);return P}i.prototype.slice=function(l,d){const N=this.length;l=~~l,d=d===void 0?N:~~d,l<0?(l+=N,l<0&&(l=0)):l>N&&(l=N),d<0?(d+=N,d<0&&(d=0)):d>N&&(d=N),d<l&&(d=l);const P=this.subarray(l,d);return Object.setPrototypeOf(P,i.prototype),P};function B(b,l,d){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+l>d)throw new RangeError("Trying to access beyond buffer length")}i.prototype.readUintLE=i.prototype.readUIntLE=function(l,d,N){l=l>>>0,d=d>>>0,N||B(l,d,this.length);let P=this[l],z=1,H=0;for(;++H<d&&(z*=256);)P+=this[l+H]*z;return P},i.prototype.readUintBE=i.prototype.readUIntBE=function(l,d,N){l=l>>>0,d=d>>>0,N||B(l,d,this.length);let P=this[l+--d],z=1;for(;d>0&&(z*=256);)P+=this[l+--d]*z;return P},i.prototype.readUint8=i.prototype.readUInt8=function(l,d){return l=l>>>0,d||B(l,1,this.length),this[l]},i.prototype.readUint16LE=i.prototype.readUInt16LE=function(l,d){return l=l>>>0,d||B(l,2,this.length),this[l]|this[l+1]<<8},i.prototype.readUint16BE=i.prototype.readUInt16BE=function(l,d){return l=l>>>0,d||B(l,2,this.length),this[l]<<8|this[l+1]},i.prototype.readUint32LE=i.prototype.readUInt32LE=function(l,d){return l=l>>>0,d||B(l,4,this.length),(this[l]|this[l+1]<<8|this[l+2]<<16)+this[l+3]*16777216},i.prototype.readUint32BE=i.prototype.readUInt32BE=function(l,d){return l=l>>>0,d||B(l,4,this.length),this[l]*16777216+(this[l+1]<<16|this[l+2]<<8|this[l+3])},i.prototype.readBigUInt64LE=Re(function(l){l=l>>>0,M(l,"offset");const d=this[l],N=this[l+7];(d===void 0||N===void 0)&&X(l,this.length-8);const P=d+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24,z=this[++l]+this[++l]*2**8+this[++l]*2**16+N*2**24;return BigInt(P)+(BigInt(z)<<BigInt(32))}),i.prototype.readBigUInt64BE=Re(function(l){l=l>>>0,M(l,"offset");const d=this[l],N=this[l+7];(d===void 0||N===void 0)&&X(l,this.length-8);const P=d*2**24+this[++l]*2**16+this[++l]*2**8+this[++l],z=this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N;return(BigInt(P)<<BigInt(32))+BigInt(z)}),i.prototype.readIntLE=function(l,d,N){l=l>>>0,d=d>>>0,N||B(l,d,this.length);let P=this[l],z=1,H=0;for(;++H<d&&(z*=256);)P+=this[l+H]*z;return z*=128,P>=z&&(P-=Math.pow(2,8*d)),P},i.prototype.readIntBE=function(l,d,N){l=l>>>0,d=d>>>0,N||B(l,d,this.length);let P=d,z=1,H=this[l+--P];for(;P>0&&(z*=256);)H+=this[l+--P]*z;return z*=128,H>=z&&(H-=Math.pow(2,8*d)),H},i.prototype.readInt8=function(l,d){return l=l>>>0,d||B(l,1,this.length),this[l]&128?(255-this[l]+1)*-1:this[l]},i.prototype.readInt16LE=function(l,d){l=l>>>0,d||B(l,2,this.length);const N=this[l]|this[l+1]<<8;return N&32768?N|4294901760:N},i.prototype.readInt16BE=function(l,d){l=l>>>0,d||B(l,2,this.length);const N=this[l+1]|this[l]<<8;return N&32768?N|4294901760:N},i.prototype.readInt32LE=function(l,d){return l=l>>>0,d||B(l,4,this.length),this[l]|this[l+1]<<8|this[l+2]<<16|this[l+3]<<24},i.prototype.readInt32BE=function(l,d){return l=l>>>0,d||B(l,4,this.length),this[l]<<24|this[l+1]<<16|this[l+2]<<8|this[l+3]},i.prototype.readBigInt64LE=Re(function(l){l=l>>>0,M(l,"offset");const d=this[l],N=this[l+7];(d===void 0||N===void 0)&&X(l,this.length-8);const P=this[l+4]+this[l+5]*2**8+this[l+6]*2**16+(N<<24);return(BigInt(P)<<BigInt(32))+BigInt(d+this[++l]*2**8+this[++l]*2**16+this[++l]*2**24)}),i.prototype.readBigInt64BE=Re(function(l){l=l>>>0,M(l,"offset");const d=this[l],N=this[l+7];(d===void 0||N===void 0)&&X(l,this.length-8);const P=(d<<24)+this[++l]*2**16+this[++l]*2**8+this[++l];return(BigInt(P)<<BigInt(32))+BigInt(this[++l]*2**24+this[++l]*2**16+this[++l]*2**8+N)}),i.prototype.readFloatLE=function(l,d){return l=l>>>0,d||B(l,4,this.length),t.read(this,l,!0,23,4)},i.prototype.readFloatBE=function(l,d){return l=l>>>0,d||B(l,4,this.length),t.read(this,l,!1,23,4)},i.prototype.readDoubleLE=function(l,d){return l=l>>>0,d||B(l,8,this.length),t.read(this,l,!0,52,8)},i.prototype.readDoubleBE=function(l,d){return l=l>>>0,d||B(l,8,this.length),t.read(this,l,!1,52,8)};function $(b,l,d,N,P,z){if(!i.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(l>P||l<z)throw new RangeError('"value" argument is out of bounds');if(d+N>b.length)throw new RangeError("Index out of range")}i.prototype.writeUintLE=i.prototype.writeUIntLE=function(l,d,N,P){if(l=+l,d=d>>>0,N=N>>>0,!P){const oe=Math.pow(2,8*N)-1;$(this,l,d,N,oe,0)}let z=1,H=0;for(this[d]=l&255;++H<N&&(z*=256);)this[d+H]=l/z&255;return d+N},i.prototype.writeUintBE=i.prototype.writeUIntBE=function(l,d,N,P){if(l=+l,d=d>>>0,N=N>>>0,!P){const oe=Math.pow(2,8*N)-1;$(this,l,d,N,oe,0)}let z=N-1,H=1;for(this[d+z]=l&255;--z>=0&&(H*=256);)this[d+z]=l/H&255;return d+N},i.prototype.writeUint8=i.prototype.writeUInt8=function(l,d,N){return l=+l,d=d>>>0,N||$(this,l,d,1,255,0),this[d]=l&255,d+1},i.prototype.writeUint16LE=i.prototype.writeUInt16LE=function(l,d,N){return l=+l,d=d>>>0,N||$(this,l,d,2,65535,0),this[d]=l&255,this[d+1]=l>>>8,d+2},i.prototype.writeUint16BE=i.prototype.writeUInt16BE=function(l,d,N){return l=+l,d=d>>>0,N||$(this,l,d,2,65535,0),this[d]=l>>>8,this[d+1]=l&255,d+2},i.prototype.writeUint32LE=i.prototype.writeUInt32LE=function(l,d,N){return l=+l,d=d>>>0,N||$(this,l,d,4,4294967295,0),this[d+3]=l>>>24,this[d+2]=l>>>16,this[d+1]=l>>>8,this[d]=l&255,d+4},i.prototype.writeUint32BE=i.prototype.writeUInt32BE=function(l,d,N){return l=+l,d=d>>>0,N||$(this,l,d,4,4294967295,0),this[d]=l>>>24,this[d+1]=l>>>16,this[d+2]=l>>>8,this[d+3]=l&255,d+4};function G(b,l,d,N,P){w(l,N,P,b,d,7);let z=Number(l&BigInt(4294967295));b[d++]=z,z=z>>8,b[d++]=z,z=z>>8,b[d++]=z,z=z>>8,b[d++]=z;let H=Number(l>>BigInt(32)&BigInt(4294967295));return b[d++]=H,H=H>>8,b[d++]=H,H=H>>8,b[d++]=H,H=H>>8,b[d++]=H,d}function ee(b,l,d,N,P){w(l,N,P,b,d,7);let z=Number(l&BigInt(4294967295));b[d+7]=z,z=z>>8,b[d+6]=z,z=z>>8,b[d+5]=z,z=z>>8,b[d+4]=z;let H=Number(l>>BigInt(32)&BigInt(4294967295));return b[d+3]=H,H=H>>8,b[d+2]=H,H=H>>8,b[d+1]=H,H=H>>8,b[d]=H,d+8}i.prototype.writeBigUInt64LE=Re(function(l,d=0){return G(this,l,d,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeBigUInt64BE=Re(function(l,d=0){return ee(this,l,d,BigInt(0),BigInt("0xffffffffffffffff"))}),i.prototype.writeIntLE=function(l,d,N,P){if(l=+l,d=d>>>0,!P){const me=Math.pow(2,8*N-1);$(this,l,d,N,me-1,-me)}let z=0,H=1,oe=0;for(this[d]=l&255;++z<N&&(H*=256);)l<0&&oe===0&&this[d+z-1]!==0&&(oe=1),this[d+z]=(l/H>>0)-oe&255;return d+N},i.prototype.writeIntBE=function(l,d,N,P){if(l=+l,d=d>>>0,!P){const me=Math.pow(2,8*N-1);$(this,l,d,N,me-1,-me)}let z=N-1,H=1,oe=0;for(this[d+z]=l&255;--z>=0&&(H*=256);)l<0&&oe===0&&this[d+z+1]!==0&&(oe=1),this[d+z]=(l/H>>0)-oe&255;return d+N},i.prototype.writeInt8=function(l,d,N){return l=+l,d=d>>>0,N||$(this,l,d,1,127,-128),l<0&&(l=255+l+1),this[d]=l&255,d+1},i.prototype.writeInt16LE=function(l,d,N){return l=+l,d=d>>>0,N||$(this,l,d,2,32767,-32768),this[d]=l&255,this[d+1]=l>>>8,d+2},i.prototype.writeInt16BE=function(l,d,N){return l=+l,d=d>>>0,N||$(this,l,d,2,32767,-32768),this[d]=l>>>8,this[d+1]=l&255,d+2},i.prototype.writeInt32LE=function(l,d,N){return l=+l,d=d>>>0,N||$(this,l,d,4,2147483647,-2147483648),this[d]=l&255,this[d+1]=l>>>8,this[d+2]=l>>>16,this[d+3]=l>>>24,d+4},i.prototype.writeInt32BE=function(l,d,N){return l=+l,d=d>>>0,N||$(this,l,d,4,2147483647,-2147483648),l<0&&(l=4294967295+l+1),this[d]=l>>>24,this[d+1]=l>>>16,this[d+2]=l>>>8,this[d+3]=l&255,d+4},i.prototype.writeBigInt64LE=Re(function(l,d=0){return G(this,l,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),i.prototype.writeBigInt64BE=Re(function(l,d=0){return ee(this,l,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ne(b,l,d,N,P,z){if(d+N>b.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function L(b,l,d,N,P){return l=+l,d=d>>>0,P||ne(b,l,d,4),t.write(b,l,d,N,23,4),d+4}i.prototype.writeFloatLE=function(l,d,N){return L(this,l,d,!0,N)},i.prototype.writeFloatBE=function(l,d,N){return L(this,l,d,!1,N)};function f(b,l,d,N,P){return l=+l,d=d>>>0,P||ne(b,l,d,8),t.write(b,l,d,N,52,8),d+8}i.prototype.writeDoubleLE=function(l,d,N){return f(this,l,d,!0,N)},i.prototype.writeDoubleBE=function(l,d,N){return f(this,l,d,!1,N)},i.prototype.copy=function(l,d,N,P){if(!i.isBuffer(l))throw new TypeError("argument should be a Buffer");if(N||(N=0),!P&&P!==0&&(P=this.length),d>=l.length&&(d=l.length),d||(d=0),P>0&&P<N&&(P=N),P===N||l.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(N<0||N>=this.length)throw new RangeError("Index out of range");if(P<0)throw new RangeError("sourceEnd out of bounds");P>this.length&&(P=this.length),l.length-d<P-N&&(P=l.length-d+N);const z=P-N;return this===l&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(d,N,P):Uint8Array.prototype.set.call(l,this.subarray(N,P),d),z},i.prototype.fill=function(l,d,N,P){if(typeof l=="string"){if(typeof d=="string"?(P=d,d=0,N=this.length):typeof N=="string"&&(P=N,N=this.length),P!==void 0&&typeof P!="string")throw new TypeError("encoding must be a string");if(typeof P=="string"&&!i.isEncoding(P))throw new TypeError("Unknown encoding: "+P);if(l.length===1){const H=l.charCodeAt(0);(P==="utf8"&&H<128||P==="latin1")&&(l=H)}}else typeof l=="number"?l=l&255:typeof l=="boolean"&&(l=Number(l));if(d<0||this.length<d||this.length<N)throw new RangeError("Out of range index");if(N<=d)return this;d=d>>>0,N=N===void 0?this.length:N>>>0,l||(l=0);let z;if(typeof l=="number")for(z=d;z<N;++z)this[z]=l;else{const H=i.isBuffer(l)?l:i.from(l,P),oe=H.length;if(oe===0)throw new TypeError('The value "'+l+'" is invalid for argument "value"');for(z=0;z<N-d;++z)this[z+d]=H[z%oe]}return this};const s={};function I(b,l,d){s[b]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:l.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(P){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:P,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}I("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),I("ERR_INVALID_ARG_TYPE",function(b,l){return`The "${b}" argument must be of type number. Received type ${typeof l}`},TypeError),I("ERR_OUT_OF_RANGE",function(b,l,d){let N=`The value of "${b}" is out of range.`,P=d;return Number.isInteger(d)&&Math.abs(d)>2**32?P=T(String(d)):typeof d=="bigint"&&(P=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(P=T(P)),P+="n"),N+=` It must be ${l}. Received ${P}`,N},RangeError);function T(b){let l="",d=b.length;const N=b[0]==="-"?1:0;for(;d>=N+4;d-=3)l=`_${b.slice(d-3,d)}${l}`;return`${b.slice(0,d)}${l}`}function E(b,l,d){M(l,"offset"),(b[l]===void 0||b[l+d]===void 0)&&X(l,b.length-(d+1))}function w(b,l,d,N,P,z){if(b>d||b<l){const H=typeof l=="bigint"?"n":"";let oe;throw z>3?l===0||l===BigInt(0)?oe=`>= 0${H} and < 2${H} ** ${(z+1)*8}${H}`:oe=`>= -(2${H} ** ${(z+1)*8-1}${H}) and < 2 ** ${(z+1)*8-1}${H}`:oe=`>= ${l}${H} and <= ${d}${H}`,new s.ERR_OUT_OF_RANGE("value",oe,b)}E(N,P,z)}function M(b,l){if(typeof b!="number")throw new s.ERR_INVALID_ARG_TYPE(l,"number",b)}function X(b,l,d){throw Math.floor(b)!==b?(M(b,d),new s.ERR_OUT_OF_RANGE(d||"offset","an integer",b)):l<0?new s.ERR_BUFFER_OUT_OF_BOUNDS:new s.ERR_OUT_OF_RANGE(d||"offset",`>= ${d?1:0} and <= ${l}`,b)}const ie=/[^+/0-9A-Za-z-_]/g;function Q(b){if(b=b.split("=")[0],b=b.trim().replace(ie,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function te(b,l){l=l||1/0;let d;const N=b.length;let P=null;const z=[];for(let H=0;H<N;++H){if(d=b.charCodeAt(H),d>55295&&d<57344){if(!P){if(d>56319){(l-=3)>-1&&z.push(239,191,189);continue}else if(H+1===N){(l-=3)>-1&&z.push(239,191,189);continue}P=d;continue}if(d<56320){(l-=3)>-1&&z.push(239,191,189),P=d;continue}d=(P-55296<<10|d-56320)+65536}else P&&(l-=3)>-1&&z.push(239,191,189);if(P=null,d<128){if((l-=1)<0)break;z.push(d)}else if(d<2048){if((l-=2)<0)break;z.push(d>>6|192,d&63|128)}else if(d<65536){if((l-=3)<0)break;z.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((l-=4)<0)break;z.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return z}function ce(b){const l=[];for(let d=0;d<b.length;++d)l.push(b.charCodeAt(d)&255);return l}function W(b,l){let d,N,P;const z=[];for(let H=0;H<b.length&&!((l-=2)<0);++H)d=b.charCodeAt(H),N=d>>8,P=d%256,z.push(P),z.push(N);return z}function Se(b){return r.toByteArray(Q(b))}function pe(b,l,d,N){let P;for(P=0;P<N&&!(P+d>=l.length||P>=b.length);++P)l[P+d]=b[P];return P}function ye(b,l){return b instanceof l||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===l.name}function Ae(b){return b!==b}const Ie=(function(){const b="0123456789abcdef",l=new Array(256);for(let d=0;d<16;++d){const N=d*16;for(let P=0;P<16;++P)l[N+P]=b[d]+b[P]}return l})();function Re(b){return typeof BigInt=="undefined"?vt:b}function vt(){throw new Error("BigInt not supported")}})(_t),globalThis.Buffer=_t.Buffer;var Pt={},Pn={},xe={},nr={},Ic={get exports(){return nr},set exports(e){nr=e}},ir={},Oc={get exports(){return ir},set exports(e){ir=e}},go;function Ln(){if(go)return ir;go=1;var e=typeof Reflect=="object"?Reflect:null,r=e&&typeof e.apply=="function"?e.apply:function(k,D,U){return Function.prototype.apply.call(k,D,U)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:t=function(k){return Object.getOwnPropertyNames(k)};function n(x){console&&console.warn&&console.warn(x)}var u=Number.isNaN||function(k){return k!==k};function a(){a.init.call(this)}Oc.exports=a,ir.once=g,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function i(x){if(typeof x!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof x)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(x){if(typeof x!="number"||x<0||u(x))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+x+".");o=x}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||u(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this};function c(x){return x._maxListeners===void 0?a.defaultMaxListeners:x._maxListeners}a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(k){for(var D=[],U=1;U<arguments.length;U++)D.push(arguments[U]);var q=k==="error",O=this._events;if(O!==void 0)q=q&&O.error===void 0;else if(!q)return!1;if(q){var Y;if(D.length>0&&(Y=D[0]),Y instanceof Error)throw Y;var V=new Error("Unhandled error."+(Y?" ("+Y.message+")":""));throw V.context=Y,V}var K=O[k];if(K===void 0)return!1;if(typeof K=="function")r(K,this,D);else for(var ae=K.length,re=A(K,ae),U=0;U<ae;++U)r(re[U],this,D);return!0};function h(x,k,D,U){var q,O,Y;if(i(D),O=x._events,O===void 0?(O=x._events=Object.create(null),x._eventsCount=0):(O.newListener!==void 0&&(x.emit("newListener",k,D.listener?D.listener:D),O=x._events),Y=O[k]),Y===void 0)Y=O[k]=D,++x._eventsCount;else if(typeof Y=="function"?Y=O[k]=U?[D,Y]:[Y,D]:U?Y.unshift(D):Y.push(D),q=c(x),q>0&&Y.length>q&&!Y.warned){Y.warned=!0;var V=new Error("Possible EventEmitter memory leak detected. "+Y.length+" "+String(k)+" listeners added. Use emitter.setMaxListeners() to increase limit");V.name="MaxListenersExceededWarning",V.emitter=x,V.type=k,V.count=Y.length,n(V)}return x}a.prototype.addListener=function(k,D){return h(this,k,D,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(k,D){return h(this,k,D,!0)};function p(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _(x,k,D){var U={fired:!1,wrapFn:void 0,target:x,type:k,listener:D},q=p.bind(U);return q.listener=D,U.wrapFn=q,q}a.prototype.once=function(k,D){return i(D),this.on(k,_(this,k,D)),this},a.prototype.prependOnceListener=function(k,D){return i(D),this.prependListener(k,_(this,k,D)),this},a.prototype.removeListener=function(k,D){var U,q,O,Y,V;if(i(D),q=this._events,q===void 0)return this;if(U=q[k],U===void 0)return this;if(U===D||U.listener===D)--this._eventsCount===0?this._events=Object.create(null):(delete q[k],q.removeListener&&this.emit("removeListener",k,U.listener||D));else if(typeof U!="function"){for(O=-1,Y=U.length-1;Y>=0;Y--)if(U[Y]===D||U[Y].listener===D){V=U[Y].listener,O=Y;break}if(O<0)return this;O===0?U.shift():R(U,O),U.length===1&&(q[k]=U[0]),q.removeListener!==void 0&&this.emit("removeListener",k,V||D)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(k){var D,U,q;if(U=this._events,U===void 0)return this;if(U.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):U[k]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete U[k]),this;if(arguments.length===0){var O=Object.keys(U),Y;for(q=0;q<O.length;++q)Y=O[q],Y!=="removeListener"&&this.removeAllListeners(Y);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(D=U[k],typeof D=="function")this.removeListener(k,D);else if(D!==void 0)for(q=D.length-1;q>=0;q--)this.removeListener(k,D[q]);return this};function y(x,k,D){var U=x._events;if(U===void 0)return[];var q=U[k];return q===void 0?[]:typeof q=="function"?D?[q.listener||q]:[q]:D?S(q):A(q,q.length)}a.prototype.listeners=function(k){return y(this,k,!0)},a.prototype.rawListeners=function(k){return y(this,k,!1)},a.listenerCount=function(x,k){return typeof x.listenerCount=="function"?x.listenerCount(k):v.call(x,k)},a.prototype.listenerCount=v;function v(x){var k=this._events;if(k!==void 0){var D=k[x];if(typeof D=="function")return 1;if(D!==void 0)return D.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function A(x,k){for(var D=new Array(k),U=0;U<k;++U)D[U]=x[U];return D}function R(x,k){for(;k+1<x.length;k++)x[k]=x[k+1];x.pop()}function S(x){for(var k=new Array(x.length),D=0;D<k.length;++D)k[D]=x[D].listener||x[D];return k}function g(x,k){return new Promise(function(D,U){function q(Y){x.removeListener(k,O),U(Y)}function O(){typeof x.removeListener=="function"&&x.removeListener("error",q),D([].slice.call(arguments))}C(x,k,O,{once:!0}),k!=="error"&&m(x,q,{once:!0})})}function m(x,k,D){typeof x.on=="function"&&C(x,"error",k,D)}function C(x,k,D,U){if(typeof x.on=="function")U.once?x.once(k,D):x.on(k,D);else if(typeof x.addEventListener=="function")x.addEventListener(k,function q(O){U.once&&x.removeEventListener(k,q),D(O)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof x)}return ir}var Br={},Nc={get exports(){return Br},set exports(e){Br=e}},Mn={},Un={},jn,vo;function _o(){return vo||(vo=1,jn=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var u=42;r[t]=u;for(var a in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var o=Object.getOwnPropertySymbols(r);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var i=Object.getOwnPropertyDescriptor(r,t);if(i.value!==u||i.enumerable!==!0)return!1}return!0}),jn}var $n,mo;function Dr(){if(mo)return $n;mo=1;var e=_o();return $n=function(){return e()&&!!Symbol.toStringTag},$n}var qn,bo;function wo(){return bo||(bo=1,qn=Object),qn}var zn,Eo;function Cc(){return Eo||(Eo=1,zn=Error),zn}var Wn,So;function kc(){return So||(So=1,Wn=EvalError),Wn}var Hn,xo;function Bc(){return xo||(xo=1,Hn=RangeError),Hn}var Gn,To;function Dc(){return To||(To=1,Gn=ReferenceError),Gn}var Zn,Ao;function Ro(){return Ao||(Ao=1,Zn=SyntaxError),Zn}var Vn,Io;function ar(){return Io||(Io=1,Vn=TypeError),Vn}var Xn,Oo;function Fc(){return Oo||(Oo=1,Xn=URIError),Xn}var Yn,No;function Pc(){return No||(No=1,Yn=Math.abs),Yn}var Kn,Co;function Lc(){return Co||(Co=1,Kn=Math.floor),Kn}var Jn,ko;function Mc(){return ko||(ko=1,Jn=Math.max),Jn}var Qn,Bo;function Uc(){return Bo||(Bo=1,Qn=Math.min),Qn}var ei,Do;function jc(){return Do||(Do=1,ei=Math.pow),ei}var ti,Fo;function $c(){return Fo||(Fo=1,ti=Math.round),ti}var ri,Po;function qc(){return Po||(Po=1,ri=Number.isNaN||function(r){return r!==r}),ri}var ni,Lo;function zc(){if(Lo)return ni;Lo=1;var e=qc();return ni=function(t){return e(t)||t===0?t:t<0?-1:1},ni}var ii,Mo;function Wc(){return Mo||(Mo=1,ii=Object.getOwnPropertyDescriptor),ii}var ai,Uo;function Lt(){if(Uo)return ai;Uo=1;var e=Wc();if(e)try{e([],"length")}catch(r){e=null}return ai=e,ai}var oi,jo;function Fr(){if(jo)return oi;jo=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(r){e=!1}return oi=e,oi}var fi,$o;function Hc(){if($o)return fi;$o=1;var e=typeof Symbol!="undefined"&&Symbol,r=_o();return fi=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:r()},fi}var si,qo;function zo(){return qo||(qo=1,si=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null),si}var ui,Wo;function Ho(){if(Wo)return ui;Wo=1;var e=wo();return ui=e.getPrototypeOf||null,ui}var li,Go;function Gc(){if(Go)return li;Go=1;var e="Function.prototype.bind called on incompatible ",r=Object.prototype.toString,t=Math.max,n="[object Function]",u=function(c,h){for(var p=[],_=0;_<c.length;_+=1)p[_]=c[_];for(var y=0;y<h.length;y+=1)p[y+c.length]=h[y];return p},a=function(c,h){for(var p=[],_=h||0,y=0;_<c.length;_+=1,y+=1)p[y]=c[_];return p},o=function(i,c){for(var h="",p=0;p<i.length;p+=1)h+=i[p],p+1<i.length&&(h+=c);return h};return li=function(c){var h=this;if(typeof h!="function"||r.apply(h)!==n)throw new TypeError(e+h);for(var p=a(arguments,1),_,y=function(){if(this instanceof _){var g=h.apply(this,u(p,arguments));return Object(g)===g?g:this}return h.apply(c,u(p,arguments))},v=t(0,h.length-p.length),A=[],R=0;R<v;R++)A[R]="$"+R;if(_=Function("binder","return function ("+o(A,",")+"){ return binder.apply(this,arguments); }")(y),h.prototype){var S=function(){};S.prototype=h.prototype,_.prototype=new S,S.prototype=null}return _},li}var ci,Zo;function or(){if(Zo)return ci;Zo=1;var e=Gc();return ci=Function.prototype.bind||e,ci}var di,Vo;function hi(){return Vo||(Vo=1,di=Function.prototype.call),di}var pi,Xo;function yi(){return Xo||(Xo=1,pi=Function.prototype.apply),pi}var gi,Yo;function Zc(){return Yo||(Yo=1,gi=typeof Reflect!="undefined"&&Reflect&&Reflect.apply),gi}var vi,Ko;function Jo(){if(Ko)return vi;Ko=1;var e=or(),r=yi(),t=hi(),n=Zc();return vi=n||e.call(t,r),vi}var _i,Qo;function mi(){if(Qo)return _i;Qo=1;var e=or(),r=ar(),t=hi(),n=Jo();return _i=function(a){if(a.length<1||typeof a[0]!="function")throw new r("a function is required");return n(e,t,a)},_i}var bi,ef;function Vc(){if(ef)return bi;ef=1;var e=mi(),r=Lt(),t;try{t=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!t&&r&&r(Object.prototype,"__proto__"),u=Object,a=u.getPrototypeOf;return bi=n&&typeof n.get=="function"?e([n.get]):typeof a=="function"?function(i){return a(i==null?i:u(i))}:!1,bi}var wi,tf;function Ei(){if(tf)return wi;tf=1;var e=zo(),r=Ho(),t=Vc();return wi=e?function(u){return e(u)}:r?function(u){if(!u||typeof u!="object"&&typeof u!="function")throw new TypeError("getProto: not an object");return r(u)}:t?function(u){return t(u)}:null,wi}var Si,rf;function nf(){if(rf)return Si;rf=1;var e=Function.prototype.call,r=Object.prototype.hasOwnProperty,t=or();return Si=t.call(e,r),Si}var xi,af;function of(){if(af)return xi;af=1;var e,r=wo(),t=Cc(),n=kc(),u=Bc(),a=Dc(),o=Ro(),i=ar(),c=Fc(),h=Pc(),p=Lc(),_=Mc(),y=Uc(),v=jc(),A=$c(),R=zc(),S=Function,g=function(I){try{return S('"use strict"; return ('+I+").constructor;")()}catch(T){}},m=Lt(),C=Fr(),x=function(){throw new i},k=m?(function(){try{return arguments.callee,x}catch(I){try{return m(arguments,"callee").get}catch(T){return x}}})():x,D=Hc()(),U=Ei(),q=Ho(),O=zo(),Y=yi(),V=hi(),K={},ae=typeof Uint8Array=="undefined"||!U?e:U(Uint8Array),re={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?e:ArrayBuffer,"%ArrayIteratorPrototype%":D&&U?U([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":K,"%AsyncGenerator%":K,"%AsyncGeneratorFunction%":K,"%AsyncIteratorPrototype%":K,"%Atomics%":typeof Atomics=="undefined"?e:Atomics,"%BigInt%":typeof BigInt=="undefined"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array=="undefined"?e:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?e:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?e:FinalizationRegistry,"%Function%":S,"%GeneratorFunction%":K,"%Int8Array%":typeof Int8Array=="undefined"?e:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?e:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D&&U?U(U([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map=="undefined"?e:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!D||!U?e:U(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":m,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?e:Promise,"%Proxy%":typeof Proxy=="undefined"?e:Proxy,"%RangeError%":u,"%ReferenceError%":a,"%Reflect%":typeof Reflect=="undefined"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?e:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!D||!U?e:U(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D&&U?U(""[Symbol.iterator]()):e,"%Symbol%":D?Symbol:e,"%SyntaxError%":o,"%ThrowTypeError%":k,"%TypedArray%":ae,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array=="undefined"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?e:Uint32Array,"%URIError%":c,"%WeakMap%":typeof WeakMap=="undefined"?e:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?e:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?e:WeakSet,"%Function.prototype.call%":V,"%Function.prototype.apply%":Y,"%Object.defineProperty%":C,"%Object.getPrototypeOf%":q,"%Math.abs%":h,"%Math.floor%":p,"%Math.max%":_,"%Math.min%":y,"%Math.pow%":v,"%Math.round%":A,"%Math.sign%":R,"%Reflect.getPrototypeOf%":O};if(U)try{null.error}catch(I){var fe=U(U(I));re["%Error.prototype%"]=fe}var ue=function I(T){var E;if(T==="%AsyncFunction%")E=g("async function () {}");else if(T==="%GeneratorFunction%")E=g("function* () {}");else if(T==="%AsyncGeneratorFunction%")E=g("async function* () {}");else if(T==="%AsyncGenerator%"){var w=I("%AsyncGeneratorFunction%");w&&(E=w.prototype)}else if(T==="%AsyncIteratorPrototype%"){var M=I("%AsyncGenerator%");M&&U&&(E=U(M.prototype))}return re[T]=E,E},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},j=or(),Z=nf(),J=j.call(V,Array.prototype.concat),B=j.call(Y,Array.prototype.splice),$=j.call(V,String.prototype.replace),G=j.call(V,String.prototype.slice),ee=j.call(V,RegExp.prototype.exec),ne=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L=/\\(\\)?/g,f=function(T){var E=G(T,0,1),w=G(T,-1);if(E==="%"&&w!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(w==="%"&&E!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var M=[];return $(T,ne,function(X,ie,Q,te){M[M.length]=Q?$(te,L,"$1"):ie||X}),M},s=function(T,E){var w=T,M;if(Z(F,w)&&(M=F[w],w="%"+M[0]+"%"),Z(re,w)){var X=re[w];if(X===K&&(X=ue(w)),typeof X=="undefined"&&!E)throw new i("intrinsic "+T+" exists, but is not available. Please file an issue!");return{alias:M,name:w,value:X}}throw new o("intrinsic "+T+" does not exist!")};return xi=function(T,E){if(typeof T!="string"||T.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof E!="boolean")throw new i('"allowMissing" argument must be a boolean');if(ee(/^%?[^%]*%?$/,T)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var w=f(T),M=w.length>0?w[0]:"",X=s("%"+M+"%",E),ie=X.name,Q=X.value,te=!1,ce=X.alias;ce&&(M=ce[0],B(w,J([0,1],ce)));for(var W=1,Se=!0;W<w.length;W+=1){var pe=w[W],ye=G(pe,0,1),Ae=G(pe,-1);if((ye==='"'||ye==="'"||ye==="`"||Ae==='"'||Ae==="'"||Ae==="`")&&ye!==Ae)throw new o("property names with quotes must have matching quotes");if((pe==="constructor"||!Se)&&(te=!0),M+="."+pe,ie="%"+M+"%",Z(re,ie))Q=re[ie];else if(Q!=null){if(!(pe in Q)){if(!E)throw new i("base intrinsic for "+T+" exists, but the property is not available.");return}if(m&&W+1>=w.length){var Ie=m(Q,pe);Se=!!Ie,Se&&"get"in Ie&&!("originalValue"in Ie.get)?Q=Ie.get:Q=Q[pe]}else Se=Z(Q,pe),Q=Q[pe];Se&&!te&&(re[ie]=Q)}}return Q},xi}var Ti,ff;function fr(){if(ff)return Ti;ff=1;var e=of(),r=mi(),t=r([e("%String.prototype.indexOf%")]);return Ti=function(u,a){var o=e(u,!!a);return typeof o=="function"&&t(u,".prototype.")>-1?r([o]):o},Ti}var Ai,sf;function Xc(){if(sf)return Ai;sf=1;var e=Dr()(),r=fr(),t=r("Object.prototype.toString"),n=function(i){return e&&i&&typeof i=="object"&&Symbol.toStringTag in i?!1:t(i)==="[object Arguments]"},u=function(i){return n(i)?!0:i!==null&&typeof i=="object"&&"length"in i&&typeof i.length=="number"&&i.length>=0&&t(i)!=="[object Array]"&&"callee"in i&&t(i.callee)==="[object Function]"},a=(function(){return n(arguments)})();return n.isLegacyArguments=u,Ai=a?n:u,Ai}var Ri,uf;function Yc(){if(uf)return Ri;uf=1;var e=fr(),r=Dr()(),t=nf(),n=Lt(),u;if(r){var a=e("RegExp.prototype.exec"),o={},i=function(){throw o},c={toString:i,valueOf:i};typeof Symbol.toPrimitive=="symbol"&&(c[Symbol.toPrimitive]=i),u=function(y){if(!y||typeof y!="object")return!1;var v=n(y,"lastIndex"),A=v&&t(v,"value");if(!A)return!1;try{a(y,c)}catch(R){return R===o}}}else{var h=e("Object.prototype.toString"),p="[object RegExp]";u=function(y){return!y||typeof y!="object"&&typeof y!="function"?!1:h(y)===p}}return Ri=u,Ri}var Ii,lf;function Kc(){if(lf)return Ii;lf=1;var e=fr(),r=Yc(),t=e("RegExp.prototype.exec"),n=ar();return Ii=function(a){if(!r(a))throw new n("`regex` must be a RegExp");return function(i){return t(a,i)!==null}},Ii}var Oi,cf;function Jc(){if(cf)return Oi;cf=1;const e=function*(){}.constructor;return Oi=()=>e,Oi}var Ni,df;function Qc(){if(df)return Ni;df=1;var e=fr(),r=Kc(),t=r(/^\s*(?:function)?\*/),n=Dr()(),u=Ei(),a=e("Object.prototype.toString"),o=e("Function.prototype.toString"),i=Jc();return Ni=function(h){if(typeof h!="function")return!1;if(t(o(h)))return!0;if(!n){var p=a(h);return p==="[object GeneratorFunction]"}if(!u)return!1;var _=i();return _&&u(h)===_.prototype},Ni}var Ci,hf;function ed(){if(hf)return Ci;hf=1;var e=Function.prototype.toString,r=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,n;if(typeof r=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},r(function(){throw 42},null,t)}catch(m){m!==n&&(r=null)}else r=null;var u=/^\s*class\b/,a=function(C){try{var x=e.call(C);return u.test(x)}catch(k){return!1}},o=function(C){try{return a(C)?!1:(e.call(C),!0)}catch(x){return!1}},i=Object.prototype.toString,c="[object Object]",h="[object Function]",p="[object GeneratorFunction]",_="[object HTMLAllCollection]",y="[object HTML document.all class]",v="[object HTMLCollection]",A=typeof Symbol=="function"&&!!Symbol.toStringTag,R=!(0 in[,]),S=function(){return!1};if(typeof document=="object"){var g=document.all;i.call(g)===i.call(document.all)&&(S=function(C){if((R||!C)&&(typeof C=="undefined"||typeof C=="object"))try{var x=i.call(C);return(x===_||x===y||x===v||x===c)&&C("")==null}catch(k){}return!1})}return Ci=r?function(C){if(S(C))return!0;if(!C||typeof C!="function"&&typeof C!="object")return!1;try{r(C,null,t)}catch(x){if(x!==n)return!1}return!a(C)&&o(C)}:function(C){if(S(C))return!0;if(!C||typeof C!="function"&&typeof C!="object")return!1;if(A)return o(C);if(a(C))return!1;var x=i.call(C);return x!==h&&x!==p&&!/^\[object HTML/.test(x)?!1:o(C)},Ci}var ki,pf;function td(){if(pf)return ki;pf=1;var e=ed(),r=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(c,h,p){for(var _=0,y=c.length;_<y;_++)t.call(c,_)&&(p==null?h(c[_],_,c):h.call(p,c[_],_,c))},u=function(c,h,p){for(var _=0,y=c.length;_<y;_++)p==null?h(c.charAt(_),_,c):h.call(p,c.charAt(_),_,c)},a=function(c,h,p){for(var _ in c)t.call(c,_)&&(p==null?h(c[_],_,c):h.call(p,c[_],_,c))};function o(i){return r.call(i)==="[object Array]"}return ki=function(c,h,p){if(!e(h))throw new TypeError("iterator must be a function");var _;arguments.length>=3&&(_=p),o(c)?n(c,h,_):typeof c=="string"?u(c,h,_):a(c,h,_)},ki}var Bi,yf;function rd(){return yf||(yf=1,Bi=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Bi}var Di,gf;function nd(){if(gf)return Di;gf=1;var e=rd(),r=typeof globalThis=="undefined"?_e:globalThis;return Di=function(){for(var n=[],u=0;u<e.length;u++)typeof r[e[u]]=="function"&&(n[n.length]=e[u]);return n},Di}var Pr={},id={get exports(){return Pr},set exports(e){Pr=e}},Fi,vf;function ad(){if(vf)return Fi;vf=1;var e=Fr(),r=Ro(),t=ar(),n=Lt();return Fi=function(a,o,i){if(!a||typeof a!="object"&&typeof a!="function")throw new t("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var c=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,p=arguments.length>5?arguments[5]:null,_=arguments.length>6?arguments[6]:!1,y=!!n&&n(a,o);if(e)e(a,o,{configurable:p===null&&y?y.configurable:!p,enumerable:c===null&&y?y.enumerable:!c,value:i,writable:h===null&&y?y.writable:!h});else if(_||!c&&!h&&!p)a[o]=i;else throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Fi}var Pi,_f;function od(){if(_f)return Pi;_f=1;var e=Fr(),r=function(){return!!e};return r.hasArrayLengthDefineBug=function(){if(!e)return null;try{return e([],"length",{value:1}).length!==1}catch(n){return!0}},Pi=r,Pi}var Li,mf;function fd(){if(mf)return Li;mf=1;var e=of(),r=ad(),t=od()(),n=Lt(),u=ar(),a=e("%Math.floor%");return Li=function(i,c){if(typeof i!="function")throw new u("`fn` is not a function");if(typeof c!="number"||c<0||c>4294967295||a(c)!==c)throw new u("`length` must be a positive 32-bit integer");var h=arguments.length>2&&!!arguments[2],p=!0,_=!0;if("length"in i&&n){var y=n(i,"length");y&&!y.configurable&&(p=!1),y&&!y.writable&&(_=!1)}return(p||_||!h)&&(t?r(i,"length",c,!0,!0):r(i,"length",c)),i},Li}var Mi,bf;function sd(){if(bf)return Mi;bf=1;var e=or(),r=yi(),t=Jo();return Mi=function(){return t(e,r,arguments)},Mi}var wf;function ud(){return wf||(wf=1,(function(e){var r=fd(),t=Fr(),n=mi(),u=sd();e.exports=function(o){var i=n(arguments),c=1+o.length-(arguments.length-1);return r(i,c>0?c:0,!0)},t?t(e.exports,"apply",{value:u}):e.exports.apply=u})(id)),Pr}var Ui,Ef;function Sf(){if(Ef)return Ui;Ef=1;var e=td(),r=nd(),t=ud(),n=fr(),u=Lt(),a=Ei(),o=n("Object.prototype.toString"),i=Dr()(),c=typeof globalThis=="undefined"?_e:globalThis,h=r(),p=n("String.prototype.slice"),_=n("Array.prototype.indexOf",!0)||function(m,C){for(var x=0;x<m.length;x+=1)if(m[x]===C)return x;return-1},y={__proto__:null};i&&u&&a?e(h,function(g){var m=new c[g];if(Symbol.toStringTag in m&&a){var C=a(m),x=u(C,Symbol.toStringTag);if(!x&&C){var k=a(C);x=u(k,Symbol.toStringTag)}if(x&&x.get){var D=t(x.get);y["$"+g]=D}}}):e(h,function(g){var m=new c[g],C=m.slice||m.set;if(C){var x=t(C);y["$"+g]=x}});function v(g){var m=!1;return e(y,function(C,x){if(!m)try{"$"+C(g)===x&&(m=p(x,1))}catch(k){}}),m}function A(g){var m=!1;return e(y,function(C,x){if(!m)try{C(g),m=p(x,1)}catch(k){}}),m}function R(g){return _(h,g)>-1}function S(g){if(!g||typeof g!="object")return!1;if(!i){var m=p(o(g),8,-1);return R(m)?m:m!=="Object"?!1:A(g)}return u?v(g):null}return Ui=S,Ui}var ji,xf;function ld(){if(xf)return ji;xf=1;var e=Sf();return ji=function(t){return!!e(t)},ji}var Tf;function cd(){return Tf||(Tf=1,(function(e){var r=Xc(),t=Qc(),n=Sf(),u=ld();function a(W){return W.call.bind(W)}var o=typeof BigInt!="undefined",i=typeof Symbol!="undefined",c=a(Object.prototype.toString),h=a(Number.prototype.valueOf),p=a(String.prototype.valueOf),_=a(Boolean.prototype.valueOf);if(o)var y=a(BigInt.prototype.valueOf);if(i)var v=a(Symbol.prototype.valueOf);function A(W,Se){if(typeof W!="object")return!1;try{return Se(W),!0}catch(pe){return!1}}e.isArgumentsObject=r,e.isGeneratorFunction=t,e.isTypedArray=u;function R(W){return typeof Promise!="undefined"&&W instanceof Promise||W!==null&&typeof W=="object"&&typeof W.then=="function"&&typeof W.catch=="function"}e.isPromise=R;function S(W){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(W):u(W)||G(W)}e.isArrayBufferView=S;function g(W){return n(W)==="Uint8Array"}e.isUint8Array=g;function m(W){return n(W)==="Uint8ClampedArray"}e.isUint8ClampedArray=m;function C(W){return n(W)==="Uint16Array"}e.isUint16Array=C;function x(W){return n(W)==="Uint32Array"}e.isUint32Array=x;function k(W){return n(W)==="Int8Array"}e.isInt8Array=k;function D(W){return n(W)==="Int16Array"}e.isInt16Array=D;function U(W){return n(W)==="Int32Array"}e.isInt32Array=U;function q(W){return n(W)==="Float32Array"}e.isFloat32Array=q;function O(W){return n(W)==="Float64Array"}e.isFloat64Array=O;function Y(W){return n(W)==="BigInt64Array"}e.isBigInt64Array=Y;function V(W){return n(W)==="BigUint64Array"}e.isBigUint64Array=V;function K(W){return c(W)==="[object Map]"}K.working=typeof Map!="undefined"&&K(new Map);function ae(W){return typeof Map=="undefined"?!1:K.working?K(W):W instanceof Map}e.isMap=ae;function re(W){return c(W)==="[object Set]"}re.working=typeof Set!="undefined"&&re(new Set);function fe(W){return typeof Set=="undefined"?!1:re.working?re(W):W instanceof Set}e.isSet=fe;function ue(W){return c(W)==="[object WeakMap]"}ue.working=typeof WeakMap!="undefined"&&ue(new WeakMap);function F(W){return typeof WeakMap=="undefined"?!1:ue.working?ue(W):W instanceof WeakMap}e.isWeakMap=F;function j(W){return c(W)==="[object WeakSet]"}j.working=typeof WeakSet!="undefined"&&j(new WeakSet);function Z(W){return j(W)}e.isWeakSet=Z;function J(W){return c(W)==="[object ArrayBuffer]"}J.working=typeof ArrayBuffer!="undefined"&&J(new ArrayBuffer);function B(W){return typeof ArrayBuffer=="undefined"?!1:J.working?J(W):W instanceof ArrayBuffer}e.isArrayBuffer=B;function $(W){return c(W)==="[object DataView]"}$.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&$(new DataView(new ArrayBuffer(1),0,1));function G(W){return typeof DataView=="undefined"?!1:$.working?$(W):W instanceof DataView}e.isDataView=G;var ee=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function ne(W){return c(W)==="[object SharedArrayBuffer]"}function L(W){return typeof ee=="undefined"?!1:(typeof ne.working=="undefined"&&(ne.working=ne(new ee)),ne.working?ne(W):W instanceof ee)}e.isSharedArrayBuffer=L;function f(W){return c(W)==="[object AsyncFunction]"}e.isAsyncFunction=f;function s(W){return c(W)==="[object Map Iterator]"}e.isMapIterator=s;function I(W){return c(W)==="[object Set Iterator]"}e.isSetIterator=I;function T(W){return c(W)==="[object Generator]"}e.isGeneratorObject=T;function E(W){return c(W)==="[object WebAssembly.Module]"}e.isWebAssemblyCompiledModule=E;function w(W){return A(W,h)}e.isNumberObject=w;function M(W){return A(W,p)}e.isStringObject=M;function X(W){return A(W,_)}e.isBooleanObject=X;function ie(W){return o&&A(W,y)}e.isBigIntObject=ie;function Q(W){return i&&A(W,v)}e.isSymbolObject=Q;function te(W){return w(W)||M(W)||X(W)||ie(W)||Q(W)}e.isBoxedPrimitive=te;function ce(W){return typeof Uint8Array!="undefined"&&(B(W)||L(W))}e.isAnyArrayBuffer=ce,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(W){Object.defineProperty(e,W,{enumerable:!1,value:function(){throw new Error(W+" is not supported in userland")}})})})(Un)),Un}var $i,Af;function dd(){return Af||(Af=1,$i=function(r){return r instanceof Buffer}),$i}var Rf;function Mt(){return Rf||(Rf=1,(function(e){var r=Object.getOwnPropertyDescriptors||function($){for(var G=Object.keys($),ee={},ne=0;ne<G.length;ne++)ee[G[ne]]=Object.getOwnPropertyDescriptor($,G[ne]);return ee},t=/%[sdj%]/g;e.format=function(B){if(!x(B)){for(var $=[],G=0;G<arguments.length;G++)$.push(a(arguments[G]));return $.join(" ")}for(var G=1,ee=arguments,ne=ee.length,L=String(B).replace(t,function(s){if(s==="%%")return"%";if(G>=ne)return s;switch(s){case"%s":return String(ee[G++]);case"%d":return Number(ee[G++]);case"%j":try{return JSON.stringify(ee[G++])}catch(I){return"[Circular]"}default:return s}}),f=ee[G];G<ne;f=ee[++G])g(f)||!q(f)?L+=" "+f:L+=" "+a(f);return L},e.deprecate=function(B,$){return function(){return e.deprecate(B,$).apply(this,arguments)}};var n={},u=/^$/;e.debuglog=function(B){if(B=B.toUpperCase(),!n[B])if(u.test(B)){var $=42;n[B]=function(){var G=e.format.apply(e,arguments);console.error("%s %d: %s",B,$,G)}}else n[B]=function(){};return n[B]};function a(B,$){var G={seen:[],stylize:i};return arguments.length>=3&&(G.depth=arguments[2]),arguments.length>=4&&(G.colors=arguments[3]),S($)?G.showHidden=$:$&&e._extend(G,$),D(G.showHidden)&&(G.showHidden=!1),D(G.depth)&&(G.depth=2),D(G.colors)&&(G.colors=!1),D(G.customInspect)&&(G.customInspect=!0),G.colors&&(G.stylize=o),h(G,B,G.depth)}e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function o(B,$){var G=a.styles[$];return G?"\x1B["+a.colors[G][0]+"m"+B+"\x1B["+a.colors[G][1]+"m":B}function i(B,$){return B}function c(B){var $={};return B.forEach(function(G,ee){$[G]=!0}),$}function h(B,$,G){if(B.customInspect&&$&&V($.inspect)&&$.inspect!==e.inspect&&!($.constructor&&$.constructor.prototype===$)){var ee=$.inspect(G,B);return x(ee)||(ee=h(B,ee,G)),ee}var ne=p(B,$);if(ne)return ne;var L=Object.keys($),f=c(L);if(B.showHidden&&(L=Object.getOwnPropertyNames($)),Y($)&&(L.indexOf("message")>=0||L.indexOf("description")>=0))return _($);if(L.length===0){if(V($)){var s=$.name?": "+$.name:"";return B.stylize("[Function"+s+"]","special")}if(U($))return B.stylize(RegExp.prototype.toString.call($),"regexp");if(O($))return B.stylize(Date.prototype.toString.call($),"date");if(Y($))return _($)}var I="",T=!1,E=["{","}"];if(R($)&&(T=!0,E=["[","]"]),V($)){var w=$.name?": "+$.name:"";I=" [Function"+w+"]"}if(U($)&&(I=" "+RegExp.prototype.toString.call($)),O($)&&(I=" "+Date.prototype.toUTCString.call($)),Y($)&&(I=" "+_($)),L.length===0&&(!T||$.length==0))return E[0]+I+E[1];if(G<0)return U($)?B.stylize(RegExp.prototype.toString.call($),"regexp"):B.stylize("[Object]","special");B.seen.push($);var M;return T?M=y(B,$,G,f,L):M=L.map(function(X){return v(B,$,G,f,X,T)}),B.seen.pop(),A(M,I,E)}function p(B,$){if(D($))return B.stylize("undefined","undefined");if(x($)){var G="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(G,"string")}if(C($))return B.stylize(""+$,"number");if(S($))return B.stylize(""+$,"boolean");if(g($))return B.stylize("null","null")}function _(B){return"["+Error.prototype.toString.call(B)+"]"}function y(B,$,G,ee,ne){for(var L=[],f=0,s=$.length;f<s;++f)F($,String(f))?L.push(v(B,$,G,ee,String(f),!0)):L.push("");return ne.forEach(function(I){I.match(/^\d+$/)||L.push(v(B,$,G,ee,I,!0))}),L}function v(B,$,G,ee,ne,L){var f,s,I;if(I=Object.getOwnPropertyDescriptor($,ne)||{value:$[ne]},I.get?I.set?s=B.stylize("[Getter/Setter]","special"):s=B.stylize("[Getter]","special"):I.set&&(s=B.stylize("[Setter]","special")),F(ee,ne)||(f="["+ne+"]"),s||(B.seen.indexOf(I.value)<0?(g(G)?s=h(B,I.value,null):s=h(B,I.value,G-1),s.indexOf(`
7
- `)>-1&&(L?s=s.split(`
8
- `).map(function(T){return" "+T}).join(`
9
- `).slice(2):s=`
10
- `+s.split(`
11
- `).map(function(T){return" "+T}).join(`
12
- `))):s=B.stylize("[Circular]","special")),D(f)){if(L&&ne.match(/^\d+$/))return s;f=JSON.stringify(""+ne),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.slice(1,-1),f=B.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=B.stylize(f,"string"))}return f+": "+s}function A(B,$,G){var ee=B.reduce(function(ne,L){return L.indexOf(`
13
- `)>=0,ne+L.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ee>60?G[0]+($===""?"":$+`
14
- `)+" "+B.join(`,
15
- `)+" "+G[1]:G[0]+$+" "+B.join(", ")+" "+G[1]}e.types=cd();function R(B){return Array.isArray(B)}e.isArray=R;function S(B){return typeof B=="boolean"}e.isBoolean=S;function g(B){return B===null}e.isNull=g;function m(B){return B==null}e.isNullOrUndefined=m;function C(B){return typeof B=="number"}e.isNumber=C;function x(B){return typeof B=="string"}e.isString=x;function k(B){return typeof B=="symbol"}e.isSymbol=k;function D(B){return B===void 0}e.isUndefined=D;function U(B){return q(B)&&ae(B)==="[object RegExp]"}e.isRegExp=U,e.types.isRegExp=U;function q(B){return typeof B=="object"&&B!==null}e.isObject=q;function O(B){return q(B)&&ae(B)==="[object Date]"}e.isDate=O,e.types.isDate=O;function Y(B){return q(B)&&(ae(B)==="[object Error]"||B instanceof Error)}e.isError=Y,e.types.isNativeError=Y;function V(B){return typeof B=="function"}e.isFunction=V;function K(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B=="undefined"}e.isPrimitive=K,e.isBuffer=dd();function ae(B){return Object.prototype.toString.call(B)}function re(B){return B<10?"0"+B.toString(10):B.toString(10)}var fe=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function ue(){var B=new Date,$=[re(B.getHours()),re(B.getMinutes()),re(B.getSeconds())].join(":");return[B.getDate(),fe[B.getMonth()],$].join(" ")}e.log=function(){console.log("%s - %s",ue(),e.format.apply(e,arguments))},e.inherits=Pe(),e._extend=function(B,$){if(!$||!q($))return B;for(var G=Object.keys($),ee=G.length;ee--;)B[G[ee]]=$[G[ee]];return B};function F(B,$){return Object.prototype.hasOwnProperty.call(B,$)}var j=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;e.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(j&&$[j]){var G=$[j];if(typeof G!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(G,j,{value:G,enumerable:!1,writable:!1,configurable:!0}),G}function G(){for(var ee,ne,L=new Promise(function(I,T){ee=I,ne=T}),f=[],s=0;s<arguments.length;s++)f.push(arguments[s]);f.push(function(I,T){I?ne(I):ee(T)});try{$.apply(this,f)}catch(I){ne(I)}return L}return Object.setPrototypeOf(G,Object.getPrototypeOf($)),j&&Object.defineProperty(G,j,{value:G,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(G,r($))},e.promisify.custom=j;function Z(B,$){if(!B){var G=new Error("Promise was rejected with a falsy value");G.reason=B,B=G}return $(B)}function J(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');function $(){for(var G=[],ee=0;ee<arguments.length;ee++)G.push(arguments[ee]);var ne=G.pop();if(typeof ne!="function")throw new TypeError("The last argument must be of type Function");var L=this,f=function(){return ne.apply(L,arguments)};B.apply(this,G).then(function(s){setTimeout(f.bind(null,null,s))},function(s){setTimeout(Z.bind(null,s,f))})}return Object.setPrototypeOf($,Object.getPrototypeOf(B)),Object.defineProperties($,r(B)),$}e.callbackify=J})(Mn)),Mn}var Lr={},If={get exports(){return Lr},set exports(e){Lr=e}},Of;function hd(){return Of||(Of=1,typeof Object.create=="function"?If.exports=function(r,t){t&&(r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}))}:If.exports=function(r,t){if(t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r}}),Lr}var Nf;function Pe(){return Nf||(Nf=1,(function(e){try{var r=Mt();if(typeof r.inherits!="function")throw"";e.exports=r.inherits}catch(t){e.exports=hd()}})(Nc)),Br}var Mr={},pd={get exports(){return Mr},set exports(e){Mr=e}},Cf;function kf(){return Cf||(Cf=1,(function(e){e.exports=jr()})(pd)),Mr}var qi,Bf;function yd(){if(Bf)return qi;Bf=1;function e(A,R){var S=Object.keys(A);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(A);R&&(g=g.filter(function(m){return Object.getOwnPropertyDescriptor(A,m).enumerable})),S.push.apply(S,g)}return S}function r(A){for(var R=1;R<arguments.length;R++){var S=arguments[R]!=null?arguments[R]:{};R%2?e(Object(S),!0).forEach(function(g){t(A,g,S[g])}):Object.getOwnPropertyDescriptors?Object.defineProperties(A,Object.getOwnPropertyDescriptors(S)):e(Object(S)).forEach(function(g){Object.defineProperty(A,g,Object.getOwnPropertyDescriptor(S,g))})}return A}function t(A,R,S){return R=o(R),R in A?Object.defineProperty(A,R,{value:S,enumerable:!0,configurable:!0,writable:!0}):A[R]=S,A}function n(A,R){if(!(A instanceof R))throw new TypeError("Cannot call a class as a function")}function u(A,R){for(var S=0;S<R.length;S++){var g=R[S];g.enumerable=g.enumerable||!1,g.configurable=!0,"value"in g&&(g.writable=!0),Object.defineProperty(A,o(g.key),g)}}function a(A,R,S){return R&&u(A.prototype,R),S&&u(A,S),Object.defineProperty(A,"prototype",{writable:!1}),A}function o(A){var R=i(A,"string");return typeof R=="symbol"?R:String(R)}function i(A,R){if(typeof A!="object"||A===null)return A;var S=A[Symbol.toPrimitive];if(S!==void 0){var g=S.call(A,R||"default");if(typeof g!="object")return g;throw new TypeError("@@toPrimitive must return a primitive value.")}return(R==="string"?String:Number)(A)}var c=_t,h=c.Buffer,p=Mt(),_=p.inspect,y=_&&_.custom||"inspect";function v(A,R,S){h.prototype.copy.call(A,R,S)}return qi=(function(){function A(){n(this,A),this.head=null,this.tail=null,this.length=0}return a(A,[{key:"push",value:function(S){var g={data:S,next:null};this.length>0?this.tail.next=g:this.head=g,this.tail=g,++this.length}},{key:"unshift",value:function(S){var g={data:S,next:this.head};this.length===0&&(this.tail=g),this.head=g,++this.length}},{key:"shift",value:function(){if(this.length!==0){var S=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,S}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(S){if(this.length===0)return"";for(var g=this.head,m=""+g.data;g=g.next;)m+=S+g.data;return m}},{key:"concat",value:function(S){if(this.length===0)return h.alloc(0);for(var g=h.allocUnsafe(S>>>0),m=this.head,C=0;m;)v(m.data,g,C),C+=m.data.length,m=m.next;return g}},{key:"consume",value:function(S,g){var m;return S<this.head.data.length?(m=this.head.data.slice(0,S),this.head.data=this.head.data.slice(S)):S===this.head.data.length?m=this.shift():m=g?this._getString(S):this._getBuffer(S),m}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(S){var g=this.head,m=1,C=g.data;for(S-=C.length;g=g.next;){var x=g.data,k=S>x.length?x.length:S;if(k===x.length?C+=x:C+=x.slice(0,S),S-=k,S===0){k===x.length?(++m,g.next?this.head=g.next:this.head=this.tail=null):(this.head=g,g.data=x.slice(k));break}++m}return this.length-=m,C}},{key:"_getBuffer",value:function(S){var g=h.allocUnsafe(S),m=this.head,C=1;for(m.data.copy(g),S-=m.data.length;m=m.next;){var x=m.data,k=S>x.length?x.length:S;if(x.copy(g,g.length-S,0,k),S-=k,S===0){k===x.length?(++C,m.next?this.head=m.next:this.head=this.tail=null):(this.head=m,m.data=x.slice(k));break}++C}return this.length-=C,g}},{key:y,value:function(S,g){return _(this,r(r({},g),{},{depth:0,customInspect:!1}))}}]),A})(),qi}var zi,Df;function Ff(){if(Df)return zi;Df=1;function e(o,i){var c=this,h=this._readableState&&this._readableState.destroyed,p=this._writableState&&this._writableState.destroyed;return h||p?(i?i(o):o&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,setTimeout(u,this,o)):setTimeout(u,this,o)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(o||null,function(_){!i&&_?c._writableState?c._writableState.errorEmitted?setTimeout(t,c):(c._writableState.errorEmitted=!0,setTimeout(r,c,_)):setTimeout(r,c,_):i?(setTimeout(t,c),i(_)):setTimeout(t,c)}),this)}function r(o,i){u(o,i),t(o)}function t(o){o._writableState&&!o._writableState.emitClose||o._readableState&&!o._readableState.emitClose||o.emit("close")}function n(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function u(o,i){o.emit("error",i)}function a(o,i){var c=o._readableState,h=o._writableState;c&&c.autoDestroy||h&&h.autoDestroy?o.destroy(i):o.emit("error",i)}return zi={destroy:e,undestroy:n,errorOrDestroy:a},zi}var Wi={},Pf;function mt(){if(Pf)return Wi;Pf=1;const e={};function r(o,i,c){c||(c=Error);function h(_,y,v){return typeof i=="string"?i:i(_,y,v)}class p extends c{constructor(y,v,A){super(h(y,v,A))}}p.prototype.name=c.name,p.prototype.code=o,e[o]=p}function t(o,i){if(Array.isArray(o)){const c=o.length;return o=o.map(h=>String(h)),c>2?`one of ${i} ${o.slice(0,c-1).join(", ")}, or `+o[c-1]:c===2?`one of ${i} ${o[0]} or ${o[1]}`:`of ${i} ${o[0]}`}else return`of ${i} ${String(o)}`}function n(o,i,c){return o.substr(!c||c<0?0:+c,i.length)===i}function u(o,i,c){return(c===void 0||c>o.length)&&(c=o.length),o.substring(c-i.length,c)===i}function a(o,i,c){return typeof c!="number"&&(c=0),c+i.length>o.length?!1:o.indexOf(i,c)!==-1}return r("ERR_INVALID_OPT_VALUE",function(o,i){return'The value "'+i+'" is invalid for option "'+o+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(o,i,c){let h;typeof i=="string"&&n(i,"not ")?(h="must not be",i=i.replace(/^not /,"")):h="must be";let p;if(u(o," argument"))p=`The ${o} ${h} ${t(i,"type")}`;else{const _=a(o,".")?"property":"argument";p=`The "${o}" ${_} ${h} ${t(i,"type")}`}return p+=`. Received type ${typeof c}`,p},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Wi.codes=e,Wi}var Hi,Lf;function Mf(){if(Lf)return Hi;Lf=1;var e=mt().codes.ERR_INVALID_OPT_VALUE;function r(n,u,a){return n.highWaterMark!=null?n.highWaterMark:u?n[a]:null}function t(n,u,a,o){var i=r(u,o,a);if(i!=null){if(!(isFinite(i)&&Math.floor(i)===i)||i<0){var c=o?a:"highWaterMark";throw new e(c,i)}return Math.floor(i)}return n.objectMode?16:16*1024}return Hi={getHighWaterMark:t},Hi}var Gi,Uf;function jf(){return Uf||(Uf=1,Gi=Mt().deprecate),Gi}var Zi,$f;function qf(){if($f)return Zi;$f=1,Zi=q;function e(L){var f=this;this.next=null,this.entry=null,this.finish=function(){ne(f,L)}}var r;q.WritableState=D;var t={deprecate:jf()},n=kf(),u=_t.Buffer,a=(typeof _e!="undefined"?_e:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function o(L){return u.from(L)}function i(L){return u.isBuffer(L)||L instanceof a}var c=Ff(),h=Mf(),p=h.getHighWaterMark,_=mt().codes,y=_.ERR_INVALID_ARG_TYPE,v=_.ERR_METHOD_NOT_IMPLEMENTED,A=_.ERR_MULTIPLE_CALLBACK,R=_.ERR_STREAM_CANNOT_PIPE,S=_.ERR_STREAM_DESTROYED,g=_.ERR_STREAM_NULL_VALUES,m=_.ERR_STREAM_WRITE_AFTER_END,C=_.ERR_UNKNOWN_ENCODING,x=c.errorOrDestroy;Pe()(q,n);function k(){}function D(L,f,s){r=r||Ut(),L=L||{},typeof s!="boolean"&&(s=f instanceof r),this.objectMode=!!L.objectMode,s&&(this.objectMode=this.objectMode||!!L.writableObjectMode),this.highWaterMark=p(this,L,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var I=L.decodeStrings===!1;this.decodeStrings=!I,this.defaultEncoding=L.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(T){ue(f,T)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=L.emitClose!==!1,this.autoDestroy=!!L.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new e(this)}D.prototype.getBuffer=function(){for(var f=this.bufferedRequest,s=[];f;)s.push(f),f=f.next;return s},(function(){try{Object.defineProperty(D.prototype,"buffer",{get:t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(L){}})();var U;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(U=Function.prototype[Symbol.hasInstance],Object.defineProperty(q,Symbol.hasInstance,{value:function(f){return U.call(this,f)?!0:this!==q?!1:f&&f._writableState instanceof D}})):U=function(f){return f instanceof this};function q(L){r=r||Ut();var f=this instanceof r;if(!f&&!U.call(q,this))return new q(L);this._writableState=new D(L,this,f),this.writable=!0,L&&(typeof L.write=="function"&&(this._write=L.write),typeof L.writev=="function"&&(this._writev=L.writev),typeof L.destroy=="function"&&(this._destroy=L.destroy),typeof L.final=="function"&&(this._final=L.final)),n.call(this)}q.prototype.pipe=function(){x(this,new R)};function O(L,f){var s=new m;x(L,s),setTimeout(f,s)}function Y(L,f,s,I){var T;return s===null?T=new g:typeof s!="string"&&!f.objectMode&&(T=new y("chunk",["string","Buffer"],s)),T?(x(L,T),setTimeout(I,T),!1):!0}q.prototype.write=function(L,f,s){var I=this._writableState,T=!1,E=!I.objectMode&&i(L);return E&&!u.isBuffer(L)&&(L=o(L)),typeof f=="function"&&(s=f,f=null),E?f="buffer":f||(f=I.defaultEncoding),typeof s!="function"&&(s=k),I.ending?O(this,s):(E||Y(this,I,L,s))&&(I.pendingcb++,T=K(this,I,E,L,f,s)),T},q.prototype.cork=function(){this._writableState.corked++},q.prototype.uncork=function(){var L=this._writableState;L.corked&&(L.corked--,!L.writing&&!L.corked&&!L.bufferProcessing&&L.bufferedRequest&&Z(this,L))},q.prototype.setDefaultEncoding=function(f){if(typeof f=="string"&&(f=f.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((f+"").toLowerCase())>-1))throw new C(f);return this._writableState.defaultEncoding=f,this},Object.defineProperty(q.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function V(L,f,s){return!L.objectMode&&L.decodeStrings!==!1&&typeof f=="string"&&(f=u.from(f,s)),f}Object.defineProperty(q.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function K(L,f,s,I,T,E){if(!s){var w=V(f,I,T);I!==w&&(s=!0,T="buffer",I=w)}var M=f.objectMode?1:I.length;f.length+=M;var X=f.length<f.highWaterMark;if(X||(f.needDrain=!0),f.writing||f.corked){var ie=f.lastBufferedRequest;f.lastBufferedRequest={chunk:I,encoding:T,isBuf:s,callback:E,next:null},ie?ie.next=f.lastBufferedRequest:f.bufferedRequest=f.lastBufferedRequest,f.bufferedRequestCount+=1}else ae(L,f,!1,M,I,T,E);return X}function ae(L,f,s,I,T,E,w){f.writelen=I,f.writecb=w,f.writing=!0,f.sync=!0,f.destroyed?f.onwrite(new S("write")):s?L._writev(T,f.onwrite):L._write(T,E,f.onwrite),f.sync=!1}function re(L,f,s,I,T){--f.pendingcb,s?(setTimeout(T,I),setTimeout(G,L,f),L._writableState.errorEmitted=!0,x(L,I)):(T(I),L._writableState.errorEmitted=!0,x(L,I),G(L,f))}function fe(L){L.writing=!1,L.writecb=null,L.length-=L.writelen,L.writelen=0}function ue(L,f){var s=L._writableState,I=s.sync,T=s.writecb;if(typeof T!="function")throw new A;if(fe(s),f)re(L,s,I,f,T);else{var E=J(s)||L.destroyed;!E&&!s.corked&&!s.bufferProcessing&&s.bufferedRequest&&Z(L,s),I?setTimeout(F,L,s,E,T):F(L,s,E,T)}}function F(L,f,s,I){s||j(L,f),f.pendingcb--,I(),G(L,f)}function j(L,f){f.length===0&&f.needDrain&&(f.needDrain=!1,L.emit("drain"))}function Z(L,f){f.bufferProcessing=!0;var s=f.bufferedRequest;if(L._writev&&s&&s.next){var I=f.bufferedRequestCount,T=new Array(I),E=f.corkedRequestsFree;E.entry=s;for(var w=0,M=!0;s;)T[w]=s,s.isBuf||(M=!1),s=s.next,w+=1;T.allBuffers=M,ae(L,f,!0,f.length,T,"",E.finish),f.pendingcb++,f.lastBufferedRequest=null,E.next?(f.corkedRequestsFree=E.next,E.next=null):f.corkedRequestsFree=new e(f),f.bufferedRequestCount=0}else{for(;s;){var X=s.chunk,ie=s.encoding,Q=s.callback,te=f.objectMode?1:X.length;if(ae(L,f,!1,te,X,ie,Q),s=s.next,f.bufferedRequestCount--,f.writing)break}s===null&&(f.lastBufferedRequest=null)}f.bufferedRequest=s,f.bufferProcessing=!1}q.prototype._write=function(L,f,s){s(new v("_write()"))},q.prototype._writev=null,q.prototype.end=function(L,f,s){var I=this._writableState;return typeof L=="function"?(s=L,L=null,f=null):typeof f=="function"&&(s=f,f=null),L!=null&&this.write(L,f),I.corked&&(I.corked=1,this.uncork()),I.ending||ee(this,I,s),this},Object.defineProperty(q.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function J(L){return L.ending&&L.length===0&&L.bufferedRequest===null&&!L.finished&&!L.writing}function B(L,f){L._final(function(s){f.pendingcb--,s&&x(L,s),f.prefinished=!0,L.emit("prefinish"),G(L,f)})}function $(L,f){!f.prefinished&&!f.finalCalled&&(typeof L._final=="function"&&!f.destroyed?(f.pendingcb++,f.finalCalled=!0,setTimeout(B,L,f)):(f.prefinished=!0,L.emit("prefinish")))}function G(L,f){var s=J(f);if(s&&($(L,f),f.pendingcb===0&&(f.finished=!0,L.emit("finish"),f.autoDestroy))){var I=L._readableState;(!I||I.autoDestroy&&I.endEmitted)&&L.destroy()}return s}function ee(L,f,s){f.ending=!0,G(L,f),s&&(f.finished?setTimeout(s):L.once("finish",s)),f.ended=!0,L.writable=!1}function ne(L,f,s){var I=L.entry;for(L.entry=null;I;){var T=I.callback;f.pendingcb--,T(s),I=I.next}f.corkedRequestsFree.next=L}return Object.defineProperty(q.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(f){this._writableState&&(this._writableState.destroyed=f)}}),q.prototype.destroy=c.destroy,q.prototype._undestroy=c.undestroy,q.prototype._destroy=function(L,f){f(L)},Zi}var Vi,zf;function Ut(){if(zf)return Vi;zf=1;var e=Object.keys||function(h){var p=[];for(var _ in h)p.push(_);return p};Vi=o;var r=Yf(),t=qf();Pe()(o,r);for(var n=e(t.prototype),u=0;u<n.length;u++){var a=n[u];o.prototype[a]||(o.prototype[a]=t.prototype[a])}function o(h){if(!(this instanceof o))return new o(h);r.call(this,h),t.call(this,h),this.allowHalfOpen=!0,h&&(h.readable===!1&&(this.readable=!1),h.writable===!1&&(this.writable=!1),h.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",i)))}Object.defineProperty(o.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(o.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(o.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function i(){this._writableState.ended||setTimeout(c,this)}function c(h){h.end()}return Object.defineProperty(o.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(p){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=p,this._writableState.destroyed=p)}}),Vi}var Xi={},sr={},gd={get exports(){return sr},set exports(e){sr=e}},Wf;function Ur(){return Wf||(Wf=1,(function(e,r){var t=_t,n=t.Buffer;function u(o,i){for(var c in o)i[c]=o[c]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=t:(u(t,r),r.Buffer=a);function a(o,i,c){return n(o,i,c)}u(n,a),a.from=function(o,i,c){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,i,c)},a.alloc=function(o,i,c){if(typeof o!="number")throw new TypeError("Argument must be a number");var h=n(o);return i!==void 0?typeof c=="string"?h.fill(i,c):h.fill(i):h.fill(0),h},a.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},a.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(o)}})(gd,sr)),sr}var Hf;function ur(){if(Hf)return Xi;Hf=1;var e=Ur().Buffer,r=e.isEncoding||function(g){switch(g=""+g,g&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function t(g){if(!g)return"utf8";for(var m;;)switch(g){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return g;default:if(m)return;g=(""+g).toLowerCase(),m=!0}}function n(g){var m=t(g);if(typeof m!="string"&&(e.isEncoding===r||!r(g)))throw new Error("Unknown encoding: "+g);return m||g}Xi.StringDecoder=u;function u(g){this.encoding=n(g);var m;switch(this.encoding){case"utf16le":this.text=_,this.end=y,m=4;break;case"utf8":this.fillLast=c,m=4;break;case"base64":this.text=v,this.end=A,m=3;break;default:this.write=R,this.end=S;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(m)}u.prototype.write=function(g){if(g.length===0)return"";var m,C;if(this.lastNeed){if(m=this.fillLast(g),m===void 0)return"";C=this.lastNeed,this.lastNeed=0}else C=0;return C<g.length?m?m+this.text(g,C):this.text(g,C):m||""},u.prototype.end=p,u.prototype.text=h,u.prototype.fillLast=function(g){if(this.lastNeed<=g.length)return g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,this.lastTotal-this.lastNeed,0,g.length),this.lastNeed-=g.length};function a(g){return g<=127?0:g>>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function o(g,m,C){var x=m.length-1;if(x<C)return 0;var k=a(m[x]);return k>=0?(k>0&&(g.lastNeed=k-1),k):--x<C||k===-2?0:(k=a(m[x]),k>=0?(k>0&&(g.lastNeed=k-2),k):--x<C||k===-2?0:(k=a(m[x]),k>=0?(k>0&&(k===2?k=0:g.lastNeed=k-3),k):0))}function i(g,m,C){if((m[0]&192)!==128)return g.lastNeed=0,"\uFFFD";if(g.lastNeed>1&&m.length>1){if((m[1]&192)!==128)return g.lastNeed=1,"\uFFFD";if(g.lastNeed>2&&m.length>2&&(m[2]&192)!==128)return g.lastNeed=2,"\uFFFD"}}function c(g){var m=this.lastTotal-this.lastNeed,C=i(this,g);if(C!==void 0)return C;if(this.lastNeed<=g.length)return g.copy(this.lastChar,m,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,m,0,g.length),this.lastNeed-=g.length}function h(g,m){var C=o(this,g,m);if(!this.lastNeed)return g.toString("utf8",m);this.lastTotal=C;var x=g.length-(C-this.lastNeed);return g.copy(this.lastChar,0,x),g.toString("utf8",m,x)}function p(g){var m=g&&g.length?this.write(g):"";return this.lastNeed?m+"\uFFFD":m}function _(g,m){if((g.length-m)%2===0){var C=g.toString("utf16le",m);if(C){var x=C.charCodeAt(C.length-1);if(x>=55296&&x<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],C.slice(0,-1)}return C}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",m,g.length-1)}function y(g){var m=g&&g.length?this.write(g):"";if(this.lastNeed){var C=this.lastTotal-this.lastNeed;return m+this.lastChar.toString("utf16le",0,C)}return m}function v(g,m){var C=(g.length-m)%3;return C===0?g.toString("base64",m):(this.lastNeed=3-C,this.lastTotal=3,C===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",m,g.length-C))}function A(g){var m=g&&g.length?this.write(g):"";return this.lastNeed?m+this.lastChar.toString("base64",0,3-this.lastNeed):m}function R(g){return g.toString(this.encoding)}function S(g){return g&&g.length?this.write(g):""}return Xi}var Yi,Gf;function Ki(){if(Gf)return Yi;Gf=1;var e=mt().codes.ERR_STREAM_PREMATURE_CLOSE;function r(a){var o=!1;return function(){if(!o){o=!0;for(var i=arguments.length,c=new Array(i),h=0;h<i;h++)c[h]=arguments[h];a.apply(this,c)}}}function t(){}function n(a){return a.setHeader&&typeof a.abort=="function"}function u(a,o,i){if(typeof o=="function")return u(a,null,o);o||(o={}),i=r(i||t);var c=o.readable||o.readable!==!1&&a.readable,h=o.writable||o.writable!==!1&&a.writable,p=function(){a.writable||y()},_=a._writableState&&a._writableState.finished,y=function(){h=!1,_=!0,c||i.call(a)},v=a._readableState&&a._readableState.endEmitted,A=function(){c=!1,v=!0,h||i.call(a)},R=function(C){i.call(a,C)},S=function(){var C;if(c&&!v)return(!a._readableState||!a._readableState.ended)&&(C=new e),i.call(a,C);if(h&&!_)return(!a._writableState||!a._writableState.ended)&&(C=new e),i.call(a,C)},g=function(){a.req.on("finish",y)};return n(a)?(a.on("complete",y),a.on("abort",S),a.req?g():a.on("request",g)):h&&!a._writableState&&(a.on("end",p),a.on("close",p)),a.on("end",A),a.on("finish",y),o.error!==!1&&a.on("error",R),a.on("close",S),function(){a.removeListener("complete",y),a.removeListener("abort",S),a.removeListener("request",g),a.req&&a.req.removeListener("finish",y),a.removeListener("end",p),a.removeListener("close",p),a.removeListener("finish",y),a.removeListener("end",A),a.removeListener("error",R),a.removeListener("close",S)}}return Yi=u,Yi}var Ji,Zf;function vd(){if(Zf)return Ji;Zf=1;var e;function r(C,x,k){return x=t(x),x in C?Object.defineProperty(C,x,{value:k,enumerable:!0,configurable:!0,writable:!0}):C[x]=k,C}function t(C){var x=n(C,"string");return typeof x=="symbol"?x:String(x)}function n(C,x){if(typeof C!="object"||C===null)return C;var k=C[Symbol.toPrimitive];if(k!==void 0){var D=k.call(C,x||"default");if(typeof D!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(C)}var u=Ki(),a=Symbol("lastResolve"),o=Symbol("lastReject"),i=Symbol("error"),c=Symbol("ended"),h=Symbol("lastPromise"),p=Symbol("handlePromise"),_=Symbol("stream");function y(C,x){return{value:C,done:x}}function v(C){var x=C[a];if(x!==null){var k=C[_].read();k!==null&&(C[h]=null,C[a]=null,C[o]=null,x(y(k,!1)))}}function A(C){setTimeout(v,C)}function R(C,x){return function(k,D){C.then(function(){if(x[c]){k(y(void 0,!0));return}x[p](k,D)},D)}}var S=Object.getPrototypeOf(function(){}),g=Object.setPrototypeOf((e={get stream(){return this[_]},next:function(){var x=this,k=this[i];if(k!==null)return Promise.reject(k);if(this[c])return Promise.resolve(y(void 0,!0));if(this[_].destroyed)return new Promise(function(O,Y){setTimeout(function(){x[i]?Y(x[i]):O(y(void 0,!0))})});var D=this[h],U;if(D)U=new Promise(R(D,this));else{var q=this[_].read();if(q!==null)return Promise.resolve(y(q,!1));U=new Promise(this[p])}return this[h]=U,U}},r(e,Symbol.asyncIterator,function(){return this}),r(e,"return",function(){var x=this;return new Promise(function(k,D){x[_].destroy(null,function(U){if(U){D(U);return}k(y(void 0,!0))})})}),e),S),m=function(x){var k,D=Object.create(g,(k={},r(k,_,{value:x,writable:!0}),r(k,a,{value:null,writable:!0}),r(k,o,{value:null,writable:!0}),r(k,i,{value:null,writable:!0}),r(k,c,{value:x._readableState.endEmitted,writable:!0}),r(k,p,{value:function(q,O){var Y=D[_].read();Y?(D[h]=null,D[a]=null,D[o]=null,q(y(Y,!1))):(D[a]=q,D[o]=O)},writable:!0}),k));return D[h]=null,u(x,function(U){if(U&&U.code!=="ERR_STREAM_PREMATURE_CLOSE"){var q=D[o];q!==null&&(D[h]=null,D[a]=null,D[o]=null,q(U)),D[i]=U;return}var O=D[a];O!==null&&(D[h]=null,D[a]=null,D[o]=null,O(y(void 0,!0))),D[c]=!0}),x.on("readable",A.bind(null,D)),D};return Ji=m,Ji}var Qi,Vf;function _d(){if(Vf)return Qi;Vf=1;function e(h,p,_,y,v,A,R){try{var S=h[A](R),g=S.value}catch(m){_(m);return}S.done?p(g):Promise.resolve(g).then(y,v)}function r(h){return function(){var p=this,_=arguments;return new Promise(function(y,v){var A=h.apply(p,_);function R(g){e(A,y,v,R,S,"next",g)}function S(g){e(A,y,v,R,S,"throw",g)}R(void 0)})}}function t(h,p){var _=Object.keys(h);if(Object.getOwnPropertySymbols){var y=Object.getOwnPropertySymbols(h);p&&(y=y.filter(function(v){return Object.getOwnPropertyDescriptor(h,v).enumerable})),_.push.apply(_,y)}return _}function n(h){for(var p=1;p<arguments.length;p++){var _=arguments[p]!=null?arguments[p]:{};p%2?t(Object(_),!0).forEach(function(y){u(h,y,_[y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(_)):t(Object(_)).forEach(function(y){Object.defineProperty(h,y,Object.getOwnPropertyDescriptor(_,y))})}return h}function u(h,p,_){return p=a(p),p in h?Object.defineProperty(h,p,{value:_,enumerable:!0,configurable:!0,writable:!0}):h[p]=_,h}function a(h){var p=o(h,"string");return typeof p=="symbol"?p:String(p)}function o(h,p){if(typeof h!="object"||h===null)return h;var _=h[Symbol.toPrimitive];if(_!==void 0){var y=_.call(h,p||"default");if(typeof y!="object")return y;throw new TypeError("@@toPrimitive must return a primitive value.")}return(p==="string"?String:Number)(h)}var i=mt().codes.ERR_INVALID_ARG_TYPE;function c(h,p,_){var y;if(p&&typeof p.next=="function")y=p;else if(p&&p[Symbol.asyncIterator])y=p[Symbol.asyncIterator]();else if(p&&p[Symbol.iterator])y=p[Symbol.iterator]();else throw new i("iterable",["Iterable"],p);var v=new h(n({objectMode:!0},_)),A=!1;v._read=function(){A||(A=!0,R())};function R(){return S.apply(this,arguments)}function S(){return S=r(function*(){try{var g=yield y.next(),m=g.value,C=g.done;C?v.push(null):v.push(yield m)?R():A=!1}catch(x){v.destroy(x)}}),S.apply(this,arguments)}return v}return Qi=c,Qi}var ea,Xf;function Yf(){if(Xf)return ea;Xf=1,ea=O;var e;O.ReadableState=q,Ln().EventEmitter;var r=function(w,M){return w.listeners(M).length},t=kf(),n=_t.Buffer,u=(typeof _e!="undefined"?_e:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function a(E){return n.from(E)}function o(E){return n.isBuffer(E)||E instanceof u}var i=Mt(),c;i&&i.debuglog?c=i.debuglog("stream"):c=function(){};var h=yd(),p=Ff(),_=Mf(),y=_.getHighWaterMark,v=mt().codes,A=v.ERR_INVALID_ARG_TYPE,R=v.ERR_STREAM_PUSH_AFTER_EOF,S=v.ERR_METHOD_NOT_IMPLEMENTED,g=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,m,C,x;Pe()(O,t);var k=p.errorOrDestroy,D=["error","close","destroy","pause","resume"];function U(E,w,M){if(typeof E.prependListener=="function")return E.prependListener(w,M);!E._events||!E._events[w]?E.on(w,M):Array.isArray(E._events[w])?E._events[w].unshift(M):E._events[w]=[M,E._events[w]]}function q(E,w,M){e=e||Ut(),E=E||{},typeof M!="boolean"&&(M=w instanceof e),this.objectMode=!!E.objectMode,M&&(this.objectMode=this.objectMode||!!E.readableObjectMode),this.highWaterMark=y(this,E,"readableHighWaterMark",M),this.buffer=new h,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=E.emitClose!==!1,this.autoDestroy=!!E.autoDestroy,this.destroyed=!1,this.defaultEncoding=E.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,E.encoding&&(m||(m=ur().StringDecoder),this.decoder=new m(E.encoding),this.encoding=E.encoding)}function O(E){if(e=e||Ut(),!(this instanceof O))return new O(E);var w=this instanceof e;this._readableState=new q(E,this,w),this.readable=!0,E&&(typeof E.read=="function"&&(this._read=E.read),typeof E.destroy=="function"&&(this._destroy=E.destroy)),t.call(this)}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(w){this._readableState&&(this._readableState.destroyed=w)}}),O.prototype.destroy=p.destroy,O.prototype._undestroy=p.undestroy,O.prototype._destroy=function(E,w){w(E)},O.prototype.push=function(E,w){var M=this._readableState,X;return M.objectMode?X=!0:typeof E=="string"&&(w=w||M.defaultEncoding,w!==M.encoding&&(E=n.from(E,w),w=""),X=!0),Y(this,E,w,!1,X)},O.prototype.unshift=function(E){return Y(this,E,null,!0,!1)};function Y(E,w,M,X,ie){c("readableAddChunk",w);var Q=E._readableState;if(w===null)Q.reading=!1,ue(E,Q);else{var te;if(ie||(te=K(Q,w)),te)k(E,te);else if(Q.objectMode||w&&w.length>0)if(typeof w!="string"&&!Q.objectMode&&Object.getPrototypeOf(w)!==n.prototype&&(w=a(w)),X)Q.endEmitted?k(E,new g):V(E,Q,w,!0);else if(Q.ended)k(E,new R);else{if(Q.destroyed)return!1;Q.reading=!1,Q.decoder&&!M?(w=Q.decoder.write(w),Q.objectMode||w.length!==0?V(E,Q,w,!1):Z(E,Q)):V(E,Q,w,!1)}else X||(Q.reading=!1,Z(E,Q))}return!Q.ended&&(Q.length<Q.highWaterMark||Q.length===0)}function V(E,w,M,X){w.flowing&&w.length===0&&!w.sync?(w.awaitDrain=0,E.emit("data",M)):(w.length+=w.objectMode?1:M.length,X?w.buffer.unshift(M):w.buffer.push(M),w.needReadable&&F(E)),Z(E,w)}function K(E,w){var M;return!o(w)&&typeof w!="string"&&w!==void 0&&!E.objectMode&&(M=new A("chunk",["string","Buffer","Uint8Array"],w)),M}O.prototype.isPaused=function(){return this._readableState.flowing===!1},O.prototype.setEncoding=function(E){m||(m=ur().StringDecoder);var w=new m(E);this._readableState.decoder=w,this._readableState.encoding=this._readableState.decoder.encoding;for(var M=this._readableState.buffer.head,X="";M!==null;)X+=w.write(M.data),M=M.next;return this._readableState.buffer.clear(),X!==""&&this._readableState.buffer.push(X),this._readableState.length=X.length,this};var ae=1073741824;function re(E){return E>=ae?E=ae:(E--,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E++),E}function fe(E,w){return E<=0||w.length===0&&w.ended?0:w.objectMode?1:E!==E?w.flowing&&w.length?w.buffer.head.data.length:w.length:(E>w.highWaterMark&&(w.highWaterMark=re(E)),E<=w.length?E:w.ended?w.length:(w.needReadable=!0,0))}O.prototype.read=function(E){c("read",E),E=parseInt(E,10);var w=this._readableState,M=E;if(E!==0&&(w.emittedReadable=!1),E===0&&w.needReadable&&((w.highWaterMark!==0?w.length>=w.highWaterMark:w.length>0)||w.ended))return c("read: emitReadable",w.length,w.ended),w.length===0&&w.ended?s(this):F(this),null;if(E=fe(E,w),E===0&&w.ended)return w.length===0&&s(this),null;var X=w.needReadable;c("need readable",X),(w.length===0||w.length-E<w.highWaterMark)&&(X=!0,c("length less than watermark",X)),w.ended||w.reading?(X=!1,c("reading or ended",X)):X&&(c("do read"),w.reading=!0,w.sync=!0,w.length===0&&(w.needReadable=!0),this._read(w.highWaterMark),w.sync=!1,w.reading||(E=fe(M,w)));var ie;return E>0?ie=f(E,w):ie=null,ie===null?(w.needReadable=w.length<=w.highWaterMark,E=0):(w.length-=E,w.awaitDrain=0),w.length===0&&(w.ended||(w.needReadable=!0),M!==E&&w.ended&&s(this)),ie!==null&&this.emit("data",ie),ie};function ue(E,w){if(c("onEofChunk"),!w.ended){if(w.decoder){var M=w.decoder.end();M&&M.length&&(w.buffer.push(M),w.length+=w.objectMode?1:M.length)}w.ended=!0,w.sync?F(E):(w.needReadable=!1,w.emittedReadable||(w.emittedReadable=!0,j(E)))}}function F(E){var w=E._readableState;c("emitReadable",w.needReadable,w.emittedReadable),w.needReadable=!1,w.emittedReadable||(c("emitReadable",w.flowing),w.emittedReadable=!0,setTimeout(j,E))}function j(E){var w=E._readableState;c("emitReadable_",w.destroyed,w.length,w.ended),!w.destroyed&&(w.length||w.ended)&&(E.emit("readable"),w.emittedReadable=!1),w.needReadable=!w.flowing&&!w.ended&&w.length<=w.highWaterMark,L(E)}function Z(E,w){w.readingMore||(w.readingMore=!0,setTimeout(J,E,w))}function J(E,w){for(;!w.reading&&!w.ended&&(w.length<w.highWaterMark||w.flowing&&w.length===0);){var M=w.length;if(c("maybeReadMore read 0"),E.read(0),M===w.length)break}w.readingMore=!1}O.prototype._read=function(E){k(this,new S("_read()"))},O.prototype.pipe=function(E,w){var M=this,X=this._readableState;switch(X.pipesCount){case 0:X.pipes=E;break;case 1:X.pipes=[X.pipes,E];break;default:X.pipes.push(E);break}X.pipesCount+=1,c("pipe count=%d opts=%j",X.pipesCount,w);var ie=(!w||w.end!==!1)&&E!==null&&E!==null,Q=ie?ce:vt;X.endEmitted?setTimeout(Q):M.once("end",Q),E.on("unpipe",te);function te(b,l){c("onunpipe"),b===M&&l&&l.hasUnpiped===!1&&(l.hasUnpiped=!0,pe())}function ce(){c("onend"),E.end()}var W=B(M);E.on("drain",W);var Se=!1;function pe(){c("cleanup"),E.removeListener("close",Ie),E.removeListener("finish",Re),E.removeListener("drain",W),E.removeListener("error",Ae),E.removeListener("unpipe",te),M.removeListener("end",ce),M.removeListener("end",vt),M.removeListener("data",ye),Se=!0,X.awaitDrain&&(!E._writableState||E._writableState.needDrain)&&W()}M.on("data",ye);function ye(b){c("ondata");var l=E.write(b);c("dest.write",l),l===!1&&((X.pipesCount===1&&X.pipes===E||X.pipesCount>1&&T(X.pipes,E)!==-1)&&!Se&&(c("false write response, pause",X.awaitDrain),X.awaitDrain++),M.pause())}function Ae(b){c("onerror",b),vt(),E.removeListener("error",Ae),r(E,"error")===0&&k(E,b)}U(E,"error",Ae);function Ie(){E.removeListener("finish",Re),vt()}E.once("close",Ie);function Re(){c("onfinish"),E.removeListener("close",Ie),vt()}E.once("finish",Re);function vt(){c("unpipe"),M.unpipe(E)}return E.emit("pipe",M),X.flowing||(c("pipe resume"),M.resume()),E};function B(E){return function(){var M=E._readableState;c("pipeOnDrain",M.awaitDrain),M.awaitDrain&&M.awaitDrain--,M.awaitDrain===0&&r(E,"data")&&(M.flowing=!0,L(E))}}O.prototype.unpipe=function(E){var w=this._readableState,M={hasUnpiped:!1};if(w.pipesCount===0)return this;if(w.pipesCount===1)return E&&E!==w.pipes?this:(E||(E=w.pipes),w.pipes=null,w.pipesCount=0,w.flowing=!1,E&&E.emit("unpipe",this,M),this);if(!E){var X=w.pipes,ie=w.pipesCount;w.pipes=null,w.pipesCount=0,w.flowing=!1;for(var Q=0;Q<ie;Q++)X[Q].emit("unpipe",this,{hasUnpiped:!1});return this}var te=T(w.pipes,E);return te===-1?this:(w.pipes.splice(te,1),w.pipesCount-=1,w.pipesCount===1&&(w.pipes=w.pipes[0]),E.emit("unpipe",this,M),this)},O.prototype.on=function(E,w){var M=t.prototype.on.call(this,E,w),X=this._readableState;return E==="data"?(X.readableListening=this.listenerCount("readable")>0,X.flowing!==!1&&this.resume()):E==="readable"&&!X.endEmitted&&!X.readableListening&&(X.readableListening=X.needReadable=!0,X.flowing=!1,X.emittedReadable=!1,c("on readable",X.length,X.reading),X.length?F(this):X.reading||setTimeout(G,this)),M},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(E,w){var M=t.prototype.removeListener.call(this,E,w);return E==="readable"&&setTimeout($,this),M},O.prototype.removeAllListeners=function(E){var w=t.prototype.removeAllListeners.apply(this,arguments);return(E==="readable"||E===void 0)&&setTimeout($,this),w};function $(E){var w=E._readableState;w.readableListening=E.listenerCount("readable")>0,w.resumeScheduled&&!w.paused?w.flowing=!0:E.listenerCount("data")>0&&E.resume()}function G(E){c("readable nexttick read 0"),E.read(0)}O.prototype.resume=function(){var E=this._readableState;return E.flowing||(c("resume"),E.flowing=!E.readableListening,ee(this,E)),E.paused=!1,this};function ee(E,w){w.resumeScheduled||(w.resumeScheduled=!0,setTimeout(ne,E,w))}function ne(E,w){c("resume",w.reading),w.reading||E.read(0),w.resumeScheduled=!1,E.emit("resume"),L(E),w.flowing&&!w.reading&&E.read(0)}O.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function L(E){var w=E._readableState;for(c("flow",w.flowing);w.flowing&&E.read()!==null;);}O.prototype.wrap=function(E){var w=this,M=this._readableState,X=!1;E.on("end",function(){if(c("wrapped end"),M.decoder&&!M.ended){var te=M.decoder.end();te&&te.length&&w.push(te)}w.push(null)}),E.on("data",function(te){if(c("wrapped data"),M.decoder&&(te=M.decoder.write(te)),!(M.objectMode&&te==null)&&!(!M.objectMode&&(!te||!te.length))){var ce=w.push(te);ce||(X=!0,E.pause())}});for(var ie in E)this[ie]===void 0&&typeof E[ie]=="function"&&(this[ie]=(function(ce){return function(){return E[ce].apply(E,arguments)}})(ie));for(var Q=0;Q<D.length;Q++)E.on(D[Q],this.emit.bind(this,D[Q]));return this._read=function(te){c("wrapped _read",te),X&&(X=!1,E.resume())},this},typeof Symbol=="function"&&(O.prototype[Symbol.asyncIterator]=function(){return C===void 0&&(C=vd()),C(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(w){this._readableState&&(this._readableState.flowing=w)}}),O._fromList=f,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function f(E,w){if(w.length===0)return null;var M;return w.objectMode?M=w.buffer.shift():!E||E>=w.length?(w.decoder?M=w.buffer.join(""):w.buffer.length===1?M=w.buffer.first():M=w.buffer.concat(w.length),w.buffer.clear()):M=w.buffer.consume(E,w.decoder),M}function s(E){var w=E._readableState;c("endReadable",w.endEmitted),w.endEmitted||(w.ended=!0,setTimeout(I,w,E))}function I(E,w){if(c("endReadableNT",E.endEmitted,E.length),!E.endEmitted&&E.length===0&&(E.endEmitted=!0,w.readable=!1,w.emit("end"),E.autoDestroy)){var M=w._writableState;(!M||M.autoDestroy&&M.finished)&&w.destroy()}}typeof Symbol=="function"&&(O.from=function(E,w){return x===void 0&&(x=_d()),x(O,E,w)});function T(E,w){for(var M=0,X=E.length;M<X;M++)if(E[M]===w)return M;return-1}return ea}var ta,Kf;function Jf(){if(Kf)return ta;Kf=1,ta=i;var e=mt().codes,r=e.ERR_METHOD_NOT_IMPLEMENTED,t=e.ERR_MULTIPLE_CALLBACK,n=e.ERR_TRANSFORM_ALREADY_TRANSFORMING,u=e.ERR_TRANSFORM_WITH_LENGTH_0,a=Ut();Pe()(i,a);function o(p,_){var y=this._transformState;y.transforming=!1;var v=y.writecb;if(v===null)return this.emit("error",new t);y.writechunk=null,y.writecb=null,_!=null&&this.push(_),v(p);var A=this._readableState;A.reading=!1,(A.needReadable||A.length<A.highWaterMark)&&this._read(A.highWaterMark)}function i(p){if(!(this instanceof i))return new i(p);a.call(this,p),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,p&&(typeof p.transform=="function"&&(this._transform=p.transform),typeof p.flush=="function"&&(this._flush=p.flush)),this.on("prefinish",c)}function c(){var p=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(_,y){h(p,_,y)}):h(this,null,null)}i.prototype.push=function(p,_){return this._transformState.needTransform=!1,a.prototype.push.call(this,p,_)},i.prototype._transform=function(p,_,y){y(new r("_transform()"))},i.prototype._write=function(p,_,y){var v=this._transformState;if(v.writecb=y,v.writechunk=p,v.writeencoding=_,!v.transforming){var A=this._readableState;(v.needTransform||A.needReadable||A.length<A.highWaterMark)&&this._read(A.highWaterMark)}},i.prototype._read=function(p){var _=this._transformState;_.writechunk!==null&&!_.transforming?(_.transforming=!0,this._transform(_.writechunk,_.writeencoding,_.afterTransform)):_.needTransform=!0},i.prototype._destroy=function(p,_){a.prototype._destroy.call(this,p,function(y){_(y)})};function h(p,_,y){if(_)return p.emit("error",_);if(y!=null&&p.push(y),p._writableState.length)throw new u;if(p._transformState.transforming)throw new n;return p.push(null)}return ta}var ra,Qf;function md(){if(Qf)return ra;Qf=1,ra=r;var e=Jf();Pe()(r,e);function r(t){if(!(this instanceof r))return new r(t);e.call(this,t)}return r.prototype._transform=function(t,n,u){u(null,t)},ra}var na,es;function bd(){if(es)return na;es=1;var e;function r(y){var v=!1;return function(){v||(v=!0,y.apply(void 0,arguments))}}var t=mt().codes,n=t.ERR_MISSING_ARGS,u=t.ERR_STREAM_DESTROYED;function a(y){if(y)throw y}function o(y){return y.setHeader&&typeof y.abort=="function"}function i(y,v,A,R){R=r(R);var S=!1;y.on("close",function(){S=!0}),e===void 0&&(e=Ki()),e(y,{readable:v,writable:A},function(m){if(m)return R(m);S=!0,R()});var g=!1;return function(m){if(!S&&!g){if(g=!0,o(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();R(m||new u("pipe"))}}}function c(y){y()}function h(y,v){return y.pipe(v)}function p(y){return!y.length||typeof y[y.length-1]!="function"?a:y.pop()}function _(){for(var y=arguments.length,v=new Array(y),A=0;A<y;A++)v[A]=arguments[A];var R=p(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new n("streams");var S,g=v.map(function(m,C){var x=C<v.length-1,k=C>0;return i(m,x,k,function(D){S||(S=D),D&&g.forEach(c),!x&&(g.forEach(c),R(S))})});return v.reduce(h)}return na=_,na}var ia,ts;function jr(){if(ts)return ia;ts=1,ia=t;var e=Ln().EventEmitter,r=Pe();r(t,e),t.Readable=Yf(),t.Writable=qf(),t.Duplex=Ut(),t.Transform=Jf(),t.PassThrough=md(),t.finished=Ki(),t.pipeline=bd(),t.Stream=t;function t(){e.call(this)}return t.prototype.pipe=function(n,u){var a=this;function o(v){n.writable&&n.write(v)===!1&&a.pause&&a.pause()}a.on("data",o);function i(){a.readable&&a.resume&&a.resume()}n.on("drain",i),!n._isStdio&&(!u||u.end!==!1)&&(a.on("end",h),a.on("close",p));var c=!1;function h(){c||(c=!0,n.end())}function p(){c||(c=!0,typeof n.destroy=="function"&&n.destroy())}function _(v){if(y(),e.listenerCount(this,"error")===0)throw v}a.on("error",_),n.on("error",_);function y(){a.removeListener("data",o),n.removeListener("drain",i),a.removeListener("end",h),a.removeListener("close",p),a.removeListener("error",_),n.removeListener("error",_),a.removeListener("end",y),a.removeListener("close",y),n.removeListener("close",y)}return a.on("end",y),a.on("close",y),n.on("close",y),n.emit("pipe",a),n},ia}var $r={},wd={get exports(){return $r},set exports(e){$r=e}},rs;function qr(){if(rs)return $r;rs=1,wd.exports={nextTick:e};function e(r,t,n,u){if(typeof r!="function")throw new TypeError('"callback" argument must be a function');var a=arguments.length,o,i;switch(a){case 0:case 1:return setTimeout(r);case 2:return setTimeout(function(){r.call(null,t)});case 3:return setTimeout(function(){r.call(null,t,n)});case 4:return setTimeout(function(){r.call(null,t,n,u)});default:for(o=new Array(a-1),i=0;i<o.length;)o[i++]=arguments[i];return setTimeout(function(){r.apply(null,o)})}}return $r}var aa,ns;function Ed(){if(ns)return aa;ns=1;var e={}.toString;return aa=Array.isArray||function(r){return e.call(r)=="[object Array]"},aa}var zr={},Sd={get exports(){return zr},set exports(e){zr=e}},is;function as(){return is||(is=1,(function(e){e.exports=jr()})(Sd)),zr}var Oe={},os;function lr(){if(os)return Oe;os=1;function e(R){return Array.isArray?Array.isArray(R):A(R)==="[object Array]"}Oe.isArray=e;function r(R){return typeof R=="boolean"}Oe.isBoolean=r;function t(R){return R===null}Oe.isNull=t;function n(R){return R==null}Oe.isNullOrUndefined=n;function u(R){return typeof R=="number"}Oe.isNumber=u;function a(R){return typeof R=="string"}Oe.isString=a;function o(R){return typeof R=="symbol"}Oe.isSymbol=o;function i(R){return R===void 0}Oe.isUndefined=i;function c(R){return A(R)==="[object RegExp]"}Oe.isRegExp=c;function h(R){return typeof R=="object"&&R!==null}Oe.isObject=h;function p(R){return A(R)==="[object Date]"}Oe.isDate=p;function _(R){return A(R)==="[object Error]"||R instanceof Error}Oe.isError=_;function y(R){return typeof R=="function"}Oe.isFunction=y;function v(R){return R===null||typeof R=="boolean"||typeof R=="number"||typeof R=="string"||typeof R=="symbol"||typeof R=="undefined"}Oe.isPrimitive=v,Oe.isBuffer=_t.Buffer.isBuffer;function A(R){return Object.prototype.toString.call(R)}return Oe}var Wr={},xd={get exports(){return Wr},set exports(e){Wr=e}},fs;function Td(){return fs||(fs=1,(function(e){function r(a,o){if(!(a instanceof o))throw new TypeError("Cannot call a class as a function")}var t=Ur().Buffer,n=Mt();function u(a,o,i){a.copy(o,i)}e.exports=(function(){function a(){r(this,a),this.head=null,this.tail=null,this.length=0}return a.prototype.push=function(i){var c={data:i,next:null};this.length>0?this.tail.next=c:this.head=c,this.tail=c,++this.length},a.prototype.unshift=function(i){var c={data:i,next:this.head};this.length===0&&(this.tail=c),this.head=c,++this.length},a.prototype.shift=function(){if(this.length!==0){var i=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,i}},a.prototype.clear=function(){this.head=this.tail=null,this.length=0},a.prototype.join=function(i){if(this.length===0)return"";for(var c=this.head,h=""+c.data;c=c.next;)h+=i+c.data;return h},a.prototype.concat=function(i){if(this.length===0)return t.alloc(0);for(var c=t.allocUnsafe(i>>>0),h=this.head,p=0;h;)u(h.data,c,p),p+=h.data.length,h=h.next;return c},a})(),n&&n.inspect&&n.inspect.custom&&(e.exports.prototype[n.inspect.custom]=function(){var a=n.inspect({length:this.length});return this.constructor.name+" "+a})})(xd)),Wr}var oa,ss;function us(){if(ss)return oa;ss=1;var e=qr();function r(u,a){var o=this,i=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return i||c?(a?a(u):u&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(n,this,u)):e.nextTick(n,this,u)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(u||null,function(h){!a&&h?o._writableState?o._writableState.errorEmitted||(o._writableState.errorEmitted=!0,e.nextTick(n,o,h)):e.nextTick(n,o,h):a&&a(h)}),this)}function t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function n(u,a){u.emit("error",a)}return oa={destroy:r,undestroy:t},oa}var fa,ls;function cs(){if(ls)return fa;ls=1;var e=qr();fa=R;function r(F){var j=this;this.next=null,this.entry=null,this.finish=function(){ue(j,F)}}var t=e.nextTick,n;R.WritableState=v;var u=Object.create(lr());u.inherits=Pe();var a={deprecate:jf()},o=as(),i=Ur().Buffer,c=(typeof _e!="undefined"?_e:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function h(F){return i.from(F)}function p(F){return i.isBuffer(F)||F instanceof c}var _=us();u.inherits(R,o);function y(){}function v(F,j){n=n||jt(),F=F||{};var Z=j instanceof n;this.objectMode=!!F.objectMode,Z&&(this.objectMode=this.objectMode||!!F.writableObjectMode);var J=F.highWaterMark,B=F.writableHighWaterMark,$=this.objectMode?16:16*1024;J||J===0?this.highWaterMark=J:Z&&(B||B===0)?this.highWaterMark=B:this.highWaterMark=$,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var G=F.decodeStrings===!1;this.decodeStrings=!G,this.defaultEncoding=F.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(ee){U(j,ee)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}v.prototype.getBuffer=function(){for(var j=this.bufferedRequest,Z=[];j;)Z.push(j),j=j.next;return Z},(function(){try{Object.defineProperty(v.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(F){}})();var A;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(R,Symbol.hasInstance,{value:function(F){return A.call(this,F)?!0:this!==R?!1:F&&F._writableState instanceof v}})):A=function(F){return F instanceof this};function R(F){if(n=n||jt(),!A.call(R,this)&&!(this instanceof n))return new R(F);this._writableState=new v(F,this),this.writable=!0,F&&(typeof F.write=="function"&&(this._write=F.write),typeof F.writev=="function"&&(this._writev=F.writev),typeof F.destroy=="function"&&(this._destroy=F.destroy),typeof F.final=="function"&&(this._final=F.final)),o.call(this)}R.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function S(F,j){var Z=new Error("write after end");F.emit("error",Z),e.nextTick(j,Z)}function g(F,j,Z,J){var B=!0,$=!1;return Z===null?$=new TypeError("May not write null values to stream"):typeof Z!="string"&&Z!==void 0&&!j.objectMode&&($=new TypeError("Invalid non-string/buffer chunk")),$&&(F.emit("error",$),e.nextTick(J,$),B=!1),B}R.prototype.write=function(F,j,Z){var J=this._writableState,B=!1,$=!J.objectMode&&p(F);return $&&!i.isBuffer(F)&&(F=h(F)),typeof j=="function"&&(Z=j,j=null),$?j="buffer":j||(j=J.defaultEncoding),typeof Z!="function"&&(Z=y),J.ended?S(this,Z):($||g(this,J,F,Z))&&(J.pendingcb++,B=C(this,J,$,F,j,Z)),B},R.prototype.cork=function(){var F=this._writableState;F.corked++},R.prototype.uncork=function(){var F=this._writableState;F.corked&&(F.corked--,!F.writing&&!F.corked&&!F.bufferProcessing&&F.bufferedRequest&&Y(this,F))},R.prototype.setDefaultEncoding=function(j){if(typeof j=="string"&&(j=j.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((j+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+j);return this._writableState.defaultEncoding=j,this};function m(F,j,Z){return!F.objectMode&&F.decodeStrings!==!1&&typeof j=="string"&&(j=i.from(j,Z)),j}Object.defineProperty(R.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function C(F,j,Z,J,B,$){if(!Z){var G=m(j,J,B);J!==G&&(Z=!0,B="buffer",J=G)}var ee=j.objectMode?1:J.length;j.length+=ee;var ne=j.length<j.highWaterMark;if(ne||(j.needDrain=!0),j.writing||j.corked){var L=j.lastBufferedRequest;j.lastBufferedRequest={chunk:J,encoding:B,isBuf:Z,callback:$,next:null},L?L.next=j.lastBufferedRequest:j.bufferedRequest=j.lastBufferedRequest,j.bufferedRequestCount+=1}else x(F,j,!1,ee,J,B,$);return ne}function x(F,j,Z,J,B,$,G){j.writelen=J,j.writecb=G,j.writing=!0,j.sync=!0,Z?F._writev(B,j.onwrite):F._write(B,$,j.onwrite),j.sync=!1}function k(F,j,Z,J,B){--j.pendingcb,Z?(e.nextTick(B,J),e.nextTick(re,F,j),F._writableState.errorEmitted=!0,F.emit("error",J)):(B(J),F._writableState.errorEmitted=!0,F.emit("error",J),re(F,j))}function D(F){F.writing=!1,F.writecb=null,F.length-=F.writelen,F.writelen=0}function U(F,j){var Z=F._writableState,J=Z.sync,B=Z.writecb;if(D(Z),j)k(F,Z,J,j,B);else{var $=V(Z);!$&&!Z.corked&&!Z.bufferProcessing&&Z.bufferedRequest&&Y(F,Z),J?t(q,F,Z,$,B):q(F,Z,$,B)}}function q(F,j,Z,J){Z||O(F,j),j.pendingcb--,J(),re(F,j)}function O(F,j){j.length===0&&j.needDrain&&(j.needDrain=!1,F.emit("drain"))}function Y(F,j){j.bufferProcessing=!0;var Z=j.bufferedRequest;if(F._writev&&Z&&Z.next){var J=j.bufferedRequestCount,B=new Array(J),$=j.corkedRequestsFree;$.entry=Z;for(var G=0,ee=!0;Z;)B[G]=Z,Z.isBuf||(ee=!1),Z=Z.next,G+=1;B.allBuffers=ee,x(F,j,!0,j.length,B,"",$.finish),j.pendingcb++,j.lastBufferedRequest=null,$.next?(j.corkedRequestsFree=$.next,$.next=null):j.corkedRequestsFree=new r(j),j.bufferedRequestCount=0}else{for(;Z;){var ne=Z.chunk,L=Z.encoding,f=Z.callback,s=j.objectMode?1:ne.length;if(x(F,j,!1,s,ne,L,f),Z=Z.next,j.bufferedRequestCount--,j.writing)break}Z===null&&(j.lastBufferedRequest=null)}j.bufferedRequest=Z,j.bufferProcessing=!1}R.prototype._write=function(F,j,Z){Z(new Error("_write() is not implemented"))},R.prototype._writev=null,R.prototype.end=function(F,j,Z){var J=this._writableState;typeof F=="function"?(Z=F,F=null,j=null):typeof j=="function"&&(Z=j,j=null),F!=null&&this.write(F,j),J.corked&&(J.corked=1,this.uncork()),J.ending||fe(this,J,Z)};function V(F){return F.ending&&F.length===0&&F.bufferedRequest===null&&!F.finished&&!F.writing}function K(F,j){F._final(function(Z){j.pendingcb--,Z&&F.emit("error",Z),j.prefinished=!0,F.emit("prefinish"),re(F,j)})}function ae(F,j){!j.prefinished&&!j.finalCalled&&(typeof F._final=="function"?(j.pendingcb++,j.finalCalled=!0,e.nextTick(K,F,j)):(j.prefinished=!0,F.emit("prefinish")))}function re(F,j){var Z=V(j);return Z&&(ae(F,j),j.pendingcb===0&&(j.finished=!0,F.emit("finish"))),Z}function fe(F,j,Z){j.ending=!0,re(F,j),Z&&(j.finished?e.nextTick(Z):F.once("finish",Z)),j.ended=!0,F.writable=!1}function ue(F,j,Z){var J=F.entry;for(F.entry=null;J;){var B=J.callback;j.pendingcb--,B(Z),J=J.next}j.corkedRequestsFree.next=F}return Object.defineProperty(R.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(F){this._writableState&&(this._writableState.destroyed=F)}}),R.prototype.destroy=_.destroy,R.prototype._undestroy=_.undestroy,R.prototype._destroy=function(F,j){this.end(),j(F)},fa}var sa,ds;function jt(){if(ds)return sa;ds=1;var e=qr(),r=Object.keys||function(_){var y=[];for(var v in _)y.push(v);return y};sa=c;var t=Object.create(lr());t.inherits=Pe();var n=ps(),u=cs();t.inherits(c,n);for(var a=r(u.prototype),o=0;o<a.length;o++){var i=a[o];c.prototype[i]||(c.prototype[i]=u.prototype[i])}function c(_){if(!(this instanceof c))return new c(_);n.call(this,_),u.call(this,_),_&&_.readable===!1&&(this.readable=!1),_&&_.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,_&&_.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",h)}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function h(){this.allowHalfOpen||this._writableState.ended||e.nextTick(p,this)}function p(_){_.end()}return Object.defineProperty(c.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(_){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=_,this._writableState.destroyed=_)}}),c.prototype._destroy=function(_,y){this.push(null),this.end(),e.nextTick(y,_)},sa}var ua,hs;function ps(){if(hs)return ua;hs=1;var e=qr();ua=m;var r=Ed(),t;m.ReadableState=g,Ln().EventEmitter;var n=function(f,s){return f.listeners(s).length},u=as(),a=Ur().Buffer,o=(typeof _e!="undefined"?_e:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function i(f){return a.from(f)}function c(f){return a.isBuffer(f)||f instanceof o}var h=Object.create(lr());h.inherits=Pe();var p=Mt(),_=void 0;p&&p.debuglog?_=p.debuglog("stream"):_=function(){};var y=Td(),v=us(),A;h.inherits(m,u);var R=["error","close","destroy","pause","resume"];function S(f,s,I){if(typeof f.prependListener=="function")return f.prependListener(s,I);!f._events||!f._events[s]?f.on(s,I):r(f._events[s])?f._events[s].unshift(I):f._events[s]=[I,f._events[s]]}function g(f,s){t=t||jt(),f=f||{};var I=s instanceof t;this.objectMode=!!f.objectMode,I&&(this.objectMode=this.objectMode||!!f.readableObjectMode);var T=f.highWaterMark,E=f.readableHighWaterMark,w=this.objectMode?16:16*1024;T||T===0?this.highWaterMark=T:I&&(E||E===0)?this.highWaterMark=E:this.highWaterMark=w,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new y,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=f.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,f.encoding&&(A||(A=ur().StringDecoder),this.decoder=new A(f.encoding),this.encoding=f.encoding)}function m(f){if(t=t||jt(),!(this instanceof m))return new m(f);this._readableState=new g(f,this),this.readable=!0,f&&(typeof f.read=="function"&&(this._read=f.read),typeof f.destroy=="function"&&(this._destroy=f.destroy)),u.call(this)}Object.defineProperty(m.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(f){this._readableState&&(this._readableState.destroyed=f)}}),m.prototype.destroy=v.destroy,m.prototype._undestroy=v.undestroy,m.prototype._destroy=function(f,s){this.push(null),s(f)},m.prototype.push=function(f,s){var I=this._readableState,T;return I.objectMode?T=!0:typeof f=="string"&&(s=s||I.defaultEncoding,s!==I.encoding&&(f=a.from(f,s),s=""),T=!0),C(this,f,s,!1,T)},m.prototype.unshift=function(f){return C(this,f,null,!0,!1)};function C(f,s,I,T,E){var w=f._readableState;if(s===null)w.reading=!1,Y(f,w);else{var M;E||(M=k(w,s)),M?f.emit("error",M):w.objectMode||s&&s.length>0?(typeof s!="string"&&!w.objectMode&&Object.getPrototypeOf(s)!==a.prototype&&(s=i(s)),T?w.endEmitted?f.emit("error",new Error("stream.unshift() after end event")):x(f,w,s,!0):w.ended?f.emit("error",new Error("stream.push() after EOF")):(w.reading=!1,w.decoder&&!I?(s=w.decoder.write(s),w.objectMode||s.length!==0?x(f,w,s,!1):ae(f,w)):x(f,w,s,!1))):T||(w.reading=!1)}return D(w)}function x(f,s,I,T){s.flowing&&s.length===0&&!s.sync?(f.emit("data",I),f.read(0)):(s.length+=s.objectMode?1:I.length,T?s.buffer.unshift(I):s.buffer.push(I),s.needReadable&&V(f)),ae(f,s)}function k(f,s){var I;return!c(s)&&typeof s!="string"&&s!==void 0&&!f.objectMode&&(I=new TypeError("Invalid non-string/buffer chunk")),I}function D(f){return!f.ended&&(f.needReadable||f.length<f.highWaterMark||f.length===0)}m.prototype.isPaused=function(){return this._readableState.flowing===!1},m.prototype.setEncoding=function(f){return A||(A=ur().StringDecoder),this._readableState.decoder=new A(f),this._readableState.encoding=f,this};var U=8388608;function q(f){return f>=U?f=U:(f--,f|=f>>>1,f|=f>>>2,f|=f>>>4,f|=f>>>8,f|=f>>>16,f++),f}function O(f,s){return f<=0||s.length===0&&s.ended?0:s.objectMode?1:f!==f?s.flowing&&s.length?s.buffer.head.data.length:s.length:(f>s.highWaterMark&&(s.highWaterMark=q(f)),f<=s.length?f:s.ended?s.length:(s.needReadable=!0,0))}m.prototype.read=function(f){_("read",f),f=parseInt(f,10);var s=this._readableState,I=f;if(f!==0&&(s.emittedReadable=!1),f===0&&s.needReadable&&(s.length>=s.highWaterMark||s.ended))return _("read: emitReadable",s.length,s.ended),s.length===0&&s.ended?ee(this):V(this),null;if(f=O(f,s),f===0&&s.ended)return s.length===0&&ee(this),null;var T=s.needReadable;_("need readable",T),(s.length===0||s.length-f<s.highWaterMark)&&(T=!0,_("length less than watermark",T)),s.ended||s.reading?(T=!1,_("reading or ended",T)):T&&(_("do read"),s.reading=!0,s.sync=!0,s.length===0&&(s.needReadable=!0),this._read(s.highWaterMark),s.sync=!1,s.reading||(f=O(I,s)));var E;return f>0?E=J(f,s):E=null,E===null?(s.needReadable=!0,f=0):s.length-=f,s.length===0&&(s.ended||(s.needReadable=!0),I!==f&&s.ended&&ee(this)),E!==null&&this.emit("data",E),E};function Y(f,s){if(!s.ended){if(s.decoder){var I=s.decoder.end();I&&I.length&&(s.buffer.push(I),s.length+=s.objectMode?1:I.length)}s.ended=!0,V(f)}}function V(f){var s=f._readableState;s.needReadable=!1,s.emittedReadable||(_("emitReadable",s.flowing),s.emittedReadable=!0,s.sync?e.nextTick(K,f):K(f))}function K(f){_("emit readable"),f.emit("readable"),Z(f)}function ae(f,s){s.readingMore||(s.readingMore=!0,e.nextTick(re,f,s))}function re(f,s){for(var I=s.length;!s.reading&&!s.flowing&&!s.ended&&s.length<s.highWaterMark&&(_("maybeReadMore read 0"),f.read(0),I!==s.length);)I=s.length;s.readingMore=!1}m.prototype._read=function(f){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(f,s){var I=this,T=this._readableState;switch(T.pipesCount){case 0:T.pipes=f;break;case 1:T.pipes=[T.pipes,f];break;default:T.pipes.push(f);break}T.pipesCount+=1,_("pipe count=%d opts=%j",T.pipesCount,s);var E=(!s||s.end!==!1)&&f!==null&&f!==null,w=E?X:Ae;T.endEmitted?e.nextTick(w):I.once("end",w),f.on("unpipe",M);function M(Ie,Re){_("onunpipe"),Ie===I&&Re&&Re.hasUnpiped===!1&&(Re.hasUnpiped=!0,te())}function X(){_("onend"),f.end()}var ie=fe(I);f.on("drain",ie);var Q=!1;function te(){_("cleanup"),f.removeListener("close",pe),f.removeListener("finish",ye),f.removeListener("drain",ie),f.removeListener("error",Se),f.removeListener("unpipe",M),I.removeListener("end",X),I.removeListener("end",Ae),I.removeListener("data",W),Q=!0,T.awaitDrain&&(!f._writableState||f._writableState.needDrain)&&ie()}var ce=!1;I.on("data",W);function W(Ie){_("ondata"),ce=!1;var Re=f.write(Ie);Re===!1&&!ce&&((T.pipesCount===1&&T.pipes===f||T.pipesCount>1&&L(T.pipes,f)!==-1)&&!Q&&(_("false write response, pause",T.awaitDrain),T.awaitDrain++,ce=!0),I.pause())}function Se(Ie){_("onerror",Ie),Ae(),f.removeListener("error",Se),n(f,"error")===0&&f.emit("error",Ie)}S(f,"error",Se);function pe(){f.removeListener("finish",ye),Ae()}f.once("close",pe);function ye(){_("onfinish"),f.removeListener("close",pe),Ae()}f.once("finish",ye);function Ae(){_("unpipe"),I.unpipe(f)}return f.emit("pipe",I),T.flowing||(_("pipe resume"),I.resume()),f};function fe(f){return function(){var s=f._readableState;_("pipeOnDrain",s.awaitDrain),s.awaitDrain&&s.awaitDrain--,s.awaitDrain===0&&n(f,"data")&&(s.flowing=!0,Z(f))}}m.prototype.unpipe=function(f){var s=this._readableState,I={hasUnpiped:!1};if(s.pipesCount===0)return this;if(s.pipesCount===1)return f&&f!==s.pipes?this:(f||(f=s.pipes),s.pipes=null,s.pipesCount=0,s.flowing=!1,f&&f.emit("unpipe",this,I),this);if(!f){var T=s.pipes,E=s.pipesCount;s.pipes=null,s.pipesCount=0,s.flowing=!1;for(var w=0;w<E;w++)T[w].emit("unpipe",this,{hasUnpiped:!1});return this}var M=L(s.pipes,f);return M===-1?this:(s.pipes.splice(M,1),s.pipesCount-=1,s.pipesCount===1&&(s.pipes=s.pipes[0]),f.emit("unpipe",this,I),this)},m.prototype.on=function(f,s){var I=u.prototype.on.call(this,f,s);if(f==="data")this._readableState.flowing!==!1&&this.resume();else if(f==="readable"){var T=this._readableState;!T.endEmitted&&!T.readableListening&&(T.readableListening=T.needReadable=!0,T.emittedReadable=!1,T.reading?T.length&&V(this):e.nextTick(ue,this))}return I},m.prototype.addListener=m.prototype.on;function ue(f){_("readable nexttick read 0"),f.read(0)}m.prototype.resume=function(){var f=this._readableState;return f.flowing||(_("resume"),f.flowing=!0,F(this,f)),this};function F(f,s){s.resumeScheduled||(s.resumeScheduled=!0,e.nextTick(j,f,s))}function j(f,s){s.reading||(_("resume read 0"),f.read(0)),s.resumeScheduled=!1,s.awaitDrain=0,f.emit("resume"),Z(f),s.flowing&&!s.reading&&f.read(0)}m.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function Z(f){var s=f._readableState;for(_("flow",s.flowing);s.flowing&&f.read()!==null;);}m.prototype.wrap=function(f){var s=this,I=this._readableState,T=!1;f.on("end",function(){if(_("wrapped end"),I.decoder&&!I.ended){var M=I.decoder.end();M&&M.length&&s.push(M)}s.push(null)}),f.on("data",function(M){if(_("wrapped data"),I.decoder&&(M=I.decoder.write(M)),!(I.objectMode&&M==null)&&!(!I.objectMode&&(!M||!M.length))){var X=s.push(M);X||(T=!0,f.pause())}});for(var E in f)this[E]===void 0&&typeof f[E]=="function"&&(this[E]=(function(M){return function(){return f[M].apply(f,arguments)}})(E));for(var w=0;w<R.length;w++)f.on(R[w],this.emit.bind(this,R[w]));return this._read=function(M){_("wrapped _read",M),T&&(T=!1,f.resume())},this},Object.defineProperty(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),m._fromList=J;function J(f,s){if(s.length===0)return null;var I;return s.objectMode?I=s.buffer.shift():!f||f>=s.length?(s.decoder?I=s.buffer.join(""):s.buffer.length===1?I=s.buffer.head.data:I=s.buffer.concat(s.length),s.buffer.clear()):I=B(f,s.buffer,s.decoder),I}function B(f,s,I){var T;return f<s.head.data.length?(T=s.head.data.slice(0,f),s.head.data=s.head.data.slice(f)):f===s.head.data.length?T=s.shift():T=I?$(f,s):G(f,s),T}function $(f,s){var I=s.head,T=1,E=I.data;for(f-=E.length;I=I.next;){var w=I.data,M=f>w.length?w.length:f;if(M===w.length?E+=w:E+=w.slice(0,f),f-=M,f===0){M===w.length?(++T,I.next?s.head=I.next:s.head=s.tail=null):(s.head=I,I.data=w.slice(M));break}++T}return s.length-=T,E}function G(f,s){var I=a.allocUnsafe(f),T=s.head,E=1;for(T.data.copy(I),f-=T.data.length;T=T.next;){var w=T.data,M=f>w.length?w.length:f;if(w.copy(I,I.length-f,0,M),f-=M,f===0){M===w.length?(++E,T.next?s.head=T.next:s.head=s.tail=null):(s.head=T,T.data=w.slice(M));break}++E}return s.length-=E,I}function ee(f){var s=f._readableState;if(s.length>0)throw new Error('"endReadable()" called on non-empty stream');s.endEmitted||(s.ended=!0,e.nextTick(ne,s,f))}function ne(f,s){!f.endEmitted&&f.length===0&&(f.endEmitted=!0,s.readable=!1,s.emit("end"))}function L(f,s){for(var I=0,T=f.length;I<T;I++)if(f[I]===s)return I;return-1}return ua}var la,ys;function gs(){if(ys)return la;ys=1,la=n;var e=jt(),r=Object.create(lr());r.inherits=Pe(),r.inherits(n,e);function t(o,i){var c=this._transformState;c.transforming=!1;var h=c.writecb;if(!h)return this.emit("error",new Error("write callback called multiple times"));c.writechunk=null,c.writecb=null,i!=null&&this.push(i),h(o);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function n(o){if(!(this instanceof n))return new n(o);e.call(this,o),this._transformState={afterTransform:t.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,o&&(typeof o.transform=="function"&&(this._transform=o.transform),typeof o.flush=="function"&&(this._flush=o.flush)),this.on("prefinish",u)}function u(){var o=this;typeof this._flush=="function"?this._flush(function(i,c){a(o,i,c)}):a(this,null,null)}n.prototype.push=function(o,i){return this._transformState.needTransform=!1,e.prototype.push.call(this,o,i)},n.prototype._transform=function(o,i,c){throw new Error("_transform() is not implemented")},n.prototype._write=function(o,i,c){var h=this._transformState;if(h.writecb=c,h.writechunk=o,h.writeencoding=i,!h.transforming){var p=this._readableState;(h.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},n.prototype._read=function(o){var i=this._transformState;i.writechunk!==null&&i.writecb&&!i.transforming?(i.transforming=!0,this._transform(i.writechunk,i.writeencoding,i.afterTransform)):i.needTransform=!0},n.prototype._destroy=function(o,i){var c=this;e.prototype._destroy.call(this,o,function(h){i(h),c.emit("close")})};function a(o,i,c){if(i)return o.emit("error",i);if(c!=null&&o.push(c),o._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(o._transformState.transforming)throw new Error("Calling transform done when still transforming");return o.push(null)}return la}var ca,vs;function Ad(){if(vs)return ca;vs=1,ca=t;var e=gs(),r=Object.create(lr());r.inherits=Pe(),r.inherits(t,e);function t(n){if(!(this instanceof t))return new t(n);e.call(this,n)}return t.prototype._transform=function(n,u,a){a(null,n)},ca}var _s;function ms(){return _s||(_s=1,(function(e,r){var t=jr();r=e.exports=ps(),r.Stream=t||r,r.Readable=r,r.Writable=cs(),r.Duplex=jt(),r.Transform=gs(),r.PassThrough=Ad()})(Ic,nr)),nr}var bs,Hr;if(xe.base64=!0,xe.array=!0,xe.string=!0,xe.arraybuffer=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined",xe.nodebuffer=typeof Buffer!="undefined",xe.uint8array=typeof Uint8Array!="undefined",typeof ArrayBuffer=="undefined")Hr=xe.blob=!1;else{var ws=new ArrayBuffer(0);try{Hr=xe.blob=new Blob([ws],{type:"application/zip"}).size===0}catch(e){try{var Rd=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,Es=new Rd;Es.append(ws),Hr=xe.blob=Es.getBlob("application/zip").size===0}catch(r){Hr=xe.blob=!1}}}try{bs=xe.nodestream=!!ms().Readable}catch(e){bs=xe.nodestream=!1}var Gr={},Ss;function xs(){if(Ss)return Gr;Ss=1;var e=we(),r=xe,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return Gr.encode=function(n){for(var u=[],a,o,i,c,h,p,_,y=0,v=n.length,A=v,R=e.getTypeOf(n)!=="string";y<n.length;)A=v-y,R?(a=n[y++],o=y<v?n[y++]:0,i=y<v?n[y++]:0):(a=n.charCodeAt(y++),o=y<v?n.charCodeAt(y++):0,i=y<v?n.charCodeAt(y++):0),c=a>>2,h=(a&3)<<4|o>>4,p=A>1?(o&15)<<2|i>>6:64,_=A>2?i&63:64,u.push(t.charAt(c)+t.charAt(h)+t.charAt(p)+t.charAt(_));return u.join("")},Gr.decode=function(n){var u,a,o,i,c,h,p,_=0,y=0,v="data:";if(n.substr(0,v.length)===v)throw new Error("Invalid base64 input, it looks like a data url.");n=n.replace(/[^A-Za-z0-9+/=]/g,"");var A=n.length*3/4;if(n.charAt(n.length-1)===t.charAt(64)&&A--,n.charAt(n.length-2)===t.charAt(64)&&A--,A%1!==0)throw new Error("Invalid base64 input, bad content length.");var R;for(r.uint8array?R=new Uint8Array(A|0):R=new Array(A|0);_<n.length;)i=t.indexOf(n.charAt(_++)),c=t.indexOf(n.charAt(_++)),h=t.indexOf(n.charAt(_++)),p=t.indexOf(n.charAt(_++)),u=i<<2|c>>4,a=(c&15)<<4|h>>2,o=(h&3)<<6|p,R[y++]=u,h!==64&&(R[y++]=a),p!==64&&(R[y++]=o);return R},Gr}var Zr={isNode:typeof Buffer!="undefined",newBufferFrom:function(e,r){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,r);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,r)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var r=new Buffer(e);return r.fill(0),r},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}},da,Ts;function Id(){if(Ts)return da;Ts=1;var e=_e.MutationObserver||_e.WebKitMutationObserver,r;if(e){var t=0,n=new e(c),u=_e.document.createTextNode("");n.observe(u,{characterData:!0}),r=function(){u.data=t=++t%2}}else if(!_e.setImmediate&&typeof _e.MessageChannel!="undefined"){var a=new _e.MessageChannel;a.port1.onmessage=c,r=function(){a.port2.postMessage(0)}}else"document"in _e&&"onreadystatechange"in _e.document.createElement("script")?r=function(){var p=_e.document.createElement("script");p.onreadystatechange=function(){c(),p.onreadystatechange=null,p.parentNode.removeChild(p),p=null},_e.document.documentElement.appendChild(p)}:r=function(){setTimeout(c,0)};var o,i=[];function c(){o=!0;for(var p,_,y=i.length;y;){for(_=i,i=[],p=-1;++p<y;)_[p]();y=i.length}o=!1}da=h;function h(p){i.push(p)===1&&!o&&r()}return da}var ha,As;function Od(){if(As)return ha;As=1;var e=Id();function r(){}var t={},n=["REJECTED"],u=["FULFILLED"],a=["PENDING"];ha=o;function o(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=a,this.queue=[],this.outcome=void 0,S!==r&&p(this,S)}o.prototype.finally=function(S){if(typeof S!="function")return this;var g=this.constructor;return this.then(m,C);function m(x){function k(){return x}return g.resolve(S()).then(k)}function C(x){function k(){throw x}return g.resolve(S()).then(k)}},o.prototype.catch=function(S){return this.then(null,S)},o.prototype.then=function(S,g){if(typeof S!="function"&&this.state===u||typeof g!="function"&&this.state===n)return this;var m=new this.constructor(r);if(this.state!==a){var C=this.state===u?S:g;c(m,C,this.outcome)}else this.queue.push(new i(m,S,g));return m};function i(S,g,m){this.promise=S,typeof g=="function"&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),typeof m=="function"&&(this.onRejected=m,this.callRejected=this.otherCallRejected)}i.prototype.callFulfilled=function(S){t.resolve(this.promise,S)},i.prototype.otherCallFulfilled=function(S){c(this.promise,this.onFulfilled,S)},i.prototype.callRejected=function(S){t.reject(this.promise,S)},i.prototype.otherCallRejected=function(S){c(this.promise,this.onRejected,S)};function c(S,g,m){e(function(){var C;try{C=g(m)}catch(x){return t.reject(S,x)}C===S?t.reject(S,new TypeError("Cannot resolve promise with itself")):t.resolve(S,C)})}t.resolve=function(S,g){var m=_(h,g);if(m.status==="error")return t.reject(S,m.value);var C=m.value;if(C)p(S,C);else{S.state=u,S.outcome=g;for(var x=-1,k=S.queue.length;++x<k;)S.queue[x].callFulfilled(g)}return S},t.reject=function(S,g){S.state=n,S.outcome=g;for(var m=-1,C=S.queue.length;++m<C;)S.queue[m].callRejected(g);return S};function h(S){var g=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof g=="function")return function(){g.apply(S,arguments)}}function p(S,g){var m=!1;function C(U){m||(m=!0,t.reject(S,U))}function x(U){m||(m=!0,t.resolve(S,U))}function k(){g(x,C)}var D=_(k);D.status==="error"&&C(D.value)}function _(S,g){var m={};try{m.value=S(g),m.status="success"}catch(C){m.status="error",m.value=C}return m}o.resolve=y;function y(S){return S instanceof this?S:t.resolve(new this(r),S)}o.reject=v;function v(S){var g=new this(r);return t.reject(g,S)}o.all=A;function A(S){var g=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var m=S.length,C=!1;if(!m)return this.resolve([]);for(var x=new Array(m),k=0,D=-1,U=new this(r);++D<m;)q(S[D],D);return U;function q(O,Y){g.resolve(O).then(V,function(K){C||(C=!0,t.reject(U,K))});function V(K){x[Y]=K,++k===m&&!C&&(C=!0,t.resolve(U,x))}}}o.race=R;function R(S){var g=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var m=S.length,C=!1;if(!m)return this.resolve([]);for(var x=-1,k=new this(r);++x<m;)D(S[x]);return k;function D(U){g.resolve(U).then(function(q){C||(C=!0,t.resolve(k,q))},function(q){C||(C=!0,t.reject(k,q))})}}return ha}var pa=null;typeof Promise!="undefined"?pa=Promise:pa=Od();var cr={Promise:pa},Rs={},Is;function Nd(){return Is||(Is=1,(function(e,r){if(e.setImmediate)return;var t=1,n={},u=!1,a=e.document,o;function i(m){typeof m!="function"&&(m=new Function(""+m));for(var C=new Array(arguments.length-1),x=0;x<C.length;x++)C[x]=arguments[x+1];var k={callback:m,args:C};return n[t]=k,o(t),t++}function c(m){delete n[m]}function h(m){var C=m.callback,x=m.args;switch(x.length){case 0:C();break;case 1:C(x[0]);break;case 2:C(x[0],x[1]);break;case 3:C(x[0],x[1],x[2]);break;default:C.apply(r,x);break}}function p(m){if(u)setTimeout(p,0,m);else{var C=n[m];if(C){u=!0;try{h(C)}finally{c(m),u=!1}}}}function _(){o=function(m){setTimeout(function(){p(m)})}}function y(){if(e.postMessage&&!e.importScripts){var m=!0,C=e.onmessage;return e.onmessage=function(){m=!1},e.postMessage("","*"),e.onmessage=C,m}}function v(){var m="setImmediate$"+Math.random()+"$",C=function(x){x.source===e&&typeof x.data=="string"&&x.data.indexOf(m)===0&&p(+x.data.slice(m.length))};e.addEventListener?e.addEventListener("message",C,!1):e.attachEvent("onmessage",C),o=function(x){e.postMessage(m+x,"*")}}function A(){var m=new MessageChannel;m.port1.onmessage=function(C){var x=C.data;p(x)},o=function(C){m.port2.postMessage(C)}}function R(){var m=a.documentElement;o=function(C){var x=a.createElement("script");x.onreadystatechange=function(){p(C),x.onreadystatechange=null,m.removeChild(x),x=null},m.appendChild(x)}}function S(){o=function(m){setTimeout(p,0,m)}}var g=Object.getPrototypeOf&&Object.getPrototypeOf(e);g=g&&g.setTimeout?g:e,{}.toString.call(e.process)==="[object process]"?_():y()?v():e.MessageChannel?A():a&&"onreadystatechange"in a.createElement("script")?R():S(),g.setImmediate=i,g.clearImmediate=c})(typeof self=="undefined"?_e:self)),Rs}var Os;function we(){return Os||(Os=1,(function(e){var r=xe,t=xs(),n=Zr,u=cr;Nd();function a(y){var v=null;return r.uint8array?v=new Uint8Array(y.length):v=new Array(y.length),i(y,v)}e.newBlob=function(y,v){e.checkSupport("blob");try{return new Blob([y],{type:v})}catch(S){try{var A=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,R=new A;return R.append(y),R.getBlob(v)}catch(g){throw new Error("Bug : can't construct the Blob.")}}};function o(y){return y}function i(y,v){for(var A=0;A<y.length;++A)v[A]=y.charCodeAt(A)&255;return v}var c={stringifyByChunk:function(y,v,A){var R=[],S=0,g=y.length;if(g<=A)return String.fromCharCode.apply(null,y);for(;S<g;)v==="array"||v==="nodebuffer"?R.push(String.fromCharCode.apply(null,y.slice(S,Math.min(S+A,g)))):R.push(String.fromCharCode.apply(null,y.subarray(S,Math.min(S+A,g)))),S+=A;return R.join("")},stringifyByChar:function(y){for(var v="",A=0;A<y.length;A++)v+=String.fromCharCode(y[A]);return v},applyCanBeUsed:{uint8array:(function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(y){return!1}})(),nodebuffer:(function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,n.allocBuffer(1)).length===1}catch(y){return!1}})()}};function h(y){var v=65536,A=e.getTypeOf(y),R=!0;if(A==="uint8array"?R=c.applyCanBeUsed.uint8array:A==="nodebuffer"&&(R=c.applyCanBeUsed.nodebuffer),R)for(;v>1;)try{return c.stringifyByChunk(y,A,v)}catch(S){v=Math.floor(v/2)}return c.stringifyByChar(y)}e.applyFromCharCode=h;function p(y,v){for(var A=0;A<y.length;A++)v[A]=y[A];return v}var _={};_.string={string:o,array:function(y){return i(y,new Array(y.length))},arraybuffer:function(y){return _.string.uint8array(y).buffer},uint8array:function(y){return i(y,new Uint8Array(y.length))},nodebuffer:function(y){return i(y,n.allocBuffer(y.length))}},_.array={string:h,array:o,arraybuffer:function(y){return new Uint8Array(y).buffer},uint8array:function(y){return new Uint8Array(y)},nodebuffer:function(y){return n.newBufferFrom(y)}},_.arraybuffer={string:function(y){return h(new Uint8Array(y))},array:function(y){return p(new Uint8Array(y),new Array(y.byteLength))},arraybuffer:o,uint8array:function(y){return new Uint8Array(y)},nodebuffer:function(y){return n.newBufferFrom(new Uint8Array(y))}},_.uint8array={string:h,array:function(y){return p(y,new Array(y.length))},arraybuffer:function(y){return y.buffer},uint8array:o,nodebuffer:function(y){return n.newBufferFrom(y)}},_.nodebuffer={string:h,array:function(y){return p(y,new Array(y.length))},arraybuffer:function(y){return _.nodebuffer.uint8array(y).buffer},uint8array:function(y){return p(y,new Uint8Array(y.length))},nodebuffer:o},e.transformTo=function(y,v){if(v||(v=""),!y)return v;e.checkSupport(y);var A=e.getTypeOf(v),R=_[A][y](v);return R},e.resolve=function(y){for(var v=y.split("/"),A=[],R=0;R<v.length;R++){var S=v[R];S==="."||S===""&&R!==0&&R!==v.length-1||(S===".."?A.pop():A.push(S))}return A.join("/")},e.getTypeOf=function(y){if(typeof y=="string")return"string";var v=Object.prototype.toString.call(y);if(v==="[object Array]")return"array";if(r.nodebuffer&&n.isBuffer(y))return"nodebuffer";if(r.uint8array&&v==="[object Uint8Array]")return"uint8array";if(r.arraybuffer&&v==="[object ArrayBuffer]")return"arraybuffer"},e.checkSupport=function(y){var v=r[y.toLowerCase()];if(!v)throw new Error(y+" is not supported by this platform")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(y){var v="",A,R;for(R=0;R<(y||"").length;R++)A=y.charCodeAt(R),v+="\\x"+(A<16?"0":"")+A.toString(16).toUpperCase();return v},e.delay=function(y,v,A){setImmediate(function(){y.apply(A||null,v||[])})},e.inherits=function(y,v){var A=function(){};A.prototype=v.prototype,y.prototype=new A},e.extend=function(){var y={},v,A;for(v=0;v<arguments.length;v++)for(A in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],A)&&typeof y[A]=="undefined"&&(y[A]=arguments[v][A]);return y},e.prepareContent=function(y,v,A,R,S){var g=u.Promise.resolve(v).then(function(m){var C=r.blob&&(m instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(m))!==-1);return C?typeof Blob.prototype.arrayBuffer!="undefined"?m.arrayBuffer():typeof FileReader!="undefined"?new u.Promise(function(x,k){var D=new FileReader;D.onload=function(U){x(U.target.result)},D.onerror=function(U){k(U.target.error)},D.readAsArrayBuffer(m)}):u.Promise.reject(new Error(y+" is a Blob, but we have no way of reading it.")):m});return g.then(function(m){var C=e.getTypeOf(m);return C?(C==="arraybuffer"?m=e.transformTo("uint8array",m):C==="string"&&(S?m=t.decode(m):A&&R!==!0&&(m=a(m))),m):u.Promise.reject(new Error("Can't read the data of '"+y+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}})(Pn)),Pn}function Ns(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}Ns.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return this.isFinished?!1:(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,r){return this._listeners[e].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,r){if(this._listeners[e])for(var t=0;t<this._listeners[e].length;t++)this._listeners[e][t].call(this,r)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var r=this;return e.on("data",function(t){r.processChunk(t)}),e.on("end",function(){r.end()}),e.on("error",function(t){r.error(t)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,r){return this.extraStreamInfo[e]=r,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};var Le=Ns;(function(e){for(var r=we(),t=xe,n=Zr,u=Le,a=new Array(256),o=0;o<256;o++)a[o]=o>=252?6:o>=248?5:o>=240?4:o>=224?3:o>=192?2:1;a[254]=a[254]=1;var i=function(y){var v,A,R,S,g,m=y.length,C=0;for(S=0;S<m;S++)A=y.charCodeAt(S),(A&64512)===55296&&S+1<m&&(R=y.charCodeAt(S+1),(R&64512)===56320&&(A=65536+(A-55296<<10)+(R-56320),S++)),C+=A<128?1:A<2048?2:A<65536?3:4;for(t.uint8array?v=new Uint8Array(C):v=new Array(C),g=0,S=0;g<C;S++)A=y.charCodeAt(S),(A&64512)===55296&&S+1<m&&(R=y.charCodeAt(S+1),(R&64512)===56320&&(A=65536+(A-55296<<10)+(R-56320),S++)),A<128?v[g++]=A:A<2048?(v[g++]=192|A>>>6,v[g++]=128|A&63):A<65536?(v[g++]=224|A>>>12,v[g++]=128|A>>>6&63,v[g++]=128|A&63):(v[g++]=240|A>>>18,v[g++]=128|A>>>12&63,v[g++]=128|A>>>6&63,v[g++]=128|A&63);return v},c=function(y,v){var A;for(v=v||y.length,v>y.length&&(v=y.length),A=v-1;A>=0&&(y[A]&192)===128;)A--;return A<0||A===0?v:A+a[y[A]]>v?A:v},h=function(y){var v,A,R,S,g=y.length,m=new Array(g*2);for(A=0,v=0;v<g;){if(R=y[v++],R<128){m[A++]=R;continue}if(S=a[R],S>4){m[A++]=65533,v+=S-1;continue}for(R&=S===2?31:S===3?15:7;S>1&&v<g;)R=R<<6|y[v++]&63,S--;if(S>1){m[A++]=65533;continue}R<65536?m[A++]=R:(R-=65536,m[A++]=55296|R>>10&1023,m[A++]=56320|R&1023)}return m.length!==A&&(m.subarray?m=m.subarray(0,A):m.length=A),r.applyFromCharCode(m)};e.utf8encode=function(v){return t.nodebuffer?n.newBufferFrom(v,"utf-8"):i(v)},e.utf8decode=function(v){return t.nodebuffer?r.transformTo("nodebuffer",v).toString("utf-8"):(v=r.transformTo(t.uint8array?"uint8array":"array",v),h(v))};function p(){u.call(this,"utf-8 decode"),this.leftOver=null}r.inherits(p,u),p.prototype.processChunk=function(y){var v=r.transformTo(t.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(t.uint8array){var A=v;v=new Uint8Array(A.length+this.leftOver.length),v.set(this.leftOver,0),v.set(A,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var R=c(v),S=v;R!==v.length&&(t.uint8array?(S=v.subarray(0,R),this.leftOver=v.subarray(R,v.length)):(S=v.slice(0,R),this.leftOver=v.slice(R,v.length))),this.push({data:e.utf8decode(S),meta:y.meta})},p.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=p;function _(){u.call(this,"utf-8 encode")}r.inherits(_,u),_.prototype.processChunk=function(y){this.push({data:e.utf8encode(y.data),meta:y.meta})},e.Utf8EncodeWorker=_})(Pt);var Cs=Le,ks=we();function ya(e){Cs.call(this,"ConvertWorker to "+e),this.destType=e}ks.inherits(ya,Cs),ya.prototype.processChunk=function(e){this.push({data:ks.transformTo(this.destType,e.data),meta:e.meta})};var Cd=ya,ga,Bs;function kd(){if(Bs)return ga;Bs=1;var e=ms().Readable,r=we();r.inherits(t,e);function t(n,u,a){e.call(this,u),this._helper=n;var o=this;n.on("data",function(i,c){o.push(i)||o._helper.pause(),a&&a(c)}).on("error",function(i){o.emit("error",i)}).on("end",function(){o.push(null)})}return t.prototype._read=function(){this._helper.resume()},ga=t,ga}var bt=we(),Bd=Cd,Dd=Le,Fd=xs(),Pd=xe,Ld=cr,Ds=null;if(Pd.nodestream)try{Ds=kd()}catch(e){}function Md(e,r,t){switch(e){case"blob":return bt.newBlob(bt.transformTo("arraybuffer",r),t);case"base64":return Fd.encode(r);default:return bt.transformTo(e,r)}}function Ud(e,r){var t,n=0,u=null,a=0;for(t=0;t<r.length;t++)a+=r[t].length;switch(e){case"string":return r.join("");case"array":return Array.prototype.concat.apply([],r);case"uint8array":for(u=new Uint8Array(a),t=0;t<r.length;t++)u.set(r[t],n),n+=r[t].length;return u;case"nodebuffer":return Buffer.concat(r);default:throw new Error("concat : unsupported type '"+e+"'")}}function jd(e,r){return new Ld.Promise(function(t,n){var u=[],a=e._internalType,o=e._outputType,i=e._mimeType;e.on("data",function(c,h){u.push(c),r&&r(h)}).on("error",function(c){u=[],n(c)}).on("end",function(){try{var c=Md(o,Ud(a,u),i);t(c)}catch(h){n(h)}u=[]}).resume()})}function Fs(e,r,t){var n=r;switch(r){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string";break}try{this._internalType=n,this._outputType=r,this._mimeType=t,bt.checkSupport(n),this._worker=e.pipe(new Bd(n)),e.lock()}catch(u){this._worker=new Dd("error"),this._worker.error(u)}}Fs.prototype={accumulate:function(e){return jd(this,e)},on:function(e,r){var t=this;return e==="data"?this._worker.on(e,function(n){r.call(t,n.data,n.meta)}):this._worker.on(e,function(){bt.delay(r,arguments,t)}),this},resume:function(){return bt.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(bt.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new Ds(this,{objectMode:this._outputType!=="nodebuffer"},e)}};var Ps=Fs,Me={};Me.base64=!1,Me.binary=!1,Me.dir=!1,Me.createFolders=!0,Me.date=null,Me.compression=null,Me.compressionOptions=null,Me.comment=null,Me.unixPermissions=null,Me.dosPermissions=null;var Vr=we(),Xr=Le,$d=16*1024;function $t(e){Xr.call(this,"DataWorker");var r=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(t){r.dataIsReady=!0,r.data=t,r.max=t&&t.length||0,r.type=Vr.getTypeOf(t),r.isPaused||r._tickAndRepeat()},function(t){r.error(t)})}Vr.inherits($t,Xr),$t.prototype.cleanUp=function(){Xr.prototype.cleanUp.call(this),this.data=null},$t.prototype.resume=function(){return Xr.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,Vr.delay(this._tickAndRepeat,[],this)),!0):!1},$t.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(Vr.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},$t.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=$d,r=null,t=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":r=this.data.substring(this.index,t);break;case"uint8array":r=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":r=this.data.slice(this.index,t);break}return this.index=t,this.push({data:r,meta:{percent:this.max?this.index/this.max*100:0}})};var Ls=$t,qd=we();function zd(){for(var e,r=[],t=0;t<256;t++){e=t;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r}var Ms=zd();function Wd(e,r,t,n){var u=Ms,a=n+t;e=e^-1;for(var o=n;o<a;o++)e=e>>>8^u[(e^r[o])&255];return e^-1}function Hd(e,r,t,n){var u=Ms,a=n+t;e=e^-1;for(var o=n;o<a;o++)e=e>>>8^u[(e^r.charCodeAt(o))&255];return e^-1}var va=function(r,t){if(typeof r=="undefined"||!r.length)return 0;var n=qd.getTypeOf(r)!=="string";return n?Wd(t|0,r,r.length,0):Hd(t|0,r,r.length,0)},Us=Le,Gd=va,Zd=we();function _a(){Us.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}Zd.inherits(_a,Us),_a.prototype.processChunk=function(e){this.streamInfo.crc32=Gd(e.data,this.streamInfo.crc32||0),this.push(e)};var js=_a,Vd=we(),ma=Le;function ba(e){ma.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}Vd.inherits(ba,ma),ba.prototype.processChunk=function(e){if(e){var r=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=r+e.data.length}ma.prototype.processChunk.call(this,e)};var Xd=ba,$s=cr,qs=Ls,Yd=js,wa=Xd;function Ea(e,r,t,n,u){this.compressedSize=e,this.uncompressedSize=r,this.crc32=t,this.compression=n,this.compressedContent=u}Ea.prototype={getContentWorker:function(){var e=new qs($s.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new wa("data_length")),r=this;return e.on("end",function(){if(this.streamInfo.data_length!==r.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new qs($s.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Ea.createWorkerFrom=function(e,r,t){return e.pipe(new Yd).pipe(new wa("uncompressedSize")).pipe(r.compressWorker(t)).pipe(new wa("compressedSize")).withStreamInfo("compression",r)};var Sa=Ea,Kd=Ps,Jd=Ls,xa=Pt,Ta=Sa,zs=Le,Aa=function(e,r,t){this.name=e,this.dir=t.dir,this.date=t.date,this.comment=t.comment,this.unixPermissions=t.unixPermissions,this.dosPermissions=t.dosPermissions,this._data=r,this._dataBinary=t.binary,this.options={compression:t.compression,compressionOptions:t.compressionOptions}};Aa.prototype={internalStream:function(e){var r=null,t="string";try{if(!e)throw new Error("No output type specified.");t=e.toLowerCase();var n=t==="string"||t==="text";(t==="binarystring"||t==="text")&&(t="string"),r=this._decompressWorker();var u=!this._dataBinary;u&&!n&&(r=r.pipe(new xa.Utf8EncodeWorker)),!u&&n&&(r=r.pipe(new xa.Utf8DecodeWorker))}catch(a){r=new zs("error"),r.error(a)}return new Kd(r,t,"")},async:function(e,r){return this.internalStream(e).accumulate(r)},nodeStream:function(e,r){return this.internalStream(e||"nodebuffer").toNodejsStream(r)},_compressWorker:function(e,r){if(this._data instanceof Ta&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var t=this._decompressWorker();return this._dataBinary||(t=t.pipe(new xa.Utf8EncodeWorker)),Ta.createWorkerFrom(t,e,r)},_decompressWorker:function(){return this._data instanceof Ta?this._data.getContentWorker():this._data instanceof zs?this._data:new Jd(this._data)}};for(var Ws=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],Qd=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},Ra=0;Ra<Ws.length;Ra++)Aa.prototype[Ws[Ra]]=Qd;var eh=Aa,Hs={},Yr={},Kr={},tt={};(function(e){var r=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function t(a,o){return Object.prototype.hasOwnProperty.call(a,o)}e.assign=function(a){for(var o=Array.prototype.slice.call(arguments,1);o.length;){var i=o.shift();if(i){if(typeof i!="object")throw new TypeError(i+"must be non-object");for(var c in i)t(i,c)&&(a[c]=i[c])}}return a},e.shrinkBuf=function(a,o){return a.length===o?a:a.subarray?a.subarray(0,o):(a.length=o,a)};var n={arraySet:function(a,o,i,c,h){if(o.subarray&&a.subarray){a.set(o.subarray(i,i+c),h);return}for(var p=0;p<c;p++)a[h+p]=o[i+p]},flattenChunks:function(a){var o,i,c,h,p,_;for(c=0,o=0,i=a.length;o<i;o++)c+=a[o].length;for(_=new Uint8Array(c),h=0,o=0,i=a.length;o<i;o++)p=a[o],_.set(p,h),h+=p.length;return _}},u={arraySet:function(a,o,i,c,h){for(var p=0;p<c;p++)a[h+p]=o[i+p]},flattenChunks:function(a){return[].concat.apply([],a)}};e.setTyped=function(a){a?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,u))},e.setTyped(r)})(tt);var dr={},Ye={},qt={},th=tt,rh=4,Gs=0,Zs=1,nh=2;function zt(e){for(var r=e.length;--r>=0;)e[r]=0}var ih=0,Vs=1,ah=2,oh=3,fh=258,Ia=29,hr=256,pr=hr+1+Ia,Wt=30,Oa=19,Xs=2*pr+1,wt=15,Na=16,sh=7,Ca=256,Ys=16,Ks=17,Js=18,ka=[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],Jr=[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],uh=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],Qs=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],lh=512,rt=new Array((pr+2)*2);zt(rt);var yr=new Array(Wt*2);zt(yr);var gr=new Array(lh);zt(gr);var vr=new Array(fh-oh+1);zt(vr);var Ba=new Array(Ia);zt(Ba);var Qr=new Array(Wt);zt(Qr);function Da(e,r,t,n,u){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=n,this.max_length=u,this.has_stree=e&&e.length}var eu,tu,ru;function Fa(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function nu(e){return e<256?gr[e]:gr[256+(e>>>7)]}function _r(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Be(e,r,t){e.bi_valid>Na-t?(e.bi_buf|=r<<e.bi_valid&65535,_r(e,e.bi_buf),e.bi_buf=r>>Na-e.bi_valid,e.bi_valid+=t-Na):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)}function Ke(e,r,t){Be(e,t[r*2],t[r*2+1])}function iu(e,r){var t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1}function ch(e){e.bi_valid===16?(_r(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function dh(e,r){var t=r.dyn_tree,n=r.max_code,u=r.stat_desc.static_tree,a=r.stat_desc.has_stree,o=r.stat_desc.extra_bits,i=r.stat_desc.extra_base,c=r.stat_desc.max_length,h,p,_,y,v,A,R=0;for(y=0;y<=wt;y++)e.bl_count[y]=0;for(t[e.heap[e.heap_max]*2+1]=0,h=e.heap_max+1;h<Xs;h++)p=e.heap[h],y=t[t[p*2+1]*2+1]+1,y>c&&(y=c,R++),t[p*2+1]=y,!(p>n)&&(e.bl_count[y]++,v=0,p>=i&&(v=o[p-i]),A=t[p*2],e.opt_len+=A*(y+v),a&&(e.static_len+=A*(u[p*2+1]+v)));if(R!==0){do{for(y=c-1;e.bl_count[y]===0;)y--;e.bl_count[y]--,e.bl_count[y+1]+=2,e.bl_count[c]--,R-=2}while(R>0);for(y=c;y!==0;y--)for(p=e.bl_count[y];p!==0;)_=e.heap[--h],!(_>n)&&(t[_*2+1]!==y&&(e.opt_len+=(y-t[_*2+1])*t[_*2],t[_*2+1]=y),p--)}}function au(e,r,t){var n=new Array(wt+1),u=0,a,o;for(a=1;a<=wt;a++)n[a]=u=u+t[a-1]<<1;for(o=0;o<=r;o++){var i=e[o*2+1];i!==0&&(e[o*2]=iu(n[i]++,i))}}function hh(){var e,r,t,n,u,a=new Array(wt+1);for(t=0,n=0;n<Ia-1;n++)for(Ba[n]=t,e=0;e<1<<ka[n];e++)vr[t++]=n;for(vr[t-1]=n,u=0,n=0;n<16;n++)for(Qr[n]=u,e=0;e<1<<Jr[n];e++)gr[u++]=n;for(u>>=7;n<Wt;n++)for(Qr[n]=u<<7,e=0;e<1<<Jr[n]-7;e++)gr[256+u++]=n;for(r=0;r<=wt;r++)a[r]=0;for(e=0;e<=143;)rt[e*2+1]=8,e++,a[8]++;for(;e<=255;)rt[e*2+1]=9,e++,a[9]++;for(;e<=279;)rt[e*2+1]=7,e++,a[7]++;for(;e<=287;)rt[e*2+1]=8,e++,a[8]++;for(au(rt,pr+1,a),e=0;e<Wt;e++)yr[e*2+1]=5,yr[e*2]=iu(e,5);eu=new Da(rt,ka,hr+1,pr,wt),tu=new Da(yr,Jr,0,Wt,wt),ru=new Da(new Array(0),uh,0,Oa,sh)}function ou(e){var r;for(r=0;r<pr;r++)e.dyn_ltree[r*2]=0;for(r=0;r<Wt;r++)e.dyn_dtree[r*2]=0;for(r=0;r<Oa;r++)e.bl_tree[r*2]=0;e.dyn_ltree[Ca*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function fu(e){e.bi_valid>8?_r(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function ph(e,r,t,n){fu(e),n&&(_r(e,t),_r(e,~t)),th.arraySet(e.pending_buf,e.window,r,t,e.pending),e.pending+=t}function su(e,r,t,n){var u=r*2,a=t*2;return e[u]<e[a]||e[u]===e[a]&&n[r]<=n[t]}function Pa(e,r,t){for(var n=e.heap[t],u=t<<1;u<=e.heap_len&&(u<e.heap_len&&su(r,e.heap[u+1],e.heap[u],e.depth)&&u++,!su(r,n,e.heap[u],e.depth));)e.heap[t]=e.heap[u],t=u,u<<=1;e.heap[t]=n}function uu(e,r,t){var n,u,a=0,o,i;if(e.last_lit!==0)do n=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],u=e.pending_buf[e.l_buf+a],a++,n===0?Ke(e,u,r):(o=vr[u],Ke(e,o+hr+1,r),i=ka[o],i!==0&&(u-=Ba[o],Be(e,u,i)),n--,o=nu(n),Ke(e,o,t),i=Jr[o],i!==0&&(n-=Qr[o],Be(e,n,i)));while(a<e.last_lit);Ke(e,Ca,r)}function La(e,r){var t=r.dyn_tree,n=r.stat_desc.static_tree,u=r.stat_desc.has_stree,a=r.stat_desc.elems,o,i,c=-1,h;for(e.heap_len=0,e.heap_max=Xs,o=0;o<a;o++)t[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):t[o*2+1]=0;for(;e.heap_len<2;)h=e.heap[++e.heap_len]=c<2?++c:0,t[h*2]=1,e.depth[h]=0,e.opt_len--,u&&(e.static_len-=n[h*2+1]);for(r.max_code=c,o=e.heap_len>>1;o>=1;o--)Pa(e,t,o);h=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Pa(e,t,1),i=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=i,t[h*2]=t[o*2]+t[i*2],e.depth[h]=(e.depth[o]>=e.depth[i]?e.depth[o]:e.depth[i])+1,t[o*2+1]=t[i*2+1]=h,e.heap[1]=h++,Pa(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],dh(e,r),au(t,c,e.bl_count)}function lu(e,r,t){var n,u=-1,a,o=r[1],i=0,c=7,h=4;for(o===0&&(c=138,h=3),r[(t+1)*2+1]=65535,n=0;n<=t;n++)a=o,o=r[(n+1)*2+1],!(++i<c&&a===o)&&(i<h?e.bl_tree[a*2]+=i:a!==0?(a!==u&&e.bl_tree[a*2]++,e.bl_tree[Ys*2]++):i<=10?e.bl_tree[Ks*2]++:e.bl_tree[Js*2]++,i=0,u=a,o===0?(c=138,h=3):a===o?(c=6,h=3):(c=7,h=4))}function cu(e,r,t){var n,u=-1,a,o=r[1],i=0,c=7,h=4;for(o===0&&(c=138,h=3),n=0;n<=t;n++)if(a=o,o=r[(n+1)*2+1],!(++i<c&&a===o)){if(i<h)do Ke(e,a,e.bl_tree);while(--i!==0);else a!==0?(a!==u&&(Ke(e,a,e.bl_tree),i--),Ke(e,Ys,e.bl_tree),Be(e,i-3,2)):i<=10?(Ke(e,Ks,e.bl_tree),Be(e,i-3,3)):(Ke(e,Js,e.bl_tree),Be(e,i-11,7));i=0,u=a,o===0?(c=138,h=3):a===o?(c=6,h=3):(c=7,h=4)}}function yh(e){var r;for(lu(e,e.dyn_ltree,e.l_desc.max_code),lu(e,e.dyn_dtree,e.d_desc.max_code),La(e,e.bl_desc),r=Oa-1;r>=3&&e.bl_tree[Qs[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function gh(e,r,t,n){var u;for(Be(e,r-257,5),Be(e,t-1,5),Be(e,n-4,4),u=0;u<n;u++)Be(e,e.bl_tree[Qs[u]*2+1],3);cu(e,e.dyn_ltree,r-1),cu(e,e.dyn_dtree,t-1)}function vh(e){var r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return Gs;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return Zs;for(t=32;t<hr;t++)if(e.dyn_ltree[t*2]!==0)return Zs;return Gs}var du=!1;function _h(e){du||(hh(),du=!0),e.l_desc=new Fa(e.dyn_ltree,eu),e.d_desc=new Fa(e.dyn_dtree,tu),e.bl_desc=new Fa(e.bl_tree,ru),e.bi_buf=0,e.bi_valid=0,ou(e)}function hu(e,r,t,n){Be(e,(ih<<1)+(n?1:0),3),ph(e,r,t,!0)}function mh(e){Be(e,Vs<<1,3),Ke(e,Ca,rt),ch(e)}function bh(e,r,t,n){var u,a,o=0;e.level>0?(e.strm.data_type===nh&&(e.strm.data_type=vh(e)),La(e,e.l_desc),La(e,e.d_desc),o=yh(e),u=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=u&&(u=a)):u=a=t+5,t+4<=u&&r!==-1?hu(e,r,t,n):e.strategy===rh||a===u?(Be(e,(Vs<<1)+(n?1:0),3),uu(e,rt,yr)):(Be(e,(ah<<1)+(n?1:0),3),gh(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),uu(e,e.dyn_ltree,e.dyn_dtree)),ou(e),n&&fu(e)}function wh(e,r,t){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=t&255,e.last_lit++,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(vr[t]+hr+1)*2]++,e.dyn_dtree[nu(r)*2]++),e.last_lit===e.lit_bufsize-1}qt._tr_init=_h,qt._tr_stored_block=hu,qt._tr_flush_block=bh,qt._tr_tally=wh,qt._tr_align=mh;function Eh(e,r,t,n){for(var u=e&65535|0,a=e>>>16&65535|0,o=0;t!==0;){o=t>2e3?2e3:t,t-=o;do u=u+r[n++]|0,a=a+u|0;while(--o);u%=65521,a%=65521}return u|a<<16|0}var pu=Eh;function Sh(){for(var e,r=[],t=0;t<256;t++){e=t;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r}var xh=Sh();function Th(e,r,t,n){var u=xh,a=n+t;e^=-1;for(var o=n;o<a;o++)e=e>>>8^u[(e^r[o])&255];return e^-1}var yu=Th,Ma={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ke=tt,Ue=qt,gu=pu,ft=yu,Ah=Ma,Et=0,Rh=1,Ih=3,st=4,vu=5,Je=0,_u=1,je=-2,Oh=-3,Ua=-5,Nh=-1,Ch=1,en=2,kh=3,Bh=4,Dh=0,Fh=2,tn=8,Ph=9,Lh=15,Mh=8,Uh=29,jh=256,ja=jh+1+Uh,$h=30,qh=19,zh=2*ja+1,Wh=15,se=3,ut=258,We=ut+se+1,Hh=32,rn=42,$a=69,nn=73,an=91,on=103,St=113,mr=666,Te=1,br=2,xt=3,Ht=4,Gh=3;function lt(e,r){return e.msg=Ah[r],r}function mu(e){return(e<<1)-(e>4?9:0)}function ct(e){for(var r=e.length;--r>=0;)e[r]=0}function dt(e){var r=e.state,t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(ke.arraySet(e.output,r.pending_buf,r.pending_out,t,e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))}function Ne(e,r){Ue._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,dt(e.strm)}function le(e,r){e.pending_buf[e.pending++]=r}function wr(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function Zh(e,r,t,n){var u=e.avail_in;return u>n&&(u=n),u===0?0:(e.avail_in-=u,ke.arraySet(r,e.input,e.next_in,u,t),e.state.wrap===1?e.adler=gu(e.adler,r,u,t):e.state.wrap===2&&(e.adler=ft(e.adler,r,u,t)),e.next_in+=u,e.total_in+=u,u)}function bu(e,r){var t=e.max_chain_length,n=e.strstart,u,a,o=e.prev_length,i=e.nice_match,c=e.strstart>e.w_size-We?e.strstart-(e.w_size-We):0,h=e.window,p=e.w_mask,_=e.prev,y=e.strstart+ut,v=h[n+o-1],A=h[n+o];e.prev_length>=e.good_match&&(t>>=2),i>e.lookahead&&(i=e.lookahead);do if(u=r,!(h[u+o]!==A||h[u+o-1]!==v||h[u]!==h[n]||h[++u]!==h[n+1])){n+=2,u++;do;while(h[++n]===h[++u]&&h[++n]===h[++u]&&h[++n]===h[++u]&&h[++n]===h[++u]&&h[++n]===h[++u]&&h[++n]===h[++u]&&h[++n]===h[++u]&&h[++n]===h[++u]&&n<y);if(a=ut-(y-n),n=y-ut,a>o){if(e.match_start=r,o=a,a>=i)break;v=h[n+o-1],A=h[n+o]}}while((r=_[r&p])>c&&--t!==0);return o<=e.lookahead?o:e.lookahead}function Tt(e){var r=e.w_size,t,n,u,a,o;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-We)){ke.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,n=e.hash_size,t=n;do u=e.head[--t],e.head[t]=u>=r?u-r:0;while(--n);n=r,t=n;do u=e.prev[--t],e.prev[t]=u>=r?u-r:0;while(--n);a+=r}if(e.strm.avail_in===0)break;if(n=Zh(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=n,e.lookahead+e.insert>=se)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+se-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<se)););}while(e.lookahead<We&&e.strm.avail_in!==0)}function Vh(e,r){var t=65535;for(t>e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Tt(e),e.lookahead===0&&r===Et)return Te;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+t;if((e.strstart===0||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,Ne(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-We&&(Ne(e,!1),e.strm.avail_out===0))return Te}return e.insert=0,r===st?(Ne(e,!0),e.strm.avail_out===0?xt:Ht):(e.strstart>e.block_start&&(Ne(e,!1),e.strm.avail_out===0),Te)}function qa(e,r){for(var t,n;;){if(e.lookahead<We){if(Tt(e),e.lookahead<We&&r===Et)return Te;if(e.lookahead===0)break}if(t=0,e.lookahead>=se&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+se-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-We&&(e.match_length=bu(e,t)),e.match_length>=se)if(n=Ue._tr_tally(e,e.strstart-e.match_start,e.match_length-se),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=se){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+se-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=Ue._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Ne(e,!1),e.strm.avail_out===0))return Te}return e.insert=e.strstart<se-1?e.strstart:se-1,r===st?(Ne(e,!0),e.strm.avail_out===0?xt:Ht):e.last_lit&&(Ne(e,!1),e.strm.avail_out===0)?Te:br}function Gt(e,r){for(var t,n,u;;){if(e.lookahead<We){if(Tt(e),e.lookahead<We&&r===Et)return Te;if(e.lookahead===0)break}if(t=0,e.lookahead>=se&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+se-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=se-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-We&&(e.match_length=bu(e,t),e.match_length<=5&&(e.strategy===Ch||e.match_length===se&&e.strstart-e.match_start>4096)&&(e.match_length=se-1)),e.prev_length>=se&&e.match_length<=e.prev_length){u=e.strstart+e.lookahead-se,n=Ue._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-se),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=u&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+se-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=se-1,e.strstart++,n&&(Ne(e,!1),e.strm.avail_out===0))return Te}else if(e.match_available){if(n=Ue._tr_tally(e,0,e.window[e.strstart-1]),n&&Ne(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Te}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Ue._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<se-1?e.strstart:se-1,r===st?(Ne(e,!0),e.strm.avail_out===0?xt:Ht):e.last_lit&&(Ne(e,!1),e.strm.avail_out===0)?Te:br}function Xh(e,r){for(var t,n,u,a,o=e.window;;){if(e.lookahead<=ut){if(Tt(e),e.lookahead<=ut&&r===Et)return Te;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=se&&e.strstart>0&&(u=e.strstart-1,n=o[u],n===o[++u]&&n===o[++u]&&n===o[++u])){a=e.strstart+ut;do;while(n===o[++u]&&n===o[++u]&&n===o[++u]&&n===o[++u]&&n===o[++u]&&n===o[++u]&&n===o[++u]&&n===o[++u]&&u<a);e.match_length=ut-(a-u),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=se?(t=Ue._tr_tally(e,1,e.match_length-se),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=Ue._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(Ne(e,!1),e.strm.avail_out===0))return Te}return e.insert=0,r===st?(Ne(e,!0),e.strm.avail_out===0?xt:Ht):e.last_lit&&(Ne(e,!1),e.strm.avail_out===0)?Te:br}function Yh(e,r){for(var t;;){if(e.lookahead===0&&(Tt(e),e.lookahead===0)){if(r===Et)return Te;break}if(e.match_length=0,t=Ue._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(Ne(e,!1),e.strm.avail_out===0))return Te}return e.insert=0,r===st?(Ne(e,!0),e.strm.avail_out===0?xt:Ht):e.last_lit&&(Ne(e,!1),e.strm.avail_out===0)?Te:br}function Qe(e,r,t,n,u){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=n,this.func=u}var Zt;Zt=[new Qe(0,0,0,0,Vh),new Qe(4,4,8,4,qa),new Qe(4,5,16,8,qa),new Qe(4,6,32,32,qa),new Qe(4,4,16,16,Gt),new Qe(8,16,32,32,Gt),new Qe(8,16,128,128,Gt),new Qe(8,32,128,256,Gt),new Qe(32,128,258,1024,Gt),new Qe(32,258,258,4096,Gt)];function Kh(e){e.window_size=2*e.w_size,ct(e.head),e.max_lazy_match=Zt[e.level].max_lazy,e.good_match=Zt[e.level].good_length,e.nice_match=Zt[e.level].nice_length,e.max_chain_length=Zt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=se-1,e.match_available=0,e.ins_h=0}function Jh(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=tn,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new ke.Buf16(zh*2),this.dyn_dtree=new ke.Buf16((2*$h+1)*2),this.bl_tree=new ke.Buf16((2*qh+1)*2),ct(this.dyn_ltree),ct(this.dyn_dtree),ct(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new ke.Buf16(Wh+1),this.heap=new ke.Buf16(2*ja+1),ct(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new ke.Buf16(2*ja+1),ct(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function wu(e){var r;return!e||!e.state?lt(e,je):(e.total_in=e.total_out=0,e.data_type=Fh,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?rn:St,e.adler=r.wrap===2?0:1,r.last_flush=Et,Ue._tr_init(r),Je)}function Eu(e){var r=wu(e);return r===Je&&Kh(e.state),r}function Qh(e,r){return!e||!e.state||e.state.wrap!==2?je:(e.state.gzhead=r,Je)}function Su(e,r,t,n,u,a){if(!e)return je;var o=1;if(r===Nh&&(r=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),u<1||u>Ph||t!==tn||n<8||n>15||r<0||r>9||a<0||a>Bh)return lt(e,je);n===8&&(n=9);var i=new Jh;return e.state=i,i.strm=e,i.wrap=o,i.gzhead=null,i.w_bits=n,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=u+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+se-1)/se),i.window=new ke.Buf8(i.w_size*2),i.head=new ke.Buf16(i.hash_size),i.prev=new ke.Buf16(i.w_size),i.lit_bufsize=1<<u+6,i.pending_buf_size=i.lit_bufsize*4,i.pending_buf=new ke.Buf8(i.pending_buf_size),i.d_buf=1*i.lit_bufsize,i.l_buf=3*i.lit_bufsize,i.level=r,i.strategy=a,i.method=t,Eu(e)}function ep(e,r){return Su(e,r,tn,Lh,Mh,Dh)}function tp(e,r){var t,n,u,a;if(!e||!e.state||r>vu||r<0)return e?lt(e,je):je;if(n=e.state,!e.output||!e.input&&e.avail_in!==0||n.status===mr&&r!==st)return lt(e,e.avail_out===0?Ua:je);if(n.strm=e,t=n.last_flush,n.last_flush=r,n.status===rn)if(n.wrap===2)e.adler=0,le(n,31),le(n,139),le(n,8),n.gzhead?(le(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),le(n,n.gzhead.time&255),le(n,n.gzhead.time>>8&255),le(n,n.gzhead.time>>16&255),le(n,n.gzhead.time>>24&255),le(n,n.level===9?2:n.strategy>=en||n.level<2?4:0),le(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(le(n,n.gzhead.extra.length&255),le(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=ft(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=$a):(le(n,0),le(n,0),le(n,0),le(n,0),le(n,0),le(n,n.level===9?2:n.strategy>=en||n.level<2?4:0),le(n,Gh),n.status=St);else{var o=tn+(n.w_bits-8<<4)<<8,i=-1;n.strategy>=en||n.level<2?i=0:n.level<6?i=1:n.level===6?i=2:i=3,o|=i<<6,n.strstart!==0&&(o|=Hh),o+=31-o%31,n.status=St,wr(n,o),n.strstart!==0&&(wr(n,e.adler>>>16),wr(n,e.adler&65535)),e.adler=1}if(n.status===$a)if(n.gzhead.extra){for(u=n.pending;n.gzindex<(n.gzhead.extra.length&65535)&&!(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>u&&(e.adler=ft(e.adler,n.pending_buf,n.pending-u,u)),dt(e),u=n.pending,n.pending===n.pending_buf_size));)le(n,n.gzhead.extra[n.gzindex]&255),n.gzindex++;n.gzhead.hcrc&&n.pending>u&&(e.adler=ft(e.adler,n.pending_buf,n.pending-u,u)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=nn)}else n.status=nn;if(n.status===nn)if(n.gzhead.name){u=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>u&&(e.adler=ft(e.adler,n.pending_buf,n.pending-u,u)),dt(e),u=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.name.length?a=n.gzhead.name.charCodeAt(n.gzindex++)&255:a=0,le(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>u&&(e.adler=ft(e.adler,n.pending_buf,n.pending-u,u)),a===0&&(n.gzindex=0,n.status=an)}else n.status=an;if(n.status===an)if(n.gzhead.comment){u=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>u&&(e.adler=ft(e.adler,n.pending_buf,n.pending-u,u)),dt(e),u=n.pending,n.pending===n.pending_buf_size)){a=1;break}n.gzindex<n.gzhead.comment.length?a=n.gzhead.comment.charCodeAt(n.gzindex++)&255:a=0,le(n,a)}while(a!==0);n.gzhead.hcrc&&n.pending>u&&(e.adler=ft(e.adler,n.pending_buf,n.pending-u,u)),a===0&&(n.status=on)}else n.status=on;if(n.status===on&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&dt(e),n.pending+2<=n.pending_buf_size&&(le(n,e.adler&255),le(n,e.adler>>8&255),e.adler=0,n.status=St)):n.status=St),n.pending!==0){if(dt(e),e.avail_out===0)return n.last_flush=-1,Je}else if(e.avail_in===0&&mu(r)<=mu(t)&&r!==st)return lt(e,Ua);if(n.status===mr&&e.avail_in!==0)return lt(e,Ua);if(e.avail_in!==0||n.lookahead!==0||r!==Et&&n.status!==mr){var c=n.strategy===en?Yh(n,r):n.strategy===kh?Xh(n,r):Zt[n.level].func(n,r);if((c===xt||c===Ht)&&(n.status=mr),c===Te||c===xt)return e.avail_out===0&&(n.last_flush=-1),Je;if(c===br&&(r===Rh?Ue._tr_align(n):r!==vu&&(Ue._tr_stored_block(n,0,0,!1),r===Ih&&(ct(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),dt(e),e.avail_out===0))return n.last_flush=-1,Je}return r!==st?Je:n.wrap<=0?_u:(n.wrap===2?(le(n,e.adler&255),le(n,e.adler>>8&255),le(n,e.adler>>16&255),le(n,e.adler>>24&255),le(n,e.total_in&255),le(n,e.total_in>>8&255),le(n,e.total_in>>16&255),le(n,e.total_in>>24&255)):(wr(n,e.adler>>>16),wr(n,e.adler&65535)),dt(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?Je:_u)}function rp(e){var r;return!e||!e.state?je:(r=e.state.status,r!==rn&&r!==$a&&r!==nn&&r!==an&&r!==on&&r!==St&&r!==mr?lt(e,je):(e.state=null,r===St?lt(e,Oh):Je))}function np(e,r){var t=r.length,n,u,a,o,i,c,h,p;if(!e||!e.state||(n=e.state,o=n.wrap,o===2||o===1&&n.status!==rn||n.lookahead))return je;for(o===1&&(e.adler=gu(e.adler,r,t,0)),n.wrap=0,t>=n.w_size&&(o===0&&(ct(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new ke.Buf8(n.w_size),ke.arraySet(p,r,t-n.w_size,n.w_size,0),r=p,t=n.w_size),i=e.avail_in,c=e.next_in,h=e.input,e.avail_in=t,e.next_in=0,e.input=r,Tt(n);n.lookahead>=se;){u=n.strstart,a=n.lookahead-(se-1);do n.ins_h=(n.ins_h<<n.hash_shift^n.window[u+se-1])&n.hash_mask,n.prev[u&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=u,u++;while(--a);n.strstart=u,n.lookahead=se-1,Tt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=se-1,n.match_available=0,e.next_in=c,e.input=h,e.avail_in=i,n.wrap=o,Je}Ye.deflateInit=ep,Ye.deflateInit2=Su,Ye.deflateReset=Eu,Ye.deflateResetKeep=wu,Ye.deflateSetHeader=Qh,Ye.deflate=tp,Ye.deflateEnd=rp,Ye.deflateSetDictionary=np,Ye.deflateInfo="pako deflate (from Nodeca project)";var At={},fn=tt,xu=!0,Tu=!0;try{String.fromCharCode.apply(null,[0])}catch(e){xu=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Tu=!1}for(var Er=new fn.Buf8(256),ht=0;ht<256;ht++)Er[ht]=ht>=252?6:ht>=248?5:ht>=240?4:ht>=224?3:ht>=192?2:1;Er[254]=Er[254]=1,At.string2buf=function(e){var r,t,n,u,a,o=e.length,i=0;for(u=0;u<o;u++)t=e.charCodeAt(u),(t&64512)===55296&&u+1<o&&(n=e.charCodeAt(u+1),(n&64512)===56320&&(t=65536+(t-55296<<10)+(n-56320),u++)),i+=t<128?1:t<2048?2:t<65536?3:4;for(r=new fn.Buf8(i),a=0,u=0;a<i;u++)t=e.charCodeAt(u),(t&64512)===55296&&u+1<o&&(n=e.charCodeAt(u+1),(n&64512)===56320&&(t=65536+(t-55296<<10)+(n-56320),u++)),t<128?r[a++]=t:t<2048?(r[a++]=192|t>>>6,r[a++]=128|t&63):t<65536?(r[a++]=224|t>>>12,r[a++]=128|t>>>6&63,r[a++]=128|t&63):(r[a++]=240|t>>>18,r[a++]=128|t>>>12&63,r[a++]=128|t>>>6&63,r[a++]=128|t&63);return r};function Au(e,r){if(r<65534&&(e.subarray&&Tu||!e.subarray&&xu))return String.fromCharCode.apply(null,fn.shrinkBuf(e,r));for(var t="",n=0;n<r;n++)t+=String.fromCharCode(e[n]);return t}At.buf2binstring=function(e){return Au(e,e.length)},At.binstring2buf=function(e){for(var r=new fn.Buf8(e.length),t=0,n=r.length;t<n;t++)r[t]=e.charCodeAt(t);return r},At.buf2string=function(e,r){var t,n,u,a,o=r||e.length,i=new Array(o*2);for(n=0,t=0;t<o;){if(u=e[t++],u<128){i[n++]=u;continue}if(a=Er[u],a>4){i[n++]=65533,t+=a-1;continue}for(u&=a===2?31:a===3?15:7;a>1&&t<o;)u=u<<6|e[t++]&63,a--;if(a>1){i[n++]=65533;continue}u<65536?i[n++]=u:(u-=65536,i[n++]=55296|u>>10&1023,i[n++]=56320|u&1023)}return Au(i,n)},At.utf8border=function(e,r){var t;for(r=r||e.length,r>e.length&&(r=e.length),t=r-1;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?r:t+Er[e[t]]>r?t:r};function ip(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Ru=ip,Sr=Ye,xr=tt,za=At,Wa=Ma,ap=Ru,Iu=Object.prototype.toString,op=0,Ha=4,Vt=0,Ou=1,Nu=2,fp=-1,sp=0,up=8;function Rt(e){if(!(this instanceof Rt))return new Rt(e);this.options=xr.assign({level:fp,method:up,chunkSize:16384,windowBits:15,memLevel:8,strategy:sp,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ap,this.strm.avail_out=0;var t=Sr.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==Vt)throw new Error(Wa[t]);if(r.header&&Sr.deflateSetHeader(this.strm,r.header),r.dictionary){var n;if(typeof r.dictionary=="string"?n=za.string2buf(r.dictionary):Iu.call(r.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(r.dictionary):n=r.dictionary,t=Sr.deflateSetDictionary(this.strm,n),t!==Vt)throw new Error(Wa[t]);this._dict_set=!0}}Rt.prototype.push=function(e,r){var t=this.strm,n=this.options.chunkSize,u,a;if(this.ended)return!1;a=r===~~r?r:r===!0?Ha:op,typeof e=="string"?t.input=za.string2buf(e):Iu.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new xr.Buf8(n),t.next_out=0,t.avail_out=n),u=Sr.deflate(t,a),u!==Ou&&u!==Vt)return this.onEnd(u),this.ended=!0,!1;(t.avail_out===0||t.avail_in===0&&(a===Ha||a===Nu))&&(this.options.to==="string"?this.onData(za.buf2binstring(xr.shrinkBuf(t.output,t.next_out))):this.onData(xr.shrinkBuf(t.output,t.next_out)))}while((t.avail_in>0||t.avail_out===0)&&u!==Ou);return a===Ha?(u=Sr.deflateEnd(this.strm),this.onEnd(u),this.ended=!0,u===Vt):(a===Nu&&(this.onEnd(Vt),t.avail_out=0),!0)},Rt.prototype.onData=function(e){this.chunks.push(e)},Rt.prototype.onEnd=function(e){e===Vt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=xr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Ga(e,r){var t=new Rt(r);if(t.push(e,!0),t.err)throw t.msg||Wa[t.err];return t.result}function lp(e,r){return r=r||{},r.raw=!0,Ga(e,r)}function cp(e,r){return r=r||{},r.gzip=!0,Ga(e,r)}dr.Deflate=Rt,dr.deflate=Ga,dr.deflateRaw=lp,dr.gzip=cp;var Tr={},He={},sn=30,dp=12,hp=function(r,t){var n,u,a,o,i,c,h,p,_,y,v,A,R,S,g,m,C,x,k,D,U,q,O,Y,V;n=r.state,u=r.next_in,Y=r.input,a=u+(r.avail_in-5),o=r.next_out,V=r.output,i=o-(t-r.avail_out),c=o+(r.avail_out-257),h=n.dmax,p=n.wsize,_=n.whave,y=n.wnext,v=n.window,A=n.hold,R=n.bits,S=n.lencode,g=n.distcode,m=(1<<n.lenbits)-1,C=(1<<n.distbits)-1;e:do{R<15&&(A+=Y[u++]<<R,R+=8,A+=Y[u++]<<R,R+=8),x=S[A&m];t:for(;;){if(k=x>>>24,A>>>=k,R-=k,k=x>>>16&255,k===0)V[o++]=x&65535;else if(k&16){D=x&65535,k&=15,k&&(R<k&&(A+=Y[u++]<<R,R+=8),D+=A&(1<<k)-1,A>>>=k,R-=k),R<15&&(A+=Y[u++]<<R,R+=8,A+=Y[u++]<<R,R+=8),x=g[A&C];r:for(;;){if(k=x>>>24,A>>>=k,R-=k,k=x>>>16&255,k&16){if(U=x&65535,k&=15,R<k&&(A+=Y[u++]<<R,R+=8,R<k&&(A+=Y[u++]<<R,R+=8)),U+=A&(1<<k)-1,U>h){r.msg="invalid distance too far back",n.mode=sn;break e}if(A>>>=k,R-=k,k=o-i,U>k){if(k=U-k,k>_&&n.sane){r.msg="invalid distance too far back",n.mode=sn;break e}if(q=0,O=v,y===0){if(q+=p-k,k<D){D-=k;do V[o++]=v[q++];while(--k);q=o-U,O=V}}else if(y<k){if(q+=p+y-k,k-=y,k<D){D-=k;do V[o++]=v[q++];while(--k);if(q=0,y<D){k=y,D-=k;do V[o++]=v[q++];while(--k);q=o-U,O=V}}}else if(q+=y-k,k<D){D-=k;do V[o++]=v[q++];while(--k);q=o-U,O=V}for(;D>2;)V[o++]=O[q++],V[o++]=O[q++],V[o++]=O[q++],D-=3;D&&(V[o++]=O[q++],D>1&&(V[o++]=O[q++]))}else{q=o-U;do V[o++]=V[q++],V[o++]=V[q++],V[o++]=V[q++],D-=3;while(D>2);D&&(V[o++]=V[q++],D>1&&(V[o++]=V[q++]))}}else if((k&64)===0){x=g[(x&65535)+(A&(1<<k)-1)];continue r}else{r.msg="invalid distance code",n.mode=sn;break e}break}}else if((k&64)===0){x=S[(x&65535)+(A&(1<<k)-1)];continue t}else if(k&32){n.mode=dp;break e}else{r.msg="invalid literal/length code",n.mode=sn;break e}break}}while(u<a&&o<c);D=R>>3,u-=D,R-=D<<3,A&=(1<<R)-1,r.next_in=u,r.next_out=o,r.avail_in=u<a?5+(a-u):5-(u-a),r.avail_out=o<c?257+(c-o):257-(o-c),n.hold=A,n.bits=R},Cu=tt,Xt=15,ku=852,Bu=592,Du=0,Za=1,Fu=2,pp=[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],yp=[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],gp=[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],vp=[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],_p=function(r,t,n,u,a,o,i,c){var h=c.bits,p=0,_=0,y=0,v=0,A=0,R=0,S=0,g=0,m=0,C=0,x,k,D,U,q,O=null,Y=0,V,K=new Cu.Buf16(Xt+1),ae=new Cu.Buf16(Xt+1),re=null,fe=0,ue,F,j;for(p=0;p<=Xt;p++)K[p]=0;for(_=0;_<u;_++)K[t[n+_]]++;for(A=h,v=Xt;v>=1&&K[v]===0;v--);if(A>v&&(A=v),v===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,c.bits=1,0;for(y=1;y<v&&K[y]===0;y++);for(A<y&&(A=y),g=1,p=1;p<=Xt;p++)if(g<<=1,g-=K[p],g<0)return-1;if(g>0&&(r===Du||v!==1))return-1;for(ae[1]=0,p=1;p<Xt;p++)ae[p+1]=ae[p]+K[p];for(_=0;_<u;_++)t[n+_]!==0&&(i[ae[t[n+_]]++]=_);if(r===Du?(O=re=i,V=19):r===Za?(O=pp,Y-=257,re=yp,fe-=257,V=256):(O=gp,re=vp,V=-1),C=0,_=0,p=y,q=o,R=A,S=0,D=-1,m=1<<A,U=m-1,r===Za&&m>ku||r===Fu&&m>Bu)return 1;for(;;){ue=p-S,i[_]<V?(F=0,j=i[_]):i[_]>V?(F=re[fe+i[_]],j=O[Y+i[_]]):(F=96,j=0),x=1<<p-S,k=1<<R,y=k;do k-=x,a[q+(C>>S)+k]=ue<<24|F<<16|j|0;while(k!==0);for(x=1<<p-1;C&x;)x>>=1;if(x!==0?(C&=x-1,C+=x):C=0,_++,--K[p]===0){if(p===v)break;p=t[n+i[_]]}if(p>A&&(C&U)!==D){for(S===0&&(S=A),q+=y,R=p-S,g=1<<R;R+S<v&&(g-=K[R+S],!(g<=0));)R++,g<<=1;if(m+=1<<R,r===Za&&m>ku||r===Fu&&m>Bu)return 1;D=C&U,a[D]=A<<24|R<<16|q-o|0}}return C!==0&&(a[q+C]=p-S<<24|64<<16|0),c.bits=A,0},De=tt,Va=pu,et=yu,mp=hp,Ar=_p,bp=0,Pu=1,Lu=2,Mu=4,wp=5,un=6,It=0,Ep=1,Sp=2,$e=-2,Uu=-3,ju=-4,xp=-5,$u=8,qu=1,zu=2,Wu=3,Hu=4,Gu=5,Zu=6,Vu=7,Xu=8,Yu=9,Ku=10,ln=11,nt=12,Xa=13,Ju=14,Ya=15,Qu=16,el=17,tl=18,rl=19,cn=20,dn=21,nl=22,il=23,al=24,ol=25,fl=26,Ka=27,sl=28,ul=29,ve=30,ll=31,Tp=32,Ap=852,Rp=592,Ip=15,Op=Ip;function cl(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Np(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new De.Buf16(320),this.work=new De.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function dl(e){var r;return!e||!e.state?$e:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=qu,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new De.Buf32(Ap),r.distcode=r.distdyn=new De.Buf32(Rp),r.sane=1,r.back=-1,It)}function hl(e){var r;return!e||!e.state?$e:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,dl(e))}function pl(e,r){var t,n;return!e||!e.state||(n=e.state,r<0?(t=0,r=-r):(t=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?$e:(n.window!==null&&n.wbits!==r&&(n.window=null),n.wrap=t,n.wbits=r,hl(e))}function yl(e,r){var t,n;return e?(n=new Np,e.state=n,n.window=null,t=pl(e,r),t!==It&&(e.state=null),t):$e}function Cp(e){return yl(e,Op)}var gl=!0,Ja,Qa;function kp(e){if(gl){var r;for(Ja=new De.Buf32(512),Qa=new De.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(Ar(Pu,e.lens,0,288,Ja,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Ar(Lu,e.lens,0,32,Qa,0,e.work,{bits:5}),gl=!1}e.lencode=Ja,e.lenbits=9,e.distcode=Qa,e.distbits=5}function vl(e,r,t,n){var u,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new De.Buf8(a.wsize)),n>=a.wsize?(De.arraySet(a.window,r,t-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(u=a.wsize-a.wnext,u>n&&(u=n),De.arraySet(a.window,r,t-n,u,a.wnext),n-=u,n?(De.arraySet(a.window,r,t-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=u,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=u))),0}function Bp(e,r){var t,n,u,a,o,i,c,h,p,_,y,v,A,R,S=0,g,m,C,x,k,D,U,q,O=new De.Buf8(4),Y,V,K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return $e;t=e.state,t.mode===nt&&(t.mode=Xa),o=e.next_out,u=e.output,c=e.avail_out,a=e.next_in,n=e.input,i=e.avail_in,h=t.hold,p=t.bits,_=i,y=c,q=It;e:for(;;)switch(t.mode){case qu:if(t.wrap===0){t.mode=Xa;break}for(;p<16;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}if(t.wrap&2&&h===35615){t.check=0,O[0]=h&255,O[1]=h>>>8&255,t.check=et(t.check,O,2,0),h=0,p=0,t.mode=zu;break}if(t.flags=0,t.head&&(t.head.done=!1),!(t.wrap&1)||(((h&255)<<8)+(h>>8))%31){e.msg="incorrect header check",t.mode=ve;break}if((h&15)!==$u){e.msg="unknown compression method",t.mode=ve;break}if(h>>>=4,p-=4,U=(h&15)+8,t.wbits===0)t.wbits=U;else if(U>t.wbits){e.msg="invalid window size",t.mode=ve;break}t.dmax=1<<U,e.adler=t.check=1,t.mode=h&512?Ku:nt,h=0,p=0;break;case zu:for(;p<16;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}if(t.flags=h,(t.flags&255)!==$u){e.msg="unknown compression method",t.mode=ve;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=ve;break}t.head&&(t.head.text=h>>8&1),t.flags&512&&(O[0]=h&255,O[1]=h>>>8&255,t.check=et(t.check,O,2,0)),h=0,p=0,t.mode=Wu;case Wu:for(;p<32;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}t.head&&(t.head.time=h),t.flags&512&&(O[0]=h&255,O[1]=h>>>8&255,O[2]=h>>>16&255,O[3]=h>>>24&255,t.check=et(t.check,O,4,0)),h=0,p=0,t.mode=Hu;case Hu:for(;p<16;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}t.head&&(t.head.xflags=h&255,t.head.os=h>>8),t.flags&512&&(O[0]=h&255,O[1]=h>>>8&255,t.check=et(t.check,O,2,0)),h=0,p=0,t.mode=Gu;case Gu:if(t.flags&1024){for(;p<16;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}t.length=h,t.head&&(t.head.extra_len=h),t.flags&512&&(O[0]=h&255,O[1]=h>>>8&255,t.check=et(t.check,O,2,0)),h=0,p=0}else t.head&&(t.head.extra=null);t.mode=Zu;case Zu:if(t.flags&1024&&(v=t.length,v>i&&(v=i),v&&(t.head&&(U=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),De.arraySet(t.head.extra,n,a,v,U)),t.flags&512&&(t.check=et(t.check,n,v,a)),i-=v,a+=v,t.length-=v),t.length))break e;t.length=0,t.mode=Vu;case Vu:if(t.flags&2048){if(i===0)break e;v=0;do U=n[a+v++],t.head&&U&&t.length<65536&&(t.head.name+=String.fromCharCode(U));while(U&&v<i);if(t.flags&512&&(t.check=et(t.check,n,v,a)),i-=v,a+=v,U)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=Xu;case Xu:if(t.flags&4096){if(i===0)break e;v=0;do U=n[a+v++],t.head&&U&&t.length<65536&&(t.head.comment+=String.fromCharCode(U));while(U&&v<i);if(t.flags&512&&(t.check=et(t.check,n,v,a)),i-=v,a+=v,U)break e}else t.head&&(t.head.comment=null);t.mode=Yu;case Yu:if(t.flags&512){for(;p<16;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}if(h!==(t.check&65535)){e.msg="header crc mismatch",t.mode=ve;break}h=0,p=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=nt;break;case Ku:for(;p<32;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}e.adler=t.check=cl(h),h=0,p=0,t.mode=ln;case ln:if(t.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=i,t.hold=h,t.bits=p,Sp;e.adler=t.check=1,t.mode=nt;case nt:if(r===wp||r===un)break e;case Xa:if(t.last){h>>>=p&7,p-=p&7,t.mode=Ka;break}for(;p<3;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}switch(t.last=h&1,h>>>=1,p-=1,h&3){case 0:t.mode=Ju;break;case 1:if(kp(t),t.mode=cn,r===un){h>>>=2,p-=2;break e}break;case 2:t.mode=el;break;case 3:e.msg="invalid block type",t.mode=ve}h>>>=2,p-=2;break;case Ju:for(h>>>=p&7,p-=p&7;p<32;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}if((h&65535)!==(h>>>16^65535)){e.msg="invalid stored block lengths",t.mode=ve;break}if(t.length=h&65535,h=0,p=0,t.mode=Ya,r===un)break e;case Ya:t.mode=Qu;case Qu:if(v=t.length,v){if(v>i&&(v=i),v>c&&(v=c),v===0)break e;De.arraySet(u,n,a,v,o),i-=v,a+=v,c-=v,o+=v,t.length-=v;break}t.mode=nt;break;case el:for(;p<14;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}if(t.nlen=(h&31)+257,h>>>=5,p-=5,t.ndist=(h&31)+1,h>>>=5,p-=5,t.ncode=(h&15)+4,h>>>=4,p-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=ve;break}t.have=0,t.mode=tl;case tl:for(;t.have<t.ncode;){for(;p<3;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}t.lens[K[t.have++]]=h&7,h>>>=3,p-=3}for(;t.have<19;)t.lens[K[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,Y={bits:t.lenbits},q=Ar(bp,t.lens,0,19,t.lencode,0,t.work,Y),t.lenbits=Y.bits,q){e.msg="invalid code lengths set",t.mode=ve;break}t.have=0,t.mode=rl;case rl:for(;t.have<t.nlen+t.ndist;){for(;S=t.lencode[h&(1<<t.lenbits)-1],g=S>>>24,m=S>>>16&255,C=S&65535,!(g<=p);){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}if(C<16)h>>>=g,p-=g,t.lens[t.have++]=C;else{if(C===16){for(V=g+2;p<V;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}if(h>>>=g,p-=g,t.have===0){e.msg="invalid bit length repeat",t.mode=ve;break}U=t.lens[t.have-1],v=3+(h&3),h>>>=2,p-=2}else if(C===17){for(V=g+3;p<V;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}h>>>=g,p-=g,U=0,v=3+(h&7),h>>>=3,p-=3}else{for(V=g+7;p<V;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}h>>>=g,p-=g,U=0,v=11+(h&127),h>>>=7,p-=7}if(t.have+v>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=ve;break}for(;v--;)t.lens[t.have++]=U}}if(t.mode===ve)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=ve;break}if(t.lenbits=9,Y={bits:t.lenbits},q=Ar(Pu,t.lens,0,t.nlen,t.lencode,0,t.work,Y),t.lenbits=Y.bits,q){e.msg="invalid literal/lengths set",t.mode=ve;break}if(t.distbits=6,t.distcode=t.distdyn,Y={bits:t.distbits},q=Ar(Lu,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,Y),t.distbits=Y.bits,q){e.msg="invalid distances set",t.mode=ve;break}if(t.mode=cn,r===un)break e;case cn:t.mode=dn;case dn:if(i>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=i,t.hold=h,t.bits=p,mp(e,y),o=e.next_out,u=e.output,c=e.avail_out,a=e.next_in,n=e.input,i=e.avail_in,h=t.hold,p=t.bits,t.mode===nt&&(t.back=-1);break}for(t.back=0;S=t.lencode[h&(1<<t.lenbits)-1],g=S>>>24,m=S>>>16&255,C=S&65535,!(g<=p);){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}if(m&&(m&240)===0){for(x=g,k=m,D=C;S=t.lencode[D+((h&(1<<x+k)-1)>>x)],g=S>>>24,m=S>>>16&255,C=S&65535,!(x+g<=p);){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}h>>>=x,p-=x,t.back+=x}if(h>>>=g,p-=g,t.back+=g,t.length=C,m===0){t.mode=fl;break}if(m&32){t.back=-1,t.mode=nt;break}if(m&64){e.msg="invalid literal/length code",t.mode=ve;break}t.extra=m&15,t.mode=nl;case nl:if(t.extra){for(V=t.extra;p<V;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}t.length+=h&(1<<t.extra)-1,h>>>=t.extra,p-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=il;case il:for(;S=t.distcode[h&(1<<t.distbits)-1],g=S>>>24,m=S>>>16&255,C=S&65535,!(g<=p);){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}if((m&240)===0){for(x=g,k=m,D=C;S=t.distcode[D+((h&(1<<x+k)-1)>>x)],g=S>>>24,m=S>>>16&255,C=S&65535,!(x+g<=p);){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}h>>>=x,p-=x,t.back+=x}if(h>>>=g,p-=g,t.back+=g,m&64){e.msg="invalid distance code",t.mode=ve;break}t.offset=C,t.extra=m&15,t.mode=al;case al:if(t.extra){for(V=t.extra;p<V;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}t.offset+=h&(1<<t.extra)-1,h>>>=t.extra,p-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=ve;break}t.mode=ol;case ol:if(c===0)break e;if(v=y-c,t.offset>v){if(v=t.offset-v,v>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=ve;break}v>t.wnext?(v-=t.wnext,A=t.wsize-v):A=t.wnext-v,v>t.length&&(v=t.length),R=t.window}else R=u,A=o-t.offset,v=t.length;v>c&&(v=c),c-=v,t.length-=v;do u[o++]=R[A++];while(--v);t.length===0&&(t.mode=dn);break;case fl:if(c===0)break e;u[o++]=t.length,c--,t.mode=dn;break;case Ka:if(t.wrap){for(;p<32;){if(i===0)break e;i--,h|=n[a++]<<p,p+=8}if(y-=c,e.total_out+=y,t.total+=y,y&&(e.adler=t.check=t.flags?et(t.check,u,y,o-y):Va(t.check,u,y,o-y)),y=c,(t.flags?h:cl(h))!==t.check){e.msg="incorrect data check",t.mode=ve;break}h=0,p=0}t.mode=sl;case sl:if(t.wrap&&t.flags){for(;p<32;){if(i===0)break e;i--,h+=n[a++]<<p,p+=8}if(h!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=ve;break}h=0,p=0}t.mode=ul;case ul:q=Ep;break e;case ve:q=Uu;break e;case ll:return ju;case Tp:default:return $e}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=i,t.hold=h,t.bits=p,(t.wsize||y!==e.avail_out&&t.mode<ve&&(t.mode<Ka||r!==Mu))&&vl(e,e.output,e.next_out,y-e.avail_out),_-=e.avail_in,y-=e.avail_out,e.total_in+=_,e.total_out+=y,t.total+=y,t.wrap&&y&&(e.adler=t.check=t.flags?et(t.check,u,y,e.next_out-y):Va(t.check,u,y,e.next_out-y)),e.data_type=t.bits+(t.last?64:0)+(t.mode===nt?128:0)+(t.mode===cn||t.mode===Ya?256:0),(_===0&&y===0||r===Mu)&&q===It&&(q=xp),q}function Dp(e){if(!e||!e.state)return $e;var r=e.state;return r.window&&(r.window=null),e.state=null,It}function Fp(e,r){var t;return!e||!e.state||(t=e.state,(t.wrap&2)===0)?$e:(t.head=r,r.done=!1,It)}function Pp(e,r){var t=r.length,n,u,a;return!e||!e.state||(n=e.state,n.wrap!==0&&n.mode!==ln)?$e:n.mode===ln&&(u=1,u=Va(u,r,t,0),u!==n.check)?Uu:(a=vl(e,r,t,t),a?(n.mode=ll,ju):(n.havedict=1,It))}He.inflateReset=hl,He.inflateReset2=pl,He.inflateResetKeep=dl,He.inflateInit=Cp,He.inflateInit2=yl,He.inflate=Bp,He.inflateEnd=Dp,He.inflateGetHeader=Fp,He.inflateSetDictionary=Pp,He.inflateInfo="pako inflate (from Nodeca project)";var _l={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_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};function Lp(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Mp=Lp,Yt=He,Rr=tt,hn=At,Ee=_l,eo=Ma,Up=Ru,jp=Mp,ml=Object.prototype.toString;function Ot(e){if(!(this instanceof Ot))return new Ot(e);this.options=Rr.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15)===0&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Up,this.strm.avail_out=0;var t=Yt.inflateInit2(this.strm,r.windowBits);if(t!==Ee.Z_OK)throw new Error(eo[t]);if(this.header=new jp,Yt.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=hn.string2buf(r.dictionary):ml.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=Yt.inflateSetDictionary(this.strm,r.dictionary),t!==Ee.Z_OK)))throw new Error(eo[t])}Ot.prototype.push=function(e,r){var t=this.strm,n=this.options.chunkSize,u=this.options.dictionary,a,o,i,c,h,p=!1;if(this.ended)return!1;o=r===~~r?r:r===!0?Ee.Z_FINISH:Ee.Z_NO_FLUSH,typeof e=="string"?t.input=hn.binstring2buf(e):ml.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new Rr.Buf8(n),t.next_out=0,t.avail_out=n),a=Yt.inflate(t,Ee.Z_NO_FLUSH),a===Ee.Z_NEED_DICT&&u&&(a=Yt.inflateSetDictionary(this.strm,u)),a===Ee.Z_BUF_ERROR&&p===!0&&(a=Ee.Z_OK,p=!1),a!==Ee.Z_STREAM_END&&a!==Ee.Z_OK)return this.onEnd(a),this.ended=!0,!1;t.next_out&&(t.avail_out===0||a===Ee.Z_STREAM_END||t.avail_in===0&&(o===Ee.Z_FINISH||o===Ee.Z_SYNC_FLUSH))&&(this.options.to==="string"?(i=hn.utf8border(t.output,t.next_out),c=t.next_out-i,h=hn.buf2string(t.output,i),t.next_out=c,t.avail_out=n-c,c&&Rr.arraySet(t.output,t.output,i,c,0),this.onData(h)):this.onData(Rr.shrinkBuf(t.output,t.next_out))),t.avail_in===0&&t.avail_out===0&&(p=!0)}while((t.avail_in>0||t.avail_out===0)&&a!==Ee.Z_STREAM_END);return a===Ee.Z_STREAM_END&&(o=Ee.Z_FINISH),o===Ee.Z_FINISH?(a=Yt.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Ee.Z_OK):(o===Ee.Z_SYNC_FLUSH&&(this.onEnd(Ee.Z_OK),t.avail_out=0),!0)},Ot.prototype.onData=function(e){this.chunks.push(e)},Ot.prototype.onEnd=function(e){e===Ee.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Rr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function to(e,r){var t=new Ot(r);if(t.push(e,!0),t.err)throw t.msg||eo[t.err];return t.result}function $p(e,r){return r=r||{},r.raw=!0,to(e,r)}Tr.Inflate=Ot,Tr.inflate=to,Tr.inflateRaw=$p,Tr.ungzip=to;var qp=tt.assign,zp=dr,Wp=Tr,Hp=_l,bl={};qp(bl,zp,Wp,Hp);var Gp=bl,Zp=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined",Vp=Gp,wl=we(),pn=Le,Xp=Zp?"uint8array":"array";Kr.magic="\b\0";function Nt(e,r){pn.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=r,this.meta={}}wl.inherits(Nt,pn),Nt.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(wl.transformTo(Xp,e.data),!1)},Nt.prototype.flush=function(){pn.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},Nt.prototype.cleanUp=function(){pn.prototype.cleanUp.call(this),this._pako=null},Nt.prototype._createPako=function(){this._pako=new Vp[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(r){e.push({data:r,meta:e.meta})}},Kr.compressWorker=function(e){return new Nt("Deflate",e)},Kr.uncompressWorker=function(){return new Nt("Inflate",{})};var El=Le;Yr.STORE={magic:"\0\0",compressWorker:function(){return new El("STORE compression")},uncompressWorker:function(){return new El("STORE decompression")}},Yr.DEFLATE=Kr;var pt={};pt.LOCAL_FILE_HEADER="PK",pt.CENTRAL_FILE_HEADER="PK",pt.CENTRAL_DIRECTORY_END="PK",pt.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",pt.ZIP64_CENTRAL_DIRECTORY_END="PK",pt.DATA_DESCRIPTOR="PK\x07\b";var Kt=we(),Jt=Le,ro=Pt,Sl=va,yn=pt,he=function(e,r){var t="",n;for(n=0;n<r;n++)t+=String.fromCharCode(e&255),e=e>>>8;return t},Yp=function(e,r){var t=e;return e||(t=r?16893:33204),(t&65535)<<16},Kp=function(e){return(e||0)&63},xl=function(e,r,t,n,u,a){var o=e.file,i=e.compression,c=a!==ro.utf8encode,h=Kt.transformTo("string",a(o.name)),p=Kt.transformTo("string",ro.utf8encode(o.name)),_=o.comment,y=Kt.transformTo("string",a(_)),v=Kt.transformTo("string",ro.utf8encode(_)),A=p.length!==o.name.length,R=v.length!==_.length,S,g,m="",C="",x="",k=o.dir,D=o.date,U={crc32:0,compressedSize:0,uncompressedSize:0};(!r||t)&&(U.crc32=e.crc32,U.compressedSize=e.compressedSize,U.uncompressedSize=e.uncompressedSize);var q=0;r&&(q|=8),!c&&(A||R)&&(q|=2048);var O=0,Y=0;k&&(O|=16),u==="UNIX"?(Y=798,O|=Yp(o.unixPermissions,k)):(Y=20,O|=Kp(o.dosPermissions)),S=D.getUTCHours(),S=S<<6,S=S|D.getUTCMinutes(),S=S<<5,S=S|D.getUTCSeconds()/2,g=D.getUTCFullYear()-1980,g=g<<4,g=g|D.getUTCMonth()+1,g=g<<5,g=g|D.getUTCDate(),A&&(C=he(1,1)+he(Sl(h),4)+p,m+="up"+he(C.length,2)+C),R&&(x=he(1,1)+he(Sl(y),4)+v,m+="uc"+he(x.length,2)+x);var V="";V+=`
16
- \0`,V+=he(q,2),V+=i.magic,V+=he(S,2),V+=he(g,2),V+=he(U.crc32,4),V+=he(U.compressedSize,4),V+=he(U.uncompressedSize,4),V+=he(h.length,2),V+=he(m.length,2);var K=yn.LOCAL_FILE_HEADER+V+h+m,ae=yn.CENTRAL_FILE_HEADER+he(Y,2)+V+he(y.length,2)+"\0\0\0\0"+he(O,4)+he(n,4)+h+m+y;return{fileRecord:K,dirRecord:ae}},Jp=function(e,r,t,n,u){var a="",o=Kt.transformTo("string",u(n));return a=yn.CENTRAL_DIRECTORY_END+"\0\0\0\0"+he(e,2)+he(e,2)+he(r,4)+he(t,4)+he(o.length,2)+o,a},Qp=function(e){var r="";return r=yn.DATA_DESCRIPTOR+he(e.crc32,4)+he(e.compressedSize,4)+he(e.uncompressedSize,4),r};function Ge(e,r,t,n){Jt.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=r,this.zipPlatform=t,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}Kt.inherits(Ge,Jt),Ge.prototype.push=function(e){var r=e.meta.percent||0,t=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,Jt.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:t?(r+100*(t-n-1))/t:100}}))},Ge.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var r=this.streamFiles&&!e.file.dir;if(r){var t=xl(e,r,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0},Ge.prototype.closedSource=function(e){this.accumulate=!1;var r=this.streamFiles&&!e.file.dir,t=xl(e,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),r)this.push({data:Qp(e),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},Ge.prototype.flush=function(){for(var e=this.bytesWritten,r=0;r<this.dirRecords.length;r++)this.push({data:this.dirRecords[r],meta:{percent:100}});var t=this.bytesWritten-e,n=Jp(this.dirRecords.length,t,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},Ge.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},Ge.prototype.registerPrevious=function(e){this._sources.push(e);var r=this;return e.on("data",function(t){r.processChunk(t)}),e.on("end",function(){r.closedSource(r.previous.streamInfo),r._sources.length?r.prepareNextSource():r.end()}),e.on("error",function(t){r.error(t)}),this},Ge.prototype.resume=function(){if(!Jt.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0},Ge.prototype.error=function(e){var r=this._sources;if(!Jt.prototype.error.call(this,e))return!1;for(var t=0;t<r.length;t++)try{r[t].error(e)}catch(n){}return!0},Ge.prototype.lock=function(){Jt.prototype.lock.call(this);for(var e=this._sources,r=0;r<e.length;r++)e[r].lock()};var e0=Ge,t0=Yr,r0=e0,n0=function(e,r){var t=e||r,n=t0[t];if(!n)throw new Error(t+" is not a valid compression method !");return n};Hs.generateWorker=function(e,r,t){var n=new r0(r.streamFiles,t,r.platform,r.encodeFileName),u=0;try{e.forEach(function(a,o){u++;var i=n0(o.options.compression,r.compression),c=o.options.compressionOptions||r.compressionOptions||{},h=o.dir,p=o.date;o._compressWorker(i,c).withStreamInfo("file",{name:a,dir:h,date:p,comment:o.comment||"",unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions}).pipe(n)}),n.entriesCount=u}catch(a){n.error(a)}return n};var i0=we(),gn=Le;function Ir(e,r){gn.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(r)}i0.inherits(Ir,gn),Ir.prototype._bindStream=function(e){var r=this;this._stream=e,e.pause(),e.on("data",function(t){r.push({data:t,meta:{percent:0}})}).on("error",function(t){r.isPaused?this.generatedError=t:r.error(t)}).on("end",function(){r.isPaused?r._upstreamEnded=!0:r.end()})},Ir.prototype.pause=function(){return gn.prototype.pause.call(this)?(this._stream.pause(),!0):!1},Ir.prototype.resume=function(){return gn.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),!0):!1};var a0=Ir,o0=Pt,Or=we(),Tl=Le,f0=Ps,Al=Me,Rl=Sa,s0=eh,u0=Hs,Il=Zr,l0=a0,Ol=function(e,r,t){var n=Or.getTypeOf(r),u,a=Or.extend(t||{},Al);a.date=a.date||new Date,a.compression!==null&&(a.compression=a.compression.toUpperCase()),typeof a.unixPermissions=="string"&&(a.unixPermissions=parseInt(a.unixPermissions,8)),a.unixPermissions&&a.unixPermissions&16384&&(a.dir=!0),a.dosPermissions&&a.dosPermissions&16&&(a.dir=!0),a.dir&&(e=Nl(e)),a.createFolders&&(u=c0(e))&&Cl.call(this,u,!0);var o=n==="string"&&a.binary===!1&&a.base64===!1;(!t||typeof t.binary=="undefined")&&(a.binary=!o);var i=r instanceof Rl&&r.uncompressedSize===0;(i||a.dir||!r||r.length===0)&&(a.base64=!1,a.binary=!0,r="",a.compression="STORE",n="string");var c=null;r instanceof Rl||r instanceof Tl?c=r:Il.isNode&&Il.isStream(r)?c=new l0(e,r):c=Or.prepareContent(e,r,a.binary,a.optimizedBinaryString,a.base64);var h=new s0(e,c,a);this.files[e]=h},c0=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var r=e.lastIndexOf("/");return r>0?e.substring(0,r):""},Nl=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},Cl=function(e,r){return r=typeof r!="undefined"?r:Al.createFolders,e=Nl(e),this.files[e]||Ol.call(this,e,null,{dir:!0,createFolders:r}),this.files[e]};function kl(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var d0={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var r,t,n;for(r in this.files)n=this.files[r],t=r.slice(this.root.length,r.length),t&&r.slice(0,this.root.length)===this.root&&e(t,n)},filter:function(e){var r=[];return this.forEach(function(t,n){e(t,n)&&r.push(n)}),r},file:function(e,r,t){if(arguments.length===1)if(kl(e)){var n=e;return this.filter(function(a,o){return!o.dir&&n.test(a)})}else{var u=this.files[this.root+e];return u&&!u.dir?u:null}else e=this.root+e,Ol.call(this,e,r,t);return this},folder:function(e){if(!e)return this;if(kl(e))return this.filter(function(u,a){return a.dir&&e.test(u)});var r=this.root+e,t=Cl.call(this,r),n=this.clone();return n.root=t.name,n},remove:function(e){e=this.root+e;var r=this.files[e];if(r||(e.slice(-1)!=="/"&&(e+="/"),r=this.files[e]),r&&!r.dir)delete this.files[e];else for(var t=this.filter(function(u,a){return a.name.slice(0,e.length)===e}),n=0;n<t.length;n++)delete this.files[t[n].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var r,t={};try{if(t=Or.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o0.utf8encode}),t.type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),t.type==="binarystring"&&(t.type="string"),!t.type)throw new Error("No output type specified.");Or.checkSupport(t.type),(t.platform==="darwin"||t.platform==="freebsd"||t.platform==="linux"||t.platform==="sunos")&&(t.platform="UNIX"),t.platform==="win32"&&(t.platform="DOS");var n=t.comment||this.comment||"";r=u0.generateWorker(this,t,n)}catch(u){r=new Tl("error"),r.error(u)}return new f0(r,t.type||"string",t.mimeType)},generateAsync:function(e,r){return this.generateInternalStream(e).accumulate(r)},generateNodeStream:function(e,r){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(r)}},h0=d0,p0=we();function Bl(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}Bl.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var r=0,t;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return p0.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};var Dl=Bl,Fl=Dl,y0=we();function Qt(e){Fl.call(this,e);for(var r=0;r<this.data.length;r++)e[r]=e[r]&255}y0.inherits(Qt,Fl),Qt.prototype.byteAt=function(e){return this.data[this.zero+e]},Qt.prototype.lastIndexOfSignature=function(e){for(var r=e.charCodeAt(0),t=e.charCodeAt(1),n=e.charCodeAt(2),u=e.charCodeAt(3),a=this.length-4;a>=0;--a)if(this.data[a]===r&&this.data[a+1]===t&&this.data[a+2]===n&&this.data[a+3]===u)return a-this.zero;return-1},Qt.prototype.readAndCheckSignature=function(e){var r=e.charCodeAt(0),t=e.charCodeAt(1),n=e.charCodeAt(2),u=e.charCodeAt(3),a=this.readData(4);return r===a[0]&&t===a[1]&&n===a[2]&&u===a[3]},Qt.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};var Pl=Qt,Ll=Dl,g0=we();function er(e){Ll.call(this,e)}g0.inherits(er,Ll),er.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},er.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},er.prototype.readAndCheckSignature=function(e){var r=this.readData(4);return e===r},er.prototype.readData=function(e){this.checkOffset(e);var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};var v0=er,Ml=Pl,_0=we();function no(e){Ml.call(this,e)}_0.inherits(no,Ml),no.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var r=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};var Ul=no,jl=Ul,m0=we();function io(e){jl.call(this,e)}m0.inherits(io,jl),io.prototype.readData=function(e){this.checkOffset(e);var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};var b0=io,vn=we(),$l=xe,w0=Pl,E0=v0,S0=b0,x0=Ul,ql=function(e){var r=vn.getTypeOf(e);return vn.checkSupport(r),r==="string"&&!$l.uint8array?new E0(e):r==="nodebuffer"?new S0(e):$l.uint8array?new x0(vn.transformTo("uint8array",e)):new w0(vn.transformTo("array",e))},ao=ql,yt=we(),T0=Sa,zl=va,_n=Pt,mn=Yr,A0=xe,R0=0,I0=3,O0=function(e){for(var r in mn)if(Object.prototype.hasOwnProperty.call(mn,r)&&mn[r].magic===e)return mn[r];return null};function Wl(e,r){this.options=e,this.loadOptions=r}Wl.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(e){var r,t;if(e.skip(22),this.fileNameLength=e.readInt(2),t=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(t),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(r=O0(this.compressionMethod),r===null)throw new Error("Corrupted zip : compression "+yt.pretty(this.compressionMethod)+" unknown (inner file : "+yt.transformTo("string",this.fileName)+")");this.decompressed=new T0(this.compressedSize,this.uncompressedSize,this.crc32,r,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var r=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(r),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===R0&&(this.dosPermissions=this.externalFileAttributes&63),e===I0&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=ao(this.extraFields[1].value);this.uncompressedSize===yt.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===yt.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===yt.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===yt.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var r=e.index+this.extraFieldsLength,t,n,u;for(this.extraFields||(this.extraFields={});e.index+4<r;)t=e.readInt(2),n=e.readInt(2),u=e.readData(n),this.extraFields[t]={id:t,length:n,value:u};e.setIndex(r)},handleUTF8:function(){var e=A0.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=_n.utf8decode(this.fileName),this.fileCommentStr=_n.utf8decode(this.fileComment);else{var r=this.findExtraFieldUnicodePath();if(r!==null)this.fileNameStr=r;else{var t=yt.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(t)}var n=this.findExtraFieldUnicodeComment();if(n!==null)this.fileCommentStr=n;else{var u=yt.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(u)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var r=ao(e.value);return r.readInt(1)!==1||zl(this.fileName)!==r.readInt(4)?null:_n.utf8decode(r.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var r=ao(e.value);return r.readInt(1)!==1||zl(this.fileComment)!==r.readInt(4)?null:_n.utf8decode(r.readData(e.length-5))}return null}};var N0=Wl,C0=ql,it=we(),Ze=pt,k0=N0,B0=xe;function Hl(e){this.files=[],this.loadOptions=e}Hl.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var r=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+it.pretty(r)+", expected "+it.pretty(e)+")")}},isSignature:function(e,r){var t=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4),u=n===r;return this.reader.setIndex(t),u},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),r=B0.uint8array?"uint8array":"array",t=it.transformTo(r,e);this.zipComment=this.loadOptions.decodeFileName(t)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e=this.zip64EndOfCentralSize-44,r=0,t,n,u;r<e;)t=this.reader.readInt(2),n=this.reader.readInt(4),u=this.reader.readData(n),this.zip64ExtensibleData[t]={id:t,length:n,value:u}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,r;for(e=0;e<this.files.length;e++)r=this.files[e],this.reader.setIndex(r.localHeaderOffset),this.checkSignature(Ze.LOCAL_FILE_HEADER),r.readLocalPart(this.reader),r.handleUTF8(),r.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(Ze.CENTRAL_FILE_HEADER);)e=new k0({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(Ze.CENTRAL_DIRECTORY_END);if(e<0){var r=!this.isSignature(0,Ze.LOCAL_FILE_HEADER);throw r?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var t=e;if(this.checkSignature(Ze.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===it.MAX_VALUE_16BITS||this.diskWithCentralDirStart===it.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===it.MAX_VALUE_16BITS||this.centralDirRecords===it.MAX_VALUE_16BITS||this.centralDirSize===it.MAX_VALUE_32BITS||this.centralDirOffset===it.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(Ze.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(Ze.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,Ze.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(Ze.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(Ze.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var n=this.centralDirOffset+this.centralDirSize;this.zip64&&(n+=20,n+=12+this.zip64EndOfCentralSize);var u=t-n;if(u>0)this.isSignature(t,Ze.CENTRAL_FILE_HEADER)||(this.reader.zero=u);else if(u<0)throw new Error("Corrupted zip: missing "+Math.abs(u)+" bytes.")},prepareReader:function(e){this.reader=C0(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var D0=Hl,oo=we(),bn=cr,F0=Pt,P0=D0,L0=js,Gl=Zr;function M0(e){return new bn.Promise(function(r,t){var n=e.decompressed.getContentWorker().pipe(new L0);n.on("error",function(u){t(u)}).on("end",function(){n.streamInfo.crc32!==e.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):r()}).resume()})}var U0=function(e,r){var t=this;return r=oo.extend(r||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:F0.utf8decode}),Gl.isNode&&Gl.isStream(e)?bn.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):oo.prepareContent("the loaded zip file",e,!0,r.optimizedBinaryString,r.base64).then(function(n){var u=new P0(r);return u.load(n),u}).then(function(u){var a=[bn.Promise.resolve(u)],o=u.files;if(r.checkCRC32)for(var i=0;i<o.length;i++)a.push(M0(o[i]));return bn.Promise.all(a)}).then(function(u){for(var a=u.shift(),o=a.files,i=0;i<o.length;i++){var c=o[i],h=c.fileNameStr,p=oo.resolve(c.fileNameStr);t.file(p,c.decompressed,{binary:!0,optimizedBinaryString:!0,date:c.date,dir:c.dir,comment:c.fileCommentStr.length?c.fileCommentStr:null,unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions,createFolders:r.createFolders}),c.dir||(t.file(p).unsafeOriginalName=h)}return a.zipComment.length&&(t.comment=a.zipComment),t})};function qe(){if(!(this instanceof qe))return new qe;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new qe;for(var r in this)typeof this[r]!="function"&&(e[r]=this[r]);return e}}qe.prototype=h0,qe.prototype.loadAsync=U0,qe.support=xe,qe.defaults=Me,qe.version="3.10.2",qe.loadAsync=function(e,r){return new qe().loadAsync(e,r)},qe.external=cr;var j0=qe;const Zl=e=>j0.loadAsync(e),wn=(e,r)=>{const t=e.file(r);return t?t.async("text"):null},Ct=(e,r,t)=>e.file(r,t,{binary:!1}),$0=(e,r)=>e.generateAsync({type:"uint8array",compression:"DEFLATE",compressionOptions:{level:r}});var Vl={};(function(e){(function(r){r.parser=function(f,s){return new n(f,s)},r.SAXParser=n,r.SAXStream=p,r.createStream=h,r.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(f,s){if(!(this instanceof n))return new n(f,s);var I=this;a(I),I.q=I.c="",I.bufferCheckPosition=r.MAX_BUFFER_LENGTH,I.opt=s||{},I.opt.lowercase=I.opt.lowercase||I.opt.lowercasetags,I.looseCase=I.opt.lowercase?"toLowerCase":"toUpperCase",I.tags=[],I.closed=I.closedRoot=I.sawRoot=!1,I.tag=I.error=null,I.strict=!!f,I.noscript=!!(f||I.opt.noscript),I.state=O.BEGIN,I.strictEntities=I.opt.strictEntities,I.ENTITIES=I.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),I.attribList=[],I.opt.xmlns&&(I.ns=Object.create(R)),I.trackPosition=I.opt.position!==!1,I.trackPosition&&(I.position=I.line=I.column=0),V(I,"onready")}Object.create||(Object.create=function(f){function s(){}s.prototype=f;var I=new s;return I}),Object.keys||(Object.keys=function(f){var s=[];for(var I in f)f.hasOwnProperty(I)&&s.push(I);return s});function u(f){for(var s=Math.max(r.MAX_BUFFER_LENGTH,10),I=0,T=0,E=t.length;T<E;T++){var w=f[t[T]].length;if(w>s)switch(t[T]){case"textNode":ae(f);break;case"cdata":K(f,"oncdata",f.cdata),f.cdata="";break;case"script":K(f,"onscript",f.script),f.script="";break;default:fe(f,"Max buffer length exceeded: "+t[T])}I=Math.max(I,w)}var M=r.MAX_BUFFER_LENGTH-I;f.bufferCheckPosition=M+f.position}function a(f){for(var s=0,I=t.length;s<I;s++)f[t[s]]=""}function o(f){ae(f),f.cdata!==""&&(K(f,"oncdata",f.cdata),f.cdata=""),f.script!==""&&(K(f,"onscript",f.script),f.script="")}n.prototype={end:function(){ue(this)},write:L,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var i;try{i=jr().Stream}catch(f){i=function(){}}i||(i=function(){});var c=r.EVENTS.filter(function(f){return f!=="error"&&f!=="end"});function h(f,s){return new p(f,s)}function p(f,s){if(!(this instanceof p))return new p(f,s);i.apply(this),this._parser=new n(f,s),this.writable=!0,this.readable=!0;var I=this;this._parser.onend=function(){I.emit("end")},this._parser.onerror=function(T){I.emit("error",T),I._parser.error=null},this._decoder=null,c.forEach(function(T){Object.defineProperty(I,"on"+T,{get:function(){return I._parser["on"+T]},set:function(E){if(!E)return I.removeAllListeners(T),I._parser["on"+T]=E,E;I.on(T,E)},enumerable:!0,configurable:!1})})}p.prototype=Object.create(i.prototype,{constructor:{value:p}}),p.prototype.write=function(f){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(f)){if(!this._decoder){var s=ur().StringDecoder;this._decoder=new s("utf8")}f=this._decoder.write(f)}return this._parser.write(f.toString()),this.emit("data",f),!0},p.prototype.end=function(f){return f&&f.length&&this.write(f),this._parser.end(),!0},p.prototype.on=function(f,s){var I=this;return!I._parser["on"+f]&&c.indexOf(f)!==-1&&(I._parser["on"+f]=function(){var T=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);T.splice(0,0,f),I.emit.apply(I,T)}),i.prototype.on.call(I,f,s)};var _="[CDATA[",y="DOCTYPE",v="http://www.w3.org/XML/1998/namespace",A="http://www.w3.org/2000/xmlns/",R={xml:v,xmlns:A},S=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,g=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,m=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,C=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function x(f){return f===" "||f===`
17
- `||f==="\r"||f===" "}function k(f){return f==='"'||f==="'"}function D(f){return f===">"||x(f)}function U(f,s){return f.test(s)}function q(f,s){return!U(f,s)}var O=0;r.STATE={BEGIN:O++,BEGIN_WHITESPACE:O++,TEXT:O++,TEXT_ENTITY:O++,OPEN_WAKA:O++,SGML_DECL:O++,SGML_DECL_QUOTED:O++,DOCTYPE:O++,DOCTYPE_QUOTED:O++,DOCTYPE_DTD:O++,DOCTYPE_DTD_QUOTED:O++,COMMENT_STARTING:O++,COMMENT:O++,COMMENT_ENDING:O++,COMMENT_ENDED:O++,CDATA:O++,CDATA_ENDING:O++,CDATA_ENDING_2:O++,PROC_INST:O++,PROC_INST_BODY:O++,PROC_INST_ENDING:O++,OPEN_TAG:O++,OPEN_TAG_SLASH:O++,ATTRIB:O++,ATTRIB_NAME:O++,ATTRIB_NAME_SAW_WHITE:O++,ATTRIB_VALUE:O++,ATTRIB_VALUE_QUOTED:O++,ATTRIB_VALUE_CLOSED:O++,ATTRIB_VALUE_UNQUOTED:O++,ATTRIB_VALUE_ENTITY_Q:O++,ATTRIB_VALUE_ENTITY_U:O++,CLOSE_TAG:O++,CLOSE_TAG_SAW_WHITE:O++,SCRIPT:O++,SCRIPT_ENDING:O++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(r.ENTITIES).forEach(function(f){var s=r.ENTITIES[f],I=typeof s=="number"?String.fromCharCode(s):s;r.ENTITIES[f]=I});for(var Y in r.STATE)r.STATE[r.STATE[Y]]=Y;O=r.STATE;function V(f,s,I){f[s]&&f[s](I)}function K(f,s,I){f.textNode&&ae(f),V(f,s,I)}function ae(f){f.textNode=re(f.opt,f.textNode),f.textNode&&V(f,"ontext",f.textNode),f.textNode=""}function re(f,s){return f.trim&&(s=s.trim()),f.normalize&&(s=s.replace(/\s+/g," ")),s}function fe(f,s){return ae(f),f.trackPosition&&(s+=`
18
- Line: `+f.line+`
19
- Column: `+f.column+`
20
- Char: `+f.c),s=new Error(s),f.error=s,V(f,"onerror",s),f}function ue(f){return f.sawRoot&&!f.closedRoot&&F(f,"Unclosed root tag"),f.state!==O.BEGIN&&f.state!==O.BEGIN_WHITESPACE&&f.state!==O.TEXT&&fe(f,"Unexpected end"),ae(f),f.c="",f.closed=!0,V(f,"onend"),n.call(f,f.strict,f.opt),f}function F(f,s){if(typeof f!="object"||!(f instanceof n))throw new Error("bad call to strictFail");f.strict&&fe(f,s)}function j(f){f.strict||(f.tagName=f.tagName[f.looseCase]());var s=f.tags[f.tags.length-1]||f,I=f.tag={name:f.tagName,attributes:{}};f.opt.xmlns&&(I.ns=s.ns),f.attribList.length=0,K(f,"onopentagstart",I)}function Z(f,s){var I=f.indexOf(":"),T=I<0?["",f]:f.split(":"),E=T[0],w=T[1];return s&&f==="xmlns"&&(E="xmlns",w=""),{prefix:E,local:w}}function J(f){if(f.strict||(f.attribName=f.attribName[f.looseCase]()),f.attribList.indexOf(f.attribName)!==-1||f.tag.attributes.hasOwnProperty(f.attribName)){f.attribName=f.attribValue="";return}if(f.opt.xmlns){var s=Z(f.attribName,!0),I=s.prefix,T=s.local;if(I==="xmlns")if(T==="xml"&&f.attribValue!==v)F(f,"xml: prefix must be bound to "+v+`
21
- Actual: `+f.attribValue);else if(T==="xmlns"&&f.attribValue!==A)F(f,"xmlns: prefix must be bound to "+A+`
22
- Actual: `+f.attribValue);else{var E=f.tag,w=f.tags[f.tags.length-1]||f;E.ns===w.ns&&(E.ns=Object.create(w.ns)),E.ns[T]=f.attribValue}f.attribList.push([f.attribName,f.attribValue])}else f.tag.attributes[f.attribName]=f.attribValue,K(f,"onattribute",{name:f.attribName,value:f.attribValue});f.attribName=f.attribValue=""}function B(f,s){if(f.opt.xmlns){var I=f.tag,T=Z(f.tagName);I.prefix=T.prefix,I.local=T.local,I.uri=I.ns[T.prefix]||"",I.prefix&&!I.uri&&(F(f,"Unbound namespace prefix: "+JSON.stringify(f.tagName)),I.uri=T.prefix);var E=f.tags[f.tags.length-1]||f;I.ns&&E.ns!==I.ns&&Object.keys(I.ns).forEach(function(ye){K(f,"onopennamespace",{prefix:ye,uri:I.ns[ye]})});for(var w=0,M=f.attribList.length;w<M;w++){var X=f.attribList[w],ie=X[0],Q=X[1],te=Z(ie,!0),ce=te.prefix,W=te.local,Se=ce===""?"":I.ns[ce]||"",pe={name:ie,value:Q,prefix:ce,local:W,uri:Se};ce&&ce!=="xmlns"&&!Se&&(F(f,"Unbound namespace prefix: "+JSON.stringify(ce)),pe.uri=ce),f.tag.attributes[ie]=pe,K(f,"onattribute",pe)}f.attribList.length=0}f.tag.isSelfClosing=!!s,f.sawRoot=!0,f.tags.push(f.tag),K(f,"onopentag",f.tag),s||(!f.noscript&&f.tagName.toLowerCase()==="script"?f.state=O.SCRIPT:f.state=O.TEXT,f.tag=null,f.tagName=""),f.attribName=f.attribValue="",f.attribList.length=0}function $(f){if(!f.tagName){F(f,"Weird empty close tag."),f.textNode+="</>",f.state=O.TEXT;return}if(f.script){if(f.tagName!=="script"){f.script+="</"+f.tagName+">",f.tagName="",f.state=O.SCRIPT;return}K(f,"onscript",f.script),f.script=""}var s=f.tags.length,I=f.tagName;f.strict||(I=I[f.looseCase]());for(var T=I;s--;){var E=f.tags[s];if(E.name!==T)F(f,"Unexpected close tag");else break}if(s<0){F(f,"Unmatched closing tag: "+f.tagName),f.textNode+="</"+f.tagName+">",f.state=O.TEXT;return}f.tagName=I;for(var w=f.tags.length;w-- >s;){var M=f.tag=f.tags.pop();f.tagName=f.tag.name,K(f,"onclosetag",f.tagName);var X={};for(var ie in M.ns)X[ie]=M.ns[ie];var Q=f.tags[f.tags.length-1]||f;f.opt.xmlns&&M.ns!==Q.ns&&Object.keys(M.ns).forEach(function(te){var ce=M.ns[te];K(f,"onclosenamespace",{prefix:te,uri:ce})})}s===0&&(f.closedRoot=!0),f.tagName=f.attribValue=f.attribName="",f.attribList.length=0,f.state=O.TEXT}function G(f){var s=f.entity,I=s.toLowerCase(),T,E="";return f.ENTITIES[s]?f.ENTITIES[s]:f.ENTITIES[I]?f.ENTITIES[I]:(s=I,s.charAt(0)==="#"&&(s.charAt(1)==="x"?(s=s.slice(2),T=parseInt(s,16),E=T.toString(16)):(s=s.slice(1),T=parseInt(s,10),E=T.toString(10))),s=s.replace(/^0+/,""),isNaN(T)||E.toLowerCase()!==s?(F(f,"Invalid character entity"),"&"+f.entity+";"):String.fromCodePoint(T))}function ee(f,s){s==="<"?(f.state=O.OPEN_WAKA,f.startTagPosition=f.position):x(s)||(F(f,"Non-whitespace before first tag."),f.textNode=s,f.state=O.TEXT)}function ne(f,s){var I="";return s<f.length&&(I=f.charAt(s)),I}function L(f){var s=this;if(this.error)throw this.error;if(s.closed)return fe(s,"Cannot write after close. Assign an onready handler.");if(f===null)return ue(s);typeof f=="object"&&(f=f.toString());for(var I=0,T="";T=ne(f,I++),s.c=T,!!T;)switch(s.trackPosition&&(s.position++,T===`
23
- `?(s.line++,s.column=0):s.column++),s.state){case O.BEGIN:if(s.state=O.BEGIN_WHITESPACE,T==="\uFEFF")continue;ee(s,T);continue;case O.BEGIN_WHITESPACE:ee(s,T);continue;case O.TEXT:if(s.sawRoot&&!s.closedRoot){for(var E=I-1;T&&T!=="<"&&T!=="&";)T=ne(f,I++),T&&s.trackPosition&&(s.position++,T===`
24
- `?(s.line++,s.column=0):s.column++);s.textNode+=f.substring(E,I-1)}T==="<"&&!(s.sawRoot&&s.closedRoot&&!s.strict)?(s.state=O.OPEN_WAKA,s.startTagPosition=s.position):(!x(T)&&(!s.sawRoot||s.closedRoot)&&F(s,"Text data outside of root node."),T==="&"?s.state=O.TEXT_ENTITY:s.textNode+=T);continue;case O.SCRIPT:T==="<"?s.state=O.SCRIPT_ENDING:s.script+=T;continue;case O.SCRIPT_ENDING:T==="/"?s.state=O.CLOSE_TAG:(s.script+="<"+T,s.state=O.SCRIPT);continue;case O.OPEN_WAKA:if(T==="!")s.state=O.SGML_DECL,s.sgmlDecl="";else if(!x(T))if(U(S,T))s.state=O.OPEN_TAG,s.tagName=T;else if(T==="/")s.state=O.CLOSE_TAG,s.tagName="";else if(T==="?")s.state=O.PROC_INST,s.procInstName=s.procInstBody="";else{if(F(s,"Unencoded <"),s.startTagPosition+1<s.position){var w=s.position-s.startTagPosition;T=new Array(w).join(" ")+T}s.textNode+="<"+T,s.state=O.TEXT}continue;case O.SGML_DECL:(s.sgmlDecl+T).toUpperCase()===_?(K(s,"onopencdata"),s.state=O.CDATA,s.sgmlDecl="",s.cdata=""):s.sgmlDecl+T==="--"?(s.state=O.COMMENT,s.comment="",s.sgmlDecl=""):(s.sgmlDecl+T).toUpperCase()===y?(s.state=O.DOCTYPE,(s.doctype||s.sawRoot)&&F(s,"Inappropriately located doctype declaration"),s.doctype="",s.sgmlDecl=""):T===">"?(K(s,"onsgmldeclaration",s.sgmlDecl),s.sgmlDecl="",s.state=O.TEXT):(k(T)&&(s.state=O.SGML_DECL_QUOTED),s.sgmlDecl+=T);continue;case O.SGML_DECL_QUOTED:T===s.q&&(s.state=O.SGML_DECL,s.q=""),s.sgmlDecl+=T;continue;case O.DOCTYPE:T===">"?(s.state=O.TEXT,K(s,"ondoctype",s.doctype),s.doctype=!0):(s.doctype+=T,T==="["?s.state=O.DOCTYPE_DTD:k(T)&&(s.state=O.DOCTYPE_QUOTED,s.q=T));continue;case O.DOCTYPE_QUOTED:s.doctype+=T,T===s.q&&(s.q="",s.state=O.DOCTYPE);continue;case O.DOCTYPE_DTD:s.doctype+=T,T==="]"?s.state=O.DOCTYPE:k(T)&&(s.state=O.DOCTYPE_DTD_QUOTED,s.q=T);continue;case O.DOCTYPE_DTD_QUOTED:s.doctype+=T,T===s.q&&(s.state=O.DOCTYPE_DTD,s.q="");continue;case O.COMMENT:T==="-"?s.state=O.COMMENT_ENDING:s.comment+=T;continue;case O.COMMENT_ENDING:T==="-"?(s.state=O.COMMENT_ENDED,s.comment=re(s.opt,s.comment),s.comment&&K(s,"oncomment",s.comment),s.comment=""):(s.comment+="-"+T,s.state=O.COMMENT);continue;case O.COMMENT_ENDED:T!==">"?(F(s,"Malformed comment"),s.comment+="--"+T,s.state=O.COMMENT):s.state=O.TEXT;continue;case O.CDATA:T==="]"?s.state=O.CDATA_ENDING:s.cdata+=T;continue;case O.CDATA_ENDING:T==="]"?s.state=O.CDATA_ENDING_2:(s.cdata+="]"+T,s.state=O.CDATA);continue;case O.CDATA_ENDING_2:T===">"?(s.cdata&&K(s,"oncdata",s.cdata),K(s,"onclosecdata"),s.cdata="",s.state=O.TEXT):T==="]"?s.cdata+="]":(s.cdata+="]]"+T,s.state=O.CDATA);continue;case O.PROC_INST:T==="?"?s.state=O.PROC_INST_ENDING:x(T)?s.state=O.PROC_INST_BODY:s.procInstName+=T;continue;case O.PROC_INST_BODY:if(!s.procInstBody&&x(T))continue;T==="?"?s.state=O.PROC_INST_ENDING:s.procInstBody+=T;continue;case O.PROC_INST_ENDING:T===">"?(K(s,"onprocessinginstruction",{name:s.procInstName,body:s.procInstBody}),s.procInstName=s.procInstBody="",s.state=O.TEXT):(s.procInstBody+="?"+T,s.state=O.PROC_INST_BODY);continue;case O.OPEN_TAG:U(g,T)?s.tagName+=T:(j(s),T===">"?B(s):T==="/"?s.state=O.OPEN_TAG_SLASH:(x(T)||F(s,"Invalid character in tag name"),s.state=O.ATTRIB));continue;case O.OPEN_TAG_SLASH:T===">"?(B(s,!0),$(s)):(F(s,"Forward-slash in opening tag not followed by >"),s.state=O.ATTRIB);continue;case O.ATTRIB:if(x(T))continue;T===">"?B(s):T==="/"?s.state=O.OPEN_TAG_SLASH:U(S,T)?(s.attribName=T,s.attribValue="",s.state=O.ATTRIB_NAME):F(s,"Invalid attribute name");continue;case O.ATTRIB_NAME:T==="="?s.state=O.ATTRIB_VALUE:T===">"?(F(s,"Attribute without value"),s.attribValue=s.attribName,J(s),B(s)):x(T)?s.state=O.ATTRIB_NAME_SAW_WHITE:U(g,T)?s.attribName+=T:F(s,"Invalid attribute name");continue;case O.ATTRIB_NAME_SAW_WHITE:if(T==="=")s.state=O.ATTRIB_VALUE;else{if(x(T))continue;F(s,"Attribute without value"),s.tag.attributes[s.attribName]="",s.attribValue="",K(s,"onattribute",{name:s.attribName,value:""}),s.attribName="",T===">"?B(s):U(S,T)?(s.attribName=T,s.state=O.ATTRIB_NAME):(F(s,"Invalid attribute name"),s.state=O.ATTRIB)}continue;case O.ATTRIB_VALUE:if(x(T))continue;k(T)?(s.q=T,s.state=O.ATTRIB_VALUE_QUOTED):(F(s,"Unquoted attribute value"),s.state=O.ATTRIB_VALUE_UNQUOTED,s.attribValue=T);continue;case O.ATTRIB_VALUE_QUOTED:if(T!==s.q){T==="&"?s.state=O.ATTRIB_VALUE_ENTITY_Q:s.attribValue+=T;continue}J(s),s.q="",s.state=O.ATTRIB_VALUE_CLOSED;continue;case O.ATTRIB_VALUE_CLOSED:x(T)?s.state=O.ATTRIB:T===">"?B(s):T==="/"?s.state=O.OPEN_TAG_SLASH:U(S,T)?(F(s,"No whitespace between attributes"),s.attribName=T,s.attribValue="",s.state=O.ATTRIB_NAME):F(s,"Invalid attribute name");continue;case O.ATTRIB_VALUE_UNQUOTED:if(!D(T)){T==="&"?s.state=O.ATTRIB_VALUE_ENTITY_U:s.attribValue+=T;continue}J(s),T===">"?B(s):s.state=O.ATTRIB;continue;case O.CLOSE_TAG:if(s.tagName)T===">"?$(s):U(g,T)?s.tagName+=T:s.script?(s.script+="</"+s.tagName,s.tagName="",s.state=O.SCRIPT):(x(T)||F(s,"Invalid tagname in closing tag"),s.state=O.CLOSE_TAG_SAW_WHITE);else{if(x(T))continue;q(S,T)?s.script?(s.script+="</"+T,s.state=O.SCRIPT):F(s,"Invalid tagname in closing tag."):s.tagName=T}continue;case O.CLOSE_TAG_SAW_WHITE:if(x(T))continue;T===">"?$(s):F(s,"Invalid characters in closing tag");continue;case O.TEXT_ENTITY:case O.ATTRIB_VALUE_ENTITY_Q:case O.ATTRIB_VALUE_ENTITY_U:var M,X;switch(s.state){case O.TEXT_ENTITY:M=O.TEXT,X="textNode";break;case O.ATTRIB_VALUE_ENTITY_Q:M=O.ATTRIB_VALUE_QUOTED,X="attribValue";break;case O.ATTRIB_VALUE_ENTITY_U:M=O.ATTRIB_VALUE_UNQUOTED,X="attribValue";break}if(T===";")if(s.opt.unparsedEntities){var ie=G(s);s.entity="",s.state=M,s.write(ie)}else s[X]+=G(s),s.entity="",s.state=M;else U(s.entity.length?C:m,T)?s.entity+=T:(F(s,"Invalid character in entity name"),s[X]+="&"+s.entity+T,s.entity="",s.state=M);continue;default:throw new Error(s,"Unknown state: "+s.state)}return s.position>=s.bufferCheckPosition&&u(s),s}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||(function(){var f=String.fromCharCode,s=Math.floor,I=function(){var T=16384,E=[],w,M,X=-1,ie=arguments.length;if(!ie)return"";for(var Q="";++X<ie;){var te=Number(arguments[X]);if(!isFinite(te)||te<0||te>1114111||s(te)!==te)throw RangeError("Invalid code point: "+te);te<=65535?E.push(te):(te-=65536,w=(te>>10)+55296,M=te%1024+56320,E.push(w,M)),(X+1===ie||E.length>T)&&(Q+=f.apply(null,E),E.length=0)}return Q};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:I,configurable:!0,writable:!0}):String.fromCodePoint=I})()})(e)})(Vl);const ze={debug:()=>{}},En=e=>{const r=Vl.parser(!0,{trim:!1,normalize:!1});let t,n=null;return new Promise((u,a)=>{r.onopentag=o=>{const i={_parent:n||void 0,_children:[],_fTextNode:!1,_tag:o.name,_attrs:o.attributes};n!=null?n._children.push(i):t=i,n=i},r.onclosetag=()=>{n=n!=null?n._parent:null},r.ontext=o=>{n!=null&&n._children.push({_parent:n,_children:[],_fTextNode:!0,_text:o})},r.onend=()=>{u(t)},r.onerror=o=>{a(o)},r.write(e),r.end()})};function kt(e,r,t="",n=!0){const u=t.length||!n?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>',a=[Buffer.from(u,"utf-8")];if(e._fTextNode)a.push(Buffer.from(q0(e._text,r)));else{let o="";const i=e._attrs;Object.keys(i).forEach(y=>{o+=` ${y}="${z0(i[y])}"`});const c=e._children.length>0,h=c?"":"/",p=r.indentXml?`
25
- ${t}`:"";a.push(Buffer.from(`${p}<${e._tag}${o}${h}>`));let _=!1;if(e._children.forEach(y=>{a.push(kt(y,r,r.indentXml?`${t} `:"",!1)),_=!y._fTextNode}),c){const y=r.indentXml&&_?`
26
- ${t}`:"";a.push(Buffer.from(`${y}</${e._tag}>`))}}return Buffer.concat(a)}const q0=(e,r)=>{let t="";const n=e.split(r.literalXmlDelimiter);let u=!1;for(let a=0;a<n.length;a++){let o=n[a];u||(o=o.replace(/&/g,"&amp;"),o=o.replace(/</g,"&lt;"),o=o.replace(/>/g,"&gt;")),t+=o,u=!u}return t},z0=e=>{let r=typeof e=="string"?e:e.value;return r=r.replace(/&/g,"&amp;"),r=r.replace(/</g,"&lt;"),r=r.replace(/>/g,"&gt;"),r=r.replace(/'/g,"&apos;"),r=r.replace(/"/g,"&quot;"),r};var W0=Object.defineProperty,H0=(e,r,t)=>r in e?W0(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,Bt=(e,r,t)=>H0(e,typeof r!="symbol"?r+"":r,t);function Sn(e){return e instanceof Error||typeof e=="object"&&!!e&&"name"in e&&"message"in e}class Cn extends Error{constructor(r){super(`Result of command ${r} is null or undefined and rejectNullish is set`),Bt(this,"command"),Object.setPrototypeOf(this,Cn.prototype),this.command=r}}class kn extends Error{constructor(r,t){super(`Result of command '${r}' is an object`),Bt(this,"command"),Bt(this,"result"),Object.setPrototypeOf(this,kn.prototype),this.command=r,this.result=t}}class Bn extends Error{constructor(r){super(`Invalid command syntax: ${r}`),Bt(this,"command"),Object.setPrototypeOf(this,Bn.prototype),this.command=r}}class Ve extends Error{constructor(r,t){super(`${r}: ${t}`),Bt(this,"command"),Object.setPrototypeOf(this,Ve.prototype),this.command=t}}class Cr extends Error{constructor(r,t){super(`Error executing command '${t}': ${r.name}: ${r.message}`),Bt(this,"command"),Bt(this,"err"),Object.setPrototypeOf(this,Cr.prototype),this.command=t,this.err=r}}class Xl extends Cr{}class tr extends Error{constructor(r){super(`INTERNAL ERROR: ${r}`)}}class at extends Error{}class Yl extends Error{constructor(){super("Incomplete IF/END-IF statement. Make sure each IF-statement has a corresponding END-IF command.")}}class Kl extends Error{constructor(r){super(`Unterminated FOR-loop ('FOR ${r.varName}'). Make sure each FOR loop has a corresponding END-FOR command.`)}}const xn=e=>e._fTextNode?{_children:[],_fTextNode:!0,_text:e._text}:{_children:[],_fTextNode:!1,_tag:e._tag,_attrs:e._attrs},Jl=e=>{const r=e._parent;if(r==null)return null;const t=r._children,n=t.indexOf(e);return n<0||n>=t.length-1?null:t[n+1]},Ql=e=>{const r=e._parent;if(!(r&&!r._fTextNode&&(r._tag==="w:t"||r._tag==="a:t")))throw new at("Template syntax error: text node not within w:t");const t=r._parent;if(t==null)throw new at("Template syntax error: w:t node has no parent");const n=t._children.indexOf(r);if(n<0)throw new at("Template syntax error");const u=xn(r);u._parent=t;const a={_parent:u,_children:[],_fTextNode:!0,_text:""};return u._children=[a],t._children.splice(n+1,0,u),a},gt=(e,r={},t=[])=>{const n={_fTextNode:!1,_tag:e,_attrs:r,_children:t};return n._children.forEach(u=>{u._parent=n}),n},Tn=e=>({_children:[],_fTextNode:!0,_text:e}),An=(e,r)=>(e._children.push(r),r._parent=e,r),Rn=e=>e.loops.length?e.loops[e.loops.length-1]:null,ot=e=>{const r=Rn(e);return r!=null&&r.idx<0},G0=e=>{if(!e.length)return;const r=e.length-1,{varName:t,idx:n,loopOver:u,isIf:a}=e[r],o=n>=0?n+1:"EXPLORATION";ze.debug(`${a?"IF":"FOR"} loop on ${r}:${t}${o}/${u.length}`)},Ce=e=>/^a:(t|p|r|rPr|tbl|tr|tc)$/.test(e)?e.replace(/^a:/,"w:"):e,fo=(e,r,t)=>{let n=e,u=!1,a=null,o=0;const i=`${r[0]}CMD_NODE${r[1]}`;for(;n!=null;){if(t&&!n._fTextNode&&Ce(n._tag)==="w:t"&&(n._attrs["xml:space"]="preserve"),!n._fTextNode&&Ce(n._tag)==="w:p"&&a&&(a._text+=" "),n._fTextNode&&n._parent&&!n._parent._fTextNode&&Ce(n._parent._tag)==="w:t"){a==null&&(a=n);const c=n._text;n._text="";for(let h=0;h<c.length;h++){const p=c[h],_=u?r[1]:r[0];if(p===_[o]){if(o+=1,o===_.length){u=!u;const y=n===a;u&&a._text.length&&(a=Ql(a),y&&(n=a)),a._text+=_,!u&&h<c.length-1&&(a=Ql(a),y&&(n=a)),o=0,u||(a=n)}}else o&&(a._text+=_.slice(0,o),o=0,u||(a=n)),a._text+=p}!u&&!o&&(a=null),c.length&&!n._text.length&&(n._text=i)}if(n._children.length)n=n._children[0];else{let c=!1;for(;n._parent!=null;){const h=n._parent,p=Jl(n);if(p){c=!0,n=p;break}n=h}c||(n=null)}}return e};var Z0=Object.defineProperty,V0=Object.defineProperties,X0=Object.getOwnPropertyDescriptors,ec=Object.getOwnPropertySymbols,Y0=Object.prototype.hasOwnProperty,K0=Object.prototype.propertyIsEnumerable,tc=(e,r,t)=>r in e?Z0(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,In=(e,r)=>{for(var t in r||(r={}))Y0.call(r,t)&&tc(e,t,r[t]);if(ec)for(var t of ec(r))K0.call(r,t)&&tc(e,t,r[t]);return e},rc=(e,r)=>V0(e,X0(r));async function Dt(e,r,t){const n=In(In(rc(In({},t.jsSandbox||{}),{__code__:r,__result__:void 0}),e),t.options.additionalJsContext);for(let o=t.loops.length-1;o>=0;o--){const i=t.loops[o];if(!i.isIf){n.$idx=i.idx;break}}Object.keys(t.vars).forEach(o=>{n[`$${o}`]=t.vars[o]});let u,a;try{if(t.options.runJs){const o=await t.options.runJs({sandbox:n,ctx:t});u=o.modifiedSandbox,a=o.result}else u=n,a=new Function("with(this) { return eval(__code__); }").call(u);a=await a}catch(o){const i=Sn(o)?o:new Error(`${o}`);if(t.options.errorHandler!=null)u=n,a=await t.options.errorHandler(i,r);else throw new Cr(i,r)}if(t.options.rejectNullish&&a==null){const o=new Cn(r);if(t.options.errorHandler!=null)a=await t.options.errorHandler(o,r);else throw o}return t.jsSandbox=rc(In({},u),{__code__:void 0,__result__:void 0}),a}const nc=[".png",".gif",".jpg",".jpeg",".svg"],J0=["CMD_NODE","ALIAS","FOR","END-FOR","IF","END-IF","INS","EXEC","IMAGE","LINK","HTML"];var Q0=Object.defineProperty,ey=Object.defineProperties,ty=Object.getOwnPropertyDescriptors,ic=Object.getOwnPropertySymbols,ry=Object.prototype.hasOwnProperty,ny=Object.prototype.propertyIsEnumerable,ac=(e,r,t)=>r in e?Q0(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,so=(e,r)=>{for(var t in r||(r={}))ry.call(r,t)&&ac(e,t,r[t]);if(ic)for(var t of ic(r))ny.call(r,t)&&ac(e,t,r[t]);return e},iy=(e,r)=>ey(e,ty(r));function oc(e,r=0,t=new Set){return{gCntIf:0,gCntEndIf:0,level:1,fCmd:!1,cmd:"",buffers:{"w:p":{text:"",cmds:"",fInsertedText:!1},"w:tr":{text:"",cmds:"",fInsertedText:!1},"w:tc":{text:"",cmds:"",fInsertedText:!1}},imageAndShapeIdIncrement:r,images:{},relationshipIds:t,linkId:0,links:{},htmlId:0,htmls:{},vars:{},loops:[],fJump:!1,shorthands:{},options:e}}async function fc(e,r,t){return uc(e,r,t,oy)}function sc(e){const r=[],t=n=>{for(const u of n._children){const a=u._fTextNode?null:u._tag;if(a!=null){if(a==="wp:docPr"||a==="p:cNvPr"){if(u._fTextNode)continue;const o=u._attrs.id;if(typeof o!="string")continue;const i=Number.parseInt(o,10);Number.isSafeInteger(i)&&r.push(i)}u._children.length>0&&t(u)}}};return t(e),r.length>0?Math.max(...r):0}const uo=e=>e._fTextNode?!!e._parent&&!e._parent._fTextNode&&Ce(e._parent._tag)==="w:t"&&e._text.length>0:e._children.some(uo),rr=e=>JSON.stringify(e._fTextNode?{_ifName:e._ifName,_fTextNode:e._fTextNode,_text:e==null?void 0:e._text}:{_ifName:e._ifName,_fTextNode:e._fTextNode,_tag:e==null?void 0:e._tag,_attrs:e==null?void 0:e._attrs});async function uc(e,r,t,n){var u;const a=xn(r);let o=r,i=a,c,h=0;const p=[];let _=0;const y=((u=t.options)==null?void 0:u.maximumWalkingDepth)||1e6;for(;;){const v=Rn(t);let A=null;if(t.fJump){if(!v)throw new tr("jumping while curLoop is null");ze.debug(`Jumping to level ${v.refNodeLevel}...`,rr(v.refNode)),h=t.level-v.refNodeLevel,o=v.refNode,t.level=v.refNodeLevel,t.fJump=!1,c="JUMP"}else if(o._children.length&&c!=="UP")o=o._children[0],t.level+=1,c="DOWN";else if(A=Jl(o))o=A,c="SIDE";else{const R=o._parent;if(R==null)break;if(_>y)throw ze.debug(`=== parent is still not null after ${_} loops, something must be wrong ...`,rr(R)),new tr("infinite loop or massive dataset detected. Please review and try again");o=R,t.level-=1,c="UP"}if(ze.debug(`Next node [${c}, level ${t.level}]`,rr(o)),c!=="DOWN"){const R=i._fTextNode?null:Ce(i._tag);let S=!1;if((R==="w:p"||R==="w:tbl"||R==="w:tr"||R==="w:tc")&&ot(t))S=!uo(i);else if(R==="w:p"||R==="w:tr"||R==="w:tc"){const g=t.buffers[R];if(S=g.text===""&&g.cmds!==""&&!g.fInsertedText,R==="w:p"&&S){const m=C=>C._fTextNode?!1:C._tag==="wp:anchor"||C._tag==="wp:inline"||Ce(C._tag)==="w:drawing"?!0:C._children.some(m);S=!m(i)}R==="w:tr"&&S&&(S=o._children.filter(m=>!m._fTextNode&&Ce(m._tag)==="w:tr").length!==1),R==="w:tc"&&S&&(S=!(i._children.filter(m=>!m._fTextNode&&Ce(m._tag)==="w:tbl").length>0))}S&&i._parent!=null&&i._parent._children.pop()}if(c==="UP"){ot(t)&&v&&o===v.refNode._parent&&(o._children.slice(0,o._children.indexOf(v.refNode)).some(uo)||(v.refNode=o,v.refNodeLevel-=1,ze.debug(`Updated loop '${v.varName}' refNode: `+rr(o))));const R=i._parent;if(R==null)throw new tr("node parent is null");if(i=R,t.pendingImageNode&&!i._fTextNode&&(t.options.documentType==="pptx"?i._tag==="p:sp":i._tag==="w:t")){const S=t.pendingImageNode.image,g=t.pendingImageNode.caption,m=i._parent;m&&(S._parent=m,m._children.pop(),m._children.push(S),g&&m._children.push(...g),t.buffers["w:p"].fInsertedText=!0,t.buffers["w:tr"].fInsertedText=!0,t.buffers["w:tc"].fInsertedText=!0),delete t.pendingImageNode}if(t.pendingLinkNode&&!i._fTextNode&&Ce(i._tag)==="w:r"){const S=t.pendingLinkNode,g=i._parent;g&&(S._parent=g,g._children.pop(),g._children.push(S),t.buffers["w:p"].fInsertedText=!0,t.buffers["w:tr"].fInsertedText=!0,t.buffers["w:tc"].fInsertedText=!0),delete t.pendingLinkNode}if(t.pendingHtmlNode&&!i._fTextNode&&Ce(i._tag)==="w:p"){const S=t.pendingHtmlNode,g=i._parent;g&&(S._parent=g,g._children.pop(),g._children.push(S),t.buffers["w:p"].fInsertedText=!0,t.buffers["w:tr"].fInsertedText=!0,t.buffers["w:tc"].fInsertedText=!0),delete t.pendingHtmlNode}if(!i._fTextNode&&Ce(i._tag)==="w:tc"&&!i._children.filter(S=>!S._fTextNode&&(Ce(S._tag)==="w:p"||Ce(S._tag)==="w:altChunk")).length&&i._children.push({_parent:i,_children:[],_fTextNode:!1,_tag:i._tag==="a:tc"?"a:p":"w:p",_attrs:{}}),!i._fTextNode&&(i._tag==="p:txBody"||i._tag==="a:txBody")&&!i._children.some(S=>!S._fTextNode&&S._tag==="a:p")){const S=gt("a:p");S._parent=i,i._children.push(S)}if(!i._fTextNode&&i._tag==="a:r"){const S=i._children.filter(g=>!g._fTextNode&&g._tag==="a:t");if(S.length>1){const g=S[0];g._children=S.reduce((m,C)=>m.concat(C._children),[]),g._children.forEach(m=>{m._parent=g}),i._children=i._children.filter(m=>m===g||!S.includes(m))}}!i._fTextNode&&Ce(i._tag)==="w:rPr"&&(t.textRunPropsNode=i),!o._fTextNode&&Ce(o._tag)==="w:r"&&delete t.textRunPropsNode}if(c==="DOWN"||c==="SIDE"){if(c==="SIDE"){if(i._parent==null)throw new tr("node parent is null");i=i._parent}const R=o._fTextNode?null:Ce(o._tag);(R==="w:p"||R==="w:tr"||R==="w:tc")&&(t.buffers[R]={text:"",cmds:"",fInsertedText:!1});const S=xn(o);S._parent=i,i._children.push(S);const g=S._tag;!ot(t)&&(g==="wp:docPr"||g==="v:shape"||g==="p:cNvPr"&&t.loops.some(C=>C.idx>0))&&(ze.debug("detected a - ",rr(S)),gy(S,t));const m=o._parent;if(o._fTextNode&&m&&!m._fTextNode&&Ce(m._tag)==="w:t"){const C=await ay(e,o,t,n);typeof C=="string"?(S._text=C,ze.debug("Inserted command result string into node. Updated node: "+rr(S))):p.push(...C)}i=S}if(c==="JUMP")for(;h>0;){if(i._parent==null)throw new tr("node parent is null");i=i._parent,h-=1}_++}if(t.gCntIf!==t.gCntEndIf){const v=new Yl;if(t.options.failFast)throw v;p.push(v)}if(t.loops.filter(v=>!v.isIf).length>0){const v=t.loops[t.loops.length-1],A=new Kl(v);if(t.options.failFast)throw A;p.push(A)}return p.length>0?{status:"errors",errors:p}:{status:"success",report:a,images:t.images,links:t.links,htmls:t.htmls}}const ay=async(e,r,t,n)=>{const{cmdDelimiter:u,failFast:a}=t.options,o=r._text;if(o==null||o==="")return"";const i=o.split(u[0]).map(p=>p.split(u[1])).reduce((p,_)=>p.concat(_));let c="";const h=[];for(let p=0;p<i.length;p++){p>0&&co(u[0],t,{fCmd:!0});const _=i[p];if(t.fCmd?t.cmd+=_:ot(t)||(c+=_),co(_,t,{fCmd:t.fCmd}),p<i.length-1){if(t.fCmd){const y=await n(e,r,t);if(y!=null)if(typeof y=="string")c+=y,co(y,t,{fCmd:!1,fInsertedText:!0});else{if(a)throw y;h.push(y)}}t.fCmd=!t.fCmd}}return h.length>0?h:c},oy=async(e,r,t)=>{const n=lc(t.cmd,t.shorthands,t.options.fixSmartQuotes);t.cmd="";const{cmdName:u,cmdRest:a}=cc(n);try{if(u!=="CMD_NODE"&&ze.debug(`Processing cmd: ${n}`),u!=="CMD_NODE")if(u==="ALIAS"){const o=/^(\S+)\s+(.+)/.exec(a);if(!o)throw new Ve("Invalid ALIAS command",n);const i=o[1],c=o[2];t.shorthands[i]=c,ze.debug(`Defined alias '${i}' for: ${c}`)}else if(u==="FOR"||u==="IF")await uy(e,r,t,n,u,a);else if(u==="END-FOR"||u==="END-IF")ly(r,t,n,u,a);else if(u==="INS"){if(!ot(t)){let o=await Dt(e,a,t);if(o==null)return"";if(typeof o=="object"&&!Array.isArray(o)){const c=new kn(a,o);if(t.options.errorHandler!=null)o=await t.options.errorHandler(c,a);else throw c}let i=String(o);if(t.options.processLineBreaks){const{literalXmlDelimiter:c}=t.options;if(t.options.documentType==="pptx")i=i.replace(/\n/g,`${c}</a:t></a:r><a:br/><a:r><a:t xml:space="preserve">${c}`);else if(t.options.processLineBreaksAsNewText){const h=i.split(`
27
- `),p=`${c}<w:br/>${c}`,_=`${c}</w:t>${c}`,y=`${c}<w:t xml:space="preserve">${c}`;i=h.join(`${_}${p}${y}`)}else i=i.replace(/\n/g,`${c}<w:br/>${c}`)}return i}}else if(u==="EXEC")ot(t)||await Dt(e,a,t);else if(u==="IMAGE"){if(!ot(t)){const o=await Dt(e,a,t);if(o!=null)try{dy(t,o,r)}catch(i){throw Sn(i)?new Xl(i,n):i}}}else if(u==="LINK"){if(!ot(t)){const o=await Dt(e,a,t);o!=null&&await py(t,o,r)}}else if(u==="HTML"){if(t.options.documentType==="pptx")throw new Ve("HTML is only supported in Word templates",n);if(!ot(t)){const o=await Dt(e,a,t);o!=null&&await yy(t,o)}}else throw new Bn(n);return}catch(o){if(!Sn(o))throw o;return t.options.errorHandler!=null?t.options.errorHandler(o,a):o}},fy=J0.map(e=>new RegExp(`^${e}\\b`)),sy=e=>!fy.some(r=>r.test(e.toUpperCase()));function lc(e,r,t){let n=e.trim();if(n[0]==="*"){const u=n.slice(1).trim();if(!r[u])throw new Ve("Unknown alias",n);n=r[u]}else n[0]==="="?n=`INS ${n.slice(1).trim()}`:n[0]==="!"?n=`EXEC ${n.slice(1).trim()}`:sy(n)&&(n=`INS ${n.trim()}`);return t&&(n=n.replace(/[\u201C\u201D\u201E]/g,'"').replace(/[\u2018\u2019\u201A]/g,"'")),n.trim()}function cc(e){const r=/^(\S+)\s*/.exec(e);let t,n="";return r!=null&&(t=r[1].toUpperCase(),n=e.slice(t.length).trim()),{cmdName:t,cmdRest:n}}const uy=async(e,r,t,n,u,a)=>{const o=u==="IF";let i=null,c;if(o)r._ifName||(r._ifName=`__if_${t.gCntIf}`,t.gCntIf+=1),c=r._ifName;else{if(i=/^(\S+)\s+IN\s+(.+)/i.exec(a),!i)throw new Ve("Invalid FOR command",n);c=i[1]}const h=Rn(t);if(!(h&&h.varName===c)){const p=t.loops.length-1,_=p>=0&&t.loops[p].idx===-1;let y;if(_)y=[];else if(o)y=await Dt(e,a,t)?[1]:[];else{if(!i)throw new Ve("Invalid FOR command",n);if(y=await Dt(e,i[2],t),!Array.isArray(y))throw new Ve("Invalid FOR command (can only iterate over Array)",n)}t.loops.push({refNode:r,refNodeLevel:t.level,varName:c,loopOver:y,isIf:o,idx:-1})}G0(t.loops)},ly=(e,r,t,n,u)=>{const a=n==="END-IF",o=Rn(r);if(!o)throw new Ve(`Unexpected ${n} outside of ${a?"IF statement":"FOR loop"} context`,t);a&&!e._ifName&&(e._ifName=o.varName,r.gCntEndIf+=1);const i=a?e._ifName:u;if(o.varName!==i){if(r.loops.find(p=>p.varName===i)==null){ze.debug(`Ignoring ${t} (${i}, but we're expecting ${o.varName})`);return}throw new Ve("Invalid command",t)}const c=o.idx+1,h=o.loopOver[c];h!=null?(r.vars[i]=h,r.fJump=!0,o.idx=c):r.loops.pop()},dc=(e,r)=>{lo(r);let t;do e.imageAndShapeIdIncrement+=1,t=`img${e.imageAndShapeIdIncrement}`;while(e.relationshipIds.has(t));return e.relationshipIds.add(t),e.images[t]=r,t};function lo(e){if(!(e.data instanceof Uint8Array||e.data instanceof ArrayBuffer||typeof e.data=="string"))throw new Error("image .data property needs to be provided as Uint8Array (e.g. Buffer), ArrayBuffer, or as a base64-encoded string");if(!nc.includes(e.extension))throw new Error(`An extension (one of ${nc}) needs to be provided when providing an image or a thumbnail.`)}function cy(e){if(!Number.isFinite(e.width))throw new Error(`invalid image width: ${e.width} (in cm)`);if(!Number.isFinite(e.height))throw new Error(`invalid image height: ${e.height} (in cm)`);lo(e),e.thumbnail&&lo(e.thumbnail)}const dy=(e,r,t)=>{var n;cy(r);const u=(r.width*36e4).toFixed(0),a=(r.height*36e4).toFixed(0);let o=dc(e,hy(r));const i=String(e.imageAndShapeIdIncrement),c=r.alt||"",h=gt,p=[];p.push(h("a:ext",{uri:"{28A0092B-C50C-407E-A947-70E740481C1C}"},[h("a14:useLocalDpi",{"xmlns:a14":"http://schemas.microsoft.com/office/drawing/2010/main",val:"0"})]));const _=r.rotation?(r.rotation*6e4).toString():void 0;if(e.images[o].extension===".svg"){const A=(n=r.thumbnail)!=null?n:{data:"bm90aGluZwo=",extension:".png"},R=dc(e,A);p.push(h("a:ext",{uri:"{96DAC541-7B7A-43D3-8B79-37D633B846F1}"},[h("asvg:svgBlip",{"xmlns:asvg":"http://schemas.microsoft.com/office/drawing/2016/SVG/main","r:embed":o})])),o=R}const y=h("pic:pic",{"xmlns:pic":"http://schemas.openxmlformats.org/drawingml/2006/picture"},[h("pic:nvPicPr",{},[h("pic:cNvPr",{id:"0",name:`Picture ${i}`,descr:c}),h("pic:cNvPicPr",{},[h("a:picLocks",{noChangeAspect:"1",noChangeArrowheads:"1"})])]),h("pic:blipFill",{},[h("a:blip",{"r:embed":o,cstate:"print"},[h("a:extLst",{},p)]),h("a:srcRect"),h("a:stretch",{},[h("a:fillRect")])]),h("pic:spPr",{bwMode:"auto"},[h("a:xfrm",_?{rot:_}:{},[h("a:off",{x:"0",y:"0"}),h("a:ext",{cx:u,cy:a})]),h("a:prstGeom",{prst:"rect"},[h("a:avLst")]),h("a:noFill"),h("a:ln",{},[h("a:noFill")])])]);if(e.options.documentType==="pptx"){let A=t;for(;A&&(A._fTextNode||A._tag!=="p:sp");)A=A._parent;if(!A)throw new Error("PowerPoint IMAGE commands must be in a dedicated text shape");const R=x=>{!x._fTextNode&&x._tag.startsWith("pic:")&&(x._tag=x._tag.replace("pic:","p:")),x._children.forEach(R)};R(y),y._attrs={};const S=y._children[0];S._children[0]._attrs.id=i,S._children.push(h("p:nvPr"));const g=A._children.find(x=>!x._fTextNode&&x._tag==="p:spPr"),m=g==null?void 0:g._children.find(x=>!x._fTextNode&&x._tag==="a:xfrm"),C=m==null?void 0:m._children.find(x=>!x._fTextNode&&x._tag==="a:off");if(C&&!C._fTextNode){const x=y._children[2];x._children[0]._children[0]._attrs=so({},C._attrs)}e.pendingImageNode={image:y},hc.forEach(x=>{e.buffers[x].fInsertedText=!0});return}const v=h("w:drawing",{},[h("wp:inline",{distT:"0",distB:"0",distL:"0",distR:"0"},[h("wp:extent",{cx:u,cy:a}),h("wp:docPr",{id:i,name:`Picture ${i}`,descr:c}),h("wp:cNvGraphicFramePr",{},[h("a:graphicFrameLocks",{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main",noChangeAspect:"1"})]),h("a:graphic",{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},[h("a:graphicData",{uri:"http://schemas.openxmlformats.org/drawingml/2006/picture"},[y])])])]);e.pendingImageNode={image:v},r.caption&&(e.pendingImageNode.caption=[h("w:br"),h("w:t",{},[Tn(r.caption)])])};function hy(e){const{data:r,extension:t}=e;if(!t)throw new Error("If you return image `data`, make sure you return an extension as well!");return{extension:t,data:r}}const py=async(e,r,t)=>{var n;const{url:u,label:a=u}=r;let o;do e.linkId+=1,o=`link${e.linkId}`;while(e.relationshipIds.has(o));e.relationshipIds.add(o),e.links[o]={url:u};const i=gt;let{textRunPropsNode:c}=e;if(e.options.documentType==="pptx"){const p=(n=t._parent)==null?void 0:n._parent,_=p==null?void 0:p._children.find(y=>!y._fTextNode&&y._tag==="a:rPr");_&&!_._fTextNode&&(c=_)}if(e.options.documentType==="pptx"){const p=c?xn(c):i("a:rPr",{u:"sng"}),_=v=>v._fTextNode?Tn(v._text):i(v._tag,so({},v._attrs),v._children.map(_));c==null||c._children.filter(v=>v._fTextNode||v._tag!=="a:hlinkClick").forEach(v=>{const A=_(v);A._parent=p,p._children.push(A)});const y=i("a:hlinkClick",{"r:id":o});y._parent=p,p._children.push(y),e.pendingLinkNode=i("a:r",{},[p,i("a:t",{},[Tn(a)])]);return}const h=i("w:hyperlink",{"r:id":o,"w:history":"1"},[i("w:r",{},[c||i("w:rPr",{},[i("w:u",{"w:val":"single"})]),i("w:t",{},[Tn(a)])])]);e.pendingLinkNode=h},yy=async(e,r)=>{let t;do e.htmlId+=1,t=`html${e.htmlId}`;while(e.relationshipIds.has(t));e.relationshipIds.add(t),e.htmls[t]=r;const n=gt("w:altChunk",{"r:id":t});e.pendingHtmlNode=n},hc=["w:p","w:tr","w:tc"],co=(e,r,t)=>{const{fCmd:n,fInsertedText:u}=t,a=n?"cmds":"text";hc.forEach(o=>{const i=r.buffers[o];i[a]+=e,u&&(i.fInsertedText=!0)})};function gy(e,r){r.imageAndShapeIdIncrement+=1;const t=String(r.imageAndShapeIdIncrement);e._attrs=iy(so({},e._attrs),{id:`${t}`})}const vy=["{{","}}"],Nr="||",ho="[Content_Types].xml";async function pc(e){const r=await Zl(e),t=await wy(r),n=Ey(t),u=n.split("/")[0],a=u==="ppt"?"pptx":"docx",o=n.slice(u.length+1),i=`${u}/${o}`,c=await wn(r,i);if(c==null)throw new at(`${o} could not be found`);ze.debug(`${i} file length: ${c.length}`),new Date().getTime();const h=await En(c);return new Date().getTime(),{jsTemplate:h,mainDocument:o,zip:r,contentTypes:t,templatePath:u,documentType:a}}async function yc(e,r,t,n){const u=[],a=t==="ppt"?/^ppt\/(slides|notesSlides|slideLayouts|slideMasters|notesMasters)\/[^/]+\.xml$/:/^word\/[^/]+\.xml$/;e.forEach(i=>{a.test(i)&&i!==`${t}/${r}`&&i.indexOf(`${t}/template`)!==0&&u.push(i)}),u.sort((i,c)=>i.localeCompare(c,"en",{numeric:!0}));const o=[];for(const i of u){const c=await wn(e,i);if(c==null)throw new at(`${i} could not be read`);ze.debug(`${i} file length: ${c.length}`);const h=await En(c),p=fo(h,n.cmdDelimiter,n.preserveSpace);o.push([p,i])}return o}async function _y(e,r){var t,n,u;const{template:a,data:o}=e,i=e.literalXmlDelimiter||Nr,c={cmdDelimiter:mc(e.cmdDelimiter),literalXmlDelimiter:i,processLineBreaks:e.processLineBreaks!=null?e.processLineBreaks:!0,runJs:e.runJs,additionalJsContext:e.additionalJsContext||{},failFast:e.failFast==null?!0:e.failFast,rejectNullish:e.rejectNullish==null?!1:e.rejectNullish,errorHandler:typeof e.errorHandler=="function"?e.errorHandler:null,fixSmartQuotes:e.fixSmartQuotes==null?!1:e.fixSmartQuotes,processLineBreaksAsNewText:e.processLineBreaksAsNewText==null?!1:e.processLineBreaksAsNewText,maximumWalkingDepth:e.maximumWalkingDepth,indentXml:(t=e.indentXml)!=null?t:!0,preserveSpace:(n=e.preserveSpace)!=null?n:!0,compressionLevel:(u=e.compressionLevel)!=null?u:1},h={literalXmlDelimiter:i,indentXml:c.indentXml},{jsTemplate:p,mainDocument:_,zip:y,contentTypes:v,templatePath:A,documentType:R}=await pc(a);c.documentType=R;const S=fo(p,c.cmdDelimiter,c.preserveSpace),g=typeof o=="function"?await o():o,m=await yc(y,_,A,c),C=Math.max(...m.map(([re,fe])=>sc(re)),sc(S));let x=await k(`${A}/${_}`,C);async function k(re,fe){const ue=await Nn(y,On(re)),F=new Set;for(const j of ue._children)!j._fTextNode&&typeof j._attrs.Id=="string"&&F.add(j._attrs.Id);return oc(c,fe,F)}const D=await fc(g,S,x);if(D.status==="errors")throw D.errors;const{report:U,images:q,links:O,htmls:Y}=D;if(r==="JS")return U;const V=kt(U,h);if(r==="XML")return V.toString("utf-8");Ct(y,`${A}/${_}`,V);let K=Object.keys(q).length,ae=Object.keys(Y).length;await gc(q,`${A}/${_}`,y,c.indentXml),await vc(O,`${A}/${_}`,y,c.indentXml),await _c(Y,`${A}/${_}`,y,c.indentXml);for(const[re,fe]of m){x=await k(fe,x.imageAndShapeIdIncrement);const ue=await fc(g,re,x);if(ue.status==="errors")throw ue.errors;const{report:F,images:j,links:Z,htmls:J}=ue,B=kt(F,h);Ct(y,fe,B),K+=Object.keys(j).length,ae+=Object.keys(J).length,await gc(j,fe,y,c.indentXml),await vc(Z,fe,y,c.indentXml),await _c(J,fe,y,c.indentXml)}if(K||ae){const re=(ue,F)=>{v._children.filter(j=>{var Z;return!j._fTextNode&&((Z=j._attrs.Extension)==null?void 0:Z.toLowerCase())===(ue==null?void 0:ue.toLowerCase())}).length||An(v,gt("Default",{Extension:ue,ContentType:F}))};K&&(re("png","image/png"),re("jpg","image/jpeg"),re("jpeg","image/jpeg"),re("gif","image/gif"),re("bmp","image/bmp"),re("svg","image/svg+xml")),ae&&re("html","text/html");const fe=kt(v,h);Ct(y,ho,fe)}return await $0(y,c.compressionLevel)}async function my(e,r){const t={cmdDelimiter:mc(r),literalXmlDelimiter:Nr,processLineBreaks:!0,additionalJsContext:{},failFast:!1,rejectNullish:!1,errorHandler:null,fixSmartQuotes:!1,processLineBreaksAsNewText:!1,indentXml:!0,preserveSpace:!0,compressionLevel:1},{jsTemplate:n,mainDocument:u,zip:a,templatePath:o}=await pc(e),i=await yc(a,u,o,t),c=[n,...i.map(([p,_])=>p)],h=[];for(const p of c){const _=fo(p,t.cmdDelimiter,t.preserveSpace),y=oc(t);await uc(void 0,_,y,async(v,A,R)=>{const S=lc(R.cmd,R.shorthands,R.options.fixSmartQuotes);R.cmd="";const{cmdName:g,cmdRest:m}=cc(S),C=g;C!=null&&C!=="CMD_NODE"&&h.push({raw:S,type:C,code:m})})}return h}async function by(e){const r="docProps/app.xml",t="docProps/core.xml",n=await Zl(e),u=await po(n,r),a=await po(n,t);function o(h){if(h._children.length===0)return;const p=h._children[0];if(p._fTextNode)return p._text;throw new Error("Not a text node")}function i(h,p){for(const _ of h._children)if(!_._fTextNode&&_._tag===p)return o(_)}const c=h=>{const p=Number(h);if(Number.isFinite(p))return p};return{pages:c(i(u,"Pages")),words:c(i(u,"Words")),characters:c(i(u,"Characters")),lines:c(i(u,"Lines")),paragraphs:c(i(u,"Paragraphs")),company:i(u,"Company"),template:i(u,"Template"),title:i(a,"dc:title"),subject:i(a,"dc:subject"),creator:i(a,"dc:creator"),description:i(a,"dc:description"),lastModifiedBy:i(a,"cp:lastModifiedBy"),revision:i(a,"cp:revision"),lastPrinted:i(a,"cp:lastPrinted"),created:i(a,"dcterms:created"),modified:i(a,"dcterms:modified"),category:i(a,"cp:category")}}async function po(e,r){const t=await wn(e,r);if(t==null)throw new at(`${r} could not be read`);const n=await En(t);if(n._fTextNode)throw new at(`${r} is a text node when parsed`);return n}async function wy(e){return await po(e,ho)}function Ey(e){const r=["application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","application/vnd.ms-word.document.macroEnabled.main+xml","application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml","application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml"];for(const t of e._children)if(!t._fTextNode&&t._attrs.ContentType!=null&&r.includes(t._attrs.ContentType)){const n=t._attrs.PartName;if(n)return n.replace(/^\//,"")}throw new at(`Could not find main document (e.g. document.xml) in ${ho}`)}const gc=async(e,r,t,n)=>{const u=Object.keys(e);if(!u.length)return;const a=On(r),o=await Nn(t,a);for(const c of u){const{extension:h,data:p}=e[c],_=`template_${r.replace(/^[^/]+\//,"").replace(/[/]/g,"_")}_${c}${h}`,y=`${r.split("/")[0]}/media/${_}`;typeof p=="string"?t.file(y,p,{base64:!0}):t.file(y,p,{binary:!0}),An(o,gt("Relationship",{Id:c,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`${r.split("/").length>2?"../":""}media/${_}`}))}const i=kt(o,{literalXmlDelimiter:Nr,indentXml:n});Ct(t,a,i)},vc=async(e,r,t,n)=>{const u=Object.keys(e);if(u.length){const a=On(r),o=await Nn(t,a);for(const c of u){const{url:h}=e[c];An(o,gt("Relationship",{Id:c,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Target:h,TargetMode:"External"}))}const i=kt(o,{literalXmlDelimiter:Nr,indentXml:n});Ct(t,a,i)}},_c=async(e,r,t,n)=>{const u=Object.keys(e);if(u.length){const a=On(r),o=await Nn(t,a);for(const c of u){const h=e[c],p=`template_${r.replace(/^[^/]+\//,"").replace(/[/.]/g,"_")}_${c}.html`,_=`${r.slice(0,r.lastIndexOf("/"))}/${p}`;Ct(t,_,Buffer.from(h)),An(o,gt("Relationship",{Id:c,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk",Target:`${p}`}))}const i=kt(o,{literalXmlDelimiter:Nr,indentXml:n});Ct(t,a,i)}},On=e=>{const r=e.lastIndexOf("/");return`${e.slice(0,r)}/_rels/${e.slice(r+1)}.rels`},Nn=async(e,r)=>{let t=await wn(e,r);return t||(t=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
6
+ */(function(e){const r=xr,t=pi,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=A,e.INSPECT_MAX_BYTES=50;const l=2147483647;e.kMaxLength=l,a.TYPED_ARRAY_SUPPORT=s(),!a.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{const c=new Uint8Array(1),n={foo:function(){return 42}};return Object.setPrototypeOf(n,Uint8Array.prototype),Object.setPrototypeOf(c,n),c.foo()===42}catch(c){return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function f(c){if(c>l)throw new RangeError('The value "'+c+'" is invalid for option "size"');const n=new Uint8Array(c);return Object.setPrototypeOf(n,a.prototype),n}function a(c,n,o){if(typeof c=="number"){if(typeof n=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return I(c)}return m(c,n,o)}a.poolSize=8192;function m(c,n,o){if(typeof c=="string")return _(c,n);if(ArrayBuffer.isView(c))return w(c);if(c==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c);if(ve(c,ArrayBuffer)||c&&ve(c.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ve(c,SharedArrayBuffer)||c&&ve(c.buffer,SharedArrayBuffer)))return S(c,n,o);if(typeof c=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const g=c.valueOf&&c.valueOf();if(g!=null&&g!==c)return a.from(g,n,o);const y=N(c);if(y)return y;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof c[Symbol.toPrimitive]=="function")return a.from(c[Symbol.toPrimitive]("string"),n,o);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof c)}a.from=function(c,n,o){return m(c,n,o)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function h(c){if(typeof c!="number")throw new TypeError('"size" argument must be of type number');if(c<0)throw new RangeError('The value "'+c+'" is invalid for option "size"')}function d(c,n,o){return h(c),c<=0?f(c):n!==void 0?typeof o=="string"?f(c).fill(n,o):f(c).fill(n):f(c)}a.alloc=function(c,n,o){return d(c,n,o)};function I(c){return h(c),f(c<0?0:b(c)|0)}a.allocUnsafe=function(c){return I(c)},a.allocUnsafeSlow=function(c){return I(c)};function _(c,n){if((typeof n!="string"||n==="")&&(n="utf8"),!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n);const o=F(c,n)|0;let g=f(o);const y=g.write(c,n);return y!==o&&(g=g.slice(0,y)),g}function v(c){const n=c.length<0?0:b(c.length)|0,o=f(n);for(let g=0;g<n;g+=1)o[g]=c[g]&255;return o}function w(c){if(ve(c,Uint8Array)){const n=new Uint8Array(c);return S(n.buffer,n.byteOffset,n.byteLength)}return v(c)}function S(c,n,o){if(n<0||c.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(c.byteLength<n+(o||0))throw new RangeError('"length" is outside of buffer bounds');let g;return n===void 0&&o===void 0?g=new Uint8Array(c):o===void 0?g=new Uint8Array(c,n):g=new Uint8Array(c,n,o),Object.setPrototypeOf(g,a.prototype),g}function N(c){if(a.isBuffer(c)){const n=b(c.length)|0,o=f(n);return o.length===0||c.copy(o,0,0,n),o}if(c.length!==void 0)return typeof c.length!="number"||ci(c.length)?f(0):v(c);if(c.type==="Buffer"&&Array.isArray(c.data))return v(c.data)}function b(c){if(c>=l)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l.toString(16)+" bytes");return c|0}function A(c){return+c!=c&&(c=0),a.alloc(+c)}a.isBuffer=function(n){return n!=null&&n._isBuffer===!0&&n!==a.prototype},a.compare=function(n,o){if(ve(n,Uint8Array)&&(n=a.from(n,n.offset,n.byteLength)),ve(o,Uint8Array)&&(o=a.from(o,o.offset,o.byteLength)),!a.isBuffer(n)||!a.isBuffer(o))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(n===o)return 0;let g=n.length,y=o.length;for(let T=0,k=Math.min(g,y);T<k;++T)if(n[T]!==o[T]){g=n[T],y=o[T];break}return g<y?-1:y<g?1:0},a.isEncoding=function(n){switch(String(n).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(n,o){if(!Array.isArray(n))throw new TypeError('"list" argument must be an Array of Buffers');if(n.length===0)return a.alloc(0);let g;if(o===void 0)for(o=0,g=0;g<n.length;++g)o+=n[g].length;const y=a.allocUnsafe(o);let T=0;for(g=0;g<n.length;++g){let k=n[g];if(ve(k,Uint8Array))T+k.length>y.length?(a.isBuffer(k)||(k=a.from(k)),k.copy(y,T)):Uint8Array.prototype.set.call(y,k,T);else if(a.isBuffer(k))k.copy(y,T);else throw new TypeError('"list" argument must be an Array of Buffers');T+=k.length}return y};function F(c,n){if(a.isBuffer(c))return c.length;if(ArrayBuffer.isView(c)||ve(c,ArrayBuffer))return c.byteLength;if(typeof c!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof c);const o=c.length,g=arguments.length>2&&arguments[2]===!0;if(!g&&o===0)return 0;let y=!1;for(;;)switch(n){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":return ie(c).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return o*2;case"hex":return o>>>1;case"base64":return Gt(c).length;default:if(y)return g?-1:ie(c).length;n=(""+n).toLowerCase(),y=!0}}a.byteLength=F;function C(c,n,o){let g=!1;if((n===void 0||n<0)&&(n=0),n>this.length||((o===void 0||o>this.length)&&(o=this.length),o<=0)||(o>>>=0,n>>>=0,o<=n))return"";for(c||(c="utf8");;)switch(c){case"hex":return Le(this,n,o);case"utf8":case"utf-8":return V(this,n,o);case"ascii":return $(this,n,o);case"latin1":case"binary":return fe(this,n,o);case"base64":return le(this,n,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ve(this,n,o);default:if(g)throw new TypeError("Unknown encoding: "+c);c=(c+"").toLowerCase(),g=!0}}a.prototype._isBuffer=!0;function D(c,n,o){const g=c[n];c[n]=c[o],c[o]=g}a.prototype.swap16=function(){const n=this.length;if(n%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let o=0;o<n;o+=2)D(this,o,o+1);return this},a.prototype.swap32=function(){const n=this.length;if(n%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let o=0;o<n;o+=4)D(this,o,o+3),D(this,o+1,o+2);return this},a.prototype.swap64=function(){const n=this.length;if(n%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let o=0;o<n;o+=8)D(this,o,o+7),D(this,o+1,o+6),D(this,o+2,o+5),D(this,o+3,o+4);return this},a.prototype.toString=function(){const n=this.length;return n===0?"":arguments.length===0?V(this,0,n):C.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(n){if(!a.isBuffer(n))throw new TypeError("Argument must be a Buffer");return this===n?!0:a.compare(this,n)===0},a.prototype.inspect=function(){let n="";const o=e.INSPECT_MAX_BYTES;return n=this.toString("hex",0,o).replace(/(.{2})/g,"$1 ").trim(),this.length>o&&(n+=" ... "),"<Buffer "+n+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(n,o,g,y,T){if(ve(n,Uint8Array)&&(n=a.from(n,n.offset,n.byteLength)),!a.isBuffer(n))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof n);if(o===void 0&&(o=0),g===void 0&&(g=n?n.length:0),y===void 0&&(y=0),T===void 0&&(T=this.length),o<0||g>n.length||y<0||T>this.length)throw new RangeError("out of range index");if(y>=T&&o>=g)return 0;if(y>=T)return-1;if(o>=g)return 1;if(o>>>=0,g>>>=0,y>>>=0,T>>>=0,this===n)return 0;let k=T-y,z=g-o;const Q=Math.min(k,z),K=this.slice(y,T),ee=n.slice(o,g);for(let X=0;X<Q;++X)if(K[X]!==ee[X]){k=K[X],z=ee[X];break}return k<z?-1:z<k?1:0};function U(c,n,o,g,y){if(c.length===0)return-1;if(typeof o=="string"?(g=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,ci(o)&&(o=y?0:c.length-1),o<0&&(o=c.length+o),o>=c.length){if(y)return-1;o=c.length-1}else if(o<0)if(y)o=0;else return-1;if(typeof n=="string"&&(n=a.from(n,g)),a.isBuffer(n))return n.length===0?-1:R(c,n,o,g,y);if(typeof n=="number")return n=n&255,typeof Uint8Array.prototype.indexOf=="function"?y?Uint8Array.prototype.indexOf.call(c,n,o):Uint8Array.prototype.lastIndexOf.call(c,n,o):R(c,[n],o,g,y);throw new TypeError("val must be string, number or Buffer")}function R(c,n,o,g,y){let T=1,k=c.length,z=n.length;if(g!==void 0&&(g=String(g).toLowerCase(),g==="ucs2"||g==="ucs-2"||g==="utf16le"||g==="utf-16le")){if(c.length<2||n.length<2)return-1;T=2,k/=2,z/=2,o/=2}function Q(ee,X){return T===1?ee[X]:ee.readUInt16BE(X*T)}let K;if(y){let ee=-1;for(K=o;K<k;K++)if(Q(c,K)===Q(n,ee===-1?0:K-ee)){if(ee===-1&&(ee=K),K-ee+1===z)return ee*T}else ee!==-1&&(K-=K-ee),ee=-1}else for(o+z>k&&(o=k-z),K=o;K>=0;K--){let ee=!0;for(let X=0;X<z;X++)if(Q(c,K+X)!==Q(n,X)){ee=!1;break}if(ee)return K}return-1}a.prototype.includes=function(n,o,g){return this.indexOf(n,o,g)!==-1},a.prototype.indexOf=function(n,o,g){return U(this,n,o,g,!0)},a.prototype.lastIndexOf=function(n,o,g){return U(this,n,o,g,!1)};function L(c,n,o,g){o=Number(o)||0;const y=c.length-o;g?(g=Number(g),g>y&&(g=y)):g=y;const T=n.length;g>T/2&&(g=T/2);let k;for(k=0;k<g;++k){const z=parseInt(n.substr(k*2,2),16);if(ci(z))return k;c[o+k]=z}return k}function x(c,n,o,g){return Je(ie(n,c.length-o),c,o,g)}function j(c,n,o,g){return Je(Ce(n),c,o,g)}function O(c,n,o,g){return Je(Gt(n),c,o,g)}function P(c,n,o,g){return Je(ui(n,c.length-o),c,o,g)}a.prototype.write=function(n,o,g,y){if(o===void 0)y="utf8",g=this.length,o=0;else if(g===void 0&&typeof o=="string")y=o,g=this.length,o=0;else if(isFinite(o))o=o>>>0,isFinite(g)?(g=g>>>0,y===void 0&&(y="utf8")):(y=g,g=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const T=this.length-o;if((g===void 0||g>T)&&(g=T),n.length>0&&(g<0||o<0)||o>this.length)throw new RangeError("Attempt to write outside buffer bounds");y||(y="utf8");let k=!1;for(;;)switch(y){case"hex":return L(this,n,o,g);case"utf8":case"utf-8":return x(this,n,o,g);case"ascii":case"latin1":case"binary":return j(this,n,o,g);case"base64":return O(this,n,o,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,n,o,g);default:if(k)throw new TypeError("Unknown encoding: "+y);y=(""+y).toLowerCase(),k=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function le(c,n,o){return n===0&&o===c.length?r.fromByteArray(c):r.fromByteArray(c.slice(n,o))}function V(c,n,o){o=Math.min(c.length,o);const g=[];let y=n;for(;y<o;){const T=c[y];let k=null,z=T>239?4:T>223?3:T>191?2:1;if(y+z<=o){let Q,K,ee,X;switch(z){case 1:T<128&&(k=T);break;case 2:Q=c[y+1],(Q&192)===128&&(X=(T&31)<<6|Q&63,X>127&&(k=X));break;case 3:Q=c[y+1],K=c[y+2],(Q&192)===128&&(K&192)===128&&(X=(T&15)<<12|(Q&63)<<6|K&63,X>2047&&(X<55296||X>57343)&&(k=X));break;case 4:Q=c[y+1],K=c[y+2],ee=c[y+3],(Q&192)===128&&(K&192)===128&&(ee&192)===128&&(X=(T&15)<<18|(Q&63)<<12|(K&63)<<6|ee&63,X>65535&&X<1114112&&(k=X))}}k===null?(k=65533,z=1):k>65535&&(k-=65536,g.push(k>>>10&1023|55296),k=56320|k&1023),g.push(k),y+=z}return ce(g)}const re=4096;function ce(c){const n=c.length;if(n<=re)return String.fromCharCode.apply(String,c);let o="",g=0;for(;g<n;)o+=String.fromCharCode.apply(String,c.slice(g,g+=re));return o}function $(c,n,o){let g="";o=Math.min(c.length,o);for(let y=n;y<o;++y)g+=String.fromCharCode(c[y]&127);return g}function fe(c,n,o){let g="";o=Math.min(c.length,o);for(let y=n;y<o;++y)g+=String.fromCharCode(c[y]);return g}function Le(c,n,o){const g=c.length;(!n||n<0)&&(n=0),(!o||o<0||o>g)&&(o=g);let y="";for(let T=n;T<o;++T)y+=As[c[T]];return y}function Ve(c,n,o){const g=c.slice(n,o);let y="";for(let T=0;T<g.length-1;T+=2)y+=String.fromCharCode(g[T]+g[T+1]*256);return y}a.prototype.slice=function(n,o){const g=this.length;n=~~n,o=o===void 0?g:~~o,n<0?(n+=g,n<0&&(n=0)):n>g&&(n=g),o<0?(o+=g,o<0&&(o=0)):o>g&&(o=g),o<n&&(o=n);const y=this.subarray(n,o);return Object.setPrototypeOf(y,a.prototype),y};function H(c,n,o){if(c%1!==0||c<0)throw new RangeError("offset is not uint");if(c+n>o)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(n,o,g){n=n>>>0,o=o>>>0,g||H(n,o,this.length);let y=this[n],T=1,k=0;for(;++k<o&&(T*=256);)y+=this[n+k]*T;return y},a.prototype.readUintBE=a.prototype.readUIntBE=function(n,o,g){n=n>>>0,o=o>>>0,g||H(n,o,this.length);let y=this[n+--o],T=1;for(;o>0&&(T*=256);)y+=this[n+--o]*T;return y},a.prototype.readUint8=a.prototype.readUInt8=function(n,o){return n=n>>>0,o||H(n,1,this.length),this[n]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(n,o){return n=n>>>0,o||H(n,2,this.length),this[n]|this[n+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(n,o){return n=n>>>0,o||H(n,2,this.length),this[n]<<8|this[n+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(n,o){return n=n>>>0,o||H(n,4,this.length),(this[n]|this[n+1]<<8|this[n+2]<<16)+this[n+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(n,o){return n=n>>>0,o||H(n,4,this.length),this[n]*16777216+(this[n+1]<<16|this[n+2]<<8|this[n+3])},a.prototype.readBigUInt64LE=qe(function(n){n=n>>>0,G(n,"offset");const o=this[n],g=this[n+7];(o===void 0||g===void 0)&&ae(n,this.length-8);const y=o+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24,T=this[++n]+this[++n]*2**8+this[++n]*2**16+g*2**24;return BigInt(y)+(BigInt(T)<<BigInt(32))}),a.prototype.readBigUInt64BE=qe(function(n){n=n>>>0,G(n,"offset");const o=this[n],g=this[n+7];(o===void 0||g===void 0)&&ae(n,this.length-8);const y=o*2**24+this[++n]*2**16+this[++n]*2**8+this[++n],T=this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+g;return(BigInt(y)<<BigInt(32))+BigInt(T)}),a.prototype.readIntLE=function(n,o,g){n=n>>>0,o=o>>>0,g||H(n,o,this.length);let y=this[n],T=1,k=0;for(;++k<o&&(T*=256);)y+=this[n+k]*T;return T*=128,y>=T&&(y-=Math.pow(2,8*o)),y},a.prototype.readIntBE=function(n,o,g){n=n>>>0,o=o>>>0,g||H(n,o,this.length);let y=o,T=1,k=this[n+--y];for(;y>0&&(T*=256);)k+=this[n+--y]*T;return T*=128,k>=T&&(k-=Math.pow(2,8*o)),k},a.prototype.readInt8=function(n,o){return n=n>>>0,o||H(n,1,this.length),this[n]&128?(255-this[n]+1)*-1:this[n]},a.prototype.readInt16LE=function(n,o){n=n>>>0,o||H(n,2,this.length);const g=this[n]|this[n+1]<<8;return g&32768?g|4294901760:g},a.prototype.readInt16BE=function(n,o){n=n>>>0,o||H(n,2,this.length);const g=this[n+1]|this[n]<<8;return g&32768?g|4294901760:g},a.prototype.readInt32LE=function(n,o){return n=n>>>0,o||H(n,4,this.length),this[n]|this[n+1]<<8|this[n+2]<<16|this[n+3]<<24},a.prototype.readInt32BE=function(n,o){return n=n>>>0,o||H(n,4,this.length),this[n]<<24|this[n+1]<<16|this[n+2]<<8|this[n+3]},a.prototype.readBigInt64LE=qe(function(n){n=n>>>0,G(n,"offset");const o=this[n],g=this[n+7];(o===void 0||g===void 0)&&ae(n,this.length-8);const y=this[n+4]+this[n+5]*2**8+this[n+6]*2**16+(g<<24);return(BigInt(y)<<BigInt(32))+BigInt(o+this[++n]*2**8+this[++n]*2**16+this[++n]*2**24)}),a.prototype.readBigInt64BE=qe(function(n){n=n>>>0,G(n,"offset");const o=this[n],g=this[n+7];(o===void 0||g===void 0)&&ae(n,this.length-8);const y=(o<<24)+this[++n]*2**16+this[++n]*2**8+this[++n];return(BigInt(y)<<BigInt(32))+BigInt(this[++n]*2**24+this[++n]*2**16+this[++n]*2**8+g)}),a.prototype.readFloatLE=function(n,o){return n=n>>>0,o||H(n,4,this.length),t.read(this,n,!0,23,4)},a.prototype.readFloatBE=function(n,o){return n=n>>>0,o||H(n,4,this.length),t.read(this,n,!1,23,4)},a.prototype.readDoubleLE=function(n,o){return n=n>>>0,o||H(n,8,this.length),t.read(this,n,!0,52,8)},a.prototype.readDoubleBE=function(n,o){return n=n>>>0,o||H(n,8,this.length),t.read(this,n,!1,52,8)};function ue(c,n,o,g,y,T){if(!a.isBuffer(c))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>y||n<T)throw new RangeError('"value" argument is out of bounds');if(o+g>c.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(n,o,g,y){if(n=+n,o=o>>>0,g=g>>>0,!y){const z=Math.pow(2,8*g)-1;ue(this,n,o,g,z,0)}let T=1,k=0;for(this[o]=n&255;++k<g&&(T*=256);)this[o+k]=n/T&255;return o+g},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(n,o,g,y){if(n=+n,o=o>>>0,g=g>>>0,!y){const z=Math.pow(2,8*g)-1;ue(this,n,o,g,z,0)}let T=g-1,k=1;for(this[o+T]=n&255;--T>=0&&(k*=256);)this[o+T]=n/k&255;return o+g},a.prototype.writeUint8=a.prototype.writeUInt8=function(n,o,g){return n=+n,o=o>>>0,g||ue(this,n,o,1,255,0),this[o]=n&255,o+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(n,o,g){return n=+n,o=o>>>0,g||ue(this,n,o,2,65535,0),this[o]=n&255,this[o+1]=n>>>8,o+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(n,o,g){return n=+n,o=o>>>0,g||ue(this,n,o,2,65535,0),this[o]=n>>>8,this[o+1]=n&255,o+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(n,o,g){return n=+n,o=o>>>0,g||ue(this,n,o,4,4294967295,0),this[o+3]=n>>>24,this[o+2]=n>>>16,this[o+1]=n>>>8,this[o]=n&255,o+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(n,o,g){return n=+n,o=o>>>0,g||ue(this,n,o,4,4294967295,0),this[o]=n>>>24,this[o+1]=n>>>16,this[o+2]=n>>>8,this[o+3]=n&255,o+4};function Wt(c,n,o,g,y){q(n,g,y,c,o,7);let T=Number(n&BigInt(4294967295));c[o++]=T,T=T>>8,c[o++]=T,T=T>>8,c[o++]=T,T=T>>8,c[o++]=T;let k=Number(n>>BigInt(32)&BigInt(4294967295));return c[o++]=k,k=k>>8,c[o++]=k,k=k>>8,c[o++]=k,k=k>>8,c[o++]=k,o}function Ht(c,n,o,g,y){q(n,g,y,c,o,7);let T=Number(n&BigInt(4294967295));c[o+7]=T,T=T>>8,c[o+6]=T,T=T>>8,c[o+5]=T,T=T>>8,c[o+4]=T;let k=Number(n>>BigInt(32)&BigInt(4294967295));return c[o+3]=k,k=k>>8,c[o+2]=k,k=k>>8,c[o+1]=k,k=k>>8,c[o]=k,o+8}a.prototype.writeBigUInt64LE=qe(function(n,o=0){return Wt(this,n,o,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=qe(function(n,o=0){return Ht(this,n,o,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(n,o,g,y){if(n=+n,o=o>>>0,!y){const Q=Math.pow(2,8*g-1);ue(this,n,o,g,Q-1,-Q)}let T=0,k=1,z=0;for(this[o]=n&255;++T<g&&(k*=256);)n<0&&z===0&&this[o+T-1]!==0&&(z=1),this[o+T]=(n/k>>0)-z&255;return o+g},a.prototype.writeIntBE=function(n,o,g,y){if(n=+n,o=o>>>0,!y){const Q=Math.pow(2,8*g-1);ue(this,n,o,g,Q-1,-Q)}let T=g-1,k=1,z=0;for(this[o+T]=n&255;--T>=0&&(k*=256);)n<0&&z===0&&this[o+T+1]!==0&&(z=1),this[o+T]=(n/k>>0)-z&255;return o+g},a.prototype.writeInt8=function(n,o,g){return n=+n,o=o>>>0,g||ue(this,n,o,1,127,-128),n<0&&(n=255+n+1),this[o]=n&255,o+1},a.prototype.writeInt16LE=function(n,o,g){return n=+n,o=o>>>0,g||ue(this,n,o,2,32767,-32768),this[o]=n&255,this[o+1]=n>>>8,o+2},a.prototype.writeInt16BE=function(n,o,g){return n=+n,o=o>>>0,g||ue(this,n,o,2,32767,-32768),this[o]=n>>>8,this[o+1]=n&255,o+2},a.prototype.writeInt32LE=function(n,o,g){return n=+n,o=o>>>0,g||ue(this,n,o,4,2147483647,-2147483648),this[o]=n&255,this[o+1]=n>>>8,this[o+2]=n>>>16,this[o+3]=n>>>24,o+4},a.prototype.writeInt32BE=function(n,o,g){return n=+n,o=o>>>0,g||ue(this,n,o,4,2147483647,-2147483648),n<0&&(n=4294967295+n+1),this[o]=n>>>24,this[o+1]=n>>>16,this[o+2]=n>>>8,this[o+3]=n&255,o+4},a.prototype.writeBigInt64LE=qe(function(n,o=0){return Wt(this,n,o,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=qe(function(n,o=0){return Ht(this,n,o,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Xt(c,n,o,g,y,T){if(o+g>c.length)throw new RangeError("Index out of range");if(o<0)throw new RangeError("Index out of range")}function wr(c,n,o,g,y){return n=+n,o=o>>>0,y||Xt(c,n,o,4),t.write(c,n,o,g,23,4),o+4}a.prototype.writeFloatLE=function(n,o,g){return wr(this,n,o,!0,g)},a.prototype.writeFloatBE=function(n,o,g){return wr(this,n,o,!1,g)};function p(c,n,o,g,y){return n=+n,o=o>>>0,y||Xt(c,n,o,8),t.write(c,n,o,g,52,8),o+8}a.prototype.writeDoubleLE=function(n,o,g){return p(this,n,o,!0,g)},a.prototype.writeDoubleBE=function(n,o,g){return p(this,n,o,!1,g)},a.prototype.copy=function(n,o,g,y){if(!a.isBuffer(n))throw new TypeError("argument should be a Buffer");if(g||(g=0),!y&&y!==0&&(y=this.length),o>=n.length&&(o=n.length),o||(o=0),y>0&&y<g&&(y=g),y===g||n.length===0||this.length===0)return 0;if(o<0)throw new RangeError("targetStart out of bounds");if(g<0||g>=this.length)throw new RangeError("Index out of range");if(y<0)throw new RangeError("sourceEnd out of bounds");y>this.length&&(y=this.length),n.length-o<y-g&&(y=n.length-o+g);const T=y-g;return this===n&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(o,g,y):Uint8Array.prototype.set.call(n,this.subarray(g,y),o),T},a.prototype.fill=function(n,o,g,y){if(typeof n=="string"){if(typeof o=="string"?(y=o,o=0,g=this.length):typeof g=="string"&&(y=g,g=this.length),y!==void 0&&typeof y!="string")throw new TypeError("encoding must be a string");if(typeof y=="string"&&!a.isEncoding(y))throw new TypeError("Unknown encoding: "+y);if(n.length===1){const k=n.charCodeAt(0);(y==="utf8"&&k<128||y==="latin1")&&(n=k)}}else typeof n=="number"?n=n&255:typeof n=="boolean"&&(n=Number(n));if(o<0||this.length<o||this.length<g)throw new RangeError("Out of range index");if(g<=o)return this;o=o>>>0,g=g===void 0?this.length:g>>>0,n||(n=0);let T;if(typeof n=="number")for(T=o;T<g;++T)this[T]=n;else{const k=a.isBuffer(n)?n:a.from(n,y),z=k.length;if(z===0)throw new TypeError('The value "'+n+'" is invalid for argument "value"');for(T=0;T<g-o;++T)this[T+o]=k[T%z]}return this};const u={};function B(c,n,o){u[c]=class extends o{constructor(){super(),Object.defineProperty(this,"message",{value:n.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${c}]`,this.stack,delete this.name}get code(){return c}set code(y){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:y,writable:!0})}toString(){return`${this.name} [${c}]: ${this.message}`}}}B("ERR_BUFFER_OUT_OF_BOUNDS",function(c){return c?`${c} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),B("ERR_INVALID_ARG_TYPE",function(c,n){return`The "${c}" argument must be of type number. Received type ${typeof n}`},TypeError),B("ERR_OUT_OF_RANGE",function(c,n,o){let g=`The value of "${c}" is out of range.`,y=o;return Number.isInteger(o)&&Math.abs(o)>2**32?y=E(String(o)):typeof o=="bigint"&&(y=String(o),(o>BigInt(2)**BigInt(32)||o<-(BigInt(2)**BigInt(32)))&&(y=E(y)),y+="n"),g+=` It must be ${n}. Received ${y}`,g},RangeError);function E(c){let n="",o=c.length;const g=c[0]==="-"?1:0;for(;o>=g+4;o-=3)n=`_${c.slice(o-3,o)}${n}`;return`${c.slice(0,o)}${n}`}function W(c,n,o){G(n,"offset"),(c[n]===void 0||c[n+o]===void 0)&&ae(n,c.length-(o+1))}function q(c,n,o,g,y,T){if(c>o||c<n){const k=typeof n=="bigint"?"n":"";let z;throw T>3?n===0||n===BigInt(0)?z=`>= 0${k} and < 2${k} ** ${(T+1)*8}${k}`:z=`>= -(2${k} ** ${(T+1)*8-1}${k}) and < 2 ** ${(T+1)*8-1}${k}`:z=`>= ${n}${k} and <= ${o}${k}`,new u.ERR_OUT_OF_RANGE("value",z,c)}W(g,y,T)}function G(c,n){if(typeof c!="number")throw new u.ERR_INVALID_ARG_TYPE(n,"number",c)}function ae(c,n,o){throw Math.floor(c)!==c?(G(c,o),new u.ERR_OUT_OF_RANGE(o||"offset","an integer",c)):n<0?new u.ERR_BUFFER_OUT_OF_BOUNDS:new u.ERR_OUT_OF_RANGE(o||"offset",`>= ${o?1:0} and <= ${n}`,c)}const me=/[^+/0-9A-Za-z-_]/g;function Ke(c){if(c=c.split("=")[0],c=c.trim().replace(me,""),c.length<2)return"";for(;c.length%4!==0;)c=c+"=";return c}function ie(c,n){n=n||1/0;let o;const g=c.length;let y=null;const T=[];for(let k=0;k<g;++k){if(o=c.charCodeAt(k),o>55295&&o<57344){if(!y){if(o>56319){(n-=3)>-1&&T.push(239,191,189);continue}else if(k+1===g){(n-=3)>-1&&T.push(239,191,189);continue}y=o;continue}if(o<56320){(n-=3)>-1&&T.push(239,191,189),y=o;continue}o=(y-55296<<10|o-56320)+65536}else y&&(n-=3)>-1&&T.push(239,191,189);if(y=null,o<128){if((n-=1)<0)break;T.push(o)}else if(o<2048){if((n-=2)<0)break;T.push(o>>6|192,o&63|128)}else if(o<65536){if((n-=3)<0)break;T.push(o>>12|224,o>>6&63|128,o&63|128)}else if(o<1114112){if((n-=4)<0)break;T.push(o>>18|240,o>>12&63|128,o>>6&63|128,o&63|128)}else throw new Error("Invalid code point")}return T}function Ce(c){const n=[];for(let o=0;o<c.length;++o)n.push(c.charCodeAt(o)&255);return n}function ui(c,n){let o,g,y;const T=[];for(let k=0;k<c.length&&!((n-=2)<0);++k)o=c.charCodeAt(k),g=o>>8,y=o%256,T.push(y),T.push(g);return T}function Gt(c){return r.toByteArray(Ke(c))}function Je(c,n,o,g){let y;for(y=0;y<g&&!(y+o>=n.length||y>=c.length);++y)n[y+o]=c[y];return y}function ve(c,n){return c instanceof n||c!=null&&c.constructor!=null&&c.constructor.name!=null&&c.constructor.name===n.name}function ci(c){return c!==c}const As=(function(){const c="0123456789abcdef",n=new Array(256);for(let o=0;o<16;++o){const g=o*16;for(let y=0;y<16;++y)n[g+y]=c[o]+c[y]}return n})();function qe(c){return typeof BigInt=="undefined"?Ns:c}function Ns(){throw new Error("BigInt not supported")}})(hi),globalThis.Buffer=hi.Buffer;var At={},te={},oe={},bn,yr;if(oe.base64=!0,oe.array=!0,oe.string=!0,oe.arraybuffer=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined",oe.nodebuffer=typeof Buffer!="undefined",oe.uint8array=typeof Uint8Array!="undefined",typeof ArrayBuffer=="undefined")yr=oe.blob=!1;else{var Tn=new ArrayBuffer(0);try{yr=oe.blob=new Blob([Tn],{type:"application/zip"}).size===0}catch(e){try{var Ls=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,In=new Ls;In.append(Tn),yr=oe.blob=In.getBlob("application/zip").size===0}catch(r){yr=oe.blob=!1}}}try{bn=oe.nodestream=!!require("readable-stream").Readable}catch(e){bn=oe.nodestream=!1}var Er={},Us=te,$s=oe,$e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";Er.encode=function(e){for(var r=[],t,i,l,s,f,a,m,h=0,d=e.length,I=d,_=Us.getTypeOf(e)!=="string";h<e.length;)I=d-h,_?(t=e[h++],i=h<d?e[h++]:0,l=h<d?e[h++]:0):(t=e.charCodeAt(h++),i=h<d?e.charCodeAt(h++):0,l=h<d?e.charCodeAt(h++):0),s=t>>2,f=(t&3)<<4|i>>4,a=I>1?(i&15)<<2|l>>6:64,m=I>2?l&63:64,r.push($e.charAt(s)+$e.charAt(f)+$e.charAt(a)+$e.charAt(m));return r.join("")},Er.decode=function(e){var r,t,i,l,s,f,a,m=0,h=0,d="data:";if(e.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");e=e.replace(/[^A-Za-z0-9+/=]/g,"");var I=e.length*3/4;if(e.charAt(e.length-1)===$e.charAt(64)&&I--,e.charAt(e.length-2)===$e.charAt(64)&&I--,I%1!==0)throw new Error("Invalid base64 input, bad content length.");var _;for($s.uint8array?_=new Uint8Array(I|0):_=new Array(I|0);m<e.length;)l=$e.indexOf(e.charAt(m++)),s=$e.indexOf(e.charAt(m++)),f=$e.indexOf(e.charAt(m++)),a=$e.indexOf(e.charAt(m++)),r=l<<2|s>>4,t=(s&15)<<4|f>>2,i=(f&3)<<6|a,_[h++]=r,f!==64&&(_[h++]=t),a!==64&&(_[h++]=i);return _};var br={isNode:typeof Buffer!="undefined",newBufferFrom:function(e,r){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,r);if(typeof e=="number")throw new Error('The "data" argument must not be a number');return new Buffer(e,r)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var r=new Buffer(e);return r.fill(0),r},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&typeof e.on=="function"&&typeof e.pause=="function"&&typeof e.resume=="function"}},An=we.MutationObserver||we.WebKitMutationObserver,Yt;if(An){var Nn=0,Ps=new An(Tr),Sn=we.document.createTextNode("");Ps.observe(Sn,{characterData:!0}),Yt=function(){Sn.data=Nn=++Nn%2}}else if(!we.setImmediate&&typeof we.MessageChannel!="undefined"){var Cn=new we.MessageChannel;Cn.port1.onmessage=Tr,Yt=function(){Cn.port2.postMessage(0)}}else"document"in we&&"onreadystatechange"in we.document.createElement("script")?Yt=function(){var e=we.document.createElement("script");e.onreadystatechange=function(){Tr(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},we.document.documentElement.appendChild(e)}:Yt=function(){setTimeout(Tr,0)};var _i,Vt=[];function Tr(){_i=!0;for(var e,r,t=Vt.length;t;){for(r=Vt,Vt=[],e=-1;++e<t;)r[e]();t=Vt.length}_i=!1}var zs=Ms;function Ms(e){Vt.push(e)===1&&!_i&&Yt()}var js=zs;function Nt(){}var pe={},kn=["REJECTED"],mi=["FULFILLED"],Bn=["PENDING"],Zs=Qe;function Qe(e){if(typeof e!="function")throw new TypeError("resolver must be a function");this.state=Bn,this.queue=[],this.outcome=void 0,e!==Nt&&Fn(this,e)}Qe.prototype.finally=function(e){if(typeof e!="function")return this;var r=this.constructor;return this.then(t,i);function t(l){function s(){return l}return r.resolve(e()).then(s)}function i(l){function s(){throw l}return r.resolve(e()).then(s)}},Qe.prototype.catch=function(e){return this.then(null,e)},Qe.prototype.then=function(e,r){if(typeof e!="function"&&this.state===mi||typeof r!="function"&&this.state===kn)return this;var t=new this.constructor(Nt);if(this.state!==Bn){var i=this.state===mi?e:r;gi(t,i,this.outcome)}else this.queue.push(new Kt(t,e,r));return t};function Kt(e,r,t){this.promise=e,typeof r=="function"&&(this.onFulfilled=r,this.callFulfilled=this.otherCallFulfilled),typeof t=="function"&&(this.onRejected=t,this.callRejected=this.otherCallRejected)}Kt.prototype.callFulfilled=function(e){pe.resolve(this.promise,e)},Kt.prototype.otherCallFulfilled=function(e){gi(this.promise,this.onFulfilled,e)},Kt.prototype.callRejected=function(e){pe.reject(this.promise,e)},Kt.prototype.otherCallRejected=function(e){gi(this.promise,this.onRejected,e)};function gi(e,r,t){js(function(){var i;try{i=r(t)}catch(l){return pe.reject(e,l)}i===e?pe.reject(e,new TypeError("Cannot resolve promise with itself")):pe.resolve(e,i)})}pe.resolve=function(e,r){var t=Dn(Ws,r);if(t.status==="error")return pe.reject(e,t.value);var i=t.value;if(i)Fn(e,i);else{e.state=mi,e.outcome=r;for(var l=-1,s=e.queue.length;++l<s;)e.queue[l].callFulfilled(r)}return e},pe.reject=function(e,r){e.state=kn,e.outcome=r;for(var t=-1,i=e.queue.length;++t<i;)e.queue[t].callRejected(r);return e};function Ws(e){var r=e&&e.then;if(e&&(typeof e=="object"||typeof e=="function")&&typeof r=="function")return function(){r.apply(e,arguments)}}function Fn(e,r){var t=!1;function i(a){t||(t=!0,pe.reject(e,a))}function l(a){t||(t=!0,pe.resolve(e,a))}function s(){r(l,i)}var f=Dn(s);f.status==="error"&&i(f.value)}function Dn(e,r){var t={};try{t.value=e(r),t.status="success"}catch(i){t.status="error",t.value=i}return t}Qe.resolve=Hs;function Hs(e){return e instanceof this?e:pe.resolve(new this(Nt),e)}Qe.reject=Xs;function Xs(e){var r=new this(Nt);return pe.reject(r,e)}Qe.all=Gs;function Gs(e){var r=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var t=e.length,i=!1;if(!t)return this.resolve([]);for(var l=new Array(t),s=0,f=-1,a=new this(Nt);++f<t;)m(e[f],f);return a;function m(h,d){r.resolve(h).then(I,function(_){i||(i=!0,pe.reject(a,_))});function I(_){l[d]=_,++s===t&&!i&&(i=!0,pe.resolve(a,l))}}}Qe.race=Ys;function Ys(e){var r=this;if(Object.prototype.toString.call(e)!=="[object Array]")return this.reject(new TypeError("must be an array"));var t=e.length,i=!1;if(!t)return this.resolve([]);for(var l=-1,s=new this(Nt);++l<t;)f(e[l]);return s;function f(a){r.resolve(a).then(function(m){i||(i=!0,pe.resolve(s,m))},function(m){i||(i=!0,pe.reject(s,m))})}}var vi=null;typeof Promise!="undefined"?vi=Promise:vi=Zs;var Jt={Promise:vi};(function(e,r){if(e.setImmediate)return;var t=1,i={},l=!1,s=e.document,f;function a(A){typeof A!="function"&&(A=new Function(""+A));for(var F=new Array(arguments.length-1),C=0;C<F.length;C++)F[C]=arguments[C+1];var D={callback:A,args:F};return i[t]=D,f(t),t++}function m(A){delete i[A]}function h(A){var F=A.callback,C=A.args;switch(C.length){case 0:F();break;case 1:F(C[0]);break;case 2:F(C[0],C[1]);break;case 3:F(C[0],C[1],C[2]);break;default:F.apply(r,C);break}}function d(A){if(l)setTimeout(d,0,A);else{var F=i[A];if(F){l=!0;try{h(F)}finally{m(A),l=!1}}}}function I(){f=function(A){setTimeout(function(){d(A)})}}function _(){if(e.postMessage&&!e.importScripts){var A=!0,F=e.onmessage;return e.onmessage=function(){A=!1},e.postMessage("","*"),e.onmessage=F,A}}function v(){var A="setImmediate$"+Math.random()+"$",F=function(C){C.source===e&&typeof C.data=="string"&&C.data.indexOf(A)===0&&d(+C.data.slice(A.length))};e.addEventListener?e.addEventListener("message",F,!1):e.attachEvent("onmessage",F),f=function(C){e.postMessage(A+C,"*")}}function w(){var A=new MessageChannel;A.port1.onmessage=function(F){var C=F.data;d(C)},f=function(F){A.port2.postMessage(F)}}function S(){var A=s.documentElement;f=function(F){var C=s.createElement("script");C.onreadystatechange=function(){d(F),C.onreadystatechange=null,A.removeChild(C),C=null},A.appendChild(C)}}function N(){f=function(A){setTimeout(d,0,A)}}var b=Object.getPrototypeOf&&Object.getPrototypeOf(e);b=b&&b.setTimeout?b:e,{}.toString.call(e.process)==="[object process]"?I():_()?v():e.MessageChannel?w():s&&"onreadystatechange"in s.createElement("script")?S():N(),b.setImmediate=a,b.clearImmediate=m})(typeof self=="undefined"?we:self),(function(e){var r=oe,t=Er,i=br,l=Jt;function s(_){var v=null;return r.uint8array?v=new Uint8Array(_.length):v=new Array(_.length),a(_,v)}e.newBlob=function(_,v){e.checkSupport("blob");try{return new Blob([_],{type:v})}catch(N){try{var w=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,S=new w;return S.append(_),S.getBlob(v)}catch(b){throw new Error("Bug : can't construct the Blob.")}}};function f(_){return _}function a(_,v){for(var w=0;w<_.length;++w)v[w]=_.charCodeAt(w)&255;return v}var m={stringifyByChunk:function(_,v,w){var S=[],N=0,b=_.length;if(b<=w)return String.fromCharCode.apply(null,_);for(;N<b;)v==="array"||v==="nodebuffer"?S.push(String.fromCharCode.apply(null,_.slice(N,Math.min(N+w,b)))):S.push(String.fromCharCode.apply(null,_.subarray(N,Math.min(N+w,b)))),N+=w;return S.join("")},stringifyByChar:function(_){for(var v="",w=0;w<_.length;w++)v+=String.fromCharCode(_[w]);return v},applyCanBeUsed:{uint8array:(function(){try{return r.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(_){return!1}})(),nodebuffer:(function(){try{return r.nodebuffer&&String.fromCharCode.apply(null,i.allocBuffer(1)).length===1}catch(_){return!1}})()}};function h(_){var v=65536,w=e.getTypeOf(_),S=!0;if(w==="uint8array"?S=m.applyCanBeUsed.uint8array:w==="nodebuffer"&&(S=m.applyCanBeUsed.nodebuffer),S)for(;v>1;)try{return m.stringifyByChunk(_,w,v)}catch(N){v=Math.floor(v/2)}return m.stringifyByChar(_)}e.applyFromCharCode=h;function d(_,v){for(var w=0;w<_.length;w++)v[w]=_[w];return v}var I={};I.string={string:f,array:function(_){return a(_,new Array(_.length))},arraybuffer:function(_){return I.string.uint8array(_).buffer},uint8array:function(_){return a(_,new Uint8Array(_.length))},nodebuffer:function(_){return a(_,i.allocBuffer(_.length))}},I.array={string:h,array:f,arraybuffer:function(_){return new Uint8Array(_).buffer},uint8array:function(_){return new Uint8Array(_)},nodebuffer:function(_){return i.newBufferFrom(_)}},I.arraybuffer={string:function(_){return h(new Uint8Array(_))},array:function(_){return d(new Uint8Array(_),new Array(_.byteLength))},arraybuffer:f,uint8array:function(_){return new Uint8Array(_)},nodebuffer:function(_){return i.newBufferFrom(new Uint8Array(_))}},I.uint8array={string:h,array:function(_){return d(_,new Array(_.length))},arraybuffer:function(_){return _.buffer},uint8array:f,nodebuffer:function(_){return i.newBufferFrom(_)}},I.nodebuffer={string:h,array:function(_){return d(_,new Array(_.length))},arraybuffer:function(_){return I.nodebuffer.uint8array(_).buffer},uint8array:function(_){return d(_,new Uint8Array(_.length))},nodebuffer:f},e.transformTo=function(_,v){if(v||(v=""),!_)return v;e.checkSupport(_);var w=e.getTypeOf(v),S=I[w][_](v);return S},e.resolve=function(_){for(var v=_.split("/"),w=[],S=0;S<v.length;S++){var N=v[S];N==="."||N===""&&S!==0&&S!==v.length-1||(N===".."?w.pop():w.push(N))}return w.join("/")},e.getTypeOf=function(_){if(typeof _=="string")return"string";var v=Object.prototype.toString.call(_);if(v==="[object Array]")return"array";if(r.nodebuffer&&i.isBuffer(_))return"nodebuffer";if(r.uint8array&&v==="[object Uint8Array]")return"uint8array";if(r.arraybuffer&&v==="[object ArrayBuffer]")return"arraybuffer"},e.checkSupport=function(_){var v=r[_.toLowerCase()];if(!v)throw new Error(_+" is not supported by this platform")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(_){var v="",w,S;for(S=0;S<(_||"").length;S++)w=_.charCodeAt(S),v+="\\x"+(w<16?"0":"")+w.toString(16).toUpperCase();return v},e.delay=function(_,v,w){setImmediate(function(){_.apply(w||null,v||[])})},e.inherits=function(_,v){var w=function(){};w.prototype=v.prototype,_.prototype=new w},e.extend=function(){var _={},v,w;for(v=0;v<arguments.length;v++)for(w in arguments[v])Object.prototype.hasOwnProperty.call(arguments[v],w)&&typeof _[w]=="undefined"&&(_[w]=arguments[v][w]);return _},e.prepareContent=function(_,v,w,S,N){var b=l.Promise.resolve(v).then(function(A){var F=r.blob&&(A instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(A))!==-1);return F?typeof Blob.prototype.arrayBuffer!="undefined"?A.arrayBuffer():typeof FileReader!="undefined"?new l.Promise(function(C,D){var U=new FileReader;U.onload=function(R){C(R.target.result)},U.onerror=function(R){D(R.target.error)},U.readAsArrayBuffer(A)}):l.Promise.reject(new Error(_+" is a Blob, but we have no way of reading it.")):A});return b.then(function(A){var F=e.getTypeOf(A);return F?(F==="arraybuffer"?A=e.transformTo("uint8array",A):F==="string"&&(N?A=t.decode(A):w&&S!==!0&&(A=s(A))),A):l.Promise.reject(new Error("Can't read the data of '"+_+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}})(te);function On(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}On.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return this.isFinished?!1:(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,r){return this._listeners[e].push(r),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,r){if(this._listeners[e])for(var t=0;t<this._listeners[e].length;t++)this._listeners[e][t].call(this,r)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var r=this;return e.on("data",function(t){r.processChunk(t)}),e.on("end",function(){r.end()}),e.on("error",function(t){r.error(t)}),this},pause:function(){return this.isPaused||this.isFinished?!1:(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;this.isPaused=!1;var e=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,r){return this.extraStreamInfo[e]=r,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}};var Ee=On;(function(e){for(var r=te,t=oe,i=br,l=Ee,s=new Array(256),f=0;f<256;f++)s[f]=f>=252?6:f>=248?5:f>=240?4:f>=224?3:f>=192?2:1;s[254]=s[254]=1;var a=function(_){var v,w,S,N,b,A=_.length,F=0;for(N=0;N<A;N++)w=_.charCodeAt(N),(w&64512)===55296&&N+1<A&&(S=_.charCodeAt(N+1),(S&64512)===56320&&(w=65536+(w-55296<<10)+(S-56320),N++)),F+=w<128?1:w<2048?2:w<65536?3:4;for(t.uint8array?v=new Uint8Array(F):v=new Array(F),b=0,N=0;b<F;N++)w=_.charCodeAt(N),(w&64512)===55296&&N+1<A&&(S=_.charCodeAt(N+1),(S&64512)===56320&&(w=65536+(w-55296<<10)+(S-56320),N++)),w<128?v[b++]=w:w<2048?(v[b++]=192|w>>>6,v[b++]=128|w&63):w<65536?(v[b++]=224|w>>>12,v[b++]=128|w>>>6&63,v[b++]=128|w&63):(v[b++]=240|w>>>18,v[b++]=128|w>>>12&63,v[b++]=128|w>>>6&63,v[b++]=128|w&63);return v},m=function(_,v){var w;for(v=v||_.length,v>_.length&&(v=_.length),w=v-1;w>=0&&(_[w]&192)===128;)w--;return w<0||w===0?v:w+s[_[w]]>v?w:v},h=function(_){var v,w,S,N,b=_.length,A=new Array(b*2);for(w=0,v=0;v<b;){if(S=_[v++],S<128){A[w++]=S;continue}if(N=s[S],N>4){A[w++]=65533,v+=N-1;continue}for(S&=N===2?31:N===3?15:7;N>1&&v<b;)S=S<<6|_[v++]&63,N--;if(N>1){A[w++]=65533;continue}S<65536?A[w++]=S:(S-=65536,A[w++]=55296|S>>10&1023,A[w++]=56320|S&1023)}return A.length!==w&&(A.subarray?A=A.subarray(0,w):A.length=w),r.applyFromCharCode(A)};e.utf8encode=function(v){return t.nodebuffer?i.newBufferFrom(v,"utf-8"):a(v)},e.utf8decode=function(v){return t.nodebuffer?r.transformTo("nodebuffer",v).toString("utf-8"):(v=r.transformTo(t.uint8array?"uint8array":"array",v),h(v))};function d(){l.call(this,"utf-8 decode"),this.leftOver=null}r.inherits(d,l),d.prototype.processChunk=function(_){var v=r.transformTo(t.uint8array?"uint8array":"array",_.data);if(this.leftOver&&this.leftOver.length){if(t.uint8array){var w=v;v=new Uint8Array(w.length+this.leftOver.length),v.set(this.leftOver,0),v.set(w,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var S=m(v),N=v;S!==v.length&&(t.uint8array?(N=v.subarray(0,S),this.leftOver=v.subarray(S,v.length)):(N=v.slice(0,S),this.leftOver=v.slice(S,v.length))),this.push({data:e.utf8decode(N),meta:_.meta})},d.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=d;function I(){l.call(this,"utf-8 encode")}r.inherits(I,l),I.prototype.processChunk=function(_){this.push({data:e.utf8encode(_.data),meta:_.meta})},e.Utf8EncodeWorker=I})(At);var Rn=Ee,Ln=te;function wi(e){Rn.call(this,"ConvertWorker to "+e),this.destType=e}Ln.inherits(wi,Rn),wi.prototype.processChunk=function(e){this.push({data:Ln.transformTo(this.destType,e.data),meta:e.meta})};var Vs=wi,ut=te,Ks=Vs,Js=Ee,qs=Er,Qs=oe,el=Jt,Un=null;if(Qs.nodestream)try{Un=require("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function tl(e,r,t){switch(e){case"blob":return ut.newBlob(ut.transformTo("arraybuffer",r),t);case"base64":return qs.encode(r);default:return ut.transformTo(e,r)}}function rl(e,r){var t,i=0,l=null,s=0;for(t=0;t<r.length;t++)s+=r[t].length;switch(e){case"string":return r.join("");case"array":return Array.prototype.concat.apply([],r);case"uint8array":for(l=new Uint8Array(s),t=0;t<r.length;t++)l.set(r[t],i),i+=r[t].length;return l;case"nodebuffer":return Buffer.concat(r);default:throw new Error("concat : unsupported type '"+e+"'")}}function il(e,r){return new el.Promise(function(t,i){var l=[],s=e._internalType,f=e._outputType,a=e._mimeType;e.on("data",function(m,h){l.push(m),r&&r(h)}).on("error",function(m){l=[],i(m)}).on("end",function(){try{var m=tl(f,rl(s,l),a);t(m)}catch(h){i(h)}l=[]}).resume()})}function $n(e,r,t){var i=r;switch(r){case"blob":case"arraybuffer":i="uint8array";break;case"base64":i="string";break}try{this._internalType=i,this._outputType=r,this._mimeType=t,ut.checkSupport(i),this._worker=e.pipe(new Ks(i)),e.lock()}catch(l){this._worker=new Js("error"),this._worker.error(l)}}$n.prototype={accumulate:function(e){return il(this,e)},on:function(e,r){var t=this;return e==="data"?this._worker.on(e,function(i){r.call(t,i.data,i.meta)}):this._worker.on(e,function(){ut.delay(r,arguments,t)}),this},resume:function(){return ut.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(ut.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new Un(this,{objectMode:this._outputType!=="nodebuffer"},e)}};var Pn=$n,be={};be.base64=!1,be.binary=!1,be.dir=!1,be.createFolders=!0,be.date=null,be.compression=null,be.compressionOptions=null,be.comment=null,be.unixPermissions=null,be.dosPermissions=null;var Ir=te,Ar=Ee,nl=16*1024;function St(e){Ar.call(this,"DataWorker");var r=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(t){r.dataIsReady=!0,r.data=t,r.max=t&&t.length||0,r.type=Ir.getTypeOf(t),r.isPaused||r._tickAndRepeat()},function(t){r.error(t)})}Ir.inherits(St,Ar),St.prototype.cleanUp=function(){Ar.prototype.cleanUp.call(this),this.data=null},St.prototype.resume=function(){return Ar.prototype.resume.call(this)?(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,Ir.delay(this._tickAndRepeat,[],this)),!0):!1},St.prototype._tickAndRepeat=function(){this._tickScheduled=!1,!(this.isPaused||this.isFinished)&&(this._tick(),this.isFinished||(Ir.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},St.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=nl,r=null,t=Math.min(this.max,this.index+e);if(this.index>=this.max)return this.end();switch(this.type){case"string":r=this.data.substring(this.index,t);break;case"uint8array":r=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":r=this.data.slice(this.index,t);break}return this.index=t,this.push({data:r,meta:{percent:this.max?this.index/this.max*100:0}})};var zn=St,al=te;function ol(){for(var e,r=[],t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r}var Mn=ol();function sl(e,r,t,i){var l=Mn,s=i+t;e=e^-1;for(var f=i;f<s;f++)e=e>>>8^l[(e^r[f])&255];return e^-1}function ll(e,r,t,i){var l=Mn,s=i+t;e=e^-1;for(var f=i;f<s;f++)e=e>>>8^l[(e^r.charCodeAt(f))&255];return e^-1}var xi=function(r,t){if(typeof r=="undefined"||!r.length)return 0;var i=al.getTypeOf(r)!=="string";return i?sl(t|0,r,r.length,0):ll(t|0,r,r.length,0)},jn=Ee,fl=xi,ul=te;function yi(){jn.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}ul.inherits(yi,jn),yi.prototype.processChunk=function(e){this.streamInfo.crc32=fl(e.data,this.streamInfo.crc32||0),this.push(e)};var Zn=yi,cl=te,Ei=Ee;function bi(e){Ei.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}cl.inherits(bi,Ei),bi.prototype.processChunk=function(e){if(e){var r=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=r+e.data.length}Ei.prototype.processChunk.call(this,e)};var hl=bi,Wn=Jt,Hn=zn,dl=Zn,Ti=hl;function Ii(e,r,t,i,l){this.compressedSize=e,this.uncompressedSize=r,this.crc32=t,this.compression=i,this.compressedContent=l}Ii.prototype={getContentWorker:function(){var e=new Hn(Wn.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new Ti("data_length")),r=this;return e.on("end",function(){if(this.streamInfo.data_length!==r.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new Hn(Wn.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},Ii.createWorkerFrom=function(e,r,t){return e.pipe(new dl).pipe(new Ti("uncompressedSize")).pipe(r.compressWorker(t)).pipe(new Ti("compressedSize")).withStreamInfo("compression",r)};var Ai=Ii,pl=Pn,_l=zn,Ni=At,Si=Ai,Xn=Ee,Ci=function(e,r,t){this.name=e,this.dir=t.dir,this.date=t.date,this.comment=t.comment,this.unixPermissions=t.unixPermissions,this.dosPermissions=t.dosPermissions,this._data=r,this._dataBinary=t.binary,this.options={compression:t.compression,compressionOptions:t.compressionOptions}};Ci.prototype={internalStream:function(e){var r=null,t="string";try{if(!e)throw new Error("No output type specified.");t=e.toLowerCase();var i=t==="string"||t==="text";(t==="binarystring"||t==="text")&&(t="string"),r=this._decompressWorker();var l=!this._dataBinary;l&&!i&&(r=r.pipe(new Ni.Utf8EncodeWorker)),!l&&i&&(r=r.pipe(new Ni.Utf8DecodeWorker))}catch(s){r=new Xn("error"),r.error(s)}return new pl(r,t,"")},async:function(e,r){return this.internalStream(e).accumulate(r)},nodeStream:function(e,r){return this.internalStream(e||"nodebuffer").toNodejsStream(r)},_compressWorker:function(e,r){if(this._data instanceof Si&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var t=this._decompressWorker();return this._dataBinary||(t=t.pipe(new Ni.Utf8EncodeWorker)),Si.createWorkerFrom(t,e,r)},_decompressWorker:function(){return this._data instanceof Si?this._data.getContentWorker():this._data instanceof Xn?this._data:new _l(this._data)}};for(var Gn=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],ml=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},ki=0;ki<Gn.length;ki++)Ci.prototype[Gn[ki]]=ml;var gl=Ci,Yn={},Nr={},Sr={},We={};(function(e){var r=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Int32Array!="undefined";function t(s,f){return Object.prototype.hasOwnProperty.call(s,f)}e.assign=function(s){for(var f=Array.prototype.slice.call(arguments,1);f.length;){var a=f.shift();if(a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(var m in a)t(a,m)&&(s[m]=a[m])}}return s},e.shrinkBuf=function(s,f){return s.length===f?s:s.subarray?s.subarray(0,f):(s.length=f,s)};var i={arraySet:function(s,f,a,m,h){if(f.subarray&&s.subarray){s.set(f.subarray(a,a+m),h);return}for(var d=0;d<m;d++)s[h+d]=f[a+d]},flattenChunks:function(s){var f,a,m,h,d,I;for(m=0,f=0,a=s.length;f<a;f++)m+=s[f].length;for(I=new Uint8Array(m),h=0,f=0,a=s.length;f<a;f++)d=s[f],I.set(d,h),h+=d.length;return I}},l={arraySet:function(s,f,a,m,h){for(var d=0;d<m;d++)s[h+d]=f[a+d]},flattenChunks:function(s){return[].concat.apply([],s)}};e.setTyped=function(s){s?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,i)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,l))},e.setTyped(r)})(We);var qt={},Pe={},Ct={},vl=We,wl=4,Vn=0,Kn=1,xl=2;function kt(e){for(var r=e.length;--r>=0;)e[r]=0}var yl=0,Jn=1,El=2,bl=3,Tl=258,Bi=29,Qt=256,er=Qt+1+Bi,Bt=30,Fi=19,qn=2*er+1,ct=15,Di=16,Il=7,Oi=256,Qn=16,ea=17,ta=18,Ri=[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],Cr=[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],Al=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ra=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Nl=512,He=new Array((er+2)*2);kt(He);var tr=new Array(Bt*2);kt(tr);var rr=new Array(Nl);kt(rr);var ir=new Array(Tl-bl+1);kt(ir);var Li=new Array(Bi);kt(Li);var kr=new Array(Bt);kt(kr);function Ui(e,r,t,i,l){this.static_tree=e,this.extra_bits=r,this.extra_base=t,this.elems=i,this.max_length=l,this.has_stree=e&&e.length}var ia,na,aa;function $i(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function oa(e){return e<256?rr[e]:rr[256+(e>>>7)]}function nr(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function ge(e,r,t){e.bi_valid>Di-t?(e.bi_buf|=r<<e.bi_valid&65535,nr(e,e.bi_buf),e.bi_buf=r>>Di-e.bi_valid,e.bi_valid+=t-Di):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=t)}function ze(e,r,t){ge(e,t[r*2],t[r*2+1])}function sa(e,r){var t=0;do t|=e&1,e>>>=1,t<<=1;while(--r>0);return t>>>1}function Sl(e){e.bi_valid===16?(nr(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function Cl(e,r){var t=r.dyn_tree,i=r.max_code,l=r.stat_desc.static_tree,s=r.stat_desc.has_stree,f=r.stat_desc.extra_bits,a=r.stat_desc.extra_base,m=r.stat_desc.max_length,h,d,I,_,v,w,S=0;for(_=0;_<=ct;_++)e.bl_count[_]=0;for(t[e.heap[e.heap_max]*2+1]=0,h=e.heap_max+1;h<qn;h++)d=e.heap[h],_=t[t[d*2+1]*2+1]+1,_>m&&(_=m,S++),t[d*2+1]=_,!(d>i)&&(e.bl_count[_]++,v=0,d>=a&&(v=f[d-a]),w=t[d*2],e.opt_len+=w*(_+v),s&&(e.static_len+=w*(l[d*2+1]+v)));if(S!==0){do{for(_=m-1;e.bl_count[_]===0;)_--;e.bl_count[_]--,e.bl_count[_+1]+=2,e.bl_count[m]--,S-=2}while(S>0);for(_=m;_!==0;_--)for(d=e.bl_count[_];d!==0;)I=e.heap[--h],!(I>i)&&(t[I*2+1]!==_&&(e.opt_len+=(_-t[I*2+1])*t[I*2],t[I*2+1]=_),d--)}}function la(e,r,t){var i=new Array(ct+1),l=0,s,f;for(s=1;s<=ct;s++)i[s]=l=l+t[s-1]<<1;for(f=0;f<=r;f++){var a=e[f*2+1];a!==0&&(e[f*2]=sa(i[a]++,a))}}function kl(){var e,r,t,i,l,s=new Array(ct+1);for(t=0,i=0;i<Bi-1;i++)for(Li[i]=t,e=0;e<1<<Ri[i];e++)ir[t++]=i;for(ir[t-1]=i,l=0,i=0;i<16;i++)for(kr[i]=l,e=0;e<1<<Cr[i];e++)rr[l++]=i;for(l>>=7;i<Bt;i++)for(kr[i]=l<<7,e=0;e<1<<Cr[i]-7;e++)rr[256+l++]=i;for(r=0;r<=ct;r++)s[r]=0;for(e=0;e<=143;)He[e*2+1]=8,e++,s[8]++;for(;e<=255;)He[e*2+1]=9,e++,s[9]++;for(;e<=279;)He[e*2+1]=7,e++,s[7]++;for(;e<=287;)He[e*2+1]=8,e++,s[8]++;for(la(He,er+1,s),e=0;e<Bt;e++)tr[e*2+1]=5,tr[e*2]=sa(e,5);ia=new Ui(He,Ri,Qt+1,er,ct),na=new Ui(tr,Cr,0,Bt,ct),aa=new Ui(new Array(0),Al,0,Fi,Il)}function fa(e){var r;for(r=0;r<er;r++)e.dyn_ltree[r*2]=0;for(r=0;r<Bt;r++)e.dyn_dtree[r*2]=0;for(r=0;r<Fi;r++)e.bl_tree[r*2]=0;e.dyn_ltree[Oi*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function ua(e){e.bi_valid>8?nr(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Bl(e,r,t,i){ua(e),i&&(nr(e,t),nr(e,~t)),vl.arraySet(e.pending_buf,e.window,r,t,e.pending),e.pending+=t}function ca(e,r,t,i){var l=r*2,s=t*2;return e[l]<e[s]||e[l]===e[s]&&i[r]<=i[t]}function Pi(e,r,t){for(var i=e.heap[t],l=t<<1;l<=e.heap_len&&(l<e.heap_len&&ca(r,e.heap[l+1],e.heap[l],e.depth)&&l++,!ca(r,i,e.heap[l],e.depth));)e.heap[t]=e.heap[l],t=l,l<<=1;e.heap[t]=i}function ha(e,r,t){var i,l,s=0,f,a;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+s*2]<<8|e.pending_buf[e.d_buf+s*2+1],l=e.pending_buf[e.l_buf+s],s++,i===0?ze(e,l,r):(f=ir[l],ze(e,f+Qt+1,r),a=Ri[f],a!==0&&(l-=Li[f],ge(e,l,a)),i--,f=oa(i),ze(e,f,t),a=Cr[f],a!==0&&(i-=kr[f],ge(e,i,a)));while(s<e.last_lit);ze(e,Oi,r)}function zi(e,r){var t=r.dyn_tree,i=r.stat_desc.static_tree,l=r.stat_desc.has_stree,s=r.stat_desc.elems,f,a,m=-1,h;for(e.heap_len=0,e.heap_max=qn,f=0;f<s;f++)t[f*2]!==0?(e.heap[++e.heap_len]=m=f,e.depth[f]=0):t[f*2+1]=0;for(;e.heap_len<2;)h=e.heap[++e.heap_len]=m<2?++m:0,t[h*2]=1,e.depth[h]=0,e.opt_len--,l&&(e.static_len-=i[h*2+1]);for(r.max_code=m,f=e.heap_len>>1;f>=1;f--)Pi(e,t,f);h=s;do f=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Pi(e,t,1),a=e.heap[1],e.heap[--e.heap_max]=f,e.heap[--e.heap_max]=a,t[h*2]=t[f*2]+t[a*2],e.depth[h]=(e.depth[f]>=e.depth[a]?e.depth[f]:e.depth[a])+1,t[f*2+1]=t[a*2+1]=h,e.heap[1]=h++,Pi(e,t,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],Cl(e,r),la(t,m,e.bl_count)}function da(e,r,t){var i,l=-1,s,f=r[1],a=0,m=7,h=4;for(f===0&&(m=138,h=3),r[(t+1)*2+1]=65535,i=0;i<=t;i++)s=f,f=r[(i+1)*2+1],!(++a<m&&s===f)&&(a<h?e.bl_tree[s*2]+=a:s!==0?(s!==l&&e.bl_tree[s*2]++,e.bl_tree[Qn*2]++):a<=10?e.bl_tree[ea*2]++:e.bl_tree[ta*2]++,a=0,l=s,f===0?(m=138,h=3):s===f?(m=6,h=3):(m=7,h=4))}function pa(e,r,t){var i,l=-1,s,f=r[1],a=0,m=7,h=4;for(f===0&&(m=138,h=3),i=0;i<=t;i++)if(s=f,f=r[(i+1)*2+1],!(++a<m&&s===f)){if(a<h)do ze(e,s,e.bl_tree);while(--a!==0);else s!==0?(s!==l&&(ze(e,s,e.bl_tree),a--),ze(e,Qn,e.bl_tree),ge(e,a-3,2)):a<=10?(ze(e,ea,e.bl_tree),ge(e,a-3,3)):(ze(e,ta,e.bl_tree),ge(e,a-11,7));a=0,l=s,f===0?(m=138,h=3):s===f?(m=6,h=3):(m=7,h=4)}}function Fl(e){var r;for(da(e,e.dyn_ltree,e.l_desc.max_code),da(e,e.dyn_dtree,e.d_desc.max_code),zi(e,e.bl_desc),r=Fi-1;r>=3&&e.bl_tree[ra[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function Dl(e,r,t,i){var l;for(ge(e,r-257,5),ge(e,t-1,5),ge(e,i-4,4),l=0;l<i;l++)ge(e,e.bl_tree[ra[l]*2+1],3);pa(e,e.dyn_ltree,r-1),pa(e,e.dyn_dtree,t-1)}function Ol(e){var r=4093624447,t;for(t=0;t<=31;t++,r>>>=1)if(r&1&&e.dyn_ltree[t*2]!==0)return Vn;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return Kn;for(t=32;t<Qt;t++)if(e.dyn_ltree[t*2]!==0)return Kn;return Vn}var _a=!1;function Rl(e){_a||(kl(),_a=!0),e.l_desc=new $i(e.dyn_ltree,ia),e.d_desc=new $i(e.dyn_dtree,na),e.bl_desc=new $i(e.bl_tree,aa),e.bi_buf=0,e.bi_valid=0,fa(e)}function ma(e,r,t,i){ge(e,(yl<<1)+(i?1:0),3),Bl(e,r,t,!0)}function Ll(e){ge(e,Jn<<1,3),ze(e,Oi,He),Sl(e)}function Ul(e,r,t,i){var l,s,f=0;e.level>0?(e.strm.data_type===xl&&(e.strm.data_type=Ol(e)),zi(e,e.l_desc),zi(e,e.d_desc),f=Fl(e),l=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=l&&(l=s)):l=s=t+5,t+4<=l&&r!==-1?ma(e,r,t,i):e.strategy===wl||s===l?(ge(e,(Jn<<1)+(i?1:0),3),ha(e,He,tr)):(ge(e,(El<<1)+(i?1:0),3),Dl(e,e.l_desc.max_code+1,e.d_desc.max_code+1,f+1),ha(e,e.dyn_ltree,e.dyn_dtree)),fa(e),i&&ua(e)}function $l(e,r,t){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=t&255,e.last_lit++,r===0?e.dyn_ltree[t*2]++:(e.matches++,r--,e.dyn_ltree[(ir[t]+Qt+1)*2]++,e.dyn_dtree[oa(r)*2]++),e.last_lit===e.lit_bufsize-1}Ct._tr_init=Rl,Ct._tr_stored_block=ma,Ct._tr_flush_block=Ul,Ct._tr_tally=$l,Ct._tr_align=Ll;function Pl(e,r,t,i){for(var l=e&65535|0,s=e>>>16&65535|0,f=0;t!==0;){f=t>2e3?2e3:t,t-=f;do l=l+r[i++]|0,s=s+l|0;while(--f);l%=65521,s%=65521}return l|s<<16|0}var ga=Pl;function zl(){for(var e,r=[],t=0;t<256;t++){e=t;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[t]=e}return r}var Ml=zl();function jl(e,r,t,i){var l=Ml,s=i+t;e^=-1;for(var f=i;f<s;f++)e=e>>>8^l[(e^r[f])&255];return e^-1}var va=jl,Mi={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},_e=We,Te=Ct,wa=ga,et=va,Zl=Mi,ht=0,Wl=1,Hl=3,tt=4,xa=5,Me=0,ya=1,Ie=-2,Xl=-3,ji=-5,Gl=-1,Yl=1,Br=2,Vl=3,Kl=4,Jl=0,ql=2,Fr=8,Ql=9,ef=15,tf=8,rf=29,nf=256,Zi=nf+1+rf,af=30,of=19,sf=2*Zi+1,lf=15,M=3,rt=258,ke=rt+M+1,ff=32,Dr=42,Wi=69,Or=73,Rr=91,Lr=103,dt=113,ar=666,se=1,or=2,pt=3,Ft=4,uf=3;function it(e,r){return e.msg=Zl[r],r}function Ea(e){return(e<<1)-(e>4?9:0)}function nt(e){for(var r=e.length;--r>=0;)e[r]=0}function at(e){var r=e.state,t=r.pending;t>e.avail_out&&(t=e.avail_out),t!==0&&(_e.arraySet(e.output,r.pending_buf,r.pending_out,t,e.next_out),e.next_out+=t,r.pending_out+=t,e.total_out+=t,e.avail_out-=t,r.pending-=t,r.pending===0&&(r.pending_out=0))}function he(e,r){Te._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,at(e.strm)}function Z(e,r){e.pending_buf[e.pending++]=r}function sr(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function cf(e,r,t,i){var l=e.avail_in;return l>i&&(l=i),l===0?0:(e.avail_in-=l,_e.arraySet(r,e.input,e.next_in,l,t),e.state.wrap===1?e.adler=wa(e.adler,r,l,t):e.state.wrap===2&&(e.adler=et(e.adler,r,l,t)),e.next_in+=l,e.total_in+=l,l)}function ba(e,r){var t=e.max_chain_length,i=e.strstart,l,s,f=e.prev_length,a=e.nice_match,m=e.strstart>e.w_size-ke?e.strstart-(e.w_size-ke):0,h=e.window,d=e.w_mask,I=e.prev,_=e.strstart+rt,v=h[i+f-1],w=h[i+f];e.prev_length>=e.good_match&&(t>>=2),a>e.lookahead&&(a=e.lookahead);do if(l=r,!(h[l+f]!==w||h[l+f-1]!==v||h[l]!==h[i]||h[++l]!==h[i+1])){i+=2,l++;do;while(h[++i]===h[++l]&&h[++i]===h[++l]&&h[++i]===h[++l]&&h[++i]===h[++l]&&h[++i]===h[++l]&&h[++i]===h[++l]&&h[++i]===h[++l]&&h[++i]===h[++l]&&i<_);if(s=rt-(_-i),i=_-rt,s>f){if(e.match_start=r,f=s,s>=a)break;v=h[i+f-1],w=h[i+f]}}while((r=I[r&d])>m&&--t!==0);return f<=e.lookahead?f:e.lookahead}function _t(e){var r=e.w_size,t,i,l,s,f;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-ke)){_e.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,i=e.hash_size,t=i;do l=e.head[--t],e.head[t]=l>=r?l-r:0;while(--i);i=r,t=i;do l=e.prev[--t],e.prev[t]=l>=r?l-r:0;while(--i);s+=r}if(e.strm.avail_in===0)break;if(i=cf(e.strm,e.window,e.strstart+e.lookahead,s),e.lookahead+=i,e.lookahead+e.insert>=M)for(f=e.strstart-e.insert,e.ins_h=e.window[f],e.ins_h=(e.ins_h<<e.hash_shift^e.window[f+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[f+M-1])&e.hash_mask,e.prev[f&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=f,f++,e.insert--,!(e.lookahead+e.insert<M)););}while(e.lookahead<ke&&e.strm.avail_in!==0)}function hf(e,r){var t=65535;for(t>e.pending_buf_size-5&&(t=e.pending_buf_size-5);;){if(e.lookahead<=1){if(_t(e),e.lookahead===0&&r===ht)return se;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+t;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,he(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-ke&&(he(e,!1),e.strm.avail_out===0))return se}return e.insert=0,r===tt?(he(e,!0),e.strm.avail_out===0?pt:Ft):(e.strstart>e.block_start&&(he(e,!1),e.strm.avail_out===0),se)}function Hi(e,r){for(var t,i;;){if(e.lookahead<ke){if(_t(e),e.lookahead<ke&&r===ht)return se;if(e.lookahead===0)break}if(t=0,e.lookahead>=M&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+M-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),t!==0&&e.strstart-t<=e.w_size-ke&&(e.match_length=ba(e,t)),e.match_length>=M)if(i=Te._tr_tally(e,e.strstart-e.match_start,e.match_length-M),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=M){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+M-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=Te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(he(e,!1),e.strm.avail_out===0))return se}return e.insert=e.strstart<M-1?e.strstart:M-1,r===tt?(he(e,!0),e.strm.avail_out===0?pt:Ft):e.last_lit&&(he(e,!1),e.strm.avail_out===0)?se:or}function Dt(e,r){for(var t,i,l;;){if(e.lookahead<ke){if(_t(e),e.lookahead<ke&&r===ht)return se;if(e.lookahead===0)break}if(t=0,e.lookahead>=M&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+M-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=M-1,t!==0&&e.prev_length<e.max_lazy_match&&e.strstart-t<=e.w_size-ke&&(e.match_length=ba(e,t),e.match_length<=5&&(e.strategy===Yl||e.match_length===M&&e.strstart-e.match_start>4096)&&(e.match_length=M-1)),e.prev_length>=M&&e.match_length<=e.prev_length){l=e.strstart+e.lookahead-M,i=Te._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-M),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=l&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+M-1])&e.hash_mask,t=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=M-1,e.strstart++,i&&(he(e,!1),e.strm.avail_out===0))return se}else if(e.match_available){if(i=Te._tr_tally(e,0,e.window[e.strstart-1]),i&&he(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return se}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=Te._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<M-1?e.strstart:M-1,r===tt?(he(e,!0),e.strm.avail_out===0?pt:Ft):e.last_lit&&(he(e,!1),e.strm.avail_out===0)?se:or}function df(e,r){for(var t,i,l,s,f=e.window;;){if(e.lookahead<=rt){if(_t(e),e.lookahead<=rt&&r===ht)return se;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=M&&e.strstart>0&&(l=e.strstart-1,i=f[l],i===f[++l]&&i===f[++l]&&i===f[++l])){s=e.strstart+rt;do;while(i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&i===f[++l]&&l<s);e.match_length=rt-(s-l),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=M?(t=Te._tr_tally(e,1,e.match_length-M),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(t=Te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),t&&(he(e,!1),e.strm.avail_out===0))return se}return e.insert=0,r===tt?(he(e,!0),e.strm.avail_out===0?pt:Ft):e.last_lit&&(he(e,!1),e.strm.avail_out===0)?se:or}function pf(e,r){for(var t;;){if(e.lookahead===0&&(_t(e),e.lookahead===0)){if(r===ht)return se;break}if(e.match_length=0,t=Te._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,t&&(he(e,!1),e.strm.avail_out===0))return se}return e.insert=0,r===tt?(he(e,!0),e.strm.avail_out===0?pt:Ft):e.last_lit&&(he(e,!1),e.strm.avail_out===0)?se:or}function je(e,r,t,i,l){this.good_length=e,this.max_lazy=r,this.nice_length=t,this.max_chain=i,this.func=l}var Ot;Ot=[new je(0,0,0,0,hf),new je(4,4,8,4,Hi),new je(4,5,16,8,Hi),new je(4,6,32,32,Hi),new je(4,4,16,16,Dt),new je(8,16,32,32,Dt),new je(8,16,128,128,Dt),new je(8,32,128,256,Dt),new je(32,128,258,1024,Dt),new je(32,258,258,4096,Dt)];function _f(e){e.window_size=2*e.w_size,nt(e.head),e.max_lazy_match=Ot[e.level].max_lazy,e.good_match=Ot[e.level].good_length,e.nice_match=Ot[e.level].nice_length,e.max_chain_length=Ot[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=M-1,e.match_available=0,e.ins_h=0}function mf(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Fr,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new _e.Buf16(sf*2),this.dyn_dtree=new _e.Buf16((2*af+1)*2),this.bl_tree=new _e.Buf16((2*of+1)*2),nt(this.dyn_ltree),nt(this.dyn_dtree),nt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new _e.Buf16(lf+1),this.heap=new _e.Buf16(2*Zi+1),nt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new _e.Buf16(2*Zi+1),nt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Ta(e){var r;return!e||!e.state?it(e,Ie):(e.total_in=e.total_out=0,e.data_type=ql,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?Dr:dt,e.adler=r.wrap===2?0:1,r.last_flush=ht,Te._tr_init(r),Me)}function Ia(e){var r=Ta(e);return r===Me&&_f(e.state),r}function gf(e,r){return!e||!e.state||e.state.wrap!==2?Ie:(e.state.gzhead=r,Me)}function Aa(e,r,t,i,l,s){if(!e)return Ie;var f=1;if(r===Gl&&(r=6),i<0?(f=0,i=-i):i>15&&(f=2,i-=16),l<1||l>Ql||t!==Fr||i<8||i>15||r<0||r>9||s<0||s>Kl)return it(e,Ie);i===8&&(i=9);var a=new mf;return e.state=a,a.strm=e,a.wrap=f,a.gzhead=null,a.w_bits=i,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=l+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+M-1)/M),a.window=new _e.Buf8(a.w_size*2),a.head=new _e.Buf16(a.hash_size),a.prev=new _e.Buf16(a.w_size),a.lit_bufsize=1<<l+6,a.pending_buf_size=a.lit_bufsize*4,a.pending_buf=new _e.Buf8(a.pending_buf_size),a.d_buf=1*a.lit_bufsize,a.l_buf=3*a.lit_bufsize,a.level=r,a.strategy=s,a.method=t,Ia(e)}function vf(e,r){return Aa(e,r,Fr,ef,tf,Jl)}function wf(e,r){var t,i,l,s;if(!e||!e.state||r>xa||r<0)return e?it(e,Ie):Ie;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===ar&&r!==tt)return it(e,e.avail_out===0?ji:Ie);if(i.strm=e,t=i.last_flush,i.last_flush=r,i.status===Dr)if(i.wrap===2)e.adler=0,Z(i,31),Z(i,139),Z(i,8),i.gzhead?(Z(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Z(i,i.gzhead.time&255),Z(i,i.gzhead.time>>8&255),Z(i,i.gzhead.time>>16&255),Z(i,i.gzhead.time>>24&255),Z(i,i.level===9?2:i.strategy>=Br||i.level<2?4:0),Z(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Z(i,i.gzhead.extra.length&255),Z(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=et(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Wi):(Z(i,0),Z(i,0),Z(i,0),Z(i,0),Z(i,0),Z(i,i.level===9?2:i.strategy>=Br||i.level<2?4:0),Z(i,uf),i.status=dt);else{var f=Fr+(i.w_bits-8<<4)<<8,a=-1;i.strategy>=Br||i.level<2?a=0:i.level<6?a=1:i.level===6?a=2:a=3,f|=a<<6,i.strstart!==0&&(f|=ff),f+=31-f%31,i.status=dt,sr(i,f),i.strstart!==0&&(sr(i,e.adler>>>16),sr(i,e.adler&65535)),e.adler=1}if(i.status===Wi)if(i.gzhead.extra){for(l=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>l&&(e.adler=et(e.adler,i.pending_buf,i.pending-l,l)),at(e),l=i.pending,i.pending===i.pending_buf_size));)Z(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>l&&(e.adler=et(e.adler,i.pending_buf,i.pending-l,l)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Or)}else i.status=Or;if(i.status===Or)if(i.gzhead.name){l=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>l&&(e.adler=et(e.adler,i.pending_buf,i.pending-l,l)),at(e),l=i.pending,i.pending===i.pending_buf_size)){s=1;break}i.gzindex<i.gzhead.name.length?s=i.gzhead.name.charCodeAt(i.gzindex++)&255:s=0,Z(i,s)}while(s!==0);i.gzhead.hcrc&&i.pending>l&&(e.adler=et(e.adler,i.pending_buf,i.pending-l,l)),s===0&&(i.gzindex=0,i.status=Rr)}else i.status=Rr;if(i.status===Rr)if(i.gzhead.comment){l=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>l&&(e.adler=et(e.adler,i.pending_buf,i.pending-l,l)),at(e),l=i.pending,i.pending===i.pending_buf_size)){s=1;break}i.gzindex<i.gzhead.comment.length?s=i.gzhead.comment.charCodeAt(i.gzindex++)&255:s=0,Z(i,s)}while(s!==0);i.gzhead.hcrc&&i.pending>l&&(e.adler=et(e.adler,i.pending_buf,i.pending-l,l)),s===0&&(i.status=Lr)}else i.status=Lr;if(i.status===Lr&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&at(e),i.pending+2<=i.pending_buf_size&&(Z(i,e.adler&255),Z(i,e.adler>>8&255),e.adler=0,i.status=dt)):i.status=dt),i.pending!==0){if(at(e),e.avail_out===0)return i.last_flush=-1,Me}else if(e.avail_in===0&&Ea(r)<=Ea(t)&&r!==tt)return it(e,ji);if(i.status===ar&&e.avail_in!==0)return it(e,ji);if(e.avail_in!==0||i.lookahead!==0||r!==ht&&i.status!==ar){var m=i.strategy===Br?pf(i,r):i.strategy===Vl?df(i,r):Ot[i.level].func(i,r);if((m===pt||m===Ft)&&(i.status=ar),m===se||m===pt)return e.avail_out===0&&(i.last_flush=-1),Me;if(m===or&&(r===Wl?Te._tr_align(i):r!==xa&&(Te._tr_stored_block(i,0,0,!1),r===Hl&&(nt(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),at(e),e.avail_out===0))return i.last_flush=-1,Me}return r!==tt?Me:i.wrap<=0?ya:(i.wrap===2?(Z(i,e.adler&255),Z(i,e.adler>>8&255),Z(i,e.adler>>16&255),Z(i,e.adler>>24&255),Z(i,e.total_in&255),Z(i,e.total_in>>8&255),Z(i,e.total_in>>16&255),Z(i,e.total_in>>24&255)):(sr(i,e.adler>>>16),sr(i,e.adler&65535)),at(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?Me:ya)}function xf(e){var r;return!e||!e.state?Ie:(r=e.state.status,r!==Dr&&r!==Wi&&r!==Or&&r!==Rr&&r!==Lr&&r!==dt&&r!==ar?it(e,Ie):(e.state=null,r===dt?it(e,Xl):Me))}function yf(e,r){var t=r.length,i,l,s,f,a,m,h,d;if(!e||!e.state||(i=e.state,f=i.wrap,f===2||f===1&&i.status!==Dr||i.lookahead))return Ie;for(f===1&&(e.adler=wa(e.adler,r,t,0)),i.wrap=0,t>=i.w_size&&(f===0&&(nt(i.head),i.strstart=0,i.block_start=0,i.insert=0),d=new _e.Buf8(i.w_size),_e.arraySet(d,r,t-i.w_size,i.w_size,0),r=d,t=i.w_size),a=e.avail_in,m=e.next_in,h=e.input,e.avail_in=t,e.next_in=0,e.input=r,_t(i);i.lookahead>=M;){l=i.strstart,s=i.lookahead-(M-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[l+M-1])&i.hash_mask,i.prev[l&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=l,l++;while(--s);i.strstart=l,i.lookahead=M-1,_t(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=M-1,i.match_available=0,e.next_in=m,e.input=h,e.avail_in=a,i.wrap=f,Me}Pe.deflateInit=vf,Pe.deflateInit2=Aa,Pe.deflateReset=Ia,Pe.deflateResetKeep=Ta,Pe.deflateSetHeader=gf,Pe.deflate=wf,Pe.deflateEnd=xf,Pe.deflateSetDictionary=yf,Pe.deflateInfo="pako deflate (from Nodeca project)";var mt={},Ur=We,Na=!0,Sa=!0;try{String.fromCharCode.apply(null,[0])}catch(e){Na=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Sa=!1}for(var lr=new Ur.Buf8(256),ot=0;ot<256;ot++)lr[ot]=ot>=252?6:ot>=248?5:ot>=240?4:ot>=224?3:ot>=192?2:1;lr[254]=lr[254]=1,mt.string2buf=function(e){var r,t,i,l,s,f=e.length,a=0;for(l=0;l<f;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<f&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),a+=t<128?1:t<2048?2:t<65536?3:4;for(r=new Ur.Buf8(a),s=0,l=0;s<a;l++)t=e.charCodeAt(l),(t&64512)===55296&&l+1<f&&(i=e.charCodeAt(l+1),(i&64512)===56320&&(t=65536+(t-55296<<10)+(i-56320),l++)),t<128?r[s++]=t:t<2048?(r[s++]=192|t>>>6,r[s++]=128|t&63):t<65536?(r[s++]=224|t>>>12,r[s++]=128|t>>>6&63,r[s++]=128|t&63):(r[s++]=240|t>>>18,r[s++]=128|t>>>12&63,r[s++]=128|t>>>6&63,r[s++]=128|t&63);return r};function Ca(e,r){if(r<65534&&(e.subarray&&Sa||!e.subarray&&Na))return String.fromCharCode.apply(null,Ur.shrinkBuf(e,r));for(var t="",i=0;i<r;i++)t+=String.fromCharCode(e[i]);return t}mt.buf2binstring=function(e){return Ca(e,e.length)},mt.binstring2buf=function(e){for(var r=new Ur.Buf8(e.length),t=0,i=r.length;t<i;t++)r[t]=e.charCodeAt(t);return r},mt.buf2string=function(e,r){var t,i,l,s,f=r||e.length,a=new Array(f*2);for(i=0,t=0;t<f;){if(l=e[t++],l<128){a[i++]=l;continue}if(s=lr[l],s>4){a[i++]=65533,t+=s-1;continue}for(l&=s===2?31:s===3?15:7;s>1&&t<f;)l=l<<6|e[t++]&63,s--;if(s>1){a[i++]=65533;continue}l<65536?a[i++]=l:(l-=65536,a[i++]=55296|l>>10&1023,a[i++]=56320|l&1023)}return Ca(a,i)},mt.utf8border=function(e,r){var t;for(r=r||e.length,r>e.length&&(r=e.length),t=r-1;t>=0&&(e[t]&192)===128;)t--;return t<0||t===0?r:t+lr[e[t]]>r?t:r};function Ef(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var ka=Ef,fr=Pe,ur=We,Xi=mt,Gi=Mi,bf=ka,Ba=Object.prototype.toString,Tf=0,Yi=4,Rt=0,Fa=1,Da=2,If=-1,Af=0,Nf=8;function gt(e){if(!(this instanceof gt))return new gt(e);this.options=ur.assign({level:If,method:Nf,chunkSize:16384,windowBits:15,memLevel:8,strategy:Af,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new bf,this.strm.avail_out=0;var t=fr.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(t!==Rt)throw new Error(Gi[t]);if(r.header&&fr.deflateSetHeader(this.strm,r.header),r.dictionary){var i;if(typeof r.dictionary=="string"?i=Xi.string2buf(r.dictionary):Ba.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,t=fr.deflateSetDictionary(this.strm,i),t!==Rt)throw new Error(Gi[t]);this._dict_set=!0}}gt.prototype.push=function(e,r){var t=this.strm,i=this.options.chunkSize,l,s;if(this.ended)return!1;s=r===~~r?r:r===!0?Yi:Tf,typeof e=="string"?t.input=Xi.string2buf(e):Ba.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new ur.Buf8(i),t.next_out=0,t.avail_out=i),l=fr.deflate(t,s),l!==Fa&&l!==Rt)return this.onEnd(l),this.ended=!0,!1;(t.avail_out===0||t.avail_in===0&&(s===Yi||s===Da))&&(this.options.to==="string"?this.onData(Xi.buf2binstring(ur.shrinkBuf(t.output,t.next_out))):this.onData(ur.shrinkBuf(t.output,t.next_out)))}while((t.avail_in>0||t.avail_out===0)&&l!==Fa);return s===Yi?(l=fr.deflateEnd(this.strm),this.onEnd(l),this.ended=!0,l===Rt):(s===Da&&(this.onEnd(Rt),t.avail_out=0),!0)},gt.prototype.onData=function(e){this.chunks.push(e)},gt.prototype.onEnd=function(e){e===Rt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=ur.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function Vi(e,r){var t=new gt(r);if(t.push(e,!0),t.err)throw t.msg||Gi[t.err];return t.result}function Sf(e,r){return r=r||{},r.raw=!0,Vi(e,r)}function Cf(e,r){return r=r||{},r.gzip=!0,Vi(e,r)}qt.Deflate=gt,qt.deflate=Vi,qt.deflateRaw=Sf,qt.gzip=Cf;var cr={},Be={},$r=30,kf=12,Bf=function(r,t){var i,l,s,f,a,m,h,d,I,_,v,w,S,N,b,A,F,C,D,U,R,L,x,j,O;i=r.state,l=r.next_in,j=r.input,s=l+(r.avail_in-5),f=r.next_out,O=r.output,a=f-(t-r.avail_out),m=f+(r.avail_out-257),h=i.dmax,d=i.wsize,I=i.whave,_=i.wnext,v=i.window,w=i.hold,S=i.bits,N=i.lencode,b=i.distcode,A=(1<<i.lenbits)-1,F=(1<<i.distbits)-1;e:do{S<15&&(w+=j[l++]<<S,S+=8,w+=j[l++]<<S,S+=8),C=N[w&A];t:for(;;){if(D=C>>>24,w>>>=D,S-=D,D=C>>>16&255,D===0)O[f++]=C&65535;else if(D&16){U=C&65535,D&=15,D&&(S<D&&(w+=j[l++]<<S,S+=8),U+=w&(1<<D)-1,w>>>=D,S-=D),S<15&&(w+=j[l++]<<S,S+=8,w+=j[l++]<<S,S+=8),C=b[w&F];r:for(;;){if(D=C>>>24,w>>>=D,S-=D,D=C>>>16&255,D&16){if(R=C&65535,D&=15,S<D&&(w+=j[l++]<<S,S+=8,S<D&&(w+=j[l++]<<S,S+=8)),R+=w&(1<<D)-1,R>h){r.msg="invalid distance too far back",i.mode=$r;break e}if(w>>>=D,S-=D,D=f-a,R>D){if(D=R-D,D>I&&i.sane){r.msg="invalid distance too far back",i.mode=$r;break e}if(L=0,x=v,_===0){if(L+=d-D,D<U){U-=D;do O[f++]=v[L++];while(--D);L=f-R,x=O}}else if(_<D){if(L+=d+_-D,D-=_,D<U){U-=D;do O[f++]=v[L++];while(--D);if(L=0,_<U){D=_,U-=D;do O[f++]=v[L++];while(--D);L=f-R,x=O}}}else if(L+=_-D,D<U){U-=D;do O[f++]=v[L++];while(--D);L=f-R,x=O}for(;U>2;)O[f++]=x[L++],O[f++]=x[L++],O[f++]=x[L++],U-=3;U&&(O[f++]=x[L++],U>1&&(O[f++]=x[L++]))}else{L=f-R;do O[f++]=O[L++],O[f++]=O[L++],O[f++]=O[L++],U-=3;while(U>2);U&&(O[f++]=O[L++],U>1&&(O[f++]=O[L++]))}}else if((D&64)===0){C=b[(C&65535)+(w&(1<<D)-1)];continue r}else{r.msg="invalid distance code",i.mode=$r;break e}break}}else if((D&64)===0){C=N[(C&65535)+(w&(1<<D)-1)];continue t}else if(D&32){i.mode=kf;break e}else{r.msg="invalid literal/length code",i.mode=$r;break e}break}}while(l<s&&f<m);U=S>>3,l-=U,S-=U<<3,w&=(1<<S)-1,r.next_in=l,r.next_out=f,r.avail_in=l<s?5+(s-l):5-(l-s),r.avail_out=f<m?257+(m-f):257-(f-m),i.hold=w,i.bits=S},Oa=We,Lt=15,Ra=852,La=592,Ua=0,Ki=1,$a=2,Ff=[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],Df=[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],Of=[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],Rf=[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],Lf=function(r,t,i,l,s,f,a,m){var h=m.bits,d=0,I=0,_=0,v=0,w=0,S=0,N=0,b=0,A=0,F=0,C,D,U,R,L,x=null,j=0,O,P=new Oa.Buf16(Lt+1),le=new Oa.Buf16(Lt+1),V=null,re=0,ce,$,fe;for(d=0;d<=Lt;d++)P[d]=0;for(I=0;I<l;I++)P[t[i+I]]++;for(w=h,v=Lt;v>=1&&P[v]===0;v--);if(w>v&&(w=v),v===0)return s[f++]=1<<24|64<<16|0,s[f++]=1<<24|64<<16|0,m.bits=1,0;for(_=1;_<v&&P[_]===0;_++);for(w<_&&(w=_),b=1,d=1;d<=Lt;d++)if(b<<=1,b-=P[d],b<0)return-1;if(b>0&&(r===Ua||v!==1))return-1;for(le[1]=0,d=1;d<Lt;d++)le[d+1]=le[d]+P[d];for(I=0;I<l;I++)t[i+I]!==0&&(a[le[t[i+I]]++]=I);if(r===Ua?(x=V=a,O=19):r===Ki?(x=Ff,j-=257,V=Df,re-=257,O=256):(x=Of,V=Rf,O=-1),F=0,I=0,d=_,L=f,S=w,N=0,U=-1,A=1<<w,R=A-1,r===Ki&&A>Ra||r===$a&&A>La)return 1;for(;;){ce=d-N,a[I]<O?($=0,fe=a[I]):a[I]>O?($=V[re+a[I]],fe=x[j+a[I]]):($=96,fe=0),C=1<<d-N,D=1<<S,_=D;do D-=C,s[L+(F>>N)+D]=ce<<24|$<<16|fe|0;while(D!==0);for(C=1<<d-1;F&C;)C>>=1;if(C!==0?(F&=C-1,F+=C):F=0,I++,--P[d]===0){if(d===v)break;d=t[i+a[I]]}if(d>w&&(F&R)!==U){for(N===0&&(N=w),L+=_,S=d-N,b=1<<S;S+N<v&&(b-=P[S+N],!(b<=0));)S++,b<<=1;if(A+=1<<S,r===Ki&&A>Ra||r===$a&&A>La)return 1;U=F&R,s[U]=w<<24|S<<16|L-f|0}}return F!==0&&(s[L+F]=d-N<<24|64<<16|0),m.bits=w,0},xe=We,Ji=ga,Ze=va,Uf=Bf,hr=Lf,$f=0,Pa=1,za=2,Ma=4,Pf=5,Pr=6,vt=0,zf=1,Mf=2,Ae=-2,ja=-3,Za=-4,jf=-5,Wa=8,Ha=1,Xa=2,Ga=3,Ya=4,Va=5,Ka=6,Ja=7,qa=8,Qa=9,eo=10,zr=11,Xe=12,qi=13,to=14,Qi=15,ro=16,io=17,no=18,ao=19,Mr=20,jr=21,oo=22,so=23,lo=24,fo=25,uo=26,en=27,co=28,ho=29,J=30,po=31,Zf=32,Wf=852,Hf=592,Xf=15,Gf=Xf;function _o(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function Yf(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new xe.Buf16(320),this.work=new xe.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function mo(e){var r;return!e||!e.state?Ae:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=Ha,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new xe.Buf32(Wf),r.distcode=r.distdyn=new xe.Buf32(Hf),r.sane=1,r.back=-1,vt)}function go(e){var r;return!e||!e.state?Ae:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,mo(e))}function vo(e,r){var t,i;return!e||!e.state||(i=e.state,r<0?(t=0,r=-r):(t=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?Ae:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=t,i.wbits=r,go(e))}function wo(e,r){var t,i;return e?(i=new Yf,e.state=i,i.window=null,t=vo(e,r),t!==vt&&(e.state=null),t):Ae}function Vf(e){return wo(e,Gf)}var xo=!0,tn,rn;function Kf(e){if(xo){var r;for(tn=new xe.Buf32(512),rn=new xe.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(hr(Pa,e.lens,0,288,tn,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;hr(za,e.lens,0,32,rn,0,e.work,{bits:5}),xo=!1}e.lencode=tn,e.lenbits=9,e.distcode=rn,e.distbits=5}function yo(e,r,t,i){var l,s=e.state;return s.window===null&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new xe.Buf8(s.wsize)),i>=s.wsize?(xe.arraySet(s.window,r,t-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(l=s.wsize-s.wnext,l>i&&(l=i),xe.arraySet(s.window,r,t-i,l,s.wnext),i-=l,i?(xe.arraySet(s.window,r,t-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=l,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=l))),0}function Jf(e,r){var t,i,l,s,f,a,m,h,d,I,_,v,w,S,N=0,b,A,F,C,D,U,R,L,x=new xe.Buf8(4),j,O,P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return Ae;t=e.state,t.mode===Xe&&(t.mode=qi),f=e.next_out,l=e.output,m=e.avail_out,s=e.next_in,i=e.input,a=e.avail_in,h=t.hold,d=t.bits,I=a,_=m,L=vt;e:for(;;)switch(t.mode){case Ha:if(t.wrap===0){t.mode=qi;break}for(;d<16;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}if(t.wrap&2&&h===35615){t.check=0,x[0]=h&255,x[1]=h>>>8&255,t.check=Ze(t.check,x,2,0),h=0,d=0,t.mode=Xa;break}if(t.flags=0,t.head&&(t.head.done=!1),!(t.wrap&1)||(((h&255)<<8)+(h>>8))%31){e.msg="incorrect header check",t.mode=J;break}if((h&15)!==Wa){e.msg="unknown compression method",t.mode=J;break}if(h>>>=4,d-=4,R=(h&15)+8,t.wbits===0)t.wbits=R;else if(R>t.wbits){e.msg="invalid window size",t.mode=J;break}t.dmax=1<<R,e.adler=t.check=1,t.mode=h&512?eo:Xe,h=0,d=0;break;case Xa:for(;d<16;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}if(t.flags=h,(t.flags&255)!==Wa){e.msg="unknown compression method",t.mode=J;break}if(t.flags&57344){e.msg="unknown header flags set",t.mode=J;break}t.head&&(t.head.text=h>>8&1),t.flags&512&&(x[0]=h&255,x[1]=h>>>8&255,t.check=Ze(t.check,x,2,0)),h=0,d=0,t.mode=Ga;case Ga:for(;d<32;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}t.head&&(t.head.time=h),t.flags&512&&(x[0]=h&255,x[1]=h>>>8&255,x[2]=h>>>16&255,x[3]=h>>>24&255,t.check=Ze(t.check,x,4,0)),h=0,d=0,t.mode=Ya;case Ya:for(;d<16;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}t.head&&(t.head.xflags=h&255,t.head.os=h>>8),t.flags&512&&(x[0]=h&255,x[1]=h>>>8&255,t.check=Ze(t.check,x,2,0)),h=0,d=0,t.mode=Va;case Va:if(t.flags&1024){for(;d<16;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}t.length=h,t.head&&(t.head.extra_len=h),t.flags&512&&(x[0]=h&255,x[1]=h>>>8&255,t.check=Ze(t.check,x,2,0)),h=0,d=0}else t.head&&(t.head.extra=null);t.mode=Ka;case Ka:if(t.flags&1024&&(v=t.length,v>a&&(v=a),v&&(t.head&&(R=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Array(t.head.extra_len)),xe.arraySet(t.head.extra,i,s,v,R)),t.flags&512&&(t.check=Ze(t.check,i,v,s)),a-=v,s+=v,t.length-=v),t.length))break e;t.length=0,t.mode=Ja;case Ja:if(t.flags&2048){if(a===0)break e;v=0;do R=i[s+v++],t.head&&R&&t.length<65536&&(t.head.name+=String.fromCharCode(R));while(R&&v<a);if(t.flags&512&&(t.check=Ze(t.check,i,v,s)),a-=v,s+=v,R)break e}else t.head&&(t.head.name=null);t.length=0,t.mode=qa;case qa:if(t.flags&4096){if(a===0)break e;v=0;do R=i[s+v++],t.head&&R&&t.length<65536&&(t.head.comment+=String.fromCharCode(R));while(R&&v<a);if(t.flags&512&&(t.check=Ze(t.check,i,v,s)),a-=v,s+=v,R)break e}else t.head&&(t.head.comment=null);t.mode=Qa;case Qa:if(t.flags&512){for(;d<16;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}if(h!==(t.check&65535)){e.msg="header crc mismatch",t.mode=J;break}h=0,d=0}t.head&&(t.head.hcrc=t.flags>>9&1,t.head.done=!0),e.adler=t.check=0,t.mode=Xe;break;case eo:for(;d<32;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}e.adler=t.check=_o(h),h=0,d=0,t.mode=zr;case zr:if(t.havedict===0)return e.next_out=f,e.avail_out=m,e.next_in=s,e.avail_in=a,t.hold=h,t.bits=d,Mf;e.adler=t.check=1,t.mode=Xe;case Xe:if(r===Pf||r===Pr)break e;case qi:if(t.last){h>>>=d&7,d-=d&7,t.mode=en;break}for(;d<3;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}switch(t.last=h&1,h>>>=1,d-=1,h&3){case 0:t.mode=to;break;case 1:if(Kf(t),t.mode=Mr,r===Pr){h>>>=2,d-=2;break e}break;case 2:t.mode=io;break;case 3:e.msg="invalid block type",t.mode=J}h>>>=2,d-=2;break;case to:for(h>>>=d&7,d-=d&7;d<32;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}if((h&65535)!==(h>>>16^65535)){e.msg="invalid stored block lengths",t.mode=J;break}if(t.length=h&65535,h=0,d=0,t.mode=Qi,r===Pr)break e;case Qi:t.mode=ro;case ro:if(v=t.length,v){if(v>a&&(v=a),v>m&&(v=m),v===0)break e;xe.arraySet(l,i,s,v,f),a-=v,s+=v,m-=v,f+=v,t.length-=v;break}t.mode=Xe;break;case io:for(;d<14;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}if(t.nlen=(h&31)+257,h>>>=5,d-=5,t.ndist=(h&31)+1,h>>>=5,d-=5,t.ncode=(h&15)+4,h>>>=4,d-=4,t.nlen>286||t.ndist>30){e.msg="too many length or distance symbols",t.mode=J;break}t.have=0,t.mode=no;case no:for(;t.have<t.ncode;){for(;d<3;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}t.lens[P[t.have++]]=h&7,h>>>=3,d-=3}for(;t.have<19;)t.lens[P[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,j={bits:t.lenbits},L=hr($f,t.lens,0,19,t.lencode,0,t.work,j),t.lenbits=j.bits,L){e.msg="invalid code lengths set",t.mode=J;break}t.have=0,t.mode=ao;case ao:for(;t.have<t.nlen+t.ndist;){for(;N=t.lencode[h&(1<<t.lenbits)-1],b=N>>>24,A=N>>>16&255,F=N&65535,!(b<=d);){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}if(F<16)h>>>=b,d-=b,t.lens[t.have++]=F;else{if(F===16){for(O=b+2;d<O;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}if(h>>>=b,d-=b,t.have===0){e.msg="invalid bit length repeat",t.mode=J;break}R=t.lens[t.have-1],v=3+(h&3),h>>>=2,d-=2}else if(F===17){for(O=b+3;d<O;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}h>>>=b,d-=b,R=0,v=3+(h&7),h>>>=3,d-=3}else{for(O=b+7;d<O;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}h>>>=b,d-=b,R=0,v=11+(h&127),h>>>=7,d-=7}if(t.have+v>t.nlen+t.ndist){e.msg="invalid bit length repeat",t.mode=J;break}for(;v--;)t.lens[t.have++]=R}}if(t.mode===J)break;if(t.lens[256]===0){e.msg="invalid code -- missing end-of-block",t.mode=J;break}if(t.lenbits=9,j={bits:t.lenbits},L=hr(Pa,t.lens,0,t.nlen,t.lencode,0,t.work,j),t.lenbits=j.bits,L){e.msg="invalid literal/lengths set",t.mode=J;break}if(t.distbits=6,t.distcode=t.distdyn,j={bits:t.distbits},L=hr(za,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,j),t.distbits=j.bits,L){e.msg="invalid distances set",t.mode=J;break}if(t.mode=Mr,r===Pr)break e;case Mr:t.mode=jr;case jr:if(a>=6&&m>=258){e.next_out=f,e.avail_out=m,e.next_in=s,e.avail_in=a,t.hold=h,t.bits=d,Uf(e,_),f=e.next_out,l=e.output,m=e.avail_out,s=e.next_in,i=e.input,a=e.avail_in,h=t.hold,d=t.bits,t.mode===Xe&&(t.back=-1);break}for(t.back=0;N=t.lencode[h&(1<<t.lenbits)-1],b=N>>>24,A=N>>>16&255,F=N&65535,!(b<=d);){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}if(A&&(A&240)===0){for(C=b,D=A,U=F;N=t.lencode[U+((h&(1<<C+D)-1)>>C)],b=N>>>24,A=N>>>16&255,F=N&65535,!(C+b<=d);){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}h>>>=C,d-=C,t.back+=C}if(h>>>=b,d-=b,t.back+=b,t.length=F,A===0){t.mode=uo;break}if(A&32){t.back=-1,t.mode=Xe;break}if(A&64){e.msg="invalid literal/length code",t.mode=J;break}t.extra=A&15,t.mode=oo;case oo:if(t.extra){for(O=t.extra;d<O;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}t.length+=h&(1<<t.extra)-1,h>>>=t.extra,d-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=so;case so:for(;N=t.distcode[h&(1<<t.distbits)-1],b=N>>>24,A=N>>>16&255,F=N&65535,!(b<=d);){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}if((A&240)===0){for(C=b,D=A,U=F;N=t.distcode[U+((h&(1<<C+D)-1)>>C)],b=N>>>24,A=N>>>16&255,F=N&65535,!(C+b<=d);){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}h>>>=C,d-=C,t.back+=C}if(h>>>=b,d-=b,t.back+=b,A&64){e.msg="invalid distance code",t.mode=J;break}t.offset=F,t.extra=A&15,t.mode=lo;case lo:if(t.extra){for(O=t.extra;d<O;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}t.offset+=h&(1<<t.extra)-1,h>>>=t.extra,d-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){e.msg="invalid distance too far back",t.mode=J;break}t.mode=fo;case fo:if(m===0)break e;if(v=_-m,t.offset>v){if(v=t.offset-v,v>t.whave&&t.sane){e.msg="invalid distance too far back",t.mode=J;break}v>t.wnext?(v-=t.wnext,w=t.wsize-v):w=t.wnext-v,v>t.length&&(v=t.length),S=t.window}else S=l,w=f-t.offset,v=t.length;v>m&&(v=m),m-=v,t.length-=v;do l[f++]=S[w++];while(--v);t.length===0&&(t.mode=jr);break;case uo:if(m===0)break e;l[f++]=t.length,m--,t.mode=jr;break;case en:if(t.wrap){for(;d<32;){if(a===0)break e;a--,h|=i[s++]<<d,d+=8}if(_-=m,e.total_out+=_,t.total+=_,_&&(e.adler=t.check=t.flags?Ze(t.check,l,_,f-_):Ji(t.check,l,_,f-_)),_=m,(t.flags?h:_o(h))!==t.check){e.msg="incorrect data check",t.mode=J;break}h=0,d=0}t.mode=co;case co:if(t.wrap&&t.flags){for(;d<32;){if(a===0)break e;a--,h+=i[s++]<<d,d+=8}if(h!==(t.total&4294967295)){e.msg="incorrect length check",t.mode=J;break}h=0,d=0}t.mode=ho;case ho:L=zf;break e;case J:L=ja;break e;case po:return Za;case Zf:default:return Ae}return e.next_out=f,e.avail_out=m,e.next_in=s,e.avail_in=a,t.hold=h,t.bits=d,(t.wsize||_!==e.avail_out&&t.mode<J&&(t.mode<en||r!==Ma))&&yo(e,e.output,e.next_out,_-e.avail_out),I-=e.avail_in,_-=e.avail_out,e.total_in+=I,e.total_out+=_,t.total+=_,t.wrap&&_&&(e.adler=t.check=t.flags?Ze(t.check,l,_,e.next_out-_):Ji(t.check,l,_,e.next_out-_)),e.data_type=t.bits+(t.last?64:0)+(t.mode===Xe?128:0)+(t.mode===Mr||t.mode===Qi?256:0),(I===0&&_===0||r===Ma)&&L===vt&&(L=jf),L}function qf(e){if(!e||!e.state)return Ae;var r=e.state;return r.window&&(r.window=null),e.state=null,vt}function Qf(e,r){var t;return!e||!e.state||(t=e.state,(t.wrap&2)===0)?Ae:(t.head=r,r.done=!1,vt)}function eu(e,r){var t=r.length,i,l,s;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==zr)?Ae:i.mode===zr&&(l=1,l=Ji(l,r,t,0),l!==i.check)?ja:(s=yo(e,r,t,t),s?(i.mode=po,Za):(i.havedict=1,vt))}Be.inflateReset=go,Be.inflateReset2=vo,Be.inflateResetKeep=mo,Be.inflateInit=Vf,Be.inflateInit2=wo,Be.inflate=Jf,Be.inflateEnd=qf,Be.inflateGetHeader=Qf,Be.inflateSetDictionary=eu,Be.inflateInfo="pako inflate (from Nodeca project)";var Eo={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_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};function tu(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var ru=tu,Ut=Be,dr=We,Zr=mt,ne=Eo,nn=Mi,iu=ka,nu=ru,bo=Object.prototype.toString;function wt(e){if(!(this instanceof wt))return new wt(e);this.options=dr.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15)===0&&(r.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new iu,this.strm.avail_out=0;var t=Ut.inflateInit2(this.strm,r.windowBits);if(t!==ne.Z_OK)throw new Error(nn[t]);if(this.header=new nu,Ut.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Zr.string2buf(r.dictionary):bo.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(t=Ut.inflateSetDictionary(this.strm,r.dictionary),t!==ne.Z_OK)))throw new Error(nn[t])}wt.prototype.push=function(e,r){var t=this.strm,i=this.options.chunkSize,l=this.options.dictionary,s,f,a,m,h,d=!1;if(this.ended)return!1;f=r===~~r?r:r===!0?ne.Z_FINISH:ne.Z_NO_FLUSH,typeof e=="string"?t.input=Zr.binstring2buf(e):bo.call(e)==="[object ArrayBuffer]"?t.input=new Uint8Array(e):t.input=e,t.next_in=0,t.avail_in=t.input.length;do{if(t.avail_out===0&&(t.output=new dr.Buf8(i),t.next_out=0,t.avail_out=i),s=Ut.inflate(t,ne.Z_NO_FLUSH),s===ne.Z_NEED_DICT&&l&&(s=Ut.inflateSetDictionary(this.strm,l)),s===ne.Z_BUF_ERROR&&d===!0&&(s=ne.Z_OK,d=!1),s!==ne.Z_STREAM_END&&s!==ne.Z_OK)return this.onEnd(s),this.ended=!0,!1;t.next_out&&(t.avail_out===0||s===ne.Z_STREAM_END||t.avail_in===0&&(f===ne.Z_FINISH||f===ne.Z_SYNC_FLUSH))&&(this.options.to==="string"?(a=Zr.utf8border(t.output,t.next_out),m=t.next_out-a,h=Zr.buf2string(t.output,a),t.next_out=m,t.avail_out=i-m,m&&dr.arraySet(t.output,t.output,a,m,0),this.onData(h)):this.onData(dr.shrinkBuf(t.output,t.next_out))),t.avail_in===0&&t.avail_out===0&&(d=!0)}while((t.avail_in>0||t.avail_out===0)&&s!==ne.Z_STREAM_END);return s===ne.Z_STREAM_END&&(f=ne.Z_FINISH),f===ne.Z_FINISH?(s=Ut.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,s===ne.Z_OK):(f===ne.Z_SYNC_FLUSH&&(this.onEnd(ne.Z_OK),t.avail_out=0),!0)},wt.prototype.onData=function(e){this.chunks.push(e)},wt.prototype.onEnd=function(e){e===ne.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=dr.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function an(e,r){var t=new wt(r);if(t.push(e,!0),t.err)throw t.msg||nn[t.err];return t.result}function au(e,r){return r=r||{},r.raw=!0,an(e,r)}cr.Inflate=wt,cr.inflate=an,cr.inflateRaw=au,cr.ungzip=an;var ou=We.assign,su=qt,lu=cr,fu=Eo,To={};ou(To,su,lu,fu);var uu=To,cu=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined",hu=uu,Io=te,Wr=Ee,du=cu?"uint8array":"array";Sr.magic="\b\0";function xt(e,r){Wr.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=r,this.meta={}}Io.inherits(xt,Wr),xt.prototype.processChunk=function(e){this.meta=e.meta,this._pako===null&&this._createPako(),this._pako.push(Io.transformTo(du,e.data),!1)},xt.prototype.flush=function(){Wr.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},xt.prototype.cleanUp=function(){Wr.prototype.cleanUp.call(this),this._pako=null},xt.prototype._createPako=function(){this._pako=new hu[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(r){e.push({data:r,meta:e.meta})}},Sr.compressWorker=function(e){return new xt("Deflate",e)},Sr.uncompressWorker=function(){return new xt("Inflate",{})};var Ao=Ee;Nr.STORE={magic:"\0\0",compressWorker:function(){return new Ao("STORE compression")},uncompressWorker:function(){return new Ao("STORE decompression")}},Nr.DEFLATE=Sr;var st={};st.LOCAL_FILE_HEADER="PK",st.CENTRAL_FILE_HEADER="PK",st.CENTRAL_DIRECTORY_END="PK",st.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",st.ZIP64_CENTRAL_DIRECTORY_END="PK",st.DATA_DESCRIPTOR="PK\x07\b";var $t=te,Pt=Ee,on=At,No=xi,Hr=st,Y=function(e,r){var t="",i;for(i=0;i<r;i++)t+=String.fromCharCode(e&255),e=e>>>8;return t},pu=function(e,r){var t=e;return e||(t=r?16893:33204),(t&65535)<<16},_u=function(e){return(e||0)&63},So=function(e,r,t,i,l,s){var f=e.file,a=e.compression,m=s!==on.utf8encode,h=$t.transformTo("string",s(f.name)),d=$t.transformTo("string",on.utf8encode(f.name)),I=f.comment,_=$t.transformTo("string",s(I)),v=$t.transformTo("string",on.utf8encode(I)),w=d.length!==f.name.length,S=v.length!==I.length,N,b,A="",F="",C="",D=f.dir,U=f.date,R={crc32:0,compressedSize:0,uncompressedSize:0};(!r||t)&&(R.crc32=e.crc32,R.compressedSize=e.compressedSize,R.uncompressedSize=e.uncompressedSize);var L=0;r&&(L|=8),!m&&(w||S)&&(L|=2048);var x=0,j=0;D&&(x|=16),l==="UNIX"?(j=798,x|=pu(f.unixPermissions,D)):(j=20,x|=_u(f.dosPermissions)),N=U.getUTCHours(),N=N<<6,N=N|U.getUTCMinutes(),N=N<<5,N=N|U.getUTCSeconds()/2,b=U.getUTCFullYear()-1980,b=b<<4,b=b|U.getUTCMonth()+1,b=b<<5,b=b|U.getUTCDate(),w&&(F=Y(1,1)+Y(No(h),4)+d,A+="up"+Y(F.length,2)+F),S&&(C=Y(1,1)+Y(No(_),4)+v,A+="uc"+Y(C.length,2)+C);var O="";O+=`
7
+ \0`,O+=Y(L,2),O+=a.magic,O+=Y(N,2),O+=Y(b,2),O+=Y(R.crc32,4),O+=Y(R.compressedSize,4),O+=Y(R.uncompressedSize,4),O+=Y(h.length,2),O+=Y(A.length,2);var P=Hr.LOCAL_FILE_HEADER+O+h+A,le=Hr.CENTRAL_FILE_HEADER+Y(j,2)+O+Y(_.length,2)+"\0\0\0\0"+Y(x,4)+Y(i,4)+h+A+_;return{fileRecord:P,dirRecord:le}},mu=function(e,r,t,i,l){var s="",f=$t.transformTo("string",l(i));return s=Hr.CENTRAL_DIRECTORY_END+"\0\0\0\0"+Y(e,2)+Y(e,2)+Y(r,4)+Y(t,4)+Y(f.length,2)+f,s},gu=function(e){var r="";return r=Hr.DATA_DESCRIPTOR+Y(e.crc32,4)+Y(e.compressedSize,4)+Y(e.uncompressedSize,4),r};function Fe(e,r,t,i){Pt.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=r,this.zipPlatform=t,this.encodeFileName=i,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}$t.inherits(Fe,Pt),Fe.prototype.push=function(e){var r=e.meta.percent||0,t=this.entriesCount,i=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,Pt.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:t?(r+100*(t-i-1))/t:100}}))},Fe.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var r=this.streamFiles&&!e.file.dir;if(r){var t=So(e,r,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:t.fileRecord,meta:{percent:0}})}else this.accumulate=!0},Fe.prototype.closedSource=function(e){this.accumulate=!1;var r=this.streamFiles&&!e.file.dir,t=So(e,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(t.dirRecord),r)this.push({data:gu(e),meta:{percent:100}});else for(this.push({data:t.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},Fe.prototype.flush=function(){for(var e=this.bytesWritten,r=0;r<this.dirRecords.length;r++)this.push({data:this.dirRecords[r],meta:{percent:100}});var t=this.bytesWritten-e,i=mu(this.dirRecords.length,t,e,this.zipComment,this.encodeFileName);this.push({data:i,meta:{percent:100}})},Fe.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},Fe.prototype.registerPrevious=function(e){this._sources.push(e);var r=this;return e.on("data",function(t){r.processChunk(t)}),e.on("end",function(){r.closedSource(r.previous.streamInfo),r._sources.length?r.prepareNextSource():r.end()}),e.on("error",function(t){r.error(t)}),this},Fe.prototype.resume=function(){if(!Pt.prototype.resume.call(this))return!1;if(!this.previous&&this._sources.length)return this.prepareNextSource(),!0;if(!this.previous&&!this._sources.length&&!this.generatedError)return this.end(),!0},Fe.prototype.error=function(e){var r=this._sources;if(!Pt.prototype.error.call(this,e))return!1;for(var t=0;t<r.length;t++)try{r[t].error(e)}catch(i){}return!0},Fe.prototype.lock=function(){Pt.prototype.lock.call(this);for(var e=this._sources,r=0;r<e.length;r++)e[r].lock()};var vu=Fe,wu=Nr,xu=vu,yu=function(e,r){var t=e||r,i=wu[t];if(!i)throw new Error(t+" is not a valid compression method !");return i};Yn.generateWorker=function(e,r,t){var i=new xu(r.streamFiles,t,r.platform,r.encodeFileName),l=0;try{e.forEach(function(s,f){l++;var a=yu(f.options.compression,r.compression),m=f.options.compressionOptions||r.compressionOptions||{},h=f.dir,d=f.date;f._compressWorker(a,m).withStreamInfo("file",{name:s,dir:h,date:d,comment:f.comment||"",unixPermissions:f.unixPermissions,dosPermissions:f.dosPermissions}).pipe(i)}),i.entriesCount=l}catch(s){i.error(s)}return i};var Eu=te,Xr=Ee;function pr(e,r){Xr.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(r)}Eu.inherits(pr,Xr),pr.prototype._bindStream=function(e){var r=this;this._stream=e,e.pause(),e.on("data",function(t){r.push({data:t,meta:{percent:0}})}).on("error",function(t){r.isPaused?this.generatedError=t:r.error(t)}).on("end",function(){r.isPaused?r._upstreamEnded=!0:r.end()})},pr.prototype.pause=function(){return Xr.prototype.pause.call(this)?(this._stream.pause(),!0):!1},pr.prototype.resume=function(){return Xr.prototype.resume.call(this)?(this._upstreamEnded?this.end():this._stream.resume(),!0):!1};var bu=pr,Tu=At,_r=te,Co=Ee,Iu=Pn,ko=be,Bo=Ai,Au=gl,Nu=Yn,Fo=br,Su=bu,Do=function(e,r,t){var i=_r.getTypeOf(r),l,s=_r.extend(t||{},ko);s.date=s.date||new Date,s.compression!==null&&(s.compression=s.compression.toUpperCase()),typeof s.unixPermissions=="string"&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&s.unixPermissions&16384&&(s.dir=!0),s.dosPermissions&&s.dosPermissions&16&&(s.dir=!0),s.dir&&(e=Oo(e)),s.createFolders&&(l=Cu(e))&&Ro.call(this,l,!0);var f=i==="string"&&s.binary===!1&&s.base64===!1;(!t||typeof t.binary=="undefined")&&(s.binary=!f);var a=r instanceof Bo&&r.uncompressedSize===0;(a||s.dir||!r||r.length===0)&&(s.base64=!1,s.binary=!0,r="",s.compression="STORE",i="string");var m=null;r instanceof Bo||r instanceof Co?m=r:Fo.isNode&&Fo.isStream(r)?m=new Su(e,r):m=_r.prepareContent(e,r,s.binary,s.optimizedBinaryString,s.base64);var h=new Au(e,m,s);this.files[e]=h},Cu=function(e){e.slice(-1)==="/"&&(e=e.substring(0,e.length-1));var r=e.lastIndexOf("/");return r>0?e.substring(0,r):""},Oo=function(e){return e.slice(-1)!=="/"&&(e+="/"),e},Ro=function(e,r){return r=typeof r!="undefined"?r:ko.createFolders,e=Oo(e),this.files[e]||Do.call(this,e,null,{dir:!0,createFolders:r}),this.files[e]};function Lo(e){return Object.prototype.toString.call(e)==="[object RegExp]"}var ku={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var r,t,i;for(r in this.files)i=this.files[r],t=r.slice(this.root.length,r.length),t&&r.slice(0,this.root.length)===this.root&&e(t,i)},filter:function(e){var r=[];return this.forEach(function(t,i){e(t,i)&&r.push(i)}),r},file:function(e,r,t){if(arguments.length===1)if(Lo(e)){var i=e;return this.filter(function(s,f){return!f.dir&&i.test(s)})}else{var l=this.files[this.root+e];return l&&!l.dir?l:null}else e=this.root+e,Do.call(this,e,r,t);return this},folder:function(e){if(!e)return this;if(Lo(e))return this.filter(function(l,s){return s.dir&&e.test(l)});var r=this.root+e,t=Ro.call(this,r),i=this.clone();return i.root=t.name,i},remove:function(e){e=this.root+e;var r=this.files[e];if(r||(e.slice(-1)!=="/"&&(e+="/"),r=this.files[e]),r&&!r.dir)delete this.files[e];else for(var t=this.filter(function(l,s){return s.name.slice(0,e.length)===e}),i=0;i<t.length;i++)delete this.files[t[i].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var r,t={};try{if(t=_r.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:Tu.utf8encode}),t.type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),t.type==="binarystring"&&(t.type="string"),!t.type)throw new Error("No output type specified.");_r.checkSupport(t.type),(t.platform==="darwin"||t.platform==="freebsd"||t.platform==="linux"||t.platform==="sunos")&&(t.platform="UNIX"),t.platform==="win32"&&(t.platform="DOS");var i=t.comment||this.comment||"";r=Nu.generateWorker(this,t,i)}catch(l){r=new Co("error"),r.error(l)}return new Iu(r,t.type||"string",t.mimeType)},generateAsync:function(e,r){return this.generateInternalStream(e).accumulate(r)},generateNodeStream:function(e,r){return e=e||{},e.type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(r)}},Bu=ku,Fu=te;function Uo(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}Uo.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var r=0,t;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return Fu.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC((e>>25&127)+1980,(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(e&31)<<1))}};var $o=Uo,Po=$o,Du=te;function zt(e){Po.call(this,e);for(var r=0;r<this.data.length;r++)e[r]=e[r]&255}Du.inherits(zt,Po),zt.prototype.byteAt=function(e){return this.data[this.zero+e]},zt.prototype.lastIndexOfSignature=function(e){for(var r=e.charCodeAt(0),t=e.charCodeAt(1),i=e.charCodeAt(2),l=e.charCodeAt(3),s=this.length-4;s>=0;--s)if(this.data[s]===r&&this.data[s+1]===t&&this.data[s+2]===i&&this.data[s+3]===l)return s-this.zero;return-1},zt.prototype.readAndCheckSignature=function(e){var r=e.charCodeAt(0),t=e.charCodeAt(1),i=e.charCodeAt(2),l=e.charCodeAt(3),s=this.readData(4);return r===s[0]&&t===s[1]&&i===s[2]&&l===s[3]},zt.prototype.readData=function(e){if(this.checkOffset(e),e===0)return[];var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};var zo=zt,Mo=$o,Ou=te;function Mt(e){Mo.call(this,e)}Ou.inherits(Mt,Mo),Mt.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},Mt.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},Mt.prototype.readAndCheckSignature=function(e){var r=this.readData(4);return e===r},Mt.prototype.readData=function(e){this.checkOffset(e);var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};var Ru=Mt,jo=zo,Lu=te;function sn(e){jo.call(this,e)}Lu.inherits(sn,jo),sn.prototype.readData=function(e){if(this.checkOffset(e),e===0)return new Uint8Array(0);var r=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};var Zo=sn,Wo=Zo,Uu=te;function ln(e){Wo.call(this,e)}Uu.inherits(ln,Wo),ln.prototype.readData=function(e){this.checkOffset(e);var r=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,r};var $u=ln,Gr=te,Ho=oe,Pu=zo,zu=Ru,Mu=$u,ju=Zo,Xo=function(e){var r=Gr.getTypeOf(e);return Gr.checkSupport(r),r==="string"&&!Ho.uint8array?new zu(e):r==="nodebuffer"?new Mu(e):Ho.uint8array?new ju(Gr.transformTo("uint8array",e)):new Pu(Gr.transformTo("array",e))},fn=Xo,lt=te,Zu=Ai,Go=xi,Yr=At,Vr=Nr,Wu=oe,Hu=0,Xu=3,Gu=function(e){for(var r in Vr)if(Object.prototype.hasOwnProperty.call(Vr,r)&&Vr[r].magic===e)return Vr[r];return null};function Yo(e,r){this.options=e,this.loadOptions=r}Yo.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},readLocalPart:function(e){var r,t;if(e.skip(22),this.fileNameLength=e.readInt(2),t=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(t),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(r=Gu(this.compressionMethod),r===null)throw new Error("Corrupted zip : compression "+lt.pretty(this.compressionMethod)+" unknown (inner file : "+lt.transformTo("string",this.fileName)+")");this.decompressed=new Zu(this.compressedSize,this.uncompressedSize,this.crc32,r,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var r=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(r),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(this.externalFileAttributes&16),e===Hu&&(this.dosPermissions=this.externalFileAttributes&63),e===Xu&&(this.unixPermissions=this.externalFileAttributes>>16&65535),!this.dir&&this.fileNameStr.slice(-1)==="/"&&(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=fn(this.extraFields[1].value);this.uncompressedSize===lt.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===lt.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===lt.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===lt.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var r=e.index+this.extraFieldsLength,t,i,l;for(this.extraFields||(this.extraFields={});e.index+4<r;)t=e.readInt(2),i=e.readInt(2),l=e.readData(i),this.extraFields[t]={id:t,length:i,value:l};e.setIndex(r)},handleUTF8:function(){var e=Wu.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=Yr.utf8decode(this.fileName),this.fileCommentStr=Yr.utf8decode(this.fileComment);else{var r=this.findExtraFieldUnicodePath();if(r!==null)this.fileNameStr=r;else{var t=lt.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(t)}var i=this.findExtraFieldUnicodeComment();if(i!==null)this.fileCommentStr=i;else{var l=lt.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(l)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var r=fn(e.value);return r.readInt(1)!==1||Go(this.fileName)!==r.readInt(4)?null:Yr.utf8decode(r.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var r=fn(e.value);return r.readInt(1)!==1||Go(this.fileComment)!==r.readInt(4)?null:Yr.utf8decode(r.readData(e.length-5))}return null}};var Yu=Yo,Vu=Xo,Ge=te,De=st,Ku=Yu,Ju=oe;function Vo(e){this.files=[],this.loadOptions=e}Vo.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var r=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+Ge.pretty(r)+", expected "+Ge.pretty(e)+")")}},isSignature:function(e,r){var t=this.reader.index;this.reader.setIndex(e);var i=this.reader.readString(4),l=i===r;return this.reader.setIndex(t),l},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),r=Ju.uint8array?"uint8array":"array",t=Ge.transformTo(r,e);this.zipComment=this.loadOptions.decodeFileName(t)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e=this.zip64EndOfCentralSize-44,r=0,t,i,l;r<e;)t=this.reader.readInt(2),i=this.reader.readInt(4),l=this.reader.readData(i),this.zip64ExtensibleData[t]={id:t,length:i,value:l}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,r;for(e=0;e<this.files.length;e++)r=this.files[e],this.reader.setIndex(r.localHeaderOffset),this.checkSignature(De.LOCAL_FILE_HEADER),r.readLocalPart(this.reader),r.handleUTF8(),r.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(De.CENTRAL_FILE_HEADER);)e=new Ku({zip64:this.zip64},this.loadOptions),e.readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(De.CENTRAL_DIRECTORY_END);if(e<0){var r=!this.isSignature(0,De.LOCAL_FILE_HEADER);throw r?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory")}this.reader.setIndex(e);var t=e;if(this.checkSignature(De.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===Ge.MAX_VALUE_16BITS||this.diskWithCentralDirStart===Ge.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===Ge.MAX_VALUE_16BITS||this.centralDirRecords===Ge.MAX_VALUE_16BITS||this.centralDirSize===Ge.MAX_VALUE_32BITS||this.centralDirOffset===Ge.MAX_VALUE_32BITS){if(this.zip64=!0,e=this.reader.lastIndexOfSignature(De.ZIP64_CENTRAL_DIRECTORY_LOCATOR),e<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(De.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,De.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(De.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(De.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var i=this.centralDirOffset+this.centralDirSize;this.zip64&&(i+=20,i+=12+this.zip64EndOfCentralSize);var l=t-i;if(l>0)this.isSignature(t,De.CENTRAL_FILE_HEADER)||(this.reader.zero=l);else if(l<0)throw new Error("Corrupted zip: missing "+Math.abs(l)+" bytes.")},prepareReader:function(e){this.reader=Vu(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}};var qu=Vo,un=te,Kr=Jt,Qu=At,ec=qu,tc=Zn,Ko=br;function rc(e){return new Kr.Promise(function(r,t){var i=e.decompressed.getContentWorker().pipe(new tc);i.on("error",function(l){t(l)}).on("end",function(){i.streamInfo.crc32!==e.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):r()}).resume()})}var ic=function(e,r){var t=this;return r=un.extend(r||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:Qu.utf8decode}),Ko.isNode&&Ko.isStream(e)?Kr.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):un.prepareContent("the loaded zip file",e,!0,r.optimizedBinaryString,r.base64).then(function(i){var l=new ec(r);return l.load(i),l}).then(function(l){var s=[Kr.Promise.resolve(l)],f=l.files;if(r.checkCRC32)for(var a=0;a<f.length;a++)s.push(rc(f[a]));return Kr.Promise.all(s)}).then(function(l){for(var s=l.shift(),f=s.files,a=0;a<f.length;a++){var m=f[a],h=m.fileNameStr,d=un.resolve(m.fileNameStr);t.file(d,m.decompressed,{binary:!0,optimizedBinaryString:!0,date:m.date,dir:m.dir,comment:m.fileCommentStr.length?m.fileCommentStr:null,unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions,createFolders:r.createFolders}),m.dir||(t.file(d).unsafeOriginalName=h)}return s.zipComment.length&&(t.comment=s.zipComment),t})};function Ne(){if(!(this instanceof Ne))return new Ne;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new Ne;for(var r in this)typeof this[r]!="function"&&(e[r]=this[r]);return e}}Ne.prototype=Bu,Ne.prototype.loadAsync=ic,Ne.support=oe,Ne.defaults=be,Ne.version="3.10.2",Ne.loadAsync=function(e,r){return new Ne().loadAsync(e,r)},Ne.external=Jt;var nc=Ne;const Jo=e=>nc.loadAsync(e),Jr=(e,r)=>{const t=e.file(r);return t?t.async("text"):null},yt=(e,r,t)=>e.file(r,t,{binary:!1}),ac=(e,r)=>e.generateAsync({type:"uint8array",compression:"DEFLATE",compressionOptions:{level:r}});var qo={},Qo={},cn={exports:{}};(function(e,r){var t=hi,i=t.Buffer;function l(f,a){for(var m in f)a[m]=f[m]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=t:(l(t,r),r.Buffer=s);function s(f,a,m){return i(f,a,m)}l(i,s),s.from=function(f,a,m){if(typeof f=="number")throw new TypeError("Argument must not be a number");return i(f,a,m)},s.alloc=function(f,a,m){if(typeof f!="number")throw new TypeError("Argument must be a number");var h=i(f);return a!==void 0?typeof m=="string"?h.fill(a,m):h.fill(a):h.fill(0),h},s.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return i(f)},s.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return t.SlowBuffer(f)}})(cn,cn.exports);var hn=cn.exports.Buffer,es=hn.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function oc(e){if(!e)return"utf8";for(var r;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(r)return;e=(""+e).toLowerCase(),r=!0}}function sc(e){var r=oc(e);if(typeof r!="string"&&(hn.isEncoding===es||!es(e)))throw new Error("Unknown encoding: "+e);return r||e}Qo.StringDecoder=mr;function mr(e){this.encoding=sc(e);var r;switch(this.encoding){case"utf16le":this.text=dc,this.end=pc,r=4;break;case"utf8":this.fillLast=uc,r=4;break;case"base64":this.text=_c,this.end=mc,r=3;break;default:this.write=gc,this.end=vc;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=hn.allocUnsafe(r)}mr.prototype.write=function(e){if(e.length===0)return"";var r,t;if(this.lastNeed){if(r=this.fillLast(e),r===void 0)return"";t=this.lastNeed,this.lastNeed=0}else t=0;return t<e.length?r?r+this.text(e,t):this.text(e,t):r||""},mr.prototype.end=hc,mr.prototype.text=cc,mr.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length};function dn(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function lc(e,r,t){var i=r.length-1;if(i<t)return 0;var l=dn(r[i]);return l>=0?(l>0&&(e.lastNeed=l-1),l):--i<t||l===-2?0:(l=dn(r[i]),l>=0?(l>0&&(e.lastNeed=l-2),l):--i<t||l===-2?0:(l=dn(r[i]),l>=0?(l>0&&(l===2?l=0:e.lastNeed=l-3),l):0))}function fc(e,r,t){if((r[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&r.length>1){if((r[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&r.length>2&&(r[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function uc(e){var r=this.lastTotal-this.lastNeed,t=fc(this,e);if(t!==void 0)return t;if(this.lastNeed<=e.length)return e.copy(this.lastChar,r,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,r,0,e.length),this.lastNeed-=e.length}function cc(e,r){var t=lc(this,e,r);if(!this.lastNeed)return e.toString("utf8",r);this.lastTotal=t;var i=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",r,i)}function hc(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+"\uFFFD":r}function dc(e,r){if((e.length-r)%2===0){var t=e.toString("utf16le",r);if(t){var i=t.charCodeAt(t.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",r,e.length-1)}function pc(e){var r=e&&e.length?this.write(e):"";if(this.lastNeed){var t=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,t)}return r}function _c(e,r){var t=(e.length-r)%3;return t===0?e.toString("base64",r):(this.lastNeed=3-t,this.lastTotal=3,t===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",r,e.length-t))}function mc(e){var r=e&&e.length?this.write(e):"";return this.lastNeed?r+this.lastChar.toString("base64",0,3-this.lastNeed):r}function gc(e){return e.toString(this.encoding)}function vc(e){return e&&e.length?this.write(e):""}(function(e){(function(r){r.parser=function(p,u){return new i(p,u)},r.SAXParser=i,r.SAXStream=d,r.createStream=h,r.MAX_BUFFER_LENGTH=64*1024;var t=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function i(p,u){if(!(this instanceof i))return new i(p,u);var B=this;s(B),B.q=B.c="",B.bufferCheckPosition=r.MAX_BUFFER_LENGTH,B.opt=u||{},B.opt.lowercase=B.opt.lowercase||B.opt.lowercasetags,B.looseCase=B.opt.lowercase?"toLowerCase":"toUpperCase",B.tags=[],B.closed=B.closedRoot=B.sawRoot=!1,B.tag=B.error=null,B.strict=!!p,B.noscript=!!(p||B.opt.noscript),B.state=x.BEGIN,B.strictEntities=B.opt.strictEntities,B.ENTITIES=B.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),B.attribList=[],B.opt.xmlns&&(B.ns=Object.create(S)),B.trackPosition=B.opt.position!==!1,B.trackPosition&&(B.position=B.line=B.column=0),O(B,"onready")}Object.create||(Object.create=function(p){function u(){}u.prototype=p;var B=new u;return B}),Object.keys||(Object.keys=function(p){var u=[];for(var B in p)p.hasOwnProperty(B)&&u.push(B);return u});function l(p){for(var u=Math.max(r.MAX_BUFFER_LENGTH,10),B=0,E=0,W=t.length;E<W;E++){var q=p[t[E]].length;if(q>u)switch(t[E]){case"textNode":le(p);break;case"cdata":P(p,"oncdata",p.cdata),p.cdata="";break;case"script":P(p,"onscript",p.script),p.script="";break;default:re(p,"Max buffer length exceeded: "+t[E])}B=Math.max(B,q)}var G=r.MAX_BUFFER_LENGTH-B;p.bufferCheckPosition=G+p.position}function s(p){for(var u=0,B=t.length;u<B;u++)p[t[u]]=""}function f(p){le(p),p.cdata!==""&&(P(p,"oncdata",p.cdata),p.cdata=""),p.script!==""&&(P(p,"onscript",p.script),p.script="")}i.prototype={end:function(){ce(this)},write:wr,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){f(this)}};var a;try{a=require("stream").Stream}catch(p){a=function(){}}a||(a=function(){});var m=r.EVENTS.filter(function(p){return p!=="error"&&p!=="end"});function h(p,u){return new d(p,u)}function d(p,u){if(!(this instanceof d))return new d(p,u);a.apply(this),this._parser=new i(p,u),this.writable=!0,this.readable=!0;var B=this;this._parser.onend=function(){B.emit("end")},this._parser.onerror=function(E){B.emit("error",E),B._parser.error=null},this._decoder=null,m.forEach(function(E){Object.defineProperty(B,"on"+E,{get:function(){return B._parser["on"+E]},set:function(W){if(!W)return B.removeAllListeners(E),B._parser["on"+E]=W,W;B.on(E,W)},enumerable:!0,configurable:!1})})}d.prototype=Object.create(a.prototype,{constructor:{value:d}}),d.prototype.write=function(p){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(p)){if(!this._decoder){var u=Qo.StringDecoder;this._decoder=new u("utf8")}p=this._decoder.write(p)}return this._parser.write(p.toString()),this.emit("data",p),!0},d.prototype.end=function(p){return p&&p.length&&this.write(p),this._parser.end(),!0},d.prototype.on=function(p,u){var B=this;return!B._parser["on"+p]&&m.indexOf(p)!==-1&&(B._parser["on"+p]=function(){var E=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);E.splice(0,0,p),B.emit.apply(B,E)}),a.prototype.on.call(B,p,u)};var I="[CDATA[",_="DOCTYPE",v="http://www.w3.org/XML/1998/namespace",w="http://www.w3.org/2000/xmlns/",S={xml:v,xmlns:w},N=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,b=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,A=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,F=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function C(p){return p===" "||p===`
8
+ `||p==="\r"||p===" "}function D(p){return p==='"'||p==="'"}function U(p){return p===">"||C(p)}function R(p,u){return p.test(u)}function L(p,u){return!R(p,u)}var x=0;r.STATE={BEGIN:x++,BEGIN_WHITESPACE:x++,TEXT:x++,TEXT_ENTITY:x++,OPEN_WAKA:x++,SGML_DECL:x++,SGML_DECL_QUOTED:x++,DOCTYPE:x++,DOCTYPE_QUOTED:x++,DOCTYPE_DTD:x++,DOCTYPE_DTD_QUOTED:x++,COMMENT_STARTING:x++,COMMENT:x++,COMMENT_ENDING:x++,COMMENT_ENDED:x++,CDATA:x++,CDATA_ENDING:x++,CDATA_ENDING_2:x++,PROC_INST:x++,PROC_INST_BODY:x++,PROC_INST_ENDING:x++,OPEN_TAG:x++,OPEN_TAG_SLASH:x++,ATTRIB:x++,ATTRIB_NAME:x++,ATTRIB_NAME_SAW_WHITE:x++,ATTRIB_VALUE:x++,ATTRIB_VALUE_QUOTED:x++,ATTRIB_VALUE_CLOSED:x++,ATTRIB_VALUE_UNQUOTED:x++,ATTRIB_VALUE_ENTITY_Q:x++,ATTRIB_VALUE_ENTITY_U:x++,CLOSE_TAG:x++,CLOSE_TAG_SAW_WHITE:x++,SCRIPT:x++,SCRIPT_ENDING:x++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(r.ENTITIES).forEach(function(p){var u=r.ENTITIES[p],B=typeof u=="number"?String.fromCharCode(u):u;r.ENTITIES[p]=B});for(var j in r.STATE)r.STATE[r.STATE[j]]=j;x=r.STATE;function O(p,u,B){p[u]&&p[u](B)}function P(p,u,B){p.textNode&&le(p),O(p,u,B)}function le(p){p.textNode=V(p.opt,p.textNode),p.textNode&&O(p,"ontext",p.textNode),p.textNode=""}function V(p,u){return p.trim&&(u=u.trim()),p.normalize&&(u=u.replace(/\s+/g," ")),u}function re(p,u){return le(p),p.trackPosition&&(u+=`
9
+ Line: `+p.line+`
10
+ Column: `+p.column+`
11
+ Char: `+p.c),u=new Error(u),p.error=u,O(p,"onerror",u),p}function ce(p){return p.sawRoot&&!p.closedRoot&&$(p,"Unclosed root tag"),p.state!==x.BEGIN&&p.state!==x.BEGIN_WHITESPACE&&p.state!==x.TEXT&&re(p,"Unexpected end"),le(p),p.c="",p.closed=!0,O(p,"onend"),i.call(p,p.strict,p.opt),p}function $(p,u){if(typeof p!="object"||!(p instanceof i))throw new Error("bad call to strictFail");p.strict&&re(p,u)}function fe(p){p.strict||(p.tagName=p.tagName[p.looseCase]());var u=p.tags[p.tags.length-1]||p,B=p.tag={name:p.tagName,attributes:{}};p.opt.xmlns&&(B.ns=u.ns),p.attribList.length=0,P(p,"onopentagstart",B)}function Le(p,u){var B=p.indexOf(":"),E=B<0?["",p]:p.split(":"),W=E[0],q=E[1];return u&&p==="xmlns"&&(W="xmlns",q=""),{prefix:W,local:q}}function Ve(p){if(p.strict||(p.attribName=p.attribName[p.looseCase]()),p.attribList.indexOf(p.attribName)!==-1||p.tag.attributes.hasOwnProperty(p.attribName)){p.attribName=p.attribValue="";return}if(p.opt.xmlns){var u=Le(p.attribName,!0),B=u.prefix,E=u.local;if(B==="xmlns")if(E==="xml"&&p.attribValue!==v)$(p,"xml: prefix must be bound to "+v+`
12
+ Actual: `+p.attribValue);else if(E==="xmlns"&&p.attribValue!==w)$(p,"xmlns: prefix must be bound to "+w+`
13
+ Actual: `+p.attribValue);else{var W=p.tag,q=p.tags[p.tags.length-1]||p;W.ns===q.ns&&(W.ns=Object.create(q.ns)),W.ns[E]=p.attribValue}p.attribList.push([p.attribName,p.attribValue])}else p.tag.attributes[p.attribName]=p.attribValue,P(p,"onattribute",{name:p.attribName,value:p.attribValue});p.attribName=p.attribValue=""}function H(p,u){if(p.opt.xmlns){var B=p.tag,E=Le(p.tagName);B.prefix=E.prefix,B.local=E.local,B.uri=B.ns[E.prefix]||"",B.prefix&&!B.uri&&($(p,"Unbound namespace prefix: "+JSON.stringify(p.tagName)),B.uri=E.prefix);var W=p.tags[p.tags.length-1]||p;B.ns&&W.ns!==B.ns&&Object.keys(B.ns).forEach(function(ve){P(p,"onopennamespace",{prefix:ve,uri:B.ns[ve]})});for(var q=0,G=p.attribList.length;q<G;q++){var ae=p.attribList[q],me=ae[0],Ke=ae[1],ie=Le(me,!0),Ce=ie.prefix,ui=ie.local,Gt=Ce===""?"":B.ns[Ce]||"",Je={name:me,value:Ke,prefix:Ce,local:ui,uri:Gt};Ce&&Ce!=="xmlns"&&!Gt&&($(p,"Unbound namespace prefix: "+JSON.stringify(Ce)),Je.uri=Ce),p.tag.attributes[me]=Je,P(p,"onattribute",Je)}p.attribList.length=0}p.tag.isSelfClosing=!!u,p.sawRoot=!0,p.tags.push(p.tag),P(p,"onopentag",p.tag),u||(!p.noscript&&p.tagName.toLowerCase()==="script"?p.state=x.SCRIPT:p.state=x.TEXT,p.tag=null,p.tagName=""),p.attribName=p.attribValue="",p.attribList.length=0}function ue(p){if(!p.tagName){$(p,"Weird empty close tag."),p.textNode+="</>",p.state=x.TEXT;return}if(p.script){if(p.tagName!=="script"){p.script+="</"+p.tagName+">",p.tagName="",p.state=x.SCRIPT;return}P(p,"onscript",p.script),p.script=""}var u=p.tags.length,B=p.tagName;p.strict||(B=B[p.looseCase]());for(var E=B;u--;){var W=p.tags[u];if(W.name!==E)$(p,"Unexpected close tag");else break}if(u<0){$(p,"Unmatched closing tag: "+p.tagName),p.textNode+="</"+p.tagName+">",p.state=x.TEXT;return}p.tagName=B;for(var q=p.tags.length;q-- >u;){var G=p.tag=p.tags.pop();p.tagName=p.tag.name,P(p,"onclosetag",p.tagName);var ae={};for(var me in G.ns)ae[me]=G.ns[me];var Ke=p.tags[p.tags.length-1]||p;p.opt.xmlns&&G.ns!==Ke.ns&&Object.keys(G.ns).forEach(function(ie){var Ce=G.ns[ie];P(p,"onclosenamespace",{prefix:ie,uri:Ce})})}u===0&&(p.closedRoot=!0),p.tagName=p.attribValue=p.attribName="",p.attribList.length=0,p.state=x.TEXT}function Wt(p){var u=p.entity,B=u.toLowerCase(),E,W="";return p.ENTITIES[u]?p.ENTITIES[u]:p.ENTITIES[B]?p.ENTITIES[B]:(u=B,u.charAt(0)==="#"&&(u.charAt(1)==="x"?(u=u.slice(2),E=parseInt(u,16),W=E.toString(16)):(u=u.slice(1),E=parseInt(u,10),W=E.toString(10))),u=u.replace(/^0+/,""),isNaN(E)||W.toLowerCase()!==u?($(p,"Invalid character entity"),"&"+p.entity+";"):String.fromCodePoint(E))}function Ht(p,u){u==="<"?(p.state=x.OPEN_WAKA,p.startTagPosition=p.position):C(u)||($(p,"Non-whitespace before first tag."),p.textNode=u,p.state=x.TEXT)}function Xt(p,u){var B="";return u<p.length&&(B=p.charAt(u)),B}function wr(p){var u=this;if(this.error)throw this.error;if(u.closed)return re(u,"Cannot write after close. Assign an onready handler.");if(p===null)return ce(u);typeof p=="object"&&(p=p.toString());for(var B=0,E="";E=Xt(p,B++),u.c=E,!!E;)switch(u.trackPosition&&(u.position++,E===`
14
+ `?(u.line++,u.column=0):u.column++),u.state){case x.BEGIN:if(u.state=x.BEGIN_WHITESPACE,E==="\uFEFF")continue;Ht(u,E);continue;case x.BEGIN_WHITESPACE:Ht(u,E);continue;case x.TEXT:if(u.sawRoot&&!u.closedRoot){for(var W=B-1;E&&E!=="<"&&E!=="&";)E=Xt(p,B++),E&&u.trackPosition&&(u.position++,E===`
15
+ `?(u.line++,u.column=0):u.column++);u.textNode+=p.substring(W,B-1)}E==="<"&&!(u.sawRoot&&u.closedRoot&&!u.strict)?(u.state=x.OPEN_WAKA,u.startTagPosition=u.position):(!C(E)&&(!u.sawRoot||u.closedRoot)&&$(u,"Text data outside of root node."),E==="&"?u.state=x.TEXT_ENTITY:u.textNode+=E);continue;case x.SCRIPT:E==="<"?u.state=x.SCRIPT_ENDING:u.script+=E;continue;case x.SCRIPT_ENDING:E==="/"?u.state=x.CLOSE_TAG:(u.script+="<"+E,u.state=x.SCRIPT);continue;case x.OPEN_WAKA:if(E==="!")u.state=x.SGML_DECL,u.sgmlDecl="";else if(!C(E))if(R(N,E))u.state=x.OPEN_TAG,u.tagName=E;else if(E==="/")u.state=x.CLOSE_TAG,u.tagName="";else if(E==="?")u.state=x.PROC_INST,u.procInstName=u.procInstBody="";else{if($(u,"Unencoded <"),u.startTagPosition+1<u.position){var q=u.position-u.startTagPosition;E=new Array(q).join(" ")+E}u.textNode+="<"+E,u.state=x.TEXT}continue;case x.SGML_DECL:(u.sgmlDecl+E).toUpperCase()===I?(P(u,"onopencdata"),u.state=x.CDATA,u.sgmlDecl="",u.cdata=""):u.sgmlDecl+E==="--"?(u.state=x.COMMENT,u.comment="",u.sgmlDecl=""):(u.sgmlDecl+E).toUpperCase()===_?(u.state=x.DOCTYPE,(u.doctype||u.sawRoot)&&$(u,"Inappropriately located doctype declaration"),u.doctype="",u.sgmlDecl=""):E===">"?(P(u,"onsgmldeclaration",u.sgmlDecl),u.sgmlDecl="",u.state=x.TEXT):(D(E)&&(u.state=x.SGML_DECL_QUOTED),u.sgmlDecl+=E);continue;case x.SGML_DECL_QUOTED:E===u.q&&(u.state=x.SGML_DECL,u.q=""),u.sgmlDecl+=E;continue;case x.DOCTYPE:E===">"?(u.state=x.TEXT,P(u,"ondoctype",u.doctype),u.doctype=!0):(u.doctype+=E,E==="["?u.state=x.DOCTYPE_DTD:D(E)&&(u.state=x.DOCTYPE_QUOTED,u.q=E));continue;case x.DOCTYPE_QUOTED:u.doctype+=E,E===u.q&&(u.q="",u.state=x.DOCTYPE);continue;case x.DOCTYPE_DTD:u.doctype+=E,E==="]"?u.state=x.DOCTYPE:D(E)&&(u.state=x.DOCTYPE_DTD_QUOTED,u.q=E);continue;case x.DOCTYPE_DTD_QUOTED:u.doctype+=E,E===u.q&&(u.state=x.DOCTYPE_DTD,u.q="");continue;case x.COMMENT:E==="-"?u.state=x.COMMENT_ENDING:u.comment+=E;continue;case x.COMMENT_ENDING:E==="-"?(u.state=x.COMMENT_ENDED,u.comment=V(u.opt,u.comment),u.comment&&P(u,"oncomment",u.comment),u.comment=""):(u.comment+="-"+E,u.state=x.COMMENT);continue;case x.COMMENT_ENDED:E!==">"?($(u,"Malformed comment"),u.comment+="--"+E,u.state=x.COMMENT):u.state=x.TEXT;continue;case x.CDATA:E==="]"?u.state=x.CDATA_ENDING:u.cdata+=E;continue;case x.CDATA_ENDING:E==="]"?u.state=x.CDATA_ENDING_2:(u.cdata+="]"+E,u.state=x.CDATA);continue;case x.CDATA_ENDING_2:E===">"?(u.cdata&&P(u,"oncdata",u.cdata),P(u,"onclosecdata"),u.cdata="",u.state=x.TEXT):E==="]"?u.cdata+="]":(u.cdata+="]]"+E,u.state=x.CDATA);continue;case x.PROC_INST:E==="?"?u.state=x.PROC_INST_ENDING:C(E)?u.state=x.PROC_INST_BODY:u.procInstName+=E;continue;case x.PROC_INST_BODY:if(!u.procInstBody&&C(E))continue;E==="?"?u.state=x.PROC_INST_ENDING:u.procInstBody+=E;continue;case x.PROC_INST_ENDING:E===">"?(P(u,"onprocessinginstruction",{name:u.procInstName,body:u.procInstBody}),u.procInstName=u.procInstBody="",u.state=x.TEXT):(u.procInstBody+="?"+E,u.state=x.PROC_INST_BODY);continue;case x.OPEN_TAG:R(b,E)?u.tagName+=E:(fe(u),E===">"?H(u):E==="/"?u.state=x.OPEN_TAG_SLASH:(C(E)||$(u,"Invalid character in tag name"),u.state=x.ATTRIB));continue;case x.OPEN_TAG_SLASH:E===">"?(H(u,!0),ue(u)):($(u,"Forward-slash in opening tag not followed by >"),u.state=x.ATTRIB);continue;case x.ATTRIB:if(C(E))continue;E===">"?H(u):E==="/"?u.state=x.OPEN_TAG_SLASH:R(N,E)?(u.attribName=E,u.attribValue="",u.state=x.ATTRIB_NAME):$(u,"Invalid attribute name");continue;case x.ATTRIB_NAME:E==="="?u.state=x.ATTRIB_VALUE:E===">"?($(u,"Attribute without value"),u.attribValue=u.attribName,Ve(u),H(u)):C(E)?u.state=x.ATTRIB_NAME_SAW_WHITE:R(b,E)?u.attribName+=E:$(u,"Invalid attribute name");continue;case x.ATTRIB_NAME_SAW_WHITE:if(E==="=")u.state=x.ATTRIB_VALUE;else{if(C(E))continue;$(u,"Attribute without value"),u.tag.attributes[u.attribName]="",u.attribValue="",P(u,"onattribute",{name:u.attribName,value:""}),u.attribName="",E===">"?H(u):R(N,E)?(u.attribName=E,u.state=x.ATTRIB_NAME):($(u,"Invalid attribute name"),u.state=x.ATTRIB)}continue;case x.ATTRIB_VALUE:if(C(E))continue;D(E)?(u.q=E,u.state=x.ATTRIB_VALUE_QUOTED):($(u,"Unquoted attribute value"),u.state=x.ATTRIB_VALUE_UNQUOTED,u.attribValue=E);continue;case x.ATTRIB_VALUE_QUOTED:if(E!==u.q){E==="&"?u.state=x.ATTRIB_VALUE_ENTITY_Q:u.attribValue+=E;continue}Ve(u),u.q="",u.state=x.ATTRIB_VALUE_CLOSED;continue;case x.ATTRIB_VALUE_CLOSED:C(E)?u.state=x.ATTRIB:E===">"?H(u):E==="/"?u.state=x.OPEN_TAG_SLASH:R(N,E)?($(u,"No whitespace between attributes"),u.attribName=E,u.attribValue="",u.state=x.ATTRIB_NAME):$(u,"Invalid attribute name");continue;case x.ATTRIB_VALUE_UNQUOTED:if(!U(E)){E==="&"?u.state=x.ATTRIB_VALUE_ENTITY_U:u.attribValue+=E;continue}Ve(u),E===">"?H(u):u.state=x.ATTRIB;continue;case x.CLOSE_TAG:if(u.tagName)E===">"?ue(u):R(b,E)?u.tagName+=E:u.script?(u.script+="</"+u.tagName,u.tagName="",u.state=x.SCRIPT):(C(E)||$(u,"Invalid tagname in closing tag"),u.state=x.CLOSE_TAG_SAW_WHITE);else{if(C(E))continue;L(N,E)?u.script?(u.script+="</"+E,u.state=x.SCRIPT):$(u,"Invalid tagname in closing tag."):u.tagName=E}continue;case x.CLOSE_TAG_SAW_WHITE:if(C(E))continue;E===">"?ue(u):$(u,"Invalid characters in closing tag");continue;case x.TEXT_ENTITY:case x.ATTRIB_VALUE_ENTITY_Q:case x.ATTRIB_VALUE_ENTITY_U:var G,ae;switch(u.state){case x.TEXT_ENTITY:G=x.TEXT,ae="textNode";break;case x.ATTRIB_VALUE_ENTITY_Q:G=x.ATTRIB_VALUE_QUOTED,ae="attribValue";break;case x.ATTRIB_VALUE_ENTITY_U:G=x.ATTRIB_VALUE_UNQUOTED,ae="attribValue";break}if(E===";")if(u.opt.unparsedEntities){var me=Wt(u);u.entity="",u.state=G,u.write(me)}else u[ae]+=Wt(u),u.entity="",u.state=G;else R(u.entity.length?F:A,E)?u.entity+=E:($(u,"Invalid character in entity name"),u[ae]+="&"+u.entity+E,u.entity="",u.state=G);continue;default:throw new Error(u,"Unknown state: "+u.state)}return u.position>=u.bufferCheckPosition&&l(u),u}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||(function(){var p=String.fromCharCode,u=Math.floor,B=function(){var E=16384,W=[],q,G,ae=-1,me=arguments.length;if(!me)return"";for(var Ke="";++ae<me;){var ie=Number(arguments[ae]);if(!isFinite(ie)||ie<0||ie>1114111||u(ie)!==ie)throw RangeError("Invalid code point: "+ie);ie<=65535?W.push(ie):(ie-=65536,q=(ie>>10)+55296,G=ie%1024+56320,W.push(q,G)),(ae+1===me||W.length>E)&&(Ke+=p.apply(null,W),W.length=0)}return Ke};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:B,configurable:!0,writable:!0}):String.fromCodePoint=B})()})(e)})(qo);const Se={debug:()=>{}},qr=e=>{const r=qo.parser(!0,{trim:!1,normalize:!1});let t,i=null;return new Promise((l,s)=>{r.onopentag=f=>{const a={_parent:i||void 0,_children:[],_fTextNode:!1,_tag:f.name,_attrs:f.attributes};i!=null?i._children.push(a):t=a,i=a},r.onclosetag=()=>{i=i!=null?i._parent:null},r.ontext=f=>{i!=null&&i._children.push({_parent:i,_children:[],_fTextNode:!0,_text:f})},r.onend=()=>{l(t)},r.onerror=f=>{s(f)},r.write(e),r.end()})};function Et(e,r,t="",i=!0){const l=t.length||!i?"":'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>',s=[Buffer.from(l,"utf-8")];if(e._fTextNode)s.push(Buffer.from(wc(e._text,r)));else{let f="";const a=e._attrs;Object.keys(a).forEach(_=>{f+=` ${_}="${xc(a[_])}"`});const m=e._children.length>0,h=m?"":"/",d=r.indentXml?`
16
+ ${t}`:"";s.push(Buffer.from(`${d}<${e._tag}${f}${h}>`));let I=!1;if(e._children.forEach(_=>{s.push(Et(_,r,r.indentXml?`${t} `:"",!1)),I=!_._fTextNode}),m){const _=r.indentXml&&I?`
17
+ ${t}`:"";s.push(Buffer.from(`${_}</${e._tag}>`))}}return Buffer.concat(s)}const wc=(e,r)=>{let t="";const i=e.split(r.literalXmlDelimiter);let l=!1;for(let s=0;s<i.length;s++){let f=i[s];l||(f=f.replace(/&/g,"&amp;"),f=f.replace(/</g,"&lt;"),f=f.replace(/>/g,"&gt;")),t+=f,l=!l}return t},xc=e=>{let r=typeof e=="string"?e:e.value;return r=r.replace(/&/g,"&amp;"),r=r.replace(/</g,"&lt;"),r=r.replace(/>/g,"&gt;"),r=r.replace(/'/g,"&apos;"),r=r.replace(/"/g,"&quot;"),r};var yc=Object.defineProperty,Ec=(e,r,t)=>r in e?yc(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,bt=(e,r,t)=>Ec(e,typeof r!="symbol"?r+"":r,t);function Qr(e){return e instanceof Error||typeof e=="object"&&!!e&&"name"in e&&"message"in e}class si extends Error{constructor(r){super(`Result of command ${r} is null or undefined and rejectNullish is set`),bt(this,"command"),Object.setPrototypeOf(this,si.prototype),this.command=r}}class li extends Error{constructor(r,t){super(`Result of command '${r}' is an object`),bt(this,"command"),bt(this,"result"),Object.setPrototypeOf(this,li.prototype),this.command=r,this.result=t}}class fi extends Error{constructor(r){super(`Invalid command syntax: ${r}`),bt(this,"command"),Object.setPrototypeOf(this,fi.prototype),this.command=r}}class Re extends Error{constructor(r,t){super(`${r}: ${t}`),bt(this,"command"),Object.setPrototypeOf(this,Re.prototype),this.command=t}}class vr extends Error{constructor(r,t){super(`Error executing command '${t}': ${r.name}: ${r.message}`),bt(this,"command"),bt(this,"err"),Object.setPrototypeOf(this,vr.prototype),this.command=t,this.err=r}}class ts extends vr{}class jt extends Error{constructor(r){super(`INTERNAL ERROR: ${r}`)}}class Ye extends Error{}class rs extends Error{constructor(){super("Incomplete IF/END-IF statement. Make sure each IF-statement has a corresponding END-IF command.")}}class is extends Error{constructor(r){super(`Unterminated FOR-loop ('FOR ${r.varName}'). Make sure each FOR loop has a corresponding END-FOR command.`)}}const ei=e=>e._fTextNode?{_children:[],_fTextNode:!0,_text:e._text}:{_children:[],_fTextNode:!1,_tag:e._tag,_attrs:e._attrs},ns=e=>{const r=e._parent;if(r==null)return null;const t=r._children,i=t.indexOf(e);return i<0||i>=t.length-1?null:t[i+1]},as=e=>{const r=e._parent;if(!(r&&!r._fTextNode&&(r._tag==="w:t"||r._tag==="a:t")))throw new Ye("Template syntax error: text node not within w:t");const t=r._parent;if(t==null)throw new Ye("Template syntax error: w:t node has no parent");const i=t._children.indexOf(r);if(i<0)throw new Ye("Template syntax error");const l=ei(r);l._parent=t;const s={_parent:l,_children:[],_fTextNode:!0,_text:""};return l._children=[s],t._children.splice(i+1,0,l),s},ft=(e,r={},t=[])=>{const i={_fTextNode:!1,_tag:e,_attrs:r,_children:t};return i._children.forEach(l=>{l._parent=i}),i},ti=e=>({_children:[],_fTextNode:!0,_text:e}),ri=(e,r)=>(e._children.push(r),r._parent=e,r),ii=e=>e.loops.length?e.loops[e.loops.length-1]:null,Oe=e=>{const r=ii(e);return r!=null&&r.idx<0},bc=e=>{if(!e.length)return;const r=e.length-1,{varName:t,idx:i,loopOver:l,isIf:s}=e[r],f=i>=0?i+1:"EXPLORATION";Se.debug(`${s?"IF":"FOR"} loop on ${r}:${t}${f}/${l.length}`)},de=e=>/^a:(t|p|r|rPr|tbl|tr|tc)$/.test(e)?e.replace(/^a:/,"w:"):e,pn=(e,r,t)=>{let i=e,l=!1,s=null,f=0;const a=`${r[0]}CMD_NODE${r[1]}`;for(;i!=null;){if(t&&!i._fTextNode&&de(i._tag)==="w:t"&&(i._attrs["xml:space"]="preserve"),!i._fTextNode&&de(i._tag)==="w:p"&&s&&(s._text+=" "),i._fTextNode&&i._parent&&!i._parent._fTextNode&&de(i._parent._tag)==="w:t"){s==null&&(s=i);const m=i._text;i._text="";for(let h=0;h<m.length;h++){const d=m[h],I=l?r[1]:r[0];if(d===I[f]){if(f+=1,f===I.length){l=!l;const _=i===s;l&&s._text.length&&(s=as(s),_&&(i=s)),s._text+=I,!l&&h<m.length-1&&(s=as(s),_&&(i=s)),f=0,l||(s=i)}}else f&&(s._text+=I.slice(0,f),f=0,l||(s=i)),s._text+=d}!l&&!f&&(s=null),m.length&&!i._text.length&&(i._text=a)}if(i._children.length)i=i._children[0];else{let m=!1;for(;i._parent!=null;){const h=i._parent,d=ns(i);if(d){m=!0,i=d;break}i=h}m||(i=null)}}return e};var Tc=Object.defineProperty,Ic=Object.defineProperties,Ac=Object.getOwnPropertyDescriptors,os=Object.getOwnPropertySymbols,Nc=Object.prototype.hasOwnProperty,Sc=Object.prototype.propertyIsEnumerable,ss=(e,r,t)=>r in e?Tc(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,ni=(e,r)=>{for(var t in r||(r={}))Nc.call(r,t)&&ss(e,t,r[t]);if(os)for(var t of os(r))Sc.call(r,t)&&ss(e,t,r[t]);return e},ls=(e,r)=>Ic(e,Ac(r));async function Tt(e,r,t){const i=ni(ni(ls(ni({},t.jsSandbox||{}),{__code__:r,__result__:void 0}),e),t.options.additionalJsContext);for(let f=t.loops.length-1;f>=0;f--){const a=t.loops[f];if(!a.isIf){i.$idx=a.idx;break}}Object.keys(t.vars).forEach(f=>{i[`$${f}`]=t.vars[f]});let l,s;try{if(t.options.runJs){const f=await t.options.runJs({sandbox:i,ctx:t});l=f.modifiedSandbox,s=f.result}else l=i,s=new Function("with(this) { return eval(__code__); }").call(l);s=await s}catch(f){const a=Qr(f)?f:new Error(`${f}`);if(t.options.errorHandler!=null)l=i,s=await t.options.errorHandler(a,r);else throw new vr(a,r)}if(t.options.rejectNullish&&s==null){const f=new si(r);if(t.options.errorHandler!=null)s=await t.options.errorHandler(f,r);else throw f}return t.jsSandbox=ls(ni({},l),{__code__:void 0,__result__:void 0}),s}const fs=[".png",".gif",".jpg",".jpeg",".svg"],Cc=["CMD_NODE","ALIAS","FOR","END-FOR","IF","END-IF","INS","EXEC","IMAGE","LINK","HTML"];var kc=Object.defineProperty,Bc=Object.defineProperties,Fc=Object.getOwnPropertyDescriptors,us=Object.getOwnPropertySymbols,Dc=Object.prototype.hasOwnProperty,Oc=Object.prototype.propertyIsEnumerable,cs=(e,r,t)=>r in e?kc(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,_n=(e,r)=>{for(var t in r||(r={}))Dc.call(r,t)&&cs(e,t,r[t]);if(us)for(var t of us(r))Oc.call(r,t)&&cs(e,t,r[t]);return e},Rc=(e,r)=>Bc(e,Fc(r));function hs(e,r=0,t=new Set){return{gCntIf:0,gCntEndIf:0,level:1,fCmd:!1,cmd:"",buffers:{"w:p":{text:"",cmds:"",fInsertedText:!1},"w:tr":{text:"",cmds:"",fInsertedText:!1},"w:tc":{text:"",cmds:"",fInsertedText:!1}},imageAndShapeIdIncrement:r,images:{},relationshipIds:t,linkId:0,links:{},htmlId:0,htmls:{},vars:{},loops:[],fJump:!1,shorthands:{},options:e}}async function ds(e,r,t){return _s(e,r,t,Uc)}function ps(e){const r=[],t=i=>{for(const l of i._children){const s=l._fTextNode?null:l._tag;if(s!=null){if(s==="wp:docPr"||s==="p:cNvPr"){if(l._fTextNode)continue;const f=l._attrs.id;if(typeof f!="string")continue;const a=Number.parseInt(f,10);Number.isSafeInteger(a)&&r.push(a)}l._children.length>0&&t(l)}}};return t(e),r.length>0?Math.max(...r):0}const mn=e=>e._fTextNode?!!e._parent&&!e._parent._fTextNode&&de(e._parent._tag)==="w:t"&&e._text.length>0:e._children.some(mn),gn=e=>{let r=e;for(;r;){if(!r._fTextNode&&de(r._tag)==="w:tc")return r;r=r._parent}},Zt=e=>JSON.stringify(e._fTextNode?{_ifName:e._ifName,_fTextNode:e._fTextNode,_text:e==null?void 0:e._text}:{_ifName:e._ifName,_fTextNode:e._fTextNode,_tag:e==null?void 0:e._tag,_attrs:e==null?void 0:e._attrs});async function _s(e,r,t,i){var l;const s=ei(r);let f=r,a=s,m,h=0;const d=[],I=new WeakSet;let _=0;const v=((l=t.options)==null?void 0:l.maximumWalkingDepth)||1e6;for(;;){const w=ii(t);let S=null;if(t.fJump){if(!w)throw new jt("jumping while curLoop is null");Se.debug(`Jumping to level ${w.refNodeLevel}...`,Zt(w.refNode)),h=t.level-w.refNodeLevel,f=w.refNode,t.level=w.refNodeLevel,t.fJump=!1,m="JUMP"}else if(f._children.length&&m!=="UP")f=f._children[0],t.level+=1,m="DOWN";else if(S=ns(f))f=S,m="SIDE";else{const N=f._parent;if(N==null)break;if(_>v)throw Se.debug(`=== parent is still not null after ${_} loops, something must be wrong ...`,Zt(N)),new jt("infinite loop or massive dataset detected. Please review and try again");f=N,t.level-=1,m="UP"}if(Se.debug(`Next node [${m}, level ${t.level}]`,Zt(f)),m!=="DOWN"){const N=a._fTextNode?null:de(a._tag);let b=!1;if((N==="w:p"||N==="w:tbl"||N==="w:tr"||N==="w:tc")&&Oe(t))b=!mn(a);else if(N==="w:p"||N==="w:tr"||N==="w:tc"){const A=t.buffers[N];if(b=A.text===""&&A.cmds!==""&&!A.fInsertedText,N==="w:p"&&b){const F=C=>C._fTextNode?!1:C._tag==="wp:anchor"||C._tag==="wp:inline"||de(C._tag)==="w:drawing"?!0:C._children.some(F);b=!F(a)}N==="w:tr"&&b&&(b=f._children.filter(F=>!F._fTextNode&&de(F._tag)==="w:tr").length!==1),N==="w:tc"&&b&&(b=!(a._children.filter(F=>!F._fTextNode&&de(F._tag)==="w:tbl").length>0))}b&&!Oe(t)&&(N==="w:tc"||N==="w:tr")&&(I.has(a)||a._children.some(A=>I.has(A)))&&(b=!1),b&&a._parent!=null&&a._parent._children.pop()}if(m==="UP"){Oe(t)&&w&&f===w.refNode._parent&&(f._children.slice(0,f._children.indexOf(w.refNode)).some(mn)||(w.refNode=f,w.refNodeLevel-=1,Se.debug(`Updated loop '${w.varName}' refNode: `+Zt(f))));const N=a._parent;if(N==null)throw new jt("node parent is null");if(a=N,t.pendingImageNode&&!a._fTextNode&&(t.options.documentType==="pptx"?a._tag==="p:sp":a._tag==="w:t")){const b=t.pendingImageNode.image,A=t.pendingImageNode.caption,F=a._parent;F&&(b._parent=F,F._children.pop(),F._children.push(b),A&&F._children.push(...A),t.buffers["w:p"].fInsertedText=!0,t.buffers["w:tr"].fInsertedText=!0,t.buffers["w:tc"].fInsertedText=!0),delete t.pendingImageNode}if(t.pendingLinkNode&&!a._fTextNode&&de(a._tag)==="w:r"){const b=t.pendingLinkNode,A=a._parent;A&&(b._parent=A,A._children.pop(),A._children.push(b),t.buffers["w:p"].fInsertedText=!0,t.buffers["w:tr"].fInsertedText=!0,t.buffers["w:tc"].fInsertedText=!0),delete t.pendingLinkNode}if(t.pendingHtmlNode&&!a._fTextNode&&de(a._tag)==="w:p"){const b=t.pendingHtmlNode,A=a._parent;A&&(b._parent=A,A._children.pop(),A._children.push(b),t.buffers["w:p"].fInsertedText=!0,t.buffers["w:tr"].fInsertedText=!0,t.buffers["w:tc"].fInsertedText=!0),delete t.pendingHtmlNode}if(!a._fTextNode&&a._tag==="w:tc"&&!a._children.filter(b=>!b._fTextNode&&(de(b._tag)==="w:p"||de(b._tag)==="w:altChunk")).length&&a._children.push({_parent:a,_children:[],_fTextNode:!1,_tag:"w:p",_attrs:{}}),!a._fTextNode&&(a._tag==="p:txBody"||a._tag==="a:txBody")&&!a._children.some(b=>!b._fTextNode&&b._tag==="a:p")){const b=ft("a:p");b._parent=a,a._children.push(b)}if(!a._fTextNode&&a._tag==="a:r"){const b=a._children.filter(A=>!A._fTextNode&&A._tag==="a:t");if(b.length>1){const A=b[0];A._children=b.reduce((F,C)=>F.concat(C._children),[]),A._children.forEach(F=>{F._parent=A}),a._children=a._children.filter(F=>F===A||!b.includes(F))}}!a._fTextNode&&de(a._tag)==="w:rPr"&&(t.textRunPropsNode=a),!f._fTextNode&&de(f._tag)==="w:r"&&delete t.textRunPropsNode}if(m==="DOWN"||m==="SIDE"){if(m==="SIDE"){if(a._parent==null)throw new jt("node parent is null");a=a._parent}const N=f._fTextNode?null:de(f._tag);(N==="w:p"||N==="w:tr"||N==="w:tc")&&(t.buffers[N]={text:"",cmds:"",fInsertedText:!1});const b=ei(f);b._parent=a,a._children.push(b);const A=b._tag;!Oe(t)&&(A==="wp:docPr"||A==="v:shape"||A==="p:cNvPr"&&t.loops.some(C=>C.idx>0))&&(Se.debug("detected a - ",Zt(b)),Gc(b,t));const F=f._parent;if(f._fTextNode&&F&&!F._fTextNode&&de(F._tag)==="w:t"){const C=await Lc(e,f,t,i);if(t.pendingCellPreservation){const D=gn(b);D&&I.add(D),delete t.pendingCellPreservation}typeof C=="string"?(b._text=C,Se.debug("Inserted command result string into node. Updated node: "+Zt(b))):d.push(...C)}a=b}if(m==="JUMP")for(;h>0;){if(a._parent==null)throw new jt("node parent is null");a=a._parent,h-=1}_++}if(t.gCntIf!==t.gCntEndIf){const w=new rs;if(t.options.failFast)throw w;d.push(w)}if(t.loops.filter(w=>!w.isIf).length>0){const w=t.loops[t.loops.length-1],S=new is(w);if(t.options.failFast)throw S;d.push(S)}return d.length>0?{status:"errors",errors:d}:{status:"success",report:s,images:t.images,links:t.links,htmls:t.htmls}}const Lc=async(e,r,t,i)=>{const{cmdDelimiter:l,failFast:s}=t.options,f=r._text;if(f==null||f==="")return"";const a=f.split(l[0]).map(d=>d.split(l[1])).reduce((d,I)=>d.concat(I));let m="";const h=[];for(let d=0;d<a.length;d++){d>0&&wn(l[0],t,{fCmd:!0});const I=a[d];if(t.fCmd?t.cmd+=I:Oe(t)||(m+=I),wn(I,t,{fCmd:t.fCmd}),d<a.length-1){if(t.fCmd){const _=await i(e,r,t);if(_!=null)if(typeof _=="string")m+=_,wn(_,t,{fCmd:!1,fInsertedText:!0});else{if(s)throw _;h.push(_)}}t.fCmd=!t.fCmd}}return h.length>0?h:m},Uc=async(e,r,t)=>{const i=ms(t.cmd,t.shorthands,t.options.fixSmartQuotes);t.cmd="";const{cmdName:l,cmdRest:s}=gs(i);try{if(l!=="CMD_NODE"&&Se.debug(`Processing cmd: ${i}`),l!=="CMD_NODE")if(l==="ALIAS"){const f=/^(\S+)\s+(.+)/.exec(s);if(!f)throw new Re("Invalid ALIAS command",i);const a=f[1],m=f[2];t.shorthands[a]=m,Se.debug(`Defined alias '${a}' for: ${m}`)}else if(l==="FOR"||l==="IF")await zc(e,r,t,i,l,s);else if(l==="END-FOR"||l==="END-IF")Mc(r,t,i,l,s);else if(l==="INS"){if(!Oe(t)){let f=await Tt(e,s,t);if(f==null)return"";if(typeof f=="object"&&!Array.isArray(f)){const m=new li(s,f);if(t.options.errorHandler!=null)f=await t.options.errorHandler(m,s);else throw m}let a=String(f);if(t.options.processLineBreaks){const{literalXmlDelimiter:m}=t.options;if(t.options.documentType==="pptx")a=a.replace(/\n/g,`${m}</a:t></a:r><a:br/><a:r><a:t xml:space="preserve">${m}`);else if(t.options.processLineBreaksAsNewText){const h=a.split(`
18
+ `),d=`${m}<w:br/>${m}`,I=`${m}</w:t>${m}`,_=`${m}<w:t xml:space="preserve">${m}`;a=h.join(`${I}${d}${_}`)}else a=a.replace(/\n/g,`${m}<w:br/>${m}`)}return a}}else if(l==="EXEC")Oe(t)||await Tt(e,s,t);else if(l==="IMAGE"){if(!Oe(t)){const f=await Tt(e,s,t);if(f!=null)try{Zc(t,f,r)}catch(a){throw Qr(a)?new ts(a,i):a}}}else if(l==="LINK"){if(!Oe(t)){const f=await Tt(e,s,t);f!=null&&await Hc(t,f,r)}}else if(l==="HTML"){if(t.options.documentType==="pptx")throw new Re("HTML is only supported in Word templates",i);if(!Oe(t)){const f=await Tt(e,s,t);f!=null&&await Xc(t,f)}}else throw new fi(i);return}catch(f){if(!Qr(f))throw f;return t.options.errorHandler!=null?t.options.errorHandler(f,s):f}},$c=Cc.map(e=>new RegExp(`^${e}\\b`)),Pc=e=>!$c.some(r=>r.test(e.toUpperCase()));function ms(e,r,t){let i=e.trim();if(i[0]==="*"){const l=i.slice(1).trim();if(!r[l])throw new Re("Unknown alias",i);i=r[l]}else i[0]==="="?i=`INS ${i.slice(1).trim()}`:i[0]==="!"?i=`EXEC ${i.slice(1).trim()}`:Pc(i)&&(i=`INS ${i.trim()}`);return t&&(i=i.replace(/[\u201C\u201D\u201E]/g,'"').replace(/[\u2018\u2019\u201A]/g,"'")),i.trim()}function gs(e){const r=/^(\S+)\s*/.exec(e);let t,i="";return r!=null&&(t=r[1].toUpperCase(),i=e.slice(t.length).trim()),{cmdName:t,cmdRest:i}}const zc=async(e,r,t,i,l,s)=>{const f=l==="IF";let a=null,m;if(f)r._ifName||(r._ifName=`__if_${t.gCntIf}`,t.gCntIf+=1),m=r._ifName;else{if(a=/^(\S+)\s+IN\s+(.+)/i.exec(s),!a)throw new Re("Invalid FOR command",i);m=a[1]}const h=ii(t);if(!(h&&h.varName===m)){const d=t.loops.length-1,I=d>=0&&t.loops[d].idx===-1;let _;if(I)_=[];else if(f)_=await Tt(e,s,t)?[1]:[];else{if(!a)throw new Re("Invalid FOR command",i);if(_=await Tt(e,a[2],t),!Array.isArray(_))throw new Re("Invalid FOR command (can only iterate over Array)",i)}t.loops.push({refNode:r,refNodeLevel:t.level,varName:m,loopOver:_,isIf:f,idx:-1})}bc(t.loops)},Mc=(e,r,t,i,l)=>{const s=i==="END-IF",f=ii(r);if(!f)throw new Re(`Unexpected ${i} outside of ${s?"IF statement":"FOR loop"} context`,t);s&&!e._ifName&&(e._ifName=f.varName,r.gCntEndIf+=1);const a=s?e._ifName:l;if(f.varName!==a){if(r.loops.find(d=>d.varName===a)==null){Se.debug(`Ignoring ${t} (${a}, but we're expecting ${f.varName})`);return}throw new Re("Invalid command",t)}const m=f.idx+1,h=f.loopOver[m];if(h!=null)r.vars[a]=h,r.fJump=!0,f.idx=m;else if(r.loops.pop(),s&&f.loopOver.length===0&&!Oe(r)){const d=gn(e);d&&d===gn(f.refNode)&&(r.pendingCellPreservation=!0)}},vs=(e,r)=>{vn(r);let t;do e.imageAndShapeIdIncrement+=1,t=`img${e.imageAndShapeIdIncrement}`;while(e.relationshipIds.has(t));return e.relationshipIds.add(t),e.images[t]=r,t};function vn(e){if(!(e.data instanceof Uint8Array||e.data instanceof ArrayBuffer||typeof e.data=="string"))throw new Error("image .data property needs to be provided as Uint8Array (e.g. Buffer), ArrayBuffer, or as a base64-encoded string");if(!fs.includes(e.extension))throw new Error(`An extension (one of ${fs}) needs to be provided when providing an image or a thumbnail.`)}function jc(e){if(!Number.isFinite(e.width))throw new Error(`invalid image width: ${e.width} (in cm)`);if(!Number.isFinite(e.height))throw new Error(`invalid image height: ${e.height} (in cm)`);vn(e),e.thumbnail&&vn(e.thumbnail)}const Zc=(e,r,t)=>{var i;jc(r);const l=(r.width*36e4).toFixed(0),s=(r.height*36e4).toFixed(0);let f=vs(e,Wc(r));const a=String(e.imageAndShapeIdIncrement),m=r.alt||"",h=ft,d=[];d.push(h("a:ext",{uri:"{28A0092B-C50C-407E-A947-70E740481C1C}"},[h("a14:useLocalDpi",{"xmlns:a14":"http://schemas.microsoft.com/office/drawing/2010/main",val:"0"})]));const I=r.rotation?(r.rotation*6e4).toString():void 0;if(e.images[f].extension===".svg"){const w=(i=r.thumbnail)!=null?i:{data:"bm90aGluZwo=",extension:".png"},S=vs(e,w);d.push(h("a:ext",{uri:"{96DAC541-7B7A-43D3-8B79-37D633B846F1}"},[h("asvg:svgBlip",{"xmlns:asvg":"http://schemas.microsoft.com/office/drawing/2016/SVG/main","r:embed":f})])),f=S}const _=h("pic:pic",{"xmlns:pic":"http://schemas.openxmlformats.org/drawingml/2006/picture"},[h("pic:nvPicPr",{},[h("pic:cNvPr",{id:"0",name:`Picture ${a}`,descr:m}),h("pic:cNvPicPr",{},[h("a:picLocks",{noChangeAspect:"1",noChangeArrowheads:"1"})])]),h("pic:blipFill",{},[h("a:blip",{"r:embed":f,cstate:"print"},[h("a:extLst",{},d)]),h("a:srcRect"),h("a:stretch",{},[h("a:fillRect")])]),h("pic:spPr",{bwMode:"auto"},[h("a:xfrm",I?{rot:I}:{},[h("a:off",{x:"0",y:"0"}),h("a:ext",{cx:l,cy:s})]),h("a:prstGeom",{prst:"rect"},[h("a:avLst")]),h("a:noFill"),h("a:ln",{},[h("a:noFill")])])]);if(e.options.documentType==="pptx"){let w=t;for(;w&&(w._fTextNode||w._tag!=="p:sp");)w=w._parent;if(!w)throw new Error("PowerPoint IMAGE commands must be in a dedicated text shape");const S=C=>{!C._fTextNode&&C._tag.startsWith("pic:")&&(C._tag=C._tag.replace("pic:","p:")),C._children.forEach(S)};S(_),_._attrs={};const N=_._children[0];N._children[0]._attrs.id=a,N._children.push(h("p:nvPr"));const b=w._children.find(C=>!C._fTextNode&&C._tag==="p:spPr"),A=b==null?void 0:b._children.find(C=>!C._fTextNode&&C._tag==="a:xfrm"),F=A==null?void 0:A._children.find(C=>!C._fTextNode&&C._tag==="a:off");if(F&&!F._fTextNode){const C=_._children[2];C._children[0]._children[0]._attrs=_n({},F._attrs)}e.pendingImageNode={image:_},ws.forEach(C=>{e.buffers[C].fInsertedText=!0});return}const v=h("w:drawing",{},[h("wp:inline",{distT:"0",distB:"0",distL:"0",distR:"0"},[h("wp:extent",{cx:l,cy:s}),h("wp:docPr",{id:a,name:`Picture ${a}`,descr:m}),h("wp:cNvGraphicFramePr",{},[h("a:graphicFrameLocks",{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main",noChangeAspect:"1"})]),h("a:graphic",{"xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},[h("a:graphicData",{uri:"http://schemas.openxmlformats.org/drawingml/2006/picture"},[_])])])]);e.pendingImageNode={image:v},r.caption&&(e.pendingImageNode.caption=[h("w:br"),h("w:t",{},[ti(r.caption)])])};function Wc(e){const{data:r,extension:t}=e;if(!t)throw new Error("If you return image `data`, make sure you return an extension as well!");return{extension:t,data:r}}const Hc=async(e,r,t)=>{var i;const{url:l,label:s=l}=r;let f;do e.linkId+=1,f=`link${e.linkId}`;while(e.relationshipIds.has(f));e.relationshipIds.add(f),e.links[f]={url:l};const a=ft;let{textRunPropsNode:m}=e;if(e.options.documentType==="pptx"){const d=(i=t._parent)==null?void 0:i._parent,I=d==null?void 0:d._children.find(_=>!_._fTextNode&&_._tag==="a:rPr");I&&!I._fTextNode&&(m=I)}if(e.options.documentType==="pptx"){const d=m?ei(m):a("a:rPr",{u:"sng"}),I=v=>v._fTextNode?ti(v._text):a(v._tag,_n({},v._attrs),v._children.map(I));m==null||m._children.filter(v=>v._fTextNode||v._tag!=="a:hlinkClick").forEach(v=>{const w=I(v);w._parent=d,d._children.push(w)});const _=a("a:hlinkClick",{"r:id":f});_._parent=d,d._children.push(_),e.pendingLinkNode=a("a:r",{},[d,a("a:t",{},[ti(s)])]);return}const h=a("w:hyperlink",{"r:id":f,"w:history":"1"},[a("w:r",{},[m||a("w:rPr",{},[a("w:u",{"w:val":"single"})]),a("w:t",{},[ti(s)])])]);e.pendingLinkNode=h},Xc=async(e,r)=>{let t;do e.htmlId+=1,t=`html${e.htmlId}`;while(e.relationshipIds.has(t));e.relationshipIds.add(t),e.htmls[t]=r;const i=ft("w:altChunk",{"r:id":t});e.pendingHtmlNode=i},ws=["w:p","w:tr","w:tc"],wn=(e,r,t)=>{const{fCmd:i,fInsertedText:l}=t,s=i?"cmds":"text";ws.forEach(f=>{const a=r.buffers[f];a[s]+=e,l&&(a.fInsertedText=!0)})};function Gc(e,r){r.imageAndShapeIdIncrement+=1;const t=String(r.imageAndShapeIdIncrement);e._attrs=Rc(_n({},e._attrs),{id:`${t}`})}const Yc=["{{","}}"],gr="||",xn="[Content_Types].xml";async function xs(e){const r=await Jo(e),t=await qc(r),i=Qc(t),l=i.split("/")[0],s=l==="ppt"?"pptx":"docx",f=i.slice(l.length+1),a=`${l}/${f}`,m=await Jr(r,a);if(m==null)throw new Ye(`${f} could not be found`);Se.debug(`${a} file length: ${m.length}`),new Date().getTime();const h=await qr(m);return new Date().getTime(),{jsTemplate:h,mainDocument:f,zip:r,contentTypes:t,templatePath:l,documentType:s}}async function ys(e,r,t,i){const l=[],s=t==="ppt"?/^ppt\/(slides|notesSlides|slideLayouts|slideMasters|notesMasters)\/[^/]+\.xml$/:/^word\/[^/]+\.xml$/;e.forEach(a=>{s.test(a)&&a!==`${t}/${r}`&&a.indexOf(`${t}/template`)!==0&&l.push(a)}),l.sort((a,m)=>a.localeCompare(m,"en",{numeric:!0}));const f=[];for(const a of l){const m=await Jr(e,a);if(m==null)throw new Ye(`${a} could not be read`);Se.debug(`${a} file length: ${m.length}`);const h=await qr(m),d=pn(h,i.cmdDelimiter,i.preserveSpace);f.push([d,a])}return f}async function Vc(e,r){var t,i,l;const{template:s,data:f}=e,a=e.literalXmlDelimiter||gr,m={cmdDelimiter:Is(e.cmdDelimiter),literalXmlDelimiter:a,processLineBreaks:e.processLineBreaks!=null?e.processLineBreaks:!0,runJs:e.runJs,additionalJsContext:e.additionalJsContext||{},failFast:e.failFast==null?!0:e.failFast,rejectNullish:e.rejectNullish==null?!1:e.rejectNullish,errorHandler:typeof e.errorHandler=="function"?e.errorHandler:null,fixSmartQuotes:e.fixSmartQuotes==null?!1:e.fixSmartQuotes,processLineBreaksAsNewText:e.processLineBreaksAsNewText==null?!1:e.processLineBreaksAsNewText,maximumWalkingDepth:e.maximumWalkingDepth,indentXml:(t=e.indentXml)!=null?t:!0,preserveSpace:(i=e.preserveSpace)!=null?i:!0,compressionLevel:(l=e.compressionLevel)!=null?l:1},h={literalXmlDelimiter:a,indentXml:m.indentXml},{jsTemplate:d,mainDocument:I,zip:_,contentTypes:v,templatePath:w,documentType:S}=await xs(s);m.documentType=S;const N=pn(d,m.cmdDelimiter,m.preserveSpace),b=typeof f=="function"?await f():f,A=await ys(_,I,w,m),F=Math.max(...A.map(([V,re])=>ps(V)),ps(N));let C=await D(`${w}/${I}`,F);async function D(V,re){const ce=await oi(_,ai(V)),$=new Set;for(const fe of ce._children)!fe._fTextNode&&typeof fe._attrs.Id=="string"&&$.add(fe._attrs.Id);return hs(m,re,$)}const U=await ds(b,N,C);if(U.status==="errors")throw U.errors;const{report:R,images:L,links:x,htmls:j}=U;if(r==="JS")return R;const O=Et(R,h);if(r==="XML")return O.toString("utf-8");yt(_,`${w}/${I}`,O);let P=Object.keys(L).length,le=Object.keys(j).length;await Es(L,`${w}/${I}`,_,m.indentXml),await bs(x,`${w}/${I}`,_,m.indentXml),await Ts(j,`${w}/${I}`,_,m.indentXml);for(const[V,re]of A){C=await D(re,C.imageAndShapeIdIncrement);const ce=await ds(b,V,C);if(ce.status==="errors")throw ce.errors;const{report:$,images:fe,links:Le,htmls:Ve}=ce,H=Et($,h);yt(_,re,H),P+=Object.keys(fe).length,le+=Object.keys(Ve).length,await Es(fe,re,_,m.indentXml),await bs(Le,re,_,m.indentXml),await Ts(Ve,re,_,m.indentXml)}if(P||le){const V=(ce,$)=>{v._children.filter(fe=>{var Le;return!fe._fTextNode&&((Le=fe._attrs.Extension)==null?void 0:Le.toLowerCase())===(ce==null?void 0:ce.toLowerCase())}).length||ri(v,ft("Default",{Extension:ce,ContentType:$}))};P&&(V("png","image/png"),V("jpg","image/jpeg"),V("jpeg","image/jpeg"),V("gif","image/gif"),V("bmp","image/bmp"),V("svg","image/svg+xml")),le&&V("html","text/html");const re=Et(v,h);yt(_,xn,re)}return await ac(_,m.compressionLevel)}async function Kc(e,r){const t={cmdDelimiter:Is(r),literalXmlDelimiter:gr,processLineBreaks:!0,additionalJsContext:{},failFast:!1,rejectNullish:!1,errorHandler:null,fixSmartQuotes:!1,processLineBreaksAsNewText:!1,indentXml:!0,preserveSpace:!0,compressionLevel:1},{jsTemplate:i,mainDocument:l,zip:s,templatePath:f}=await xs(e),a=await ys(s,l,f,t),m=[i,...a.map(([d,I])=>d)],h=[];for(const d of m){const I=pn(d,t.cmdDelimiter,t.preserveSpace),_=hs(t);await _s(void 0,I,_,async(v,w,S)=>{const N=ms(S.cmd,S.shorthands,S.options.fixSmartQuotes);S.cmd="";const{cmdName:b,cmdRest:A}=gs(N),F=b;F!=null&&F!=="CMD_NODE"&&h.push({raw:N,type:F,code:A})})}return h}async function Jc(e){const r="docProps/app.xml",t="docProps/core.xml",i=await Jo(e),l=await yn(i,r),s=await yn(i,t);function f(h){if(h._children.length===0)return;const d=h._children[0];if(d._fTextNode)return d._text;throw new Error("Not a text node")}function a(h,d){for(const I of h._children)if(!I._fTextNode&&I._tag===d)return f(I)}const m=h=>{const d=Number(h);if(Number.isFinite(d))return d};return{pages:m(a(l,"Pages")),words:m(a(l,"Words")),characters:m(a(l,"Characters")),lines:m(a(l,"Lines")),paragraphs:m(a(l,"Paragraphs")),company:a(l,"Company"),template:a(l,"Template"),title:a(s,"dc:title"),subject:a(s,"dc:subject"),creator:a(s,"dc:creator"),description:a(s,"dc:description"),lastModifiedBy:a(s,"cp:lastModifiedBy"),revision:a(s,"cp:revision"),lastPrinted:a(s,"cp:lastPrinted"),created:a(s,"dcterms:created"),modified:a(s,"dcterms:modified"),category:a(s,"cp:category")}}async function yn(e,r){const t=await Jr(e,r);if(t==null)throw new Ye(`${r} could not be read`);const i=await qr(t);if(i._fTextNode)throw new Ye(`${r} is a text node when parsed`);return i}async function qc(e){return await yn(e,xn)}function Qc(e){const r=["application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","application/vnd.ms-word.document.macroEnabled.main+xml","application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml","application/vnd.ms-powerpoint.presentation.macroEnabled.main+xml"];for(const t of e._children)if(!t._fTextNode&&t._attrs.ContentType!=null&&r.includes(t._attrs.ContentType)){const i=t._attrs.PartName;if(i)return i.replace(/^\//,"")}throw new Ye(`Could not find main document (e.g. document.xml) in ${xn}`)}const Es=async(e,r,t,i)=>{const l=Object.keys(e);if(!l.length)return;const s=ai(r),f=await oi(t,s);for(const m of l){const{extension:h,data:d}=e[m],I=`template_${r.replace(/^[^/]+\//,"").replace(/[/]/g,"_")}_${m}${h}`,_=`${r.split("/")[0]}/media/${I}`;typeof d=="string"?t.file(_,d,{base64:!0}):t.file(_,d,{binary:!0}),ri(f,ft("Relationship",{Id:m,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:`${r.split("/").length>2?"../":""}media/${I}`}))}const a=Et(f,{literalXmlDelimiter:gr,indentXml:i});yt(t,s,a)},bs=async(e,r,t,i)=>{const l=Object.keys(e);if(l.length){const s=ai(r),f=await oi(t,s);for(const m of l){const{url:h}=e[m];ri(f,ft("Relationship",{Id:m,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Target:h,TargetMode:"External"}))}const a=Et(f,{literalXmlDelimiter:gr,indentXml:i});yt(t,s,a)}},Ts=async(e,r,t,i)=>{const l=Object.keys(e);if(l.length){const s=ai(r),f=await oi(t,s);for(const m of l){const h=e[m],d=`template_${r.replace(/^[^/]+\//,"").replace(/[/.]/g,"_")}_${m}.html`,I=`${r.slice(0,r.lastIndexOf("/"))}/${d}`;yt(t,I,Buffer.from(h)),ri(f,ft("Relationship",{Id:m,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk",Target:`${d}`}))}const a=Et(f,{literalXmlDelimiter:gr,indentXml:i});yt(t,s,a)}},ai=e=>{const r=e.lastIndexOf("/");return`${e.slice(0,r)}/_rels/${e.slice(r+1)}.rels`},oi=async(e,r)=>{let t=await Jr(e,r);return t||(t=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
28
19
  <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
29
- </Relationships>`),En(t)},mc=e=>e?typeof e=="string"?[e,e]:e:[...vy];export{Cr as CommandExecutionError,Bn as CommandSyntaxError,Xl as ImageError,Yl as IncompleteConditionalStatementError,tr as InternalError,Ve as InvalidCommandError,Cn as NullishCommandResultError,kn as ObjectCommandResultError,at as TemplateParseError,Kl as UnterminatedForLoopError,_y as createReport,by as getMetadata,Sn as isError,my as listCommands};
20
+ </Relationships>`),qr(t)},Is=e=>e?typeof e=="string"?[e,e]:e:[...Yc];export{vr as CommandExecutionError,fi as CommandSyntaxError,ts as ImageError,rs as IncompleteConditionalStatementError,jt as InternalError,Re as InvalidCommandError,si as NullishCommandResultError,li as ObjectCommandResultError,Ye as TemplateParseError,is as UnterminatedForLoopError,Vc as createReport,Jc as getMetadata,Qr as isError,Kc as listCommands};
30
21
  //# sourceMappingURL=browser.js.map