diff --git a/apps/sim/lib/execution/isolated-vm-worker.cjs b/apps/sim/lib/execution/isolated-vm-worker.cjs index 5821120b701..6a6c814bc4c 100644 --- a/apps/sim/lib/execution/isolated-vm-worker.cjs +++ b/apps/sim/lib/execution/isolated-vm-worker.cjs @@ -740,6 +740,17 @@ async function executeTask(request, executionId) { releaseables.push(textDecodeCallback) await jail.set('__textDecode', textDecodeCallback) + // btoa / atob delegate to Node's native WHATWG implementations, so + // libraries that encode base64 through them (docx's Packer.toBase64String, + // document protection hashes, data-URI images) behave as in a browser. + const btoaCallback = new ivm.Callback((data) => btoa(data)) + releaseables.push(btoaCallback) + await jail.set('__btoa', btoaCallback) + + const atobCallback = new ivm.Callback((data) => atob(data)) + releaseables.push(atobCallback) + await jail.set('__atob', atobCallback) + // Delegate timers to Node's real timer heap via ivm.Reference (the pattern // recommended by laverdet/isolated-vm#136). Host-side bookkeeping was // hoisted to the function scope above so the finally can always sweep. @@ -890,6 +901,8 @@ async function executeTask(request, executionId) { const __error = globalThis.__error; const __textEncode = globalThis.__textEncode; const __textDecode = globalThis.__textDecode; + const __btoa = globalThis.__btoa; + const __atob = globalThis.__atob; const __setTimeoutRef = globalThis.__setTimeoutRef; const __clearTimeoutRef = globalThis.__clearTimeoutRef; const __setIntervalRef = globalThis.__setIntervalRef; @@ -927,6 +940,9 @@ async function executeTask(request, executionId) { } }; + globalThis.btoa = function btoa(data) { return __btoa(String(data)); }; + globalThis.atob = function atob(data) { return __atob(String(data)); }; + // setTimeout / setInterval delegate to Node's real timer heap via // ivm.Reference. The \`ms\` arg is honored (host clamps to the script // timeout window); \`clearTimeout\` / \`clearInterval\` actually cancel. @@ -1039,7 +1055,7 @@ async function executeTask(request, executionId) { const undefined_globals = [ 'Isolate', 'Context', 'Script', 'Module', 'Callback', 'Reference', 'ExternalCopy', '__dirname', '__filename', '__brokerRef', - '__log', '__error', '__textEncode', '__textDecode', + '__log', '__error', '__textEncode', '__textDecode', '__btoa', '__atob', '__setTimeoutRef', '__clearTimeoutRef', '__setIntervalRef' ]; for (const name of undefined_globals) { diff --git a/apps/sim/lib/execution/sandbox/bundles/build.ts b/apps/sim/lib/execution/sandbox/bundles/build.ts index c09eb5cb614..a155f2981ec 100644 --- a/apps/sim/lib/execution/sandbox/bundles/build.ts +++ b/apps/sim/lib/execution/sandbox/bundles/build.ts @@ -9,7 +9,7 @@ * * Every bundle is evaluated in a bare context before it is written: the * bundler can emit a reference to a runtime helper it never defines (Bun does - * this for docx's inlined CommonJS shim), and nothing else loads these files + * this for an inlined CommonJS shim), and nothing else loads these files * before a production document generation does. * * Run via: `bun run build:sandbox-bundles`. diff --git a/apps/sim/lib/execution/sandbox/bundles/docx.cjs b/apps/sim/lib/execution/sandbox/bundles/docx.cjs index 8422580d836..d2331bae2b3 100644 --- a/apps/sim/lib/execution/sandbox/bundles/docx.cjs +++ b/apps/sim/lib/execution/sandbox/bundles/docx.cjs @@ -1,42 +1,12 @@ // sandbox bundle: docx // generated by apps/sim/lib/execution/sandbox/bundles/build.ts // do not edit by hand. run `bun run build:sandbox-bundles` to regenerate. -(()=>{var R5=Object.create;var{getPrototypeOf:L5,defineProperty:r1,getOwnPropertyNames:I5}=Object;var O5=Object.prototype.hasOwnProperty;function H5(B){return this[B]}var F5,W5,P5=(B,U,G)=>{var Y=B!=null&&typeof B==="object";if(Y){var Q=U?F5??=new WeakMap:W5??=new WeakMap,K=Q.get(B);if(K)return K}G=B!=null?R5(L5(B)):{};let Z=U||!B||!B.__esModule?r1(G,"default",{value:B,enumerable:!0}):G;for(let J of I5(B))if(!O5.call(Z,J))r1(Z,J,{get:H5.bind(B,J),enumerable:!0});if(Y)Q.set(B,Z);return Z};var A5=(B,U)=>()=>(U||B((U={exports:{}}).exports,U),U.exports);var j5=(B)=>B;function N5(B,U){this[B]=j5.bind(null,U)}var z5=(B,U)=>{for(var G in U)r1(B,G,{get:U[G],enumerable:!0,configurable:!0,set:N5.bind(U,G)})};var h6=A5((L7,_6)=>{var w0=_6.exports={},p0,r0;function Z8(){throw Error("setTimeout has not been defined")}function Q8(){throw Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function")p0=setTimeout;else p0=Z8}catch(B){p0=Z8}try{if(typeof clearTimeout==="function")r0=clearTimeout;else r0=Q8}catch(B){r0=Q8}})();function g6(B){if(p0===setTimeout)return setTimeout(B,0);if((p0===Z8||!p0)&&setTimeout)return p0=setTimeout,setTimeout(B,0);try{return p0(B,0)}catch(U){try{return p0.call(null,B,0)}catch(G){return p0.call(this,B,0)}}}function UU(B){if(r0===clearTimeout)return clearTimeout(B);if((r0===Q8||!r0)&&clearTimeout)return r0=clearTimeout,clearTimeout(B);try{return r0(B)}catch(U){try{return r0.call(null,B)}catch(G){return r0.call(this,B)}}}var Q2=[],b2=!1,w2,z1=-1;function GU(){if(!b2||!w2)return;if(b2=!1,w2.length)Q2=w2.concat(Q2);else z1=-1;if(Q2.length)f6()}function f6(){if(b2)return;var B=g6(GU);b2=!0;var U=Q2.length;while(U){w2=Q2,Q2=[];while(++z11)for(var G=1;G"u")A1.global=globalThis;if(typeof A1.__require>"u")A1.__require=(B)=>{throw Error(`Dynamic require of "${B}" is not supported in the sandbox`)};var l0=[],h0=[],i1="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(N2=0,H6=i1.length;N20)throw Error("Invalid string. Length must be a multiple of 4");var G=B.indexOf("=");if(G===-1)G=U;var Y=G===U?0:4-G%4;return[G,Y]}function E5(B,U){return(B+U)*3/4-U}function D5(B){var U,G=w5(B),Y=G[0],Q=G[1],K=new Uint8Array(E5(Y,Q)),Z=0,J=Q>0?Y-4:Y,q;for(q=0;q>16&255,K[Z++]=U>>8&255,K[Z++]=U&255;if(Q===2)U=h0[B.charCodeAt(q)]<<2|h0[B.charCodeAt(q+1)]>>4,K[Z++]=U&255;if(Q===1)U=h0[B.charCodeAt(q)]<<10|h0[B.charCodeAt(q+1)]<<4|h0[B.charCodeAt(q+2)]>>2,K[Z++]=U>>8&255,K[Z++]=U&255;return K}function T5(B){return l0[B>>18&63]+l0[B>>12&63]+l0[B>>6&63]+l0[B&63]}function C5(B,U,G){var Y,Q=[];for(var K=U;KJ?J:Z+K));if(Y===1)U=B[G-1],Q.push(l0[U>>2]+l0[U<<4&63]+"==");else if(Y===2)U=(B[G-2]<<8)+B[G-1],Q.push(l0[U>>10]+l0[U>>4&63]+l0[U<<2&63]+"=");return Q.join("")}function j1(B,U,G,Y,Q){var K,Z,J=Q*8-Y-1,q=(1<>1,I=-7,H=G?Q-1:0,T=G?-1:1,A=B[U+H];H+=T,K=A&(1<<-I)-1,A>>=-I,I+=J;for(;I>0;K=K*256+B[U+H],H+=T,I-=8);Z=K&(1<<-I)-1,K>>=-I,I+=Y;for(;I>0;Z=Z*256+B[U+H],H+=T,I-=8);if(K===0)K=1-W;else if(K===q)return Z?NaN:(A?-1:1)*(1/0);else Z=Z+Math.pow(2,Y),K=K-W;return(A?-1:1)*Z*Math.pow(2,K-Y)}function N6(B,U,G,Y,Q,K){var Z,J,q,W=K*8-Q-1,I=(1<>1,T=Q===23?Math.pow(2,-24)-Math.pow(2,-77):0,A=Y?0:K-1,P=Y?1:-1,j=U<0||U===0&&1/U<0?1:0;if(U=Math.abs(U),isNaN(U)||U===1/0)J=isNaN(U)?1:0,Z=I;else{if(Z=Math.floor(Math.log(U)/Math.LN2),U*(q=Math.pow(2,-Z))<1)Z--,q*=2;if(Z+H>=1)U+=T/q;else U+=T*Math.pow(2,1-H);if(U*q>=2)Z++,q/=2;if(Z+H>=I)J=0,Z=I;else if(Z+H>=1)J=(U*q-1)*Math.pow(2,Q),Z=Z+H;else J=U*Math.pow(2,H-1)*Math.pow(2,Q),Z=0}for(;Q>=8;B[G+A]=J&255,A+=P,J/=256,Q-=8);Z=Z<0;B[G+A]=Z&255,A+=P,Z/=256,W-=8);B[G+A-P]|=j*128}var W6=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,k5=50,n1=2147483647;var{btoa:Z7,atob:Q7,File:J7,Blob:K7}=globalThis;function Z2(B){if(B>n1)throw RangeError('The value "'+B+'" is invalid for option "size"');let U=new Uint8Array(B);return Object.setPrototypeOf(U,J0.prototype),U}function B8(B,U,G){return class extends G{constructor(){super();Object.defineProperty(this,"message",{value:U.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${B}]`,this.stack,delete this.name}get code(){return B}set code(Y){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Y,writable:!0})}toString(){return`${this.name} [${B}]: ${this.message}`}}}var $5=B8("ERR_BUFFER_OUT_OF_BOUNDS",function(B){if(B)return`${B} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),S5=B8("ERR_INVALID_ARG_TYPE",function(B,U){return`The "${B}" argument must be of type number. Received type ${typeof U}`},TypeError),s1=B8("ERR_OUT_OF_RANGE",function(B,U,G){let Y=`The value of "${B}" is out of range.`,Q=G;if(Number.isInteger(G)&&Math.abs(G)>4294967296)Q=j6(String(G));else if(typeof G==="bigint"){if(Q=String(G),G>BigInt(2)**BigInt(32)||G<-(BigInt(2)**BigInt(32)))Q=j6(Q);Q+="n"}return Y+=` It must be ${U}. Received ${Q}`,Y},RangeError);function J0(B,U,G){if(typeof B==="number"){if(typeof U==="string")throw TypeError('The "string" argument must be of type string. Received type number');return U8(B)}return z6(B,U,G)}Object.defineProperty(J0.prototype,"parent",{enumerable:!0,get:function(){if(!J0.isBuffer(this))return;return this.buffer}});Object.defineProperty(J0.prototype,"offset",{enumerable:!0,get:function(){if(!J0.isBuffer(this))return;return this.byteOffset}});J0.poolSize=8192;function z6(B,U,G){if(typeof B==="string")return v5(B,U);if(ArrayBuffer.isView(B))return y5(B);if(B==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof B);if(a0(B,ArrayBuffer)||B&&a0(B.buffer,ArrayBuffer))return t1(B,U,G);if(typeof SharedArrayBuffer<"u"&&(a0(B,SharedArrayBuffer)||B&&a0(B.buffer,SharedArrayBuffer)))return t1(B,U,G);if(typeof B==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let Y=B.valueOf&&B.valueOf();if(Y!=null&&Y!==B)return J0.from(Y,U,G);let Q=g5(B);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof B[Symbol.toPrimitive]==="function")return J0.from(B[Symbol.toPrimitive]("string"),U,G);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof B)}J0.from=function(B,U,G){return z6(B,U,G)};Object.setPrototypeOf(J0.prototype,Uint8Array.prototype);Object.setPrototypeOf(J0,Uint8Array);function w6(B){if(typeof B!=="number")throw TypeError('"size" argument must be of type number');else if(B<0)throw RangeError('The value "'+B+'" is invalid for option "size"')}function b5(B,U,G){if(w6(B),B<=0)return Z2(B);if(U!==void 0)return typeof G==="string"?Z2(B).fill(U,G):Z2(B).fill(U);return Z2(B)}J0.alloc=function(B,U,G){return b5(B,U,G)};function U8(B){return w6(B),Z2(B<0?0:G8(B)|0)}J0.allocUnsafe=function(B){return U8(B)};J0.allocUnsafeSlow=function(B){return U8(B)};function v5(B,U){if(typeof U!=="string"||U==="")U="utf8";if(!J0.isEncoding(U))throw TypeError("Unknown encoding: "+U);let G=E6(B,U)|0,Y=Z2(G),Q=Y.write(B,U);if(Q!==G)Y=Y.slice(0,Q);return Y}function o1(B){let U=B.length<0?0:G8(B.length)|0,G=Z2(U);for(let Y=0;Y=n1)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n1.toString(16)+" bytes");return B|0}J0.isBuffer=function(B){return B!=null&&B._isBuffer===!0&&B!==J0.prototype};J0.compare=function(B,U){if(a0(B,Uint8Array))B=J0.from(B,B.offset,B.byteLength);if(a0(U,Uint8Array))U=J0.from(U,U.offset,U.byteLength);if(!J0.isBuffer(B)||!J0.isBuffer(U))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(B===U)return 0;let G=B.length,Y=U.length;for(let Q=0,K=Math.min(G,Y);QY.length){if(!J0.isBuffer(K))K=J0.from(K);K.copy(Y,Q)}else Uint8Array.prototype.set.call(Y,K,Q);else if(!J0.isBuffer(K))throw TypeError('"list" argument must be an Array of Buffers');else K.copy(Y,Q);Q+=K.length}return Y};function E6(B,U){if(J0.isBuffer(B))return B.length;if(ArrayBuffer.isView(B)||a0(B,ArrayBuffer))return B.byteLength;if(typeof B!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof B);let G=B.length,Y=arguments.length>2&&arguments[2]===!0;if(!Y&&G===0)return 0;let Q=!1;for(;;)switch(U){case"ascii":case"latin1":case"binary":return G;case"utf8":case"utf-8":return e1(B).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G*2;case"hex":return G>>>1;case"base64":return y6(B).length;default:if(Q)return Y?-1:e1(B).length;U=(""+U).toLowerCase(),Q=!0}}J0.byteLength=E6;function f5(B,U,G){let Y=!1;if(U===void 0||U<0)U=0;if(U>this.length)return"";if(G===void 0||G>this.length)G=this.length;if(G<=0)return"";if(G>>>=0,U>>>=0,G<=U)return"";if(!B)B="utf8";while(!0)switch(B){case"hex":return p5(this,U,G);case"utf8":case"utf-8":return T6(this,U,G);case"ascii":return l5(this,U,G);case"latin1":case"binary":return a5(this,U,G);case"base64":return c5(this,U,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r5(this,U,G);default:if(Y)throw TypeError("Unknown encoding: "+B);B=(B+"").toLowerCase(),Y=!0}}J0.prototype._isBuffer=!0;function z2(B,U,G){let Y=B[U];B[U]=B[G],B[G]=Y}J0.prototype.swap16=function(){let B=this.length;if(B%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let U=0;UU)B+=" ... ";return""};if(W6)J0.prototype[W6]=J0.prototype.inspect;J0.prototype.compare=function(B,U,G,Y,Q){if(a0(B,Uint8Array))B=J0.from(B,B.offset,B.byteLength);if(!J0.isBuffer(B))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof B);if(U===void 0)U=0;if(G===void 0)G=B?B.length:0;if(Y===void 0)Y=0;if(Q===void 0)Q=this.length;if(U<0||G>B.length||Y<0||Q>this.length)throw RangeError("out of range index");if(Y>=Q&&U>=G)return 0;if(Y>=Q)return-1;if(U>=G)return 1;if(U>>>=0,G>>>=0,Y>>>=0,Q>>>=0,this===B)return 0;let K=Q-Y,Z=G-U,J=Math.min(K,Z),q=this.slice(Y,Q),W=B.slice(U,G);for(let I=0;I2147483647)G=2147483647;else if(G<-2147483648)G=-2147483648;if(G=+G,Number.isNaN(G))G=Q?0:B.length-1;if(G<0)G=B.length+G;if(G>=B.length)if(Q)return-1;else G=B.length-1;else if(G<0)if(Q)G=0;else return-1;if(typeof U==="string")U=J0.from(U,Y);if(J0.isBuffer(U)){if(U.length===0)return-1;return P6(B,U,G,Y,Q)}else if(typeof U==="number"){if(U=U&255,typeof Uint8Array.prototype.indexOf==="function")if(Q)return Uint8Array.prototype.indexOf.call(B,U,G);else return Uint8Array.prototype.lastIndexOf.call(B,U,G);return P6(B,[U],G,Y,Q)}throw TypeError("val must be string, number or Buffer")}function P6(B,U,G,Y,Q){let K=1,Z=B.length,J=U.length;if(Y!==void 0){if(Y=String(Y).toLowerCase(),Y==="ucs2"||Y==="ucs-2"||Y==="utf16le"||Y==="utf-16le"){if(B.length<2||U.length<2)return-1;K=2,Z/=2,J/=2,G/=2}}function q(I,H){if(K===1)return I[H];else return I.readUInt16BE(H*K)}let W;if(Q){let I=-1;for(W=G;WZ)G=Z-J;for(W=G;W>=0;W--){let I=!0;for(let H=0;HQ)Y=Q;let K=U.length;if(Y>K/2)Y=K/2;let Z;for(Z=0;Z>>0,isFinite(G)){if(G=G>>>0,Y===void 0)Y="utf8"}else Y=G,G=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Q=this.length-U;if(G===void 0||G>Q)G=Q;if(B.length>0&&(G<0||U<0)||U>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!Y)Y="utf8";let K=!1;for(;;)switch(Y){case"hex":return x5(this,B,U,G);case"utf8":case"utf-8":return _5(this,B,U,G);case"ascii":case"latin1":case"binary":return h5(this,B,U,G);case"base64":return u5(this,B,U,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d5(this,B,U,G);default:if(K)throw TypeError("Unknown encoding: "+Y);Y=(""+Y).toLowerCase(),K=!0}};J0.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function c5(B,U,G){if(U===0&&G===B.length)return F6(B);else return F6(B.slice(U,G))}function T6(B,U,G){G=Math.min(B.length,G);let Y=[],Q=U;while(Q239?4:K>223?3:K>191?2:1;if(Q+J<=G){let q,W,I,H;switch(J){case 1:if(K<128)Z=K;break;case 2:if(q=B[Q+1],(q&192)===128){if(H=(K&31)<<6|q&63,H>127)Z=H}break;case 3:if(q=B[Q+1],W=B[Q+2],(q&192)===128&&(W&192)===128){if(H=(K&15)<<12|(q&63)<<6|W&63,H>2047&&(H<55296||H>57343))Z=H}break;case 4:if(q=B[Q+1],W=B[Q+2],I=B[Q+3],(q&192)===128&&(W&192)===128&&(I&192)===128){if(H=(K&15)<<18|(q&63)<<12|(W&63)<<6|I&63,H>65535&&H<1114112)Z=H}}}if(Z===null)Z=65533,J=1;else if(Z>65535)Z-=65536,Y.push(Z>>>10&1023|55296),Z=56320|Z&1023;Y.push(Z),Q+=J}return m5(Y)}var A6=4096;function m5(B){let U=B.length;if(U<=A6)return String.fromCharCode.apply(String,B);let G="",Y=0;while(YY)G=Y;let Q="";for(let K=U;KG)B=G;if(U<0){if(U+=G,U<0)U=0}else if(U>G)U=G;if(UG)throw RangeError("Trying to access beyond buffer length")}J0.prototype.readUintLE=J0.prototype.readUIntLE=function(B,U,G){if(B=B>>>0,U=U>>>0,!G)$0(B,U,this.length);let Y=this[B],Q=1,K=0;while(++K>>0,U=U>>>0,!G)$0(B,U,this.length);let Y=this[B+--U],Q=1;while(U>0&&(Q*=256))Y+=this[B+--U]*Q;return Y};J0.prototype.readUint8=J0.prototype.readUInt8=function(B,U){if(B=B>>>0,!U)$0(B,1,this.length);return this[B]};J0.prototype.readUint16LE=J0.prototype.readUInt16LE=function(B,U){if(B=B>>>0,!U)$0(B,2,this.length);return this[B]|this[B+1]<<8};J0.prototype.readUint16BE=J0.prototype.readUInt16BE=function(B,U){if(B=B>>>0,!U)$0(B,2,this.length);return this[B]<<8|this[B+1]};J0.prototype.readUint32LE=J0.prototype.readUInt32LE=function(B,U){if(B=B>>>0,!U)$0(B,4,this.length);return(this[B]|this[B+1]<<8|this[B+2]<<16)+this[B+3]*16777216};J0.prototype.readUint32BE=J0.prototype.readUInt32BE=function(B,U){if(B=B>>>0,!U)$0(B,4,this.length);return this[B]*16777216+(this[B+1]<<16|this[B+2]<<8|this[B+3])};J0.prototype.readBigUInt64LE=I2(function(B){B=B>>>0,S2(B,"offset");let U=this[B],G=this[B+7];if(U===void 0||G===void 0)n2(B,this.length-8);let Y=U+this[++B]*256+this[++B]*65536+this[++B]*16777216,Q=this[++B]+this[++B]*256+this[++B]*65536+G*16777216;return BigInt(Y)+(BigInt(Q)<>>0,S2(B,"offset");let U=this[B],G=this[B+7];if(U===void 0||G===void 0)n2(B,this.length-8);let Y=U*16777216+this[++B]*65536+this[++B]*256+this[++B],Q=this[++B]*16777216+this[++B]*65536+this[++B]*256+G;return(BigInt(Y)<>>0,U=U>>>0,!G)$0(B,U,this.length);let Y=this[B],Q=1,K=0;while(++K=Q)Y-=Math.pow(2,8*U);return Y};J0.prototype.readIntBE=function(B,U,G){if(B=B>>>0,U=U>>>0,!G)$0(B,U,this.length);let Y=U,Q=1,K=this[B+--Y];while(Y>0&&(Q*=256))K+=this[B+--Y]*Q;if(Q*=128,K>=Q)K-=Math.pow(2,8*U);return K};J0.prototype.readInt8=function(B,U){if(B=B>>>0,!U)$0(B,1,this.length);if(!(this[B]&128))return this[B];return(255-this[B]+1)*-1};J0.prototype.readInt16LE=function(B,U){if(B=B>>>0,!U)$0(B,2,this.length);let G=this[B]|this[B+1]<<8;return G&32768?G|4294901760:G};J0.prototype.readInt16BE=function(B,U){if(B=B>>>0,!U)$0(B,2,this.length);let G=this[B+1]|this[B]<<8;return G&32768?G|4294901760:G};J0.prototype.readInt32LE=function(B,U){if(B=B>>>0,!U)$0(B,4,this.length);return this[B]|this[B+1]<<8|this[B+2]<<16|this[B+3]<<24};J0.prototype.readInt32BE=function(B,U){if(B=B>>>0,!U)$0(B,4,this.length);return this[B]<<24|this[B+1]<<16|this[B+2]<<8|this[B+3]};J0.prototype.readBigInt64LE=I2(function(B){B=B>>>0,S2(B,"offset");let U=this[B],G=this[B+7];if(U===void 0||G===void 0)n2(B,this.length-8);let Y=this[B+4]+this[B+5]*256+this[B+6]*65536+(G<<24);return(BigInt(Y)<>>0,S2(B,"offset");let U=this[B],G=this[B+7];if(U===void 0||G===void 0)n2(B,this.length-8);let Y=(U<<24)+this[++B]*65536+this[++B]*256+this[++B];return(BigInt(Y)<>>0,!U)$0(B,4,this.length);return j1(this,B,!0,23,4)};J0.prototype.readFloatBE=function(B,U){if(B=B>>>0,!U)$0(B,4,this.length);return j1(this,B,!1,23,4)};J0.prototype.readDoubleLE=function(B,U){if(B=B>>>0,!U)$0(B,8,this.length);return j1(this,B,!0,52,8)};J0.prototype.readDoubleBE=function(B,U){if(B=B>>>0,!U)$0(B,8,this.length);return j1(this,B,!1,52,8)};function g0(B,U,G,Y,Q,K){if(!J0.isBuffer(B))throw TypeError('"buffer" argument must be a Buffer instance');if(U>Q||UB.length)throw RangeError("Index out of range")}J0.prototype.writeUintLE=J0.prototype.writeUIntLE=function(B,U,G,Y){if(B=+B,U=U>>>0,G=G>>>0,!Y){let Z=Math.pow(2,8*G)-1;g0(this,B,U,G,Z,0)}let Q=1,K=0;this[U]=B&255;while(++K>>0,G=G>>>0,!Y){let Z=Math.pow(2,8*G)-1;g0(this,B,U,G,Z,0)}let Q=G-1,K=1;this[U+Q]=B&255;while(--Q>=0&&(K*=256))this[U+Q]=B/K&255;return U+G};J0.prototype.writeUint8=J0.prototype.writeUInt8=function(B,U,G){if(B=+B,U=U>>>0,!G)g0(this,B,U,1,255,0);return this[U]=B&255,U+1};J0.prototype.writeUint16LE=J0.prototype.writeUInt16LE=function(B,U,G){if(B=+B,U=U>>>0,!G)g0(this,B,U,2,65535,0);return this[U]=B&255,this[U+1]=B>>>8,U+2};J0.prototype.writeUint16BE=J0.prototype.writeUInt16BE=function(B,U,G){if(B=+B,U=U>>>0,!G)g0(this,B,U,2,65535,0);return this[U]=B>>>8,this[U+1]=B&255,U+2};J0.prototype.writeUint32LE=J0.prototype.writeUInt32LE=function(B,U,G){if(B=+B,U=U>>>0,!G)g0(this,B,U,4,4294967295,0);return this[U+3]=B>>>24,this[U+2]=B>>>16,this[U+1]=B>>>8,this[U]=B&255,U+4};J0.prototype.writeUint32BE=J0.prototype.writeUInt32BE=function(B,U,G){if(B=+B,U=U>>>0,!G)g0(this,B,U,4,4294967295,0);return this[U]=B>>>24,this[U+1]=B>>>16,this[U+2]=B>>>8,this[U+3]=B&255,U+4};function C6(B,U,G,Y,Q){v6(U,Y,Q,B,G,7);let K=Number(U&BigInt(4294967295));B[G++]=K,K=K>>8,B[G++]=K,K=K>>8,B[G++]=K,K=K>>8,B[G++]=K;let Z=Number(U>>BigInt(32)&BigInt(4294967295));return B[G++]=Z,Z=Z>>8,B[G++]=Z,Z=Z>>8,B[G++]=Z,Z=Z>>8,B[G++]=Z,G}function k6(B,U,G,Y,Q){v6(U,Y,Q,B,G,7);let K=Number(U&BigInt(4294967295));B[G+7]=K,K=K>>8,B[G+6]=K,K=K>>8,B[G+5]=K,K=K>>8,B[G+4]=K;let Z=Number(U>>BigInt(32)&BigInt(4294967295));return B[G+3]=Z,Z=Z>>8,B[G+2]=Z,Z=Z>>8,B[G+1]=Z,Z=Z>>8,B[G]=Z,G+8}J0.prototype.writeBigUInt64LE=I2(function(B,U=0){return C6(this,B,U,BigInt(0),BigInt("0xffffffffffffffff"))});J0.prototype.writeBigUInt64BE=I2(function(B,U=0){return k6(this,B,U,BigInt(0),BigInt("0xffffffffffffffff"))});J0.prototype.writeIntLE=function(B,U,G,Y){if(B=+B,U=U>>>0,!Y){let J=Math.pow(2,8*G-1);g0(this,B,U,G,J-1,-J)}let Q=0,K=1,Z=0;this[U]=B&255;while(++Q>0)-Z&255}return U+G};J0.prototype.writeIntBE=function(B,U,G,Y){if(B=+B,U=U>>>0,!Y){let J=Math.pow(2,8*G-1);g0(this,B,U,G,J-1,-J)}let Q=G-1,K=1,Z=0;this[U+Q]=B&255;while(--Q>=0&&(K*=256)){if(B<0&&Z===0&&this[U+Q+1]!==0)Z=1;this[U+Q]=(B/K>>0)-Z&255}return U+G};J0.prototype.writeInt8=function(B,U,G){if(B=+B,U=U>>>0,!G)g0(this,B,U,1,127,-128);if(B<0)B=255+B+1;return this[U]=B&255,U+1};J0.prototype.writeInt16LE=function(B,U,G){if(B=+B,U=U>>>0,!G)g0(this,B,U,2,32767,-32768);return this[U]=B&255,this[U+1]=B>>>8,U+2};J0.prototype.writeInt16BE=function(B,U,G){if(B=+B,U=U>>>0,!G)g0(this,B,U,2,32767,-32768);return this[U]=B>>>8,this[U+1]=B&255,U+2};J0.prototype.writeInt32LE=function(B,U,G){if(B=+B,U=U>>>0,!G)g0(this,B,U,4,2147483647,-2147483648);return this[U]=B&255,this[U+1]=B>>>8,this[U+2]=B>>>16,this[U+3]=B>>>24,U+4};J0.prototype.writeInt32BE=function(B,U,G){if(B=+B,U=U>>>0,!G)g0(this,B,U,4,2147483647,-2147483648);if(B<0)B=4294967295+B+1;return this[U]=B>>>24,this[U+1]=B>>>16,this[U+2]=B>>>8,this[U+3]=B&255,U+4};J0.prototype.writeBigInt64LE=I2(function(B,U=0){return C6(this,B,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});J0.prototype.writeBigInt64BE=I2(function(B,U=0){return k6(this,B,U,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function $6(B,U,G,Y,Q,K){if(G+Y>B.length)throw RangeError("Index out of range");if(G<0)throw RangeError("Index out of range")}function S6(B,U,G,Y,Q){if(U=+U,G=G>>>0,!Q)$6(B,U,G,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return N6(B,U,G,Y,23,4),G+4}J0.prototype.writeFloatLE=function(B,U,G){return S6(this,B,U,!0,G)};J0.prototype.writeFloatBE=function(B,U,G){return S6(this,B,U,!1,G)};function b6(B,U,G,Y,Q){if(U=+U,G=G>>>0,!Q)$6(B,U,G,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return N6(B,U,G,Y,52,8),G+8}J0.prototype.writeDoubleLE=function(B,U,G){return b6(this,B,U,!0,G)};J0.prototype.writeDoubleBE=function(B,U,G){return b6(this,B,U,!1,G)};J0.prototype.copy=function(B,U,G,Y){if(!J0.isBuffer(B))throw TypeError("argument should be a Buffer");if(!G)G=0;if(!Y&&Y!==0)Y=this.length;if(U>=B.length)U=B.length;if(!U)U=0;if(Y>0&&Y=this.length)throw RangeError("Index out of range");if(Y<0)throw RangeError("sourceEnd out of bounds");if(Y>this.length)Y=this.length;if(B.length-U>>0,G=G===void 0?this.length:G>>>0,!B)B=0;let Q;if(typeof B==="number")for(Q=U;Q=Y+4;G-=3)U=`_${B.slice(G-3,G)}${U}`;return`${B.slice(0,G)}${U}`}function i5(B,U,G){if(S2(U,"offset"),B[U]===void 0||B[U+G]===void 0)n2(U,B.length-(G+1))}function v6(B,U,G,Y,Q,K){if(B>G||B3)if(U===0||U===BigInt(0))J=`>= 0${Z} and < 2${Z} ** ${(K+1)*8}${Z}`;else J=`>= -(2${Z} ** ${(K+1)*8-1}${Z}) and < 2 ** ${(K+1)*8-1}${Z}`;else J=`>= ${U}${Z} and <= ${G}${Z}`;throw new s1("value",J,B)}i5(Y,Q,K)}function S2(B,U){if(typeof B!=="number")throw new S5(U,"number",B)}function n2(B,U,G){if(Math.floor(B)!==B)throw S2(B,G),new s1(G||"offset","an integer",B);if(U<0)throw new $5;throw new s1(G||"offset",`>= ${G?1:0} and <= ${U}`,B)}var n5=/[^+/0-9A-Za-z-_]/g;function s5(B){if(B=B.split("=")[0],B=B.trim().replace(n5,""),B.length<2)return"";while(B.length%4!==0)B=B+"=";return B}function e1(B,U){U=U||1/0;let G,Y=B.length,Q=null,K=[];for(let Z=0;Z55295&&G<57344){if(!Q){if(G>56319){if((U-=3)>-1)K.push(239,191,189);continue}else if(Z+1===Y){if((U-=3)>-1)K.push(239,191,189);continue}Q=G;continue}if(G<56320){if((U-=3)>-1)K.push(239,191,189);Q=G;continue}G=(Q-55296<<10|G-56320)+65536}else if(Q){if((U-=3)>-1)K.push(239,191,189)}if(Q=null,G<128){if((U-=1)<0)break;K.push(G)}else if(G<2048){if((U-=2)<0)break;K.push(G>>6|192,G&63|128)}else if(G<65536){if((U-=3)<0)break;K.push(G>>12|224,G>>6&63|128,G&63|128)}else if(G<1114112){if((U-=4)<0)break;K.push(G>>18|240,G>>12&63|128,G>>6&63|128,G&63|128)}else throw Error("Invalid code point")}return K}function o5(B){let U=[];for(let G=0;G>8,Q=G%256,K.push(Q),K.push(Y)}return K}function y6(B){return D5(s5(B))}function N1(B,U,G,Y){let Q;for(Q=0;Q=U.length||Q>=B.length)break;U[Q+G]=B[Q]}return Q}function a0(B,U){return B instanceof U||B!=null&&B.constructor!=null&&B.constructor.name!=null&&B.constructor.name===U.name}var e5=function(){let B=Array(256);for(let U=0;U<16;++U){let G=U*16;for(let Y=0;Y<16;++Y)B[G+Y]="0123456789abcdef"[U]+"0123456789abcdef"[Y]}return B}();function I2(B){return typeof BigInt>"u"?BU:B}function BU(){throw Error("BigInt not supported")}function Y8(B){return()=>{throw Error(B+" is not implemented for node:buffer browser polyfill")}}var V7=Y8("resolveObjectURL"),X7=Y8("isUtf8");var q7=Y8("transcode");var G7=P5(h6(),1);var L6={};z5(L6,{unsignedDecimalNumber:()=>X1,universalMeasureValue:()=>q1,uniqueUuid:()=>eB,uniqueNumericIdCreator:()=>I1,uniqueId:()=>O1,uCharHexNumber:()=>W8,twipsMeasureValue:()=>E0,standardizeData:()=>j4,signedTwipsMeasureValue:()=>t0,signedHpsMeasureValue:()=>VG,shortHexNumber:()=>SB,sectionPageSizeDefaults:()=>$1,sectionMarginDefaults:()=>H2,positiveUniversalMeasureValue:()=>d8,pointMeasureValue:()=>gB,percentageValue:()=>vB,patchDocument:()=>tK,patchDetector:()=>B7,measurementOrPercentValue:()=>c8,longHexNumber:()=>KG,hpsMeasureValue:()=>bB,hexColorValue:()=>C2,hashedId:()=>P8,encodeUtf8:()=>U1,eighthPointMeasureValue:()=>yB,docPropertiesUniqueNumericIdGen:()=>oB,decimalNumber:()=>T0,dateTimeValue:()=>fB,createWrapTopAndBottom:()=>H4,createWrapTight:()=>O4,createWrapSquare:()=>I4,createWrapNone:()=>j8,createVerticalPosition:()=>J4,createVerticalAlign:()=>U6,createUnderline:()=>cB,createTransformation:()=>n8,createTableWidthElement:()=>J1,createTableRowHeight:()=>W9,createTableLook:()=>F9,createTableLayout:()=>O9,createTableFloatProperties:()=>I9,createTabStopItem:()=>b4,createTabStop:()=>v4,createStringElement:()=>f2,createSpacing:()=>S4,createSimplePos:()=>G4,createShading:()=>M1,createSectionType:()=>C9,createRunFonts:()=>T1,createParagraphStyle:()=>x2,createPageSize:()=>D9,createPageNumberType:()=>E9,createPageMargin:()=>w9,createOutlineLevel:()=>_4,createMathSuperScriptProperties:()=>p4,createMathSuperScriptElement:()=>a2,createMathSubSuperScriptProperties:()=>i4,createMathSubScriptProperties:()=>r4,createMathSubScriptElement:()=>l2,createMathPreSubSuperScriptProperties:()=>n4,createMathNAryProperties:()=>e8,createMathLimitLocation:()=>a4,createMathBase:()=>y0,createMathAccentCharacter:()=>l4,createLineNumberType:()=>N9,createIndent:()=>hB,createHorizontalPosition:()=>Q4,createHeaderFooterReference:()=>k1,createFrameProperties:()=>u4,createEmphasisMark:()=>r8,createDotEmphasisMark:()=>AG,createDocumentGrid:()=>j9,createColumns:()=>A9,createBorderElement:()=>j0,createBodyProperties:()=>K4,createAlignment:()=>m8,convertToXmlComponent:()=>u1,convertMillimetersToTwip:()=>dG,convertInchesToTwip:()=>u0,concreteNumUniqueNumericIdGen:()=>sB,commentIdToParaId:()=>z4,bookmarkUniqueNumericIdGen:()=>tB,abstractNumUniqueNumericIdGen:()=>nB,YearShort:()=>oY,YearLong:()=>BZ,XmlComponent:()=>t,XmlAttributeComponent:()=>H0,WpsShapeRun:()=>SY,WpgGroupRun:()=>bY,WidthType:()=>v1,WORKAROUND4:()=>oZ,WORKAROUND3:()=>JG,WORKAROUND2:()=>NJ,VerticalPositionRelativeFrom:()=>U4,VerticalPositionAlign:()=>MG,VerticalMergeType:()=>G6,VerticalMergeRevisionType:()=>FQ,VerticalMerge:()=>w8,VerticalAnchor:()=>cG,VerticalAlignTable:()=>K9,VerticalAlignSection:()=>V9,VerticalAlign:()=>WQ,UnderlineType:()=>i8,ThematicBreak:()=>_B,Textbox:()=>TK,TextWrappingType:()=>e2,TextWrappingSide:()=>L4,TextRun:()=>Q1,TextEffect:()=>CG,TextDirection:()=>zQ,TableRowPropertiesChange:()=>P9,TableRowProperties:()=>J6,TableRow:()=>fQ,TableProperties:()=>Q6,TableOfContents:()=>RK,TableLayoutType:()=>SQ,TableCellBorders:()=>q9,TableCell:()=>Y6,TableBorders:()=>Z6,TableAnchorType:()=>DQ,Table:()=>yQ,TabStopType:()=>z8,TabStopPosition:()=>FZ,Tab:()=>T4,TDirection:()=>R9,SymbolRun:()=>aB,Styles:()=>S1,StyleLevel:()=>LK,StyleForParagraph:()=>p2,StyleForCharacter:()=>$2,StringValueElement:()=>q2,StringEnumValueElement:()=>XG,StringContainer:()=>O2,SpaceType:()=>x0,SoftHyphen:()=>iY,SimpleMailMergeField:()=>fY,SimpleField:()=>s8,ShadingType:()=>FG,SequentialIdentifier:()=>yY,Separator:()=>YZ,SectionType:()=>GJ,SectionPropertiesChange:()=>k9,SectionProperties:()=>K6,RunPropertiesDefaults:()=>a9,RunPropertiesChange:()=>lB,RunProperties:()=>U2,Run:()=>D0,RelativeVerticalPosition:()=>CQ,RelativeHorizontalPosition:()=>TQ,PrettifyType:()=>G5,PositionalTabRelativeTo:()=>XZ,PositionalTabLeader:()=>qZ,PositionalTabAlignment:()=>VZ,PositionalTab:()=>RZ,PatchType:()=>C8,ParagraphRunProperties:()=>mB,ParagraphPropertiesDefaults:()=>l9,ParagraphPropertiesChange:()=>d4,ParagraphProperties:()=>M2,Paragraph:()=>d0,PageTextDirectionType:()=>BJ,PageTextDirection:()=>T9,PageReference:()=>CZ,PageOrientation:()=>g1,PageNumberSeparator:()=>eQ,PageNumberElement:()=>QZ,PageNumber:()=>F2,PageBreakBefore:()=>$4,PageBreak:()=>LZ,PageBorders:()=>z9,PageBorderZOrder:()=>tQ,PageBorderOffsetFrom:()=>oQ,PageBorderDisplay:()=>sQ,Packer:()=>Y5,OverlapType:()=>kQ,OnOffElement:()=>q0,Numbering:()=>d9,NumberedItemReferenceFormat:()=>wZ,NumberedItemReference:()=>DZ,NumberValueElement:()=>_2,NumberProperties:()=>C1,NumberFormat:()=>RG,NoBreakHyphen:()=>rY,NextAttributeComponent:()=>$8,MonthShort:()=>sY,MonthLong:()=>eY,Media:()=>V6,MathSuperScript:()=>rZ,MathSum:()=>mZ,MathSubSuperScript:()=>nZ,MathSubScript:()=>iZ,MathSquareBrackets:()=>QQ,MathRun:()=>hZ,MathRoundBrackets:()=>ZQ,MathRadicalProperties:()=>o4,MathRadical:()=>BQ,MathPreSubSuperScript:()=>sZ,MathNumerator:()=>m4,MathLimitUpper:()=>aZ,MathLimitLower:()=>pZ,MathLimit:()=>B6,MathIntegral:()=>lZ,MathFunctionProperties:()=>e4,MathFunctionName:()=>t4,MathFunction:()=>UQ,MathFraction:()=>uZ,MathDenominator:()=>c4,MathDegree:()=>s4,MathCurlyBrackets:()=>JQ,MathAngledBrackets:()=>KQ,Math:()=>xZ,LineRuleType:()=>k2,LineNumberRestartFormat:()=>nQ,LevelSuffix:()=>TJ,LevelOverride:()=>u9,LevelFormat:()=>i0,LevelForOverride:()=>$J,LevelBase:()=>X6,Level:()=>h9,LeaderType:()=>HZ,LastRenderedPageBreak:()=>KZ,InternalHyperlink:()=>y4,InsertedTextRun:()=>MQ,InsertedTableRow:()=>U9,InsertedTableCell:()=>Y9,InitializableXmlComponent:()=>u8,ImportedXmlComponent:()=>kB,ImportedRootElementAttributes:()=>$B,ImageRun:()=>$Y,IgnoreIfEmptyXmlComponent:()=>R2,HyperlinkType:()=>jZ,HpsMeasureElement:()=>D1,HorizontalPositionRelativeFrom:()=>B4,HorizontalPositionAlign:()=>qG,HighlightColor:()=>kG,HeightRule:()=>gQ,HeadingLevel:()=>OZ,HeaderWrapper:()=>_9,HeaderFooterType:()=>E8,HeaderFooterReferenceType:()=>T2,Header:()=>IK,GridSpan:()=>M9,FrameWrap:()=>fZ,FrameAnchorType:()=>gZ,FootnoteReferenceRun:()=>HK,FootnoteReferenceElement:()=>GZ,FootnoteReference:()=>o9,FooterWrapper:()=>f9,Footer:()=>OK,FootNotes:()=>x9,FootNoteReferenceRunAttributes:()=>s9,FileChild:()=>H1,File:()=>VK,ExternalHyperlink:()=>t8,Endnotes:()=>g9,EndnoteReferenceRunAttributes:()=>t9,EndnoteReferenceRun:()=>FK,EndnoteReference:()=>D4,EndnoteIdReference:()=>e9,EmptyElement:()=>S0,EmphasisMarkType:()=>p8,EMPTY_OBJECT:()=>KB,DropCapType:()=>yZ,Drawing:()=>m1,DocumentGridType:()=>iQ,DocumentDefaults:()=>p9,DocumentBackgroundAttributes:()=>S9,DocumentBackground:()=>b9,DocumentAttributes:()=>F1,DocumentAttributeNamespaces:()=>y1,Document:()=>VK,DeletedTextRun:()=>OQ,DeletedTableRow:()=>G9,DeletedTableCell:()=>Z9,DayShort:()=>nY,DayLong:()=>tY,ContinuationSeparator:()=>ZZ,ConcreteNumbering:()=>T8,ConcreteHyperlink:()=>m2,CommentsExtended:()=>E4,Comments:()=>w4,CommentReference:()=>mY,CommentRangeStart:()=>dY,CommentRangeEnd:()=>cY,Comment:()=>N8,ColumnBreak:()=>IZ,Column:()=>ZJ,CheckBoxUtil:()=>B5,CheckBoxSymbolElement:()=>b1,CheckBox:()=>WK,CharacterSet:()=>kZ,CellMergeAttributes:()=>Q9,CellMerge:()=>J9,CarriageReturn:()=>JZ,BuilderElement:()=>M0,BorderStyle:()=>c1,Border:()=>xB,BookmarkStart:()=>f4,BookmarkEnd:()=>x4,Bookmark:()=>g4,Body:()=>$9,BaseXmlComponent:()=>Y1,Attributes:()=>C0,AnnotationReference:()=>UZ,AlignmentType:()=>c0,AbstractNumbering:()=>D8});var{create:YU,defineProperty:QB,getOwnPropertyDescriptor:ZU,getOwnPropertyNames:QU,getPrototypeOf:JU}=Object,KU=Object.prototype.hasOwnProperty,JB=(B,U)=>()=>(B&&(U=B(B=0)),U),R0=(B,U)=>()=>(U||(B((U={exports:{}}).exports,U),B=null),U.exports),VU=(B,U,G,Y)=>{if(U&&typeof U==="object"||typeof U==="function"){for(var Q=QU(U),K=0,Z=Q.length,J;KU[q]).bind(null,J),enumerable:!(Y=ZU(U,J))||Y.enumerable})}return B},k8=(B,U,G)=>(G=B!=null?YU(JU(B)):{},VU(U||!B||!B.__esModule?QB(G,"default",{value:B,enumerable:!0}):G,B)),w1=((B)=>__require)(function(B){return __require.apply(this,arguments)});function G1(B){return G1=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},G1(B)}function XU(B,U){if(G1(B)!="object"||!B)return B;var G=B[Symbol.toPrimitive];if(G!==void 0){var Y=G.call(B,U||"default");if(G1(Y)!="object")return Y;throw TypeError("@@toPrimitive must return a primitive value.")}return(U==="string"?String:Number)(B)}function qU(B){var U=XU(B,"string");return G1(U)=="symbol"?U:U+""}function e(B,U,G){return(U=qU(U))in B?Object.defineProperty(B,U,{value:G,enumerable:!0,configurable:!0,writable:!0}):B[U]=G,B}var Y1=class{constructor(B){e(this,"rootKey",void 0),this.rootKey=B}},KB=Object.seal({}),t=class extends Y1{constructor(B){super(B);e(this,"root",void 0),this.root=[]}prepForXml(B){var U;B.stack.push(this);let G=this.root.map((Y)=>{if(Y instanceof Y1)return Y.prepForXml(B);return Y}).filter((Y)=>Y!==void 0);return B.stack.pop(),{[this.rootKey]:G.length?G.length===1&&((U=G[0])===null||U===void 0?void 0:U._attr)?G[0]:G:KB}}addChildElement(B){return this.root.push(B),this}},R2=class extends t{constructor(B,U){super(B);e(this,"includeIfEmpty",void 0),this.includeIfEmpty=U}prepForXml(B){let U=super.prepForXml(B);if(this.includeIfEmpty)return U;if(U&&(typeof U[this.rootKey]!=="object"||Object.keys(U[this.rootKey]).length))return U}};function u6(B,U){var G=Object.keys(B);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(B);U&&(Y=Y.filter(function(Q){return Object.getOwnPropertyDescriptor(B,Q).enumerable})),G.push.apply(G,Y)}return G}function L0(B){for(var U=1;U{if(Y!==void 0){let Q=this.xmlKeys&&this.xmlKeys[G]||G;U[Q]=Y}}),{_attr:U}}},$8=class extends Y1{constructor(B){super("_attr");e(this,"root",void 0),this.root=B}prepForXml(B){return{_attr:Object.values(this.root).filter(({value:U})=>U!==void 0).reduce((U,{key:G,value:Y})=>L0(L0({},U),{},{[G]:Y}),{})}}},C0=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"})}},S8=R0((B,U)=>{var G=typeof Reflect==="object"?Reflect:null,Y=G&&typeof G.apply==="function"?G.apply:function($,x,z){return Function.prototype.apply.call($,x,z)},Q;if(G&&typeof G.ownKeys==="function")Q=G.ownKeys;else if(Object.getOwnPropertySymbols)Q=function($){return Object.getOwnPropertyNames($).concat(Object.getOwnPropertySymbols($))};else Q=function($){return Object.getOwnPropertyNames($)};function K(M){if(console&&console.warn)console.warn(M)}var Z=Number.isNaN||function($){return $!==$};function J(){J.init.call(this)}U.exports=J,U.exports.once=v,J.EventEmitter=J,J.prototype._events=void 0,J.prototype._eventsCount=0,J.prototype._maxListeners=void 0;var q=10;function W(M){if(typeof M!=="function")throw TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(J,"defaultMaxListeners",{enumerable:!0,get:function(){return q},set:function(M){if(typeof M!=="number"||M<0||Z(M))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");q=M}}),J.init=function(){if(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)this._events=Object.create(null),this._eventsCount=0;this._maxListeners=this._maxListeners||void 0},J.prototype.setMaxListeners=function($){if(typeof $!=="number"||$<0||Z($))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+$+".");return this._maxListeners=$,this};function I(M){if(M._maxListeners===void 0)return J.defaultMaxListeners;return M._maxListeners}J.prototype.getMaxListeners=function(){return I(this)},J.prototype.emit=function($){var x=[];for(var z=1;z0)b=x[0];if(b instanceof Error)throw b;var c=Error("Unhandled error."+(b?" ("+b.message+")":""));throw c.context=b,c}var D=U0[$];if(D===void 0)return!1;if(typeof D==="function")Y(D,this,x);else{var m=D.length,B0=E(D,m);for(var z=0;z0&&b.length>a&&!b.warned){b.warned=!0;var c=Error("Possible EventEmitter memory leak detected. "+b.length+" "+String($)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=M,c.type=$,c.count=b.length,K(c)}}return M}J.prototype.addListener=function($,x){return H(this,$,x,!1)},J.prototype.on=J.prototype.addListener,J.prototype.prependListener=function($,x){return H(this,$,x,!0)};function T(){if(!this.fired){if(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function A(M,$,x){var z={fired:!1,wrapFn:void 0,target:M,type:$,listener:x},a=T.bind(z);return a.listener=x,z.wrapFn=a,a}J.prototype.once=function($,x){return W(x),this.on($,A(this,$,x)),this},J.prototype.prependOnceListener=function($,x){return W(x),this.prependListener($,A(this,$,x)),this},J.prototype.removeListener=function($,x){var z,a,U0,b,c;if(W(x),a=this._events,a===void 0)return this;if(z=a[$],z===void 0)return this;if(z===x||z.listener===x){if(--this._eventsCount===0)this._events=Object.create(null);else if(delete a[$],a.removeListener)this.emit("removeListener",$,z.listener||x)}else if(typeof z!=="function"){U0=-1;for(b=z.length-1;b>=0;b--)if(z[b]===x||z[b].listener===x){c=z[b].listener,U0=b;break}if(U0<0)return this;if(U0===0)z.shift();else C(z,U0);if(z.length===1)a[$]=z[0];if(a.removeListener!==void 0)this.emit("removeListener",$,c||x)}return this},J.prototype.off=J.prototype.removeListener,J.prototype.removeAllListeners=function($){var x,z=this._events,a;if(z===void 0)return this;if(z.removeListener===void 0){if(arguments.length===0)this._events=Object.create(null),this._eventsCount=0;else if(z[$]!==void 0)if(--this._eventsCount===0)this._events=Object.create(null);else delete z[$];return this}if(arguments.length===0){var U0=Object.keys(z),b;for(a=0;a=0;a--)this.removeListener($,x[a]);return this};function P(M,$,x){var z=M._events;if(z===void 0)return[];var a=z[$];if(a===void 0)return[];if(typeof a==="function")return x?[a.listener||a]:[a];return x?N(a):E(a,a.length)}J.prototype.listeners=function($){return P(this,$,!0)},J.prototype.rawListeners=function($){return P(this,$,!1)},J.listenerCount=function(M,$){if(typeof M.listenerCount==="function")return M.listenerCount($);else return j.call(M,$)},J.prototype.listenerCount=j;function j(M){var $=this._events;if($!==void 0){var x=$[M];if(typeof x==="function")return 1;else if(x!==void 0)return x.length}return 0}J.prototype.eventNames=function(){return this._eventsCount>0?Q(this._events):[]};function E(M,$){var x=Array($);for(var z=0;z<$;++z)x[z]=M[z];return x}function C(M,$){for(;$+1{if(typeof Object.create==="function")U.exports=function(Y,Q){if(Q)Y.super_=Q,Y.prototype=Object.create(Q.prototype,{constructor:{value:Y,enumerable:!1,writable:!0,configurable:!0}})};else U.exports=function(Y,Q){if(Q){Y.super_=Q;var K=function(){};K.prototype=Q.prototype,Y.prototype=new K,Y.prototype.constructor=Y}}}),v0,d2=JB(()=>{v0=globalThis||self});function MU(B){return B&&B.__esModule&&Object.prototype.hasOwnProperty.call(B,"default")?B.default:B}function O8(){throw Error("setTimeout has not been defined")}function H8(){throw Error("clearTimeout has not been defined")}function VB(B){if(n0===setTimeout)return setTimeout(B,0);if((n0===O8||!n0)&&setTimeout)return n0=setTimeout,setTimeout(B,0);try{return n0(B,0)}catch(U){try{return n0.call(null,B,0)}catch(G){return n0.call(this,B,0)}}}function RU(B){if(s0===clearTimeout)return clearTimeout(B);if((s0===H8||!s0)&&clearTimeout)return s0=clearTimeout,clearTimeout(B);try{return s0(B)}catch(U){try{return s0.call(null,B)}catch(G){return s0.call(this,B)}}}function LU(){if(!D2||!E2)return;if(D2=!1,E2.length)o0=E2.concat(o0);else B1=-1;if(o0.length)XB()}function XB(){if(D2)return;var B=VB(LU);D2=!0;var U=o0.length;while(U){E2=o0,o0=[];while(++B1{J8={exports:{}},N0=J8.exports={},function(){try{if(typeof setTimeout==="function")n0=setTimeout;else n0=O8}catch(B){n0=O8}try{if(typeof clearTimeout==="function")s0=clearTimeout;else s0=H8}catch(B){s0=H8}}(),o0=[],D2=!1,B1=-1,N0.nextTick=function(B){var U=Array(arguments.length-1);if(arguments.length>1)for(var G=1;G{U.exports=S8().EventEmitter}),IU=R0((B)=>{B.byteLength=q,B.toByteArray=I,B.fromByteArray=A;var U=[],G=[],Y=typeof Uint8Array<"u"?Uint8Array:Array,Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var K=0,Z=Q.length;K0)throw Error("Invalid string. Length must be a multiple of 4");var E=P.indexOf("=");if(E===-1)E=j;var C=E===j?0:4-E%4;return[E,C]}function q(P){var j=J(P),E=j[0],C=j[1];return(E+C)*3/4-C}function W(P,j,E){return(j+E)*3/4-E}function I(P){var j,E=J(P),C=E[0],N=E[1],v=new Y(W(P,C,N)),S=0,F=N>0?C-4:C,M;for(M=0;M>16&255,v[S++]=j>>8&255,v[S++]=j&255;if(N===2)j=G[P.charCodeAt(M)]<<2|G[P.charCodeAt(M+1)]>>4,v[S++]=j&255;if(N===1)j=G[P.charCodeAt(M)]<<10|G[P.charCodeAt(M+1)]<<4|G[P.charCodeAt(M+2)]>>2,v[S++]=j>>8&255,v[S++]=j&255;return v}function H(P){return U[P>>18&63]+U[P>>12&63]+U[P>>6&63]+U[P&63]}function T(P,j,E){var C,N=[];for(var v=j;vF?F:S+v));if(C===1)j=P[E-1],N.push(U[j>>2]+U[j<<4&63]+"==");else if(C===2)j=(P[E-2]<<8)+P[E-1],N.push(U[j>>10]+U[j>>4&63]+U[j<<2&63]+"=");return N.join("")}}),OU=R0((B)=>{/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */B.read=function(U,G,Y,Q,K){var Z,J,q=K*8-Q-1,W=(1<>1,H=-7,T=Y?K-1:0,A=Y?-1:1,P=U[G+T];T+=A,Z=P&(1<<-H)-1,P>>=-H,H+=q;for(;H>0;Z=Z*256+U[G+T],T+=A,H-=8);J=Z&(1<<-H)-1,Z>>=-H,H+=Q;for(;H>0;J=J*256+U[G+T],T+=A,H-=8);if(Z===0)Z=1-I;else if(Z===W)return J?NaN:(P?-1:1)*(1/0);else J=J+Math.pow(2,Q),Z=Z-I;return(P?-1:1)*J*Math.pow(2,Z-Q)},B.write=function(U,G,Y,Q,K,Z){var J,q,W,I=Z*8-K-1,H=(1<>1,A=K===23?Math.pow(2,-24)-Math.pow(2,-77):0,P=Q?0:Z-1,j=Q?1:-1,E=G<0||G===0&&1/G<0?1:0;if(G=Math.abs(G),isNaN(G)||G===1/0)q=isNaN(G)?1:0,J=H;else{if(J=Math.floor(Math.log(G)/Math.LN2),G*(W=Math.pow(2,-J))<1)J--,W*=2;if(J+T>=1)G+=A/W;else G+=A*Math.pow(2,1-T);if(G*W>=2)J++,W/=2;if(J+T>=H)q=0,J=H;else if(J+T>=1)q=(G*W-1)*Math.pow(2,K),J=J+T;else q=G*Math.pow(2,T-1)*Math.pow(2,K),J=0}for(;K>=8;U[Y+P]=q&255,P+=j,q/=256,K-=8);J=J<0;U[Y+P]=J&255,P+=j,J/=256,I-=8);U[Y+P-j]|=E*128}});/*! -* The buffer module from node.js, for the browser. -* -* @author Feross Aboukhadijeh -* @license MIT -*/var f1=R0((B)=>{var U=IU(),G=OU(),Y=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null;B.Buffer=J,B.SlowBuffer=N,B.INSPECT_MAX_BYTES=50;var Q=2147483647;if(B.kMaxLength=Q,J.TYPED_ARRAY_SUPPORT=K(),!J.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&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 K(){try{var k=new Uint8Array(1),V={foo:function(){return 42}};return Object.setPrototypeOf(V,Uint8Array.prototype),Object.setPrototypeOf(k,V),k.foo()===42}catch(X){return!1}}Object.defineProperty(J.prototype,"parent",{enumerable:!0,get:function(){if(!J.isBuffer(this))return;return this.buffer}}),Object.defineProperty(J.prototype,"offset",{enumerable:!0,get:function(){if(!J.isBuffer(this))return;return this.byteOffset}});function Z(k){if(k>Q)throw RangeError('The value "'+k+'" is invalid for option "size"');var V=new Uint8Array(k);return Object.setPrototypeOf(V,J.prototype),V}function J(k,V,X){if(typeof k==="number"){if(typeof V==="string")throw TypeError('The "string" argument must be of type string. Received type number');return H(k)}return q(k,V,X)}J.poolSize=8192;function q(k,V,X){if(typeof k==="string")return T(k,V);if(ArrayBuffer.isView(k))return P(k);if(k==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(f(k,ArrayBuffer)||k&&f(k.buffer,ArrayBuffer))return j(k,V,X);if(typeof SharedArrayBuffer<"u"&&(f(k,SharedArrayBuffer)||k&&f(k.buffer,SharedArrayBuffer)))return j(k,V,X);if(typeof k==="number")throw TypeError('The "value" argument must not be of type number. Received type number');var O=k.valueOf&&k.valueOf();if(O!=null&&O!==k)return J.from(O,V,X);var _=E(k);if(_)return _;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]==="function")return J.from(k[Symbol.toPrimitive]("string"),V,X);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}J.from=function(k,V,X){return q(k,V,X)},Object.setPrototypeOf(J.prototype,Uint8Array.prototype),Object.setPrototypeOf(J,Uint8Array);function W(k){if(typeof k!=="number")throw TypeError('"size" argument must be of type number');else if(k<0)throw RangeError('The value "'+k+'" is invalid for option "size"')}function I(k,V,X){if(W(k),k<=0)return Z(k);if(V!==void 0)return typeof X==="string"?Z(k).fill(V,X):Z(k).fill(V);return Z(k)}J.alloc=function(k,V,X){return I(k,V,X)};function H(k){return W(k),Z(k<0?0:C(k)|0)}J.allocUnsafe=function(k){return H(k)},J.allocUnsafeSlow=function(k){return H(k)};function T(k,V){if(typeof V!=="string"||V==="")V="utf8";if(!J.isEncoding(V))throw TypeError("Unknown encoding: "+V);var X=v(k,V)|0,O=Z(X),_=O.write(k,V);if(_!==X)O=O.slice(0,_);return O}function A(k){var V=k.length<0?0:C(k.length)|0,X=Z(V);for(var O=0;O=Q)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Q.toString(16)+" bytes");return k|0}function N(k){if(+k!=k)k=0;return J.alloc(+k)}J.isBuffer=function(V){return V!=null&&V._isBuffer===!0&&V!==J.prototype},J.compare=function(V,X){if(f(V,Uint8Array))V=J.from(V,V.offset,V.byteLength);if(f(X,Uint8Array))X=J.from(X,X.offset,X.byteLength);if(!J.isBuffer(V)||!J.isBuffer(X))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(V===X)return 0;var O=V.length,_=X.length;for(var l=0,d=Math.min(O,_);l_.length)J.from(d).copy(_,l);else Uint8Array.prototype.set.call(_,d,l);else if(!J.isBuffer(d))throw TypeError('"list" argument must be an Array of Buffers');else d.copy(_,l);l+=d.length}return _};function v(k,V){if(J.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||f(k,ArrayBuffer))return k.byteLength;if(typeof k!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);var X=k.length,O=arguments.length>2&&arguments[2]===!0;if(!O&&X===0)return 0;var _=!1;for(;;)switch(V){case"ascii":case"latin1":case"binary":return X;case"utf8":case"utf-8":return L(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X*2;case"hex":return X>>>1;case"base64":return Z0(k).length;default:if(_)return O?-1:L(k).length;V=(""+V).toLowerCase(),_=!0}}J.byteLength=v;function S(k,V,X){var O=!1;if(V===void 0||V<0)V=0;if(V>this.length)return"";if(X===void 0||X>this.length)X=this.length;if(X<=0)return"";if(X>>>=0,V>>>=0,X<=V)return"";if(!k)k="utf8";while(!0)switch(k){case"hex":return s(this,V,X);case"utf8":case"utf-8":return D(this,V,X);case"ascii":return i(this,V,X);case"latin1":case"binary":return V0(this,V,X);case"base64":return c(this,V,X);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G0(this,V,X);default:if(O)throw TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),O=!0}}J.prototype._isBuffer=!0;function F(k,V,X){var O=k[V];k[V]=k[X],k[X]=O}if(J.prototype.swap16=function(){var V=this.length;if(V%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var X=0;XX)V+=" ... ";return""},Y)J.prototype[Y]=J.prototype.inspect;J.prototype.compare=function(V,X,O,_,l){if(f(V,Uint8Array))V=J.from(V,V.offset,V.byteLength);if(!J.isBuffer(V))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof V);if(X===void 0)X=0;if(O===void 0)O=V?V.length:0;if(_===void 0)_=0;if(l===void 0)l=this.length;if(X<0||O>V.length||_<0||l>this.length)throw RangeError("out of range index");if(_>=l&&X>=O)return 0;if(_>=l)return-1;if(X>=O)return 1;if(X>>>=0,O>>>=0,_>>>=0,l>>>=0,this===V)return 0;var d=l-_,Q0=O-X,X0=Math.min(d,Q0),K0=this.slice(_,l),I0=V.slice(X,O);for(var F0=0;F02147483647)X=2147483647;else if(X<-2147483648)X=-2147483648;if(X=+X,R(X))X=_?0:k.length-1;if(X<0)X=k.length+X;if(X>=k.length)if(_)return-1;else X=k.length-1;else if(X<0)if(_)X=0;else return-1;if(typeof V==="string")V=J.from(V,O);if(J.isBuffer(V)){if(V.length===0)return-1;return $(k,V,X,O,_)}else if(typeof V==="number"){if(V=V&255,typeof Uint8Array.prototype.indexOf==="function")if(_)return Uint8Array.prototype.indexOf.call(k,V,X);else return Uint8Array.prototype.lastIndexOf.call(k,V,X);return $(k,[V],X,O,_)}throw TypeError("val must be string, number or Buffer")}function $(k,V,X,O,_){var l=1,d=k.length,Q0=V.length;if(O!==void 0){if(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le"){if(k.length<2||V.length<2)return-1;l=2,d/=2,Q0/=2,X/=2}}function X0(k0,L2){if(l===1)return k0[L2];else return k0.readUInt16BE(L2*l)}var K0;if(_){var I0=-1;for(K0=X;K0d)X=d-Q0;for(K0=X;K0>=0;K0--){var F0=!0;for(var W0=0;W0_)O=_;var l=V.length;if(O>l/2)O=l/2;for(var d=0;d>>0,isFinite(O)){if(O=O>>>0,_===void 0)_="utf8"}else _=O,O=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var l=this.length-X;if(O===void 0||O>l)O=l;if(V.length>0&&(O<0||X<0)||X>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!_)_="utf8";var d=!1;for(;;)switch(_){case"hex":return x(this,V,X,O);case"utf8":case"utf-8":return z(this,V,X,O);case"ascii":case"latin1":case"binary":return a(this,V,X,O);case"base64":return U0(this,V,X,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,V,X,O);default:if(d)throw TypeError("Unknown encoding: "+_);_=(""+_).toLowerCase(),d=!0}},J.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function c(k,V,X){if(V===0&&X===k.length)return U.fromByteArray(k);else return U.fromByteArray(k.slice(V,X))}function D(k,V,X){X=Math.min(k.length,X);var O=[],_=V;while(_239?4:l>223?3:l>191?2:1;if(_+Q0<=X){var X0,K0,I0,F0;switch(Q0){case 1:if(l<128)d=l;break;case 2:if(X0=k[_+1],(X0&192)===128){if(F0=(l&31)<<6|X0&63,F0>127)d=F0}break;case 3:if(X0=k[_+1],K0=k[_+2],(X0&192)===128&&(K0&192)===128){if(F0=(l&15)<<12|(X0&63)<<6|K0&63,F0>2047&&(F0<55296||F0>57343))d=F0}break;case 4:if(X0=k[_+1],K0=k[_+2],I0=k[_+3],(X0&192)===128&&(K0&192)===128&&(I0&192)===128){if(F0=(l&15)<<18|(X0&63)<<12|(K0&63)<<6|I0&63,F0>65535&&F0<1114112)d=F0}}}if(d===null)d=65533,Q0=1;else if(d>65535)d-=65536,O.push(d>>>10&1023|55296),d=56320|d&1023;O.push(d),_+=Q0}return B0(O)}var m=4096;function B0(k){var V=k.length;if(V<=m)return String.fromCharCode.apply(String,k);var X="",O=0;while(OO)X=O;var _="";for(var l=V;lO)V=O;if(X<0){if(X+=O,X<0)X=0}else if(X>O)X=O;if(XX)throw RangeError("Trying to access beyond buffer length")}J.prototype.readUintLE=J.prototype.readUIntLE=function(V,X,O){if(V=V>>>0,X=X>>>0,!O)r(V,X,this.length);var _=this[V],l=1,d=0;while(++d>>0,X=X>>>0,!O)r(V,X,this.length);var _=this[V+--X],l=1;while(X>0&&(l*=256))_+=this[V+--X]*l;return _},J.prototype.readUint8=J.prototype.readUInt8=function(V,X){if(V=V>>>0,!X)r(V,1,this.length);return this[V]},J.prototype.readUint16LE=J.prototype.readUInt16LE=function(V,X){if(V=V>>>0,!X)r(V,2,this.length);return this[V]|this[V+1]<<8},J.prototype.readUint16BE=J.prototype.readUInt16BE=function(V,X){if(V=V>>>0,!X)r(V,2,this.length);return this[V]<<8|this[V+1]},J.prototype.readUint32LE=J.prototype.readUInt32LE=function(V,X){if(V=V>>>0,!X)r(V,4,this.length);return(this[V]|this[V+1]<<8|this[V+2]<<16)+this[V+3]*16777216},J.prototype.readUint32BE=J.prototype.readUInt32BE=function(V,X){if(V=V>>>0,!X)r(V,4,this.length);return this[V]*16777216+(this[V+1]<<16|this[V+2]<<8|this[V+3])},J.prototype.readIntLE=function(V,X,O){if(V=V>>>0,X=X>>>0,!O)r(V,X,this.length);var _=this[V],l=1,d=0;while(++d=l)_-=Math.pow(2,8*X);return _},J.prototype.readIntBE=function(V,X,O){if(V=V>>>0,X=X>>>0,!O)r(V,X,this.length);var _=X,l=1,d=this[V+--_];while(_>0&&(l*=256))d+=this[V+--_]*l;if(l*=128,d>=l)d-=Math.pow(2,8*X);return d},J.prototype.readInt8=function(V,X){if(V=V>>>0,!X)r(V,1,this.length);if(!(this[V]&128))return this[V];return(255-this[V]+1)*-1},J.prototype.readInt16LE=function(V,X){if(V=V>>>0,!X)r(V,2,this.length);var O=this[V]|this[V+1]<<8;return O&32768?O|4294901760:O},J.prototype.readInt16BE=function(V,X){if(V=V>>>0,!X)r(V,2,this.length);var O=this[V+1]|this[V]<<8;return O&32768?O|4294901760:O},J.prototype.readInt32LE=function(V,X){if(V=V>>>0,!X)r(V,4,this.length);return this[V]|this[V+1]<<8|this[V+2]<<16|this[V+3]<<24},J.prototype.readInt32BE=function(V,X){if(V=V>>>0,!X)r(V,4,this.length);return this[V]<<24|this[V+1]<<16|this[V+2]<<8|this[V+3]},J.prototype.readFloatLE=function(V,X){if(V=V>>>0,!X)r(V,4,this.length);return G.read(this,V,!0,23,4)},J.prototype.readFloatBE=function(V,X){if(V=V>>>0,!X)r(V,4,this.length);return G.read(this,V,!1,23,4)},J.prototype.readDoubleLE=function(V,X){if(V=V>>>0,!X)r(V,8,this.length);return G.read(this,V,!0,52,8)},J.prototype.readDoubleBE=function(V,X){if(V=V>>>0,!X)r(V,8,this.length);return G.read(this,V,!1,52,8)};function y(k,V,X,O,_,l){if(!J.isBuffer(k))throw TypeError('"buffer" argument must be a Buffer instance');if(V>_||Vk.length)throw RangeError("Index out of range")}J.prototype.writeUintLE=J.prototype.writeUIntLE=function(V,X,O,_){if(V=+V,X=X>>>0,O=O>>>0,!_){var l=Math.pow(2,8*O)-1;y(this,V,X,O,l,0)}var d=1,Q0=0;this[X]=V&255;while(++Q0>>0,O=O>>>0,!_){var l=Math.pow(2,8*O)-1;y(this,V,X,O,l,0)}var d=O-1,Q0=1;this[X+d]=V&255;while(--d>=0&&(Q0*=256))this[X+d]=V/Q0&255;return X+O},J.prototype.writeUint8=J.prototype.writeUInt8=function(V,X,O){if(V=+V,X=X>>>0,!O)y(this,V,X,1,255,0);return this[X]=V&255,X+1},J.prototype.writeUint16LE=J.prototype.writeUInt16LE=function(V,X,O){if(V=+V,X=X>>>0,!O)y(this,V,X,2,65535,0);return this[X]=V&255,this[X+1]=V>>>8,X+2},J.prototype.writeUint16BE=J.prototype.writeUInt16BE=function(V,X,O){if(V=+V,X=X>>>0,!O)y(this,V,X,2,65535,0);return this[X]=V>>>8,this[X+1]=V&255,X+2},J.prototype.writeUint32LE=J.prototype.writeUInt32LE=function(V,X,O){if(V=+V,X=X>>>0,!O)y(this,V,X,4,4294967295,0);return this[X+3]=V>>>24,this[X+2]=V>>>16,this[X+1]=V>>>8,this[X]=V&255,X+4},J.prototype.writeUint32BE=J.prototype.writeUInt32BE=function(V,X,O){if(V=+V,X=X>>>0,!O)y(this,V,X,4,4294967295,0);return this[X]=V>>>24,this[X+1]=V>>>16,this[X+2]=V>>>8,this[X+3]=V&255,X+4},J.prototype.writeIntLE=function(V,X,O,_){if(V=+V,X=X>>>0,!_){var l=Math.pow(2,8*O-1);y(this,V,X,O,l-1,-l)}var d=0,Q0=1,X0=0;this[X]=V&255;while(++d>0)-X0&255}return X+O},J.prototype.writeIntBE=function(V,X,O,_){if(V=+V,X=X>>>0,!_){var l=Math.pow(2,8*O-1);y(this,V,X,O,l-1,-l)}var d=O-1,Q0=1,X0=0;this[X+d]=V&255;while(--d>=0&&(Q0*=256)){if(V<0&&X0===0&&this[X+d+1]!==0)X0=1;this[X+d]=(V/Q0>>0)-X0&255}return X+O},J.prototype.writeInt8=function(V,X,O){if(V=+V,X=X>>>0,!O)y(this,V,X,1,127,-128);if(V<0)V=255+V+1;return this[X]=V&255,X+1},J.prototype.writeInt16LE=function(V,X,O){if(V=+V,X=X>>>0,!O)y(this,V,X,2,32767,-32768);return this[X]=V&255,this[X+1]=V>>>8,X+2},J.prototype.writeInt16BE=function(V,X,O){if(V=+V,X=X>>>0,!O)y(this,V,X,2,32767,-32768);return this[X]=V>>>8,this[X+1]=V&255,X+2},J.prototype.writeInt32LE=function(V,X,O){if(V=+V,X=X>>>0,!O)y(this,V,X,4,2147483647,-2147483648);return this[X]=V&255,this[X+1]=V>>>8,this[X+2]=V>>>16,this[X+3]=V>>>24,X+4},J.prototype.writeInt32BE=function(V,X,O){if(V=+V,X=X>>>0,!O)y(this,V,X,4,2147483647,-2147483648);if(V<0)V=4294967295+V+1;return this[X]=V>>>24,this[X+1]=V>>>16,this[X+2]=V>>>8,this[X+3]=V&255,X+4};function n(k,V,X,O,_,l){if(X+O>k.length)throw RangeError("Index out of range");if(X<0)throw RangeError("Index out of range")}function o(k,V,X,O,_){if(V=+V,X=X>>>0,!_)n(k,V,X,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return G.write(k,V,X,O,23,4),X+4}J.prototype.writeFloatLE=function(V,X,O){return o(this,V,X,!0,O)},J.prototype.writeFloatBE=function(V,X,O){return o(this,V,X,!1,O)};function Y0(k,V,X,O,_){if(V=+V,X=X>>>0,!_)n(k,V,X,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return G.write(k,V,X,O,52,8),X+8}J.prototype.writeDoubleLE=function(V,X,O){return Y0(this,V,X,!0,O)},J.prototype.writeDoubleBE=function(V,X,O){return Y0(this,V,X,!1,O)},J.prototype.copy=function(V,X,O,_){if(!J.isBuffer(V))throw TypeError("argument should be a Buffer");if(!O)O=0;if(!_&&_!==0)_=this.length;if(X>=V.length)X=V.length;if(!X)X=0;if(_>0&&_=this.length)throw RangeError("Index out of range");if(_<0)throw RangeError("sourceEnd out of bounds");if(_>this.length)_=this.length;if(V.length-X<_-O)_=V.length-X+O;var l=_-O;if(this===V&&typeof Uint8Array.prototype.copyWithin==="function")this.copyWithin(X,O,_);else Uint8Array.prototype.set.call(V,this.subarray(O,_),X);return l},J.prototype.fill=function(V,X,O,_){if(typeof V==="string"){if(typeof X==="string")_=X,X=0,O=this.length;else if(typeof O==="string")_=O,O=this.length;if(_!==void 0&&typeof _!=="string")throw TypeError("encoding must be a string");if(typeof _==="string"&&!J.isEncoding(_))throw TypeError("Unknown encoding: "+_);if(V.length===1){var l=V.charCodeAt(0);if(_==="utf8"&&l<128||_==="latin1")V=l}}else if(typeof V==="number")V=V&255;else if(typeof V==="boolean")V=Number(V);if(X<0||this.length>>0,O=O===void 0?this.length:O>>>0,!V)V=0;var d;if(typeof V==="number")for(d=X;d55295&&X<57344){if(!_){if(X>56319){if((V-=3)>-1)l.push(239,191,189);continue}else if(d+1===O){if((V-=3)>-1)l.push(239,191,189);continue}_=X;continue}if(X<56320){if((V-=3)>-1)l.push(239,191,189);_=X;continue}X=(_-55296<<10|X-56320)+65536}else if(_){if((V-=3)>-1)l.push(239,191,189)}if(_=null,X<128){if((V-=1)<0)break;l.push(X)}else if(X<2048){if((V-=2)<0)break;l.push(X>>6|192,X&63|128)}else if(X<65536){if((V-=3)<0)break;l.push(X>>12|224,X>>6&63|128,X&63|128)}else if(X<1114112){if((V-=4)<0)break;l.push(X>>18|240,X>>12&63|128,X>>6&63|128,X&63|128)}else throw Error("Invalid code point")}return l}function u(k){var V=[];for(var X=0;X>8,_=X%256,l.push(_),l.push(O)}return l}function Z0(k){return U.toByteArray(w(k))}function g(k,V,X,O){for(var _=0;_=V.length||_>=k.length)break;V[_+X]=k[_]}return _}function f(k,V){return k instanceof V||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===V.name}function R(k){return k!==k}var p=function(){var k="0123456789abcdef",V=Array(256);for(var X=0;X<16;++X){var O=X*16;for(var _=0;_<16;++_)V[O+_]=k[X]+k[_]}return V}()}),MB=R0((B,U)=>{U.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var Y={},Q=Symbol("test"),K=Object(Q);if(typeof Q==="string")return!1;if(Object.prototype.toString.call(Q)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(K)!=="[object Symbol]")return!1;var Z=42;Y[Q]=Z;for(var J in Y)return!1;if(typeof Object.keys==="function"&&Object.keys(Y).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames(Y).length!==0)return!1;var q=Object.getOwnPropertySymbols(Y);if(q.length!==1||q[0]!==Q)return!1;if(!Object.prototype.propertyIsEnumerable.call(Y,Q))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var W=Object.getOwnPropertyDescriptor(Y,Q);if(W.value!==Z||W.enumerable!==!0)return!1}return!0}}),b8=R0((B,U)=>{var G=MB();U.exports=function(){return G()&&!!Symbol.toStringTag}}),RB=R0((B,U)=>{U.exports=Object}),HU=R0((B,U)=>{U.exports=Error}),FU=R0((B,U)=>{U.exports=EvalError}),WU=R0((B,U)=>{U.exports=RangeError}),PU=R0((B,U)=>{U.exports=ReferenceError}),LB=R0((B,U)=>{U.exports=SyntaxError}),x1=R0((B,U)=>{U.exports=TypeError}),AU=R0((B,U)=>{U.exports=URIError}),jU=R0((B,U)=>{U.exports=Math.abs}),NU=R0((B,U)=>{U.exports=Math.floor}),zU=R0((B,U)=>{U.exports=Math.max}),wU=R0((B,U)=>{U.exports=Math.min}),EU=R0((B,U)=>{U.exports=Math.pow}),DU=R0((B,U)=>{U.exports=Math.round}),TU=R0((B,U)=>{U.exports=Number.isNaN||function(Y){return Y!==Y}}),CU=R0((B,U)=>{var G=TU();U.exports=function(Q){if(G(Q)||Q===0)return Q;return Q<0?-1:1}}),kU=R0((B,U)=>{U.exports=Object.getOwnPropertyDescriptor}),K1=R0((B,U)=>{var G=kU();if(G)try{G([],"length")}catch(Y){G=null}U.exports=G}),_1=R0((B,U)=>{var G=Object.defineProperty||!1;if(G)try{G({},"a",{value:1})}catch(Y){G=!1}U.exports=G}),$U=R0((B,U)=>{var G=typeof Symbol<"u"&&Symbol,Y=MB();U.exports=function(){if(typeof G!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof G("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return Y()}}),IB=R0((B,U)=>{U.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}),OB=R0((B,U)=>{U.exports=RB().getPrototypeOf||null}),SU=R0((B,U)=>{var G="Function.prototype.bind called on incompatible ",Y=Object.prototype.toString,Q=Math.max,K="[object Function]",Z=function(I,H){var T=[];for(var A=0;A{var G=SU();U.exports=Function.prototype.bind||G}),v8=R0((B,U)=>{U.exports=Function.prototype.call}),y8=R0((B,U)=>{U.exports=Function.prototype.apply}),bU=R0((B,U)=>{U.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply}),HB=R0((B,U)=>{var G=V1(),Y=y8(),Q=v8();U.exports=bU()||G.call(Q,Y)}),g8=R0((B,U)=>{var G=V1(),Y=x1(),Q=v8(),K=HB();U.exports=function(J){if(J.length<1||typeof J[0]!=="function")throw new Y("a function is required");return K(G,Q,J)}}),vU=R0((B,U)=>{var G=g8(),Y=K1(),Q;try{Q=[].__proto__===Array.prototype}catch(q){if(!q||typeof q!=="object"||!("code"in q)||q.code!=="ERR_PROTO_ACCESS")throw q}var K=!!Q&&Y&&Y(Object.prototype,"__proto__"),Z=Object,J=Z.getPrototypeOf;U.exports=K&&typeof K.get==="function"?G([K.get]):typeof J==="function"?function(W){return J(W==null?W:Z(W))}:!1}),FB=R0((B,U)=>{var G=IB(),Y=OB(),Q=vU();U.exports=G?function(Z){return G(Z)}:Y?function(Z){if(!Z||typeof Z!=="object"&&typeof Z!=="function")throw TypeError("getProto: not an object");return Y(Z)}:Q?function(Z){return Q(Z)}:null}),yU=R0((B,U)=>{var G=Function.prototype.call,Y=Object.prototype.hasOwnProperty;U.exports=V1().call(G,Y)}),WB=R0((B,U)=>{var G,Y=RB(),Q=HU(),K=FU(),Z=WU(),J=PU(),q=LB(),W=x1(),I=AU(),H=jU(),T=NU(),A=zU(),P=wU(),j=EU(),E=DU(),C=CU(),N=Function,v=function(h){try{return N('"use strict"; return ('+h+").constructor;")()}catch(Z0){}},S=K1(),F=_1(),M=function(){throw new W},$=S?function(){try{return arguments.callee,M}catch(h){try{return S(arguments,"callee").get}catch(Z0){return M}}}():M,x=$U()(),z=FB(),a=OB(),U0=IB(),b=y8(),c=v8(),D={},m=typeof Uint8Array>"u"||!z?G:z(Uint8Array),B0={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?G:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?G:ArrayBuffer,"%ArrayIteratorPrototype%":x&&z?z([][Symbol.iterator]()):G,"%AsyncFromSyncIteratorPrototype%":G,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":typeof Atomics>"u"?G:Atomics,"%BigInt%":typeof BigInt>"u"?G:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?G:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?G:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?G:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Q,"%eval%":eval,"%EvalError%":K,"%Float16Array%":typeof Float16Array>"u"?G:Float16Array,"%Float32Array%":typeof Float32Array>"u"?G:Float32Array,"%Float64Array%":typeof Float64Array>"u"?G:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?G:FinalizationRegistry,"%Function%":N,"%GeneratorFunction%":D,"%Int8Array%":typeof Int8Array>"u"?G:Int8Array,"%Int16Array%":typeof Int16Array>"u"?G:Int16Array,"%Int32Array%":typeof Int32Array>"u"?G:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":x&&z?z(z([][Symbol.iterator]())):G,"%JSON%":typeof JSON==="object"?JSON:G,"%Map%":typeof Map>"u"?G:Map,"%MapIteratorPrototype%":typeof Map>"u"||!x||!z?G:z(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Y,"%Object.getOwnPropertyDescriptor%":S,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?G:Promise,"%Proxy%":typeof Proxy>"u"?G:Proxy,"%RangeError%":Z,"%ReferenceError%":J,"%Reflect%":typeof Reflect>"u"?G:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?G:Set,"%SetIteratorPrototype%":typeof Set>"u"||!x||!z?G:z(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?G:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":x&&z?z(""[Symbol.iterator]()):G,"%Symbol%":x?Symbol:G,"%SyntaxError%":q,"%ThrowTypeError%":$,"%TypedArray%":m,"%TypeError%":W,"%Uint8Array%":typeof Uint8Array>"u"?G:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?G:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?G:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?G:Uint32Array,"%URIError%":I,"%WeakMap%":typeof WeakMap>"u"?G:WeakMap,"%WeakRef%":typeof WeakRef>"u"?G:WeakRef,"%WeakSet%":typeof WeakSet>"u"?G:WeakSet,"%Function.prototype.call%":c,"%Function.prototype.apply%":b,"%Object.defineProperty%":F,"%Object.getPrototypeOf%":a,"%Math.abs%":H,"%Math.floor%":T,"%Math.max%":A,"%Math.min%":P,"%Math.pow%":j,"%Math.round%":E,"%Math.sign%":C,"%Reflect.getPrototypeOf%":U0};if(z)try{null.error}catch(h){B0["%Error.prototype%"]=z(z(h))}var i=function h(Z0){var g;if(Z0==="%AsyncFunction%")g=v("async function () {}");else if(Z0==="%GeneratorFunction%")g=v("function* () {}");else if(Z0==="%AsyncGeneratorFunction%")g=v("async function* () {}");else if(Z0==="%AsyncGenerator%"){var f=h("%AsyncGeneratorFunction%");if(f)g=f.prototype}else if(Z0==="%AsyncIteratorPrototype%"){var R=h("%AsyncGenerator%");if(R&&z)g=z(R.prototype)}return B0[Z0]=g,g},V0={__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"]},s=V1(),G0=yU(),r=s.call(c,Array.prototype.concat),y=s.call(b,Array.prototype.splice),n=s.call(c,String.prototype.replace),o=s.call(c,String.prototype.slice),Y0=s.call(c,RegExp.prototype.exec),O0=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,w=/\\(\\)?/g,L=function(Z0){var g=o(Z0,0,1),f=o(Z0,-1);if(g==="%"&&f!=="%")throw new q("invalid intrinsic syntax, expected closing `%`");else if(f==="%"&&g!=="%")throw new q("invalid intrinsic syntax, expected opening `%`");var R=[];return n(Z0,O0,function(p,k,V,X){R[R.length]=V?n(X,w,"$1"):k||p}),R},u=function(Z0,g){var f=Z0,R;if(G0(V0,f))R=V0[f],f="%"+R[0]+"%";if(G0(B0,f)){var p=B0[f];if(p===D)p=i(f);if(typeof p>"u"&&!g)throw new W("intrinsic "+Z0+" exists, but is not available. Please file an issue!");return{alias:R,name:f,value:p}}throw new q("intrinsic "+Z0+" does not exist!")};U.exports=function(Z0,g){if(typeof Z0!=="string"||Z0.length===0)throw new W("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof g!=="boolean")throw new W('"allowMissing" argument must be a boolean');if(Y0(/^%?[^%]*%?$/,Z0)===null)throw new q("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var f=L(Z0),R=f.length>0?f[0]:"",p=u("%"+R+"%",g),k=p.name,V=p.value,X=!1,O=p.alias;if(O)R=O[0],y(f,r([0,1],O));for(var _=1,l=!0;_=f.length){var K0=S(V,d);if(l=!!K0,l&&"get"in K0&&!("originalValue"in K0.get))V=K0.get;else V=V[d]}else l=G0(V,d),V=V[d];if(l&&!X)B0[k]=V}}return V}}),PB=R0((B,U)=>{var G=WB(),Y=g8(),Q=Y([G("%String.prototype.indexOf%")]);U.exports=function(Z,J){var q=G(Z,!!J);if(typeof q==="function"&&Q(Z,".prototype.")>-1)return Y([q]);return q}}),gU=R0((B,U)=>{var G=b8()(),Y=PB()("Object.prototype.toString"),Q=function(q){if(G&&q&&typeof q==="object"&&Symbol.toStringTag in q)return!1;return Y(q)==="[object Arguments]"},K=function(q){if(Q(q))return!0;return q!==null&&typeof q==="object"&&"length"in q&&typeof q.length==="number"&&q.length>=0&&Y(q)!=="[object Array]"&&"callee"in q&&Y(q.callee)==="[object Function]"},Z=function(){return Q(arguments)}();Q.isLegacyArguments=K,U.exports=Z?Q:K}),fU=R0((B,U)=>{var G=Object.prototype.toString,Y=Function.prototype.toString,Q=/^\s*(?:function)?\*/,K=b8()(),Z=Object.getPrototypeOf,J=function(){if(!K)return!1;try{return Function("return function*() {}")()}catch(W){}},q;U.exports=function(I){if(typeof I!=="function")return!1;if(Q.test(Y.call(I)))return!0;if(!K)return G.call(I)==="[object GeneratorFunction]";if(!Z)return!1;if(typeof q>"u"){var H=J();q=H?Z(H):!1}return Z(I)===q}}),xU=R0((B,U)=>{var G=Function.prototype.toString,Y=typeof Reflect==="object"&&Reflect!==null&&Reflect.apply,Q,K;if(typeof Y==="function"&&typeof Object.defineProperty==="function")try{Q=Object.defineProperty({},"length",{get:function(){throw K}}),K={},Y(function(){throw 42},null,Q)}catch(S){if(S!==K)Y=null}else Y=null;var Z=/^\s*class\b/,J=function(F){try{var M=G.call(F);return Z.test(M)}catch($){return!1}},q=function(F){try{if(J(F))return!1;return G.call(F),!0}catch(M){return!1}},W=Object.prototype.toString,I="[object Object]",H="[object Function]",T="[object GeneratorFunction]",A="[object HTMLAllCollection]",P="[object HTML document.all class]",j="[object HTMLCollection]",E=typeof Symbol==="function"&&!!Symbol.toStringTag,C=!(0 in[,]),N=function(){return!1};if(typeof document==="object"){var v=document.all;if(W.call(v)===W.call(document.all))N=function(F){if((C||!F)&&(typeof F>"u"||typeof F==="object"))try{var M=W.call(F);return(M===A||M===P||M===j||M===I)&&F("")==null}catch($){}return!1}}U.exports=Y?function(F){if(N(F))return!0;if(!F)return!1;if(typeof F!=="function"&&typeof F!=="object")return!1;try{Y(F,null,Q)}catch(M){if(M!==K)return!1}return!J(F)&&q(F)}:function(F){if(N(F))return!0;if(!F)return!1;if(typeof F!=="function"&&typeof F!=="object")return!1;if(E)return q(F);if(J(F))return!1;var M=W.call(F);if(M!==H&&M!==T&&!/^\[object HTML/.test(M))return!1;return q(F)}}),_U=R0((B,U)=>{var G=xU(),Y=Object.prototype.toString,Q=Object.prototype.hasOwnProperty,K=function(I,H,T){for(var A=0,P=I.length;A=3)A=T;if(q(I))K(I,H,A);else if(typeof I==="string")Z(I,H,A);else J(I,H,A)}}),hU=R0((B,U)=>{U.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}),uU=R0((B,U)=>{d2();var G=hU(),Y=typeof globalThis>"u"?v0:globalThis;U.exports=function(){var K=[];for(var Z=0;Z{var G=_1(),Y=LB(),Q=x1(),K=K1();U.exports=function(J,q,W){if(!J||typeof J!=="object"&&typeof J!=="function")throw new Q("`obj` must be an object or a function`");if(typeof q!=="string"&&typeof q!=="symbol")throw new Q("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=="boolean"&&arguments[3]!==null)throw new Q("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=="boolean"&&arguments[4]!==null)throw new Q("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=="boolean"&&arguments[5]!==null)throw new Q("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=="boolean")throw new Q("`loose`, if provided, must be a boolean");var I=arguments.length>3?arguments[3]:null,H=arguments.length>4?arguments[4]:null,T=arguments.length>5?arguments[5]:null,A=arguments.length>6?arguments[6]:!1,P=!!K&&K(J,q);if(G)G(J,q,{configurable:T===null&&P?P.configurable:!T,enumerable:I===null&&P?P.enumerable:!I,value:W,writable:H===null&&P?P.writable:!H});else if(A||!I&&!H&&!T)J[q]=W;else throw new Y("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),cU=R0((B,U)=>{var G=_1(),Y=function(){return!!G};Y.hasArrayLengthDefineBug=function(){if(!G)return null;try{return G([],"length",{value:1}).length!==1}catch(K){return!0}},U.exports=Y}),mU=R0((B,U)=>{var G=WB(),Y=dU(),Q=cU()(),K=K1(),Z=x1(),J=G("%Math.floor%");U.exports=function(W,I){if(typeof W!=="function")throw new Z("`fn` is not a function");if(typeof I!=="number"||I<0||I>4294967295||J(I)!==I)throw new Z("`length` must be a positive 32-bit integer");var H=arguments.length>2&&!!arguments[2],T=!0,A=!0;if("length"in W&&K){var P=K(W,"length");if(P&&!P.configurable)T=!1;if(P&&!P.writable)A=!1}if(T||A||!H)if(Q)Y(W,"length",I,!0,!0);else Y(W,"length",I);return W}}),lU=R0((B,U)=>{var G=V1(),Y=y8(),Q=HB();U.exports=function(){return Q(G,Y,arguments)}}),aU=R0((B,U)=>{var G=mU(),Y=_1(),Q=g8(),K=lU();if(U.exports=function(J){var q=Q(arguments),W=J.length-(arguments.length-1);return G(q,1+(W>0?W:0),!0)},Y)Y(U.exports,"apply",{value:K});else U.exports.apply=K}),AB=R0((B,U)=>{d2();var G=_U(),Y=uU(),Q=aU(),K=PB(),Z=K1(),J=FB(),q=K("Object.prototype.toString"),W=b8()(),I=typeof globalThis>"u"?v0:globalThis,H=Y(),T=K("String.prototype.slice"),A=K("Array.prototype.indexOf",!0)||function(N,v){for(var S=0;S-1)return v;if(v!=="Object")return!1;return E(N)}if(!Z)return null;return j(N)}}),pU=R0((B,U)=>{var G=AB();U.exports=function(Q){return!!G(Q)}}),rU=R0((B)=>{var U=gU(),G=fU(),Y=AB(),Q=pU();function K(O){return O.call.bind(O)}var Z=typeof BigInt<"u",J=typeof Symbol<"u",q=K(Object.prototype.toString),W=K(Number.prototype.valueOf),I=K(String.prototype.valueOf),H=K(Boolean.prototype.valueOf);if(Z)var T=K(BigInt.prototype.valueOf);if(J)var A=K(Symbol.prototype.valueOf);function P(O,_){if(typeof O!=="object")return!1;try{return _(O),!0}catch(l){return!1}}B.isArgumentsObject=U,B.isGeneratorFunction=G,B.isTypedArray=Q;function j(O){return typeof Promise<"u"&&O instanceof Promise||O!==null&&typeof O==="object"&&typeof O.then==="function"&&typeof O.catch==="function"}B.isPromise=j;function E(O){if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)return ArrayBuffer.isView(O);return Q(O)||n(O)}B.isArrayBufferView=E;function C(O){return Y(O)==="Uint8Array"}B.isUint8Array=C;function N(O){return Y(O)==="Uint8ClampedArray"}B.isUint8ClampedArray=N;function v(O){return Y(O)==="Uint16Array"}B.isUint16Array=v;function S(O){return Y(O)==="Uint32Array"}B.isUint32Array=S;function F(O){return Y(O)==="Int8Array"}B.isInt8Array=F;function M(O){return Y(O)==="Int16Array"}B.isInt16Array=M;function $(O){return Y(O)==="Int32Array"}B.isInt32Array=$;function x(O){return Y(O)==="Float32Array"}B.isFloat32Array=x;function z(O){return Y(O)==="Float64Array"}B.isFloat64Array=z;function a(O){return Y(O)==="BigInt64Array"}B.isBigInt64Array=a;function U0(O){return Y(O)==="BigUint64Array"}B.isBigUint64Array=U0;function b(O){return q(O)==="[object Map]"}b.working=typeof Map<"u"&&b(new Map);function c(O){if(typeof Map>"u")return!1;return b.working?b(O):O instanceof Map}B.isMap=c;function D(O){return q(O)==="[object Set]"}D.working=typeof Set<"u"&&D(new Set);function m(O){if(typeof Set>"u")return!1;return D.working?D(O):O instanceof Set}B.isSet=m;function B0(O){return q(O)==="[object WeakMap]"}B0.working=typeof WeakMap<"u"&&B0(new WeakMap);function i(O){if(typeof WeakMap>"u")return!1;return B0.working?B0(O):O instanceof WeakMap}B.isWeakMap=i;function V0(O){return q(O)==="[object WeakSet]"}V0.working=typeof WeakSet<"u"&&V0(new WeakSet);function s(O){return V0(O)}B.isWeakSet=s;function G0(O){return q(O)==="[object ArrayBuffer]"}G0.working=typeof ArrayBuffer<"u"&&G0(new ArrayBuffer);function r(O){if(typeof ArrayBuffer>"u")return!1;return G0.working?G0(O):O instanceof ArrayBuffer}B.isArrayBuffer=r;function y(O){return q(O)==="[object DataView]"}y.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&y(new DataView(new ArrayBuffer(1),0,1));function n(O){if(typeof DataView>"u")return!1;return y.working?y(O):O instanceof DataView}B.isDataView=n;var o=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function Y0(O){return q(O)==="[object SharedArrayBuffer]"}function O0(O){if(typeof o>"u")return!1;if(typeof Y0.working>"u")Y0.working=Y0(new o);return Y0.working?Y0(O):O instanceof o}B.isSharedArrayBuffer=O0;function w(O){return q(O)==="[object AsyncFunction]"}B.isAsyncFunction=w;function L(O){return q(O)==="[object Map Iterator]"}B.isMapIterator=L;function u(O){return q(O)==="[object Set Iterator]"}B.isSetIterator=u;function h(O){return q(O)==="[object Generator]"}B.isGeneratorObject=h;function Z0(O){return q(O)==="[object WebAssembly.Module]"}B.isWebAssemblyCompiledModule=Z0;function g(O){return P(O,W)}B.isNumberObject=g;function f(O){return P(O,I)}B.isStringObject=f;function R(O){return P(O,H)}B.isBooleanObject=R;function p(O){return Z&&P(O,T)}B.isBigIntObject=p;function k(O){return J&&P(O,A)}B.isSymbolObject=k;function V(O){return g(O)||f(O)||R(O)||p(O)||k(O)}B.isBoxedPrimitive=V;function X(O){return typeof Uint8Array<"u"&&(r(O)||O0(O))}B.isAnyArrayBuffer=X,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(O){Object.defineProperty(B,O,{enumerable:!1,value:function(){throw Error(O+" is not supported in userland")}})})}),iU=R0((B,U)=>{U.exports=function(Y){return Y&&typeof Y==="object"&&typeof Y.copy==="function"&&typeof Y.fill==="function"&&typeof Y.readUInt8==="function"}}),jB=R0((B)=>{P2();var U=Object.getOwnPropertyDescriptors||function(n){var o=Object.keys(n),Y0={};for(var O0=0;O0=O0)return u;switch(u){case"%s":return String(Y0[o++]);case"%d":return Number(Y0[o++]);case"%j":try{return JSON.stringify(Y0[o++])}catch(h){return"[Circular]"}default:return u}});for(var L=Y0[o];o"u")return function(){return B.deprecate(y,n).apply(this,arguments)};var o=!1;function Y0(){if(!o){if(P0.throwDeprecation)throw Error(n);else if(P0.traceDeprecation)console.trace(n);else console.error(n);o=!0}return y.apply(this,arguments)}return Y0};var Y={},Q=/^$/;if(P0.env.NODE_DEBUG){var K=P0.env.NODE_DEBUG;K=K.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Q=new RegExp("^"+K+"$","i")}B.debuglog=function(y){if(y=y.toUpperCase(),!Y[y])if(Q.test(y)){var n=P0.pid;Y[y]=function(){var o=B.format.apply(B,arguments);console.error("%s %d: %s",y,n,o)}}else Y[y]=function(){};return Y[y]};function Z(y,n){var o={seen:[],stylize:q};if(arguments.length>=3)o.depth=arguments[2];if(arguments.length>=4)o.colors=arguments[3];if(C(n))o.showHidden=n;else if(n)B._extend(o,n);if($(o.showHidden))o.showHidden=!1;if($(o.depth))o.depth=2;if($(o.colors))o.colors=!1;if($(o.customInspect))o.customInspect=!0;if(o.colors)o.stylize=J;return I(o,y,o.depth)}B.inspect=Z,Z.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]},Z.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function J(y,n){var o=Z.styles[n];if(o)return"\x1B["+Z.colors[o][0]+"m"+y+"\x1B["+Z.colors[o][1]+"m";else return y}function q(y,n){return y}function W(y){var n={};return y.forEach(function(o,Y0){n[o]=!0}),n}function I(y,n,o){if(y.customInspect&&n&&b(n.inspect)&&n.inspect!==B.inspect&&!(n.constructor&&n.constructor.prototype===n)){var Y0=n.inspect(o,y);if(!F(Y0))Y0=I(y,Y0,o);return Y0}var O0=H(y,n);if(O0)return O0;var w=Object.keys(n),L=W(w);if(y.showHidden)w=Object.getOwnPropertyNames(n);if(U0(n)&&(w.indexOf("message")>=0||w.indexOf("description")>=0))return T(n);if(w.length===0){if(b(n)){var u=n.name?": "+n.name:"";return y.stylize("[Function"+u+"]","special")}if(x(n))return y.stylize(RegExp.prototype.toString.call(n),"regexp");if(a(n))return y.stylize(Date.prototype.toString.call(n),"date");if(U0(n))return T(n)}var h="",Z0=!1,g=["{","}"];if(E(n))Z0=!0,g=["[","]"];if(b(n))h=" [Function"+(n.name?": "+n.name:"")+"]";if(x(n))h=" "+RegExp.prototype.toString.call(n);if(a(n))h=" "+Date.prototype.toUTCString.call(n);if(U0(n))h=" "+T(n);if(w.length===0&&(!Z0||n.length==0))return g[0]+h+g[1];if(o<0)if(x(n))return y.stylize(RegExp.prototype.toString.call(n),"regexp");else return y.stylize("[Object]","special");y.seen.push(n);var f;if(Z0)f=A(y,n,o,L,w);else f=w.map(function(R){return P(y,n,o,L,R,Z0)});return y.seen.pop(),j(f,h,g)}function H(y,n){if($(n))return y.stylize("undefined","undefined");if(F(n)){var o="'"+JSON.stringify(n).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return y.stylize(o,"string")}if(S(n))return y.stylize(""+n,"number");if(C(n))return y.stylize(""+n,"boolean");if(N(n))return y.stylize("null","null")}function T(y){return"["+Error.prototype.toString.call(y)+"]"}function A(y,n,o,Y0,O0){var w=[];for(var L=0,u=n.length;L-1)if(w)u=u.split(` -`).map(function(Z0){return" "+Z0}).join(` -`).slice(2);else u=` -`+u.split(` -`).map(function(Z0){return" "+Z0}).join(` -`)}else u=y.stylize("[Circular]","special");if($(L)){if(w&&O0.match(/^\d+$/))return u;if(L=JSON.stringify(""+O0),L.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/))L=L.slice(1,-1),L=y.stylize(L,"name");else L=L.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),L=y.stylize(L,"string")}return L+": "+u}function j(y,n,o){var Y0=0;if(y.reduce(function(O0,w){if(Y0++,w.indexOf(` -`)>=0)Y0++;return O0+w.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return o[0]+(n===""?"":n+` - `)+" "+y.join(`, - `)+" "+o[1];return o[0]+n+" "+y.join(", ")+" "+o[1]}B.types=rU();function E(y){return Array.isArray(y)}B.isArray=E;function C(y){return typeof y==="boolean"}B.isBoolean=C;function N(y){return y===null}B.isNull=N;function v(y){return y==null}B.isNullOrUndefined=v;function S(y){return typeof y==="number"}B.isNumber=S;function F(y){return typeof y==="string"}B.isString=F;function M(y){return typeof y==="symbol"}B.isSymbol=M;function $(y){return y===void 0}B.isUndefined=$;function x(y){return z(y)&&D(y)==="[object RegExp]"}B.isRegExp=x,B.types.isRegExp=x;function z(y){return typeof y==="object"&&y!==null}B.isObject=z;function a(y){return z(y)&&D(y)==="[object Date]"}B.isDate=a,B.types.isDate=a;function U0(y){return z(y)&&(D(y)==="[object Error]"||y instanceof Error)}B.isError=U0,B.types.isNativeError=U0;function b(y){return typeof y==="function"}B.isFunction=b;function c(y){return y===null||typeof y==="boolean"||typeof y==="number"||typeof y==="string"||typeof y==="symbol"||typeof y>"u"}B.isPrimitive=c,B.isBuffer=iU();function D(y){return Object.prototype.toString.call(y)}function m(y){return y<10?"0"+y.toString(10):y.toString(10)}var B0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function i(){var y=new Date,n=[m(y.getHours()),m(y.getMinutes()),m(y.getSeconds())].join(":");return[y.getDate(),B0[y.getMonth()],n].join(" ")}B.log=function(){console.log("%s - %s",i(),B.format.apply(B,arguments))},B.inherits=W2(),B._extend=function(y,n){if(!n||!z(n))return y;var o=Object.keys(n),Y0=o.length;while(Y0--)y[o[Y0]]=n[o[Y0]];return y};function V0(y,n){return Object.prototype.hasOwnProperty.call(y,n)}var s=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;B.promisify=function(n){if(typeof n!=="function")throw TypeError('The "original" argument must be of type Function');if(s&&n[s]){var o=n[s];if(typeof o!=="function")throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(o,s,{value:o,enumerable:!1,writable:!1,configurable:!0}),o}function o(){var Y0,O0,w=new Promise(function(h,Z0){Y0=h,O0=Z0}),L=[];for(var u=0;u{function G(P,j){var E=Object.keys(P);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(P);j&&(C=C.filter(function(N){return Object.getOwnPropertyDescriptor(P,N).enumerable})),E.push.apply(E,C)}return E}function Y(P){for(var j=1;j0)this.tail.next=C;else this.head=C;this.tail=C,++this.length}},{key:"unshift",value:function(E){var C={data:E,next:this.head};if(this.length===0)this.tail=C;this.head=C,++this.length}},{key:"shift",value:function(){if(this.length===0)return;var E=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,E}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(E){if(this.length===0)return"";var C=this.head,N=""+C.data;while(C=C.next)N+=E+C.data;return N}},{key:"concat",value:function(E){if(this.length===0)return I.alloc(0);var C=I.allocUnsafe(E>>>0),N=this.head,v=0;while(N)A(N.data,C,v),v+=N.data.length,N=N.next;return C}},{key:"consume",value:function(E,C){var N;if(ES.length?S.length:E;if(F===S.length)v+=S;else v+=S.slice(0,E);if(E-=F,E===0){if(F===S.length)if(++N,C.next)this.head=C.next;else this.head=this.tail=null;else this.head=C,C.data=S.slice(F);break}++N}return this.length-=N,v}},{key:"_getBuffer",value:function(E){var C=I.allocUnsafe(E),N=this.head,v=1;N.data.copy(C),E-=N.data.length;while(N=N.next){var S=N.data,F=E>S.length?S.length:E;if(S.copy(C,C.length-E,0,F),E-=F,E===0){if(F===S.length)if(++v,N.next)this.head=N.next;else this.head=this.tail=null;else this.head=N,N.data=S.slice(F);break}++v}return this.length-=v,C}},{key:T,value:function(E,C){return H(this,Y(Y({},C),{},{depth:0,customInspect:!1}))}}]),P}()}),NB=R0((B,U)=>{P2();function G(q,W){var I=this,H=this._readableState&&this._readableState.destroyed,T=this._writableState&&this._writableState.destroyed;if(H||T){if(W)W(q);else if(q){if(!this._writableState)P0.nextTick(Z,this,q);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,P0.nextTick(Z,this,q)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(q||null,function(A){if(!W&&A)if(!I._writableState)P0.nextTick(Y,I,A);else if(!I._writableState.errorEmitted)I._writableState.errorEmitted=!0,P0.nextTick(Y,I,A);else P0.nextTick(Q,I);else if(W)P0.nextTick(Q,I),W(A);else P0.nextTick(Q,I)}),this}function Y(q,W){Z(q,W),Q(q)}function Q(q){if(q._writableState&&!q._writableState.emitClose)return;if(q._readableState&&!q._readableState.emitClose)return;q.emit("close")}function K(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(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 Z(q,W){q.emit("error",W)}function J(q,W){var{_readableState:I,_writableState:H}=q;if(I&&I.autoDestroy||H&&H.autoDestroy)q.destroy(W);else q.emit("error",W)}U.exports={destroy:G,undestroy:K,errorOrDestroy:J}}),c2=R0((B,U)=>{function G(W,I){W.prototype=Object.create(I.prototype),W.prototype.constructor=W,W.__proto__=I}var Y={};function Q(W,I,H){if(!H)H=Error;function T(P,j,E){if(typeof I==="string")return I;else return I(P,j,E)}var A=function(P){G(j,P);function j(E,C,N){return P.call(this,T(E,C,N))||this}return j}(H);A.prototype.name=H.name,A.prototype.code=W,Y[W]=A}function K(W,I){if(Array.isArray(W)){var H=W.length;if(W=W.map(function(T){return String(T)}),H>2)return"one of ".concat(I," ").concat(W.slice(0,H-1).join(", "),", or ")+W[H-1];else if(H===2)return"one of ".concat(I," ").concat(W[0]," or ").concat(W[1]);else return"of ".concat(I," ").concat(W[0])}else return"of ".concat(I," ").concat(String(W))}function Z(W,I,H){return W.substr(!H||H<0?0:+H,I.length)===I}function J(W,I,H){if(H===void 0||H>W.length)H=W.length;return W.substring(H-I.length,H)===I}function q(W,I,H){if(typeof H!=="number")H=0;if(H+I.length>W.length)return!1;else return W.indexOf(I,H)!==-1}Q("ERR_INVALID_OPT_VALUE",function(W,I){return'The value "'+I+'" is invalid for option "'+W+'"'},TypeError),Q("ERR_INVALID_ARG_TYPE",function(W,I,H){var T;if(typeof I==="string"&&Z(I,"not "))T="must not be",I=I.replace(/^not /,"");else T="must be";var A;if(J(W," argument"))A="The ".concat(W," ").concat(T," ").concat(K(I,"type"));else{var P=q(W,".")?"property":"argument";A='The "'.concat(W,'" ').concat(P," ").concat(T," ").concat(K(I,"type"))}return A+=". Received type ".concat(typeof H),A},TypeError),Q("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Q("ERR_METHOD_NOT_IMPLEMENTED",function(W){return"The "+W+" method is not implemented"}),Q("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Q("ERR_STREAM_DESTROYED",function(W){return"Cannot call "+W+" after a stream was destroyed"}),Q("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Q("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Q("ERR_STREAM_WRITE_AFTER_END","write after end"),Q("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Q("ERR_UNKNOWN_ENCODING",function(W){return"Unknown encoding: "+W},TypeError),Q("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),U.exports.codes=Y}),zB=R0((B,U)=>{var G=c2().codes.ERR_INVALID_OPT_VALUE;function Y(K,Z,J){return K.highWaterMark!=null?K.highWaterMark:Z?K[J]:null}function Q(K,Z,J,q){var W=Y(Z,q,J);if(W!=null){if(!(isFinite(W)&&Math.floor(W)===W)||W<0)throw new G(q?J:"highWaterMark",W);return Math.floor(W)}return K.objectMode?16:16384}U.exports={getHighWaterMark:Q}}),sU=R0((B,U)=>{d2(),U.exports=G;function G(Q,K){if(Y("noDeprecation"))return Q;var Z=!1;function J(){if(!Z){if(Y("throwDeprecation"))throw Error(K);else if(Y("traceDeprecation"))console.trace(K);else console.warn(K);Z=!0}return Q.apply(this,arguments)}return J}function Y(Q){try{if(!v0.localStorage)return!1}catch(Z){return!1}var K=v0.localStorage[Q];if(K==null)return!1;return String(K).toLowerCase()==="true"}}),wB=R0((B,U)=>{d2(),P2(),U.exports=z;function G(w){var L=this;this.next=null,this.entry=null,this.finish=function(){O0(L,w)}}var Y;z.WritableState=$;var Q={deprecate:sU()},K=qB(),Z=f1().Buffer,J=(typeof v0<"u"?v0:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function q(w){return Z.from(w)}function W(w){return Z.isBuffer(w)||w instanceof J}var I=NB(),H=zB().getHighWaterMark,T=c2().codes,A=T.ERR_INVALID_ARG_TYPE,P=T.ERR_METHOD_NOT_IMPLEMENTED,j=T.ERR_MULTIPLE_CALLBACK,E=T.ERR_STREAM_CANNOT_PIPE,C=T.ERR_STREAM_DESTROYED,N=T.ERR_STREAM_NULL_VALUES,v=T.ERR_STREAM_WRITE_AFTER_END,S=T.ERR_UNKNOWN_ENCODING,F=I.errorOrDestroy;W2()(z,K);function M(){}function $(w,L,u){if(Y=Y||u2(),w=w||{},typeof u!=="boolean")u=L instanceof Y;if(this.objectMode=!!w.objectMode,u)this.objectMode=this.objectMode||!!w.writableObjectMode;this.highWaterMark=H(this,w,"writableHighWaterMark",u),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=w.decodeStrings===!1;this.decodeStrings=!h,this.defaultEncoding=w.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Z0){i(L,Z0)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=w.emitClose!==!1,this.autoDestroy=!!w.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new G(this)}$.prototype.getBuffer=function(){var L=this.bufferedRequest,u=[];while(L)u.push(L),L=L.next;return u},function(){try{Object.defineProperty($.prototype,"buffer",{get:Q.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(w){}}();var x;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")x=Function.prototype[Symbol.hasInstance],Object.defineProperty(z,Symbol.hasInstance,{value:function(L){if(x.call(this,L))return!0;if(this!==z)return!1;return L&&L._writableState instanceof $}});else x=function(L){return L instanceof this};function z(w){Y=Y||u2();var L=this instanceof Y;if(!L&&!x.call(z,this))return new z(w);if(this._writableState=new $(w,this,L),this.writable=!0,w){if(typeof w.write==="function")this._write=w.write;if(typeof w.writev==="function")this._writev=w.writev;if(typeof w.destroy==="function")this._destroy=w.destroy;if(typeof w.final==="function")this._final=w.final}K.call(this)}z.prototype.pipe=function(){F(this,new E)};function a(w,L){var u=new v;F(w,u),P0.nextTick(L,u)}function U0(w,L,u,h){var Z0;if(u===null)Z0=new N;else if(typeof u!=="string"&&!L.objectMode)Z0=new A("chunk",["string","Buffer"],u);if(Z0)return F(w,Z0),P0.nextTick(h,Z0),!1;return!0}z.prototype.write=function(w,L,u){var h=this._writableState,Z0=!1,g=!h.objectMode&&W(w);if(g&&!Z.isBuffer(w))w=q(w);if(typeof L==="function")u=L,L=null;if(g)L="buffer";else if(!L)L=h.defaultEncoding;if(typeof u!=="function")u=M;if(h.ending)a(this,u);else if(g||U0(this,h,w,u))h.pendingcb++,Z0=c(this,h,g,w,L,u);return Z0},z.prototype.cork=function(){this._writableState.corked++},z.prototype.uncork=function(){var w=this._writableState;if(w.corked){if(w.corked--,!w.writing&&!w.corked&&!w.bufferProcessing&&w.bufferedRequest)G0(this,w)}},z.prototype.setDefaultEncoding=function(L){if(typeof L==="string")L=L.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((L+"").toLowerCase())>-1))throw new S(L);return this._writableState.defaultEncoding=L,this},Object.defineProperty(z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function b(w,L,u){if(!w.objectMode&&w.decodeStrings!==!1&&typeof L==="string")L=Z.from(L,u);return L}Object.defineProperty(z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function c(w,L,u,h,Z0,g){if(!u){var f=b(L,h,Z0);if(h!==f)u=!0,Z0="buffer",h=f}var R=L.objectMode?1:h.length;L.length+=R;var p=L.length{P2();var G=Object.keys||function(H){var T=[];for(var A in H)T.push(A);return T};U.exports=q;var Y=EB(),Q=wB();W2()(q,Y);var K=G(Q.prototype);for(var Z=0;Z{var G=f1(),Y=G.Buffer;function Q(Z,J){for(var q in Z)J[q]=Z[q]}if(Y.from&&Y.alloc&&Y.allocUnsafe&&Y.allocUnsafeSlow)U.exports=G;else Q(G,B),B.Buffer=K;function K(Z,J,q){return Y(Z,J,q)}Q(Y,K),K.from=function(Z,J,q){if(typeof Z==="number")throw TypeError("Argument must not be a number");return Y(Z,J,q)},K.alloc=function(Z,J,q){if(typeof Z!=="number")throw TypeError("Argument must be a number");var W=Y(Z);if(J!==void 0)if(typeof q==="string")W.fill(J,q);else W.fill(J);else W.fill(0);return W},K.allocUnsafe=function(Z){if(typeof Z!=="number")throw TypeError("Argument must be a number");return Y(Z)},K.allocUnsafeSlow=function(Z){if(typeof Z!=="number")throw TypeError("Argument must be a number");return G.SlowBuffer(Z)}}),F8=R0((B)=>{var U=oU().Buffer,G=U.isEncoding||function(N){switch(N=""+N,N&&N.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 Y(N){if(!N)return"utf8";var v;while(!0)switch(N){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 N;default:if(v)return;N=(""+N).toLowerCase(),v=!0}}function Q(N){var v=Y(N);if(typeof v!=="string"&&(U.isEncoding===G||!G(N)))throw Error("Unknown encoding: "+N);return v||N}B.StringDecoder=K;function K(N){this.encoding=Q(N);var v;switch(this.encoding){case"utf16le":this.text=T,this.end=A,v=4;break;case"utf8":this.fillLast=W,v=4;break;case"base64":this.text=P,this.end=j,v=3;break;default:this.write=E,this.end=C;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=U.allocUnsafe(v)}K.prototype.write=function(N){if(N.length===0)return"";var v,S;if(this.lastNeed){if(v=this.fillLast(N),v===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;if(S>5===6)return 2;else if(N>>4===14)return 3;else if(N>>3===30)return 4;return N>>6===2?-1:-2}function J(N,v,S){var F=v.length-1;if(F=0){if(M>0)N.lastNeed=M-1;return M}if(--F=0){if(M>0)N.lastNeed=M-2;return M}if(--F=0){if(M>0)if(M===2)M=0;else N.lastNeed=M-3;return M}return 0}function q(N,v,S){if((v[0]&192)!==128)return N.lastNeed=0,"�";if(N.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return N.lastNeed=1,"�";if(N.lastNeed>2&&v.length>2){if((v[2]&192)!==128)return N.lastNeed=2,"�"}}}function W(N){var v=this.lastTotal-this.lastNeed,S=q(this,N,v);if(S!==void 0)return S;if(this.lastNeed<=N.length)return N.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);N.copy(this.lastChar,v,0,N.length),this.lastNeed-=N.length}function I(N,v){var S=J(this,N,v);if(!this.lastNeed)return N.toString("utf8",v);this.lastTotal=S;var F=N.length-(S-this.lastNeed);return N.copy(this.lastChar,0,F),N.toString("utf8",v,F)}function H(N){var v=N&&N.length?this.write(N):"";if(this.lastNeed)return v+"�";return v}function T(N,v){if((N.length-v)%2===0){var S=N.toString("utf16le",v);if(S){var F=S.charCodeAt(S.length-1);if(F>=55296&&F<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=N[N.length-1],N.toString("utf16le",v,N.length-1)}function A(N){var v=N&&N.length?this.write(N):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,S)}return v}function P(N,v){var S=(N.length-v)%3;if(S===0)return N.toString("base64",v);if(this.lastNeed=3-S,this.lastTotal=3,S===1)this.lastChar[0]=N[N.length-1];else this.lastChar[0]=N[N.length-2],this.lastChar[1]=N[N.length-1];return N.toString("base64",v,N.length-S)}function j(N){var v=N&&N.length?this.write(N):"";if(this.lastNeed)return v+this.lastChar.toString("base64",0,3-this.lastNeed);return v}function E(N){return N.toString(this.encoding)}function C(N){return N&&N.length?this.write(N):""}}),f8=R0((B,U)=>{var G=c2().codes.ERR_STREAM_PREMATURE_CLOSE;function Y(J){var q=!1;return function(){if(q)return;q=!0;for(var W=arguments.length,I=Array(W),H=0;H{P2();var G;function Y(S,F,M){if(F=Q(F),F in S)Object.defineProperty(S,F,{value:M,enumerable:!0,configurable:!0,writable:!0});else S[F]=M;return S}function Q(S){var F=K(S,"string");return typeof F==="symbol"?F:String(F)}function K(S,F){if(typeof S!=="object"||S===null)return S;var M=S[Symbol.toPrimitive];if(M!==void 0){var $=M.call(S,F||"default");if(typeof $!=="object")return $;throw TypeError("@@toPrimitive must return a primitive value.")}return(F==="string"?String:Number)(S)}var Z=f8(),J=Symbol("lastResolve"),q=Symbol("lastReject"),W=Symbol("error"),I=Symbol("ended"),H=Symbol("lastPromise"),T=Symbol("handlePromise"),A=Symbol("stream");function P(S,F){return{value:S,done:F}}function j(S){var F=S[J];if(F!==null){var M=S[A].read();if(M!==null)S[H]=null,S[J]=null,S[q]=null,F(P(M,!1))}}function E(S){P0.nextTick(j,S)}function C(S,F){return function(M,$){S.then(function(){if(F[I]){M(P(void 0,!0));return}F[T](M,$)},$)}}var N=Object.getPrototypeOf(function(){}),v=Object.setPrototypeOf((G={get stream(){return this[A]},next:function(){var F=this,M=this[W];if(M!==null)return Promise.reject(M);if(this[I])return Promise.resolve(P(void 0,!0));if(this[A].destroyed)return new Promise(function(a,U0){P0.nextTick(function(){if(F[W])U0(F[W]);else a(P(void 0,!0))})});var $=this[H],x;if($)x=new Promise(C($,this));else{var z=this[A].read();if(z!==null)return Promise.resolve(P(z,!1));x=new Promise(this[T])}return this[H]=x,x}},Y(G,Symbol.asyncIterator,function(){return this}),Y(G,"return",function(){var F=this;return new Promise(function(M,$){F[A].destroy(null,function(x){if(x){$(x);return}M(P(void 0,!0))})})}),G),N);U.exports=function(F){var M,$=Object.create(v,(M={},Y(M,A,{value:F,writable:!0}),Y(M,J,{value:null,writable:!0}),Y(M,q,{value:null,writable:!0}),Y(M,W,{value:null,writable:!0}),Y(M,I,{value:F._readableState.endEmitted,writable:!0}),Y(M,T,{value:function(z,a){var U0=$[A].read();if(U0)$[H]=null,$[J]=null,$[q]=null,z(P(U0,!1));else $[J]=z,$[q]=a},writable:!0}),M));return $[H]=null,Z(F,function(x){if(x&&x.code!=="ERR_STREAM_PREMATURE_CLOSE"){var z=$[q];if(z!==null)$[H]=null,$[J]=null,$[q]=null,z(x);$[W]=x;return}var a=$[J];if(a!==null)$[H]=null,$[J]=null,$[q]=null,a(P(void 0,!0));$[I]=!0}),F.on("readable",E.bind(null,$)),$}}),eU=R0((B,U)=>{U.exports=function(){throw Error("Readable.from is not available in the browser")}}),EB=R0((B,U)=>{d2(),P2(),U.exports=a;var G;a.ReadableState=z,S8().EventEmitter;var Y=function(f,R){return f.listeners(R).length},Q=qB(),K=f1().Buffer,Z=(typeof v0<"u"?v0:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function J(g){return K.from(g)}function q(g){return K.isBuffer(g)||g instanceof Z}var W=jB(),I;if(W&&W.debuglog)I=W.debuglog("stream");else I=function(){};var H=nU(),T=NB(),A=zB().getHighWaterMark,P=c2().codes,j=P.ERR_INVALID_ARG_TYPE,E=P.ERR_STREAM_PUSH_AFTER_EOF,C=P.ERR_METHOD_NOT_IMPLEMENTED,N=P.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,v,S,F;W2()(a,Q);var M=T.errorOrDestroy,$=["error","close","destroy","pause","resume"];function x(g,f,R){if(typeof g.prependListener==="function")return g.prependListener(f,R);if(!g._events||!g._events[f])g.on(f,R);else if(Array.isArray(g._events[f]))g._events[f].unshift(R);else g._events[f]=[R,g._events[f]]}function z(g,f,R){if(G=G||u2(),g=g||{},typeof R!=="boolean")R=f instanceof G;if(this.objectMode=!!g.objectMode,R)this.objectMode=this.objectMode||!!g.readableObjectMode;if(this.highWaterMark=A(this,g,"readableHighWaterMark",R),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=g.emitClose!==!1,this.autoDestroy=!!g.autoDestroy,this.destroyed=!1,this.defaultEncoding=g.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,g.encoding){if(!v)v=F8().StringDecoder;this.decoder=new v(g.encoding),this.encoding=g.encoding}}function a(g){if(G=G||u2(),!(this instanceof a))return new a(g);var f=this instanceof G;if(this._readableState=new z(g,this,f),this.readable=!0,g){if(typeof g.read==="function")this._read=g.read;if(typeof g.destroy==="function")this._destroy=g.destroy}Q.call(this)}Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(f){if(!this._readableState)return;this._readableState.destroyed=f}}),a.prototype.destroy=T.destroy,a.prototype._undestroy=T.undestroy,a.prototype._destroy=function(g,f){f(g)},a.prototype.push=function(g,f){var R=this._readableState,p;if(!R.objectMode){if(typeof g==="string"){if(f=f||R.defaultEncoding,f!==R.encoding)g=K.from(g,f),f="";p=!0}}else p=!0;return U0(this,g,f,!1,p)},a.prototype.unshift=function(g){return U0(this,g,null,!0,!1)};function U0(g,f,R,p,k){I("readableAddChunk",f);var V=g._readableState;if(f===null)V.reading=!1,i(g,V);else{var X;if(!k)X=c(V,f);if(X)M(g,X);else if(V.objectMode||f&&f.length>0){if(typeof f!=="string"&&!V.objectMode&&Object.getPrototypeOf(f)!==K.prototype)f=J(f);if(p)if(V.endEmitted)M(g,new N);else b(g,V,f,!0);else if(V.ended)M(g,new E);else if(V.destroyed)return!1;else if(V.reading=!1,V.decoder&&!R)if(f=V.decoder.write(f),V.objectMode||f.length!==0)b(g,V,f,!1);else G0(g,V);else b(g,V,f,!1)}else if(!p)V.reading=!1,G0(g,V)}return!V.ended&&(V.length=D)g=D;else g--,g|=g>>>1,g|=g>>>2,g|=g>>>4,g|=g>>>8,g|=g>>>16,g++;return g}function B0(g,f){if(g<=0||f.length===0&&f.ended)return 0;if(f.objectMode)return 1;if(g!==g)if(f.flowing&&f.length)return f.buffer.head.data.length;else return f.length;if(g>f.highWaterMark)f.highWaterMark=m(g);if(g<=f.length)return g;if(!f.ended)return f.needReadable=!0,0;return f.length}a.prototype.read=function(g){I("read",g),g=parseInt(g,10);var f=this._readableState,R=g;if(g!==0)f.emittedReadable=!1;if(g===0&&f.needReadable&&((f.highWaterMark!==0?f.length>=f.highWaterMark:f.length>0)||f.ended)){if(I("read: emitReadable",f.length,f.ended),f.length===0&&f.ended)u(this);else V0(this);return null}if(g=B0(g,f),g===0&&f.ended){if(f.length===0)u(this);return null}var p=f.needReadable;if(I("need readable",p),f.length===0||f.length-g0)k=L(g,f);else k=null;if(k===null)f.needReadable=f.length<=f.highWaterMark,g=0;else f.length-=g,f.awaitDrain=0;if(f.length===0){if(!f.ended)f.needReadable=!0;if(R!==g&&f.ended)u(this)}if(k!==null)this.emit("data",k);return k};function i(g,f){if(I("onEofChunk"),f.ended)return;if(f.decoder){var R=f.decoder.end();if(R&&R.length)f.buffer.push(R),f.length+=f.objectMode?1:R.length}if(f.ended=!0,f.sync)V0(g);else if(f.needReadable=!1,!f.emittedReadable)f.emittedReadable=!0,s(g)}function V0(g){var f=g._readableState;if(I("emitReadable",f.needReadable,f.emittedReadable),f.needReadable=!1,!f.emittedReadable)I("emitReadable",f.flowing),f.emittedReadable=!0,P0.nextTick(s,g)}function s(g){var f=g._readableState;if(I("emitReadable_",f.destroyed,f.length,f.ended),!f.destroyed&&(f.length||f.ended))g.emit("readable"),f.emittedReadable=!1;f.needReadable=!f.flowing&&!f.ended&&f.length<=f.highWaterMark,w(g)}function G0(g,f){if(!f.readingMore)f.readingMore=!0,P0.nextTick(r,g,f)}function r(g,f){while(!f.reading&&!f.ended&&(f.length1&&Z0(p.pipes,g)!==-1)&&!_)I("false write response, pause",p.awaitDrain),p.awaitDrain++;R.pause()}}function Q0(F0){if(I("onerror",F0),I0(),g.removeListener("error",Q0),Y(g,"error")===0)M(g,F0)}x(g,"error",Q0);function X0(){g.removeListener("finish",K0),I0()}g.once("close",X0);function K0(){I("onfinish"),g.removeListener("close",X0),I0()}g.once("finish",K0);function I0(){I("unpipe"),R.unpipe(g)}if(g.emit("pipe",R),!p.flowing)I("pipe resume"),R.resume();return g};function y(g){return function(){var R=g._readableState;if(I("pipeOnDrain",R.awaitDrain),R.awaitDrain)R.awaitDrain--;if(R.awaitDrain===0&&Y(g,"data"))R.flowing=!0,w(g)}}a.prototype.unpipe=function(g){var f=this._readableState,R={hasUnpiped:!1};if(f.pipesCount===0)return this;if(f.pipesCount===1){if(g&&g!==f.pipes)return this;if(!g)g=f.pipes;if(f.pipes=null,f.pipesCount=0,f.flowing=!1,g)g.emit("unpipe",this,R);return this}if(!g){var{pipes:p,pipesCount:k}=f;f.pipes=null,f.pipesCount=0,f.flowing=!1;for(var V=0;V0,p.flowing!==!1)this.resume()}else if(g==="readable"){if(!p.endEmitted&&!p.readableListening){if(p.readableListening=p.needReadable=!0,p.flowing=!1,p.emittedReadable=!1,I("on readable",p.length,p.reading),p.length)V0(this);else if(!p.reading)P0.nextTick(o,this)}}return R},a.prototype.addListener=a.prototype.on,a.prototype.removeListener=function(g,f){var R=Q.prototype.removeListener.call(this,g,f);if(g==="readable")P0.nextTick(n,this);return R},a.prototype.removeAllListeners=function(g){var f=Q.prototype.removeAllListeners.apply(this,arguments);if(g==="readable"||g===void 0)P0.nextTick(n,this);return f};function n(g){var f=g._readableState;if(f.readableListening=g.listenerCount("readable")>0,f.resumeScheduled&&!f.paused)f.flowing=!0;else if(g.listenerCount("data")>0)g.resume()}function o(g){I("readable nexttick read 0"),g.read(0)}a.prototype.resume=function(){var g=this._readableState;if(!g.flowing)I("resume"),g.flowing=!g.readableListening,Y0(this,g);return g.paused=!1,this};function Y0(g,f){if(!f.resumeScheduled)f.resumeScheduled=!0,P0.nextTick(O0,g,f)}function O0(g,f){if(I("resume",f.reading),!f.reading)g.read(0);if(f.resumeScheduled=!1,g.emit("resume"),w(g),f.flowing&&!f.reading)g.read(0)}a.prototype.pause=function(){if(I("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)I("pause"),this._readableState.flowing=!1,this.emit("pause");return this._readableState.paused=!0,this};function w(g){var f=g._readableState;I("flow",f.flowing);while(f.flowing&&g.read()!==null);}if(a.prototype.wrap=function(g){var f=this,R=this._readableState,p=!1;g.on("end",function(){if(I("wrapped end"),R.decoder&&!R.ended){var X=R.decoder.end();if(X&&X.length)f.push(X)}f.push(null)}),g.on("data",function(X){if(I("wrapped data"),R.decoder)X=R.decoder.write(X);if(R.objectMode&&(X===null||X===void 0))return;else if(!R.objectMode&&(!X||!X.length))return;if(!f.push(X))p=!0,g.pause()});for(var k in g)if(this[k]===void 0&&typeof g[k]==="function")this[k]=function(O){return function(){return g[O].apply(g,arguments)}}(k);for(var V=0;V<$.length;V++)g.on($[V],this.emit.bind(this,$[V]));return this._read=function(X){if(I("wrapped _read",X),p)p=!1,g.resume()},this},typeof Symbol==="function")a.prototype[Symbol.asyncIterator]=function(){if(S===void 0)S=tU();return S(this)};Object.defineProperty(a.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(a.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(a.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(f){if(this._readableState)this._readableState.flowing=f}}),a._fromList=L,Object.defineProperty(a.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function L(g,f){if(f.length===0)return null;var R;if(f.objectMode)R=f.buffer.shift();else if(!g||g>=f.length){if(f.decoder)R=f.buffer.join("");else if(f.buffer.length===1)R=f.buffer.first();else R=f.buffer.concat(f.length);f.buffer.clear()}else R=f.buffer.consume(g,f.decoder);return R}function u(g){var f=g._readableState;if(I("endReadable",f.endEmitted),!f.endEmitted)f.ended=!0,P0.nextTick(h,f,g)}function h(g,f){if(I("endReadableNT",g.endEmitted,g.length),!g.endEmitted&&g.length===0){if(g.endEmitted=!0,f.readable=!1,f.emit("end"),g.autoDestroy){var R=f._writableState;if(!R||R.autoDestroy&&R.finished)f.destroy()}}}if(typeof Symbol==="function")a.from=function(g,f){if(F===void 0)F=eU();return F(a,g,f)};function Z0(g,f){for(var R=0,p=g.length;R{U.exports=W;var G=c2().codes,Y=G.ERR_METHOD_NOT_IMPLEMENTED,Q=G.ERR_MULTIPLE_CALLBACK,K=G.ERR_TRANSFORM_ALREADY_TRANSFORMING,Z=G.ERR_TRANSFORM_WITH_LENGTH_0,J=u2();W2()(W,J);function q(T,A){var P=this._transformState;P.transforming=!1;var j=P.writecb;if(j===null)return this.emit("error",new Q);if(P.writechunk=null,P.writecb=null,A!=null)this.push(A);j(T);var E=this._readableState;if(E.reading=!1,E.needReadable||E.length{U.exports=Y;var G=DB();W2()(Y,G);function Y(Q){if(!(this instanceof Y))return new Y(Q);G.call(this,Q)}Y.prototype._transform=function(Q,K,Z){Z(null,Q)}}),UG=R0((B,U)=>{var G;function Y(P){var j=!1;return function(){if(j)return;j=!0,P.apply(void 0,arguments)}}var Q=c2().codes,K=Q.ERR_MISSING_ARGS,Z=Q.ERR_STREAM_DESTROYED;function J(P){if(P)throw P}function q(P){return P.setHeader&&typeof P.abort==="function"}function W(P,j,E,C){C=Y(C);var N=!1;if(P.on("close",function(){N=!0}),G===void 0)G=f8();G(P,{readable:j,writable:E},function(S){if(S)return C(S);N=!0,C()});var v=!1;return function(S){if(N)return;if(v)return;if(v=!0,q(P))return P.abort();if(typeof P.destroy==="function")return P.destroy();C(S||new Z("pipe"))}}function I(P){P()}function H(P,j){return P.pipe(j)}function T(P){if(!P.length)return J;if(typeof P[P.length-1]!=="function")return J;return P.pop()}function A(){for(var P=arguments.length,j=Array(P),E=0;E0,function($){if(!N)N=$;if($)v.forEach(I);if(M)return;v.forEach(I),C(N)})});return j.reduce(H)}U.exports=A}),x8=R0((B,U)=>{U.exports=Y;var G=S8().EventEmitter;W2()(Y,G),Y.Readable=EB(),Y.Writable=wB(),Y.Duplex=u2(),Y.Transform=DB(),Y.PassThrough=BG(),Y.finished=f8(),Y.pipeline=UG(),Y.Stream=Y;function Y(){G.call(this)}Y.prototype.pipe=function(Q,K){var Z=this;function J(P){if(Q.writable){if(Q.write(P)===!1&&Z.pause)Z.pause()}}Z.on("data",J);function q(){if(Z.readable&&Z.resume)Z.resume()}if(Q.on("drain",q),!Q._isStdio&&(!K||K.end!==!1))Z.on("end",I),Z.on("close",H);var W=!1;function I(){if(W)return;W=!0,Q.end()}function H(){if(W)return;if(W=!0,typeof Q.destroy==="function")Q.destroy()}function T(P){if(A(),G.listenerCount(this,"error")===0)throw P}Z.on("error",T),Q.on("error",T);function A(){Z.removeListener("data",J),Q.removeListener("drain",q),Z.removeListener("end",I),Z.removeListener("close",H),Z.removeListener("error",T),Q.removeListener("error",T),Z.removeListener("end",A),Z.removeListener("close",A),Q.removeListener("close",A)}return Z.on("end",A),Z.on("close",A),Q.on("close",A),Q.emit("pipe",Z),Q}}),GG=R0((B)=>{(function(U){U.parser=function(w,L){return new Y(w,L)},U.SAXParser=Y,U.SAXStream=I,U.createStream=W,U.MAX_BUFFER_LENGTH=65536;var G=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];U.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function Y(w,L){if(!(this instanceof Y))return new Y(w,L);var u=this;if(K(u),u.q=u.c="",u.bufferCheckPosition=U.MAX_BUFFER_LENGTH,u.opt=L||{},u.opt.lowercase=u.opt.lowercase||u.opt.lowercasetags,u.looseCase=u.opt.lowercase?"toLowerCase":"toUpperCase",u.tags=[],u.closed=u.closedRoot=u.sawRoot=!1,u.tag=u.error=null,u.strict=!!w,u.noscript=!!(w||u.opt.noscript),u.state=z.BEGIN,u.strictEntities=u.opt.strictEntities,u.ENTITIES=u.strictEntities?Object.create(U.XML_ENTITIES):Object.create(U.ENTITIES),u.attribList=[],u.opt.xmlns)u.ns=Object.create(j);if(u.trackPosition=u.opt.position!==!1,u.trackPosition)u.position=u.line=u.column=0;U0(u,"onready")}if(!Object.create)Object.create=function(w){function L(){}return L.prototype=w,new L};if(!Object.keys)Object.keys=function(w){var L=[];for(var u in w)if(w.hasOwnProperty(u))L.push(u);return L};function Q(w){var L=Math.max(U.MAX_BUFFER_LENGTH,10),u=0;for(var h=0,Z0=G.length;hL)switch(G[h]){case"textNode":c(w);break;case"cdata":b(w,"oncdata",w.cdata),w.cdata="";break;case"script":b(w,"onscript",w.script),w.script="";break;default:m(w,"Max buffer length exceeded: "+G[h])}u=Math.max(u,g)}w.bufferCheckPosition=U.MAX_BUFFER_LENGTH-u+w.position}function K(w){for(var L=0,u=G.length;L"||S(w)}function $(w,L){return w.test(L)}function x(w,L){return!$(w,L)}var z=0;U.STATE={BEGIN:z++,BEGIN_WHITESPACE:z++,TEXT:z++,TEXT_ENTITY:z++,OPEN_WAKA:z++,SGML_DECL:z++,SGML_DECL_QUOTED:z++,DOCTYPE:z++,DOCTYPE_QUOTED:z++,DOCTYPE_DTD:z++,DOCTYPE_DTD_QUOTED:z++,COMMENT_STARTING:z++,COMMENT:z++,COMMENT_ENDING:z++,COMMENT_ENDED:z++,CDATA:z++,CDATA_ENDING:z++,CDATA_ENDING_2:z++,PROC_INST:z++,PROC_INST_BODY:z++,PROC_INST_ENDING:z++,OPEN_TAG:z++,OPEN_TAG_SLASH:z++,ATTRIB:z++,ATTRIB_NAME:z++,ATTRIB_NAME_SAW_WHITE:z++,ATTRIB_VALUE:z++,ATTRIB_VALUE_QUOTED:z++,ATTRIB_VALUE_CLOSED:z++,ATTRIB_VALUE_UNQUOTED:z++,ATTRIB_VALUE_ENTITY_Q:z++,ATTRIB_VALUE_ENTITY_U:z++,CLOSE_TAG:z++,CLOSE_TAG_SAW_WHITE:z++,SCRIPT:z++,SCRIPT_ENDING:z++},U.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},U.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(U.ENTITIES).forEach(function(w){var L=U.ENTITIES[w],u=typeof L==="number"?String.fromCharCode(L):L;U.ENTITIES[w]=u});for(var a in U.STATE)U.STATE[U.STATE[a]]=a;z=U.STATE;function U0(w,L,u){w[L]&&w[L](u)}function b(w,L,u){if(w.textNode)c(w);U0(w,L,u)}function c(w){if(w.textNode=D(w.opt,w.textNode),w.textNode)U0(w,"ontext",w.textNode);w.textNode=""}function D(w,L){if(w.trim)L=L.trim();if(w.normalize)L=L.replace(/\s+/g," ");return L}function m(w,L){if(c(w),w.trackPosition)L+=` -Line: `+w.line+` -Column: `+w.column+` -Char: `+w.c;return L=Error(L),w.error=L,U0(w,"onerror",L),w}function B0(w){if(w.sawRoot&&!w.closedRoot)i(w,"Unclosed root tag");if(w.state!==z.BEGIN&&w.state!==z.BEGIN_WHITESPACE&&w.state!==z.TEXT)m(w,"Unexpected end");return c(w),w.c="",w.closed=!0,U0(w,"onend"),Y.call(w,w.strict,w.opt),w}function i(w,L){if(typeof w!=="object"||!(w instanceof Y))throw Error("bad call to strictFail");if(w.strict)m(w,L)}function V0(w){if(!w.strict)w.tagName=w.tagName[w.looseCase]();var L=w.tags[w.tags.length-1]||w,u=w.tag={name:w.tagName,attributes:{}};if(w.opt.xmlns)u.ns=L.ns;w.attribList.length=0,b(w,"onopentagstart",u)}function s(w,L){var u=w.indexOf(":")<0?["",w]:w.split(":"),h=u[0],Z0=u[1];if(L&&w==="xmlns")h="xmlns",Z0="";return{prefix:h,local:Z0}}function G0(w){if(!w.strict)w.attribName=w.attribName[w.looseCase]();if(w.attribList.indexOf(w.attribName)!==-1||w.tag.attributes.hasOwnProperty(w.attribName)){w.attribName=w.attribValue="";return}if(w.opt.xmlns){var L=s(w.attribName,!0),u=L.prefix,h=L.local;if(u==="xmlns")if(h==="xml"&&w.attribValue!==A)i(w,"xml: prefix must be bound to "+A+` -Actual: `+w.attribValue);else if(h==="xmlns"&&w.attribValue!==P)i(w,"xmlns: prefix must be bound to "+P+` -Actual: `+w.attribValue);else{var Z0=w.tag,g=w.tags[w.tags.length-1]||w;if(Z0.ns===g.ns)Z0.ns=Object.create(g.ns);Z0.ns[h]=w.attribValue}w.attribList.push([w.attribName,w.attribValue])}else w.tag.attributes[w.attribName]=w.attribValue,b(w,"onattribute",{name:w.attribName,value:w.attribValue});w.attribName=w.attribValue=""}function r(w,L){if(w.opt.xmlns){var u=w.tag,h=s(w.tagName);if(u.prefix=h.prefix,u.local=h.local,u.uri=u.ns[h.prefix]||"",u.prefix&&!u.uri)i(w,"Unbound namespace prefix: "+JSON.stringify(w.tagName)),u.uri=h.prefix;var Z0=w.tags[w.tags.length-1]||w;if(u.ns&&Z0.ns!==u.ns)Object.keys(u.ns).forEach(function(d){b(w,"onopennamespace",{prefix:d,uri:u.ns[d]})});for(var g=0,f=w.attribList.length;g",w.tagName="",w.state=z.SCRIPT;return}b(w,"onscript",w.script),w.script=""}var L=w.tags.length,u=w.tagName;if(!w.strict)u=u[w.looseCase]();var h=u;while(L--)if(w.tags[L].name!==h)i(w,"Unexpected close tag");else break;if(L<0){i(w,"Unmatched closing tag: "+w.tagName),w.textNode+="",w.state=z.TEXT;return}w.tagName=u;var Z0=w.tags.length;while(Z0-- >L){var g=w.tag=w.tags.pop();w.tagName=w.tag.name,b(w,"onclosetag",w.tagName);var f={};for(var R in g.ns)f[R]=g.ns[R];var p=w.tags[w.tags.length-1]||w;if(w.opt.xmlns&&g.ns!==p.ns)Object.keys(g.ns).forEach(function(k){var V=g.ns[k];b(w,"onclosenamespace",{prefix:k,uri:V})})}if(L===0)w.closedRoot=!0;w.tagName=w.attribValue=w.attribName="",w.attribList.length=0,w.state=z.TEXT}function n(w){var L=w.entity,u=L.toLowerCase(),h,Z0="";if(w.ENTITIES[L])return w.ENTITIES[L];if(w.ENTITIES[u])return w.ENTITIES[u];if(L=u,L.charAt(0)==="#")if(L.charAt(1)==="x")L=L.slice(2),h=parseInt(L,16),Z0=h.toString(16);else L=L.slice(1),h=parseInt(L,10),Z0=h.toString(10);if(L=L.replace(/^0+/,""),isNaN(h)||Z0.toLowerCase()!==L)return i(w,"Invalid character entity"),"&"+w.entity+";";return String.fromCodePoint(h)}function o(w,L){if(L==="<")w.state=z.OPEN_WAKA,w.startTagPosition=w.position;else if(!S(L))i(w,"Non-whitespace before first tag."),w.textNode=L,w.state=z.TEXT}function Y0(w,L){var u="";if(L")b(L,"onsgmldeclaration",L.sgmlDecl),L.sgmlDecl="",L.state=z.TEXT;else if(F(h))L.state=z.SGML_DECL_QUOTED,L.sgmlDecl+=h;else L.sgmlDecl+=h;continue;case z.SGML_DECL_QUOTED:if(h===L.q)L.state=z.SGML_DECL,L.q="";L.sgmlDecl+=h;continue;case z.DOCTYPE:if(h===">")L.state=z.TEXT,b(L,"ondoctype",L.doctype),L.doctype=!0;else if(L.doctype+=h,h==="[")L.state=z.DOCTYPE_DTD;else if(F(h))L.state=z.DOCTYPE_QUOTED,L.q=h;continue;case z.DOCTYPE_QUOTED:if(L.doctype+=h,h===L.q)L.q="",L.state=z.DOCTYPE;continue;case z.DOCTYPE_DTD:if(L.doctype+=h,h==="]")L.state=z.DOCTYPE;else if(F(h))L.state=z.DOCTYPE_DTD_QUOTED,L.q=h;continue;case z.DOCTYPE_DTD_QUOTED:if(L.doctype+=h,h===L.q)L.state=z.DOCTYPE_DTD,L.q="";continue;case z.COMMENT:if(h==="-")L.state=z.COMMENT_ENDING;else L.comment+=h;continue;case z.COMMENT_ENDING:if(h==="-"){if(L.state=z.COMMENT_ENDED,L.comment=D(L.opt,L.comment),L.comment)b(L,"oncomment",L.comment);L.comment=""}else L.comment+="-"+h,L.state=z.COMMENT;continue;case z.COMMENT_ENDED:if(h!==">")i(L,"Malformed comment"),L.comment+="--"+h,L.state=z.COMMENT;else L.state=z.TEXT;continue;case z.CDATA:if(h==="]")L.state=z.CDATA_ENDING;else L.cdata+=h;continue;case z.CDATA_ENDING:if(h==="]")L.state=z.CDATA_ENDING_2;else L.cdata+="]"+h,L.state=z.CDATA;continue;case z.CDATA_ENDING_2:if(h===">"){if(L.cdata)b(L,"oncdata",L.cdata);b(L,"onclosecdata"),L.cdata="",L.state=z.TEXT}else if(h==="]")L.cdata+="]";else L.cdata+="]]"+h,L.state=z.CDATA;continue;case z.PROC_INST:if(h==="?")L.state=z.PROC_INST_ENDING;else if(S(h))L.state=z.PROC_INST_BODY;else L.procInstName+=h;continue;case z.PROC_INST_BODY:if(!L.procInstBody&&S(h))continue;else if(h==="?")L.state=z.PROC_INST_ENDING;else L.procInstBody+=h;continue;case z.PROC_INST_ENDING:if(h===">")b(L,"onprocessinginstruction",{name:L.procInstName,body:L.procInstBody}),L.procInstName=L.procInstBody="",L.state=z.TEXT;else L.procInstBody+="?"+h,L.state=z.PROC_INST_BODY;continue;case z.OPEN_TAG:if($(C,h))L.tagName+=h;else if(V0(L),h===">")r(L);else if(h==="/")L.state=z.OPEN_TAG_SLASH;else{if(!S(h))i(L,"Invalid character in tag name");L.state=z.ATTRIB}continue;case z.OPEN_TAG_SLASH:if(h===">")r(L,!0),y(L);else i(L,"Forward-slash in opening tag not followed by >"),L.state=z.ATTRIB;continue;case z.ATTRIB:if(S(h))continue;else if(h===">")r(L);else if(h==="/")L.state=z.OPEN_TAG_SLASH;else if($(E,h))L.attribName=h,L.attribValue="",L.state=z.ATTRIB_NAME;else i(L,"Invalid attribute name");continue;case z.ATTRIB_NAME:if(h==="=")L.state=z.ATTRIB_VALUE;else if(h===">")i(L,"Attribute without value"),L.attribValue=L.attribName,G0(L),r(L);else if(S(h))L.state=z.ATTRIB_NAME_SAW_WHITE;else if($(C,h))L.attribName+=h;else i(L,"Invalid attribute name");continue;case z.ATTRIB_NAME_SAW_WHITE:if(h==="=")L.state=z.ATTRIB_VALUE;else if(S(h))continue;else if(i(L,"Attribute without value"),L.tag.attributes[L.attribName]="",L.attribValue="",b(L,"onattribute",{name:L.attribName,value:""}),L.attribName="",h===">")r(L);else if($(E,h))L.attribName=h,L.state=z.ATTRIB_NAME;else i(L,"Invalid attribute name"),L.state=z.ATTRIB;continue;case z.ATTRIB_VALUE:if(S(h))continue;else if(F(h))L.q=h,L.state=z.ATTRIB_VALUE_QUOTED;else i(L,"Unquoted attribute value"),L.state=z.ATTRIB_VALUE_UNQUOTED,L.attribValue=h;continue;case z.ATTRIB_VALUE_QUOTED:if(h!==L.q){if(h==="&")L.state=z.ATTRIB_VALUE_ENTITY_Q;else L.attribValue+=h;continue}G0(L),L.q="",L.state=z.ATTRIB_VALUE_CLOSED;continue;case z.ATTRIB_VALUE_CLOSED:if(S(h))L.state=z.ATTRIB;else if(h===">")r(L);else if(h==="/")L.state=z.OPEN_TAG_SLASH;else if($(E,h))i(L,"No whitespace between attributes"),L.attribName=h,L.attribValue="",L.state=z.ATTRIB_NAME;else i(L,"Invalid attribute name");continue;case z.ATTRIB_VALUE_UNQUOTED:if(!M(h)){if(h==="&")L.state=z.ATTRIB_VALUE_ENTITY_U;else L.attribValue+=h;continue}if(G0(L),h===">")r(L);else L.state=z.ATTRIB;continue;case z.CLOSE_TAG:if(!L.tagName)if(S(h))continue;else if(x(E,h))if(L.script)L.script+="")y(L);else if($(C,h))L.tagName+=h;else if(L.script)L.script+="")y(L);else i(L,"Invalid characters in closing tag");continue;case z.TEXT_ENTITY:case z.ATTRIB_VALUE_ENTITY_Q:case z.ATTRIB_VALUE_ENTITY_U:var f,R;switch(L.state){case z.TEXT_ENTITY:f=z.TEXT,R="textNode";break;case z.ATTRIB_VALUE_ENTITY_Q:f=z.ATTRIB_VALUE_QUOTED,R="attribValue";break;case z.ATTRIB_VALUE_ENTITY_U:f=z.ATTRIB_VALUE_UNQUOTED,R="attribValue";break}if(h===";")L[R]+=n(L),L.entity="",L.state=f;else if($(L.entity.length?v:N,h))L.entity+=h;else i(L,"Invalid character in entity name"),L[R]+="&"+L.entity+h,L.entity="",L.state=f;continue;default:throw Error(L,"Unknown state: "+L.state)}}if(L.position>=L.bufferCheckPosition)Q(L);return L}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */if(!String.fromCodePoint)(function(){var w=String.fromCharCode,L=Math.floor,u=function(){var h=16384,Z0=[],g,f,R=-1,p=arguments.length;if(!p)return"";var k="";while(++R1114111||L(V)!==V)throw RangeError("Invalid code point: "+V);if(V<=65535)Z0.push(V);else V-=65536,g=(V>>10)+55296,f=V%1024+56320,Z0.push(g,f);if(R+1===p||Z0.length>h)k+=w.apply(null,Z0),Z0.length=0}return k};if(Object.defineProperty)Object.defineProperty(String,"fromCodePoint",{value:u,configurable:!0,writable:!0});else String.fromCodePoint=u})()})(typeof B>"u"?B.sax={}:B)}),_8=R0((B,U)=>{U.exports={isArray:function(G){if(Array.isArray)return Array.isArray(G);return Object.prototype.toString.call(G)==="[object Array]"}}}),h8=R0((B,U)=>{var G=_8().isArray;U.exports={copyOptions:function(Y){var Q,K={};for(Q in Y)if(Y.hasOwnProperty(Q))K[Q]=Y[Q];return K},ensureFlagExists:function(Y,Q){if(!(Y in Q)||typeof Q[Y]!=="boolean")Q[Y]=!1},ensureSpacesExists:function(Y){if(!("spaces"in Y)||typeof Y.spaces!=="number"&&typeof Y.spaces!=="string")Y.spaces=0},ensureAlwaysArrayExists:function(Y){if(!("alwaysArray"in Y)||typeof Y.alwaysArray!=="boolean"&&!G(Y.alwaysArray))Y.alwaysArray=!1},ensureKeyExists:function(Y,Q){if(!(Y+"Key"in Q)||typeof Q[Y+"Key"]!=="string")Q[Y+"Key"]=Q.compact?"_"+Y:Y},checkFnExists:function(Y,Q){return Y+"Fn"in Q}}}),TB=R0((B,U)=>{var G=GG(),Y={on:function(){},parse:function(){}},Q=h8(),K=_8().isArray,Z,J=!0,q;function W(F){return Z=Q.copyOptions(F),Q.ensureFlagExists("ignoreDeclaration",Z),Q.ensureFlagExists("ignoreInstruction",Z),Q.ensureFlagExists("ignoreAttributes",Z),Q.ensureFlagExists("ignoreText",Z),Q.ensureFlagExists("ignoreComment",Z),Q.ensureFlagExists("ignoreCdata",Z),Q.ensureFlagExists("ignoreDoctype",Z),Q.ensureFlagExists("compact",Z),Q.ensureFlagExists("alwaysChildren",Z),Q.ensureFlagExists("addParent",Z),Q.ensureFlagExists("trim",Z),Q.ensureFlagExists("nativeType",Z),Q.ensureFlagExists("nativeTypeAttributes",Z),Q.ensureFlagExists("sanitize",Z),Q.ensureFlagExists("instructionHasAttributes",Z),Q.ensureFlagExists("captureSpacesBetweenElements",Z),Q.ensureAlwaysArrayExists(Z),Q.ensureKeyExists("declaration",Z),Q.ensureKeyExists("instruction",Z),Q.ensureKeyExists("attributes",Z),Q.ensureKeyExists("text",Z),Q.ensureKeyExists("comment",Z),Q.ensureKeyExists("cdata",Z),Q.ensureKeyExists("doctype",Z),Q.ensureKeyExists("type",Z),Q.ensureKeyExists("name",Z),Q.ensureKeyExists("elements",Z),Q.ensureKeyExists("parent",Z),Q.checkFnExists("doctype",Z),Q.checkFnExists("instruction",Z),Q.checkFnExists("cdata",Z),Q.checkFnExists("comment",Z),Q.checkFnExists("text",Z),Q.checkFnExists("instructionName",Z),Q.checkFnExists("elementName",Z),Q.checkFnExists("attributeName",Z),Q.checkFnExists("attributeValue",Z),Q.checkFnExists("attributes",Z),Z}function I(F){var M=Number(F);if(!isNaN(M))return M;var $=F.toLowerCase();if($==="true")return!0;else if($==="false")return!1;return F}function H(F,M){var $;if(Z.compact){if(!q[Z[F+"Key"]]&&(K(Z.alwaysArray)?Z.alwaysArray.indexOf(Z[F+"Key"])!==-1:Z.alwaysArray))q[Z[F+"Key"]]=[];if(q[Z[F+"Key"]]&&!K(q[Z[F+"Key"]]))q[Z[F+"Key"]]=[q[Z[F+"Key"]]];if(F+"Fn"in Z&&typeof M==="string")M=Z[F+"Fn"](M,q);if(F==="instruction"&&(("instructionFn"in Z)||("instructionNameFn"in Z))){for($ in M)if(M.hasOwnProperty($))if("instructionFn"in Z)M[$]=Z.instructionFn(M[$],$,q);else{var x=M[$];delete M[$],M[Z.instructionNameFn($,x,q)]=x}}if(K(q[Z[F+"Key"]]))q[Z[F+"Key"]].push(M);else q[Z[F+"Key"]]=M}else{if(!q[Z.elementsKey])q[Z.elementsKey]=[];var z={};if(z[Z.typeKey]=F,F==="instruction"){for($ in M)if(M.hasOwnProperty($))break;if(z[Z.nameKey]="instructionNameFn"in Z?Z.instructionNameFn($,M,q):$,Z.instructionHasAttributes){if(z[Z.attributesKey]=M[$][Z.attributesKey],"instructionFn"in Z)z[Z.attributesKey]=Z.instructionFn(z[Z.attributesKey],$,q)}else{if("instructionFn"in Z)M[$]=Z.instructionFn(M[$],$,q);z[Z.instructionKey]=M[$]}}else{if(F+"Fn"in Z)M=Z[F+"Fn"](M,q);z[Z[F+"Key"]]=M}if(Z.addParent)z[Z.parentKey]=q;q[Z.elementsKey].push(z)}}function T(F){if("attributesFn"in Z&&F)F=Z.attributesFn(F,q);if((Z.trim||("attributeValueFn"in Z)||("attributeNameFn"in Z)||Z.nativeTypeAttributes)&&F){var M;for(M in F)if(F.hasOwnProperty(M)){if(Z.trim)F[M]=F[M].trim();if(Z.nativeTypeAttributes)F[M]=I(F[M]);if("attributeValueFn"in Z)F[M]=Z.attributeValueFn(F[M],M,q);if("attributeNameFn"in Z){var $=F[M];delete F[M],F[Z.attributeNameFn(M,F[M],q)]=$}}}return F}function A(F){var M={};if(F.body&&(F.name.toLowerCase()==="xml"||Z.instructionHasAttributes)){var $=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)'|(\w+))\s*/g,x;while((x=$.exec(F.body))!==null)M[x[1]]=x[2]||x[3]||x[4];M=T(M)}if(F.name.toLowerCase()==="xml"){if(Z.ignoreDeclaration)return;if(q[Z.declarationKey]={},Object.keys(M).length)q[Z.declarationKey][Z.attributesKey]=M;if(Z.addParent)q[Z.declarationKey][Z.parentKey]=q}else{if(Z.ignoreInstruction)return;if(Z.trim)F.body=F.body.trim();var z={};if(Z.instructionHasAttributes&&Object.keys(M).length)z[F.name]={},z[F.name][Z.attributesKey]=M;else z[F.name]=F.body;H("instruction",z)}}function P(F,M){var $;if(typeof F==="object")M=F.attributes,F=F.name;if(M=T(M),"elementNameFn"in Z)F=Z.elementNameFn(F,q);if(Z.compact){if($={},!Z.ignoreAttributes&&M&&Object.keys(M).length){$[Z.attributesKey]={};var x;for(x in M)if(M.hasOwnProperty(x))$[Z.attributesKey][x]=M[x]}if(!(F in q)&&(K(Z.alwaysArray)?Z.alwaysArray.indexOf(F)!==-1:Z.alwaysArray))q[F]=[];if(q[F]&&!K(q[F]))q[F]=[q[F]];if(K(q[F]))q[F].push($);else q[F]=$}else{if(!q[Z.elementsKey])q[Z.elementsKey]=[];if($={},$[Z.typeKey]="element",$[Z.nameKey]=F,!Z.ignoreAttributes&&M&&Object.keys(M).length)$[Z.attributesKey]=M;if(Z.alwaysChildren)$[Z.elementsKey]=[];q[Z.elementsKey].push($)}$[Z.parentKey]=q,q=$}function j(F){if(Z.ignoreText)return;if(!F.trim()&&!Z.captureSpacesBetweenElements)return;if(Z.trim)F=F.trim();if(Z.nativeType)F=I(F);if(Z.sanitize)F=F.replace(/&/g,"&").replace(//g,">");H("text",F)}function E(F){if(Z.ignoreComment)return;if(Z.trim)F=F.trim();H("comment",F)}function C(F){var M=q[Z.parentKey];if(!Z.addParent)delete q[Z.parentKey];q=M}function N(F){if(Z.ignoreCdata)return;if(Z.trim)F=F.trim();H("cdata",F)}function v(F){if(Z.ignoreDoctype)return;if(F=F.replace(/^ /,""),Z.trim)F=F.trim();H("doctype",F)}function S(F){F.note=F}U.exports=function(F,M){var $=J?G.parser(!0,{}):$=new Y.Parser("UTF-8"),x={};if(q=x,Z=W(M),J)$.opt={strictEntities:!0},$.onopentag=P,$.ontext=j,$.oncomment=E,$.onclosetag=C,$.onerror=S,$.oncdata=N,$.ondoctype=v,$.onprocessinginstruction=A;else $.on("startElement",P),$.on("text",j),$.on("comment",E),$.on("endElement",C),$.on("error",S);if(J)$.write(F).close();else if(!$.parse(F))throw Error("XML parsing error: "+$.getError());if(x[Z.elementsKey]){var z=x[Z.elementsKey];delete x[Z.elementsKey],x[Z.elementsKey]=z,delete x.text}return x}}),YG=R0((B,U)=>{var G=h8(),Y=TB();function Q(K){var Z=G.copyOptions(K);return G.ensureSpacesExists(Z),Z}U.exports=function(K,Z){var J=Q(Z),q=Y(K,J),W,I="compact"in J&&J.compact?"_parent":"parent";if("addParent"in J&&J.addParent)W=JSON.stringify(q,function(H,T){return H===I?"_":T},J.spaces);else W=JSON.stringify(q,null,J.spaces);return W.replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}}),CB=R0((B,U)=>{var G=h8(),Y=_8().isArray,Q,K;function Z(F){var M=G.copyOptions(F);if(G.ensureFlagExists("ignoreDeclaration",M),G.ensureFlagExists("ignoreInstruction",M),G.ensureFlagExists("ignoreAttributes",M),G.ensureFlagExists("ignoreText",M),G.ensureFlagExists("ignoreComment",M),G.ensureFlagExists("ignoreCdata",M),G.ensureFlagExists("ignoreDoctype",M),G.ensureFlagExists("compact",M),G.ensureFlagExists("indentText",M),G.ensureFlagExists("indentCdata",M),G.ensureFlagExists("indentAttributes",M),G.ensureFlagExists("indentInstruction",M),G.ensureFlagExists("fullTagEmptyElement",M),G.ensureFlagExists("noQuotesForNativeAttributes",M),G.ensureSpacesExists(M),typeof M.spaces==="number")M.spaces=Array(M.spaces+1).join(" ");return G.ensureKeyExists("declaration",M),G.ensureKeyExists("instruction",M),G.ensureKeyExists("attributes",M),G.ensureKeyExists("text",M),G.ensureKeyExists("comment",M),G.ensureKeyExists("cdata",M),G.ensureKeyExists("doctype",M),G.ensureKeyExists("type",M),G.ensureKeyExists("name",M),G.ensureKeyExists("elements",M),G.checkFnExists("doctype",M),G.checkFnExists("instruction",M),G.checkFnExists("cdata",M),G.checkFnExists("comment",M),G.checkFnExists("text",M),G.checkFnExists("instructionName",M),G.checkFnExists("elementName",M),G.checkFnExists("attributeName",M),G.checkFnExists("attributeValue",M),G.checkFnExists("attributes",M),G.checkFnExists("fullTagEmptyElement",M),M}function J(F,M,$){return(!$&&F.spaces?` -`:"")+Array(M+1).join(F.spaces)}function q(F,M,$){if(M.ignoreAttributes)return"";if("attributesFn"in M)F=M.attributesFn(F,K,Q);var x,z,a,U0,b=[];for(x in F)if(F.hasOwnProperty(x)&&F[x]!==null&&F[x]!==void 0)U0=M.noQuotesForNativeAttributes&&typeof F[x]!=="string"?"":'"',z=""+F[x],z=z.replace(/"/g,"""),a="attributeNameFn"in M?M.attributeNameFn(x,z,K,Q):x,b.push(M.spaces&&M.indentAttributes?J(M,$+1,!1):" "),b.push(a+"="+U0+("attributeValueFn"in M?M.attributeValueFn(z,x,K,Q):z)+U0);if(F&&Object.keys(F).length&&M.spaces&&M.indentAttributes)b.push(J(M,$,!1));return b.join("")}function W(F,M,$){return Q=F,K="xml",M.ignoreDeclaration?"":""}function I(F,M,$){if(M.ignoreInstruction)return"";var x;for(x in F)if(F.hasOwnProperty(x))break;var z="instructionNameFn"in M?M.instructionNameFn(x,F[x],K,Q):x;if(typeof F[x]==="object")return Q=F,K=z,"";else{var a=F[x]?F[x]:"";if("instructionFn"in M)a=M.instructionFn(a,x,K,Q);return""}}function H(F,M){return M.ignoreComment?"":""}function T(F,M){return M.ignoreCdata?"":"","]]]]>"))+"]]>"}function A(F,M){return M.ignoreDoctype?"":""}function P(F,M){if(M.ignoreText)return"";return F=""+F,F=F.replace(/&/g,"&"),F=F.replace(/&/g,"&").replace(//g,">"),"textFn"in M?M.textFn(F,K,Q):F}function j(F,M){var $;if(F.elements&&F.elements.length)for($=0;$"),F[M.elementsKey]&&F[M.elementsKey].length)x.push(C(F[M.elementsKey],M,$+1)),Q=F,K=F.name;x.push(M.spaces&&j(F,M)?` -`+Array($+1).join(M.spaces):""),x.push("")}else x.push("/>");return x.join("")}function C(F,M,$,x){return F.reduce(function(z,a){var U0=J(M,$,x&&!z);switch(a.type){case"element":return z+U0+E(a,M,$);case"comment":return z+U0+H(a[M.commentKey],M);case"doctype":return z+U0+A(a[M.doctypeKey],M);case"cdata":return z+(M.indentCdata?U0:"")+T(a[M.cdataKey],M);case"text":return z+(M.indentText?U0:"")+P(a[M.textKey],M);case"instruction":var b={};return b[a[M.nameKey]]=a[M.attributesKey]?a:a[M.instructionKey],z+(M.indentInstruction?U0:"")+I(b,M,$)}},"")}function N(F,M,$){var x;for(x in F)if(F.hasOwnProperty(x))switch(x){case M.parentKey:case M.attributesKey:break;case M.textKey:if(M.indentText||$)return!0;break;case M.cdataKey:if(M.indentCdata||$)return!0;break;case M.instructionKey:if(M.indentInstruction||$)return!0;break;case M.doctypeKey:case M.commentKey:return!0;default:return!0}return!1}function v(F,M,$,x,z){Q=F,K=M;var a="elementNameFn"in $?$.elementNameFn(M,F):M;if(typeof F>"u"||F===null||F==="")return"fullTagEmptyElementFn"in $&&$.fullTagEmptyElementFn(M,F)||$.fullTagEmptyElement?"<"+a+">":"<"+a+"/>";var U0=[];if(M){if(U0.push("<"+a),typeof F!=="object")return U0.push(">"+P(F,$)+""),U0.join("");if(F[$.attributesKey])U0.push(q(F[$.attributesKey],$,x));var b=N(F,$,!0)||F[$.attributesKey]&&F[$.attributesKey]["xml:space"]==="preserve";if(!b)if("fullTagEmptyElementFn"in $)b=$.fullTagEmptyElementFn(M,F);else b=$.fullTagEmptyElement;if(b)U0.push(">");else return U0.push("/>"),U0.join("")}if(U0.push(S(F,$,x+1,!1)),Q=F,K=M,M)U0.push((z?J($,x,!1):"")+"");return U0.join("")}function S(F,M,$,x){var z,a,U0,b=[];for(a in F)if(F.hasOwnProperty(a)){U0=Y(F[a])?F[a]:[F[a]];for(z=0;z{var G=CB();U.exports=function(Y,Q){if(Y instanceof Buffer)Y=Y.toString();var K=null;if(typeof Y==="string")try{K=JSON.parse(Y)}catch(Z){throw Error("The JSON structure is invalid")}else K=Y;return G(K,Q)}}),h1=R0((B,U)=>{U.exports={xml2js:TB(),xml2json:YG(),js2xml:CB(),json2xml:ZG()}})(),u1=(B)=>{switch(B.type){case void 0:case"element":let U=new kB(B.name,B.attributes),G=B.elements||[];for(let Y of G){let Q=u1(Y);if(Q!==void 0)U.push(Q)}return U;case"text":return B.text;default:return}},QG=class extends H0{},kB=class extends t{static fromXmlString(B){return u1((0,h1.xml2js)(B,{compact:!1}))}constructor(B,U){super(B);if(U)this.root.push(new QG(U))}push(B){this.root.push(B)}},$B=class extends t{constructor(B){super("");e(this,"_attr",void 0),this._attr=B}prepForXml(B){return{_attr:this._attr}}},JG="",u8=class extends t{constructor(B,U){super(B);if(U)this.root=U.root}},T0=(B)=>{if(isNaN(B))throw Error(`Invalid value '${B}' specified. Must be an integer.`);return Math.floor(B)},X1=(B)=>{let U=T0(B);if(U<0)throw Error(`Invalid value '${B}' specified. Must be a positive integer.`);return U},d1=(B,U)=>{let G=U*2;if(B.length!==G||isNaN(Number(`0x${B}`)))throw Error(`Invalid hex value '${B}'. Expected ${G} digit hex value`);return B},KG=(B)=>d1(B,4),SB=(B)=>d1(B,2),W8=(B)=>d1(B,1),q1=(B)=>{let U=B.slice(-2),G=B.substring(0,B.length-2);return`${Number(G)}${U}`},d8=(B)=>{let U=q1(B);if(parseFloat(U)<0)throw Error(`Invalid value '${U}' specified. Expected a positive number.`);return U},C2=(B)=>{if(B==="auto")return B;return d1(B.charAt(0)==="#"?B.substring(1):B,3)},t0=(B)=>typeof B==="string"?q1(B):T0(B),bB=(B)=>typeof B==="string"?d8(B):X1(B),VG=(B)=>typeof B==="string"?q1(B):T0(B),E0=(B)=>typeof B==="string"?d8(B):X1(B),vB=(B)=>{let U=B.substring(0,B.length-1);return`${Number(U)}%`},c8=(B)=>{if(typeof B==="number")return T0(B);if(B.slice(-1)==="%")return vB(B);return q1(B)},yB=X1,gB=X1,fB=(B)=>B.toISOString(),q0=class extends t{constructor(B,U=!0){super(B);if(U!==!0)this.root.push(new C0({val:U}))}},D1=class extends t{constructor(B,U){super(B);this.root.push(new C0({val:bB(U)}))}},S0=class extends t{},q2=class extends t{constructor(B,U){super(B);this.root.push(new C0({val:U}))}},f2=(B,U)=>new M0({name:B,attributes:{value:{key:"w:val",value:U}}}),_2=class extends t{constructor(B,U){super(B);this.root.push(new C0({val:U}))}},XG=class extends t{constructor(B,U){super(B);this.root.push(new C0({val:U}))}},O2=class extends t{constructor(B,U){super(B);this.root.push(U)}},M0=class extends t{constructor({name:B,attributes:U,children:G}){super(B);if(U)this.root.push(new $8(U));if(G)this.root.push(...G)}},c0={START:"start",CENTER:"center",END:"end",BOTH:"both",MEDIUM_KASHIDA:"mediumKashida",DISTRIBUTE:"distribute",NUM_TAB:"numTab",HIGH_KASHIDA:"highKashida",LOW_KASHIDA:"lowKashida",THAI_DISTRIBUTE:"thaiDistribute",LEFT:"left",RIGHT:"right",JUSTIFIED:"both"},m8=(B)=>new M0({name:"w:jc",attributes:{val:{key:"w:val",value:B}}}),j0=(B,{color:U,size:G,space:Y,style:Q})=>new M0({name:B,attributes:{style:{key:"w:val",value:Q},color:{key:"w:color",value:U===void 0?void 0:C2(U)},size:{key:"w:sz",value:G===void 0?void 0:yB(G)},space:{key:"w:space",value:Y===void 0?void 0:gB(Y)}}}),c1={SINGLE:"single",DASH_DOT_STROKED:"dashDotStroked",DASHED:"dashed",DASH_SMALL_GAP:"dashSmallGap",DOT_DASH:"dotDash",DOT_DOT_DASH:"dotDotDash",DOTTED:"dotted",DOUBLE:"double",DOUBLE_WAVE:"doubleWave",INSET:"inset",NIL:"nil",NONE:"none",OUTSET:"outset",THICK:"thick",THICK_THIN_LARGE_GAP:"thickThinLargeGap",THICK_THIN_MEDIUM_GAP:"thickThinMediumGap",THICK_THIN_SMALL_GAP:"thickThinSmallGap",THIN_THICK_LARGE_GAP:"thinThickLargeGap",THIN_THICK_MEDIUM_GAP:"thinThickMediumGap",THIN_THICK_SMALL_GAP:"thinThickSmallGap",THIN_THICK_THIN_LARGE_GAP:"thinThickThinLargeGap",THIN_THICK_THIN_MEDIUM_GAP:"thinThickThinMediumGap",THIN_THICK_THIN_SMALL_GAP:"thinThickThinSmallGap",THREE_D_EMBOSS:"threeDEmboss",THREE_D_ENGRAVE:"threeDEngrave",TRIPLE:"triple",WAVE:"wave"},xB=class extends R2{constructor(B){super("w:pBdr");if(B.top)this.root.push(j0("w:top",B.top));if(B.bottom)this.root.push(j0("w:bottom",B.bottom));if(B.left)this.root.push(j0("w:left",B.left));if(B.right)this.root.push(j0("w:right",B.right));if(B.between)this.root.push(j0("w:between",B.between))}},_B=class extends t{constructor(){super("w:pBdr");let B=j0("w:bottom",{color:"auto",space:1,style:c1.SINGLE,size:6});this.root.push(B)}},hB=({start:B,end:U,left:G,right:Y,hanging:Q,firstLine:K,firstLineChars:Z})=>new M0({name:"w:ind",attributes:{start:{key:"w:start",value:B===void 0?void 0:t0(B)},end:{key:"w:end",value:U===void 0?void 0:t0(U)},left:{key:"w:left",value:G===void 0?void 0:t0(G)},right:{key:"w:right",value:Y===void 0?void 0:t0(Y)},hanging:{key:"w:hanging",value:Q===void 0?void 0:E0(Q)},firstLine:{key:"w:firstLine",value:K===void 0?void 0:E0(K)},firstLineChars:{key:"w:firstLineChars",value:Z===void 0?void 0:T0(Z)}}}),uB=()=>new M0({name:"w:br"}),l8={BEGIN:"begin",END:"end",SEPARATE:"separate"},a8=(B,U)=>new M0({name:"w:fldChar",attributes:{type:{key:"w:fldCharType",value:B},dirty:{key:"w:dirty",value:U}}}),e0=(B)=>a8(l8.BEGIN,B),X2=(B)=>a8(l8.SEPARATE,B),B2=(B)=>a8(l8.END,B),qG={CENTER:"center",INSIDE:"inside",LEFT:"left",OUTSIDE:"outside",RIGHT:"right"},MG={BOTTOM:"bottom",CENTER:"center",INSIDE:"inside",OUTSIDE:"outside",TOP:"top"},RG={DECIMAL:"decimal",UPPER_ROMAN:"upperRoman",LOWER_ROMAN:"lowerRoman",UPPER_LETTER:"upperLetter",LOWER_LETTER:"lowerLetter",ORDINAL:"ordinal",CARDINAL_TEXT:"cardinalText",ORDINAL_TEXT:"ordinalText",HEX:"hex",CHICAGO:"chicago",IDEOGRAPH_DIGITAL:"ideographDigital",JAPANESE_COUNTING:"japaneseCounting",AIUEO:"aiueo",IROHA:"iroha",DECIMAL_FULL_WIDTH:"decimalFullWidth",DECIMAL_HALF_WIDTH:"decimalHalfWidth",JAPANESE_LEGAL:"japaneseLegal",JAPANESE_DIGITAL_TEN_THOUSAND:"japaneseDigitalTenThousand",DECIMAL_ENCLOSED_CIRCLE:"decimalEnclosedCircle",DECIMAL_FULL_WIDTH_2:"decimalFullWidth2",AIUEO_FULL_WIDTH:"aiueoFullWidth",IROHA_FULL_WIDTH:"irohaFullWidth",DECIMAL_ZERO:"decimalZero",BULLET:"bullet",GANADA:"ganada",CHOSUNG:"chosung",DECIMAL_ENCLOSED_FULL_STOP:"decimalEnclosedFullstop",DECIMAL_ENCLOSED_PAREN:"decimalEnclosedParen",DECIMAL_ENCLOSED_CIRCLE_CHINESE:"decimalEnclosedCircleChinese",IDEOGRAPH_ENCLOSED_CIRCLE:"ideographEnclosedCircle",IDEOGRAPH_TRADITIONAL:"ideographTraditional",IDEOGRAPH_ZODIAC:"ideographZodiac",IDEOGRAPH_ZODIAC_TRADITIONAL:"ideographZodiacTraditional",TAIWANESE_COUNTING:"taiwaneseCounting",IDEOGRAPH_LEGAL_TRADITIONAL:"ideographLegalTraditional",TAIWANESE_COUNTING_THOUSAND:"taiwaneseCountingThousand",TAIWANESE_DIGITAL:"taiwaneseDigital",CHINESE_COUNTING:"chineseCounting",CHINESE_LEGAL_SIMPLIFIED:"chineseLegalSimplified",CHINESE_COUNTING_TEN_THOUSAND:"chineseCountingThousand",KOREAN_DIGITAL:"koreanDigital",KOREAN_COUNTING:"koreanCounting",KOREAN_LEGAL:"koreanLegal",KOREAN_DIGITAL_2:"koreanDigital2",VIETNAMESE_COUNTING:"vietnameseCounting",RUSSIAN_LOWER:"russianLower",RUSSIAN_UPPER:"russianUpper",NONE:"none",NUMBER_IN_DASH:"numberInDash",HEBREW_1:"hebrew1",HEBREW_2:"hebrew2",ARABIC_ALPHA:"arabicAlpha",ARABIC_ABJAD:"arabicAbjad",HINDI_VOWELS:"hindiVowels",HINDI_CONSONANTS:"hindiConsonants",HINDI_NUMBERS:"hindiNumbers",HINDI_COUNTING:"hindiCounting",THAI_LETTERS:"thaiLetters",THAI_NUMBERS:"thaiNumbers",THAI_COUNTING:"thaiCounting",BAHT_TEXT:"bahtText",DOLLAR_TEXT:"dollarText"},x0={DEFAULT:"default",PRESERVE:"preserve"},_0=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{space:"xml:space"})}},LG=class extends t{constructor(){super("w:instrText");this.root.push(new _0({space:x0.PRESERVE})),this.root.push("PAGE")}},IG=class extends t{constructor(){super("w:instrText");this.root.push(new _0({space:x0.PRESERVE})),this.root.push("NUMPAGES")}},OG=class extends t{constructor(){super("w:instrText");this.root.push(new _0({space:x0.PRESERVE})),this.root.push("SECTIONPAGES")}},HG=class extends t{constructor(){super("w:instrText");this.root.push(new _0({space:x0.PRESERVE})),this.root.push("SECTION")}},M1=({fill:B,color:U,type:G})=>new M0({name:"w:shd",attributes:{fill:{key:"w:fill",value:B===void 0?void 0:C2(B)},color:{key:"w:color",value:U===void 0?void 0:C2(U)},type:{key:"w:val",value:G}}}),FG={CLEAR:"clear",DIAGONAL_CROSS:"diagCross",DIAGONAL_STRIPE:"diagStripe",HORIZONTAL_CROSS:"horzCross",HORIZONTAL_STRIPE:"horzStripe",NIL:"nil",PERCENT_5:"pct5",PERCENT_10:"pct10",PERCENT_12:"pct12",PERCENT_15:"pct15",PERCENT_20:"pct20",PERCENT_25:"pct25",PERCENT_30:"pct30",PERCENT_35:"pct35",PERCENT_37:"pct37",PERCENT_40:"pct40",PERCENT_45:"pct45",PERCENT_50:"pct50",PERCENT_55:"pct55",PERCENT_60:"pct60",PERCENT_62:"pct62",PERCENT_65:"pct65",PERCENT_70:"pct70",PERCENT_75:"pct75",PERCENT_80:"pct80",PERCENT_85:"pct85",PERCENT_87:"pct87",PERCENT_90:"pct90",PERCENT_95:"pct95",REVERSE_DIAGONAL_STRIPE:"reverseDiagStripe",SOLID:"solid",THIN_DIAGONAL_CROSS:"thinDiagCross",THIN_DIAGONAL_STRIPE:"thinDiagStripe",THIN_HORIZONTAL_CROSS:"thinHorzCross",THIN_REVERSE_DIAGONAL_STRIPE:"thinReverseDiagStripe",THIN_VERTICAL_STRIPE:"thinVertStripe",VERTICAL_STRIPE:"vertStripe"},b0=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}},WG=class extends t{constructor(B){super("w:del");this.root.push(new b0({id:B.id,author:B.author,date:B.date}))}},PG=class extends t{constructor(B){super("w:ins");this.root.push(new b0({id:B.id,author:B.author,date:B.date}))}},p8={DOT:"dot"},r8=(B=p8.DOT)=>new M0({name:"w:em",attributes:{val:{key:"w:val",value:B}}}),AG=()=>r8(p8.DOT),jG=class extends t{constructor(B){super("w:spacing");this.root.push(new C0({val:t0(B)}))}},NG=class extends t{constructor(B){super("w:color");this.root.push(new C0({val:C2(B)}))}},zG=class extends t{constructor(B){super("w:highlight");this.root.push(new C0({val:B}))}},wG=class extends t{constructor(B){super("w:highlightCs");this.root.push(new C0({val:B}))}},EG=(B)=>new M0({name:"w:lang",attributes:{value:{key:"w:val",value:B.value},eastAsia:{key:"w:eastAsia",value:B.eastAsia},bidirectional:{key:"w:bidi",value:B.bidirectional}}}),T1=(B,U)=>{if(typeof B==="string"){let Y=B;return new M0({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:Y},cs:{key:"w:cs",value:Y},eastAsia:{key:"w:eastAsia",value:Y},hAnsi:{key:"w:hAnsi",value:Y},hint:{key:"w:hint",value:U}}})}let G=B;return new M0({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:G.ascii},cs:{key:"w:cs",value:G.cs},eastAsia:{key:"w:eastAsia",value:G.eastAsia},hAnsi:{key:"w:hAnsi",value:G.hAnsi},hint:{key:"w:hint",value:G.hint}}})},dB=(B)=>new M0({name:"w:vertAlign",attributes:{val:{key:"w:val",value:B}}}),DG=()=>dB("superscript"),TG=()=>dB("subscript"),i8={SINGLE:"single",WORDS:"words",DOUBLE:"double",THICK:"thick",DOTTED:"dotted",DOTTEDHEAVY:"dottedHeavy",DASH:"dash",DASHEDHEAVY:"dashedHeavy",DASHLONG:"dashLong",DASHLONGHEAVY:"dashLongHeavy",DOTDASH:"dotDash",DASHDOTHEAVY:"dashDotHeavy",DOTDOTDASH:"dotDotDash",DASHDOTDOTHEAVY:"dashDotDotHeavy",WAVE:"wave",WAVYHEAVY:"wavyHeavy",WAVYDOUBLE:"wavyDouble",NONE:"none"},cB=(B=i8.SINGLE,U)=>new M0({name:"w:u",attributes:{val:{key:"w:val",value:B},color:{key:"w:color",value:U===void 0?void 0:C2(U)}}}),CG={BLINK_BACKGROUND:"blinkBackground",LIGHTS:"lights",ANTS_BLACK:"antsBlack",ANTS_RED:"antsRed",SHIMMER:"shimmer",SPARKLE:"sparkle",NONE:"none"},kG={BLACK:"black",BLUE:"blue",CYAN:"cyan",DARK_BLUE:"darkBlue",DARK_CYAN:"darkCyan",DARK_GRAY:"darkGray",DARK_GREEN:"darkGreen",DARK_MAGENTA:"darkMagenta",DARK_RED:"darkRed",DARK_YELLOW:"darkYellow",GREEN:"green",LIGHT_GRAY:"lightGray",MAGENTA:"magenta",NONE:"none",RED:"red",WHITE:"white",YELLOW:"yellow"},U2=class extends R2{constructor(B){super("w:rPr");if(!B)return;if(B.style)this.push(new q2("w:rStyle",B.style));if(B.font)if(typeof B.font==="string")this.push(T1(B.font));else if("name"in B.font)this.push(T1(B.font.name,B.font.hint));else this.push(T1(B.font));if(B.bold!==void 0)this.push(new q0("w:b",B.bold));if(B.boldComplexScript===void 0&&B.bold!==void 0||B.boldComplexScript){var U;this.push(new q0("w:bCs",(U=B.boldComplexScript)!==null&&U!==void 0?U:B.bold))}if(B.italics!==void 0)this.push(new q0("w:i",B.italics));if(B.italicsComplexScript===void 0&&B.italics!==void 0||B.italicsComplexScript){var G;this.push(new q0("w:iCs",(G=B.italicsComplexScript)!==null&&G!==void 0?G:B.italics))}if(B.smallCaps!==void 0)this.push(new q0("w:smallCaps",B.smallCaps));else if(B.allCaps!==void 0)this.push(new q0("w:caps",B.allCaps));if(B.strike!==void 0)this.push(new q0("w:strike",B.strike));if(B.doubleStrike!==void 0)this.push(new q0("w:dstrike",B.doubleStrike));if(B.emboss!==void 0)this.push(new q0("w:emboss",B.emboss));if(B.imprint!==void 0)this.push(new q0("w:imprint",B.imprint));if(B.noProof!==void 0)this.push(new q0("w:noProof",B.noProof));if(B.snapToGrid!==void 0)this.push(new q0("w:snapToGrid",B.snapToGrid));if(B.vanish)this.push(new q0("w:vanish",B.vanish));if(B.color)this.push(new NG(B.color));if(B.characterSpacing)this.push(new jG(B.characterSpacing));if(B.scale!==void 0)this.push(new _2("w:w",B.scale));if(B.kern)this.push(new D1("w:kern",B.kern));if(B.position)this.push(new q2("w:position",B.position));if(B.size!==void 0)this.push(new D1("w:sz",B.size));let Y=B.sizeComplexScript===void 0||B.sizeComplexScript===!0?B.size:B.sizeComplexScript;if(Y)this.push(new D1("w:szCs",Y));if(B.highlight)this.push(new zG(B.highlight));let Q=B.highlightComplexScript===void 0||B.highlightComplexScript===!0?B.highlight:B.highlightComplexScript;if(Q)this.push(new wG(Q));if(B.underline)this.push(cB(B.underline.type,B.underline.color));if(B.effect)this.push(new q2("w:effect",B.effect));if(B.border)this.push(j0("w:bdr",B.border));if(B.shading)this.push(M1(B.shading));if(B.subScript)this.push(TG());if(B.superScript)this.push(DG());if(B.rightToLeft!==void 0)this.push(new q0("w:rtl",B.rightToLeft));if(B.emphasisMark)this.push(r8(B.emphasisMark.type));if(B.language)this.push(EG(B.language));if(B.specVanish)this.push(new q0("w:specVanish",B.vanish));if(B.math)this.push(new q0("w:oMath",B.math));if(B.revision)this.push(new lB(B.revision))}push(B){this.root.push(B)}},mB=class extends U2{constructor(B){super(B);if(B===null||B===void 0?void 0:B.insertion)this.push(new PG(B.insertion));if(B===null||B===void 0?void 0:B.deletion)this.push(new WG(B.deletion))}},lB=class extends t{constructor(B){super("w:rPrChange");this.root.push(new b0({id:B.id,author:B.author,date:B.date})),this.addChildElement(new U2(B))}},Z1=class extends t{constructor(B){super("w:t");if(typeof B==="string")this.root.push(new _0({space:x0.PRESERVE})),this.root.push(B);else{var U;this.root.push(new _0({space:(U=B.space)!==null&&U!==void 0?U:x0.DEFAULT})),this.root.push(B.text)}}},F2={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"},D0=class extends t{constructor(B){super("w:r");if(e(this,"properties",void 0),this.properties=new U2(B),this.root.push(this.properties),B.break)for(let U=0;U{U.exports=G;function G(Y,Q){if(!Y)throw Error(Q||"Assertion failed")}G.equal=function(Q,K,Z){if(Q!=K)throw Error(Z||"Assertion failed: "+Q+" != "+K)}}),G2=R0((B)=>{var U=R1();B.inherits=W2();function G(b,c){if((b.charCodeAt(c)&64512)!==55296)return!1;if(c<0||c+1>=b.length)return!1;return(b.charCodeAt(c+1)&64512)===56320}function Y(b,c){if(Array.isArray(b))return b.slice();if(!b)return[];var D=[];if(typeof b==="string"){if(!c){var m=0;for(var B0=0;B0>6|192,D[m++]=i&63|128;else if(G(b,B0))i=65536+((i&1023)<<10)+(b.charCodeAt(++B0)&1023),D[m++]=i>>18|240,D[m++]=i>>12&63|128,D[m++]=i>>6&63|128,D[m++]=i&63|128;else D[m++]=i>>12|224,D[m++]=i>>6&63|128,D[m++]=i&63|128}}else if(c==="hex"){if(b=b.replace(/[^a-z0-9]+/gi,""),b.length%2!==0)b="0"+b;for(B0=0;B0>>24|b>>>8&65280|b<<8&16711680|(b&255)<<24)>>>0}B.htonl=K;function Z(b,c){var D="";for(var m=0;m>>0}return i}B.join32=W;function I(b,c){var D=Array(b.length*4);for(var m=0,B0=0;m>>24,D[B0+1]=i>>>16&255,D[B0+2]=i>>>8&255,D[B0+3]=i&255;else D[B0+3]=i>>>24,D[B0+2]=i>>>16&255,D[B0+1]=i>>>8&255,D[B0]=i&255}return D}B.split32=I;function H(b,c){return b>>>c|b<<32-c}B.rotr32=H;function T(b,c){return b<>>32-c}B.rotl32=T;function A(b,c){return b+c>>>0}B.sum32=A;function P(b,c,D){return b+c+D>>>0}B.sum32_3=P;function j(b,c,D,m){return b+c+D+m>>>0}B.sum32_4=j;function E(b,c,D,m,B0){return b+c+D+m+B0>>>0}B.sum32_5=E;function C(b,c,D,m){var B0=b[c],i=m+b[c+1]>>>0;b[c]=(i>>0,b[c+1]=i}B.sum64=C;function N(b,c,D,m){return(c+m>>>0>>0}B.sum64_hi=N;function v(b,c,D,m){return c+m>>>0}B.sum64_lo=v;function S(b,c,D,m,B0,i,V0,s){var G0=0,r=c;return r=r+m>>>0,G0+=r>>0,G0+=r>>0,G0+=r>>0}B.sum64_4_hi=S;function F(b,c,D,m,B0,i,V0,s){return c+m+i+s>>>0}B.sum64_4_lo=F;function M(b,c,D,m,B0,i,V0,s,G0,r){var y=0,n=c;return n=n+m>>>0,y+=n>>0,y+=n>>0,y+=n>>0,y+=n>>0}B.sum64_5_hi=M;function $(b,c,D,m,B0,i,V0,s,G0,r){return c+m+i+s+r>>>0}B.sum64_5_lo=$;function x(b,c,D){return(c<<32-D|b>>>D)>>>0}B.rotr64_hi=x;function z(b,c,D){return(b<<32-D|c>>>D)>>>0}B.rotr64_lo=z;function a(b,c,D){return b>>>D}B.shr64_hi=a;function U0(b,c,D){return(b<<32-D|c>>>D)>>>0}B.shr64_lo=U0}),L1=R0((B)=>{var U=G2(),G=R1();function Y(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}B.BlockHash=Y,Y.prototype.update=function(K,Z){if(K=U.toArray(K,Z),!this.pending)this.pending=K;else this.pending=this.pending.concat(K);if(this.pendingTotal+=K.length,this.pending.length>=this._delta8){K=this.pending;var J=K.length%this._delta8;if(this.pending=K.slice(K.length-J,K.length),this.pending.length===0)this.pending=null;K=U.join32(K,0,K.length-J,this.endian);for(var q=0;q>>24&255,q[W++]=K>>>16&255,q[W++]=K>>>8&255,q[W++]=K&255}else{q[W++]=K&255,q[W++]=K>>>8&255,q[W++]=K>>>16&255,q[W++]=K>>>24&255,q[W++]=0,q[W++]=0,q[W++]=0,q[W++]=0;for(I=8;I{var U=G2().rotr32;function G(I,H,T,A){if(I===0)return Y(H,T,A);if(I===1||I===3)return K(H,T,A);if(I===2)return Q(H,T,A)}B.ft_1=G;function Y(I,H,T){return I&H^~I&T}B.ch32=Y;function Q(I,H,T){return I&H^I&T^H&T}B.maj32=Q;function K(I,H,T){return I^H^T}B.p32=K;function Z(I){return U(I,2)^U(I,13)^U(I,22)}B.s0_256=Z;function J(I){return U(I,6)^U(I,11)^U(I,25)}B.s1_256=J;function q(I){return U(I,7)^U(I,18)^I>>>3}B.g0_256=q;function W(I){return U(I,17)^U(I,19)^I>>>10}B.g1_256=W}),SG=R0((B,U)=>{var G=G2(),Y=L1(),Q=pB(),K=G.rotl32,Z=G.sum32,J=G.sum32_5,q=Q.ft_1,W=Y.BlockHash,I=[1518500249,1859775393,2400959708,3395469782];function H(){if(!(this instanceof H))return new H;W.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=Array(80)}G.inherits(H,W),U.exports=H,H.blockSize=512,H.outSize=160,H.hmacStrength=80,H.padLength=64,H.prototype._update=function(A,P){var j=this.W;for(var E=0;E<16;E++)j[E]=A[P+E];for(;E{var G=G2(),Y=L1(),Q=pB(),K=R1(),Z=G.sum32,J=G.sum32_4,q=G.sum32_5,W=Q.ch32,I=Q.maj32,H=Q.s0_256,T=Q.s1_256,A=Q.g0_256,P=Q.g1_256,j=Y.BlockHash,E=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function C(){if(!(this instanceof C))return new C;j.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=E,this.W=Array(64)}G.inherits(C,j),U.exports=C,C.blockSize=512,C.outSize=256,C.hmacStrength=192,C.padLength=64,C.prototype._update=function(v,S){var F=this.W;for(var M=0;M<16;M++)F[M]=v[S+M];for(;M{var G=G2(),Y=rB();function Q(){if(!(this instanceof Q))return new Q;Y.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}G.inherits(Q,Y),U.exports=Q,Q.blockSize=512,Q.outSize=224,Q.hmacStrength=192,Q.padLength=64,Q.prototype._digest=function(Z){if(Z==="hex")return G.toHex32(this.h.slice(0,7),"big");else return G.split32(this.h.slice(0,7),"big")}}),iB=R0((B,U)=>{var G=G2(),Y=L1(),Q=R1(),K=G.rotr64_hi,Z=G.rotr64_lo,J=G.shr64_hi,q=G.shr64_lo,W=G.sum64,I=G.sum64_hi,H=G.sum64_lo,T=G.sum64_4_hi,A=G.sum64_4_lo,P=G.sum64_5_hi,j=G.sum64_5_lo,E=Y.BlockHash,C=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function N(){if(!(this instanceof N))return new N;E.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=C,this.W=Array(160)}G.inherits(N,E),U.exports=N,N.blockSize=1024,N.outSize=512,N.hmacStrength=192,N.padLength=128,N.prototype._prepareBlock=function(B0,i){var V0=this.W;for(var s=0;s<32;s++)V0[s]=B0[i+s];for(;s{var G=G2(),Y=iB();function Q(){if(!(this instanceof Q))return new Q;Y.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}G.inherits(Q,Y),U.exports=Q,Q.blockSize=1024,Q.outSize=384,Q.hmacStrength=192,Q.padLength=128,Q.prototype._digest=function(Z){if(Z==="hex")return G.toHex32(this.h.slice(0,12),"big");else return G.split32(this.h.slice(0,12),"big")}}),yG=R0((B)=>{B.sha1=SG(),B.sha224=bG(),B.sha256=rB(),B.sha384=vG(),B.sha512=iB()}),gG=R0((B)=>{var U=G2(),G=L1(),Y=U.rotl32,Q=U.sum32,K=U.sum32_3,Z=U.sum32_4,J=G.BlockHash;function q(){if(!(this instanceof q))return new q;J.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}U.inherits(q,J),B.ripemd160=q,q.blockSize=512,q.outSize=160,q.hmacStrength=192,q.padLength=64,q.prototype._update=function(C,N){var v=this.h[0],S=this.h[1],F=this.h[2],M=this.h[3],$=this.h[4],x=v,z=S,a=F,U0=M,b=$;for(var c=0;c<80;c++){var D=Q(Y(Z(v,W(c,S,F,M),C[T[c]+N],I(c)),P[c]),$);v=$,$=M,M=Y(F,10),F=S,S=D,D=Q(Y(Z(x,W(79-c,z,a,U0),C[A[c]+N],H(c)),j[c]),b),x=b,b=U0,U0=Y(a,10),a=z,z=D}D=K(this.h[1],F,U0),this.h[1]=K(this.h[2],M,b),this.h[2]=K(this.h[3],$,x),this.h[3]=K(this.h[4],v,z),this.h[4]=K(this.h[0],S,a),this.h[0]=D},q.prototype._digest=function(C){if(C==="hex")return U.toHex32(this.h,"little");else return U.split32(this.h,"little")};function W(E,C,N,v){if(E<=15)return C^N^v;else if(E<=31)return C&N|~C&v;else if(E<=47)return(C|~N)^v;else if(E<=63)return C&v|N&~v;else return C^(N|~v)}function I(E){if(E<=15)return 0;else if(E<=31)return 1518500249;else if(E<=47)return 1859775393;else if(E<=63)return 2400959708;else return 2840853838}function H(E){if(E<=15)return 1352829926;else if(E<=31)return 1548603684;else if(E<=47)return 1836072691;else if(E<=63)return 2053994217;else return 0}var T=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],A=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],P=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],j=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]}),fG=R0((B,U)=>{var G=G2(),Y=R1();function Q(K,Z,J){if(!(this instanceof Q))return new Q(K,Z,J);this.Hash=K,this.blockSize=K.blockSize/8,this.outSize=K.outSize/8,this.inner=null,this.outer=null,this._init(G.toArray(Z,J))}U.exports=Q,Q.prototype._init=function(Z){if(Z.length>this.blockSize)Z=new this.Hash().update(Z).digest();Y(Z.length<=this.blockSize);for(var J=Z.length;J{var U=B;U.utils=G2(),U.common=L1(),U.sha=yG(),U.ripemd=gG(),U.hmac=fG(),U.sha1=U.sha.sha1,U.sha256=U.sha.sha256,U.sha224=U.sha.sha224,U.sha384=U.sha.sha384,U.sha512=U.sha.sha512,U.ripemd160=U.ripemd.ripemd160})(),1),_G="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",hG=(B,U=21)=>{return(G=U)=>{let Y="",Q=G|0;while(Q--)Y+=B[Math.random()*B.length|0];return Y}},uG=(B=21)=>{let U="",G=B|0;while(G--)U+=_G[Math.random()*64|0];return U},dG=(B)=>Math.floor(B/25.4*72*20),u0=(B)=>Math.floor(B*72*20),I1=(B=0)=>{let U=B;return()=>++U},nB=()=>I1(),sB=()=>I1(1),oB=()=>I1(),tB=()=>I1(),O1=()=>uG().toLowerCase(),P8=(B)=>xG.default.sha1().update(B instanceof ArrayBuffer?new Uint8Array(B):B).digest("hex"),s2=(B)=>hG("1234567890abcdef",B)(),eB=()=>`${s2(8)}-${s2(4)}-${s2(4)}-${s2(4)}-${s2(12)}`,U1=(B)=>new Uint8Array(new TextEncoder().encode(B)),B4={CHARACTER:"character",COLUMN:"column",INSIDE_MARGIN:"insideMargin",LEFT_MARGIN:"leftMargin",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",RIGHT_MARGIN:"rightMargin"},U4={BOTTOM_MARGIN:"bottomMargin",INSIDE_MARGIN:"insideMargin",LINE:"line",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",PARAGRAPH:"paragraph",TOP_MARGIN:"topMargin"},G4=()=>new M0({name:"wp:simplePos",attributes:{x:{key:"x",value:0},y:{key:"y",value:0}}}),Y4=(B)=>new M0({name:"wp:align",children:[B]}),Z4=(B)=>new M0({name:"wp:posOffset",children:[B.toString()]}),Q4=({relative:B,align:U,offset:G})=>new M0({name:"wp:positionH",attributes:{relativeFrom:{key:"relativeFrom",value:B!==null&&B!==void 0?B:B4.PAGE}},children:[(()=>{if(U)return Y4(U);else if(G!==void 0)return Z4(G);else throw Error("There is no configuration provided for floating position (Align or offset)")})()]}),J4=({relative:B,align:U,offset:G})=>new M0({name:"wp:positionV",attributes:{relativeFrom:{key:"relativeFrom",value:B!==null&&B!==void 0?B:U4.PAGE}},children:[(()=>{if(U)return Y4(U);else if(G!==void 0)return Z4(G);else throw Error("There is no configuration provided for floating position (Align or offset)")})()]}),cG=function(B){return B.CENTER="ctr",B.TOP="t",B.BOTTOM="b",B}({}),K4=(B={})=>{var U,G,Y,Q;return new M0({name:"wps:bodyPr",attributes:{lIns:{key:"lIns",value:(U=B.margins)===null||U===void 0?void 0:U.left},rIns:{key:"rIns",value:(G=B.margins)===null||G===void 0?void 0:G.right},tIns:{key:"tIns",value:(Y=B.margins)===null||Y===void 0?void 0:Y.top},bIns:{key:"bIns",value:(Q=B.margins)===null||Q===void 0?void 0:Q.bottom},anchor:{key:"anchor",value:B.verticalAnchor}},children:[...B.noAutoFit?[new q0("a:noAutofit",B.noAutoFit)]:[]]})},mG=(B={txBox:"1"})=>new M0({name:"wps:cNvSpPr",attributes:{txBox:{key:"txBox",value:B.txBox}}}),lG=(B)=>new M0({name:"w:txbxContent",children:[...B]}),aG=(B)=>new M0({name:"wps:txbx",children:[lG(B)]}),pG=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{cx:"cx",cy:"cy"})}},rG=class extends t{constructor(B,U){super("a:ext");e(this,"attributes",void 0),this.attributes=new pG({cx:B,cy:U}),this.root.push(this.attributes)}},iG=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{x:"x",y:"y"})}},nG=class extends t{constructor(B,U){super("a:off");this.root.push(new iG({x:B!==null&&B!==void 0?B:0,y:U!==null&&U!==void 0?U:0}))}},sG=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{flipVertical:"flipV",flipHorizontal:"flipH",rotation:"rot"})}},V4=class extends t{constructor(B){var U,G,Y,Q;super("a:xfrm");e(this,"extents",void 0),e(this,"offset",void 0),this.root.push(new sG({flipVertical:(U=B.flip)===null||U===void 0?void 0:U.vertical,flipHorizontal:(G=B.flip)===null||G===void 0?void 0:G.horizontal,rotation:B.rotation})),this.offset=new nG((Y=B.offset)===null||Y===void 0||(Y=Y.emus)===null||Y===void 0?void 0:Y.x,(Q=B.offset)===null||Q===void 0||(Q=Q.emus)===null||Q===void 0?void 0:Q.y),this.extents=new rG(B.emus.x,B.emus.y),this.root.push(this.offset),this.root.push(this.extents)}},X4=()=>new M0({name:"a:noFill"}),oG=(B)=>new M0({name:"a:srgbClr",attributes:{value:{key:"val",value:B.value}}}),tG=(B)=>new M0({name:"a:schemeClr",attributes:{value:{key:"val",value:B.value}}}),A8=(B)=>new M0({name:"a:solidFill",children:[B.type==="rgb"?oG(B):tG(B)]}),eG=(B)=>new M0({name:"a:ln",attributes:{width:{key:"w",value:B.width},cap:{key:"cap",value:B.cap},compoundLine:{key:"cmpd",value:B.compoundLine},align:{key:"algn",value:B.align}},children:[B.type==="noFill"?X4():B.solidFillType==="rgb"?A8({type:"rgb",value:B.value}):A8({type:"scheme",value:B.value})]}),BY=class extends t{constructor(){super("a:avLst")}},UY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{prst:"prst"})}},GY=class extends t{constructor(){super("a:prstGeom");this.root.push(new UY({prst:"rect"})),this.root.push(new BY)}},YY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{bwMode:"bwMode"})}},q4=class extends t{constructor({element:B,outline:U,solidFill:G,transform:Y}){super(`${B}:spPr`);if(e(this,"form",void 0),this.root.push(new YY({bwMode:"auto"})),this.form=new V4(Y),this.root.push(this.form),this.root.push(new GY),U)this.root.push(X4()),this.root.push(eG(U));if(G)this.root.push(A8(G))}},l6=(B)=>new M0({name:"wps:wsp",children:[mG(B.nonVisualProperties),new q4({element:"wps",transform:B.transformation,outline:B.outline,solidFill:B.solidFill}),aG(B.children),K4(B.bodyProperties)]}),K8=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{uri:"uri"})}},ZY=(B)=>new M0({name:"asvg:svgBlip",attributes:{asvg:{key:"xmlns:asvg",value:"http://schemas.microsoft.com/office/drawing/2016/SVG/main"},embed:{key:"r:embed",value:`rId{${B.fileName}}`}}}),QY=(B)=>new M0({name:"a:ext",attributes:{uri:{key:"uri",value:"{96DAC541-7B7A-43D3-8B79-37D633B846F1}"}},children:[ZY(B)]}),JY=(B)=>new M0({name:"a:extLst",children:[QY(B)]}),KY=(B)=>new M0({name:"a:blip",attributes:{embed:{key:"r:embed",value:`rId{${B.type==="svg"?B.fallback.fileName:B.fileName}}`},cstate:{key:"cstate",value:"none"}},children:B.type==="svg"?[JY(B)]:[]}),VY=class extends t{constructor(){super("a:srcRect")}},XY=class extends t{constructor(){super("a:fillRect")}},qY=class extends t{constructor(){super("a:stretch");this.root.push(new XY)}},MY=class extends t{constructor(B){super("pic:blipFill");this.root.push(KY(B)),this.root.push(new VY),this.root.push(new qY)}},RY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{noChangeAspect:"noChangeAspect",noChangeArrowheads:"noChangeArrowheads"})}},LY=class extends t{constructor(){super("a:picLocks");this.root.push(new RY({noChangeAspect:1,noChangeArrowheads:1}))}},IY=class extends t{constructor(){super("pic:cNvPicPr");this.root.push(new LY)}},M4=(B,U)=>new M0({name:"a:hlinkClick",attributes:L0(L0({},U?{xmlns:{key:"xmlns:a",value:"http://schemas.openxmlformats.org/drawingml/2006/main"}}:{}),{},{id:{key:"r:id",value:`rId${B}`}})}),OY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{id:"id",name:"name",descr:"descr"})}},HY=class extends t{constructor(){super("pic:cNvPr");this.root.push(new OY({id:0,name:"",descr:""}))}prepForXml(B){for(let U=B.stack.length-1;U>=0;U--){let G=B.stack[U];if(!(G instanceof m2))continue;this.root.push(M4(G.linkId,!1));break}return super.prepForXml(B)}},FY=class extends t{constructor(){super("pic:nvPicPr");this.root.push(new HY),this.root.push(new IY)}},WY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{xmlns:"xmlns:pic"})}},a6=class extends t{constructor({mediaData:B,transform:U,outline:G}){super("pic:pic");this.root.push(new WY({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/picture"})),this.root.push(new FY),this.root.push(new MY(B)),this.root.push(new q4({element:"pic",transform:U,outline:G}))}},PY=(B)=>new M0({name:"wpg:grpSpPr",children:[new V4(B)]}),AY=()=>new M0({name:"wpg:cNvGrpSpPr"}),jY=(B)=>new M0({name:"wpg:wgp",children:[AY(),PY(B.transformation),...B.children]}),NY=class extends t{constructor({mediaData:B,transform:U,outline:G,solidFill:Y}){super("a:graphicData");if(B.type==="wps"){this.root.push(new K8({uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));let Q=l6(L0(L0({},B.data),{},{transformation:U,outline:G,solidFill:Y}));this.root.push(Q)}else if(B.type==="wpg"){this.root.push(new K8({uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"}));let Q=jY({children:B.children.map((K)=>{if(K.type==="wps")return l6(L0(L0({},K.data),{},{transformation:K.transformation,outline:K.outline,solidFill:K.solidFill}));else return new a6({mediaData:K,transform:K.transformation,outline:K.outline})}),transformation:U});this.root.push(Q)}else{this.root.push(new K8({uri:"http://schemas.openxmlformats.org/drawingml/2006/picture"}));let Q=new a6({mediaData:B,transform:U,outline:G});this.root.push(Q)}}},zY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{a:"xmlns:a"})}},R4=class extends t{constructor({mediaData:B,transform:U,outline:G,solidFill:Y}){super("a:graphic");e(this,"data",void 0),this.root.push(new zY({a:"http://schemas.openxmlformats.org/drawingml/2006/main"})),this.data=new NY({mediaData:B,transform:U,outline:G,solidFill:Y}),this.root.push(this.data)}},e2={NONE:0,SQUARE:1,TIGHT:2,TOP_AND_BOTTOM:3},L4={BOTH_SIDES:"bothSides",LEFT:"left",RIGHT:"right",LARGEST:"largest"},j8=()=>new M0({name:"wp:wrapNone"}),I4=(B,U={top:0,bottom:0,left:0,right:0})=>new M0({name:"wp:wrapSquare",attributes:{wrapText:{key:"wrapText",value:B.side||L4.BOTH_SIDES},distT:{key:"distT",value:U.top},distB:{key:"distB",value:U.bottom},distL:{key:"distL",value:U.left},distR:{key:"distR",value:U.right}}}),O4=(B={top:0,bottom:0})=>new M0({name:"wp:wrapTight",attributes:{distT:{key:"distT",value:B.top},distB:{key:"distB",value:B.bottom}}}),H4=(B={top:0,bottom:0})=>new M0({name:"wp:wrapTopAndBottom",attributes:{distT:{key:"distT",value:B.top},distB:{key:"distB",value:B.bottom}}}),F4=class extends t{constructor({name:B,description:U,title:G,id:Y}={name:"",description:"",title:""}){super("wp:docPr");e(this,"docPropertiesUniqueNumericId",oB());let Q={id:{key:"id",value:Y!==null&&Y!==void 0?Y:this.docPropertiesUniqueNumericId()},name:{key:"name",value:B}};if(U!==null&&U!==void 0)Q.description={key:"descr",value:U};if(G!==null&&G!==void 0)Q.title={key:"title",value:G};this.root.push(new $8(Q))}prepForXml(B){for(let U=B.stack.length-1;U>=0;U--){let G=B.stack[U];if(!(G instanceof m2))continue;this.root.push(M4(G.linkId,!0));break}return super.prepForXml(B)}},W4=({top:B,right:U,bottom:G,left:Y})=>new M0({name:"wp:effectExtent",attributes:{top:{key:"t",value:B},right:{key:"r",value:U},bottom:{key:"b",value:G},left:{key:"l",value:Y}}}),P4=({x:B,y:U})=>new M0({name:"wp:extent",attributes:{x:{key:"cx",value:B},y:{key:"cy",value:U}}}),wY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{xmlns:"xmlns:a",noChangeAspect:"noChangeAspect"})}},EY=class extends t{constructor(){super("a:graphicFrameLocks");this.root.push(new wY({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/main",noChangeAspect:1}))}},A4=()=>new M0({name:"wp:cNvGraphicFramePr",children:[new EY]}),DY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{distT:"distT",distB:"distB",distL:"distL",distR:"distR",allowOverlap:"allowOverlap",behindDoc:"behindDoc",layoutInCell:"layoutInCell",locked:"locked",relativeHeight:"relativeHeight",simplePos:"simplePos"})}},TY=class extends t{constructor({mediaData:B,transform:U,drawingOptions:G}){super("wp:anchor");let Y=L0({allowOverlap:!0,behindDocument:!1,lockAnchor:!1,layoutInCell:!0,verticalPosition:{},horizontalPosition:{}},G.floating);if(this.root.push(new DY({distT:Y.margins?Y.margins.top||0:0,distB:Y.margins?Y.margins.bottom||0:0,distL:Y.margins?Y.margins.left||0:0,distR:Y.margins?Y.margins.right||0:0,simplePos:"0",allowOverlap:Y.allowOverlap===!0?"1":"0",behindDoc:Y.behindDocument===!0?"1":"0",locked:Y.lockAnchor===!0?"1":"0",layoutInCell:Y.layoutInCell===!0?"1":"0",relativeHeight:Y.zIndex?Y.zIndex:U.emus.y})),this.root.push(G4()),this.root.push(Q4(Y.horizontalPosition)),this.root.push(J4(Y.verticalPosition)),this.root.push(P4({x:U.emus.x,y:U.emus.y})),this.root.push(W4({top:0,right:0,bottom:0,left:0})),G.floating!==void 0&&G.floating.wrap!==void 0)switch(G.floating.wrap.type){case e2.SQUARE:this.root.push(I4(G.floating.wrap,G.floating.margins));break;case e2.TIGHT:this.root.push(O4(G.floating.margins));break;case e2.TOP_AND_BOTTOM:this.root.push(H4(G.floating.margins));break;case e2.NONE:default:this.root.push(j8())}else this.root.push(j8());this.root.push(new F4(G.docProperties)),this.root.push(A4()),this.root.push(new R4({mediaData:B,transform:U,outline:G.outline,solidFill:G.solidFill}))}},CY=({mediaData:B,transform:U,docProperties:G,outline:Y,solidFill:Q})=>{var K,Z,J,q;return new M0({name:"wp:inline",attributes:{distanceTop:{key:"distT",value:0},distanceBottom:{key:"distB",value:0},distanceLeft:{key:"distL",value:0},distanceRight:{key:"distR",value:0}},children:[P4({x:U.emus.x,y:U.emus.y}),W4(Y?{top:((K=Y.width)!==null&&K!==void 0?K:9525)*2,right:((Z=Y.width)!==null&&Z!==void 0?Z:9525)*2,bottom:((J=Y.width)!==null&&J!==void 0?J:9525)*2,left:((q=Y.width)!==null&&q!==void 0?q:9525)*2}:{top:0,right:0,bottom:0,left:0}),new F4(G),A4(),new R4({mediaData:B,transform:U,outline:Y,solidFill:Q})]})},m1=class extends t{constructor(B,U={}){super("w:drawing");if(!U.floating)this.root.push(CY({mediaData:B,transform:B.transformation,docProperties:U.docProperties,outline:U.outline,solidFill:U.solidFill}));else this.root.push(new TY({mediaData:B,transform:B.transformation,drawingOptions:U}))}},kY=(B)=>{let U=B.indexOf(";base64,"),G=U===-1?0:U+8;return new Uint8Array(atob(B.substring(G)).split("").map((Y)=>Y.charCodeAt(0)))},j4=(B)=>typeof B==="string"?kY(B):B,V8=(B,U)=>({data:j4(B.data),fileName:U,transformation:{pixels:{x:Math.round(B.transformation.width),y:Math.round(B.transformation.height)},emus:{x:Math.round(B.transformation.width*9525),y:Math.round(B.transformation.height*9525)},flip:B.transformation.flip,rotation:B.transformation.rotation?B.transformation.rotation*60000:void 0}}),$Y=class extends t{constructor(B){var U=(...Z)=>(super(...Z),e(this,"imageData",void 0),this);let G=`${P8(B.data)}.${B.type}`,Y=B.type==="svg"?L0(L0({type:B.type},V8(B,G)),{},{fallback:L0({type:B.fallback.type},V8(L0(L0({},B.fallback),{},{transformation:B.transformation}),`${P8(B.fallback.data)}.${B.fallback.type}`))}):L0({type:B.type},V8(B,G)),Q=new m1(Y,{floating:B.floating,docProperties:B.altText,outline:B.outline}),K=new D0({children:[Q]});if(B.insertion)U("w:ins"),this.root.push(new b0({id:B.insertion.id,author:B.insertion.author,date:B.insertion.date})),this.addChildElement(K);else if(B.deletion)U("w:del"),this.root.push(new b0({id:B.deletion.id,author:B.deletion.author,date:B.deletion.date})),this.addChildElement(K);else U("w:r"),this.root.push(new U2({})),this.root.push(Q);this.imageData=Y}prepForXml(B){if(B.file.Media.addImage(this.imageData.fileName,this.imageData),this.imageData.type==="svg")B.file.Media.addImage(this.imageData.fallback.fileName,this.imageData.fallback);return super.prepForXml(B)}},n8=(B)=>{var U,G,Y,Q,K,Z,J,q;return{offset:{pixels:{x:Math.round((U=(G=B.offset)===null||G===void 0?void 0:G.left)!==null&&U!==void 0?U:0),y:Math.round((Y=(Q=B.offset)===null||Q===void 0?void 0:Q.top)!==null&&Y!==void 0?Y:0)},emus:{x:Math.round(((K=(Z=B.offset)===null||Z===void 0?void 0:Z.left)!==null&&K!==void 0?K:0)*9525),y:Math.round(((J=(q=B.offset)===null||q===void 0?void 0:q.top)!==null&&J!==void 0?J:0)*9525)}},pixels:{x:Math.round(B.width),y:Math.round(B.height)},emus:{x:Math.round(B.width*9525),y:Math.round(B.height*9525)},flip:B.flip,rotation:B.rotation?B.rotation*60000:void 0}},SY=class extends D0{constructor(B){super({});e(this,"wpsShapeData",void 0),this.wpsShapeData={type:B.type,transformation:n8(B.transformation),data:L0({},B)};let U=new m1(this.wpsShapeData,{floating:B.floating,docProperties:B.altText,outline:B.outline,solidFill:B.solidFill});this.root.push(U)}},bY=class extends D0{constructor(B){super({});e(this,"wpgGroupData",void 0),e(this,"mediaDatas",void 0),this.wpgGroupData={type:B.type,transformation:n8(B.transformation),children:B.children};let U=new m1(this.wpgGroupData,{floating:B.floating,docProperties:B.altText});this.mediaDatas=B.children.filter((G)=>G.type!=="wps").map((G)=>G),this.root.push(U)}prepForXml(B){return this.mediaDatas.forEach((U)=>{if(B.file.Media.addImage(U.fileName,U),U.type==="svg")B.file.Media.addImage(U.fallback.fileName,U.fallback)}),super.prepForXml(B)}},vY=class extends t{constructor(B){super("w:instrText");this.root.push(new _0({space:x0.PRESERVE})),this.root.push(`SEQ ${B}`)}},yY=class extends D0{constructor(B){super({});this.root.push(e0(!0)),this.root.push(new vY(B)),this.root.push(X2()),this.root.push(B2())}},gY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{instr:"w:instr"})}},s8=class extends t{constructor(B,U){super("w:fldSimple");if(this.root.push(new gY({instr:B})),U!==void 0)this.root.push(new Q1(U))}},fY=class extends s8{constructor(B){super(` MERGEFIELD ${B} `,`«${B}»`)}},xY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{xmlns:"xmlns"})}},N4={EXTERNAL:"External"},_Y=(B,U,G,Y)=>new M0({name:"Relationship",attributes:{id:{key:"Id",value:B},type:{key:"Type",value:U},target:{key:"Target",value:G},targetMode:{key:"TargetMode",value:Y}}}),A2=class extends t{constructor(){super("Relationships");this.root.push(new xY({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}addRelationship(B,U,G,Y){this.root.push(_Y(`rId${B}`,U,G,Y))}get RelationshipCount(){return this.root.length-1}},hY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}},o8=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{id:"w:id"})}},uY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{"xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps"})}},dY=class extends t{constructor(B){super("w:commentRangeStart");this.root.push(new o8({id:B}))}},cY=class extends t{constructor(B){super("w:commentRangeEnd");this.root.push(new o8({id:B}))}},mY=class extends t{constructor(B){super("w:commentReference");this.root.push(new o8({id:B}))}},N8=class extends t{constructor({id:B,initials:U,author:G,date:Y=new Date,children:Q},K){super("w:comment");e(this,"paraId",void 0),this.paraId=K,this.root.push(new hY({id:B,initials:U,author:G,date:Y.toISOString()}));for(let Z of Q)this.root.push(Z)}prepForXml(B){let U=super.prepForXml(B);if(!U||!this.paraId)return U;let G=U["w:comment"];if(!Array.isArray(G))return U;for(let Y=G.length-1;Y>=0;Y--){let Q=G[Y];if(Q&&typeof Q==="object"&&"w:p"in Q){let K=Q["w:p"];if(Array.isArray(K))K.unshift({_attr:{"w14:paraId":this.paraId,"w14:textId":this.paraId}});break}}return U}},z4=(B)=>(B+1).toString(16).toUpperCase().padStart(8,"0"),w4=class extends t{constructor({children:B}){super("w:comments");if(e(this,"relationships",void 0),e(this,"threadData",void 0),this.root.push(new uY({"xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"})),B.some((U)=>U.parentId!==void 0)){let U=new Map(B.map((G)=>[G.id,z4(G.id)]));for(let G of B)this.root.push(new N8(G,U.get(G.id)));this.threadData=B.map((G)=>({paraId:U.get(G.id),parentParaId:G.parentId!==void 0?U.get(G.parentId):void 0,done:G.resolved}))}else for(let U of B)this.root.push(new N8(U));this.relationships=new A2}get Relationships(){return this.relationships}get ThreadData(){return this.threadData}},lY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{"xmlns:wpc":"xmlns:wpc","xmlns:mc":"xmlns:mc","xmlns:w15":"xmlns:w15","mc:Ignorable":"mc:Ignorable"})}},aY=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{paraId:"w15:paraId",paraIdParent:"w15:paraIdParent",done:"w15:done"})}},pY=class extends t{constructor(B){super("w15:commentEx");this.root.push(new aY({paraId:B.paraId,paraIdParent:B.parentParaId,done:B.done!==void 0?B.done?"1":"0":void 0}))}},E4=class extends t{constructor(B){super("w15:commentsEx");this.root.push(new lY({"xmlns:wpc":"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","mc:Ignorable":"w15"}));for(let U of B)this.root.push(new pY(U))}},rY=class extends S0{constructor(){super("w:noBreakHyphen")}},iY=class extends S0{constructor(){super("w:softHyphen")}},nY=class extends S0{constructor(){super("w:dayShort")}},sY=class extends S0{constructor(){super("w:monthShort")}},oY=class extends S0{constructor(){super("w:yearShort")}},tY=class extends S0{constructor(){super("w:dayLong")}},eY=class extends S0{constructor(){super("w:monthLong")}},BZ=class extends S0{constructor(){super("w:yearLong")}},UZ=class extends S0{constructor(){super("w:annotationRef")}},GZ=class extends S0{constructor(){super("w:footnoteRef")}},D4=class extends S0{constructor(){super("w:endnoteRef")}},YZ=class extends S0{constructor(){super("w:separator")}},ZZ=class extends S0{constructor(){super("w:continuationSeparator")}},QZ=class extends S0{constructor(){super("w:pgNum")}},JZ=class extends S0{constructor(){super("w:cr")}},T4=class extends S0{constructor(){super("w:tab")}},KZ=class extends S0{constructor(){super("w:lastRenderedPageBreak")}},VZ={LEFT:"left",CENTER:"center",RIGHT:"right"},XZ={MARGIN:"margin",INDENT:"indent"},qZ={NONE:"none",DOT:"dot",HYPHEN:"hyphen",UNDERSCORE:"underscore",MIDDLE_DOT:"middleDot"},MZ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{alignment:"w:alignment",relativeTo:"w:relativeTo",leader:"w:leader"})}},RZ=class extends t{constructor(B){super("w:ptab");this.root.push(new MZ({alignment:B.alignment,relativeTo:B.relativeTo,leader:B.leader}))}},C4={COLUMN:"column",PAGE:"page"},k4=class extends t{constructor(B){super("w:br");this.root.push(new C0({type:B}))}},LZ=class extends D0{constructor(){super({});this.root.push(new k4(C4.PAGE))}},IZ=class extends D0{constructor(){super({});this.root.push(new k4(C4.COLUMN))}},$4=class extends t{constructor(){super("w:pageBreakBefore")}},k2={AT_LEAST:"atLeast",EXACTLY:"exactly",EXACT:"exact",AUTO:"auto"},S4=({after:B,before:U,line:G,lineRule:Y,beforeAutoSpacing:Q,afterAutoSpacing:K})=>new M0({name:"w:spacing",attributes:{after:{key:"w:after",value:B},before:{key:"w:before",value:U},line:{key:"w:line",value:G},lineRule:{key:"w:lineRule",value:Y},beforeAutoSpacing:{key:"w:beforeAutospacing",value:Q},afterAutoSpacing:{key:"w:afterAutospacing",value:K}}}),OZ={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3",HEADING_4:"Heading4",HEADING_5:"Heading5",HEADING_6:"Heading6",TITLE:"Title"},x2=(B)=>new M0({name:"w:pStyle",attributes:{val:{key:"w:val",value:B}}}),z8={LEFT:"left",RIGHT:"right",CENTER:"center",BAR:"bar",CLEAR:"clear",DECIMAL:"decimal",END:"end",NUM:"num",START:"start"},HZ={DOT:"dot",HYPHEN:"hyphen",MIDDLE_DOT:"middleDot",NONE:"none",UNDERSCORE:"underscore"},FZ={MAX:9026},b4=({type:B,position:U,leader:G})=>new M0({name:"w:tab",attributes:{val:{key:"w:val",value:B},pos:{key:"w:pos",value:U},leader:{key:"w:leader",value:G}}}),v4=(B)=>new M0({name:"w:tabs",children:B.map((U)=>b4(U))}),C1=class extends t{constructor(B,U){super("w:numPr");this.root.push(new WZ(U)),this.root.push(new PZ(B))}},WZ=class extends t{constructor(B){super("w:ilvl");if(B>9)throw Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new C0({val:B}))}},PZ=class extends t{constructor(B){super("w:numId");this.root.push(new C0({val:typeof B==="string"?`{${B}}`:B}))}},H1=class extends t{constructor(...B){super(...B);e(this,"fileChild",Symbol())}},AZ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}},jZ={INTERNAL:"INTERNAL",EXTERNAL:"EXTERNAL"},m2=class extends t{constructor(B,U,G){super("w:hyperlink");e(this,"linkId",void 0),this.linkId=U;let Y=new AZ({history:1,anchor:G?G:void 0,id:!G?`rId${this.linkId}`:void 0});this.root.push(Y),B.forEach((Q)=>{this.root.push(Q)})}},y4=class extends m2{constructor(B){super(B.children,O1(),B.anchor)}},t8=class extends t{constructor(B){super("w:externalHyperlink");e(this,"options",void 0),this.options=B}},NZ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{id:"w:id",name:"w:name"})}},zZ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{id:"w:id"})}},g4=class{constructor(B){e(this,"bookmarkUniqueNumericId",tB()),e(this,"start",void 0),e(this,"children",void 0),e(this,"end",void 0);let U=this.bookmarkUniqueNumericId();this.start=new f4(B.id,U),this.children=B.children,this.end=new x4(U)}},f4=class extends t{constructor(B,U){super("w:bookmarkStart");let G=new NZ({name:B,id:U});this.root.push(G)}},x4=class extends t{constructor(B){super("w:bookmarkEnd");let U=new zZ({id:B});this.root.push(U)}},wZ=function(B){return B.NONE="none",B.RELATIVE="relative",B.NO_CONTEXT="no_context",B.FULL_CONTEXT="full_context",B}({}),EZ={["relative"]:"\\r",["no_context"]:"\\n",["full_context"]:"\\w",["none"]:void 0},DZ=class extends s8{constructor(B,U,G={}){let{hyperlink:Y=!0,referenceFormat:Q="full_context"}=G,K=`${`REF ${B}`} ${[...Y?["\\h"]:[],...[EZ[Q]].filter((Z)=>!!Z)].join(" ")}`;super(K,U)}},_4=(B)=>new M0({name:"w:outlineLvl",attributes:{val:{key:"w:val",value:B}}}),TZ=class extends t{constructor(B,U={}){super("w:instrText");this.root.push(new _0({space:x0.PRESERVE}));let G=`PAGEREF ${B}`;if(U.hyperlink)G=`${G} \\h`;if(U.useRelativePosition)G=`${G} \\p`;this.root.push(G)}},CZ=class extends D0{constructor(B,U={}){super({children:[e0(!0),new TZ(B,U),B2()]})}},kZ={ANSI:"00",DEFAULT:"01",SYMBOL:"02",MAC:"4D",JIS:"80",HANGUL:"81",JOHAB:"82",GB_2312:"86",CHINESEBIG5:"88",GREEK:"A1",TURKISH:"A2",VIETNAMESE:"A3",HEBREW:"B1",ARABIC:"B2",BALTIC:"BA",RUSSIAN:"CC",THAI:"DE",EASTEUROPE:"EE",OEM:"FF"},E1=({id:B,fontKey:U,subsetted:G},Y)=>new M0({name:Y,attributes:L0({id:{key:"r:id",value:B}},U?{fontKey:{key:"w:fontKey",value:`{${U}}`}}:{}),children:[...G?[new q0("w:subsetted",G)]:[]]}),$Z=({name:B,altName:U,panose1:G,charset:Y,family:Q,notTrueType:K,pitch:Z,sig:J,embedRegular:q,embedBold:W,embedItalic:I,embedBoldItalic:H})=>new M0({name:"w:font",attributes:{name:{key:"w:name",value:B}},children:[...U?[f2("w:altName",U)]:[],...G?[f2("w:panose1",G)]:[],...Y?[f2("w:charset",Y)]:[],...Q?[f2("w:family",Q)]:[],...K?[new q0("w:notTrueType",K)]:[],...Z?[f2("w:pitch",Z)]:[],...J?[new M0({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:J.usb0},usb1:{key:"w:usb1",value:J.usb1},usb2:{key:"w:usb2",value:J.usb2},usb3:{key:"w:usb3",value:J.usb3},csb0:{key:"w:csb0",value:J.csb0},csb1:{key:"w:csb1",value:J.csb1}}})]:[],...q?[E1(q,"w:embedRegular")]:[],...W?[E1(W,"w:embedBold")]:[],...I?[E1(I,"w:embedItalic")]:[],...H?[E1(H,"w:embedBoldItalic")]:[]]}),SZ=({name:B,index:U,fontKey:G,characterSet:Y})=>$Z({name:B,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:Y,family:"auto",pitch:"variable",embedRegular:{fontKey:G,id:`rId${U}`}}),bZ=(B)=>new M0({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:B.map((U,G)=>SZ({name:U.name,index:G+1,fontKey:U.fontKey,characterSet:U.characterSet}))}),h4=class{constructor(B){e(this,"options",void 0),e(this,"fontTable",void 0),e(this,"relationships",void 0),e(this,"fontOptionsWithKey",[]),this.options=B,this.fontOptionsWithKey=B.map((U)=>L0(L0({},U),{},{fontKey:eB()})),this.fontTable=bZ(this.fontOptionsWithKey),this.relationships=new A2;for(let U=0;Unew M0({name:"w:wordWrap",attributes:{val:{key:"w:val",value:0}}}),yZ={NONE:"none",DROP:"drop",MARGIN:"margin"},gZ={MARGIN:"margin",PAGE:"page",TEXT:"text"},fZ={AROUND:"around",AUTO:"auto",NONE:"none",NOT_BESIDE:"notBeside",THROUGH:"through",TIGHT:"tight"},u4=(B)=>{var U,G;return new M0({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:B.anchorLock},dropCap:{key:"w:dropCap",value:B.dropCap},width:{key:"w:w",value:B.width},height:{key:"w:h",value:B.height},x:{key:"w:x",value:B.position?B.position.x:void 0},y:{key:"w:y",value:B.position?B.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:B.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:B.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(U=B.space)===null||U===void 0?void 0:U.horizontal},spaceVertical:{key:"w:vSpace",value:(G=B.space)===null||G===void 0?void 0:G.vertical},rule:{key:"w:hRule",value:B.rule},alignmentX:{key:"w:xAlign",value:B.alignment?B.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:B.alignment?B.alignment.y:void 0},lines:{key:"w:lines",value:B.lines},wrap:{key:"w:wrap",value:B.wrap}}})},M2=class extends R2{constructor(B){super("w:pPr",B===null||B===void 0?void 0:B.includeIfEmpty);if(e(this,"numberingReferences",[]),!B)return this;if(B.heading)this.push(x2(B.heading));if(B.bullet)this.push(x2("ListParagraph"));if(B.numbering){if(!B.style&&!B.heading){if(!B.numbering.custom)this.push(x2("ListParagraph"))}}if(B.style)this.push(x2(B.style));if(B.keepNext!==void 0)this.push(new q0("w:keepNext",B.keepNext));if(B.keepLines!==void 0)this.push(new q0("w:keepLines",B.keepLines));if(B.pageBreakBefore)this.push(new $4);if(B.frame)this.push(u4(B.frame));if(B.widowControl!==void 0)this.push(new q0("w:widowControl",B.widowControl));if(B.bullet)this.push(new C1(1,B.bullet.level));if(B.numbering){var U,G;this.numberingReferences.push({reference:B.numbering.reference,instance:(U=B.numbering.instance)!==null&&U!==void 0?U:0}),this.push(new C1(`${B.numbering.reference}-${(G=B.numbering.instance)!==null&&G!==void 0?G:0}`,B.numbering.level))}else if(B.numbering===!1)this.push(new C1(0,0));if(B.border)this.push(new xB(B.border));if(B.thematicBreak)this.push(new _B);if(B.shading)this.push(M1(B.shading));if(B.wordWrap)this.push(vZ());if(B.overflowPunctuation)this.push(new q0("w:overflowPunct",B.overflowPunctuation));let Y=[...B.rightTabStop!==void 0?[{type:z8.RIGHT,position:B.rightTabStop}]:[],...B.tabStops?B.tabStops:[],...B.leftTabStop!==void 0?[{type:z8.LEFT,position:B.leftTabStop}]:[]];if(Y.length>0)this.push(v4(Y));if(B.bidirectional!==void 0)this.push(new q0("w:bidi",B.bidirectional));if(B.spacing)this.push(S4(B.spacing));if(B.indent)this.push(hB(B.indent));if(B.contextualSpacing!==void 0)this.push(new q0("w:contextualSpacing",B.contextualSpacing));if(B.alignment)this.push(m8(B.alignment));if(B.outlineLevel!==void 0)this.push(_4(B.outlineLevel));if(B.suppressLineNumbers!==void 0)this.push(new q0("w:suppressLineNumbers",B.suppressLineNumbers));if(B.autoSpaceEastAsianText!==void 0)this.push(new q0("w:autoSpaceDN",B.autoSpaceEastAsianText));if(B.run)this.push(new mB(B.run));if(B.revision)this.push(new d4(B.revision))}push(B){this.root.push(B)}prepForXml(B){if(!(B.viewWrapper instanceof h4))for(let U of this.numberingReferences)B.file.Numbering.createConcreteNumberingInstance(U.reference,U.instance);return super.prepForXml(B)}},d4=class extends t{constructor(B){super("w:pPrChange");this.root.push(new b0({id:B.id,author:B.author,date:B.date})),this.root.push(new M2(L0(L0({},B),{},{includeIfEmpty:!0})))}},d0=class extends H1{constructor(B){super("w:p");if(e(this,"properties",void 0),typeof B==="string")return this.properties=new M2({}),this.root.push(this.properties),this.root.push(new Q1(B)),this;if(this.properties=new M2(B),this.root.push(this.properties),B.text)this.root.push(new Q1(B.text));if(B.children)for(let U of B.children){if(U instanceof g4){this.root.push(U.start);for(let G of U.children)this.root.push(G);this.root.push(U.end);continue}this.root.push(U)}}prepForXml(B){for(let U of this.root)if(U instanceof t8){let G=this.root.indexOf(U),Y=new m2(U.options.children,O1());B.viewWrapper.Relationships.addRelationship(Y.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",U.options.link,N4.EXTERNAL),this.root[G]=Y}return super.prepForXml(B)}addRunToFront(B){return this.root.splice(1,0,B),this}},xZ=class extends t{constructor(B){super("m:oMath");for(let U of B.children)this.root.push(U)}},_Z=class extends t{constructor(B){super("m:t");this.root.push(B)}},hZ=class extends t{constructor(B){super("m:r");this.root.push(new _Z(B))}},c4=class extends t{constructor(B){super("m:den");for(let U of B)this.root.push(U)}},m4=class extends t{constructor(B){super("m:num");for(let U of B)this.root.push(U)}},uZ=class extends t{constructor(B){super("m:f");this.root.push(new m4(B.numerator)),this.root.push(new c4(B.denominator))}},l4=({accent:B})=>new M0({name:"m:chr",attributes:{accent:{key:"m:val",value:B}}}),y0=({children:B})=>new M0({name:"m:e",children:B}),a4=({value:B})=>new M0({name:"m:limLoc",attributes:{value:{key:"m:val",value:B||"undOvr"}}}),dZ=()=>new M0({name:"m:subHide",attributes:{hide:{key:"m:val",value:1}}}),cZ=()=>new M0({name:"m:supHide",attributes:{hide:{key:"m:val",value:1}}}),e8=({accent:B,hasSuperScript:U,hasSubScript:G,limitLocationVal:Y})=>new M0({name:"m:naryPr",children:[...B?[l4({accent:B})]:[],a4({value:Y}),...!U?[cZ()]:[],...!G?[dZ()]:[]]}),l2=({children:B})=>new M0({name:"m:sub",children:B}),a2=({children:B})=>new M0({name:"m:sup",children:B}),mZ=class extends t{constructor(B){super("m:nary");if(this.root.push(e8({accent:"∑",hasSuperScript:!!B.superScript,hasSubScript:!!B.subScript})),B.subScript)this.root.push(l2({children:B.subScript}));if(B.superScript)this.root.push(a2({children:B.superScript}));this.root.push(y0({children:B.children}))}},lZ=class extends t{constructor(B){super("m:nary");if(this.root.push(e8({accent:"",hasSuperScript:!!B.superScript,hasSubScript:!!B.subScript,limitLocationVal:"subSup"})),B.subScript)this.root.push(l2({children:B.subScript}));if(B.superScript)this.root.push(a2({children:B.superScript}));this.root.push(y0({children:B.children}))}},B6=class extends t{constructor(B){super("m:lim");for(let U of B)this.root.push(U)}},aZ=class extends t{constructor(B){super("m:limUpp");this.root.push(y0({children:B.children})),this.root.push(new B6(B.limit))}},pZ=class extends t{constructor(B){super("m:limLow");this.root.push(y0({children:B.children})),this.root.push(new B6(B.limit))}},p4=()=>new M0({name:"m:sSupPr"}),rZ=class extends t{constructor(B){super("m:sSup");this.root.push(p4()),this.root.push(y0({children:B.children})),this.root.push(a2({children:B.superScript}))}},r4=()=>new M0({name:"m:sSubPr"}),iZ=class extends t{constructor(B){super("m:sSub");this.root.push(r4()),this.root.push(y0({children:B.children})),this.root.push(l2({children:B.subScript}))}},i4=()=>new M0({name:"m:sSubSupPr"}),nZ=class extends t{constructor(B){super("m:sSubSup");this.root.push(i4()),this.root.push(y0({children:B.children})),this.root.push(l2({children:B.subScript})),this.root.push(a2({children:B.superScript}))}},n4=()=>new M0({name:"m:sPrePr"}),sZ=class extends M0{constructor({children:B,subScript:U,superScript:G}){super({name:"m:sPre",children:[n4(),y0({children:B}),l2({children:U}),a2({children:G})]})}},oZ="",s4=class extends t{constructor(B){super("m:deg");if(B)for(let U of B)this.root.push(U)}},tZ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{hide:"m:val"})}},eZ=class extends t{constructor(){super("m:degHide");this.root.push(new tZ({hide:1}))}},o4=class extends t{constructor(B){super("m:radPr");if(!B)this.root.push(new eZ)}},BQ=class extends t{constructor(B){super("m:rad");this.root.push(new o4(!!B.degree)),this.root.push(new s4(B.degree)),this.root.push(y0({children:B.children}))}},t4=class extends t{constructor(B){super("m:fName");for(let U of B)this.root.push(U)}},e4=class extends t{constructor(){super("m:funcPr")}},UQ=class extends t{constructor(B){super("m:func");this.root.push(new e4),this.root.push(new t4(B.name)),this.root.push(y0({children:B.children}))}},GQ=({character:B})=>new M0({name:"m:begChr",attributes:{character:{key:"m:val",value:B}}}),YQ=({character:B})=>new M0({name:"m:endChr",attributes:{character:{key:"m:val",value:B}}}),l1=({characters:B})=>new M0({name:"m:dPr",children:B?[GQ({character:B.beginningCharacter}),YQ({character:B.endingCharacter})]:[]}),ZQ=class extends t{constructor(B){super("m:d");this.root.push(l1({})),this.root.push(y0({children:B.children}))}},QQ=class extends t{constructor(B){super("m:d");this.root.push(l1({characters:{beginningCharacter:"[",endingCharacter:"]"}})),this.root.push(y0({children:B.children}))}},JQ=class extends t{constructor(B){super("m:d");this.root.push(l1({characters:{beginningCharacter:"{",endingCharacter:"}"}})),this.root.push(y0({children:B.children}))}},KQ=class extends t{constructor(B){super("m:d");this.root.push(l1({characters:{beginningCharacter:"〈",endingCharacter:"〉"}})),this.root.push(y0({children:B.children}))}},VQ=(B)=>new M0({name:"w:gridCol",attributes:B!==void 0?{width:{key:"w:w",value:E0(B)}}:void 0}),B9=class extends t{constructor(B,U){super("w:tblGrid");for(let G of B)this.root.push(VQ(G));if(U)this.root.push(new qQ(U))}},XQ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{id:"w:id"})}},qQ=class extends t{constructor(B){super("w:tblGridChange");this.root.push(new XQ({id:B.id})),this.root.push(new B9(B.columnWidths))}},MQ=class extends t{constructor(B){super("w:ins");this.root.push(new b0({id:B.id,author:B.author,date:B.date})),this.addChildElement(new Q1(B))}},RQ=class extends t{constructor(){super("w:delInstrText");this.root.push(new _0({space:x0.PRESERVE})),this.root.push("PAGE")}},LQ=class extends t{constructor(){super("w:delInstrText");this.root.push(new _0({space:x0.PRESERVE})),this.root.push("NUMPAGES")}},IQ=class extends t{constructor(){super("w:delInstrText");this.root.push(new _0({space:x0.PRESERVE})),this.root.push("SECTIONPAGES")}},p6=class extends t{constructor(B){super("w:delText");this.root.push(new _0({space:x0.PRESERVE})),this.root.push(B)}},OQ=class extends t{constructor(B){super("w:del");e(this,"deletedTextRunWrapper",void 0),this.root.push(new b0({id:B.id,author:B.author,date:B.date})),this.deletedTextRunWrapper=new HQ(B),this.addChildElement(this.deletedTextRunWrapper)}},HQ=class extends t{constructor(B){super("w:r");if(this.root.push(new U2(B)),B.children)for(let U of B.children){if(typeof U==="string"){switch(U){case F2.CURRENT:this.root.push(e0()),this.root.push(new RQ),this.root.push(X2()),this.root.push(B2());break;case F2.TOTAL_PAGES:this.root.push(e0()),this.root.push(new LQ),this.root.push(X2()),this.root.push(B2());break;case F2.TOTAL_PAGES_IN_SECTION:this.root.push(e0()),this.root.push(new IQ),this.root.push(X2()),this.root.push(B2());break;default:this.root.push(new p6(U));break}continue}this.root.push(U)}else if(B.text)this.root.push(new p6(B.text));if(B.break)for(let U=0;Unew M0({name:"w:vAlign",attributes:{verticalAlign:{key:"w:val",value:B}}}),X9=({marginUnitType:B=v1.DXA,top:U,left:G,bottom:Y,right:Q})=>[{name:"w:top",size:U},{name:"w:left",size:G},{name:"w:bottom",size:Y},{name:"w:right",size:Q}].filter((K)=>K.size!==void 0).map(({name:K,size:Z})=>J1(K,{type:B,size:Z})),PQ=(B)=>{let U=X9(B);if(U.length===0)return;return new M0({name:"w:tblCellMar",children:U})},AQ=(B)=>{let U=X9(B);if(U.length===0)return;return new M0({name:"w:tcMar",children:U})},v1={AUTO:"auto",DXA:"dxa",NIL:"nil",PERCENTAGE:"pct"},J1=(B,{type:U=v1.AUTO,size:G})=>{let Y=G;if(U===v1.PERCENTAGE&&typeof G==="number")Y=`${G}%`;return new M0({name:B,attributes:{type:{key:"w:type",value:U},size:{key:"w:w",value:c8(Y)}}})},q9=class extends R2{constructor(B){super("w:tcBorders");if(B.top)this.root.push(j0("w:top",B.top));if(B.start)this.root.push(j0("w:start",B.start));if(B.left)this.root.push(j0("w:left",B.left));if(B.bottom)this.root.push(j0("w:bottom",B.bottom));if(B.end)this.root.push(j0("w:end",B.end));if(B.right)this.root.push(j0("w:right",B.right))}},jQ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{val:"w:val"})}},M9=class extends t{constructor(B){super("w:gridSpan");this.root.push(new jQ({val:T0(B)}))}},G6={CONTINUE:"continue",RESTART:"restart"},NQ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{val:"w:val"})}},w8=class extends t{constructor(B){super("w:vMerge");this.root.push(new NQ({val:B}))}},zQ={BOTTOM_TO_TOP_LEFT_TO_RIGHT:"btLr",LEFT_TO_RIGHT_TOP_TO_BOTTOM:"lrTb",TOP_TO_BOTTOM_RIGHT_TO_LEFT:"tbRl"},wQ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{val:"w:val"})}},R9=class extends t{constructor(B){super("w:textDirection");this.root.push(new wQ({val:B}))}},L9=class extends R2{constructor(B){super("w:tcPr",B.includeIfEmpty);if(B.width)this.root.push(J1("w:tcW",B.width));if(B.columnSpan)this.root.push(new M9(B.columnSpan));if(B.verticalMerge)this.root.push(new w8(B.verticalMerge));else if(B.rowSpan&&B.rowSpan>1)this.root.push(new w8(G6.RESTART));if(B.borders)this.root.push(new q9(B.borders));if(B.shading)this.root.push(M1(B.shading));if(B.margins){let U=AQ(B.margins);if(U)this.root.push(U)}if(B.textDirection)this.root.push(new R9(B.textDirection));if(B.verticalAlign)this.root.push(U6(B.verticalAlign));if(B.insertion)this.root.push(new Y9(B.insertion));if(B.deletion)this.root.push(new Z9(B.deletion));if(B.revision)this.root.push(new EQ(B.revision));if(B.cellMerge)this.root.push(new J9(B.cellMerge))}},EQ=class extends t{constructor(B){super("w:tcPrChange");this.root.push(new b0({id:B.id,author:B.author,date:B.date})),this.root.push(new L9(L0(L0({},B),{},{includeIfEmpty:!0})))}},Y6=class extends t{constructor(B){super("w:tc");e(this,"options",void 0),this.options=B,this.root.push(new L9(B));for(let U of B.children)this.root.push(U)}prepForXml(B){if(!(this.root[this.root.length-1]instanceof d0))this.root.push(new d0({}));return super.prepForXml(B)}},v2={style:c1.NONE,size:0,color:"auto"},y2={style:c1.SINGLE,size:4,color:"auto"},Z6=class extends t{constructor(B){var U,G,Y,Q,K,Z;super("w:tblBorders");this.root.push(j0("w:top",(U=B.top)!==null&&U!==void 0?U:y2)),this.root.push(j0("w:left",(G=B.left)!==null&&G!==void 0?G:y2)),this.root.push(j0("w:bottom",(Y=B.bottom)!==null&&Y!==void 0?Y:y2)),this.root.push(j0("w:right",(Q=B.right)!==null&&Q!==void 0?Q:y2)),this.root.push(j0("w:insideH",(K=B.insideHorizontal)!==null&&K!==void 0?K:y2)),this.root.push(j0("w:insideV",(Z=B.insideVertical)!==null&&Z!==void 0?Z:y2))}};e(Z6,"NONE",{top:v2,bottom:v2,left:v2,right:v2,insideHorizontal:v2,insideVertical:v2});var DQ={MARGIN:"margin",PAGE:"page",TEXT:"text"},TQ={CENTER:"center",INSIDE:"inside",LEFT:"left",OUTSIDE:"outside",RIGHT:"right"},CQ={CENTER:"center",INSIDE:"inside",BOTTOM:"bottom",OUTSIDE:"outside",INLINE:"inline",TOP:"top"},kQ={NEVER:"never",OVERLAP:"overlap"},$Q=(B)=>new M0({name:"w:tblOverlap",attributes:{val:{key:"w:val",value:B}}}),I9=({horizontalAnchor:B,verticalAnchor:U,absoluteHorizontalPosition:G,relativeHorizontalPosition:Y,absoluteVerticalPosition:Q,relativeVerticalPosition:K,bottomFromText:Z,topFromText:J,leftFromText:q,rightFromText:W,overlap:I})=>new M0({name:"w:tblpPr",attributes:{leftFromText:{key:"w:leftFromText",value:q===void 0?void 0:E0(q)},rightFromText:{key:"w:rightFromText",value:W===void 0?void 0:E0(W)},topFromText:{key:"w:topFromText",value:J===void 0?void 0:E0(J)},bottomFromText:{key:"w:bottomFromText",value:Z===void 0?void 0:E0(Z)},absoluteHorizontalPosition:{key:"w:tblpX",value:G===void 0?void 0:t0(G)},absoluteVerticalPosition:{key:"w:tblpY",value:Q===void 0?void 0:t0(Q)},horizontalAnchor:{key:"w:horzAnchor",value:B},relativeHorizontalPosition:{key:"w:tblpXSpec",value:Y},relativeVerticalPosition:{key:"w:tblpYSpec",value:K},verticalAnchor:{key:"w:vertAnchor",value:U}},children:I?[$Q(I)]:void 0}),SQ={AUTOFIT:"autofit",FIXED:"fixed"},O9=(B)=>new M0({name:"w:tblLayout",attributes:{type:{key:"w:type",value:B}}}),bQ={DXA:"dxa",NIL:"nil"},H9=({type:B=bQ.DXA,value:U})=>new M0({name:"w:tblCellSpacing",attributes:{type:{key:"w:type",value:B},value:{key:"w:w",value:c8(U)}}}),F9=({firstRow:B,lastRow:U,firstColumn:G,lastColumn:Y,noHBand:Q,noVBand:K})=>new M0({name:"w:tblLook",attributes:{firstRow:{key:"w:firstRow",value:B},lastRow:{key:"w:lastRow",value:U},firstColumn:{key:"w:firstColumn",value:G},lastColumn:{key:"w:lastColumn",value:Y},noHBand:{key:"w:noHBand",value:Q},noVBand:{key:"w:noVBand",value:K}}}),Q6=class extends R2{constructor(B){super("w:tblPr",B.includeIfEmpty);if(B.style)this.root.push(new q2("w:tblStyle",B.style));if(B.float)this.root.push(I9(B.float));if(B.visuallyRightToLeft!==void 0)this.root.push(new q0("w:bidiVisual",B.visuallyRightToLeft));if(B.width)this.root.push(J1("w:tblW",B.width));if(B.alignment)this.root.push(m8(B.alignment));if(B.indent)this.root.push(J1("w:tblInd",B.indent));if(B.borders)this.root.push(new Z6(B.borders));if(B.shading)this.root.push(M1(B.shading));if(B.layout)this.root.push(O9(B.layout));if(B.cellMargin){let U=PQ(B.cellMargin);if(U)this.root.push(U)}if(B.tableLook)this.root.push(F9(B.tableLook));if(B.cellSpacing)this.root.push(H9(B.cellSpacing));if(B.revision)this.root.push(new vQ(B.revision))}},vQ=class extends t{constructor(B){super("w:tblPrChange");this.root.push(new b0({id:B.id,author:B.author,date:B.date})),this.root.push(new Q6(L0(L0({},B),{},{includeIfEmpty:!0})))}},yQ=class extends H1{constructor({rows:B,width:U,columnWidths:G=Array(Math.max(...B.map((j)=>j.CellCount))).fill(100),columnWidthsRevision:Y,margins:Q,indent:K,float:Z,layout:J,style:q,borders:W,alignment:I,visuallyRightToLeft:H,tableLook:T,cellSpacing:A,revision:P}){super("w:tbl");this.root.push(new Q6({borders:W!==null&&W!==void 0?W:{},width:U!==null&&U!==void 0?U:{size:100},indent:K,float:Z,layout:J,style:q,alignment:I,cellMargin:Q,visuallyRightToLeft:H,tableLook:T,cellSpacing:A,revision:P})),this.root.push(new B9(G,Y));for(let j of B)this.root.push(j);B.forEach((j,E)=>{if(E===B.length-1)return;let C=0;j.cells.forEach((N)=>{if(N.options.rowSpan&&N.options.rowSpan>1){let v=new Y6({rowSpan:N.options.rowSpan-1,columnSpan:N.options.columnSpan,borders:N.options.borders,children:[],verticalMerge:G6.CONTINUE});B[E+1].addCellToColumnIndex(v,C)}C+=N.options.columnSpan||1})})}},gQ={AUTO:"auto",ATLEAST:"atLeast",EXACT:"exact"},W9=(B,U)=>new M0({name:"w:trHeight",attributes:{value:{key:"w:val",value:E0(B)},rule:{key:"w:hRule",value:U}}}),J6=class extends R2{constructor(B){super("w:trPr",B.includeIfEmpty);if(B.cantSplit!==void 0)this.root.push(new q0("w:cantSplit",B.cantSplit));if(B.tableHeader!==void 0)this.root.push(new q0("w:tblHeader",B.tableHeader));if(B.height)this.root.push(W9(B.height.value,B.height.rule));if(B.cellSpacing)this.root.push(H9(B.cellSpacing));if(B.insertion)this.root.push(new U9(B.insertion));if(B.deletion)this.root.push(new G9(B.deletion));if(B.revision)this.root.push(new P9(B.revision))}},P9=class extends t{constructor(B){super("w:trPrChange");this.root.push(new b0({id:B.id,author:B.author,date:B.date})),this.root.push(new J6(L0(L0({},B),{},{includeIfEmpty:!0})))}},fQ=class extends t{constructor(B){super("w:tr");e(this,"options",void 0),this.options=B,this.root.push(new J6(B));for(let U of B.children)this.root.push(U)}get CellCount(){return this.options.children.length}get cells(){return this.root.filter((B)=>B instanceof Y6)}addCellToIndex(B,U){this.root.splice(U+1,0,B)}addCellToColumnIndex(B,U){let G=this.columnIndexToRootIndex(U,!0);this.addCellToIndex(B,G-1)}rootIndexToColumnIndex(B){if(B<1||B>=this.root.length)throw Error(`cell 'rootIndex' should between 1 to ${this.root.length-1}`);let U=0;for(let G=1;G=this.root.length)if(U)return this.root.length;else throw Error(`cell 'columnIndex' should not great than ${G-1}`);let Q=this.root[Y];Y+=1,G+=Q&&Q.options.columnSpan||1}return Y-1}},xQ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}},_Q=class extends t{constructor(){super("Properties");this.root.push(new xQ({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}},hQ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{xmlns:"xmlns"})}},V2=(B,U)=>new M0({name:"Default",attributes:{contentType:{key:"ContentType",value:B},extension:{key:"Extension",value:U}}}),f0=(B,U)=>new M0({name:"Override",attributes:{contentType:{key:"ContentType",value:B},partName:{key:"PartName",value:U}}}),uQ=class extends t{constructor(){super("Types");this.root.push(new hQ({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(V2("image/png","png")),this.root.push(V2("image/jpeg","jpeg")),this.root.push(V2("image/jpeg","jpg")),this.root.push(V2("image/bmp","bmp")),this.root.push(V2("image/gif","gif")),this.root.push(V2("image/svg+xml","svg")),this.root.push(V2("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(V2("application/xml","xml")),this.root.push(V2("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(f0("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(f0("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(f0("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml","/word/endnotes.xml")),this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml")),this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml"))}addCommentsExtended(){this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml","/word/commentsExtended.xml"))}addFooter(B){this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${B}.xml`))}addHeader(B){this.root.push(f0("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${B}.xml`))}},y1={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},F1=class extends H0{constructor(B,U){super(L0({Ignorable:U},Object.fromEntries(B.map((G)=>[G,y1[G]]))));e(this,"xmlKeys",L0({Ignorable:"mc:Ignorable"},Object.fromEntries(Object.keys(y1).map((G)=>[G,`xmlns:${G}`]))))}},dQ=class extends t{constructor(B){super("cp:coreProperties");if(this.root.push(new F1(["cp","dc","dcterms","dcmitype","xsi"])),B.title)this.root.push(new O2("dc:title",B.title));if(B.subject)this.root.push(new O2("dc:subject",B.subject));if(B.creator)this.root.push(new O2("dc:creator",B.creator));if(B.keywords)this.root.push(new O2("cp:keywords",B.keywords));if(B.description)this.root.push(new O2("dc:description",B.description));if(B.lastModifiedBy)this.root.push(new O2("cp:lastModifiedBy",B.lastModifiedBy));if(B.revision)this.root.push(new O2("cp:revision",String(B.revision)));this.root.push(new r6("dcterms:created")),this.root.push(new r6("dcterms:modified"))}},cQ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{type:"xsi:type"})}},r6=class extends t{constructor(B){super(B);this.root.push(new cQ({type:"dcterms:W3CDTF"})),this.root.push(fB(new Date))}},mQ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}},lQ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{formatId:"fmtid",pid:"pid",name:"name"})}},aQ=class extends t{constructor(B,U){super("property");this.root.push(new lQ({formatId:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:B.toString(),name:U.name})),this.root.push(new pQ(U.value))}},pQ=class extends t{constructor(B){super("vt:lpwstr");this.root.push(B)}},rQ=class extends t{constructor(B){super("Properties");e(this,"nextId",void 0),e(this,"properties",[]),this.root.push(new mQ({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(let U of B)this.addCustomProperty(U)}prepForXml(B){return this.properties.forEach((U)=>this.root.push(U)),super.prepForXml(B)}addCustomProperty(B){this.properties.push(new aQ(this.nextId++,B))}},A9=({space:B,count:U,separate:G,equalWidth:Y,children:Q})=>new M0({name:"w:cols",attributes:{space:{key:"w:space",value:B===void 0?void 0:E0(B)},count:{key:"w:num",value:U===void 0?void 0:T0(U)},separate:{key:"w:sep",value:G},equalWidth:{key:"w:equalWidth",value:Y}},children:!Y&&Q?Q:void 0}),iQ={DEFAULT:"default",LINES:"lines",LINES_AND_CHARS:"linesAndChars",SNAP_TO_CHARS:"snapToChars"},j9=({type:B,linePitch:U,charSpace:G})=>new M0({name:"w:docGrid",attributes:{type:{key:"w:type",value:B},linePitch:{key:"w:linePitch",value:T0(U)},charSpace:{key:"w:charSpace",value:G?T0(G):void 0}}}),T2={DEFAULT:"default",FIRST:"first",EVEN:"even"},E8={HEADER:"w:headerReference",FOOTER:"w:footerReference"},k1=(B,U)=>new M0({name:B,attributes:{type:{key:"w:type",value:U.type||T2.DEFAULT},id:{key:"r:id",value:`rId${U.id}`}}}),nQ={NEW_PAGE:"newPage",NEW_SECTION:"newSection",CONTINUOUS:"continuous"},N9=({countBy:B,start:U,restart:G,distance:Y})=>new M0({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:B===void 0?void 0:T0(B)},start:{key:"w:start",value:U===void 0?void 0:T0(U)},restart:{key:"w:restart",value:G},distance:{key:"w:distance",value:Y===void 0?void 0:E0(Y)}}}),sQ={ALL_PAGES:"allPages",FIRST_PAGE:"firstPage",NOT_FIRST_PAGE:"notFirstPage"},oQ={PAGE:"page",TEXT:"text"},tQ={BACK:"back",FRONT:"front"},i6=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}},z9=class extends R2{constructor(B){super("w:pgBorders");if(!B)return this;if(B.pageBorders)this.root.push(new i6({display:B.pageBorders.display,offsetFrom:B.pageBorders.offsetFrom,zOrder:B.pageBorders.zOrder}));else this.root.push(new i6({}));if(B.pageBorderTop)this.root.push(j0("w:top",B.pageBorderTop));if(B.pageBorderLeft)this.root.push(j0("w:left",B.pageBorderLeft));if(B.pageBorderBottom)this.root.push(j0("w:bottom",B.pageBorderBottom));if(B.pageBorderRight)this.root.push(j0("w:right",B.pageBorderRight))}},w9=(B,U,G,Y,Q,K,Z)=>new M0({name:"w:pgMar",attributes:{top:{key:"w:top",value:t0(B)},right:{key:"w:right",value:E0(U)},bottom:{key:"w:bottom",value:t0(G)},left:{key:"w:left",value:E0(Y)},header:{key:"w:header",value:E0(Q)},footer:{key:"w:footer",value:E0(K)},gutter:{key:"w:gutter",value:E0(Z)}}}),eQ={HYPHEN:"hyphen",PERIOD:"period",COLON:"colon",EM_DASH:"emDash",EN_DASH:"endash"},E9=({start:B,formatType:U,separator:G})=>new M0({name:"w:pgNumType",attributes:{start:{key:"w:start",value:B===void 0?void 0:T0(B)},formatType:{key:"w:fmt",value:U},separator:{key:"w:chapSep",value:G}}}),g1={PORTRAIT:"portrait",LANDSCAPE:"landscape"},D9=({width:B,height:U,orientation:G,code:Y})=>{let Q=E0(B),K=E0(U);return new M0({name:"w:pgSz",attributes:{width:{key:"w:w",value:G===g1.LANDSCAPE?K:Q},height:{key:"w:h",value:G===g1.LANDSCAPE?Q:K},orientation:{key:"w:orient",value:G},code:{key:"w:code",value:Y}}})},BJ={LEFT_TO_RIGHT_TOP_TO_BOTTOM:"lrTb",TOP_TO_BOTTOM_RIGHT_TO_LEFT:"tbRl"},UJ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{val:"w:val"})}},T9=class extends t{constructor(B){super("w:textDirection");this.root.push(new UJ({val:B}))}},GJ={NEXT_PAGE:"nextPage",NEXT_COLUMN:"nextColumn",CONTINUOUS:"continuous",EVEN_PAGE:"evenPage",ODD_PAGE:"oddPage"},C9=(B)=>new M0({name:"w:type",attributes:{val:{key:"w:val",value:B}}}),H2={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},$1={WIDTH:11906,HEIGHT:16838,ORIENTATION:g1.PORTRAIT},K6=class extends t{constructor({page:{size:{width:B=$1.WIDTH,height:U=$1.HEIGHT,orientation:G=$1.ORIENTATION,code:Y}={},margin:{top:Q=H2.TOP,right:K=H2.RIGHT,bottom:Z=H2.BOTTOM,left:J=H2.LEFT,header:q=H2.HEADER,footer:W=H2.FOOTER,gutter:I=H2.GUTTER}={},pageNumbers:H={},borders:T,textDirection:A}={},grid:{linePitch:P=360,charSpace:j,type:E}={},headerWrapperGroup:C={},footerWrapperGroup:N={},lineNumbers:v,titlePage:S,verticalAlign:F,column:M,type:$,revision:x}={}){super("w:sectPr");if(this.addHeaderFooterGroup(E8.HEADER,C),this.addHeaderFooterGroup(E8.FOOTER,N),$)this.root.push(C9($));if(this.root.push(D9({width:B,height:U,orientation:G,code:Y})),this.root.push(w9(Q,K,Z,J,q,W,I)),T)this.root.push(new z9(T));if(v)this.root.push(N9(v));if(this.root.push(E9(H)),M)this.root.push(A9(M));if(F)this.root.push(U6(F));if(S!==void 0)this.root.push(new q0("w:titlePg",S));if(A)this.root.push(new T9(A));if(x)this.root.push(new k9(x));this.root.push(j9({linePitch:P,charSpace:j,type:E}))}addHeaderFooterGroup(B,U){if(U.default)this.root.push(k1(B,{type:T2.DEFAULT,id:U.default.View.ReferenceId}));if(U.first)this.root.push(k1(B,{type:T2.FIRST,id:U.first.View.ReferenceId}));if(U.even)this.root.push(k1(B,{type:T2.EVEN,id:U.even.View.ReferenceId}))}},k9=class extends t{constructor(B){super("w:sectPrChange");this.root.push(new b0({id:B.id,author:B.author,date:B.date})),this.root.push(new K6(B))}},YJ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{width:"w:w",space:"w:space"})}},ZJ=class extends t{constructor(B){super("w:col");this.root.push(new YJ({width:E0(B.width),space:B.space===void 0?void 0:E0(B.space)}))}},$9=class extends t{constructor(){super("w:body");e(this,"sections",[])}addSection(B){let U=this.sections.pop();this.root.push(this.createSectionParagraph(U)),this.sections.push(new K6(B))}prepForXml(B){if(this.sections.length===1)this.root.splice(0,1),this.root.push(this.sections.pop());return super.prepForXml(B)}push(B){this.root.push(B)}createSectionParagraph(B){let U=new d0({}),G=new M2({});return G.push(B),U.addChildElement(G),U}},S9=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}},b9=class extends t{constructor(B){super("w:background");this.root.push(new S9({color:B.color===void 0?void 0:C2(B.color),themeColor:B.themeColor,themeShade:B.themeShade===void 0?void 0:W8(B.themeShade),themeTint:B.themeTint===void 0?void 0:W8(B.themeTint)}))}},QJ=class extends t{constructor(B){super("w:document");if(e(this,"body",void 0),this.root.push(new F1(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps","cx","cx1","cx2","cx3","cx4","cx5","cx6","cx7","cx8","aink","am3d","w16cex","w16cid","w16","w16sdtdh","w16se"],"w14 w15 wp14")),this.body=new $9,B.background)this.root.push(new b9(B.background));this.root.push(this.body)}add(B){return this.body.push(B),this}get Body(){return this.body}},JJ=class{constructor(B){e(this,"document",void 0),e(this,"relationships",void 0),this.document=new QJ(B),this.relationships=new A2}get View(){return this.document}get Relationships(){return this.relationships}},KJ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}},VJ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{type:"w:type",id:"w:id"})}},XJ=class extends D0{constructor(){super({style:"EndnoteReference"});this.root.push(new D4)}},n6={SEPARATOR:"separator",CONTINUATION_SEPARATOR:"continuationSeparator"},X8=class extends t{constructor(B){super("w:endnote");this.root.push(new VJ({type:B.type,id:B.id}));for(let U=0;U9)throw Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new zJ({ilvl:T0(B),tentative:1}))}},h9=class extends X6{},$J=class extends X6{},SJ=class extends t{constructor(B){super("w:multiLevelType");this.root.push(new C0({val:B}))}},bJ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}},D8=class extends t{constructor(B,U){super("w:abstractNum");e(this,"id",void 0),this.root.push(new bJ({abstractNumId:T0(B),restartNumberingAfterBreak:0})),this.root.push(new SJ("hybridMultilevel")),this.id=B;for(let G of U)this.root.push(new h9(G))}},vJ=class extends t{constructor(B){super("w:abstractNumId");this.root.push(new C0({val:B}))}},yJ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{numId:"w:numId"})}},T8=class extends t{constructor(B){super("w:num");if(e(this,"numId",void 0),e(this,"reference",void 0),e(this,"instance",void 0),this.numId=B.numId,this.reference=B.reference,this.instance=B.instance,this.root.push(new yJ({numId:T0(B.numId)})),this.root.push(new vJ(T0(B.abstractNumId))),B.overrideLevels&&B.overrideLevels.length)for(let U of B.overrideLevels)this.root.push(new u9(U.num,U.start))}},gJ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{ilvl:"w:ilvl"})}},u9=class extends t{constructor(B,U){super("w:lvlOverride");if(this.root.push(new gJ({ilvl:B})),U!==void 0)this.root.push(new xJ(U))}},fJ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{val:"w:val"})}},xJ=class extends t{constructor(B){super("w:startOverride");this.root.push(new fJ({val:B}))}},d9=class extends t{constructor(B){super("w:numbering");e(this,"abstractNumberingMap",new Map),e(this,"concreteNumberingMap",new Map),e(this,"referenceConfigMap",new Map),e(this,"abstractNumUniqueNumericId",nB()),e(this,"concreteNumUniqueNumericId",sB()),this.root.push(new F1(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps"],"w14 w15 wp14"));let U=new D8(this.abstractNumUniqueNumericId(),[{level:0,format:i0.BULLET,text:"●",alignment:c0.LEFT,style:{paragraph:{indent:{left:u0(0.5),hanging:u0(0.25)}}}},{level:1,format:i0.BULLET,text:"○",alignment:c0.LEFT,style:{paragraph:{indent:{left:u0(1),hanging:u0(0.25)}}}},{level:2,format:i0.BULLET,text:"■",alignment:c0.LEFT,style:{paragraph:{indent:{left:2160,hanging:u0(0.25)}}}},{level:3,format:i0.BULLET,text:"●",alignment:c0.LEFT,style:{paragraph:{indent:{left:2880,hanging:u0(0.25)}}}},{level:4,format:i0.BULLET,text:"○",alignment:c0.LEFT,style:{paragraph:{indent:{left:3600,hanging:u0(0.25)}}}},{level:5,format:i0.BULLET,text:"■",alignment:c0.LEFT,style:{paragraph:{indent:{left:4320,hanging:u0(0.25)}}}},{level:6,format:i0.BULLET,text:"●",alignment:c0.LEFT,style:{paragraph:{indent:{left:5040,hanging:u0(0.25)}}}},{level:7,format:i0.BULLET,text:"●",alignment:c0.LEFT,style:{paragraph:{indent:{left:5760,hanging:u0(0.25)}}}},{level:8,format:i0.BULLET,text:"●",alignment:c0.LEFT,style:{paragraph:{indent:{left:6480,hanging:u0(0.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new T8({numId:1,abstractNumId:U.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",U);for(let G of B.config)this.abstractNumberingMap.set(G.reference,new D8(this.abstractNumUniqueNumericId(),G.levels)),this.referenceConfigMap.set(G.reference,G.levels)}prepForXml(B){for(let U of this.abstractNumberingMap.values())this.root.push(U);for(let U of this.concreteNumberingMap.values())this.root.push(U);return super.prepForXml(B)}createConcreteNumberingInstance(B,U){let G=this.abstractNumberingMap.get(B);if(!G)return;let Y=`${B}-${U}`;if(this.concreteNumberingMap.has(Y))return;let Q=this.referenceConfigMap.get(B),K=Q&&Q[0].start,Z={numId:this.concreteNumUniqueNumericId(),abstractNumId:G.id,reference:B,instance:U,overrideLevels:[typeof K==="number"&&Number.isInteger(K)?{num:0,start:K}:{num:0,start:1}]};this.concreteNumberingMap.set(Y,new T8(Z))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}},_J=(B)=>new M0({name:"w:compatSetting",attributes:{version:{key:"w:val",value:B},name:{key:"w:name",value:"compatibilityMode"},uri:{key:"w:uri",value:"http://schemas.microsoft.com/office/word"}}}),hJ=class extends t{constructor(B){super("w:compat");if(B.version)this.root.push(_J(B.version));if(B.useSingleBorderforContiguousCells)this.root.push(new q0("w:useSingleBorderforContiguousCells",B.useSingleBorderforContiguousCells));if(B.wordPerfectJustification)this.root.push(new q0("w:wpJustification",B.wordPerfectJustification));if(B.noTabStopForHangingIndent)this.root.push(new q0("w:noTabHangInd",B.noTabStopForHangingIndent));if(B.noLeading)this.root.push(new q0("w:noLeading",B.noLeading));if(B.spaceForUnderline)this.root.push(new q0("w:spaceForUL",B.spaceForUnderline));if(B.noColumnBalance)this.root.push(new q0("w:noColumnBalance",B.noColumnBalance));if(B.balanceSingleByteDoubleByteWidth)this.root.push(new q0("w:balanceSingleByteDoubleByteWidth",B.balanceSingleByteDoubleByteWidth));if(B.noExtraLineSpacing)this.root.push(new q0("w:noExtraLineSpacing",B.noExtraLineSpacing));if(B.doNotLeaveBackslashAlone)this.root.push(new q0("w:doNotLeaveBackslashAlone",B.doNotLeaveBackslashAlone));if(B.underlineTrailingSpaces)this.root.push(new q0("w:ulTrailSpace",B.underlineTrailingSpaces));if(B.doNotExpandShiftReturn)this.root.push(new q0("w:doNotExpandShiftReturn",B.doNotExpandShiftReturn));if(B.spacingInWholePoints)this.root.push(new q0("w:spacingInWholePoints",B.spacingInWholePoints));if(B.lineWrapLikeWord6)this.root.push(new q0("w:lineWrapLikeWord6",B.lineWrapLikeWord6));if(B.printBodyTextBeforeHeader)this.root.push(new q0("w:printBodyTextBeforeHeader",B.printBodyTextBeforeHeader));if(B.printColorsBlack)this.root.push(new q0("w:printColBlack",B.printColorsBlack));if(B.spaceWidth)this.root.push(new q0("w:wpSpaceWidth",B.spaceWidth));if(B.showBreaksInFrames)this.root.push(new q0("w:showBreaksInFrames",B.showBreaksInFrames));if(B.subFontBySize)this.root.push(new q0("w:subFontBySize",B.subFontBySize));if(B.suppressBottomSpacing)this.root.push(new q0("w:suppressBottomSpacing",B.suppressBottomSpacing));if(B.suppressTopSpacing)this.root.push(new q0("w:suppressTopSpacing",B.suppressTopSpacing));if(B.suppressSpacingAtTopOfPage)this.root.push(new q0("w:suppressSpacingAtTopOfPage",B.suppressSpacingAtTopOfPage));if(B.suppressTopSpacingWP)this.root.push(new q0("w:suppressTopSpacingWP",B.suppressTopSpacingWP));if(B.suppressSpBfAfterPgBrk)this.root.push(new q0("w:suppressSpBfAfterPgBrk",B.suppressSpBfAfterPgBrk));if(B.swapBordersFacingPages)this.root.push(new q0("w:swapBordersFacingPages",B.swapBordersFacingPages));if(B.convertMailMergeEsc)this.root.push(new q0("w:convMailMergeEsc",B.convertMailMergeEsc));if(B.truncateFontHeightsLikeWP6)this.root.push(new q0("w:truncateFontHeightsLikeWP6",B.truncateFontHeightsLikeWP6));if(B.macWordSmallCaps)this.root.push(new q0("w:mwSmallCaps",B.macWordSmallCaps));if(B.usePrinterMetrics)this.root.push(new q0("w:usePrinterMetrics",B.usePrinterMetrics));if(B.doNotSuppressParagraphBorders)this.root.push(new q0("w:doNotSuppressParagraphBorders",B.doNotSuppressParagraphBorders));if(B.wrapTrailSpaces)this.root.push(new q0("w:wrapTrailSpaces",B.wrapTrailSpaces));if(B.footnoteLayoutLikeWW8)this.root.push(new q0("w:footnoteLayoutLikeWW8",B.footnoteLayoutLikeWW8));if(B.shapeLayoutLikeWW8)this.root.push(new q0("w:shapeLayoutLikeWW8",B.shapeLayoutLikeWW8));if(B.alignTablesRowByRow)this.root.push(new q0("w:alignTablesRowByRow",B.alignTablesRowByRow));if(B.forgetLastTabAlignment)this.root.push(new q0("w:forgetLastTabAlignment",B.forgetLastTabAlignment));if(B.adjustLineHeightInTable)this.root.push(new q0("w:adjustLineHeightInTable",B.adjustLineHeightInTable));if(B.autoSpaceLikeWord95)this.root.push(new q0("w:autoSpaceLikeWord95",B.autoSpaceLikeWord95));if(B.noSpaceRaiseLower)this.root.push(new q0("w:noSpaceRaiseLower",B.noSpaceRaiseLower));if(B.doNotUseHTMLParagraphAutoSpacing)this.root.push(new q0("w:doNotUseHTMLParagraphAutoSpacing",B.doNotUseHTMLParagraphAutoSpacing));if(B.layoutRawTableWidth)this.root.push(new q0("w:layoutRawTableWidth",B.layoutRawTableWidth));if(B.layoutTableRowsApart)this.root.push(new q0("w:layoutTableRowsApart",B.layoutTableRowsApart));if(B.useWord97LineBreakRules)this.root.push(new q0("w:useWord97LineBreakRules",B.useWord97LineBreakRules));if(B.doNotBreakWrappedTables)this.root.push(new q0("w:doNotBreakWrappedTables",B.doNotBreakWrappedTables));if(B.doNotSnapToGridInCell)this.root.push(new q0("w:doNotSnapToGridInCell",B.doNotSnapToGridInCell));if(B.selectFieldWithFirstOrLastCharacter)this.root.push(new q0("w:selectFldWithFirstOrLastChar",B.selectFieldWithFirstOrLastCharacter));if(B.applyBreakingRules)this.root.push(new q0("w:applyBreakingRules",B.applyBreakingRules));if(B.doNotWrapTextWithPunctuation)this.root.push(new q0("w:doNotWrapTextWithPunct",B.doNotWrapTextWithPunctuation));if(B.doNotUseEastAsianBreakRules)this.root.push(new q0("w:doNotUseEastAsianBreakRules",B.doNotUseEastAsianBreakRules));if(B.useWord2002TableStyleRules)this.root.push(new q0("w:useWord2002TableStyleRules",B.useWord2002TableStyleRules));if(B.growAutofit)this.root.push(new q0("w:growAutofit",B.growAutofit));if(B.useFELayout)this.root.push(new q0("w:useFELayout",B.useFELayout));if(B.useNormalStyleForList)this.root.push(new q0("w:useNormalStyleForList",B.useNormalStyleForList));if(B.doNotUseIndentAsNumberingTabStop)this.root.push(new q0("w:doNotUseIndentAsNumberingTabStop",B.doNotUseIndentAsNumberingTabStop));if(B.useAlternateEastAsianLineBreakRules)this.root.push(new q0("w:useAltKinsokuLineBreakRules",B.useAlternateEastAsianLineBreakRules));if(B.allowSpaceOfSameStyleInTable)this.root.push(new q0("w:allowSpaceOfSameStyleInTable",B.allowSpaceOfSameStyleInTable));if(B.doNotSuppressIndentation)this.root.push(new q0("w:doNotSuppressIndentation",B.doNotSuppressIndentation));if(B.doNotAutofitConstrainedTables)this.root.push(new q0("w:doNotAutofitConstrainedTables",B.doNotAutofitConstrainedTables));if(B.autofitToFirstFixedWidthCell)this.root.push(new q0("w:autofitToFirstFixedWidthCell",B.autofitToFirstFixedWidthCell));if(B.underlineTabInNumberingList)this.root.push(new q0("w:underlineTabInNumList",B.underlineTabInNumberingList));if(B.displayHangulFixedWidth)this.root.push(new q0("w:displayHangulFixedWidth",B.displayHangulFixedWidth));if(B.splitPgBreakAndParaMark)this.root.push(new q0("w:splitPgBreakAndParaMark",B.splitPgBreakAndParaMark));if(B.doNotVerticallyAlignCellWithSp)this.root.push(new q0("w:doNotVertAlignCellWithSp",B.doNotVerticallyAlignCellWithSp));if(B.doNotBreakConstrainedForcedTable)this.root.push(new q0("w:doNotBreakConstrainedForcedTable",B.doNotBreakConstrainedForcedTable));if(B.ignoreVerticalAlignmentInTextboxes)this.root.push(new q0("w:doNotVertAlignInTxbx",B.ignoreVerticalAlignmentInTextboxes));if(B.useAnsiKerningPairs)this.root.push(new q0("w:useAnsiKerningPairs",B.useAnsiKerningPairs));if(B.cachedColumnBalance)this.root.push(new q0("w:cachedColBalance",B.cachedColumnBalance))}},uJ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}},dJ=class extends t{constructor(B){var U,G,Y,Q,K,Z,J,q;super("w:settings");if(this.root.push(new uJ({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new q0("w:displayBackgroundShape",!0)),B.trackRevisions!==void 0)this.root.push(new q0("w:trackRevisions",B.trackRevisions));if(B.evenAndOddHeaders!==void 0)this.root.push(new q0("w:evenAndOddHeaders",B.evenAndOddHeaders));if(B.updateFields!==void 0)this.root.push(new q0("w:updateFields",B.updateFields));if(B.defaultTabStop!==void 0)this.root.push(new _2("w:defaultTabStop",B.defaultTabStop));if(((U=B.hyphenation)===null||U===void 0?void 0:U.autoHyphenation)!==void 0)this.root.push(new q0("w:autoHyphenation",B.hyphenation.autoHyphenation));if(((G=B.hyphenation)===null||G===void 0?void 0:G.hyphenationZone)!==void 0)this.root.push(new _2("w:hyphenationZone",B.hyphenation.hyphenationZone));if(((Y=B.hyphenation)===null||Y===void 0?void 0:Y.consecutiveHyphenLimit)!==void 0)this.root.push(new _2("w:consecutiveHyphenLimit",B.hyphenation.consecutiveHyphenLimit));if(((Q=B.hyphenation)===null||Q===void 0?void 0:Q.doNotHyphenateCaps)!==void 0)this.root.push(new q0("w:doNotHyphenateCaps",B.hyphenation.doNotHyphenateCaps));this.root.push(new hJ(L0(L0({},(K=B.compatibility)!==null&&K!==void 0?K:{}),{},{version:(Z=(J=(q=B.compatibility)===null||q===void 0?void 0:q.version)!==null&&J!==void 0?J:B.compatibilityModeVersion)!==null&&Z!==void 0?Z:15})))}},c9=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{val:"w:val"})}},cJ=class extends t{constructor(B){super("w:name");this.root.push(new c9({val:B}))}},mJ=class extends t{constructor(B){super("w:uiPriority");this.root.push(new c9({val:T0(B)}))}},lJ=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}},m9=class extends t{constructor(B,U){super("w:style");if(this.root.push(new lJ(B)),U.name)this.root.push(new cJ(U.name));if(U.basedOn)this.root.push(new q2("w:basedOn",U.basedOn));if(U.next)this.root.push(new q2("w:next",U.next));if(U.link)this.root.push(new q2("w:link",U.link));if(U.uiPriority!==void 0)this.root.push(new mJ(U.uiPriority));if(U.semiHidden!==void 0)this.root.push(new q0("w:semiHidden",U.semiHidden));if(U.unhideWhenUsed!==void 0)this.root.push(new q0("w:unhideWhenUsed",U.unhideWhenUsed));if(U.quickFormat!==void 0)this.root.push(new q0("w:qFormat",U.quickFormat))}},p2=class extends m9{constructor(B){super({type:"paragraph",styleId:B.id},B);e(this,"paragraphProperties",void 0),e(this,"runProperties",void 0),this.paragraphProperties=new M2(B.paragraph),this.runProperties=new U2(B.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}},$2=class extends m9{constructor(B){super({type:"character",styleId:B.id},L0({uiPriority:99,unhideWhenUsed:!0},B));e(this,"runProperties",void 0),this.runProperties=new U2(B.run),this.root.push(this.runProperties)}},j2=class extends p2{constructor(B){super(L0({basedOn:"Normal",next:"Normal",quickFormat:!0},B))}},aJ=class extends j2{constructor(B){super(L0({id:"Title",name:"Title"},B))}},pJ=class extends j2{constructor(B){super(L0({id:"Heading1",name:"Heading 1"},B))}},rJ=class extends j2{constructor(B){super(L0({id:"Heading2",name:"Heading 2"},B))}},iJ=class extends j2{constructor(B){super(L0({id:"Heading3",name:"Heading 3"},B))}},nJ=class extends j2{constructor(B){super(L0({id:"Heading4",name:"Heading 4"},B))}},sJ=class extends j2{constructor(B){super(L0({id:"Heading5",name:"Heading 5"},B))}},oJ=class extends j2{constructor(B){super(L0({id:"Heading6",name:"Heading 6"},B))}},tJ=class extends j2{constructor(B){super(L0({id:"Strong",name:"Strong"},B))}},eJ=class extends p2{constructor(B){super(L0({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},B))}},BK=class extends p2{constructor(B){super(L0({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:k2.AUTO}},run:{size:20}},B))}},UK=class extends $2{constructor(B){super(L0({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},B))}},GK=class extends $2{constructor(B){super(L0({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},B))}},YK=class extends p2{constructor(B){super(L0({id:"EndnoteText",name:"endnote text",link:"EndnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:k2.AUTO}},run:{size:20}},B))}},ZK=class extends $2{constructor(B){super(L0({id:"EndnoteReference",name:"endnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},B))}},QK=class extends $2{constructor(B){super(L0({id:"EndnoteTextChar",name:"Endnote Text Char",basedOn:"DefaultParagraphFont",link:"EndnoteText",semiHidden:!0,run:{size:20}},B))}},JK=class extends $2{constructor(B){super(L0({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:i8.SINGLE}}},B))}},S1=class extends t{constructor(B){super("w:styles");if(B.initialStyles)this.root.push(B.initialStyles);if(B.importedStyles)for(let U of B.importedStyles)this.root.push(U);if(B.paragraphStyles)for(let U of B.paragraphStyles)this.root.push(new p2(U));if(B.characterStyles)for(let U of B.characterStyles)this.root.push(new $2(U))}},l9=class extends t{constructor(B){super("w:pPrDefault");this.root.push(new M2(B))}},a9=class extends t{constructor(B){super("w:rPrDefault");this.root.push(new U2(B))}},p9=class extends t{constructor(B){super("w:docDefaults");e(this,"runPropertiesDefaults",void 0),e(this,"paragraphPropertiesDefaults",void 0),this.runPropertiesDefaults=new a9(B.run),this.paragraphPropertiesDefaults=new l9(B.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}},KK=class{newInstance(B){let U=(0,h1.xml2js)(B,{compact:!1}),G;for(let Q of U.elements||[])if(Q.name==="w:styles")G=Q;if(G===void 0)throw Error("can not find styles element");let Y=G.elements||[];return{initialStyles:new $B(G.attributes),importedStyles:Y.map((Q)=>u1(Q))}}},M8=class{newInstance(B={}){var U;return{initialStyles:new F1(["mc","r","w","w14","w15"],"w14 w15"),importedStyles:[new p9((U=B.document)!==null&&U!==void 0?U:{}),new aJ(L0({run:{size:56}},B.title)),new pJ(L0({run:{color:"2E74B5",size:32}},B.heading1)),new rJ(L0({run:{color:"2E74B5",size:26}},B.heading2)),new iJ(L0({run:{color:"1F4D78",size:24}},B.heading3)),new nJ(L0({run:{color:"2E74B5",italics:!0}},B.heading4)),new sJ(L0({run:{color:"2E74B5"}},B.heading5)),new oJ(L0({run:{color:"1F4D78"}},B.heading6)),new tJ(L0({run:{bold:!0}},B.strong)),new eJ(B.listParagraph||{}),new JK(B.hyperlink||{}),new UK(B.footnoteReference||{}),new BK(B.footnoteText||{}),new GK(B.footnoteTextChar||{}),new ZK(B.endnoteReference||{}),new YK(B.endnoteText||{}),new QK(B.endnoteTextChar||{})]}}},VK=class{constructor(B){var U,G,Y,Q,K,Z,J,q,W,I,H,T;if(e(this,"currentRelationshipId",1),e(this,"documentWrapper",void 0),e(this,"headers",[]),e(this,"footers",[]),e(this,"coreProperties",void 0),e(this,"numbering",void 0),e(this,"media",void 0),e(this,"fileRelationships",void 0),e(this,"footnotesWrapper",void 0),e(this,"endnotesWrapper",void 0),e(this,"settings",void 0),e(this,"contentTypes",void 0),e(this,"customProperties",void 0),e(this,"appProperties",void 0),e(this,"styles",void 0),e(this,"comments",void 0),e(this,"commentsExtended",void 0),e(this,"fontWrapper",void 0),this.coreProperties=new dQ(L0(L0({},B),{},{creator:(U=B.creator)!==null&&U!==void 0?U:"Un-named",revision:(G=B.revision)!==null&&G!==void 0?G:1,lastModifiedBy:(Y=B.lastModifiedBy)!==null&&Y!==void 0?Y:"Un-named"})),this.numbering=new d9(B.numbering?B.numbering:{config:[]}),this.comments=new w4((Q=B.comments)!==null&&Q!==void 0?Q:{children:[]}),this.comments.ThreadData)this.commentsExtended=new E4(this.comments.ThreadData);if(this.fileRelationships=new A2,this.customProperties=new rQ((K=B.customProperties)!==null&&K!==void 0?K:[]),this.appProperties=new _Q,this.footnotesWrapper=new PJ,this.endnotesWrapper=new RJ,this.contentTypes=new uQ,this.documentWrapper=new JJ({background:B.background}),this.settings=new dJ({compatibilityModeVersion:B.compatabilityModeVersion,compatibility:B.compatibility,evenAndOddHeaders:B.evenAndOddHeaderAndFooters?!0:!1,trackRevisions:(Z=B.features)===null||Z===void 0?void 0:Z.trackRevisions,updateFields:(J=B.features)===null||J===void 0?void 0:J.updateFields,defaultTabStop:B.defaultTabStop,hyphenation:{autoHyphenation:(q=B.hyphenation)===null||q===void 0?void 0:q.autoHyphenation,hyphenationZone:(W=B.hyphenation)===null||W===void 0?void 0:W.hyphenationZone,consecutiveHyphenLimit:(I=B.hyphenation)===null||I===void 0?void 0:I.consecutiveHyphenLimit,doNotHyphenateCaps:(H=B.hyphenation)===null||H===void 0?void 0:H.doNotHyphenateCaps}}),this.media=new V6,B.externalStyles!==void 0){var A;let P=new M8().newInstance((A=B.styles)===null||A===void 0?void 0:A.default),j=new KK().newInstance(B.externalStyles);this.styles=new S1(L0(L0({},j),{},{importedStyles:[...P.importedStyles,...j.importedStyles]}))}else if(B.styles){let P=new M8().newInstance(B.styles.default);this.styles=new S1(L0(L0({},P),B.styles))}else{let P=new M8;this.styles=new S1(P.newInstance())}this.addDefaultRelationships();for(let P of B.sections)this.addSection(P);if(B.footnotes)for(let P in B.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(P),B.footnotes[P].children);if(B.endnotes)for(let P in B.endnotes)this.endnotesWrapper.View.createEndnote(parseFloat(P),B.endnotes[P].children);this.fontWrapper=new h4((T=B.fonts)!==null&&T!==void 0?T:[])}addSection({headers:B={},footers:U={},children:G,properties:Y}){this.documentWrapper.View.Body.addSection(L0(L0({},Y),{},{headerWrapperGroup:{default:B.default?this.createHeader(B.default):void 0,first:B.first?this.createHeader(B.first):void 0,even:B.even?this.createHeader(B.even):void 0},footerWrapperGroup:{default:U.default?this.createFooter(U.default):void 0,first:U.first?this.createFooter(U.first):void 0,even:U.even?this.createFooter(U.even):void 0}}));for(let Q of G)this.documentWrapper.View.add(Q)}createHeader(B){let U=new _9(this.media,this.currentRelationshipId++);for(let G of B.options.children)U.add(G);return this.addHeaderToDocument(U),U}createFooter(B){let U=new f9(this.media,this.currentRelationshipId++);for(let G of B.options.children)U.add(G);return this.addFooterToDocument(U),U}addHeaderToDocument(B,U=T2.DEFAULT){this.headers.push({header:B,type:U}),this.documentWrapper.Relationships.addRelationship(B.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(B,U=T2.DEFAULT){this.footers.push({footer:B,type:U}),this.documentWrapper.Relationships.addRelationship(B.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){if(this.fileRelationships.addRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.addRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.addRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.addRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes","endnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments","comments.xml"),this.commentsExtended)this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.microsoft.com/office/2011/relationships/commentsExtended","commentsExtended.xml"),this.contentTypes.addCommentsExtended()}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map((B)=>B.header)}get Footers(){return this.footers.map((B)=>B.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Endnotes(){return this.endnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get CommentsExtended(){return this.commentsExtended}get FontTable(){return this.fontWrapper}},XK=class extends t{constructor(B={}){super("w:instrText");e(this,"properties",void 0),this.properties=B,this.root.push(new _0({space:x0.PRESERVE}));let U="TOC";if(this.properties.captionLabel)U=`${U} \\a "${this.properties.captionLabel}"`;if(this.properties.entriesFromBookmark)U=`${U} \\b "${this.properties.entriesFromBookmark}"`;if(this.properties.captionLabelIncludingNumbers)U=`${U} \\c "${this.properties.captionLabelIncludingNumbers}"`;if(this.properties.sequenceAndPageNumbersSeparator)U=`${U} \\d "${this.properties.sequenceAndPageNumbersSeparator}"`;if(this.properties.tcFieldIdentifier)U=`${U} \\f "${this.properties.tcFieldIdentifier}"`;if(this.properties.hyperlink)U=`${U} \\h`;if(this.properties.tcFieldLevelRange)U=`${U} \\l "${this.properties.tcFieldLevelRange}"`;if(this.properties.pageNumbersEntryLevelsRange)U=`${U} \\n "${this.properties.pageNumbersEntryLevelsRange}"`;if(this.properties.headingStyleRange)U=`${U} \\o "${this.properties.headingStyleRange}"`;if(this.properties.entryAndPageNumberSeparator)U=`${U} \\p "${this.properties.entryAndPageNumberSeparator}"`;if(this.properties.seqFieldIdentifierForPrefix)U=`${U} \\s "${this.properties.seqFieldIdentifierForPrefix}"`;if(this.properties.stylesWithLevels&&this.properties.stylesWithLevels.length){let G=this.properties.stylesWithLevels.map((Y)=>`${Y.styleName},${Y.level}`).join(",");U=`${U} \\t "${G}"`}if(this.properties.useAppliedParagraphOutlineLevel)U=`${U} \\u`;if(this.properties.preserveTabInEntries)U=`${U} \\w`;if(this.properties.preserveNewLineInEntries)U=`${U} \\x`;if(this.properties.hideTabAndPageNumbersInWebView)U=`${U} \\z`;this.root.push(U)}},r9=class extends t{constructor(){super("w:sdtContent")}},i9=class extends t{constructor(B){super("w:sdtPr");if(B)this.root.push(new q2("w:alias",B))}};function qK(B,U){if(B==null)return{};var G={};for(var Y in B)if({}.hasOwnProperty.call(B,Y)){if(U.includes(Y))continue;G[Y]=B[Y]}return G}function n9(B,U){if(B==null)return{};var G,Y,Q=qK(B,U);if(Object.getOwnPropertySymbols){var K=Object.getOwnPropertySymbols(B);for(Y=0;Y0){let{stylesWithLevels:W}=K,I=Y.map((T,A)=>{var P,j;let E=this.buildCachedContentParagraphChild(T,K),C=(P=W===null||W===void 0||(j=W.find((v)=>v.level===T.level))===null||j===void 0?void 0:j.styleName)!==null&&P!==void 0?P:`TOC${T.level}`,N=A===0?[...J,E]:A===Y.length-1?[E,...q]:[E];return new d0({style:C,tabStops:this.getTabStopsForLevel(T.level),children:N})}),H=I;if(Y.length<=1)H=[...I,new d0({children:q})];for(let T of H)Z.addChildElement(T)}else{let W=new d0({children:J});Z.addChildElement(W);for(let H of G)Z.addChildElement(H);let I=new d0({children:q});Z.addChildElement(I)}this.root.push(Z)}getTabStopsForLevel(B,U=9025){return[{type:"clear",position:U+1-(B-1)*240},{type:"right",position:U,leader:"dot"}]}buildCachedContentRun(B,U){var G,Y;return new D0({style:(U===null||U===void 0?void 0:U.hyperlink)&&B.href!==void 0?"IndexLink":void 0,children:[new Z1({text:B.title}),new T4,new Z1({text:(G=(Y=B.page)===null||Y===void 0?void 0:Y.toString())!==null&&G!==void 0?G:""})]})}buildCachedContentParagraphChild(B,U){let G=this.buildCachedContentRun(B,U);if((U===null||U===void 0?void 0:U.hyperlink)&&B.href!==void 0)return new y4({anchor:B.href,children:[G]});return G}},LK=class{constructor(B,U){e(this,"styleName",void 0),e(this,"level",void 0),this.styleName=B,this.level=U}},IK=class{constructor(B={children:[]}){e(this,"options",void 0),this.options=B}},OK=class{constructor(B={children:[]}){e(this,"options",void 0),this.options=B}},s9=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{id:"w:id"})}},o9=class extends t{constructor(B){super("w:footnoteReference");this.root.push(new s9({id:B}))}},HK=class extends D0{constructor(B){super({style:"FootnoteReference"});this.root.push(new o9(B))}},t9=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{id:"w:id"})}},e9=class extends t{constructor(B){super("w:endnoteReference");this.root.push(new t9({id:B}))}},FK=class extends D0{constructor(B){super({style:"EndnoteReference"});this.root.push(new e9(B))}},o6=class extends H0{constructor(...B){super(...B);e(this,"xmlKeys",{val:"w14:val",symbolfont:"w14:font"})}},b1=class extends t{constructor(B,U,G){super(B);if(G)this.root.push(new o6({val:SB(U),symbolfont:G}));else this.root.push(new o6({val:U}))}},B5=class extends t{constructor(B){var U,G,Y,Q,K,Z,J,q;super("w14:checkbox");e(this,"DEFAULT_UNCHECKED_SYMBOL","2610"),e(this,"DEFAULT_CHECKED_SYMBOL","2612"),e(this,"DEFAULT_FONT","MS Gothic");let W=(B===null||B===void 0?void 0:B.checked)?"1":"0",I,H;this.root.push(new b1("w14:checked",W)),I=(B===null||B===void 0||(U=B.checkedState)===null||U===void 0?void 0:U.value)?B===null||B===void 0||(G=B.checkedState)===null||G===void 0?void 0:G.value:this.DEFAULT_CHECKED_SYMBOL,H=(B===null||B===void 0||(Y=B.checkedState)===null||Y===void 0?void 0:Y.font)?B===null||B===void 0||(Q=B.checkedState)===null||Q===void 0?void 0:Q.font:this.DEFAULT_FONT,this.root.push(new b1("w14:checkedState",I,H)),I=(B===null||B===void 0||(K=B.uncheckedState)===null||K===void 0?void 0:K.value)?B===null||B===void 0||(Z=B.uncheckedState)===null||Z===void 0?void 0:Z.value:this.DEFAULT_UNCHECKED_SYMBOL,H=(B===null||B===void 0||(J=B.uncheckedState)===null||J===void 0?void 0:J.font)?B===null||B===void 0||(q=B.uncheckedState)===null||q===void 0?void 0:q.font:this.DEFAULT_FONT,this.root.push(new b1("w14:uncheckedState",I,H))}},WK=class extends t{constructor(B){var U,G,Y,Q;super("w:sdt");e(this,"DEFAULT_UNCHECKED_SYMBOL","2610"),e(this,"DEFAULT_CHECKED_SYMBOL","2612"),e(this,"DEFAULT_FONT","MS Gothic");let K=new i9(B===null||B===void 0?void 0:B.alias);K.addChildElement(new B5(B)),this.root.push(K);let Z=new r9,J=B===null||B===void 0||(U=B.checkedState)===null||U===void 0?void 0:U.font,q=B===null||B===void 0||(G=B.checkedState)===null||G===void 0?void 0:G.value,W=B===null||B===void 0||(Y=B.uncheckedState)===null||Y===void 0?void 0:Y.font,I=B===null||B===void 0||(Q=B.uncheckedState)===null||Q===void 0?void 0:Q.value,H,T;if(B===null||B===void 0?void 0:B.checked)H=J?J:this.DEFAULT_FONT,T=q?q:this.DEFAULT_CHECKED_SYMBOL;else H=W?W:this.DEFAULT_FONT,T=I?I:this.DEFAULT_UNCHECKED_SYMBOL;let A=new aB({char:T,symbolfont:H});Z.addChildElement(A),this.root.push(Z)}},PK=({shape:B})=>new M0({name:"w:pict",children:[B]}),AK=({children:B=[]})=>new M0({name:"w:txbxContent",children:B}),jK=({style:B,children:U,inset:G})=>new M0({name:"v:textbox",attributes:{style:{key:"style",value:B},insetMode:{key:"insetmode",value:G?"custom":"auto"},inset:{key:"inset",value:G?`${G.left}, ${G.top}, ${G.right}, ${G.bottom}`:void 0}},children:[AK({children:U})]}),NK="#_x0000_t202",zK={flip:"flip",height:"height",left:"left",marginBottom:"margin-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",positionHorizontal:"mso-position-horizontal",positionHorizontalRelative:"mso-position-horizontal-relative",positionVertical:"mso-position-vertical",positionVerticalRelative:"mso-position-vertical-relative",wrapDistanceBottom:"mso-wrap-distance-bottom",wrapDistanceLeft:"mso-wrap-distance-left",wrapDistanceRight:"mso-wrap-distance-right",wrapDistanceTop:"mso-wrap-distance-top",wrapEdited:"mso-wrap-edited",wrapStyle:"mso-wrap-style",position:"position",rotation:"rotation",top:"top",visibility:"visibility",width:"width",zIndex:"z-index"},wK=(B)=>B?Object.entries(B).map(([U,G])=>`${zK[U]}:${G}`).join(";"):void 0,EK=({id:B,children:U,type:G=NK,style:Y})=>new M0({name:"v:shape",attributes:{id:{key:"id",value:B},type:{key:"type",value:G},style:{key:"style",value:wK(Y)}},children:[jK({style:"mso-fit-shape-to-text:t;",children:U})]}),DK=["style","children"],TK=class extends H1{constructor(B){let{style:U,children:G}=B,Y=n9(B,DK);super("w:p");this.root.push(new M2(Y)),this.root.push(PK({shape:EK({children:G,id:O1(),style:U})}))}},CK=R0((B,U)=>{d2(),P2();/*! - - JSZip v3.10.1 - A JavaScript class for generating and reading zip files - - - (c) 2009-2016 Stuart Knightley - Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown. - - JSZip uses the library pako released under the MIT license : - https://github.com/nodeca/pako/blob/main/LICENSE - */(function(G){if(typeof B=="object"&&typeof U<"u")U.exports=G();else if(typeof define=="function"&&define.amd)define([],G);else(typeof window<"u"?window:typeof v0<"u"?v0:typeof self<"u"?self:this).JSZip=G()})(function(){return function G(Y,Q,K){function Z(W,I){if(!Q[W]){if(!Y[W]){var H=typeof w1=="function"&&w1;if(!I&&H)return H(W,!0);if(J)return J(W,!0);var T=Error("Cannot find module '"+W+"'");throw T.code="MODULE_NOT_FOUND",T}var A=Q[W]={exports:{}};Y[W][0].call(A.exports,function(P){var j=Y[W][1][P];return Z(j||P)},A,A.exports,G,Y,Q,K)}return Q[W].exports}for(var J=typeof w1=="function"&&w1,q=0;q>2,A=(3&W)<<4|I>>4,P=1>6:64,j=2>4,I=(15&T)<<4|(A=J.indexOf(q.charAt(j++)))>>2,H=(3&A)<<6|(P=J.indexOf(q.charAt(j++))),N[E++]=W,A!==64&&(N[E++]=I),P!==64&&(N[E++]=H);return N}},{"./support":30,"./utils":32}],2:[function(G,Y,Q){var K=G("./external"),Z=G("./stream/DataWorker"),J=G("./stream/Crc32Probe"),q=G("./stream/DataLengthProbe");function W(I,H,T,A,P){this.compressedSize=I,this.uncompressedSize=H,this.crc32=T,this.compression=A,this.compressedContent=P}W.prototype={getContentWorker:function(){var I=new Z(K.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new q("data_length")),H=this;return I.on("end",function(){if(this.streamInfo.data_length!==H.uncompressedSize)throw Error("Bug : uncompressed data size mismatch")}),I},getCompressedWorker:function(){return new Z(K.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},W.createWorkerFrom=function(I,H,T){return I.pipe(new J).pipe(new q("uncompressedSize")).pipe(H.compressWorker(T)).pipe(new q("compressedSize")).withStreamInfo("compression",H)},Y.exports=W},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(G,Y,Q){var K=G("./stream/GenericWorker");Q.STORE={magic:"\x00\x00",compressWorker:function(){return new K("STORE compression")},uncompressWorker:function(){return new K("STORE decompression")}},Q.DEFLATE=G("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(G,Y,Q){var K=G("./utils"),Z=function(){for(var J,q=[],W=0;W<256;W++){J=W;for(var I=0;I<8;I++)J=1&J?3988292384^J>>>1:J>>>1;q[W]=J}return q}();Y.exports=function(J,q){return J!==void 0&&J.length?K.getTypeOf(J)!=="string"?function(W,I,H,T){var A=Z,P=T+H;W^=-1;for(var j=T;j>>8^A[255&(W^I[j])];return-1^W}(0|q,J,J.length,0):function(W,I,H,T){var A=Z,P=T+H;W^=-1;for(var j=T;j>>8^A[255&(W^I.charCodeAt(j))];return-1^W}(0|q,J,J.length,0):0}},{"./utils":32}],5:[function(G,Y,Q){Q.base64=!1,Q.binary=!1,Q.dir=!1,Q.createFolders=!0,Q.date=null,Q.compression=null,Q.compressionOptions=null,Q.comment=null,Q.unixPermissions=null,Q.dosPermissions=null},{}],6:[function(G,Y,Q){var K=null;K=typeof Promise<"u"?Promise:G("lie"),Y.exports={Promise:K}},{lie:37}],7:[function(G,Y,Q){var K=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",Z=G("pako"),J=G("./utils"),q=G("./stream/GenericWorker"),W=K?"uint8array":"array";function I(H,T){q.call(this,"FlateWorker/"+H),this._pako=null,this._pakoAction=H,this._pakoOptions=T,this.meta={}}Q.magic="\b\x00",J.inherits(I,q),I.prototype.processChunk=function(H){this.meta=H.meta,this._pako===null&&this._createPako(),this._pako.push(J.transformTo(W,H.data),!1)},I.prototype.flush=function(){q.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},I.prototype.cleanUp=function(){q.prototype.cleanUp.call(this),this._pako=null},I.prototype._createPako=function(){this._pako=new Z[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var H=this;this._pako.onData=function(T){H.push({data:T,meta:H.meta})}},Q.compressWorker=function(H){return new I("Deflate",H)},Q.uncompressWorker=function(){return new I("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(G,Y,Q){function K(A,P){var j,E="";for(j=0;j>>=8;return E}function Z(A,P,j,E,C,N){var v,S,F=A.file,M=A.compression,$=N!==W.utf8encode,x=J.transformTo("string",N(F.name)),z=J.transformTo("string",W.utf8encode(F.name)),a=F.comment,U0=J.transformTo("string",N(a)),b=J.transformTo("string",W.utf8encode(a)),c=z.length!==F.name.length,D=b.length!==a.length,m="",B0="",i="",V0=F.dir,s=F.date,G0={crc32:0,compressedSize:0,uncompressedSize:0};P&&!j||(G0.crc32=A.crc32,G0.compressedSize=A.compressedSize,G0.uncompressedSize=A.uncompressedSize);var r=0;P&&(r|=8),$||!c&&!D||(r|=2048);var y=0,n=0;V0&&(y|=16),C==="UNIX"?(n=798,y|=function(Y0,O0){var w=Y0;return Y0||(w=O0?16893:33204),(65535&w)<<16}(F.unixPermissions,V0)):(n=20,y|=function(Y0){return 63&(Y0||0)}(F.dosPermissions)),v=s.getUTCHours(),v<<=6,v|=s.getUTCMinutes(),v<<=5,v|=s.getUTCSeconds()/2,S=s.getUTCFullYear()-1980,S<<=4,S|=s.getUTCMonth()+1,S<<=5,S|=s.getUTCDate(),c&&(B0=K(1,1)+K(I(x),4)+z,m+="up"+K(B0.length,2)+B0),D&&(i=K(1,1)+K(I(U0),4)+b,m+="uc"+K(i.length,2)+i);var o="";return o+=` -\x00`,o+=K(r,2),o+=M.magic,o+=K(v,2),o+=K(S,2),o+=K(G0.crc32,4),o+=K(G0.compressedSize,4),o+=K(G0.uncompressedSize,4),o+=K(x.length,2),o+=K(m.length,2),{fileRecord:H.LOCAL_FILE_HEADER+o+x+m,dirRecord:H.CENTRAL_FILE_HEADER+K(n,2)+o+K(U0.length,2)+"\x00\x00\x00\x00"+K(y,4)+K(E,4)+x+m+U0}}var J=G("../utils"),q=G("../stream/GenericWorker"),W=G("../utf8"),I=G("../crc32"),H=G("../signature");function T(A,P,j,E){q.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=P,this.zipPlatform=j,this.encodeFileName=E,this.streamFiles=A,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}J.inherits(T,q),T.prototype.push=function(A){var P=A.meta.percent||0,j=this.entriesCount,E=this._sources.length;this.accumulate?this.contentBuffer.push(A):(this.bytesWritten+=A.data.length,q.prototype.push.call(this,{data:A.data,meta:{currentFile:this.currentFile,percent:j?(P+100*(j-E-1))/j:100}}))},T.prototype.openedSource=function(A){this.currentSourceOffset=this.bytesWritten,this.currentFile=A.file.name;var P=this.streamFiles&&!A.file.dir;if(P){var j=Z(A,P,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:j.fileRecord,meta:{percent:0}})}else this.accumulate=!0},T.prototype.closedSource=function(A){this.accumulate=!1;var P=this.streamFiles&&!A.file.dir,j=Z(A,P,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(j.dirRecord),P)this.push({data:function(E){return H.DATA_DESCRIPTOR+K(E.crc32,4)+K(E.compressedSize,4)+K(E.uncompressedSize,4)}(A),meta:{percent:100}});else for(this.push({data:j.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},T.prototype.flush=function(){for(var A=this.bytesWritten,P=0;P=this.index;q--)W=(W<<8)+this.byteAt(q);return this.index+=J,W},readString:function(J){return K.transformTo("string",this.readData(J))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var J=this.readInt(4);return new Date(Date.UTC(1980+(J>>25&127),(J>>21&15)-1,J>>16&31,J>>11&31,J>>5&63,(31&J)<<1))}},Y.exports=Z},{"../utils":32}],19:[function(G,Y,Q){var K=G("./Uint8ArrayReader");function Z(J){K.call(this,J)}G("../utils").inherits(Z,K),Z.prototype.readData=function(J){this.checkOffset(J);var q=this.data.slice(this.zero+this.index,this.zero+this.index+J);return this.index+=J,q},Y.exports=Z},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(G,Y,Q){var K=G("./DataReader");function Z(J){K.call(this,J)}G("../utils").inherits(Z,K),Z.prototype.byteAt=function(J){return this.data.charCodeAt(this.zero+J)},Z.prototype.lastIndexOfSignature=function(J){return this.data.lastIndexOf(J)-this.zero},Z.prototype.readAndCheckSignature=function(J){return J===this.readData(4)},Z.prototype.readData=function(J){this.checkOffset(J);var q=this.data.slice(this.zero+this.index,this.zero+this.index+J);return this.index+=J,q},Y.exports=Z},{"../utils":32,"./DataReader":18}],21:[function(G,Y,Q){var K=G("./ArrayReader");function Z(J){K.call(this,J)}G("../utils").inherits(Z,K),Z.prototype.readData=function(J){if(this.checkOffset(J),J===0)return new Uint8Array(0);var q=this.data.subarray(this.zero+this.index,this.zero+this.index+J);return this.index+=J,q},Y.exports=Z},{"../utils":32,"./ArrayReader":17}],22:[function(G,Y,Q){var K=G("../utils"),Z=G("../support"),J=G("./ArrayReader"),q=G("./StringReader"),W=G("./NodeBufferReader"),I=G("./Uint8ArrayReader");Y.exports=function(H){var T=K.getTypeOf(H);return K.checkSupport(T),T!=="string"||Z.uint8array?T==="nodebuffer"?new W(H):Z.uint8array?new I(K.transformTo("uint8array",H)):new J(K.transformTo("array",H)):new q(H)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(G,Y,Q){Q.LOCAL_FILE_HEADER="PK\x03\x04",Q.CENTRAL_FILE_HEADER="PK\x01\x02",Q.CENTRAL_DIRECTORY_END="PK\x05\x06",Q.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x06\x07",Q.ZIP64_CENTRAL_DIRECTORY_END="PK\x06\x06",Q.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(G,Y,Q){var K=G("./GenericWorker"),Z=G("../utils");function J(q){K.call(this,"ConvertWorker to "+q),this.destType=q}Z.inherits(J,K),J.prototype.processChunk=function(q){this.push({data:Z.transformTo(this.destType,q.data),meta:q.meta})},Y.exports=J},{"../utils":32,"./GenericWorker":28}],25:[function(G,Y,Q){var K=G("./GenericWorker"),Z=G("../crc32");function J(){K.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}G("../utils").inherits(J,K),J.prototype.processChunk=function(q){this.streamInfo.crc32=Z(q.data,this.streamInfo.crc32||0),this.push(q)},Y.exports=J},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(G,Y,Q){var K=G("../utils"),Z=G("./GenericWorker");function J(q){Z.call(this,"DataLengthProbe for "+q),this.propName=q,this.withStreamInfo(q,0)}K.inherits(J,Z),J.prototype.processChunk=function(q){if(q){var W=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=W+q.data.length}Z.prototype.processChunk.call(this,q)},Y.exports=J},{"../utils":32,"./GenericWorker":28}],27:[function(G,Y,Q){var K=G("../utils"),Z=G("./GenericWorker");function J(q){Z.call(this,"DataWorker");var W=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,q.then(function(I){W.dataIsReady=!0,W.data=I,W.max=I&&I.length||0,W.type=K.getTypeOf(I),W.isPaused||W._tickAndRepeat()},function(I){W.error(I)})}K.inherits(J,Z),J.prototype.cleanUp=function(){Z.prototype.cleanUp.call(this),this.data=null},J.prototype.resume=function(){return!!Z.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,K.delay(this._tickAndRepeat,[],this)),!0)},J.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(K.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},J.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var q=null,W=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":q=this.data.substring(this.index,W);break;case"uint8array":q=this.data.subarray(this.index,W);break;case"array":case"nodebuffer":q=this.data.slice(this.index,W)}return this.index=W,this.push({data:q,meta:{percent:this.max?this.index/this.max*100:0}})},Y.exports=J},{"../utils":32,"./GenericWorker":28}],28:[function(G,Y,Q){function K(Z){this.name=Z||"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}K.prototype={push:function(Z){this.emit("data",Z)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(Z){this.emit("error",Z)}return!0},error:function(Z){return!this.isFinished&&(this.isPaused?this.generatedError=Z:(this.isFinished=!0,this.emit("error",Z),this.previous&&this.previous.error(Z),this.cleanUp()),!0)},on:function(Z,J){return this._listeners[Z].push(J),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(Z,J){if(this._listeners[Z])for(var q=0;q "+Z:Z}},Y.exports=K},{}],29:[function(G,Y,Q){var K=G("../utils"),Z=G("./ConvertWorker"),J=G("./GenericWorker"),q=G("../base64"),W=G("../support"),I=G("../external"),H=null;if(W.nodestream)try{H=G("../nodejs/NodejsStreamOutputAdapter")}catch(P){}function T(P,j){return new I.Promise(function(E,C){var N=[],v=P._internalType,S=P._outputType,F=P._mimeType;P.on("data",function(M,$){N.push(M),j&&j($)}).on("error",function(M){N=[],C(M)}).on("end",function(){try{E(function(M,$,x){switch(M){case"blob":return K.newBlob(K.transformTo("arraybuffer",$),x);case"base64":return q.encode($);default:return K.transformTo(M,$)}}(S,function(M,$){var x,z=0,a=null,U0=0;for(x=0;x<$.length;x++)U0+=$[x].length;switch(M){case"string":return $.join("");case"array":return Array.prototype.concat.apply([],$);case"uint8array":for(a=new Uint8Array(U0),x=0;x<$.length;x++)a.set($[x],z),z+=$[x].length;return a;case"nodebuffer":return Buffer.concat($);default:throw Error("concat : unsupported type '"+M+"'")}}(v,N),F))}catch(M){C(M)}N=[]}).resume()})}function A(P,j,E){var C=j;switch(j){case"blob":case"arraybuffer":C="uint8array";break;case"base64":C="string"}try{this._internalType=C,this._outputType=j,this._mimeType=E,K.checkSupport(C),this._worker=P.pipe(new Z(C)),P.lock()}catch(N){this._worker=new J("error"),this._worker.error(N)}}A.prototype={accumulate:function(P){return T(this,P)},on:function(P,j){var E=this;return P==="data"?this._worker.on(P,function(C){j.call(E,C.data,C.meta)}):this._worker.on(P,function(){K.delay(j,arguments,E)}),this},resume:function(){return K.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(P){if(K.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw Error(this._outputType+" is not supported by this method");return new H(this,{objectMode:this._outputType!=="nodebuffer"},P)}},Y.exports=A},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(G,Y,Q){if(Q.base64=!0,Q.array=!0,Q.string=!0,Q.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",Q.nodebuffer=typeof Buffer<"u",Q.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")Q.blob=!1;else{var K=new ArrayBuffer(0);try{Q.blob=new Blob([K],{type:"application/zip"}).size===0}catch(J){try{var Z=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);Z.append(K),Q.blob=Z.getBlob("application/zip").size===0}catch(q){Q.blob=!1}}}try{Q.nodestream=!!G("readable-stream").Readable}catch(J){Q.nodestream=!1}},{"readable-stream":16}],31:[function(G,Y,Q){for(var K=G("./utils"),Z=G("./support"),J=G("./nodejsUtils"),q=G("./stream/GenericWorker"),W=Array(256),I=0;I<256;I++)W[I]=252<=I?6:248<=I?5:240<=I?4:224<=I?3:192<=I?2:1;W[254]=W[254]=1;function H(){q.call(this,"utf-8 decode"),this.leftOver=null}function T(){q.call(this,"utf-8 encode")}Q.utf8encode=function(A){return Z.nodebuffer?J.newBufferFrom(A,"utf-8"):function(P){var j,E,C,N,v,S=P.length,F=0;for(N=0;N>>6:(E<65536?j[v++]=224|E>>>12:(j[v++]=240|E>>>18,j[v++]=128|E>>>12&63),j[v++]=128|E>>>6&63),j[v++]=128|63&E);return j}(A)},Q.utf8decode=function(A){return Z.nodebuffer?K.transformTo("nodebuffer",A).toString("utf-8"):function(P){var j,E,C,N,v=P.length,S=Array(2*v);for(j=E=0;j>10&1023,S[E++]=56320|1023&C)}return S.length!==E&&(S.subarray?S=S.subarray(0,E):S.length=E),K.applyFromCharCode(S)}(A=K.transformTo(Z.uint8array?"uint8array":"array",A))},K.inherits(H,q),H.prototype.processChunk=function(A){var P=K.transformTo(Z.uint8array?"uint8array":"array",A.data);if(this.leftOver&&this.leftOver.length){if(Z.uint8array){var j=P;(P=new Uint8Array(j.length+this.leftOver.length)).set(this.leftOver,0),P.set(j,this.leftOver.length)}else P=this.leftOver.concat(P);this.leftOver=null}var E=function(N,v){var S;for((v=v||N.length)>N.length&&(v=N.length),S=v-1;0<=S&&(192&N[S])==128;)S--;return S<0?v:S===0?v:S+W[N[S]]>v?S:v}(P),C=P;E!==P.length&&(Z.uint8array?(C=P.subarray(0,E),this.leftOver=P.subarray(E,P.length)):(C=P.slice(0,E),this.leftOver=P.slice(E,P.length))),this.push({data:Q.utf8decode(C),meta:A.meta})},H.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:Q.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},Q.Utf8DecodeWorker=H,K.inherits(T,q),T.prototype.processChunk=function(A){this.push({data:Q.utf8encode(A.data),meta:A.meta})},Q.Utf8EncodeWorker=T},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(G,Y,Q){var K=G("./support"),Z=G("./base64"),J=G("./nodejsUtils"),q=G("./external");function W(j){return j}function I(j,E){for(var C=0;C>8;this.dir=!!(16&this.externalFileAttributes),A==0&&(this.dosPermissions=63&this.externalFileAttributes),A==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var A=K(this.extraFields[1].value);this.uncompressedSize===Z.MAX_VALUE_32BITS&&(this.uncompressedSize=A.readInt(8)),this.compressedSize===Z.MAX_VALUE_32BITS&&(this.compressedSize=A.readInt(8)),this.localHeaderOffset===Z.MAX_VALUE_32BITS&&(this.localHeaderOffset=A.readInt(8)),this.diskNumberStart===Z.MAX_VALUE_32BITS&&(this.diskNumberStart=A.readInt(4))}},readExtraFields:function(A){var P,j,E,C=A.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});A.index+4>>6:(A<65536?T[E++]=224|A>>>12:(T[E++]=240|A>>>18,T[E++]=128|A>>>12&63),T[E++]=128|A>>>6&63),T[E++]=128|63&A);return T},Q.buf2binstring=function(H){return I(H,H.length)},Q.binstring2buf=function(H){for(var T=new K.Buf8(H.length),A=0,P=T.length;A>10&1023,N[P++]=56320|1023&j)}return I(N,P)},Q.utf8border=function(H,T){var A;for((T=T||H.length)>H.length&&(T=H.length),A=T-1;0<=A&&(192&H[A])==128;)A--;return A<0?T:A===0?T:A+q[H[A]]>T?A:T}},{"./common":41}],43:[function(G,Y,Q){Y.exports=function(K,Z,J,q){for(var W=65535&K|0,I=K>>>16&65535|0,H=0;J!==0;){for(J-=H=2000>>1:Z>>>1;J[q]=Z}return J}();Y.exports=function(Z,J,q,W){var I=K,H=W+q;Z^=-1;for(var T=W;T>>8^I[255&(Z^J[T])];return-1^Z}},{}],46:[function(G,Y,Q){var K,Z=G("../utils/common"),J=G("./trees"),q=G("./adler32"),W=G("./crc32"),I=G("./messages"),H=0,T=4,A=0,P=-2,j=-1,E=4,C=2,N=8,v=9,S=286,F=30,M=19,$=2*S+1,x=15,z=3,a=258,U0=a+z+1,b=42,c=113,D=1,m=2,B0=3,i=4;function V0(R,p){return R.msg=I[p],p}function s(R){return(R<<1)-(4R.avail_out&&(k=R.avail_out),k!==0&&(Z.arraySet(R.output,p.pending_buf,p.pending_out,k,R.next_out),R.next_out+=k,p.pending_out+=k,R.total_out+=k,R.avail_out-=k,p.pending-=k,p.pending===0&&(p.pending_out=0))}function y(R,p){J._tr_flush_block(R,0<=R.block_start?R.block_start:-1,R.strstart-R.block_start,p),R.block_start=R.strstart,r(R.strm)}function n(R,p){R.pending_buf[R.pending++]=p}function o(R,p){R.pending_buf[R.pending++]=p>>>8&255,R.pending_buf[R.pending++]=255&p}function Y0(R,p){var k,V,X=R.max_chain_length,O=R.strstart,_=R.prev_length,l=R.nice_match,d=R.strstart>R.w_size-U0?R.strstart-(R.w_size-U0):0,Q0=R.window,X0=R.w_mask,K0=R.prev,I0=R.strstart+a,F0=Q0[O+_-1],W0=Q0[O+_];R.prev_length>=R.good_match&&(X>>=2),l>R.lookahead&&(l=R.lookahead);do if(Q0[(k=p)+_]===W0&&Q0[k+_-1]===F0&&Q0[k]===Q0[O]&&Q0[++k]===Q0[O+1]){O+=2,k++;do;while(Q0[++O]===Q0[++k]&&Q0[++O]===Q0[++k]&&Q0[++O]===Q0[++k]&&Q0[++O]===Q0[++k]&&Q0[++O]===Q0[++k]&&Q0[++O]===Q0[++k]&&Q0[++O]===Q0[++k]&&Q0[++O]===Q0[++k]&&Od&&--X!=0);return _<=R.lookahead?_:R.lookahead}function O0(R){var p,k,V,X,O,_,l,d,Q0,X0,K0=R.w_size;do{if(X=R.window_size-R.lookahead-R.strstart,R.strstart>=K0+(K0-U0)){for(Z.arraySet(R.window,R.window,K0,K0,0),R.match_start-=K0,R.strstart-=K0,R.block_start-=K0,p=k=R.hash_size;V=R.head[--p],R.head[p]=K0<=V?V-K0:0,--k;);for(p=k=K0;V=R.prev[--p],R.prev[p]=K0<=V?V-K0:0,--k;);X+=K0}if(R.strm.avail_in===0)break;if(_=R.strm,l=R.window,d=R.strstart+R.lookahead,Q0=X,X0=void 0,X0=_.avail_in,Q0=z)for(O=R.strstart-R.insert,R.ins_h=R.window[O],R.ins_h=(R.ins_h<=z&&(R.ins_h=(R.ins_h<=z)if(V=J._tr_tally(R,R.strstart-R.match_start,R.match_length-z),R.lookahead-=R.match_length,R.match_length<=R.max_lazy_match&&R.lookahead>=z){for(R.match_length--;R.strstart++,R.ins_h=(R.ins_h<=z&&(R.ins_h=(R.ins_h<=z&&R.match_length<=R.prev_length){for(X=R.strstart+R.lookahead-z,V=J._tr_tally(R,R.strstart-1-R.prev_match,R.prev_length-z),R.lookahead-=R.prev_length-1,R.prev_length-=2;++R.strstart<=X&&(R.ins_h=(R.ins_h<R.pending_buf_size-5&&(k=R.pending_buf_size-5);;){if(R.lookahead<=1){if(O0(R),R.lookahead===0&&p===H)return D;if(R.lookahead===0)break}R.strstart+=R.lookahead,R.lookahead=0;var V=R.block_start+k;if((R.strstart===0||R.strstart>=V)&&(R.lookahead=R.strstart-V,R.strstart=V,y(R,!1),R.strm.avail_out===0))return D;if(R.strstart-R.block_start>=R.w_size-U0&&(y(R,!1),R.strm.avail_out===0))return D}return R.insert=0,p===T?(y(R,!0),R.strm.avail_out===0?B0:i):(R.strstart>R.block_start&&(y(R,!1),R.strm.avail_out),D)}),new u(4,4,8,4,w),new u(4,5,16,8,w),new u(4,6,32,32,w),new u(4,4,16,16,L),new u(8,16,32,32,L),new u(8,16,128,128,L),new u(8,32,128,256,L),new u(32,128,258,1024,L),new u(32,258,258,4096,L)],Q.deflateInit=function(R,p){return f(R,p,N,15,8,0)},Q.deflateInit2=f,Q.deflateReset=g,Q.deflateResetKeep=Z0,Q.deflateSetHeader=function(R,p){return R&&R.state?R.state.wrap!==2?P:(R.state.gzhead=p,A):P},Q.deflate=function(R,p){var k,V,X,O;if(!R||!R.state||5>8&255),n(V,V.gzhead.time>>16&255),n(V,V.gzhead.time>>24&255),n(V,V.level===9?2:2<=V.strategy||V.level<2?4:0),n(V,255&V.gzhead.os),V.gzhead.extra&&V.gzhead.extra.length&&(n(V,255&V.gzhead.extra.length),n(V,V.gzhead.extra.length>>8&255)),V.gzhead.hcrc&&(R.adler=W(R.adler,V.pending_buf,V.pending,0)),V.gzindex=0,V.status=69):(n(V,0),n(V,0),n(V,0),n(V,0),n(V,0),n(V,V.level===9?2:2<=V.strategy||V.level<2?4:0),n(V,3),V.status=c);else{var _=N+(V.w_bits-8<<4)<<8;_|=(2<=V.strategy||V.level<2?0:V.level<6?1:V.level===6?2:3)<<6,V.strstart!==0&&(_|=32),_+=31-_%31,V.status=c,o(V,_),V.strstart!==0&&(o(V,R.adler>>>16),o(V,65535&R.adler)),R.adler=1}if(V.status===69)if(V.gzhead.extra){for(X=V.pending;V.gzindex<(65535&V.gzhead.extra.length)&&(V.pending!==V.pending_buf_size||(V.gzhead.hcrc&&V.pending>X&&(R.adler=W(R.adler,V.pending_buf,V.pending-X,X)),r(R),X=V.pending,V.pending!==V.pending_buf_size));)n(V,255&V.gzhead.extra[V.gzindex]),V.gzindex++;V.gzhead.hcrc&&V.pending>X&&(R.adler=W(R.adler,V.pending_buf,V.pending-X,X)),V.gzindex===V.gzhead.extra.length&&(V.gzindex=0,V.status=73)}else V.status=73;if(V.status===73)if(V.gzhead.name){X=V.pending;do{if(V.pending===V.pending_buf_size&&(V.gzhead.hcrc&&V.pending>X&&(R.adler=W(R.adler,V.pending_buf,V.pending-X,X)),r(R),X=V.pending,V.pending===V.pending_buf_size)){O=1;break}O=V.gzindexX&&(R.adler=W(R.adler,V.pending_buf,V.pending-X,X)),O===0&&(V.gzindex=0,V.status=91)}else V.status=91;if(V.status===91)if(V.gzhead.comment){X=V.pending;do{if(V.pending===V.pending_buf_size&&(V.gzhead.hcrc&&V.pending>X&&(R.adler=W(R.adler,V.pending_buf,V.pending-X,X)),r(R),X=V.pending,V.pending===V.pending_buf_size)){O=1;break}O=V.gzindexX&&(R.adler=W(R.adler,V.pending_buf,V.pending-X,X)),O===0&&(V.status=103)}else V.status=103;if(V.status===103&&(V.gzhead.hcrc?(V.pending+2>V.pending_buf_size&&r(R),V.pending+2<=V.pending_buf_size&&(n(V,255&R.adler),n(V,R.adler>>8&255),R.adler=0,V.status=c)):V.status=c),V.pending!==0){if(r(R),R.avail_out===0)return V.last_flush=-1,A}else if(R.avail_in===0&&s(p)<=s(k)&&p!==T)return V0(R,-5);if(V.status===666&&R.avail_in!==0)return V0(R,-5);if(R.avail_in!==0||V.lookahead!==0||p!==H&&V.status!==666){var l=V.strategy===2?function(d,Q0){for(var X0;;){if(d.lookahead===0&&(O0(d),d.lookahead===0)){if(Q0===H)return D;break}if(d.match_length=0,X0=J._tr_tally(d,0,d.window[d.strstart]),d.lookahead--,d.strstart++,X0&&(y(d,!1),d.strm.avail_out===0))return D}return d.insert=0,Q0===T?(y(d,!0),d.strm.avail_out===0?B0:i):d.last_lit&&(y(d,!1),d.strm.avail_out===0)?D:m}(V,p):V.strategy===3?function(d,Q0){for(var X0,K0,I0,F0,W0=d.window;;){if(d.lookahead<=a){if(O0(d),d.lookahead<=a&&Q0===H)return D;if(d.lookahead===0)break}if(d.match_length=0,d.lookahead>=z&&0d.lookahead&&(d.match_length=d.lookahead)}if(d.match_length>=z?(X0=J._tr_tally(d,1,d.match_length-z),d.lookahead-=d.match_length,d.strstart+=d.match_length,d.match_length=0):(X0=J._tr_tally(d,0,d.window[d.strstart]),d.lookahead--,d.strstart++),X0&&(y(d,!1),d.strm.avail_out===0))return D}return d.insert=0,Q0===T?(y(d,!0),d.strm.avail_out===0?B0:i):d.last_lit&&(y(d,!1),d.strm.avail_out===0)?D:m}(V,p):K[V.level].func(V,p);if(l!==B0&&l!==i||(V.status=666),l===D||l===B0)return R.avail_out===0&&(V.last_flush=-1),A;if(l===m&&(p===1?J._tr_align(V):p!==5&&(J._tr_stored_block(V,0,0,!1),p===3&&(G0(V.head),V.lookahead===0&&(V.strstart=0,V.block_start=0,V.insert=0))),r(R),R.avail_out===0))return V.last_flush=-1,A}return p!==T?A:V.wrap<=0?1:(V.wrap===2?(n(V,255&R.adler),n(V,R.adler>>8&255),n(V,R.adler>>16&255),n(V,R.adler>>24&255),n(V,255&R.total_in),n(V,R.total_in>>8&255),n(V,R.total_in>>16&255),n(V,R.total_in>>24&255)):(o(V,R.adler>>>16),o(V,65535&R.adler)),r(R),0=k.w_size&&(O===0&&(G0(k.head),k.strstart=0,k.block_start=0,k.insert=0),Q0=new Z.Buf8(k.w_size),Z.arraySet(Q0,p,X0-k.w_size,k.w_size,0),p=Q0,X0=k.w_size),_=R.avail_in,l=R.next_in,d=R.input,R.avail_in=X0,R.next_in=0,R.input=p,O0(k);k.lookahead>=z;){for(V=k.strstart,X=k.lookahead-(z-1);k.ins_h=(k.ins_h<>>=z=x>>>24,v-=z,(z=x>>>16&255)===0)m[I++]=65535&x;else{if(!(16&z)){if((64&z)==0){x=S[(65535&x)+(N&(1<>>=z,v-=z),v<15&&(N+=D[q++]<>>=z=x>>>24,v-=z,!(16&(z=x>>>16&255))){if((64&z)==0){x=F[(65535&x)+(N&(1<>>=z,v-=z,(z=I-H)>3,N&=(1<<(v-=a<<3))-1,K.next_in=q,K.next_out=I,K.avail_in=q>>24&255)+(b>>>8&65280)+((65280&b)<<8)+((255&b)<<24)}function N(){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 K.Buf16(320),this.work=new K.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function v(b){var c;return b&&b.state?(c=b.state,b.total_in=b.total_out=c.total=0,b.msg="",c.wrap&&(b.adler=1&c.wrap),c.mode=P,c.last=0,c.havedict=0,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new K.Buf32(j),c.distcode=c.distdyn=new K.Buf32(E),c.sane=1,c.back=-1,T):A}function S(b){var c;return b&&b.state?((c=b.state).wsize=0,c.whave=0,c.wnext=0,v(b)):A}function F(b,c){var D,m;return b&&b.state?(m=b.state,c<0?(D=0,c=-c):(D=1+(c>>4),c<48&&(c&=15)),c&&(c<8||15=i.wsize?(K.arraySet(i.window,c,D-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):(m<(B0=i.wsize-i.wnext)&&(B0=m),K.arraySet(i.window,c,D-m,B0,i.wnext),(m-=B0)?(K.arraySet(i.window,c,D-m,m,0),i.wnext=m,i.whave=i.wsize):(i.wnext+=B0,i.wnext===i.wsize&&(i.wnext=0),i.whave>>8&255,D.check=J(D.check,O,2,0),y=r=0,D.mode=2;break}if(D.flags=0,D.head&&(D.head.done=!1),!(1&D.wrap)||(((255&r)<<8)+(r>>8))%31){b.msg="incorrect header check",D.mode=30;break}if((15&r)!=8){b.msg="unknown compression method",D.mode=30;break}if(y-=4,R=8+(15&(r>>>=4)),D.wbits===0)D.wbits=R;else if(R>D.wbits){b.msg="invalid window size",D.mode=30;break}D.dmax=1<>8&1),512&D.flags&&(O[0]=255&r,O[1]=r>>>8&255,D.check=J(D.check,O,2,0)),y=r=0,D.mode=3;case 3:for(;y<32;){if(s===0)break B;s--,r+=m[i++]<>>8&255,O[2]=r>>>16&255,O[3]=r>>>24&255,D.check=J(D.check,O,4,0)),y=r=0,D.mode=4;case 4:for(;y<16;){if(s===0)break B;s--,r+=m[i++]<>8),512&D.flags&&(O[0]=255&r,O[1]=r>>>8&255,D.check=J(D.check,O,2,0)),y=r=0,D.mode=5;case 5:if(1024&D.flags){for(;y<16;){if(s===0)break B;s--,r+=m[i++]<>>8&255,D.check=J(D.check,O,2,0)),y=r=0}else D.head&&(D.head.extra=null);D.mode=6;case 6:if(1024&D.flags&&(s<(Y0=D.length)&&(Y0=s),Y0&&(D.head&&(R=D.head.extra_len-D.length,D.head.extra||(D.head.extra=Array(D.head.extra_len)),K.arraySet(D.head.extra,m,i,Y0,R)),512&D.flags&&(D.check=J(D.check,m,Y0,i)),s-=Y0,i+=Y0,D.length-=Y0),D.length))break B;D.length=0,D.mode=7;case 7:if(2048&D.flags){if(s===0)break B;for(Y0=0;R=m[i+Y0++],D.head&&R&&D.length<65536&&(D.head.name+=String.fromCharCode(R)),R&&Y0>9&1,D.head.done=!0),b.adler=D.check=0,D.mode=12;break;case 10:for(;y<32;){if(s===0)break B;s--,r+=m[i++]<>>=7&y,y-=7&y,D.mode=27;break}for(;y<3;){if(s===0)break B;s--,r+=m[i++]<>>=1)){case 0:D.mode=14;break;case 1:if(a(D),D.mode=20,c!==6)break;r>>>=2,y-=2;break B;case 2:D.mode=17;break;case 3:b.msg="invalid block type",D.mode=30}r>>>=2,y-=2;break;case 14:for(r>>>=7&y,y-=7&y;y<32;){if(s===0)break B;s--,r+=m[i++]<>>16^65535)){b.msg="invalid stored block lengths",D.mode=30;break}if(D.length=65535&r,y=r=0,D.mode=15,c===6)break B;case 15:D.mode=16;case 16:if(Y0=D.length){if(s>>=5,y-=5,D.ndist=1+(31&r),r>>>=5,y-=5,D.ncode=4+(15&r),r>>>=4,y-=4,286>>=3,y-=3}for(;D.have<19;)D.lens[_[D.have++]]=0;if(D.lencode=D.lendyn,D.lenbits=7,k={bits:D.lenbits},p=W(0,D.lens,0,19,D.lencode,0,D.work,k),D.lenbits=k.bits,p){b.msg="invalid code lengths set",D.mode=30;break}D.have=0,D.mode=19;case 19:for(;D.have>>16&255,h=65535&X,!((L=X>>>24)<=y);){if(s===0)break B;s--,r+=m[i++]<>>=L,y-=L,D.lens[D.have++]=h;else{if(h===16){for(V=L+2;y>>=L,y-=L,D.have===0){b.msg="invalid bit length repeat",D.mode=30;break}R=D.lens[D.have-1],Y0=3+(3&r),r>>>=2,y-=2}else if(h===17){for(V=L+3;y>>=L)),r>>>=3,y-=3}else{for(V=L+7;y>>=L)),r>>>=7,y-=7}if(D.have+Y0>D.nlen+D.ndist){b.msg="invalid bit length repeat",D.mode=30;break}for(;Y0--;)D.lens[D.have++]=R}}if(D.mode===30)break;if(D.lens[256]===0){b.msg="invalid code -- missing end-of-block",D.mode=30;break}if(D.lenbits=9,k={bits:D.lenbits},p=W(I,D.lens,0,D.nlen,D.lencode,0,D.work,k),D.lenbits=k.bits,p){b.msg="invalid literal/lengths set",D.mode=30;break}if(D.distbits=6,D.distcode=D.distdyn,k={bits:D.distbits},p=W(H,D.lens,D.nlen,D.ndist,D.distcode,0,D.work,k),D.distbits=k.bits,p){b.msg="invalid distances set",D.mode=30;break}if(D.mode=20,c===6)break B;case 20:D.mode=21;case 21:if(6<=s&&258<=G0){b.next_out=V0,b.avail_out=G0,b.next_in=i,b.avail_in=s,D.hold=r,D.bits=y,q(b,o),V0=b.next_out,B0=b.output,G0=b.avail_out,i=b.next_in,m=b.input,s=b.avail_in,r=D.hold,y=D.bits,D.mode===12&&(D.back=-1);break}for(D.back=0;u=(X=D.lencode[r&(1<>>16&255,h=65535&X,!((L=X>>>24)<=y);){if(s===0)break B;s--,r+=m[i++]<>Z0)])>>>16&255,h=65535&X,!(Z0+(L=X>>>24)<=y);){if(s===0)break B;s--,r+=m[i++]<>>=Z0,y-=Z0,D.back+=Z0}if(r>>>=L,y-=L,D.back+=L,D.length=h,u===0){D.mode=26;break}if(32&u){D.back=-1,D.mode=12;break}if(64&u){b.msg="invalid literal/length code",D.mode=30;break}D.extra=15&u,D.mode=22;case 22:if(D.extra){for(V=D.extra;y>>=D.extra,y-=D.extra,D.back+=D.extra}D.was=D.length,D.mode=23;case 23:for(;u=(X=D.distcode[r&(1<>>16&255,h=65535&X,!((L=X>>>24)<=y);){if(s===0)break B;s--,r+=m[i++]<>Z0)])>>>16&255,h=65535&X,!(Z0+(L=X>>>24)<=y);){if(s===0)break B;s--,r+=m[i++]<>>=Z0,y-=Z0,D.back+=Z0}if(r>>>=L,y-=L,D.back+=L,64&u){b.msg="invalid distance code",D.mode=30;break}D.offset=h,D.extra=15&u,D.mode=24;case 24:if(D.extra){for(V=D.extra;y>>=D.extra,y-=D.extra,D.back+=D.extra}if(D.offset>D.dmax){b.msg="invalid distance too far back",D.mode=30;break}D.mode=25;case 25:if(G0===0)break B;if(Y0=o-G0,D.offset>Y0){if((Y0=D.offset-Y0)>D.whave&&D.sane){b.msg="invalid distance too far back",D.mode=30;break}O0=Y0>D.wnext?(Y0-=D.wnext,D.wsize-Y0):D.wnext-Y0,Y0>D.length&&(Y0=D.length),w=D.window}else w=B0,O0=V0-D.offset,Y0=D.length;for(G0$?(z=O0[w+E[c]],y[n+E[c]]):(z=96,0),N=1<>V0)+(v-=N)]=x<<24|z<<16|a|0,v!==0;);for(N=1<>=1;if(N!==0?(r&=N-1,r+=N):r=0,c++,--o[b]==0){if(b===m)break;b=H[T+E[c]]}if(B0>>7)]}function n(X,O){X.pending_buf[X.pending++]=255&O,X.pending_buf[X.pending++]=O>>>8&255}function o(X,O,_){X.bi_valid>C-_?(X.bi_buf|=O<>C-X.bi_valid,X.bi_valid+=_-C):(X.bi_buf|=O<>>=1,_<<=1,0<--O;);return _>>>1}function w(X,O,_){var l,d,Q0=Array(E+1),X0=0;for(l=1;l<=E;l++)Q0[l]=X0=X0+_[l-1]<<1;for(d=0;d<=O;d++){var K0=X[2*d+1];K0!==0&&(X[2*d]=O0(Q0[K0]++,K0))}}function L(X){var O;for(O=0;O>1;1<=_;_--)Z0(X,Q0,_);for(d=I0;_=X.heap[1],X.heap[1]=X.heap[X.heap_len--],Z0(X,Q0,1),l=X.heap[1],X.heap[--X.heap_max]=_,X.heap[--X.heap_max]=l,Q0[2*d]=Q0[2*_]+Q0[2*l],X.depth[d]=(X.depth[_]>=X.depth[l]?X.depth[_]:X.depth[l])+1,Q0[2*_+1]=Q0[2*l+1]=d,X.heap[1]=d++,Z0(X,Q0,1),2<=X.heap_len;);X.heap[--X.heap_max]=X.heap[1],function(W0,k0){var L2,m0,r2,z0,W1,p1,Y2=k0.dyn_tree,I6=k0.max_code,X5=k0.stat_desc.static_tree,q5=k0.stat_desc.has_stree,M5=k0.stat_desc.extra_bits,O6=k0.stat_desc.extra_base,i2=k0.stat_desc.max_length,P1=0;for(z0=0;z0<=E;z0++)W0.bl_count[z0]=0;for(Y2[2*W0.heap[W0.heap_max]+1]=0,L2=W0.heap_max+1;L2>=7;d>>=1)if(1&F0&&K0.dyn_ltree[2*I0]!==0)return Z;if(K0.dyn_ltree[18]!==0||K0.dyn_ltree[20]!==0||K0.dyn_ltree[26]!==0)return J;for(I0=32;I0>>3,(Q0=X.static_len+3+7>>>3)<=d&&(d=Q0)):d=Q0=_+5,_+4<=d&&O!==-1?V(X,O,_,l):X.strategy===4||Q0===d?(o(X,2+(l?1:0),3),g(X,U0,b)):(o(X,4+(l?1:0),3),function(K0,I0,F0,W0){var k0;for(o(K0,I0-257,5),o(K0,F0-1,5),o(K0,W0-4,4),k0=0;k0>>8&255,X.pending_buf[X.d_buf+2*X.last_lit+1]=255&O,X.pending_buf[X.l_buf+X.last_lit]=255&_,X.last_lit++,O===0?X.dyn_ltree[2*_]++:(X.matches++,O--,X.dyn_ltree[2*(D[_]+H+1)]++,X.dyn_dtree[2*y(O)]++),X.last_lit===X.lit_bufsize-1},Q._tr_align=function(X){o(X,2,3),Y0(X,v,U0),function(O){O.bi_valid===16?(n(O,O.bi_buf),O.bi_buf=0,O.bi_valid=0):8<=O.bi_valid&&(O.pending_buf[O.pending++]=255&O.bi_buf,O.bi_buf>>=8,O.bi_valid-=8)}(X)}},{"../utils/common":41}],53:[function(G,Y,Q){Y.exports=function(){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}},{}],54:[function(G,Y,Q){(function(K){(function(Z,J){if(!Z.setImmediate){var q,W,I,H,T=1,A={},P=!1,j=Z.document,E=Object.getPrototypeOf&&Object.getPrototypeOf(Z);E=E&&E.setTimeout?E:Z,q={}.toString.call(Z.process)==="[object process]"?function(S){P0.nextTick(function(){N(S)})}:function(){if(Z.postMessage&&!Z.importScripts){var S=!0,F=Z.onmessage;return Z.onmessage=function(){S=!1},Z.postMessage("","*"),Z.onmessage=F,S}}()?(H="setImmediate$"+Math.random()+"$",Z.addEventListener?Z.addEventListener("message",v,!1):Z.attachEvent("onmessage",v),function(S){Z.postMessage(H+S,"*")}):Z.MessageChannel?((I=new MessageChannel).port1.onmessage=function(S){N(S.data)},function(S){I.port2.postMessage(S)}):j&&("onreadystatechange"in j.createElement("script"))?(W=j.documentElement,function(S){var F=j.createElement("script");F.onreadystatechange=function(){N(S),F.onreadystatechange=null,W.removeChild(F),F=null},W.appendChild(F)}):function(S){setTimeout(N,0,S)},E.setImmediate=function(S){typeof S!="function"&&(S=Function(""+S));for(var F=Array(arguments.length-1),M=0;M"u"?K===void 0?this:K:self)}).call(this,typeof v0<"u"?v0:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})}),kK=R0((B,U)=>{var G={"&":"&",'"':""","'":"'","<":"<",">":">"};function Y(Q){return Q&&Q.replace?Q.replace(/([&"<>'])/g,function(K,Z){return G[Z]}):Q}U.exports=Y}),$K=R0((B,U)=>{P2();var G=kK(),Y=x8().Stream,Q=" ";function K(H,T){if(typeof T!=="object")T={indent:T};var A=T.stream?new Y:null,P="",j=!1,E=!T.indent?"":T.indent===!0?Q:T.indent,C=!0;function N($){if(!C)$();else P0.nextTick($)}function v($,x){if(x!==void 0)P+=x;if($&&!j)A=A||new Y,j=!0;if($&&j){var z=P;N(function(){A.emit("data",z)}),P=""}}function S($,x){W(v,q($,E,E?1:0),x)}function F(){if(A){var $=P;N(function(){A.emit("data",$),A.emit("end"),A.readable=!1,A.emit("close")})}}function M($){var x={version:"1.0",encoding:$.encoding||"UTF-8"};if($.standalone)x.standalone=$.standalone;S({"?xml":{_attr:x}}),P=P.replace("/>","?>")}if(N(function(){C=!1}),T.declaration)M(T.declaration);if(H&&H.forEach)H.forEach(function($,x){var z;if(x+1===H.length)z=F;S($,z)});else S(H,F);if(A)return A.readable=!0,A;return P}function Z(){var H={_elem:q(Array.prototype.slice.call(arguments))};return H.push=function(T){if(!this.append)throw Error("not assigned to a parent!");var A=this,P=this._elem.indent;W(this.append,q(T,P,this._elem.icount+(P?1:0)),function(){A.append(!0)})},H.close=function(T){if(T!==void 0)this.push(T);if(this.end)this.end()},H}function J(H,T){return Array(T||0).join(H||"")}function q(H,T,A){A=A||0;var P=J(T,A),j,E=H,C=!1;if(typeof H==="object"){if(j=Object.keys(H)[0],E=H[j],E&&E._elem)return E._elem.name=j,E._elem.icount=A,E._elem.indent=T,E._elem.indents=P,E._elem.interrupt=E,E._elem}var N=[],v=[],S;function F(M){Object.keys(M).forEach(function($){N.push(I($,M[$]))})}switch(typeof E){case"object":if(E===null)break;if(E._attr)F(E._attr);if(E._cdata)v.push(("/g,"]]]]>")+"]]>");if(E.forEach){if(S=!1,v.push(""),E.forEach(function(M){if(typeof M=="object")if(Object.keys(M)[0]=="_attr")F(M._attr);else v.push(q(M,T,A+1));else v.pop(),S=!0,v.push(G(M))}),!S)v.push("")}break;default:v.push(G(E))}return{name:j,interrupt:C,attributes:N,content:v,icount:A,indents:P,indent:T}}function W(H,T,A){if(typeof T!="object")return H(!1,T);var P=T.interrupt?1:T.content.length;function j(){while(T.content.length){var C=T.content.shift();if(C===void 0)continue;if(E(C))return;W(H,C)}if(H(!1,(P>1?T.indents:"")+(T.name?"":"")+(T.indent&&!A?` -`:"")),A)A()}function E(C){if(C.interrupt)return C.interrupt.append=H,C.interrupt.end=j,C.interrupt=!1,H(!0),!0;return!1}if(H(!1,T.indents+(T.name?"<"+T.name:"")+(T.attributes.length?" "+T.attributes.join(" "):"")+(P?T.name?">":"":T.name?"/>":"")+(T.indent&&P>1?` -`:"")),!P)return H(!1,T.indent?` -`:"");if(!E(T))j()}function I(H,T){return H+'="'+G(T)+'"'}U.exports=K,U.exports.element=U.exports.Element=Z}),SK=x8(),h2=k8(CK(),1),A0=k8($K(),1),o2=0,R8=32,bK=32,vK=(B,U)=>{let G=U.replace(/-/g,"");if(G.length!==bK)throw Error(`Error: Cannot extract GUID from font filename: ${U}`);let Y=G.replace(/(..)/g,"$1 ").trim().split(" ").map((Z)=>parseInt(Z,16));Y.reverse();let Q=B.slice(o2,R8).map((Z,J)=>Z^Y[J%Y.length]),K=new Uint8Array(o2+Q.length+Math.max(0,B.length-R8));return K.set(B.slice(0,o2)),K.set(Q,o2),K.set(B.slice(R8),o2+Q.length),K},q6=class{format(B,U={stack:[]}){let G=B.prepForXml(U);if(G)return G;else throw Error("XMLComponent did not format correctly")}},U5=class{replace(B,U,G){let Y=B;return U.forEach((Q,K)=>{Y=Y.replace(new RegExp(`{${Q.fileName}}`,"g"),(G+K).toString())}),Y}getMediaData(B,U){return U.Array.filter((G)=>B.search(`{${G.fileName}}`)>0)}},yK=class{replace(B,U){let G=B;for(let Y of U)G=G.replace(new RegExp(`{${Y.reference}-${Y.instance}}`,"g"),Y.numId.toString());return G}},gK=class{constructor(){e(this,"formatter",void 0),e(this,"imageReplacer",void 0),e(this,"numberingReplacer",void 0),this.formatter=new q6,this.imageReplacer=new U5,this.numberingReplacer=new yK}compile(B,U,G=[]){let Y=new h2.default,Q=this.xmlifyFile(B,U),K=new Map(Object.entries(Q));for(let[,Z]of K)if(Array.isArray(Z))for(let J of Z)Y.file(J.path,U1(J.data));else Y.file(Z.path,U1(Z.data));for(let Z of G)Y.file(Z.path,U1(Z.data));for(let Z of B.Media.Array)if(Z.type!=="svg")Y.file(`word/media/${Z.fileName}`,Z.data);else Y.file(`word/media/${Z.fileName}`,Z.data),Y.file(`word/media/${Z.fallback.fileName}`,Z.fallback.data);for(let[Z,{data:J,fontKey:q}]of B.FontTable.fontOptionsWithKey.entries())Y.file(`word/fonts/font${Z+1}.odttf`,vK(J,q));return Y}xmlifyFile(B,U){let G=B.Document.Relationships.RelationshipCount+1,Y=(0,A0.default)(this.formatter.format(B.Document.View,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}}),Q=B.Comments.Relationships.RelationshipCount+1,K=(0,A0.default)(this.formatter.format(B.Comments,{viewWrapper:{View:B.Comments,Relationships:B.Comments.Relationships},file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}}),Z=B.FootNotes.Relationships.RelationshipCount+1,J=(0,A0.default)(this.formatter.format(B.FootNotes.View,{viewWrapper:B.FootNotes,file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}}),q=this.imageReplacer.getMediaData(Y,B.Media),W=this.imageReplacer.getMediaData(K,B.Media),I=this.imageReplacer.getMediaData(J,B.Media);return L0(L0({Relationships:{data:(()=>{return q.forEach((H,T)=>{B.Document.Relationships.addRelationship(G+T,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${H.fileName}`)}),B.Document.Relationships.addRelationship(B.Document.Relationships.RelationshipCount+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable","fontTable.xml"),(0,A0.default)(this.formatter.format(B.Document.Relationships,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{let H=this.imageReplacer.replace(Y,q,G);return this.numberingReplacer.replace(H,B.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{let H=(0,A0.default)(this.formatter.format(B.Styles,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(H,B.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:(0,A0.default)(this.formatter.format(B.CoreProperties,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},Numbering:{data:(0,A0.default)(this.formatter.format(B.Numbering,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},FileRelationships:{data:(0,A0.default)(this.formatter.format(B.FileRelationships,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:B.Headers.map((H,T)=>{let A=(0,A0.default)(this.formatter.format(H.View,{viewWrapper:H,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(A,B.Media).forEach((P,j)=>{H.Relationships.addRelationship(j,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${P.fileName}`)}),{data:(0,A0.default)(this.formatter.format(H.Relationships,{viewWrapper:H,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${T+1}.xml.rels`}}),FooterRelationships:B.Footers.map((H,T)=>{let A=(0,A0.default)(this.formatter.format(H.View,{viewWrapper:H,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}});return this.imageReplacer.getMediaData(A,B.Media).forEach((P,j)=>{H.Relationships.addRelationship(j,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${P.fileName}`)}),{data:(0,A0.default)(this.formatter.format(H.Relationships,{viewWrapper:H,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${T+1}.xml.rels`}}),Headers:B.Headers.map((H,T)=>{let A=(0,A0.default)(this.formatter.format(H.View,{viewWrapper:H,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}}),P=this.imageReplacer.getMediaData(A,B.Media),j=this.imageReplacer.replace(A,P,0);return{data:this.numberingReplacer.replace(j,B.Numbering.ConcreteNumbering),path:`word/header${T+1}.xml`}}),Footers:B.Footers.map((H,T)=>{let A=(0,A0.default)(this.formatter.format(H.View,{viewWrapper:H,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}}),P=this.imageReplacer.getMediaData(A,B.Media),j=this.imageReplacer.replace(A,P,0);return{data:this.numberingReplacer.replace(j,B.Numbering.ConcreteNumbering),path:`word/footer${T+1}.xml`}}),ContentTypes:{data:(0,A0.default)(this.formatter.format(B.ContentTypes,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"},CustomProperties:{data:(0,A0.default)(this.formatter.format(B.CustomProperties,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:(0,A0.default)(this.formatter.format(B.AppProperties,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:(()=>{let H=this.imageReplacer.replace(J,I,Z);return this.numberingReplacer.replace(H,B.Numbering.ConcreteNumbering)})(),path:"word/footnotes.xml"},FootNotesRelationships:{data:(()=>{return I.forEach((H,T)=>{B.FootNotes.Relationships.addRelationship(Z+T,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${H.fileName}`)}),(0,A0.default)(this.formatter.format(B.FootNotes.Relationships,{viewWrapper:B.FootNotes,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/footnotes.xml.rels"},Endnotes:{data:(0,A0.default)(this.formatter.format(B.Endnotes.View,{viewWrapper:B.Endnotes,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}}),path:"word/endnotes.xml"},EndnotesRelationships:{data:(0,A0.default)(this.formatter.format(B.Endnotes.Relationships,{viewWrapper:B.Endnotes,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}}),path:"word/_rels/endnotes.xml.rels"},Settings:{data:(0,A0.default)(this.formatter.format(B.Settings,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"},Comments:{data:(()=>{let H=this.imageReplacer.replace(K,W,Q);return this.numberingReplacer.replace(H,B.Numbering.ConcreteNumbering)})(),path:"word/comments.xml"},CommentsRelationships:{data:(()=>{return W.forEach((H,T)=>{B.Comments.Relationships.addRelationship(Q+T,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${H.fileName}`)}),(0,A0.default)(this.formatter.format(B.Comments.Relationships,{viewWrapper:{View:B.Comments,Relationships:B.Comments.Relationships},file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/comments.xml.rels"}},B.CommentsExtended?{CommentsExtended:{data:(0,A0.default)(this.formatter.format(B.CommentsExtended,{viewWrapper:{View:B.CommentsExtended,Relationships:B.Comments.Relationships},file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/commentsExtended.xml"}}:{}),{},{FontTable:{data:(0,A0.default)(this.formatter.format(B.FontTable.View,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:(0,A0.default)(this.formatter.format(B.FontTable.Relationships,{viewWrapper:B.Document,file:B,stack:[]}),{indent:U,declaration:{encoding:"UTF-8"}}),path:"word/_rels/fontTable.xml.rels"}})}};function t6(B,U,G,Y,Q,K,Z){try{var J=B[K](Z),q=J.value}catch(W){G(W);return}J.done?U(q):Promise.resolve(q).then(Y,Q)}function M6(B){return function(){var U=this,G=arguments;return new Promise(function(Y,Q){var K=B.apply(U,G);function Z(q){t6(K,Y,Q,Z,J,"next",q)}function J(q){t6(K,Y,Q,Z,J,"throw",q)}Z(void 0)})}}var G5={NONE:"",WITH_2_BLANKS:" ",WITH_4_BLANKS:" ",WITH_TAB:"\t"},e6=(B)=>B===!0?G5.WITH_2_BLANKS:B===!1?void 0:B,Y5=class B{static pack(U,G,Y){var Q=this;return M6(function*(K,Z,J,q=[]){return Q.compiler.compile(K,e6(J),q).generateAsync({type:Z,mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"})}).apply(this,arguments)}static toString(U,G,Y=[]){return B.pack(U,"string",G,Y)}static toBuffer(U,G,Y=[]){return B.pack(U,"nodebuffer",G,Y)}static toBase64String(U,G,Y=[]){return B.pack(U,"base64",G,Y)}static toBlob(U,G,Y=[]){return B.pack(U,"blob",G,Y)}static toArrayBuffer(U,G,Y=[]){return B.pack(U,"arraybuffer",G,Y)}static toStream(U,G,Y=[]){let Q=new SK.Stream;return this.compiler.compile(U,e6(G),Y).generateAsync({type:"nodebuffer",mimeType:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",compression:"DEFLATE"}).then((K)=>{Q.emit("data",K),Q.emit("end")}),Q}};e(Y5,"compiler",new gK);var fK=new q6,a1=(B)=>{return(0,h1.xml2js)(B,{compact:!1,captureSpacesBetweenElements:!0})},Z5=(B)=>{var U;return(U=a1((0,A0.default)(fK.format(new Z1({text:B})))).elements[0].elements)!==null&&U!==void 0?U:[]},Q5=(B)=>L0(L0({},B),{},{attributes:{"xml:space":"preserve"}}),R6=(B,U)=>{var G,Y;return(G=(Y=B.elements)===null||Y===void 0?void 0:Y.filter((Q)=>Q.name===U)[0].elements)!==null&&G!==void 0?G:[]},g2=(B,U,G)=>{let Y=R6(B,"Types");if(Y.some((Q)=>{var K,Z;return Q.type==="element"&&Q.name==="Default"&&(Q===null||Q===void 0||(K=Q.attributes)===null||K===void 0?void 0:K.ContentType)===U&&(Q===null||Q===void 0||(Z=Q.attributes)===null||Z===void 0?void 0:Z.Extension)===G}))return;Y.push({attributes:{ContentType:U,Extension:G},name:"Default",type:"element"})},xK=(B)=>{let U=parseInt(B.substring(3),10);return isNaN(U)?0:U},_K=(B)=>{return R6(B,"Relationships").map((U)=>{var G,Y;return xK((G=(Y=U.attributes)===null||Y===void 0||(Y=Y.Id)===null||Y===void 0?void 0:Y.toString())!==null&&G!==void 0?G:"")}).reduce((U,G)=>Math.max(U,G),0)+1},BB=(B,U,G,Y,Q)=>{let K=R6(B,"Relationships");return K.push({attributes:{Id:`rId${U}`,Type:G,Target:Y,TargetMode:Q},name:"Relationship",type:"element"}),K},hK=class extends Error{constructor(B){super(`Token ${B} not found`);this.name="TokenNotFoundError"}},uK=(B,U)=>{var G;for(let Z=0;Z<((G=B.elements)!==null&&G!==void 0?G:[]).length;Z++){let J=B.elements[Z];if(J.type==="element"&&J.name==="w:r"){var Y;let q=((Y=J.elements)!==null&&Y!==void 0?Y:[]).filter((W)=>W.type==="element"&&W.name==="w:t");for(let W of q){var Q,K;if(!((Q=W.elements)===null||Q===void 0?void 0:Q[0]))continue;if((K=W.elements[0].text)===null||K===void 0?void 0:K.includes(U))return Z}}}throw new hK(U)},dK=(B,U)=>{var G,Y;let Q=-1,K=(G=(Y=B.elements)===null||Y===void 0?void 0:Y.map((Z,J)=>{if(Q!==-1)return Z;if(Z.type==="element"&&Z.name==="w:t"){var q,W;let I=((q=(W=Z.elements)===null||W===void 0||(W=W[0])===null||W===void 0?void 0:W.text)!==null&&q!==void 0?q:"").split(U),H=I.map((T)=>L0(L0(L0({},Z),Q5(Z)),{},{elements:Z5(T)}));if(I.length>1)Q=J;return H}else return Z}).flat())!==null&&G!==void 0?G:[];return{left:L0(L0({},JSON.parse(JSON.stringify(B))),{},{elements:K.slice(0,Q+1)}),right:L0(L0({},JSON.parse(JSON.stringify(B))),{},{elements:K.slice(Q+1)})}},t2={START:0,MIDDLE:1,END:2},cK=({paragraphElement:B,renderedParagraph:U,originalText:G,replacementText:Y})=>{let Q=U.text.indexOf(G),K=Q+G.length-1,Z=t2.START;for(let J of U.runs)for(let{text:q,index:W,start:I,end:H}of J.parts)switch(Z){case t2.START:if(Q>=I&&Q<=H){let T=Q-I,A=Math.min(K,H)-I,P=J.text.substring(T,A+1);if(P==="")continue;let j=q.replace(P,Y);L8(B.elements[J.index].elements[W],j),Z=t2.MIDDLE;continue}break;case t2.MIDDLE:if(K<=H){let T=q.substring(K-I+1);L8(B.elements[J.index].elements[W],T);let A=B.elements[J.index].elements[W];B.elements[J.index].elements[W]=Q5(A),Z=t2.END}else L8(B.elements[J.index].elements[W],"");break;default:}return B},L8=(B,U)=>{return B.elements=Z5(U),B},mK=(B)=>{if(B.element.name!=="w:p")throw Error(`Invalid node type: ${B.element.name}`);if(!B.element.elements)return{text:"",runs:[],index:-1,pathToParagraph:[]};let U=0,G=B.element.elements.map((Y,Q)=>({element:Y,i:Q})).filter(({element:Y})=>Y.name==="w:r").map(({element:Y,i:Q})=>{let K=lK(Y,Q,U);return U+=K.text.length,K}).filter((Y)=>!!Y);return{text:G.reduce((Y,Q)=>Y+Q.text,""),runs:G,index:B.index,pathToParagraph:J5(B)}},lK=(B,U,G)=>{if(!B.elements)return{text:"",parts:[],index:-1,start:G,end:G};let Y=G,Q=B.elements.map((K,Z)=>{var J,q;return K.name==="w:t"&&K.elements&&K.elements.length>0?{text:(J=(q=K.elements[0].text)===null||q===void 0?void 0:q.toString())!==null&&J!==void 0?J:"",index:Z,start:Y,end:(()=>{var W,I;return Y+=((W=(I=K.elements[0].text)===null||I===void 0?void 0:I.toString())!==null&&W!==void 0?W:"").length-1,Y})()}:void 0}).filter((K)=>!!K).map((K)=>K);return{text:Q.reduce((K,Z)=>K+Z.text,""),parts:Q,index:U,start:G,end:Y}},J5=(B)=>B.parent?[...J5(B.parent),B.index]:[B.index],UB=(B)=>{var U,G;return(U=(G=B.element.elements)===null||G===void 0?void 0:G.map((Y,Q)=>({element:Y,index:Q,parent:B})))!==null&&U!==void 0?U:[]},K5=(B)=>{let U=[],G=[...UB({element:B,index:0,parent:void 0})],Y;while(G.length>0){if(Y=G.shift(),Y.element.name==="w:p")U=[...U,mK(Y)];G.push(...UB(Y))}return U},aK=(B,U)=>K5(B).filter((G)=>G.text.includes(U)),pK=new q6,I8="ɵ",rK=({json:B,patch:U,patchText:G,context:Y,keepOriginalStyles:Q=!0})=>{let K=aK(B,G);if(K.length===0)return{element:B,didFindOccurrence:!1};for(let Z of K){let J=U.children.map((q)=>a1((0,A0.default)(pK.format(q,Y)))).map((q)=>q.elements[0]);switch(U.type){case C8.DOCUMENT:{let q=iK(B,Z.pathToParagraph),W=nK(Z.pathToParagraph);q.elements.splice(W,1,...J);break}case C8.PARAGRAPH:default:{let q=V5(B,Z.pathToParagraph);cK({paragraphElement:q,renderedParagraph:Z,originalText:G,replacementText:I8});let W=uK(q,I8),I=q.elements[W],{left:H,right:T}=dK(I,I8),A=J,P=T;if(Q){let j=I.elements.filter((E)=>E.type==="element"&&E.name==="w:rPr");A=J.map((E)=>{var C;return L0(L0({},E),{},{elements:[...j,...(C=E.elements)!==null&&C!==void 0?C:[]]})}),P=L0(L0({},T),{},{elements:[...j,...T.elements]})}q.elements.splice(W,1,H,...A,P);break}}}return{element:B,didFindOccurrence:!0}},V5=(B,U)=>{let G=B;for(let Y=1;YV5(B,U.slice(0,U.length-1)),nK=(B)=>B[B.length-1],C8={DOCUMENT:"file",PARAGRAPH:"paragraph"},GB=new U5,sK=new Uint8Array([255,254]),oK=new Uint8Array([254,255]),YB=(B,U)=>{if(B.length!==U.length)return!1;for(let G=0;Gz.name==="w:document");if(x&&x.attributes){for(let z of["mc","wp","r","w15","m"])x.attributes[`xmlns:${z}`]=y1[z];x.attributes["mc:Ignorable"]=`${x.attributes["mc:Ignorable"]||""} w15`.trim()}}if(v.startsWith("word/")&&!v.endsWith(".xml.rels")){let x={file:W,viewWrapper:{Relationships:{addRelationship:(b,c,D,m)=>{T.push({key:v,hyperlink:{id:b,link:D}})}}},stack:[]};if(q.set(v,x),!(K===null||K===void 0?void 0:K.start.trim())||!(K===null||K===void 0?void 0:K.end.trim()))throw Error("Both start and end delimiters must be non-empty strings.");let{start:z,end:a}=K;for(let[b,c]of Object.entries(Y)){let D=`${z}${b}${a}`;while(!0){let{didFindOccurrence:m}=rK({json:$,patch:L0(L0({},c),{},{children:c.children.map((B0)=>{if(B0 instanceof t8){let i=new m2(B0.options.children,O1());return T.push({key:v,hyperlink:{id:i.linkId,link:B0.options.link}}),i}else return B0})}),patchText:D,context:x,keepOriginalStyles:Q});if(!Z||!m)break}}let U0=GB.getMediaData(JSON.stringify($),x.file.Media);if(U0.length>0)A=!0,H.push({key:v,mediaDatas:U0})}I.set(v,$)}for(let{key:v,mediaDatas:S}of H){var E;let F=`word/_rels/${v.split("/").pop()}.rels`,M=(E=I.get(F))!==null&&E!==void 0?E:ZB();I.set(F,M);let $=_K(M),x=GB.replace(JSON.stringify(I.get(v)),S,$);I.set(v,JSON.parse(x));for(let z=0;z{return(0,h1.js2xml)(B,{attributeValueFn:(U)=>String(U).replace(/&(?!amp;|lt;|gt;|quot;|apos;)/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")})},ZB=()=>({declaration:{attributes:{version:"1.0",encoding:"UTF-8",standalone:"yes"}},elements:[{type:"element",name:"Relationships",attributes:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},elements:[]}]}),B7=function(){var B=M6(function*({data:U}){let G=U instanceof h2.default?U:yield h2.default.loadAsync(U),Y=new Set;for(let[Q,K]of Object.entries(G.files)){if(!Q.endsWith(".xml")&&!Q.endsWith(".rels"))continue;if(Q.startsWith("word/")&&!Q.endsWith(".xml.rels"))K5(a1(yield K.async("text"))).forEach((Z)=>U7(Z.text).forEach((J)=>Y.add(J)))}return Array.from(Y)});return function(G){return B.apply(this,arguments)}}(),U7=(B)=>{var U;let G=new RegExp("(?<=\\{\\{).+?(?=\\}\\})","gs");return(U=B.match(G))!==null&&U!==void 0?U:[]};if(typeof globalThis.Buffer>"u")globalThis.Buffer=J0;if(typeof globalThis.process>"u")globalThis.process=G7;globalThis.__bundles=globalThis.__bundles||{};globalThis.__bundles.docx=L6;})(); +(()=>{var Xh=Object.create;var{getPrototypeOf:Kh,defineProperty:En,getOwnPropertyNames:zh}=Object;var eo=Object.prototype.hasOwnProperty;function Yh(e){return this[e]}var qh,Jh,Zh=(e,t,r)=>{var n=e!=null&&typeof e==="object";if(n){var s=t?qh??=new WeakMap:Jh??=new WeakMap,i=s.get(e);if(i)return i}r=e!=null?Xh(Kh(e)):{};let o=t||!e||!e.__esModule||!eo.call(e,"default")?En(r,"default",{value:e,enumerable:!0}):r;if(e&&typeof e==="object"||typeof e==="function"){for(let a of zh(e))if(!eo.call(o,a))En(o,a,{get:Yh.bind(e,a),enumerable:!0})}if(n)s.set(e,o);return o};var Qh=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ed=(e)=>e;function td(e,t){this[e]=ed.bind(null,t)}var rd=(e,t)=>{for(var r in t)En(e,r,{get:t[r],enumerable:!0,configurable:!0,set:td.bind(t,r)})};var Io=Qh(function(Zb,So){var te=So.exports={},Ve,Xe;function Ln(){throw Error("setTimeout has not been defined")}function Dn(){throw Error("clearTimeout has not been defined")}(function(){try{if(typeof setTimeout==="function")Ve=setTimeout;else Ve=Ln}catch(e){Ve=Ln}try{if(typeof clearTimeout==="function")Xe=clearTimeout;else Xe=Dn}catch(e){Xe=Dn}})();function bo(e){if(Ve===setTimeout)return setTimeout(e,0);if((Ve===Ln||!Ve)&&setTimeout)return Ve=setTimeout,setTimeout(e,0);try{return Ve(e,0)}catch(t){try{return Ve.call(null,e,0)}catch(r){return Ve.call(this,e,0)}}}function Ld(e){if(Xe===clearTimeout)return clearTimeout(e);if((Xe===Dn||!Xe)&&clearTimeout)return Xe=clearTimeout,clearTimeout(e);try{return Xe(e)}catch(t){try{return Xe.call(null,e)}catch(r){return Xe.call(this,e)}}}var at=[],Ft=!1,Nt,Rr=-1;function Dd(){if(!Ft||!Nt)return;if(Ft=!1,Nt.length)at=Nt.concat(at);else Rr=-1;if(at.length)To()}function To(){if(Ft)return;var e=bo(Dd);Ft=!0;var t=at.length;while(t){Nt=at,at=[];while(++Rr1)for(var r=1;r"u")Cr.global=globalThis;if(typeof Cr.__require>"u")Cr.__require=(e)=>{throw Error(`Dynamic require of "${e}" is not supported in the sandbox`)};var Ge=[],Ce=[],Sn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(At=0,to=Sn.length;At0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");if(r===-1)r=t;var n=r===t?0:4-r%4;return[r,n]}function sd(e,t){return(e+t)*3/4-t}function id(e){var t,r=nd(e),n=r[0],s=r[1],i=new Uint8Array(sd(n,s)),o=0,a=s>0?n-4:n,u;for(u=0;u>16&255,i[o++]=t>>8&255,i[o++]=t&255;if(s===2)t=Ce[e.charCodeAt(u)]<<2|Ce[e.charCodeAt(u+1)]>>4,i[o++]=t&255;if(s===1)t=Ce[e.charCodeAt(u)]<<10|Ce[e.charCodeAt(u+1)]<<4|Ce[e.charCodeAt(u+2)]>>2,i[o++]=t>>8&255,i[o++]=t&255;return i}function od(e){return Ge[e>>18&63]+Ge[e>>12&63]+Ge[e>>6&63]+Ge[e&63]}function ad(e,t,r){var n,s=[];for(var i=t;ia?a:o+i));if(n===1)t=e[r-1],s.push(Ge[t>>2]+Ge[t<<4&63]+"==");else if(n===2)t=(e[r-2]<<8)+e[r-1],s.push(Ge[t>>10]+Ge[t>>4&63]+Ge[t<<2&63]+"=");return s.join("")}function Nr(e,t,r,n,s){var i,o,a=s*8-n-1,u=(1<>1,c=-7,h=r?s-1:0,d=r?-1:1,f=e[t+h];h+=d,i=f&(1<<-c)-1,f>>=-c,c+=a;for(;c>0;i=i*256+e[t+h],h+=d,c-=8);o=i&(1<<-c)-1,i>>=-c,c+=n;for(;c>0;o=o*256+e[t+h],h+=d,c-=8);if(i===0)i=1-l;else if(i===u)return o?NaN:(f?-1:1)*(1/0);else o=o+Math.pow(2,n),i=i-l;return(f?-1:1)*o*Math.pow(2,i-n)}function ao(e,t,r,n,s,i){var o,a,u,l=i*8-s-1,c=(1<>1,d=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:i-1,p=n?1:-1,v=t<0||t===0&&1/t<0?1:0;if(t=Math.abs(t),isNaN(t)||t===1/0)a=isNaN(t)?1:0,o=c;else{if(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1)o--,u*=2;if(o+h>=1)t+=d/u;else t+=d*Math.pow(2,1-h);if(t*u>=2)o++,u/=2;if(o+h>=c)a=0,o=c;else if(o+h>=1)a=(t*u-1)*Math.pow(2,s),o=o+h;else a=t*Math.pow(2,h-1)*Math.pow(2,s),o=0}for(;s>=8;e[r+f]=a&255,f+=p,a/=256,s-=8);o=o<0;e[r+f]=o&255,f+=p,o/=256,l-=8);e[r+f-p]|=v*128}var no=typeof Symbol==="function"&&typeof Symbol.for==="function"?Symbol.for("nodejs.util.inspect.custom"):null,ld=50,In=2147483647;var{btoa:Gb,atob:jb,File:Vb,Blob:Xb}=globalThis;function ot(e){if(e>In)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,I.prototype),t}function Rn(e,t,r){return class extends r{constructor(){super();Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}var cd=Rn("ERR_BUFFER_OUT_OF_BOUNDS",function(e){if(e)return`${e} is outside of buffer bounds`;return"Attempt to access memory outside buffer bounds"},RangeError),ud=Rn("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),An=Rn("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,s=r;if(Number.isInteger(r)&&Math.abs(r)>4294967296)s=oo(String(r));else if(typeof r==="bigint"){if(s=String(r),r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))s=oo(s);s+="n"}return n+=` It must be ${t}. Received ${s}`,n},RangeError);function I(e,t,r){if(typeof e==="number"){if(typeof t==="string")throw TypeError('The "string" argument must be of type string. Received type number');return Pn(e)}return lo(e,t,r)}Object.defineProperty(I.prototype,"parent",{enumerable:!0,get:function(){if(!I.isBuffer(this))return;return this.buffer}});Object.defineProperty(I.prototype,"offset",{enumerable:!0,get:function(){if(!I.isBuffer(this))return;return this.byteOffset}});I.poolSize=8192;function lo(e,t,r){if(typeof e==="string")return dd(e,t);if(ArrayBuffer.isView(e))return pd(e);if(e==null)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(je(e,ArrayBuffer)||e&&je(e.buffer,ArrayBuffer))return Nn(e,t,r);if(typeof SharedArrayBuffer<"u"&&(je(e,SharedArrayBuffer)||e&&je(e.buffer,SharedArrayBuffer)))return Nn(e,t,r);if(typeof e==="number")throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return I.from(n,t,r);let s=md(e);if(s)return s;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==="function")return I.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}I.from=function(e,t,r){return lo(e,t,r)};Object.setPrototypeOf(I.prototype,Uint8Array.prototype);Object.setPrototypeOf(I,Uint8Array);function co(e){if(typeof e!=="number")throw TypeError('"size" argument must be of type number');else if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function hd(e,t,r){if(co(e),e<=0)return ot(e);if(t!==void 0)return typeof r==="string"?ot(e).fill(t,r):ot(e).fill(t);return ot(e)}I.alloc=function(e,t,r){return hd(e,t,r)};function Pn(e){return co(e),ot(e<0?0:On(e)|0)}I.allocUnsafe=function(e){return Pn(e)};I.allocUnsafeSlow=function(e){return Pn(e)};function dd(e,t){if(typeof t!=="string"||t==="")t="utf8";if(!I.isEncoding(t))throw TypeError("Unknown encoding: "+t);let r=uo(e,t)|0,n=ot(r),s=n.write(e,t);if(s!==r)n=n.slice(0,s);return n}function Cn(e){let t=e.length<0?0:On(e.length)|0,r=ot(t);for(let n=0;n=In)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+In.toString(16)+" bytes");return e|0}I.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==I.prototype};I.compare=function(e,t){if(je(e,Uint8Array))e=I.from(e,e.offset,e.byteLength);if(je(t,Uint8Array))t=I.from(t,t.offset,t.byteLength);if(!I.isBuffer(e)||!I.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let s=0,i=Math.min(r,n);sn.length){if(!I.isBuffer(i))i=I.from(i);i.copy(n,s)}else Uint8Array.prototype.set.call(n,i,s);else if(!I.isBuffer(i))throw TypeError('"list" argument must be an Array of Buffers');else i.copy(n,s);s+=i.length}return n};function uo(e,t){if(I.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||je(e,ArrayBuffer))return e.byteLength;if(typeof e!=="string")throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let s=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return kn(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return xo(e).length;default:if(s)return n?-1:kn(e).length;t=(""+t).toLowerCase(),s=!0}}I.byteLength=uo;function fd(e,t,r){let n=!1;if(t===void 0||t<0)t=0;if(t>this.length)return"";if(r===void 0||r>this.length)r=this.length;if(r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";if(!e)e="utf8";while(!0)switch(e){case"hex":return Id(this,t,r);case"utf8":case"utf-8":return po(this,t,r);case"ascii":return Ed(this,t,r);case"latin1":case"binary":return Sd(this,t,r);case"base64":return bd(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ad(this,t,r);default:if(n)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}I.prototype._isBuffer=!0;function Ct(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}I.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tt)e+=" ... ";return""};if(no)I.prototype[no]=I.prototype.inspect;I.prototype.compare=function(e,t,r,n,s){if(je(e,Uint8Array))e=I.from(e,e.offset,e.byteLength);if(!I.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(t===void 0)t=0;if(r===void 0)r=e?e.length:0;if(n===void 0)n=0;if(s===void 0)s=this.length;if(t<0||r>e.length||n<0||s>this.length)throw RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,s>>>=0,this===e)return 0;let i=s-n,o=r-t,a=Math.min(i,o),u=this.slice(n,s),l=e.slice(t,r);for(let c=0;c2147483647)r=2147483647;else if(r<-2147483648)r=-2147483648;if(r=+r,Number.isNaN(r))r=s?0:e.length-1;if(r<0)r=e.length+r;if(r>=e.length)if(s)return-1;else r=e.length-1;else if(r<0)if(s)r=0;else return-1;if(typeof t==="string")t=I.from(t,n);if(I.isBuffer(t)){if(t.length===0)return-1;return so(e,t,r,n,s)}else if(typeof t==="number"){if(t=t&255,typeof Uint8Array.prototype.indexOf==="function")if(s)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return so(e,[t],r,n,s)}throw TypeError("val must be string, number or Buffer")}function so(e,t,r,n,s){let i=1,o=e.length,a=t.length;if(n!==void 0){if(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le"){if(e.length<2||t.length<2)return-1;i=2,o/=2,a/=2,r/=2}}function u(c,h){if(i===1)return c[h];else return c.readUInt16BE(h*i)}let l;if(s){let c=-1;for(l=r;lo)r=o-a;for(l=r;l>=0;l--){let c=!0;for(let h=0;hs)n=s;let i=t.length;if(n>i/2)n=i/2;let o;for(o=0;o>>0,isFinite(r)){if(r=r>>>0,n===void 0)n="utf8"}else n=r,r=void 0;else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let s=this.length-t;if(r===void 0||r>s)r=s;if(e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");if(!n)n="utf8";let i=!1;for(;;)switch(n){case"hex":return vd(this,e,t,r);case"utf8":case"utf-8":return wd(this,e,t,r);case"ascii":case"latin1":case"binary":return gd(this,e,t,r);case"base64":return yd(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return xd(this,e,t,r);default:if(i)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}};I.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function bd(e,t,r){if(t===0&&r===e.length)return ro(e);else return ro(e.slice(t,r))}function po(e,t,r){r=Math.min(e.length,r);let n=[],s=t;while(s239?4:i>223?3:i>191?2:1;if(s+a<=r){let u,l,c,h;switch(a){case 1:if(i<128)o=i;break;case 2:if(u=e[s+1],(u&192)===128){if(h=(i&31)<<6|u&63,h>127)o=h}break;case 3:if(u=e[s+1],l=e[s+2],(u&192)===128&&(l&192)===128){if(h=(i&15)<<12|(u&63)<<6|l&63,h>2047&&(h<55296||h>57343))o=h}break;case 4:if(u=e[s+1],l=e[s+2],c=e[s+3],(u&192)===128&&(l&192)===128&&(c&192)===128){if(h=(i&15)<<18|(u&63)<<12|(l&63)<<6|c&63,h>65535&&h<1114112)o=h}}}if(o===null)o=65533,a=1;else if(o>65535)o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023;n.push(o),s+=a}return Td(n)}var io=4096;function Td(e){let t=e.length;if(t<=io)return String.fromCharCode.apply(String,e);let r="",n=0;while(nn)r=n;let s="";for(let i=t;ir)e=r;if(t<0){if(t+=r,t<0)t=0}else if(t>r)t=r;if(tr)throw RangeError("Trying to access beyond buffer length")}I.prototype.readUintLE=I.prototype.readUIntLE=function(e,t,r){if(e=e>>>0,t=t>>>0,!r)oe(e,t,this.length);let n=this[e],s=1,i=0;while(++i>>0,t=t>>>0,!r)oe(e,t,this.length);let n=this[e+--t],s=1;while(t>0&&(s*=256))n+=this[e+--t]*s;return n};I.prototype.readUint8=I.prototype.readUInt8=function(e,t){if(e=e>>>0,!t)oe(e,1,this.length);return this[e]};I.prototype.readUint16LE=I.prototype.readUInt16LE=function(e,t){if(e=e>>>0,!t)oe(e,2,this.length);return this[e]|this[e+1]<<8};I.prototype.readUint16BE=I.prototype.readUInt16BE=function(e,t){if(e=e>>>0,!t)oe(e,2,this.length);return this[e]<<8|this[e+1]};I.prototype.readUint32LE=I.prototype.readUInt32LE=function(e,t){if(e=e>>>0,!t)oe(e,4,this.length);return(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};I.prototype.readUint32BE=I.prototype.readUInt32BE=function(e,t){if(e=e>>>0,!t)oe(e,4,this.length);return this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};I.prototype.readBigUInt64LE=gt(function(e){e=e>>>0,Mt(e,"offset");let t=this[e],r=this[e+7];if(t===void 0||r===void 0)Zt(e,this.length-8);let n=t+this[++e]*256+this[++e]*65536+this[++e]*16777216,s=this[++e]+this[++e]*256+this[++e]*65536+r*16777216;return BigInt(n)+(BigInt(s)<>>0,Mt(e,"offset");let t=this[e],r=this[e+7];if(t===void 0||r===void 0)Zt(e,this.length-8);let n=t*16777216+this[++e]*65536+this[++e]*256+this[++e],s=this[++e]*16777216+this[++e]*65536+this[++e]*256+r;return(BigInt(n)<>>0,t=t>>>0,!r)oe(e,t,this.length);let n=this[e],s=1,i=0;while(++i=s)n-=Math.pow(2,8*t);return n};I.prototype.readIntBE=function(e,t,r){if(e=e>>>0,t=t>>>0,!r)oe(e,t,this.length);let n=t,s=1,i=this[e+--n];while(n>0&&(s*=256))i+=this[e+--n]*s;if(s*=128,i>=s)i-=Math.pow(2,8*t);return i};I.prototype.readInt8=function(e,t){if(e=e>>>0,!t)oe(e,1,this.length);if(!(this[e]&128))return this[e];return(255-this[e]+1)*-1};I.prototype.readInt16LE=function(e,t){if(e=e>>>0,!t)oe(e,2,this.length);let r=this[e]|this[e+1]<<8;return r&32768?r|4294901760:r};I.prototype.readInt16BE=function(e,t){if(e=e>>>0,!t)oe(e,2,this.length);let r=this[e+1]|this[e]<<8;return r&32768?r|4294901760:r};I.prototype.readInt32LE=function(e,t){if(e=e>>>0,!t)oe(e,4,this.length);return this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};I.prototype.readInt32BE=function(e,t){if(e=e>>>0,!t)oe(e,4,this.length);return this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};I.prototype.readBigInt64LE=gt(function(e){e=e>>>0,Mt(e,"offset");let t=this[e],r=this[e+7];if(t===void 0||r===void 0)Zt(e,this.length-8);let n=this[e+4]+this[e+5]*256+this[e+6]*65536+(r<<24);return(BigInt(n)<>>0,Mt(e,"offset");let t=this[e],r=this[e+7];if(t===void 0||r===void 0)Zt(e,this.length-8);let n=(t<<24)+this[++e]*65536+this[++e]*256+this[++e];return(BigInt(n)<>>0,!t)oe(e,4,this.length);return Nr(this,e,!0,23,4)};I.prototype.readFloatBE=function(e,t){if(e=e>>>0,!t)oe(e,4,this.length);return Nr(this,e,!1,23,4)};I.prototype.readDoubleLE=function(e,t){if(e=e>>>0,!t)oe(e,8,this.length);return Nr(this,e,!0,52,8)};I.prototype.readDoubleBE=function(e,t){if(e=e>>>0,!t)oe(e,8,this.length);return Nr(this,e,!1,52,8)};function Se(e,t,r,n,s,i){if(!I.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>s||te.length)throw RangeError("Index out of range")}I.prototype.writeUintLE=I.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,r=r>>>0,!n){let o=Math.pow(2,8*r)-1;Se(this,e,t,r,o,0)}let s=1,i=0;this[t]=e&255;while(++i>>0,r=r>>>0,!n){let o=Math.pow(2,8*r)-1;Se(this,e,t,r,o,0)}let s=r-1,i=1;this[t+s]=e&255;while(--s>=0&&(i*=256))this[t+s]=e/i&255;return t+r};I.prototype.writeUint8=I.prototype.writeUInt8=function(e,t,r){if(e=+e,t=t>>>0,!r)Se(this,e,t,1,255,0);return this[t]=e&255,t+1};I.prototype.writeUint16LE=I.prototype.writeUInt16LE=function(e,t,r){if(e=+e,t=t>>>0,!r)Se(this,e,t,2,65535,0);return this[t]=e&255,this[t+1]=e>>>8,t+2};I.prototype.writeUint16BE=I.prototype.writeUInt16BE=function(e,t,r){if(e=+e,t=t>>>0,!r)Se(this,e,t,2,65535,0);return this[t]=e>>>8,this[t+1]=e&255,t+2};I.prototype.writeUint32LE=I.prototype.writeUInt32LE=function(e,t,r){if(e=+e,t=t>>>0,!r)Se(this,e,t,4,4294967295,0);return this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4};I.prototype.writeUint32BE=I.prototype.writeUInt32BE=function(e,t,r){if(e=+e,t=t>>>0,!r)Se(this,e,t,4,4294967295,0);return this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function mo(e,t,r,n,s){yo(t,n,s,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function fo(e,t,r,n,s){yo(t,n,s,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}I.prototype.writeBigUInt64LE=gt(function(e,t=0){return mo(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});I.prototype.writeBigUInt64BE=gt(function(e,t=0){return fo(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))});I.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);Se(this,e,t,r,a-1,-a)}let s=0,i=1,o=0;this[t]=e&255;while(++s>0)-o&255}return t+r};I.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=t>>>0,!n){let a=Math.pow(2,8*r-1);Se(this,e,t,r,a-1,-a)}let s=r-1,i=1,o=0;this[t+s]=e&255;while(--s>=0&&(i*=256)){if(e<0&&o===0&&this[t+s+1]!==0)o=1;this[t+s]=(e/i>>0)-o&255}return t+r};I.prototype.writeInt8=function(e,t,r){if(e=+e,t=t>>>0,!r)Se(this,e,t,1,127,-128);if(e<0)e=255+e+1;return this[t]=e&255,t+1};I.prototype.writeInt16LE=function(e,t,r){if(e=+e,t=t>>>0,!r)Se(this,e,t,2,32767,-32768);return this[t]=e&255,this[t+1]=e>>>8,t+2};I.prototype.writeInt16BE=function(e,t,r){if(e=+e,t=t>>>0,!r)Se(this,e,t,2,32767,-32768);return this[t]=e>>>8,this[t+1]=e&255,t+2};I.prototype.writeInt32LE=function(e,t,r){if(e=+e,t=t>>>0,!r)Se(this,e,t,4,2147483647,-2147483648);return this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4};I.prototype.writeInt32BE=function(e,t,r){if(e=+e,t=t>>>0,!r)Se(this,e,t,4,2147483647,-2147483648);if(e<0)e=4294967295+e+1;return this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};I.prototype.writeBigInt64LE=gt(function(e,t=0){return mo(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});I.prototype.writeBigInt64BE=gt(function(e,t=0){return fo(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function vo(e,t,r,n,s,i){if(r+n>e.length)throw RangeError("Index out of range");if(r<0)throw RangeError("Index out of range")}function wo(e,t,r,n,s){if(t=+t,r=r>>>0,!s)vo(e,t,r,4,340282346638528860000000000000000000000,-340282346638528860000000000000000000000);return ao(e,t,r,n,23,4),r+4}I.prototype.writeFloatLE=function(e,t,r){return wo(this,e,t,!0,r)};I.prototype.writeFloatBE=function(e,t,r){return wo(this,e,t,!1,r)};function go(e,t,r,n,s){if(t=+t,r=r>>>0,!s)vo(e,t,r,8,179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,-179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);return ao(e,t,r,n,52,8),r+8}I.prototype.writeDoubleLE=function(e,t,r){return go(this,e,t,!0,r)};I.prototype.writeDoubleBE=function(e,t,r){return go(this,e,t,!1,r)};I.prototype.copy=function(e,t,r,n){if(!I.isBuffer(e))throw TypeError("argument should be a Buffer");if(!r)r=0;if(!n&&n!==0)n=this.length;if(t>=e.length)t=e.length;if(!t)t=0;if(n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");if(n>this.length)n=this.length;if(e.length-t>>0,r=r===void 0?this.length:r>>>0,!e)e=0;let s;if(typeof e==="number")for(s=t;s=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Cd(e,t,r){if(Mt(t,"offset"),e[t]===void 0||e[t+r]===void 0)Zt(t,e.length-(r+1))}function yo(e,t,r,n,s,i){if(e>r||e3)if(t===0||t===BigInt(0))a=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`;else a=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`;else a=`>= ${t}${o} and <= ${r}${o}`;throw new An("value",a,e)}Cd(n,s,i)}function Mt(e,t){if(typeof e!=="number")throw new ud(t,"number",e)}function Zt(e,t,r){if(Math.floor(e)!==e)throw Mt(e,r),new An(r||"offset","an integer",e);if(t<0)throw new cd;throw new An(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Nd=/[^+/0-9A-Za-z-_]/g;function kd(e){if(e=e.split("=")[0],e=e.trim().replace(Nd,""),e.length<2)return"";while(e.length%4!==0)e=e+"=";return e}function kn(e,t){t=t||1/0;let r,n=e.length,s=null,i=[];for(let o=0;o55295&&r<57344){if(!s){if(r>56319){if((t-=3)>-1)i.push(239,191,189);continue}else if(o+1===n){if((t-=3)>-1)i.push(239,191,189);continue}s=r;continue}if(r<56320){if((t-=3)>-1)i.push(239,191,189);s=r;continue}r=(s-55296<<10|r-56320)+65536}else if(s){if((t-=3)>-1)i.push(239,191,189)}if(s=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw Error("Invalid code point")}return i}function Rd(e){let t=[];for(let r=0;r>8,s=r%256,i.push(s),i.push(n)}return i}function xo(e){return id(kd(e))}function kr(e,t,r,n){let s;for(s=0;s=t.length||s>=e.length)break;t[s+r]=e[s]}return s}function je(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}var Od=function(){let e=Array(256);for(let t=0;t<16;++t){let r=t*16;for(let n=0;n<16;++n)e[r+n]="0123456789abcdef"[t]+"0123456789abcdef"[n]}return e}();function gt(e){return typeof BigInt>"u"?_d:e}function _d(){throw Error("BigInt not supported")}function _n(e){return()=>{throw Error(e+" is not implemented for node:buffer browser polyfill")}}var Kb=_n("resolveObjectURL"),zb=_n("isUtf8");var Yb=_n("transcode");var Ub=Zh(Io());var Ji={};rd(Ji,{AbstractNumbering:()=>Xr,AlignmentType:()=>me,AnnotationReference:()=>av,Attributes:()=>we,BaseXmlComponent:()=>Vt,Body:()=>ki,Bookmark:()=>Ei,BookmarkEnd:()=>Ii,BookmarkStart:()=>Si,Border:()=>Qa,BorderStyle:()=>dn,BuilderElement:()=>x,CarriageReturn:()=>dv,CellMerge:()=>lu,CellMergeAttributes:()=>au,CharacterSet:()=>Lv,CheckBox:()=>Ry,CheckBoxSymbolElement:()=>qr,CheckBoxUtil:()=>hh,Column:()=>ww,ColumnBreak:()=>xv,Comment:()=>gs,CommentRangeEnd:()=>Uf,CommentRangeStart:()=>Hf,CommentReference:()=>Wf,Comments:()=>uc,CommentsExtended:()=>hc,CommentsIds:()=>dc,ConcreteHyperlink:()=>Yt,ConcreteNumbering:()=>Is,ContinuationSeparator:()=>uv,DayLong:()=>sv,DayShort:()=>tv,DeletedTableCell:()=>ou,DeletedTableRow:()=>su,DeletedTextRun:()=>B0,Document:()=>by,DocumentAttributeNamespaces:()=>nn,DocumentAttributes:()=>Sr,DocumentBackground:()=>Tu,DocumentBackgroundAttributes:()=>bw,DocumentDefaults:()=>ju,DocumentGridType:()=>w0,DocumentProtectionType:()=>lg,Drawing:()=>fn,DrawingPatch:()=>Sh,DropCapType:()=>Hv,EMPTY_OBJECT:()=>Da,EditableRangeEnd:()=>Xf,EditableRangeStart:()=>Vf,EmphasisMarkType:()=>ni,EmptyElement:()=>ue,EndnoteIdReference:()=>Ms,EndnotePosition:()=>x0,EndnoteReference:()=>pc,EndnoteReferenceRun:()=>ky,EndnoteReferenceRunAttributes:()=>uh,Endnotes:()=>Li,ExternalHyperlink:()=>bc,File:()=>by,FileChild:()=>Er,FootNoteReferenceRunAttributes:()=>ch,FootNotes:()=>Di,Footer:()=>Cy,FooterWrapper:()=>Cu,FootnotePosition:()=>y0,FootnoteReference:()=>Ds,FootnoteReferenceElement:()=>lv,FootnoteReferenceRun:()=>Ny,FrameAnchorType:()=>Uv,FrameWrap:()=>Wv,GridSpan:()=>hu,Header:()=>Ay,HeaderFooterReferenceType:()=>Rt,HeaderFooterType:()=>bs,HeaderWrapper:()=>ku,HeadingLevel:()=>bv,HeightRule:()=>rw,HighlightColor:()=>Gp,HorizontalPositionAlign:()=>pp,HorizontalPositionRelativeFrom:()=>bl,HpsMeasureElement:()=>Hr,HyperlinkType:()=>Av,IgnoreIfEmptyXmlComponent:()=>rt,ImagePatch:()=>_b,ImageRun:()=>jm,ImportedRootElementAttributes:()=>Ga,ImportedXmlComponent:()=>Wa,InitializableXmlComponent:()=>Xs,InsertedTableCell:()=>iu,InsertedTableRow:()=>nu,InsertedTextRun:()=>_0,InternalHyperlink:()=>Ti,LastRenderedPageBreak:()=>pv,LeaderType:()=>gc,Level:()=>Ru,LevelBase:()=>Fi,LevelForOverride:()=>Xw,LevelFormat:()=>ze,LevelOverride:()=>Pu,LevelSuffix:()=>Gw,LineNumberRestartFormat:()=>g0,LineRuleType:()=>Pt,Math:()=>Vv,MathAngledBrackets:()=>f0,MathCurlyBrackets:()=>m0,MathDegree:()=>Mc,MathDenominator:()=>Cc,MathFraction:()=>Yv,MathFunction:()=>c0,MathFunctionName:()=>Bc,MathFunctionProperties:()=>$c,MathIntegral:()=>Qv,MathLimit:()=>Ci,MathLimitLower:()=>t0,MathLimitUpper:()=>e0,MathNumerator:()=>Nc,MathPreSubSuperScript:()=>i0,MathRadical:()=>l0,MathRadicalProperties:()=>Fc,MathRoundBrackets:()=>d0,MathRun:()=>zv,MathSquareBrackets:()=>p0,MathSubScript:()=>n0,MathSubSuperScript:()=>s0,MathSum:()=>Zv,MathSuperScript:()=>r0,Media:()=>Mi,MonthLong:()=>iv,MonthShort:()=>rv,NextAttributeComponent:()=>vr,NoBreakHyphen:()=>Qf,NonVisualDrawingProperties:()=>Fm,NoteNumberRestart:()=>b0,NumberFormat:()=>fp,NumberProperties:()=>ir,NumberValueElement:()=>Gt,NumberedItemReference:()=>Pv,NumberedItemReferenceFormat:()=>kv,Numbering:()=>Bi,OnOffElement:()=>k,OverlapType:()=>q0,PackagePart:()=>Ou,Packer:()=>wh,PageBorderDisplay:()=>T0,PageBorderOffsetFrom:()=>E0,PageBorderZOrder:()=>S0,PageBorders:()=>zc,PageBreak:()=>yv,PageBreakBefore:()=>vc,PageNumber:()=>xt,PageNumberElement:()=>hv,PageNumberSeparator:()=>qc,PageOrientation:()=>pr,PageReference:()=>Ec,PageTextDirection:()=>Qc,PageTextDirectionType:()=>I0,Paragraph:()=>fe,ParagraphProperties:()=>bt,ParagraphPropertiesChange:()=>xs,ParagraphPropertiesDefaults:()=>Wu,ParagraphRunProperties:()=>wl,PatchType:()=>le,PositionalTab:()=>gv,PositionalTabAlignment:()=>mv,PositionalTabLeader:()=>vv,PositionalTabRelativeTo:()=>fv,PrettifyType:()=>vh,RelativeHorizontalPosition:()=>Vr,RelativeVerticalPosition:()=>mu,Run:()=>se,RunProperties:()=>nt,RunPropertiesChange:()=>gl,RunPropertiesDefaults:()=>Gu,SchemeColor:()=>nm,SectionProperties:()=>tn,SectionPropertiesChange:()=>tu,SectionType:()=>C0,Separator:()=>cv,SequentialIdentifier:()=>zm,ShadingType:()=>sl,SimpleField:()=>mi,SimpleMailMergeField:()=>Zm,SoftHyphen:()=>ev,SpaceType:()=>ye,StringContainer:()=>yt,StringEnumValueElement:()=>Zd,StringValueElement:()=>Ue,StyleForCharacter:()=>Et,StyleForParagraph:()=>st,StyleLevel:()=>Iy,Styles:()=>Kr,SymbolRun:()=>yl,TDirection:()=>du,Tab:()=>Tr,TabStopPosition:()=>Tv,TabStopType:()=>ys,Table:()=>sw,TableAnchorType:()=>Y0,TableBorders:()=>Oi,TableCell:()=>Es,TableCellBorders:()=>uu,TableLayoutType:()=>J0,TableOfContents:()=>Sy,TableProperties:()=>gn,TableRow:()=>bu,TableRowProperties:()=>_i,TableRowPropertiesChange:()=>xu,TextDirection:()=>V0,TextEffect:()=>Wp,TextRun:()=>Ze,TextWrappingSide:()=>ui,TextWrappingType:()=>Ut,Textbox:()=>Wy,ThematicBreak:()=>el,Theme:()=>Ku,TwoLinesInOneBrackets:()=>Tp,UnderlineType:()=>ci,VerticalAlign:()=>v0,VerticalAlignSection:()=>Uc,VerticalAlignTable:()=>Hc,VerticalAnchor:()=>zp,VerticalMerge:()=>Ts,VerticalMergeRevisionType:()=>H0,VerticalMergeType:()=>Pi,VerticalPositionAlign:()=>mp,VerticalPositionRelativeFrom:()=>Tl,WidthType:()=>Je,WpgGroupRun:()=>Xm,WpsShapeRun:()=>Vm,XmlAttributeComponent:()=>L,XmlComponent:()=>y,YearLong:()=>ov,YearShort:()=>nv,abstractNumUniqueNumericIdGen:()=>ll,bookmarkUniqueNumericId:()=>ii,bookmarkUniqueNumericIdGen:()=>dl,commentIdToParaId:()=>cc,concreteNumUniqueNumericIdGen:()=>cl,convertInchesToTwip:()=>Ne,convertMillimetersToTwip:()=>Lp,convertToXmlComponent:()=>un,createAlignment:()=>qs,createBodyProperties:()=>Nl,createBorderElement:()=>re,createColumns:()=>Wc,createDocumentGrid:()=>Gc,createDotEmphasisMark:()=>Ep,createEastAsianLayout:()=>il,createEmphasisMark:()=>si,createEndnoteProperties:()=>Kc,createFitText:()=>ml,createFootnoteProperties:()=>Xc,createFrameProperties:()=>Ac,createHeaderFooterReference:()=>Wr,createHorizontalPosition:()=>Al,createIndent:()=>tl,createLineNumberType:()=>jc,createMathAccentCharacter:()=>kc,createMathBase:()=>Ee,createMathLimitLocation:()=>Rc,createMathNAryProperties:()=>Ai,createMathPreSubSuperScriptProperties:()=>Dc,createMathSubScriptElement:()=>qt,createMathSubScriptProperties:()=>_c,createMathSubSuperScriptProperties:()=>Lc,createMathSuperScriptElement:()=>Jt,createMathSuperScriptProperties:()=>Oc,createOutlineLevel:()=>Tc,createPageMargin:()=>Yc,createPageNumberType:()=>Jc,createPageSize:()=>Zc,createParagraphStyle:()=>Wt,createRunFonts:()=>Ur,createSectionType:()=>eu,createShading:()=>br,createSimplePos:()=>El,createSpacing:()=>wc,createStringElement:()=>Ht,createTabStop:()=>xc,createTabStopItem:()=>yc,createTableFloatProperties:()=>fu,createTableLayout:()=>vu,createTableLook:()=>gu,createTableRowHeight:()=>yu,createTableWidthElement:()=>jt,createTransformation:()=>pi,createUnderline:()=>vl,createVerticalAlign:()=>Ni,createVerticalPosition:()=>Cl,createVmlShape:()=>dh,createWrapNone:()=>fs,createWrapSquare:()=>Ll,createWrapThrough:()=>Fl,createWrapTight:()=>Ml,createWrapTopAndBottom:()=>Bl,dateTimeValue:()=>Ya,decimalNumber:()=>X,docPropertiesUniqueNumericId:()=>hl,docPropertiesUniqueNumericIdGen:()=>ul,eighthPointMeasureValue:()=>Ka,elementOf:()=>Xt,encodeUtf8:()=>li,fillPageNumbers:()=>lc,fillPartPageNumbers:()=>zt,fillSequenceNumbers:()=>ac,fitTextUniqueNumericId:()=>pl,hashedId:()=>oi,hexColorValue:()=>zs,hpsMeasureValue:()=>Va,isXmlComponent:()=>Vs,longHexNumber:()=>Yd,measurementOrPercentValue:()=>Ys,patchDetector:()=>$b,patchDocument:()=>Fb,percentageValue:()=>Xa,pointMeasureValue:()=>za,positiveUniversalMeasureValue:()=>Ks,readTheme:()=>yy,sectionMarginDefaults:()=>Me,sectionPageSizeDefaults:()=>or,shortHexNumber:()=>ja,signedHpsMeasureValue:()=>Jd,signedTwipsMeasureValue:()=>Fe,standardizeData:()=>mn,twipsMeasureValue:()=>ne,uCharHexNumber:()=>ps,uniqueId:()=>vt,uniqueNumericIdCreator:()=>Ot,uniqueUuid:()=>ai,universalMeasureToTwips:()=>dt,universalMeasureValue:()=>yr,unsignedDecimalNumber:()=>gr});var Md=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports);function ur(e){return ur=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ur(e)}function Fd(e,t){if(ur(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ur(n)!="object")return n;throw TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bd(e){var t=Fd(e,"string");return ur(t)=="symbol"?t:t+""}function m(e,t,r){return(t=Bd(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var Vt=class{constructor(e){m(this,"rootKey",void 0),this.rootKey=e}get writtenAs(){}},Vs=(e)=>e instanceof Vt||typeof e==="object"&&e!==null&&typeof e.prepForXml==="function",Xt=(e)=>Vs(e)?e.rootKey:void 0,Da=Object.seal({}),y=class extends Vt{constructor(e){super(e);m(this,"root",void 0),this.root=[]}prepForXml(e){var t;e.stack.push(this);let r=this.root.flatMap((n)=>{if(Vs(n)){let s=n.writtenAs;return s?s.map((i)=>i.prepForXml(e)):n.prepForXml(e)}return n}).filter((n)=>n!==void 0);return e.stack.pop(),{[this.rootKey]:r.length?r.length===1&&((t=r[0])===null||t===void 0?void 0:t._attr)?r[0]:r:Da}}addChildElement(e){return this.root.push(e),this}},rt=class extends y{constructor(e,t){super(e);m(this,"includeIfEmpty",void 0),this.includeIfEmpty=t}prepForXml(e){let t=super.prepForXml(e);if(this.includeIfEmpty)return t;return t&&(typeof t[this.rootKey]!=="object"||Object.keys(t[this.rootKey]).length)?t:void 0}};function Ao(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),r.push.apply(r,n)}return r}function w(e){for(var t=1;t{if(n!==void 0){let s=this.xmlKeys&&this.xmlKeys[r]||r;t[s]=n}}),{_attr:t}}},vr=class extends Vt{constructor(e){super("_attr");m(this,"root",void 0),this.root=e}prepForXml(e){return{_attr:Object.values(this.root).filter(({value:t})=>t!==void 0).reduce((t,{key:r,value:n})=>w(w({},t),{},{[r]:n}),{})}}},we=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{val:"w:val",color:"w:color",fill:"w:fill",space:"w:space",sz:"w:sz",type:"w:type",rsidR:"w:rsidR",rsidRPr:"w:rsidRPr",rsidSect:"w:rsidSect",w:"w:w",h:"w:h",top:"w:top",right:"w:right",bottom:"w:bottom",left:"w:left",header:"w:header",footer:"w:footer",gutter:"w:gutter",linePitch:"w:linePitch",pos:"w:pos"})}};function $d(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}function wr(e,t){if(e==null)return{};var r,n,s=$d(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n"],["quot",'"'],["apos","'"]]),Wd=/&([^;]*);?/g,Ma=(e)=>e.indexOf("&")===-1?e:e.replace(Wd,(t,r)=>{if(!t.endsWith(";"))throw Error(`Invalid XML: "&" that starts no entity, in "${e}"`);let n=Ud.get(r);if(n!==void 0)return n;let s=/^#x[0-9a-f]+$/i.test(r)?parseInt(r.slice(2),16):/^#[0-9]+$/.test(r)?parseInt(r.slice(1),10):NaN;if(!(s>0&&s<=1114111))throw Error(`Invalid XML: unknown entity "${t}"`);return String.fromCodePoint(s)}),$r=(e)=>e===" "||e===` +`||e==="\t"||e==="\r",Gd=/([\w:-]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,jd=(e)=>Object.fromEntries([...e.matchAll(Gd)].map(([,t,r,n])=>[t,r!==null&&r!==void 0?r:n])),Kt=(e,{keepWhitespaceText:t=!1}={})=>{let r={},n=[],s=e.charCodeAt(0)===65279?1:0;while(s{var d;let f=n.length===0?r:n[n.length-1];((d=f.elements)!==null&&d!==void 0?d:f.elements=[]).push(h)},o=(h)=>{if(h.trim()===""){if(h!==""&&t)i({type:"text",text:h});return}if(n.length===0)throw Error(`Invalid XML: text outside of the root element, "${h.trim()}"`);i({type:"text",text:Ma(h)})},a=(h,d,f)=>{let p=e.indexOf(h,d);if(p===-1)throw Error(`Invalid XML: ${f} that isn't closed`);return p};while(s",h+2,"processing instruction"),f=e.slice(h+2,d),p=f.search(/\s/),v=p===-1?f:f.slice(0,p),g=p===-1?"":f.slice(p).trimStart();if(v.toLowerCase()==="xml"){let A=jd(g);r.declaration=Object.keys(A).length>0?{attributes:A}:{}}else i({type:"instruction",name:v,instruction:g});s=d+2}else if(e.startsWith("",h+4,"comment"),f=e.slice(h+4,d);if(f!=="")i({type:"comment",comment:f});s=d+3}else if(e.startsWith("",h+9,"CDATA section"),f=e.slice(h+9,d);if(f!=="")i({type:"cdata",cdata:f});s=d+3}else if(e.startsWith(""&&!p)break}if(d===e.length)throw Error("Invalid XML: DOCTYPE that isn't closed");i({type:"doctype",doctype:e.slice(h+9,d).replace(/^ /,"")}),s=d+1}else if(e.startsWith("",h+2,"closing tag"),f=e.slice(h+2,d).trimEnd(),p=n.pop();if((p===null||p===void 0?void 0:p.name)!==f){var u;throw Error(`Invalid XML: closing tag doesn't match <${(u=p===null||p===void 0?void 0:p.name)!==null&&u!==void 0?u:""}>`)}s=d+1}else s=Vd(e,h+1,(d,f)=>{if(i(d),!f)n.push(d)})}if(n.length>0)throw Error(`Invalid XML: <${n[n.length-1].name}> isn't closed`);let{elements:l}=r,c=wr(r,Hd);return l===void 0?c:w(w({},c),{},{elements:l})},Vd=(e,t,r)=>{let n=t;while(n")n++;let s=e.slice(t,n);if(s==="")throw Error("Invalid XML: tag without a name");let i=[],o=n;for(;;){while(o=e.length)throw Error(`Invalid XML: <${s}> that isn't closed`);if(e[o]===">"||e.startsWith("/>",o)){let d=e[o]==="/";return r(w({type:"element",name:s},i.length>0?{attributes:Object.fromEntries(i)}:{}),d),o+(d?2:1)}let a=e.indexOf("=",o),u=e.slice(o,a===-1?e.length:a).trimEnd();if(a===-1||u===""||/[\s/>]/.test(u))throw Error(`Invalid XML: attribute of <${s}> without a value`);let l=a+1;while(l isn't quoted`);let h=e.indexOf(c,l+1);if(h===-1)throw Error(`Invalid XML: value of ${u} on <${s}> isn't closed`);if(!i.some(([d])=>d===u))i.push([u,Ma(e.slice(l+1,h))]);o=h+1}},Fa=new Map([["&","&"],['"',"""],["'","'"],["<","<"],[">",">"]]),Qr=(e)=>e.replace(/[&"'<>\x00-\x08\x0B\x0C\x0E-\x1F]/g,(t)=>{var r;return(r=Fa.get(t))!==null&&r!==void 0?r:""}),Xd=(e)=>e.replace(/[&<>\x00-\x08\x0B\x0C\x0E-\x1F]/g,(t)=>{var r;return(r=Fa.get(t))!==null&&r!==void 0?r:""}),Mn=(e)=>typeof e==="string"?Qr(e):e,Ba=(e,t,r)=>{let n=Object.keys(e)[0],s=n===void 0?void 0:e[n],i=[],o=[],a=(u)=>{for(let[l,c]of Object.entries(u))i.push(`${l}="${String(Mn(c))}"`)};if(typeof s==="object"){if(s!==null){let{_attr:u,_cdata:l}=s;if(u)a(u);if(l)o.push(`/g,"]]]]>")}]]>`);if(Array.isArray(s)){let c=!1;o.push("");for(let h of s)if(typeof h==="object")if(Object.keys(h)[0]==="_attr")a(h._attr);else o.push(Ba(h,t,r+1));else o.pop(),c=!0,o.push(Mn(h));if(!c)o.push("")}}}else o.push(Mn(s));return{name:n,attributes:i,content:o,indents:r>1?t.repeat(r-1):""}},$a=(e,t,r)=>{if(typeof e!=="object")return String(e);let{name:n,attributes:s,content:i,indents:o}=e,{length:a}=i,u=o+(n?`<${n}`:"")+(s.length>0?` ${s.join(" ")}`:"")+(a>0?n?">":"":"/>")+(t&&a>1?` +`:"");if(a===0)return u+(t?` +`:"");return u+i.map((l)=>l===void 0?"":$a(l,t,!1)).join("")+(a>1?o:"")+(n?``:"")+(t&&!r?` +`:"")},H=(e,{indent:t="",declaration:r}={})=>{let n=Array.isArray(e)?e:[e],s=t?1:0,i=(r===null||r===void 0?void 0:r.standalone)?` standalone="${Qr(r.standalone)}"`:"";return(r===void 0?"":`${t?` +`:""}`)+n.map((o,a)=>$a(Ba(o,t,s),t,a===n.length-1)).join("")},Ha=(e)=>Object.entries(e!==null&&e!==void 0?e:{}).flatMap(([t,r])=>r===void 0||r===null?[]:[` ${t}="${Qr(String(r))}"`]).join(""),Ua=(e)=>{switch(e.type){case"element":{var t,r;let n=(t=e.elements)!==null&&t!==void 0?t:[],s=`<${e.name}${Ha(e.attributes)}`;return n.length>0||((r=e.attributes)===null||r===void 0?void 0:r["xml:space"])==="preserve"?`${s}>${n.map(Ua).join("")}`:`${s}/>`}case"text":return Xd(String(e.text));case"cdata":return`/g,"]]]]>")}]]>`;case"comment":return``;case"doctype":return``;case"instruction":return``;default:return""}},Kd=(e)=>{var t;return(e.declaration?``:"")+((t=e.elements)!==null&&t!==void 0?t:[]).map(Ua).join("")},un=(e)=>{switch(e.type){case void 0:case"element":let t=new Wa(e.name,e.attributes),r=e.elements||[];for(let n of r){let s=un(n);if(s!==void 0)t.push(s)}return t;case"text":return e.text;default:return}},zd=class extends L{},Wa=class extends y{static fromXmlString(e){return un(Kt(e))}constructor(e,t){super(e);if(t)this.root.push(new zd(t))}push(e){this.root.push(e)}get writtenAs(){return this.rootKey===void 0?this.root.filter((e)=>typeof e!=="string"):void 0}prepForXml(e){let t=this.writtenAs;return(t===null||t===void 0?void 0:t.length)===1?t[0].prepForXml(e):super.prepForXml(e)}},Ga=class extends y{constructor(e){super("");m(this,"_attr",void 0),this._attr=e}prepForXml(e){return{_attr:this._attr}}},Xs=class extends y{constructor(e,t){super(e);if(t)this.root=t.root}},X=(e)=>{if(!Number.isFinite(e))throw Error(`Invalid value '${e}' specified. Must be an integer.`);return Math.floor(e)},gr=(e)=>{let t=X(e);if(t<0)throw Error(`Invalid value '${e}' specified. Must be a positive integer.`);return t},hn=(e,t)=>{let r=t*2;if(e.length!==r||isNaN(Number(`0x${e}`)))throw Error(`Invalid hex value '${e}'. Expected ${r} digit hex value`);return e},Yd=(e)=>hn(e,4),ja=(e)=>hn(e,2),ps=(e)=>hn(e,1),yr=(e)=>{let t=e.slice(-2),r=e.substring(0,e.length-2);return`${Number(r)}${t}`},qd={in:1440,cm:566.9291338582677,mm:56.69291338582678,pt:20,pc:240,pi:240},dt=(e)=>{if(typeof e==="number")return e;let t=e.slice(-2),r=Number(e.substring(0,e.length-2)),n=qd[t];if(n===void 0||Number.isNaN(r))throw Error(`Invalid universal measure '${e}'. Expected a number followed by mm, cm, in, pt, pc or pi.`);return r*n},Ks=(e)=>{let t=yr(e);if(parseFloat(t)<0)throw Error(`Invalid value '${t}' specified. Expected a positive number.`);return t},zs=(e)=>{if(e==="auto")return e;return hn(e.charAt(0)==="#"?e.substring(1):e,3)},Fe=(e)=>typeof e==="string"?yr(e):X(e),Va=(e)=>typeof e==="string"?Ks(e):gr(e),Jd=(e)=>typeof e==="string"?yr(e):X(e),ne=(e)=>typeof e==="string"?Ks(e):gr(e),Xa=(e)=>{let t=e.substring(0,e.length-1);return`${Number(t)}%`},Ys=(e)=>{if(typeof e==="number")return X(e);return e.slice(-1)==="%"?Xa(e):yr(e)},Ka=gr,za=gr,Ya=(e)=>e.toISOString(),k=class extends y{constructor(e,t=!0){super(e);if(t!==!0)this.root.push(new we({val:t}))}},Hr=class extends y{constructor(e,t){super(e);this.root.push(new we({val:Va(t)}))}},ue=class extends y{},Ue=class extends y{constructor(e,t){super(e);this.root.push(new we({val:t}))}},Ht=(e,t)=>new x({name:e,attributes:{value:{key:"w:val",value:t}}}),Gt=class extends y{constructor(e,t){super(e);this.root.push(new we({val:t}))}},Zd=class extends y{constructor(e,t){super(e);this.root.push(new we({val:t}))}},yt=class extends y{constructor(e,t){super(e);this.root.push(t)}},x=class extends y{constructor({name:e,attributes:t,children:r}){super(e);if(t)this.root.push(new vr(t));if(r)this.root.push(...r)}},me={START:"start",CENTER:"center",END:"end",BOTH:"both",MEDIUM_KASHIDA:"mediumKashida",DISTRIBUTE:"distribute",NUM_TAB:"numTab",HIGH_KASHIDA:"highKashida",LOW_KASHIDA:"lowKashida",THAI_DISTRIBUTE:"thaiDistribute",LEFT:"left",RIGHT:"right",JUSTIFIED:"both"},qs=(e)=>new x({name:"w:jc",attributes:{val:{key:"w:val",value:e}}}),Js={dark1:"dk1",light1:"lt1",dark2:"dk2",light2:"lt2",accent1:"accent1",accent2:"accent2",accent3:"accent3",accent4:"accent4",accent5:"accent5",accent6:"accent6",hyperlink:"hlink",followedHyperlink:"folHlink"},qa={dark2:"44546A",light2:"E7E6E6",accent1:"4472C4",accent2:"ED7D31",accent3:"A5A5A5",accent4:"FFC000",accent5:"5B9BD5",accent6:"70AD47",hyperlink:"0563C1",followedHyperlink:"954F72"},Ja={dark1:{value:"windowText",lastColor:"000000"},light1:{value:"window",lastColor:"FFFFFF"}},Za=(e,t)=>{if(t==="auto")throw Error(`Invalid theme color ${e} 'auto'. Expected 6 digit hex value`);return zs(t)},Zs=(e={})=>Object.fromEntries(Object.keys(Js).map((t)=>{let r=e[t],n=t==="dark1"||t==="light1"?Ja[t].lastColor:qa[t];return[t,r===void 0?n:Za(t,r)]})),Qd=(e,t)=>new x({name:"a:srgbClr",attributes:{value:{key:"val",value:Za(e,t)}}}),ep=(e,t)=>{let r=t[e],n=e==="dark1"||e==="light1"?Ja[e]:void 0;return new x({name:`a:${Js[e]}`,children:[r===void 0&&n?new x({name:"a:sysClr",attributes:{value:{key:"val",value:n.value},lastColor:{key:"lastClr",value:n.lastColor}}}):Qd(e,r!==null&&r!==void 0?r:qa[e])]})},tp=(e,t={})=>new x({name:"a:clrScheme",attributes:{name:{key:"name",value:e}},children:Object.keys(Js).map((r)=>ep(r,t))}),Co=new Set(["dark1","light1","dark2","light2","accent1","accent2","accent3","accent4","accent5","accent6","hyperlink","followedHyperlink"]),rp=new Map([["dk1","dark1"],["lt1","light1"],["dk2","dark2"],["lt2","light2"],["hlink","hyperlink"],["folHlink","followedHyperlink"],["text1","dark1"],["background1","light1"],["text2","dark2"],["background2","light2"]]),No=(e,t)=>{if(!(e>=0&&e<=100))throw Error(`Invalid ${t} ${e}. Expected a number from 0 to 100`);return Math.round(255*(1-e/100))},np=({theme:e,lighter:t,darker:r})=>{if(!Co.has(e)){let i=rp.get(e);throw Error(`Invalid theme color "${e}". ${i?`Did you mean "${i}"?`:`Expected one of ${[...Co].join(", ")}`}`)}if(t!==void 0&&r!==void 0)throw Error("Invalid theme color. Expected lighter or darker, not both");let n=t===void 0?void 0:No(t,"lighter"),s=r===void 0?void 0:No(r,"darker");return{tint:n===255?void 0:n,shade:s===255?void 0:s}},sp=(e)=>{let[t,r,n]=[0,2,4].map((u)=>parseInt(e.slice(u,u+2),16)/255),s=Math.max(t,r,n),i=Math.min(t,r,n),o=(s+i)/2,a=s-i;if(a===0)return{hue:0,saturation:0,lightness:o};return{hue:(s===t?((r-n)/a+6)%6:s===r?(n-t)/a+2:(t-r)/a+4)*60,saturation:a/(1-Math.abs(2*o-1)),lightness:o}},ip=({hue:e,saturation:t,lightness:r})=>{let n=(1-Math.abs(2*r-1))*t,s=n*(1-Math.abs(e/60%2-1)),[i,o,a]=e<60?[n,s,0]:e<120?[s,n,0]:e<180?[0,n,s]:e<240?[0,s,n]:e<300?[s,0,n]:[n,0,s],u=r-n/2;return[i,o,a].map((l)=>Math.floor((l+u)*255+0.000000001).toString(16).padStart(2,"0")).join("").toUpperCase()},op=(e,{tint:t,shade:r})=>{if(t===void 0&&r===void 0)return e;let n=sp(e),s=t===void 0?n.lightness*r/255:n.lightness*t/255+(1-t/255);return ip(w(w({},n),{},{lightness:s}))},ko=(e)=>e===void 0?void 0:e.toString(16).padStart(2,"0").toUpperCase(),ap=(e)=>typeof e==="string"?{type:"hex",value:zs(e)}:{type:"theme",color:e,change:np(e)},lp=(e,t)=>e.type==="hex"?{color:e.value}:{color:op(t[e.color.theme],e.change),theme:e.color.theme,tint:ko(e.change.tint),shade:ko(e.change.shade)},cp=Zs(),Qs=class extends Vt{constructor(e){super("_attr");m(this,"attributes",void 0),this.attributes=e.map((t)=>("keys"in t)?{keys:t.keys,color:t.color===void 0?void 0:ap(t.color)}:t)}prepForXml(e){var t,r;let n=(t=(r=e.file)===null||r===void 0||(r=r.Theme)===null||r===void 0?void 0:r.Colors)!==null&&t!==void 0?t:cp,s=this.attributes.flatMap((i)=>{if(!("keys"in i))return[[i.key,i.value]];if(i.color===void 0)return[];let{keys:o}=i,a=lp(i.color,n);return[[o.color,a.color],[o.theme,a.theme],[o.tint,a.tint],[o.shade,a.shade]]});return{_attr:Object.fromEntries(s.filter(([,i])=>i!==void 0))}}},up=class extends y{constructor(e,t){super(e);this.root.push(new Qs(t))}},ei=(e,t)=>new up(e,t),xr={color:"w:color",theme:"w:themeColor",tint:"w:themeTint",shade:"w:themeShade"},re=(e,{color:t,size:r,space:n,style:s})=>ei(e,[{key:"w:val",value:s},{keys:xr,color:t},{key:"w:sz",value:r===void 0?void 0:Ka(r)},{key:"w:space",value:n===void 0?void 0:za(n)}]),dn={SINGLE:"single",DASH_DOT_STROKED:"dashDotStroked",DASHED:"dashed",DASH_SMALL_GAP:"dashSmallGap",DOT_DASH:"dotDash",DOT_DOT_DASH:"dotDotDash",DOTTED:"dotted",DOUBLE:"double",DOUBLE_WAVE:"doubleWave",INSET:"inset",NIL:"nil",NONE:"none",OUTSET:"outset",THICK:"thick",THICK_THIN_LARGE_GAP:"thickThinLargeGap",THICK_THIN_MEDIUM_GAP:"thickThinMediumGap",THICK_THIN_SMALL_GAP:"thickThinSmallGap",THIN_THICK_LARGE_GAP:"thinThickLargeGap",THIN_THICK_MEDIUM_GAP:"thinThickMediumGap",THIN_THICK_SMALL_GAP:"thinThickSmallGap",THIN_THICK_THIN_LARGE_GAP:"thinThickThinLargeGap",THIN_THICK_THIN_MEDIUM_GAP:"thinThickThinMediumGap",THIN_THICK_THIN_SMALL_GAP:"thinThickThinSmallGap",THREE_D_EMBOSS:"threeDEmboss",THREE_D_ENGRAVE:"threeDEngrave",TRIPLE:"triple",WAVE:"wave"},Qa=class extends rt{constructor(e){super("w:pBdr");if(e.top)this.root.push(re("w:top",e.top));if(e.left)this.root.push(re("w:left",e.left));if(e.bottom)this.root.push(re("w:bottom",e.bottom));if(e.right)this.root.push(re("w:right",e.right));if(e.between)this.root.push(re("w:between",e.between))}},el=class extends y{constructor(){super("w:pBdr");let e=re("w:bottom",{color:"auto",space:1,style:dn.SINGLE,size:6});this.root.push(e)}},tl=({start:e,end:t,left:r,right:n,hanging:s,firstLine:i,firstLineChars:o})=>new x({name:"w:ind",attributes:{start:{key:"w:start",value:e===void 0?void 0:Fe(e)},end:{key:"w:end",value:t===void 0?void 0:Fe(t)},left:{key:"w:left",value:r===void 0?void 0:Fe(r)},right:{key:"w:right",value:n===void 0?void 0:Fe(n)},hanging:{key:"w:hanging",value:s===void 0?void 0:ne(s)},firstLine:{key:"w:firstLine",value:i===void 0?void 0:ne(i)},firstLineChars:{key:"w:firstLineChars",value:o===void 0?void 0:X(o)}}}),rl=()=>new x({name:"w:br"}),pn={BEGIN:"begin",END:"end",SEPARATE:"separate"},ti=(e,t,r)=>new x({name:"w:fldChar",attributes:{type:{key:"w:fldCharType",value:e},dirty:{key:"w:dirty",value:t},locked:{key:"w:fldLock",value:r}}}),pt=(e,t)=>ti(pn.BEGIN,e,t),nl=new WeakSet,hp=class extends x{constructor(){super({name:"w:fldChar",attributes:{type:{key:"w:fldCharType",value:pn.BEGIN},dirty:{key:"w:dirty",value:!0}}})}prepForXml(e){let t=super.prepForXml(e);return nl.add(t),t}},ri=()=>new hp,dp=(e)=>typeof e==="object"&&e!==null&&nl.has(e),Be=(e)=>ti(pn.SEPARATE,e),Pe=(e)=>ti(pn.END,e),pp={CENTER:"center",INSIDE:"inside",LEFT:"left",OUTSIDE:"outside",RIGHT:"right"},mp={BOTTOM:"bottom",CENTER:"center",INSIDE:"inside",OUTSIDE:"outside",TOP:"top"},fp={DECIMAL:"decimal",UPPER_ROMAN:"upperRoman",LOWER_ROMAN:"lowerRoman",UPPER_LETTER:"upperLetter",LOWER_LETTER:"lowerLetter",ORDINAL:"ordinal",CARDINAL_TEXT:"cardinalText",ORDINAL_TEXT:"ordinalText",HEX:"hex",CHICAGO:"chicago",IDEOGRAPH_DIGITAL:"ideographDigital",JAPANESE_COUNTING:"japaneseCounting",AIUEO:"aiueo",IROHA:"iroha",DECIMAL_FULL_WIDTH:"decimalFullWidth",DECIMAL_HALF_WIDTH:"decimalHalfWidth",JAPANESE_LEGAL:"japaneseLegal",JAPANESE_DIGITAL_TEN_THOUSAND:"japaneseDigitalTenThousand",DECIMAL_ENCLOSED_CIRCLE:"decimalEnclosedCircle",DECIMAL_FULL_WIDTH_2:"decimalFullWidth2",AIUEO_FULL_WIDTH:"aiueoFullWidth",IROHA_FULL_WIDTH:"irohaFullWidth",DECIMAL_ZERO:"decimalZero",BULLET:"bullet",GANADA:"ganada",CHOSUNG:"chosung",DECIMAL_ENCLOSED_FULL_STOP:"decimalEnclosedFullstop",DECIMAL_ENCLOSED_PAREN:"decimalEnclosedParen",DECIMAL_ENCLOSED_CIRCLE_CHINESE:"decimalEnclosedCircleChinese",IDEOGRAPH_ENCLOSED_CIRCLE:"ideographEnclosedCircle",IDEOGRAPH_TRADITIONAL:"ideographTraditional",IDEOGRAPH_ZODIAC:"ideographZodiac",IDEOGRAPH_ZODIAC_TRADITIONAL:"ideographZodiacTraditional",TAIWANESE_COUNTING:"taiwaneseCounting",IDEOGRAPH_LEGAL_TRADITIONAL:"ideographLegalTraditional",TAIWANESE_COUNTING_THOUSAND:"taiwaneseCountingThousand",TAIWANESE_DIGITAL:"taiwaneseDigital",CHINESE_COUNTING:"chineseCounting",CHINESE_LEGAL_SIMPLIFIED:"chineseLegalSimplified",CHINESE_COUNTING_TEN_THOUSAND:"chineseCountingThousand",KOREAN_DIGITAL:"koreanDigital",KOREAN_COUNTING:"koreanCounting",KOREAN_LEGAL:"koreanLegal",KOREAN_DIGITAL_2:"koreanDigital2",VIETNAMESE_COUNTING:"vietnameseCounting",RUSSIAN_LOWER:"russianLower",RUSSIAN_UPPER:"russianUpper",NONE:"none",NUMBER_IN_DASH:"numberInDash",HEBREW_1:"hebrew1",HEBREW_2:"hebrew2",ARABIC_ALPHA:"arabicAlpha",ARABIC_ABJAD:"arabicAbjad",HINDI_VOWELS:"hindiVowels",HINDI_CONSONANTS:"hindiConsonants",HINDI_NUMBERS:"hindiNumbers",HINDI_COUNTING:"hindiCounting",THAI_LETTERS:"thaiLetters",THAI_NUMBERS:"thaiNumbers",THAI_COUNTING:"thaiCounting",BAHT_TEXT:"bahtText",DOLLAR_TEXT:"dollarText",CUSTOM:"custom"},ye={DEFAULT:"default",PRESERVE:"preserve"},be=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{space:"xml:space"})}},vp=class extends y{constructor(){super("w:instrText");this.root.push(new be({space:ye.PRESERVE})),this.root.push("PAGE")}},wp=class extends y{constructor(){super("w:instrText");this.root.push(new be({space:ye.PRESERVE})),this.root.push("NUMPAGES")}},gp=class extends y{constructor(){super("w:instrText");this.root.push(new be({space:ye.PRESERVE})),this.root.push("SECTIONPAGES")}},yp=class extends y{constructor(){super("w:instrText");this.root.push(new be({space:ye.PRESERVE})),this.root.push("SECTION")}},br=({fill:e,color:t,type:r})=>ei("w:shd",[{keys:{color:"w:fill",theme:"w:themeFill",tint:"w:themeFillTint",shade:"w:themeFillShade"},color:e},{keys:xr,color:t},{key:"w:val",value:r!==null&&r!==void 0?r:sl.CLEAR}]),sl={CLEAR:"clear",DIAGONAL_CROSS:"diagCross",DIAGONAL_STRIPE:"diagStripe",HORIZONTAL_CROSS:"horzCross",HORIZONTAL_STRIPE:"horzStripe",NIL:"nil",PERCENT_5:"pct5",PERCENT_10:"pct10",PERCENT_12:"pct12",PERCENT_15:"pct15",PERCENT_20:"pct20",PERCENT_25:"pct25",PERCENT_30:"pct30",PERCENT_35:"pct35",PERCENT_37:"pct37",PERCENT_40:"pct40",PERCENT_45:"pct45",PERCENT_50:"pct50",PERCENT_55:"pct55",PERCENT_60:"pct60",PERCENT_62:"pct62",PERCENT_65:"pct65",PERCENT_70:"pct70",PERCENT_75:"pct75",PERCENT_80:"pct80",PERCENT_85:"pct85",PERCENT_87:"pct87",PERCENT_90:"pct90",PERCENT_95:"pct95",REVERSE_DIAGONAL_STRIPE:"reverseDiagStripe",SOLID:"solid",THIN_DIAGONAL_CROSS:"thinDiagCross",THIN_DIAGONAL_STRIPE:"thinDiagStripe",THIN_HORIZONTAL_CROSS:"thinHorzCross",THIN_REVERSE_DIAGONAL_STRIPE:"thinReverseDiagStripe",THIN_VERTICAL_STRIPE:"thinVertStripe",VERTICAL_STRIPE:"vertStripe"},Te=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date"})}},xp=class extends y{constructor(e){super("w:del");this.root.push(new Te({id:e.id,author:e.author,date:e.date}))}},bp=class extends y{constructor(e){super("w:ins");this.root.push(new Te({id:e.id,author:e.author,date:e.date}))}},Tp={NONE:"none",ROUND:"round",SQUARE:"square",ANGLE:"angle",CURLY:"curly"},il=({twoLinesInOne:e,brackets:t,horizontalInVertical:r,fitToLine:n,group:s})=>new x({name:"w:eastAsianLayout",attributes:{id:{key:"w:id",value:s===void 0?void 0:X(s)},combine:{key:"w:combine",value:e},combineBrackets:{key:"w:combineBrackets",value:t},vert:{key:"w:vert",value:r},vertCompress:{key:"w:vertCompress",value:n}}}),ni={DOT:"dot"},si=(e=ni.DOT)=>new x({name:"w:em",attributes:{val:{key:"w:val",value:e}}}),Ep=()=>si(ni.DOT),Sp="57X6y3wQZNzYjJB2L_10pxbackgroundhimselfUTF-8DEMOGRAPHICSVqvt4KW9",Ip=(e,t=21)=>(r=t)=>{let n="",s=r|0;while(s-- >0)n+=e[Math.random()*e.length|0];return n},Ap=(e=21)=>{let t="",r=e|0;while(r-- >0)t+=Sp[Math.random()*64|0];return t},ol=(e)=>{let t=new Int32Array(Math.ceil((e.length+9)/64)*16);for(let r=0;r>2]|=e[r]<<24-(r&3)*8;return t[e.length>>2]|=128<<24-(e.length&3)*8,t[t.length-2]=Math.floor(e.length/536870912),t[t.length-1]=e.length*8,t},al=(e)=>{let t=new Uint8Array(e.length*4);for(let r=0;r>2]>>>24-(r&3)*8;return t},Fn=(e,t)=>e<>>32-t,Ke=(e,t)=>e>>>t|e<<32-t,Cp=[1732584193,4023233417,2562383102,271733878,3285377520],Np=Int32Array.of(1518500249,1859775393,2400959708,3395469782),kp=new Int32Array(80),Rp=(e)=>{let t=ol(e),r=kp,[n,s,i,o,a]=Cp;for(let u=0;u=40&&p<60?c&h|c&d|h&d:c^h^d,g=Fn(l,5)+v+f+Np[Math.floor(p/20)]+r[p]|0;f=d,d=h,h=Fn(c,30),c=l,l=g}[n,s,i,o,a]=[n+l|0,s+c|0,i+h|0,o+d|0,a+f|0]}return al([n,s,i,o,a])},Pp=Int32Array.of(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),Op=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],_p=new Int32Array(64),Ro=(e)=>{let t=ol(e),r=_p,[n,s,i,o,a,u,l,c]=Op;for(let h=0;h>>3)+r[P-7]+(Ke(E,17)^Ke(E,19)^E>>>10)}let[d,f,p,v,g,A,C,b]=[n,s,i,o,a,u,l,c];for(let P=0;P<64;P++){let _=b+(Ke(g,6)^Ke(g,11)^Ke(g,25))+(g&A^~g&C)+Pp[P]+r[P]|0,E=(Ke(d,2)^Ke(d,13)^Ke(d,22))+(d&f^d&p^f&p)|0;b=C,C=A,A=g,g=v+_|0,v=p,p=f,f=d,d=_+E|0}[n,s,i,o,a,u,l,c]=[n+d|0,s+f|0,i+p|0,o+v|0,a+g|0,u+A|0,l+C|0,c+b|0]}return al([n,s,i,o,a,u,l,c])},Lp=(e)=>Math.floor(e/25.4*72*20),Ne=(e)=>Math.floor(e*72*20),Ot=(e=0)=>{let t=e;return()=>++t},ll=()=>Ot(),cl=()=>Ot(1),ul=()=>Ot(),hl=ul(),dl=()=>Ot(),ii=dl(),Dp=Ot(),pl=()=>-Dp(),vt=()=>Ap().toLowerCase(),oi=(e)=>Array.from(Rp(typeof e==="string"?li(e):ArrayBuffer.isView(e)?e:new Uint8Array(e)),(t)=>t.toString(16).padStart(2,"0")).join(""),Qt=(e)=>Ip("1234567890abcdef",e)(),ai=()=>`${Qt(8)}-${Qt(4)}-${Qt(4)}-${Qt(4)}-${Qt(12)}`,li=(e)=>new Uint8Array(new TextEncoder().encode(e)),ml=({width:e,group:t})=>new x({name:"w:fitText",attributes:{val:{key:"w:val",value:Math.round(dt(ne(e)))},id:{key:"w:id",value:t===void 0?pl():X(t)}}}),Mp=class extends y{constructor(e){super("w:spacing");this.root.push(new we({val:Fe(e)}))}},Fp=class extends y{constructor(e){super("w:color");this.root.push(new Qs([{keys:w(w({},xr),{},{color:"w:val"}),color:e}]))}},Bp=class extends y{constructor(e){super("w:highlight");this.root.push(new we({val:e}))}},$p=(e)=>new x({name:"w:lang",attributes:{value:{key:"w:val",value:e.value},eastAsia:{key:"w:eastAsia",value:e.eastAsia},bidirectional:{key:"w:bidi",value:e.bidirectional}}}),Ur=(e,t)=>{if(typeof e==="string"){let n=e;return new x({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:n},cs:{key:"w:cs",value:n},eastAsia:{key:"w:eastAsia",value:n},hAnsi:{key:"w:hAnsi",value:n},hint:{key:"w:hint",value:t}}})}if("theme"in e){let n=e.theme==="headings"?"major":"minor";return new x({name:"w:rFonts",attributes:{ascii:{key:"w:asciiTheme",value:`${n}HAnsi`},eastAsia:{key:"w:eastAsiaTheme",value:`${n}EastAsia`},hAnsi:{key:"w:hAnsiTheme",value:`${n}HAnsi`},cs:{key:"w:cstheme",value:`${n}Bidi`}}})}let r=e;return new x({name:"w:rFonts",attributes:{ascii:{key:"w:ascii",value:r.ascii},cs:{key:"w:cs",value:r.cs},eastAsia:{key:"w:eastAsia",value:r.eastAsia},hAnsi:{key:"w:hAnsi",value:r.hAnsi},hint:{key:"w:hint",value:r.hint}}})},fl=(e)=>new x({name:"w:vertAlign",attributes:{val:{key:"w:val",value:e}}}),Hp=()=>fl("superscript"),Up=()=>fl("subscript"),ci={SINGLE:"single",WORDS:"words",DOUBLE:"double",THICK:"thick",DOTTED:"dotted",DOTTEDHEAVY:"dottedHeavy",DASH:"dash",DASHEDHEAVY:"dashedHeavy",DASHLONG:"dashLong",DASHLONGHEAVY:"dashLongHeavy",DOTDASH:"dotDash",DASHDOTHEAVY:"dashDotHeavy",DOTDOTDASH:"dotDotDash",DASHDOTDOTHEAVY:"dashDotDotHeavy",WAVE:"wave",WAVYHEAVY:"wavyHeavy",WAVYDOUBLE:"wavyDouble",NONE:"none"},vl=(e=ci.SINGLE,t)=>ei("w:u",[{key:"w:val",value:e},{keys:xr,color:t}]),Wp={BLINK_BACKGROUND:"blinkBackground",LIGHTS:"lights",ANTS_BLACK:"antsBlack",ANTS_RED:"antsRed",SHIMMER:"shimmer",SPARKLE:"sparkle",NONE:"none"},Gp={BLACK:"black",BLUE:"blue",CYAN:"cyan",DARK_BLUE:"darkBlue",DARK_CYAN:"darkCyan",DARK_GRAY:"darkGray",DARK_GREEN:"darkGreen",DARK_MAGENTA:"darkMagenta",DARK_RED:"darkRed",DARK_YELLOW:"darkYellow",GREEN:"green",LIGHT_GRAY:"lightGray",MAGENTA:"magenta",NONE:"none",RED:"red",WHITE:"white",YELLOW:"yellow"},nt=class extends rt{constructor(e){super("w:rPr");if(!e)return;if(e.style)this.push(new Ue("w:rStyle",e.style));if(e.font)if(typeof e.font==="string")this.push(Ur(e.font));else if("name"in e.font)this.push(Ur(e.font.name,e.font.hint));else this.push(Ur(e.font));if(e.bold!==void 0)this.push(new k("w:b",e.bold));if(e.boldComplexScript===void 0&&e.bold!==void 0||e.boldComplexScript){var t;this.push(new k("w:bCs",(t=e.boldComplexScript)!==null&&t!==void 0?t:e.bold))}if(e.italics!==void 0)this.push(new k("w:i",e.italics));if(e.italicsComplexScript===void 0&&e.italics!==void 0||e.italicsComplexScript){var r;this.push(new k("w:iCs",(r=e.italicsComplexScript)!==null&&r!==void 0?r:e.italics))}if(e.smallCaps!==void 0)this.push(new k("w:smallCaps",e.smallCaps));else if(e.allCaps!==void 0)this.push(new k("w:caps",e.allCaps));if(e.strike!==void 0)this.push(new k("w:strike",e.strike));if(e.doubleStrike!==void 0)this.push(new k("w:dstrike",e.doubleStrike));if(e.emboss!==void 0)this.push(new k("w:emboss",e.emboss));if(e.imprint!==void 0)this.push(new k("w:imprint",e.imprint));if(e.noProof!==void 0)this.push(new k("w:noProof",e.noProof));if(e.snapToGrid!==void 0)this.push(new k("w:snapToGrid",e.snapToGrid));if(e.vanish!==void 0)this.push(new k("w:vanish",e.vanish));if(e.color)this.push(new Fp(e.color));if(e.characterSpacing)this.push(new Mp(e.characterSpacing));if(e.scale!==void 0)this.push(new Gt("w:w",e.scale));if(e.kern)this.push(new Hr("w:kern",e.kern));if(e.position)this.push(new Ue("w:position",e.position));if(e.size!==void 0)this.push(new Hr("w:sz",e.size));let n=e.sizeComplexScript===void 0||e.sizeComplexScript===!0?e.size:e.sizeComplexScript;if(n)this.push(new Hr("w:szCs",n));if(e.highlight)this.push(new Bp(e.highlight));if(e.underline)this.push(vl(e.underline.type,e.underline.color));if(e.effect)this.push(new Ue("w:effect",e.effect));if(e.border)this.push(re("w:bdr",e.border));if(e.shading)this.push(br(e.shading));if(e.fitText)this.push(ml(e.fitText));if(e.subScript)this.push(Up());if(e.superScript)this.push(Hp());if(e.rightToLeft!==void 0)this.push(new k("w:rtl",e.rightToLeft));if(e.emphasisMark)this.push(si(e.emphasisMark.type));if(e.language)this.push($p(e.language));if(e.eastAsianLayout)this.push(il(e.eastAsianLayout));if(e.specVanish!==void 0)this.push(new k("w:specVanish",e.specVanish));if(e.math!==void 0)this.push(new k("w:oMath",e.math));if(e.revision)this.push(new gl(e.revision))}push(e){this.root.push(e)}};var wl=class extends nt{constructor(e){super(e);if(e===null||e===void 0?void 0:e.insertion)this.push(new bp(e.insertion));if(e===null||e===void 0?void 0:e.deletion)this.push(new xp(e.deletion))}},gl=class extends y{constructor(e){super("w:rPrChange");this.root.push(new Te({id:e.id,author:e.author,date:e.date})),this.addChildElement(new nt(e))}},hr=class extends y{constructor(e){super("w:t");if(typeof e==="string")this.root.push(new be({space:ye.PRESERVE})),this.root.push(e);else{var t;this.root.push(new be({space:(t=e.space)!==null&&t!==void 0?t:ye.DEFAULT})),this.root.push(e.text)}}},xt={CURRENT:"CURRENT",TOTAL_PAGES:"TOTAL_PAGES",TOTAL_PAGES_IN_SECTION:"TOTAL_PAGES_IN_SECTION",CURRENT_SECTION:"SECTION"},jp=(e)=>{switch(e){case xt.CURRENT:return[pt(),new vp,Be(),Pe()];case xt.TOTAL_PAGES:return[pt(),new wp,Be(),Pe()];case xt.TOTAL_PAGES_IN_SECTION:return[pt(),new gp,Be(),Pe()];case xt.CURRENT_SECTION:return[pt(),new yp,Be(),Pe()];default:return}},se=class e extends y{constructor(t){super("w:r");if(m(this,"properties",void 0),m(this,"following",[]),this.properties=new nt(t),this.root.push(this.properties),t.break)for(let r=0;r0?[new e(w(w({},t),{},{break:void 0,children:s}))]:[]];break}if(typeof n==="string"){let s=jp(n);if(s){let i=t.children.slice(r+1),o=(l)=>new e(w(w({},t),{},{break:void 0,children:l})),a=this.root.length===1;if(a)this.root.push(s[0]);let u=a?s.slice(1):s;this.following=[...u.map((l)=>o([l])),...i.length>0?[o(i)]:[]];break}this.root.push(new hr(n));continue}this.root.push(n)}else if(t.text!==void 0)this.root.push(new hr(t.text))}get writtenAs(){return this.following.length>0?[this,...this.following.flatMap((t)=>{var r;return(r=t.writtenAs)!==null&&r!==void 0?r:t})]:void 0}},Ze=class extends se{constructor(e){super(typeof e==="string"?{text:e}:e)}},Vp=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{char:"w:char",symbolfont:"w:font"})}},Po=class extends y{constructor(e="",t="Wingdings"){super("w:sym");this.root.push(new Vp({char:e,symbolfont:t}))}},yl=class extends se{constructor(e){super(typeof e==="string"?{}:e);this.root.push(typeof e==="string"?new Po(e):new Po(e.char,e.symbolfont))}},Xp=(e)=>{let t=e.indexOf(";base64,"),r=t===-1?0:t+8;return new Uint8Array(atob(e.substring(r)).split("").map((n)=>n.charCodeAt(0)))},mn=(e)=>typeof e==="string"?Xp(e):e,Kp=[["png",[137,80,78,71,13,10,26,10]],["jpg",[255,216,255]],["gif",[71,73,70,56,55,97]],["gif",[71,73,70,56,57,97]],["bmp",[66,77]]],xl=({type:e,data:t},r)=>{if(e!==void 0)return e;let n=mn(t),s=ArrayBuffer.isView(n)?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n),i=Kp.find(([,o])=>o.every((a,u)=>s[u]===a));if(i===void 0)throw Error(`${r}: type isn't given, and data isn't a PNG, JPEG, GIF or BMP file to read it from. Give its type`);return i[0]},bl={CHARACTER:"character",COLUMN:"column",INSIDE_MARGIN:"insideMargin",LEFT_MARGIN:"leftMargin",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",RIGHT_MARGIN:"rightMargin"},Tl={BOTTOM_MARGIN:"bottomMargin",INSIDE_MARGIN:"insideMargin",LINE:"line",MARGIN:"margin",OUTSIDE_MARGIN:"outsideMargin",PAGE:"page",PARAGRAPH:"paragraph",TOP_MARGIN:"topMargin"},El=()=>new x({name:"wp:simplePos",attributes:{x:{key:"x",value:0},y:{key:"y",value:0}}}),Sl=(e)=>new x({name:"wp:align",children:[e]}),Il=(e)=>new x({name:"wp:posOffset",children:[e.toString()]}),Al=({relative:e,align:t,offset:r})=>new x({name:"wp:positionH",attributes:{relativeFrom:{key:"relativeFrom",value:e!==null&&e!==void 0?e:bl.PAGE}},children:[(()=>{if(t)return Sl(t);else if(r!==void 0)return Il(r);else throw Error("There is no configuration provided for floating position (Align or offset)")})()]}),Cl=({relative:e,align:t,offset:r})=>new x({name:"wp:positionV",attributes:{relativeFrom:{key:"relativeFrom",value:e!==null&&e!==void 0?e:Tl.PAGE}},children:[(()=>{if(t)return Sl(t);else if(r!==void 0)return Il(r);else throw Error("There is no configuration provided for floating position (Align or offset)")})()]}),zp=function(e){return e.CENTER="ctr",e.TOP="t",e.BOTTOM="b",e}({}),Nl=(e={})=>{var t,r,n,s;return new x({name:"wps:bodyPr",attributes:{lIns:{key:"lIns",value:(t=e.margins)===null||t===void 0?void 0:t.left},rIns:{key:"rIns",value:(r=e.margins)===null||r===void 0?void 0:r.right},tIns:{key:"tIns",value:(n=e.margins)===null||n===void 0?void 0:n.top},bIns:{key:"bIns",value:(s=e.margins)===null||s===void 0?void 0:s.bottom},anchor:{key:"anchor",value:e.verticalAnchor}},children:[...e.noAutoFit?[new k("a:noAutofit",e.noAutoFit)]:[]]})},Yp=(e={txBox:"1"})=>new x({name:"wps:cNvSpPr",attributes:{txBox:{key:"txBox",value:e.txBox}}}),qp=(e)=>new x({name:"w:txbxContent",children:[...e]}),Jp=(e)=>new x({name:"wps:txbx",children:[qp(e)]}),Zp=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{cx:"cx",cy:"cy"})}},kl=class extends y{constructor(e,t){super("a:ext");m(this,"attributes",void 0),this.attributes=new Zp({cx:e,cy:t}),this.root.push(this.attributes)}},Qp=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{x:"x",y:"y"})}},Rl=class extends y{constructor(e,t){super("a:off");this.root.push(new Qp({x:e!==null&&e!==void 0?e:0,y:t!==null&&t!==void 0?t:0}))}},em=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{flipVertical:"flipV",flipHorizontal:"flipH",rotation:"rot"})}},tm=class extends y{constructor(e){var t,r,n,s;super("a:xfrm");m(this,"extents",void 0),m(this,"offset",void 0),this.root.push(new em({flipVertical:(t=e.flip)===null||t===void 0?void 0:t.vertical,flipHorizontal:(r=e.flip)===null||r===void 0?void 0:r.horizontal,rotation:e.rotation})),this.offset=new Rl((n=e.offset)===null||n===void 0||(n=n.emus)===null||n===void 0?void 0:n.x,(s=e.offset)===null||s===void 0||(s=s.emus)===null||s===void 0?void 0:s.y),this.extents=new kl(e.emus.x,e.emus.y),this.root.push(this.offset),this.root.push(this.extents)}},Pl=()=>new x({name:"a:noFill"}),rm=(e)=>new x({name:"a:srgbClr",attributes:{value:{key:"val",value:e.value}}}),nm={BG1:"bg1",TX1:"tx1",BG2:"bg2",TX2:"tx2",ACCENT1:"accent1",ACCENT2:"accent2",ACCENT3:"accent3",ACCENT4:"accent4",ACCENT5:"accent5",ACCENT6:"accent6",HLINK:"hlink",FOLHLINK:"folHlink",DK1:"dk1",LT1:"lt1",DK2:"dk2",LT2:"lt2",PHCLR:"phClr"},sm=(e)=>new x({name:"a:schemeClr",attributes:{value:{key:"val",value:e.value}}}),ms=(e)=>new x({name:"a:solidFill",children:[e.type==="rgb"?rm(e):sm(e)]}),im={ROUND:"rnd",SQUARE:"sq",FLAT:"flat"},om={SINGLE:"sng",DOUBLE:"dbl",THICK_THIN:"thickThin",THIN_THICK:"thinThick",TRI:"tri"},am={CENTER:"ctr",INSET:"in"},lm=(e)=>new x({name:"a:ln",attributes:{width:{key:"w",value:e.width},cap:{key:"cap",value:e.cap===void 0?void 0:im[e.cap]},compoundLine:{key:"cmpd",value:e.compoundLine===void 0?void 0:om[e.compoundLine]},align:{key:"algn",value:e.align===void 0?void 0:am[e.align]}},children:[e.type==="noFill"?Pl():e.solidFillType==="rgb"?ms({type:"rgb",value:e.value}):ms({type:"scheme",value:e.value})]}),cm=class extends y{constructor(){super("a:avLst")}},um=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{prst:"prst"})}},hm=class extends y{constructor(){super("a:prstGeom");this.root.push(new um({prst:"rect"})),this.root.push(new cm)}},dm=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{bwMode:"bwMode"})}},Ol=class extends y{constructor({element:e,outline:t,solidFill:r,transform:n}){super(`${e}:spPr`);if(m(this,"form",void 0),this.root.push(new dm({bwMode:"auto"})),this.form=new tm(n),this.root.push(this.form),this.root.push(new hm),r)this.root.push(ms(r));else if(t)this.root.push(Pl());if(t)this.root.push(lm(t))}},Oo=(e)=>new x({name:"wps:wsp",children:[Yp(e.nonVisualProperties),new Ol({element:"wps",transform:e.transformation,outline:e.outline,solidFill:e.solidFill}),Jp(e.children),Nl(e.bodyProperties)]}),Pr=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{uri:"uri"})}},pm=(e)=>new x({name:"asvg:svgBlip",attributes:{asvg:{key:"xmlns:asvg",value:"http://schemas.microsoft.com/office/drawing/2016/SVG/main"},embed:{key:"r:embed",value:`rId{${e.fileName}}`}}}),mm=(e)=>new x({name:"a:ext",attributes:{uri:{key:"uri",value:"{96DAC541-7B7A-43D3-8B79-37D633B846F1}"}},children:[pm(e)]}),fm=(e)=>new x({name:"a:extLst",children:[mm(e)]}),vm=(e)=>new x({name:"a:blip",attributes:{embed:{key:"r:embed",value:`rId{${e.type==="svg"?e.fallback.fileName:e.fileName}}`},cstate:{key:"cstate",value:"none"}},children:e.type==="svg"?[fm(e)]:[]}),wm=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{left:"l",top:"t",right:"r",bottom:"b"})}},Or=(e,t)=>{if(e===void 0)return;if(!(e>=0&&e<=100))throw Error(`Invalid crop ${t} ${e}. Expected a number from 0 to 100`);return Math.round(e*1000)},gm=class extends y{constructor(e){super("a:srcRect");if(e)this.root.push(new wm({left:Or(e.left,"left"),top:Or(e.top,"top"),right:Or(e.right,"right"),bottom:Or(e.bottom,"bottom")}))}},ym=class extends y{constructor(){super("a:fillRect")}},xm=class extends y{constructor(){super("a:stretch");this.root.push(new ym)}},bm=class extends y{constructor(e,t){super("pic:blipFill");this.root.push(vm(e)),this.root.push(new gm(t)),this.root.push(new xm)}},Tm=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{noChangeAspect:"noChangeAspect",noChangeArrowheads:"noChangeArrowheads"})}},Em=class extends y{constructor(){super("a:picLocks");this.root.push(new Tm({noChangeAspect:1,noChangeArrowheads:1}))}},Sm=class extends y{constructor(){super("pic:cNvPicPr");this.root.push(new Em)}},Im=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"id",name:"name",descr:"descr"})}},Am=class extends y{constructor(){super("pic:cNvPr");this.root.push(new Im({id:0,name:"",descr:""}))}prepForXml(e){for(let r=e.stack.length-1;r>=0;r--){let n=e.stack[r];if(!(n instanceof Yt))continue;this.root.push(n.createDrawingClick(e,!1));break}let t=super.prepForXml(e);return this.root.splice(1),t}},Cm=class extends y{constructor(){super("pic:nvPicPr");this.root.push(new Am),this.root.push(new Sm)}},Nm=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{xmlns:"xmlns:pic"})}},_o=class extends y{constructor({mediaData:e,transform:t,outline:r,solidFill:n,crop:s}){super("pic:pic");this.root.push(new Nm({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/picture"})),this.root.push(new Cm),this.root.push(new bm(e,s)),this.root.push(new Ol({element:"pic",transform:t,outline:r,solidFill:n}))}},km=(e)=>{var t,r,n,s;return new x({name:"a:xfrm",attributes:{flipVertical:{key:"flipV",value:(t=e.flip)===null||t===void 0?void 0:t.vertical},flipHorizontal:{key:"flipH",value:(r=e.flip)===null||r===void 0?void 0:r.horizontal},rotation:{key:"rot",value:e.rotation}},children:[new Rl((n=e.offset)===null||n===void 0||(n=n.emus)===null||n===void 0?void 0:n.x,(s=e.offset)===null||s===void 0||(s=s.emus)===null||s===void 0?void 0:s.y),new kl(e.emus.x,e.emus.y),new x({name:"a:chOff",attributes:{x:{key:"x",value:0},y:{key:"y",value:0}}}),new x({name:"a:chExt",attributes:{x:{key:"cx",value:e.emus.x},y:{key:"cy",value:e.emus.y}}})]})},Rm=()=>new x({name:"wpg:cNvGrpSpPr"}),Pm=(e)=>new x({name:"wpg:wgp",children:[Rm(),new x({name:"wpg:grpSpPr",children:[km(e.transformation)]}),...e.children]}),Om=class extends y{constructor({mediaData:e,transform:t,outline:r,solidFill:n,crop:s}){super("a:graphicData");if(e.type==="graphic")this.root.push(new Pr({uri:e.uri})),this.root.push(e.content);else if(e.type==="wps"){this.root.push(new Pr({uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}));let i=Oo(w(w({},e.data),{},{transformation:t,outline:r,solidFill:n}));this.root.push(i)}else if(e.type==="wpg"){this.root.push(new Pr({uri:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup"}));let i=Pm({children:e.children.map((o)=>{if(o.type==="wps")return Oo(w(w({},o.data),{},{transformation:o.transformation,outline:o.outline,solidFill:o.solidFill}));else return new _o({mediaData:o,transform:o.transformation,outline:o.outline,solidFill:o.solidFill})}),transformation:t});this.root.push(i)}else{this.root.push(new Pr({uri:"http://schemas.openxmlformats.org/drawingml/2006/picture"}));let i=new _o({mediaData:e,transform:t,outline:r,solidFill:n,crop:s});this.root.push(i)}}},_m=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{a:"xmlns:a"})}},_l=class extends y{constructor({mediaData:e,transform:t,outline:r,solidFill:n,crop:s}){super("a:graphic");m(this,"data",void 0),this.root.push(new _m({a:"http://schemas.openxmlformats.org/drawingml/2006/main"})),this.data=new Om({mediaData:e,transform:t,outline:r,solidFill:n,crop:s}),this.root.push(this.data)}},Ut={NONE:0,SQUARE:1,TIGHT:2,TOP_AND_BOTTOM:3,THROUGH:4},ui={BOTH_SIDES:"bothSides",LEFT:"left",RIGHT:"right",LARGEST:"largest"},fs=()=>new x({name:"wp:wrapNone"}),Ll=(e,t={top:0,bottom:0,left:0,right:0})=>new x({name:"wp:wrapSquare",attributes:{wrapText:{key:"wrapText",value:e.side||ui.BOTH_SIDES},distT:{key:"distT",value:t.top},distB:{key:"distB",value:t.bottom},distL:{key:"distL",value:t.left},distR:{key:"distR",value:t.right}}}),_r=21600,er=(e,{x:t,y:r})=>new x({name:e,attributes:{x:{key:"x",value:t},y:{key:"y",value:r}}}),Lm=()=>new x({name:"wp:wrapPolygon",attributes:{edited:{key:"edited",value:!1}},children:[er("wp:start",{x:0,y:0}),er("wp:lineTo",{x:0,y:_r}),er("wp:lineTo",{x:_r,y:_r}),er("wp:lineTo",{x:_r,y:0}),er("wp:lineTo",{x:0,y:0})]}),Dl=(e,t={},r)=>{var n;return new x({name:e,attributes:{wrapText:{key:"wrapText",value:(n=r===null||r===void 0?void 0:r.side)!==null&&n!==void 0?n:ui.BOTH_SIDES},distL:{key:"distL",value:t.left},distR:{key:"distR",value:t.right}},children:[Lm()]})},Ml=(e,t)=>Dl("wp:wrapTight",e,t),Fl=(e,t)=>Dl("wp:wrapThrough",e,t),Bl=(e={top:0,bottom:0})=>new x({name:"wp:wrapTopAndBottom",attributes:{distT:{key:"distT",value:e.top},distB:{key:"distB",value:e.bottom}}}),hi={EXTERNAL:"External"},Dm=(e,t,r,n)=>new x({name:"Relationship",attributes:{id:{key:"Id",value:e},type:{key:"Type",value:t},target:{key:"Target",value:r},targetMode:{key:"TargetMode",value:n}}}),$l=(e,t)=>new x({name:"a:hlinkClick",attributes:w(w({},t?{xmlns:{key:"xmlns:a",value:"http://schemas.openxmlformats.org/drawingml/2006/main"}}:{}),{},{id:{key:"r:id",value:`rId${e}`}})}),Mm="{C183D7F6-B498-43B3-948B-1728B52AA6E4}",Hl=(e)=>new x({name:"a:extLst",attributes:{namespace:{key:"xmlns:a",value:e?"http://schemas.openxmlformats.org/drawingml/2006/main":void 0}},children:[new x({name:"a:ext",attributes:{uri:{key:"uri",value:Mm}},children:[new x({name:"adec:decorative",attributes:{namespace:{key:"xmlns:adec",value:"http://schemas.microsoft.com/office/drawing/2017/decorative"},value:{key:"val",value:1}}})]})]}),di=class{constructor(e){m(this,"link",void 0),m(this,"linkId",vt()),m(this,"addedTo",new WeakSet),this.link=e}createClick(e){return $l(this.linkId,e)}addRelationship(e){let t=e.viewWrapper.Relationships;if(this.addedTo.has(t))return;this.addedTo.add(t),t.addRelationship(this.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",this.link,hi.EXTERNAL)}},Fm=class extends y{constructor(e,{id:t,name:r,description:n,title:s,link:i,decorative:o}){super(e);if(m(this,"link",void 0),this.link=i===void 0?void 0:new di(i),this.root.push(new vr({id:{key:"id",value:t},name:{key:"name",value:r},description:{key:"descr",value:n},title:{key:"title",value:s}})),this.link)this.root.push(this.link.createClick(!1));if(o)this.root.push(Hl(!1))}prepForXml(e){var t;return(t=this.link)===null||t===void 0||t.addRelationship(e),super.prepForXml(e)}},Ul=class extends y{constructor({name:e="",description:t,title:r,id:n}={},{link:s,decorative:i}={}){super("wp:docPr");m(this,"link",void 0),m(this,"decorative",void 0);let o={id:{key:"id",value:n!==null&&n!==void 0?n:hl()},name:{key:"name",value:e}};if(t)o.description={key:"descr",value:t};if(r)o.title={key:"title",value:r};this.root.push(new vr(o)),this.link=s===void 0?void 0:new di(s),this.decorative=i}prepForXml(e){if(this.link)this.link.addRelationship(e),this.root.push(this.link.createClick(!0));else for(let r=e.stack.length-1;r>=0;r--){let n=e.stack[r];if(!(n instanceof Yt))continue;this.root.push(n.createDrawingClick(e,!0));break}if(this.decorative)this.root.push(Hl(!0));let t=super.prepForXml(e);return this.root.splice(1),t}},Wl=({top:e,right:t,bottom:r,left:n})=>new x({name:"wp:effectExtent",attributes:{top:{key:"t",value:e},right:{key:"r",value:t},bottom:{key:"b",value:r},left:{key:"l",value:n}}}),Bn=2147483647,Lo=9525,Do=(e,t)=>{if(t!==void 0&&t>Bn)throw Error(`Invalid drawing ${e} ${t} EMUs (${Math.round(t/Lo)} pixels). Word won't open a drawing with a ${e} over ${Bn} EMUs (${Math.floor(Bn/Lo)} pixels). Sizes such as an ImageRun's transformation are in pixels, not EMUs`);return t},Gl=({x:e,y:t})=>new x({name:"wp:extent",attributes:{x:{key:"cx",value:Do("width",e)},y:{key:"cy",value:Do("height",t)}}}),Bm=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{xmlns:"xmlns:a",noChangeAspect:"noChangeAspect"})}},$m=class extends y{constructor(){super("a:graphicFrameLocks");this.root.push(new Bm({xmlns:"http://schemas.openxmlformats.org/drawingml/2006/main",noChangeAspect:1}))}},jl=(e=!0)=>new x({name:"wp:cNvGraphicFramePr",children:e?[new $m]:[]}),Hm=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{distT:"distT",distB:"distB",distL:"distL",distR:"distR",allowOverlap:"allowOverlap",behindDoc:"behindDoc",layoutInCell:"layoutInCell",locked:"locked",relativeHeight:"relativeHeight",simplePos:"simplePos"})}},Um=class extends y{constructor({mediaData:e,transform:t,drawingOptions:r}){var n;super("wp:anchor");let s=w({allowOverlap:!0,behindDocument:!1,lockAnchor:!1,layoutInCell:!0,verticalPosition:{},horizontalPosition:{}},r.floating);if(this.root.push(new Hm({distT:s.margins?s.margins.top||0:0,distB:s.margins?s.margins.bottom||0:0,distL:s.margins?s.margins.left||0:0,distR:s.margins?s.margins.right||0:0,simplePos:"0",allowOverlap:s.allowOverlap===!0?"1":"0",behindDoc:s.behindDocument===!0?"1":"0",locked:s.lockAnchor===!0?"1":"0",layoutInCell:s.layoutInCell===!0?"1":"0",relativeHeight:s.zIndex?s.zIndex:t.emus.y})),this.root.push(El()),this.root.push(Al(s.horizontalPosition)),this.root.push(Cl(s.verticalPosition)),this.root.push(Gl({x:t.emus.x,y:t.emus.y})),this.root.push(Wl((n=r.effectExtent)!==null&&n!==void 0?n:{top:0,right:0,bottom:0,left:0})),r.floating!==void 0&&r.floating.wrap!==void 0)switch(r.floating.wrap.type){case Ut.SQUARE:this.root.push(Ll(r.floating.wrap,r.floating.margins));break;case Ut.TIGHT:this.root.push(Ml(r.floating.margins,r.floating.wrap));break;case Ut.THROUGH:this.root.push(Fl(r.floating.margins,r.floating.wrap));break;case Ut.TOP_AND_BOTTOM:this.root.push(Bl(r.floating.margins));break;case Ut.NONE:default:this.root.push(fs())}else this.root.push(fs());this.root.push(new Ul(r.docProperties,{link:r.link,decorative:r.decorative})),this.root.push(jl(e.type!=="graphic"||e.lockAspectRatio!==!1)),this.root.push(new _l({mediaData:e,transform:t,outline:r.outline,solidFill:r.solidFill,crop:r.crop}))}},Wm=({mediaData:e,transform:t,docProperties:r,outline:n,solidFill:s,crop:i,effectExtent:o,link:a,decorative:u})=>{var l,c,h,d;return new x({name:"wp:inline",attributes:{distanceTop:{key:"distT",value:0},distanceBottom:{key:"distB",value:0},distanceLeft:{key:"distL",value:0},distanceRight:{key:"distR",value:0}},children:[Gl({x:t.emus.x,y:t.emus.y}),Wl(o!==null&&o!==void 0?o:n?{top:((l=n.width)!==null&&l!==void 0?l:9525)*2,right:((c=n.width)!==null&&c!==void 0?c:9525)*2,bottom:((h=n.width)!==null&&h!==void 0?h:9525)*2,left:((d=n.width)!==null&&d!==void 0?d:9525)*2}:{top:0,right:0,bottom:0,left:0}),new Ul(r,{link:a,decorative:u}),jl(e.type!=="graphic"||e.lockAspectRatio!==!1),new _l({mediaData:e,transform:t,outline:n,solidFill:s,crop:i})]})},fn=class extends y{constructor(e,t={}){super("w:drawing");if(!t.floating)this.root.push(Wm({mediaData:e,transform:e.transformation,docProperties:t.docProperties,outline:t.outline,solidFill:t.solidFill,crop:t.crop,effectExtent:t.effectExtent,link:t.link,decorative:t.decorative}));else this.root.push(new Um({mediaData:e,transform:e.transformation,drawingOptions:t}))}},Vl=(e,t)=>({data:mn(e.data),fileName:t,transformation:{pixels:{x:Math.round(e.transformation.width),y:Math.round(e.transformation.height)},emus:{x:Math.round(e.transformation.width*9525),y:Math.round(e.transformation.height*9525)},flip:e.transformation.flip,rotation:e.transformation.rotation?e.transformation.rotation*60000:void 0}}),Mo=(e,t,r)=>{let n=xl(e,r);return w({type:n},Vl(w(w({},e),{},{transformation:t}),`${oi(e.data)}.${n}`))},Gm=({id:e,author:t,date:r},n)=>new x({name:"w:del",attributes:{id:{key:"w:id",value:e},author:{key:"w:author",value:t},date:{key:"w:date",value:r}},children:[n]}),jm=class extends y{constructor(e){var t;let r=e.type==="svg"?w(w({type:e.type},Vl(e,`${oi(e.data)}.svg`)),{},{fallback:Mo(e.fallback,e.transformation,"ImageRun fallback")}):Mo(e,e.transformation,"ImageRun"),n=new fn(r,{floating:e.floating,docProperties:e.altText,outline:e.outline,solidFill:e.solidFill,crop:e.crop,link:e.link,decorative:e.decorative}),s=new nt(e.run),i=(t=e.insertion)!==null&&t!==void 0?t:e.deletion,o=e.insertion?"w:ins":e.deletion?"w:del":"w:r";super(o);if(m(this,"imageData",void 0),i){this.root.push(new Te({id:i.id,author:i.author,date:i.date}));let a=new x({name:"w:r",children:[s,n]});this.addChildElement(e.insertion&&e.deletion?Gm(e.deletion,a):a)}else this.root.push(s),this.root.push(n);this.imageData=r}prepForXml(e){if(e.file.Media.addImage(this.imageData.fileName,this.imageData),this.imageData.type==="svg")e.file.Media.addImage(this.imageData.fallback.fileName,this.imageData.fallback);return super.prepForXml(e)}},pi=(e)=>{var t,r,n,s,i,o,a,u;return{offset:{pixels:{x:Math.round((t=(r=e.offset)===null||r===void 0?void 0:r.left)!==null&&t!==void 0?t:0),y:Math.round((n=(s=e.offset)===null||s===void 0?void 0:s.top)!==null&&n!==void 0?n:0)},emus:{x:Math.round(((i=(o=e.offset)===null||o===void 0?void 0:o.left)!==null&&i!==void 0?i:0)*9525),y:Math.round(((a=(u=e.offset)===null||u===void 0?void 0:u.top)!==null&&a!==void 0?a:0)*9525)}},pixels:{x:Math.round(e.width),y:Math.round(e.height)},emus:{x:Math.round(e.width*9525),y:Math.round(e.height*9525)},flip:e.flip,rotation:e.rotation?e.rotation*60000:void 0}},Vm=class extends se{constructor(e){super({});m(this,"wpsShapeData",void 0),this.wpsShapeData={type:e.type,transformation:pi(e.transformation),data:w({},e)};let t=new fn(this.wpsShapeData,{floating:e.floating,docProperties:e.altText,outline:e.outline,solidFill:e.solidFill});this.root.push(t)}},Xm=class extends se{constructor(e){super({});m(this,"wpgGroupData",void 0),m(this,"mediaDatas",void 0),this.wpgGroupData={type:e.type,transformation:pi(e.transformation),children:e.children};let t=new fn(this.wpgGroupData,{floating:e.floating,docProperties:e.altText});this.mediaDatas=e.children.filter((r)=>r.type!=="wps").map((r)=>r),this.root.push(t)}prepForXml(e){return this.mediaDatas.forEach((t)=>{if(e.file.Media.addImage(t.fileName,t),t.type==="svg")e.file.Media.addImage(t.fallback.fileName,t.fallback)}),super.prepForXml(e)}},Km=class extends y{constructor(e){super("w:instrText");this.root.push(new be({space:ye.PRESERVE})),this.root.push(`SEQ ${e}`)}},zm=class extends se{constructor(e){super({});this.root.push(ri()),this.root.push(new Km(e)),this.root.push(Be()),this.root.push(Pe())}},Ym=/^\s*(?:XE|TC|TA|RD|PRIVATE)\b/i,qm=class extends y{constructor(e){super("w:instrText");this.root.push(new be({space:ye.PRESERVE})),this.root.push(e)}},Jm=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{instr:"w:instr",fldLock:"w:fldLock"})}},mi=class extends y{constructor(e,t,r={}){let n=Ym.test(e);super(n?"w:r":"w:fldSimple");if(n){this.root.push(pt(void 0,r.locked?!0:void 0)),this.root.push(new qm(e)),this.root.push(Pe());return}if(this.root.push(new Jm({instr:e,fldLock:r.locked?!0:void 0})),t!==void 0)this.root.push(new Ze(t))}},Zm=class extends mi{constructor(e){super(` MERGEFIELD ${e} `,`«${e}»`)}},Qm=32767,ef=780,tf=[[1000,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],rf=(e)=>e<=Qm?tf.reduce(({rest:t,text:r},[n,s])=>({rest:t%n,text:r+s.repeat(Math.floor(t/n))}),{rest:e,text:""}).text:void 0,nf=(e)=>e===0?"":e<=ef?String.fromCharCode(65+(e-1)%26).repeat(Math.ceil(e/26)):void 0,sf=(e)=>{var t;return`${e}${e%100>=11&&e%100<=13?"th":(t=["th","st","nd","rd"][e%10])!==null&&t!==void 0?t:"th"}`},fi=(e)=>{let t=e.charAt(0)!==e.charAt(0).toUpperCase(),r=(n)=>(s)=>{var i;return t?(i=n(s))===null||i===void 0?void 0:i.toLowerCase():n(s)};switch(e.toLowerCase()){case"arabic":return String;case"roman":return r(rf);case"alphabetic":return r(nf);case"ordinal":return(n)=>n>0?sf(n):void 0;case"arabicdash":return(n)=>`- ${n} -`;default:return}},Xl=new Set(["mergeformat","charformat","mergeformatinet"]),Kl=new Set(["upper","lower","firstcap","caps"]),of=(e)=>/^[#0,]*[#0][#0,]*$/.test(e),af=(e,t)=>{let r=[...t].filter((i)=>i==="0").length,n=r+[...t].filter((i)=>i==="#").length,s=String(e).padStart(r,"0");if(s.length{switch(t){case"upper":return e.toUpperCase();case"lower":return e.toLowerCase();case"firstcap":return e.charAt(0).toUpperCase()+e.slice(1);default:return e}},cf=(e)=>{var t;let r=new RegExp("^\\s*(PAGEREF|NUMPAGES|SECTIONPAGES)\\b(.*)$","is").exec(e),n=(r===null||r===void 0?void 0:r[1].toUpperCase())==="PAGEREF"?new RegExp('^\\s*("?)([^\\s"\\\\]+)\\1(.*)$',"s").exec(r[2]):void 0;if(!r||r[1].toUpperCase()==="PAGEREF"&&!n)return;let s=(t=(n?n[3]:r[2]).match(/"[^"]*"|\S+/g))!==null&&t!==void 0?t:[],i,o,a=[],u=!1,l=!0;for(let f=0;f{var g;return(p.length>2?p.slice(2):(g=s[++f])!==null&&g!==void 0?g:"").replace(/^"(.*)"$/,"$1")};if(/^\\p$/i.test(p))u=!0;else if(p.startsWith("\\#")){var c;let g=v();l&&(l=o===void 0&&of(g)),(c=o)!==null&&c!==void 0||(o=g)}else if(p.startsWith("\\*")){let g=v(),A=g.toLowerCase();if(Kl.has(A))a.push(A);else if(g!==""&&!Xl.has(A)){var h;l&&(l=i===void 0&&fi(g)!==void 0),(h=i)!==null&&h!==void 0||(i=g)}}}let d=w(w(w(w({},i===void 0?{}:{numberFormat:i}),o===void 0?{}:{picture:o}),a.length===0?{}:{capitals:a[0]}),{},{written:l&&a.length<=1&&a[0]!=="caps"&&(i===void 0||o===void 0)});return n?w({type:"pageReference",bookmark:n[2],relative:u},d):w({type:"pageCount",scope:r[1].toUpperCase()==="NUMPAGES"?"document":"section"},d)},uf=(e)=>new RegExp("^\\s*TOC\\b.*\\\\s\\b","is").test(e),zl=(e,{enclosing:t,within:r,inTextBox:n},{estimate:s,sectionPageCount:i,blank:o,relativeTo:a})=>{let u=cf(e);if(u===void 0)return;let{bookmarks:l,pageCount:c,bookmarkPageNumbers:h}=s,{numberFormat:d,picture:f,capitals:p,written:v}=u,g=d!==void 0||f!==void 0,A=(P)=>P===void 0?void 0:f===void 0?fi(d!==null&&d!==void 0?d:"arabic")(P):af(P,f),C=u.type==="pageReference"&&u.relative&&r==="counted"&&!n?a===null||a===void 0?void 0:a(u.bookmark):void 0,b;if(!v)b=void 0;else if(u.type==="pageCount")b=A(u.scope==="document"?c:i);else if(t.some(uf))b=void 0;else if(g)b=A(h===null||h===void 0?void 0:h.get(u.bookmark));else b=u.relative?C:l.get(u.bookmark);return b===void 0?o?"":void 0:lf(b,p)},hf=(e,t)=>e==="mc:Fallback"||t==="fallback"?"fallback":e==="w:del"||e==="w:moveFrom"?"deleted":t,dr=(e,t,r,n,s="counted",i=!1)=>{for(let l=0;lp.instruction),inTextBox:i}),d.result!==void 0)t.splice(l+1,0,e.textElement(d.result)),l++}else if(f==="end")r.pop()}else if(h==="w:instrText"&&d&&!d.inResult)d.instruction+=e.textOf(c);else if((h==="w:t"||h==="w:tab"||h==="w:br"||h==="w:cr")&&(d===null||d===void 0?void 0:d.result)!==void 0)t.splice(l,1),l--;else if(h==="w:fldSimple"){let f=n.resultOf(String(e.attributeOf(c,"w:instr")),{within:s,enclosing:r.map((p)=>p.instruction),inTextBox:i});if(f===void 0){var o;dr(e,(o=e.contentOf(c))!==null&&o!==void 0?o:[],[],n,s,i)}else e.setSimpleFieldResult(c,f)}else{var a;if(h==="w:p"){var u;(u=n.beforeParagraph)===null||u===void 0||u.call(n,c)}if(dr(e,(a=e.contentOf(c))!==null&&a!==void 0?a:[],r,n,hf(h,s),i||h==="w:txbxContent"),h==="w:p")n.afterParagraph(c)}}},Yl=(e,t)=>t.flatMap((r)=>{var n;let s=e.nameOf(r);if(s===void 0)return[];return s==="w:sectPr"?[r]:Yl(e,(n=e.contentOf(r))!==null&&n!==void 0?n:[])}),df=(e,t)=>{var r;return((r=e.contentOf(t))!==null&&r!==void 0?r:[]).some((n)=>{var s;return e.nameOf(n)==="w:pPr"&&((s=e.contentOf(n))!==null&&s!==void 0?s:[]).some((i)=>e.nameOf(i)==="w:sectPr")})},pf=(e,t,r)=>{let n=Yl(e,[t]).reduce((s,i)=>{var o,a;let u=((o=e.contentOf(i))!==null&&o!==void 0?o:[]).flatMap((l)=>{let c=e.nameOf(l);return c==="w:headerReference"||c==="w:footerReference"?[[`${c} ${String(e.attributeOf(l,"w:type"))}`,String(e.attributeOf(l,"r:id"))]]:[]});return[...s,new Map([...(a=s[s.length-1])!==null&&a!==void 0?a:[],...u])]},[]).reduce((s,i,o)=>{for(let u of i.values()){var a;s.set(u,[...(a=s.get(u))!==null&&a!==void 0?a:[],r[o]])}return s},new Map);return new Map([...n].flatMap(([s,[i,...o]])=>i!==void 0&&o.every((a)=>a===i)?[[s,i]]:[]))},ql=(e,t,r,{blank:n})=>{let{sectionPageCounts:s=[],relativePositions:i}=r,o=0,a=new Map,u=(l)=>{var c,h;let d=(c=a.get(l))!==null&&c!==void 0?c:0;return a.set(l,d+1),i===null||i===void 0||(h=i.get(l))===null||h===void 0?void 0:h[d]};return dr(e,[t],[],{resultOf:(l,c)=>zl(l,c,{estimate:r,sectionPageCount:s[o],blank:n,relativeTo:u}),afterParagraph:(l)=>{o+=df(e,l)?1:0}}),pf(e,t,s)},Jl=(e,t,r,{blank:n,sectionPageCount:s,notes:i=!1})=>{let o=(a)=>{let u=r.bookmarks.get(a);return u===void 0?void 0:`on page ${u}`};dr(e,[t],[],{resultOf:(a,u)=>zl(a,u,w({estimate:r,sectionPageCount:s,blank:n},i?{relativeTo:o}:{})),afterParagraph:()=>{return}})},mf=(e,t,{beforeParagraph:r,resultOf:n})=>dr(e,[t],[],{resultOf:(s,{within:i})=>n(s,i),beforeParagraph:r,afterParagraph:()=>{return}}),Zl=class extends y{constructor(e={}){super("w:instrText");m(this,"properties",void 0),this.properties=e,this.root.push(new be({space:ye.PRESERVE}));let t="TOC";if(this.properties.captionLabel)t=`${t} \\a "${this.properties.captionLabel}"`;if(this.properties.entriesFromBookmark)t=`${t} \\b "${this.properties.entriesFromBookmark}"`;if(this.properties.captionLabelIncludingNumbers)t=`${t} \\c "${this.properties.captionLabelIncludingNumbers}"`;if(this.properties.sequenceAndPageNumbersSeparator)t=`${t} \\d "${this.properties.sequenceAndPageNumbersSeparator}"`;if(this.properties.tcFieldIdentifier)t=`${t} \\f "${this.properties.tcFieldIdentifier}"`;if(this.properties.hyperlink)t=`${t} \\h`;if(this.properties.tcFieldLevelRange)t=`${t} \\l "${this.properties.tcFieldLevelRange}"`;if(this.properties.pageNumbersEntryLevelsRange)t=`${t} \\n "${this.properties.pageNumbersEntryLevelsRange}"`;if(this.properties.headingStyleRange)t=`${t} \\o "${this.properties.headingStyleRange}"`;if(this.properties.entryAndPageNumberSeparator)t=`${t} \\p "${this.properties.entryAndPageNumberSeparator}"`;if(this.properties.seqFieldIdentifierForPrefix)t=`${t} \\s "${this.properties.seqFieldIdentifierForPrefix}"`;if(this.properties.stylesWithLevels&&this.properties.stylesWithLevels.length){let r=this.properties.stylesWithLevels.map((n)=>`${n.styleName},${n.level}`).join(",");t=`${t} \\t "${r}"`}if(this.properties.useAppliedParagraphOutlineLevel)t=`${t} \\u`;if(this.properties.preserveTabInEntries)t=`${t} \\w`;if(this.properties.preserveNewLineInEntries)t=`${t} \\x`;if(this.properties.hideTabAndPageNumbersInWebView)t=`${t} \\z`;this.root.push(t)}};var vi=class extends y{constructor(){super("w:sdtContent")}},Ql=(e)=>e===void 0?ri():pt(e),wi=new WeakMap,ff=(e,t)=>{wi.set(e,t)},vf=class{constructor(){m(this,"ids",[])}get(e){var t,r;return(r=(t=this.ids)[e])!==null&&r!==void 0||(t[e]=ii()),this.ids[e]}},et=(e)=>typeof e==="object"&&e!==null?Object.keys(e)[0]:void 0,tt=(e)=>{let t=et(e),r=t===void 0?void 0:e[t];return Array.isArray(r)?r:r===void 0?[]:[r]},$e=(e,t)=>tt(e).find((r)=>et(r)===t),Oe=(e,t)=>{var r;return(r=$e(e,"_attr"))===null||r===void 0||(r=r._attr)===null||r===void 0?void 0:r[t]},gi=(e,t)=>{let r=Oe(e,t);return r===void 0?void 0:Number(r)},wf=new Set(["w:tbl","w:tr","w:tc","w:sdt","w:sdtContent","w:customXml"]),ec=(e)=>e.flatMap((t)=>{let r=et(t);if(r==="w:p"||wi.has(t))return[t];return r!==void 0&&wf.has(r)?ec(tt(t)):[]}),gf=new Set(["w:r","w:hyperlink","w:ins","w:moveTo","w:smartTag","w:customXml","w:sdt","w:sdtContent","w:fldSimple","w:dir","w:bdo"]),yf=(e)=>{switch(et(e)){case"w:t":return tt(e).filter((t)=>typeof t==="string").join("");case"w:tab":return"\t";case"w:br":return[void 0,"textWrapping"].includes(Oe(e,"w:type"))?` +`:"";case"w:cr":return` +`;case"w:noBreakHyphen":return"-";default:return""}},xf=(e)=>{let t=[],r=(n)=>{let s=et(n);if(s!==void 0&&gf.has(s))return tt(n).map(r).join("");if(s==="w:fldChar"){let i=Oe(n,"w:fldCharType");if(i==="begin")t.push(!1);else if(i==="separate")t[t.length-1]=!0;else t.pop();return""}return t.every(Boolean)?yf(n):""};return tt(e).map(r).join("")},tc=(e)=>{let t=et(e);if(t==="w:bookmarkStart")return[{start:!0,id:Oe(e,"w:id"),name:Oe(e,"w:name")}];if(t==="w:bookmarkEnd")return[{start:!1,id:Oe(e,"w:id")}];return t===void 0||t==="_attr"?[]:tt(e).flatMap(tc)},bf=(e)=>{let t=new Map;return e.map((r)=>{let n=tc(r),s=new Set([...t.values(),...n.flatMap((i)=>i.start?[i.name]:[])]);for(let i of n)if(i.start)t.set(i.id,i.name);else t.delete(i.id);return s})},Tf=(e,t)=>{let r=t?bf(e):[];return e.map((n,s)=>{var i;let o=$e(n,"w:pPr");return{element:n,styleId:Oe($e(o,"w:pStyle"),"w:val"),outlineLevel:gi($e(o,"w:outlineLvl"),"w:val"),text:xf(n),bookmarks:(i=r[s])!==null&&i!==void 0?i:new Set}})},rc=(e)=>{var t;let r=(t=e.file)===null||t===void 0||(t=t.Styles)===null||t===void 0?void 0:t.prepForXml(e);return new Map(tt(r).filter((n)=>et(n)==="w:style"&&["paragraph",void 0].includes(Oe(n,"w:type"))).map((n)=>[Oe(n,"w:styleId"),{name:Oe($e(n,"w:name"),"w:val"),basedOn:Oe($e(n,"w:basedOn"),"w:val"),outlineLevel:gi($e($e(n,"w:pPr"),"w:outlineLvl"),"w:val")}]))},nc=(e)=>{let t=/^\s*(\d+)\s*-\s*(\d+)\s*$/.exec(e);return t?[Number(t[1]),Number(t[2])]:void 0},vs=(e,[t,r])=>e>=t&&e<=r,yi=(e,t)=>{var r,n;if(e===void 0)return;let s=/^heading ?([1-9])$/i.exec((r=(n=t.get(e))===null||n===void 0?void 0:n.name)!==null&&r!==void 0?r:e);return s?Number(s[1]):void 0},sc=(e,t,r=0)=>{var n;if(e===void 0||r>t.size)return;let s=t.get(e),i=yi(e,t);return(n=s===null||s===void 0?void 0:s.outlineLevel)!==null&&n!==void 0?n:i===void 0?sc(s===null||s===void 0?void 0:s.basedOn,t,r+1):i-1},Ef=(e)=>{let t=rc(e);return(r)=>{let n=$e(r,"w:pPr"),s=Oe($e(n,"w:pStyle"),"w:val"),i=yi(s,t),o=ic({styleId:s,outlineLevel:gi($e(n,"w:outlineLvl"),"w:val")},t),a=o===void 0||o>=9?void 0:o+1;if(i!==void 0&&(a===void 0||a===i))return i;return a===void 0?void 0:"unclear"}},ic=(e,t)=>{var r;return(r=e.outlineLevel)!==null&&r!==void 0?r:sc(e.styleId,t)},Sf=(e,t,r)=>{var n;let{entriesFromBookmark:s,headingStyleRange:i,stylesWithLevels:o=[],useAppliedParagraphOutlineLevel:a}=e;if(t.text.trim()===""||s&&!t.bookmarks.has(s))return;let u=[t.styleId,t.styleId===void 0?void 0:(n=r.get(t.styleId))===null||n===void 0?void 0:n.name].filter((p)=>p!==void 0).map((p)=>p.toLowerCase()),l=o.find((p)=>u.includes(p.styleName.toLowerCase()));if(l)return l.level;let c=Boolean(i)||o.length>0||Boolean(a)||Boolean(e.tcFieldIdentifier)||Boolean(e.tcFieldLevelRange)||Boolean(e.captionLabel)||Boolean(e.captionLabelIncludingNumbers),h=i?nc(i):c?void 0:[1,9],d=yi(t.styleId,r);if(h&&d!==void 0&&vs(d,h))return d;let f=a?ic(t,r):void 0;return f!==void 0&&vs(f+1,h!==null&&h!==void 0?h:[1,9])?f+1:void 0},If=(e,t)=>{let r=t.preserveTabInEntries?e:e.replace(/\t/g," ");return(t.preserveNewLineInEntries?r.split(` +`):[r.replace(/\n/g," ")]).map((n,s)=>new Ze({break:s>0?1:void 0,children:n.split("\t").flatMap((i,o)=>[...o>0?[new Tr]:[],...i===""?[]:[i]])}))},Af=({text:e,separator:t})=>t==="tab"?[new Ze(e),new Ze({children:[new Tr]})]:[new Ze(`${e} `)],Cf=(e,t)=>{let r=240*(e-1)+t+240;return r<=1920?Math.ceil(r/240)*240:Math.round(r)},Nf=(e,t)=>{var r,n;return(r=(n=[...t].find(([,s])=>{var i;return((i=s.name)===null||i===void 0?void 0:i.toLowerCase())===`toc ${e}`}))===null||n===void 0?void 0:n[0])!==null&&r!==void 0?r:`TOC${e}`},kf=({properties:e,beginDirty:t,textWidth:r,tabLeader:n},s,i,o)=>{var a;let u=e.pageNumbersEntryLevelsRange?(a=nc(e.pageNumbersEntryLevelsRange))!==null&&a!==void 0?a:[1,9]:void 0,l=new vi;return s.forEach((c,h)=>{var d;let f=u===void 0||!vs(c.level,u),p=[...c.listNumber?Af(c.listNumber):[],...If(c.title,e),...f?[new Ze({children:[e.entryAndPageNumberSeparator||new Tr]}),new Ec(c.bookmark,{hyperlink:e.hyperlink})]:[]];l.addChildElement(new fe({style:Nf(c.level,i),tabStops:[...((d=c.listNumber)===null||d===void 0?void 0:d.separator)==="tab"?[{type:"left",position:Cf(c.level,c.listNumber.width)}]:[],{type:"right",position:r,leader:n}],children:[...h===0?[new se({children:[Ql(t),new Zl(e),Be()]})]:[],...e.hyperlink?[new Ti({anchor:c.bookmark,children:p})]:p]}))}),l.addChildElement(new fe({children:[new se({children:[Pe()]})]})),l.prepForXml(o)},Rf=(e,t,r,n)=>{let s=tt(e),i=s.findIndex((o)=>et(o)==="w:pPr")+1;e["w:p"]=[...s.slice(0,i),new Si(t,r).prepForXml(n),...s.slice(i),new Ii(r).prepForXml(n)]},Pf=(e,t,r,n)=>{let s=ec(tt(e)),i=s.flatMap((c)=>{let h=wi.get(c);return h?[[c,h]]:[]});if(i.length===0)return;let o=rc(t),a=i.some(([,{properties:c}])=>Boolean(c.entriesFromBookmark)),u=Tf(s.filter((c)=>et(c)==="w:p"),a).map((c)=>({paragraph:c,levels:i.map(([,{properties:h}])=>Sf(h,c,o))})).filter(({levels:c})=>c.some((h)=>h!==void 0)).map((c,h)=>w(w({},c),{},{id:r.get(h)}));for(let{paragraph:c,id:h}of u)Rf(c.element,`_Toc${h}`,h,t);let l=u.length>0?n===null||n===void 0?void 0:n(e):void 0;i.forEach(([c,h],d)=>{let f=u.flatMap(({paragraph:p,levels:v,id:g})=>{let A=v[d],C=l===null||l===void 0?void 0:l.get(`_Toc${g}`);return A===void 0?[]:[w({title:p.text,level:A,bookmark:`_Toc${g}`},C?{listNumber:C}:{})]});if(f.length===0)return;c["w:sdt"]=tt(c).map((p)=>et(p)==="w:sdtContent"?kf(h,f,o,t):p)})},Of=new RegExp("^\\p{L}[\\p{L}\\p{N}_]*$","u"),_f=(e)=>{var t,r;let n,s=!1,i,o=!1,a=!1;for(let h=0;h1)return;let c=!a&&!(o&&i!==void 0&&i.toLowerCase()!=="arabic");return{step:(t=n)!==null&&t!==void 0?t:{type:"next"},hidden:s&&i===void 0,format:c?(r=i)!==null&&r!==void 0?r:"ARABIC":""}},xi=(e)=>{var t;let r=new RegExp("^\\s*SEQ\\b(.*)$","is").exec(e);if(!r)return;let[n,...s]=(t=r[1].match(/"[^"]*"|\S+/g))!==null&&t!==void 0?t:[];if(n===void 0)return{};let i=n.replace(/^"(.*)"$/,"$1");return Of.test(i)?{identifier:i,sequence:_f(s)}:{identifier:i}},Lf=(e)=>xi(e)!==void 0,ws=(e)=>{if(typeof e!=="object"||e===null)return[];if(Array.isArray(e))return e.flatMap(ws);return Object.entries(e).flatMap(([t,r])=>[...(t==="w:instrText"&&Array.isArray(r)?r:t==="_attr"?[r["w:instr"]]:[]).flatMap((n)=>{let s=typeof n==="string"?xi(n):void 0;return(s===null||s===void 0?void 0:s.identifier)===void 0?[]:[s.identifier.toLowerCase()]}),...ws(r)])},Df=(e)=>{var t;let r=(t=e.file)===null||t===void 0?void 0:t.Comments;if(!r)return new Set;let n={View:r,Relationships:r.Relationships};return new Set(ws(r.prepForXml(w(w({},e),{},{viewWrapper:n,stack:[]}))))},Mf=(e)=>{let t=Ef(e),r=new Map,n=new Map,s=[],i=-1,o=-1,a,u=(l,c)=>{var h;let d=Math.max(-1,...s.slice(1,c+1).filter((v)=>v!==void 0)),f=((h=n.get(l))!==null&&h!==void 0?h:[]).filter((v)=>v.paragraph>=d),p=f.every(({step:v})=>(v===null||v===void 0?void 0:v.type)==="next"||(v===null||v===void 0?void 0:v.type)==="heading"&&v.level===c);return i>d||!p?void 0:f.length+1};return{startParagraph:(l)=>{o++;let c=t(l);if(c==="unclear")i=o;else if(c!==void 0)s[c]=o},numberOf:(l,c)=>{var h,d,f;let{identifier:p,sequence:v}=xi(l);if(p===void 0||c==="fallback")return;(h=a)!==null&&h!==void 0||(a=Df(e));let g=p.toLowerCase();if((v===null||v===void 0?void 0:v.step.type)==="bookmark"&&c==="counted"&&!a.has(g))return;let A=r.has(g)?r.get(g):0,C=a.has(g)||c==="deleted"?void 0:v===null||v===void 0?void 0:v.step,b=(C===null||C===void 0?void 0:C.type)==="reset"?C.to:(C===null||C===void 0?void 0:C.type)==="repeat"?A:(C===null||C===void 0?void 0:C.type)==="heading"?u(g,C.level):(C===null||C===void 0?void 0:C.type)==="next"&&A!==void 0?A+1:void 0;return r.set(g,b),n.set(g,[...(d=n.get(g))!==null&&d!==void 0?d:[],w({paragraph:o},b===void 0?{}:{step:C})]),b===void 0||v===void 0?void 0:v.hidden?"":(f=fi(v.format))===null||f===void 0?void 0:f(b)}}},$n=(e)=>{let t=typeof e==="object"&&e!==null&&!Array.isArray(e)?Object.keys(e)[0]:void 0;return t==="_attr"?void 0:t},Fo=(e)=>({"w:t":[{_attr:{"xml:space":"preserve"}},e]}),vn={nameOf:$n,contentOf:(e)=>{let t=e[$n(e)];return Array.isArray(t)?t:void 0},attributeOf:(e,t)=>{var r;let n=e[$n(e)],s=Array.isArray(n)?n.find((i)=>typeof i==="object"&&i!==null&&("_attr"in i)):n;return s===null||s===void 0||(r=s._attr)===null||r===void 0?void 0:r[t]},textOf:(e)=>vn.contentOf(e).filter((t)=>typeof t==="string").join(""),textElement:Fo,writeClean:(e)=>{if(dp(e)){let t=e["w:fldChar"]._attr;e["w:fldChar"]={_attr:Object.fromEntries(Object.entries(t).filter(([r])=>r!=="w:dirty"))}}},setSimpleFieldResult:(e,t)=>{let r=e["w:fldSimple"];e["w:fldSimple"]=[...(Array.isArray(r)?r:[r]).filter((n)=>typeof n==="object"&&n!==null&&("_attr"in n)),{"w:r":[Fo(t)]}]}},oc=new WeakMap,ac=(e,t)=>{let{startParagraph:r,numberOf:n}=Mf(t);mf(vn,e,{beforeParagraph:(s)=>r(s),resultOf:(s,i)=>Lf(s)?n(s,i):void 0})},lc=(e,t,r)=>{let n=r(e,t),s=ql(vn,e,n,{blank:!1});if(t.file)oc.set(t.file,{estimate:n,partPageCounts:s})},zt=(e,t,r)=>{let n=t.file&&oc.get(t.file);if(!e||!n)return;let s=r===void 0?void 0:n.partPageCounts.get(`rId${r}`),i="w:footnotes"in e||"w:endnotes"in e;Jl(vn,e,n.estimate,{blank:!1,sectionPageCount:s,notes:i})},Ff=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{xmlns:"xmlns"})}},ce=class e extends y{constructor(){super("Relationships");this.root.push(new Ff({xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"}))}addRelationship(t,r,n,s){this.root.push(Dm(`rId${t}`,r,n,s))}static copy(t){let r=new e;return r.root.push(...t.root.slice(1)),r}get RelationshipCount(){return this.root.length-1}},Bf=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id",initials:"w:initials",author:"w:author",date:"w:date"})}},bi=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id"})}},$f=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{"xmlns:wpc":"xmlns:wpc","xmlns:cx":"xmlns:cx","xmlns:cx1":"xmlns:cx1","xmlns:cx2":"xmlns:cx2","xmlns:cx3":"xmlns:cx3","xmlns:cx4":"xmlns:cx4","xmlns:cx5":"xmlns:cx5","xmlns:cx6":"xmlns:cx6","xmlns:cx7":"xmlns:cx7","xmlns:cx8":"xmlns:cx8","xmlns:mc":"xmlns:mc","xmlns:aink":"xmlns:aink","xmlns:am3d":"xmlns:am3d","xmlns:o":"xmlns:o","xmlns:r":"xmlns:r","xmlns:m":"xmlns:m","xmlns:v":"xmlns:v","xmlns:wp14":"xmlns:wp14","xmlns:wp":"xmlns:wp","xmlns:w10":"xmlns:w10","xmlns:w":"xmlns:w","xmlns:w14":"xmlns:w14","xmlns:w15":"xmlns:w15","xmlns:w16cex":"xmlns:w16cex","xmlns:w16cid":"xmlns:w16cid","xmlns:w16":"xmlns:w16","xmlns:w16sdtdh":"xmlns:w16sdtdh","xmlns:w16se":"xmlns:w16se","xmlns:wpg":"xmlns:wpg","xmlns:wpi":"xmlns:wpi","xmlns:wne":"xmlns:wne","xmlns:wps":"xmlns:wps","mc:Ignorable":"mc:Ignorable"})}},Hf=class extends y{constructor(e){super("w:commentRangeStart");this.root.push(new bi({id:e}))}},Uf=class extends y{constructor(e){super("w:commentRangeEnd");this.root.push(new bi({id:e}))}},Wf=class extends y{constructor(e){super("w:commentReference");this.root.push(new bi({id:e}))}},gs=class extends y{constructor({id:e,initials:t,author:r,date:n=new Date,children:s},i){super("w:comment");m(this,"paraId",void 0),this.paraId=i,this.root.push(new Bf({id:e,initials:t,author:r,date:n.toISOString()}));for(let o of s)this.root.push(o)}prepForXml(e){let t=super.prepForXml(e);if(!t||!this.paraId)return t;let r=t["w:comment"];if(!Array.isArray(r))return t;for(let n=r.length-1;n>=0;n--){let s=r[n];if(s&&typeof s==="object"&&"w:p"in s){let i=s["w:p"];if(Array.isArray(i))i.unshift({_attr:{"w14:paraId":this.paraId,"w14:textId":this.paraId}});break}}return t}},cc=(e)=>(e+1).toString(16).toUpperCase().padStart(8,"0"),uc=class extends y{constructor({children:e}){super("w:comments");m(this,"relationships",void 0),m(this,"threadData",void 0),m(this,"commentIdsData",void 0),m(this,"isEmpty",void 0),this.isEmpty=e.length===0,this.root.push(new $f({"xmlns:wpc":"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas","xmlns:cx":"http://schemas.microsoft.com/office/drawing/2014/chartex","xmlns:cx1":"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex","xmlns:cx2":"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex","xmlns:cx3":"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex","xmlns:cx4":"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex","xmlns:cx5":"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex","xmlns:cx6":"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex","xmlns:cx7":"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex","xmlns:cx8":"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:aink":"http://schemas.microsoft.com/office/drawing/2016/ink","xmlns:am3d":"http://schemas.microsoft.com/office/drawing/2017/model3d","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:m":"http://schemas.openxmlformats.org/officeDocument/2006/math","xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:wp14":"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing","xmlns:wp":"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing","xmlns:w10":"urn:schemas-microsoft-com:office:word","xmlns:w":"http://schemas.openxmlformats.org/wordprocessingml/2006/main","xmlns:w14":"http://schemas.microsoft.com/office/word/2010/wordml","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","xmlns:w16cex":"http://schemas.microsoft.com/office/word/2018/wordml/cex","xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:w16":"http://schemas.microsoft.com/office/word/2018/wordml","xmlns:w16sdtdh":"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash","xmlns:w16se":"http://schemas.microsoft.com/office/word/2015/wordml/symex","xmlns:wpg":"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup","xmlns:wpi":"http://schemas.microsoft.com/office/word/2010/wordprocessingInk","xmlns:wne":"http://schemas.microsoft.com/office/word/2006/wordml","xmlns:wps":"http://schemas.microsoft.com/office/word/2010/wordprocessingShape","mc:Ignorable":"w14 w15 wp14"}));let t=e.some((n)=>n.parentId!==void 0),r=e.some((n)=>n.durableId!==void 0);if(t||r){let n=new Map(e.map((s)=>[s.id,cc(s.id)]));for(let s of e)this.root.push(new gs(s,n.get(s.id)));if(t)this.threadData=e.map((s)=>({paraId:n.get(s.id),parentParaId:s.parentId!==void 0?n.get(s.parentId):void 0,done:s.resolved}));if(r)this.commentIdsData=e.map((s)=>{var i;return{paraId:n.get(s.id),durableId:(i=s.durableId)!==null&&i!==void 0?i:n.get(s.id)}})}else for(let n of e)this.root.push(new gs(n));this.relationships=new ce}get Relationships(){return this.relationships}get ThreadData(){return this.threadData}get CommentIdsData(){return this.commentIdsData}get IsEmpty(){return this.isEmpty}prepForXml(e){let t=super.prepForXml(e);return zt(t,e),t}},Gf=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id",editorGroup:"w:edGrp"})}},jf=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id"})}},Vf=class extends y{constructor(e){super("w:permStart");this.root.push(new Gf({id:e,editorGroup:"everyone"}))}},Xf=class extends y{constructor(e){super("w:permEnd");this.root.push(new jf({id:e}))}},Kf=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{"xmlns:wpc":"xmlns:wpc","xmlns:mc":"xmlns:mc","xmlns:w15":"xmlns:w15","mc:Ignorable":"mc:Ignorable"})}},zf=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{paraId:"w15:paraId",paraIdParent:"w15:paraIdParent",done:"w15:done"})}},Yf=class extends y{constructor(e){super("w15:commentEx");this.root.push(new zf({paraId:e.paraId,paraIdParent:e.parentParaId,done:e.done!==void 0?e.done?"1":"0":void 0}))}},hc=class extends y{constructor(e){super("w15:commentsEx");this.root.push(new Kf({"xmlns:wpc":"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","xmlns:w15":"http://schemas.microsoft.com/office/word/2012/wordml","mc:Ignorable":"w15"}));for(let t of e)this.root.push(new Yf(t))}},qf=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{paraId:"w16cid:paraId",durableId:"w16cid:durableId"})}},Jf=class extends y{constructor(e){super("w16cid:commentId");this.root.push(new qf({paraId:e.paraId,durableId:e.durableId}))}},Zf=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{"xmlns:w16cid":"xmlns:w16cid","xmlns:mc":"xmlns:mc","mc:Ignorable":"mc:Ignorable"})}},dc=class extends y{constructor(e){super("w16cid:commentsIds");this.root.push(new Zf({"xmlns:w16cid":"http://schemas.microsoft.com/office/word/2016/wordml/cid","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"w16cid"}));for(let t of e)this.root.push(new Jf(t))}},Qf=class extends ue{constructor(){super("w:noBreakHyphen")}},ev=class extends ue{constructor(){super("w:softHyphen")}},tv=class extends ue{constructor(){super("w:dayShort")}},rv=class extends ue{constructor(){super("w:monthShort")}},nv=class extends ue{constructor(){super("w:yearShort")}},sv=class extends ue{constructor(){super("w:dayLong")}},iv=class extends ue{constructor(){super("w:monthLong")}},ov=class extends ue{constructor(){super("w:yearLong")}},av=class extends ue{constructor(){super("w:annotationRef")}},lv=class extends ue{constructor(){super("w:footnoteRef")}},pc=class extends ue{constructor(){super("w:endnoteRef")}},cv=class extends ue{constructor(){super("w:separator")}},uv=class extends ue{constructor(){super("w:continuationSeparator")}},hv=class extends ue{constructor(){super("w:pgNum")}},dv=class extends ue{constructor(){super("w:cr")}},Tr=class extends ue{constructor(){super("w:tab")}},pv=class extends ue{constructor(){super("w:lastRenderedPageBreak")}},mv={LEFT:"left",CENTER:"center",RIGHT:"right"},fv={MARGIN:"margin",INDENT:"indent"},vv={NONE:"none",DOT:"dot",HYPHEN:"hyphen",UNDERSCORE:"underscore",MIDDLE_DOT:"middleDot"},wv=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{alignment:"w:alignment",relativeTo:"w:relativeTo",leader:"w:leader"})}},gv=class extends y{constructor(e){super("w:ptab");this.root.push(new wv({alignment:e.alignment,relativeTo:e.relativeTo,leader:e.leader}))}},mc={COLUMN:"column",PAGE:"page"},fc=class extends y{constructor(e){super("w:br");this.root.push(new we({type:e}))}},yv=class extends se{constructor(){super({});this.root.push(new fc(mc.PAGE))}},xv=class extends se{constructor(){super({});this.root.push(new fc(mc.COLUMN))}},vc=class extends y{constructor(){super("w:pageBreakBefore")}},Pt={AT_LEAST:"atLeast",EXACTLY:"exactly",EXACT:"exact",AUTO:"auto"},wc=({after:e,before:t,line:r,lineRule:n,beforeAutoSpacing:s,afterAutoSpacing:i})=>new x({name:"w:spacing",attributes:{after:{key:"w:after",value:e},before:{key:"w:before",value:t},line:{key:"w:line",value:r},lineRule:{key:"w:lineRule",value:n},beforeAutoSpacing:{key:"w:beforeAutospacing",value:s},afterAutoSpacing:{key:"w:afterAutospacing",value:i}}}),bv={HEADING_1:"Heading1",HEADING_2:"Heading2",HEADING_3:"Heading3",HEADING_4:"Heading4",HEADING_5:"Heading5",HEADING_6:"Heading6",TITLE:"Title"},Wt=(e)=>new x({name:"w:pStyle",attributes:{val:{key:"w:val",value:e}}}),ys={LEFT:"left",RIGHT:"right",CENTER:"center",BAR:"bar",CLEAR:"clear",DECIMAL:"decimal",END:"end",NUM:"num",START:"start"},gc={DOT:"dot",HYPHEN:"hyphen",MIDDLE_DOT:"middleDot",NONE:"none",UNDERSCORE:"underscore"},Tv={MAX:9026},yc=({type:e,position:t,leader:r})=>new x({name:"w:tab",attributes:{val:{key:"w:val",value:e},pos:{key:"w:pos",value:Fe(t)},leader:{key:"w:leader",value:r}}}),xc=(e)=>new x({name:"w:tabs",children:e.map((t)=>yc(t))}),ir=class extends y{constructor(e,t){super("w:numPr");this.root.push(new Ev(t)),this.root.push(new Sv(e))}},Ev=class extends y{constructor(e){super("w:ilvl");if(e>9)throw Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new we({val:e}))}},Sv=class extends y{constructor(e){super("w:numId");this.root.push(new we({val:typeof e==="string"?`{${e}}`:e}))}},Er=class extends y{constructor(...e){super(...e);m(this,"fileChild",Symbol())}},Iv=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"r:id",history:"w:history",anchor:"w:anchor"})}},Av={INTERNAL:"INTERNAL",EXTERNAL:"EXTERNAL"},Yt=class extends y{constructor(e,t,r,n){super("w:hyperlink");m(this,"linkId",void 0),m(this,"drawingLink",void 0),this.linkId=t,this.drawingLink=r&&n!==void 0?new di(n):void 0;let s=new Iv({history:1,anchor:r?r:void 0,id:!r||n!==void 0?`rId${this.linkId}`:void 0});this.root.push(s),e.forEach((i)=>{this.root.push(i)})}createDrawingClick(e,t){if(!this.drawingLink)return $l(this.linkId,t);return this.drawingLink.addRelationship(e),this.drawingLink.createClick(t)}},Ti=class extends Yt{constructor(e){super(e.children,vt(),e.anchor)}},bc=class extends y{constructor(e){super("w:externalHyperlink");m(this,"options",void 0),this.options=e}},Cv=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id",name:"w:name"})}},Nv=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id"})}},Ei=class e{constructor(t){m(this,"start",void 0),m(this,"children",void 0),m(this,"end",void 0);let r=ii();this.start=new Si(t.id,r),this.children=t.children,this.end=new Ii(r)}get writtenAs(){return[this.start,...this.children.flatMap((t)=>t instanceof e?t.writtenAs:[t]),this.end]}},Si=class extends y{constructor(e,t){super("w:bookmarkStart");let r=new Cv({name:e,id:t});this.root.push(r)}},Ii=class extends y{constructor(e){super("w:bookmarkEnd");let t=new Nv({id:e});this.root.push(t)}},kv=function(e){return e.NONE="none",e.RELATIVE="relative",e.NO_CONTEXT="no_context",e.FULL_CONTEXT="full_context",e}({}),Rv={["relative"]:"\\r",["no_context"]:"\\n",["full_context"]:"\\w",["none"]:void 0},Pv=class extends mi{constructor(e,t,r={}){let{hyperlink:n=!0,referenceFormat:s="full_context"}=r,i=`${`REF ${e}`} ${[...n?["\\h"]:[],...[Rv[s]].filter((o)=>!!o)].join(" ")}`;super(i,t)}},Tc=(e)=>new x({name:"w:outlineLvl",attributes:{val:{key:"w:val",value:e}}}),Ov=class extends y{constructor(e,t={}){super("w:instrText");this.root.push(new be({space:ye.PRESERVE}));let r=`PAGEREF ${e}`;if(t.hyperlink)r=`${r} \\h`;if(t.useRelativePosition)r=`${r} \\p`;this.root.push(r)}},Ec=class extends se{constructor(e,t={}){super({children:[ri(),new Ov(e,t),Be(),Pe()]})}},_v=255,Sc=(e)=>{let t=e.indexOf("#"),r=e.length-t-1;return t>0&&r>0&&r<=_v?{target:e.slice(0,t),anchor:e.slice(t+1)}:{target:e}},en=(e,t,r)=>r===void 0?`${e}-${t}`:`${e}-restart ${r}`,Lv={ANSI:"00",DEFAULT:"01",SYMBOL:"02",MAC:"4D",JIS:"80",HANGUL:"81",JOHAB:"82",GB_2312:"86",CHINESEBIG5:"88",GREEK:"A1",TURKISH:"A2",VIETNAMESE:"A3",HEBREW:"B1",ARABIC:"B2",BALTIC:"BA",RUSSIAN:"CC",THAI:"DE",EASTEUROPE:"EE",OEM:"FF"},Lr=({id:e,fontKey:t,subsetted:r},n)=>new x({name:n,attributes:w({id:{key:"r:id",value:e}},t?{fontKey:{key:"w:fontKey",value:`{${t.toUpperCase()}}`}}:{}),children:[...r?[new k("w:subsetted",r)]:[]]}),Dv=({name:e,altName:t,panose1:r,charset:n,family:s,notTrueType:i,pitch:o,sig:a,embedRegular:u,embedBold:l,embedItalic:c,embedBoldItalic:h})=>new x({name:"w:font",attributes:{name:{key:"w:name",value:e}},children:[...t?[Ht("w:altName",t)]:[],...r?[Ht("w:panose1",r)]:[],...n?[Ht("w:charset",n)]:[],...s?[Ht("w:family",s)]:[],...i?[new k("w:notTrueType",i)]:[],...o?[Ht("w:pitch",o)]:[],...a?[new x({name:"w:sig",attributes:{usb0:{key:"w:usb0",value:a.usb0},usb1:{key:"w:usb1",value:a.usb1},usb2:{key:"w:usb2",value:a.usb2},usb3:{key:"w:usb3",value:a.usb3},csb0:{key:"w:csb0",value:a.csb0},csb1:{key:"w:csb1",value:a.csb1}}})]:[],...u?[Lr(u,"w:embedRegular")]:[],...l?[Lr(l,"w:embedBold")]:[],...c?[Lr(c,"w:embedItalic")]:[],...h?[Lr(h,"w:embedBoldItalic")]:[]]}),Mv=({name:e,characterSet:t,embedRegular:r,embedBold:n,embedItalic:s,embedBoldItalic:i})=>Dv({name:e,sig:{usb0:"E0002AFF",usb1:"C000247B",usb2:"00000009",usb3:"00000000",csb0:"000001FF",csb1:"00000000"},charset:t,family:"auto",pitch:"variable",embedRegular:r,embedBold:n,embedItalic:s,embedBoldItalic:i}),Fv=(e)=>new x({name:"w:fonts",attributes:{mc:{key:"xmlns:mc",value:"http://schemas.openxmlformats.org/markup-compatibility/2006"},r:{key:"xmlns:r",value:"http://schemas.openxmlformats.org/officeDocument/2006/relationships"},w:{key:"xmlns:w",value:"http://schemas.openxmlformats.org/wordprocessingml/2006/main"},w14:{key:"xmlns:w14",value:"http://schemas.microsoft.com/office/word/2010/wordml"},w15:{key:"xmlns:w15",value:"http://schemas.microsoft.com/office/word/2012/wordml"},w16cex:{key:"xmlns:w16cex",value:"http://schemas.microsoft.com/office/word/2018/wordml/cex"},w16cid:{key:"xmlns:w16cid",value:"http://schemas.microsoft.com/office/word/2016/wordml/cid"},w16:{key:"xmlns:w16",value:"http://schemas.microsoft.com/office/word/2018/wordml"},w16sdtdh:{key:"xmlns:w16sdtdh",value:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash"},w16se:{key:"xmlns:w16se",value:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Ignorable:{key:"mc:Ignorable",value:"w14 w15 w16se w16cid w16 w16cex w16sdtdh"}},children:e.map(Mv)}),Bv=[{option:"data",element:"embedRegular",bold:!1,italic:!1},{option:"bold",element:"embedBold",bold:!0,italic:!1},{option:"italic",element:"embedItalic",bold:!1,italic:!0},{option:"boldItalic",element:"embedBoldItalic",bold:!0,italic:!0}],Ic=class{constructor(e){m(this,"options",void 0),m(this,"fontTable",void 0),m(this,"relationships",void 0),m(this,"fontOptionsWithKey",[]),m(this,"files",[]),this.options=e;let t=e.map((r)=>Bv.flatMap(({option:n,element:s,bold:i,italic:o})=>{let a=r[n];return a?[{element:s,file:{name:r.name,data:a,bold:i,italic:o,fontKey:ai()}}]:[]}));this.files=t.flatMap((r)=>r.map(({file:n})=>n)),this.fontOptionsWithKey=e.map((r,n)=>w(w({},r),{},{fontKey:t[n][0].file.fontKey})),this.fontTable=Fv(e.map((r,n)=>w({name:r.name,characterSet:r.characterSet},Object.fromEntries(t[n].map(({element:s,file:i})=>[s,{id:`rId${this.files.indexOf(i)+1}`,fontKey:i.fontKey}]))))),this.relationships=new ce;for(let r=0;rnew x({name:"w:wordWrap",attributes:{val:{key:"w:val",value:0}}}),Hv={NONE:"none",DROP:"drop",MARGIN:"margin"},Uv={MARGIN:"margin",PAGE:"page",TEXT:"text"},Wv={AROUND:"around",AUTO:"auto",NONE:"none",NOT_BESIDE:"notBeside",THROUGH:"through",TIGHT:"tight"},Ac=(e)=>{var t,r;return new x({name:"w:framePr",attributes:{anchorLock:{key:"w:anchorLock",value:e.anchorLock},dropCap:{key:"w:dropCap",value:e.dropCap},width:{key:"w:w",value:e.width},height:{key:"w:h",value:e.height},x:{key:"w:x",value:e.position?e.position.x:void 0},y:{key:"w:y",value:e.position?e.position.y:void 0},anchorHorizontal:{key:"w:hAnchor",value:e.anchor.horizontal},anchorVertical:{key:"w:vAnchor",value:e.anchor.vertical},spaceHorizontal:{key:"w:hSpace",value:(t=e.space)===null||t===void 0?void 0:t.horizontal},spaceVertical:{key:"w:vSpace",value:(r=e.space)===null||r===void 0?void 0:r.vertical},rule:{key:"w:hRule",value:e.rule},alignmentX:{key:"w:xAlign",value:e.alignment?e.alignment.x:void 0},alignmentY:{key:"w:yAlign",value:e.alignment?e.alignment.y:void 0},lines:{key:"w:lines",value:e.lines},wrap:{key:"w:wrap",value:e.wrap}}})},Hn=new WeakMap,Gv=Ot(),jv={left:"right",right:"left"},bt=class extends rt{constructor(e,{implicitListParagraphStyle:t=!0,inListOrder:r=!0}={}){super("w:pPr",e===null||e===void 0?void 0:e.includeIfEmpty);if(m(this,"numbering",void 0),m(this,"numberProperties",void 0),!e)return this;if(e.heading)this.push(Wt(e.heading));if(t){if(e.bullet)this.push(Wt("ListParagraph"));if(e.numbering&&!e.numbering.custom&&!e.style&&!e.heading)this.push(Wt("ListParagraph"))}if(e.style)this.push(Wt(e.style));if(e.keepNext!==void 0)this.push(new k("w:keepNext",e.keepNext));if(e.keepLines!==void 0)this.push(new k("w:keepLines",e.keepLines));if(e.pageBreakBefore)this.push(new vc);if(e.frame)this.push(Ac(e.frame));if(e.widowControl!==void 0)this.push(new k("w:widowControl",e.widowControl));if(e.bullet)this.push(new ir(1,e.bullet.level));if(e.numbering){let{reference:s,instance:i,level:o,restart:a}=e.numbering,u=typeof s==="string"?s:s.reference,l=new ir(en(u,i!==null&&i!==void 0?i:0),o);this.numbering={reference:u,level:o,instance:i,restartedListId:a&&r&&i===void 0?Gv():void 0,definition:typeof s==="string"?void 0:s},this.numberProperties=l,this.push(l)}else if(e.numbering===!1)this.push(new ir(0,0));if(e.border)this.push(new Qa(e.border));if(e.thematicBreak)this.push(new el);if(e.shading)this.push(br(e.shading));if(e.wordWrap)this.push($v());if(e.overflowPunctuation)this.push(new k("w:overflowPunct",e.overflowPunctuation));let n=[...e.rightTabStop!==void 0?[{type:ys.RIGHT,position:e.rightTabStop}]:[],...e.tabStops?e.tabStops:[],...e.leftTabStop!==void 0?[{type:ys.LEFT,position:e.leftTabStop}]:[]];if(n.length>0)this.push(xc(n));if(e.bidirectional!==void 0)this.push(new k("w:bidi",e.bidirectional));if(e.spacing)this.push(wc(e.spacing));if(e.indent)this.push(tl(e.indent));if(e.contextualSpacing!==void 0)this.push(new k("w:contextualSpacing",e.contextualSpacing));if(e.alignment)this.push(qs(e.bidirectional&&jv[e.alignment]||e.alignment));if(e.outlineLevel!==void 0)this.push(Tc(e.outlineLevel));if(e.suppressLineNumbers!==void 0)this.push(new k("w:suppressLineNumbers",e.suppressLineNumbers));if(e.autoSpaceEastAsianText!==void 0)this.push(new k("w:autoSpaceDN",e.autoSpaceEastAsianText));if(e.run)this.push(new wl(e.run));if(e.revision)this.push(new xs(e.revision))}push(e){this.root.push(e)}addSectionProperties(e){let t=this.root.findIndex((r)=>r instanceof xs);if(t===-1){this.root.push(e);return}this.root.splice(t,0,e)}removeSectionProperties(e){let t=this.root.indexOf(e);if(t!==-1)this.root.splice(t,1)}prepForXml(e){var t;if(this.numbering){var r,n;let{reference:o,level:a,instance:u=0,definition:l}=this.numbering,c=this.numbering.instance===void 0?(r=this.numbering.restartedListId)!==null&&r!==void 0?r:(n=Hn.get(e))===null||n===void 0?void 0:n.get(o):void 0;if(!(e.viewWrapper instanceof Ic))e.file.Numbering.createConcreteNumberingInstance(o,u,l,c);let h=new ir(en(o,u,c),a);this.root.splice(this.root.indexOf(this.numberProperties),1,h),this.numberProperties=h}let s=super.prepForXml(e);if(((t=this.numbering)===null||t===void 0?void 0:t.restartedListId)!==void 0){var i;Hn.set(e,new Map([...(i=Hn.get(e))!==null&&i!==void 0?i:[],[this.numbering.reference,this.numbering.restartedListId]]))}return s}},xs=class extends y{constructor(e){super("w:pPrChange");this.root.push(new Te({id:e.id,author:e.author,date:e.date})),this.root.push(new bt(w(w({},e),{},{includeIfEmpty:!0}),{inListOrder:!1}))}},fe=class e extends Er{constructor(t){super("w:p");if(m(this,"options",void 0),m(this,"properties",void 0),m(this,"alignment",void 0),this.options=typeof t==="string"?{text:t}:t,typeof t==="string")return this.alignment={},this.properties=new bt({}),this.root.push(this.properties),this.root.push(new Ze(t)),this;if(this.alignment={alignment:t.alignment,bidirectional:t.bidirectional},this.properties=new bt(t),this.root.push(this.properties),t.text)this.root.push(new Ze(t.text));if(t.children)for(let r of t.children){if(r instanceof Ei){this.root.push(...r.writtenAs);continue}this.root.push(r)}}prepForXml(t){for(let r of this.root)if(Xt(r)==="w:externalHyperlink"){let n=this.root.indexOf(r),{options:s}=r,{target:i,anchor:o}=Sc(s.link),a=new Yt(s.children,vt(),o,s.link);t.viewWrapper.Relationships.addRelationship(a.linkId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",i,hi.EXTERNAL),this.root[n]=a}return super.prepForXml(t)}addSectionProperties(t){this.properties.addSectionProperties(t)}removeSectionProperties(t){this.properties.removeSectionProperties(t)}get Alignment(){return this.alignment}with(t){return new e(w(w({},this.options),t))}addRunToFront(t){return this.root.splice(1,0,t),this}},Vv=class extends y{constructor(e){super("m:oMath");for(let t of e.children)this.root.push(t)}},Xv=class extends y{constructor(e){super("m:t");if(/^[\s\u200B]|[\s\u200B]$/.test(e))this.root.push(new be({space:ye.PRESERVE}));this.root.push(e)}};var Kv=["text","normalText","script","literal"],Un={plain:"p",bold:"b",italic:"i",boldItalic:"bi"},Wn={roman:"roman",script:"script",fraktur:"fraktur",doubleStruck:"double-struck",sansSerif:"sans-serif",monospace:"monospace"},Dr=(e,t)=>new x({name:e,attributes:{value:{key:"m:val",value:t}}}),zv=class extends y{constructor(e){var t;super("m:r");let r=typeof e==="string"?{text:e}:e,{text:n,normalText:s,script:i,literal:o}=r,a=(t=wr(r,Kv).style)!==null&&t!==void 0?t:i===void 0||i==="roman"?void 0:"plain";if(s&&(a!==void 0||i!==void 0))throw Error("MathRun: normalText can't be given with style or script, which are for math. Give one or the other");if(a!==void 0&&!Object.keys(Un).includes(a))throw Error(`MathRun: style is "${a}", which isn't one of ${Object.keys(Un).join(", ")}`);if(i!==void 0&&!Object.keys(Wn).includes(i))throw Error(`MathRun: script is "${i}", which isn't one of ${Object.keys(Wn).join(", ")}`);let u=[...o?[Dr("m:lit",1)]:[],...s?[Dr("m:nor",1)]:[],...i===void 0?[]:[Dr("m:scr",Wn[i])],...a===void 0?[]:[Dr("m:sty",Un[a])]];if(u.length>0)this.root.push(new x({name:"m:rPr",children:u}));this.root.push(new Xv(n))}},Cc=class extends y{constructor(e){super("m:den");for(let t of e)this.root.push(t)}},Nc=class extends y{constructor(e){super("m:num");for(let t of e)this.root.push(t)}},Gn={stacked:"bar",skewed:"skw",linear:"lin",noBar:"noBar"},Yv=class extends y{constructor(e){super("m:f");if(e.type!==void 0){if(!Object.keys(Gn).includes(e.type))throw Error(`MathFraction: type is "${e.type}", which isn't one of ${Object.keys(Gn).join(", ")}`);this.root.push(new x({name:"m:fPr",children:[new x({name:"m:type",attributes:{value:{key:"m:val",value:Gn[e.type]}}})]}))}this.root.push(new Nc(e.numerator)),this.root.push(new Cc(e.denominator))}},kc=({accent:e})=>new x({name:"m:chr",attributes:{accent:{key:"m:val",value:e}}}),Ee=({children:e})=>new x({name:"m:e",children:e}),Rc=({value:e})=>new x({name:"m:limLoc",attributes:{value:{key:"m:val",value:e||"undOvr"}}}),qv=()=>new x({name:"m:subHide",attributes:{hide:{key:"m:val",value:1}}}),Jv=()=>new x({name:"m:supHide",attributes:{hide:{key:"m:val",value:1}}}),Ai=({accent:e,hasSuperScript:t,hasSubScript:r,limitLocationVal:n})=>new x({name:"m:naryPr",children:[...e?[kc({accent:e})]:[],Rc({value:n}),...!r?[qv()]:[],...!t?[Jv()]:[]]}),qt=({children:e})=>new x({name:"m:sub",children:e}),jn={aboveBelow:"undOvr",side:"subSup"},Pc=(e,t,r)=>{if(t===void 0)return r;if(!Object.keys(jn).includes(t))throw Error(`${e}: limits is "${t}", which isn't one of ${Object.keys(jn).join(", ")}`);return jn[t]},Jt=({children:e})=>new x({name:"m:sup",children:e}),Zv=class extends y{constructor(e){var t,r;super("m:nary");this.root.push(Ai({accent:"∑",hasSuperScript:!!e.superScript,hasSubScript:!!e.subScript,limitLocationVal:Pc("MathSum",e.limits,"undOvr")})),this.root.push(qt({children:(t=e.subScript)!==null&&t!==void 0?t:[]})),this.root.push(Jt({children:(r=e.superScript)!==null&&r!==void 0?r:[]})),this.root.push(Ee({children:e.children}))}},Qv=class extends y{constructor(e){var t,r;super("m:nary");this.root.push(Ai({accent:"",hasSuperScript:!!e.superScript,hasSubScript:!!e.subScript,limitLocationVal:Pc("MathIntegral",e.limits,"subSup")})),this.root.push(qt({children:(t=e.subScript)!==null&&t!==void 0?t:[]})),this.root.push(Jt({children:(r=e.superScript)!==null&&r!==void 0?r:[]})),this.root.push(Ee({children:e.children}))}},Ci=class extends y{constructor(e){super("m:lim");for(let t of e)this.root.push(t)}},e0=class extends y{constructor(e){super("m:limUpp");this.root.push(Ee({children:e.children})),this.root.push(new Ci(e.limit))}},t0=class extends y{constructor(e){super("m:limLow");this.root.push(Ee({children:e.children})),this.root.push(new Ci(e.limit))}},Oc=()=>new x({name:"m:sSupPr"}),r0=class extends y{constructor(e){super("m:sSup");this.root.push(Oc()),this.root.push(Ee({children:e.children})),this.root.push(Jt({children:e.superScript}))}},_c=()=>new x({name:"m:sSubPr"}),n0=class extends y{constructor(e){super("m:sSub");this.root.push(_c()),this.root.push(Ee({children:e.children})),this.root.push(qt({children:e.subScript}))}},Lc=()=>new x({name:"m:sSubSupPr"}),s0=class extends y{constructor(e){super("m:sSubSup");this.root.push(Lc()),this.root.push(Ee({children:e.children})),this.root.push(qt({children:e.subScript})),this.root.push(Jt({children:e.superScript}))}},Dc=()=>new x({name:"m:sPrePr"}),i0=class extends x{constructor({children:e,subScript:t,superScript:r}){super({name:"m:sPre",children:[Dc(),qt({children:t}),Jt({children:r}),Ee({children:e})]})}},Mc=class extends y{constructor(e){super("m:deg");if(e)for(let t of e)this.root.push(t)}},o0=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{hide:"m:val"})}},a0=class extends y{constructor(){super("m:degHide");this.root.push(new o0({hide:1}))}},Fc=class extends y{constructor(e){super("m:radPr");if(!e)this.root.push(new a0)}},l0=class extends y{constructor(e){super("m:rad");this.root.push(new Fc(!!e.degree)),this.root.push(new Mc(e.degree)),this.root.push(Ee({children:e.children}))}},Bc=class extends y{constructor(e){super("m:fName");for(let t of e)this.root.push(t)}},$c=class extends y{constructor(){super("m:funcPr")}},c0=class extends y{constructor(e){super("m:func");this.root.push(new $c),this.root.push(new Bc(e.name)),this.root.push(Ee({children:e.children}))}},u0=({character:e})=>new x({name:"m:begChr",attributes:{character:{key:"m:val",value:e}}}),h0=({character:e})=>new x({name:"m:endChr",attributes:{character:{key:"m:val",value:e}}}),wn=({characters:e})=>new x({name:"m:dPr",children:e?[u0({character:e.beginningCharacter}),h0({character:e.endingCharacter})]:[]}),d0=class extends y{constructor(e){super("m:d");this.root.push(wn({})),this.root.push(Ee({children:e.children}))}},p0=class extends y{constructor(e){super("m:d");this.root.push(wn({characters:{beginningCharacter:"[",endingCharacter:"]"}})),this.root.push(Ee({children:e.children}))}},m0=class extends y{constructor(e){super("m:d");this.root.push(wn({characters:{beginningCharacter:"{",endingCharacter:"}"}})),this.root.push(Ee({children:e.children}))}},f0=class extends y{constructor(e){super("m:d");this.root.push(wn({characters:{beginningCharacter:"⟨",endingCharacter:"⟩"}})),this.root.push(Ee({children:e.children}))}},Hc={TOP:"top",CENTER:"center",BOTTOM:"bottom"},Uc=w(w({},Hc),{},{BOTH:"both"}),v0=Uc,Ni=(e)=>new x({name:"w:vAlign",attributes:{verticalAlign:{key:"w:val",value:e}}}),Wc=({space:e,count:t,separate:r,equalWidth:n,children:s})=>new x({name:"w:cols",attributes:{space:{key:"w:space",value:e===void 0?void 0:ne(e)},count:{key:"w:num",value:t===void 0?void 0:X(t)},separate:{key:"w:sep",value:r},equalWidth:{key:"w:equalWidth",value:n}},children:!n&&s?s:void 0}),w0={DEFAULT:"default",LINES:"lines",LINES_AND_CHARS:"linesAndChars",SNAP_TO_CHARS:"snapToChars"},Gc=({type:e,linePitch:t,charSpace:r})=>new x({name:"w:docGrid",attributes:{type:{key:"w:type",value:e},linePitch:{key:"w:linePitch",value:X(t)},charSpace:{key:"w:charSpace",value:r?X(r):void 0}}}),Rt={DEFAULT:"default",FIRST:"first",EVEN:"even"},bs={HEADER:"w:headerReference",FOOTER:"w:footerReference"},Wr=(e,t)=>new x({name:e,attributes:{type:{key:"w:type",value:t.type||Rt.DEFAULT},id:{key:"r:id",value:`rId${t.id}`}}}),g0={NEW_PAGE:"newPage",NEW_SECTION:"newSection",CONTINUOUS:"continuous"},jc=({countBy:e,start:t,restart:r,distance:n})=>new x({name:"w:lnNumType",attributes:{countBy:{key:"w:countBy",value:e===void 0?void 0:X(e)},start:{key:"w:start",value:t===void 0?void 0:X(t)},restart:{key:"w:restart",value:r},distance:{key:"w:distance",value:n===void 0?void 0:ne(n)}}}),y0={PAGE_BOTTOM:"pageBottom",BENEATH_TEXT:"beneathText",SECTION_END:"sectEnd",DOCUMENT_END:"docEnd"},x0={SECTION_END:"sectEnd",DOCUMENT_END:"docEnd"},b0={CONTINUOUS:"continuous",EACH_SECTION:"eachSect",EACH_PAGE:"eachPage"},Vc=({name:e,position:t,numberFormat:r,start:n,restart:s})=>new x({name:e,children:[...t===void 0?[]:[new x({name:"w:pos",attributes:{val:{key:"w:val",value:t}}})],...r?[new x({name:"w:numFmt",attributes:{val:{key:"w:val",value:r.type},format:{key:"w:format",value:r.format}}})]:[],...n===void 0?[]:[new x({name:"w:numStart",attributes:{val:{key:"w:val",value:X(n)}}})],...s===void 0?[]:[new x({name:"w:numRestart",attributes:{val:{key:"w:val",value:s}}})]]}),Xc=(e)=>Vc(w({name:"w:footnotePr"},e)),Kc=(e)=>Vc(w({name:"w:endnotePr"},e)),T0={ALL_PAGES:"allPages",FIRST_PAGE:"firstPage",NOT_FIRST_PAGE:"notFirstPage"},E0={PAGE:"page",TEXT:"text"},S0={BACK:"back",FRONT:"front"},Bo=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{display:"w:display",offsetFrom:"w:offsetFrom",zOrder:"w:zOrder"})}},zc=class extends rt{constructor(e){super("w:pgBorders");if(!e)return this;if(e.pageBorders)this.root.push(new Bo({display:e.pageBorders.display,offsetFrom:e.pageBorders.offsetFrom,zOrder:e.pageBorders.zOrder}));else this.root.push(new Bo({}));if(e.pageBorderTop)this.root.push(re("w:top",e.pageBorderTop));if(e.pageBorderLeft)this.root.push(re("w:left",e.pageBorderLeft));if(e.pageBorderBottom)this.root.push(re("w:bottom",e.pageBorderBottom));if(e.pageBorderRight)this.root.push(re("w:right",e.pageBorderRight))}},Yc=(e,t,r,n,s,i,o)=>new x({name:"w:pgMar",attributes:{top:{key:"w:top",value:Fe(e)},right:{key:"w:right",value:ne(t)},bottom:{key:"w:bottom",value:Fe(r)},left:{key:"w:left",value:ne(n)},header:{key:"w:header",value:ne(s)},footer:{key:"w:footer",value:ne(i)},gutter:{key:"w:gutter",value:ne(o)}}}),qc={HYPHEN:"hyphen",PERIOD:"period",COLON:"colon",EM_DASH:"emDash",EN_DASH:"endash"},Jc=({start:e,formatType:t,separator:r,chapterHeadingLevel:n})=>new x({name:"w:pgNumType",attributes:{start:{key:"w:start",value:e===void 0?void 0:X(e)},formatType:{key:"w:fmt",value:t},separator:{key:"w:chapSep",value:r===qc.EN_DASH?"enDash":r},chapterHeadingLevel:{key:"w:chapStyle",value:n===void 0?void 0:X(n)}}}),pr={PORTRAIT:"portrait",LANDSCAPE:"landscape"},Zc=({width:e,height:t,orientation:r,code:n})=>{let s=ne(e),i=ne(t);return new x({name:"w:pgSz",attributes:{width:{key:"w:w",value:r===pr.LANDSCAPE?i:s},height:{key:"w:h",value:r===pr.LANDSCAPE?s:i},orientation:{key:"w:orient",value:r},code:{key:"w:code",value:n}}})},I0={LEFT_TO_RIGHT_TOP_TO_BOTTOM:"lrTb",TOP_TO_BOTTOM_RIGHT_TO_LEFT:"tbRl"},A0=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{val:"w:val"})}},Qc=class extends y{constructor(e){super("w:textDirection");this.root.push(new A0({val:e}))}},C0={NEXT_PAGE:"nextPage",NEXT_COLUMN:"nextColumn",CONTINUOUS:"continuous",EVEN_PAGE:"evenPage",ODD_PAGE:"oddPage"},eu=(e)=>new x({name:"w:type",attributes:{val:{key:"w:val",value:e}}}),Me={TOP:1440,RIGHT:1440,BOTTOM:1440,LEFT:1440,HEADER:708,FOOTER:708,GUTTER:0},or={WIDTH:11906,HEIGHT:16838,ORIENTATION:pr.PORTRAIT},tn=class e extends y{constructor({page:{size:{width:t=or.WIDTH,height:r=or.HEIGHT,orientation:n=or.ORIENTATION,code:s}={},margin:{top:i=Me.TOP,right:o=Me.RIGHT,bottom:a=Me.BOTTOM,left:u=Me.LEFT,header:l=Me.HEADER,footer:c=Me.FOOTER,gutter:h=Me.GUTTER}={},pageNumbers:d={},borders:f,textDirection:p}={},grid:{linePitch:v=360,charSpace:g,type:A}={},headerWrapperGroup:C={},footerWrapperGroup:b={},lineNumbers:P,titlePage:_,verticalAlign:E,column:T,type:S,footnoteProperties:N,endnoteProperties:R,revision:D}={}){super("w:sectPr");if(m(this,"availableTextWidth",void 0),this.availableTextWidth=e.calculateAvailableTextWidth({pageWidth:n===pr.LANDSCAPE?r:t,left:u,right:o,gutter:h,column:T}),this.addHeaderFooterGroup(bs.HEADER,C),this.addHeaderFooterGroup(bs.FOOTER,b),N)this.root.push(Xc(N));if(R)this.root.push(Kc(R));if(S)this.root.push(eu(S));if(this.root.push(Zc({width:t,height:r,orientation:n,code:s})),this.root.push(Yc(i,o,a,u,l,c,h)),f)this.root.push(new zc(f));if(P)this.root.push(jc(P));if(this.root.push(Jc(d)),T)this.root.push(Wc(T));if(E)this.root.push(Ni(E));if(_!==void 0)this.root.push(new k("w:titlePg",_));if(p)this.root.push(new Qc(p));if(this.root.push(Gc({linePitch:v,charSpace:g,type:A})),D)this.root.push(new tu(D))}get AvailableTextWidth(){return this.availableTextWidth}static calculateAvailableTextWidth({pageWidth:t,left:r,right:n,gutter:s,column:i}){var o,a;let u=dt(t)-dt(r)-dt(n)-dt(s),l=(o=i===null||i===void 0?void 0:i.count)!==null&&o!==void 0?o:1;if(l<=1)return u;return(u-dt((a=i===null||i===void 0?void 0:i.space)!==null&&a!==void 0?a:720)*(l-1))/l}addHeaderFooterGroup(t,r){if(r.default)this.root.push(Wr(t,{type:Rt.DEFAULT,id:r.default.View.ReferenceId}));if(r.first)this.root.push(Wr(t,{type:Rt.FIRST,id:r.first.View.ReferenceId}));if(r.even)this.root.push(Wr(t,{type:Rt.EVEN,id:r.even.View.ReferenceId}))}},tu=class extends y{constructor(e){super("w:sectPrChange");this.root.push(new Te({id:e.id,author:e.author,date:e.date})),this.root.push(new tn(e))}},ki=class extends y{constructor({pageNumbers:e}={}){super("w:body");m(this,"sections",[]),m(this,"sectionParagraphs",new Map),m(this,"headingBookmarkIds",new vf),m(this,"pageNumbers",void 0),this.pageNumbers=e}getSectionPropertiesFor(e){let t=e?Math.max(this.root.indexOf(e),0):0;for(let r=t;rn(s,e))),this.pageNumbers)ac(r,e),lc(r,e,this.pageNumbers);return r}push(e){let t=e instanceof fe?this.sectionParagraphs.get(e):void 0;if(t){let r=this.createSectionParagraph();this.root.splice(this.root.indexOf(e)+1,0,r),this.sectionParagraphs.delete(e),this.sectionParagraphs.set(r,t)}this.root.push(e)}lastParagraphOfSection(){let e=this.root[this.root.length-1];return e instanceof fe&&e!==this.root[0]&&!this.sectionParagraphs.has(e)&&this.root.indexOf(e)===this.root.length-1?e:void 0}createSectionParagraph(){return new fe({})}},Je={AUTO:"auto",DXA:"dxa",NIL:"nil",PERCENTAGE:"pct"},jt=(e,{type:t=Je.AUTO,size:r})=>{let n=r;if(t===Je.PERCENTAGE&&typeof r==="number")n=Math.round(r*50);return new x({name:e,attributes:{type:{key:"w:type",value:t},size:{key:"w:w",value:Ys(n)}}})},Gr=or.WIDTH-Me.LEFT-Me.RIGHT-Me.GUTTER,ru=(e)=>e.options.columnSpan||1,Ri=(e,t)=>{if(!e)return;let{type:r=Je.AUTO,size:n}=e;if(r!==Je.PERCENTAGE&&r!==Je.DXA)return;let s=typeof n==="number"?r===Je.PERCENTAGE?n/100*t:n:n.endsWith("%")?Number(n.slice(0,-1))/100*t:dt(n);return s>0?s:void 0},N0=(e,t)=>{var r;return(r=Ri(e,t))!==null&&r!==void 0?r:t},k0=(e)=>Math.max(0,...e.map((t)=>t.cells.reduce((r,n)=>r+ru(n),0))),$o=({rows:e,width:t,availableWidth:r})=>{let n=k0(e);if(n===0)return[];let s=N0(t,r),i=Array.from({length:n},()=>{return}),o=[];for(let c of e){let h=0;for(let d of c.cells){let f=ru(d),p=Ri(d.options.width,s);if(p!==void 0)if(f===1){var a,u;(u=i[a=h])!==null&&u!==void 0||(i[a]=p)}else o.push({start:h,span:f,width:p});h+=f}}for(let{start:c,span:h,width:d}of o){let f=Array.from({length:h},(g,A)=>c+A).filter((g)=>gi[g]===void 0),v=d-f.reduce((g,A)=>{var C;return g+((C=i[A])!==null&&C!==void 0?C:0)},0);if(p.length>0&&v>0)for(let g of p)i[g]=v/p.length}let l=i.flatMap((c,h)=>c===void 0?[h]:[]);if(l.length>0){let c=s-i.reduce((d,f)=>d+(f!==null&&f!==void 0?f:0),0),h=c>0?c/l.length:s/n;for(let d of l)i[d]=h}return i.map((c)=>Math.round(c))},R0=(e)=>new x({name:"w:gridCol",attributes:e!==void 0?{width:{key:"w:w",value:ne(e)}}:void 0}),jr=class extends y{constructor(e,t){super("w:tblGrid");for(let r of e)this.root.push(R0(r));if(t)this.root.push(new O0(t))}},P0=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id"})}},O0=class extends y{constructor(e){super("w:tblGridChange");this.root.push(new P0({id:e.id})),this.root.push(new jr(e.columnWidths))}},_0=class extends y{constructor(e){super("w:ins");this.root.push(new Te({id:e.id,author:e.author,date:e.date})),this.addChildElement(new Ze(e))}},L0=class extends y{constructor(){super("w:delInstrText");this.root.push(new be({space:ye.PRESERVE})),this.root.push("PAGE")}},D0=class extends y{constructor(){super("w:delInstrText");this.root.push(new be({space:ye.PRESERVE})),this.root.push("NUMPAGES")}},M0=class extends y{constructor(){super("w:delInstrText");this.root.push(new be({space:ye.PRESERVE})),this.root.push("SECTIONPAGES")}},Ho=class extends y{constructor(e){super("w:delText");this.root.push(new be({space:ye.PRESERVE})),this.root.push(e)}},F0=(e)=>{switch(e){case xt.CURRENT:return[pt(),new L0,Be(),Pe()];case xt.TOTAL_PAGES:return[pt(),new D0,Be(),Pe()];case xt.TOTAL_PAGES_IN_SECTION:return[pt(),new M0,Be(),Pe()];default:return}},B0=class extends y{constructor(e){super("w:del");m(this,"deletedTextRunWrapper",void 0),this.root.push(new Te({id:e.id,author:e.author,date:e.date})),this.deletedTextRunWrapper=new $0(e),this.addChildElement(this.deletedTextRunWrapper)}},$0=class e extends y{constructor(t){super("w:r");if(m(this,"following",[]),this.root.push(new nt(t)),t.children)for(let[r,n]of t.children.entries()){if(n instanceof se){let s=t.children.slice(r+1);this.following=[n,...s.length>0?[new e(w(w({},t),{},{break:void 0,children:s}))]:[]];break}if(typeof n==="string"){let s=F0(n);if(s){let i=t.children.slice(r+1),o=(l)=>new e(w(w({},t),{},{break:void 0,children:l})),a=this.root.length===1;if(a)this.root.push(s[0]);let u=a?s.slice(1):s;this.following=[...u.map((l)=>o([l])),...i.length>0?[o(i)]:[]];break}this.root.push(new Ho(n));continue}this.root.push(n)}else if(t.text)this.root.push(new Ho(t.text));if(t.break)for(let r=0;r0?[this,...this.following.flatMap((t)=>{var r;return(r=t.writtenAs)!==null&&r!==void 0?r:t})]:void 0}},nu=class extends y{constructor(e){super("w:ins");this.root.push(new Te({id:e.id,author:e.author,date:e.date}))}},su=class extends y{constructor(e){super("w:del");this.root.push(new Te({id:e.id,author:e.author,date:e.date}))}},iu=class extends y{constructor(e){super("w:cellIns");this.root.push(new Te({id:e.id,author:e.author,date:e.date}))}},ou=class extends y{constructor(e){super("w:cellDel");this.root.push(new Te({id:e.id,author:e.author,date:e.date}))}},H0={CONTINUE:"cont",RESTART:"rest"},au=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id",author:"w:author",date:"w:date",verticalMerge:"w:vMerge",verticalMergeOriginal:"w:vMergeOrig"})}},lu=class extends y{constructor(e){super("w:cellMerge");this.root.push(new au(e))}},cu=({marginUnitType:e=Je.DXA,top:t,left:r,bottom:n,right:s})=>[{name:"w:top",size:t},{name:"w:left",size:r},{name:"w:bottom",size:n},{name:"w:right",size:s}].filter((i)=>i.size!==void 0).map(({name:i,size:o})=>jt(i,{type:e,size:o})),U0=(e)=>{let t=cu(e);if(t.length===0)return;return new x({name:"w:tblCellMar",children:t})},W0=(e)=>{let t=cu(e);if(t.length===0)return;return new x({name:"w:tcMar",children:t})},uu=class extends rt{constructor(e){super("w:tcBorders");if(e.top)this.root.push(re("w:top",e.top));if(e.start)this.root.push(re("w:start",e.start));if(e.left)this.root.push(re("w:left",e.left));if(e.bottom)this.root.push(re("w:bottom",e.bottom));if(e.end)this.root.push(re("w:end",e.end));if(e.right)this.root.push(re("w:right",e.right));if(e.diagonalDown)this.root.push(re("w:tl2br",e.diagonalDown));if(e.diagonalUp)this.root.push(re("w:tr2bl",e.diagonalUp))}},G0=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{val:"w:val"})}},hu=class extends y{constructor(e){super("w:gridSpan");this.root.push(new G0({val:X(e)}))}},Pi={CONTINUE:"continue",RESTART:"restart"},j0=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{val:"w:val"})}},Ts=class extends y{constructor(e){super("w:vMerge");this.root.push(new j0({val:e}))}},V0={BOTTOM_TO_TOP_LEFT_TO_RIGHT:"btLr",LEFT_TO_RIGHT_TOP_TO_BOTTOM:"lrTb",TOP_TO_BOTTOM_RIGHT_TO_LEFT:"tbRl"},X0=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{val:"w:val"})}},du=class extends y{constructor(e){super("w:textDirection");this.root.push(new X0({val:e}))}},pu=class extends rt{constructor(e){super("w:tcPr",e.includeIfEmpty);if(m(this,"hasWidth",void 0),m(this,"hasColumnWidth",!1),this.hasWidth=e.width!==void 0,e.width)this.root.push(jt("w:tcW",e.width));if(e.columnSpan)this.root.push(new hu(e.columnSpan));if(e.verticalMerge)this.root.push(new Ts(e.verticalMerge));else if(e.rowSpan&&e.rowSpan>1)this.root.push(new Ts(Pi.RESTART));if(e.borders)this.root.push(new uu(e.borders));if(e.shading)this.root.push(br(e.shading));if(e.margins){let t=W0(e.margins);if(t)this.root.push(t)}if(e.textDirection)this.root.push(new du(e.textDirection));if(e.verticalAlign)this.root.push(Ni(e.verticalAlign));if(e.insertion)this.root.push(new iu(e.insertion));if(e.deletion)this.root.push(new ou(e.deletion));if(e.cellMerge)this.root.push(new lu(e.cellMerge));if(e.revision)this.root.push(new K0(e.revision))}setColumnWidth(e){if(this.hasWidth)return;this.root.splice(0,this.hasColumnWidth?1:0,jt("w:tcW",{size:e,type:Je.DXA})),this.hasColumnWidth=!0}},K0=class extends y{constructor(e){super("w:tcPrChange");this.root.push(new Te({id:e.id,author:e.author,date:e.date})),this.root.push(new pu(w(w({},e),{},{includeIfEmpty:!0})))}},Es=class extends y{constructor(e){super("w:tc");m(this,"options",void 0),m(this,"properties",void 0),this.options=e,this.properties=new pu(e),this.root.push(this.properties);for(let t of e.children)this.root.push(t)}setColumnWidth(e){this.properties.setColumnWidth(e)}prepForXml(e){if(Xt(this.root[this.root.length-1])!=="w:p")this.root.push(new fe({}));return super.prepForXml(e)}},Ss=(e,t)=>t?new k(e):new Ue(e,"off"),Bt={style:dn.NONE,size:0,color:"auto"},z0={style:dn.SINGLE,size:4,color:"auto"},Oi=class extends rt{constructor(e,{fillMissingSides:t=!0}={}){super("w:tblBorders");let r=[["w:top",e.top],["w:left",e.left],["w:bottom",e.bottom],["w:right",e.right],["w:insideH",e.insideHorizontal],["w:insideV",e.insideVertical]];for(let[n,s]of r){let i=s!==null&&s!==void 0?s:t?z0:void 0;if(i)this.root.push(re(n,i))}}};m(Oi,"NONE",{top:Bt,bottom:Bt,left:Bt,right:Bt,insideHorizontal:Bt,insideVertical:Bt});var Y0={MARGIN:"margin",PAGE:"page",TEXT:"text"},Vr={CENTER:"center",INSIDE:"inside",LEFT:"left",OUTSIDE:"outside",RIGHT:"right"};var mu={CENTER:"center",INSIDE:"inside",BOTTOM:"bottom",OUTSIDE:"outside",INLINE:"inline",TOP:"top"},q0={NEVER:"never",OVERLAP:"overlap"},fu=({horizontalAnchor:e,verticalAnchor:t,absoluteHorizontalPosition:r,relativeHorizontalPosition:n,absoluteVerticalPosition:s,relativeVerticalPosition:i,bottomFromText:o,topFromText:a,leftFromText:u,rightFromText:l})=>new x({name:"w:tblpPr",attributes:{leftFromText:{key:"w:leftFromText",value:u===void 0?void 0:ne(u)},rightFromText:{key:"w:rightFromText",value:l===void 0?void 0:ne(l)},topFromText:{key:"w:topFromText",value:a===void 0?void 0:ne(a)},bottomFromText:{key:"w:bottomFromText",value:o===void 0?void 0:ne(o)},absoluteHorizontalPosition:{key:"w:tblpX",value:r===void 0?void 0:Fe(r)},absoluteVerticalPosition:{key:"w:tblpY",value:s===void 0?void 0:Fe(s)},horizontalAnchor:{key:"w:horzAnchor",value:e},relativeHorizontalPosition:{key:"w:tblpXSpec",value:n},relativeVerticalPosition:{key:"w:tblpYSpec",value:i},verticalAnchor:{key:"w:vertAnchor",value:t}}}),J0={AUTOFIT:"autofit",FIXED:"fixed"},vu=(e)=>new x({name:"w:tblLayout",attributes:{type:{key:"w:type",value:e}}}),Z0={DXA:"dxa",NIL:"nil"},wu=({type:e=Z0.DXA,value:t})=>new x({name:"w:tblCellSpacing",attributes:{type:{key:"w:type",value:e},value:{key:"w:w",value:Ys(t)}}}),gu=({firstRow:e,lastRow:t,firstColumn:r,lastColumn:n,noHBand:s,noVBand:i})=>new x({name:"w:tblLook",attributes:{firstRow:{key:"w:firstRow",value:e},lastRow:{key:"w:lastRow",value:t},firstColumn:{key:"w:firstColumn",value:r},lastColumn:{key:"w:lastColumn",value:n},noHBand:{key:"w:noHBand",value:s},noVBand:{key:"w:noVBand",value:i}}}),Q0=(e)=>new x({name:"w:tblOverlap",attributes:{val:{key:"w:val",value:e}}}),ew={[Vr.LEFT]:me.LEFT,[Vr.CENTER]:me.CENTER,[Vr.RIGHT]:me.RIGHT},gn=class extends rt{constructor(e){var t,r,n;super("w:tblPr",e.includeIfEmpty);if(e.style)this.root.push(new Ue("w:tblStyle",e.style));let s=((t=e.float)===null||t===void 0?void 0:t.relativeVerticalPosition)===mu.INLINE,i=s?void 0:e.float;if(i)this.root.push(fu(i));if(i===null||i===void 0?void 0:i.overlap)this.root.push(Q0(i.overlap));if(e.visuallyRightToLeft!==void 0)this.root.push(Ss("w:bidiVisual",e.visuallyRightToLeft));if(e.width)this.root.push(jt("w:tblW",e.width));let o=(r=e.alignment)!==null&&r!==void 0?r:s&&((n=e.float)===null||n===void 0?void 0:n.relativeHorizontalPosition)?ew[e.float.relativeHorizontalPosition]:void 0;if(o)this.root.push(qs(o));if(e.cellSpacing)this.root.push(wu(e.cellSpacing));if(e.indent)this.root.push(jt("w:tblInd",e.indent));if(e.borders)this.root.push(new Oi(e.borders,{fillMissingSides:!e.style}));if(e.shading)this.root.push(br(e.shading));if(e.layout)this.root.push(vu(e.layout));if(e.cellMargin){let a=U0(e.cellMargin);if(a)this.root.push(a)}if(e.tableLook)this.root.push(gu(e.tableLook));if(e.revision)this.root.push(new tw(e.revision))}},tw=class extends y{constructor(e){super("w:tblPrChange");this.root.push(new Te({id:e.id,author:e.author,date:e.date})),this.root.push(new gn(w(w({},e),{},{includeIfEmpty:!0})))}},rw={AUTO:"auto",ATLEAST:"atLeast",EXACT:"exact"},yu=(e,t)=>new x({name:"w:trHeight",attributes:{value:{key:"w:val",value:ne(e)},rule:{key:"w:hRule",value:t}}}),_i=class extends rt{constructor(e){super("w:trPr",e.includeIfEmpty);if(e.cantSplit!==void 0)this.root.push(Ss("w:cantSplit",e.cantSplit));if(e.tableHeader!==void 0)this.root.push(Ss("w:tblHeader",e.tableHeader));if(e.height)this.root.push(yu(e.height.value,e.height.rule));if(e.cellSpacing)this.root.push(wu(e.cellSpacing));if(e.insertion)this.root.push(new nu(e.insertion));if(e.deletion)this.root.push(new su(e.deletion));if(e.revision)this.root.push(new xu(e.revision))}},xu=class extends y{constructor(e){super("w:trPrChange");this.root.push(new Te({id:e.id,author:e.author,date:e.date})),this.root.push(new _i(w(w({},e),{},{includeIfEmpty:!0})))}},rn=(e,t)=>{let r=e[t];return Array.isArray(r)?r:[]},ar=(e)=>Object.keys(e)[0],nw=(e,t)=>{let r=rn(e,"w:p"),n=r.find((a)=>ar(a)==="w:pPr");if(!n)return{"w:p":[{"w:pPr":[t]},...r]};let s=rn(n,"w:pPr");if(s.some((a)=>ar(a)==="w:keepNext"))return e;let i=s.filter((a)=>ar(a)==="w:pStyle").length,o={"w:pPr":[...s.slice(0,i),t,...s.slice(i)]};return{"w:p":r.map((a)=>a===n?o:a)}},bu=class extends y{constructor(e){super("w:tr");m(this,"options",void 0),this.options=e,this.root.push(new _i(e));for(let t of e.children)this.root.push(t)}prepForXml(e){if(this.cells.length===0)return;let t=super.prepForXml(e);if(!t||this.options.keepNext===void 0)return t;let r=new k("w:keepNext",this.options.keepNext).prepForXml(e);return{"w:tr":rn(t,"w:tr").map((n)=>ar(n)==="w:tc"?{"w:tc":rn(n,"w:tc").map((s)=>ar(s)==="w:p"?nw(s,r):s)}:n)}}get CellCount(){return this.options.children.length}get cells(){return this.root.filter((e)=>Xt(e)==="w:tc")}addCellToIndex(e,t){this.root.splice(t+1,0,e)}addCellToColumnIndex(e,t){let r=this.columnIndexToRootIndex(t,!0);this.addCellToIndex(e,r-1)}rootIndexToColumnIndex(e){if(e<1||e>=this.root.length)throw Error(`cell 'rootIndex' should between 1 to ${this.root.length-1}`);let t=0;for(let r=1;r=this.root.length)if(t)return this.root.length;else throw Error(`cell 'columnIndex' should not great than ${r-1}`);let s=this.root[n];n+=1,r+=s&&s.options.columnSpan||1}return n-1}},sw=class e extends Er{constructor({rows:t,width:r,columnWidths:n,columnWidthsRevision:s,margins:i,indent:o,float:a,layout:u,style:l,borders:c,alignment:h,visuallyRightToLeft:d,tableLook:f,cellSpacing:p,revision:v}){super("w:tbl");m(this,"rows",void 0),m(this,"width",void 0),m(this,"columnWidths",void 0),m(this,"columnWidthsRevision",void 0),m(this,"resolvedColumnWidths",void 0),this.rows=t,this.width=r!==null&&r!==void 0?r:{size:100},this.columnWidths=n,this.columnWidthsRevision=s,t.forEach((g,A)=>{if(A===t.length-1)return;let C=0;g.cells.forEach((b)=>{if(b.options.rowSpan&&b.options.rowSpan>1){let P=b.options.children[b.options.children.length-1],_=new Es({rowSpan:b.options.rowSpan-1,columnSpan:b.options.columnSpan,width:b.options.width,borders:b.options.borders,shading:b.options.shading,margins:b.options.margins,textDirection:b.options.textDirection,verticalAlign:b.options.verticalAlign,children:P instanceof fe?[new fe(P.Alignment)]:[],verticalMerge:Pi.CONTINUE});t[A+1].addCellToColumnIndex(_,C)}C+=b.options.columnSpan||1})}),this.setCellWidths(Gr),this.resolvedColumnWidths=n!==null&&n!==void 0?n:$o({rows:t,width:this.width,availableWidth:Gr}),this.root.push(new gn({borders:l?c:c!==null&&c!==void 0?c:{},width:this.width,indent:o,float:a,layout:u,style:l,alignment:h,cellMargin:i,visuallyRightToLeft:d,tableLook:f,cellSpacing:p,revision:v})),this.root.push(new jr(this.resolvedColumnWidths,s));for(let g of t)this.root.push(g)}get ColumnWidths(){return this.resolvedColumnWidths}getCellWidth(t,r){let{cells:n}=t,s=n.indexOf(r);if(s===-1)return;let i=n.slice(0,s).reduce((a,u)=>a+(u.options.columnSpan||1),0),o=this.resolvedColumnWidths.slice(i,i+(r.options.columnSpan||1));return o.length===0?void 0:o.reduce((a,u)=>a+u,0)}prepForXml(t){if(this.setCellWidths(this.resolveAvailableWidth(t)),this.columnWidths===void 0){this.resolvedColumnWidths=$o({rows:this.rows,width:this.width,availableWidth:this.resolveAvailableWidth(t)});let r=this.root.findIndex((n)=>n instanceof jr);this.root[r]=new jr(this.resolvedColumnWidths,this.columnWidthsRevision)}return super.prepForXml(t)}setCellWidths(t){var r;if(this.columnWidths===void 0)return;let n=this.columnWidths.reduce((o,a)=>o+a,0),s=(r=Ri(this.width,t))!==null&&r!==void 0?r:0,i=n>0&&s>n?s/n:1;for(let o of this.rows){let a=0;for(let u of o.cells){let l=u.options.columnSpan||1,c=this.columnWidths.slice(a,a+l),h=Math.round(c.reduce((d,f)=>d+f,0)*i);if(c.length===l&&h>0)u.setColumnWidth(h);a+=l}}}resolveAvailableWidth(t){var r,n,s;let{stack:i}=t,o=i[i.length-1],a=i[i.length-2],u=i[i.length-3];if(o instanceof Es&&a instanceof bu&&u instanceof e){let d=u.getCellWidth(a,o);if(d!==void 0)return d}let l=i.findIndex((d)=>d instanceof ki),c=(r=t.file)===null||r===void 0||(r=r.Document)===null||r===void 0?void 0:r.View.Body,h=l>=0?i[l].getSectionPropertiesFor((n=i[l+1])!==null&&n!==void 0?n:this):c===null||c===void 0?void 0:c.getSectionPropertiesFor();return(s=h===null||h===void 0?void 0:h.AvailableTextWidth)!==null&&s!==void 0?s:Gr}},iw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}},ow=class extends y{constructor(){super("Properties");this.root.push(new iw({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"}))}},aw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{xmlns:"xmlns"})}},ct=(e,t)=>new x({name:"Default",attributes:{contentType:{key:"ContentType",value:e},extension:{key:"Extension",value:t}}}),ae=(e,t)=>new x({name:"Override",attributes:{contentType:{key:"ContentType",value:e},partName:{key:"PartName",value:t}}}),lw=class extends y{constructor({macros:e=!1}={}){super("Types");if(this.root.push(new aw({xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"})),this.root.push(ct("image/png","png")),this.root.push(ct("image/jpeg","jpeg")),this.root.push(ct("image/jpeg","jpg")),this.root.push(ct("image/bmp","bmp")),this.root.push(ct("image/gif","gif")),this.root.push(ct("image/svg+xml","svg")),this.root.push(ct("application/vnd.openxmlformats-package.relationships+xml","rels")),this.root.push(ct("application/xml","xml")),this.root.push(ct("application/vnd.openxmlformats-officedocument.obfuscatedFont","odttf")),this.root.push(ae(e?"application/vnd.ms-word.document.macroEnabled.main+xml":"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml","/word/document.xml")),this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml","/word/styles.xml")),this.root.push(ae("application/vnd.openxmlformats-package.core-properties+xml","/docProps/core.xml")),this.root.push(ae("application/vnd.openxmlformats-officedocument.custom-properties+xml","/docProps/custom.xml")),this.root.push(ae("application/vnd.openxmlformats-officedocument.extended-properties+xml","/docProps/app.xml")),this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml","/word/numbering.xml")),this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml","/word/footnotes.xml")),this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml","/word/endnotes.xml")),this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml","/word/settings.xml")),this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml","/word/fontTable.xml")),this.root.push(ae("application/vnd.openxmlformats-officedocument.theme+xml","/word/theme/theme1.xml")),e)this.root.push(ae("application/vnd.ms-office.vbaProject","/word/vbaProject.bin"))}addComments(){this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml","/word/comments.xml"))}addCommentsExtended(){this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.commentsExtended+xml","/word/commentsExtended.xml"))}addCommentsIds(){this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.commentsIds+xml","/word/commentsIds.xml"))}addFooter(e){this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml",`/word/footer${e}.xml`))}addOverride(e,t){this.root.push(ae(e,t))}addHeader(e){this.root.push(ae("application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml",`/word/header${e}.xml`))}},nn={wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/",dcterms:"http://purl.org/dc/terms/",dcmitype:"http://purl.org/dc/dcmitype/",xsi:"http://www.w3.org/2001/XMLSchema-instance",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",aink:"http://schemas.microsoft.com/office/drawing/2016/ink",am3d:"http://schemas.microsoft.com/office/drawing/2017/model3d",w16cex:"http://schemas.microsoft.com/office/word/2018/wordml/cex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16:"http://schemas.microsoft.com/office/word/2018/wordml",w16sdtdh:"http://schemas.microsoft.com/office/word/2020/wordml/sdtdatahash",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"},Sr=class extends L{constructor(e,t){super(w({Ignorable:t},Object.fromEntries(e.map((r)=>[r,nn[r]]))));m(this,"xmlKeys",w({Ignorable:"mc:Ignorable"},Object.fromEntries(Object.keys(nn).map((r)=>[r,`xmlns:${r}`]))))}},cw=class extends y{constructor(e){super("cp:coreProperties");if(this.root.push(new Sr(["cp","dc","dcterms","dcmitype","xsi"])),e.title)this.root.push(new yt("dc:title",e.title));if(e.subject)this.root.push(new yt("dc:subject",e.subject));if(e.creator)this.root.push(new yt("dc:creator",e.creator));if(e.keywords)this.root.push(new yt("cp:keywords",e.keywords));if(e.description)this.root.push(new yt("dc:description",e.description));if(e.lastModifiedBy)this.root.push(new yt("cp:lastModifiedBy",e.lastModifiedBy));if(e.revision)this.root.push(new yt("cp:revision",String(e.revision)));this.root.push(new Uo("dcterms:created")),this.root.push(new Uo("dcterms:modified"))}},uw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{type:"xsi:type"})}},Uo=class extends y{constructor(e){super(e);this.root.push(new uw({type:"dcterms:W3CDTF"})),this.root.push(Ya(new Date))}},hw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{xmlns:"xmlns",vt:"xmlns:vt"})}},dw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{formatId:"fmtid",pid:"pid",name:"name"})}},pw=class extends y{constructor(e,t){super("property");this.root.push(new dw({formatId:"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}",pid:e.toString(),name:t.name})),this.root.push(new mw(t.value))}},mw=class extends y{constructor(e){super("vt:lpwstr");this.root.push(e)}},fw=class extends y{constructor(e){super("Properties");m(this,"nextId",void 0),m(this,"properties",[]),this.root.push(new hw({xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties",vt:"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"})),this.nextId=2;for(let t of e)this.addCustomProperty(t)}prepForXml(e){return this.root.splice(1,this.root.length-1,...this.properties),super.prepForXml(e)}addCustomProperty(e){this.properties.push(new pw(this.nextId++,e))}},vw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{width:"w:w",space:"w:space"})}},ww=class extends y{constructor(e){super("w:col");this.root.push(new vw({width:ne(e.width),space:e.space===void 0?void 0:ne(e.space)}))}},gw=(e)=>new x({name:"ds:datastoreItem",attributes:{itemId:{key:"ds:itemID",value:e},namespace:{key:"xmlns:ds",value:"http://schemas.openxmlformats.org/officeDocument/2006/customXml"}},children:[new x({name:"ds:schemaRefs",children:[new x({name:"ds:schemaRef",attributes:{uri:{key:"ds:uri",value:"http://schemas.openxmlformats.org/officeDocument/2006/bibliography"}}})]})]}),yw={new:"wne:eventDocNew",open:"wne:eventDocOpen",close:"wne:eventDocClose",sync:"wne:eventDocSync",xmlAfterInsert:"wne:eventDocXmlAfterInsert",xmlBeforeDelete:"wne:eventDocXmlBeforeDelete",contentControlAfterAdd:"wne:eventDocContentControlAfterInsert",contentControlBeforeDelete:"wne:eventDocContentControlBeforeDelete",contentControlOnExit:"wne:eventDocContentControlOnExit",contentControlOnEnter:"wne:eventDocContentControlOnEnter",contentControlBeforeStoreUpdate:"wne:eventDocStoreUpdate",contentControlBeforeContentUpdate:"wne:eventDocContentControlContentUpdate",buildingBlockInsert:"wne:eventDocBuildingBlockAfterInsert"},xw=(e)=>new x({name:"wne:vbaSuppData",attributes:{namespace:{key:"xmlns:wne",value:"http://schemas.microsoft.com/office/word/2006/wordml"}},children:[new x({name:"wne:docEvents",children:Object.entries(yw).filter(([t])=>e.includes(t)).map(([,t])=>new x({name:t}))})]}),bw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{color:"w:color",themeColor:"w:themeColor",themeShade:"w:themeShade",themeTint:"w:themeTint"})}},Tu=class extends y{constructor({color:e,themeColor:t,themeShade:r,themeTint:n}){super("w:background");if(typeof e==="object"&&(t!==void 0||r!==void 0||n!==void 0))throw Error("Invalid background. Expected a theme color in color, or themeColor, themeShade and themeTint, not both");this.root.push(new Qs([{keys:xr,color:e},{key:"w:themeColor",value:t},{key:"w:themeShade",value:r===void 0?void 0:ps(r)},{key:"w:themeTint",value:n===void 0?void 0:ps(n)}]))}},Tw=class extends y{constructor(e){super("w:document");if(m(this,"body",void 0),this.root.push(new Sr(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps","cx","cx1","cx2","cx3","cx4","cx5","cx6","cx7","cx8","aink","am3d","w16cex","w16cid","w16","w16sdtdh","w16se"],"w14 w15 wp14")),this.body=new ki({pageNumbers:e.pageNumbers}),e.background)this.root.push(new Tu(e.background));this.root.push(this.body)}add(e){return this.body.push(e),this}get Body(){return this.body}},Ew=class{constructor(e){m(this,"document",void 0),m(this,"relationships",void 0),this.document=new Tw(e),this.relationships=new ce}get View(){return this.document}get Relationships(){return this.relationships}},Sw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}},Eu=class extends y{constructor(e,t){super("w:p");m(this,"paragraph",void 0),m(this,"mark",void 0),this.paragraph=e,this.mark=t}prepForXml(e){let t=this.paragraph.prepForXml(e)["w:p"],r=Array.isArray(t)?t:[],n=r.length>0&&"w:pPr"in r[0]?1:0;return{"w:p":[...r.slice(0,n),this.mark.prepForXml(e),...r.slice(n)]}}},Iw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{type:"w:type",id:"w:id"})}},Su=class extends se{constructor(){super({style:"EndnoteReference"});this.root.push(new pc)}},Wo={SEPARATOR:"separator",CONTINUATION_SEPARATOR:"continuationSeparator"},Vn=class extends y{constructor(e){super("w:endnote");this.root.push(new Iw({type:e.type,id:e.id}));for(let[t,r]of e.children.entries())this.root.push(t===0?new Eu(r,new Su):r)}},Aw=class extends y{constructor(){super("w:continuationSeparator")}},Iu=class extends se{constructor(){super({});this.root.push(new Aw)}},Cw=class extends y{constructor(){super("w:separator")}},Au=class extends se{constructor(){super({});this.root.push(new Cw)}},Li=class extends y{constructor(){super("w:endnotes");m(this,"ownNotes",new Map),m(this,"highestId",0),this.root.push(new Sw({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));let e=new Vn({id:-1,type:Wo.SEPARATOR,children:[new fe({spacing:{after:0,line:240,lineRule:Pt.AUTO},children:[new Au]})]});this.root.push(e);let t=new Vn({id:0,type:Wo.CONTINUATION_SEPARATOR,children:[new fe({spacing:{after:0,line:240,lineRule:Pt.AUTO},children:[new Iu]})]});this.root.push(t)}createEndnote(e,t){let r=new Vn({id:e,children:t});if(this.root.push(r),Number.isFinite(e))this.highestId=Math.max(this.highestId,Math.floor(e))}idOf(e,t,r){if(r.viewWrapper!==r.file.Document)return;let n=this.ownNotes.get(e);if(n!==void 0)return n;let s=this.highestId+1;return this.createEndnote(s,t.children),this.ownNotes.set(e,s),s}prepForXml(e){let t=super.prepForXml(e);return zt(t,e),t}},Nw=class{constructor(){m(this,"endnotes",void 0),m(this,"relationships",void 0),this.endnotes=new Li,this.relationships=new ce}get View(){return this.endnotes}get Relationships(){return this.relationships}},kw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type"})}},Rw=class extends Xs{constructor(e,t){super("w:ftr",t);if(m(this,"refId",void 0),this.refId=e,!t)this.root.push(new kw({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}prepForXml(e){let t=super.prepForXml(e);return zt(t,e,this.refId),t}},Cu=class{constructor(e,t,r){m(this,"media",void 0),m(this,"footer",void 0),m(this,"relationships",void 0),this.media=e,this.footer=new Rw(t,r),this.relationships=new ce}add(e){this.footer.add(e)}addChildElement(e){this.footer.addChildElement(e)}get View(){return this.footer}get Relationships(){return this.relationships}get Media(){return this.media}},Pw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{type:"w:type",id:"w:id"})}},Ow=class extends y{constructor(){super("w:footnoteRef")}},Nu=class extends se{constructor(){super({style:"FootnoteReference"});this.root.push(new Ow)}},Go={SEPERATOR:"separator",CONTINUATION_SEPERATOR:"continuationSeparator"},Xn=class extends y{constructor(e){super("w:footnote");this.root.push(new Pw({type:e.type,id:e.id}));for(let[t,r]of e.children.entries())this.root.push(t===0?new Eu(r,new Nu):r)}},_w=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}},Di=class extends y{constructor(){super("w:footnotes");m(this,"ownNotes",new Map),m(this,"highestId",0),this.root.push(new _w({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"}));let e=new Xn({id:-1,type:Go.SEPERATOR,children:[new fe({spacing:{after:0,line:240,lineRule:Pt.AUTO},children:[new Au]})]});this.root.push(e);let t=new Xn({id:0,type:Go.CONTINUATION_SEPERATOR,children:[new fe({spacing:{after:0,line:240,lineRule:Pt.AUTO},children:[new Iu]})]});this.root.push(t)}createFootNote(e,t){let r=new Xn({id:e,children:t});if(this.root.push(r),Number.isFinite(e))this.highestId=Math.max(this.highestId,Math.floor(e))}idOf(e,t,r){if(r.viewWrapper!==r.file.Document)return;let n=this.ownNotes.get(e);if(n!==void 0)return n;let s=this.highestId+1;return this.createFootNote(s,t.children),this.ownNotes.set(e,s),s}prepForXml(e){let t=super.prepForXml(e);return zt(t,e),t}},Lw=class{constructor(){m(this,"footnotess",void 0),m(this,"relationships",void 0),this.footnotess=new Di,this.relationships=new ce}get View(){return this.footnotess}get Relationships(){return this.relationships}},Dw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",cp:"xmlns:cp",dc:"xmlns:dc",dcterms:"xmlns:dcterms",dcmitype:"xmlns:dcmitype",xsi:"xmlns:xsi",type:"xsi:type",cx:"xmlns:cx",cx1:"xmlns:cx1",cx2:"xmlns:cx2",cx3:"xmlns:cx3",cx4:"xmlns:cx4",cx5:"xmlns:cx5",cx6:"xmlns:cx6",cx7:"xmlns:cx7",cx8:"xmlns:cx8",w16cid:"xmlns:w16cid",w16se:"xmlns:w16se"})}},Mw=class extends Xs{constructor(e,t){super("w:hdr",t);if(m(this,"refId",void 0),this.refId=e,!t)this.root.push(new Dw({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",cx:"http://schemas.microsoft.com/office/drawing/2014/chartex",cx1:"http://schemas.microsoft.com/office/drawing/2015/9/8/chartex",cx2:"http://schemas.microsoft.com/office/drawing/2015/10/21/chartex",cx3:"http://schemas.microsoft.com/office/drawing/2016/5/9/chartex",cx4:"http://schemas.microsoft.com/office/drawing/2016/5/10/chartex",cx5:"http://schemas.microsoft.com/office/drawing/2016/5/11/chartex",cx6:"http://schemas.microsoft.com/office/drawing/2016/5/12/chartex",cx7:"http://schemas.microsoft.com/office/drawing/2016/5/13/chartex",cx8:"http://schemas.microsoft.com/office/drawing/2016/5/14/chartex",w16cid:"http://schemas.microsoft.com/office/word/2016/wordml/cid",w16se:"http://schemas.microsoft.com/office/word/2015/wordml/symex"}))}get ReferenceId(){return this.refId}add(e){this.root.push(e)}prepForXml(e){let t=super.prepForXml(e);return zt(t,e,this.refId),t}},ku=class{constructor(e,t,r){m(this,"media",void 0),m(this,"header",void 0),m(this,"relationships",void 0),this.media=e,this.header=new Mw(t,r),this.relationships=new ce}add(e){return this.header.add(e),this}addChildElement(e){this.header.addChildElement(e)}get View(){return this.header}get Relationships(){return this.relationships}get Media(){return this.media}},Fw=()=>{let e=new Map;return(t)=>{var r;let n=((r=e.get(t))!==null&&r!==void 0?r:0)+1;return e.set(t,n),`media/image${n}.${t}`}},Mi=class{constructor(e=Fw()){m(this,"map",new Map),m(this,"takePath",void 0),this.takePath=e}addImage(e,t){if(this.map.has(e))return;let r=this.takePath(t.type);this.map.set(e,w(w({},t),{},{fileName:r.slice(r.lastIndexOf("/")+1)}))}get Array(){return Array.from(this.map.values())}get Entries(){return Array.from(this.map.entries())}},ze={DECIMAL:"decimal",UPPER_ROMAN:"upperRoman",LOWER_ROMAN:"lowerRoman",UPPER_LETTER:"upperLetter",LOWER_LETTER:"lowerLetter",ORDINAL:"ordinal",CARDINAL_TEXT:"cardinalText",ORDINAL_TEXT:"ordinalText",HEX:"hex",CHICAGO:"chicago",IDEOGRAPH__DIGITAL:"ideographDigital",JAPANESE_COUNTING:"japaneseCounting",AIUEO:"aiueo",IROHA:"iroha",DECIMAL_FULL_WIDTH:"decimalFullWidth",DECIMAL_HALF_WIDTH:"decimalHalfWidth",JAPANESE_LEGAL:"japaneseLegal",JAPANESE_DIGITAL_TEN_THOUSAND:"japaneseDigitalTenThousand",DECIMAL_ENCLOSED_CIRCLE:"decimalEnclosedCircle",DECIMAL_FULL_WIDTH2:"decimalFullWidth2",AIUEO_FULL_WIDTH:"aiueoFullWidth",IROHA_FULL_WIDTH:"irohaFullWidth",DECIMAL_ZERO:"decimalZero",BULLET:"bullet",GANADA:"ganada",CHOSUNG:"chosung",DECIMAL_ENCLOSED_FULLSTOP:"decimalEnclosedFullstop",DECIMAL_ENCLOSED_PARENTHESES:"decimalEnclosedParen",DECIMAL_ENCLOSED_CIRCLE_CHINESE:"decimalEnclosedCircleChinese",IDEOGRAPH_ENCLOSED_CIRCLE:"ideographEnclosedCircle",IDEOGRAPH_TRADITIONAL:"ideographTraditional",IDEOGRAPH_ZODIAC:"ideographZodiac",IDEOGRAPH_ZODIAC_TRADITIONAL:"ideographZodiacTraditional",TAIWANESE_COUNTING:"taiwaneseCounting",IDEOGRAPH_LEGAL_TRADITIONAL:"ideographLegalTraditional",TAIWANESE_COUNTING_THOUSAND:"taiwaneseCountingThousand",TAIWANESE_DIGITAL:"taiwaneseDigital",CHINESE_COUNTING:"chineseCounting",CHINESE_LEGAL_SIMPLIFIED:"chineseLegalSimplified",CHINESE_COUNTING_THOUSAND:"chineseCountingThousand",KOREAN_DIGITAL:"koreanDigital",KOREAN_COUNTING:"koreanCounting",KOREAN_LEGAL:"koreanLegal",KOREAN_DIGITAL2:"koreanDigital2",VIETNAMESE_COUNTING:"vietnameseCounting",RUSSIAN_LOWER:"russianLower",RUSSIAN_UPPER:"russianUpper",NONE:"none",NUMBER_IN_DASH:"numberInDash",HEBREW1:"hebrew1",HEBREW2:"hebrew2",ARABIC_ALPHA:"arabicAlpha",ARABIC_ABJAD:"arabicAbjad",HINDI_VOWELS:"hindiVowels",HINDI_CONSONANTS:"hindiConsonants",HINDI_NUMBERS:"hindiNumbers",HINDI_COUNTING:"hindiCounting",THAI_LETTERS:"thaiLetters",THAI_NUMBERS:"thaiNumbers",THAI_COUNTING:"thaiCounting",BAHT_TEXT:"bahtText",DOLLAR_TEXT:"dollarText",CUSTOM:"custom"},Bw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{ilvl:"w:ilvl",tentative:"w:tentative"})}},$w=class extends y{constructor(e){super("w:numFmt");this.root.push(new we({val:e}))}},Hw=class extends y{constructor(e){super("w:lvlText");this.root.push(new we({val:e}))}},Uw=(e)=>{switch(e){case me.CENTER:return"center";case me.END:case me.RIGHT:return"right";default:return"left"}},Ww=class extends y{constructor(e){super("w:lvlJc");this.root.push(new we({val:Uw(e)}))}},Gw={NOTHING:"nothing",SPACE:"space",TAB:"tab"},jw=class extends y{constructor(e){super("w:suff");this.root.push(new we({val:e}))}},Vw=class extends y{constructor(){super("w:isLgl")}},Fi=class extends y{constructor({level:e,format:t,text:r,alignment:n=me.START,start:s=1,style:i,suffix:o,isLegalNumberingStyle:a}){super("w:lvl");if(m(this,"paragraphProperties",void 0),m(this,"runProperties",void 0),this.root.push(new Gt("w:start",X(s))),t)this.root.push(new $w(t));if(i===null||i===void 0?void 0:i.style)this.root.push(Wt(i.style));if(a)this.root.push(new Vw);if(o)this.root.push(new jw(o));if(r)this.root.push(new Hw(r));if(this.root.push(new Ww(n)),this.paragraphProperties=new bt(i&&i.paragraph,{implicitListParagraphStyle:!1,inListOrder:!1}),this.runProperties=new nt((i===null||i===void 0?void 0:i.run)&&w(w({},i.run),{},{highlight:void 0,math:void 0,revision:void 0})),this.root.push(this.paragraphProperties),this.root.push(this.runProperties),e>9)throw Error("Level cannot be greater than 9. Read more here: https://answers.microsoft.com/en-us/msoffice/forum/all/does-word-support-more-than-9-list-levels/d130fdcd-1781-446d-8c84-c6c79124e4d7");this.root.push(new Bw({ilvl:X(e),tentative:1}))}},Ru=class extends Fi{},Xw=class extends Fi{},Kw=class extends y{constructor(e){super("w:multiLevelType");this.root.push(new we({val:e}))}},zw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{abstractNumId:"w:abstractNumId",restartNumberingAfterBreak:"w15:restartNumberingAfterBreak"})}},Xr=class extends y{constructor(e,t){super("w:abstractNum");m(this,"id",void 0),this.root.push(new zw({abstractNumId:X(e),restartNumberingAfterBreak:0})),this.root.push(new Kw("hybridMultilevel")),this.id=e;for(let r of t)this.root.push(new Ru(r))}},Yw=class extends y{constructor(e){super("w:abstractNumId");this.root.push(new we({val:e}))}},qw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{numId:"w:numId"})}},Is=class extends y{constructor(e){super("w:num");if(m(this,"numId",void 0),m(this,"reference",void 0),m(this,"instance",void 0),m(this,"restartedListId",void 0),this.numId=e.numId,this.reference=e.reference,this.instance=e.instance,this.restartedListId=e.restartedListId,this.root.push(new qw({numId:X(e.numId)})),this.root.push(new Yw(X(e.abstractNumId))),e.overrideLevels&&e.overrideLevels.length)for(let t of e.overrideLevels)this.root.push(new Pu(t.num,t.start))}},Jw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{ilvl:"w:ilvl"})}},Pu=class extends y{constructor(e,t){super("w:lvlOverride");if(this.root.push(new Jw({ilvl:e})),t!==void 0)this.root.push(new Qw(t))}},Zw=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{val:"w:val"})}},Qw=class extends y{constructor(e){super("w:startOverride");this.root.push(new Zw({val:e}))}},Bi=class extends y{constructor(e){super("w:numbering");m(this,"abstractNumberingMap",new Map),m(this,"concreteNumberingMap",new Map),m(this,"referenceConfigMap",new Map),m(this,"abstractNumUniqueNumericId",ll()),m(this,"concreteNumUniqueNumericId",cl()),this.root.push(new Sr(["wpc","mc","o","r","m","v","wp14","wp","w10","w","w14","w15","wpg","wpi","wne","wps"],"w14 w15 wp14"));let t=new Xr(this.abstractNumUniqueNumericId(),[{level:0,format:ze.BULLET,text:"●",alignment:me.LEFT,style:{paragraph:{indent:{left:Ne(0.5),hanging:Ne(0.25)}}}},{level:1,format:ze.BULLET,text:"○",alignment:me.LEFT,style:{paragraph:{indent:{left:Ne(1),hanging:Ne(0.25)}}}},{level:2,format:ze.BULLET,text:"■",alignment:me.LEFT,style:{paragraph:{indent:{left:2160,hanging:Ne(0.25)}}}},{level:3,format:ze.BULLET,text:"●",alignment:me.LEFT,style:{paragraph:{indent:{left:2880,hanging:Ne(0.25)}}}},{level:4,format:ze.BULLET,text:"○",alignment:me.LEFT,style:{paragraph:{indent:{left:3600,hanging:Ne(0.25)}}}},{level:5,format:ze.BULLET,text:"■",alignment:me.LEFT,style:{paragraph:{indent:{left:4320,hanging:Ne(0.25)}}}},{level:6,format:ze.BULLET,text:"●",alignment:me.LEFT,style:{paragraph:{indent:{left:5040,hanging:Ne(0.25)}}}},{level:7,format:ze.BULLET,text:"●",alignment:me.LEFT,style:{paragraph:{indent:{left:5760,hanging:Ne(0.25)}}}},{level:8,format:ze.BULLET,text:"●",alignment:me.LEFT,style:{paragraph:{indent:{left:6480,hanging:Ne(0.25)}}}}]);this.concreteNumberingMap.set("default-bullet-numbering",new Is({numId:1,abstractNumId:t.id,reference:"default-bullet-numbering",instance:0,overrideLevels:[{num:0,start:1}]})),this.abstractNumberingMap.set("default-bullet-numbering",t);for(let r of e.config)this.abstractNumberingMap.set(r.reference,new Xr(this.abstractNumUniqueNumericId(),r.levels)),this.referenceConfigMap.set(r.reference,r.levels)}prepForXml(e){return this.root.splice(1,this.root.length-1,...this.abstractNumberingMap.values(),...this.concreteNumberingMap.values()),super.prepForXml(e)}createConcreteNumberingInstance(e,t,r,n){var s;if(r&&!this.abstractNumberingMap.has(r.reference))this.abstractNumberingMap.set(r.reference,new Xr(this.abstractNumUniqueNumericId(),r.levels)),this.referenceConfigMap.set(r.reference,r.levels);let i=this.abstractNumberingMap.get(e);if(!i)return;let o=en(e,t,n);if(this.concreteNumberingMap.has(o))return;let a=(s=this.referenceConfigMap.get(e))!==null&&s!==void 0?s:[{level:0}],u={numId:this.concreteNumUniqueNumericId(),abstractNumId:i.id,reference:e,instance:t,restartedListId:n,overrideLevels:a.map(({level:l,start:c=1})=>({num:l,start:X(c)}))};this.concreteNumberingMap.set(o,new Is(u))}get ConcreteNumbering(){return Array.from(this.concreteNumberingMap.values())}get ReferenceConfig(){return Array.from(this.referenceConfigMap.values())}},Kn=/^[\w-]+$/,eg=new Set(["_rels","fonts","theme"]),Ou=class{constructor(e){if(m(this,"options",void 0),m(this,"id",vt()),m(this,"relationshipId",`rId${this.id}`),m(this,"addedTo",new WeakSet),this.options=e,!Kn.test(e.folder)||eg.has(e.folder))throw Error(`Invalid package part folder "${e.folder}". Expected a folder name docx doesn't use, such as "charts"`);if(!Kn.test(e.name))throw Error(`Invalid package part name "${e.name}". Expected letters, digits, "_" and "-", such as "chart"`);if(!Kn.test(e.extension))throw Error(`Invalid package part extension "${e.extension}". Expected letters, digits, "_" and "-", such as "xml"`)}addTo(e){let t=e.file.PackageParts,r=t.add(this),n=e.viewWrapper.Relationships;if(this.addedTo.has(n))return;this.addedTo.add(n),n.addRelationship(this.id,this.options.relationshipType,t.getTarget(n,r))}};var _u=class{constructor(e,t=new Set){m(this,"contentTypes",void 0),m(this,"paths",new Map),m(this,"taken",void 0),m(this,"folders",new WeakMap),this.contentTypes=e,this.taken=new Set(t)}add(e){let t=this.paths.get(e);if(t!==void 0)return t;let{folder:r,name:n,extension:s,contentType:i}=e.options,o=this.takePath(r,n,s);return this.paths.set(e,o),this.contentTypes.addOverride(i,`/word/${o}`),o}takePath(e,t,r){let n=1;while(this.taken.has(`${e}/${t}${n}.${r}`))n++;let s=`${e}/${t}${n}.${r}`;return this.taken.add(s),s}get Array(){return[...this.paths].map(([e,t])=>({part:e,path:t}))}createRelationships(e){let t=new ce;return this.folders.set(t,e.slice(0,e.indexOf("/"))),t}getTarget(e,t){let r=this.folders.get(e);if(r===void 0)return t;return t.startsWith(`${r}/`)?t.slice(r.length+1):`../${t}`}},tg=(e)=>new x({name:"w:compatSetting",attributes:{version:{key:"w:val",value:e},name:{key:"w:name",value:"compatibilityMode"},uri:{key:"w:uri",value:"http://schemas.microsoft.com/office/word"}}}),rg=class extends y{constructor(e){super("w:compat");if(e.useSingleBorderforContiguousCells)this.root.push(new k("w:useSingleBorderforContiguousCells",e.useSingleBorderforContiguousCells));if(e.wordPerfectJustification)this.root.push(new k("w:wpJustification",e.wordPerfectJustification));if(e.noTabStopForHangingIndent)this.root.push(new k("w:noTabHangInd",e.noTabStopForHangingIndent));if(e.noLeading)this.root.push(new k("w:noLeading",e.noLeading));if(e.spaceForUnderline)this.root.push(new k("w:spaceForUL",e.spaceForUnderline));if(e.noColumnBalance)this.root.push(new k("w:noColumnBalance",e.noColumnBalance));if(e.balanceSingleByteDoubleByteWidth)this.root.push(new k("w:balanceSingleByteDoubleByteWidth",e.balanceSingleByteDoubleByteWidth));if(e.noExtraLineSpacing)this.root.push(new k("w:noExtraLineSpacing",e.noExtraLineSpacing));if(e.doNotLeaveBackslashAlone)this.root.push(new k("w:doNotLeaveBackslashAlone",e.doNotLeaveBackslashAlone));if(e.underlineTrailingSpaces)this.root.push(new k("w:ulTrailSpace",e.underlineTrailingSpaces));if(e.doNotExpandShiftReturn)this.root.push(new k("w:doNotExpandShiftReturn",e.doNotExpandShiftReturn));if(e.spacingInWholePoints)this.root.push(new k("w:spacingInWholePoints",e.spacingInWholePoints));if(e.lineWrapLikeWord6)this.root.push(new k("w:lineWrapLikeWord6",e.lineWrapLikeWord6));if(e.printBodyTextBeforeHeader)this.root.push(new k("w:printBodyTextBeforeHeader",e.printBodyTextBeforeHeader));if(e.printColorsBlack)this.root.push(new k("w:printColBlack",e.printColorsBlack));if(e.spaceWidth)this.root.push(new k("w:wpSpaceWidth",e.spaceWidth));if(e.showBreaksInFrames)this.root.push(new k("w:showBreaksInFrames",e.showBreaksInFrames));if(e.subFontBySize)this.root.push(new k("w:subFontBySize",e.subFontBySize));if(e.suppressBottomSpacing)this.root.push(new k("w:suppressBottomSpacing",e.suppressBottomSpacing));if(e.suppressTopSpacing)this.root.push(new k("w:suppressTopSpacing",e.suppressTopSpacing));if(e.suppressSpacingAtTopOfPage)this.root.push(new k("w:suppressSpacingAtTopOfPage",e.suppressSpacingAtTopOfPage));if(e.suppressTopSpacingWP)this.root.push(new k("w:suppressTopSpacingWP",e.suppressTopSpacingWP));if(e.suppressSpBfAfterPgBrk)this.root.push(new k("w:suppressSpBfAfterPgBrk",e.suppressSpBfAfterPgBrk));if(e.swapBordersFacingPages)this.root.push(new k("w:swapBordersFacingPages",e.swapBordersFacingPages));if(e.convertMailMergeEsc)this.root.push(new k("w:convMailMergeEsc",e.convertMailMergeEsc));if(e.truncateFontHeightsLikeWP6)this.root.push(new k("w:truncateFontHeightsLikeWP6",e.truncateFontHeightsLikeWP6));if(e.macWordSmallCaps)this.root.push(new k("w:mwSmallCaps",e.macWordSmallCaps));if(e.usePrinterMetrics)this.root.push(new k("w:usePrinterMetrics",e.usePrinterMetrics));if(e.doNotSuppressParagraphBorders)this.root.push(new k("w:doNotSuppressParagraphBorders",e.doNotSuppressParagraphBorders));if(e.wrapTrailSpaces)this.root.push(new k("w:wrapTrailSpaces",e.wrapTrailSpaces));if(e.footnoteLayoutLikeWW8)this.root.push(new k("w:footnoteLayoutLikeWW8",e.footnoteLayoutLikeWW8));if(e.shapeLayoutLikeWW8)this.root.push(new k("w:shapeLayoutLikeWW8",e.shapeLayoutLikeWW8));if(e.alignTablesRowByRow)this.root.push(new k("w:alignTablesRowByRow",e.alignTablesRowByRow));if(e.forgetLastTabAlignment)this.root.push(new k("w:forgetLastTabAlignment",e.forgetLastTabAlignment));if(e.adjustLineHeightInTable)this.root.push(new k("w:adjustLineHeightInTable",e.adjustLineHeightInTable));if(e.autoSpaceLikeWord95)this.root.push(new k("w:autoSpaceLikeWord95",e.autoSpaceLikeWord95));if(e.noSpaceRaiseLower)this.root.push(new k("w:noSpaceRaiseLower",e.noSpaceRaiseLower));if(e.doNotUseHTMLParagraphAutoSpacing)this.root.push(new k("w:doNotUseHTMLParagraphAutoSpacing",e.doNotUseHTMLParagraphAutoSpacing));if(e.layoutRawTableWidth)this.root.push(new k("w:layoutRawTableWidth",e.layoutRawTableWidth));if(e.layoutTableRowsApart)this.root.push(new k("w:layoutTableRowsApart",e.layoutTableRowsApart));if(e.useWord97LineBreakRules)this.root.push(new k("w:useWord97LineBreakRules",e.useWord97LineBreakRules));if(e.doNotBreakWrappedTables)this.root.push(new k("w:doNotBreakWrappedTables",e.doNotBreakWrappedTables));if(e.doNotSnapToGridInCell)this.root.push(new k("w:doNotSnapToGridInCell",e.doNotSnapToGridInCell));if(e.selectFieldWithFirstOrLastCharacter)this.root.push(new k("w:selectFldWithFirstOrLastChar",e.selectFieldWithFirstOrLastCharacter));if(e.applyBreakingRules)this.root.push(new k("w:applyBreakingRules",e.applyBreakingRules));if(e.doNotWrapTextWithPunctuation)this.root.push(new k("w:doNotWrapTextWithPunct",e.doNotWrapTextWithPunctuation));if(e.doNotUseEastAsianBreakRules)this.root.push(new k("w:doNotUseEastAsianBreakRules",e.doNotUseEastAsianBreakRules));if(e.useWord2002TableStyleRules)this.root.push(new k("w:useWord2002TableStyleRules",e.useWord2002TableStyleRules));if(e.growAutofit)this.root.push(new k("w:growAutofit",e.growAutofit));if(e.useFELayout)this.root.push(new k("w:useFELayout",e.useFELayout));if(e.useNormalStyleForList)this.root.push(new k("w:useNormalStyleForList",e.useNormalStyleForList));if(e.doNotUseIndentAsNumberingTabStop)this.root.push(new k("w:doNotUseIndentAsNumberingTabStop",e.doNotUseIndentAsNumberingTabStop));if(e.useAlternateEastAsianLineBreakRules)this.root.push(new k("w:useAltKinsokuLineBreakRules",e.useAlternateEastAsianLineBreakRules));if(e.allowSpaceOfSameStyleInTable)this.root.push(new k("w:allowSpaceOfSameStyleInTable",e.allowSpaceOfSameStyleInTable));if(e.doNotSuppressIndentation)this.root.push(new k("w:doNotSuppressIndentation",e.doNotSuppressIndentation));if(e.doNotAutofitConstrainedTables)this.root.push(new k("w:doNotAutofitConstrainedTables",e.doNotAutofitConstrainedTables));if(e.autofitToFirstFixedWidthCell)this.root.push(new k("w:autofitToFirstFixedWidthCell",e.autofitToFirstFixedWidthCell));if(e.underlineTabInNumberingList)this.root.push(new k("w:underlineTabInNumList",e.underlineTabInNumberingList));if(e.displayHangulFixedWidth)this.root.push(new k("w:displayHangulFixedWidth",e.displayHangulFixedWidth));if(e.splitPgBreakAndParaMark)this.root.push(new k("w:splitPgBreakAndParaMark",e.splitPgBreakAndParaMark));if(e.doNotVerticallyAlignCellWithSp)this.root.push(new k("w:doNotVertAlignCellWithSp",e.doNotVerticallyAlignCellWithSp));if(e.doNotBreakConstrainedForcedTable)this.root.push(new k("w:doNotBreakConstrainedForcedTable",e.doNotBreakConstrainedForcedTable));if(e.ignoreVerticalAlignmentInTextboxes)this.root.push(new k("w:doNotVertAlignInTxbx",e.ignoreVerticalAlignmentInTextboxes));if(e.useAnsiKerningPairs)this.root.push(new k("w:useAnsiKerningPairs",e.useAnsiKerningPairs));if(e.cachedColumnBalance)this.root.push(new k("w:cachedColBalance",e.cachedColumnBalance));if(e.version)this.root.push(tg(e.version))}},jo=1e5,Vo=15,ng=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163],sg=[[44796,19929,39858,10053,20106,40212,10761],[31585,63170,64933,60267,50935,40399,11199],[17763,35526,1453,2906,5812,11624,23248],[885,1770,3540,7080,14160,28320,56640],[55369,41139,20807,41614,21821,43642,17621],[28485,56970,44341,19019,38038,14605,29210],[60195,50791,40175,10751,21502,43004,24537],[18387,36774,3949,7898,15796,31592,63184],[47201,24803,49606,37805,14203,28406,56812],[17824,35648,1697,3394,6788,13576,27152],[43601,17539,35078,557,1114,2228,4456],[30388,60776,51953,34243,7079,14158,28316],[14128,28256,56512,43425,17251,34502,7597],[13105,26210,52420,35241,883,1766,3532],[4129,8258,16516,33032,4657,9314,18628]],Xo=(e)=>e>>14&1|e<<1&32767,ig=(e)=>{let t=e.slice(0,Vo).split("").map((s)=>{let i=s.charCodeAt(0);return(i&255)!==0?i&255:i>>8&255}),r=t.reduce((s,i,o)=>sg[Vo-t.length+o].reduce((a,u,l)=>i>>l&1?a^u:a,s),ng[t.length-1]),n=(Xo(t.reduceRight((s,i)=>Xo(s)^i,0))^t.length^52811)&65535;return[n&255,n>>8,r&255,r>>8].map((s)=>s.toString(16).toUpperCase().padStart(2,"0")).join("")},og=(e,t,r)=>{let n=[...ig(e)].flatMap((a)=>[a.charCodeAt(0),0]),s=Ro(Uint8Array.from([...t,...n])),i=new Uint8Array(s.length+4),o=new DataView(i.buffer);for(let a=0;a{var t;let r=new Uint8Array(e);if(typeof((t=globalThis.crypto)===null||t===void 0?void 0:t.getRandomValues)==="function")return globalThis.crypto.getRandomValues(r),[...r];return[...r].map(()=>Math.floor(Math.random()*256))},lg={READ_ONLY:"readOnly",COMMENTS:"comments",TRACKED_CHANGES:"trackedChanges",FORMS:"forms"},Ko=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{edit:"w:edit",enforcement:"w:enforcement",cryptProviderType:"w:cryptProviderType",cryptAlgorithmClass:"w:cryptAlgorithmClass",cryptAlgorithmType:"w:cryptAlgorithmType",cryptAlgorithmSid:"w:cryptAlgorithmSid",cryptSpinCount:"w:cryptSpinCount",hash:"w:hash",salt:"w:salt"})}},zo=(e)=>btoa(String.fromCharCode(...e)),cg=class extends y{constructor({type:e,password:t}){super("w:documentProtection");if(t===void 0||t===""){this.root.push(new Ko({edit:e,enforcement:!0}));return}let r=ag(16);this.root.push(new Ko({edit:e,enforcement:!0,cryptProviderType:"rsaAES",cryptAlgorithmClass:"hash",cryptAlgorithmType:"typeAny",cryptAlgorithmSid:12,cryptSpinCount:jo,hash:zo(og(t,r,jo)),salt:zo(r)}))}},ug=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{wpc:"xmlns:wpc",mc:"xmlns:mc",o:"xmlns:o",r:"xmlns:r",m:"xmlns:m",v:"xmlns:v",wp14:"xmlns:wp14",wp:"xmlns:wp",w10:"xmlns:w10",w:"xmlns:w",w14:"xmlns:w14",w15:"xmlns:w15",wpg:"xmlns:wpg",wpi:"xmlns:wpi",wne:"xmlns:wne",wps:"xmlns:wps",Ignorable:"mc:Ignorable"})}},hg=class extends y{constructor(e){var t,r,n,s,i,o,a,u,l;super("w:settings");if(this.root.push(new ug({wpc:"http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas",mc:"http://schemas.openxmlformats.org/markup-compatibility/2006",o:"urn:schemas-microsoft-com:office:office",r:"http://schemas.openxmlformats.org/officeDocument/2006/relationships",m:"http://schemas.openxmlformats.org/officeDocument/2006/math",v:"urn:schemas-microsoft-com:vml",wp14:"http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing",wp:"http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing",w10:"urn:schemas-microsoft-com:office:word",w:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",w14:"http://schemas.microsoft.com/office/word/2010/wordml",w15:"http://schemas.microsoft.com/office/word/2012/wordml",wpg:"http://schemas.microsoft.com/office/word/2010/wordprocessingGroup",wpi:"http://schemas.microsoft.com/office/word/2010/wordprocessingInk",wne:"http://schemas.microsoft.com/office/word/2006/wordml",wps:"http://schemas.microsoft.com/office/word/2010/wordprocessingShape",Ignorable:"w14 w15 wp14"})),this.root.push(new k("w:displayBackgroundShape",!0)),e.embedFonts!==void 0)this.root.push(new k("w:embedTrueTypeFonts",e.embedFonts));if(e.trackRevisions!==void 0)this.root.push(new k("w:trackRevisions",e.trackRevisions));if(e.protection!==void 0)this.root.push(new cg(e.protection));if(this.root.push(new Gt("w:defaultTabStop",(t=e.defaultTabStop)!==null&&t!==void 0?t:720)),((r=e.hyphenation)===null||r===void 0?void 0:r.autoHyphenation)!==void 0)this.root.push(new k("w:autoHyphenation",e.hyphenation.autoHyphenation));if(((n=e.hyphenation)===null||n===void 0?void 0:n.consecutiveHyphenLimit)!==void 0)this.root.push(new Gt("w:consecutiveHyphenLimit",e.hyphenation.consecutiveHyphenLimit));if(((s=e.hyphenation)===null||s===void 0?void 0:s.hyphenationZone)!==void 0)this.root.push(new Gt("w:hyphenationZone",e.hyphenation.hyphenationZone));if(((i=e.hyphenation)===null||i===void 0?void 0:i.doNotHyphenateCaps)!==void 0)this.root.push(new k("w:doNotHyphenateCaps",e.hyphenation.doNotHyphenateCaps));if(e.evenAndOddHeaders!==void 0)this.root.push(new k("w:evenAndOddHeaders",e.evenAndOddHeaders));if(e.updateFields!==void 0)this.root.push(new k("w:updateFields",e.updateFields));this.root.push(new rg(w(w({},(o=e.compatibility)!==null&&o!==void 0?o:{}),{},{version:(a=(u=(l=e.compatibility)===null||l===void 0?void 0:l.version)!==null&&u!==void 0?u:e.compatibilityModeVersion)!==null&&a!==void 0?a:15})))}},Lu=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{val:"w:val"})}},dg=class extends y{constructor(e){super("w:name");this.root.push(new Lu({val:e}))}},pg=class extends y{constructor(e){super("w:uiPriority");this.root.push(new Lu({val:X(e)}))}},mg=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{type:"w:type",styleId:"w:styleId",default:"w:default",customStyle:"w:customStyle"})}},$i=class extends y{constructor(e,t){super("w:style");if(this.root.push(new mg(e)),t.name)this.root.push(new dg(t.name));if(t.basedOn&&t.basedOn!==e.styleId)this.root.push(new Ue("w:basedOn",t.basedOn));if(t.next)this.root.push(new Ue("w:next",t.next));if(t.link)this.root.push(new Ue("w:link",t.link));if(t.uiPriority!==void 0)this.root.push(new pg(t.uiPriority));if(t.semiHidden!==void 0)this.root.push(new k("w:semiHidden",t.semiHidden));if(t.unhideWhenUsed!==void 0)this.root.push(new k("w:unhideWhenUsed",t.unhideWhenUsed));if(t.quickFormat!==void 0)this.root.push(new k("w:qFormat",t.quickFormat))}},st=class extends $i{constructor(e){super({type:"paragraph",styleId:e.id},e);m(this,"paragraphProperties",void 0),m(this,"runProperties",void 0),this.paragraphProperties=new bt(e.paragraph,{implicitListParagraphStyle:!1,inListOrder:!1}),this.runProperties=new nt(e.run),this.root.push(this.paragraphProperties),this.root.push(this.runProperties)}},Et=class extends $i{constructor(e){super({type:"character",styleId:e.id},w({uiPriority:99,unhideWhenUsed:!0},e));m(this,"runProperties",void 0),this.runProperties=new nt(e.run),this.root.push(this.runProperties)}},St=class extends st{constructor(e){super(w({basedOn:"Normal",next:"Normal",quickFormat:!0},e))}},fg=class extends St{constructor(e){super(w({id:"Title",name:"Title"},e))}},vg=class extends St{constructor(e){super(w({id:"Heading1",name:"Heading 1"},e))}},wg=class extends St{constructor(e){super(w({id:"Heading2",name:"Heading 2"},e))}},gg=class extends St{constructor(e){super(w({id:"Heading3",name:"Heading 3"},e))}},yg=class extends St{constructor(e){super(w({id:"Heading4",name:"Heading 4"},e))}},xg=class extends St{constructor(e){super(w({id:"Heading5",name:"Heading 5"},e))}},bg=class extends St{constructor(e){super(w({id:"Heading6",name:"Heading 6"},e))}},Tg=class extends St{constructor(e){super(w({id:"Strong",name:"Strong"},e))}},Eg=class extends st{constructor(e){super(w({id:"ListParagraph",name:"List Paragraph",basedOn:"Normal",quickFormat:!0},e))}},Sg=class extends st{constructor(e){super(w({id:"Caption",name:"caption",basedOn:"Normal",next:"Normal",uiPriority:35,semiHidden:!0,unhideWhenUsed:!0,quickFormat:!0,paragraph:{spacing:{after:200}},run:{italics:!0,color:{theme:"dark2"},size:18}},e))}},Ig=class extends st{constructor(e){super(w({id:"Bibliography",name:"Bibliography",basedOn:"Normal",next:"Normal",uiPriority:37,unhideWhenUsed:!0},e))}},Du=new WeakSet,Yo=(e)=>Du.has(e),ut=class extends st{constructor(e,t){super({id:`TOC${e}`,name:`toc ${e}`,basedOn:"Normal",next:"Normal",uiPriority:39,semiHidden:!0,unhideWhenUsed:!0,paragraph:w({spacing:{after:100}},e>1?{indent:{left:(e-1)*t}}:{})})}prepForXml(e){let t=super.prepForXml(e);return Du.add(t),t}},Mu=class extends st{constructor(e){super(w({id:"FootnoteText",name:"footnote text",link:"FootnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Pt.AUTO}},run:{size:20}},e))}},Fu=class extends Et{constructor(e){super(w({id:"FootnoteReference",name:"footnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}},Bu=class extends Et{constructor(e){super(w({id:"FootnoteTextChar",name:"Footnote Text Char",basedOn:"DefaultParagraphFont",link:"FootnoteText",semiHidden:!0,run:{size:20}},e))}},$u=class extends st{constructor(e){super(w({id:"EndnoteText",name:"endnote text",link:"EndnoteTextChar",basedOn:"Normal",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0,paragraph:{spacing:{after:0,line:240,lineRule:Pt.AUTO}},run:{size:20}},e))}},Hu=class extends Et{constructor(e){super(w({id:"EndnoteReference",name:"endnote reference",basedOn:"DefaultParagraphFont",semiHidden:!0,run:{superScript:!0}},e))}},Uu=class extends Et{constructor(e){super(w({id:"EndnoteTextChar",name:"Endnote Text Char",basedOn:"DefaultParagraphFont",link:"EndnoteText",semiHidden:!0,run:{size:20}},e))}},Ag=class extends Et{constructor(e){super(w({id:"Hyperlink",name:"Hyperlink",basedOn:"DefaultParagraphFont",run:{color:"0563C1",underline:{type:ci.SINGLE}}},e))}},Cg=class extends Et{constructor(e){super(w({id:"LineNumber",name:"line number",basedOn:"DefaultParagraphFont",semiHidden:!0},e))}},Ng=class extends $i{constructor(){super({type:"table",styleId:"TableNormal",default:!0},{name:"Normal Table",uiPriority:99,semiHidden:!0,unhideWhenUsed:!0});this.root.push(new gn({indent:{size:0,type:Je.DXA},cellMargin:{top:0,left:108,bottom:0,right:108}}))}},lr=(e)=>typeof e==="object"?Object.keys(e)[0]:void 0,Hi=(e)=>{var t;return(t=[e["w:style"]].flat().find((r)=>r._attr))===null||t===void 0?void 0:t._attr},qo=(e)=>{var t;return(t=Hi(e))===null||t===void 0?void 0:t["w:styleId"]},Jo=(e)=>{var t;let r=(t=[e["w:style"]].flat().find((n)=>lr(n)==="w:name"))===null||t===void 0||(t=t["w:name"])===null||t===void 0||(t=t._attr)===null||t===void 0?void 0:t["w:val"];return r===void 0?void 0:String(r).toLowerCase()},As=(e)=>{var t,r;return lr(e)==="w:style"&&((t=(r=Hi(e))===null||r===void 0?void 0:r["w:type"])!==null&&t!==void 0?t:"paragraph")==="paragraph"},kg=(e)=>{let t=As(e)?Hi(e):void 0;return(t===null||t===void 0?void 0:t["w:default"])!==void 0&&!["0","false","off"].includes(String(t["w:default"]))},Rg=(e)=>({"w:style":[e["w:style"]].flat().map((t)=>t._attr?{_attr:w(w({},t._attr),{},{"w:default":"1"})}:t)}),Kr=class extends y{constructor(e){super("w:styles");if(e.initialStyles)this.root.push(e.initialStyles);if(e.importedStyles)for(let t of e.importedStyles)this.root.push(t);if(e.paragraphStyles)for(let t of e.paragraphStyles)this.root.push(new st(t));if(e.characterStyles)for(let t of e.characterStyles)this.root.push(new Et(t))}prepForXml(e){let t=super.prepForXml(e),r=t["w:styles"];if(!Array.isArray(r))return t;let n=(l)=>r.filter((c)=>lr(c)===l),s=r.map((l)=>lr(l)==="w:style"?qo(l):void 0),i=r.filter((l,c)=>!["_attr","w:docDefaults","w:latentStyles"].includes(lr(l))&&(s[c]===void 0||s.lastIndexOf(s[c])===c)),o=new Set(i.filter((l)=>As(l)&&!Yo(l)).map(Jo)),a=i.filter((l)=>!Yo(l)||!o.has(Jo(l))),u=a.some(kg)?a:a.map((l)=>As(l)&&qo(l)==="Normal"?Rg(l):l);return{"w:styles":[...n("_attr"),...n("w:docDefaults").slice(-1),...n("w:latentStyles").slice(-1),...u]}}},Wu=class extends y{constructor(e){super("w:pPrDefault");this.root.push(new bt(e,{implicitListParagraphStyle:!1,inListOrder:!1}))}},Gu=class extends y{constructor(e){super("w:rPrDefault");this.root.push(new nt(e))}},ju=class extends y{constructor(e){super("w:docDefaults");m(this,"runPropertiesDefaults",void 0),m(this,"paragraphPropertiesDefaults",void 0),this.runPropertiesDefaults=new Gu(e.run),this.paragraphPropertiesDefaults=new Wu(e.paragraph),this.root.push(this.runPropertiesDefaults),this.root.push(this.paragraphPropertiesDefaults)}},Pg=class{newInstance(e){let t=Kt(e),r;for(let s of t.elements||[])if(s.name==="w:styles")r=s;if(r===void 0)throw Error("can not find styles element");let n=r.elements||[];return{initialStyles:new Ga(r.attributes),importedStyles:n.map((s)=>un(s))}}},Og=(e)=>{var t;let r=(t=e.document)===null||t===void 0||(t=t.run)===null||t===void 0?void 0:t.size;if(r===void 0)return 200;return Math.round(typeof r==="number"?r*10:dt(r))},_g=(e)=>({tableOfContents1:new ut(1,e),tableOfContents2:new ut(2,e),tableOfContents3:new ut(3,e),tableOfContents4:new ut(4,e),tableOfContents5:new ut(5,e),tableOfContents6:new ut(6,e),tableOfContents7:new ut(7,e),tableOfContents8:new ut(8,e),tableOfContents9:new ut(9,e)}),Ui=(e={})=>{var t;return w(w({normal:new st({id:"Normal",name:"Normal",quickFormat:!0}),normalTable:new Ng,document:new ju((t=e.document)!==null&&t!==void 0?t:{}),title:new fg(w({run:{size:56}},e.title)),heading1:new vg(w({run:{color:"2E74B5",size:32}},e.heading1)),heading2:new wg(w({run:{color:"2E74B5",size:26}},e.heading2)),heading3:new gg(w({run:{color:"1F4D78",size:24}},e.heading3)),heading4:new yg(w({run:{color:"2E74B5",italics:!0}},e.heading4)),heading5:new xg(w({run:{color:"2E74B5"}},e.heading5)),heading6:new bg(w({run:{color:"1F4D78"}},e.heading6)),strong:new Tg(w({run:{bold:!0}},e.strong)),listParagraph:new Eg(e.listParagraph||{}),caption:new Sg(e.caption||{}),bibliography:new Ig(e.bibliography||{})},_g(Og(e))),{},{hyperlink:new Ag(e.hyperlink||{}),footnoteReference:new Fu(e.footnoteReference||{}),footnoteText:new Mu(e.footnoteText||{}),footnoteTextChar:new Bu(e.footnoteTextChar||{}),endnoteReference:new Hu(e.endnoteReference||{}),endnoteText:new $u(e.endnoteText||{}),endnoteTextChar:new Uu(e.endnoteTextChar||{}),lineNumber:new Cg(e.lineNumber||{})})},Zo=class{newInstance(e={}){return{initialStyles:new Sr(["mc","r","w","w14","w15"],"w14 w15"),importedStyles:Object.values(Ui(e))}}},Vu={headings:{latin:"Calibri Light",panose:"020F0302020204030204"},body:{latin:"Calibri",panose:"020F0502020204030204"}},Lg=[["Jpan","游ゴシック Light","游明朝"],["Hang","맑은 고딕"],["Hans","等线 Light","等线"],["Hant","新細明體"],["Arab","Times New Roman","Arial"],["Hebr","Times New Roman","Arial"],["Thai","Angsana New","Cordia New"],["Ethi","Nyala"],["Beng","Vrinda"],["Gujr","Shruti"],["Khmr","MoolBoran","DaunPenh"],["Knda","Tunga"],["Guru","Raavi"],["Cans","Euphemia"],["Cher","Plantagenet Cherokee"],["Yiii","Microsoft Yi Baiti"],["Tibt","Microsoft Himalaya"],["Thaa","MV Boli"],["Deva","Mangal"],["Telu","Gautami"],["Taml","Latha"],["Syrc","Estrangelo Edessa"],["Orya","Kalinga"],["Mlym","Kartika"],["Laoo","DokChampa"],["Sinh","Iskoola Pota"],["Mong","Mongolian Baiti"],["Viet","Times New Roman","Arial"],["Uigh","Microsoft Uighur"],["Geor","Sylfaen"],["Armn","Arial"],["Bugi","Leelawadee UI"],["Bopo","Microsoft JhengHei"],["Java","Javanese Text"],["Lisu","Segoe UI"],["Mymr","Myanmar Text"],["Nkoo","Ebrima"],["Olck","Nirmala UI"],["Osma","Ebrima"],["Phag","Phagspa"],["Syrn","Estrangelo Edessa"],["Syrj","Estrangelo Edessa"],["Syre","Estrangelo Edessa"],["Sora","Nirmala UI"],["Tale","Microsoft Tai Le"],["Talu","Microsoft New Tai Lue"],["Tfng","Ebrima"]],zn=(e,t,r)=>new x({name:e,attributes:{typeface:{key:"typeface",value:t},panose:{key:"panose",value:r}}}),Dg=(e,t)=>{let r=t[e],n=typeof r==="string"?r:r===null||r===void 0?void 0:r.latin;return n!==null&&n!==void 0?n:Vu[e].latin},Mg=(e,t={})=>{let r=Lg.map(([s,i,o=i])=>{var a;return[s,(a=t[s])!==null&&a!==void 0?a:e==="headings"?i:o]}),n=new Set(r.map(([s])=>s));return[...r,...Object.entries(t).filter(([s])=>!n.has(s))]},Qo=(e,t)=>{let r=t[e],{eastAsia:n="",complexScript:s="",scripts:i}=typeof r==="object"?r:{},o=Dg(e,t),a=Vu[e];return new x({name:e==="headings"?"a:majorFont":"a:minorFont",children:[zn("a:latin",o,o===a.latin?a.panose:void 0),zn("a:ea",n),zn("a:cs",s),...Mg(e,i).map(([u,l])=>new x({name:"a:font",attributes:{script:{key:"script",value:u},typeface:{key:"typeface",value:l}}}))]})},Fg=(e,t={})=>new x({name:"a:fontScheme",attributes:{name:{key:"name",value:e}},children:[Qo("headings",t),Qo("body",t)]}),Xu=(e=[])=>new x({name:"a:schemeClr",attributes:{value:{key:"val",value:"phClr"}},children:e.map(([t,r])=>new x({name:`a:${t}`,attributes:{value:{key:"val",value:r}}}))}),zr=(e)=>new x({name:"a:solidFill",children:[Xu(e)]}),Yn=(e)=>new x({name:"a:gradFill",attributes:{rotateWithShape:{key:"rotWithShape",value:!0}},children:[new x({name:"a:gsLst",children:e.map((t,r)=>new x({name:"a:gs",attributes:{position:{key:"pos",value:r*50000}},children:[Xu(t)]}))}),new x({name:"a:lin",attributes:{angle:{key:"ang",value:5400000},scaled:{key:"scaled",value:!1}}})]}),qn=(e)=>new x({name:"a:ln",attributes:{width:{key:"w",value:e},cap:{key:"cap",value:"flat"},compound:{key:"cmpd",value:"sng"},alignment:{key:"algn",value:"ctr"}},children:[zr(),new x({name:"a:prstDash",attributes:{value:{key:"val",value:"solid"}}}),new x({name:"a:miter",attributes:{limit:{key:"lim",value:800000}}})]}),Jn=(e)=>new x({name:"a:effectStyle",children:[new x({name:"a:effectLst",children:e})]}),Bg=()=>new x({name:"a:outerShdw",attributes:{blurRadius:{key:"blurRad",value:57150},distance:{key:"dist",value:19050},direction:{key:"dir",value:5400000},alignment:{key:"algn",value:"ctr"},rotateWithShape:{key:"rotWithShape",value:!1}},children:[new x({name:"a:srgbClr",attributes:{value:{key:"val",value:"000000"}},children:[new x({name:"a:alpha",attributes:{value:{key:"val",value:63000}}})]})]}),$g=()=>new x({name:"a:fmtScheme",attributes:{name:{key:"name",value:"Office"}},children:[new x({name:"a:fillStyleLst",children:[zr(),Yn([[["lumMod",110000],["satMod",105000],["tint",67000]],[["lumMod",105000],["satMod",103000],["tint",73000]],[["lumMod",105000],["satMod",109000],["tint",81000]]]),Yn([[["satMod",103000],["lumMod",102000],["tint",94000]],[["satMod",110000],["lumMod",1e5],["shade",1e5]],[["lumMod",99000],["satMod",120000],["shade",78000]]])]}),new x({name:"a:lnStyleLst",children:[qn(6350),qn(12700),qn(19050)]}),new x({name:"a:effectStyleLst",children:[Jn([]),Jn([]),Jn([Bg()])]}),new x({name:"a:bgFillStyleLst",children:[zr(),zr([["tint",95000],["satMod",170000]]),Yn([[["tint",93000],["satMod",150000],["shade",98000],["lumMod",102000]],[["tint",98000],["satMod",130000],["shade",90000],["lumMod",103000]],[["shade",63000],["satMod",120000]]])]})]}),Ku=class extends y{constructor({name:e="Office Theme",colors:t,fonts:r}={}){super("a:theme");m(this,"colors",void 0),this.colors=Zs(t),this.root.push(new vr({namespace:{key:"xmlns:a",value:"http://schemas.openxmlformats.org/drawingml/2006/main"},name:{key:"name",value:e}})),this.root.push(new x({name:"a:themeElements",children:[tp(t?e:"Office",t),Fg(r?e:"Office",r),$g()]})),this.root.push(new x({name:"a:objectDefaults"})),this.root.push(new x({name:"a:extraClrSchemeLst"}))}get Colors(){return this.colors}},He=(e)=>{let t=e.lastIndexOf("/");return`${e.slice(0,t+1)}_rels/${e.slice(t+1)}.rels`},zu=(e)=>e.replace(/(^|\/)_rels\/([^/]*)\.rels$/,"$1$2"),Yu=(e)=>e.slice(0,e.lastIndexOf("/")+1),_t=(e,t)=>{let r=t.replace(/\\/g,"/");return(r.startsWith("/")?r:`${Yu(e)}${r}`).split("/").reduce((n,s)=>{if(s===""||s===".")return n;return s===".."?n.slice(0,-1):[...n,s]},[]).join("/")},Wi=(e,t)=>{let r=Yu(e).split("/").filter(Boolean),n=t.split("/"),s=r.findIndex((o,a)=>a>=n.length-1||n[a]!==o),i=s===-1?r.length:s;return[...r.slice(i).map(()=>".."),...n.slice(i)].join("/")},qu=(e,t)=>e.toLowerCase()===t.toLowerCase(),Q=Uint8Array,Ae=Uint16Array,Gi=Int32Array,yn=new Q([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),xn=new Q([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Cs=new Q([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ju=function(e,t){var r=new Ae(31);for(var n=0;n<31;++n)r[n]=t+=1<>1|(U&21845)<<1,Ye=(Ye&52428)>>2|(Ye&13107)<<2,Ye=(Ye&61680)>>4|(Ye&3855)<<4,ks[U]=((Ye&65280)>>8|(Ye&255)<<8)>>1;var Ye,U,Qe=function(e,t,r){var n=e.length,s=0,i=new Ae(t);for(;s>u]=l}}else{a=new Ae(n);for(s=0;s>15-e[s]}return a},Tt=new Q(288);for(U=0;U<144;++U)Tt[U]=8;var U;for(U=144;U<256;++U)Tt[U]=9;var U;for(U=256;U<280;++U)Tt[U]=7;var U;for(U=280;U<288;++U)Tt[U]=8;var U,mr=new Q(32);for(U=0;U<32;++U)mr[U]=5;var U,Ug=Qe(Tt,9,0),Wg=Qe(Tt,9,1),Gg=Qe(mr,5,0),jg=Qe(mr,5,1),Zn=function(e){var t=e[0];for(var r=1;rt)t=e[r];return t},De=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&r},Qn=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(t&7)},ji=function(e){return(e+7)/8|0},Ir=function(e,t,r){if(t==null||t<0)t=0;if(r==null||r>e.length)r=e.length;return new Q(e.subarray(t,r))},Vg=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ge=function(e,t,r){var n=Error(t||Vg[e]);if(n.code=e,Error.captureStackTrace)Error.captureStackTrace(n,ge);if(!r)throw n;return n},Xg=function(e,t,r,n){var s=e.length,i=n?n.length:0;if(!s||t.f&&!t.l)return r||new Q(0);var o=!r,a=o||t.i!=2,u=t.i;if(o)r=new Q(s*3);var l=function(Z){var G=r.length;if(Z>G){var Ie=new Q(Math.max(G*2,Z));Ie.set(r),r=Ie}},c=t.f||0,h=t.p||0,d=t.b||0,{l:f,d:p,m:v,n:g}=t,A=s*8;do{if(!f){c=De(e,h,1);var C=De(e,h+1,3);if(h+=3,!C){var b=ji(h)+4,P=e[b-4]|e[b-3]<<8,_=b+P;if(_>s){if(u)ge(0);break}if(a)l(d+P);r.set(e.subarray(b,_),d),t.b=d+=P,t.p=h=_*8,t.f=c;continue}else if(C==1)f=Wg,p=jg,v=9,g=5;else if(C==2){var E=De(e,h,31)+257,T=De(e,h+10,15)+4,S=E+De(e,h+5,31)+1;h+=14;var N=new Q(S),R=new Q(19);for(var D=0;D>4;if(b<16)N[D++]=b;else{var Y=0,W=0;if(b==16)W=3+De(e,h,3),h+=2,Y=N[D-1];else if(b==17)W=3+De(e,h,7),h+=3;else if(b==18)W=11+De(e,h,127),h+=7;while(W--)N[D++]=Y}}var ie=N.subarray(0,E),ee=N.subarray(E);v=Zn(ie),g=Zn(ee),f=Qe(ie,v,1),p=Qe(ee,g,1)}else ge(1);if(h>A){if(u)ge(0);break}}if(a)l(d+131072);var wt=(1<>4;if(h+=Y&15,h>A){if(u)ge(0);break}if(!Y)ge(2);if(he<256)r[d++]=he;else if(he==256){_e=h,f=null;break}else{var de=he-254;if(he>264){var D=he-257,j=yn[D];de=De(e,h,(1<>4;if(!O)ge(3);h+=O&15;var ee=Hg[F];if(F>3){var j=xn[F];ee+=Qn(e,h)&(1<A){if(u)ge(0);break}if(a)l(d+131072);var B=d+de;if(d>8},tr=function(e,t,r){r<<=t&7;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},es=function(e,t){var r=[];for(var n=0;nd)d=i[n].s;var f=new Ae(d+1),p=Rs(r[c-1],f,0);if(p>t){var n=0,v=0,g=p-t,A=1<t)v+=A-(1<>=g;while(v>0){var b=i[n].s;if(f[b]=0&&v;--n){var P=i[n].s;if(f[P]==t)--f[P],++v}p=t}return{t:new Q(f),l:p}},Rs=function(e,t,r){return e.s==-1?Math.max(Rs(e.l,t,r+1),Rs(e.r,t,r+1)):t[e.s]=r},ta=function(e){var t=e.length;while(t&&!e[--t]);var r=new Ae(++t),n=0,s=e[0],i=1,o=function(u){r[n++]=u};for(var a=1;a<=t;++a)if(e[a]==s&&a!=t)++i;else{if(!s&&i>2){for(;i>138;i-=138)o(32754);if(i>2)o(i>10?i-11<<5|28690:i-3<<5|12305),i=0}else if(i>3){o(s),--i;for(;i>6;i-=6)o(8304);if(i>2)o(i-3<<5|8208),i=0}while(i--)o(s);i=1,s=e[a]}return{c:r.subarray(0,n),n:t}},rr=function(e,t){var r=0;for(var n=0;n>8,e[s+2]=e[s]^255,e[s+3]=e[s+1]^255;for(var i=0;i4&&!R[Cs[M-1]];--M);var K=l+5<<3,q=rr(s,Tt)+rr(i,mr)+o,z=rr(s,d)+rr(i,v)+o+14+3*M+rr(T,R)+2*T[16]+3*T[17]+7*T[18];if(u>=0&&K<=q&&K<=z)return th(t,c,e.subarray(u,u+l));var Y,W,ie,ee;if(ht(t,c,1+(z15)ht(t,c,he[S]>>5&127),c+=he[S]>>12}}}else Y=Ug,W=Tt,ie=Gg,ee=mr;for(var S=0;S255){var de=j>>18&31;if(tr(t,c,Y[de+257]),c+=W[de+257],de>7)ht(t,c,j>>23&31),c+=yn[de];var O=j&31;if(tr(t,c,ie[O]),c+=ee[O],O>3)tr(t,c,j>>5&8191),c+=xn[O]}else tr(t,c,Y[j]),c+=W[j]}return tr(t,c,Y[256]),c+W[256]},Kg=new Gi([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),rh=new Q(0),zg=function(e,t,r,n,s,i){var o=i.z||e.length,a=new Q(n+o+5*(1+Math.ceil(o/7000))+s),u=a.subarray(n,a.length-s),l=i.l,c=(i.r||0)&7;if(t){if(c)u[0]=i.r>>3;var h=Kg[t-1],d=h>>13,f=h&8191,p=(1<7000||R>24576)&&(Y>423||!l)){c=ra(e,u,0,P,_,E,S,R,M,N-M,c),R=T=S=0,M=N;for(var W=0;W<286;++W)_[W]=0;for(var W=0;W<30;++W)E[W]=0}var ie=2,ee=0,wt=f,xe=q-z&32767;if(Y>2&&K==b(N-xe)){var _e=Math.min(d,Y)-1,he=Math.min(32767,N),de=Math.min(258,Y);while(xe<=he&&--wt&&q!=z){if(e[N+ie]==e[N+ie-xe]){var j=0;for(;jie){if(ie=j,ee=xe,j>_e)break;var O=Math.min(xe,j-2),F=0;for(var W=0;WF)F=V,z=B}}}q=z,z=v[q],xe+=q-z&32767}}if(ee){P[R++]=268435456|Ns[ie]<<18|ea[ee];var J=Ns[ie]&31,Z=ea[ee]&31;S+=yn[J]+xn[Z],++_[257+J],++E[Z],D=N+ie,++T}else P[R++]=e[N],++_[e[N]]}}for(N=Math.max(N,D);N=o)u[c/8|0]=l,G=o;c=th(u,c+1,e.subarray(N,G))}i.i=o}return Ir(a,0,n+ji(c)+s)},Yg=function(){var e=new Int32Array(256);for(var t=0;t<256;++t){var r=t,n=9;while(--n)r=(r&1&&-306674912)^r>>>1;e[t]=r}return e}(),qg=function(){var e=-1;return{p:function(t){var r=e;for(var n=0;n>>8;e=r},d:function(){return~e}}},Jg=function(e,t,r,n,s){if(!s){if(s={l:1},t.dictionary){var i=t.dictionary.subarray(-32768),o=new Q(i.length+e.length);o.set(i),o.set(e,i.length),e=o,s.w=i.length}}return zg(e,t.level==null?6:t.level,t.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,r,n,s)},nh=function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},qe=function(e,t){return e[t]|e[t+1]<<8},Re=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},ts=function(e,t){return Re(e,t)+Re(e,t+4)*4294967296},pe=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function Zg(e,t){return Jg(e,t||{},0,0)}function Qg(e,t){return Xg(e,{i:2},t&&t.out,t&&t.dictionary)}var sh=function(e,t,r,n){for(var s in e){var i=e[s],o=t+s,a=n;if(Array.isArray(i))a=nh(n,i[1]),i=i[0];if(ArrayBuffer.isView(i))r[o]=[i,a];else r[o+="/"]=[new Q(0),a],sh(i,o,r,n)}},na=typeof TextEncoder<"u"&&new TextEncoder,Ps=typeof TextDecoder<"u"&&new TextDecoder;try{Ps.decode(rh,{stream:!0})}catch(e){}var ey=function(e){for(var t="",r=0;;){var n=e[r++],s=(n>127)+(n>223)+(n>239);if(r+s>e.length)return{s:t,r:Ir(e,r-1)};if(!s)t+=String.fromCharCode(n);else if(s==3)n=((n&15)<<18|(e[r++]&63)<<12|(e[r++]&63)<<6|e[r++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023);else if(s&1)t+=String.fromCharCode((n&31)<<6|e[r++]&63);else t+=String.fromCharCode((n&15)<<12|(e[r++]&63)<<6|e[r++]&63)}};function sa(e,t){if(t){var r=new Q(e.length);for(var n=0;n>1)),o=0,a=function(c){i[o++]=c};for(var n=0;ni.length){var u=new Q(o+8+(s-n<<1));u.set(i),i=u}var l=e.charCodeAt(n);if(l<128||t)a(l);else if(l<2048)a(192|l>>6),a(128|l&63);else if(l>55295&&l<57344)l=65536+(l&1047552)|e.charCodeAt(++n)&1023,a(240|l>>18),a(128|l>>12&63),a(128|l>>6&63),a(128|l&63);else a(224|l>>12),a(128|l>>6&63),a(128|l&63)}return Ir(i,0,o)}function ty(e,t){if(t){var r="";for(var n=0;n65535)ge(9);t+=n+4}return t},ia=function(e,t,r,n,s,i,o,a){var u=n.length,l=r.extra,c=a&&a.length,h=Os(l);if(pe(e,t,o!=null?33639248:67324752),t+=4,o!=null)e[t++]=20,e[t++]=r.os;e[t]=20,t+=2,e[t++]=r.flag<<1|(i<0&&8),e[t++]=s&&8,e[t++]=r.compression&255,e[t++]=r.compression>>8;var d=new Date(r.mtime==null?Date.now():r.mtime),f=d.getFullYear()-1980;if(f<0||f>119)ge(10);if(pe(e,t,f<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>1),t+=4,i!=-1)pe(e,t,r.crc),pe(e,t+4,i<0?-i-2:i),pe(e,t+8,r.size);if(pe(e,t+12,u),pe(e,t+14,h),t+=16,o!=null)pe(e,t,c),pe(e,t+6,r.attrs),pe(e,t+10,o),t+=14;if(e.set(n,t),t+=u,h)for(var p in l){var v=l[p],g=v.length;pe(e,t,+p),pe(e,t+2,g),e.set(v,t+4),t+=4+g}if(c)e.set(a,t),t+=c;return t},iy=function(e,t,r,n,s){pe(e,t,101010256),pe(e,t+8,r),pe(e,t+10,r),pe(e,t+12,n),pe(e,t+16,s)};function oy(e,t){if(!t)t={};var r={},n=[];sh(e,"",r,t);var s=0,i=0;for(var o in r){var a=r[o],u=a[0],l=a[1],c=l.level==0?0:8,h=sa(o),d=h.length,f=l.comment,p=f&&sa(f),v=p&&p.length,g=Os(l.extra);if(d>65535)ge(11);var A=c?Zg(u,l):u,C=A.length,b=qg();b.p(u),n.push(nh(l,{size:u.length,crc:b.d(),c:A,f:h,m:p,u:d!=o.length||p&&f.length!=v,o:s,compression:c})),s+=30+d+g+C,i+=76+2*(d+g)+(v||0)+C}var P=new Q(i+22),_=s,E=i-s;for(var T=0;T65558)ge(13);var s=qe(e,n+8);if(!s)return{};var i=Re(e,n+16),o=Re(e,n-20)==117853008;if(o){var a=Re(e,n-12);if(o=Re(e,a)==101075792,o)s=Re(e,a+32),i=Re(e,a+48)}var u=t&&t.filter;for(var l=0;ltypeof e==="string"?li(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e),sn=(e)=>oy(Object.fromEntries([...e].map(([t,r])=>[t,ly(r)]))),cy=1032,oa=(e)=>Error(`Corrupted zip: ${e} isn't the size the zip file gives it`),on=(e,t=()=>!0)=>{let r=new Map,n=0,s=ay(e,{filter:({name:o,size:a,originalSize:u})=>{if(o.endsWith("/")||!t(o))return!1;if(n+=a,n>e.length||u>a*cy)throw oa(o);return r.set(o,u),!0}}),i=Object.entries(s).find(([o,a])=>a.length!==r.get(o));if(i!==void 0)throw oa(i[0]);return new Map(Object.entries(s))},rs=(e)=>{let t="";for(let r=0;rError(`${e} is not supported by this platform`),aa={uint8array:(e)=>e,arraybuffer:(e)=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),array:(e)=>Array.from(e),string:rs,binarystring:rs,base64:(e)=>btoa(rs(e)),blob:(e,t)=>{if(typeof Blob>"u")throw Yr("blob");return new Blob([e],{type:t})},nodebuffer:(e)=>{if(typeof Buffer>"u")throw Yr("nodebuffer");return Buffer.from(e.buffer,e.byteOffset,e.byteLength)},text:()=>{throw Yr("text")}},_s=(e,t,r)=>{let n=Object.prototype.hasOwnProperty.call(aa,t.toLowerCase())?aa[t.toLowerCase()]:void 0;if(n===void 0)throw Yr(t);return n(e,r)},uy=new Map([["dk1","dark1"],["lt1","light1"],["dk2","dark2"],["lt2","light2"],["accent1","accent1"],["accent2","accent2"],["accent3","accent3"],["accent4","accent4"],["accent5","accent5"],["accent6","accent6"],["hlink","hyperlink"],["folHlink","followedHyperlink"]]),hy=new Map([["dark1","windowText"],["light1","window"]]),dy=new Set(["http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument"]),py=new Set(["http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme","http://purl.oclc.org/ooxml/officeDocument/relationships/theme"]),mt=(e)=>{var t,r;return(t=e===null||e===void 0||(r=e.name)===null||r===void 0?void 0:r.slice(e.name.indexOf(":")+1))!==null&&t!==void 0?t:""},Lt=(e)=>{var t,r;return(t=e===null||e===void 0||(r=e.elements)===null||r===void 0?void 0:r.filter((n)=>n.type==="element"))!==null&&t!==void 0?t:[]},We=(e,t)=>Lt(e).find((r)=>mt(r)===t),ft=(e,t)=>{var r;let n=e===null||e===void 0||(r=e.attributes)===null||r===void 0?void 0:r[t];return n===void 0?void 0:String(n)},my=(e)=>e[0]===80&&e[1]===75&&e[2]===3&&e[3]===4,Vi=(e)=>new TextDecoder(e[0]===255&&e[1]===254?"utf-16le":e[0]===254&&e[1]===255?"utf-16be":"utf-8").decode(e),ih=(e)=>Object.fromEntries(Object.entries(e).filter(([,t])=>t!==void 0)),oh=(e,t,r)=>{let n=e.get(He(t)),s=ft(n&&Lt(We(Kt(Vi(n)),"Relationships")).find((i)=>{var o;return r.has((o=ft(i,"Type"))!==null&&o!==void 0?o:"")}),"Target");return s===void 0?void 0:_t(t,s)},ah=(e,t)=>oh(e,t,py),fy=(e)=>{let t=on(e,(i)=>i.endsWith(".rels")),r=oh(t,"",dy);if(r===void 0)throw Error("Invalid file: a zip file that isn't a Word, PowerPoint or Excel file or an Office theme (.thmx)");let n=ah(t,r),s=n===void 0?void 0:[...on(e,(i)=>qu(i,n)).values()][0];if(s===void 0)throw Error(`The file has no theme: its main part, ${r}, refers to none`);return Vi(s)},vy=(e,t,r)=>{let[n]=Lt(t),s=mt(n)==="srgbClr"?ft(n,"val"):mt(n)==="sysClr"&&(r||ft(n,"val")!==hy.get(e))?ft(n,"lastClr"):void 0;return s!==void 0&&/^[0-9A-Fa-f]{6}$/.test(s)?s.toUpperCase():void 0},Ls=(e,t=!1)=>Object.fromEntries(Lt(e).flatMap((r)=>{let n=uy.get(mt(r)),s=n&&vy(n,r,t);return n&&s?[[n,s]]:[]})),wy=(e)=>{let[t]=Lt(Kt(e)),r=mt(t)==="theme"?We(We(t,"themeElements"),"clrScheme"):void 0;return r?Ls(r,!0):{}},ns=(e)=>ft(e,"typeface")||void 0,la=(e)=>{let t=Lt(e).filter((r)=>mt(r)==="font").flatMap((r)=>{let n=ft(r,"script"),s=ft(r,"typeface");return n&&s!==void 0?[[n,s]]:[]});return ih({latin:ns(We(e,"latin")),eastAsia:ns(We(e,"ea")),complexScript:ns(We(e,"cs")),scripts:t.length>0?Object.fromEntries(t):void 0})},ca=(e)=>({headings:la(We(e,"majorFont")),body:la(We(e,"minorFont"))}),gy=(e)=>{if(typeof e==="string")return e;let t=ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e);return my(t)?fy(t):Vi(t)},yy=(e)=>{let[t]=Lt(Kt(gy(e)));if(mt(t)==="clrScheme")return{colors:Ls(t)};if(mt(t)==="fontScheme")return{fonts:ca(t)};if(mt(t)!=="theme"){var r;throw Error(`Invalid theme: expected the XML of a theme, such as a document's word/theme/theme1.xml, but its root element is ${(r=t===null||t===void 0?void 0:t.name)!==null&&r!==void 0?r:"missing"}`)}let n=We(t,"themeElements"),s=We(n,"clrScheme"),i=We(n,"fontScheme");return ih({name:ft(t,"name")||void 0,colors:s&&Ls(s),fonts:i&&ca(i)})},xy=[208,207,17,224,161,177,26,225],by=class{constructor(e){var t,r,n,s,i,o,a,u,l,c,h,d,f,p;if(m(this,"currentRelationshipId",1),m(this,"documentWrapper",void 0),m(this,"headers",[]),m(this,"footers",[]),m(this,"coreProperties",void 0),m(this,"numbering",void 0),m(this,"media",void 0),m(this,"fileRelationships",void 0),m(this,"footnotesWrapper",void 0),m(this,"endnotesWrapper",void 0),m(this,"settings",void 0),m(this,"contentTypes",void 0),m(this,"customProperties",void 0),m(this,"appProperties",void 0),m(this,"styles",void 0),m(this,"comments",void 0),m(this,"commentsExtended",void 0),m(this,"commentsIds",void 0),m(this,"fontWrapper",void 0),m(this,"theme",void 0),m(this,"packageParts",void 0),m(this,"macros",void 0),m(this,"bibliography",void 0),e.macros!==void 0){let{project:b,events:P=[]}=e.macros,_=b instanceof Uint8Array?b:new Uint8Array(b);if(!xy.every((T,S)=>_[S]===T))throw Error("macros.project isn't a VBA project. Use createMacros from docx/macros, or the word/vbaProject.bin in a .docm rather than the .docm itself");let E=new ce;if(P.length>0)E.addRelationship(1,"http://schemas.microsoft.com/office/2006/relationships/wordVbaData","vbaData.xml");this.macros={project:_,events:P.length>0?xw(P):void 0,relationships:E}}if(this.coreProperties=new cw(w(w({},e),{},{creator:(t=e.creator)!==null&&t!==void 0?t:"Un-named",revision:(r=e.revision)!==null&&r!==void 0?r:1,lastModifiedBy:(n=e.lastModifiedBy)!==null&&n!==void 0?n:"Un-named"})),this.numbering=new Bi(e.numbering?e.numbering:{config:[]}),this.comments=new uc((s=e.comments)!==null&&s!==void 0?s:{children:[]}),this.comments.ThreadData)this.commentsExtended=new hc(this.comments.ThreadData);if(this.comments.CommentIdsData)this.commentsIds=new dc(this.comments.CommentIdsData);if(this.fileRelationships=new ce,this.customProperties=new fw((i=e.customProperties)!==null&&i!==void 0?i:[]),this.appProperties=new ow,this.footnotesWrapper=new Lw,this.endnotesWrapper=new Nw,this.contentTypes=new lw({macros:this.macros!==void 0}),((o=this.macros)===null||o===void 0?void 0:o.events)!==void 0)this.contentTypes.addOverride("application/vnd.ms-word.vbaData+xml","/word/vbaData.xml");if(e.bibliography!==void 0){let b=new ce;b.addRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps","itemProps1.xml"),this.bibliography={sources:e.bibliography.sources,properties:gw(`{${ai().toUpperCase()}}`),relationships:b},this.contentTypes.addOverride("application/vnd.openxmlformats-officedocument.customXmlProperties+xml","/customXml/itemProps1.xml")}if(this.packageParts=new _u(this.contentTypes),this.documentWrapper=new Ew({background:e.background,pageNumbers:e.pageNumbers}),this.settings=new hg({compatibilityModeVersion:e.compatabilityModeVersion,compatibility:e.compatibility,evenAndOddHeaders:e.evenAndOddHeaderAndFooters?!0:!1,trackRevisions:(a=e.features)===null||a===void 0?void 0:a.trackRevisions,updateFields:(u=e.features)===null||u===void 0?void 0:u.updateFields,embedFonts:((l=e.fonts)===null||l===void 0?void 0:l.length)?!0:void 0,defaultTabStop:e.defaultTabStop,protection:e.protection,hyphenation:{autoHyphenation:(c=e.hyphenation)===null||c===void 0?void 0:c.autoHyphenation,hyphenationZone:(h=e.hyphenation)===null||h===void 0?void 0:h.hyphenationZone,consecutiveHyphenLimit:(d=e.hyphenation)===null||d===void 0?void 0:d.consecutiveHyphenLimit,doNotHyphenateCaps:(f=e.hyphenation)===null||f===void 0?void 0:f.doNotHyphenateCaps}}),this.media=new Mi((b)=>this.packageParts.takePath("media","image",b)),e.externalStyles!==void 0){var v,g,A,C;let b=(v=(g=e.styles)===null||g===void 0?void 0:g.default)!==null&&v!==void 0?v:{},P=Object.entries(Ui(b)),_=([T])=>b[T]!==void 0,E=new Pg().newInstance(e.externalStyles);this.styles=new Kr(w(w({},E),{},{paragraphStyles:(A=e.styles)===null||A===void 0?void 0:A.paragraphStyles,characterStyles:(C=e.styles)===null||C===void 0?void 0:C.characterStyles,importedStyles:[...P.filter((T)=>!_(T)).map(([,T])=>T),...E.importedStyles,...P.filter(_).map(([,T])=>T)]}))}else if(e.styles){let b=new Zo().newInstance(e.styles.default);this.styles=new Kr(w(w({},b),e.styles))}else{let b=new Zo;this.styles=new Kr(b.newInstance())}this.addDefaultRelationships();for(let b of e.sections)this.addSection(b);if(e.footnotes)for(let b in e.footnotes)this.footnotesWrapper.View.createFootNote(parseFloat(b),e.footnotes[b].children);if(e.endnotes)for(let b in e.endnotes)this.endnotesWrapper.View.createEndnote(parseFloat(b),e.endnotes[b].children);if(this.fontWrapper=new Ic((p=e.fonts)!==null&&p!==void 0?p:[]),this.theme=new Ku(e.theme),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme","theme/theme1.xml"),this.macros!==void 0)this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.microsoft.com/office/2006/relationships/vbaProject","vbaProject.bin");if(this.bibliography!==void 0)this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml","../customXml/item1.xml")}addSection({headers:e={},footers:t={},children:r,properties:n}){this.documentWrapper.View.Body.addSection(w(w({},n),{},{headerWrapperGroup:{default:e.default?this.createHeader(e.default):void 0,first:e.first?this.createHeader(e.first):void 0,even:e.even?this.createHeader(e.even):void 0},footerWrapperGroup:{default:t.default?this.createFooter(t.default):void 0,first:t.first?this.createFooter(t.first):void 0,even:t.even?this.createFooter(t.even):void 0}}));for(let s of r)this.documentWrapper.View.add(s)}createHeader(e){let t=new ku(this.media,this.currentRelationshipId++);for(let r of e.options.children)t.add(r);return this.addHeaderToDocument(t),t}createFooter(e){let t=new Cu(this.media,this.currentRelationshipId++);for(let r of e.options.children)t.add(r);return this.addFooterToDocument(t),t}addHeaderToDocument(e,t=Rt.DEFAULT){this.headers.push({header:e,type:t}),this.documentWrapper.Relationships.addRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",`header${this.headers.length}.xml`),this.contentTypes.addHeader(this.headers.length)}addFooterToDocument(e,t=Rt.DEFAULT){this.footers.push({footer:e,type:t}),this.documentWrapper.Relationships.addRelationship(e.View.ReferenceId,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",`footer${this.footers.length}.xml`),this.contentTypes.addFooter(this.footers.length)}addDefaultRelationships(){if(this.fileRelationships.addRelationship(1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument","word/document.xml"),this.fileRelationships.addRelationship(2,"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties","docProps/core.xml"),this.fileRelationships.addRelationship(3,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties","docProps/app.xml"),this.fileRelationships.addRelationship(4,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties","docProps/custom.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles","styles.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering","numbering.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes","footnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes","endnotes.xml"),this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings","settings.xml"),!this.comments.IsEmpty)this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments","comments.xml"),this.contentTypes.addComments();if(this.commentsExtended)this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.microsoft.com/office/2011/relationships/commentsExtended","commentsExtended.xml"),this.contentTypes.addCommentsExtended();if(this.commentsIds)this.documentWrapper.Relationships.addRelationship(this.currentRelationshipId++,"http://schemas.microsoft.com/office/2016/09/relationships/commentsIds","commentsIds.xml"),this.contentTypes.addCommentsIds()}get Document(){return this.documentWrapper}get Styles(){return this.styles}get CoreProperties(){return this.coreProperties}get Numbering(){return this.numbering}get Media(){return this.media}get FileRelationships(){return this.fileRelationships}get Headers(){return this.headers.map((e)=>e.header)}get Footers(){return this.footers.map((e)=>e.footer)}get ContentTypes(){return this.contentTypes}get CustomProperties(){return this.customProperties}get AppProperties(){return this.appProperties}get FootNotes(){return this.footnotesWrapper}get Endnotes(){return this.endnotesWrapper}get Settings(){return this.settings}get Comments(){return this.comments}get CommentsExtended(){return this.commentsExtended}get CommentsIds(){return this.commentsIds}get FontTable(){return this.fontWrapper}get Theme(){return this.theme}get PackageParts(){return this.packageParts}get Macros(){return this.macros}get Bibliography(){return this.bibliography}};var lh=class extends y{constructor(e){super("w:sdtPr");if(e)this.root.push(new Ue("w:alias",e))}},Ty=(e)=>new x({name:"w:docPartObj",children:[new Ue("w:docPartGallery",e),new x({name:"w:docPartUnique"})]}),Ey=["contentChildren","cachedEntries","beginDirty","tabLeader"],Sy=class extends Er{constructor(e="Table of Contents",t={}){let{contentChildren:r=[],cachedEntries:n=[],beginDirty:s,tabLeader:i=gc.DOT}=t,o=wr(t,Ey);super("w:sdt");m(this,"fromHeadings",void 0);let a=new lh(e);a.addChildElement(Ty("Table of Contents")),this.root.push(a);let u=new vi,l=[new se({children:[Ql(s),new Zl(o),Be()]})],c=[new se({children:[Pe()]})];if(n!==void 0&&n.length>0){let{stylesWithLevels:h}=o,d=n.map((p,v)=>{var g,A;let C=this.buildCachedContentParagraphChild(p,o),b=(g=h===null||h===void 0||(A=h.find((_)=>_.level===p.level))===null||A===void 0?void 0:A.styleName)!==null&&g!==void 0?g:`TOC${p.level}`,P=v===0?[...l,C]:v===n.length-1?[C,...c]:[C];return new fe({style:b,tabStops:this.getTabStopsForLevel(p.level,i),children:P})}),f=d;if(n.length<=1)f=[...d,new fe({children:c})];for(let p of f)u.addChildElement(p)}else{let h=new fe({children:l});u.addChildElement(h);for(let f of r)u.addChildElement(f);let d=new fe({children:c});if(u.addChildElement(d),r.length===0)this.fromHeadings={properties:o,beginDirty:s,tabLeader:i}}this.root.push(u)}prepForXml(e){let t=super.prepForXml(e);return ff(t,this.fromHeadings&&w(w({},this.fromHeadings),{},{textWidth:this.textWidthIn(e)})),t}textWidthIn(e){var t,r;return(t=(r=e.file)===null||r===void 0||(r=r.Document)===null||r===void 0||(r=r.View.Body.getSectionPropertiesFor(this))===null||r===void 0?void 0:r.AvailableTextWidth)!==null&&t!==void 0?t:Gr}getTabStopsForLevel(e,t,r=9025){return[{type:"clear",position:r+1-(e-1)*240},{type:"right",position:r,leader:t}]}buildCachedContentRun(e,t){var r,n;return new se({style:(t===null||t===void 0?void 0:t.hyperlink)&&e.href!==void 0?"IndexLink":void 0,children:[new hr({text:e.title}),new Tr,new hr({text:(r=(n=e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:""})]})}buildCachedContentParagraphChild(e,t){let r=this.buildCachedContentRun(e,t);if((t===null||t===void 0?void 0:t.hyperlink)&&e.href!==void 0)return new Ti({anchor:e.href,children:[r]});return r}},Iy=class{constructor(e,t){m(this,"styleName",void 0),m(this,"level",void 0),this.styleName=e,this.level=t}},Ay=class{constructor(e={children:[]}){m(this,"options",void 0),this.options=e}},Cy=class{constructor(e={children:[]}){m(this,"options",void 0),this.options=e}},ch=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id"})}},Ds=class extends y{constructor(e){super("w:footnoteReference");this.root.push(new ch({id:e}))}},Ny=class extends se{constructor(e){super({style:"FootnoteReference"});if(m(this,"footnote",void 0),typeof e==="number")this.root.push(new Ds(e));else this.footnote=e}prepForXml(e){var t;if(this.footnote===void 0)return super.prepForXml(e);let r=(t=e.file)===null||t===void 0?void 0:t.FootNotes.View.idOf(this,this.footnote,e);if(r===void 0)return;this.root.push(new Ds(r));try{return super.prepForXml(e)}finally{this.root.pop()}}},uh=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{id:"w:id"})}},Ms=class extends y{constructor(e){super("w:endnoteReference");this.root.push(new uh({id:e}))}},ky=class extends se{constructor(e){super({style:"EndnoteReference"});if(m(this,"endnote",void 0),typeof e==="number")this.root.push(new Ms(e));else this.endnote=e}prepForXml(e){var t;if(this.endnote===void 0)return super.prepForXml(e);let r=(t=e.file)===null||t===void 0?void 0:t.Endnotes.View.idOf(this,this.endnote,e);if(r===void 0)return;this.root.push(new Ms(r));try{return super.prepForXml(e)}finally{this.root.pop()}}},ua=class extends L{constructor(...e){super(...e);m(this,"xmlKeys",{val:"w14:val",symbolfont:"w14:font"})}},qr=class extends y{constructor(e,t,r){super(e);if(r)this.root.push(new ua({val:ja(t),symbolfont:r}));else this.root.push(new ua({val:t}))}},hh=class extends y{constructor(e){var t,r,n,s,i,o,a,u;super("w14:checkbox");m(this,"DEFAULT_UNCHECKED_SYMBOL","2610"),m(this,"DEFAULT_CHECKED_SYMBOL","2612"),m(this,"DEFAULT_FONT","MS Gothic");let l=(e===null||e===void 0?void 0:e.checked)?"1":"0",c,h;this.root.push(new qr("w14:checked",l)),c=(e===null||e===void 0||(t=e.checkedState)===null||t===void 0?void 0:t.value)?e===null||e===void 0||(r=e.checkedState)===null||r===void 0?void 0:r.value:this.DEFAULT_CHECKED_SYMBOL,h=(e===null||e===void 0||(n=e.checkedState)===null||n===void 0?void 0:n.font)?e===null||e===void 0||(s=e.checkedState)===null||s===void 0?void 0:s.font:this.DEFAULT_FONT,this.root.push(new qr("w14:checkedState",c,h)),c=(e===null||e===void 0||(i=e.uncheckedState)===null||i===void 0?void 0:i.value)?e===null||e===void 0||(o=e.uncheckedState)===null||o===void 0?void 0:o.value:this.DEFAULT_UNCHECKED_SYMBOL,h=(e===null||e===void 0||(a=e.uncheckedState)===null||a===void 0?void 0:a.font)?e===null||e===void 0||(u=e.uncheckedState)===null||u===void 0?void 0:u.font:this.DEFAULT_FONT,this.root.push(new qr("w14:uncheckedState",c,h))}},Ry=class extends y{constructor(e){var t,r,n,s;super("w:sdt");m(this,"DEFAULT_UNCHECKED_SYMBOL","2610"),m(this,"DEFAULT_CHECKED_SYMBOL","2612"),m(this,"DEFAULT_FONT","MS Gothic");let i=new lh(e===null||e===void 0?void 0:e.alias);i.addChildElement(new hh(e)),this.root.push(i);let o=new vi,a=e===null||e===void 0||(t=e.checkedState)===null||t===void 0?void 0:t.font,u=e===null||e===void 0||(r=e.checkedState)===null||r===void 0?void 0:r.value,l=e===null||e===void 0||(n=e.uncheckedState)===null||n===void 0?void 0:n.font,c=e===null||e===void 0||(s=e.uncheckedState)===null||s===void 0?void 0:s.value,h,d;if(e===null||e===void 0?void 0:e.checked)h=a?a:this.DEFAULT_FONT,d=u?u:this.DEFAULT_CHECKED_SYMBOL;else h=l?l:this.DEFAULT_FONT,d=c?c:this.DEFAULT_UNCHECKED_SYMBOL;let f=new yl({char:d,symbolfont:h});o.addChildElement(f),this.root.push(o)}},ss=(e)=>e===void 0?void 0:e?"t":"f",Py=({children:e})=>new x({name:"w:pict",children:e}),Oy={flip:"flip",height:"height",left:"left",marginBottom:"margin-bottom",marginLeft:"margin-left",marginRight:"margin-right",marginTop:"margin-top",positionHorizontal:"mso-position-horizontal",positionHorizontalRelative:"mso-position-horizontal-relative",positionVertical:"mso-position-vertical",positionVerticalRelative:"mso-position-vertical-relative",wrapDistanceBottom:"mso-wrap-distance-bottom",wrapDistanceLeft:"mso-wrap-distance-left",wrapDistanceRight:"mso-wrap-distance-right",wrapDistanceTop:"mso-wrap-distance-top",wrapEdited:"mso-wrap-edited",wrapStyle:"mso-wrap-style",position:"position",rotation:"rotation",top:"top",visibility:"visibility",width:"width",zIndex:"z-index"},_y=(e)=>e?Object.entries(e).filter(([,t])=>t!==void 0).map(([t,r])=>`${Oy[t]}:${r}`).join(";"):void 0,dh=({id:e,type:t,style:r,coordinateSize:n,adjustment:s,path:i,presetShapeType:o,allowInCell:a,alt:u,title:l,fillColor:c,filled:h,stroked:d,strokeColor:f,strokeWeight:p,children:v=[]})=>new x({name:"v:shape",attributes:{id:{key:"id",value:e},type:{key:"type",value:t},style:{key:"style",value:_y(r)},coordinateSize:{key:"coordsize",value:n},adjustment:{key:"adj",value:s},path:{key:"path",value:i},presetShapeType:{key:"o:spt",value:o},allowInCell:{key:"o:allowincell",value:ss(a)},alt:{key:"alt",value:u},title:{key:"title",value:l},fillColor:{key:"fillcolor",value:c},filled:{key:"filled",value:ss(h)},stroked:{key:"stroked",value:ss(d)},strokeColor:{key:"strokecolor",value:f},strokeWeight:{key:"strokeweight",value:p}},children:v}),Ly=({shape:e})=>Py({children:[e]}),Dy=({children:e=[]})=>new x({name:"w:txbxContent",children:e}),My=({style:e,children:t,inset:r})=>new x({name:"v:textbox",attributes:{style:{key:"style",value:e},inset:{key:"inset",value:r?`${r.left}, ${r.top}, ${r.right}, ${r.bottom}`:void 0}},children:[Dy({children:t})]}),Fy="#_x0000_t202",By="1in",$y=(e)=>e&&(e.height===void 0||e.height==="auto")?w(w({},e),{},{height:By}):e,Hy=({id:e,children:t,type:r=Fy,style:n})=>dh({id:e,type:r,style:$y(n),children:[My({style:"mso-fit-shape-to-text:t;",children:t})]}),Uy=["style","children"],Wy=class extends Er{constructor(e){let{style:t,children:r}=e,n=wr(e,Uy);super("w:p");m(this,"run",void 0),this.root.push(new bt(n)),this.run=new x({name:"w:r",children:[Ly({shape:Hy({children:r,id:vt(),style:t})})]}),this.root.push(this.run)}prepForXml(e){return Xt(e.stack[e.stack.length-1])==="w:p"?this.run.prepForXml(e):super.prepForXml(e)}},nr=0,is=32,Gy=32,jy=(e,t)=>{let r=t.replace(/-/g,"");if(r.length!==Gy)throw Error(`Error: Cannot extract GUID from font filename: ${t}`);let n=r.replace(/(..)/g,"$1 ").trim().split(" ").map((o)=>parseInt(o,16));n.reverse();let s=e.slice(nr,is).map((o,a)=>o^n[a%n.length]),i=new Uint8Array(nr+s.length+Math.max(0,e.length-is));return i.set(e.slice(0,nr)),i.set(s,nr),i.set(e.slice(is),nr+s.length),i},Dt=class{format(e,t={stack:[]}){let r=e.prepForXml(t);if(r)return r;else throw Error("XMLComponent did not format correctly")}},ph=/\{([^{}]+)\}/g,mh=(e,t)=>t.size===0?e:e.replace(ph,(r,n)=>{var s;return(s=t.get(n))!==null&&s!==void 0?s:r}),Vy=(e)=>new Set(Array.from(e.matchAll(ph),([,t])=>t)),fh=class{replace(e,t,r){return mh(e,new Map(t.map((n,s)=>[n.key,(r+s).toString()])))}getMediaData(e,t){let r=Vy(e);return t.Entries.filter(([n])=>r.has(n)).map(([n,{fileName:s}])=>({key:n,fileName:s}))}},Xy=class{replace(e,t){return mh(e,new Map(t.map(({reference:r,instance:n,restartedListId:s,numId:i})=>[en(r,n,s),i.toString()])))}},Ky=new Dt,os=(e,t,r,n,s=!0)=>H(Ky.format(t,{viewWrapper:{View:t,Relationships:n},file:e,stack:[]}),{indent:r,declaration:s?{standalone:"yes",encoding:"UTF-8"}:{encoding:"UTF-8"}}),zy=(e,t,r,n)=>{let{content:s}=t.options;if(s instanceof Uint8Array)return[{data:s,path:`word/${r}`}];if("files"in s)return[{data:sn(s.files.map(({path:l,content:c})=>[l,c instanceof Uint8Array?c:os(e,c,n,new ce)])),path:`word/${r}`}];let i=e.PackageParts.createRelationships(r),o=os(e,s,n,i),a=r.slice(0,r.lastIndexOf("/")),u=r.slice(r.lastIndexOf("/")+1);return[{data:o,path:`word/${r}`},...i.RelationshipCount>0?[{data:os(e,i,n,i,!1),path:`word/${a}/_rels/${u}.rels`}]:[]]},Xi=(e,t,r=0)=>{let n=e.PackageParts.Array.slice(r);if(n.length===0)return[];return[...n.flatMap(({part:s,path:i})=>zy(e,s,i,t)),...Xi(e,t,r+n.length)]},Yy=["PackageParts"],qy=class{constructor(){m(this,"formatter",void 0),m(this,"imageReplacer",void 0),m(this,"numberingReplacer",void 0),this.formatter=new Dt,this.imageReplacer=new fh,this.numberingReplacer=new Xy}compile(e,t,r=[]){let n=this.xmlifyFile(e,t),{PackageParts:s}=n,i=wr(n,Yy),o=Object.values(i).flatMap((a)=>Array.isArray(a)?a:[a]);return new Map([...o.map(({path:a,data:u})=>[a,u]),...s.map(({path:a,data:u})=>[a,u]),...r.map(({path:a,data:u})=>[a,u]),...e.Macros===void 0?[]:[["word/vbaProject.bin",e.Macros.project]],...e.Media.Array.map((a)=>[`word/media/${a.fileName}`,a.data]),...e.FontTable.files.map(({data:a,fontKey:u},l)=>[`word/fonts/font${l+1}.odttf`,jy(a,u)])])}xmlifyFile(e,t){var r;let n=H(this.formatter.format(e.Document.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),s=H(this.formatter.format(e.Comments,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),i=H(this.formatter.format(e.FootNotes.View,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),o=H(this.formatter.format(e.Endnotes.View,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),a=e.Document.Relationships.RelationshipCount+1,u=e.Comments.Relationships.RelationshipCount+1,l=e.FootNotes.Relationships.RelationshipCount+1,c=e.Endnotes.Relationships.RelationshipCount+1,h=this.imageReplacer.getMediaData(n,e.Media),d=this.imageReplacer.getMediaData(s,e.Media),f=this.imageReplacer.getMediaData(i,e.Media),p=this.imageReplacer.getMediaData(o,e.Media);return w(w(w(w(w(w({Relationships:{data:(()=>{let v=ce.copy(e.Document.Relationships);return h.forEach((g,A)=>{v.addRelationship(a+A,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${g.fileName}`)}),v.addRelationship(v.RelationshipCount+1,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable","fontTable.xml"),H(this.formatter.format(v,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/document.xml.rels"},Document:{data:(()=>{let v=this.imageReplacer.replace(n,h,a);return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/document.xml"},Styles:{data:(()=>{let v=H(this.formatter.format(e.Styles,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}});return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/styles.xml"},Properties:{data:H(this.formatter.format(e.CoreProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/core.xml"},FileRelationships:{data:H(this.formatter.format(e.FileRelationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"_rels/.rels"},HeaderRelationships:e.Headers.map((v,g)=>{let A=H(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),C=this.imageReplacer.getMediaData(A,e.Media),b=ce.copy(v.Relationships);return C.forEach((P,_)=>{b.addRelationship(_,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${P.fileName}`)}),{data:H(this.formatter.format(b,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/header${g+1}.xml.rels`}}),FooterRelationships:e.Footers.map((v,g)=>{let A=H(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),C=this.imageReplacer.getMediaData(A,e.Media),b=ce.copy(v.Relationships);return C.forEach((P,_)=>{b.addRelationship(_,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${P.fileName}`)}),{data:H(this.formatter.format(b,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:`word/_rels/footer${g+1}.xml.rels`}}),Headers:e.Headers.map((v,g)=>{let A=H(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),C=this.imageReplacer.getMediaData(A,e.Media),b=this.imageReplacer.replace(A,C,0);return{data:this.numberingReplacer.replace(b,e.Numbering.ConcreteNumbering),path:`word/header${g+1}.xml`}}),Footers:e.Footers.map((v,g)=>{let A=H(this.formatter.format(v.View,{viewWrapper:v,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),C=this.imageReplacer.getMediaData(A,e.Media),b=this.imageReplacer.replace(A,C,0);return{data:this.numberingReplacer.replace(b,e.Numbering.ConcreteNumbering),path:`word/footer${g+1}.xml`}}),CustomProperties:{data:H(this.formatter.format(e.CustomProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/custom.xml"},AppProperties:{data:H(this.formatter.format(e.AppProperties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"docProps/app.xml"},FootNotes:{data:(()=>{let v=this.imageReplacer.replace(i,f,l);return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/footnotes.xml"},FootNotesRelationships:{data:(()=>{let v=ce.copy(e.FootNotes.Relationships);return f.forEach((g,A)=>{v.addRelationship(l+A,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${g.fileName}`)}),H(this.formatter.format(v,{viewWrapper:e.FootNotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/footnotes.xml.rels"},Endnotes:{data:(()=>{let v=this.imageReplacer.replace(o,p,c);return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/endnotes.xml"},EndnotesRelationships:{data:(()=>{let v=ce.copy(e.Endnotes.Relationships);return p.forEach((g,A)=>{v.addRelationship(c+A,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${g.fileName}`)}),H(this.formatter.format(v,{viewWrapper:e.Endnotes,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/endnotes.xml.rels"},Settings:{data:H(this.formatter.format(e.Settings,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/settings.xml"}},e.Comments.IsEmpty?{}:{Comments:{data:(()=>{let v=this.imageReplacer.replace(s,d,u);return this.numberingReplacer.replace(v,e.Numbering.ConcreteNumbering)})(),path:"word/comments.xml"},CommentsRelationships:{data:(()=>{let v=ce.copy(e.Comments.Relationships);return d.forEach((g,A)=>{v.addRelationship(u+A,"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",`media/${g.fileName}`)}),H(this.formatter.format(v,{viewWrapper:{View:e.Comments,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}})})(),path:"word/_rels/comments.xml.rels"}}),e.CommentsExtended?{CommentsExtended:{data:H(this.formatter.format(e.CommentsExtended,{viewWrapper:{View:e.CommentsExtended,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/commentsExtended.xml"}}:{}),e.CommentsIds?{CommentsIds:{data:H(this.formatter.format(e.CommentsIds,{viewWrapper:{View:e.CommentsIds,Relationships:e.Comments.Relationships},file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/commentsIds.xml"}}:{}),{},{FontTable:{data:H(this.formatter.format(e.FontTable.View,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/fontTable.xml"},FontTableRelationships:{data:(()=>H(this.formatter.format(e.FontTable.Relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}))(),path:"word/_rels/fontTable.xml.rels"},Theme:{data:H(this.formatter.format(e.Theme,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/theme/theme1.xml"}},((r=e.Macros)===null||r===void 0?void 0:r.events)?{MacroEvents:{data:H(this.formatter.format(e.Macros.events,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/vbaData.xml"},MacroRelationships:{data:H(this.formatter.format(e.Macros.relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"word/_rels/vbaProject.bin.rels"}}:{}),e.Bibliography?{BibliographySources:{data:H(this.formatter.format(e.Bibliography.sources,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"customXml/item1.xml"},BibliographySourcesProperties:{data:H(this.formatter.format(e.Bibliography.properties,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"no",encoding:"UTF-8"}}),path:"customXml/itemProps1.xml"},BibliographySourcesRelationships:{data:H(this.formatter.format(e.Bibliography.relationships,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"customXml/_rels/item1.xml.rels"}}:{}),{},{PackageParts:Xi(e,t),Numbering:{data:H(this.formatter.format(e.Numbering,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{standalone:"yes",encoding:"UTF-8"}}),path:"word/numbering.xml"},ContentTypes:{data:H(this.formatter.format(e.ContentTypes,{viewWrapper:e.Document,file:e,stack:[]}),{indent:t,declaration:{encoding:"UTF-8"}}),path:"[Content_Types].xml"}})}},ha=Md((e,t)=>{var r=typeof Reflect==="object"?Reflect:null,n=r&&typeof r.apply==="function"?r.apply:function(T,S,N){return Function.prototype.apply.call(T,S,N)},s;if(r&&typeof r.ownKeys==="function")s=r.ownKeys;else if(Object.getOwnPropertySymbols)s=function(T){return Object.getOwnPropertyNames(T).concat(Object.getOwnPropertySymbols(T))};else s=function(T){return Object.getOwnPropertyNames(T)};function i(E){if(console&&console.warn)console.warn(E)}var o=Number.isNaN||function(T){return T!==T};function a(){a.init.call(this)}t.exports=a,t.exports.once=b,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function l(E){if(typeof E!=="function")throw TypeError('The "listener" argument must be of type Function. Received type '+typeof E)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(E){if(typeof E!=="number"||E<0||o(E))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+E+".");u=E}}),a.init=function(){if(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(T){if(typeof T!=="number"||T<0||o(T))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+T+".");return this._maxListeners=T,this};function c(E){if(E._maxListeners===void 0)return a.defaultMaxListeners;return E._maxListeners}a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(T){var S=[];for(var N=1;N0)M=S[0];if(M instanceof Error)throw M;var K=Error("Unhandled error."+(M?" ("+M.message+")":""));throw K.context=M,K}var q=D[T];if(q===void 0)return!1;if(typeof q==="function")n(q,this,S);else{var z=q.length,Y=g(q,z);for(var N=0;N0&&M.length>R&&!M.warned){M.warned=!0;var K=Error("Possible EventEmitter memory leak detected. "+M.length+" "+String(T)+" listeners added. Use emitter.setMaxListeners() to increase limit");K.name="MaxListenersExceededWarning",K.emitter=E,K.type=T,K.count=M.length,i(K)}}return E}a.prototype.addListener=function(T,S){return h(this,T,S,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(T,S){return h(this,T,S,!0)};function d(){if(!this.fired){if(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0)return this.listener.call(this.target);return this.listener.apply(this.target,arguments)}}function f(E,T,S){var N={fired:!1,wrapFn:void 0,target:E,type:T,listener:S},R=d.bind(N);return R.listener=S,N.wrapFn=R,R}a.prototype.once=function(T,S){return l(S),this.on(T,f(this,T,S)),this},a.prototype.prependOnceListener=function(T,S){return l(S),this.prependListener(T,f(this,T,S)),this},a.prototype.removeListener=function(T,S){var N,R,D,M,K;if(l(S),R=this._events,R===void 0)return this;if(N=R[T],N===void 0)return this;if(N===S||N.listener===S){if(--this._eventsCount===0)this._events=Object.create(null);else if(delete R[T],R.removeListener)this.emit("removeListener",T,N.listener||S)}else if(typeof N!=="function"){D=-1;for(M=N.length-1;M>=0;M--)if(N[M]===S||N[M].listener===S){K=N[M].listener,D=M;break}if(D<0)return this;if(D===0)N.shift();else A(N,D);if(N.length===1)R[T]=N[0];if(R.removeListener!==void 0)this.emit("removeListener",T,K||S)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(T){var S,N=this._events,R;if(N===void 0)return this;if(N.removeListener===void 0){if(arguments.length===0)this._events=Object.create(null),this._eventsCount=0;else if(N[T]!==void 0)if(--this._eventsCount===0)this._events=Object.create(null);else delete N[T];return this}if(arguments.length===0){var D=Object.keys(N),M;for(R=0;R=0;R--)this.removeListener(T,S[R]);return this};function p(E,T,S){var N=E._events;if(N===void 0)return[];var R=N[T];if(R===void 0)return[];if(typeof R==="function")return S?[R.listener||R]:[R];return S?C(R):g(R,R.length)}a.prototype.listeners=function(T){return p(this,T,!0)},a.prototype.rawListeners=function(T){return p(this,T,!1)},a.listenerCount=function(E,T){if(typeof E.listenerCount==="function")return E.listenerCount(T);else return v.call(E,T)},a.prototype.listenerCount=v;function v(E){var T=this._events;if(T!==void 0){var S=T[E];if(typeof S==="function")return 1;else if(S!==void 0)return S.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]};function g(E,T){var S=Array(T);for(var N=0;N{if(n.writable){if(n.write(h)===!1&&r.pause)r.pause()}};r.on("data",s);let i=()=>{if(r.readable&&r.resume)r.resume()};if(n.on("drain",i),!n._isStdio&&(!t||t.end!==!1))r.on("end",a),r.on("close",u);let o=!1;function a(){if(o)return;o=!0,n.end()}function u(){if(o)return;if(o=!0,typeof n.destroy==="function")n.destroy()}function l(h){if(c(),ha.EventEmitter.listenerCount(this,"error")===0)throw h}r.on("error",l),n.on("error",l);function c(){r.removeListener("data",s),n.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",l),n.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),n.removeListener("close",c)}return r.on("end",c),r.on("close",c),n.on("close",c),n.emit("pipe",r),n}};function da(e,t,r,n,s,i,o){try{var a=e[i](o),u=a.value}catch(l){r(l);return}a.done?t(u):Promise.resolve(u).then(n,s)}function It(e){return function(){var t=this,r=arguments;return new Promise(function(n,s){var i=e.apply(t,r);function o(u){da(i,n,s,o,a,"next",u)}function a(u){da(i,n,s,o,a,"throw",u)}o(void 0)})}}var vh={NONE:"",WITH_2_BLANKS:" ",WITH_4_BLANKS:" ",WITH_TAB:"\t"},pa=(e)=>e===!0?vh.WITH_2_BLANKS:e===!1?void 0:e,ma=(e)=>e.Macros===void 0?"application/vnd.openxmlformats-officedocument.wordprocessingml.document":"application/vnd.ms-word.document.macroEnabled.12",wh=class e{static pack(t,r,n){var s=this;return It(function*(i,o,a,u=[]){return _s(sn(s.compiler.compile(i,pa(a),u)),o,ma(i))}).apply(this,arguments)}static toString(t,r,n=[]){return e.pack(t,"string",r,n)}static toBuffer(t,r,n=[]){return e.pack(t,"nodebuffer",r,n)}static toBase64String(t,r,n=[]){return e.pack(t,"base64",r,n)}static toBlob(t,r,n=[]){return e.pack(t,"blob",r,n)}static toArrayBuffer(t,r,n=[]){return e.pack(t,"arraybuffer",r,n)}static toStream(t,r,n=[]){let s=new Jy,i=this.compiler.compile(t,pa(r),n);return new Promise((o)=>setTimeout(o)).then(()=>_s(sn(i),"nodebuffer",ma(t))).then((o)=>{s.emit("data",o),s.emit("end")},(o)=>s.emit("error",o)),s}};m(wh,"compiler",new qy);var gh=(e)=>{var t;if(e.name!=="w:bookmarkStart"&&e.name!=="w:bookmarkEnd")return;let r=Number((t=e.attributes)===null||t===void 0?void 0:t["w:id"]);return Number.isInteger(r)?r:void 0},yh=(e)=>{var t;let r=gh(e);return[...r===void 0?[]:[r],...((t=e.elements)!==null&&t!==void 0?t:[]).flatMap(yh)]},Zy=(e)=>{let t=new Set(e),r=new Map,n=e.reduce((o,a)=>Math.max(o,a),0),s=(o)=>{let a=r.get(o);if(a!==void 0)return a;let u=t.has(o)?n+1:o;return n=Math.max(n,u),t.add(u),r.set(o,u),u},i=(o)=>{let a=gh(o);return w(w(w({},o),a===void 0?{}:{attributes:w(w({},o.attributes),{},{"w:id":String(s(a))})}),o.elements===void 0?{}:{elements:o.elements.map(i)})};return(o)=>o.map(i)},Qy=new Dt,bn=(e)=>new TextDecoder("utf-8",{ignoreBOM:!0}).decode(e),it=(e)=>Kt(e,{keepWhitespaceText:!0}),xh=(e)=>{var t;return(t=it(H(Qy.format(new hr({text:e})))).elements[0].elements)!==null&&t!==void 0?t:[]},bh=(e)=>w(w({},e),{},{attributes:{"xml:space":"preserve"}}),ve=(e,t)=>{var r,n;let s=(r=e.elements)===null||r===void 0?void 0:r.find((i)=>i.name===t);if(s===void 0)return[];return(n=s.elements)!==null&&n!==void 0||(s.elements=[]),s.elements},Th=(e)=>{if(!(e===null||e===void 0?void 0:e.start.trim())||!(e===null||e===void 0?void 0:e.end.trim()))throw Error("Both start and end delimiters must be non-empty strings.")},$t=(e,t,r)=>{let n=ve(e,"Types");if(n.some((s)=>{var i,o;return s.type==="element"&&s.name==="Default"&&(s===null||s===void 0||(i=s.attributes)===null||i===void 0?void 0:i.ContentType)===t&&(s===null||s===void 0||(o=s.attributes)===null||o===void 0?void 0:o.Extension)===r}))return;n.push({attributes:{ContentType:t,Extension:r},name:"Default",type:"element"})},ex=(e,t,r)=>{let n=ve(e,"Types");if(n.some((s)=>{var i;return s.type==="element"&&s.name==="Override"&&((i=s.attributes)===null||i===void 0?void 0:i.PartName)===r}))return;n.push({attributes:{ContentType:t,PartName:r},name:"Override",type:"element"})},tx=(e,t)=>{var r;let n=(r=e.elements)===null||r===void 0?void 0:r.find((s)=>s.name==="Types");if((n===null||n===void 0?void 0:n.elements)===void 0)return;n.elements=n.elements.filter((s)=>{var i,o;return!(s.name==="Override"&&String((i=(o=s.attributes)===null||o===void 0?void 0:o.PartName)!==null&&i!==void 0?i:"").toLowerCase()===t.toLowerCase())})},rx=(e)=>{let t=parseInt(e.substring(3),10);return isNaN(t)?0:t},Ki=(e)=>ve(e,"Relationships").map((t)=>{var r,n;return rx((r=(n=t.attributes)===null||n===void 0||(n=n.Id)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"")}).reduce((t,r)=>Math.max(t,r),0)+1,Fs=(e,t,r,n,s)=>{let i=ve(e,"Relationships");return i.push({attributes:{Id:`rId${t}`,Type:r,Target:n,TargetMode:s},name:"Relationship",type:"element"}),i},fr=()=>({declaration:{attributes:{version:"1.0",encoding:"UTF-8",standalone:"yes"}},elements:[{type:"element",name:"Relationships",attributes:{xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},elements:[]}]}),fa="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",nx="application/vnd.openxmlformats-package.core-properties+xml",va="_rels/.rels",wa="docProps/core.xml",Bs={cp:"http://schemas.openxmlformats.org/package/2006/metadata/core-properties",dc:"http://purl.org/dc/elements/1.1/"},sx={title:{namespace:"dc",name:"title"},subject:{namespace:"dc",name:"subject"},creator:{namespace:"dc",name:"creator"},keywords:{namespace:"cp",name:"keywords"},description:{namespace:"dc",name:"description"},lastModifiedBy:{namespace:"cp",name:"lastModifiedBy"},revision:{namespace:"cp",name:"revision"}},ga=(e)=>e===""?[]:[{type:"text",text:String(e)}],ya=(e)=>{var t;return(t=e.name)===null||t===void 0?void 0:t.slice(e.name.indexOf(":")+1)},ix=(e,t)=>{var r;let n=(r=Object.entries(w({},e.attributes)).find(([s,i])=>(s==="xmlns"||s.startsWith("xmlns:"))&&i===Bs[t]))===null||r===void 0?void 0:r[0];if(n===void 0)return e.attributes=w(w({},e.attributes),{},{[`xmlns:${t}`]:Bs[t]}),`${t}:`;return n==="xmlns"?"":`${n.slice(6)}:`},ox=(e)=>{let t=e[0]===255&&e[1]===254?"utf-16le":e[0]===254&&e[1]===255?"utf-16be":"utf-8";return new TextDecoder(t).decode(e)},ax=(e,t,r)=>{var n;let s=t.get(r);if(s===void 0)return e.get(r);let i=it(ox(s));if((n=i.declaration)===null||n===void 0?void 0:n.attributes)i.declaration.attributes.encoding="UTF-8";return t.delete(r),e.set(r,i),i},lx=(e)=>{var t,r;let n=(t=e.get(va))!==null&&t!==void 0?t:fr(),s=(r=ve(n,"Relationships").find((i)=>{var o;return((o=i.attributes)===null||o===void 0?void 0:o.Type)===fa}))===null||r===void 0||(r=r.attributes)===null||r===void 0?void 0:r.Target;if(typeof s==="string")return _t("",s);return Fs(n,Ki(n),fa,wa),e.set(va,n),wa},cx=(e,t,r,{addContentTypeOverride:n})=>{var s,i;let o=lx(e),a=ax(e,t,o),u=a!==null&&a!==void 0?a:{declaration:{attributes:{version:"1.0",encoding:"UTF-8",standalone:"yes"}},elements:[{type:"element",name:"cp:coreProperties",attributes:{"xmlns:cp":Bs.cp},elements:[]}]};if(a===void 0)e.set(o,u),n(nx,`/${o}`);let l=(s=u.elements)===null||s===void 0?void 0:s.find((c)=>ya(c)==="coreProperties");if(l===void 0)throw Error(`Could not find the core properties in ${o}`);(i=l.elements)!==null&&i!==void 0||(l.elements=[]);for(let[c,{namespace:h,name:d}]of Object.entries(sx)){let f=r[c];if(f===void 0)continue;let p=l.elements.find((v)=>ya(v)===d);if(p)p.elements=ga(f);else l.elements.push({type:"element",name:`${ix(l,h)}${d}`,elements:ga(f)})}},$s=new Set(["wp:inline","wp:anchor"]),zi=new Set(["wp:docPr","wps:cNvPr","wpg:cNvPr"]),ux=new Set(["a:stCxn","a:endCxn"]),an=(e,t)=>{var r,n;if(!t.has((r=e.name)!==null&&r!==void 0?r:""))return;let s=Number((n=e.attributes)===null||n===void 0?void 0:n.id);return Number.isInteger(s)?s:void 0},Eh=(e)=>{var t;let r=an(e,zi);return[...r===void 0?[]:[r],...((t=e.elements)!==null&&t!==void 0?t:[]).flatMap(Eh)]},hx=(e)=>{let t=(r)=>{var n;let s=an(r,zi);return[...s===void 0?[]:[s],...((n=r.elements)!==null&&n!==void 0?n:[]).flatMap((i)=>{var o;return $s.has((o=i.name)!==null&&o!==void 0?o:"")?[]:t(i)})]};return t(e)},dx=(e)=>{let t=new Set(e),r=e.reduce((o,a)=>Math.max(o,a),0),n=(o)=>{let a=t.has(o)?r+1:o;return r=Math.max(r,a),t.add(a),a},s=(o)=>{let a=new Map([...new Set(hx(o))].map((l)=>[l,n(l)])),u=(l)=>{var c,h;if(l!==o&&$s.has((c=l.name)!==null&&c!==void 0?c:""))return s(l);let d=(h=an(l,zi))!==null&&h!==void 0?h:an(l,ux),f=d===void 0?void 0:a.get(d);return w(w(w({},l),f===void 0?{}:{attributes:w(w({},l.attributes),{},{id:String(f)})}),l.elements===void 0?{}:{elements:l.elements.map(u)})};return u(o)},i=(o)=>{var a;return $s.has((a=o.name)!==null&&a!==void 0?a:"")?s(o):w(w({},o),o.elements===void 0?{}:{elements:o.elements.map(i)})};return(o)=>o.map(i)},le={DOCUMENT:"file",PARAGRAPH:"paragraph",TABLE_ROWS:"tableRows",DRAWING:"drawing"},Sh=class{constructor(){m(this,"type",le.DRAWING)}},px=new Map([["wp:inline","wp:docPr"],["wp:anchor","wp:docPr"],["wpg:graphicFrame","wpg:cNvPr"],["wpc:graphicFrame","wpg:cNvPr"]]),Tn=(e)=>{var t;return((t=e.elements)!==null&&t!==void 0?t:[]).flatMap((r)=>{var n;let s=r.name===void 0?void 0:px.get(r.name),i=s===void 0?void 0:(n=r.elements)===null||n===void 0?void 0:n.find((o)=>o.name===s);return[...i?[{element:r,properties:i}]:[],...Tn(r)]})},Ih=(e)=>{var t,r;return[(t=e.attributes)===null||t===void 0?void 0:t.descr,(r=e.attributes)===null||r===void 0?void 0:r.title].flatMap((n)=>n===void 0?[]:[String(n)])},xa="[Content_Types].xml",mx=(e)=>{var t;if(!((t=e.elements)===null||t===void 0?void 0:t.some((n)=>n.name==="Relationships"))){var r;e.elements=[...(r=e.elements)!==null&&r!==void 0?r:[],...fr().elements]}return ve(e,"Relationships")},fx="http://schemas.openxmlformats.org/officeDocument/2006/relationships",Hs=(e)=>{var t,r;return new Set(["r",...Object.entries((t=e.attributes)!==null&&t!==void 0?t:{}).flatMap(([n,s])=>n.startsWith("xmlns:")&&s===fx?[n.slice(6)]:[]),...((r=e.elements)!==null&&r!==void 0?r:[]).flatMap((n)=>[...Hs(n)])])},Us=(e,t)=>{var r,n;return new Set([...Object.entries((r=e.attributes)!==null&&r!==void 0?r:{}).flatMap(([s,i])=>s.includes(":")&&t.has(s.slice(0,s.indexOf(":")))?[String(i)]:[]),...((n=e.elements)!==null&&n!==void 0?n:[]).flatMap((s)=>[...Us(s,t)])])},vx=(e,t)=>{let r=(l)=>e.has(l)||t.has(l),n=(l)=>{if(r(l))return l;let c=(()=>{try{return decodeURI(l)}catch(d){return}})();if(c!==void 0&&r(c))return c;let h=l.toLowerCase();return[...e.keys(),...t.keys()].find((d)=>d.toLowerCase()===h)},s=(l,c)=>{let h=e.get(He(l));return h===void 0?void 0:ve(h,"Relationships").find((d)=>{var f;return d.name==="Relationship"&&((f=d.attributes)===null||f===void 0?void 0:f.Id)===c})},i=(l,c)=>{var h,d;let f=(h=c.attributes)===null||h===void 0?void 0:h.Target;return((d=c.attributes)===null||d===void 0?void 0:d.TargetMode)==="External"||f===void 0?void 0:n(_t(l,String(f)))},o=(l)=>[...e].some(([c,h])=>c.endsWith(".rels")&&ve(h,"Relationships").some((d)=>i(zu(c),d)===l)),a=(l,c)=>{if(c===void 0||c===l||c===xa||c.endsWith(".rels")||o(c))return;let h=e.get(He(c));e.delete(c),t.delete(c),e.delete(He(c));let d=e.get(xa);if(d!==void 0)tx(d,`/${c}`);for(let f of h===void 0?[]:ve(h,"Relationships"))a(c,i(c,f))};return{findRelationship:s,pathOf:i,removeIfUnreferenced:a,removeRelationships:(l,c)=>{var h,d;let f=(h=e.get(He(l)))===null||h===void 0||(h=h.elements)===null||h===void 0?void 0:h.find((v)=>v.name==="Relationships"),p=((d=f===null||f===void 0?void 0:f.elements)!==null&&d!==void 0?d:[]).filter((v)=>{var g;return v.name==="Relationship"&&c.has(String((g=v.attributes)===null||g===void 0?void 0:g.Id))});if(f===void 0||p.length===0)return;f.elements=f.elements.filter((v)=>!p.includes(v));for(let v of p)a(l,i(l,v))}}},wx=(e,{findRelationship:t,pathOf:r,removeIfUnreferenced:n},s,i)=>{let o=new Dt;return{getRelatedPart:(a,u)=>{let l=t(a.path,u),c=l===void 0?void 0:r(a.path,l);return c===void 0?void 0:{path:c,xml:e.get(c)}},replaceRelatedPart:(a,u,l)=>{let c=`word/${s.PackageParts.add(l)}`,{relationshipType:h}=l.options,d=Wi(a.path,c),f=u===void 0?void 0:t(a.path,u);if(f===void 0){var p;let g=He(a.path),A=(p=e.get(g))!==null&&p!==void 0?p:fr();e.set(g,A);let C=u!==null&&u!==void 0?u:`rId${Ki(A)}`;return mx(A).push({type:"element",name:"Relationship",attributes:{Id:C,Type:h,Target:d}}),C}let v=r(a.path,f);return f.attributes=w(w({},Object.fromEntries(Object.entries(f.attributes).filter(([g])=>g!=="TargetMode"))),{},{Type:h,Target:d}),n(a.path,v),String(f.attributes.Id)},format:(a)=>it(H(o.format(a,i))).elements[0]}},gx=({parts:e,binaryParts:t,file:r,patches:n,delimiters:s},i)=>{let o=n.map(([l,c])=>({placeholder:`${s.start}${l}${s.end}`,patch:c})),a=[...e].filter(([l])=>l.startsWith("word/")&&!l.endsWith(".rels")).flatMap(([l,c])=>Tn(c).flatMap((h)=>{let d=Ih(h.properties),f=o.filter(({placeholder:g})=>d.some((A)=>A.includes(g)));if(f.length>1){var p,v;throw Error(`The drawing "${(p=(v=h.properties.attributes)===null||v===void 0?void 0:v.name)!==null&&p!==void 0?p:""}" in ${l} has the placeholders ${f.map(({placeholder:g})=>g).join(" and ")} in its alt text. A drawing can only be patched once`)}return f.map(({placeholder:g,patch:A})=>({drawing:w(w({placeholder:g},h),{},{part:{path:l,xml:c}}),patch:A}))})),u=vx(e,t);for(let{drawing:l,patch:c}of a){let h=Us(l.element,Hs(l.part.xml));c.patch(l,wx(e,u,r,i(l.part.path)));let d=Us(l.part.xml,Hs(l.part.xml));u.removeRelationships(l.part.path,new Set([...h].filter((f)=>!d.has(f))))}},yx=(e)=>typeof e==="object"&&e!==null&&("on"in e)&&typeof e.on==="function",xx=(e)=>typeof e==="object"&&e!==null&&("generateAsync"in e)&&typeof e.generateAsync==="function",bx=(e)=>["[object Blob]","[object File]"].includes(Object.prototype.toString.call(e)),Tx=(e)=>new Promise((t,r)=>{let n=[];e.on("data",(s)=>{if(ArrayBuffer.isView(s))n.push(new Uint8Array(s.buffer,s.byteOffset,s.byteLength));else if(typeof s==="number")n.push(s);else r(TypeError(`A template stream must give bytes, but it gave a ${typeof s}. A stream with an encoding set gives text, so do not set one.`))}),e.on("error",r),e.on("end",()=>{let s=new Uint8Array(n.reduce((i,o)=>i+(typeof o==="number"?1:o.length),0));n.reduce((i,o)=>{if(typeof o==="number")return s[i]=o,i+1;return s.set(o,i),i+o.length},0),t(s)})}),Ex=function(){var e=It(function*(t){if(xx(t))return t.generateAsync({type:"uint8array"});if(yx(t))return Tx(t);if(bx(t))return new Uint8Array(yield t.arrayBuffer());if(typeof t==="string")return Uint8Array.from({length:t.length},(r,n)=>t.charCodeAt(n));if(Array.isArray(t))return Uint8Array.from(t);return ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)});return function(r){return e.apply(this,arguments)}}(),Ah=function(){var e=It(function*(t,r){return on(yield Ex(t),r)});return function(r,n){return e.apply(this,arguments)}}(),Sx=new Dt,Mr="word/document.xml",Ix={path:"word/footnotes.xml",rootName:"w:footnotes",noteName:"w:footnote",referenceName:"w:footnoteReference",contentType:"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml",relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",create:{part:()=>new Di,mark:()=>new Nu,styles:()=>[new Mu({}),new Bu({}),new Fu({})]}},Ax={path:"word/endnotes.xml",rootName:"w:endnotes",noteName:"w:endnote",referenceName:"w:endnoteReference",contentType:"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml",relationshipType:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",create:{part:()=>new Li,mark:()=>new Su,styles:()=>[new $u({}),new Uu({}),new Hu({})]}},Fr=(e,t)=>it(H(Sx.format(e,t))).elements[0],Ch=(e,t)=>{var r,n,s;let i=t.includes((r=e.name)!==null&&r!==void 0?r:"")?Number((n=e.attributes)===null||n===void 0?void 0:n["w:id"]):NaN;return[...Number.isInteger(i)?[i]:[],...((s=e.elements)!==null&&s!==void 0?s:[]).flatMap((o)=>Ch(o,t))]},Cx=(e,t)=>{var r,n;let s=(r=e.elements)!==null&&r!==void 0?r:[],i=((n=s[0])===null||n===void 0?void 0:n.name)==="w:pPr"?1:0;return w(w({},e),{},{elements:[...s.slice(0,i),t,...s.slice(i)]})},ba=(e,t,r,{createContext:n,addContentTypeOverride:s,renumberBookmarks:i,renumberDrawings:o,renumberLists:a,useStyles:u})=>{let l=new Map(Object.entries(t).map(([C,b])=>[Number(C),b])),c=new Map,h=[...l.keys()].filter(Number.isFinite).reduce((C,b)=>Math.max(C,Math.floor(b)),0),d=new Map,f,p=(C)=>{var b,P;let _=C.name===e.referenceName?l.get(Number((b=C.attributes)===null||b===void 0?void 0:b["w:id"])):void 0;if(_===void 0)return C.elements===void 0?C:w(w({},C),{},{elements:C.elements.map(p)});return f=((P=f)!==null&&P!==void 0?P:[...r.values()].flatMap((E)=>Ch(E,[e.noteName,e.referenceName])).reduce((E,T)=>Math.max(E,T),0))+1,d.set(f,_),w(w({},C),{},{attributes:w(w({},C.attributes),{},{"w:id":String(f)})})},v=()=>{var C;let b=ve((C=r.get(He(Mr)))!==null&&C!==void 0?C:{},"Relationships").find((_)=>{var E;return((E=_.attributes)===null||E===void 0?void 0:E.Type)===e.relationshipType}),P=b?_t(Mr,String(b.attributes.Target)):e.path;if(!r.has(P))r.set(P,{declaration:{attributes:{version:"1.0",encoding:"UTF-8",standalone:"yes"}},elements:[Fr(e.create.part(),n(P))]}),s(e.contentType,`/${P}`);if(!b)n(Mr).viewWrapper.Relationships.addRelationship(vt(),e.relationshipType,Wi(Mr,P));return P};return{renumber:(C)=>C.map(p),write:()=>{if(d.size===0)return;let C=v(),b=n(C),P=new Map([...new Set(d.values())].map((E)=>{let T=Fr(e.create.mark(),b);return[E,u(a(i(E.children.map((S)=>Fr(S,b)).map((S,N)=>N===0?Cx(S,T):S))))]}));ve(r.get(C),e.rootName).push(...[...d].map(([E,T])=>({type:"element",name:e.noteName,attributes:{"w:id":String(E)},elements:[...o(P.get(T))]})));let _=r.get("word/styles.xml");if(_){let E=ve(_,"w:styles"),T=new Set(E.map((S)=>{var N;return(N=S.attributes)===null||N===void 0?void 0:N["w:styleId"]}));E.push(...e.create.styles().map((S)=>Fr(S,b)).filter((S)=>{var N;return!T.has((N=S.attributes)===null||N===void 0?void 0:N["w:styleId"])}))}},carry:(C,b)=>{let P=c.get(C);if(P!==void 0)return P;return h++,l.set(h,b),c.set(C,h),h}}};var Nx=({footnotes:e={},endnotes:t={}},r,n)=>{let s={footnotes:ba(Ix,e,r,n),endnotes:ba(Ax,t,r,n)};return{carry:(i,o,a)=>s[i].carry(o,a),renumber:(i)=>Object.values(s).reduce((o,a)=>a.renumber(o),i),write:()=>{for(let i of Object.values(s))i.write()}}},kx=new Dt,Br="word/document.xml",Rx="word/numbering.xml",Px="application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml",Ta="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",Ox="default-bullet-numbering",_x="1",Lx=(e,t)=>it(H(kx.format(e,t))).elements[0],Ea=(e)=>e.reduce((t,r)=>Math.max(t,r),0),Dx=(e,t,{createContext:r,addContentTypeOverride:n})=>{let s=new Map,i,o=()=>{var p;return ve((p=t.get(He(Br)))!==null&&p!==void 0?p:{},"Relationships").find((v)=>{var g;return((g=v.attributes)===null||g===void 0?void 0:g.Type)===Ta})},a=(p=o())=>p?_t(Br,String(p.attributes.Target)):Rx,u=(p,v)=>{var g;return ve((g=t.get(a()))!==null&&g!==void 0?g:{},"w:numbering").filter((A)=>A.name===p).map((A)=>Number(A.attributes[v]))},l=(p)=>{if(p===_x)return e.ConcreteNumbering.find(({reference:g})=>g===Ox);if(!p.startsWith("{"))return;let v=e.ConcreteNumbering.find(({reference:g,instance:A})=>p===`{${g}-${A}}`);if(!v){let g=p.slice(1,-1).replace(/-\d+$/,"");throw Error(`A paragraph in a patch uses the numbering "${g}", which isn't in the numbering option of patchDocument. Add it there with its levels, as in a Document`)}return v},c=(p)=>{var v;let g=s.get(p.numId);if(g!==void 0)return g;return i=((v=i)!==null&&v!==void 0?v:Ea(u("w:num","w:numId")))+1,s.set(p.numId,i),i},h=(p)=>{let v=p.name==="w:numId"?l(String(p.attributes["w:val"])):void 0;if(v===void 0)return p.elements===void 0?p:w(w({},p),{},{elements:p.elements.map(h)});return w(w({},p),{},{attributes:w(w({},p.attributes),{},{"w:val":String(c(v))})})},d=(p)=>{let v=o(),g=a(v);if(!t.has(g))t.set(g,{declaration:{attributes:{version:"1.0",encoding:"UTF-8",standalone:"yes"}},elements:[w(w({},p),{},{elements:[]})]}),n(Px,`/${g}`);if(!v)r(Br).viewWrapper.Relationships.addRelationship(vt(),Ta,Wi(Br,g));return g};return{renumber:(p)=>p.map(h),write:()=>{var p,v;if(s.size===0)return;let g=Lx(e,r(a())),A=(R)=>Number(R.elements.find((D)=>D.name==="w:abstractNumId").attributes["w:val"]),C=g.elements.filter((R)=>R.name==="w:num"&&s.has(Number(R.attributes["w:numId"]))),b=Ea(u("w:abstractNum","w:abstractNumId")),P=new Map([...new Set(C.map(A))].map((R,D)=>[R,b+D+1])),_=g.elements.flatMap((R)=>{let D=R.name==="w:abstractNum"?P.get(Number(R.attributes["w:abstractNumId"])):void 0;return D===void 0?[]:[w(w({},R),{},{attributes:w(w({},R.attributes),{},{"w:abstractNumId":String(D)})})]}),E=d(g),T=t.get(E).elements.find((R)=>R.name==="w:numbering");T.attributes=w(w(w({},Object.fromEntries(Object.entries(g.attributes).filter(([R])=>R.startsWith("xmlns:")))),T.attributes),{},{"mc:Ignorable":[...new Set([...String((p=(v=T.attributes)===null||v===void 0?void 0:v["mc:Ignorable"])!==null&&p!==void 0?p:"").split(" "),...String(g.attributes["mc:Ignorable"]).split(" ")])].filter((R)=>R!=="").join(" ")});let S=ve(t.get(E),"w:numbering"),N=(R)=>{let D=S.findIndex((M)=>R.includes(M.name));return D===-1?S.length:D};S.splice(N(["w:num","w:numIdMacAtCleanup"]),0,..._),S.splice(N(["w:numIdMacAtCleanup"]),0,...C.map((R)=>w(w({},R),{},{attributes:w(w({},R.attributes),{},{"w:numId":String(s.get(Number(R.attributes["w:numId"])))}),elements:R.elements.map((D)=>D.name==="w:abstractNumId"?w(w({},D),{},{attributes:{"w:val":String(P.get(A(R)))}}):D)})))}}},Ws={nameOf:(e)=>e.type==="element"?e.name:void 0,contentOf:(e)=>e.elements,attributeOf:(e,t)=>{var r;return(r=e.attributes)===null||r===void 0?void 0:r[t]},textOf:(e)=>{var t;return((t=e.elements)!==null&&t!==void 0?t:[]).filter(({type:r})=>r==="text").map(({text:r})=>String(r)).join("")},textElement:(e)=>({type:"element",name:"w:t",attributes:{"xml:space":"preserve"},elements:[{type:"text",text:e}]}),writeClean:(e,t)=>{var r;if(/^\s*(PAGEREF|TOC)\b/i.test(t)&&((r=e.attributes)===null||r===void 0?void 0:r["w:dirty"])!==void 0)e.attributes=Object.fromEntries(Object.entries(e.attributes).filter(([n])=>n!=="w:dirty"))},setSimpleFieldResult:(e,t)=>{e.elements=[{type:"element",name:"w:r",elements:[Ws.textElement(t)]}]}},as="word/document.xml",Mx="http://schemas.openxmlformats.org/officeDocument/2006/relationships/aFChunk",Fx=[80,75,3,4],Bx=function(){var e=It(function*(t){if(!Fx.every((r,n)=>t[n]===r))return;try{let r=new Map,n=new Map;for(let[i,o]of on(t))if(/\.(xml|rels)$/.test(i))r.set(i,it(bn(o)));else n.set(i,o);let s=yield Nh(r,n);return w({parts:r,binaryParts:n},s.size>0?{importedDocuments:s}:{})}catch(r){return}});return function(r){return e.apply(this,arguments)}}(),Nh=function(){var e=It(function*(t,r){let n=new Map;for(let[o,a]of t){var s,i;if(!o.endsWith(".rels"))continue;for(let{attributes:u={}}of(s=(i=Jr(a))===null||i===void 0?void 0:i.elements)!==null&&s!==void 0?s:[]){let l=_t(zu(o),String(u.Target)),c=r.get(l),h=u.Type===Mx&&u.TargetMode!=="External"&&c?yield Bx(c):void 0;if(h)n.set(l,h)}}return n});return function(r,n){return e.apply(this,arguments)}}(),Jr=(e)=>{var t;return e===null||e===void 0||(t=e.elements)===null||t===void 0?void 0:t.find(({type:r})=>r==="element")},$x=function(){var e=It(function*(t,r,n=new Map){var s,i;let o=Jr(t.get(as));if(!o)return;let a=yield Nh(t,n),u=r(w({parts:t,binaryParts:n},a.size>0?{importedDocuments:a}:{})),l=ql(Ws,o,u,{blank:!0}),c=(s=(i=Jr(t.get(He(as))))===null||i===void 0?void 0:i.elements)!==null&&s!==void 0?s:[];for(let{attributes:h={}}of c){let d=/\/(header|footer)$/.test(String(h.Type))?Jr(t.get(_t(as,String(h.Target)))):void 0;if(d)Jl(Ws,d,u,{blank:!0,sectionPageCount:l.get(String(h.Id))})}});return function(r,n){return e.apply(this,arguments)}}(),Hx=new Set(["w:hyperlink","w:sdt","w:sdtContent","w:ins","w:moveTo","w:smartTag","w:customXml","w:fldSimple","w:dir","w:bdo"]),kh=(e,t)=>{var r;return((r=e.elements)!==null&&r!==void 0?r:[]).flatMap((n,s)=>{var i;if(n.name==="w:r")return[{element:n,path:[...t,s]}];return Hx.has((i=n.name)!==null&&i!==void 0?i:"")?kh(n,[...t,s]):[]})},ln=(e,t)=>t.reduce((r,n)=>r.elements[n],e),Ar=(e)=>{if(e.element.name!=="w:p")throw Error(`Invalid node type: ${e.element.name}`);if(!e.element.elements)return{text:"",runs:[],index:-1,pathToParagraph:[]};let t=0,r=kh(e.element,[]).map(({element:n,path:s})=>{let i=Ux(n,s,t);return t+=i.text.length,i});return{text:r.reduce((n,s)=>n+s.text,""),runs:r,index:e.index,pathToParagraph:Rh(e)}},Ux=(e,t,r)=>{if(!e.elements)return{text:"",parts:[],path:t,start:r,end:r};let n=r,s=e.elements.map((i,o)=>{var a,u;if(i.name!=="w:t"||!i.elements||i.elements.length===0)return;let l=(a=(u=i.elements[0].text)===null||u===void 0?void 0:u.toString())!==null&&a!==void 0?a:"",c=n;return n+=l.length,{text:l,index:o,start:c,end:c+l.length-1}}).filter((i)=>!!i).map((i)=>i);return{text:s.reduce((i,o)=>i+o.text,""),parts:s,path:t,start:r,end:s.length>0?s[s.length-1].end:r}},Rh=(e)=>e.parent?[...Rh(e.parent),e.index]:[e.index],Wx=class extends Error{constructor(e){super(`Token ${e} not found`);this.name="TokenNotFoundError"}},Gx=(e,t)=>{let r=Ar({element:e,index:0,parent:void 0}).runs.find(({parts:n})=>n.some(({text:s})=>s.includes(t)));if(!r)throw new Wx(t);return r.path},jx=(e,t)=>{var r,n;let s=-1,i=(r=(n=e.elements)===null||n===void 0?void 0:n.map((o,a)=>{if(s!==-1)return o;if(o.type==="element"&&o.name==="w:t"){var u,l;let c=((u=(l=o.elements)===null||l===void 0||(l=l[0])===null||l===void 0?void 0:l.text)!==null&&u!==void 0?u:"").split(t),h=c.map((d)=>w(w(w({},o),bh(o)),{},{elements:xh(d)}));if(c.length>1)s=a;return h}else return o}).flat())!==null&&r!==void 0?r:[];return{left:w(w({},JSON.parse(JSON.stringify(e))),{},{elements:i.slice(0,s+1)}),right:w(w({},JSON.parse(JSON.stringify(e))),{},{elements:i.slice(s+1)})}},sr={START:0,MIDDLE:1,END:2},Ph=({paragraphElement:e,renderedParagraph:t,originalText:r,replacementText:n,fromIndex:s=0})=>{let i=t.text.indexOf(r,s),o=i+r.length-1,a=sr.START;for(let u of t.runs){let l=ln(e,u.path);for(let{text:c,index:h,start:d,end:f}of u.parts)switch(a){case sr.START:if(i>=d&&i<=f){let p=i-d,v=Math.min(o,f)-d;if(c.substring(p,v+1)==="")continue;let g=c.substring(0,p)+n+c.substring(v+1);ls(l.elements[h],g),a=sr.MIDDLE;continue}break;case sr.MIDDLE:if(o<=f){let p=c.substring(o-d+1);ls(l.elements[h],p);let v=l.elements[h];l.elements[h]=bh(v),a=sr.END}else ls(l.elements[h],"")}}return e},ls=(e,t)=>(e.elements=xh(t),e),Sa=(e)=>{var t,r;return(t=(r=e.element.elements)===null||r===void 0?void 0:r.map((n,s)=>({element:n,index:s,parent:e})))!==null&&t!==void 0?t:[]},Oh=(e)=>{let t=[],r=[...Sa({element:e,index:0,parent:void 0})],n;while(r.length>0){if(n=r.shift(),n.element.name==="w:p")t=[...t,Ar(n)];r.push(...Sa(n))}return t},Yi=(e,t)=>Oh(e).filter((r)=>r.text.includes(t)),cs="￿",Vx=({json:e,patch:t,patchText:r,context:n,keepOriginalStyles:s=!0,recursive:i=!0,renumberIds:o=(a)=>a})=>{let a=Yi(e,r);if(a.length===0)return{element:e,didFindOccurrence:!1};let u=[...a].reverse(),l=t.type===le.DOCUMENT?rb(u):u,c,h=()=>{var f;return c=((f=c)!==null&&f!==void 0?f:Lh(e))+1,String(c)};for(let f of l)switch(t.type){case le.DOCUMENT:{var d;let p=nb(e,f.pathToParagraph),v=sb(f.pathToParagraph),g=Ia(t,n,o),A=p.name==="w:tc"&&v===p.elements.length-1&&((d=g[g.length-1])===null||d===void 0?void 0:d.name)!=="w:p"?[{type:"element",name:"w:p"}]:[];p.elements.splice(v,1,...g,...A);break}case le.PARAGRAPH:default:{let p=Dh(e,f.pathToParagraph),v=f,g=0;do g=Xx({paragraphElement:p,renderedParagraph:v,patchText:r,fromIndex:g,children:Ia(t,n,o),keepOriginalStyles:s,newTrackedChangeId:h}),v=Ar({element:p,index:f.index,parent:void 0});while(i&&v.text.includes(r,g));break}}return{element:e,didFindOccurrence:!0}},Ia=(e,t,r)=>r(e.children.flatMap((n)=>{var s;return(s=n.writtenAs)!==null&&s!==void 0?s:n}).flatMap((n)=>{let s=n.prepForXml(t);return s?[it(H(s)).elements[0]]:[]})),Xx=({paragraphElement:e,renderedParagraph:t,patchText:r,fromIndex:n,children:s,keepOriginalStyles:i,newTrackedChangeId:o})=>{let a=t.text.indexOf(r,n);Ph({paragraphElement:e,renderedParagraph:t,originalText:r,replacementText:cs,fromIndex:n});let u=Gx(e,cs),l=u.slice(0,-1),c=ln(e,l),h=u[u.length-1],d=l.map((_,E)=>ln(e,l.slice(0,E+1))).filter((_)=>_.name==="w:sdt"),f=[...d].reverse().find(Kx),p=c.elements[h],{left:v,right:g}=jx(p,cs),A=p.elements.find((_)=>_.type==="element"&&_.name==="w:rPr"),C=f?zx(f):A,b=i&&C?s.map((_)=>_h(_,C)):s,P=A?w(w({},g),{},{elements:[A,...g.elements]}):g;return c.elements.splice(h,1,v,...b,P),d.forEach((_)=>Jx(_,b)),Qx(e,l,o),a+Ar({element:{name:"w:p",elements:[...b]},index:0,parent:void 0}).text.length},qi=(e)=>{var t;return(t=e.elements)===null||t===void 0?void 0:t.find((r)=>r.name==="w:sdtPr")},Kx=(e)=>{var t;return!!((t=qi(e))===null||t===void 0||(t=t.elements)===null||t===void 0?void 0:t.some((r)=>r.name==="w:showingPlcHdr"))},zx=(e)=>{var t;return(t=qi(e))===null||t===void 0||(t=t.elements)===null||t===void 0?void 0:t.find((r)=>r.name==="w:rPr")},Yx=new Set(["w:rPr","w:t","w:tab","w:br"]),qx=(e)=>e.name==="w:bookmarkStart"||e.name==="w:bookmarkEnd"||e.name==="w:r"&&kt(e).every((t)=>Yx.has(t.name)),Jx=(e,t)=>{let r=qi(e);if(!(r===null||r===void 0?void 0:r.elements))return;let n=r.elements.some((s)=>s.name==="w:text")&&!t.every(qx);r.elements=r.elements.filter((s)=>s.name!=="w:showingPlcHdr"&&s.name!=="w:dataBinding"&&!(n&&s.name==="w:text"))},Gs=new Set(["w:hyperlink","w:fldSimple","w:subDoc"]),Zx=new Map([["w:ins",Gs],["w:moveTo",Gs],["w:hyperlink",new Set(["w:hyperlink"])]]),Qx=(e,t,r)=>{for(let s=t.length;s>0;s--){var n;let i=ln(e,t.slice(0,s-1)),o=t[s-1],a=i.elements[o],u=Zx.get(a.name),l=(g)=>!!(u===null||u===void 0?void 0:u.has(g.name));if(!((n=a.elements)===null||n===void 0?void 0:n.some(l)))continue;let{elements:c}=a,h=c.flatMap((g,A)=>A===0||l(g)||l(c[A-1])?[A]:[]),d=h.map((g,A)=>c.slice(g,h[A+1])),f=u===Gs,p=!0,v=d.map((g)=>{if(l(g[0]))return g[0];let A=f&&!p?w(w({},a.attributes),{},{"w:id":r()}):a.attributes;return p=!1,w(w({},a),{},{attributes:A,elements:[...g]})});i.elements.splice(o,1,...v)}},_h=(e,t)=>{if(e.name==="w:r")return eb(e,t);return e.elements?w(w({},e),{},{elements:e.elements.map((r)=>_h(r,t))}):e},eb=(e,t)=>{let r=kt(e).find((o)=>o.type==="element"&&o.name==="w:rPr");if(!r)return w(w({},e),{},{elements:[t,...kt(e)]});let n=new Set(kt(r).map((o)=>o.name)),s=[...kt(t).filter((o)=>!n.has(o.name)),...kt(r)],i=w(w({},r),{},{elements:[...s].sort((o,a)=>Aa(o)-Aa(a))});return w(w({},e),{},{elements:kt(e).map((o)=>o===r?i:o)})},us=["w:rStyle","w:rFonts","w:b","w:bCs","w:i","w:iCs","w:caps","w:smallCaps","w:strike","w:dstrike","w:outline","w:shadow","w:emboss","w:imprint","w:noProof","w:snapToGrid","w:vanish","w:webHidden","w:color","w:spacing","w:w","w:kern","w:position","w:sz","w:szCs","w:highlight","w:u","w:effect","w:bdr","w:shd","w:fitText","w:vertAlign","w:rtl","w:cs","w:em","w:lang","w:eastAsianLayout","w:specVanish","w:oMath","w14:glow","w14:shadow","w14:reflection","w14:textOutline","w14:textFill","w14:scene3d","w14:props3d","w14:ligatures","w14:numForm","w14:numSpacing","w14:stylisticSets","w14:cntxtAlts"],Aa=(e)=>{var t;if(e.name==="w:rPrChange")return us.length+1;let r=us.indexOf((t=e.name)!==null&&t!==void 0?t:"");return r===-1?us.length:r},kt=(e)=>{var t;return(t=e.elements)!==null&&t!==void 0?t:[]},Lh=(e)=>{var t,r;let n=Number((t=e.attributes)===null||t===void 0?void 0:t["w:id"]);return((r=e.elements)!==null&&r!==void 0?r:[]).reduce((s,i)=>Math.max(s,Lh(i)),Number.isInteger(n)?n:0)},tb=(e,t)=>e.length>t.length&&t.every((r,n)=>e[n]===r),rb=(e)=>e.filter((t)=>!e.some((r)=>tb(t.pathToParagraph,r.pathToParagraph))),Dh=(e,t)=>{let r=e;for(let n=1;nDh(e,t.slice(0,t.length-1)),sb=(e)=>e[e.length-1],ib=new Dt,hs="word/styles.xml",ob=new Set(["w:pStyle","w:rStyle","w:tblStyle","w:basedOn","w:next","w:link"]),cr=(e)=>{var t;return String((t=e.attributes)===null||t===void 0?void 0:t["w:styleId"])},js=(e)=>{var t;let r=(t=e.elements)===null||t===void 0||(t=t.find((n)=>n.name==="w:name"))===null||t===void 0||(t=t.attributes)===null||t===void 0?void 0:t["w:val"];return r===void 0?void 0:String(r).toLowerCase()},Zr=(e,t)=>{var r;return e===null||e===void 0||(r=e.elements)===null||r===void 0?void 0:r.find((n)=>n.name===t)},Ca=(e)=>{var t;let r=Number((t=Zr(e,"w:sz"))===null||t===void 0||(t=t.attributes)===null||t===void 0?void 0:t["w:val"]);return Number.isNaN(r)?void 0:r},ab=(e)=>{var t,r;let n=e.filter((o)=>o.name==="w:style"),s=(t=n.find((o)=>cr(o)==="Normal"))!==null&&t!==void 0?t:n.find((o)=>{var a;return((a=o.attributes)===null||a===void 0?void 0:a["w:type"])==="paragraph"&&js(o)==="normal"}),i=e.find((o)=>o.name==="w:docDefaults");return(r=Ca(Zr(s,"w:rPr")))!==null&&r!==void 0?r:Ca(Zr(Zr(i,"w:rPrDefault"),"w:rPr"))},lb=(e,t)=>new Map(Object.values(Ui({document:{run:{size:t}}})).map((r)=>it(H(ib.format(r,e))).elements[0]).filter((r)=>r.name==="w:style").map((r)=>[cr(r),r])),cb=(e,t)=>{var r;let n=ve((r=e.get(hs))!==null&&r!==void 0?r:{},"w:styles"),s=n.filter((p)=>p.name==="w:style"),i=new Set(s.map(cr)),o,a=(p)=>{var v;return(v=o)!==null&&v!==void 0||(o=lb(t(hs),ab(n))),o.get(p)},u=new Set,l=new Map,c=(p)=>{let v=i.has(p)?void 0:a(p);if(v===void 0)return p;let g=s.find((A)=>{var C,b;return((C=A.attributes)===null||C===void 0?void 0:C["w:type"])===((b=v.attributes)===null||b===void 0?void 0:b["w:type"])&&js(A)===js(v)});if(g!==void 0)return cr(g);return u.add(p),p},h=(p)=>{if(!l.has(p))l.set(p,c(p));return l.get(p)},d=(p)=>{var v;if(ob.has((v=p.name)!==null&&v!==void 0?v:""))return w(w({},p),{},{attributes:w(w({},p.attributes),{},{"w:val":h(String(p.attributes["w:val"]))})});return p.elements===void 0?p:w(w({},p),{},{elements:p.elements.map(d)})};return{use:(p)=>p.map(d),write:()=>{let p=e.get(hs);if(!p)return;let v=ve(p,"w:styles"),g=new Set(v.map(cr));for(let A of u)if(!g.has(A))g.add(A),v.push(d(a(A)))}}},ub={type:le.PARAGRAPH,children:[]},hb=({json:e,key:t,patch:r,delimiters:{start:n,end:s},patchPlaceholder:i,renumberDrawings:o})=>{let a=`${n}${t}.`;for(let u of db(e,a)){let l=fb(u.elements,a,s),c=r.rows.flatMap((h,d)=>{let f={type:"element",name:"w:tbl",elements:[...d===0?u.elements.map(vb):o(Fh(u.elements))]},p=new Map(Object.entries(h).flatMap(([v,g])=>g===void 0?[]:[[v,g]]));for(let[v,g]of p)i(f,`${t}.${v}`,g);for(let v of l.filter((g)=>!p.has(g)))i(f,`${t}.${v}`,ub);return f.elements});if(u.parent.elements.splice(u.parent.elements.indexOf(u.elements[0]),u.elements.length,...c),u.table&&!Mh(u.table.element))u.table.parent.elements.splice(u.table.parent.elements.indexOf(u.table.element),1)}},db=(e,t)=>{let r=Yi(e,t).flatMap((s)=>{let i=pb(e,s.pathToParagraph);return i?[i]:[]}),n=r.filter((s)=>!r.some((i)=>mb(s.path,i.path))).filter((s,i,o)=>o.findIndex((a)=>a.row===s.row)===i);return[...new Set(n.map((s)=>s.parent))].flatMap((s)=>{let i=s.elements.filter((u)=>u.name==="w:tr"),o=n.filter((u)=>u.parent===s).map((u)=>i.indexOf(u.row)).sort((u,l)=>u-l),{table:a}=n.find((u)=>u.parent===s);return o.reduce((u,l)=>{let c=u[u.length-1];return(c===null||c===void 0?void 0:c[c.length-1])===l-1?[...u.slice(0,-1),[...c,l]]:[...u,[l]]},[]).map((u)=>{let l=s.elements.indexOf(i[u[0]]),c=s.elements.indexOf(i[u[u.length-1]]);return{parent:s,table:a,elements:s.elements.slice(l,c+1)}})})},pb=(e,t)=>{let r=e,n,s;for(let i=1;ie.length>t.length&&t.every((r,n)=>e[n]===r),Mh=(e)=>{var t;return((t=e.elements)!==null&&t!==void 0?t:[]).some((r)=>r.name==="w:tr"||r.name!=="w:tblPr"&&r.name!=="w:tblGrid"&&Mh(r))},fb=(e,t,r)=>{let n=Yi({elements:[...e]},t).flatMap(({text:s})=>s.split(t).slice(1).flatMap((i)=>{let o=i.indexOf(r);return o>0?[i.slice(0,o)]:[]}));return[...new Set(n)]},vb=(e)=>JSON.parse(JSON.stringify(e)),wb=["w14:paraId","w14:textId"],gb=["w:bookmarkStart","w:bookmarkEnd"],Fh=(e,t)=>e.filter((r)=>{var n;return!gb.includes((n=r.name)!==null&&n!==void 0?n:"")&&!((t===null||t===void 0?void 0:t.name)==="w:sdtPr"&&r.name==="w:id")}).map((r)=>w(w(w({},r),r.attributes===void 0?{}:{attributes:Object.fromEntries(Object.entries(r.attributes).filter(([n])=>!wb.includes(n)))}),r.elements===void 0?{}:{elements:[...Fh(r.elements,r)]})),yb=(e)=>e[0]===255&&e[1]===254||e[0]===254&&e[1]===255,xb=(e)=>{var t;let r=ah(e,"word/document.xml"),n=r===void 0?void 0:(t=[...e].find(([s])=>qu(s,r)))===null||t===void 0?void 0:t[1];return n===void 0||yb(n)?void 0:Zs(wy(bn(n)))},cn=(e,t,{start:r,end:n},s)=>{for(let i=e.indexOf(r,t);i!==-1;i=e.indexOf(r,i+1)){let o=e.indexOf(n,i+r.length);if(o===-1)return;let a=e.slice(i+r.length,o),u=a.trim();if(u!==a&&s(u))return{index:i,placeholder:e.slice(i,o+n.length),trimmed:`${r}${u}${n}`}}},bb=(e,t,r)=>{let n=e;for(let s=cn(n,0,t,r);s!==void 0;s=cn(n,s.index+s.trimmed.length,t,r))n=`${n.slice(0,s.index)}${s.trimmed}${n.slice(s.index+s.placeholder.length)}`;return n},Bh=(e)=>{var t;return((t=e.elements)!==null&&t!==void 0?t:[]).flatMap((r)=>[...r.name==="w:p"?[r]:[],...Bh(r)])},Tb=(e,t,r)=>{let n=()=>Ar({element:e,index:0,parent:void 0});for(let s=n(),i=cn(s.text,0,t,r);i!==void 0;s=n(),i=cn(s.text,i.index+i.trimmed.length,t,r))Ph({paragraphElement:e,renderedParagraph:s,originalText:i.placeholder,replacementText:i.trimmed,fromIndex:i.index})},Eb=(e,{delimiters:t,textKeys:r,tableRowsKeys:n,drawingKeys:s})=>{let i=(u)=>r.has(u)||n.some((l)=>u.startsWith(`${l}.`));for(let u of Bh(e))Tb(u,t,i);let o=(u)=>s.has(u);for(let{properties:u}of Tn(e))for(let l of["descr","title"]){var a;let c=(a=u.attributes)===null||a===void 0?void 0:a[l];if(c!==void 0)u.attributes[l]=bb(String(c),t,o)}},$h=(e)=>{var t;return e.name==="v:shapetype"&&((t=e.attributes)===null||t===void 0?void 0:t.id)!==void 0?String(e.attributes.id):void 0},Hh=(e)=>{var t;let r=$h(e);return[...r===void 0?[]:[r],...((t=e.elements)!==null&&t!==void 0?t:[]).flatMap(Hh)]},Sb=(e)=>{let t=new Set(Hh(e)),r=(n)=>{let s=$h(n);if(s!==void 0){if(t.has(s))return[];return t.add(s),[n]}return[n.elements===void 0?n:w(w({},n),{},{elements:n.elements.flatMap(r)})]};return(n)=>n.flatMap(r)},Ib="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Ab={png:"image/png",jpg:"image/jpeg",gif:"image/gif",bmp:"image/bmp",svg:"image/svg+xml"},Cb=["png","jpg","gif","bmp"],Na=9525,ka="{96DAC541-7B7A-43D3-8B79-37D633B846F1}",Nb="{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}",ke=(e,t)=>{var r;return e===null||e===void 0||(r=e.elements)===null||r===void 0?void 0:r.find((n)=>n.name===t)},kb=(e)=>{let t=mn(e);return ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):new Uint8Array(t)},Uh=(e,t)=>new Ou({folder:"media",name:"image",extension:e,contentType:Ab[e],relationshipType:Ib,content:kb(t)}),Ra=(e,t)=>{let r=xl(e,t);if(!Cb.includes(r))throw Error(`${t}: invalid type "${r}". Expected "png", "jpg", "gif", "bmp" or, with a fallback, "svg"`);return Uh(r,e.data)},Rb=new Map([["c:chart","It is a chart, not a picture. Give a chart new data with ChartDataPatch from docx/charts"],["cx:chart","It is a chart, not a picture. Give a chart new data with ChartDataPatch from docx/charts"],["wpg:wgp","It is a group of drawings. Ungroup the picture in Word, and put the placeholder in its alt text"],["wpc:wpc","It is a drawing canvas. Move the picture out of it in Word, and put the placeholder in its alt text"],["wps:wsp","It is a shape, not a picture"]]),Pb=(e,t)=>{var r,n;let s=ke(ke(e,"a:graphic"),"a:graphicData"),i=ke(s,"pic:pic");if(i!==void 0)return i;let o=s===null||s===void 0||(r=s.elements)===null||r===void 0||(r=r.find((a)=>a.type==="element"))===null||r===void 0?void 0:r.name;throw Error(`Can't patch the picture ${t}. ${(n=Rb.get(o!==null&&o!==void 0?o:""))!==null&&n!==void 0?n:"It isn't a picture"}`)},Ob=(e,t)=>{var r,n;let s=(r=e.elements)!==null&&r!==void 0?r:[],i=ke(e,"a:extLst"),o=t===void 0?[]:[{type:"element",name:"a:ext",attributes:{uri:ka},elements:[{type:"element",name:"asvg:svgBlip",attributes:{"xmlns:asvg":"http://schemas.microsoft.com/office/drawing/2016/SVG/main","r:embed":t}}]}],a=[...((n=i===null||i===void 0?void 0:i.elements)!==null&&n!==void 0?n:[]).filter((l)=>{var c;return l.name==="a:ext"&&![ka,Nb].includes(String((c=l.attributes)===null||c===void 0?void 0:c.uri).toUpperCase())}),...o],u=a.length===0?[]:[w(w({},i),{},{type:"element",name:"a:extLst",elements:a})];return[...s.filter((l)=>l!==i),...u]},Pa=(e,t,r)=>{var n,s;let i=(u)=>{var l;let c=(l=e.attributes)===null||l===void 0?void 0:l[u];return c===void 0?void 0:String(c).split(t).join("").trim()},o=(n=r===null||r===void 0?void 0:r.description)!==null&&n!==void 0?n:i("descr"),a=(s=r===null||r===void 0?void 0:r.title)!==null&&s!==void 0?s:i("title");e.attributes=Object.fromEntries(Object.entries(w(w({},e.attributes),{},{descr:o||void 0,title:a||void 0})).filter(([,u])=>u!==void 0))},Oa=(e,{width:t,height:r})=>{if(e!==void 0)e.attributes=w(w({},e.attributes),{},{cx:Math.round(t*Na),cy:Math.round(r*Na)})},_b=class extends Sh{constructor(e){super();if(m(this,"image",void 0),m(this,"svg",void 0),m(this,"transformation",void 0),m(this,"altText",void 0),e.type==="svg"){if(e.fallback===void 0)throw Error("ImagePatch: an SVG image needs a fallback, a PNG, JPEG, GIF or BMP image for applications that can't show SVG");this.image=Ra(e.fallback,"ImagePatch fallback"),this.svg=Uh("svg",e.data)}else this.image=Ra(e,"ImagePatch");let{transformation:t}=e;if(t!==void 0){for(let r of["width","height"]){let n=t[r];if(!(typeof n==="number"&&n>0&&Number.isFinite(n)))throw Error(`ImagePatch: invalid ${r} ${String(n)}. Expected a number of pixels greater than 0`)}this.transformation={width:t.width,height:t.height}}this.altText=e.altText&&w({},e.altText)}patch({element:e,properties:t,placeholder:r,part:n},s){var i;let o=Pb(e,r),a=ke(o,"pic:blipFill"),u=ke(a,"a:blip");if(a===void 0||u===void 0)throw Error(`Can't patch the picture ${r}. It has no image: it has no a:blip`);let l=s.replaceRelatedPart(n,void 0,this.image),c=this.svg&&s.replaceRelatedPart(n,void 0,this.svg);if(u.attributes=w({"r:embed":l},Object.fromEntries(Object.entries((i=u.attributes)!==null&&i!==void 0?i:{}).filter(([d])=>!/^[^:]+:(embed|link)$/.test(d)))),u.elements=[...Ob(u,c)],a.elements=a.elements.filter((d)=>d.name!=="a:srcRect"),this.transformation!==void 0)Oa(ke(e,"wp:extent"),this.transformation),Oa(ke(ke(ke(o,"pic:spPr"),"a:xfrm"),"a:ext"),this.transformation);Pa(t,r,this.altText);let h=ke(ke(o,"pic:nvPicPr"),"pic:cNvPr");if(h!==void 0)Pa(h,r,this.altText)}},Wh=(e,t,{inTableRow:r})=>{if((t===null||t===void 0?void 0:t.type)===le.TABLE_ROWS&&Array.isArray(t.rows)){for(let n of t.rows){if(typeof n!=="object"||n===null)throw Error(`Invalid patch "${e}". Expected each of its rows to be an object of patches, by the name of their field`);for(let[s,i]of Object.entries(n))if(i!==void 0)Wh(`${e}.${s}`,i,{inTableRow:!0})}return}if(!((t===null||t===void 0?void 0:t.type)===le.DRAWING?!r&&typeof t.patch==="function":(t===null||t===void 0?void 0:t.type)!==le.TABLE_ROWS&&Array.isArray(t===null||t===void 0?void 0:t.children)))throw Error(`Invalid patch "${e}". Expected { type: PatchType.PARAGRAPH or PatchType.DOCUMENT, children: [...] }, ${r?"or { type: PatchType.TABLE_ROWS, rows: [...] }":"{ type: PatchType.TABLE_ROWS, rows: [...] }, or a drawing patch such as ImagePatch, or ChartDataPatch from docx/charts"}`)},_a=new fh,Lb=new Uint8Array([255,254]),Db=new Uint8Array([254,255]),Mb=new Set(["w:document","w:hdr","w:ftr","w:footnotes","w:endnotes","w:comments"]),La=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;rg.push({contentType:O,partName:F})},new Set([...f.keys()].filter((O)=>O.startsWith("word/")).map((O)=>O.slice(5)))),C={Media:new Mi((O)=>A.takePath("media","image",O)),Numbering:new Bi(c),Theme:v&&{Colors:v},FootNotes:{View:{idOf:(O,F,B)=>wt("footnotes",O,F,B)}},Endnotes:{View:{idOf:(O,F,B)=>wt("endnotes",O,F,B)}},PackageParts:A},b=new Map,P=[],_=[],E=!1,T=new Map;Th(i);let{start:S,end:N}=i;for(let[O,F]of Object.entries(n))Wh(O,F,{inTableRow:!1});for(let[O,F]of f){var R;let B=F.slice(0,2);if(La(B,Lb)||La(B,Db)){T.set(O,F);continue}if(!O.endsWith(".xml")&&!O.endsWith(".rels")){T.set(O,F);continue}let V=it(bn(F)),J=(R=V.elements)===null||R===void 0?void 0:R.find((Z)=>{var G;return Mb.has((G=Z.name)!==null&&G!==void 0?G:"")});if(J&&J.attributes){for(let Z of["mc","wp","r","w15","m","v","o"])J.attributes[`xmlns:${Z}`]=nn[Z];J.attributes["mc:Ignorable"]=`${J.attributes["mc:Ignorable"]||""} w15`.trim()}b.set(O,V)}let D=Zy([...b.values()].flatMap(yh)),M=dx([...b.values()].flatMap(Eh)),K=new Map,q=(O)=>{let F=K.get(O);if(F)return F;let B={Relationships:{addRelationship:(V,J,Z,G)=>{_.push({key:O,id:V,type:J,target:Z,targetMode:G})}}};return K.set(O,B),B},z=(O)=>({file:C,viewWrapper:q(O),stack:[]}),Y=(O,F)=>{g.push({contentType:O,partName:F})},W=cb(b,z),ie=Dx(C.Numbering,b,{createContext:z,addContentTypeOverride:Y}),ee=Nx({footnotes:u,endnotes:l},b,{createContext:z,addContentTypeOverride:Y,renumberBookmarks:D,renumberDrawings:M,renumberLists:ie.renumber,useStyles:W.use}),wt=(O,F,B,V)=>V.viewWrapper===q("word/document.xml")?ee.carry(O,F,B):void 0;if(a){let O=(B)=>Object.entries(n).flatMap(([V,J])=>B(J.type)?[V]:[]),F={delimiters:{start:S,end:N},textKeys:new Set(O((B)=>B!==le.TABLE_ROWS&&B!==le.DRAWING)),tableRowsKeys:O((B)=>B===le.TABLE_ROWS),drawingKeys:new Set(O((B)=>B===le.DRAWING))};for(let[B,V]of b)if(B.startsWith("word/")&&!B.endsWith(".rels"))Eb(V,F)}gx({parts:b,binaryParts:T,file:C,patches:Object.entries(n).flatMap(([O,F])=>F.type===le.DRAWING?[[O,F]]:[]),delimiters:{start:S,end:N}},z);let xe=Object.entries(n).flatMap(([O,F])=>F.type===le.DRAWING?[]:[[O,F]]),_e=[...xe.filter(([,O])=>O.type===le.TABLE_ROWS),...xe.filter(([,O])=>O.type!==le.TABLE_ROWS)];for(let[O,F]of[...b]){if(!O.startsWith("word/")||O.endsWith(".xml.rels"))continue;let B=z(O);p.set(O,B);let V=Sb(F),J=(Z,G,Ie)=>{if(Ie.type===le.TABLE_ROWS){hb({json:Z,key:G,patch:Ie,delimiters:{start:S,end:N},patchPlaceholder:J,renumberDrawings:M});return}let Zi=[],{didFindOccurrence:Gh}=Vx({json:Z,patch:w(w({},Ie),{},{children:Ie.children.flatMap((Le)=>Le instanceof Ei?Le.writtenAs:[Le]).map((Le)=>{if(Le instanceof bc){let{target:jh,anchor:Vh}=Sc(Le.options.link),Qi=new Yt(Le.options.children,vt(),Vh,Le.options.link);return Zi.push({key:O,id:Qi.linkId,type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",target:jh,targetMode:hi.EXTERNAL}),Qi}else return Le})}),patchText:`${S}${G}${N}`,context:B,keepOriginalStyles:s,recursive:o,renumberIds:(Le)=>W.use(ie.renumber(ee.renumber(D(M(V(Le))))))});if(Gh)_.push(...Zi)};for(let[Z,G]of _e)J(F,Z,G)}ee.write(),ie.write(),W.write();for(let[O,F]of b){if(!O.startsWith("word/")||O.endsWith(".xml.rels"))continue;let B=_a.getMediaData(JSON.stringify(F),C.Media);if(B.length>0)E=!0,P.push({key:O,mediaDatas:B})}for(let{key:O,mediaDatas:F}of P){var he;let B=He(O),V=(he=b.get(B))!==null&&he!==void 0?he:fr();b.set(B,V);let J=Ki(V),Z=_a.replace(JSON.stringify(b.get(O)),F,J);b.set(O,JSON.parse(Z));for(let G=0;G0){let O=b.get("[Content_Types].xml");if(!O)throw Error("Could not find content types file");if(E)$t(O,"image/png","png"),$t(O,"image/jpeg","jpeg"),$t(O,"image/jpeg","jpg"),$t(O,"image/bmp","bmp"),$t(O,"image/gif","gif"),$t(O,"image/svg+xml","svg");for(let{contentType:F,partName:B}of g)ex(O,F,B)}return _s(sn([...[...b].map(([O,F])=>[O,Kd(F)]),...T,...C.Media.Array.map(({data:O,fileName:F})=>[`word/media/${F}`,O]),...j.map(({path:O,data:F})=>[O,F])]),t,"application/vnd.openxmlformats-officedocument.wordprocessingml.document")});return function(r){return e.apply(this,arguments)}}(),Bb=(e)=>e.startsWith("word/")&&/\.(xml|rels)$/.test(e)&&!e.endsWith(".xml.rels"),$b=function(){var e=It(function*({data:t,placeholderDelimiters:r={start:"{{",end:"}}"},trimPlaceholders:n=!1}){Th(r);let s=Hb(r),i=yield Ah(t,Bb),o=new Set;for(let[,a]of i){let u=it(bn(a));[...Oh(u).map((l)=>l.text),...Tn(u).flatMap(({properties:l})=>Ih(l))].flatMap((l)=>{var c;return(c=l.match(s))!==null&&c!==void 0?c:[]}).map((l)=>n?l.trim():l).filter((l)=>l!=="").forEach((l)=>o.add(l))}return Array.from(o)});return function(r){return e.apply(this,arguments)}}(),ds=(e)=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Hb=({start:e,end:t})=>new RegExp(`(?<=${ds(e)})(?:(?!${ds(e)}).)+?(?=${ds(t)})`,"gs");if(typeof globalThis.Buffer>"u")globalThis.Buffer=I;if(typeof globalThis.process>"u")globalThis.process=Ub;globalThis.__bundles=globalThis.__bundles||{};globalThis.__bundles.docx=Ji;})(); diff --git a/apps/sim/lib/execution/sandbox/bundles/isolate-polyfills.ts b/apps/sim/lib/execution/sandbox/bundles/isolate-polyfills.ts index 59522dd9d14..b398e98e3c4 100644 --- a/apps/sim/lib/execution/sandbox/bundles/isolate-polyfills.ts +++ b/apps/sim/lib/execution/sandbox/bundles/isolate-polyfills.ts @@ -10,9 +10,9 @@ * Beyond aliasing `global -> globalThis` for UMD-style fallbacks inside the * bundles, this file only answers the one name the bundler can leave dangling * (see below). All other runtime surface (`console`, `TextEncoder`, - * `TextDecoder`, timers) is installed by the worker via `ivm.Callback` / - * `ivm.Reference` bridges to Node's native implementations — no hand-rolled - * polyfill logic lives in the isolate. + * `TextDecoder`, `btoa`, `atob`, timers) is installed by the worker via + * `ivm.Callback` / `ivm.Reference` bridges to Node's native implementations — + * no hand-rolled polyfill logic lives in the isolate. */ const g: typeof globalThis & { @@ -24,11 +24,10 @@ if (typeof g.global === 'undefined') g.global = globalThis /** * A library that inlines a CommonJS dependency ships esbuild's `__require` - * helper around it (docx >= 9.7.1 does this for JSZip's UMD build). Bun's - * browser/iife build rewrites the bare `require` references inside that helper - * to its own `__require` runtime helper and then never emits it, so the bundle - * throws `ReferenceError: __require is not defined` while it is still being - * evaluated. The isolate has no `require` at all, so the only correct answer + * helper around it. Bun's browser/iife build rewrites the bare `require` + * references inside that helper to its own `__require` runtime helper and + * then never emits it, so the bundle throws `ReferenceError: __require is not + * defined` while it is still being evaluated. The isolate has no `require` at all, so the only correct answer * to a dynamic require is the one esbuild's helper gives when `require` is * absent: throw. Defining it here keeps every bundle self-contained; `build.ts` * evaluates each bundle in a bare context so a new variant of the defect fails diff --git a/apps/sim/lib/execution/sandbox/bundles/verify.test.ts b/apps/sim/lib/execution/sandbox/bundles/verify.test.ts index 4fb1134f0cb..79aabf74ead 100644 --- a/apps/sim/lib/execution/sandbox/bundles/verify.test.ts +++ b/apps/sim/lib/execution/sandbox/bundles/verify.test.ts @@ -1,7 +1,13 @@ import { readFileSync } from 'node:fs' +import vm from 'node:vm' +import JSZip from 'jszip' import { describe, expect, it } from 'vitest' -import { evaluateSandboxBundle } from '@/lib/execution/sandbox/bundles/verify' +import { + createBareSandboxContext, + evaluateSandboxBundle, +} from '@/lib/execution/sandbox/bundles/verify' import type { SandboxBundleName } from '@/lib/execution/sandbox/types' +import { docxGenerateTask } from '@/sandboxes/docx-generate' function loadCheckedInBundle(name: SandboxBundleName): Record { const source = readFileSync(new URL(`./${name}.cjs`, import.meta.url), 'utf-8') @@ -23,6 +29,57 @@ describe('sandbox bundles', () => { expect(typeof docx.Paragraph).toBe('function') }) + it('docx-generate packs a document with the checked-in bundle in a bare context', async () => { + const context = createBareSandboxContext() + evaluateSandboxBundle( + readFileSync(new URL('./docx.cjs', import.meta.url), 'utf-8'), + 'docx', + context + ) + const runAsync = (body: string) => vm.runInContext(`(async () => { ${body} })()`, context) + + await runAsync(docxGenerateTask.bootstrap) + await runAsync( + "addSection({ children: [new docx.Paragraph({ children: [new docx.TextRun('R&D ')] })] })" + ) + const bytes: unknown = await runAsync(docxGenerateTask.finalize) + + expect(ArrayBuffer.isView(bytes)).toBe(true) + const zip = await JSZip.loadAsync(bytes as Uint8Array) + expect(await zip.file('word/document.xml')?.async('string')).toContain('R&D <ok>') + }) + + it('docx encodes and decodes base64 through the btoa/atob the worker provides', async () => { + const context = createBareSandboxContext() + evaluateSandboxBundle( + readFileSync(new URL('./docx.cjs', import.meta.url), 'utf-8'), + 'docx', + context + ) + const pngBase64 = + 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg==' + + const packed: unknown = await vm.runInContext( + `(async () => { + const docx = globalThis.__bundles.docx; + const doc = new docx.Document({ + protection: { type: 'readOnly', password: 'secret' }, + sections: [{ children: [new docx.Paragraph({ children: [ + new docx.ImageRun({ type: 'png', data: 'data:image/png;base64,${pngBase64}', transformation: { width: 10, height: 10 } }), + ] })] }], + }); + return docx.Packer.toBase64String(doc); + })()`, + context + ) + + const zip = await JSZip.loadAsync(packed as string, { base64: true }) + expect(await zip.file('word/settings.xml')?.async('string')).toMatch( + /]*w:hash="[^"]+"/ + ) + expect(zip.file('word/media/image1.png')).not.toBeNull() + }) + it('pdf-lib evaluates in a bare context and exposes the pdf-generate surface', () => { const pdfLib = loadCheckedInBundle('pdf-lib') expect(typeof pdfLib.PDFDocument).toBe('function') diff --git a/apps/sim/lib/execution/sandbox/bundles/verify.ts b/apps/sim/lib/execution/sandbox/bundles/verify.ts index ebd509a4a37..99d7b852820 100644 --- a/apps/sim/lib/execution/sandbox/bundles/verify.ts +++ b/apps/sim/lib/execution/sandbox/bundles/verify.ts @@ -2,15 +2,12 @@ import vm from 'node:vm' import type { SandboxBundleName } from '@/lib/execution/sandbox/types' /** - * Evaluates a built sandbox bundle the way the isolated-vm worker will: as a - * classic script in a context that has timers, `console`, and the text codecs - * but no `require`, `process`, or `Buffer` of its own. Returns the export the - * bundle registered on `globalThis.__bundles`, or throws with the bundle's own - * error, so a bundle that references a helper the bundler never emitted fails - * at build time and in the test suite instead of on the first document - * generated in production. + * A context shaped like the isolated-vm worker's task mode: timers, `console`, + * the text codecs, and `btoa`/`atob`, but no `require`, `process`, or `Buffer` + * of its own. Code that reaches for any other Node or browser global fails here + * the same way it fails inside the isolate. */ -export function evaluateSandboxBundle(source: string, name: SandboxBundleName): unknown { +export function createBareSandboxContext(): vm.Context { const context: Record = { setTimeout, clearTimeout, @@ -20,9 +17,26 @@ export function evaluateSandboxBundle(source: string, name: SandboxBundleName): console, TextEncoder, TextDecoder, + btoa, + atob, } context.globalThis = context - vm.createContext(context) + return vm.createContext(context) +} + +/** + * Evaluates a built sandbox bundle the way the isolated-vm worker will: as a + * classic script in a {@link createBareSandboxContext} context. Returns the + * export the bundle registered on `globalThis.__bundles`, or throws with the + * bundle's own error, so a bundle that references a helper the bundler never + * emitted fails at build time and in the test suite instead of on the first + * document generated in production. + */ +export function evaluateSandboxBundle( + source: string, + name: SandboxBundleName, + context: vm.Context = createBareSandboxContext() +): unknown { vm.runInContext(source, context, { filename: `sandbox/${name}.cjs` }) const bundles = context.__bundles diff --git a/apps/sim/lib/microsoft-word/document.server.test.ts b/apps/sim/lib/microsoft-word/document.server.test.ts index 109e0ce196a..0ad647404b2 100644 --- a/apps/sim/lib/microsoft-word/document.server.test.ts +++ b/apps/sim/lib/microsoft-word/document.server.test.ts @@ -91,8 +91,6 @@ describe('buildDocxFromContent', () => { }) it('strips control characters that would make the package unopenable', async () => { - // The docx package writes run text into the XML verbatim, so a forbidden - // character reaching it produces invalid XML 1.0 rather than a rendering bug. const buffer = await buildDocxFromContent(`before${String.fromCharCode(8)}after`) const xml = await readDocumentXml(buffer) diff --git a/apps/sim/lib/microsoft-word/document.server.ts b/apps/sim/lib/microsoft-word/document.server.ts index 25782dd0fd6..c37cc1c4368 100644 --- a/apps/sim/lib/microsoft-word/document.server.ts +++ b/apps/sim/lib/microsoft-word/document.server.ts @@ -83,11 +83,10 @@ function parseInlineRuns(line: string): ContentRun[] { function parseContentBlocks(content: string): ContentBlock[] { const blocks: ContentBlock[] = [] - // Stripped once here rather than per run: the `docx` package writes run text - // into the XML verbatim, so a stray control character from an upstream block - // would produce a package Word refuses to open. Tab, newline, and carriage - // return are legal XML and are outside the class, so the split below is - // unaffected. + // Stripped before the Markdown patterns run, so a stray control character + // from an upstream block can't hide a heading or bullet marker. Tab, newline, + // and carriage return are legal XML and outside the class, so the split below + // is unaffected. for (const rawLine of stripInvalidXmlChars(content).replace(/\r\n?/g, '\n').split('\n')) { const line = rawLine.trimEnd() if (line.trim().length === 0) continue diff --git a/apps/sim/package.json b/apps/sim/package.json index 75a7053ddea..324353095f9 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -211,7 +211,7 @@ "date-fns": "4.4.0", "decimal.js": "10.6.0", "diff": "9.0.0", - "docx": "^9.6.1", + "docx": "^9.15.2", "docx-preview": "^0.4.1", "drizzle-orm": "^0.45.4", "echarts": "6.1.0", diff --git a/apps/sim/sandboxes/docx-generate.ts b/apps/sim/sandboxes/docx-generate.ts index 541b6d5052c..d0e8985f61c 100644 --- a/apps/sim/sandboxes/docx-generate.ts +++ b/apps/sim/sandboxes/docx-generate.ts @@ -78,8 +78,6 @@ export const docxGenerateTask = defineSandboxTask({ })); }; `, - // JSZip's browser build doesn't support nodebuffer output, so we go through - // base64 and decode back to bytes inside the isolate (avoids DataURL / Blob). finalize: ` let doc = globalThis.doc; if (!doc && globalThis.__docxSections.length > 0) { @@ -91,23 +89,7 @@ export const docxGenerateTask = defineSandboxTask({ if (!doc) { throw new Error('No document created. Use addSection({ children: [...] }) for chunked writes, or set globalThis.doc = new docx.Document({...}) for a single write.'); } - const b64 = await globalThis.docx.Packer.toBase64String(doc); - const alphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - const lookup = new Uint8Array(128); - for (let i = 0; i < alphabet.length; i++) lookup[alphabet.charCodeAt(i)] = i; - const clean = b64.replace(/=+$/, ''); - const out = new Uint8Array(Math.floor((clean.length * 3) / 4)); - let pos = 0; - for (let i = 0; i < clean.length; i += 4) { - const c0 = lookup[clean.charCodeAt(i)]; - const c1 = lookup[clean.charCodeAt(i + 1)]; - const c2 = lookup[clean.charCodeAt(i + 2)]; - const c3 = lookup[clean.charCodeAt(i + 3)]; - out[pos++] = (c0 << 2) | (c1 >> 4); - if (i + 2 < clean.length) out[pos++] = ((c1 & 0x0f) << 4) | (c2 >> 2); - if (i + 3 < clean.length) out[pos++] = ((c2 & 0x03) << 6) | c3; - } - return out.subarray(0, pos); + return new Uint8Array(await globalThis.docx.Packer.toArrayBuffer(doc)); `, toResult: (bytes) => Buffer.from(bytes), }) diff --git a/bun.lock b/bun.lock index 37d0db5c37e..6039dc513f2 100644 --- a/bun.lock +++ b/bun.lock @@ -365,7 +365,7 @@ "date-fns": "4.4.0", "decimal.js": "10.6.0", "diff": "9.0.0", - "docx": "^9.6.1", + "docx": "^9.15.2", "docx-preview": "^0.4.1", "drizzle-orm": "^0.45.4", "echarts": "6.1.0", @@ -2972,7 +2972,7 @@ "docs": ["docs@workspace:apps/docs"], - "docx": ["docx@9.7.1", "", { "dependencies": { "@types/node": "^25.2.3", "hash.js": "^1.1.7", "jszip": "^3.10.1", "nanoid": "^5.1.3", "xml": "^1.0.1", "xml-js": "^1.6.8" } }, "sha512-ilXFf9Moz47ABjFpDiA5s1w9lpb4EFSp7+5iiJSbfyYDM+bpZdAgLlSr7fW4aXhVe/E+F6QCv0EvRVFEd5CsWg=="], + "docx": ["docx@9.15.2", "", { "dependencies": { "@types/node": "^26.6.2", "fflate": "^0.8.3", "nanoid": "^6.0.1" } }, "sha512-G/R41dlYE5RS3TG2ybX1DIodQv+TchMspmdvrrovFyzTpvLZe0pLKVqiGosBhZszLkRonrK9+zxJDPWHDYx4NA=="], "docx-preview": ["docx-preview@0.4.1", "", { "dependencies": { "jszip": ">=3.0.0" } }, "sha512-Dv4g+LeE0swHpPvNC0lAT0YsR5Zq5pAxw7d3vHQ8EChBLgIrqqe9VPL5nVt2HBJap8bEZbXUI0TJob7kBeNU9w=="], @@ -3170,7 +3170,7 @@ "fetch-cookie": ["fetch-cookie@3.2.0", "", { "dependencies": { "set-cookie-parser": "^2.4.8", "tough-cookie": "^6.0.0" } }, "sha512-n61pQIxP25C6DRhcJxn7BDzgHP/+S56Urowb5WFxtcRMpU6drqXD90xjyAsVQYsNSNNVbaCcYY1DuHsdkZLuiA=="], - "fflate": ["fflate@0.4.8", "", {}, "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA=="], + "fflate": ["fflate@0.8.3", "", {}, "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA=="], "file-type": ["file-type@16.5.4", "", { "dependencies": { "readable-web-to-node-stream": "^3.0.0", "strtok3": "^6.2.4", "token-types": "^4.1.1" } }, "sha512-/yFHK0aGjFEgDJjEKP0pWCplsPFPhwyfwevf/pVxiN0tmE4L9LmwWxWukdJSHdoCli4VgQLehjJtwQBnqmsKcw=="], @@ -3270,8 +3270,6 @@ "has-tostringtag": ["has-tostringtag@1.0.2", "", { "dependencies": { "has-symbols": "^1.0.3" } }, "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw=="], - "hash.js": ["hash.js@1.1.7", "", { "dependencies": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" } }, "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA=="], - "hasown": ["hasown@2.0.4", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A=="], "hast-util-from-parse5": ["hast-util-from-parse5@8.0.3", "", { "dependencies": { "@types/hast": "^3.0.0", "@types/unist": "^3.0.0", "devlop": "^1.0.0", "hastscript": "^9.0.0", "property-information": "^7.0.0", "vfile": "^6.0.0", "vfile-location": "^5.0.0", "web-namespaces": "^2.0.0" } }, "sha512-3kxEVkEKt0zvcZ3hCRYI8rqrgwtlIOFMWkbclACvjlDw8Li9S2hk/d51OI0nr/gIpdMHNepwgOKqZ/sy0Clpyg=="], @@ -3760,8 +3758,6 @@ "min-indent": ["min-indent@1.0.1", "", {}, "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg=="], - "minimalistic-assert": ["minimalistic-assert@1.0.1", "", {}, "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="], - "minimatch": ["minimatch@10.2.6", "", { "dependencies": { "brace-expansion": "^5.0.8" } }, "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A=="], "minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="], @@ -4650,8 +4646,6 @@ "xml-escape": ["xml-escape@1.1.0", "", {}, "sha512-B/T4sDK8Z6aUh/qNr7mjKAwwncIljFuUP+DO/D5hloYFj+90O88z8Wf7oSucZTHxBAsC1/CTP4rtx/x1Uf72Mg=="], - "xml-js": ["xml-js@1.6.11", "", { "dependencies": { "sax": "^1.2.4" }, "bin": { "xml-js": "./bin/cli.js" } }, "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g=="], - "xml-name-validator": ["xml-name-validator@5.0.0", "", {}, "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg=="], "xml-naming": ["xml-naming@0.1.0", "", {}, "sha512-k8KO9hrMyNk6tUWqUfkTEZbezRRpONVOzUTnc97VnCvyj6Tf9lyUR9EDAIeiVLv56jsMcoXEwjW8Kv5yPY52lw=="], @@ -5020,8 +5014,6 @@ "@smithy/middleware-compression/@smithy/types": ["@smithy/types@4.17.2", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-FOKpVZob9MPTn2znRzGrnsMHv7BOsKVw3XiP/cOyYLDVZ9qKp4nifIiSCuUU/fIj5Vu0UOAxCFr+qRAtG0NUkA=="], - "@smithy/middleware-compression/fflate": ["fflate@0.8.3", "", {}, "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA=="], - "@smithy/middleware-compression/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], "@smithy/node-http-handler/@smithy/core": ["@smithy/core@3.33.3", "", { "dependencies": { "@smithy/types": "^4.17.2", "tslib": "^2.6.2" } }, "sha512-CsOeKq/9kA3y6VJHt+/+VTCtBaxJ4OTFpgrjIUhPpDIKxBci1k2bJaQASF2h/ELWrulGp+t97DZ0mevfAD8idg=="], @@ -5220,9 +5212,9 @@ "docs/@tanstack/react-query": ["@tanstack/react-query@5.104.5", "", { "dependencies": { "@tanstack/query-core": "5.104.5" }, "peerDependencies": { "@types/react": "^18 || ^19", "react": "^18 || ^19" }, "optionalPeers": ["@types/react"] }, "sha512-RORgFe052U+93weaNuqg7qHq7vNVNzXN/VrXqD4bbAuQCWUqOl2lV5Ui9flWk5CVvMyL/Bh27QWhzwH0aaOx9g=="], - "docx/@types/node": ["@types/node@25.9.3", "", { "dependencies": { "undici-types": ">=7.24.0 <7.24.7" } }, "sha512-603BddQMv3pUcr4U2dhujk83N2tTDVr/34wII2B6bJy6g+8WD6yUb11jszNs0gdi4PesVWl7ABt8nYMVpnLUcg=="], + "docx/@types/node": ["@types/node@26.6.6", "", { "dependencies": { "undici-types": "~8.9.0" } }, "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog=="], - "docx/nanoid": ["nanoid@5.1.16", "", { "bin": { "nanoid": "bin/nanoid.js" } }, "sha512-kVrnsrJqMR8+oLJnGEmSWw9BivK5mt7H3FZatVRjrc5wGqFYuBxX1yG7+A7Gi5AefkX6t/oCkizcQgpu0cY1dQ=="], + "docx/nanoid": ["nanoid@6.0.2", "", { "bin": { "nanoid": "bin/nanoid.js" } }, "sha512-hIvVOb9Qr1p/9CNNLOe0OlWvgx/ziTsVwKN/GDSsuArN2K0wDiafP3s0SWmsm7o2BdnyS8Z9Z64NFBUbn6ziBg=="], "dotenv-expand/dotenv": ["dotenv@16.6.1", "", {}, "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow=="], @@ -5356,6 +5348,8 @@ "plist/xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="], + "posthog-js/fflate": ["fflate@0.4.8", "", {}, "sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA=="], + "posthog-node/@posthog/core": ["@posthog/core@1.24.4", "", { "dependencies": { "cross-spawn": "^7.0.6" } }, "sha512-S+TolwBHSSJz7WWtgaELQWQqXviSm3uf1e+qorWUts0bZcgPwWzhnmhCUZAhvn0NVpTQHDJ3epv+hHbPLl5dHg=="], "postject/commander": ["commander@9.5.0", "", {}, "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ=="], @@ -5678,6 +5672,8 @@ "docs/@tanstack/react-query/@tanstack/query-core": ["@tanstack/query-core@5.104.5", "", {}, "sha512-Q94gI8Opd+CbdVNOdj8ZCyV8WqLYitrDq1t96Xc8WZT6lY0r5iRnJLXYDxMex7EEf2v+mXvn4FcjaBKSxXZQ9A=="], + "docx/@types/node/undici-types": ["undici-types@8.9.0", "", {}, "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg=="], + "drizzle-kit/esbuild/@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.25.12", "", { "os": "aix", "cpu": "ppc64" }, "sha512-Hhmwd6CInZ3dwpuGTF8fJG6yoWmsToE+vYgD4nytZVxcu1ulHpUQRAB1UJ8+N1Am3Mz4+xOByoQoSZf4D+CpkA=="], "drizzle-kit/esbuild/@esbuild/android-arm": ["@esbuild/android-arm@0.25.12", "", { "os": "android", "cpu": "arm" }, "sha512-VJ+sKvNA/GE7Ccacc9Cha7bpS8nyzVv0jdVgwNDaR4gDMC/2TTRc33Ip8qrNYUcpkOHUT5OZ0bUcNNVZQ9RLlg=="],