UNPKG

docx-templates

Version:
6 lines 195 kB
var commonjsGlobal=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},buffer$1={},base64Js={};base64Js.byteLength=byteLength,base64Js.toByteArray=toByteArray,base64Js.fromByteArray=fromByteArray;for(var lookup=[],revLookup=[],Arr=typeof Uint8Array!="undefined"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i$2=0,len=code.length;i$2<len;++i$2)lookup[i$2]=code[i$2],revLookup[code.charCodeAt(i$2)]=i$2;revLookup[45]=62,revLookup[95]=63;function getLens(r){var g=r.length;if(g%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var l=r.indexOf("=");l===-1&&(l=g);var E=l===g?0:4-l%4;return[l,E]}function byteLength(r){var g=getLens(r),l=g[0],E=g[1];return(l+E)*3/4-E}function _byteLength(r,g,l){return(g+l)*3/4-l}function toByteArray(r){var g,l=getLens(r),E=l[0],A=l[1],I=new Arr(_byteLength(r,E,A)),N=0,y=A>0?E-4:E,M;for(M=0;M<y;M+=4)g=revLookup[r.charCodeAt(M)]<<18|revLookup[r.charCodeAt(M+1)]<<12|revLookup[r.charCodeAt(M+2)]<<6|revLookup[r.charCodeAt(M+3)],I[N++]=g>>16&255,I[N++]=g>>8&255,I[N++]=g&255;return A===2&&(g=revLookup[r.charCodeAt(M)]<<2|revLookup[r.charCodeAt(M+1)]>>4,I[N++]=g&255),A===1&&(g=revLookup[r.charCodeAt(M)]<<10|revLookup[r.charCodeAt(M+1)]<<4|revLookup[r.charCodeAt(M+2)]>>2,I[N++]=g>>8&255,I[N++]=g&255),I}function tripletToBase64(r){return lookup[r>>18&63]+lookup[r>>12&63]+lookup[r>>6&63]+lookup[r&63]}function encodeChunk(r,g,l){for(var E,A=[],I=g;I<l;I+=3)E=(r[I]<<16&16711680)+(r[I+1]<<8&65280)+(r[I+2]&255),A.push(tripletToBase64(E));return A.join("")}function fromByteArray(r){for(var g,l=r.length,E=l%3,A=[],I=16383,N=0,y=l-E;N<y;N+=I)A.push(encodeChunk(r,N,N+I>y?y:N+I));return E===1?(g=r[l-1],A.push(lookup[g>>2]+lookup[g<<4&63]+"==")):E===2&&(g=(r[l-2]<<8)+r[l-1],A.push(lookup[g>>10]+lookup[g>>4&63]+lookup[g<<2&63]+"=")),A.join("")}var ieee754={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ieee754.read=function(r,g,l,E,A){var I,N,y=A*8-E-1,M=(1<<y)-1,O=M>>1,Z=-7,xe=l?A-1:0,V=l?-1:1,ce=r[g+xe];for(xe+=V,I=ce&(1<<-Z)-1,ce>>=-Z,Z+=y;Z>0;I=I*256+r[g+xe],xe+=V,Z-=8);for(N=I&(1<<-Z)-1,I>>=-Z,Z+=E;Z>0;N=N*256+r[g+xe],xe+=V,Z-=8);if(I===0)I=1-O;else{if(I===M)return N?NaN:(ce?-1:1)*(1/0);N=N+Math.pow(2,E),I=I-O}return(ce?-1:1)*N*Math.pow(2,I-E)},ieee754.write=function(r,g,l,E,A,I){var N,y,M,O=I*8-A-1,Z=(1<<O)-1,xe=Z>>1,V=A===23?Math.pow(2,-24)-Math.pow(2,-77):0,ce=E?0:I-1,me=E?1:-1,we=g<0||g===0&&1/g<0?1:0;for(g=Math.abs(g),isNaN(g)||g===1/0?(y=isNaN(g)?1:0,N=Z):(N=Math.floor(Math.log(g)/Math.LN2),g*(M=Math.pow(2,-N))<1&&(N--,M*=2),N+xe>=1?g+=V/M:g+=V*Math.pow(2,1-xe),g*M>=2&&(N++,M/=2),N+xe>=Z?(y=0,N=Z):N+xe>=1?(y=(g*M-1)*Math.pow(2,A),N=N+xe):(y=g*Math.pow(2,xe-1)*Math.pow(2,A),N=0));A>=8;r[l+ce]=y&255,ce+=me,y/=256,A-=8);for(N=N<<A|y,O+=A;O>0;r[l+ce]=N&255,ce+=me,N/=256,O-=8);r[l+ce-me]|=we*128};/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <https://feross.org> * @license MIT */(function(r){const g=base64Js,l=ieee754,E=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;r.Buffer=y,r.SlowBuffer=Te,r.INSPECT_MAX_BYTES=50;const A=2147483647;r.kMaxLength=A,y.TYPED_ARRAY_SUPPORT=I(),!y.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 I(){try{const D=new Uint8Array(1),v={foo:function(){return 42}};return Object.setPrototypeOf(v,Uint8Array.prototype),Object.setPrototypeOf(D,v),D.foo()===42}catch(D){return!1}}Object.defineProperty(y.prototype,"parent",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.buffer}}),Object.defineProperty(y.prototype,"offset",{enumerable:!0,get:function(){if(y.isBuffer(this))return this.byteOffset}});function N(D){if(D>A)throw new RangeError('The value "'+D+'" is invalid for option "size"');const v=new Uint8Array(D);return Object.setPrototypeOf(v,y.prototype),v}function y(D,v,T){if(typeof D=="number"){if(typeof v=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return xe(D)}return M(D,v,T)}y.poolSize=8192;function M(D,v,T){if(typeof D=="string")return V(D,v);if(ArrayBuffer.isView(D))return me(D);if(D==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D);if(et(D,ArrayBuffer)||D&&et(D.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(et(D,SharedArrayBuffer)||D&&et(D.buffer,SharedArrayBuffer)))return we(D,v,T);if(typeof D=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const Y=D.valueOf&&D.valueOf();if(Y!=null&&Y!==D)return y.from(Y,v,T);const _e=ye(D);if(_e)return _e;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof D[Symbol.toPrimitive]=="function")return y.from(D[Symbol.toPrimitive]("string"),v,T);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof D)}y.from=function(D,v,T){return M(D,v,T)},Object.setPrototypeOf(y.prototype,Uint8Array.prototype),Object.setPrototypeOf(y,Uint8Array);function O(D){if(typeof D!="number")throw new TypeError('"size" argument must be of type number');if(D<0)throw new RangeError('The value "'+D+'" is invalid for option "size"')}function Z(D,v,T){return O(D),D<=0?N(D):v!==void 0?typeof T=="string"?N(D).fill(v,T):N(D).fill(v):N(D)}y.alloc=function(D,v,T){return Z(D,v,T)};function xe(D){return O(D),N(D<0?0:be(D)|0)}y.allocUnsafe=function(D){return xe(D)},y.allocUnsafeSlow=function(D){return xe(D)};function V(D,v){if((typeof v!="string"||v==="")&&(v="utf8"),!y.isEncoding(v))throw new TypeError("Unknown encoding: "+v);const T=Ne(D,v)|0;let Y=N(T);const _e=Y.write(D,v);return _e!==T&&(Y=Y.slice(0,_e)),Y}function ce(D){const v=D.length<0?0:be(D.length)|0,T=N(v);for(let Y=0;Y<v;Y+=1)T[Y]=D[Y]&255;return T}function me(D){if(et(D,Uint8Array)){const v=new Uint8Array(D);return we(v.buffer,v.byteOffset,v.byteLength)}return ce(D)}function we(D,v,T){if(v<0||D.byteLength<v)throw new RangeError('"offset" is outside of buffer bounds');if(D.byteLength<v+(T||0))throw new RangeError('"length" is outside of buffer bounds');let Y;return v===void 0&&T===void 0?Y=new Uint8Array(D):T===void 0?Y=new Uint8Array(D,v):Y=new Uint8Array(D,v,T),Object.setPrototypeOf(Y,y.prototype),Y}function ye(D){if(y.isBuffer(D)){const v=be(D.length)|0,T=N(v);return T.length===0||D.copy(T,0,0,v),T}if(D.length!==void 0)return typeof D.length!="number"||_t(D.length)?N(0):ce(D);if(D.type==="Buffer"&&Array.isArray(D.data))return ce(D.data)}function be(D){if(D>=A)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A.toString(16)+" bytes");return D|0}function Te(D){return+D!=D&&(D=0),y.alloc(+D)}y.isBuffer=function(v){return v!=null&&v._isBuffer===!0&&v!==y.prototype},y.compare=function(v,T){if(et(v,Uint8Array)&&(v=y.from(v,v.offset,v.byteLength)),et(T,Uint8Array)&&(T=y.from(T,T.offset,T.byteLength)),!y.isBuffer(v)||!y.isBuffer(T))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(v===T)return 0;let Y=v.length,_e=T.length;for(let ve=0,Se=Math.min(Y,_e);ve<Se;++ve)if(v[ve]!==T[ve]){Y=v[ve],_e=T[ve];break}return Y<_e?-1:_e<Y?1:0},y.isEncoding=function(v){switch(String(v).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}},y.concat=function(v,T){if(!Array.isArray(v))throw new TypeError('"list" argument must be an Array of Buffers');if(v.length===0)return y.alloc(0);let Y;if(T===void 0)for(T=0,Y=0;Y<v.length;++Y)T+=v[Y].length;const _e=y.allocUnsafe(T);let ve=0;for(Y=0;Y<v.length;++Y){let Se=v[Y];if(et(Se,Uint8Array))ve+Se.length>_e.length?(y.isBuffer(Se)||(Se=y.from(Se)),Se.copy(_e,ve)):Uint8Array.prototype.set.call(_e,Se,ve);else if(y.isBuffer(Se))Se.copy(_e,ve);else throw new TypeError('"list" argument must be an Array of Buffers');ve+=Se.length}return _e};function Ne(D,v){if(y.isBuffer(D))return D.length;if(ArrayBuffer.isView(D)||et(D,ArrayBuffer))return D.byteLength;if(typeof D!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof D);const T=D.length,Y=arguments.length>2&&arguments[2]===!0;if(!Y&&T===0)return 0;let _e=!1;for(;;)switch(v){case"ascii":case"latin1":case"binary":return T;case"utf8":case"utf-8":return Ge(D).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T*2;case"hex":return T>>>1;case"base64":return ct(D).length;default:if(_e)return Y?-1:Ge(D).length;v=(""+v).toLowerCase(),_e=!0}}y.byteLength=Ne;function Ie(D,v,T){let Y=!1;if((v===void 0||v<0)&&(v=0),v>this.length||((T===void 0||T>this.length)&&(T=this.length),T<=0)||(T>>>=0,v>>>=0,T<=v))return"";for(D||(D="utf8");;)switch(D){case"hex":return st(this,v,T);case"utf8":case"utf-8":return Ke(this,v,T);case"ascii":return Be(this,v,T);case"latin1":case"binary":return tt(this,v,T);case"base64":return Xe(this,v,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return it(this,v,T);default:if(Y)throw new TypeError("Unknown encoding: "+D);D=(D+"").toLowerCase(),Y=!0}}y.prototype._isBuffer=!0;function Ae(D,v,T){const Y=D[v];D[v]=D[T],D[T]=Y}y.prototype.swap16=function(){const v=this.length;if(v%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let T=0;T<v;T+=2)Ae(this,T,T+1);return this},y.prototype.swap32=function(){const v=this.length;if(v%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let T=0;T<v;T+=4)Ae(this,T,T+3),Ae(this,T+1,T+2);return this},y.prototype.swap64=function(){const v=this.length;if(v%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let T=0;T<v;T+=8)Ae(this,T,T+7),Ae(this,T+1,T+6),Ae(this,T+2,T+5),Ae(this,T+3,T+4);return this},y.prototype.toString=function(){const v=this.length;return v===0?"":arguments.length===0?Ke(this,0,v):Ie.apply(this,arguments)},y.prototype.toLocaleString=y.prototype.toString,y.prototype.equals=function(v){if(!y.isBuffer(v))throw new TypeError("Argument must be a Buffer");return this===v?!0:y.compare(this,v)===0},y.prototype.inspect=function(){let v="";const T=r.INSPECT_MAX_BYTES;return v=this.toString("hex",0,T).replace(/(.{2})/g,"$1 ").trim(),this.length>T&&(v+=" ... "),"<Buffer "+v+">"},E&&(y.prototype[E]=y.prototype.inspect),y.prototype.compare=function(v,T,Y,_e,ve){if(et(v,Uint8Array)&&(v=y.from(v,v.offset,v.byteLength)),!y.isBuffer(v))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof v);if(T===void 0&&(T=0),Y===void 0&&(Y=v?v.length:0),_e===void 0&&(_e=0),ve===void 0&&(ve=this.length),T<0||Y>v.length||_e<0||ve>this.length)throw new RangeError("out of range index");if(_e>=ve&&T>=Y)return 0;if(_e>=ve)return-1;if(T>=Y)return 1;if(T>>>=0,Y>>>=0,_e>>>=0,ve>>>=0,this===v)return 0;let Se=ve-_e,Fe=Y-T;const je=Math.min(Se,Fe),ze=this.slice(_e,ve),We=v.slice(T,Y);for(let Pe=0;Pe<je;++Pe)if(ze[Pe]!==We[Pe]){Se=ze[Pe],Fe=We[Pe];break}return Se<Fe?-1:Fe<Se?1:0};function Re(D,v,T,Y,_e){if(D.length===0)return-1;if(typeof T=="string"?(Y=T,T=0):T>2147483647?T=2147483647:T<-2147483648&&(T=-2147483648),T=+T,_t(T)&&(T=_e?0:D.length-1),T<0&&(T=D.length+T),T>=D.length){if(_e)return-1;T=D.length-1}else if(T<0)if(_e)T=0;else return-1;if(typeof v=="string"&&(v=y.from(v,Y)),y.isBuffer(v))return v.length===0?-1:ke(D,v,T,Y,_e);if(typeof v=="number")return v=v&255,typeof Uint8Array.prototype.indexOf=="function"?_e?Uint8Array.prototype.indexOf.call(D,v,T):Uint8Array.prototype.lastIndexOf.call(D,v,T):ke(D,[v],T,Y,_e);throw new TypeError("val must be string, number or Buffer")}function ke(D,v,T,Y,_e){let ve=1,Se=D.length,Fe=v.length;if(Y!==void 0&&(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le")){if(D.length<2||v.length<2)return-1;ve=2,Se/=2,Fe/=2,T/=2}function je(We,Pe){return ve===1?We[Pe]:We.readUInt16BE(Pe*ve)}let ze;if(_e){let We=-1;for(ze=T;ze<Se;ze++)if(je(D,ze)===je(v,We===-1?0:ze-We)){if(We===-1&&(We=ze),ze-We+1===Fe)return We*ve}else We!==-1&&(ze-=ze-We),We=-1}else for(T+Fe>Se&&(T=Se-Fe),ze=T;ze>=0;ze--){let We=!0;for(let Pe=0;Pe<Fe;Pe++)if(je(D,ze+Pe)!==je(v,Pe)){We=!1;break}if(We)return ze}return-1}y.prototype.includes=function(v,T,Y){return this.indexOf(v,T,Y)!==-1},y.prototype.indexOf=function(v,T,Y){return Re(this,v,T,Y,!0)},y.prototype.lastIndexOf=function(v,T,Y){return Re(this,v,T,Y,!1)};function De(D,v,T,Y){T=Number(T)||0;const _e=D.length-T;Y?(Y=Number(Y),Y>_e&&(Y=_e)):Y=_e;const ve=v.length;Y>ve/2&&(Y=ve/2);let Se;for(Se=0;Se<Y;++Se){const Fe=parseInt(v.substr(Se*2,2),16);if(_t(Fe))return Se;D[T+Se]=Fe}return Se}function he(D,v,T,Y){return at(Ge(v,D.length-T),D,T,Y)}function Le(D,v,T,Y){return at(rt(v),D,T,Y)}function Ce(D,v,T,Y){return at(ct(v),D,T,Y)}function Oe(D,v,T,Y){return at(dt(v,D.length-T),D,T,Y)}y.prototype.write=function(v,T,Y,_e){if(T===void 0)_e="utf8",Y=this.length,T=0;else if(Y===void 0&&typeof T=="string")_e=T,Y=this.length,T=0;else if(isFinite(T))T=T>>>0,isFinite(Y)?(Y=Y>>>0,_e===void 0&&(_e="utf8")):(_e=Y,Y=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ve=this.length-T;if((Y===void 0||Y>ve)&&(Y=ve),v.length>0&&(Y<0||T<0)||T>this.length)throw new RangeError("Attempt to write outside buffer bounds");_e||(_e="utf8");let Se=!1;for(;;)switch(_e){case"hex":return De(this,v,T,Y);case"utf8":case"utf-8":return he(this,v,T,Y);case"ascii":case"latin1":case"binary":return Le(this,v,T,Y);case"base64":return Ce(this,v,T,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Oe(this,v,T,Y);default:if(Se)throw new TypeError("Unknown encoding: "+_e);_e=(""+_e).toLowerCase(),Se=!0}},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Xe(D,v,T){return v===0&&T===D.length?g.fromByteArray(D):g.fromByteArray(D.slice(v,T))}function Ke(D,v,T){T=Math.min(D.length,T);const Y=[];let _e=v;for(;_e<T;){const ve=D[_e];let Se=null,Fe=ve>239?4:ve>223?3:ve>191?2:1;if(_e+Fe<=T){let je,ze,We,Pe;switch(Fe){case 1:ve<128&&(Se=ve);break;case 2:je=D[_e+1],(je&192)===128&&(Pe=(ve&31)<<6|je&63,Pe>127&&(Se=Pe));break;case 3:je=D[_e+1],ze=D[_e+2],(je&192)===128&&(ze&192)===128&&(Pe=(ve&15)<<12|(je&63)<<6|ze&63,Pe>2047&&(Pe<55296||Pe>57343)&&(Se=Pe));break;case 4:je=D[_e+1],ze=D[_e+2],We=D[_e+3],(je&192)===128&&(ze&192)===128&&(We&192)===128&&(Pe=(ve&15)<<18|(je&63)<<12|(ze&63)<<6|We&63,Pe>65535&&Pe<1114112&&(Se=Pe))}}Se===null?(Se=65533,Fe=1):Se>65535&&(Se-=65536,Y.push(Se>>>10&1023|55296),Se=56320|Se&1023),Y.push(Se),_e+=Fe}return Qe(Y)}const Je=4096;function Qe(D){const v=D.length;if(v<=Je)return String.fromCharCode.apply(String,D);let T="",Y=0;for(;Y<v;)T+=String.fromCharCode.apply(String,D.slice(Y,Y+=Je));return T}function Be(D,v,T){let Y="";T=Math.min(D.length,T);for(let _e=v;_e<T;++_e)Y+=String.fromCharCode(D[_e]&127);return Y}function tt(D,v,T){let Y="";T=Math.min(D.length,T);for(let _e=v;_e<T;++_e)Y+=String.fromCharCode(D[_e]);return Y}function st(D,v,T){const Y=D.length;(!v||v<0)&&(v=0),(!T||T<0||T>Y)&&(T=Y);let _e="";for(let ve=v;ve<T;++ve)_e+=pt[D[ve]];return _e}function it(D,v,T){const Y=D.slice(v,T);let _e="";for(let ve=0;ve<Y.length-1;ve+=2)_e+=String.fromCharCode(Y[ve]+Y[ve+1]*256);return _e}y.prototype.slice=function(v,T){const Y=this.length;v=~~v,T=T===void 0?Y:~~T,v<0?(v+=Y,v<0&&(v=0)):v>Y&&(v=Y),T<0?(T+=Y,T<0&&(T=0)):T>Y&&(T=Y),T<v&&(T=v);const _e=this.subarray(v,T);return Object.setPrototypeOf(_e,y.prototype),_e};function Ue(D,v,T){if(D%1!==0||D<0)throw new RangeError("offset is not uint");if(D+v>T)throw new RangeError("Trying to access beyond buffer length")}y.prototype.readUintLE=y.prototype.readUIntLE=function(v,T,Y){v=v>>>0,T=T>>>0,Y||Ue(v,T,this.length);let _e=this[v],ve=1,Se=0;for(;++Se<T&&(ve*=256);)_e+=this[v+Se]*ve;return _e},y.prototype.readUintBE=y.prototype.readUIntBE=function(v,T,Y){v=v>>>0,T=T>>>0,Y||Ue(v,T,this.length);let _e=this[v+--T],ve=1;for(;T>0&&(ve*=256);)_e+=this[v+--T]*ve;return _e},y.prototype.readUint8=y.prototype.readUInt8=function(v,T){return v=v>>>0,T||Ue(v,1,this.length),this[v]},y.prototype.readUint16LE=y.prototype.readUInt16LE=function(v,T){return v=v>>>0,T||Ue(v,2,this.length),this[v]|this[v+1]<<8},y.prototype.readUint16BE=y.prototype.readUInt16BE=function(v,T){return v=v>>>0,T||Ue(v,2,this.length),this[v]<<8|this[v+1]},y.prototype.readUint32LE=y.prototype.readUInt32LE=function(v,T){return v=v>>>0,T||Ue(v,4,this.length),(this[v]|this[v+1]<<8|this[v+2]<<16)+this[v+3]*16777216},y.prototype.readUint32BE=y.prototype.readUInt32BE=function(v,T){return v=v>>>0,T||Ue(v,4,this.length),this[v]*16777216+(this[v+1]<<16|this[v+2]<<8|this[v+3])},y.prototype.readBigUInt64LE=ot(function(v){v=v>>>0,Ze(v,"offset");const T=this[v],Y=this[v+7];(T===void 0||Y===void 0)&&Ye(v,this.length-8);const _e=T+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24,ve=this[++v]+this[++v]*2**8+this[++v]*2**16+Y*2**24;return BigInt(_e)+(BigInt(ve)<<BigInt(32))}),y.prototype.readBigUInt64BE=ot(function(v){v=v>>>0,Ze(v,"offset");const T=this[v],Y=this[v+7];(T===void 0||Y===void 0)&&Ye(v,this.length-8);const _e=T*2**24+this[++v]*2**16+this[++v]*2**8+this[++v],ve=this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+Y;return(BigInt(_e)<<BigInt(32))+BigInt(ve)}),y.prototype.readIntLE=function(v,T,Y){v=v>>>0,T=T>>>0,Y||Ue(v,T,this.length);let _e=this[v],ve=1,Se=0;for(;++Se<T&&(ve*=256);)_e+=this[v+Se]*ve;return ve*=128,_e>=ve&&(_e-=Math.pow(2,8*T)),_e},y.prototype.readIntBE=function(v,T,Y){v=v>>>0,T=T>>>0,Y||Ue(v,T,this.length);let _e=T,ve=1,Se=this[v+--_e];for(;_e>0&&(ve*=256);)Se+=this[v+--_e]*ve;return ve*=128,Se>=ve&&(Se-=Math.pow(2,8*T)),Se},y.prototype.readInt8=function(v,T){return v=v>>>0,T||Ue(v,1,this.length),this[v]&128?(255-this[v]+1)*-1:this[v]},y.prototype.readInt16LE=function(v,T){v=v>>>0,T||Ue(v,2,this.length);const Y=this[v]|this[v+1]<<8;return Y&32768?Y|4294901760:Y},y.prototype.readInt16BE=function(v,T){v=v>>>0,T||Ue(v,2,this.length);const Y=this[v+1]|this[v]<<8;return Y&32768?Y|4294901760:Y},y.prototype.readInt32LE=function(v,T){return v=v>>>0,T||Ue(v,4,this.length),this[v]|this[v+1]<<8|this[v+2]<<16|this[v+3]<<24},y.prototype.readInt32BE=function(v,T){return v=v>>>0,T||Ue(v,4,this.length),this[v]<<24|this[v+1]<<16|this[v+2]<<8|this[v+3]},y.prototype.readBigInt64LE=ot(function(v){v=v>>>0,Ze(v,"offset");const T=this[v],Y=this[v+7];(T===void 0||Y===void 0)&&Ye(v,this.length-8);const _e=this[v+4]+this[v+5]*2**8+this[v+6]*2**16+(Y<<24);return(BigInt(_e)<<BigInt(32))+BigInt(T+this[++v]*2**8+this[++v]*2**16+this[++v]*2**24)}),y.prototype.readBigInt64BE=ot(function(v){v=v>>>0,Ze(v,"offset");const T=this[v],Y=this[v+7];(T===void 0||Y===void 0)&&Ye(v,this.length-8);const _e=(T<<24)+this[++v]*2**16+this[++v]*2**8+this[++v];return(BigInt(_e)<<BigInt(32))+BigInt(this[++v]*2**24+this[++v]*2**16+this[++v]*2**8+Y)}),y.prototype.readFloatLE=function(v,T){return v=v>>>0,T||Ue(v,4,this.length),l.read(this,v,!0,23,4)},y.prototype.readFloatBE=function(v,T){return v=v>>>0,T||Ue(v,4,this.length),l.read(this,v,!1,23,4)},y.prototype.readDoubleLE=function(v,T){return v=v>>>0,T||Ue(v,8,this.length),l.read(this,v,!0,52,8)},y.prototype.readDoubleBE=function(v,T){return v=v>>>0,T||Ue(v,8,this.length),l.read(this,v,!1,52,8)};function Ve(D,v,T,Y,_e,ve){if(!y.isBuffer(D))throw new TypeError('"buffer" argument must be a Buffer instance');if(v>_e||v<ve)throw new RangeError('"value" argument is out of bounds');if(T+Y>D.length)throw new RangeError("Index out of range")}y.prototype.writeUintLE=y.prototype.writeUIntLE=function(v,T,Y,_e){if(v=+v,T=T>>>0,Y=Y>>>0,!_e){const Fe=Math.pow(2,8*Y)-1;Ve(this,v,T,Y,Fe,0)}let ve=1,Se=0;for(this[T]=v&255;++Se<Y&&(ve*=256);)this[T+Se]=v/ve&255;return T+Y},y.prototype.writeUintBE=y.prototype.writeUIntBE=function(v,T,Y,_e){if(v=+v,T=T>>>0,Y=Y>>>0,!_e){const Fe=Math.pow(2,8*Y)-1;Ve(this,v,T,Y,Fe,0)}let ve=Y-1,Se=1;for(this[T+ve]=v&255;--ve>=0&&(Se*=256);)this[T+ve]=v/Se&255;return T+Y},y.prototype.writeUint8=y.prototype.writeUInt8=function(v,T,Y){return v=+v,T=T>>>0,Y||Ve(this,v,T,1,255,0),this[T]=v&255,T+1},y.prototype.writeUint16LE=y.prototype.writeUInt16LE=function(v,T,Y){return v=+v,T=T>>>0,Y||Ve(this,v,T,2,65535,0),this[T]=v&255,this[T+1]=v>>>8,T+2},y.prototype.writeUint16BE=y.prototype.writeUInt16BE=function(v,T,Y){return v=+v,T=T>>>0,Y||Ve(this,v,T,2,65535,0),this[T]=v>>>8,this[T+1]=v&255,T+2},y.prototype.writeUint32LE=y.prototype.writeUInt32LE=function(v,T,Y){return v=+v,T=T>>>0,Y||Ve(this,v,T,4,4294967295,0),this[T+3]=v>>>24,this[T+2]=v>>>16,this[T+1]=v>>>8,this[T]=v&255,T+4},y.prototype.writeUint32BE=y.prototype.writeUInt32BE=function(v,T,Y){return v=+v,T=T>>>0,Y||Ve(this,v,T,4,4294967295,0),this[T]=v>>>24,this[T+1]=v>>>16,this[T+2]=v>>>8,this[T+3]=v&255,T+4};function lt(D,v,T,Y,_e){He(v,Y,_e,D,T,7);let ve=Number(v&BigInt(4294967295));D[T++]=ve,ve=ve>>8,D[T++]=ve,ve=ve>>8,D[T++]=ve,ve=ve>>8,D[T++]=ve;let Se=Number(v>>BigInt(32)&BigInt(4294967295));return D[T++]=Se,Se=Se>>8,D[T++]=Se,Se=Se>>8,D[T++]=Se,Se=Se>>8,D[T++]=Se,T}function ft(D,v,T,Y,_e){He(v,Y,_e,D,T,7);let ve=Number(v&BigInt(4294967295));D[T+7]=ve,ve=ve>>8,D[T+6]=ve,ve=ve>>8,D[T+5]=ve,ve=ve>>8,D[T+4]=ve;let Se=Number(v>>BigInt(32)&BigInt(4294967295));return D[T+3]=Se,Se=Se>>8,D[T+2]=Se,Se=Se>>8,D[T+1]=Se,Se=Se>>8,D[T]=Se,T+8}y.prototype.writeBigUInt64LE=ot(function(v,T=0){return lt(this,v,T,BigInt(0),BigInt("0xffffffffffffffff"))}),y.prototype.writeBigUInt64BE=ot(function(v,T=0){return ft(this,v,T,BigInt(0),BigInt("0xffffffffffffffff"))}),y.prototype.writeIntLE=function(v,T,Y,_e){if(v=+v,T=T>>>0,!_e){const je=Math.pow(2,8*Y-1);Ve(this,v,T,Y,je-1,-je)}let ve=0,Se=1,Fe=0;for(this[T]=v&255;++ve<Y&&(Se*=256);)v<0&&Fe===0&&this[T+ve-1]!==0&&(Fe=1),this[T+ve]=(v/Se>>0)-Fe&255;return T+Y},y.prototype.writeIntBE=function(v,T,Y,_e){if(v=+v,T=T>>>0,!_e){const je=Math.pow(2,8*Y-1);Ve(this,v,T,Y,je-1,-je)}let ve=Y-1,Se=1,Fe=0;for(this[T+ve]=v&255;--ve>=0&&(Se*=256);)v<0&&Fe===0&&this[T+ve+1]!==0&&(Fe=1),this[T+ve]=(v/Se>>0)-Fe&255;return T+Y},y.prototype.writeInt8=function(v,T,Y){return v=+v,T=T>>>0,Y||Ve(this,v,T,1,127,-128),v<0&&(v=255+v+1),this[T]=v&255,T+1},y.prototype.writeInt16LE=function(v,T,Y){return v=+v,T=T>>>0,Y||Ve(this,v,T,2,32767,-32768),this[T]=v&255,this[T+1]=v>>>8,T+2},y.prototype.writeInt16BE=function(v,T,Y){return v=+v,T=T>>>0,Y||Ve(this,v,T,2,32767,-32768),this[T]=v>>>8,this[T+1]=v&255,T+2},y.prototype.writeInt32LE=function(v,T,Y){return v=+v,T=T>>>0,Y||Ve(this,v,T,4,2147483647,-2147483648),this[T]=v&255,this[T+1]=v>>>8,this[T+2]=v>>>16,this[T+3]=v>>>24,T+4},y.prototype.writeInt32BE=function(v,T,Y){return v=+v,T=T>>>0,Y||Ve(this,v,T,4,2147483647,-2147483648),v<0&&(v=4294967295+v+1),this[T]=v>>>24,this[T+1]=v>>>16,this[T+2]=v>>>8,this[T+3]=v&255,T+4},y.prototype.writeBigInt64LE=ot(function(v,T=0){return lt(this,v,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),y.prototype.writeBigInt64BE=ot(function(v,T=0){return ft(this,v,T,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ut(D,v,T,Y,_e,ve){if(T+Y>D.length)throw new RangeError("Index out of range");if(T<0)throw new RangeError("Index out of range")}function ht(D,v,T,Y,_e){return v=+v,T=T>>>0,_e||ut(D,v,T,4),l.write(D,v,T,Y,23,4),T+4}y.prototype.writeFloatLE=function(v,T,Y){return ht(this,v,T,!0,Y)},y.prototype.writeFloatBE=function(v,T,Y){return ht(this,v,T,!1,Y)};function z(D,v,T,Y,_e){return v=+v,T=T>>>0,_e||ut(D,v,T,8),l.write(D,v,T,Y,52,8),T+8}y.prototype.writeDoubleLE=function(v,T,Y){return z(this,v,T,!0,Y)},y.prototype.writeDoubleBE=function(v,T,Y){return z(this,v,T,!1,Y)},y.prototype.copy=function(v,T,Y,_e){if(!y.isBuffer(v))throw new TypeError("argument should be a Buffer");if(Y||(Y=0),!_e&&_e!==0&&(_e=this.length),T>=v.length&&(T=v.length),T||(T=0),_e>0&&_e<Y&&(_e=Y),_e===Y||v.length===0||this.length===0)return 0;if(T<0)throw new RangeError("targetStart out of bounds");if(Y<0||Y>=this.length)throw new RangeError("Index out of range");if(_e<0)throw new RangeError("sourceEnd out of bounds");_e>this.length&&(_e=this.length),v.length-T<_e-Y&&(_e=v.length-T+Y);const ve=_e-Y;return this===v&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(T,Y,_e):Uint8Array.prototype.set.call(v,this.subarray(Y,_e),T),ve},y.prototype.fill=function(v,T,Y,_e){if(typeof v=="string"){if(typeof T=="string"?(_e=T,T=0,Y=this.length):typeof Y=="string"&&(_e=Y,Y=this.length),_e!==void 0&&typeof _e!="string")throw new TypeError("encoding must be a string");if(typeof _e=="string"&&!y.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);if(v.length===1){const Se=v.charCodeAt(0);(_e==="utf8"&&Se<128||_e==="latin1")&&(v=Se)}}else typeof v=="number"?v=v&255:typeof v=="boolean"&&(v=Number(v));if(T<0||this.length<T||this.length<Y)throw new RangeError("Out of range index");if(Y<=T)return this;T=T>>>0,Y=Y===void 0?this.length:Y>>>0,v||(v=0);let ve;if(typeof v=="number")for(ve=T;ve<Y;++ve)this[ve]=v;else{const Se=y.isBuffer(v)?v:y.from(v,_e),Fe=Se.length;if(Fe===0)throw new TypeError('The value "'+v+'" is invalid for argument "value"');for(ve=0;ve<Y-T;++ve)this[ve+T]=Se[ve%Fe]}return this};const k={};function $e(D,v,T){k[D]=class extends T{constructor(){super(),Object.defineProperty(this,"message",{value:v.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${D}]`,this.stack,delete this.name}get code(){return D}set code(_e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:_e,writable:!0})}toString(){return`${this.name} [${D}]: ${this.message}`}}}$e("ERR_BUFFER_OUT_OF_BOUNDS",function(D){return D?`${D} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),$e("ERR_INVALID_ARG_TYPE",function(D,v){return`The "${D}" argument must be of type number. Received type ${typeof v}`},TypeError),$e("ERR_OUT_OF_RANGE",function(D,v,T){let Y=`The value of "${D}" is out of range.`,_e=T;return Number.isInteger(T)&&Math.abs(T)>2**32?_e=Ee(String(T)):typeof T=="bigint"&&(_e=String(T),(T>BigInt(2)**BigInt(32)||T<-(BigInt(2)**BigInt(32)))&&(_e=Ee(_e)),_e+="n"),Y+=` It must be ${v}. Received ${_e}`,Y},RangeError);function Ee(D){let v="",T=D.length;const Y=D[0]==="-"?1:0;for(;T>=Y+4;T-=3)v=`_${D.slice(T-3,T)}${v}`;return`${D.slice(0,T)}${v}`}function Me(D,v,T){Ze(v,"offset"),(D[v]===void 0||D[v+T]===void 0)&&Ye(v,D.length-(T+1))}function He(D,v,T,Y,_e,ve){if(D>T||D<v){const Se=typeof v=="bigint"?"n":"";let Fe;throw ve>3?v===0||v===BigInt(0)?Fe=`>= 0${Se} and < 2${Se} ** ${(ve+1)*8}${Se}`:Fe=`>= -(2${Se} ** ${(ve+1)*8-1}${Se}) and < 2 ** ${(ve+1)*8-1}${Se}`:Fe=`>= ${v}${Se} and <= ${T}${Se}`,new k.ERR_OUT_OF_RANGE("value",Fe,D)}Me(Y,_e,ve)}function Ze(D,v){if(typeof D!="number")throw new k.ERR_INVALID_ARG_TYPE(v,"number",D)}function Ye(D,v,T){throw Math.floor(D)!==D?(Ze(D,T),new k.ERR_OUT_OF_RANGE(T||"offset","an integer",D)):v<0?new k.ERR_BUFFER_OUT_OF_BOUNDS:new k.ERR_OUT_OF_RANGE(T||"offset",`>= ${T?1:0} and <= ${v}`,D)}const qe=/[^+/0-9A-Za-z-_]/g;function nt(D){if(D=D.split("=")[0],D=D.trim().replace(qe,""),D.length<2)return"";for(;D.length%4!==0;)D=D+"=";return D}function Ge(D,v){v=v||1/0;let T;const Y=D.length;let _e=null;const ve=[];for(let Se=0;Se<Y;++Se){if(T=D.charCodeAt(Se),T>55295&&T<57344){if(!_e){if(T>56319){(v-=3)>-1&&ve.push(239,191,189);continue}else if(Se+1===Y){(v-=3)>-1&&ve.push(239,191,189);continue}_e=T;continue}if(T<56320){(v-=3)>-1&&ve.push(239,191,189),_e=T;continue}T=(_e-55296<<10|T-56320)+65536}else _e&&(v-=3)>-1&&ve.push(239,191,189);if(_e=null,T<128){if((v-=1)<0)break;ve.push(T)}else if(T<2048){if((v-=2)<0)break;ve.push(T>>6|192,T&63|128)}else if(T<65536){if((v-=3)<0)break;ve.push(T>>12|224,T>>6&63|128,T&63|128)}else if(T<1114112){if((v-=4)<0)break;ve.push(T>>18|240,T>>12&63|128,T>>6&63|128,T&63|128)}else throw new Error("Invalid code point")}return ve}function rt(D){const v=[];for(let T=0;T<D.length;++T)v.push(D.charCodeAt(T)&255);return v}function dt(D,v){let T,Y,_e;const ve=[];for(let Se=0;Se<D.length&&!((v-=2)<0);++Se)T=D.charCodeAt(Se),Y=T>>8,_e=T%256,ve.push(_e),ve.push(Y);return ve}function ct(D){return g.toByteArray(nt(D))}function at(D,v,T,Y){let _e;for(_e=0;_e<Y&&!(_e+T>=v.length||_e>=D.length);++_e)v[_e+T]=D[_e];return _e}function et(D,v){return D instanceof v||D!=null&&D.constructor!=null&&D.constructor.name!=null&&D.constructor.name===v.name}function _t(D){return D!==D}const pt=function(){const D="0123456789abcdef",v=new Array(256);for(let T=0;T<16;++T){const Y=T*16;for(let _e=0;_e<16;++_e)v[Y+_e]=D[T]+D[_e]}return v}();function ot(D){return typeof BigInt=="undefined"?mt:D}function mt(){throw new Error("BigInt not supported")}})(buffer$1),globalThis.Buffer=buffer$1.Buffer;var utf8$5={},utils$r={},support$5={},nodestream,blob;if(support$5.base64=!0,support$5.array=!0,support$5.string=!0,support$5.arraybuffer=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined",support$5.nodebuffer=typeof Buffer!="undefined",support$5.uint8array=typeof Uint8Array!="undefined",typeof ArrayBuffer=="undefined")blob=support$5.blob=!1;else{var buffer=new ArrayBuffer(0);try{blob=support$5.blob=new Blob([buffer],{type:"application/zip"}).size===0}catch(r){try{var Builder=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,builder=new Builder;builder.append(buffer),blob=support$5.blob=builder.getBlob("application/zip").size===0}catch(g){blob=support$5.blob=!1}}}try{nodestream=support$5.nodestream=!!require("readable-stream").Readable}catch(r){nodestream=support$5.nodestream=!1}var base64$1={},utils$q=utils$r,support$4=support$5,_keyStr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";base64$1.encode=function(r){for(var g=[],l,E,A,I,N,y,M,O=0,Z=r.length,xe=Z,V=utils$q.getTypeOf(r)!=="string";O<r.length;)xe=Z-O,V?(l=r[O++],E=O<Z?r[O++]:0,A=O<Z?r[O++]:0):(l=r.charCodeAt(O++),E=O<Z?r.charCodeAt(O++):0,A=O<Z?r.charCodeAt(O++):0),I=l>>2,N=(l&3)<<4|E>>4,y=xe>1?(E&15)<<2|A>>6:64,M=xe>2?A&63:64,g.push(_keyStr.charAt(I)+_keyStr.charAt(N)+_keyStr.charAt(y)+_keyStr.charAt(M));return g.join("")},base64$1.decode=function(r){var g,l,E,A,I,N,y,M=0,O=0,Z="data:";if(r.substr(0,Z.length)===Z)throw new Error("Invalid base64 input, it looks like a data url.");r=r.replace(/[^A-Za-z0-9+/=]/g,"");var xe=r.length*3/4;if(r.charAt(r.length-1)===_keyStr.charAt(64)&&xe--,r.charAt(r.length-2)===_keyStr.charAt(64)&&xe--,xe%1!==0)throw new Error("Invalid base64 input, bad content length.");var V;for(support$4.uint8array?V=new Uint8Array(xe|0):V=new Array(xe|0);M<r.length;)A=_keyStr.indexOf(r.charAt(M++)),I=_keyStr.indexOf(r.charAt(M++)),N=_keyStr.indexOf(r.charAt(M++)),y=_keyStr.indexOf(r.charAt(M++)),g=A<<2|I>>4,l=(I&15)<<4|N>>2,E=(N&3)<<6|y,V[O++]=g,N!==64&&(V[O++]=l),y!==64&&(V[O++]=E);return V};var nodejsUtils$2={isNode:typeof Buffer!="undefined",newBufferFrom:function(r,g){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(r,g);if(typeof r=="number")throw new Error('The "data" argument must not be a number');return new Buffer(r,g)},allocBuffer:function(r){if(Buffer.alloc)return Buffer.alloc(r);var g=new Buffer(r);return g.fill(0),g},isBuffer:function(r){return Buffer.isBuffer(r)},isStream:function(r){return r&&typeof r.on=="function"&&typeof r.pause=="function"&&typeof r.resume=="function"}},Mutation=commonjsGlobal.MutationObserver||commonjsGlobal.WebKitMutationObserver,scheduleDrain;if(Mutation){var called=0,observer=new Mutation(nextTick),element=commonjsGlobal.document.createTextNode("");observer.observe(element,{characterData:!0}),scheduleDrain=function(){element.data=called=++called%2}}else if(!commonjsGlobal.setImmediate&&typeof commonjsGlobal.MessageChannel!="undefined"){var channel=new commonjsGlobal.MessageChannel;channel.port1.onmessage=nextTick,scheduleDrain=function(){channel.port2.postMessage(0)}}else"document"in commonjsGlobal&&"onreadystatechange"in commonjsGlobal.document.createElement("script")?scheduleDrain=function(){var r=commonjsGlobal.document.createElement("script");r.onreadystatechange=function(){nextTick(),r.onreadystatechange=null,r.parentNode.removeChild(r),r=null},commonjsGlobal.document.documentElement.appendChild(r)}:scheduleDrain=function(){setTimeout(nextTick,0)};var draining,queue=[];function nextTick(){draining=!0;for(var r,g,l=queue.length;l;){for(g=queue,queue=[],r=-1;++r<l;)g[r]();l=queue.length}draining=!1}var lib$2=immediate$1;function immediate$1(r){queue.push(r)===1&&!draining&&scheduleDrain()}var immediate=lib$2;function INTERNAL(){}var handlers={},REJECTED=["REJECTED"],FULFILLED=["FULFILLED"],PENDING=["PENDING"],lib$1=Promise$1;function Promise$1(r){if(typeof r!="function")throw new TypeError("resolver must be a function");this.state=PENDING,this.queue=[],this.outcome=void 0,r!==INTERNAL&&safelyResolveThenable(this,r)}Promise$1.prototype.finally=function(r){if(typeof r!="function")return this;var g=this.constructor;return this.then(l,E);function l(A){function I(){return A}return g.resolve(r()).then(I)}function E(A){function I(){throw A}return g.resolve(r()).then(I)}},Promise$1.prototype.catch=function(r){return this.then(null,r)},Promise$1.prototype.then=function(r,g){if(typeof r!="function"&&this.state===FULFILLED||typeof g!="function"&&this.state===REJECTED)return this;var l=new this.constructor(INTERNAL);if(this.state!==PENDING){var E=this.state===FULFILLED?r:g;unwrap(l,E,this.outcome)}else this.queue.push(new QueueItem(l,r,g));return l};function QueueItem(r,g,l){this.promise=r,typeof g=="function"&&(this.onFulfilled=g,this.callFulfilled=this.otherCallFulfilled),typeof l=="function"&&(this.onRejected=l,this.callRejected=this.otherCallRejected)}QueueItem.prototype.callFulfilled=function(r){handlers.resolve(this.promise,r)},QueueItem.prototype.otherCallFulfilled=function(r){unwrap(this.promise,this.onFulfilled,r)},QueueItem.prototype.callRejected=function(r){handlers.reject(this.promise,r)},QueueItem.prototype.otherCallRejected=function(r){unwrap(this.promise,this.onRejected,r)};function unwrap(r,g,l){immediate(function(){var E;try{E=g(l)}catch(A){return handlers.reject(r,A)}E===r?handlers.reject(r,new TypeError("Cannot resolve promise with itself")):handlers.resolve(r,E)})}handlers.resolve=function(r,g){var l=tryCatch(getThen,g);if(l.status==="error")return handlers.reject(r,l.value);var E=l.value;if(E)safelyResolveThenable(r,E);else{r.state=FULFILLED,r.outcome=g;for(var A=-1,I=r.queue.length;++A<I;)r.queue[A].callFulfilled(g)}return r},handlers.reject=function(r,g){r.state=REJECTED,r.outcome=g;for(var l=-1,E=r.queue.length;++l<E;)r.queue[l].callRejected(g);return r};function getThen(r){var g=r&&r.then;if(r&&(typeof r=="object"||typeof r=="function")&&typeof g=="function")return function(){g.apply(r,arguments)}}function safelyResolveThenable(r,g){var l=!1;function E(y){l||(l=!0,handlers.reject(r,y))}function A(y){l||(l=!0,handlers.resolve(r,y))}function I(){g(A,E)}var N=tryCatch(I);N.status==="error"&&E(N.value)}function tryCatch(r,g){var l={};try{l.value=r(g),l.status="success"}catch(E){l.status="error",l.value=E}return l}Promise$1.resolve=resolve;function resolve(r){return r instanceof this?r:handlers.resolve(new this(INTERNAL),r)}Promise$1.reject=reject;function reject(r){var g=new this(INTERNAL);return handlers.reject(g,r)}Promise$1.all=all;function all(r){var g=this;if(Object.prototype.toString.call(r)!=="[object Array]")return this.reject(new TypeError("must be an array"));var l=r.length,E=!1;if(!l)return this.resolve([]);for(var A=new Array(l),I=0,N=-1,y=new this(INTERNAL);++N<l;)M(r[N],N);return y;function M(O,Z){g.resolve(O).then(xe,function(V){E||(E=!0,handlers.reject(y,V))});function xe(V){A[Z]=V,++I===l&&!E&&(E=!0,handlers.resolve(y,A))}}}Promise$1.race=race;function race(r){var g=this;if(Object.prototype.toString.call(r)!=="[object Array]")return this.reject(new TypeError("must be an array"));var l=r.length,E=!1;if(!l)return this.resolve([]);for(var A=-1,I=new this(INTERNAL);++A<l;)N(r[A]);return I;function N(y){g.resolve(y).then(function(M){E||(E=!0,handlers.resolve(I,M))},function(M){E||(E=!0,handlers.reject(I,M))})}}var ES6Promise=null;typeof Promise!="undefined"?ES6Promise=Promise:ES6Promise=lib$1;var external$3={Promise:ES6Promise};(function(r,g){if(r.setImmediate)return;var l=1,E={},A=!1,I=r.document,N;function y(Te){typeof Te!="function"&&(Te=new Function(""+Te));for(var Ne=new Array(arguments.length-1),Ie=0;Ie<Ne.length;Ie++)Ne[Ie]=arguments[Ie+1];var Ae={callback:Te,args:Ne};return E[l]=Ae,N(l),l++}function M(Te){delete E[Te]}function O(Te){var Ne=Te.callback,Ie=Te.args;switch(Ie.length){case 0:Ne();break;case 1:Ne(Ie[0]);break;case 2:Ne(Ie[0],Ie[1]);break;case 3:Ne(Ie[0],Ie[1],Ie[2]);break;default:Ne.apply(g,Ie);break}}function Z(Te){if(A)setTimeout(Z,0,Te);else{var Ne=E[Te];if(Ne){A=!0;try{O(Ne)}finally{M(Te),A=!1}}}}function xe(){N=function(Te){setTimeout(function(){Z(Te)})}}function V(){if(r.postMessage&&!r.importScripts){var Te=!0,Ne=r.onmessage;return r.onmessage=function(){Te=!1},r.postMessage("","*"),r.onmessage=Ne,Te}}function ce(){var Te="setImmediate$"+Math.random()+"$",Ne=function(Ie){Ie.source===r&&typeof Ie.data=="string"&&Ie.data.indexOf(Te)===0&&Z(+Ie.data.slice(Te.length))};r.addEventListener?r.addEventListener("message",Ne,!1):r.attachEvent("onmessage",Ne),N=function(Ie){r.postMessage(Te+Ie,"*")}}function me(){var Te=new MessageChannel;Te.port1.onmessage=function(Ne){var Ie=Ne.data;Z(Ie)},N=function(Ne){Te.port2.postMessage(Ne)}}function we(){var Te=I.documentElement;N=function(Ne){var Ie=I.createElement("script");Ie.onreadystatechange=function(){Z(Ne),Ie.onreadystatechange=null,Te.removeChild(Ie),Ie=null},Te.appendChild(Ie)}}function ye(){N=function(Te){setTimeout(Z,0,Te)}}var be=Object.getPrototypeOf&&Object.getPrototypeOf(r);be=be&&be.setTimeout?be:r,{}.toString.call(r.undefined)==="[object undefined]"?xe():V()?ce():r.MessageChannel?me():I&&"onreadystatechange"in I.createElement("script")?we():ye(),be.setImmediate=y,be.clearImmediate=M})(typeof self=="undefined"?commonjsGlobal:self),function(r){var g=support$5,l=base64$1,E=nodejsUtils$2,A=external$3;function I(V){var ce=null;return g.uint8array?ce=new Uint8Array(V.length):ce=new Array(V.length),y(V,ce)}r.newBlob=function(V,ce){r.checkSupport("blob");try{return new Blob([V],{type:ce})}catch(ye){try{var me=self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder,we=new me;return we.append(V),we.getBlob(ce)}catch(be){throw new Error("Bug : can't construct the Blob.")}}};function N(V){return V}function y(V,ce){for(var me=0;me<V.length;++me)ce[me]=V.charCodeAt(me)&255;return ce}var M={stringifyByChunk:function(V,ce,me){var we=[],ye=0,be=V.length;if(be<=me)return String.fromCharCode.apply(null,V);for(;ye<be;)ce==="array"||ce==="nodebuffer"?we.push(String.fromCharCode.apply(null,V.slice(ye,Math.min(ye+me,be)))):we.push(String.fromCharCode.apply(null,V.subarray(ye,Math.min(ye+me,be)))),ye+=me;return we.join("")},stringifyByChar:function(V){for(var ce="",me=0;me<V.length;me++)ce+=String.fromCharCode(V[me]);return ce},applyCanBeUsed:{uint8array:function(){try{return g.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(V){return!1}}(),nodebuffer:function(){try{return g.nodebuffer&&String.fromCharCode.apply(null,E.allocBuffer(1)).length===1}catch(V){return!1}}()}};function O(V){var ce=65536,me=r.getTypeOf(V),we=!0;if(me==="uint8array"?we=M.applyCanBeUsed.uint8array:me==="nodebuffer"&&(we=M.applyCanBeUsed.nodebuffer),we)for(;ce>1;)try{return M.stringifyByChunk(V,me,ce)}catch(ye){ce=Math.floor(ce/2)}return M.stringifyByChar(V)}r.applyFromCharCode=O;function Z(V,ce){for(var me=0;me<V.length;me++)ce[me]=V[me];return ce}var xe={};xe.string={string:N,array:function(V){return y(V,new Array(V.length))},arraybuffer:function(V){return xe.string.uint8array(V).buffer},uint8array:function(V){return y(V,new Uint8Array(V.length))},nodebuffer:function(V){return y(V,E.allocBuffer(V.length))}},xe.array={string:O,array:N,arraybuffer:function(V){return new Uint8Array(V).buffer},uint8array:function(V){return new Uint8Array(V)},nodebuffer:function(V){return E.newBufferFrom(V)}},xe.arraybuffer={string:function(V){return O(new Uint8Array(V))},array:function(V){return Z(new Uint8Array(V),new Array(V.byteLength))},arraybuffer:N,uint8array:function(V){return new Uint8Array(V)},nodebuffer:function(V){return E.newBufferFrom(new Uint8Array(V))}},xe.uint8array={string:O,array:function(V){return Z(V,new Array(V.length))},arraybuffer:function(V){return V.buffer},uint8array:N,nodebuffer:function(V){return E.newBufferFrom(V)}},xe.nodebuffer={string:O,array:function(V){return Z(V,new Array(V.length))},arraybuffer:function(V){return xe.nodebuffer.uint8array(V).buffer},uint8array:function(V){return Z(V,new Uint8Array(V.length))},nodebuffer:N},r.transformTo=function(V,ce){if(ce||(ce=""),!V)return ce;r.checkSupport(V);var me=r.getTypeOf(ce),we=xe[me][V](ce);return we},r.resolve=function(V){for(var ce=V.split("/"),me=[],we=0;we<ce.length;we++){var ye=ce[we];ye==="."||ye===""&&we!==0&&we!==ce.length-1||(ye===".."?me.pop():me.push(ye))}return me.join("/")},r.getTypeOf=function(V){if(typeof V=="string")return"string";if(Object.prototype.toString.call(V)==="[object Array]")return"array";if(g.nodebuffer&&E.isBuffer(V))return"nodebuffer";if(g.uint8array&&V instanceof Uint8Array)return"uint8array";if(g.arraybuffer&&V instanceof ArrayBuffer)return"arraybuffer"},r.checkSupport=function(V){var ce=g[V.toLowerCase()];if(!ce)throw new Error(V+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(V){var ce="",me,we;for(we=0;we<(V||"").length;we++)me=V.charCodeAt(we),ce+="\\x"+(me<16?"0":"")+me.toString(16).toUpperCase();return ce},r.delay=function(V,ce,me){setImmediate(function(){V.apply(me||null,ce||[])})},r.inherits=function(V,ce){var me=function(){};me.prototype=ce.prototype,V.prototype=new me},r.extend=function(){var V={},ce,me;for(ce=0;ce<arguments.length;ce++)for(me in arguments[ce])Object.prototype.hasOwnProperty.call(arguments[ce],me)&&typeof V[me]=="undefined"&&(V[me]=arguments[ce][me]);return V},r.prepareContent=function(V,ce,me,we,ye){var be=A.Promise.resolve(ce).then(function(Te){var Ne=g.blob&&(Te instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(Te))!==-1);return Ne&&typeof FileReader!="undefined"?new A.Promise(function(Ie,Ae){var Re=new FileReader;Re.onload=function(ke){Ie(ke.target.result)},Re.onerror=function(ke){Ae(ke.target.error)},Re.readAsArrayBuffer(Te)}):Te});return be.then(function(Te){var Ne=r.getTypeOf(Te);return Ne?(Ne==="arraybuffer"?Te=r.transformTo("uint8array",Te):Ne==="string"&&(ye?Te=l.decode(Te):me&&we!==!0&&(Te=I(Te))),Te):A.Promise.reject(new Error("Can't read the data of '"+V+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}}(utils$r);function GenericWorker$b(r){this.name=r||"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}GenericWorker$b.prototype={push:function(r){this.emit("data",r)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(r){this.emit("error",r)}return!0},error:function(r){return this.isFinished?!1:(this.isPaused?this.generatedError=r:(this.isFinished=!0,this.emit("error",r),this.previous&&this.previous.error(r),this.cleanUp()),!0)},on:function(r,g){return this._listeners[r].push(g),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(r,g){if(this._listeners[r])for(var l=0;l<this._listeners[r].length;l++)this._listeners[r][l].call(this,g)},pipe:function(r){return r.registerPrevious(this)},registerPrevious:function(r){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=r.streamInfo,this.mergeStreamInfo(),this.previous=r;var g=this;return r.on("data",function(l){g.processChunk(l)}),r.on("end",function(){g.end()}),r.on("error",function(l){g.error(l)}),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 r=!1;return this.generatedError&&(this.error(this.generatedError),r=!0),this.previous&&this.previous.resume(),!r},flush:function(){},processChunk:function(r){this.push(r)},withStreamInfo:function(r,g){return this.extraStreamInfo[r]=g,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var r in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,r)&&(this.streamInfo[r]=this.extraStreamInfo[r])},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 r="Worker "+this.name;return this.previous?this.previous+" -> "+r:r}};var GenericWorker_1=GenericWorker$b;(function(r){for(var g=utils$r,l=support$5,E=nodejsUtils$2,A=GenericWorker_1,I=new Array(256),N=0;N<256;N++)I[N]=N>=252?6:N>=248?5:N>=240?4:N>=224?3:N>=192?2:1;I[254]=I[254]=1;var y=function(V){var ce,me,we,ye,be,Te=V.length,Ne=0;for(ye=0;ye<Te;ye++)me=V.charCodeAt(ye),(me&64512)===55296&&ye+1<Te&&(we=V.charCodeAt(ye+1),(we&64512)===56320&&(me=65536+(me-55296<<10)+(we-56320),ye++)),Ne+=me<128?1:me<2048?2:me<65536?3:4;for(l.uint8array?ce=new Uint8Array(Ne):ce=new Array(Ne),be=0,ye=0;be<Ne;ye++)me=V.charCodeAt(ye),(me&64512)===55296&&ye+1<Te&&(we=V.charCodeAt(ye+1),(we&64512)===56320&&(me=65536+(me-55296<<10)+(we-56320),ye++)),me<128?ce[be++]=me:me<2048?(ce[be++]=192|me>>>6,ce[be++]=128|me&63):me<65536?(ce[be++]=224|me>>>12,ce[be++]=128|me>>>6&63,ce[be++]=128|me&63):(ce[be++]=240|me>>>18,ce[be++]=128|me>>>12&63,ce[be++]=128|me>>>6&63,ce[be++]=128|me&63);return ce},M=function(V,ce){var me;for(ce=ce||V.length,ce>V.length&&(ce=V.length),me=ce-1;me>=0&&(V[me]&192)===128;)me--;return me<0||me===0?ce:me+I[V[me]]>ce?me:ce},O=function(V){var ce,me,we,ye,be=V.length,Te=new Array(be*2);for(me=0,ce=0;ce<be;){if(we=V[ce++],we<128){Te[me++]=we;continue}if(ye=I[we],ye>4){Te[me++]=65533,ce+=ye-1;continue}for(we&=ye===2?31:ye===3?15:7;ye>1&&ce<be;)we=we<<6|V[ce++]&63,ye--;if(ye>1){Te[me++]=65533;continue}we<65536?Te[me++]=we:(we-=65536,Te[me++]=55296|we>>10&1023,Te[me++]=56320|we&1023)}return Te.length!==me&&(Te.subarray?Te=Te.subarray(0,me):Te.length=me),g.applyFromCharCode(Te)};r.utf8encode=function(ce){return l.nodebuffer?E.newBufferFrom(ce,"utf-8"):y(ce)},r.utf8decode=function(ce){return l.nodebuffer?g.transformTo("nodebuffer",ce).toString("utf-8"):(ce=g.transformTo(l.uint8array?"uint8array":"array",ce),O(ce))};function Z(){A.call(this,"utf-8 decode"),this.leftOver=null}g.inherits(Z,A),Z.prototype.processChunk=function(V){var ce=g.transformTo(l.uint8array?"uint8array":"array",V.data);if(this.leftOver&&this.leftOver.length){if(l.uint8array){var me=ce;ce=new Uint8Array(me.length+this.leftOver.length),ce.set(this.leftOver,0),ce.set(me,this.leftOver.length)}else ce=this.leftOver.concat(ce);this.leftOver=null}var we=M(ce),ye=ce;we!==ce.length&&(l.uint8array?(ye=ce.subarray(0,we),this.leftOver=ce.subarray(we,ce.length)):(ye=ce.slice(0,we),this.leftOver=ce.slice(we,ce.length))),this.push({data:r.utf8decode(ye),meta:V.meta})},Z.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=Z;function xe(){A.call(this,"utf-8 encode")}g.inherits(xe,A),xe.prototype.processChunk=function(V){this.push({data:r.utf8encode(V.data),meta:V.meta})},r.Utf8EncodeWorker=xe})(utf8$5);var GenericWorker$a=GenericWorker_1,utils$p=utils$r;function ConvertWorker$1(r){GenericWorker$a.call(this,"ConvertWorker to "+r),this.destType=r}utils$p.inherits(ConvertWorker$1,GenericWorker$a),ConvertWorker$1.prototype.processChunk=function(r){this.push({data:utils$p.transformTo(this.destType,r.data),meta:r.meta})};var ConvertWorker_1=ConvertWorker$1,utils$o=utils$r,ConvertWorker=ConvertWorker_1,GenericWorker$9=GenericWorker_1,base64=base64$1,support$3=support$5,external$2=external$3,NodejsStreamOutputAdapter=null;if(support$3.nodestream)try{NodejsStreamOutputAdapter=require("../nodejs/NodejsStreamOutputAdapter")}catch(r){}function transformZipOutput(r,g,l){switch(r){case"blob":return utils$o.newBlob(utils$o.transformTo("arraybuffer",g),l);case"base64":return base64.encode(g);default:return utils$o.transformTo(r,g)}}function concat(r,g){var l,E=0,A=null,I=0;for(l=0;l<g.length;l++)I+=g[l].length;switch(r){case"string":return g.join("");case"array":return Array.prototype.concat.apply([],g);case"uint8array":for(A=new Uint8Array(I),l=0;l<g.length;l++)A.set(g[l],E),E+=g[l].length;return A;case"nodebuffer":return Buffer.concat(g);default:throw new Error("concat : unsupported type '"+r+"'")}}function accumulate(r,g){return new external$2.Promise(function(l,E){var A=[],I=r._internalType,N=r._outputType,y=r._mimeType;r.on("data",function(M,O){A.push(M),g&&g(O)}).on("error",function(M){A=[],E(M)}).on("end",function(){try{var M=transformZipOutput(N,concat(I,A),y);l(M)}catch(O){E(O)}A=[]}).resume()})}function StreamHelper$2(r,g,l){var E=g;switch(g){case"blob":case"arraybuffer":E="uint8array";break;case"base64":E="string";break}try{this._internalType=E,this._outputType=g,this._mimeType=l,utils$o.checkSupport(E),this._worker=r.pipe(new ConvertWorker(E)),r.lock()}catch(A){this._worker=new GenericWorker$9("error"),this._worker.error(A)}}StreamHelper$2.prototype={accumulate:function(r){return a