docx-preview.min-BQXeCLvb.js 166 KB

123456789101112131415161718192021222324252627282930313233
  1. import{c as Rt,g as ve}from"./index-Ccm7NuMR.js";import"./vue-vendor-B3m6NcsA.js";function Bt(d){throw new Error('Could not dynamically require "'+d+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ee={exports:{}};/*!
  2. JSZip v3.10.1 - A JavaScript class for generating and reading zip files
  3. <http://stuartk.com/jszip>
  4. (c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
  5. Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
  6. JSZip uses the library pako released under the MIT license :
  7. https://github.com/nodeca/pako/blob/main/LICENSE
  8. */(function(d,e){(function(t){d.exports=t()})(function(){return function t(r,n,a){function i(v,w){if(!n[v]){if(!r[v]){var k=typeof Bt=="function"&&Bt;if(!w&&k)return k(v,!0);if(o)return o(v,!0);var _=new Error("Cannot find module '"+v+"'");throw _.code="MODULE_NOT_FOUND",_}var u=n[v]={exports:{}};r[v][0].call(u.exports,function(y){var h=r[v][1][y];return i(h||y)},u,u.exports,t,r,n,a)}return n[v].exports}for(var o=typeof Bt=="function"&&Bt,c=0;c<a.length;c++)i(a[c]);return i}({1:[function(t,r,n){var a=t("./utils"),i=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(c){for(var v,w,k,_,u,y,h,m=[],f=0,b=c.length,x=b,P=a.getTypeOf(c)!=="string";f<c.length;)x=b-f,k=P?(v=c[f++],w=f<b?c[f++]:0,f<b?c[f++]:0):(v=c.charCodeAt(f++),w=f<b?c.charCodeAt(f++):0,f<b?c.charCodeAt(f++):0),_=v>>2,u=(3&v)<<4|w>>4,y=1<x?(15&w)<<2|k>>6:64,h=2<x?63&k:64,m.push(o.charAt(_)+o.charAt(u)+o.charAt(y)+o.charAt(h));return m.join("")},n.decode=function(c){var v,w,k,_,u,y,h=0,m=0,f="data:";if(c.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var b,x=3*(c=c.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(c.charAt(c.length-1)===o.charAt(64)&&x--,c.charAt(c.length-2)===o.charAt(64)&&x--,x%1!=0)throw new Error("Invalid base64 input, bad content length.");for(b=i.uint8array?new Uint8Array(0|x):new Array(0|x);h<c.length;)v=o.indexOf(c.charAt(h++))<<2|(_=o.indexOf(c.charAt(h++)))>>4,w=(15&_)<<4|(u=o.indexOf(c.charAt(h++)))>>2,k=(3&u)<<6|(y=o.indexOf(c.charAt(h++))),b[m++]=v,u!==64&&(b[m++]=w),y!==64&&(b[m++]=k);return b}},{"./support":30,"./utils":32}],2:[function(t,r,n){var a=t("./external"),i=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),c=t("./stream/DataLengthProbe");function v(w,k,_,u,y){this.compressedSize=w,this.uncompressedSize=k,this.crc32=_,this.compression=u,this.compressedContent=y}v.prototype={getContentWorker:function(){var w=new i(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new c("data_length")),k=this;return w.on("end",function(){if(this.streamInfo.data_length!==k.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),w},getCompressedWorker:function(){return new i(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},v.createWorkerFrom=function(w,k,_){return w.pipe(new o).pipe(new c("uncompressedSize")).pipe(k.compressWorker(_)).pipe(new c("compressedSize")).withStreamInfo("compression",k)},r.exports=v},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,r,n){var a=t("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},n.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,r,n){var a=t("./utils"),i=function(){for(var o,c=[],v=0;v<256;v++){o=v;for(var w=0;w<8;w++)o=1&o?3988292384^o>>>1:o>>>1;c[v]=o}return c}();r.exports=function(o,c){return o!==void 0&&o.length?a.getTypeOf(o)!=="string"?function(v,w,k,_){var u=i,y=_+k;v^=-1;for(var h=_;h<y;h++)v=v>>>8^u[255&(v^w[h])];return-1^v}(0|c,o,o.length,0):function(v,w,k,_){var u=i,y=_+k;v^=-1;for(var h=_;h<y;h++)v=v>>>8^u[255&(v^w.charCodeAt(h))];return-1^v}(0|c,o,o.length,0):0}},{"./utils":32}],5:[function(t,r,n){n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(t,r,n){var a=null;a=typeof Promise<"u"?Promise:t("lie"),r.exports={Promise:a}},{lie:37}],7:[function(t,r,n){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=t("pako"),o=t("./utils"),c=t("./stream/GenericWorker"),v=a?"uint8array":"array";function w(k,_){c.call(this,"FlateWorker/"+k),this._pako=null,this._pakoAction=k,this._pakoOptions=_,this.meta={}}n.magic="\b\0",o.inherits(w,c),w.prototype.processChunk=function(k){this.meta=k.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(v,k.data),!1)},w.prototype.flush=function(){c.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},w.prototype.cleanUp=function(){c.prototype.cleanUp.call(this),this._pako=null},w.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var k=this;this._pako.onData=function(_){k.push({data:_,meta:k.meta})}},n.compressWorker=function(k){return new w("Deflate",k)},n.uncompressWorker=function(){return new w("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,r,n){function a(u,y){var h,m="";for(h=0;h<y;h++)m+=String.fromCharCode(255&u),u>>>=8;return m}function i(u,y,h,m,f,b){var x,P,A=u.file,F=u.compression,I=b!==v.utf8encode,H=o.transformTo("string",b(A.name)),D=o.transformTo("string",v.utf8encode(A.name)),V=A.comment,Q=o.transformTo("string",b(V)),S=o.transformTo("string",v.utf8encode(V)),M=D.length!==A.name.length,l=S.length!==V.length,L="",et="",$="",rt=A.dir,W=A.date,tt={crc32:0,compressedSize:0,uncompressedSize:0};y&&!h||(tt.crc32=u.crc32,tt.compressedSize=u.compressedSize,tt.uncompressedSize=u.uncompressedSize);var R=0;y&&(R|=8),I||!M&&!l||(R|=2048);var T=0,J=0;rt&&(T|=16),f==="UNIX"?(J=798,T|=function(X,ht){var gt=X;return X||(gt=ht?16893:33204),(65535&gt)<<16}(A.unixPermissions,rt)):(J=20,T|=function(X){return 63&(X||0)}(A.dosPermissions)),x=W.getUTCHours(),x<<=6,x|=W.getUTCMinutes(),x<<=5,x|=W.getUTCSeconds()/2,P=W.getUTCFullYear()-1980,P<<=4,P|=W.getUTCMonth()+1,P<<=5,P|=W.getUTCDate(),M&&(et=a(1,1)+a(w(H),4)+D,L+="up"+a(et.length,2)+et),l&&($=a(1,1)+a(w(Q),4)+S,L+="uc"+a($.length,2)+$);var q="";return q+=`
  9. \0`,q+=a(R,2),q+=F.magic,q+=a(x,2),q+=a(P,2),q+=a(tt.crc32,4),q+=a(tt.compressedSize,4),q+=a(tt.uncompressedSize,4),q+=a(H.length,2),q+=a(L.length,2),{fileRecord:k.LOCAL_FILE_HEADER+q+H+L,dirRecord:k.CENTRAL_FILE_HEADER+a(J,2)+q+a(Q.length,2)+"\0\0\0\0"+a(T,4)+a(m,4)+H+L+Q}}var o=t("../utils"),c=t("../stream/GenericWorker"),v=t("../utf8"),w=t("../crc32"),k=t("../signature");function _(u,y,h,m){c.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=y,this.zipPlatform=h,this.encodeFileName=m,this.streamFiles=u,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(_,c),_.prototype.push=function(u){var y=u.meta.percent||0,h=this.entriesCount,m=this._sources.length;this.accumulate?this.contentBuffer.push(u):(this.bytesWritten+=u.data.length,c.prototype.push.call(this,{data:u.data,meta:{currentFile:this.currentFile,percent:h?(y+100*(h-m-1))/h:100}}))},_.prototype.openedSource=function(u){this.currentSourceOffset=this.bytesWritten,this.currentFile=u.file.name;var y=this.streamFiles&&!u.file.dir;if(y){var h=i(u,y,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},_.prototype.closedSource=function(u){this.accumulate=!1;var y=this.streamFiles&&!u.file.dir,h=i(u,y,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),y)this.push({data:function(m){return k.DATA_DESCRIPTOR+a(m.crc32,4)+a(m.compressedSize,4)+a(m.uncompressedSize,4)}(u),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},_.prototype.flush=function(){for(var u=this.bytesWritten,y=0;y<this.dirRecords.length;y++)this.push({data:this.dirRecords[y],meta:{percent:100}});var h=this.bytesWritten-u,m=function(f,b,x,P,A){var F=o.transformTo("string",A(P));return k.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(f,2)+a(f,2)+a(b,4)+a(x,4)+a(F.length,2)+F}(this.dirRecords.length,h,u,this.zipComment,this.encodeFileName);this.push({data:m,meta:{percent:100}})},_.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},_.prototype.registerPrevious=function(u){this._sources.push(u);var y=this;return u.on("data",function(h){y.processChunk(h)}),u.on("end",function(){y.closedSource(y.previous.streamInfo),y._sources.length?y.prepareNextSource():y.end()}),u.on("error",function(h){y.error(h)}),this},_.prototype.resume=function(){return!!c.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},_.prototype.error=function(u){var y=this._sources;if(!c.prototype.error.call(this,u))return!1;for(var h=0;h<y.length;h++)try{y[h].error(u)}catch{}return!0},_.prototype.lock=function(){c.prototype.lock.call(this);for(var u=this._sources,y=0;y<u.length;y++)u[y].lock()},r.exports=_},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,r,n){var a=t("../compressions"),i=t("./ZipFileWorker");n.generateWorker=function(o,c,v){var w=new i(c.streamFiles,v,c.platform,c.encodeFileName),k=0;try{o.forEach(function(_,u){k++;var y=function(b,x){var P=b||x,A=a[P];if(!A)throw new Error(P+" is not a valid compression method !");return A}(u.options.compression,c.compression),h=u.options.compressionOptions||c.compressionOptions||{},m=u.dir,f=u.date;u._compressWorker(y,h).withStreamInfo("file",{name:_,dir:m,date:f,comment:u.comment||"",unixPermissions:u.unixPermissions,dosPermissions:u.dosPermissions}).pipe(w)}),w.entriesCount=k}catch(_){w.error(_)}return w}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,r,n){function a(){if(!(this instanceof a))return new a;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new a;for(var o in this)typeof this[o]!="function"&&(i[o]=this[o]);return i}}(a.prototype=t("./object")).loadAsync=t("./load"),a.support=t("./support"),a.defaults=t("./defaults"),a.version="3.10.1",a.loadAsync=function(i,o){return new a().loadAsync(i,o)},a.external=t("./external"),r.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,r,n){var a=t("./utils"),i=t("./external"),o=t("./utf8"),c=t("./zipEntries"),v=t("./stream/Crc32Probe"),w=t("./nodejsUtils");function k(_){return new i.Promise(function(u,y){var h=_.decompressed.getContentWorker().pipe(new v);h.on("error",function(m){y(m)}).on("end",function(){h.streamInfo.crc32!==_.decompressed.crc32?y(new Error("Corrupted zip : CRC32 mismatch")):u()}).resume()})}r.exports=function(_,u){var y=this;return u=a.extend(u||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),w.isNode&&w.isStream(_)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",_,!0,u.optimizedBinaryString,u.base64).then(function(h){var m=new c(u);return m.load(h),m}).then(function(h){var m=[i.Promise.resolve(h)],f=h.files;if(u.checkCRC32)for(var b=0;b<f.length;b++)m.push(k(f[b]));return i.Promise.all(m)}).then(function(h){for(var m=h.shift(),f=m.files,b=0;b<f.length;b++){var x=f[b],P=x.fileNameStr,A=a.resolve(x.fileNameStr);y.file(A,x.decompressed,{binary:!0,optimizedBinaryString:!0,date:x.date,dir:x.dir,comment:x.fileCommentStr.length?x.fileCommentStr:null,unixPermissions:x.unixPermissions,dosPermissions:x.dosPermissions,createFolders:u.createFolders}),x.dir||(y.file(A).unsafeOriginalName=P)}return m.zipComment.length&&(y.comment=m.zipComment),y})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,r,n){var a=t("../utils"),i=t("../stream/GenericWorker");function o(c,v){i.call(this,"Nodejs stream input adapter for "+c),this._upstreamEnded=!1,this._bindStream(v)}a.inherits(o,i),o.prototype._bindStream=function(c){var v=this;(this._stream=c).pause(),c.on("data",function(w){v.push({data:w,meta:{percent:0}})}).on("error",function(w){v.isPaused?this.generatedError=w:v.error(w)}).on("end",function(){v.isPaused?v._upstreamEnded=!0:v.end()})},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},r.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,r,n){var a=t("readable-stream").Readable;function i(o,c,v){a.call(this,c),this._helper=o;var w=this;o.on("data",function(k,_){w.push(k)||w._helper.pause(),v&&v(_)}).on("error",function(k){w.emit("error",k)}).on("end",function(){w.push(null)})}t("../utils").inherits(i,a),i.prototype._read=function(){this._helper.resume()},r.exports=i},{"../utils":32,"readable-stream":16}],14:[function(t,r,n){r.exports={isNode:typeof Buffer<"u",newBufferFrom:function(a,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(a,i);if(typeof a=="number")throw new Error('The "data" argument must not be a number');return new Buffer(a,i)},allocBuffer:function(a){if(Buffer.alloc)return Buffer.alloc(a);var i=new Buffer(a);return i.fill(0),i},isBuffer:function(a){return Buffer.isBuffer(a)},isStream:function(a){return a&&typeof a.on=="function"&&typeof a.pause=="function"&&typeof a.resume=="function"}}},{}],15:[function(t,r,n){function a(A,F,I){var H,D=o.getTypeOf(F),V=o.extend(I||{},w);V.date=V.date||new Date,V.compression!==null&&(V.compression=V.compression.toUpperCase()),typeof V.unixPermissions=="string"&&(V.unixPermissions=parseInt(V.unixPermissions,8)),V.unixPermissions&&16384&V.unixPermissions&&(V.dir=!0),V.dosPermissions&&16&V.dosPermissions&&(V.dir=!0),V.dir&&(A=f(A)),V.createFolders&&(H=m(A))&&b.call(this,H,!0);var Q=D==="string"&&V.binary===!1&&V.base64===!1;I&&I.binary!==void 0||(V.binary=!Q),(F instanceof k&&F.uncompressedSize===0||V.dir||!F||F.length===0)&&(V.base64=!1,V.binary=!0,F="",V.compression="STORE",D="string");var S=null;S=F instanceof k||F instanceof c?F:y.isNode&&y.isStream(F)?new h(A,F):o.prepareContent(A,F,V.binary,V.optimizedBinaryString,V.base64);var M=new _(A,S,V);this.files[A]=M}var i=t("./utf8"),o=t("./utils"),c=t("./stream/GenericWorker"),v=t("./stream/StreamHelper"),w=t("./defaults"),k=t("./compressedObject"),_=t("./zipObject"),u=t("./generate"),y=t("./nodejsUtils"),h=t("./nodejs/NodejsStreamInputAdapter"),m=function(A){A.slice(-1)==="/"&&(A=A.substring(0,A.length-1));var F=A.lastIndexOf("/");return 0<F?A.substring(0,F):""},f=function(A){return A.slice(-1)!=="/"&&(A+="/"),A},b=function(A,F){return F=F!==void 0?F:w.createFolders,A=f(A),this.files[A]||a.call(this,A,null,{dir:!0,createFolders:F}),this.files[A]};function x(A){return Object.prototype.toString.call(A)==="[object RegExp]"}var P={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(A){var F,I,H;for(F in this.files)H=this.files[F],(I=F.slice(this.root.length,F.length))&&F.slice(0,this.root.length)===this.root&&A(I,H)},filter:function(A){var F=[];return this.forEach(function(I,H){A(I,H)&&F.push(H)}),F},file:function(A,F,I){if(arguments.length!==1)return A=this.root+A,a.call(this,A,F,I),this;if(x(A)){var H=A;return this.filter(function(V,Q){return!Q.dir&&H.test(V)})}var D=this.files[this.root+A];return D&&!D.dir?D:null},folder:function(A){if(!A)return this;if(x(A))return this.filter(function(D,V){return V.dir&&A.test(D)});var F=this.root+A,I=b.call(this,F),H=this.clone();return H.root=I.name,H},remove:function(A){A=this.root+A;var F=this.files[A];if(F||(A.slice(-1)!=="/"&&(A+="/"),F=this.files[A]),F&&!F.dir)delete this.files[A];else for(var I=this.filter(function(D,V){return V.name.slice(0,A.length)===A}),H=0;H<I.length;H++)delete this.files[I[H].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(A){var F,I={};try{if((I=o.extend(A||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=I.type.toLowerCase(),I.compression=I.compression.toUpperCase(),I.type==="binarystring"&&(I.type="string"),!I.type)throw new Error("No output type specified.");o.checkSupport(I.type),I.platform!=="darwin"&&I.platform!=="freebsd"&&I.platform!=="linux"&&I.platform!=="sunos"||(I.platform="UNIX"),I.platform==="win32"&&(I.platform="DOS");var H=I.comment||this.comment||"";F=u.generateWorker(this,I,H)}catch(D){(F=new c("error")).error(D)}return new v(F,I.type||"string",I.mimeType)},generateAsync:function(A,F){return this.generateInternalStream(A).accumulate(F)},generateNodeStream:function(A,F){return(A=A||{}).type||(A.type="nodebuffer"),this.generateInternalStream(A).toNodejsStream(F)}};r.exports=P},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,r,n){r.exports=t("stream")},{stream:void 0}],17:[function(t,r,n){var a=t("./DataReader");function i(o){a.call(this,o);for(var c=0;c<this.data.length;c++)o[c]=255&o[c]}t("../utils").inherits(i,a),i.prototype.byteAt=function(o){return this.data[this.zero+o]},i.prototype.lastIndexOfSignature=function(o){for(var c=o.charCodeAt(0),v=o.charCodeAt(1),w=o.charCodeAt(2),k=o.charCodeAt(3),_=this.length-4;0<=_;--_)if(this.data[_]===c&&this.data[_+1]===v&&this.data[_+2]===w&&this.data[_+3]===k)return _-this.zero;return-1},i.prototype.readAndCheckSignature=function(o){var c=o.charCodeAt(0),v=o.charCodeAt(1),w=o.charCodeAt(2),k=o.charCodeAt(3),_=this.readData(4);return c===_[0]&&v===_[1]&&w===_[2]&&k===_[3]},i.prototype.readData=function(o){if(this.checkOffset(o),o===0)return[];var c=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},r.exports=i},{"../utils":32,"./DataReader":18}],18:[function(t,r,n){var a=t("../utils");function i(o){this.data=o,this.length=o.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(o){this.checkIndex(this.index+o)},checkIndex:function(o){if(this.length<this.zero+o||o<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+o+"). Corrupted zip ?")},setIndex:function(o){this.checkIndex(o),this.index=o},skip:function(o){this.setIndex(this.index+o)},byteAt:function(){},readInt:function(o){var c,v=0;for(this.checkOffset(o),c=this.index+o-1;c>=this.index;c--)v=(v<<8)+this.byteAt(c);return this.index+=o,v},readString:function(o){return a.transformTo("string",this.readData(o))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var o=this.readInt(4);return new Date(Date.UTC(1980+(o>>25&127),(o>>21&15)-1,o>>16&31,o>>11&31,o>>5&63,(31&o)<<1))}},r.exports=i},{"../utils":32}],19:[function(t,r,n){var a=t("./Uint8ArrayReader");function i(o){a.call(this,o)}t("../utils").inherits(i,a),i.prototype.readData=function(o){this.checkOffset(o);var c=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},r.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,r,n){var a=t("./DataReader");function i(o){a.call(this,o)}t("../utils").inherits(i,a),i.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},i.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},i.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},i.prototype.readData=function(o){this.checkOffset(o);var c=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},r.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,r,n){var a=t("./ArrayReader");function i(o){a.call(this,o)}t("../utils").inherits(i,a),i.prototype.readData=function(o){if(this.checkOffset(o),o===0)return new Uint8Array(0);var c=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,c},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,r,n){var a=t("../utils"),i=t("../support"),o=t("./ArrayReader"),c=t("./StringReader"),v=t("./NodeBufferReader"),w=t("./Uint8ArrayReader");r.exports=function(k){var _=a.getTypeOf(k);return a.checkSupport(_),_!=="string"||i.uint8array?_==="nodebuffer"?new v(k):i.uint8array?new w(a.transformTo("uint8array",k)):new o(a.transformTo("array",k)):new c(k)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,r,n){n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(t,r,n){var a=t("./GenericWorker"),i=t("../utils");function o(c){a.call(this,"ConvertWorker to "+c),this.destType=c}i.inherits(o,a),o.prototype.processChunk=function(c){this.push({data:i.transformTo(this.destType,c.data),meta:c.meta})},r.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,r,n){var a=t("./GenericWorker"),i=t("../crc32");function o(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,a),o.prototype.processChunk=function(c){this.streamInfo.crc32=i(c.data,this.streamInfo.crc32||0),this.push(c)},r.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r,n){var a=t("../utils"),i=t("./GenericWorker");function o(c){i.call(this,"DataLengthProbe for "+c),this.propName=c,this.withStreamInfo(c,0)}a.inherits(o,i),o.prototype.processChunk=function(c){if(c){var v=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=v+c.data.length}i.prototype.processChunk.call(this,c)},r.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,r,n){var a=t("../utils"),i=t("./GenericWorker");function o(c){i.call(this,"DataWorker");var v=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,c.then(function(w){v.dataIsReady=!0,v.data=w,v.max=w&&w.length||0,v.type=a.getTypeOf(w),v.isPaused||v._tickAndRepeat()},function(w){v.error(w)})}a.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,a.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(a.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var c=null,v=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":c=this.data.substring(this.index,v);break;case"uint8array":c=this.data.subarray(this.index,v);break;case"array":case"nodebuffer":c=this.data.slice(this.index,v)}return this.index=v,this.push({data:c,meta:{percent:this.max?this.index/this.max*100:0}})},r.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,r,n){function a(i){this.name=i||"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}a.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,o){return this._listeners[i].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,o){if(this._listeners[i])for(var c=0;c<this._listeners[i].length;c++)this._listeners[i][c].call(this,o)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var o=this;return i.on("data",function(c){o.processChunk(c)}),i.on("end",function(){o.end()}),i.on("error",function(c){o.error(c)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,o){return this.extraStreamInfo[i]=o,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},r.exports=a},{}],29:[function(t,r,n){var a=t("../utils"),i=t("./ConvertWorker"),o=t("./GenericWorker"),c=t("../base64"),v=t("../support"),w=t("../external"),k=null;if(v.nodestream)try{k=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function _(y,h){return new w.Promise(function(m,f){var b=[],x=y._internalType,P=y._outputType,A=y._mimeType;y.on("data",function(F,I){b.push(F),h&&h(I)}).on("error",function(F){b=[],f(F)}).on("end",function(){try{var F=function(I,H,D){switch(I){case"blob":return a.newBlob(a.transformTo("arraybuffer",H),D);case"base64":return c.encode(H);default:return a.transformTo(I,H)}}(P,function(I,H){var D,V=0,Q=null,S=0;for(D=0;D<H.length;D++)S+=H[D].length;switch(I){case"string":return H.join("");case"array":return Array.prototype.concat.apply([],H);case"uint8array":for(Q=new Uint8Array(S),D=0;D<H.length;D++)Q.set(H[D],V),V+=H[D].length;return Q;case"nodebuffer":return Buffer.concat(H);default:throw new Error("concat : unsupported type '"+I+"'")}}(x,b),A);m(F)}catch(I){f(I)}b=[]}).resume()})}function u(y,h,m){var f=h;switch(h){case"blob":case"arraybuffer":f="uint8array";break;case"base64":f="string"}try{this._internalType=f,this._outputType=h,this._mimeType=m,a.checkSupport(f),this._worker=y.pipe(new i(f)),y.lock()}catch(b){this._worker=new o("error"),this._worker.error(b)}}u.prototype={accumulate:function(y){return _(this,y)},on:function(y,h){var m=this;return y==="data"?this._worker.on(y,function(f){h.call(m,f.data,f.meta)}):this._worker.on(y,function(){a.delay(h,arguments,m)}),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(y){if(a.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new k(this,{objectMode:this._outputType!=="nodebuffer"},y)}},r.exports=u},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,r,n){if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",n.nodebuffer=typeof Buffer<"u",n.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")n.blob=!1;else{var a=new ArrayBuffer(0);try{n.blob=new Blob([a],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(a),n.blob=i.getBlob("application/zip").size===0}catch{n.blob=!1}}}try{n.nodestream=!!t("readable-stream").Readable}catch{n.nodestream=!1}},{"readable-stream":16}],31:[function(t,r,n){for(var a=t("./utils"),i=t("./support"),o=t("./nodejsUtils"),c=t("./stream/GenericWorker"),v=new Array(256),w=0;w<256;w++)v[w]=252<=w?6:248<=w?5:240<=w?4:224<=w?3:192<=w?2:1;v[254]=v[254]=1;function k(){c.call(this,"utf-8 decode"),this.leftOver=null}function _(){c.call(this,"utf-8 encode")}n.utf8encode=function(u){return i.nodebuffer?o.newBufferFrom(u,"utf-8"):function(y){var h,m,f,b,x,P=y.length,A=0;for(b=0;b<P;b++)(64512&(m=y.charCodeAt(b)))==55296&&b+1<P&&(64512&(f=y.charCodeAt(b+1)))==56320&&(m=65536+(m-55296<<10)+(f-56320),b++),A+=m<128?1:m<2048?2:m<65536?3:4;for(h=i.uint8array?new Uint8Array(A):new Array(A),b=x=0;x<A;b++)(64512&(m=y.charCodeAt(b)))==55296&&b+1<P&&(64512&(f=y.charCodeAt(b+1)))==56320&&(m=65536+(m-55296<<10)+(f-56320),b++),m<128?h[x++]=m:(m<2048?h[x++]=192|m>>>6:(m<65536?h[x++]=224|m>>>12:(h[x++]=240|m>>>18,h[x++]=128|m>>>12&63),h[x++]=128|m>>>6&63),h[x++]=128|63&m);return h}(u)},n.utf8decode=function(u){return i.nodebuffer?a.transformTo("nodebuffer",u).toString("utf-8"):function(y){var h,m,f,b,x=y.length,P=new Array(2*x);for(h=m=0;h<x;)if((f=y[h++])<128)P[m++]=f;else if(4<(b=v[f]))P[m++]=65533,h+=b-1;else{for(f&=b===2?31:b===3?15:7;1<b&&h<x;)f=f<<6|63&y[h++],b--;1<b?P[m++]=65533:f<65536?P[m++]=f:(f-=65536,P[m++]=55296|f>>10&1023,P[m++]=56320|1023&f)}return P.length!==m&&(P.subarray?P=P.subarray(0,m):P.length=m),a.applyFromCharCode(P)}(u=a.transformTo(i.uint8array?"uint8array":"array",u))},a.inherits(k,c),k.prototype.processChunk=function(u){var y=a.transformTo(i.uint8array?"uint8array":"array",u.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var h=y;(y=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),y.set(h,this.leftOver.length)}else y=this.leftOver.concat(y);this.leftOver=null}var m=function(b,x){var P;for((x=x||b.length)>b.length&&(x=b.length),P=x-1;0<=P&&(192&b[P])==128;)P--;return P<0||P===0?x:P+v[b[P]]>x?P:x}(y),f=y;m!==y.length&&(i.uint8array?(f=y.subarray(0,m),this.leftOver=y.subarray(m,y.length)):(f=y.slice(0,m),this.leftOver=y.slice(m,y.length))),this.push({data:n.utf8decode(f),meta:u.meta})},k.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=k,a.inherits(_,c),_.prototype.processChunk=function(u){this.push({data:n.utf8encode(u.data),meta:u.meta})},n.Utf8EncodeWorker=_},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,n){var a=t("./support"),i=t("./base64"),o=t("./nodejsUtils"),c=t("./external");function v(h){return h}function w(h,m){for(var f=0;f<h.length;++f)m[f]=255&h.charCodeAt(f);return m}t("setimmediate"),n.newBlob=function(h,m){n.checkSupport("blob");try{return new Blob([h],{type:m})}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(h),f.getBlob(m)}catch{throw new Error("Bug : can't construct the Blob.")}}};var k={stringifyByChunk:function(h,m,f){var b=[],x=0,P=h.length;if(P<=f)return String.fromCharCode.apply(null,h);for(;x<P;)m==="array"||m==="nodebuffer"?b.push(String.fromCharCode.apply(null,h.slice(x,Math.min(x+f,P)))):b.push(String.fromCharCode.apply(null,h.subarray(x,Math.min(x+f,P)))),x+=f;return b.join("")},stringifyByChar:function(h){for(var m="",f=0;f<h.length;f++)m+=String.fromCharCode(h[f]);return m},applyCanBeUsed:{uint8array:function(){try{return a.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return a.nodebuffer&&String.fromCharCode.apply(null,o.allocBuffer(1)).length===1}catch{return!1}}()}};function _(h){var m=65536,f=n.getTypeOf(h),b=!0;if(f==="uint8array"?b=k.applyCanBeUsed.uint8array:f==="nodebuffer"&&(b=k.applyCanBeUsed.nodebuffer),b)for(;1<m;)try{return k.stringifyByChunk(h,f,m)}catch{m=Math.floor(m/2)}return k.stringifyByChar(h)}function u(h,m){for(var f=0;f<h.length;f++)m[f]=h[f];return m}n.applyFromCharCode=_;var y={};y.string={string:v,array:function(h){return w(h,new Array(h.length))},arraybuffer:function(h){return y.string.uint8array(h).buffer},uint8array:function(h){return w(h,new Uint8Array(h.length))},nodebuffer:function(h){return w(h,o.allocBuffer(h.length))}},y.array={string:_,array:v,arraybuffer:function(h){return new Uint8Array(h).buffer},uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return o.newBufferFrom(h)}},y.arraybuffer={string:function(h){return _(new Uint8Array(h))},array:function(h){return u(new Uint8Array(h),new Array(h.byteLength))},arraybuffer:v,uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return o.newBufferFrom(new Uint8Array(h))}},y.uint8array={string:_,array:function(h){return u(h,new Array(h.length))},arraybuffer:function(h){return h.buffer},uint8array:v,nodebuffer:function(h){return o.newBufferFrom(h)}},y.nodebuffer={string:_,array:function(h){return u(h,new Array(h.length))},arraybuffer:function(h){return y.nodebuffer.uint8array(h).buffer},uint8array:function(h){return u(h,new Uint8Array(h.length))},nodebuffer:v},n.transformTo=function(h,m){if(m=m||"",!h)return m;n.checkSupport(h);var f=n.getTypeOf(m);return y[f][h](m)},n.resolve=function(h){for(var m=h.split("/"),f=[],b=0;b<m.length;b++){var x=m[b];x==="."||x===""&&b!==0&&b!==m.length-1||(x===".."?f.pop():f.push(x))}return f.join("/")},n.getTypeOf=function(h){return typeof h=="string"?"string":Object.prototype.toString.call(h)==="[object Array]"?"array":a.nodebuffer&&o.isBuffer(h)?"nodebuffer":a.uint8array&&h instanceof Uint8Array?"uint8array":a.arraybuffer&&h instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(h){if(!a[h.toLowerCase()])throw new Error(h+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(h){var m,f,b="";for(f=0;f<(h||"").length;f++)b+="\\x"+((m=h.charCodeAt(f))<16?"0":"")+m.toString(16).toUpperCase();return b},n.delay=function(h,m,f){setImmediate(function(){h.apply(f||null,m||[])})},n.inherits=function(h,m){function f(){}f.prototype=m.prototype,h.prototype=new f},n.extend=function(){var h,m,f={};for(h=0;h<arguments.length;h++)for(m in arguments[h])Object.prototype.hasOwnProperty.call(arguments[h],m)&&f[m]===void 0&&(f[m]=arguments[h][m]);return f},n.prepareContent=function(h,m,f,b,x){return c.Promise.resolve(m).then(function(P){return a.blob&&(P instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(P))!==-1)&&typeof FileReader<"u"?new c.Promise(function(A,F){var I=new FileReader;I.onload=function(H){A(H.target.result)},I.onerror=function(H){F(H.target.error)},I.readAsArrayBuffer(P)}):P}).then(function(P){var A=n.getTypeOf(P);return A?(A==="arraybuffer"?P=n.transformTo("uint8array",P):A==="string"&&(x?P=i.decode(P):f&&b!==!0&&(P=function(F){return w(F,a.uint8array?new Uint8Array(F.length):new Array(F.length))}(P))),P):c.Promise.reject(new Error("Can't read the data of '"+h+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(t,r,n){var a=t("./reader/readerFor"),i=t("./utils"),o=t("./signature"),c=t("./zipEntry"),v=t("./support");function w(k){this.files=[],this.loadOptions=k}w.prototype={checkSignature:function(k){if(!this.reader.readAndCheckSignature(k)){this.reader.index-=4;var _=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(_)+", expected "+i.pretty(k)+")")}},isSignature:function(k,_){var u=this.reader.index;this.reader.setIndex(k);var y=this.reader.readString(4)===_;return this.reader.setIndex(u),y},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var k=this.reader.readData(this.zipCommentLength),_=v.uint8array?"uint8array":"array",u=i.transformTo(_,k);this.zipComment=this.loadOptions.decodeFileName(u)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var k,_,u,y=this.zip64EndOfCentralSize-44;0<y;)k=this.reader.readInt(2),_=this.reader.readInt(4),u=this.reader.readData(_),this.zip64ExtensibleData[k]={id:k,length:_,value:u}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var k,_;for(k=0;k<this.files.length;k++)_=this.files[k],this.reader.setIndex(_.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),_.readLocalPart(this.reader),_.handleUTF8(),_.processAttributes()},readCentralDir:function(){var k;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(k=new c({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(k);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var k=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(k<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(k);var _=k;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(k=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(k),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var u=this.centralDirOffset+this.centralDirSize;this.zip64&&(u+=20,u+=12+this.zip64EndOfCentralSize);var y=_-u;if(0<y)this.isSignature(_,o.CENTRAL_FILE_HEADER)||(this.reader.zero=y);else if(y<0)throw new Error("Corrupted zip: missing "+Math.abs(y)+" bytes.")},prepareReader:function(k){this.reader=a(k)},load:function(k){this.prepareReader(k),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=w},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,r,n){var a=t("./reader/readerFor"),i=t("./utils"),o=t("./compressedObject"),c=t("./crc32"),v=t("./utf8"),w=t("./compressions"),k=t("./support");function _(u,y){this.options=u,this.loadOptions=y}_.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(u){var y,h;if(u.skip(22),this.fileNameLength=u.readInt(2),h=u.readInt(2),this.fileName=u.readData(this.fileNameLength),u.skip(h),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((y=function(m){for(var f in w)if(Object.prototype.hasOwnProperty.call(w,f)&&w[f].magic===m)return w[f];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,y,u.readData(this.compressedSize))},readCentralPart:function(u){this.versionMadeBy=u.readInt(2),u.skip(2),this.bitFlag=u.readInt(2),this.compressionMethod=u.readString(2),this.date=u.readDate(),this.crc32=u.readInt(4),this.compressedSize=u.readInt(4),this.uncompressedSize=u.readInt(4);var y=u.readInt(2);if(this.extraFieldsLength=u.readInt(2),this.fileCommentLength=u.readInt(2),this.diskNumberStart=u.readInt(2),this.internalFileAttributes=u.readInt(2),this.externalFileAttributes=u.readInt(4),this.localHeaderOffset=u.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");u.skip(y),this.readExtraFields(u),this.parseZIP64ExtraField(u),this.fileComment=u.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var u=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),u==0&&(this.dosPermissions=63&this.externalFileAttributes),u==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var u=a(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=u.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=u.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=u.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=u.readInt(4))}},readExtraFields:function(u){var y,h,m,f=u.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});u.index+4<f;)y=u.readInt(2),h=u.readInt(2),m=u.readData(h),this.extraFields[y]={id:y,length:h,value:m};u.setIndex(f)},handleUTF8:function(){var u=k.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=v.utf8decode(this.fileName),this.fileCommentStr=v.utf8decode(this.fileComment);else{var y=this.findExtraFieldUnicodePath();if(y!==null)this.fileNameStr=y;else{var h=i.transformTo(u,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var m=this.findExtraFieldUnicodeComment();if(m!==null)this.fileCommentStr=m;else{var f=i.transformTo(u,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(f)}}},findExtraFieldUnicodePath:function(){var u=this.extraFields[28789];if(u){var y=a(u.value);return y.readInt(1)!==1||c(this.fileName)!==y.readInt(4)?null:v.utf8decode(y.readData(u.length-5))}return null},findExtraFieldUnicodeComment:function(){var u=this.extraFields[25461];if(u){var y=a(u.value);return y.readInt(1)!==1||c(this.fileComment)!==y.readInt(4)?null:v.utf8decode(y.readData(u.length-5))}return null}},r.exports=_},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,r,n){function a(y,h,m){this.name=y,this.dir=m.dir,this.date=m.date,this.comment=m.comment,this.unixPermissions=m.unixPermissions,this.dosPermissions=m.dosPermissions,this._data=h,this._dataBinary=m.binary,this.options={compression:m.compression,compressionOptions:m.compressionOptions}}var i=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),c=t("./utf8"),v=t("./compressedObject"),w=t("./stream/GenericWorker");a.prototype={internalStream:function(y){var h=null,m="string";try{if(!y)throw new Error("No output type specified.");var f=(m=y.toLowerCase())==="string"||m==="text";m!=="binarystring"&&m!=="text"||(m="string"),h=this._decompressWorker();var b=!this._dataBinary;b&&!f&&(h=h.pipe(new c.Utf8EncodeWorker)),!b&&f&&(h=h.pipe(new c.Utf8DecodeWorker))}catch(x){(h=new w("error")).error(x)}return new i(h,m,"")},async:function(y,h){return this.internalStream(y).accumulate(h)},nodeStream:function(y,h){return this.internalStream(y||"nodebuffer").toNodejsStream(h)},_compressWorker:function(y,h){if(this._data instanceof v&&this._data.compression.magic===y.magic)return this._data.getCompressedWorker();var m=this._decompressWorker();return this._dataBinary||(m=m.pipe(new c.Utf8EncodeWorker)),v.createWorkerFrom(m,y,h)},_decompressWorker:function(){return this._data instanceof v?this._data.getContentWorker():this._data instanceof w?this._data:new o(this._data)}};for(var k=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],_=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},u=0;u<k.length;u++)a.prototype[k[u]]=_;r.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,r,n){(function(a){var i,o,c=a.MutationObserver||a.WebKitMutationObserver;if(c){var v=0,w=new c(y),k=a.document.createTextNode("");w.observe(k,{characterData:!0}),i=function(){k.data=v=++v%2}}else if(a.setImmediate||a.MessageChannel===void 0)i="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var h=a.document.createElement("script");h.onreadystatechange=function(){y(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},a.document.documentElement.appendChild(h)}:function(){setTimeout(y,0)};else{var _=new a.MessageChannel;_.port1.onmessage=y,i=function(){_.port2.postMessage(0)}}var u=[];function y(){var h,m;o=!0;for(var f=u.length;f;){for(m=u,u=[],h=-1;++h<f;)m[h]();f=u.length}o=!1}r.exports=function(h){u.push(h)!==1||o||i()}}).call(this,typeof Rt<"u"?Rt:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,r,n){var a=t("immediate");function i(){}var o={},c=["REJECTED"],v=["FULFILLED"],w=["PENDING"];function k(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=w,this.queue=[],this.outcome=void 0,f!==i&&h(this,f)}function _(f,b,x){this.promise=f,typeof b=="function"&&(this.onFulfilled=b,this.callFulfilled=this.otherCallFulfilled),typeof x=="function"&&(this.onRejected=x,this.callRejected=this.otherCallRejected)}function u(f,b,x){a(function(){var P;try{P=b(x)}catch(A){return o.reject(f,A)}P===f?o.reject(f,new TypeError("Cannot resolve promise with itself")):o.resolve(f,P)})}function y(f){var b=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof b=="function")return function(){b.apply(f,arguments)}}function h(f,b){var x=!1;function P(I){x||(x=!0,o.reject(f,I))}function A(I){x||(x=!0,o.resolve(f,I))}var F=m(function(){b(A,P)});F.status==="error"&&P(F.value)}function m(f,b){var x={};try{x.value=f(b),x.status="success"}catch(P){x.status="error",x.value=P}return x}(r.exports=k).prototype.finally=function(f){if(typeof f!="function")return this;var b=this.constructor;return this.then(function(x){return b.resolve(f()).then(function(){return x})},function(x){return b.resolve(f()).then(function(){throw x})})},k.prototype.catch=function(f){return this.then(null,f)},k.prototype.then=function(f,b){if(typeof f!="function"&&this.state===v||typeof b!="function"&&this.state===c)return this;var x=new this.constructor(i);return this.state!==w?u(x,this.state===v?f:b,this.outcome):this.queue.push(new _(x,f,b)),x},_.prototype.callFulfilled=function(f){o.resolve(this.promise,f)},_.prototype.otherCallFulfilled=function(f){u(this.promise,this.onFulfilled,f)},_.prototype.callRejected=function(f){o.reject(this.promise,f)},_.prototype.otherCallRejected=function(f){u(this.promise,this.onRejected,f)},o.resolve=function(f,b){var x=m(y,b);if(x.status==="error")return o.reject(f,x.value);var P=x.value;if(P)h(f,P);else{f.state=v,f.outcome=b;for(var A=-1,F=f.queue.length;++A<F;)f.queue[A].callFulfilled(b)}return f},o.reject=function(f,b){f.state=c,f.outcome=b;for(var x=-1,P=f.queue.length;++x<P;)f.queue[x].callRejected(b);return f},k.resolve=function(f){return f instanceof this?f:o.resolve(new this(i),f)},k.reject=function(f){var b=new this(i);return o.reject(b,f)},k.all=function(f){var b=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=f.length,P=!1;if(!x)return this.resolve([]);for(var A=new Array(x),F=0,I=-1,H=new this(i);++I<x;)D(f[I],I);return H;function D(V,Q){b.resolve(V).then(function(S){A[Q]=S,++F!==x||P||(P=!0,o.resolve(H,A))},function(S){P||(P=!0,o.reject(H,S))})}},k.race=function(f){var b=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=f.length,P=!1;if(!x)return this.resolve([]);for(var A=-1,F=new this(i);++A<x;)I=f[A],b.resolve(I).then(function(H){P||(P=!0,o.resolve(F,H))},function(H){P||(P=!0,o.reject(F,H))});var I;return F}},{immediate:36}],38:[function(t,r,n){var a={};(0,t("./lib/utils/common").assign)(a,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),r.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,r,n){var a=t("./zlib/deflate"),i=t("./utils/common"),o=t("./utils/strings"),c=t("./zlib/messages"),v=t("./zlib/zstream"),w=Object.prototype.toString,k=0,_=-1,u=0,y=8;function h(f){if(!(this instanceof h))return new h(f);this.options=i.assign({level:_,method:y,chunkSize:16384,windowBits:15,memLevel:8,strategy:u,to:""},f||{});var b=this.options;b.raw&&0<b.windowBits?b.windowBits=-b.windowBits:b.gzip&&0<b.windowBits&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new v,this.strm.avail_out=0;var x=a.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(x!==k)throw new Error(c[x]);if(b.header&&a.deflateSetHeader(this.strm,b.header),b.dictionary){var P;if(P=typeof b.dictionary=="string"?o.string2buf(b.dictionary):w.call(b.dictionary)==="[object ArrayBuffer]"?new Uint8Array(b.dictionary):b.dictionary,(x=a.deflateSetDictionary(this.strm,P))!==k)throw new Error(c[x]);this._dict_set=!0}}function m(f,b){var x=new h(b);if(x.push(f,!0),x.err)throw x.msg||c[x.err];return x.result}h.prototype.push=function(f,b){var x,P,A=this.strm,F=this.options.chunkSize;if(this.ended)return!1;P=b===~~b?b:b===!0?4:0,typeof f=="string"?A.input=o.string2buf(f):w.call(f)==="[object ArrayBuffer]"?A.input=new Uint8Array(f):A.input=f,A.next_in=0,A.avail_in=A.input.length;do{if(A.avail_out===0&&(A.output=new i.Buf8(F),A.next_out=0,A.avail_out=F),(x=a.deflate(A,P))!==1&&x!==k)return this.onEnd(x),!(this.ended=!0);A.avail_out!==0&&(A.avail_in!==0||P!==4&&P!==2)||(this.options.to==="string"?this.onData(o.buf2binstring(i.shrinkBuf(A.output,A.next_out))):this.onData(i.shrinkBuf(A.output,A.next_out)))}while((0<A.avail_in||A.avail_out===0)&&x!==1);return P===4?(x=a.deflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===k):P!==2||(this.onEnd(k),!(A.avail_out=0))},h.prototype.onData=function(f){this.chunks.push(f)},h.prototype.onEnd=function(f){f===k&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=f,this.msg=this.strm.msg},n.Deflate=h,n.deflate=m,n.deflateRaw=function(f,b){return(b=b||{}).raw=!0,m(f,b)},n.gzip=function(f,b){return(b=b||{}).gzip=!0,m(f,b)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,r,n){var a=t("./zlib/inflate"),i=t("./utils/common"),o=t("./utils/strings"),c=t("./zlib/constants"),v=t("./zlib/messages"),w=t("./zlib/zstream"),k=t("./zlib/gzheader"),_=Object.prototype.toString;function u(h){if(!(this instanceof u))return new u(h);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},h||{});var m=this.options;m.raw&&0<=m.windowBits&&m.windowBits<16&&(m.windowBits=-m.windowBits,m.windowBits===0&&(m.windowBits=-15)),!(0<=m.windowBits&&m.windowBits<16)||h&&h.windowBits||(m.windowBits+=32),15<m.windowBits&&m.windowBits<48&&!(15&m.windowBits)&&(m.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new w,this.strm.avail_out=0;var f=a.inflateInit2(this.strm,m.windowBits);if(f!==c.Z_OK)throw new Error(v[f]);this.header=new k,a.inflateGetHeader(this.strm,this.header)}function y(h,m){var f=new u(m);if(f.push(h,!0),f.err)throw f.msg||v[f.err];return f.result}u.prototype.push=function(h,m){var f,b,x,P,A,F,I=this.strm,H=this.options.chunkSize,D=this.options.dictionary,V=!1;if(this.ended)return!1;b=m===~~m?m:m===!0?c.Z_FINISH:c.Z_NO_FLUSH,typeof h=="string"?I.input=o.binstring2buf(h):_.call(h)==="[object ArrayBuffer]"?I.input=new Uint8Array(h):I.input=h,I.next_in=0,I.avail_in=I.input.length;do{if(I.avail_out===0&&(I.output=new i.Buf8(H),I.next_out=0,I.avail_out=H),(f=a.inflate(I,c.Z_NO_FLUSH))===c.Z_NEED_DICT&&D&&(F=typeof D=="string"?o.string2buf(D):_.call(D)==="[object ArrayBuffer]"?new Uint8Array(D):D,f=a.inflateSetDictionary(this.strm,F)),f===c.Z_BUF_ERROR&&V===!0&&(f=c.Z_OK,V=!1),f!==c.Z_STREAM_END&&f!==c.Z_OK)return this.onEnd(f),!(this.ended=!0);I.next_out&&(I.avail_out!==0&&f!==c.Z_STREAM_END&&(I.avail_in!==0||b!==c.Z_FINISH&&b!==c.Z_SYNC_FLUSH)||(this.options.to==="string"?(x=o.utf8border(I.output,I.next_out),P=I.next_out-x,A=o.buf2string(I.output,x),I.next_out=P,I.avail_out=H-P,P&&i.arraySet(I.output,I.output,x,P,0),this.onData(A)):this.onData(i.shrinkBuf(I.output,I.next_out)))),I.avail_in===0&&I.avail_out===0&&(V=!0)}while((0<I.avail_in||I.avail_out===0)&&f!==c.Z_STREAM_END);return f===c.Z_STREAM_END&&(b=c.Z_FINISH),b===c.Z_FINISH?(f=a.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===c.Z_OK):b!==c.Z_SYNC_FLUSH||(this.onEnd(c.Z_OK),!(I.avail_out=0))},u.prototype.onData=function(h){this.chunks.push(h)},u.prototype.onEnd=function(h){h===c.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=h,this.msg=this.strm.msg},n.Inflate=u,n.inflate=y,n.inflateRaw=function(h,m){return(m=m||{}).raw=!0,y(h,m)},n.ungzip=y},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,r,n){var a=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";n.assign=function(c){for(var v=Array.prototype.slice.call(arguments,1);v.length;){var w=v.shift();if(w){if(typeof w!="object")throw new TypeError(w+"must be non-object");for(var k in w)w.hasOwnProperty(k)&&(c[k]=w[k])}}return c},n.shrinkBuf=function(c,v){return c.length===v?c:c.subarray?c.subarray(0,v):(c.length=v,c)};var i={arraySet:function(c,v,w,k,_){if(v.subarray&&c.subarray)c.set(v.subarray(w,w+k),_);else for(var u=0;u<k;u++)c[_+u]=v[w+u]},flattenChunks:function(c){var v,w,k,_,u,y;for(v=k=0,w=c.length;v<w;v++)k+=c[v].length;for(y=new Uint8Array(k),v=_=0,w=c.length;v<w;v++)u=c[v],y.set(u,_),_+=u.length;return y}},o={arraySet:function(c,v,w,k,_){for(var u=0;u<k;u++)c[_+u]=v[w+u]},flattenChunks:function(c){return[].concat.apply([],c)}};n.setTyped=function(c){c?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,i)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,o))},n.setTyped(a)},{}],42:[function(t,r,n){var a=t("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch{i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{o=!1}for(var c=new a.Buf8(256),v=0;v<256;v++)c[v]=252<=v?6:248<=v?5:240<=v?4:224<=v?3:192<=v?2:1;function w(k,_){if(_<65537&&(k.subarray&&o||!k.subarray&&i))return String.fromCharCode.apply(null,a.shrinkBuf(k,_));for(var u="",y=0;y<_;y++)u+=String.fromCharCode(k[y]);return u}c[254]=c[254]=1,n.string2buf=function(k){var _,u,y,h,m,f=k.length,b=0;for(h=0;h<f;h++)(64512&(u=k.charCodeAt(h)))==55296&&h+1<f&&(64512&(y=k.charCodeAt(h+1)))==56320&&(u=65536+(u-55296<<10)+(y-56320),h++),b+=u<128?1:u<2048?2:u<65536?3:4;for(_=new a.Buf8(b),h=m=0;m<b;h++)(64512&(u=k.charCodeAt(h)))==55296&&h+1<f&&(64512&(y=k.charCodeAt(h+1)))==56320&&(u=65536+(u-55296<<10)+(y-56320),h++),u<128?_[m++]=u:(u<2048?_[m++]=192|u>>>6:(u<65536?_[m++]=224|u>>>12:(_[m++]=240|u>>>18,_[m++]=128|u>>>12&63),_[m++]=128|u>>>6&63),_[m++]=128|63&u);return _},n.buf2binstring=function(k){return w(k,k.length)},n.binstring2buf=function(k){for(var _=new a.Buf8(k.length),u=0,y=_.length;u<y;u++)_[u]=k.charCodeAt(u);return _},n.buf2string=function(k,_){var u,y,h,m,f=_||k.length,b=new Array(2*f);for(u=y=0;u<f;)if((h=k[u++])<128)b[y++]=h;else if(4<(m=c[h]))b[y++]=65533,u+=m-1;else{for(h&=m===2?31:m===3?15:7;1<m&&u<f;)h=h<<6|63&k[u++],m--;1<m?b[y++]=65533:h<65536?b[y++]=h:(h-=65536,b[y++]=55296|h>>10&1023,b[y++]=56320|1023&h)}return w(b,y)},n.utf8border=function(k,_){var u;for((_=_||k.length)>k.length&&(_=k.length),u=_-1;0<=u&&(192&k[u])==128;)u--;return u<0||u===0?_:u+c[k[u]]>_?u:_}},{"./common":41}],43:[function(t,r,n){r.exports=function(a,i,o,c){for(var v=65535&a|0,w=a>>>16&65535|0,k=0;o!==0;){for(o-=k=2e3<o?2e3:o;w=w+(v=v+i[c++]|0)|0,--k;);v%=65521,w%=65521}return v|w<<16|0}},{}],44:[function(t,r,n){r.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,r,n){var a=function(){for(var i,o=[],c=0;c<256;c++){i=c;for(var v=0;v<8;v++)i=1&i?3988292384^i>>>1:i>>>1;o[c]=i}return o}();r.exports=function(i,o,c,v){var w=a,k=v+c;i^=-1;for(var _=v;_<k;_++)i=i>>>8^w[255&(i^o[_])];return-1^i}},{}],46:[function(t,r,n){var a,i=t("../utils/common"),o=t("./trees"),c=t("./adler32"),v=t("./crc32"),w=t("./messages"),k=0,_=4,u=0,y=-2,h=-1,m=4,f=2,b=8,x=9,P=286,A=30,F=19,I=2*P+1,H=15,D=3,V=258,Q=V+D+1,S=42,M=113,l=1,L=2,et=3,$=4;function rt(s,O){return s.msg=w[O],O}function W(s){return(s<<1)-(4<s?9:0)}function tt(s){for(var O=s.length;0<=--O;)s[O]=0}function R(s){var O=s.state,B=O.pending;B>s.avail_out&&(B=s.avail_out),B!==0&&(i.arraySet(s.output,O.pending_buf,O.pending_out,B,s.next_out),s.next_out+=B,O.pending_out+=B,s.total_out+=B,s.avail_out-=B,O.pending-=B,O.pending===0&&(O.pending_out=0))}function T(s,O){o._tr_flush_block(s,0<=s.block_start?s.block_start:-1,s.strstart-s.block_start,O),s.block_start=s.strstart,R(s.strm)}function J(s,O){s.pending_buf[s.pending++]=O}function q(s,O){s.pending_buf[s.pending++]=O>>>8&255,s.pending_buf[s.pending++]=255&O}function X(s,O){var B,g,p=s.max_chain_length,C=s.strstart,j=s.prev_length,U=s.nice_match,N=s.strstart>s.w_size-Q?s.strstart-(s.w_size-Q):0,Z=s.window,K=s.w_mask,G=s.prev,Y=s.strstart+V,ot=Z[C+j-1],st=Z[C+j];s.prev_length>=s.good_match&&(p>>=2),U>s.lookahead&&(U=s.lookahead);do if(Z[(B=O)+j]===st&&Z[B+j-1]===ot&&Z[B]===Z[C]&&Z[++B]===Z[C+1]){C+=2,B++;do;while(Z[++C]===Z[++B]&&Z[++C]===Z[++B]&&Z[++C]===Z[++B]&&Z[++C]===Z[++B]&&Z[++C]===Z[++B]&&Z[++C]===Z[++B]&&Z[++C]===Z[++B]&&Z[++C]===Z[++B]&&C<Y);if(g=V-(Y-C),C=Y-V,j<g){if(s.match_start=O,U<=(j=g))break;ot=Z[C+j-1],st=Z[C+j]}}while((O=G[O&K])>N&&--p!=0);return j<=s.lookahead?j:s.lookahead}function ht(s){var O,B,g,p,C,j,U,N,Z,K,G=s.w_size;do{if(p=s.window_size-s.lookahead-s.strstart,s.strstart>=G+(G-Q)){for(i.arraySet(s.window,s.window,G,G,0),s.match_start-=G,s.strstart-=G,s.block_start-=G,O=B=s.hash_size;g=s.head[--O],s.head[O]=G<=g?g-G:0,--B;);for(O=B=G;g=s.prev[--O],s.prev[O]=G<=g?g-G:0,--B;);p+=G}if(s.strm.avail_in===0)break;if(j=s.strm,U=s.window,N=s.strstart+s.lookahead,Z=p,K=void 0,K=j.avail_in,Z<K&&(K=Z),B=K===0?0:(j.avail_in-=K,i.arraySet(U,j.input,j.next_in,K,N),j.state.wrap===1?j.adler=c(j.adler,U,K,N):j.state.wrap===2&&(j.adler=v(j.adler,U,K,N)),j.next_in+=K,j.total_in+=K,K),s.lookahead+=B,s.lookahead+s.insert>=D)for(C=s.strstart-s.insert,s.ins_h=s.window[C],s.ins_h=(s.ins_h<<s.hash_shift^s.window[C+1])&s.hash_mask;s.insert&&(s.ins_h=(s.ins_h<<s.hash_shift^s.window[C+D-1])&s.hash_mask,s.prev[C&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=C,C++,s.insert--,!(s.lookahead+s.insert<D)););}while(s.lookahead<Q&&s.strm.avail_in!==0)}function gt(s,O){for(var B,g;;){if(s.lookahead<Q){if(ht(s),s.lookahead<Q&&O===k)return l;if(s.lookahead===0)break}if(B=0,s.lookahead>=D&&(s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+D-1])&s.hash_mask,B=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=s.strstart),B!==0&&s.strstart-B<=s.w_size-Q&&(s.match_length=X(s,B)),s.match_length>=D)if(g=o._tr_tally(s,s.strstart-s.match_start,s.match_length-D),s.lookahead-=s.match_length,s.match_length<=s.max_lazy_match&&s.lookahead>=D){for(s.match_length--;s.strstart++,s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+D-1])&s.hash_mask,B=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=s.strstart,--s.match_length!=0;);s.strstart++}else s.strstart+=s.match_length,s.match_length=0,s.ins_h=s.window[s.strstart],s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+1])&s.hash_mask;else g=o._tr_tally(s,0,s.window[s.strstart]),s.lookahead--,s.strstart++;if(g&&(T(s,!1),s.strm.avail_out===0))return l}return s.insert=s.strstart<D-1?s.strstart:D-1,O===_?(T(s,!0),s.strm.avail_out===0?et:$):s.last_lit&&(T(s,!1),s.strm.avail_out===0)?l:L}function at(s,O){for(var B,g,p;;){if(s.lookahead<Q){if(ht(s),s.lookahead<Q&&O===k)return l;if(s.lookahead===0)break}if(B=0,s.lookahead>=D&&(s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+D-1])&s.hash_mask,B=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=s.strstart),s.prev_length=s.match_length,s.prev_match=s.match_start,s.match_length=D-1,B!==0&&s.prev_length<s.max_lazy_match&&s.strstart-B<=s.w_size-Q&&(s.match_length=X(s,B),s.match_length<=5&&(s.strategy===1||s.match_length===D&&4096<s.strstart-s.match_start)&&(s.match_length=D-1)),s.prev_length>=D&&s.match_length<=s.prev_length){for(p=s.strstart+s.lookahead-D,g=o._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-D),s.lookahead-=s.prev_length-1,s.prev_length-=2;++s.strstart<=p&&(s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+D-1])&s.hash_mask,B=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=s.strstart),--s.prev_length!=0;);if(s.match_available=0,s.match_length=D-1,s.strstart++,g&&(T(s,!1),s.strm.avail_out===0))return l}else if(s.match_available){if((g=o._tr_tally(s,0,s.window[s.strstart-1]))&&T(s,!1),s.strstart++,s.lookahead--,s.strm.avail_out===0)return l}else s.match_available=1,s.strstart++,s.lookahead--}return s.match_available&&(g=o._tr_tally(s,0,s.window[s.strstart-1]),s.match_available=0),s.insert=s.strstart<D-1?s.strstart:D-1,O===_?(T(s,!0),s.strm.avail_out===0?et:$):s.last_lit&&(T(s,!1),s.strm.avail_out===0)?l:L}function it(s,O,B,g,p){this.good_length=s,this.max_lazy=O,this.nice_length=B,this.max_chain=g,this.func=p}function mt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=b,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(2*I),this.dyn_dtree=new i.Buf16(2*(2*A+1)),this.bl_tree=new i.Buf16(2*(2*F+1)),tt(this.dyn_ltree),tt(this.dyn_dtree),tt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(H+1),this.heap=new i.Buf16(2*P+1),tt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*P+1),tt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function ut(s){var O;return s&&s.state?(s.total_in=s.total_out=0,s.data_type=f,(O=s.state).pending=0,O.pending_out=0,O.wrap<0&&(O.wrap=-O.wrap),O.status=O.wrap?S:M,s.adler=O.wrap===2?0:1,O.last_flush=k,o._tr_init(O),u):rt(s,y)}function _t(s){var O=ut(s);return O===u&&function(B){B.window_size=2*B.w_size,tt(B.head),B.max_lazy_match=a[B.level].max_lazy,B.good_match=a[B.level].good_length,B.nice_match=a[B.level].nice_length,B.max_chain_length=a[B.level].max_chain,B.strstart=0,B.block_start=0,B.lookahead=0,B.insert=0,B.match_length=B.prev_length=D-1,B.match_available=0,B.ins_h=0}(s.state),O}function vt(s,O,B,g,p,C){if(!s)return y;var j=1;if(O===h&&(O=6),g<0?(j=0,g=-g):15<g&&(j=2,g-=16),p<1||x<p||B!==b||g<8||15<g||O<0||9<O||C<0||m<C)return rt(s,y);g===8&&(g=9);var U=new mt;return(s.state=U).strm=s,U.wrap=j,U.gzhead=null,U.w_bits=g,U.w_size=1<<U.w_bits,U.w_mask=U.w_size-1,U.hash_bits=p+7,U.hash_size=1<<U.hash_bits,U.hash_mask=U.hash_size-1,U.hash_shift=~~((U.hash_bits+D-1)/D),U.window=new i.Buf8(2*U.w_size),U.head=new i.Buf16(U.hash_size),U.prev=new i.Buf16(U.w_size),U.lit_bufsize=1<<p+6,U.pending_buf_size=4*U.lit_bufsize,U.pending_buf=new i.Buf8(U.pending_buf_size),U.d_buf=1*U.lit_bufsize,U.l_buf=3*U.lit_bufsize,U.level=O,U.strategy=C,U.method=B,_t(s)}a=[new it(0,0,0,0,function(s,O){var B=65535;for(B>s.pending_buf_size-5&&(B=s.pending_buf_size-5);;){if(s.lookahead<=1){if(ht(s),s.lookahead===0&&O===k)return l;if(s.lookahead===0)break}s.strstart+=s.lookahead,s.lookahead=0;var g=s.block_start+B;if((s.strstart===0||s.strstart>=g)&&(s.lookahead=s.strstart-g,s.strstart=g,T(s,!1),s.strm.avail_out===0)||s.strstart-s.block_start>=s.w_size-Q&&(T(s,!1),s.strm.avail_out===0))return l}return s.insert=0,O===_?(T(s,!0),s.strm.avail_out===0?et:$):(s.strstart>s.block_start&&(T(s,!1),s.strm.avail_out),l)}),new it(4,4,8,4,gt),new it(4,5,16,8,gt),new it(4,6,32,32,gt),new it(4,4,16,16,at),new it(8,16,32,32,at),new it(8,16,128,128,at),new it(8,32,128,256,at),new it(32,128,258,1024,at),new it(32,258,258,4096,at)],n.deflateInit=function(s,O){return vt(s,O,b,15,8,0)},n.deflateInit2=vt,n.deflateReset=_t,n.deflateResetKeep=ut,n.deflateSetHeader=function(s,O){return s&&s.state?s.state.wrap!==2?y:(s.state.gzhead=O,u):y},n.deflate=function(s,O){var B,g,p,C;if(!s||!s.state||5<O||O<0)return s?rt(s,y):y;if(g=s.state,!s.output||!s.input&&s.avail_in!==0||g.status===666&&O!==_)return rt(s,s.avail_out===0?-5:y);if(g.strm=s,B=g.last_flush,g.last_flush=O,g.status===S)if(g.wrap===2)s.adler=0,J(g,31),J(g,139),J(g,8),g.gzhead?(J(g,(g.gzhead.text?1:0)+(g.gzhead.hcrc?2:0)+(g.gzhead.extra?4:0)+(g.gzhead.name?8:0)+(g.gzhead.comment?16:0)),J(g,255&g.gzhead.time),J(g,g.gzhead.time>>8&255),J(g,g.gzhead.time>>16&255),J(g,g.gzhead.time>>24&255),J(g,g.level===9?2:2<=g.strategy||g.level<2?4:0),J(g,255&g.gzhead.os),g.gzhead.extra&&g.gzhead.extra.length&&(J(g,255&g.gzhead.extra.length),J(g,g.gzhead.extra.length>>8&255)),g.gzhead.hcrc&&(s.adler=v(s.adler,g.pending_buf,g.pending,0)),g.gzindex=0,g.status=69):(J(g,0),J(g,0),J(g,0),J(g,0),J(g,0),J(g,g.level===9?2:2<=g.strategy||g.level<2?4:0),J(g,3),g.status=M);else{var j=b+(g.w_bits-8<<4)<<8;j|=(2<=g.strategy||g.level<2?0:g.level<6?1:g.level===6?2:3)<<6,g.strstart!==0&&(j|=32),j+=31-j%31,g.status=M,q(g,j),g.strstart!==0&&(q(g,s.adler>>>16),q(g,65535&s.adler)),s.adler=1}if(g.status===69)if(g.gzhead.extra){for(p=g.pending;g.gzindex<(65535&g.gzhead.extra.length)&&(g.pending!==g.pending_buf_size||(g.gzhead.hcrc&&g.pending>p&&(s.adler=v(s.adler,g.pending_buf,g.pending-p,p)),R(s),p=g.pending,g.pending!==g.pending_buf_size));)J(g,255&g.gzhead.extra[g.gzindex]),g.gzindex++;g.gzhead.hcrc&&g.pending>p&&(s.adler=v(s.adler,g.pending_buf,g.pending-p,p)),g.gzindex===g.gzhead.extra.length&&(g.gzindex=0,g.status=73)}else g.status=73;if(g.status===73)if(g.gzhead.name){p=g.pending;do{if(g.pending===g.pending_buf_size&&(g.gzhead.hcrc&&g.pending>p&&(s.adler=v(s.adler,g.pending_buf,g.pending-p,p)),R(s),p=g.pending,g.pending===g.pending_buf_size)){C=1;break}C=g.gzindex<g.gzhead.name.length?255&g.gzhead.name.charCodeAt(g.gzindex++):0,J(g,C)}while(C!==0);g.gzhead.hcrc&&g.pending>p&&(s.adler=v(s.adler,g.pending_buf,g.pending-p,p)),C===0&&(g.gzindex=0,g.status=91)}else g.status=91;if(g.status===91)if(g.gzhead.comment){p=g.pending;do{if(g.pending===g.pending_buf_size&&(g.gzhead.hcrc&&g.pending>p&&(s.adler=v(s.adler,g.pending_buf,g.pending-p,p)),R(s),p=g.pending,g.pending===g.pending_buf_size)){C=1;break}C=g.gzindex<g.gzhead.comment.length?255&g.gzhead.comment.charCodeAt(g.gzindex++):0,J(g,C)}while(C!==0);g.gzhead.hcrc&&g.pending>p&&(s.adler=v(s.adler,g.pending_buf,g.pending-p,p)),C===0&&(g.status=103)}else g.status=103;if(g.status===103&&(g.gzhead.hcrc?(g.pending+2>g.pending_buf_size&&R(s),g.pending+2<=g.pending_buf_size&&(J(g,255&s.adler),J(g,s.adler>>8&255),s.adler=0,g.status=M)):g.status=M),g.pending!==0){if(R(s),s.avail_out===0)return g.last_flush=-1,u}else if(s.avail_in===0&&W(O)<=W(B)&&O!==_)return rt(s,-5);if(g.status===666&&s.avail_in!==0)return rt(s,-5);if(s.avail_in!==0||g.lookahead!==0||O!==k&&g.status!==666){var U=g.strategy===2?function(N,Z){for(var K;;){if(N.lookahead===0&&(ht(N),N.lookahead===0)){if(Z===k)return l;break}if(N.match_length=0,K=o._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++,K&&(T(N,!1),N.strm.avail_out===0))return l}return N.insert=0,Z===_?(T(N,!0),N.strm.avail_out===0?et:$):N.last_lit&&(T(N,!1),N.strm.avail_out===0)?l:L}(g,O):g.strategy===3?function(N,Z){for(var K,G,Y,ot,st=N.window;;){if(N.lookahead<=V){if(ht(N),N.lookahead<=V&&Z===k)return l;if(N.lookahead===0)break}if(N.match_length=0,N.lookahead>=D&&0<N.strstart&&(G=st[Y=N.strstart-1])===st[++Y]&&G===st[++Y]&&G===st[++Y]){ot=N.strstart+V;do;while(G===st[++Y]&&G===st[++Y]&&G===st[++Y]&&G===st[++Y]&&G===st[++Y]&&G===st[++Y]&&G===st[++Y]&&G===st[++Y]&&Y<ot);N.match_length=V-(ot-Y),N.match_length>N.lookahead&&(N.match_length=N.lookahead)}if(N.match_length>=D?(K=o._tr_tally(N,1,N.match_length-D),N.lookahead-=N.match_length,N.strstart+=N.match_length,N.match_length=0):(K=o._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++),K&&(T(N,!1),N.strm.avail_out===0))return l}return N.insert=0,Z===_?(T(N,!0),N.strm.avail_out===0?et:$):N.last_lit&&(T(N,!1),N.strm.avail_out===0)?l:L}(g,O):a[g.level].func(g,O);if(U!==et&&U!==$||(g.status=666),U===l||U===et)return s.avail_out===0&&(g.last_flush=-1),u;if(U===L&&(O===1?o._tr_align(g):O!==5&&(o._tr_stored_block(g,0,0,!1),O===3&&(tt(g.head),g.lookahead===0&&(g.strstart=0,g.block_start=0,g.insert=0))),R(s),s.avail_out===0))return g.last_flush=-1,u}return O!==_?u:g.wrap<=0?1:(g.wrap===2?(J(g,255&s.adler),J(g,s.adler>>8&255),J(g,s.adler>>16&255),J(g,s.adler>>24&255),J(g,255&s.total_in),J(g,s.total_in>>8&255),J(g,s.total_in>>16&255),J(g,s.total_in>>24&255)):(q(g,s.adler>>>16),q(g,65535&s.adler)),R(s),0<g.wrap&&(g.wrap=-g.wrap),g.pending!==0?u:1)},n.deflateEnd=function(s){var O;return s&&s.state?(O=s.state.status)!==S&&O!==69&&O!==73&&O!==91&&O!==103&&O!==M&&O!==666?rt(s,y):(s.state=null,O===M?rt(s,-3):u):y},n.deflateSetDictionary=function(s,O){var B,g,p,C,j,U,N,Z,K=O.length;if(!s||!s.state||(C=(B=s.state).wrap)===2||C===1&&B.status!==S||B.lookahead)return y;for(C===1&&(s.adler=c(s.adler,O,K,0)),B.wrap=0,K>=B.w_size&&(C===0&&(tt(B.head),B.strstart=0,B.block_start=0,B.insert=0),Z=new i.Buf8(B.w_size),i.arraySet(Z,O,K-B.w_size,B.w_size,0),O=Z,K=B.w_size),j=s.avail_in,U=s.next_in,N=s.input,s.avail_in=K,s.next_in=0,s.input=O,ht(B);B.lookahead>=D;){for(g=B.strstart,p=B.lookahead-(D-1);B.ins_h=(B.ins_h<<B.hash_shift^B.window[g+D-1])&B.hash_mask,B.prev[g&B.w_mask]=B.head[B.ins_h],B.head[B.ins_h]=g,g++,--p;);B.strstart=g,B.lookahead=D-1,ht(B)}return B.strstart+=B.lookahead,B.block_start=B.strstart,B.insert=B.lookahead,B.lookahead=0,B.match_length=B.prev_length=D-1,B.match_available=0,s.next_in=U,s.input=N,s.avail_in=j,B.wrap=C,u},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,r,n){r.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,r,n){r.exports=function(a,i){var o,c,v,w,k,_,u,y,h,m,f,b,x,P,A,F,I,H,D,V,Q,S,M,l,L;o=a.state,c=a.next_in,l=a.input,v=c+(a.avail_in-5),w=a.next_out,L=a.output,k=w-(i-a.avail_out),_=w+(a.avail_out-257),u=o.dmax,y=o.wsize,h=o.whave,m=o.wnext,f=o.window,b=o.hold,x=o.bits,P=o.lencode,A=o.distcode,F=(1<<o.lenbits)-1,I=(1<<o.distbits)-1;t:do{x<15&&(b+=l[c++]<<x,x+=8,b+=l[c++]<<x,x+=8),H=P[b&F];e:for(;;){if(b>>>=D=H>>>24,x-=D,(D=H>>>16&255)===0)L[w++]=65535&H;else{if(!(16&D)){if(!(64&D)){H=P[(65535&H)+(b&(1<<D)-1)];continue e}if(32&D){o.mode=12;break t}a.msg="invalid literal/length code",o.mode=30;break t}V=65535&H,(D&=15)&&(x<D&&(b+=l[c++]<<x,x+=8),V+=b&(1<<D)-1,b>>>=D,x-=D),x<15&&(b+=l[c++]<<x,x+=8,b+=l[c++]<<x,x+=8),H=A[b&I];r:for(;;){if(b>>>=D=H>>>24,x-=D,!(16&(D=H>>>16&255))){if(!(64&D)){H=A[(65535&H)+(b&(1<<D)-1)];continue r}a.msg="invalid distance code",o.mode=30;break t}if(Q=65535&H,x<(D&=15)&&(b+=l[c++]<<x,(x+=8)<D&&(b+=l[c++]<<x,x+=8)),u<(Q+=b&(1<<D)-1)){a.msg="invalid distance too far back",o.mode=30;break t}if(b>>>=D,x-=D,(D=w-k)<Q){if(h<(D=Q-D)&&o.sane){a.msg="invalid distance too far back",o.mode=30;break t}if(M=f,(S=0)===m){if(S+=y-D,D<V){for(V-=D;L[w++]=f[S++],--D;);S=w-Q,M=L}}else if(m<D){if(S+=y+m-D,(D-=m)<V){for(V-=D;L[w++]=f[S++],--D;);if(S=0,m<V){for(V-=D=m;L[w++]=f[S++],--D;);S=w-Q,M=L}}}else if(S+=m-D,D<V){for(V-=D;L[w++]=f[S++],--D;);S=w-Q,M=L}for(;2<V;)L[w++]=M[S++],L[w++]=M[S++],L[w++]=M[S++],V-=3;V&&(L[w++]=M[S++],1<V&&(L[w++]=M[S++]))}else{for(S=w-Q;L[w++]=L[S++],L[w++]=L[S++],L[w++]=L[S++],2<(V-=3););V&&(L[w++]=L[S++],1<V&&(L[w++]=L[S++]))}break}}break}}while(c<v&&w<_);c-=V=x>>3,b&=(1<<(x-=V<<3))-1,a.next_in=c,a.next_out=w,a.avail_in=c<v?v-c+5:5-(c-v),a.avail_out=w<_?_-w+257:257-(w-_),o.hold=b,o.bits=x}},{}],49:[function(t,r,n){var a=t("../utils/common"),i=t("./adler32"),o=t("./crc32"),c=t("./inffast"),v=t("./inftrees"),w=1,k=2,_=0,u=-2,y=1,h=852,m=592;function f(S){return(S>>>24&255)+(S>>>8&65280)+((65280&S)<<8)+((255&S)<<24)}function b(){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 a.Buf16(320),this.work=new a.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function x(S){var M;return S&&S.state?(M=S.state,S.total_in=S.total_out=M.total=0,S.msg="",M.wrap&&(S.adler=1&M.wrap),M.mode=y,M.last=0,M.havedict=0,M.dmax=32768,M.head=null,M.hold=0,M.bits=0,M.lencode=M.lendyn=new a.Buf32(h),M.distcode=M.distdyn=new a.Buf32(m),M.sane=1,M.back=-1,_):u}function P(S){var M;return S&&S.state?((M=S.state).wsize=0,M.whave=0,M.wnext=0,x(S)):u}function A(S,M){var l,L;return S&&S.state?(L=S.state,M<0?(l=0,M=-M):(l=1+(M>>4),M<48&&(M&=15)),M&&(M<8||15<M)?u:(L.window!==null&&L.wbits!==M&&(L.window=null),L.wrap=l,L.wbits=M,P(S))):u}function F(S,M){var l,L;return S?(L=new b,(S.state=L).window=null,(l=A(S,M))!==_&&(S.state=null),l):u}var I,H,D=!0;function V(S){if(D){var M;for(I=new a.Buf32(512),H=new a.Buf32(32),M=0;M<144;)S.lens[M++]=8;for(;M<256;)S.lens[M++]=9;for(;M<280;)S.lens[M++]=7;for(;M<288;)S.lens[M++]=8;for(v(w,S.lens,0,288,I,0,S.work,{bits:9}),M=0;M<32;)S.lens[M++]=5;v(k,S.lens,0,32,H,0,S.work,{bits:5}),D=!1}S.lencode=I,S.lenbits=9,S.distcode=H,S.distbits=5}function Q(S,M,l,L){var et,$=S.state;return $.window===null&&($.wsize=1<<$.wbits,$.wnext=0,$.whave=0,$.window=new a.Buf8($.wsize)),L>=$.wsize?(a.arraySet($.window,M,l-$.wsize,$.wsize,0),$.wnext=0,$.whave=$.wsize):(L<(et=$.wsize-$.wnext)&&(et=L),a.arraySet($.window,M,l-L,et,$.wnext),(L-=et)?(a.arraySet($.window,M,l-L,L,0),$.wnext=L,$.whave=$.wsize):($.wnext+=et,$.wnext===$.wsize&&($.wnext=0),$.whave<$.wsize&&($.whave+=et))),0}n.inflateReset=P,n.inflateReset2=A,n.inflateResetKeep=x,n.inflateInit=function(S){return F(S,15)},n.inflateInit2=F,n.inflate=function(S,M){var l,L,et,$,rt,W,tt,R,T,J,q,X,ht,gt,at,it,mt,ut,_t,vt,s,O,B,g,p=0,C=new a.Buf8(4),j=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!S||!S.state||!S.output||!S.input&&S.avail_in!==0)return u;(l=S.state).mode===12&&(l.mode=13),rt=S.next_out,et=S.output,tt=S.avail_out,$=S.next_in,L=S.input,W=S.avail_in,R=l.hold,T=l.bits,J=W,q=tt,O=_;t:for(;;)switch(l.mode){case y:if(l.wrap===0){l.mode=13;break}for(;T<16;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}if(2&l.wrap&&R===35615){C[l.check=0]=255&R,C[1]=R>>>8&255,l.check=o(l.check,C,2,0),T=R=0,l.mode=2;break}if(l.flags=0,l.head&&(l.head.done=!1),!(1&l.wrap)||(((255&R)<<8)+(R>>8))%31){S.msg="incorrect header check",l.mode=30;break}if((15&R)!=8){S.msg="unknown compression method",l.mode=30;break}if(T-=4,s=8+(15&(R>>>=4)),l.wbits===0)l.wbits=s;else if(s>l.wbits){S.msg="invalid window size",l.mode=30;break}l.dmax=1<<s,S.adler=l.check=1,l.mode=512&R?10:12,T=R=0;break;case 2:for(;T<16;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}if(l.flags=R,(255&l.flags)!=8){S.msg="unknown compression method",l.mode=30;break}if(57344&l.flags){S.msg="unknown header flags set",l.mode=30;break}l.head&&(l.head.text=R>>8&1),512&l.flags&&(C[0]=255&R,C[1]=R>>>8&255,l.check=o(l.check,C,2,0)),T=R=0,l.mode=3;case 3:for(;T<32;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}l.head&&(l.head.time=R),512&l.flags&&(C[0]=255&R,C[1]=R>>>8&255,C[2]=R>>>16&255,C[3]=R>>>24&255,l.check=o(l.check,C,4,0)),T=R=0,l.mode=4;case 4:for(;T<16;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}l.head&&(l.head.xflags=255&R,l.head.os=R>>8),512&l.flags&&(C[0]=255&R,C[1]=R>>>8&255,l.check=o(l.check,C,2,0)),T=R=0,l.mode=5;case 5:if(1024&l.flags){for(;T<16;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}l.length=R,l.head&&(l.head.extra_len=R),512&l.flags&&(C[0]=255&R,C[1]=R>>>8&255,l.check=o(l.check,C,2,0)),T=R=0}else l.head&&(l.head.extra=null);l.mode=6;case 6:if(1024&l.flags&&(W<(X=l.length)&&(X=W),X&&(l.head&&(s=l.head.extra_len-l.length,l.head.extra||(l.head.extra=new Array(l.head.extra_len)),a.arraySet(l.head.extra,L,$,X,s)),512&l.flags&&(l.check=o(l.check,L,X,$)),W-=X,$+=X,l.length-=X),l.length))break t;l.length=0,l.mode=7;case 7:if(2048&l.flags){if(W===0)break t;for(X=0;s=L[$+X++],l.head&&s&&l.length<65536&&(l.head.name+=String.fromCharCode(s)),s&&X<W;);if(512&l.flags&&(l.check=o(l.check,L,X,$)),W-=X,$+=X,s)break t}else l.head&&(l.head.name=null);l.length=0,l.mode=8;case 8:if(4096&l.flags){if(W===0)break t;for(X=0;s=L[$+X++],l.head&&s&&l.length<65536&&(l.head.comment+=String.fromCharCode(s)),s&&X<W;);if(512&l.flags&&(l.check=o(l.check,L,X,$)),W-=X,$+=X,s)break t}else l.head&&(l.head.comment=null);l.mode=9;case 9:if(512&l.flags){for(;T<16;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}if(R!==(65535&l.check)){S.msg="header crc mismatch",l.mode=30;break}T=R=0}l.head&&(l.head.hcrc=l.flags>>9&1,l.head.done=!0),S.adler=l.check=0,l.mode=12;break;case 10:for(;T<32;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}S.adler=l.check=f(R),T=R=0,l.mode=11;case 11:if(l.havedict===0)return S.next_out=rt,S.avail_out=tt,S.next_in=$,S.avail_in=W,l.hold=R,l.bits=T,2;S.adler=l.check=1,l.mode=12;case 12:if(M===5||M===6)break t;case 13:if(l.last){R>>>=7&T,T-=7&T,l.mode=27;break}for(;T<3;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}switch(l.last=1&R,T-=1,3&(R>>>=1)){case 0:l.mode=14;break;case 1:if(V(l),l.mode=20,M!==6)break;R>>>=2,T-=2;break t;case 2:l.mode=17;break;case 3:S.msg="invalid block type",l.mode=30}R>>>=2,T-=2;break;case 14:for(R>>>=7&T,T-=7&T;T<32;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}if((65535&R)!=(R>>>16^65535)){S.msg="invalid stored block lengths",l.mode=30;break}if(l.length=65535&R,T=R=0,l.mode=15,M===6)break t;case 15:l.mode=16;case 16:if(X=l.length){if(W<X&&(X=W),tt<X&&(X=tt),X===0)break t;a.arraySet(et,L,$,X,rt),W-=X,$+=X,tt-=X,rt+=X,l.length-=X;break}l.mode=12;break;case 17:for(;T<14;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}if(l.nlen=257+(31&R),R>>>=5,T-=5,l.ndist=1+(31&R),R>>>=5,T-=5,l.ncode=4+(15&R),R>>>=4,T-=4,286<l.nlen||30<l.ndist){S.msg="too many length or distance symbols",l.mode=30;break}l.have=0,l.mode=18;case 18:for(;l.have<l.ncode;){for(;T<3;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}l.lens[j[l.have++]]=7&R,R>>>=3,T-=3}for(;l.have<19;)l.lens[j[l.have++]]=0;if(l.lencode=l.lendyn,l.lenbits=7,B={bits:l.lenbits},O=v(0,l.lens,0,19,l.lencode,0,l.work,B),l.lenbits=B.bits,O){S.msg="invalid code lengths set",l.mode=30;break}l.have=0,l.mode=19;case 19:for(;l.have<l.nlen+l.ndist;){for(;it=(p=l.lencode[R&(1<<l.lenbits)-1])>>>16&255,mt=65535&p,!((at=p>>>24)<=T);){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}if(mt<16)R>>>=at,T-=at,l.lens[l.have++]=mt;else{if(mt===16){for(g=at+2;T<g;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}if(R>>>=at,T-=at,l.have===0){S.msg="invalid bit length repeat",l.mode=30;break}s=l.lens[l.have-1],X=3+(3&R),R>>>=2,T-=2}else if(mt===17){for(g=at+3;T<g;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}T-=at,s=0,X=3+(7&(R>>>=at)),R>>>=3,T-=3}else{for(g=at+7;T<g;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}T-=at,s=0,X=11+(127&(R>>>=at)),R>>>=7,T-=7}if(l.have+X>l.nlen+l.ndist){S.msg="invalid bit length repeat",l.mode=30;break}for(;X--;)l.lens[l.have++]=s}}if(l.mode===30)break;if(l.lens[256]===0){S.msg="invalid code -- missing end-of-block",l.mode=30;break}if(l.lenbits=9,B={bits:l.lenbits},O=v(w,l.lens,0,l.nlen,l.lencode,0,l.work,B),l.lenbits=B.bits,O){S.msg="invalid literal/lengths set",l.mode=30;break}if(l.distbits=6,l.distcode=l.distdyn,B={bits:l.distbits},O=v(k,l.lens,l.nlen,l.ndist,l.distcode,0,l.work,B),l.distbits=B.bits,O){S.msg="invalid distances set",l.mode=30;break}if(l.mode=20,M===6)break t;case 20:l.mode=21;case 21:if(6<=W&&258<=tt){S.next_out=rt,S.avail_out=tt,S.next_in=$,S.avail_in=W,l.hold=R,l.bits=T,c(S,q),rt=S.next_out,et=S.output,tt=S.avail_out,$=S.next_in,L=S.input,W=S.avail_in,R=l.hold,T=l.bits,l.mode===12&&(l.back=-1);break}for(l.back=0;it=(p=l.lencode[R&(1<<l.lenbits)-1])>>>16&255,mt=65535&p,!((at=p>>>24)<=T);){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}if(it&&!(240&it)){for(ut=at,_t=it,vt=mt;it=(p=l.lencode[vt+((R&(1<<ut+_t)-1)>>ut)])>>>16&255,mt=65535&p,!(ut+(at=p>>>24)<=T);){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}R>>>=ut,T-=ut,l.back+=ut}if(R>>>=at,T-=at,l.back+=at,l.length=mt,it===0){l.mode=26;break}if(32&it){l.back=-1,l.mode=12;break}if(64&it){S.msg="invalid literal/length code",l.mode=30;break}l.extra=15&it,l.mode=22;case 22:if(l.extra){for(g=l.extra;T<g;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}l.length+=R&(1<<l.extra)-1,R>>>=l.extra,T-=l.extra,l.back+=l.extra}l.was=l.length,l.mode=23;case 23:for(;it=(p=l.distcode[R&(1<<l.distbits)-1])>>>16&255,mt=65535&p,!((at=p>>>24)<=T);){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}if(!(240&it)){for(ut=at,_t=it,vt=mt;it=(p=l.distcode[vt+((R&(1<<ut+_t)-1)>>ut)])>>>16&255,mt=65535&p,!(ut+(at=p>>>24)<=T);){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}R>>>=ut,T-=ut,l.back+=ut}if(R>>>=at,T-=at,l.back+=at,64&it){S.msg="invalid distance code",l.mode=30;break}l.offset=mt,l.extra=15&it,l.mode=24;case 24:if(l.extra){for(g=l.extra;T<g;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}l.offset+=R&(1<<l.extra)-1,R>>>=l.extra,T-=l.extra,l.back+=l.extra}if(l.offset>l.dmax){S.msg="invalid distance too far back",l.mode=30;break}l.mode=25;case 25:if(tt===0)break t;if(X=q-tt,l.offset>X){if((X=l.offset-X)>l.whave&&l.sane){S.msg="invalid distance too far back",l.mode=30;break}ht=X>l.wnext?(X-=l.wnext,l.wsize-X):l.wnext-X,X>l.length&&(X=l.length),gt=l.window}else gt=et,ht=rt-l.offset,X=l.length;for(tt<X&&(X=tt),tt-=X,l.length-=X;et[rt++]=gt[ht++],--X;);l.length===0&&(l.mode=21);break;case 26:if(tt===0)break t;et[rt++]=l.length,tt--,l.mode=21;break;case 27:if(l.wrap){for(;T<32;){if(W===0)break t;W--,R|=L[$++]<<T,T+=8}if(q-=tt,S.total_out+=q,l.total+=q,q&&(S.adler=l.check=l.flags?o(l.check,et,q,rt-q):i(l.check,et,q,rt-q)),q=tt,(l.flags?R:f(R))!==l.check){S.msg="incorrect data check",l.mode=30;break}T=R=0}l.mode=28;case 28:if(l.wrap&&l.flags){for(;T<32;){if(W===0)break t;W--,R+=L[$++]<<T,T+=8}if(R!==(4294967295&l.total)){S.msg="incorrect length check",l.mode=30;break}T=R=0}l.mode=29;case 29:O=1;break t;case 30:O=-3;break t;case 31:return-4;case 32:default:return u}return S.next_out=rt,S.avail_out=tt,S.next_in=$,S.avail_in=W,l.hold=R,l.bits=T,(l.wsize||q!==S.avail_out&&l.mode<30&&(l.mode<27||M!==4))&&Q(S,S.output,S.next_out,q-S.avail_out)?(l.mode=31,-4):(J-=S.avail_in,q-=S.avail_out,S.total_in+=J,S.total_out+=q,l.total+=q,l.wrap&&q&&(S.adler=l.check=l.flags?o(l.check,et,q,S.next_out-q):i(l.check,et,q,S.next_out-q)),S.data_type=l.bits+(l.last?64:0)+(l.mode===12?128:0)+(l.mode===20||l.mode===15?256:0),(J==0&&q===0||M===4)&&O===_&&(O=-5),O)},n.inflateEnd=function(S){if(!S||!S.state)return u;var M=S.state;return M.window&&(M.window=null),S.state=null,_},n.inflateGetHeader=function(S,M){var l;return S&&S.state&&2&(l=S.state).wrap?((l.head=M).done=!1,_):u},n.inflateSetDictionary=function(S,M){var l,L=M.length;return S&&S.state?(l=S.state).wrap!==0&&l.mode!==11?u:l.mode===11&&i(1,M,L,0)!==l.check?-3:Q(S,M,L,L)?(l.mode=31,-4):(l.havedict=1,_):u},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,r,n){var a=t("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],c=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],v=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];r.exports=function(w,k,_,u,y,h,m,f){var b,x,P,A,F,I,H,D,V,Q=f.bits,S=0,M=0,l=0,L=0,et=0,$=0,rt=0,W=0,tt=0,R=0,T=null,J=0,q=new a.Buf16(16),X=new a.Buf16(16),ht=null,gt=0;for(S=0;S<=15;S++)q[S]=0;for(M=0;M<u;M++)q[k[_+M]]++;for(et=Q,L=15;1<=L&&q[L]===0;L--);if(L<et&&(et=L),L===0)return y[h++]=20971520,y[h++]=20971520,f.bits=1,0;for(l=1;l<L&&q[l]===0;l++);for(et<l&&(et=l),S=W=1;S<=15;S++)if(W<<=1,(W-=q[S])<0)return-1;if(0<W&&(w===0||L!==1))return-1;for(X[1]=0,S=1;S<15;S++)X[S+1]=X[S]+q[S];for(M=0;M<u;M++)k[_+M]!==0&&(m[X[k[_+M]]++]=M);if(I=w===0?(T=ht=m,19):w===1?(T=i,J-=257,ht=o,gt-=257,256):(T=c,ht=v,-1),S=l,F=h,rt=M=R=0,P=-1,A=(tt=1<<($=et))-1,w===1&&852<tt||w===2&&592<tt)return 1;for(;;){for(H=S-rt,V=m[M]<I?(D=0,m[M]):m[M]>I?(D=ht[gt+m[M]],T[J+m[M]]):(D=96,0),b=1<<S-rt,l=x=1<<$;y[F+(R>>rt)+(x-=b)]=H<<24|D<<16|V|0,x!==0;);for(b=1<<S-1;R&b;)b>>=1;if(b!==0?(R&=b-1,R+=b):R=0,M++,--q[S]==0){if(S===L)break;S=k[_+m[M]]}if(et<S&&(R&A)!==P){for(rt===0&&(rt=et),F+=l,W=1<<($=S-rt);$+rt<L&&!((W-=q[$+rt])<=0);)$++,W<<=1;if(tt+=1<<$,w===1&&852<tt||w===2&&592<tt)return 1;y[P=R&A]=et<<24|$<<16|F-h|0}}return R!==0&&(y[F+R]=S-rt<<24|64<<16|0),f.bits=et,0}},{"../utils/common":41}],51:[function(t,r,n){r.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,r,n){var a=t("../utils/common"),i=0,o=1;function c(p){for(var C=p.length;0<=--C;)p[C]=0}var v=0,w=29,k=256,_=k+1+w,u=30,y=19,h=2*_+1,m=15,f=16,b=7,x=256,P=16,A=17,F=18,I=[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],H=[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],D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],V=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=new Array(2*(_+2));c(Q);var S=new Array(2*u);c(S);var M=new Array(512);c(M);var l=new Array(256);c(l);var L=new Array(w);c(L);var et,$,rt,W=new Array(u);function tt(p,C,j,U,N){this.static_tree=p,this.extra_bits=C,this.extra_base=j,this.elems=U,this.max_length=N,this.has_stree=p&&p.length}function R(p,C){this.dyn_tree=p,this.max_code=0,this.stat_desc=C}function T(p){return p<256?M[p]:M[256+(p>>>7)]}function J(p,C){p.pending_buf[p.pending++]=255&C,p.pending_buf[p.pending++]=C>>>8&255}function q(p,C,j){p.bi_valid>f-j?(p.bi_buf|=C<<p.bi_valid&65535,J(p,p.bi_buf),p.bi_buf=C>>f-p.bi_valid,p.bi_valid+=j-f):(p.bi_buf|=C<<p.bi_valid&65535,p.bi_valid+=j)}function X(p,C,j){q(p,j[2*C],j[2*C+1])}function ht(p,C){for(var j=0;j|=1&p,p>>>=1,j<<=1,0<--C;);return j>>>1}function gt(p,C,j){var U,N,Z=new Array(m+1),K=0;for(U=1;U<=m;U++)Z[U]=K=K+j[U-1]<<1;for(N=0;N<=C;N++){var G=p[2*N+1];G!==0&&(p[2*N]=ht(Z[G]++,G))}}function at(p){var C;for(C=0;C<_;C++)p.dyn_ltree[2*C]=0;for(C=0;C<u;C++)p.dyn_dtree[2*C]=0;for(C=0;C<y;C++)p.bl_tree[2*C]=0;p.dyn_ltree[2*x]=1,p.opt_len=p.static_len=0,p.last_lit=p.matches=0}function it(p){8<p.bi_valid?J(p,p.bi_buf):0<p.bi_valid&&(p.pending_buf[p.pending++]=p.bi_buf),p.bi_buf=0,p.bi_valid=0}function mt(p,C,j,U){var N=2*C,Z=2*j;return p[N]<p[Z]||p[N]===p[Z]&&U[C]<=U[j]}function ut(p,C,j){for(var U=p.heap[j],N=j<<1;N<=p.heap_len&&(N<p.heap_len&&mt(C,p.heap[N+1],p.heap[N],p.depth)&&N++,!mt(C,U,p.heap[N],p.depth));)p.heap[j]=p.heap[N],j=N,N<<=1;p.heap[j]=U}function _t(p,C,j){var U,N,Z,K,G=0;if(p.last_lit!==0)for(;U=p.pending_buf[p.d_buf+2*G]<<8|p.pending_buf[p.d_buf+2*G+1],N=p.pending_buf[p.l_buf+G],G++,U===0?X(p,N,C):(X(p,(Z=l[N])+k+1,C),(K=I[Z])!==0&&q(p,N-=L[Z],K),X(p,Z=T(--U),j),(K=H[Z])!==0&&q(p,U-=W[Z],K)),G<p.last_lit;);X(p,x,C)}function vt(p,C){var j,U,N,Z=C.dyn_tree,K=C.stat_desc.static_tree,G=C.stat_desc.has_stree,Y=C.stat_desc.elems,ot=-1;for(p.heap_len=0,p.heap_max=h,j=0;j<Y;j++)Z[2*j]!==0?(p.heap[++p.heap_len]=ot=j,p.depth[j]=0):Z[2*j+1]=0;for(;p.heap_len<2;)Z[2*(N=p.heap[++p.heap_len]=ot<2?++ot:0)]=1,p.depth[N]=0,p.opt_len--,G&&(p.static_len-=K[2*N+1]);for(C.max_code=ot,j=p.heap_len>>1;1<=j;j--)ut(p,Z,j);for(N=Y;j=p.heap[1],p.heap[1]=p.heap[p.heap_len--],ut(p,Z,1),U=p.heap[1],p.heap[--p.heap_max]=j,p.heap[--p.heap_max]=U,Z[2*N]=Z[2*j]+Z[2*U],p.depth[N]=(p.depth[j]>=p.depth[U]?p.depth[j]:p.depth[U])+1,Z[2*j+1]=Z[2*U+1]=N,p.heap[1]=N++,ut(p,Z,1),2<=p.heap_len;);p.heap[--p.heap_max]=p.heap[1],function(st,yt){var Ct,kt,Et,dt,Tt,Ot,wt=yt.dyn_tree,Wt=yt.max_code,ge=yt.stat_desc.static_tree,be=yt.stat_desc.has_stree,ye=yt.stat_desc.extra_bits,Zt=yt.stat_desc.extra_base,At=yt.stat_desc.max_length,zt=0;for(dt=0;dt<=m;dt++)st.bl_count[dt]=0;for(wt[2*st.heap[st.heap_max]+1]=0,Ct=st.heap_max+1;Ct<h;Ct++)At<(dt=wt[2*wt[2*(kt=st.heap[Ct])+1]+1]+1)&&(dt=At,zt++),wt[2*kt+1]=dt,Wt<kt||(st.bl_count[dt]++,Tt=0,Zt<=kt&&(Tt=ye[kt-Zt]),Ot=wt[2*kt],st.opt_len+=Ot*(dt+Tt),be&&(st.static_len+=Ot*(ge[2*kt+1]+Tt)));if(zt!==0){do{for(dt=At-1;st.bl_count[dt]===0;)dt--;st.bl_count[dt]--,st.bl_count[dt+1]+=2,st.bl_count[At]--,zt-=2}while(0<zt);for(dt=At;dt!==0;dt--)for(kt=st.bl_count[dt];kt!==0;)Wt<(Et=st.heap[--Ct])||(wt[2*Et+1]!==dt&&(st.opt_len+=(dt-wt[2*Et+1])*wt[2*Et],wt[2*Et+1]=dt),kt--)}}(p,C),gt(Z,ot,p.bl_count)}function s(p,C,j){var U,N,Z=-1,K=C[1],G=0,Y=7,ot=4;for(K===0&&(Y=138,ot=3),C[2*(j+1)+1]=65535,U=0;U<=j;U++)N=K,K=C[2*(U+1)+1],++G<Y&&N===K||(G<ot?p.bl_tree[2*N]+=G:N!==0?(N!==Z&&p.bl_tree[2*N]++,p.bl_tree[2*P]++):G<=10?p.bl_tree[2*A]++:p.bl_tree[2*F]++,Z=N,ot=(G=0)===K?(Y=138,3):N===K?(Y=6,3):(Y=7,4))}function O(p,C,j){var U,N,Z=-1,K=C[1],G=0,Y=7,ot=4;for(K===0&&(Y=138,ot=3),U=0;U<=j;U++)if(N=K,K=C[2*(U+1)+1],!(++G<Y&&N===K)){if(G<ot)for(;X(p,N,p.bl_tree),--G!=0;);else N!==0?(N!==Z&&(X(p,N,p.bl_tree),G--),X(p,P,p.bl_tree),q(p,G-3,2)):G<=10?(X(p,A,p.bl_tree),q(p,G-3,3)):(X(p,F,p.bl_tree),q(p,G-11,7));Z=N,ot=(G=0)===K?(Y=138,3):N===K?(Y=6,3):(Y=7,4)}}c(W);var B=!1;function g(p,C,j,U){q(p,(v<<1)+(U?1:0),3),function(N,Z,K,G){it(N),J(N,K),J(N,~K),a.arraySet(N.pending_buf,N.window,Z,K,N.pending),N.pending+=K}(p,C,j)}n._tr_init=function(p){B||(function(){var C,j,U,N,Z,K=new Array(m+1);for(N=U=0;N<w-1;N++)for(L[N]=U,C=0;C<1<<I[N];C++)l[U++]=N;for(l[U-1]=N,N=Z=0;N<16;N++)for(W[N]=Z,C=0;C<1<<H[N];C++)M[Z++]=N;for(Z>>=7;N<u;N++)for(W[N]=Z<<7,C=0;C<1<<H[N]-7;C++)M[256+Z++]=N;for(j=0;j<=m;j++)K[j]=0;for(C=0;C<=143;)Q[2*C+1]=8,C++,K[8]++;for(;C<=255;)Q[2*C+1]=9,C++,K[9]++;for(;C<=279;)Q[2*C+1]=7,C++,K[7]++;for(;C<=287;)Q[2*C+1]=8,C++,K[8]++;for(gt(Q,_+1,K),C=0;C<u;C++)S[2*C+1]=5,S[2*C]=ht(C,5);et=new tt(Q,I,k+1,_,m),$=new tt(S,H,0,u,m),rt=new tt(new Array(0),D,0,y,b)}(),B=!0),p.l_desc=new R(p.dyn_ltree,et),p.d_desc=new R(p.dyn_dtree,$),p.bl_desc=new R(p.bl_tree,rt),p.bi_buf=0,p.bi_valid=0,at(p)},n._tr_stored_block=g,n._tr_flush_block=function(p,C,j,U){var N,Z,K=0;0<p.level?(p.strm.data_type===2&&(p.strm.data_type=function(G){var Y,ot=4093624447;for(Y=0;Y<=31;Y++,ot>>>=1)if(1&ot&&G.dyn_ltree[2*Y]!==0)return i;if(G.dyn_ltree[18]!==0||G.dyn_ltree[20]!==0||G.dyn_ltree[26]!==0)return o;for(Y=32;Y<k;Y++)if(G.dyn_ltree[2*Y]!==0)return o;return i}(p)),vt(p,p.l_desc),vt(p,p.d_desc),K=function(G){var Y;for(s(G,G.dyn_ltree,G.l_desc.max_code),s(G,G.dyn_dtree,G.d_desc.max_code),vt(G,G.bl_desc),Y=y-1;3<=Y&&G.bl_tree[2*V[Y]+1]===0;Y--);return G.opt_len+=3*(Y+1)+5+5+4,Y}(p),N=p.opt_len+3+7>>>3,(Z=p.static_len+3+7>>>3)<=N&&(N=Z)):N=Z=j+5,j+4<=N&&C!==-1?g(p,C,j,U):p.strategy===4||Z===N?(q(p,2+(U?1:0),3),_t(p,Q,S)):(q(p,4+(U?1:0),3),function(G,Y,ot,st){var yt;for(q(G,Y-257,5),q(G,ot-1,5),q(G,st-4,4),yt=0;yt<st;yt++)q(G,G.bl_tree[2*V[yt]+1],3);O(G,G.dyn_ltree,Y-1),O(G,G.dyn_dtree,ot-1)}(p,p.l_desc.max_code+1,p.d_desc.max_code+1,K+1),_t(p,p.dyn_ltree,p.dyn_dtree)),at(p),U&&it(p)},n._tr_tally=function(p,C,j){return p.pending_buf[p.d_buf+2*p.last_lit]=C>>>8&255,p.pending_buf[p.d_buf+2*p.last_lit+1]=255&C,p.pending_buf[p.l_buf+p.last_lit]=255&j,p.last_lit++,C===0?p.dyn_ltree[2*j]++:(p.matches++,C--,p.dyn_ltree[2*(l[j]+k+1)]++,p.dyn_dtree[2*T(C)]++),p.last_lit===p.lit_bufsize-1},n._tr_align=function(p){q(p,2,3),X(p,x,Q),function(C){C.bi_valid===16?(J(C,C.bi_buf),C.bi_buf=0,C.bi_valid=0):8<=C.bi_valid&&(C.pending_buf[C.pending++]=255&C.bi_buf,C.bi_buf>>=8,C.bi_valid-=8)}(p)}},{"../utils/common":41}],53:[function(t,r,n){r.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(t,r,n){(function(a){(function(i,o){if(!i.setImmediate){var c,v,w,k,_=1,u={},y=!1,h=i.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(i);m=m&&m.setTimeout?m:i,c={}.toString.call(i.process)==="[object process]"?function(P){process.nextTick(function(){b(P)})}:function(){if(i.postMessage&&!i.importScripts){var P=!0,A=i.onmessage;return i.onmessage=function(){P=!1},i.postMessage("","*"),i.onmessage=A,P}}()?(k="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",x,!1):i.attachEvent("onmessage",x),function(P){i.postMessage(k+P,"*")}):i.MessageChannel?((w=new MessageChannel).port1.onmessage=function(P){b(P.data)},function(P){w.port2.postMessage(P)}):h&&"onreadystatechange"in h.createElement("script")?(v=h.documentElement,function(P){var A=h.createElement("script");A.onreadystatechange=function(){b(P),A.onreadystatechange=null,v.removeChild(A),A=null},v.appendChild(A)}):function(P){setTimeout(b,0,P)},m.setImmediate=function(P){typeof P!="function"&&(P=new Function(""+P));for(var A=new Array(arguments.length-1),F=0;F<A.length;F++)A[F]=arguments[F+1];var I={callback:P,args:A};return u[_]=I,c(_),_++},m.clearImmediate=f}function f(P){delete u[P]}function b(P){if(y)setTimeout(b,0,P);else{var A=u[P];if(A){y=!0;try{(function(F){var I=F.callback,H=F.args;switch(H.length){case 0:I();break;case 1:I(H[0]);break;case 2:I(H[0],H[1]);break;case 3:I(H[0],H[1],H[2]);break;default:I.apply(o,H)}})(A)}finally{f(P),y=!1}}}}function x(P){P.source===i&&typeof P.data=="string"&&P.data.indexOf(k)===0&&b(+P.data.slice(k.length))}})(typeof self>"u"?a===void 0?this:a:self)}).call(this,typeof Rt<"u"?Rt:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(ee);var _e=ee.exports;const ke=ve(_e);var ft;(function(d){d.OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",d.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",d.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",d.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",d.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",d.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",d.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",d.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",d.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",d.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",d.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",d.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",d.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",d.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",d.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",d.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",d.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties",d.Comments="http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",d.CommentsExtended="http://schemas.microsoft.com/office/2011/relationships/commentsExtended"})(ft||(ft={}));const re={wordml:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",drawingml:"http://schemas.openxmlformats.org/drawingml/2006/main",picture:"http://schemas.openxmlformats.org/drawingml/2006/picture",compatibility:"http://schemas.openxmlformats.org/markup-compatibility/2006",math:"http://schemas.openxmlformats.org/officeDocument/2006/math"},pt={Dxa:{mul:.05,unit:"pt"},Emu:{mul:1/12700,unit:"pt"},FontSize:{mul:.5,unit:"pt"},Border:{mul:.125,unit:"pt"},Point:{mul:1,unit:"pt"},Percent:{mul:.02,unit:"%"},LineHeight:{mul:1/240,unit:""},VmlEmu:{mul:1/12700,unit:""}};function ne(d,e=pt.Dxa){return d==null||/.+(p[xt]|[%])$/.test(d)?d:`${(parseInt(d)*e.mul).toFixed(2)}${e.unit}`}function ae(d,e,t){if(d.namespaceURI!=re.wordml)return!1;switch(d.localName){case"color":e.color=t.attr(d,"val");break;case"sz":e.fontSize=t.lengthAttr(d,"val",pt.FontSize);break;default:return!1}return!0}class se{elements(e,t=null){const r=[];for(let n=0,a=e.childNodes.length;n<a;n++){let i=e.childNodes.item(n);i.nodeType!=1||t!=null&&i.localName!=t||r.push(i)}return r}element(e,t){for(let r=0,n=e.childNodes.length;r<n;r++){let a=e.childNodes.item(r);if(a.nodeType==1&&a.localName==t)return a}return null}elementAttr(e,t,r){var n=this.element(e,t);return n?this.attr(n,r):void 0}attrs(e){return Array.from(e.attributes)}attr(e,t){for(let r=0,n=e.attributes.length;r<n;r++){let a=e.attributes.item(r);if(a.localName==t)return a.value}return null}intAttr(e,t,r=null){var n=this.attr(e,t);return n?parseInt(n):r}hexAttr(e,t,r=null){var n=this.attr(e,t);return n?parseInt(n,16):r}floatAttr(e,t,r=null){var n=this.attr(e,t);return n?parseFloat(n):r}boolAttr(e,t,r=null){return function(n,a=!1){switch(n){case"1":case"on":case"true":return!0;case"0":case"off":case"false":return!1;default:return a}}(this.attr(e,t),r)}lengthAttr(e,t,r=pt.Dxa){return ne(this.attr(e,t),r)}}const E=new se;class bt{constructor(e,t){this._package=e,this.path=t}async load(){this.rels=await this._package.loadRelationships(this.path);const e=await this._package.load(this.path),t=this._package.parseXmlDocument(e);this._package.options.keepOrigin&&(this._xmlDocument=t),this.parseXml(t.firstElementChild)}save(){var e;this._package.update(this.path,(e=this._xmlDocument,new XMLSerializer().serializeToString(e)))}parseXml(e){}}const we={embedRegular:"regular",embedBold:"bold",embedItalic:"italic",embedBoldItalic:"boldItalic"};function Se(d,e){return e.elements(d).map(t=>function(r,n){let a={name:n.attr(r,"name"),embedFontRefs:[]};for(let i of n.elements(r))switch(i.localName){case"family":a.family=n.attr(i,"val");break;case"altName":a.altName=n.attr(i,"val");break;case"embedRegular":case"embedBold":case"embedItalic":case"embedBoldItalic":a.embedFontRefs.push(xe(i,n))}return a}(t,e))}function xe(d,e){return{id:e.attr(d,"id"),key:e.attr(d,"fontKey"),type:we[d.localName]}}class Ce extends bt{parseXml(e){this.fonts=Se(e,this._package.xmlParser)}}function ie(d){return/^[^"'].*\s.*[^"']$/.test(d)?`'${d}'`:d}function It(d){let e=d.lastIndexOf("/")+1;return[e==0?"":d.substring(0,e),e==0?d:d.substring(e)]}function Ft(d,e){try{const t="http://docx/";return new URL(d,t+e).toString().substring(t.length)}catch{return`${e}${d}`}}function St(d,e){return d.reduce((t,r)=>(t[e(r)]=r,t),{})}function Lt(d){return d&&typeof d=="object"&&!Array.isArray(d)}function Mt(d,...e){if(!e.length)return d;const t=e.shift();if(Lt(d)&&Lt(t))for(const r in t)Lt(t[r])?Mt(d[r]??(d[r]={}),t[r]):d[r]=t[r];return Mt(d,...e)}function Pt(d){return Array.isArray(d)?d:[d]}class Ut{constructor(e,t){this._zip=e,this.options=t,this.xmlParser=new se}get(e){const t=function(r){return r.startsWith("/")?r.substr(1):r}(e);return this._zip.files[t]??this._zip.files[t.replace(/\//g,"\\")]}update(e,t){this._zip.file(e,t)}static async load(e,t){const r=await ke.loadAsync(e);return new Ut(r,t)}save(e="blob"){return this._zip.generateAsync({type:e})}load(e,t="string"){var r;return((r=this.get(e))==null?void 0:r.async(t))??Promise.resolve(null)}async loadRelationships(e=null){let t="_rels/.rels";if(e!=null){const[i,o]=It(e);t=`${i}_rels/${o}.rels`}const r=await this.load(t);return r?(n=this.parseXmlDocument(r).firstElementChild,(a=this.xmlParser).elements(n).map(i=>({id:a.attr(i,"Id"),type:a.attr(i,"Type"),target:a.attr(i,"Target"),targetMode:a.attr(i,"TargetMode")}))):null;var n,a}parseXmlDocument(e){return function(t,r=!1){var c;var n;r&&(t=t.replace(/<[?].*[?]>/,"")),t=(n=t).charCodeAt(0)===65279?n.substring(1):n;const a=new DOMParser().parseFromString(t,"application/xml"),i=(o=a,(c=o.getElementsByTagName("parsererror")[0])==null?void 0:c.textContent);var o;if(i)throw new Error(i);return a}(e,this.options.trimXmlDeclaration)}}class Ee extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.body=this._documentParser.parseDocumentFile(e)}}function Dt(d,e){return{type:e.attr(d,"val"),color:e.attr(d,"color"),size:e.lengthAttr(d,"sz",pt.Border),offset:e.lengthAttr(d,"space",pt.Point),frame:e.boolAttr(d,"frame"),shadow:e.boolAttr(d,"shadow")}}function Ae(d,e){var t={};for(let r of e.elements(d))switch(r.localName){case"left":t.left=Dt(r,e);break;case"top":t.top=Dt(r,e);break;case"right":t.right=Dt(r,e);break;case"bottom":t.bottom=Dt(r,e)}return t}var Vt,z;function oe(d,e=E){var t={};for(let r of e.elements(d))switch(r.localName){case"pgSz":t.pageSize={width:e.lengthAttr(r,"w"),height:e.lengthAttr(r,"h"),orientation:e.attr(r,"orient")};break;case"type":t.type=e.attr(r,"val");break;case"pgMar":t.pageMargins={left:e.lengthAttr(r,"left"),right:e.lengthAttr(r,"right"),top:e.lengthAttr(r,"top"),bottom:e.lengthAttr(r,"bottom"),header:e.lengthAttr(r,"header"),footer:e.lengthAttr(r,"footer"),gutter:e.lengthAttr(r,"gutter")};break;case"cols":t.columns=Pe(r,e);break;case"headerReference":(t.headerRefs??(t.headerRefs=[])).push(Gt(r,e));break;case"footerReference":(t.footerRefs??(t.footerRefs=[])).push(Gt(r,e));break;case"titlePg":t.titlePage=e.boolAttr(r,"val",!0);break;case"pgBorders":t.pageBorders=Ae(r,e);break;case"pgNumType":t.pageNumber=Ne(r,e)}return t}function Pe(d,e){return{numberOfColumns:e.intAttr(d,"num"),space:e.lengthAttr(d,"space"),separator:e.boolAttr(d,"sep"),equalWidth:e.boolAttr(d,"equalWidth",!0),columns:e.elements(d,"col").map(t=>({width:e.lengthAttr(t,"w"),space:e.lengthAttr(t,"space")}))}}function Ne(d,e){return{chapSep:e.attr(d,"chapSep"),chapStyle:e.attr(d,"chapStyle"),format:e.attr(d,"fmt"),start:e.intAttr(d,"start")}}function Gt(d,e){return{id:e.attr(d,"id"),type:e.attr(d,"type")}}function $t(d,e){let t={};for(let r of e.elements(d))Te(r,t,e);return t}function Te(d,e,t){return!!ae(d,e,t)}function le(d,e){let t={};for(let r of e.elements(d))ce(r,t,e);return t}function ce(d,e,t){if(d.namespaceURI!=re.wordml)return!1;if(ae(d,e,t))return!0;switch(d.localName){case"tabs":e.tabs=function(r,n){return n.elements(r,"tab").map(a=>({position:n.lengthAttr(a,"pos"),leader:n.attr(a,"leader"),style:n.attr(a,"val")}))}(d,t);break;case"sectPr":e.sectionProps=oe(d,t);break;case"numPr":e.numbering=function(r,n){var a={};for(let i of n.elements(r))switch(i.localName){case"numId":a.id=n.attr(i,"val");break;case"ilvl":a.level=n.intAttr(i,"val")}return a}(d,t);break;case"spacing":return e.lineSpacing=function(r,n){return{before:n.lengthAttr(r,"before"),after:n.lengthAttr(r,"after"),line:n.intAttr(r,"line"),lineRule:n.attr(r,"lineRule")}}(d,t),!1;case"textAlignment":return e.textAlignment=t.attr(d,"val"),!1;case"keepLines":e.keepLines=t.boolAttr(d,"val",!0);break;case"keepNext":e.keepNext=t.boolAttr(d,"val",!0);break;case"pageBreakBefore":e.pageBreakBefore=t.boolAttr(d,"val",!0);break;case"outlineLvl":e.outlineLevel=t.intAttr(d,"val");break;case"pStyle":e.styleName=t.attr(d,"val");break;case"rPr":e.runProps=$t(d,t);break;default:return!1}return!0}function ze(d,e){let t={id:e.attr(d,"numId"),overrides:[]};for(let r of e.elements(d))switch(r.localName){case"abstractNumId":t.abstractId=e.attr(r,"val");break;case"lvlOverride":t.overrides.push(Be(r,e))}return t}function Re(d,e){let t={id:e.attr(d,"abstractNumId"),levels:[]};for(let r of e.elements(d))switch(r.localName){case"name":t.name=e.attr(r,"val");break;case"multiLevelType":t.multiLevelType=e.attr(r,"val");break;case"numStyleLink":t.numberingStyleLink=e.attr(r,"val");break;case"styleLink":t.styleLink=e.attr(r,"val");break;case"lvl":t.levels.push(he(r,e))}return t}function he(d,e){let t={level:e.intAttr(d,"ilvl")};for(let r of e.elements(d))switch(r.localName){case"start":t.start=e.attr(r,"val");break;case"lvlRestart":t.restart=e.intAttr(r,"val");break;case"numFmt":t.format=e.attr(r,"val");break;case"lvlText":t.text=e.attr(r,"val");break;case"lvlJc":t.justification=e.attr(r,"val");break;case"lvlPicBulletId":t.bulletPictureId=e.attr(r,"val");break;case"pStyle":t.paragraphStyle=e.attr(r,"val");break;case"pPr":t.paragraphProps=le(r,e);break;case"rPr":t.runProps=$t(r,e)}return t}function Be(d,e){let t={level:e.intAttr(d,"ilvl")};for(let r of e.elements(d))switch(r.localName){case"startOverride":t.start=e.intAttr(r,"val");break;case"lvl":t.numberingLevel=he(r,e)}return t}function De(d,e){var t=e.element(d,"pict"),r=t&&e.element(t,"shape"),n=r&&e.element(r,"imagedata");return n?{id:e.attr(d,"numPicBulletId"),referenceId:e.attr(n,"id"),style:e.attr(r,"style")}:null}(function(d){d.Continuous="continuous",d.NextPage="nextPage",d.NextColumn="nextColumn",d.EvenPage="evenPage",d.OddPage="oddPage"})(Vt||(Vt={}));class Ie extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){Object.assign(this,function(t,r){let n={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let a of r.elements(t))switch(a.localName){case"num":n.numberings.push(ze(a,r));break;case"abstractNum":n.abstractNumberings.push(Re(a,r));break;case"numPicBullet":n.bulletPictures.push(De(a,r))}return n}(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)}}class Me extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.styles=this._documentParser.parseStylesFile(e)}}(function(d){d.Document="document",d.Paragraph="paragraph",d.Run="run",d.Break="break",d.NoBreakHyphen="noBreakHyphen",d.Table="table",d.Row="row",d.Cell="cell",d.Hyperlink="hyperlink",d.SmartTag="smartTag",d.Drawing="drawing",d.Image="image",d.Text="text",d.Tab="tab",d.Symbol="symbol",d.BookmarkStart="bookmarkStart",d.BookmarkEnd="bookmarkEnd",d.Footer="footer",d.Header="header",d.FootnoteReference="footnoteReference",d.EndnoteReference="endnoteReference",d.Footnote="footnote",d.Endnote="endnote",d.SimpleField="simpleField",d.ComplexField="complexField",d.Instruction="instruction",d.VmlPicture="vmlPicture",d.MmlMath="mmlMath",d.MmlMathParagraph="mmlMathParagraph",d.MmlFraction="mmlFraction",d.MmlFunction="mmlFunction",d.MmlFunctionName="mmlFunctionName",d.MmlNumerator="mmlNumerator",d.MmlDenominator="mmlDenominator",d.MmlRadical="mmlRadical",d.MmlBase="mmlBase",d.MmlDegree="mmlDegree",d.MmlSuperscript="mmlSuperscript",d.MmlSubscript="mmlSubscript",d.MmlPreSubSuper="mmlPreSubSuper",d.MmlSubArgument="mmlSubArgument",d.MmlSuperArgument="mmlSuperArgument",d.MmlNary="mmlNary",d.MmlDelimiter="mmlDelimiter",d.MmlRun="mmlRun",d.MmlEquationArray="mmlEquationArray",d.MmlLimit="mmlLimit",d.MmlLimitLower="mmlLimitLower",d.MmlMatrix="mmlMatrix",d.MmlMatrixRow="mmlMatrixRow",d.MmlBox="mmlBox",d.MmlBar="mmlBar",d.MmlGroupChar="mmlGroupChar",d.VmlElement="vmlElement",d.Inserted="inserted",d.Deleted="deleted",d.DeletedText="deletedText",d.Comment="comment",d.CommentReference="commentReference",d.CommentRangeStart="commentRangeStart",d.CommentRangeEnd="commentRangeEnd"})(z||(z={}));class xt{constructor(){this.children=[],this.cssStyle={}}}class Oe extends xt{constructor(){super(...arguments),this.type=z.Header}}class Fe extends xt{constructor(){super(...arguments),this.type=z.Footer}}class ue extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(e)}}class Le extends ue{createRootElement(){return new Oe}}class je extends ue{createRootElement(){return new Fe}}function Nt(d){if(d!==void 0)return parseInt(d)}class Ue extends bt{parseXml(e){this.props=function(t,r){const n={};for(let a of r.elements(t))switch(a.localName){case"Template":n.template=a.textContent;break;case"Pages":n.pages=Nt(a.textContent);break;case"Words":n.words=Nt(a.textContent);break;case"Characters":n.characters=Nt(a.textContent);break;case"Application":n.application=a.textContent;break;case"Lines":n.lines=Nt(a.textContent);break;case"Paragraphs":n.paragraphs=Nt(a.textContent);break;case"Company":n.company=a.textContent;break;case"AppVersion":n.appVersion=a.textContent}return n}(e,this._package.xmlParser)}}class $e extends bt{parseXml(e){this.props=function(t,r){const n={};for(let a of r.elements(t))switch(a.localName){case"title":n.title=a.textContent;break;case"description":n.description=a.textContent;break;case"subject":n.subject=a.textContent;break;case"creator":n.creator=a.textContent;break;case"keywords":n.keywords=a.textContent;break;case"language":n.language=a.textContent;break;case"lastModifiedBy":n.lastModifiedBy=a.textContent;break;case"revision":a.textContent&&(n.revision=parseInt(a.textContent))}return n}(e,this._package.xmlParser)}}class He{}function We(d,e){var t={name:e.attr(d,"name"),colors:{}};for(let a of e.elements(d)){var r=e.element(a,"srgbClr"),n=e.element(a,"sysClr");r?t.colors[a.localName]=e.attr(r,"val"):n&&(t.colors[a.localName]=e.attr(n,"lastClr"))}return t}function Ze(d,e){var t={name:e.attr(d,"name")};for(let r of e.elements(d))switch(r.localName){case"majorFont":t.majorFont=Xt(r,e);break;case"minorFont":t.minorFont=Xt(r,e)}return t}function Xt(d,e){return{latinTypeface:e.elementAttr(d,"latin","typeface"),eaTypeface:e.elementAttr(d,"ea","typeface"),csTypeface:e.elementAttr(d,"cs","typeface")}}class Ve extends bt{constructor(e,t){super(e,t)}parseXml(e){this.theme=function(t,r){var n=new He,a=r.element(t,"themeElements");for(let i of r.elements(a))switch(i.localName){case"clrScheme":n.colorScheme=We(i,r);break;case"fontScheme":n.fontScheme=Ze(i,r)}return n}(e,this._package.xmlParser)}}class de{}class Ge extends de{constructor(){super(...arguments),this.type=z.Footnote}}class Xe extends de{constructor(){super(...arguments),this.type=z.Endnote}}class fe extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}}class qe extends fe{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"footnote",Ge)}}class Ke extends fe{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"endnote",Xe)}}function qt(d,e){var t={defaultNoteIds:[]};for(let r of e.elements(d))switch(r.localName){case"numFmt":t.nummeringFormat=e.attr(r,"val");break;case"footnote":case"endnote":t.defaultNoteIds.push(e.attr(r,"id"))}return t}class Ye extends bt{constructor(e,t){super(e,t)}parseXml(e){this.settings=function(t,r){var n={};for(let a of r.elements(t))switch(a.localName){case"defaultTabStop":n.defaultTabStop=r.lengthAttr(a,"val");break;case"footnotePr":n.footnoteProps=qt(a,r);break;case"endnotePr":n.endnoteProps=qt(a,r);break;case"autoHyphenation":n.autoHyphenation=r.boolAttr(a,"val")}return n}(e,this._package.xmlParser)}}class Je extends bt{parseXml(e){this.props=function(t,r){return r.elements(t,"property").map(n=>{const a=n.firstChild;return{formatId:r.attr(n,"fmtid"),name:r.attr(n,"name"),type:a.nodeName,value:a.textContent}})}(e,this._package.xmlParser)}}class Qe extends bt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.comments=this._documentParser.parseComments(e),this.commentMap=St(this.comments,t=>t.id)}}class tr extends bt{constructor(e,t){super(e,t),this.comments=[]}parseXml(e){const t=this._package.xmlParser;for(let r of t.elements(e,"commentEx"))this.comments.push({paraId:t.attr(r,"paraId"),paraIdParent:t.attr(r,"paraIdParent"),done:t.boolAttr(r,"done")});this.commentMap=St(this.comments,r=>r.paraId)}}const er=[{type:ft.OfficeDocument,target:"word/document.xml"},{type:ft.ExtendedProperties,target:"docProps/app.xml"},{type:ft.CoreProperties,target:"docProps/core.xml"},{type:ft.CustomProperties,target:"docProps/custom.xml"}];class Ht{constructor(){this.parts=[],this.partsMap={}}static async load(e,t,r){var n=new Ht;return n._options=r,n._parser=t,n._package=await Ut.load(e,r),n.rels=await n._package.loadRelationships(),await Promise.all(er.map(a=>{const i=n.rels.find(o=>o.type===a.type)??a;return n.loadRelationshipPart(i.target,i.type)})),n}save(e="blob"){return this._package.save(e)}async loadRelationshipPart(e,t){var n;if(this.partsMap[e])return this.partsMap[e];if(!this._package.get(e))return null;let r=null;switch(t){case ft.OfficeDocument:this.documentPart=r=new Ee(this._package,e,this._parser);break;case ft.FontTable:this.fontTablePart=r=new Ce(this._package,e);break;case ft.Numbering:this.numberingPart=r=new Ie(this._package,e,this._parser);break;case ft.Styles:this.stylesPart=r=new Me(this._package,e,this._parser);break;case ft.Theme:this.themePart=r=new Ve(this._package,e);break;case ft.Footnotes:this.footnotesPart=r=new qe(this._package,e,this._parser);break;case ft.Endnotes:this.endnotesPart=r=new Ke(this._package,e,this._parser);break;case ft.Footer:r=new je(this._package,e,this._parser);break;case ft.Header:r=new Le(this._package,e,this._parser);break;case ft.CoreProperties:this.corePropsPart=r=new $e(this._package,e);break;case ft.ExtendedProperties:this.extendedPropsPart=r=new Ue(this._package,e);break;case ft.CustomProperties:r=new Je(this._package,e);break;case ft.Settings:this.settingsPart=r=new Ye(this._package,e);break;case ft.Comments:this.commentsPart=r=new Qe(this._package,e,this._parser);break;case ft.CommentsExtended:this.commentsExtendedPart=r=new tr(this._package,e)}if(r==null)return Promise.resolve(null);if(this.partsMap[e]=r,this.parts.push(r),await r.load(),((n=r.rels)==null?void 0:n.length)>0){const[a]=It(r.path);await Promise.all(r.rels.map(i=>this.loadRelationshipPart(Ft(i.target,a),i.type)))}return r}async loadDocumentImage(e,t){const r=await this.loadResource(t??this.documentPart,e,"blob");return this.blobToURL(r)}async loadNumberingImage(e){const t=await this.loadResource(this.numberingPart,e,"blob");return this.blobToURL(t)}async loadFont(e,t){const r=await this.loadResource(this.fontTablePart,e,"uint8array");return r&&this.blobToURL(new Blob([rr(r,t)]))}blobToURL(e){return e?this._options.useBase64URL?function(t){return new Promise((r,n)=>{const a=new FileReader;a.onloadend=()=>r(a.result),a.onerror=()=>n(),a.readAsDataURL(t)})}(e):URL.createObjectURL(e):null}findPartByRelId(e,t=null){var r=(t.rels??this.rels).find(a=>a.id==e);const n=t?It(t.path)[0]:"";return r?this.partsMap[Ft(r.target,n)]:null}getPathById(e,t){const r=e.rels.find(a=>a.id==t),[n]=It(e.path);return r?Ft(r.target,n):null}loadResource(e,t,r){const n=this.getPathById(e,t);return n?this._package.load(n,r):Promise.resolve(null)}}function rr(d,e){const t=e.replace(/{|}|-/g,""),r=new Array(16);for(let n=0;n<16;n++)r[16-n-1]=parseInt(t.substr(2*n,2),16);for(let n=0;n<32;n++)d[n]=d[n]^r[n%16];return d}function nr(d,e){return{type:z.BookmarkEnd,id:e.attr(d,"id")}}class ar extends xt{constructor(){super(...arguments),this.type=z.VmlElement,this.attrs={}}}function pe(d,e){var t=new ar;switch(d.localName){case"rect":t.tagName="rect",Object.assign(t.attrs,{width:"100%",height:"100%"});break;case"oval":t.tagName="ellipse",Object.assign(t.attrs,{cx:"50%",cy:"50%",rx:"50%",ry:"50%"});break;case"line":t.tagName="line";break;case"shape":t.tagName="g";break;case"textbox":t.tagName="foreignObject",Object.assign(t.attrs,{width:"100%",height:"100%"});break;default:return null}for(const r of E.attrs(d))switch(r.localName){case"style":t.cssStyleText=r.value;break;case"fillcolor":t.attrs.fill=r.value;break;case"from":const[n,a]=Kt(r.value);Object.assign(t.attrs,{x1:n,y1:a});break;case"to":const[i,o]=Kt(r.value);Object.assign(t.attrs,{x2:i,y2:o})}for(const r of E.elements(d))switch(r.localName){case"stroke":Object.assign(t.attrs,sr(r));break;case"fill":Object.assign(t.attrs,{});break;case"imagedata":t.tagName="image",Object.assign(t.attrs,{width:"100%",height:"100%"}),t.imageHref={id:E.attr(r,"id"),title:E.attr(r,"title")};break;case"txbxContent":t.children.push(...e.parseBodyElements(r));break;default:const n=pe(r,e);n&&t.children.push(n)}return t}function sr(d){return{stroke:E.attr(d,"color"),"stroke-width":E.lengthAttr(d,"weight",pt.Emu)??"1px"}}function Kt(d){return d.split(",")}class ir extends xt{constructor(){super(...arguments),this.type=z.Comment}}class or extends xt{constructor(e){super(),this.id=e,this.type=z.CommentReference}}class lr extends xt{constructor(e){super(),this.id=e,this.type=z.CommentRangeStart}}class cr extends xt{constructor(e){super(),this.id=e,this.type=z.CommentRangeEnd}}var hr="inherit",ur="black",dr="black",fr="transparent";const pr=[],Yt={oMath:z.MmlMath,oMathPara:z.MmlMathParagraph,f:z.MmlFraction,func:z.MmlFunction,fName:z.MmlFunctionName,num:z.MmlNumerator,den:z.MmlDenominator,rad:z.MmlRadical,deg:z.MmlDegree,e:z.MmlBase,sSup:z.MmlSuperscript,sSub:z.MmlSubscript,sPre:z.MmlPreSubSuper,sup:z.MmlSuperArgument,sub:z.MmlSubArgument,d:z.MmlDelimiter,nary:z.MmlNary,eqArr:z.MmlEquationArray,lim:z.MmlLimit,limLow:z.MmlLimitLower,m:z.MmlMatrix,mr:z.MmlMatrixRow,box:z.MmlBox,bar:z.MmlBar,groupChr:z.MmlGroupChar};class mr{constructor(e){this.options={ignoreWidth:!1,debug:!1,...e}}parseNotes(e,t,r){var n=[];for(let a of E.elements(e,t)){const i=new r;i.id=E.attr(a,"id"),i.noteType=E.attr(a,"type"),i.children=this.parseBodyElements(a),n.push(i)}return n}parseComments(e){var t=[];for(let r of E.elements(e,"comment")){const n=new ir;n.id=E.attr(r,"id"),n.author=E.attr(r,"author"),n.initials=E.attr(r,"initials"),n.date=E.attr(r,"date"),n.children=this.parseBodyElements(r),t.push(n)}return t}parseDocumentFile(e){var t=E.element(e,"body"),r=E.element(e,"background"),n=E.element(t,"sectPr");return{type:z.Document,children:this.parseBodyElements(t),props:n?oe(n,E):{},cssStyle:r?this.parseBackground(r):{}}}parseBackground(e){var t={},r=ct.colorAttr(e,"color");return r&&(t["background-color"]=r),t}parseBodyElements(e){var t=[];for(let r of E.elements(e))switch(r.localName){case"p":t.push(this.parseParagraph(r));break;case"tbl":t.push(this.parseTable(r));break;case"sdt":t.push(...this.parseSdt(r,n=>this.parseBodyElements(n)))}return t}parseStylesFile(e){var t=[];return ct.foreach(e,r=>{switch(r.localName){case"style":t.push(this.parseStyle(r));break;case"docDefaults":t.push(this.parseDefaultStyles(r))}}),t}parseDefaultStyles(e){var t={id:null,name:null,target:null,basedOn:null,styles:[]};return ct.foreach(e,r=>{switch(r.localName){case"rPrDefault":var n=E.element(r,"rPr");n&&t.styles.push({target:"span",values:this.parseDefaultProperties(n,{})});break;case"pPrDefault":var a=E.element(r,"pPr");a&&t.styles.push({target:"p",values:this.parseDefaultProperties(a,{})})}}),t}parseStyle(e){var t={id:E.attr(e,"styleId"),isDefault:E.boolAttr(e,"default"),name:null,target:null,basedOn:null,styles:[],linked:null};switch(E.attr(e,"type")){case"paragraph":t.target="p";break;case"table":t.target="table";break;case"character":t.target="span"}return ct.foreach(e,r=>{switch(r.localName){case"basedOn":t.basedOn=E.attr(r,"val");break;case"name":t.name=E.attr(r,"val");break;case"link":t.linked=E.attr(r,"val");break;case"next":t.next=E.attr(r,"val");break;case"aliases":t.aliases=E.attr(r,"val").split(",");break;case"pPr":t.styles.push({target:"p",values:this.parseDefaultProperties(r,{})}),t.paragraphProps=le(r,E);break;case"rPr":t.styles.push({target:"span",values:this.parseDefaultProperties(r,{})}),t.runProps=$t(r,E);break;case"tblPr":case"tcPr":t.styles.push({target:"td",values:this.parseDefaultProperties(r,{})});break;case"tblStylePr":for(let n of this.parseTableStyle(r))t.styles.push(n);break;case"rsid":case"qFormat":case"hidden":case"semiHidden":case"unhideWhenUsed":case"autoRedefine":case"uiPriority":break;default:this.options.debug&&console.warn(`DOCX: Unknown style element: ${r.localName}`)}}),t}parseTableStyle(e){var t=[],r=E.attr(e,"type"),n="",a="";switch(r){case"firstRow":a=".first-row",n="tr.first-row td";break;case"lastRow":a=".last-row",n="tr.last-row td";break;case"firstCol":a=".first-col",n="td.first-col";break;case"lastCol":a=".last-col",n="td.last-col";break;case"band1Vert":a=":not(.no-vband)",n="td.odd-col";break;case"band2Vert":a=":not(.no-vband)",n="td.even-col";break;case"band1Horz":a=":not(.no-hband)",n="tr.odd-row";break;case"band2Horz":a=":not(.no-hband)",n="tr.even-row";break;default:return[]}return ct.foreach(e,i=>{switch(i.localName){case"pPr":t.push({target:`${n} p`,mod:a,values:this.parseDefaultProperties(i,{})});break;case"rPr":t.push({target:`${n} span`,mod:a,values:this.parseDefaultProperties(i,{})});break;case"tblPr":case"tcPr":t.push({target:n,mod:a,values:this.parseDefaultProperties(i,{})})}}),t}parseNumberingFile(e){var t=[],r={},n=[];return ct.foreach(e,a=>{switch(a.localName){case"abstractNum":this.parseAbstractNumbering(a,n).forEach(c=>t.push(c));break;case"numPicBullet":n.push(this.parseNumberingPicBullet(a));break;case"num":var i=E.attr(a,"numId"),o=E.elementAttr(a,"abstractNumId","val");r[o]=i}}),t.forEach(a=>a.id=r[a.id]),t}parseNumberingPicBullet(e){var t=E.element(e,"pict"),r=t&&E.element(t,"shape"),n=r&&E.element(r,"imagedata");return n?{id:E.intAttr(e,"numPicBulletId"),src:E.attr(n,"id"),style:E.attr(r,"style")}:null}parseAbstractNumbering(e,t){var r=[],n=E.attr(e,"abstractNumId");return ct.foreach(e,a=>{a.localName==="lvl"&&r.push(this.parseNumberingLevel(n,a,t))}),r}parseNumberingLevel(e,t,r){var n={id:e,level:E.intAttr(t,"ilvl"),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};return ct.foreach(t,a=>{switch(a.localName){case"start":n.start=E.intAttr(a,"val");break;case"pPr":this.parseDefaultProperties(a,n.pStyle);break;case"rPr":this.parseDefaultProperties(a,n.rStyle);break;case"lvlPicBulletId":var i=E.intAttr(a,"val");n.bullet=r.find(o=>(o==null?void 0:o.id)==i);break;case"lvlText":n.levelText=E.attr(a,"val");break;case"pStyle":n.pStyleName=E.attr(a,"val");break;case"numFmt":n.format=E.attr(a,"val");break;case"suff":n.suff=E.attr(a,"val")}}),n}parseSdt(e,t){const r=E.element(e,"sdtContent");return r?t(r):[]}parseInserted(e,t){var r;return{type:z.Inserted,children:((r=t(e))==null?void 0:r.children)??[]}}parseDeleted(e,t){var r;return{type:z.Deleted,children:((r=t(e))==null?void 0:r.children)??[]}}parseParagraph(e){var t,r,n={type:z.Paragraph,children:[]};for(let a of E.elements(e))switch(a.localName){case"pPr":this.parseParagraphProperties(a,n);break;case"r":n.children.push(this.parseRun(a,n));break;case"hyperlink":n.children.push(this.parseHyperlink(a,n));break;case"smartTag":n.children.push(this.parseSmartTag(a,n));break;case"bookmarkStart":n.children.push((t=a,r=E,{type:z.BookmarkStart,id:r.attr(t,"id"),name:r.attr(t,"name"),colFirst:r.intAttr(t,"colFirst"),colLast:r.intAttr(t,"colLast")}));break;case"bookmarkEnd":n.children.push(nr(a,E));break;case"commentRangeStart":n.children.push(new lr(E.attr(a,"id")));break;case"commentRangeEnd":n.children.push(new cr(E.attr(a,"id")));break;case"oMath":case"oMathPara":n.children.push(this.parseMathElement(a));break;case"sdt":n.children.push(...this.parseSdt(a,i=>this.parseParagraph(i).children));break;case"ins":n.children.push(this.parseInserted(a,i=>this.parseParagraph(i)));break;case"del":n.children.push(this.parseDeleted(a,i=>this.parseParagraph(i)))}return n}parseParagraphProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,r=>{if(ce(r,t,E))return!0;switch(r.localName){case"pStyle":t.styleName=E.attr(r,"val");break;case"cnfStyle":t.className=lt.classNameOfCnfStyle(r);break;case"framePr":this.parseFrame(r,t);break;case"rPr":break;default:return!1}return!0})}parseFrame(e,t){E.attr(e,"dropCap")=="drop"&&(t.cssStyle.float="left")}parseHyperlink(e,t){var r={type:z.Hyperlink,parent:t,children:[]},n=E.attr(e,"anchor"),a=E.attr(e,"id");return n&&(r.href="#"+n),a&&(r.id=a),ct.foreach(e,i=>{i.localName==="r"&&r.children.push(this.parseRun(i,r))}),r}parseSmartTag(e,t){var r={type:z.SmartTag,parent:t,children:[]},n=E.attr(e,"uri"),a=E.attr(e,"element");return n&&(r.uri=n),a&&(r.element=a),ct.foreach(e,i=>{i.localName==="r"&&r.children.push(this.parseRun(i,r))}),r}parseRun(e,t){var r={type:z.Run,parent:t,children:[]};return ct.foreach(e,n=>{switch((n=this.checkAlternateContent(n)).localName){case"t":r.children.push({type:z.Text,text:n.textContent});break;case"delText":r.children.push({type:z.DeletedText,text:n.textContent});break;case"commentReference":r.children.push(new or(E.attr(n,"id")));break;case"fldSimple":r.children.push({type:z.SimpleField,instruction:E.attr(n,"instr"),lock:E.boolAttr(n,"lock",!1),dirty:E.boolAttr(n,"dirty",!1)});break;case"instrText":r.fieldRun=!0,r.children.push({type:z.Instruction,text:n.textContent});break;case"fldChar":r.fieldRun=!0,r.children.push({type:z.ComplexField,charType:E.attr(n,"fldCharType"),lock:E.boolAttr(n,"lock",!1),dirty:E.boolAttr(n,"dirty",!1)});break;case"noBreakHyphen":r.children.push({type:z.NoBreakHyphen});break;case"br":r.children.push({type:z.Break,break:E.attr(n,"type")||"textWrapping"});break;case"lastRenderedPageBreak":r.children.push({type:z.Break,break:"lastRenderedPageBreak"});break;case"sym":r.children.push({type:z.Symbol,font:E.attr(n,"font"),char:E.attr(n,"char")});break;case"tab":r.children.push({type:z.Tab});break;case"footnoteReference":r.children.push({type:z.FootnoteReference,id:E.attr(n,"id")});break;case"endnoteReference":r.children.push({type:z.EndnoteReference,id:E.attr(n,"id")});break;case"drawing":let a=this.parseDrawing(n);a&&(r.children=[a]);break;case"pict":r.children.push(this.parseVmlPicture(n));break;case"rPr":this.parseRunProperties(n,r)}}),r}parseMathElement(e){const t=`${e.localName}Pr`,r={type:Yt[e.localName],children:[]};for(const a of E.elements(e))if(Yt[a.localName])r.children.push(this.parseMathElement(a));else if(a.localName=="r"){var n=this.parseRun(a);n.type=z.MmlRun,r.children.push(n)}else a.localName==t&&(r.props=this.parseMathProperies(a));return r}parseMathProperies(e){const t={};for(const r of E.elements(e))switch(r.localName){case"chr":t.char=E.attr(r,"val");break;case"vertJc":t.verticalJustification=E.attr(r,"val");break;case"pos":t.position=E.attr(r,"val");break;case"degHide":t.hideDegree=E.boolAttr(r,"val");break;case"begChr":t.beginChar=E.attr(r,"val");break;case"endChr":t.endChar=E.attr(r,"val")}return t}parseRunProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,r=>{switch(r.localName){case"rStyle":t.styleName=E.attr(r,"val");break;case"vertAlign":t.verticalAlign=lt.valueOfVertAlign(r,!0);break;default:return!1}return!0})}parseVmlPicture(e){const t={type:z.VmlPicture,children:[]};for(const r of E.elements(e)){const n=pe(r,this);n&&t.children.push(n)}return t}checkAlternateContent(e){var a;if(e.localName!="AlternateContent")return e;var t=E.element(e,"Choice");if(t){var r=E.attr(t,"Requires"),n=e.lookupNamespaceURI(r);if(pr.includes(n))return t.firstElementChild}return(a=E.element(e,"Fallback"))==null?void 0:a.firstElementChild}parseDrawing(e){for(var t of E.elements(e))switch(t.localName){case"inline":case"anchor":return this.parseDrawingWrapper(t)}}parseDrawingWrapper(e){var t={type:z.Drawing,children:[],cssStyle:{}},r=e.localName=="anchor";let n=null,a=E.boolAttr(e,"simplePos");E.boolAttr(e,"behindDoc");let i={relative:"page",align:"left",offset:"0"},o={relative:"page",align:"top",offset:"0"};for(var c of E.elements(e))switch(c.localName){case"simplePos":a&&(i.offset=E.lengthAttr(c,"x",pt.Emu),o.offset=E.lengthAttr(c,"y",pt.Emu));break;case"extent":t.cssStyle.width=E.lengthAttr(c,"cx",pt.Emu),t.cssStyle.height=E.lengthAttr(c,"cy",pt.Emu);break;case"positionH":case"positionV":if(!a){let _=c.localName=="positionH"?i:o;var v=E.element(c,"align"),w=E.element(c,"posOffset");_.relative=E.attr(c,"relativeFrom")??_.relative,v&&(_.align=v.textContent),w&&(_.offset=ct.sizeValue(w,pt.Emu))}break;case"wrapTopAndBottom":n="wrapTopAndBottom";break;case"wrapNone":n="wrapNone";break;case"graphic":var k=this.parseGraphic(c);k&&t.children.push(k)}return n=="wrapTopAndBottom"?(t.cssStyle.display="block",i.align&&(t.cssStyle["text-align"]=i.align,t.cssStyle.width="100%")):n=="wrapNone"?(t.cssStyle.display="block",t.cssStyle.position="relative",t.cssStyle.width="0px",t.cssStyle.height="0px",i.offset&&(t.cssStyle.left=i.offset),o.offset&&(t.cssStyle.top=o.offset)):!r||i.align!="left"&&i.align!="right"||(t.cssStyle.float=i.align),t}parseGraphic(e){var t=E.element(e,"graphicData");for(let r of E.elements(t))if(r.localName==="pic")return this.parsePicture(r);return null}parsePicture(e){var t={type:z.Image,src:"",cssStyle:{}},r=E.element(e,"blipFill"),n=E.element(r,"blip");t.src=E.attr(n,"embed");var a=E.element(e,"spPr"),i=E.element(a,"xfrm");for(var o of(t.cssStyle.position="relative",E.elements(i)))switch(o.localName){case"ext":t.cssStyle.width=E.lengthAttr(o,"cx",pt.Emu),t.cssStyle.height=E.lengthAttr(o,"cy",pt.Emu);break;case"off":t.cssStyle.left=E.lengthAttr(o,"x",pt.Emu),t.cssStyle.top=E.lengthAttr(o,"y",pt.Emu)}return t}parseTable(e){var t={type:z.Table,children:[]};return ct.foreach(e,r=>{switch(r.localName){case"tr":t.children.push(this.parseTableRow(r));break;case"tblGrid":t.columns=this.parseTableColumns(r);break;case"tblPr":this.parseTableProperties(r,t)}}),t}parseTableColumns(e){var t=[];return ct.foreach(e,r=>{r.localName==="gridCol"&&t.push({width:E.lengthAttr(r,"w")})}),t}parseTableProperties(e,t){switch(t.cssStyle={},t.cellStyle={},this.parseDefaultProperties(e,t.cssStyle,t.cellStyle,r=>{switch(r.localName){case"tblStyle":t.styleName=E.attr(r,"val");break;case"tblLook":t.className=lt.classNameOftblLook(r);break;case"tblpPr":this.parseTablePosition(r,t);break;case"tblStyleColBandSize":t.colBandSize=E.intAttr(r,"val");break;case"tblStyleRowBandSize":t.rowBandSize=E.intAttr(r,"val");break;default:return!1}return!0}),t.cssStyle["text-align"]){case"center":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto",t.cssStyle["margin-right"]="auto";break;case"right":delete t.cssStyle["text-align"],t.cssStyle["margin-left"]="auto"}}parseTablePosition(e,t){var r=E.lengthAttr(e,"topFromText"),n=E.lengthAttr(e,"bottomFromText"),a=E.lengthAttr(e,"rightFromText"),i=E.lengthAttr(e,"leftFromText");t.cssStyle.float="left",t.cssStyle["margin-bottom"]=lt.addSize(t.cssStyle["margin-bottom"],n),t.cssStyle["margin-left"]=lt.addSize(t.cssStyle["margin-left"],i),t.cssStyle["margin-right"]=lt.addSize(t.cssStyle["margin-right"],a),t.cssStyle["margin-top"]=lt.addSize(t.cssStyle["margin-top"],r)}parseTableRow(e){var t={type:z.Row,children:[]};return ct.foreach(e,r=>{switch(r.localName){case"tc":t.children.push(this.parseTableCell(r));break;case"trPr":this.parseTableRowProperties(r,t)}}),t}parseTableRowProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,r=>{switch(r.localName){case"cnfStyle":t.className=lt.classNameOfCnfStyle(r);break;case"tblHeader":t.isHeader=E.boolAttr(r,"val");break;default:return!1}return!0})}parseTableCell(e){var t={type:z.Cell,children:[]};return ct.foreach(e,r=>{switch(r.localName){case"tbl":t.children.push(this.parseTable(r));break;case"p":t.children.push(this.parseParagraph(r));break;case"tcPr":this.parseTableCellProperties(r,t)}}),t}parseTableCellProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,r=>{switch(r.localName){case"gridSpan":t.span=E.intAttr(r,"val",null);break;case"vMerge":t.verticalMerge=E.attr(r,"val")??"continue";break;case"cnfStyle":t.className=lt.classNameOfCnfStyle(r);break;default:return!1}return!0}),this.parseTableCellVerticalText(e,t)}parseTableCellVerticalText(e,t){const r={btLr:{writingMode:"vertical-rl",transform:"rotate(180deg)"},lrTb:{writingMode:"vertical-lr",transform:"none"},tbRl:{writingMode:"vertical-rl",transform:"none"}};ct.foreach(e,n=>{if(n.localName==="textDirection"){const a=E.attr(n,"val"),i=r[a]||{writingMode:"horizontal-tb"};t.cssStyle["writing-mode"]=i.writingMode,t.cssStyle.transform=i.transform}})}parseDefaultProperties(e,t=null,r=null,n=null){return t=t||{},ct.foreach(e,a=>{if(!(n!=null&&n(a)))switch(a.localName){case"jc":t["text-align"]=lt.valueOfJc(a);break;case"textAlignment":t["vertical-align"]=lt.valueOfTextAlignment(a);break;case"color":t.color=ct.colorAttr(a,"val",null,ur);break;case"sz":t["font-size"]=t["min-height"]=E.lengthAttr(a,"val",pt.FontSize);break;case"shd":t["background-color"]=ct.colorAttr(a,"fill",null,hr);break;case"highlight":t["background-color"]=ct.colorAttr(a,"val",null,fr);break;case"vertAlign":break;case"position":t.verticalAlign=E.lengthAttr(a,"val",pt.FontSize);break;case"tcW":if(this.options.ignoreWidth)break;case"tblW":t.width=lt.valueOfSize(a,"w");break;case"trHeight":this.parseTrHeight(a,t);break;case"strike":t["text-decoration"]=E.boolAttr(a,"val",!0)?"line-through":"none";break;case"b":t["font-weight"]=E.boolAttr(a,"val",!0)?"bold":"normal";break;case"i":t["font-style"]=E.boolAttr(a,"val",!0)?"italic":"normal";break;case"caps":t["text-transform"]=E.boolAttr(a,"val",!0)?"uppercase":"none";break;case"smallCaps":t["font-variant"]=E.boolAttr(a,"val",!0)?"small-caps":"none";break;case"u":this.parseUnderline(a,t);break;case"ind":case"tblInd":this.parseIndentation(a,t);break;case"rFonts":this.parseFont(a,t);break;case"tblBorders":this.parseBorderProperties(a,r||t);break;case"tblCellSpacing":t["border-spacing"]=lt.valueOfMargin(a),t["border-collapse"]="separate";break;case"pBdr":this.parseBorderProperties(a,t);break;case"bdr":t.border=lt.valueOfBorder(a);break;case"tcBorders":this.parseBorderProperties(a,t);break;case"vanish":E.boolAttr(a,"val",!0)&&(t.display="none");break;case"kern":case"noWrap":break;case"tblCellMar":case"tcMar":this.parseMarginProperties(a,r||t);break;case"tblLayout":t["table-layout"]=lt.valueOfTblLayout(a);break;case"vAlign":t["vertical-align"]=lt.valueOfTextAlignment(a);break;case"spacing":e.localName=="pPr"&&this.parseSpacing(a,t);break;case"wordWrap":E.boolAttr(a,"val")&&(t["overflow-wrap"]="break-word");break;case"suppressAutoHyphens":t.hyphens=E.boolAttr(a,"val",!0)?"none":"auto";break;case"lang":t.$lang=E.attr(a,"val");break;case"bCs":case"iCs":case"szCs":case"tabs":case"outlineLvl":case"contextualSpacing":case"tblStyleColBandSize":case"tblStyleRowBandSize":case"webHidden":case"pageBreakBefore":case"suppressLineNumbers":case"keepLines":case"keepNext":case"widowControl":case"bidi":case"rtl":case"noProof":break;default:this.options.debug&&console.warn(`DOCX: Unknown document element: ${e.localName}.${a.localName}`)}}),t}parseUnderline(e,t){var r=E.attr(e,"val");if(r!=null){switch(r){case"dash":case"dashDotDotHeavy":case"dashDotHeavy":case"dashedHeavy":case"dashLong":case"dashLongHeavy":case"dotDash":case"dotDotDash":t["text-decoration"]="underline dashed";break;case"dotted":case"dottedHeavy":t["text-decoration"]="underline dotted";break;case"double":t["text-decoration"]="underline double";break;case"single":case"thick":case"words":t["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":t["text-decoration"]="underline wavy";break;case"none":t["text-decoration"]="none"}var n=ct.colorAttr(e,"color");n&&(t["text-decoration-color"]=n)}}parseFont(e,t){var r=[E.attr(e,"ascii"),lt.themeValue(e,"asciiTheme"),E.attr(e,"eastAsia")].filter(n=>n).map(n=>ie(n));r.length>0&&(t["font-family"]=[...new Set(r)].join(", "))}parseIndentation(e,t){var r=E.lengthAttr(e,"firstLine"),n=E.lengthAttr(e,"hanging"),a=E.lengthAttr(e,"left"),i=E.lengthAttr(e,"start"),o=E.lengthAttr(e,"right"),c=E.lengthAttr(e,"end");r&&(t["text-indent"]=r),n&&(t["text-indent"]=`-${n}`),(a||i)&&(t["margin-left"]=a||i),(o||c)&&(t["margin-right"]=o||c)}parseSpacing(e,t){var r=E.lengthAttr(e,"before"),n=E.lengthAttr(e,"after"),a=E.intAttr(e,"line",null),i=E.attr(e,"lineRule");if(r&&(t["margin-top"]=r),n&&(t["margin-bottom"]=n),a!==null)switch(i){case"auto":t["line-height"]=`${(a/240).toFixed(2)}`;break;case"atLeast":t["line-height"]=`calc(100% + ${a/20}pt)`;break;default:t["line-height"]=t["min-height"]=a/20+"pt"}}parseMarginProperties(e,t){ct.foreach(e,r=>{switch(r.localName){case"left":t["padding-left"]=lt.valueOfMargin(r);break;case"right":t["padding-right"]=lt.valueOfMargin(r);break;case"top":t["padding-top"]=lt.valueOfMargin(r);break;case"bottom":t["padding-bottom"]=lt.valueOfMargin(r)}})}parseTrHeight(e,t){E.attr(e,"hRule"),t.height=E.lengthAttr(e,"val")}parseBorderProperties(e,t){ct.foreach(e,r=>{switch(r.localName){case"start":case"left":t["border-left"]=lt.valueOfBorder(r);break;case"end":case"right":t["border-right"]=lt.valueOfBorder(r);break;case"top":t["border-top"]=lt.valueOfBorder(r);break;case"bottom":t["border-bottom"]=lt.valueOfBorder(r)}})}}const gr=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"];class ct{static foreach(e,t){for(var r=0;r<e.childNodes.length;r++){let n=e.childNodes[r];n.nodeType==Node.ELEMENT_NODE&&t(n)}}static colorAttr(e,t,r=null,n="black"){var a=E.attr(e,t);if(a)return a=="auto"?n:gr.includes(a)?a:`#${a}`;var i=E.attr(e,"themeColor");return i?`var(--docx-${i}-color)`:r}static sizeValue(e,t=pt.Dxa){return ne(e.textContent,t)}}class lt{static themeValue(e,t){var r=E.attr(e,t);return r?`var(--docx-${r}-font)`:null}static valueOfSize(e,t){var r=pt.Dxa;switch(E.attr(e,"type")){case"dxa":break;case"pct":r=pt.Percent;break;case"auto":return"auto"}return E.lengthAttr(e,t,r)}static valueOfMargin(e){return E.lengthAttr(e,"w")}static valueOfBorder(e){if(E.attr(e,"val")=="nil")return"none";var t=ct.colorAttr(e,"color");return`${E.lengthAttr(e,"sz",pt.Border)} solid ${t=="auto"?dr:t}`}static valueOfTblLayout(e){return E.attr(e,"val")=="fixed"?"fixed":"auto"}static classNameOfCnfStyle(e){const t=E.attr(e,"val");return["first-row","last-row","first-col","last-col","odd-col","even-col","odd-row","even-row","ne-cell","nw-cell","se-cell","sw-cell"].filter((r,n)=>t[n]=="1").join(" ")}static valueOfJc(e){var t=E.attr(e,"val");switch(t){case"start":case"left":return"left";case"center":return"center";case"end":case"right":return"right";case"both":return"justify"}return t}static valueOfVertAlign(e,t=!1){var r=E.attr(e,"val");switch(r){case"subscript":return"sub";case"superscript":return t?"sup":"super"}return t?null:r}static valueOfTextAlignment(e){var t=E.attr(e,"val");switch(t){case"auto":case"baseline":return"baseline";case"top":return"top";case"center":return"middle";case"bottom":return"bottom"}return t}static addSize(e,t){return e==null?t:t==null?e:`calc(${e} + ${t})`}static classNameOftblLook(e){const t=E.hexAttr(e,"val",0);let r="";return(E.boolAttr(e,"firstRow")||32&t)&&(r+=" first-row"),(E.boolAttr(e,"lastRow")||64&t)&&(r+=" last-row"),(E.boolAttr(e,"firstColumn")||128&t)&&(r+=" first-col"),(E.boolAttr(e,"lastColumn")||256&t)&&(r+=" last-col"),(E.boolAttr(e,"noHBand")||512&t)&&(r+=" no-hband"),(E.boolAttr(e,"noVBand")||1024&t)&&(r+=" no-vband"),r.trim()}}const Jt={pos:0,leader:"none",style:"left"};function br(d,e,t,r=.75){const n=d.closest("p"),a=d.getBoundingClientRect(),i=n.getBoundingClientRect(),o=getComputedStyle(n),c=(e==null?void 0:e.length)>0?e.map(b=>({pos:Qt(b.position),leader:b.leader,style:b.style})).sort((b,x)=>b.pos-x.pos):[Jt],v=c[c.length-1],w=i.width*r,k=Qt(t);let _=v.pos+k;if(_<w)for(;_<w&&c.length<50;_+=k)c.push({...Jt,pos:_});const u=parseFloat(o.marginLeft),y=i.left+u,h=(a.left-y)*r,m=c.find(b=>b.style!="clear"&&b.pos>h);if(m==null)return;let f=1;if(m.style=="right"||m.style=="center"){const b=Array.from(n.querySelectorAll(`.${d.className}`)),x=b.indexOf(d)+1,P=document.createRange();P.setStart(d,1),x<b.length?P.setEndBefore(b[x]):P.setEndAfter(n);const A=m.style=="center"?.5:1,F=P.getBoundingClientRect(),I=F.left+A*F.width-(i.left-u);f=m.pos-I*r}else f=m.pos-h;switch(d.innerHTML="&nbsp;",d.style.textDecoration="inherit",d.style.wordSpacing=`${f.toFixed(0)}pt`,m.leader){case"dot":case"middleDot":d.style.textDecoration="underline",d.style.textDecorationStyle="dotted";break;case"hyphen":case"heavy":case"underscore":d.style.textDecoration="underline"}}function Qt(d){return parseFloat(d)}const yr="http://www.w3.org/2000/svg",nt="http://www.w3.org/1998/Math/MathML";class vr{constructor(e){this.htmlDocument=e,this.className="docx",this.styleMap={},this.currentPart=null,this.tableVerticalMerges=[],this.currentVerticalMerge=null,this.tableCellPositions=[],this.currentCellPosition=null,this.footnoteMap={},this.endnoteMap={},this.currentEndnoteIds=[],this.usedHederFooterParts=[],this.currentTabs=[],this.commentMap={},this.tasks=[],this.postRenderTasks=[]}async render(e,t,r=null,n){var i;this.document=e,this.options=n,this.className=n.className,this.rootSelector=n.inWrapper?`.${this.className}-wrapper`:":root",this.styleMap=null,this.tasks=[],this.options.renderComments&&globalThis.Highlight&&(this.commentHighlight=new Highlight),te(r=r||t),te(t),r.appendChild(this.createComment("docxjs library predefined styles")),r.appendChild(this.renderDefaultStyle()),e.themePart&&(r.appendChild(this.createComment("docxjs document theme values")),this.renderTheme(e.themePart,r)),e.stylesPart!=null&&(this.styleMap=this.processStyles(e.stylesPart.styles),r.appendChild(this.createComment("docxjs document styles")),r.appendChild(this.renderStyles(e.stylesPart.styles))),e.numberingPart&&(this.prodessNumberings(e.numberingPart.domNumberings),r.appendChild(this.createComment("docxjs document numbering styles")),r.appendChild(this.renderNumbering(e.numberingPart.domNumberings,r))),e.footnotesPart&&(this.footnoteMap=St(e.footnotesPart.notes,o=>o.id)),e.endnotesPart&&(this.endnoteMap=St(e.endnotesPart.notes,o=>o.id)),e.settingsPart&&(this.defaultTabSize=(i=e.settingsPart.settings)==null?void 0:i.defaultTabStop),!n.ignoreFonts&&e.fontTablePart&&this.renderFontTable(e.fontTablePart,r);var a=this.renderSections(e.documentPart.body);this.options.inWrapper?t.appendChild(this.renderWrapper(a)):jt(t,a),this.commentHighlight&&n.renderComments&&CSS.highlights.set(`${this.className}-comments`,this.commentHighlight),this.postRenderTasks.forEach(o=>o()),await Promise.allSettled(this.tasks),this.refreshTabStops()}renderTheme(e,t){var o,c;const r={},n=(o=e.theme)==null?void 0:o.fontScheme;n&&(n.majorFont&&(r["--docx-majorHAnsi-font"]=n.majorFont.latinTypeface),n.minorFont&&(r["--docx-minorHAnsi-font"]=n.minorFont.latinTypeface));const a=(c=e.theme)==null?void 0:c.colorScheme;if(a)for(let[v,w]of Object.entries(a.colors))r[`--docx-${v}-color`]=`#${w}`;const i=this.styleToString(`.${this.className}`,r);t.appendChild(this.createStyleElement(i))}renderFontTable(e,t){for(let r of e.fonts)for(let n of r.embedFontRefs)this.tasks.push(this.document.loadFont(n.id,n.key).then(a=>{const i={"font-family":ie(r.name),src:`url(${a})`};n.type!="bold"&&n.type!="boldItalic"||(i["font-weight"]="bold"),n.type!="italic"&&n.type!="boldItalic"||(i["font-style"]="italic");const o=this.styleToString("@font-face",i);t.appendChild(this.createComment(`docxjs ${r.name} font`)),t.appendChild(this.createStyleElement(o))}))}processStyleName(e){return e?`${this.className}_${function(t){return t==null?void 0:t.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}(e)}`:this.className}processStyles(e){const t=St(e.filter(n=>n.id!=null),n=>n.id);for(const n of e.filter(a=>a.basedOn)){var r=t[n.basedOn];if(r){n.paragraphProps=Mt(n.paragraphProps,r.paragraphProps),n.runProps=Mt(n.runProps,r.runProps);for(const a of r.styles){const i=n.styles.find(o=>o.target==a.target);i?this.copyStyleProperties(a.values,i.values):n.styles.push({...a,values:{...a.values}})}}else this.options.debug&&console.warn(`Can't find base style ${n.basedOn}`)}for(let n of e)n.cssName=this.processStyleName(n.id);return t}prodessNumberings(e){var t;for(let r of e.filter(n=>n.pStyleName)){const n=this.findStyle(r.pStyleName);(t=n==null?void 0:n.paragraphProps)!=null&&t.numbering&&(n.paragraphProps.numbering.level=r.level)}}processElement(e){if(e.children)for(var t of e.children)t.parent=e,t.type==z.Table?this.processTable(t):this.processElement(t)}processTable(e){for(var t of e.children)for(var r of t.children)r.cssStyle=this.copyStyleProperties(e.cellStyle,r.cssStyle,["border-left","border-right","border-top","border-bottom","padding-left","padding-right","padding-top","padding-bottom"]),this.processElement(r)}copyStyleProperties(e,t,r=null){if(!e)return t;for(var n of(t==null&&(t={}),r==null&&(r=Object.getOwnPropertyNames(e)),r))e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n]);return t}createPageElement(e,t){var r=this.createElement("section",{className:e});return t&&(t.pageMargins&&(r.style.paddingLeft=t.pageMargins.left,r.style.paddingRight=t.pageMargins.right,r.style.paddingTop=t.pageMargins.top,r.style.paddingBottom=t.pageMargins.bottom),t.pageSize&&(this.options.ignoreWidth||(r.style.width=t.pageSize.width),this.options.ignoreHeight||(r.style.minHeight=t.pageSize.height))),r}createSectionContent(e){var t=this.createElement("article");return e.columns&&e.columns.numberOfColumns&&(t.style.columnCount=`${e.columns.numberOfColumns}`,t.style.columnGap=e.columns.space,e.columns.separator&&(t.style.columnRule="1px solid black")),t}renderSections(e){const t=[];this.processElement(e);const r=this.splitBySection(e.children,e.props),n=this.groupByPageBreaks(r);let a=null;for(let o=0,c=n.length;o<c;o++){this.currentFootnoteIds=[];let v=n[o][0].sectProps;const w=this.createPageElement(this.className,v);this.renderStyleValues(e.cssStyle,w),this.options.renderHeaders&&this.renderHeaderFooter(v.headerRefs,v,t.length,a!=v,w);for(const k of n[o]){var i=this.createSectionContent(k.sectProps);this.renderElements(k.elements,i),w.appendChild(i),v=k.sectProps}this.options.renderFootnotes&&this.renderNotes(this.currentFootnoteIds,this.footnoteMap,w),this.options.renderEndnotes&&o==c-1&&this.renderNotes(this.currentEndnoteIds,this.endnoteMap,w),this.options.renderFooters&&this.renderHeaderFooter(v.footerRefs,v,t.length,a!=v,w),t.push(w),a=v}return t}renderHeaderFooter(e,t,r,n,a){if(e){var i=(t.titlePage&&n?e.find(c=>c.type=="first"):null)??(r%2==1?e.find(c=>c.type=="even"):null)??e.find(c=>c.type=="default"),o=i&&this.document.findPartByRelId(i.id,this.document.documentPart);if(o){this.currentPart=o,this.usedHederFooterParts.includes(o.path)||(this.processElement(o.rootElement),this.usedHederFooterParts.push(o.path));const[c]=this.renderElements([o.rootElement],a);t!=null&&t.pageMargins&&(o.rootElement.type===z.Header?(c.style.marginTop=`calc(${t.pageMargins.header} - ${t.pageMargins.top})`,c.style.minHeight=`calc(${t.pageMargins.top} - ${t.pageMargins.header})`):o.rootElement.type===z.Footer&&(c.style.marginBottom=`calc(${t.pageMargins.footer} - ${t.pageMargins.bottom})`,c.style.minHeight=`calc(${t.pageMargins.bottom} - ${t.pageMargins.footer})`)),this.currentPart=null}}}isPageBreakElement(e){return e.type==z.Break&&(e.break=="lastRenderedPageBreak"?!this.options.ignoreLastRenderedPageBreak:e.break=="page")}isPageBreakSection(e,t){var r,n,a,i,o,c;return!!e&&!!t&&(((r=e.pageSize)==null?void 0:r.orientation)!=((n=t.pageSize)==null?void 0:n.orientation)||((a=e.pageSize)==null?void 0:a.width)!=((i=t.pageSize)==null?void 0:i.width)||((o=e.pageSize)==null?void 0:o.height)!=((c=t.pageSize)==null?void 0:c.height))}splitBySection(e,t){var k;var r={sectProps:null,elements:[],pageBreak:!1},n=[r];for(let _ of e){if(_.type==z.Paragraph){const u=this.findStyle(_.styleName);(k=u==null?void 0:u.paragraphProps)!=null&&k.pageBreakBefore&&(r.sectProps=a,r.pageBreak=!0,r={sectProps:null,elements:[],pageBreak:!1},n.push(r))}if(r.elements.push(_),_.type==z.Paragraph){const u=_;var a=u.sectionProps,i=-1,o=-1;if(this.options.breakPages&&u.children&&(i=u.children.findIndex(y=>{var h;return(o=((h=y.children)==null?void 0:h.findIndex(this.isPageBreakElement.bind(this)))??-1)!=-1})),(a||i!=-1)&&(r.sectProps=a,r.pageBreak=i!=-1,r={sectProps:null,elements:[],pageBreak:!1},n.push(r)),i!=-1){let y=u.children[i],h=o<y.children.length-1;if(i<u.children.length-1||h){var c=_.children,v={..._,children:c.slice(i)};if(_.children=c.slice(0,i),r.elements.push(v),h){let m=y.children,f={...y,children:m.slice(0,o)};_.children.push(f),y.children=m.slice(o)}}}}}let w=null;for(let _=n.length-1;_>=0;_--)n[_].sectProps==null?n[_].sectProps=w??t:w=n[_].sectProps;return n}groupByPageBreaks(e){let t,r=[];const n=[r];for(let a of e)r.push(a),(this.options.ignoreLastRenderedPageBreak||a.pageBreak||this.isPageBreakSection(t,a.sectProps))&&n.push(r=[]),t=a.sectProps;return n.filter(a=>a.length>0)}renderWrapper(e){return this.createElement("div",{className:`${this.className}-wrapper`},e)}renderDefaultStyle(){var e=this.className,t=`
  10. .${e}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; }
  11. .${e}-wrapper>section.${e} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }
  12. .${e} { color: black; hyphens: auto; text-underline-position: from-font; }
  13. section.${e} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }
  14. section.${e}>article { margin-bottom: auto; z-index: 1; }
  15. section.${e}>footer { z-index: 1; }
  16. .${e} table { border-collapse: collapse; }
  17. .${e} table td, .${e} table th { vertical-align: top; }
  18. .${e} p { margin: 0pt; min-height: 1em; }
  19. .${e} span { white-space: pre-wrap; overflow-wrap: break-word; }
  20. .${e} a { color: inherit; text-decoration: inherit; }
  21. .${e} svg { fill: transparent; }
  22. `;return this.options.renderComments&&(t+=`
  23. .${e}-comment-ref { cursor: default; }
  24. .${e}-comment-popover { display: none; z-index: 1000; padding: 0.5rem; background: white; position: absolute; box-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.25); width: 30ch; }
  25. .${e}-comment-ref:hover~.${e}-comment-popover { display: block; }
  26. .${e}-comment-author,.${e}-comment-date { font-size: 0.875rem; color: #888; }
  27. `),this.createStyleElement(t)}renderNumbering(e,t){var r="",n=[];for(var a of e){var i=`p.${this.numberingClass(a.id,a.level)}`,o="none";if(a.bullet){let c=`--${this.className}-${a.bullet.src}`.toLowerCase();r+=this.styleToString(`${i}:before`,{content:"' '",display:"inline-block",background:`var(${c})`},a.bullet.style),this.tasks.push(this.document.loadNumberingImage(a.bullet.src).then(v=>{var w=`${this.rootSelector} { ${c}: url(${v}) }`;t.appendChild(this.createStyleElement(w))}))}else if(a.levelText){let c=this.numberingCounter(a.id,a.level);const v=c+" "+(a.start-1);a.level>0&&(r+=this.styleToString(`p.${this.numberingClass(a.id,a.level-1)}`,{"counter-reset":v})),n.push(v),r+=this.styleToString(`${i}:before`,{content:this.levelTextToContent(a.levelText,a.suff,a.id,this.numFormatToCssValue(a.format)),"counter-increment":c,...a.rStyle})}else o=this.numFormatToCssValue(a.format);r+=this.styleToString(i,{display:"list-item","list-style-position":"inside","list-style-type":o,...a.pStyle})}return n.length>0&&(r+=this.styleToString(this.rootSelector,{"counter-reset":n.join(" ")})),this.createStyleElement(r)}renderStyles(e){var t="";const r=this.styleMap,n=St(e.filter(c=>c.isDefault),c=>c.target);for(const c of e){var a=c.styles;if(c.linked){var i=c.linked&&r[c.linked];i?a=a.concat(i.styles):this.options.debug&&console.warn(`Can't find linked style ${c.linked}`)}for(const v of a){var o=`${c.target??""}.${c.cssName}`;c.target!=v.target&&(o+=` ${v.target}`),n[c.target]==c&&(o=`.${this.className} ${c.target}, `+o),t+=this.styleToString(o,v.values)}}return this.createStyleElement(t)}renderNotes(e,t,r){var n=e.map(i=>t[i]).filter(i=>i);if(n.length>0){var a=this.createElement("ol",null,this.renderElements(n));r.appendChild(a)}}renderElement(e){switch(e.type){case z.Paragraph:return this.renderParagraph(e);case z.BookmarkStart:return this.renderBookmarkStart(e);case z.BookmarkEnd:return null;case z.Run:return this.renderRun(e);case z.Table:return this.renderTable(e);case z.Row:return this.renderTableRow(e);case z.Cell:return this.renderTableCell(e);case z.Hyperlink:return this.renderHyperlink(e);case z.SmartTag:return this.renderSmartTag(e);case z.Drawing:return this.renderDrawing(e);case z.Image:return this.renderImage(e);case z.Text:case z.Text:return this.renderText(e);case z.DeletedText:return this.renderDeletedText(e);case z.Tab:return this.renderTab(e);case z.Symbol:return this.renderSymbol(e);case z.Break:return this.renderBreak(e);case z.Footer:return this.renderContainer(e,"footer");case z.Header:return this.renderContainer(e,"header");case z.Footnote:case z.Endnote:return this.renderContainer(e,"li");case z.FootnoteReference:return this.renderFootnoteReference(e);case z.EndnoteReference:return this.renderEndnoteReference(e);case z.NoBreakHyphen:return this.createElement("wbr");case z.VmlPicture:return this.renderVmlPicture(e);case z.VmlElement:return this.renderVmlElement(e);case z.MmlMath:return this.renderContainerNS(e,nt,"math",{xmlns:nt});case z.MmlMathParagraph:return this.renderContainer(e,"span");case z.MmlFraction:return this.renderContainerNS(e,nt,"mfrac");case z.MmlBase:return this.renderContainerNS(e,nt,e.parent.type==z.MmlMatrixRow?"mtd":"mrow");case z.MmlNumerator:case z.MmlDenominator:case z.MmlFunction:case z.MmlLimit:case z.MmlBox:return this.renderContainerNS(e,nt,"mrow");case z.MmlGroupChar:return this.renderMmlGroupChar(e);case z.MmlLimitLower:return this.renderContainerNS(e,nt,"munder");case z.MmlMatrix:return this.renderContainerNS(e,nt,"mtable");case z.MmlMatrixRow:return this.renderContainerNS(e,nt,"mtr");case z.MmlRadical:return this.renderMmlRadical(e);case z.MmlSuperscript:return this.renderContainerNS(e,nt,"msup");case z.MmlSubscript:return this.renderContainerNS(e,nt,"msub");case z.MmlDegree:case z.MmlSuperArgument:case z.MmlSubArgument:return this.renderContainerNS(e,nt,"mn");case z.MmlFunctionName:return this.renderContainerNS(e,nt,"ms");case z.MmlDelimiter:return this.renderMmlDelimiter(e);case z.MmlRun:return this.renderMmlRun(e);case z.MmlNary:return this.renderMmlNary(e);case z.MmlPreSubSuper:return this.renderMmlPreSubSuper(e);case z.MmlBar:return this.renderMmlBar(e);case z.MmlEquationArray:return this.renderMllList(e);case z.Inserted:return this.renderInserted(e);case z.Deleted:return this.renderDeleted(e);case z.CommentRangeStart:return this.renderCommentRangeStart(e);case z.CommentRangeEnd:return this.renderCommentRangeEnd(e);case z.CommentReference:return this.renderCommentReference(e)}return null}renderElements(e,t){if(e==null)return null;var r=e.flatMap(n=>this.renderElement(n)).filter(n=>n!=null);return t&&jt(t,r),r}renderContainer(e,t,r){return this.createElement(t,r,this.renderElements(e.children))}renderContainerNS(e,t,r,n){return this.createElementNS(t,r,n,this.renderElements(e.children))}renderParagraph(e){var a,i;var t=this.renderContainer(e,"p");const r=this.findStyle(e.styleName);e.tabs??(e.tabs=(a=r==null?void 0:r.paragraphProps)==null?void 0:a.tabs),this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderCommonProperties(t.style,e);const n=e.numbering??((i=r==null?void 0:r.paragraphProps)==null?void 0:i.numbering);return n&&t.classList.add(this.numberingClass(n.id,n.level)),t}renderRunProperties(e,t){this.renderCommonProperties(e,t)}renderCommonProperties(e,t){t!=null&&(t.color&&(e.color=t.color),t.fontSize&&(e["font-size"]=t.fontSize))}renderHyperlink(e){var t=this.renderContainer(e,"a");if(this.renderStyleValues(e.cssStyle,t),e.href)t.href=e.href;else if(e.id){const r=this.document.documentPart.rels.find(n=>n.id==e.id&&n.targetMode==="External");t.href=r==null?void 0:r.target}return t}renderSmartTag(e){return this.renderContainer(e,"span")}renderCommentRangeStart(e){var n;if(!this.options.renderComments)return null;const t=new Range;(n=this.commentHighlight)==null||n.add(t);const r=this.htmlDocument.createComment(`start of comment #${e.id}`);return this.later(()=>t.setStart(r,0)),this.commentMap[e.id]=t,r}renderCommentRangeEnd(e){if(!this.options.renderComments)return null;const t=this.commentMap[e.id],r=this.htmlDocument.createComment(`end of comment #${e.id}`);return this.later(()=>t==null?void 0:t.setEnd(r,0)),r}renderCommentReference(e){var i;if(!this.options.renderComments)return null;var t=(i=this.document.commentsPart)==null?void 0:i.commentMap[e.id];if(!t)return null;const r=new DocumentFragment,n=this.createElement("span",{className:`${this.className}-comment-ref`},["💬"]),a=this.createElement("div",{className:`${this.className}-comment-popover`});return this.renderCommentContent(t,a),r.appendChild(this.htmlDocument.createComment(`comment #${t.id} by ${t.author} on ${t.date}`)),r.appendChild(n),r.appendChild(a),r}renderCommentContent(e,t){t.appendChild(this.createElement("div",{className:`${this.className}-comment-author`},[e.author])),t.appendChild(this.createElement("div",{className:`${this.className}-comment-date`},[new Date(e.date).toLocaleString()])),this.renderElements(e.children,t)}renderDrawing(e){var t=this.renderContainer(e,"div");return t.style.display="inline-block",t.style.position="relative",t.style.textIndent="0px",this.renderStyleValues(e.cssStyle,t),t}renderImage(e){let t=this.createElement("img");return this.renderStyleValues(e.cssStyle,t),this.document&&this.tasks.push(this.document.loadDocumentImage(e.src,this.currentPart).then(r=>{t.src=r})),t}renderText(e){return this.htmlDocument.createTextNode(e.text)}renderDeletedText(e){return this.options.renderEndnotes?this.htmlDocument.createTextNode(e.text):null}renderBreak(e){return e.break=="textWrapping"?this.createElement("br"):null}renderInserted(e){return this.options.renderChanges?this.renderContainer(e,"ins"):this.renderElements(e.children)}renderDeleted(e){return this.options.renderChanges?this.renderContainer(e,"del"):null}renderSymbol(e){var t=this.createElement("span");return t.style.fontFamily=e.font,t.innerHTML=`&#x${e.char};`,t}renderFootnoteReference(e){var t=this.createElement("sup");return this.currentFootnoteIds.push(e.id),t.textContent=`${this.currentFootnoteIds.length}`,t}renderEndnoteReference(e){var t=this.createElement("sup");return this.currentEndnoteIds.push(e.id),t.textContent=`${this.currentEndnoteIds.length}`,t}renderTab(e){var n;var t=this.createElement("span");if(t.innerHTML="&emsp;",this.options.experimental){t.className=this.tabStopClass();var r=(n=function(a,i){for(var o=a.parent;o!=null&&o.type!=i;)o=o.parent;return o}(e,z.Paragraph))==null?void 0:n.tabs;this.currentTabs.push({stops:r,span:t})}return t}renderBookmarkStart(e){return this.createElement("span",{id:e.name})}renderRun(e){if(e.fieldRun)return null;const t=this.createElement("span");if(e.id&&(t.id=e.id),this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.verticalAlign){const r=this.createElement(e.verticalAlign);this.renderElements(e.children,r),t.appendChild(r)}else this.renderElements(e.children,t);return t}renderTable(e){let t=this.createElement("table");return this.tableCellPositions.push(this.currentCellPosition),this.tableVerticalMerges.push(this.currentVerticalMerge),this.currentVerticalMerge={},this.currentCellPosition={col:0,row:0},e.columns&&t.appendChild(this.renderTableColumns(e.columns)),this.renderClass(e,t),this.renderElements(e.children,t),this.renderStyleValues(e.cssStyle,t),this.currentVerticalMerge=this.tableVerticalMerges.pop(),this.currentCellPosition=this.tableCellPositions.pop(),t}renderTableColumns(e){let t=this.createElement("colgroup");for(let r of e){let n=this.createElement("col");r.width&&(n.style.width=r.width),t.appendChild(n)}return t}renderTableRow(e){let t=this.renderContainer(e,"tr");return this.currentCellPosition.col=0,this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.currentCellPosition.row++,t}renderTableCell(e){let t=this.renderContainer(e,"td");const r=this.currentCellPosition.col;return e.verticalMerge?e.verticalMerge=="restart"?(this.currentVerticalMerge[r]=t,t.rowSpan=1):this.currentVerticalMerge[r]&&(this.currentVerticalMerge[r].rowSpan+=1,t.style.display="none"):this.currentVerticalMerge[r]=null,this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),e.span&&(t.colSpan=e.span),this.currentCellPosition.col+=t.colSpan,t}renderVmlPicture(e){return this.renderContainer(e,"div")}renderVmlElement(e){var n,a;var t=this.createSvgElement("svg");t.setAttribute("style",e.cssStyleText);const r=this.renderVmlChildElement(e);return(n=e.imageHref)!=null&&n.id&&this.tasks.push((a=this.document)==null?void 0:a.loadDocumentImage(e.imageHref.id,this.currentPart).then(i=>r.setAttribute("href",i))),t.appendChild(r),requestAnimationFrame(()=>{const i=t.firstElementChild.getBBox();t.setAttribute("width",`${Math.ceil(i.x+i.width)}`),t.setAttribute("height",`${Math.ceil(i.y+i.height)}`)}),t}renderVmlChildElement(e){const t=this.createSvgElement(e.tagName);Object.entries(e.attrs).forEach(([r,n])=>t.setAttribute(r,n));for(let r of e.children)r.type==z.VmlElement?t.appendChild(this.renderVmlChildElement(r)):t.appendChild(...Pt(this.renderElement(r)));return t}renderMmlRadical(e){var n;const t=e.children.find(a=>a.type==z.MmlBase);if((n=e.props)!=null&&n.hideDegree)return this.createElementNS(nt,"msqrt",null,this.renderElements([t]));const r=e.children.find(a=>a.type==z.MmlDegree);return this.createElementNS(nt,"mroot",null,this.renderElements([t,r]))}renderMmlDelimiter(e){const t=[];return t.push(this.createElementNS(nt,"mo",null,[e.props.beginChar??"("])),t.push(...this.renderElements(e.children)),t.push(this.createElementNS(nt,"mo",null,[e.props.endChar??")"])),this.createElementNS(nt,"mrow",null,t)}renderMmlNary(e){var v;const t=[],r=St(e.children,w=>w.type),n=r[z.MmlSuperArgument],a=r[z.MmlSubArgument],i=n?this.createElementNS(nt,"mo",null,Pt(this.renderElement(n))):null,o=a?this.createElementNS(nt,"mo",null,Pt(this.renderElement(a))):null,c=this.createElementNS(nt,"mo",null,[((v=e.props)==null?void 0:v.char)??"∫"]);return i||o?t.push(this.createElementNS(nt,"munderover",null,[c,o,i])):i?t.push(this.createElementNS(nt,"mover",null,[c,i])):o?t.push(this.createElementNS(nt,"munder",null,[c,o])):t.push(c),t.push(...this.renderElements(r[z.MmlBase].children)),this.createElementNS(nt,"mrow",null,t)}renderMmlPreSubSuper(e){const t=[],r=St(e.children,v=>v.type),n=r[z.MmlSuperArgument],a=r[z.MmlSubArgument],i=n?this.createElementNS(nt,"mo",null,Pt(this.renderElement(n))):null,o=a?this.createElementNS(nt,"mo",null,Pt(this.renderElement(a))):null,c=this.createElementNS(nt,"mo",null);return t.push(this.createElementNS(nt,"msubsup",null,[c,o,i])),t.push(...this.renderElements(r[z.MmlBase].children)),this.createElementNS(nt,"mrow",null,t)}renderMmlGroupChar(e){const t=e.props.verticalJustification==="bot"?"mover":"munder",r=this.renderContainerNS(e,nt,t);return e.props.char&&r.appendChild(this.createElementNS(nt,"mo",null,[e.props.char])),r}renderMmlBar(e){const t=this.renderContainerNS(e,nt,"mrow");switch(e.props.position){case"top":t.style.textDecoration="overline";break;case"bottom":t.style.textDecoration="underline"}return t}renderMmlRun(e){const t=this.createElementNS(nt,"ms",null,this.renderElements(e.children));return this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),t}renderMllList(e){const t=this.createElementNS(nt,"mtable");this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t);for(let r of this.renderElements(e.children))t.appendChild(this.createElementNS(nt,"mtr",null,[this.createElementNS(nt,"mtd",null,[r])]));return t}renderStyleValues(e,t){for(let r in e)r.startsWith("$")?t.setAttribute(r.slice(1),e[r]):t.style[r]=e[r]}renderClass(e,t){e.className&&(t.className=e.className),e.styleName&&t.classList.add(this.processStyleName(e.styleName))}findStyle(e){var t;return e&&((t=this.styleMap)==null?void 0:t[e])}numberingClass(e,t){return`${this.className}-num-${e}-${t}`}tabStopClass(){return`${this.className}-tab-stop`}styleToString(e,t,r=null){let n=`${e} {\r
  28. `;for(const a in t)a.startsWith("$")||(n+=` ${a}: ${t[a]};\r
  29. `);return r&&(n+=r),n+`}\r
  30. `}numberingCounter(e,t){return`${this.className}-num-${e}-${t}`}levelTextToContent(e,t,r,n){return`"${e.replace(/%\d*/g,a=>{let i=parseInt(a.substring(1),10)-1;return`"counter(${this.numberingCounter(r,i)}, ${n})"`})}${{tab:"\\9",space:"\\a0"}[t]??""}"`}numFormatToCssValue(e){return{none:"none",bullet:"disc",decimal:"decimal",lowerLetter:"lower-alpha",upperLetter:"upper-alpha",lowerRoman:"lower-roman",upperRoman:"upper-roman",decimalZero:"decimal-leading-zero",aiueo:"katakana",aiueoFullWidth:"katakana",chineseCounting:"simp-chinese-informal",chineseCountingThousand:"simp-chinese-informal",chineseLegalSimplified:"simp-chinese-formal",chosung:"hangul-consonant",ideographDigital:"cjk-ideographic",ideographTraditional:"cjk-heavenly-stem",ideographLegalTraditional:"trad-chinese-formal",ideographZodiac:"cjk-earthly-branch",iroha:"katakana-iroha",irohaFullWidth:"katakana-iroha",japaneseCounting:"japanese-informal",japaneseDigitalTenThousand:"cjk-decimal",japaneseLegal:"japanese-formal",thaiNumbers:"thai",koreanCounting:"korean-hangul-formal",koreanDigital:"korean-hangul-formal",koreanDigital2:"korean-hanja-informal",hebrew1:"hebrew",hebrew2:"hebrew",hindiNumbers:"devanagari",ganada:"hangul",taiwaneseCounting:"cjk-ideographic",taiwaneseCountingThousand:"cjk-ideographic",taiwaneseDigital:"cjk-decimal"}[e]??e}refreshTabStops(){this.options.experimental&&setTimeout(()=>{const e=function(t=document.body){const r=document.createElement("div");r.style.width="100pt",t.appendChild(r);const n=100/r.offsetWidth;return t.removeChild(r),n}();for(let t of this.currentTabs)br(t.span,t.stops,this.defaultTabSize,e)},500)}createElementNS(e,t,r,n){var a=e?this.htmlDocument.createElementNS(e,t):this.htmlDocument.createElement(t);return Object.assign(a,r),n&&jt(a,n),a}createElement(e,t,r){return this.createElementNS(void 0,e,t,r)}createSvgElement(e,t,r){return this.createElementNS(yr,e,t,r)}createStyleElement(e){return this.createElement("style",{innerHTML:e})}createComment(e){return this.htmlDocument.createComment(e)}later(e){this.postRenderTasks.push(e)}}function te(d){d.innerHTML=""}function jt(d,e){e.forEach(t=>{return d.appendChild(typeof(r=t)=="string"||r instanceof String?document.createTextNode(t):t);var r})}const me={ignoreHeight:!1,ignoreWidth:!1,ignoreFonts:!1,breakPages:!0,debug:!1,experimental:!1,className:"docx",inWrapper:!0,trimXmlDeclaration:!0,ignoreLastRenderedPageBreak:!0,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,useBase64URL:!1,renderChanges:!1,renderComments:!1};function _r(d,e){const t={...me,...e};return Ht.load(d,new mr(t),t)}async function kr(d,e,t,r){const n={...me,...r};return await new vr(window.document).render(d,e,t,n)}async function xr(d,e,t,r){const n=await _r(d,r);return await kr(n,e,t,r),n}export{me as defaultOptions,_r as parseAsync,xr as renderAsync,kr as renderDocument};