import{K as Ft,af as Tt,a5 as xe,e as Ce,c as Pe,D as Ae,o as Ee,u as Ne}from"./index.8d733f79.js";import{e as ze,a as Be}from"./diagnosticReport.fd129147.js";var oe={exports:{}};/*!

JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>

(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.

JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/(function(c,e){(function(t){c.exports=t()})(function(){return function t(r,n,a){function i(g,_){if(!n[g]){if(!r[g]){var y=typeof Tt=="function"&&Tt;if(!_&&y)return y(g,!0);if(o)return o(g,!0);var w=new Error("Cannot find module '"+g+"'");throw w.code="MODULE_NOT_FOUND",w}var d=n[g]={exports:{}};r[g][0].call(d.exports,function(k){var h=r[g][1][k];return i(h||k)},d,d.exports,t,r,n,a)}return n[g].exports}for(var o=typeof Tt=="function"&&Tt,u=0;u<a.length;u++)i(a[u]);return i}({1:[function(t,r,n){var a=t("./utils"),i=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(u){for(var g,_,y,w,d,k,h,m=[],f=0,v=u.length,x=v,A=a.getTypeOf(u)!=="string";f<u.length;)x=v-f,y=A?(g=u[f++],_=f<v?u[f++]:0,f<v?u[f++]:0):(g=u.charCodeAt(f++),_=f<v?u.charCodeAt(f++):0,f<v?u.charCodeAt(f++):0),w=g>>2,d=(3&g)<<4|_>>4,k=1<x?(15&_)<<2|y>>6:64,h=2<x?63&y:64,m.push(o.charAt(w)+o.charAt(d)+o.charAt(k)+o.charAt(h));return m.join("")},n.decode=function(u){var g,_,y,w,d,k,h=0,m=0,f="data:";if(u.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var v,x=3*(u=u.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(u.charAt(u.length-1)===o.charAt(64)&&x--,u.charAt(u.length-2)===o.charAt(64)&&x--,x%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=i.uint8array?new Uint8Array(0|x):new Array(0|x);h<u.length;)g=o.indexOf(u.charAt(h++))<<2|(w=o.indexOf(u.charAt(h++)))>>4,_=(15&w)<<4|(d=o.indexOf(u.charAt(h++)))>>2,y=(3&d)<<6|(k=o.indexOf(u.charAt(h++))),v[m++]=g,d!==64&&(v[m++]=_),k!==64&&(v[m++]=y);return v}},{"./support":30,"./utils":32}],2:[function(t,r,n){var a=t("./external"),i=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),u=t("./stream/DataLengthProbe");function g(_,y,w,d,k){this.compressedSize=_,this.uncompressedSize=y,this.crc32=w,this.compression=d,this.compressedContent=k}g.prototype={getContentWorker:function(){var _=new i(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),y=this;return _.on("end",function(){if(this.streamInfo.data_length!==y.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),_},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)}},g.createWorkerFrom=function(_,y,w){return _.pipe(new o).pipe(new u("uncompressedSize")).pipe(y.compressWorker(w)).pipe(new u("compressedSize")).withStreamInfo("compression",y)},r.exports=g},{"./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,u=[],g=0;g<256;g++){o=g;for(var _=0;_<8;_++)o=1&o?3988292384^o>>>1:o>>>1;u[g]=o}return u}();r.exports=function(o,u){return o!==void 0&&o.length?a.getTypeOf(o)!=="string"?function(g,_,y,w){var d=i,k=w+y;g^=-1;for(var h=w;h<k;h++)g=g>>>8^d[255&(g^_[h])];return-1^g}(0|u,o,o.length,0):function(g,_,y,w){var d=i,k=w+y;g^=-1;for(var h=w;h<k;h++)g=g>>>8^d[255&(g^_.charCodeAt(h))];return-1^g}(0|u,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"),u=t("./stream/GenericWorker"),g=a?"uint8array":"array";function _(y,w){u.call(this,"FlateWorker/"+y),this._pako=null,this._pakoAction=y,this._pakoOptions=w,this.meta={}}n.magic="\b\0",o.inherits(_,u),_.prototype.processChunk=function(y){this.meta=y.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(g,y.data),!1)},_.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},_.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},_.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var y=this;this._pako.onData=function(w){y.push({data:w,meta:y.meta})}},n.compressWorker=function(y){return new _("Deflate",y)},n.uncompressWorker=function(){return new _("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,r,n){function a(d,k){var h,m="";for(h=0;h<k;h++)m+=String.fromCharCode(255&d),d>>>=8;return m}function i(d,k,h,m,f,v){var x,A,P=d.file,D=d.compression,T=v!==g.utf8encode,H=o.transformTo("string",v(P.name)),F=o.transformTo("string",g.utf8encode(P.name)),X=P.comment,Q=o.transformTo("string",v(X)),S=o.transformTo("string",g.utf8encode(X)),I=F.length!==P.name.length,l=S.length!==X.length,L="",et="",W="",rt=P.dir,$=P.date,tt={crc32:0,compressedSize:0,uncompressedSize:0};k&&!h||(tt.crc32=d.crc32,tt.compressedSize=d.compressedSize,tt.uncompressedSize=d.uncompressedSize);var B=0;k&&(B|=8),T||!I&&!l||(B|=2048);var z=0,J=0;rt&&(z|=16),f==="UNIX"?(J=798,z|=function(G,ut){var bt=G;return G||(bt=ut?16893:33204),(65535&bt)<<16}(P.unixPermissions,rt)):(J=20,z|=function(G){return 63&(G||0)}(P.dosPermissions)),x=$.getUTCHours(),x<<=6,x|=$.getUTCMinutes(),x<<=5,x|=$.getUTCSeconds()/2,A=$.getUTCFullYear()-1980,A<<=4,A|=$.getUTCMonth()+1,A<<=5,A|=$.getUTCDate(),I&&(et=a(1,1)+a(_(H),4)+F,L+="up"+a(et.length,2)+et),l&&(W=a(1,1)+a(_(Q),4)+S,L+="uc"+a(W.length,2)+W);var K="";return K+=`
\0`,K+=a(B,2),K+=D.magic,K+=a(x,2),K+=a(A,2),K+=a(tt.crc32,4),K+=a(tt.compressedSize,4),K+=a(tt.uncompressedSize,4),K+=a(H.length,2),K+=a(L.length,2),{fileRecord:y.LOCAL_FILE_HEADER+K+H+L,dirRecord:y.CENTRAL_FILE_HEADER+a(J,2)+K+a(Q.length,2)+"\0\0\0\0"+a(z,4)+a(m,4)+H+L+Q}}var o=t("../utils"),u=t("../stream/GenericWorker"),g=t("../utf8"),_=t("../crc32"),y=t("../signature");function w(d,k,h,m){u.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=k,this.zipPlatform=h,this.encodeFileName=m,this.streamFiles=d,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(w,u),w.prototype.push=function(d){var k=d.meta.percent||0,h=this.entriesCount,m=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,u.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:h?(k+100*(h-m-1))/h:100}}))},w.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var k=this.streamFiles&&!d.file.dir;if(k){var h=i(d,k,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},w.prototype.closedSource=function(d){this.accumulate=!1;var k=this.streamFiles&&!d.file.dir,h=i(d,k,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),k)this.push({data:function(m){return y.DATA_DESCRIPTOR+a(m.crc32,4)+a(m.compressedSize,4)+a(m.uncompressedSize,4)}(d),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},w.prototype.flush=function(){for(var d=this.bytesWritten,k=0;k<this.dirRecords.length;k++)this.push({data:this.dirRecords[k],meta:{percent:100}});var h=this.bytesWritten-d,m=function(f,v,x,A,P){var D=o.transformTo("string",P(A));return y.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(f,2)+a(f,2)+a(v,4)+a(x,4)+a(D.length,2)+D}(this.dirRecords.length,h,d,this.zipComment,this.encodeFileName);this.push({data:m,meta:{percent:100}})},w.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},w.prototype.registerPrevious=function(d){this._sources.push(d);var k=this;return d.on("data",function(h){k.processChunk(h)}),d.on("end",function(){k.closedSource(k.previous.streamInfo),k._sources.length?k.prepareNextSource():k.end()}),d.on("error",function(h){k.error(h)}),this},w.prototype.resume=function(){return!!u.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},w.prototype.error=function(d){var k=this._sources;if(!u.prototype.error.call(this,d))return!1;for(var h=0;h<k.length;h++)try{k[h].error(d)}catch{}return!0},w.prototype.lock=function(){u.prototype.lock.call(this);for(var d=this._sources,k=0;k<d.length;k++)d[k].lock()},r.exports=w},{"../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,u,g){var _=new i(u.streamFiles,g,u.platform,u.encodeFileName),y=0;try{o.forEach(function(w,d){y++;var k=function(v,x){var A=v||x,P=a[A];if(!P)throw new Error(A+" is not a valid compression method !");return P}(d.options.compression,u.compression),h=d.options.compressionOptions||u.compressionOptions||{},m=d.dir,f=d.date;d._compressWorker(k,h).withStreamInfo("file",{name:w,dir:m,date:f,comment:d.comment||"",unixPermissions:d.unixPermissions,dosPermissions:d.dosPermissions}).pipe(_)}),_.entriesCount=y}catch(w){_.error(w)}return _}},{"../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"),u=t("./zipEntries"),g=t("./stream/Crc32Probe"),_=t("./nodejsUtils");function y(w){return new i.Promise(function(d,k){var h=w.decompressed.getContentWorker().pipe(new g);h.on("error",function(m){k(m)}).on("end",function(){h.streamInfo.crc32!==w.decompressed.crc32?k(new Error("Corrupted zip : CRC32 mismatch")):d()}).resume()})}r.exports=function(w,d){var k=this;return d=a.extend(d||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),_.isNode&&_.isStream(w)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",w,!0,d.optimizedBinaryString,d.base64).then(function(h){var m=new u(d);return m.load(h),m}).then(function(h){var m=[i.Promise.resolve(h)],f=h.files;if(d.checkCRC32)for(var v=0;v<f.length;v++)m.push(y(f[v]));return i.Promise.all(m)}).then(function(h){for(var m=h.shift(),f=m.files,v=0;v<f.length;v++){var x=f[v],A=x.fileNameStr,P=a.resolve(x.fileNameStr);k.file(P,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:d.createFolders}),x.dir||(k.file(P).unsafeOriginalName=A)}return m.zipComment.length&&(k.comment=m.zipComment),k})}},{"./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(u,g){i.call(this,"Nodejs stream input adapter for "+u),this._upstreamEnded=!1,this._bindStream(g)}a.inherits(o,i),o.prototype._bindStream=function(u){var g=this;(this._stream=u).pause(),u.on("data",function(_){g.push({data:_,meta:{percent:0}})}).on("error",function(_){g.isPaused?this.generatedError=_:g.error(_)}).on("end",function(){g.isPaused?g._upstreamEnded=!0:g.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,u,g){a.call(this,u),this._helper=o;var _=this;o.on("data",function(y,w){_.push(y)||_._helper.pause(),g&&g(w)}).on("error",function(y){_.emit("error",y)}).on("end",function(){_.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(P,D,T){var H,F=o.getTypeOf(D),X=o.extend(T||{},_);X.date=X.date||new Date,X.compression!==null&&(X.compression=X.compression.toUpperCase()),typeof X.unixPermissions=="string"&&(X.unixPermissions=parseInt(X.unixPermissions,8)),X.unixPermissions&&16384&X.unixPermissions&&(X.dir=!0),X.dosPermissions&&16&X.dosPermissions&&(X.dir=!0),X.dir&&(P=f(P)),X.createFolders&&(H=m(P))&&v.call(this,H,!0);var Q=F==="string"&&X.binary===!1&&X.base64===!1;T&&T.binary!==void 0||(X.binary=!Q),(D instanceof y&&D.uncompressedSize===0||X.dir||!D||D.length===0)&&(X.base64=!1,X.binary=!0,D="",X.compression="STORE",F="string");var S=null;S=D instanceof y||D instanceof u?D:k.isNode&&k.isStream(D)?new h(P,D):o.prepareContent(P,D,X.binary,X.optimizedBinaryString,X.base64);var I=new w(P,S,X);this.files[P]=I}var i=t("./utf8"),o=t("./utils"),u=t("./stream/GenericWorker"),g=t("./stream/StreamHelper"),_=t("./defaults"),y=t("./compressedObject"),w=t("./zipObject"),d=t("./generate"),k=t("./nodejsUtils"),h=t("./nodejs/NodejsStreamInputAdapter"),m=function(P){P.slice(-1)==="/"&&(P=P.substring(0,P.length-1));var D=P.lastIndexOf("/");return 0<D?P.substring(0,D):""},f=function(P){return P.slice(-1)!=="/"&&(P+="/"),P},v=function(P,D){return D=D!==void 0?D:_.createFolders,P=f(P),this.files[P]||a.call(this,P,null,{dir:!0,createFolders:D}),this.files[P]};function x(P){return Object.prototype.toString.call(P)==="[object RegExp]"}var A={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(P){var D,T,H;for(D in this.files)H=this.files[D],(T=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&P(T,H)},filter:function(P){var D=[];return this.forEach(function(T,H){P(T,H)&&D.push(H)}),D},file:function(P,D,T){if(arguments.length!==1)return P=this.root+P,a.call(this,P,D,T),this;if(x(P)){var H=P;return this.filter(function(X,Q){return!Q.dir&&H.test(X)})}var F=this.files[this.root+P];return F&&!F.dir?F:null},folder:function(P){if(!P)return this;if(x(P))return this.filter(function(F,X){return X.dir&&P.test(F)});var D=this.root+P,T=v.call(this,D),H=this.clone();return H.root=T.name,H},remove:function(P){P=this.root+P;var D=this.files[P];if(D||(P.slice(-1)!=="/"&&(P+="/"),D=this.files[P]),D&&!D.dir)delete this.files[P];else for(var T=this.filter(function(F,X){return X.name.slice(0,P.length)===P}),H=0;H<T.length;H++)delete this.files[T[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(P){var D,T={};try{if((T=o.extend(P||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=T.type.toLowerCase(),T.compression=T.compression.toUpperCase(),T.type==="binarystring"&&(T.type="string"),!T.type)throw new Error("No output type specified.");o.checkSupport(T.type),T.platform!=="darwin"&&T.platform!=="freebsd"&&T.platform!=="linux"&&T.platform!=="sunos"||(T.platform="UNIX"),T.platform==="win32"&&(T.platform="DOS");var H=T.comment||this.comment||"";D=d.generateWorker(this,T,H)}catch(F){(D=new u("error")).error(F)}return new g(D,T.type||"string",T.mimeType)},generateAsync:function(P,D){return this.generateInternalStream(P).accumulate(D)},generateNodeStream:function(P,D){return(P=P||{}).type||(P.type="nodebuffer"),this.generateInternalStream(P).toNodejsStream(D)}};r.exports=A},{"./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 u=0;u<this.data.length;u++)o[u]=255&o[u]}t("../utils").inherits(i,a),i.prototype.byteAt=function(o){return this.data[this.zero+o]},i.prototype.lastIndexOfSignature=function(o){for(var u=o.charCodeAt(0),g=o.charCodeAt(1),_=o.charCodeAt(2),y=o.charCodeAt(3),w=this.length-4;0<=w;--w)if(this.data[w]===u&&this.data[w+1]===g&&this.data[w+2]===_&&this.data[w+3]===y)return w-this.zero;return-1},i.prototype.readAndCheckSignature=function(o){var u=o.charCodeAt(0),g=o.charCodeAt(1),_=o.charCodeAt(2),y=o.charCodeAt(3),w=this.readData(4);return u===w[0]&&g===w[1]&&_===w[2]&&y===w[3]},i.prototype.readData=function(o){if(this.checkOffset(o),o===0)return[];var u=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},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 u,g=0;for(this.checkOffset(o),u=this.index+o-1;u>=this.index;u--)g=(g<<8)+this.byteAt(u);return this.index+=o,g},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 u=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},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 u=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},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 u=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,u},r.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,r,n){var a=t("../utils"),i=t("../support"),o=t("./ArrayReader"),u=t("./StringReader"),g=t("./NodeBufferReader"),_=t("./Uint8ArrayReader");r.exports=function(y){var w=a.getTypeOf(y);return a.checkSupport(w),w!=="string"||i.uint8array?w==="nodebuffer"?new g(y):i.uint8array?new _(a.transformTo("uint8array",y)):new o(a.transformTo("array",y)):new u(y)}},{"../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(u){a.call(this,"ConvertWorker to "+u),this.destType=u}i.inherits(o,a),o.prototype.processChunk=function(u){this.push({data:i.transformTo(this.destType,u.data),meta:u.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(u){this.streamInfo.crc32=i(u.data,this.streamInfo.crc32||0),this.push(u)},r.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r,n){var a=t("../utils"),i=t("./GenericWorker");function o(u){i.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}a.inherits(o,i),o.prototype.processChunk=function(u){if(u){var g=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=g+u.data.length}i.prototype.processChunk.call(this,u)},r.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,r,n){var a=t("../utils"),i=t("./GenericWorker");function o(u){i.call(this,"DataWorker");var g=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(_){g.dataIsReady=!0,g.data=_,g.max=_&&_.length||0,g.type=a.getTypeOf(_),g.isPaused||g._tickAndRepeat()},function(_){g.error(_)})}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 u=null,g=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":u=this.data.substring(this.index,g);break;case"uint8array":u=this.data.subarray(this.index,g);break;case"array":case"nodebuffer":u=this.data.slice(this.index,g)}return this.index=g,this.push({data:u,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 u=0;u<this._listeners[i].length;u++)this._listeners[i][u].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(u){o.processChunk(u)}),i.on("end",function(){o.end()}),i.on("error",function(u){o.error(u)}),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"),u=t("../base64"),g=t("../support"),_=t("../external"),y=null;if(g.nodestream)try{y=t("../nodejs/NodejsStreamOutputAdapter")}catch{}function w(k,h){return new _.Promise(function(m,f){var v=[],x=k._internalType,A=k._outputType,P=k._mimeType;k.on("data",function(D,T){v.push(D),h&&h(T)}).on("error",function(D){v=[],f(D)}).on("end",function(){try{var D=function(T,H,F){switch(T){case"blob":return a.newBlob(a.transformTo("arraybuffer",H),F);case"base64":return u.encode(H);default:return a.transformTo(T,H)}}(A,function(T,H){var F,X=0,Q=null,S=0;for(F=0;F<H.length;F++)S+=H[F].length;switch(T){case"string":return H.join("");case"array":return Array.prototype.concat.apply([],H);case"uint8array":for(Q=new Uint8Array(S),F=0;F<H.length;F++)Q.set(H[F],X),X+=H[F].length;return Q;case"nodebuffer":return Buffer.concat(H);default:throw new Error("concat : unsupported type '"+T+"'")}}(x,v),P);m(D)}catch(T){f(T)}v=[]}).resume()})}function d(k,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=k.pipe(new i(f)),k.lock()}catch(v){this._worker=new o("error"),this._worker.error(v)}}d.prototype={accumulate:function(k){return w(this,k)},on:function(k,h){var m=this;return k==="data"?this._worker.on(k,function(f){h.call(m,f.data,f.meta)}):this._worker.on(k,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(k){if(a.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new y(this,{objectMode:this._outputType!=="nodebuffer"},k)}},r.exports=d},{"../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"),u=t("./stream/GenericWorker"),g=new Array(256),_=0;_<256;_++)g[_]=252<=_?6:248<=_?5:240<=_?4:224<=_?3:192<=_?2:1;g[254]=g[254]=1;function y(){u.call(this,"utf-8 decode"),this.leftOver=null}function w(){u.call(this,"utf-8 encode")}n.utf8encode=function(d){return i.nodebuffer?o.newBufferFrom(d,"utf-8"):function(k){var h,m,f,v,x,A=k.length,P=0;for(v=0;v<A;v++)(64512&(m=k.charCodeAt(v)))==55296&&v+1<A&&(64512&(f=k.charCodeAt(v+1)))==56320&&(m=65536+(m-55296<<10)+(f-56320),v++),P+=m<128?1:m<2048?2:m<65536?3:4;for(h=i.uint8array?new Uint8Array(P):new Array(P),v=x=0;x<P;v++)(64512&(m=k.charCodeAt(v)))==55296&&v+1<A&&(64512&(f=k.charCodeAt(v+1)))==56320&&(m=65536+(m-55296<<10)+(f-56320),v++),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}(d)},n.utf8decode=function(d){return i.nodebuffer?a.transformTo("nodebuffer",d).toString("utf-8"):function(k){var h,m,f,v,x=k.length,A=new Array(2*x);for(h=m=0;h<x;)if((f=k[h++])<128)A[m++]=f;else if(4<(v=g[f]))A[m++]=65533,h+=v-1;else{for(f&=v===2?31:v===3?15:7;1<v&&h<x;)f=f<<6|63&k[h++],v--;1<v?A[m++]=65533:f<65536?A[m++]=f:(f-=65536,A[m++]=55296|f>>10&1023,A[m++]=56320|1023&f)}return A.length!==m&&(A.subarray?A=A.subarray(0,m):A.length=m),a.applyFromCharCode(A)}(d=a.transformTo(i.uint8array?"uint8array":"array",d))},a.inherits(y,u),y.prototype.processChunk=function(d){var k=a.transformTo(i.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var h=k;(k=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),k.set(h,this.leftOver.length)}else k=this.leftOver.concat(k);this.leftOver=null}var m=function(v,x){var A;for((x=x||v.length)>v.length&&(x=v.length),A=x-1;0<=A&&(192&v[A])==128;)A--;return A<0||A===0?x:A+g[v[A]]>x?A:x}(k),f=k;m!==k.length&&(i.uint8array?(f=k.subarray(0,m),this.leftOver=k.subarray(m,k.length)):(f=k.slice(0,m),this.leftOver=k.slice(m,k.length))),this.push({data:n.utf8decode(f),meta:d.meta})},y.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=y,a.inherits(w,u),w.prototype.processChunk=function(d){this.push({data:n.utf8encode(d.data),meta:d.meta})},n.Utf8EncodeWorker=w},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,n){var a=t("./support"),i=t("./base64"),o=t("./nodejsUtils"),u=t("./external");function g(h){return h}function _(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 y={stringifyByChunk:function(h,m,f){var v=[],x=0,A=h.length;if(A<=f)return String.fromCharCode.apply(null,h);for(;x<A;)m==="array"||m==="nodebuffer"?v.push(String.fromCharCode.apply(null,h.slice(x,Math.min(x+f,A)))):v.push(String.fromCharCode.apply(null,h.subarray(x,Math.min(x+f,A)))),x+=f;return v.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 w(h){var m=65536,f=n.getTypeOf(h),v=!0;if(f==="uint8array"?v=y.applyCanBeUsed.uint8array:f==="nodebuffer"&&(v=y.applyCanBeUsed.nodebuffer),v)for(;1<m;)try{return y.stringifyByChunk(h,f,m)}catch{m=Math.floor(m/2)}return y.stringifyByChar(h)}function d(h,m){for(var f=0;f<h.length;f++)m[f]=h[f];return m}n.applyFromCharCode=w;var k={};k.string={string:g,array:function(h){return _(h,new Array(h.length))},arraybuffer:function(h){return k.string.uint8array(h).buffer},uint8array:function(h){return _(h,new Uint8Array(h.length))},nodebuffer:function(h){return _(h,o.allocBuffer(h.length))}},k.array={string:w,array:g,arraybuffer:function(h){return new Uint8Array(h).buffer},uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return o.newBufferFrom(h)}},k.arraybuffer={string:function(h){return w(new Uint8Array(h))},array:function(h){return d(new Uint8Array(h),new Array(h.byteLength))},arraybuffer:g,uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return o.newBufferFrom(new Uint8Array(h))}},k.uint8array={string:w,array:function(h){return d(h,new Array(h.length))},arraybuffer:function(h){return h.buffer},uint8array:g,nodebuffer:function(h){return o.newBufferFrom(h)}},k.nodebuffer={string:w,array:function(h){return d(h,new Array(h.length))},arraybuffer:function(h){return k.nodebuffer.uint8array(h).buffer},uint8array:function(h){return d(h,new Uint8Array(h.length))},nodebuffer:g},n.transformTo=function(h,m){if(m=m||"",!h)return m;n.checkSupport(h);var f=n.getTypeOf(m);return k[f][h](m)},n.resolve=function(h){for(var m=h.split("/"),f=[],v=0;v<m.length;v++){var x=m[v];x==="."||x===""&&v!==0&&v!==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,v="";for(f=0;f<(h||"").length;f++)v+="\\x"+((m=h.charCodeAt(f))<16?"0":"")+m.toString(16).toUpperCase();return v},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,v,x){return u.Promise.resolve(m).then(function(A){return a.blob&&(A instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(A))!==-1)&&typeof FileReader<"u"?new u.Promise(function(P,D){var T=new FileReader;T.onload=function(H){P(H.target.result)},T.onerror=function(H){D(H.target.error)},T.readAsArrayBuffer(A)}):A}).then(function(A){var P=n.getTypeOf(A);return P?(P==="arraybuffer"?A=n.transformTo("uint8array",A):P==="string"&&(x?A=i.decode(A):f&&v!==!0&&(A=function(D){return _(D,a.uint8array?new Uint8Array(D.length):new Array(D.length))}(A))),A):u.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"),u=t("./zipEntry"),g=t("./support");function _(y){this.files=[],this.loadOptions=y}_.prototype={checkSignature:function(y){if(!this.reader.readAndCheckSignature(y)){this.reader.index-=4;var w=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(w)+", expected "+i.pretty(y)+")")}},isSignature:function(y,w){var d=this.reader.index;this.reader.setIndex(y);var k=this.reader.readString(4)===w;return this.reader.setIndex(d),k},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 y=this.reader.readData(this.zipCommentLength),w=g.uint8array?"uint8array":"array",d=i.transformTo(w,y);this.zipComment=this.loadOptions.decodeFileName(d)},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 y,w,d,k=this.zip64EndOfCentralSize-44;0<k;)y=this.reader.readInt(2),w=this.reader.readInt(4),d=this.reader.readData(w),this.zip64ExtensibleData[y]={id:y,length:w,value:d}},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 y,w;for(y=0;y<this.files.length;y++)w=this.files[y],this.reader.setIndex(w.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),w.readLocalPart(this.reader),w.handleUTF8(),w.processAttributes()},readCentralDir:function(){var y;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(y=new u({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(y);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 y=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(y<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(y);var w=y;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,(y=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(y),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 d=this.centralDirOffset+this.centralDirSize;this.zip64&&(d+=20,d+=12+this.zip64EndOfCentralSize);var k=w-d;if(0<k)this.isSignature(w,o.CENTRAL_FILE_HEADER)||(this.reader.zero=k);else if(k<0)throw new Error("Corrupted zip: missing "+Math.abs(k)+" bytes.")},prepareReader:function(y){this.reader=a(y)},load:function(y){this.prepareReader(y),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=_},{"./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"),u=t("./crc32"),g=t("./utf8"),_=t("./compressions"),y=t("./support");function w(d,k){this.options=d,this.loadOptions=k}w.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(d){var k,h;if(d.skip(22),this.fileNameLength=d.readInt(2),h=d.readInt(2),this.fileName=d.readData(this.fileNameLength),d.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((k=function(m){for(var f in _)if(Object.prototype.hasOwnProperty.call(_,f)&&_[f].magic===m)return _[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,k,d.readData(this.compressedSize))},readCentralPart:function(d){this.versionMadeBy=d.readInt(2),d.skip(2),this.bitFlag=d.readInt(2),this.compressionMethod=d.readString(2),this.date=d.readDate(),this.crc32=d.readInt(4),this.compressedSize=d.readInt(4),this.uncompressedSize=d.readInt(4);var k=d.readInt(2);if(this.extraFieldsLength=d.readInt(2),this.fileCommentLength=d.readInt(2),this.diskNumberStart=d.readInt(2),this.internalFileAttributes=d.readInt(2),this.externalFileAttributes=d.readInt(4),this.localHeaderOffset=d.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");d.skip(k),this.readExtraFields(d),this.parseZIP64ExtraField(d),this.fileComment=d.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var d=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),d==0&&(this.dosPermissions=63&this.externalFileAttributes),d==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var d=a(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=d.readInt(4))}},readExtraFields:function(d){var k,h,m,f=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4<f;)k=d.readInt(2),h=d.readInt(2),m=d.readData(h),this.extraFields[k]={id:k,length:h,value:m};d.setIndex(f)},handleUTF8:function(){var d=y.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=g.utf8decode(this.fileName),this.fileCommentStr=g.utf8decode(this.fileComment);else{var k=this.findExtraFieldUnicodePath();if(k!==null)this.fileNameStr=k;else{var h=i.transformTo(d,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var m=this.findExtraFieldUnicodeComment();if(m!==null)this.fileCommentStr=m;else{var f=i.transformTo(d,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(f)}}},findExtraFieldUnicodePath:function(){var d=this.extraFields[28789];if(d){var k=a(d.value);return k.readInt(1)!==1||u(this.fileName)!==k.readInt(4)?null:g.utf8decode(k.readData(d.length-5))}return null},findExtraFieldUnicodeComment:function(){var d=this.extraFields[25461];if(d){var k=a(d.value);return k.readInt(1)!==1||u(this.fileComment)!==k.readInt(4)?null:g.utf8decode(k.readData(d.length-5))}return null}},r.exports=w},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,r,n){function a(k,h,m){this.name=k,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"),u=t("./utf8"),g=t("./compressedObject"),_=t("./stream/GenericWorker");a.prototype={internalStream:function(k){var h=null,m="string";try{if(!k)throw new Error("No output type specified.");var f=(m=k.toLowerCase())==="string"||m==="text";m!=="binarystring"&&m!=="text"||(m="string"),h=this._decompressWorker();var v=!this._dataBinary;v&&!f&&(h=h.pipe(new u.Utf8EncodeWorker)),!v&&f&&(h=h.pipe(new u.Utf8DecodeWorker))}catch(x){(h=new _("error")).error(x)}return new i(h,m,"")},async:function(k,h){return this.internalStream(k).accumulate(h)},nodeStream:function(k,h){return this.internalStream(k||"nodebuffer").toNodejsStream(h)},_compressWorker:function(k,h){if(this._data instanceof g&&this._data.compression.magic===k.magic)return this._data.getCompressedWorker();var m=this._decompressWorker();return this._dataBinary||(m=m.pipe(new u.Utf8EncodeWorker)),g.createWorkerFrom(m,k,h)},_decompressWorker:function(){return this._data instanceof g?this._data.getContentWorker():this._data instanceof _?this._data:new o(this._data)}};for(var y=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],w=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<y.length;d++)a.prototype[y[d]]=w;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,u=a.MutationObserver||a.WebKitMutationObserver;if(u){var g=0,_=new u(k),y=a.document.createTextNode("");_.observe(y,{characterData:!0}),i=function(){y.data=g=++g%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(){k(),h.onreadystatechange=null,h.parentNode.removeChild(h),h=null},a.document.documentElement.appendChild(h)}:function(){setTimeout(k,0)};else{var w=new a.MessageChannel;w.port1.onmessage=k,i=function(){w.port2.postMessage(0)}}var d=[];function k(){var h,m;o=!0;for(var f=d.length;f;){for(m=d,d=[],h=-1;++h<f;)m[h]();f=d.length}o=!1}r.exports=function(h){d.push(h)!==1||o||i()}}).call(this,typeof Ft<"u"?Ft:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(t,r,n){var a=t("immediate");function i(){}var o={},u=["REJECTED"],g=["FULFILLED"],_=["PENDING"];function y(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=_,this.queue=[],this.outcome=void 0,f!==i&&h(this,f)}function w(f,v,x){this.promise=f,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof x=="function"&&(this.onRejected=x,this.callRejected=this.otherCallRejected)}function d(f,v,x){a(function(){var A;try{A=v(x)}catch(P){return o.reject(f,P)}A===f?o.reject(f,new TypeError("Cannot resolve promise with itself")):o.resolve(f,A)})}function k(f){var v=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof v=="function")return function(){v.apply(f,arguments)}}function h(f,v){var x=!1;function A(T){x||(x=!0,o.reject(f,T))}function P(T){x||(x=!0,o.resolve(f,T))}var D=m(function(){v(P,A)});D.status==="error"&&A(D.value)}function m(f,v){var x={};try{x.value=f(v),x.status="success"}catch(A){x.status="error",x.value=A}return x}(r.exports=y).prototype.finally=function(f){if(typeof f!="function")return this;var v=this.constructor;return this.then(function(x){return v.resolve(f()).then(function(){return x})},function(x){return v.resolve(f()).then(function(){throw x})})},y.prototype.catch=function(f){return this.then(null,f)},y.prototype.then=function(f,v){if(typeof f!="function"&&this.state===g||typeof v!="function"&&this.state===u)return this;var x=new this.constructor(i);return this.state!==_?d(x,this.state===g?f:v,this.outcome):this.queue.push(new w(x,f,v)),x},w.prototype.callFulfilled=function(f){o.resolve(this.promise,f)},w.prototype.otherCallFulfilled=function(f){d(this.promise,this.onFulfilled,f)},w.prototype.callRejected=function(f){o.reject(this.promise,f)},w.prototype.otherCallRejected=function(f){d(this.promise,this.onRejected,f)},o.resolve=function(f,v){var x=m(k,v);if(x.status==="error")return o.reject(f,x.value);var A=x.value;if(A)h(f,A);else{f.state=g,f.outcome=v;for(var P=-1,D=f.queue.length;++P<D;)f.queue[P].callFulfilled(v)}return f},o.reject=function(f,v){f.state=u,f.outcome=v;for(var x=-1,A=f.queue.length;++x<A;)f.queue[x].callRejected(v);return f},y.resolve=function(f){return f instanceof this?f:o.resolve(new this(i),f)},y.reject=function(f){var v=new this(i);return o.reject(v,f)},y.all=function(f){var v=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=f.length,A=!1;if(!x)return this.resolve([]);for(var P=new Array(x),D=0,T=-1,H=new this(i);++T<x;)F(f[T],T);return H;function F(X,Q){v.resolve(X).then(function(S){P[Q]=S,++D!==x||A||(A=!0,o.resolve(H,P))},function(S){A||(A=!0,o.reject(H,S))})}},y.race=function(f){var v=this;if(Object.prototype.toString.call(f)!=="[object Array]")return this.reject(new TypeError("must be an array"));var x=f.length,A=!1;if(!x)return this.resolve([]);for(var P=-1,D=new this(i);++P<x;)T=f[P],v.resolve(T).then(function(H){A||(A=!0,o.resolve(D,H))},function(H){A||(A=!0,o.reject(D,H))});var T;return D}},{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"),u=t("./zlib/messages"),g=t("./zlib/zstream"),_=Object.prototype.toString,y=0,w=-1,d=0,k=8;function h(f){if(!(this instanceof h))return new h(f);this.options=i.assign({level:w,method:k,chunkSize:16384,windowBits:15,memLevel:8,strategy:d,to:""},f||{});var v=this.options;v.raw&&0<v.windowBits?v.windowBits=-v.windowBits:v.gzip&&0<v.windowBits&&v.windowBits<16&&(v.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new g,this.strm.avail_out=0;var x=a.deflateInit2(this.strm,v.level,v.method,v.windowBits,v.memLevel,v.strategy);if(x!==y)throw new Error(u[x]);if(v.header&&a.deflateSetHeader(this.strm,v.header),v.dictionary){var A;if(A=typeof v.dictionary=="string"?o.string2buf(v.dictionary):_.call(v.dictionary)==="[object ArrayBuffer]"?new Uint8Array(v.dictionary):v.dictionary,(x=a.deflateSetDictionary(this.strm,A))!==y)throw new Error(u[x]);this._dict_set=!0}}function m(f,v){var x=new h(v);if(x.push(f,!0),x.err)throw x.msg||u[x.err];return x.result}h.prototype.push=function(f,v){var x,A,P=this.strm,D=this.options.chunkSize;if(this.ended)return!1;A=v===~~v?v:v===!0?4:0,typeof f=="string"?P.input=o.string2buf(f):_.call(f)==="[object ArrayBuffer]"?P.input=new Uint8Array(f):P.input=f,P.next_in=0,P.avail_in=P.input.length;do{if(P.avail_out===0&&(P.output=new i.Buf8(D),P.next_out=0,P.avail_out=D),(x=a.deflate(P,A))!==1&&x!==y)return this.onEnd(x),!(this.ended=!0);P.avail_out!==0&&(P.avail_in!==0||A!==4&&A!==2)||(this.options.to==="string"?this.onData(o.buf2binstring(i.shrinkBuf(P.output,P.next_out))):this.onData(i.shrinkBuf(P.output,P.next_out)))}while((0<P.avail_in||P.avail_out===0)&&x!==1);return A===4?(x=a.deflateEnd(this.strm),this.onEnd(x),this.ended=!0,x===y):A!==2||(this.onEnd(y),!(P.avail_out=0))},h.prototype.onData=function(f){this.chunks.push(f)},h.prototype.onEnd=function(f){f===y&&(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,v){return(v=v||{}).raw=!0,m(f,v)},n.gzip=function(f,v){return(v=v||{}).gzip=!0,m(f,v)}},{"./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"),u=t("./zlib/constants"),g=t("./zlib/messages"),_=t("./zlib/zstream"),y=t("./zlib/gzheader"),w=Object.prototype.toString;function d(h){if(!(this instanceof d))return new d(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)==0&&(m.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _,this.strm.avail_out=0;var f=a.inflateInit2(this.strm,m.windowBits);if(f!==u.Z_OK)throw new Error(g[f]);this.header=new y,a.inflateGetHeader(this.strm,this.header)}function k(h,m){var f=new d(m);if(f.push(h,!0),f.err)throw f.msg||g[f.err];return f.result}d.prototype.push=function(h,m){var f,v,x,A,P,D,T=this.strm,H=this.options.chunkSize,F=this.options.dictionary,X=!1;if(this.ended)return!1;v=m===~~m?m:m===!0?u.Z_FINISH:u.Z_NO_FLUSH,typeof h=="string"?T.input=o.binstring2buf(h):w.call(h)==="[object ArrayBuffer]"?T.input=new Uint8Array(h):T.input=h,T.next_in=0,T.avail_in=T.input.length;do{if(T.avail_out===0&&(T.output=new i.Buf8(H),T.next_out=0,T.avail_out=H),(f=a.inflate(T,u.Z_NO_FLUSH))===u.Z_NEED_DICT&&F&&(D=typeof F=="string"?o.string2buf(F):w.call(F)==="[object ArrayBuffer]"?new Uint8Array(F):F,f=a.inflateSetDictionary(this.strm,D)),f===u.Z_BUF_ERROR&&X===!0&&(f=u.Z_OK,X=!1),f!==u.Z_STREAM_END&&f!==u.Z_OK)return this.onEnd(f),!(this.ended=!0);T.next_out&&(T.avail_out!==0&&f!==u.Z_STREAM_END&&(T.avail_in!==0||v!==u.Z_FINISH&&v!==u.Z_SYNC_FLUSH)||(this.options.to==="string"?(x=o.utf8border(T.output,T.next_out),A=T.next_out-x,P=o.buf2string(T.output,x),T.next_out=A,T.avail_out=H-A,A&&i.arraySet(T.output,T.output,x,A,0),this.onData(P)):this.onData(i.shrinkBuf(T.output,T.next_out)))),T.avail_in===0&&T.avail_out===0&&(X=!0)}while((0<T.avail_in||T.avail_out===0)&&f!==u.Z_STREAM_END);return f===u.Z_STREAM_END&&(v=u.Z_FINISH),v===u.Z_FINISH?(f=a.inflateEnd(this.strm),this.onEnd(f),this.ended=!0,f===u.Z_OK):v!==u.Z_SYNC_FLUSH||(this.onEnd(u.Z_OK),!(T.avail_out=0))},d.prototype.onData=function(h){this.chunks.push(h)},d.prototype.onEnd=function(h){h===u.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=d,n.inflate=k,n.inflateRaw=function(h,m){return(m=m||{}).raw=!0,k(h,m)},n.ungzip=k},{"./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(u){for(var g=Array.prototype.slice.call(arguments,1);g.length;){var _=g.shift();if(_){if(typeof _!="object")throw new TypeError(_+"must be non-object");for(var y in _)_.hasOwnProperty(y)&&(u[y]=_[y])}}return u},n.shrinkBuf=function(u,g){return u.length===g?u:u.subarray?u.subarray(0,g):(u.length=g,u)};var i={arraySet:function(u,g,_,y,w){if(g.subarray&&u.subarray)u.set(g.subarray(_,_+y),w);else for(var d=0;d<y;d++)u[w+d]=g[_+d]},flattenChunks:function(u){var g,_,y,w,d,k;for(g=y=0,_=u.length;g<_;g++)y+=u[g].length;for(k=new Uint8Array(y),g=w=0,_=u.length;g<_;g++)d=u[g],k.set(d,w),w+=d.length;return k}},o={arraySet:function(u,g,_,y,w){for(var d=0;d<y;d++)u[w+d]=g[_+d]},flattenChunks:function(u){return[].concat.apply([],u)}};n.setTyped=function(u){u?(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 u=new a.Buf8(256),g=0;g<256;g++)u[g]=252<=g?6:248<=g?5:240<=g?4:224<=g?3:192<=g?2:1;function _(y,w){if(w<65537&&(y.subarray&&o||!y.subarray&&i))return String.fromCharCode.apply(null,a.shrinkBuf(y,w));for(var d="",k=0;k<w;k++)d+=String.fromCharCode(y[k]);return d}u[254]=u[254]=1,n.string2buf=function(y){var w,d,k,h,m,f=y.length,v=0;for(h=0;h<f;h++)(64512&(d=y.charCodeAt(h)))==55296&&h+1<f&&(64512&(k=y.charCodeAt(h+1)))==56320&&(d=65536+(d-55296<<10)+(k-56320),h++),v+=d<128?1:d<2048?2:d<65536?3:4;for(w=new a.Buf8(v),h=m=0;m<v;h++)(64512&(d=y.charCodeAt(h)))==55296&&h+1<f&&(64512&(k=y.charCodeAt(h+1)))==56320&&(d=65536+(d-55296<<10)+(k-56320),h++),d<128?w[m++]=d:(d<2048?w[m++]=192|d>>>6:(d<65536?w[m++]=224|d>>>12:(w[m++]=240|d>>>18,w[m++]=128|d>>>12&63),w[m++]=128|d>>>6&63),w[m++]=128|63&d);return w},n.buf2binstring=function(y){return _(y,y.length)},n.binstring2buf=function(y){for(var w=new a.Buf8(y.length),d=0,k=w.length;d<k;d++)w[d]=y.charCodeAt(d);return w},n.buf2string=function(y,w){var d,k,h,m,f=w||y.length,v=new Array(2*f);for(d=k=0;d<f;)if((h=y[d++])<128)v[k++]=h;else if(4<(m=u[h]))v[k++]=65533,d+=m-1;else{for(h&=m===2?31:m===3?15:7;1<m&&d<f;)h=h<<6|63&y[d++],m--;1<m?v[k++]=65533:h<65536?v[k++]=h:(h-=65536,v[k++]=55296|h>>10&1023,v[k++]=56320|1023&h)}return _(v,k)},n.utf8border=function(y,w){var d;for((w=w||y.length)>y.length&&(w=y.length),d=w-1;0<=d&&(192&y[d])==128;)d--;return d<0||d===0?w:d+u[y[d]]>w?d:w}},{"./common":41}],43:[function(t,r,n){r.exports=function(a,i,o,u){for(var g=65535&a|0,_=a>>>16&65535|0,y=0;o!==0;){for(o-=y=2e3<o?2e3:o;_=_+(g=g+i[u++]|0)|0,--y;);g%=65521,_%=65521}return g|_<<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=[],u=0;u<256;u++){i=u;for(var g=0;g<8;g++)i=1&i?3988292384^i>>>1:i>>>1;o[u]=i}return o}();r.exports=function(i,o,u,g){var _=a,y=g+u;i^=-1;for(var w=g;w<y;w++)i=i>>>8^_[255&(i^o[w])];return-1^i}},{}],46:[function(t,r,n){var a,i=t("../utils/common"),o=t("./trees"),u=t("./adler32"),g=t("./crc32"),_=t("./messages"),y=0,w=4,d=0,k=-2,h=-1,m=4,f=2,v=8,x=9,A=286,P=30,D=19,T=2*A+1,H=15,F=3,X=258,Q=X+F+1,S=42,I=113,l=1,L=2,et=3,W=4;function rt(s,O){return s.msg=_[O],O}function $(s){return(s<<1)-(4<s?9:0)}function tt(s){for(var O=s.length;0<=--O;)s[O]=0}function B(s){var O=s.state,M=O.pending;M>s.avail_out&&(M=s.avail_out),M!==0&&(i.arraySet(s.output,O.pending_buf,O.pending_out,M,s.next_out),s.next_out+=M,O.pending_out+=M,s.total_out+=M,s.avail_out-=M,O.pending-=M,O.pending===0&&(O.pending_out=0))}function z(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,B(s.strm)}function J(s,O){s.pending_buf[s.pending++]=O}function K(s,O){s.pending_buf[s.pending++]=O>>>8&255,s.pending_buf[s.pending++]=255&O}function G(s,O){var M,b,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,q=s.w_mask,V=s.prev,Y=s.strstart+X,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[(M=O)+j]===st&&Z[M+j-1]===ot&&Z[M]===Z[C]&&Z[++M]===Z[C+1]){C+=2,M++;do;while(Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&Z[++C]===Z[++M]&&C<Y);if(b=X-(Y-C),C=Y-X,j<b){if(s.match_start=O,U<=(j=b))break;ot=Z[C+j-1],st=Z[C+j]}}while((O=V[O&q])>N&&--p!=0);return j<=s.lookahead?j:s.lookahead}function ut(s){var O,M,b,p,C,j,U,N,Z,q,V=s.w_size;do{if(p=s.window_size-s.lookahead-s.strstart,s.strstart>=V+(V-Q)){for(i.arraySet(s.window,s.window,V,V,0),s.match_start-=V,s.strstart-=V,s.block_start-=V,O=M=s.hash_size;b=s.head[--O],s.head[O]=V<=b?b-V:0,--M;);for(O=M=V;b=s.prev[--O],s.prev[O]=V<=b?b-V:0,--M;);p+=V}if(s.strm.avail_in===0)break;if(j=s.strm,U=s.window,N=s.strstart+s.lookahead,Z=p,q=void 0,q=j.avail_in,Z<q&&(q=Z),M=q===0?0:(j.avail_in-=q,i.arraySet(U,j.input,j.next_in,q,N),j.state.wrap===1?j.adler=u(j.adler,U,q,N):j.state.wrap===2&&(j.adler=g(j.adler,U,q,N)),j.next_in+=q,j.total_in+=q,q),s.lookahead+=M,s.lookahead+s.insert>=F)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+F-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<F)););}while(s.lookahead<Q&&s.strm.avail_in!==0)}function bt(s,O){for(var M,b;;){if(s.lookahead<Q){if(ut(s),s.lookahead<Q&&O===y)return l;if(s.lookahead===0)break}if(M=0,s.lookahead>=F&&(s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+F-1])&s.hash_mask,M=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=s.strstart),M!==0&&s.strstart-M<=s.w_size-Q&&(s.match_length=G(s,M)),s.match_length>=F)if(b=o._tr_tally(s,s.strstart-s.match_start,s.match_length-F),s.lookahead-=s.match_length,s.match_length<=s.max_lazy_match&&s.lookahead>=F){for(s.match_length--;s.strstart++,s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+F-1])&s.hash_mask,M=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 b=o._tr_tally(s,0,s.window[s.strstart]),s.lookahead--,s.strstart++;if(b&&(z(s,!1),s.strm.avail_out===0))return l}return s.insert=s.strstart<F-1?s.strstart:F-1,O===w?(z(s,!0),s.strm.avail_out===0?et:W):s.last_lit&&(z(s,!1),s.strm.avail_out===0)?l:L}function nt(s,O){for(var M,b,p;;){if(s.lookahead<Q){if(ut(s),s.lookahead<Q&&O===y)return l;if(s.lookahead===0)break}if(M=0,s.lookahead>=F&&(s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+F-1])&s.hash_mask,M=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=F-1,M!==0&&s.prev_length<s.max_lazy_match&&s.strstart-M<=s.w_size-Q&&(s.match_length=G(s,M),s.match_length<=5&&(s.strategy===1||s.match_length===F&&4096<s.strstart-s.match_start)&&(s.match_length=F-1)),s.prev_length>=F&&s.match_length<=s.prev_length){for(p=s.strstart+s.lookahead-F,b=o._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-F),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+F-1])&s.hash_mask,M=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=F-1,s.strstart++,b&&(z(s,!1),s.strm.avail_out===0))return l}else if(s.match_available){if((b=o._tr_tally(s,0,s.window[s.strstart-1]))&&z(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&&(b=o._tr_tally(s,0,s.window[s.strstart-1]),s.match_available=0),s.insert=s.strstart<F-1?s.strstart:F-1,O===w?(z(s,!0),s.strm.avail_out===0?et:W):s.last_lit&&(z(s,!1),s.strm.avail_out===0)?l:L}function it(s,O,M,b,p){this.good_length=s,this.max_lazy=O,this.nice_length=M,this.max_chain=b,this.func=p}function gt(){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=v,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*T),this.dyn_dtree=new i.Buf16(2*(2*P+1)),this.bl_tree=new i.Buf16(2*(2*D+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*A+1),tt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(2*A+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 dt(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:I,s.adler=O.wrap===2?0:1,O.last_flush=y,o._tr_init(O),d):rt(s,k)}function _t(s){var O=dt(s);return O===d&&function(M){M.window_size=2*M.w_size,tt(M.head),M.max_lazy_match=a[M.level].max_lazy,M.good_match=a[M.level].good_length,M.nice_match=a[M.level].nice_length,M.max_chain_length=a[M.level].max_chain,M.strstart=0,M.block_start=0,M.lookahead=0,M.insert=0,M.match_length=M.prev_length=F-1,M.match_available=0,M.ins_h=0}(s.state),O}function kt(s,O,M,b,p,C){if(!s)return k;var j=1;if(O===h&&(O=6),b<0?(j=0,b=-b):15<b&&(j=2,b-=16),p<1||x<p||M!==v||b<8||15<b||O<0||9<O||C<0||m<C)return rt(s,k);b===8&&(b=9);var U=new gt;return(s.state=U).strm=s,U.wrap=j,U.gzhead=null,U.w_bits=b,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+F-1)/F),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=M,_t(s)}a=[new it(0,0,0,0,function(s,O){var M=65535;for(M>s.pending_buf_size-5&&(M=s.pending_buf_size-5);;){if(s.lookahead<=1){if(ut(s),s.lookahead===0&&O===y)return l;if(s.lookahead===0)break}s.strstart+=s.lookahead,s.lookahead=0;var b=s.block_start+M;if((s.strstart===0||s.strstart>=b)&&(s.lookahead=s.strstart-b,s.strstart=b,z(s,!1),s.strm.avail_out===0)||s.strstart-s.block_start>=s.w_size-Q&&(z(s,!1),s.strm.avail_out===0))return l}return s.insert=0,O===w?(z(s,!0),s.strm.avail_out===0?et:W):(s.strstart>s.block_start&&(z(s,!1),s.strm.avail_out),l)}),new it(4,4,8,4,bt),new it(4,5,16,8,bt),new it(4,6,32,32,bt),new it(4,4,16,16,nt),new it(8,16,32,32,nt),new it(8,16,128,128,nt),new it(8,32,128,256,nt),new it(32,128,258,1024,nt),new it(32,258,258,4096,nt)],n.deflateInit=function(s,O){return kt(s,O,v,15,8,0)},n.deflateInit2=kt,n.deflateReset=_t,n.deflateResetKeep=dt,n.deflateSetHeader=function(s,O){return s&&s.state?s.state.wrap!==2?k:(s.state.gzhead=O,d):k},n.deflate=function(s,O){var M,b,p,C;if(!s||!s.state||5<O||O<0)return s?rt(s,k):k;if(b=s.state,!s.output||!s.input&&s.avail_in!==0||b.status===666&&O!==w)return rt(s,s.avail_out===0?-5:k);if(b.strm=s,M=b.last_flush,b.last_flush=O,b.status===S)if(b.wrap===2)s.adler=0,J(b,31),J(b,139),J(b,8),b.gzhead?(J(b,(b.gzhead.text?1:0)+(b.gzhead.hcrc?2:0)+(b.gzhead.extra?4:0)+(b.gzhead.name?8:0)+(b.gzhead.comment?16:0)),J(b,255&b.gzhead.time),J(b,b.gzhead.time>>8&255),J(b,b.gzhead.time>>16&255),J(b,b.gzhead.time>>24&255),J(b,b.level===9?2:2<=b.strategy||b.level<2?4:0),J(b,255&b.gzhead.os),b.gzhead.extra&&b.gzhead.extra.length&&(J(b,255&b.gzhead.extra.length),J(b,b.gzhead.extra.length>>8&255)),b.gzhead.hcrc&&(s.adler=g(s.adler,b.pending_buf,b.pending,0)),b.gzindex=0,b.status=69):(J(b,0),J(b,0),J(b,0),J(b,0),J(b,0),J(b,b.level===9?2:2<=b.strategy||b.level<2?4:0),J(b,3),b.status=I);else{var j=v+(b.w_bits-8<<4)<<8;j|=(2<=b.strategy||b.level<2?0:b.level<6?1:b.level===6?2:3)<<6,b.strstart!==0&&(j|=32),j+=31-j%31,b.status=I,K(b,j),b.strstart!==0&&(K(b,s.adler>>>16),K(b,65535&s.adler)),s.adler=1}if(b.status===69)if(b.gzhead.extra){for(p=b.pending;b.gzindex<(65535&b.gzhead.extra.length)&&(b.pending!==b.pending_buf_size||(b.gzhead.hcrc&&b.pending>p&&(s.adler=g(s.adler,b.pending_buf,b.pending-p,p)),B(s),p=b.pending,b.pending!==b.pending_buf_size));)J(b,255&b.gzhead.extra[b.gzindex]),b.gzindex++;b.gzhead.hcrc&&b.pending>p&&(s.adler=g(s.adler,b.pending_buf,b.pending-p,p)),b.gzindex===b.gzhead.extra.length&&(b.gzindex=0,b.status=73)}else b.status=73;if(b.status===73)if(b.gzhead.name){p=b.pending;do{if(b.pending===b.pending_buf_size&&(b.gzhead.hcrc&&b.pending>p&&(s.adler=g(s.adler,b.pending_buf,b.pending-p,p)),B(s),p=b.pending,b.pending===b.pending_buf_size)){C=1;break}C=b.gzindex<b.gzhead.name.length?255&b.gzhead.name.charCodeAt(b.gzindex++):0,J(b,C)}while(C!==0);b.gzhead.hcrc&&b.pending>p&&(s.adler=g(s.adler,b.pending_buf,b.pending-p,p)),C===0&&(b.gzindex=0,b.status=91)}else b.status=91;if(b.status===91)if(b.gzhead.comment){p=b.pending;do{if(b.pending===b.pending_buf_size&&(b.gzhead.hcrc&&b.pending>p&&(s.adler=g(s.adler,b.pending_buf,b.pending-p,p)),B(s),p=b.pending,b.pending===b.pending_buf_size)){C=1;break}C=b.gzindex<b.gzhead.comment.length?255&b.gzhead.comment.charCodeAt(b.gzindex++):0,J(b,C)}while(C!==0);b.gzhead.hcrc&&b.pending>p&&(s.adler=g(s.adler,b.pending_buf,b.pending-p,p)),C===0&&(b.status=103)}else b.status=103;if(b.status===103&&(b.gzhead.hcrc?(b.pending+2>b.pending_buf_size&&B(s),b.pending+2<=b.pending_buf_size&&(J(b,255&s.adler),J(b,s.adler>>8&255),s.adler=0,b.status=I)):b.status=I),b.pending!==0){if(B(s),s.avail_out===0)return b.last_flush=-1,d}else if(s.avail_in===0&&$(O)<=$(M)&&O!==w)return rt(s,-5);if(b.status===666&&s.avail_in!==0)return rt(s,-5);if(s.avail_in!==0||b.lookahead!==0||O!==y&&b.status!==666){var U=b.strategy===2?function(N,Z){for(var q;;){if(N.lookahead===0&&(ut(N),N.lookahead===0)){if(Z===y)return l;break}if(N.match_length=0,q=o._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++,q&&(z(N,!1),N.strm.avail_out===0))return l}return N.insert=0,Z===w?(z(N,!0),N.strm.avail_out===0?et:W):N.last_lit&&(z(N,!1),N.strm.avail_out===0)?l:L}(b,O):b.strategy===3?function(N,Z){for(var q,V,Y,ot,st=N.window;;){if(N.lookahead<=X){if(ut(N),N.lookahead<=X&&Z===y)return l;if(N.lookahead===0)break}if(N.match_length=0,N.lookahead>=F&&0<N.strstart&&(V=st[Y=N.strstart-1])===st[++Y]&&V===st[++Y]&&V===st[++Y]){ot=N.strstart+X;do;while(V===st[++Y]&&V===st[++Y]&&V===st[++Y]&&V===st[++Y]&&V===st[++Y]&&V===st[++Y]&&V===st[++Y]&&V===st[++Y]&&Y<ot);N.match_length=X-(ot-Y),N.match_length>N.lookahead&&(N.match_length=N.lookahead)}if(N.match_length>=F?(q=o._tr_tally(N,1,N.match_length-F),N.lookahead-=N.match_length,N.strstart+=N.match_length,N.match_length=0):(q=o._tr_tally(N,0,N.window[N.strstart]),N.lookahead--,N.strstart++),q&&(z(N,!1),N.strm.avail_out===0))return l}return N.insert=0,Z===w?(z(N,!0),N.strm.avail_out===0?et:W):N.last_lit&&(z(N,!1),N.strm.avail_out===0)?l:L}(b,O):a[b.level].func(b,O);if(U!==et&&U!==W||(b.status=666),U===l||U===et)return s.avail_out===0&&(b.last_flush=-1),d;if(U===L&&(O===1?o._tr_align(b):O!==5&&(o._tr_stored_block(b,0,0,!1),O===3&&(tt(b.head),b.lookahead===0&&(b.strstart=0,b.block_start=0,b.insert=0))),B(s),s.avail_out===0))return b.last_flush=-1,d}return O!==w?d:b.wrap<=0?1:(b.wrap===2?(J(b,255&s.adler),J(b,s.adler>>8&255),J(b,s.adler>>16&255),J(b,s.adler>>24&255),J(b,255&s.total_in),J(b,s.total_in>>8&255),J(b,s.total_in>>16&255),J(b,s.total_in>>24&255)):(K(b,s.adler>>>16),K(b,65535&s.adler)),B(s),0<b.wrap&&(b.wrap=-b.wrap),b.pending!==0?d: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!==I&&O!==666?rt(s,k):(s.state=null,O===I?rt(s,-3):d):k},n.deflateSetDictionary=function(s,O){var M,b,p,C,j,U,N,Z,q=O.length;if(!s||!s.state||(C=(M=s.state).wrap)===2||C===1&&M.status!==S||M.lookahead)return k;for(C===1&&(s.adler=u(s.adler,O,q,0)),M.wrap=0,q>=M.w_size&&(C===0&&(tt(M.head),M.strstart=0,M.block_start=0,M.insert=0),Z=new i.Buf8(M.w_size),i.arraySet(Z,O,q-M.w_size,M.w_size,0),O=Z,q=M.w_size),j=s.avail_in,U=s.next_in,N=s.input,s.avail_in=q,s.next_in=0,s.input=O,ut(M);M.lookahead>=F;){for(b=M.strstart,p=M.lookahead-(F-1);M.ins_h=(M.ins_h<<M.hash_shift^M.window[b+F-1])&M.hash_mask,M.prev[b&M.w_mask]=M.head[M.ins_h],M.head[M.ins_h]=b,b++,--p;);M.strstart=b,M.lookahead=F-1,ut(M)}return M.strstart+=M.lookahead,M.block_start=M.strstart,M.insert=M.lookahead,M.lookahead=0,M.match_length=M.prev_length=F-1,M.match_available=0,s.next_in=U,s.input=N,s.avail_in=j,M.wrap=C,d},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,u,g,_,y,w,d,k,h,m,f,v,x,A,P,D,T,H,F,X,Q,S,I,l,L;o=a.state,u=a.next_in,l=a.input,g=u+(a.avail_in-5),_=a.next_out,L=a.output,y=_-(i-a.avail_out),w=_+(a.avail_out-257),d=o.dmax,k=o.wsize,h=o.whave,m=o.wnext,f=o.window,v=o.hold,x=o.bits,A=o.lencode,P=o.distcode,D=(1<<o.lenbits)-1,T=(1<<o.distbits)-1;t:do{x<15&&(v+=l[u++]<<x,x+=8,v+=l[u++]<<x,x+=8),H=A[v&D];e:for(;;){if(v>>>=F=H>>>24,x-=F,(F=H>>>16&255)===0)L[_++]=65535&H;else{if(!(16&F)){if((64&F)==0){H=A[(65535&H)+(v&(1<<F)-1)];continue e}if(32&F){o.mode=12;break t}a.msg="invalid literal/length code",o.mode=30;break t}X=65535&H,(F&=15)&&(x<F&&(v+=l[u++]<<x,x+=8),X+=v&(1<<F)-1,v>>>=F,x-=F),x<15&&(v+=l[u++]<<x,x+=8,v+=l[u++]<<x,x+=8),H=P[v&T];r:for(;;){if(v>>>=F=H>>>24,x-=F,!(16&(F=H>>>16&255))){if((64&F)==0){H=P[(65535&H)+(v&(1<<F)-1)];continue r}a.msg="invalid distance code",o.mode=30;break t}if(Q=65535&H,x<(F&=15)&&(v+=l[u++]<<x,(x+=8)<F&&(v+=l[u++]<<x,x+=8)),d<(Q+=v&(1<<F)-1)){a.msg="invalid distance too far back",o.mode=30;break t}if(v>>>=F,x-=F,(F=_-y)<Q){if(h<(F=Q-F)&&o.sane){a.msg="invalid distance too far back",o.mode=30;break t}if(I=f,(S=0)===m){if(S+=k-F,F<X){for(X-=F;L[_++]=f[S++],--F;);S=_-Q,I=L}}else if(m<F){if(S+=k+m-F,(F-=m)<X){for(X-=F;L[_++]=f[S++],--F;);if(S=0,m<X){for(X-=F=m;L[_++]=f[S++],--F;);S=_-Q,I=L}}}else if(S+=m-F,F<X){for(X-=F;L[_++]=f[S++],--F;);S=_-Q,I=L}for(;2<X;)L[_++]=I[S++],L[_++]=I[S++],L[_++]=I[S++],X-=3;X&&(L[_++]=I[S++],1<X&&(L[_++]=I[S++]))}else{for(S=_-Q;L[_++]=L[S++],L[_++]=L[S++],L[_++]=L[S++],2<(X-=3););X&&(L[_++]=L[S++],1<X&&(L[_++]=L[S++]))}break}}break}}while(u<g&&_<w);u-=X=x>>3,v&=(1<<(x-=X<<3))-1,a.next_in=u,a.next_out=_,a.avail_in=u<g?g-u+5:5-(u-g),a.avail_out=_<w?w-_+257:257-(_-w),o.hold=v,o.bits=x}},{}],49:[function(t,r,n){var a=t("../utils/common"),i=t("./adler32"),o=t("./crc32"),u=t("./inffast"),g=t("./inftrees"),_=1,y=2,w=0,d=-2,k=1,h=852,m=592;function f(S){return(S>>>24&255)+(S>>>8&65280)+((65280&S)<<8)+((255&S)<<24)}function v(){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 I;return S&&S.state?(I=S.state,S.total_in=S.total_out=I.total=0,S.msg="",I.wrap&&(S.adler=1&I.wrap),I.mode=k,I.last=0,I.havedict=0,I.dmax=32768,I.head=null,I.hold=0,I.bits=0,I.lencode=I.lendyn=new a.Buf32(h),I.distcode=I.distdyn=new a.Buf32(m),I.sane=1,I.back=-1,w):d}function A(S){var I;return S&&S.state?((I=S.state).wsize=0,I.whave=0,I.wnext=0,x(S)):d}function P(S,I){var l,L;return S&&S.state?(L=S.state,I<0?(l=0,I=-I):(l=1+(I>>4),I<48&&(I&=15)),I&&(I<8||15<I)?d:(L.window!==null&&L.wbits!==I&&(L.window=null),L.wrap=l,L.wbits=I,A(S))):d}function D(S,I){var l,L;return S?(L=new v,(S.state=L).window=null,(l=P(S,I))!==w&&(S.state=null),l):d}var T,H,F=!0;function X(S){if(F){var I;for(T=new a.Buf32(512),H=new a.Buf32(32),I=0;I<144;)S.lens[I++]=8;for(;I<256;)S.lens[I++]=9;for(;I<280;)S.lens[I++]=7;for(;I<288;)S.lens[I++]=8;for(g(_,S.lens,0,288,T,0,S.work,{bits:9}),I=0;I<32;)S.lens[I++]=5;g(y,S.lens,0,32,H,0,S.work,{bits:5}),F=!1}S.lencode=T,S.lenbits=9,S.distcode=H,S.distbits=5}function Q(S,I,l,L){var et,W=S.state;return W.window===null&&(W.wsize=1<<W.wbits,W.wnext=0,W.whave=0,W.window=new a.Buf8(W.wsize)),L>=W.wsize?(a.arraySet(W.window,I,l-W.wsize,W.wsize,0),W.wnext=0,W.whave=W.wsize):(L<(et=W.wsize-W.wnext)&&(et=L),a.arraySet(W.window,I,l-L,et,W.wnext),(L-=et)?(a.arraySet(W.window,I,l-L,L,0),W.wnext=L,W.whave=W.wsize):(W.wnext+=et,W.wnext===W.wsize&&(W.wnext=0),W.whave<W.wsize&&(W.whave+=et))),0}n.inflateReset=A,n.inflateReset2=P,n.inflateResetKeep=x,n.inflateInit=function(S){return D(S,15)},n.inflateInit2=D,n.inflate=function(S,I){var l,L,et,W,rt,$,tt,B,z,J,K,G,ut,bt,nt,it,gt,dt,_t,kt,s,O,M,b,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 d;(l=S.state).mode===12&&(l.mode=13),rt=S.next_out,et=S.output,tt=S.avail_out,W=S.next_in,L=S.input,$=S.avail_in,B=l.hold,z=l.bits,J=$,K=tt,O=w;t:for(;;)switch(l.mode){case k:if(l.wrap===0){l.mode=13;break}for(;z<16;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(2&l.wrap&&B===35615){C[l.check=0]=255&B,C[1]=B>>>8&255,l.check=o(l.check,C,2,0),z=B=0,l.mode=2;break}if(l.flags=0,l.head&&(l.head.done=!1),!(1&l.wrap)||(((255&B)<<8)+(B>>8))%31){S.msg="incorrect header check",l.mode=30;break}if((15&B)!=8){S.msg="unknown compression method",l.mode=30;break}if(z-=4,s=8+(15&(B>>>=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&B?10:12,z=B=0;break;case 2:for(;z<16;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(l.flags=B,(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=B>>8&1),512&l.flags&&(C[0]=255&B,C[1]=B>>>8&255,l.check=o(l.check,C,2,0)),z=B=0,l.mode=3;case 3:for(;z<32;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}l.head&&(l.head.time=B),512&l.flags&&(C[0]=255&B,C[1]=B>>>8&255,C[2]=B>>>16&255,C[3]=B>>>24&255,l.check=o(l.check,C,4,0)),z=B=0,l.mode=4;case 4:for(;z<16;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}l.head&&(l.head.xflags=255&B,l.head.os=B>>8),512&l.flags&&(C[0]=255&B,C[1]=B>>>8&255,l.check=o(l.check,C,2,0)),z=B=0,l.mode=5;case 5:if(1024&l.flags){for(;z<16;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}l.length=B,l.head&&(l.head.extra_len=B),512&l.flags&&(C[0]=255&B,C[1]=B>>>8&255,l.check=o(l.check,C,2,0)),z=B=0}else l.head&&(l.head.extra=null);l.mode=6;case 6:if(1024&l.flags&&($<(G=l.length)&&(G=$),G&&(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,W,G,s)),512&l.flags&&(l.check=o(l.check,L,G,W)),$-=G,W+=G,l.length-=G),l.length))break t;l.length=0,l.mode=7;case 7:if(2048&l.flags){if($===0)break t;for(G=0;s=L[W+G++],l.head&&s&&l.length<65536&&(l.head.name+=String.fromCharCode(s)),s&&G<$;);if(512&l.flags&&(l.check=o(l.check,L,G,W)),$-=G,W+=G,s)break t}else l.head&&(l.head.name=null);l.length=0,l.mode=8;case 8:if(4096&l.flags){if($===0)break t;for(G=0;s=L[W+G++],l.head&&s&&l.length<65536&&(l.head.comment+=String.fromCharCode(s)),s&&G<$;);if(512&l.flags&&(l.check=o(l.check,L,G,W)),$-=G,W+=G,s)break t}else l.head&&(l.head.comment=null);l.mode=9;case 9:if(512&l.flags){for(;z<16;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(B!==(65535&l.check)){S.msg="header crc mismatch",l.mode=30;break}z=B=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(;z<32;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}S.adler=l.check=f(B),z=B=0,l.mode=11;case 11:if(l.havedict===0)return S.next_out=rt,S.avail_out=tt,S.next_in=W,S.avail_in=$,l.hold=B,l.bits=z,2;S.adler=l.check=1,l.mode=12;case 12:if(I===5||I===6)break t;case 13:if(l.last){B>>>=7&z,z-=7&z,l.mode=27;break}for(;z<3;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}switch(l.last=1&B,z-=1,3&(B>>>=1)){case 0:l.mode=14;break;case 1:if(X(l),l.mode=20,I!==6)break;B>>>=2,z-=2;break t;case 2:l.mode=17;break;case 3:S.msg="invalid block type",l.mode=30}B>>>=2,z-=2;break;case 14:for(B>>>=7&z,z-=7&z;z<32;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if((65535&B)!=(B>>>16^65535)){S.msg="invalid stored block lengths",l.mode=30;break}if(l.length=65535&B,z=B=0,l.mode=15,I===6)break t;case 15:l.mode=16;case 16:if(G=l.length){if($<G&&(G=$),tt<G&&(G=tt),G===0)break t;a.arraySet(et,L,W,G,rt),$-=G,W+=G,tt-=G,rt+=G,l.length-=G;break}l.mode=12;break;case 17:for(;z<14;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(l.nlen=257+(31&B),B>>>=5,z-=5,l.ndist=1+(31&B),B>>>=5,z-=5,l.ncode=4+(15&B),B>>>=4,z-=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(;z<3;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}l.lens[j[l.have++]]=7&B,B>>>=3,z-=3}for(;l.have<19;)l.lens[j[l.have++]]=0;if(l.lencode=l.lendyn,l.lenbits=7,M={bits:l.lenbits},O=g(0,l.lens,0,19,l.lencode,0,l.work,M),l.lenbits=M.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[B&(1<<l.lenbits)-1])>>>16&255,gt=65535&p,!((nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(gt<16)B>>>=nt,z-=nt,l.lens[l.have++]=gt;else{if(gt===16){for(b=nt+2;z<b;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(B>>>=nt,z-=nt,l.have===0){S.msg="invalid bit length repeat",l.mode=30;break}s=l.lens[l.have-1],G=3+(3&B),B>>>=2,z-=2}else if(gt===17){for(b=nt+3;z<b;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}z-=nt,s=0,G=3+(7&(B>>>=nt)),B>>>=3,z-=3}else{for(b=nt+7;z<b;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}z-=nt,s=0,G=11+(127&(B>>>=nt)),B>>>=7,z-=7}if(l.have+G>l.nlen+l.ndist){S.msg="invalid bit length repeat",l.mode=30;break}for(;G--;)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,M={bits:l.lenbits},O=g(_,l.lens,0,l.nlen,l.lencode,0,l.work,M),l.lenbits=M.bits,O){S.msg="invalid literal/lengths set",l.mode=30;break}if(l.distbits=6,l.distcode=l.distdyn,M={bits:l.distbits},O=g(y,l.lens,l.nlen,l.ndist,l.distcode,0,l.work,M),l.distbits=M.bits,O){S.msg="invalid distances set",l.mode=30;break}if(l.mode=20,I===6)break t;case 20:l.mode=21;case 21:if(6<=$&&258<=tt){S.next_out=rt,S.avail_out=tt,S.next_in=W,S.avail_in=$,l.hold=B,l.bits=z,u(S,K),rt=S.next_out,et=S.output,tt=S.avail_out,W=S.next_in,L=S.input,$=S.avail_in,B=l.hold,z=l.bits,l.mode===12&&(l.back=-1);break}for(l.back=0;it=(p=l.lencode[B&(1<<l.lenbits)-1])>>>16&255,gt=65535&p,!((nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(it&&(240&it)==0){for(dt=nt,_t=it,kt=gt;it=(p=l.lencode[kt+((B&(1<<dt+_t)-1)>>dt)])>>>16&255,gt=65535&p,!(dt+(nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<<z,z+=8}B>>>=dt,z-=dt,l.back+=dt}if(B>>>=nt,z-=nt,l.back+=nt,l.length=gt,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(b=l.extra;z<b;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}l.length+=B&(1<<l.extra)-1,B>>>=l.extra,z-=l.extra,l.back+=l.extra}l.was=l.length,l.mode=23;case 23:for(;it=(p=l.distcode[B&(1<<l.distbits)-1])>>>16&255,gt=65535&p,!((nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if((240&it)==0){for(dt=nt,_t=it,kt=gt;it=(p=l.distcode[kt+((B&(1<<dt+_t)-1)>>dt)])>>>16&255,gt=65535&p,!(dt+(nt=p>>>24)<=z);){if($===0)break t;$--,B+=L[W++]<<z,z+=8}B>>>=dt,z-=dt,l.back+=dt}if(B>>>=nt,z-=nt,l.back+=nt,64&it){S.msg="invalid distance code",l.mode=30;break}l.offset=gt,l.extra=15&it,l.mode=24;case 24:if(l.extra){for(b=l.extra;z<b;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}l.offset+=B&(1<<l.extra)-1,B>>>=l.extra,z-=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(G=K-tt,l.offset>G){if((G=l.offset-G)>l.whave&&l.sane){S.msg="invalid distance too far back",l.mode=30;break}ut=G>l.wnext?(G-=l.wnext,l.wsize-G):l.wnext-G,G>l.length&&(G=l.length),bt=l.window}else bt=et,ut=rt-l.offset,G=l.length;for(tt<G&&(G=tt),tt-=G,l.length-=G;et[rt++]=bt[ut++],--G;);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(;z<32;){if($===0)break t;$--,B|=L[W++]<<z,z+=8}if(K-=tt,S.total_out+=K,l.total+=K,K&&(S.adler=l.check=l.flags?o(l.check,et,K,rt-K):i(l.check,et,K,rt-K)),K=tt,(l.flags?B:f(B))!==l.check){S.msg="incorrect data check",l.mode=30;break}z=B=0}l.mode=28;case 28:if(l.wrap&&l.flags){for(;z<32;){if($===0)break t;$--,B+=L[W++]<<z,z+=8}if(B!==(4294967295&l.total)){S.msg="incorrect length check",l.mode=30;break}z=B=0}l.mode=29;case 29:O=1;break t;case 30:O=-3;break t;case 31:return-4;case 32:default:return d}return S.next_out=rt,S.avail_out=tt,S.next_in=W,S.avail_in=$,l.hold=B,l.bits=z,(l.wsize||K!==S.avail_out&&l.mode<30&&(l.mode<27||I!==4))&&Q(S,S.output,S.next_out,K-S.avail_out)?(l.mode=31,-4):(J-=S.avail_in,K-=S.avail_out,S.total_in+=J,S.total_out+=K,l.total+=K,l.wrap&&K&&(S.adler=l.check=l.flags?o(l.check,et,K,S.next_out-K):i(l.check,et,K,S.next_out-K)),S.data_type=l.bits+(l.last?64:0)+(l.mode===12?128:0)+(l.mode===20||l.mode===15?256:0),(J==0&&K===0||I===4)&&O===w&&(O=-5),O)},n.inflateEnd=function(S){if(!S||!S.state)return d;var I=S.state;return I.window&&(I.window=null),S.state=null,w},n.inflateGetHeader=function(S,I){var l;return S&&S.state?(2&(l=S.state).wrap)==0?d:((l.head=I).done=!1,w):d},n.inflateSetDictionary=function(S,I){var l,L=I.length;return S&&S.state?(l=S.state).wrap!==0&&l.mode!==11?d:l.mode===11&&i(1,I,L,0)!==l.check?-3:Q(S,I,L,L)?(l.mode=31,-4):(l.havedict=1,w):d},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],u=[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],g=[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(_,y,w,d,k,h,m,f){var v,x,A,P,D,T,H,F,X,Q=f.bits,S=0,I=0,l=0,L=0,et=0,W=0,rt=0,$=0,tt=0,B=0,z=null,J=0,K=new a.Buf16(16),G=new a.Buf16(16),ut=null,bt=0;for(S=0;S<=15;S++)K[S]=0;for(I=0;I<d;I++)K[y[w+I]]++;for(et=Q,L=15;1<=L&&K[L]===0;L--);if(L<et&&(et=L),L===0)return k[h++]=20971520,k[h++]=20971520,f.bits=1,0;for(l=1;l<L&&K[l]===0;l++);for(et<l&&(et=l),S=$=1;S<=15;S++)if($<<=1,($-=K[S])<0)return-1;if(0<$&&(_===0||L!==1))return-1;for(G[1]=0,S=1;S<15;S++)G[S+1]=G[S]+K[S];for(I=0;I<d;I++)y[w+I]!==0&&(m[G[y[w+I]]++]=I);if(T=_===0?(z=ut=m,19):_===1?(z=i,J-=257,ut=o,bt-=257,256):(z=u,ut=g,-1),S=l,D=h,rt=I=B=0,A=-1,P=(tt=1<<(W=et))-1,_===1&&852<tt||_===2&&592<tt)return 1;for(;;){for(H=S-rt,X=m[I]<T?(F=0,m[I]):m[I]>T?(F=ut[bt+m[I]],z[J+m[I]]):(F=96,0),v=1<<S-rt,l=x=1<<W;k[D+(B>>rt)+(x-=v)]=H<<24|F<<16|X|0,x!==0;);for(v=1<<S-1;B&v;)v>>=1;if(v!==0?(B&=v-1,B+=v):B=0,I++,--K[S]==0){if(S===L)break;S=y[w+m[I]]}if(et<S&&(B&P)!==A){for(rt===0&&(rt=et),D+=l,$=1<<(W=S-rt);W+rt<L&&!(($-=K[W+rt])<=0);)W++,$<<=1;if(tt+=1<<W,_===1&&852<tt||_===2&&592<tt)return 1;k[A=B&P]=et<<24|W<<16|D-h|0}}return B!==0&&(k[D+B]=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 u(p){for(var C=p.length;0<=--C;)p[C]=0}var g=0,_=29,y=256,w=y+1+_,d=30,k=19,h=2*w+1,m=15,f=16,v=7,x=256,A=16,P=17,D=18,T=[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],F=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],X=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Q=new Array(2*(w+2));u(Q);var S=new Array(2*d);u(S);var I=new Array(512);u(I);var l=new Array(256);u(l);var L=new Array(_);u(L);var et,W,rt,$=new Array(d);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 B(p,C){this.dyn_tree=p,this.max_code=0,this.stat_desc=C}function z(p){return p<256?I[p]:I[256+(p>>>7)]}function J(p,C){p.pending_buf[p.pending++]=255&C,p.pending_buf[p.pending++]=C>>>8&255}function K(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 G(p,C,j){K(p,j[2*C],j[2*C+1])}function ut(p,C){for(var j=0;j|=1&p,p>>>=1,j<<=1,0<--C;);return j>>>1}function bt(p,C,j){var U,N,Z=new Array(m+1),q=0;for(U=1;U<=m;U++)Z[U]=q=q+j[U-1]<<1;for(N=0;N<=C;N++){var V=p[2*N+1];V!==0&&(p[2*N]=ut(Z[V]++,V))}}function nt(p){var C;for(C=0;C<w;C++)p.dyn_ltree[2*C]=0;for(C=0;C<d;C++)p.dyn_dtree[2*C]=0;for(C=0;C<k;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 gt(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 dt(p,C,j){for(var U=p.heap[j],N=j<<1;N<=p.heap_len&&(N<p.heap_len&&gt(C,p.heap[N+1],p.heap[N],p.depth)&&N++,!gt(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,q,V=0;if(p.last_lit!==0)for(;U=p.pending_buf[p.d_buf+2*V]<<8|p.pending_buf[p.d_buf+2*V+1],N=p.pending_buf[p.l_buf+V],V++,U===0?G(p,N,C):(G(p,(Z=l[N])+y+1,C),(q=T[Z])!==0&&K(p,N-=L[Z],q),G(p,Z=z(--U),j),(q=H[Z])!==0&&K(p,U-=$[Z],q)),V<p.last_lit;);G(p,x,C)}function kt(p,C){var j,U,N,Z=C.dyn_tree,q=C.stat_desc.static_tree,V=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--,V&&(p.static_len-=q[2*N+1]);for(C.max_code=ot,j=p.heap_len>>1;1<=j;j--)dt(p,Z,j);for(N=Y;j=p.heap[1],p.heap[1]=p.heap[p.heap_len--],dt(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++,dt(p,Z,1),2<=p.heap_len;);p.heap[--p.heap_max]=p.heap[1],function(st,vt){var Pt,wt,At,ft,Mt,jt,St=vt.dyn_tree,Kt=vt.max_code,_e=vt.stat_desc.static_tree,we=vt.stat_desc.has_stree,Se=vt.stat_desc.extra_bits,qt=vt.stat_desc.extra_base,Et=vt.stat_desc.max_length,Rt=0;for(ft=0;ft<=m;ft++)st.bl_count[ft]=0;for(St[2*st.heap[st.heap_max]+1]=0,Pt=st.heap_max+1;Pt<h;Pt++)Et<(ft=St[2*St[2*(wt=st.heap[Pt])+1]+1]+1)&&(ft=Et,Rt++),St[2*wt+1]=ft,Kt<wt||(st.bl_count[ft]++,Mt=0,qt<=wt&&(Mt=Se[wt-qt]),jt=St[2*wt],st.opt_len+=jt*(ft+Mt),we&&(st.static_len+=jt*(_e[2*wt+1]+Mt)));if(Rt!==0){do{for(ft=Et-1;st.bl_count[ft]===0;)ft--;st.bl_count[ft]--,st.bl_count[ft+1]+=2,st.bl_count[Et]--,Rt-=2}while(0<Rt);for(ft=Et;ft!==0;ft--)for(wt=st.bl_count[ft];wt!==0;)Kt<(At=st.heap[--Pt])||(St[2*At+1]!==ft&&(st.opt_len+=(ft-St[2*At+1])*St[2*At],St[2*At+1]=ft),wt--)}}(p,C),bt(Z,ot,p.bl_count)}function s(p,C,j){var U,N,Z=-1,q=C[1],V=0,Y=7,ot=4;for(q===0&&(Y=138,ot=3),C[2*(j+1)+1]=65535,U=0;U<=j;U++)N=q,q=C[2*(U+1)+1],++V<Y&&N===q||(V<ot?p.bl_tree[2*N]+=V:N!==0?(N!==Z&&p.bl_tree[2*N]++,p.bl_tree[2*A]++):V<=10?p.bl_tree[2*P]++:p.bl_tree[2*D]++,Z=N,ot=(V=0)===q?(Y=138,3):N===q?(Y=6,3):(Y=7,4))}function O(p,C,j){var U,N,Z=-1,q=C[1],V=0,Y=7,ot=4;for(q===0&&(Y=138,ot=3),U=0;U<=j;U++)if(N=q,q=C[2*(U+1)+1],!(++V<Y&&N===q)){if(V<ot)for(;G(p,N,p.bl_tree),--V!=0;);else N!==0?(N!==Z&&(G(p,N,p.bl_tree),V--),G(p,A,p.bl_tree),K(p,V-3,2)):V<=10?(G(p,P,p.bl_tree),K(p,V-3,3)):(G(p,D,p.bl_tree),K(p,V-11,7));Z=N,ot=(V=0)===q?(Y=138,3):N===q?(Y=6,3):(Y=7,4)}}u($);var M=!1;function b(p,C,j,U){K(p,(g<<1)+(U?1:0),3),function(N,Z,q,V){it(N),V&&(J(N,q),J(N,~q)),a.arraySet(N.pending_buf,N.window,Z,q,N.pending),N.pending+=q}(p,C,j,!0)}n._tr_init=function(p){M||(function(){var C,j,U,N,Z,q=new Array(m+1);for(N=U=0;N<_-1;N++)for(L[N]=U,C=0;C<1<<T[N];C++)l[U++]=N;for(l[U-1]=N,N=Z=0;N<16;N++)for($[N]=Z,C=0;C<1<<H[N];C++)I[Z++]=N;for(Z>>=7;N<d;N++)for($[N]=Z<<7,C=0;C<1<<H[N]-7;C++)I[256+Z++]=N;for(j=0;j<=m;j++)q[j]=0;for(C=0;C<=143;)Q[2*C+1]=8,C++,q[8]++;for(;C<=255;)Q[2*C+1]=9,C++,q[9]++;for(;C<=279;)Q[2*C+1]=7,C++,q[7]++;for(;C<=287;)Q[2*C+1]=8,C++,q[8]++;for(bt(Q,w+1,q),C=0;C<d;C++)S[2*C+1]=5,S[2*C]=ut(C,5);et=new tt(Q,T,y+1,w,m),W=new tt(S,H,0,d,m),rt=new tt(new Array(0),F,0,k,v)}(),M=!0),p.l_desc=new B(p.dyn_ltree,et),p.d_desc=new B(p.dyn_dtree,W),p.bl_desc=new B(p.bl_tree,rt),p.bi_buf=0,p.bi_valid=0,nt(p)},n._tr_stored_block=b,n._tr_flush_block=function(p,C,j,U){var N,Z,q=0;0<p.level?(p.strm.data_type===2&&(p.strm.data_type=function(V){var Y,ot=4093624447;for(Y=0;Y<=31;Y++,ot>>>=1)if(1&ot&&V.dyn_ltree[2*Y]!==0)return i;if(V.dyn_ltree[18]!==0||V.dyn_ltree[20]!==0||V.dyn_ltree[26]!==0)return o;for(Y=32;Y<y;Y++)if(V.dyn_ltree[2*Y]!==0)return o;return i}(p)),kt(p,p.l_desc),kt(p,p.d_desc),q=function(V){var Y;for(s(V,V.dyn_ltree,V.l_desc.max_code),s(V,V.dyn_dtree,V.d_desc.max_code),kt(V,V.bl_desc),Y=k-1;3<=Y&&V.bl_tree[2*X[Y]+1]===0;Y--);return V.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?b(p,C,j,U):p.strategy===4||Z===N?(K(p,2+(U?1:0),3),_t(p,Q,S)):(K(p,4+(U?1:0),3),function(V,Y,ot,st){var vt;for(K(V,Y-257,5),K(V,ot-1,5),K(V,st-4,4),vt=0;vt<st;vt++)K(V,V.bl_tree[2*X[vt]+1],3);O(V,V.dyn_ltree,Y-1),O(V,V.dyn_dtree,ot-1)}(p,p.l_desc.max_code+1,p.d_desc.max_code+1,q+1),_t(p,p.dyn_ltree,p.dyn_dtree)),nt(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]+y+1)]++,p.dyn_dtree[2*z(C)]++),p.last_lit===p.lit_bufsize-1},n._tr_align=function(p){K(p,2,3),G(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 u,g,_,y,w=1,d={},k=!1,h=i.document,m=Object.getPrototypeOf&&Object.getPrototypeOf(i);m=m&&m.setTimeout?m:i,u={}.toString.call(i.process)==="[object process]"?function(A){process.nextTick(function(){v(A)})}:function(){if(i.postMessage&&!i.importScripts){var A=!0,P=i.onmessage;return i.onmessage=function(){A=!1},i.postMessage("","*"),i.onmessage=P,A}}()?(y="setImmediate$"+Math.random()+"$",i.addEventListener?i.addEventListener("message",x,!1):i.attachEvent("onmessage",x),function(A){i.postMessage(y+A,"*")}):i.MessageChannel?((_=new MessageChannel).port1.onmessage=function(A){v(A.data)},function(A){_.port2.postMessage(A)}):h&&"onreadystatechange"in h.createElement("script")?(g=h.documentElement,function(A){var P=h.createElement("script");P.onreadystatechange=function(){v(A),P.onreadystatechange=null,g.removeChild(P),P=null},g.appendChild(P)}):function(A){setTimeout(v,0,A)},m.setImmediate=function(A){typeof A!="function"&&(A=new Function(""+A));for(var P=new Array(arguments.length-1),D=0;D<P.length;D++)P[D]=arguments[D+1];var T={callback:A,args:P};return d[w]=T,u(w),w++},m.clearImmediate=f}function f(A){delete d[A]}function v(A){if(k)setTimeout(v,0,A);else{var P=d[A];if(P){k=!0;try{(function(D){var T=D.callback,H=D.args;switch(H.length){case 0:T();break;case 1:T(H[0]);break;case 2:T(H[0],H[1]);break;case 3:T(H[0],H[1],H[2]);break;default:T.apply(o,H)}})(P)}finally{f(A),k=!1}}}}function x(A){A.source===i&&typeof A.data=="string"&&A.data.indexOf(y)===0&&v(+A.data.slice(y.length))}})(typeof self>"u"?a===void 0?this:a:self)}).call(this,typeof Ft<"u"?Ft:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(oe);const Me=oe.exports;var mt;(function(c){c.OfficeDocument="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",c.FontTable="http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable",c.Image="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",c.Numbering="http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering",c.Styles="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",c.StylesWithEffects="http://schemas.microsoft.com/office/2007/relationships/stylesWithEffects",c.Theme="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",c.Settings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings",c.WebSettings="http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings",c.Hyperlink="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",c.Footnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes",c.Endnotes="http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes",c.Footer="http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer",c.Header="http://schemas.openxmlformats.org/officeDocument/2006/relationships/header",c.ExtendedProperties="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",c.CoreProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",c.CustomProperties="http://schemas.openxmlformats.org/package/2006/relationships/metadata/custom-properties"})(mt||(mt={}));function Re(c,e){return e.elements(c).map(t=>({id:e.attr(t,"Id"),type:e.attr(t,"Type"),target:e.attr(t,"Target"),targetMode:e.attr(t,"TargetMode")}))}const le={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 ce(c,e=pt.Dxa){return c==null||/.+(p[xt]|[%])$/.test(c)?c:`${(parseInt(c)*e.mul).toFixed(2)}${e.unit}`}function Fe(c,e=!1){switch(c){case"1":return!0;case"0":return!1;case"on":return!0;case"off":return!1;case"true":return!0;case"false":return!1;default:return e}}function he(c,e,t){if(c.namespaceURI!=le.wordml)return!1;switch(c.localName){case"color":e.color=t.attr(c,"val");break;case"sz":e.fontSize=t.lengthAttr(c,"val",pt.FontSize);break;default:return!1}return!0}function Te(c,e=!1){e&&(c=c.replace(/<[?].*[?]>/,"")),c=Oe(c);const t=new DOMParser().parseFromString(c,"application/xml"),r=Ie(t);if(r)throw new Error(r);return t}function Ie(c){var e;return(e=c.getElementsByTagName("parsererror")[0])==null?void 0:e.textContent}function Oe(c){return c.charCodeAt(0)===65279?c.substring(1):c}function De(c){return new XMLSerializer().serializeToString(c)}class ue{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 Fe(this.attr(e,t),r)}lengthAttr(e,t,r=pt.Dxa){return ce(this.attr(e,t),r)}}const E=new ue;class yt{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(){this._package.update(this.path,De(this._xmlDocument))}parseXml(e){}}const Le={embedRegular:"regular",embedBold:"bold",embedItalic:"italic",embedBoldItalic:"boldItalic"};function je(c,e){return e.elements(c).map(t=>Ue(t,e))}function Ue(c,e){let t={name:e.attr(c,"name"),embedFontRefs:[]};for(let r of e.elements(c))switch(r.localName){case"family":t.family=e.attr(r,"val");break;case"altName":t.altName=e.attr(r,"val");break;case"embedRegular":case"embedBold":case"embedItalic":case"embedBoldItalic":t.embedFontRefs.push(We(r,e));break}return t}function We(c,e){return{id:e.attr(c,"id"),key:e.attr(c,"fontKey"),type:Le[c.localName]}}class He extends yt{parseXml(e){this.fonts=je(e,this._package.xmlParser)}}function $e(c){return c==null?void 0:c.replace(/[ .]+/g,"-").replace(/[&]+/g,"and").toLowerCase()}function Ot(c){let e=c.lastIndexOf("/")+1,t=e==0?"":c.substring(0,e),r=e==0?c:c.substring(e);return[t,r]}function Ut(c,e){try{const t="http://docx/";return new URL(c,t+e).toString().substring(t.length)}catch{return`${e}${c}`}}function xt(c,e){return c.reduce((t,r)=>(t[e(r)]=r,t),{})}function Ze(c){return new Promise((e,t)=>{const r=new FileReader;r.onloadend=()=>e(r.result),r.onerror=()=>t(),r.readAsDataURL(c)})}function Wt(c){return c&&typeof c=="object"&&!Array.isArray(c)}function Ve(c){return typeof c=="string"||c instanceof String}function Lt(c,...e){var r;if(!e.length)return c;const t=e.shift();if(Wt(c)&&Wt(t))for(const n in t)if(Wt(t[n])){const a=(r=c[n])!=null?r:c[n]={};Lt(a,t[n])}else c[n]=t[n];return Lt(c,...e)}function Nt(c){return Array.isArray(c)?c:[c]}class Zt{constructor(e,t){this._zip=e,this.options=t,this.xmlParser=new ue}get(e){return this._zip.files[Xe(e)]}update(e,t){this._zip.file(e,t)}static async load(e,t){const r=await Me.loadAsync(e);return new Zt(r,t)}save(e="blob"){return this._zip.generateAsync({type:e})}load(e,t="string"){var r,n;return(n=(r=this.get(e))==null?void 0:r.async(t))!=null?n:Promise.resolve(null)}async loadRelationships(e=null){let t="_rels/.rels";if(e!=null){const[n,a]=Ot(e);t=`${n}_rels/${a}.rels`}const r=await this.load(t);return r?Re(this.parseXmlDocument(r).firstElementChild,this.xmlParser):null}parseXmlDocument(e){return Te(e,this.options.trimXmlDeclaration)}}function Xe(c){return c.startsWith("/")?c.substr(1):c}class Ge extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.body=this._documentParser.parseDocumentFile(e)}}function It(c,e){return{type:e.attr(c,"val"),color:e.attr(c,"color"),size:e.lengthAttr(c,"sz",pt.Border),offset:e.lengthAttr(c,"space",pt.Point),frame:e.boolAttr(c,"frame"),shadow:e.boolAttr(c,"shadow")}}function Ke(c,e){var t={};for(let r of e.elements(c))switch(r.localName){case"left":t.left=It(r,e);break;case"top":t.top=It(r,e);break;case"right":t.right=It(r,e);break;case"bottom":t.bottom=It(r,e);break}return t}var Yt;(function(c){c.Continuous="continuous",c.NextPage="nextPage",c.NextColumn="nextColumn",c.EvenPage="evenPage",c.OddPage="oddPage"})(Yt||(Yt={}));function de(c,e=E){var r,n;var t={};for(let a of e.elements(c))switch(a.localName){case"pgSz":t.pageSize={width:e.lengthAttr(a,"w"),height:e.lengthAttr(a,"h"),orientation:e.attr(a,"orient")};break;case"type":t.type=e.attr(a,"val");break;case"pgMar":t.pageMargins={left:e.lengthAttr(a,"left"),right:e.lengthAttr(a,"right"),top:e.lengthAttr(a,"top"),bottom:e.lengthAttr(a,"bottom"),header:e.lengthAttr(a,"header"),footer:e.lengthAttr(a,"footer"),gutter:e.lengthAttr(a,"gutter")};break;case"cols":t.columns=qe(a,e);break;case"headerReference":((r=t.headerRefs)!=null?r:t.headerRefs=[]).push(Jt(a,e));break;case"footerReference":((n=t.footerRefs)!=null?n:t.footerRefs=[]).push(Jt(a,e));break;case"titlePg":t.titlePage=e.boolAttr(a,"val",!0);break;case"pgBorders":t.pageBorders=Ke(a,e);break;case"pgNumType":t.pageNumber=Ye(a,e);break}return t}function qe(c,e){return{numberOfColumns:e.intAttr(c,"num"),space:e.lengthAttr(c,"space"),separator:e.boolAttr(c,"sep"),equalWidth:e.boolAttr(c,"equalWidth",!0),columns:e.elements(c,"col").map(t=>({width:e.lengthAttr(t,"w"),space:e.lengthAttr(t,"space")}))}}function Ye(c,e){return{chapSep:e.attr(c,"chapSep"),chapStyle:e.attr(c,"chapStyle"),format:e.attr(c,"fmt"),start:e.intAttr(c,"start")}}function Jt(c,e){return{id:e.attr(c,"id"),type:e.attr(c,"type")}}function Je(c,e){return{before:e.lengthAttr(c,"before"),after:e.lengthAttr(c,"after"),line:e.intAttr(c,"line"),lineRule:e.attr(c,"lineRule")}}function Vt(c,e){let t={};for(let r of e.elements(c))Qe(r,t,e);return t}function Qe(c,e,t){return!!he(c,e,t)}function fe(c,e){let t={};for(let r of e.elements(c))pe(r,t,e);return t}function pe(c,e,t){if(c.namespaceURI!=le.wordml)return!1;if(he(c,e,t))return!0;switch(c.localName){case"tabs":e.tabs=tr(c,t);break;case"sectPr":e.sectionProps=de(c,t);break;case"numPr":e.numbering=er(c,t);break;case"spacing":return e.lineSpacing=Je(c,t),!1;case"textAlignment":return e.textAlignment=t.attr(c,"val"),!1;case"keepLines":e.keepLines=t.boolAttr(c,"val",!0);break;case"keepNext":e.keepNext=t.boolAttr(c,"val",!0);break;case"pageBreakBefore":e.pageBreakBefore=t.boolAttr(c,"val",!0);break;case"outlineLvl":e.outlineLevel=t.intAttr(c,"val");break;case"pStyle":e.styleName=t.attr(c,"val");break;case"rPr":e.runProps=Vt(c,t);break;default:return!1}return!0}function tr(c,e){return e.elements(c,"tab").map(t=>({position:e.lengthAttr(t,"pos"),leader:e.attr(t,"leader"),style:e.attr(t,"val")}))}function er(c,e){var t={};for(let r of e.elements(c))switch(r.localName){case"numId":t.id=e.attr(r,"val");break;case"ilvl":t.level=e.intAttr(r,"val");break}return t}function rr(c,e){let t={numberings:[],abstractNumberings:[],bulletPictures:[]};for(let r of e.elements(c))switch(r.localName){case"num":t.numberings.push(ar(r,e));break;case"abstractNum":t.abstractNumberings.push(nr(r,e));break;case"numPicBullet":t.bulletPictures.push(ir(r,e));break}return t}function ar(c,e){let t={id:e.attr(c,"numId"),overrides:[]};for(let r of e.elements(c))switch(r.localName){case"abstractNumId":t.abstractId=e.attr(r,"val");break;case"lvlOverride":t.overrides.push(sr(r,e));break}return t}function nr(c,e){let t={id:e.attr(c,"abstractNumId"),levels:[]};for(let r of e.elements(c))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(me(r,e));break}return t}function me(c,e){let t={level:e.intAttr(c,"ilvl")};for(let r of e.elements(c))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=fe(r,e);break;case"rPr":t.runProps=Vt(r,e);break}return t}function sr(c,e){let t={level:e.intAttr(c,"ilvl")};for(let r of e.elements(c))switch(r.localName){case"startOverride":t.start=e.intAttr(r,"val");break;case"lvl":t.numberingLevel=me(r,e);break}return t}function ir(c,e){var t=e.element(c,"pict"),r=t&&e.element(t,"shape"),n=r&&e.element(r,"imagedata");return n?{id:e.attr(c,"numPicBulletId"),referenceId:e.attr(n,"id"),style:e.attr(r,"style")}:null}class or extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){Object.assign(this,rr(e,this._package.xmlParser)),this.domNumberings=this._documentParser.parseNumberingFile(e)}}class lr extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.styles=this._documentParser.parseStylesFile(e)}}var R;(function(c){c.Document="document",c.Paragraph="paragraph",c.Run="run",c.Break="break",c.NoBreakHyphen="noBreakHyphen",c.Table="table",c.Row="row",c.Cell="cell",c.Hyperlink="hyperlink",c.Drawing="drawing",c.Image="image",c.Text="text",c.Tab="tab",c.Symbol="symbol",c.BookmarkStart="bookmarkStart",c.BookmarkEnd="bookmarkEnd",c.Footer="footer",c.Header="header",c.FootnoteReference="footnoteReference",c.EndnoteReference="endnoteReference",c.Footnote="footnote",c.Endnote="endnote",c.SimpleField="simpleField",c.ComplexField="complexField",c.Instruction="instruction",c.VmlPicture="vmlPicture",c.MmlMath="mmlMath",c.MmlMathParagraph="mmlMathParagraph",c.MmlFraction="mmlFraction",c.MmlFunction="mmlFunction",c.MmlFunctionName="mmlFunctionName",c.MmlNumerator="mmlNumerator",c.MmlDenominator="mmlDenominator",c.MmlRadical="mmlRadical",c.MmlBase="mmlBase",c.MmlDegree="mmlDegree",c.MmlSuperscript="mmlSuperscript",c.MmlSubscript="mmlSubscript",c.MmlPreSubSuper="mmlPreSubSuper",c.MmlSubArgument="mmlSubArgument",c.MmlSuperArgument="mmlSuperArgument",c.MmlNary="mmlNary",c.MmlDelimiter="mmlDelimiter",c.MmlRun="mmlRun",c.MmlEquationArray="mmlEquationArray",c.MmlLimit="mmlLimit",c.MmlLimitLower="mmlLimitLower",c.MmlMatrix="mmlMatrix",c.MmlMatrixRow="mmlMatrixRow",c.MmlBox="mmlBox",c.MmlBar="mmlBar",c.MmlGroupChar="mmlGroupChar",c.VmlElement="vmlElement",c.Inserted="inserted",c.Deleted="deleted",c.DeletedText="deletedText"})(R||(R={}));class Xt{constructor(){this.children=[],this.cssStyle={}}}class cr extends Xt{constructor(){super(...arguments),this.type=R.Header}}class hr extends Xt{constructor(){super(...arguments),this.type=R.Footer}}class ge extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}parseXml(e){this.rootElement=this.createRootElement(),this.rootElement.children=this._documentParser.parseBodyElements(e)}}class ur extends ge{createRootElement(){return new cr}}class dr extends ge{createRootElement(){return new hr}}function fr(c,e){const t={};for(let r of e.elements(c))switch(r.localName){case"Template":t.template=r.textContent;break;case"Pages":t.pages=zt(r.textContent);break;case"Words":t.words=zt(r.textContent);break;case"Characters":t.characters=zt(r.textContent);break;case"Application":t.application=r.textContent;break;case"Lines":t.lines=zt(r.textContent);break;case"Paragraphs":t.paragraphs=zt(r.textContent);break;case"Company":t.company=r.textContent;break;case"AppVersion":t.appVersion=r.textContent;break}return t}function zt(c){if(!(typeof c>"u"))return parseInt(c)}class pr extends yt{parseXml(e){this.props=fr(e,this._package.xmlParser)}}function mr(c,e){const t={};for(let r of e.elements(c))switch(r.localName){case"title":t.title=r.textContent;break;case"description":t.description=r.textContent;break;case"subject":t.subject=r.textContent;break;case"creator":t.creator=r.textContent;break;case"keywords":t.keywords=r.textContent;break;case"language":t.language=r.textContent;break;case"lastModifiedBy":t.lastModifiedBy=r.textContent;break;case"revision":r.textContent&&(t.revision=parseInt(r.textContent));break}return t}class gr extends yt{parseXml(e){this.props=mr(e,this._package.xmlParser)}}class br{}function vr(c,e){var t=new br,r=e.element(c,"themeElements");for(let n of e.elements(r))switch(n.localName){case"clrScheme":t.colorScheme=kr(n,e);break;case"fontScheme":t.fontScheme=yr(n,e);break}return t}function kr(c,e){var t={name:e.attr(c,"name"),colors:{}};for(let a of e.elements(c)){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 yr(c,e){var t={name:e.attr(c,"name")};for(let r of e.elements(c))switch(r.localName){case"majorFont":t.majorFont=Qt(r,e);break;case"minorFont":t.minorFont=Qt(r,e);break}return t}function Qt(c,e){return{latinTypeface:e.elementAttr(c,"latin","typeface"),eaTypeface:e.elementAttr(c,"ea","typeface"),csTypeface:e.elementAttr(c,"cs","typeface")}}class _r extends yt{constructor(e,t){super(e,t)}parseXml(e){this.theme=vr(e,this._package.xmlParser)}}class be{}class wr extends be{constructor(){super(...arguments),this.type=R.Footnote}}class Sr extends be{constructor(){super(...arguments),this.type=R.Endnote}}class ve extends yt{constructor(e,t,r){super(e,t),this._documentParser=r}}class xr extends ve{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"footnote",wr)}}class Cr extends ve{constructor(e,t,r){super(e,t,r)}parseXml(e){this.notes=this._documentParser.parseNotes(e,"endnote",Sr)}}function Pr(c,e){var t={};for(let r of e.elements(c))switch(r.localName){case"defaultTabStop":t.defaultTabStop=e.lengthAttr(r,"val");break;case"footnotePr":t.footnoteProps=te(r,e);break;case"endnotePr":t.endnoteProps=te(r,e);break;case"autoHyphenation":t.autoHyphenation=e.boolAttr(r,"val");break}return t}function te(c,e){var t={defaultNoteIds:[]};for(let r of e.elements(c))switch(r.localName){case"numFmt":t.nummeringFormat=e.attr(r,"val");break;case"footnote":case"endnote":t.defaultNoteIds.push(e.attr(r,"id"));break}return t}class Ar extends yt{constructor(e,t){super(e,t)}parseXml(e){this.settings=Pr(e,this._package.xmlParser)}}function Er(c,e){return e.elements(c,"property").map(t=>{const r=t.firstChild;return{formatId:e.attr(t,"fmtid"),name:e.attr(t,"name"),type:r.nodeName,value:r.textContent}})}class Nr extends yt{parseXml(e){this.props=Er(e,this._package.xmlParser)}}const zr=[{type:mt.OfficeDocument,target:"word/document.xml"},{type:mt.ExtendedProperties,target:"docProps/app.xml"},{type:mt.CoreProperties,target:"docProps/core.xml"},{type:mt.CustomProperties,target:"docProps/custom.xml"}];class Gt{constructor(){this.parts=[],this.partsMap={}}static async load(e,t,r){var n=new Gt;return n._options=r,n._parser=t,n._package=await Zt.load(e,r),n.rels=await n._package.loadRelationships(),await Promise.all(zr.map(a=>{var o;const i=(o=n.rels.find(u=>u.type===a.type))!=null?o: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 mt.OfficeDocument:this.documentPart=r=new Ge(this._package,e,this._parser);break;case mt.FontTable:this.fontTablePart=r=new He(this._package,e);break;case mt.Numbering:this.numberingPart=r=new or(this._package,e,this._parser);break;case mt.Styles:this.stylesPart=r=new lr(this._package,e,this._parser);break;case mt.Theme:this.themePart=r=new _r(this._package,e);break;case mt.Footnotes:this.footnotesPart=r=new xr(this._package,e,this._parser);break;case mt.Endnotes:this.endnotesPart=r=new Cr(this._package,e,this._parser);break;case mt.Footer:r=new dr(this._package,e,this._parser);break;case mt.Header:r=new ur(this._package,e,this._parser);break;case mt.CoreProperties:this.corePropsPart=r=new gr(this._package,e);break;case mt.ExtendedProperties:this.extendedPropsPart=r=new pr(this._package,e);break;case mt.CustomProperties:r=new Nr(this._package,e);break;case mt.Settings:this.settingsPart=r=new Ar(this._package,e);break}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]=Ot(r.path);await Promise.all(r.rels.map(i=>this.loadRelationshipPart(Ut(i.target,a),i.type)))}return r}async loadDocumentImage(e,t){const r=await this.loadResource(t!=null?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([Br(r,t)]))}blobToURL(e){return e?this._options.useBase64URL?Ze(e):URL.createObjectURL(e):null}findPartByRelId(e,t=null){var a;var r=((a=t.rels)!=null?a:this.rels).find(i=>i.id==e);const n=t?Ot(t.path)[0]:"";return r?this.partsMap[Ut(r.target,n)]:null}getPathById(e,t){const r=e.rels.find(a=>a.id==t),[n]=Ot(e.path);return r?Ut(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 Br(c,e){const r=e.replace(/{|}|-/g,""),n=new Array(16);for(let a=0;a<16;a++)n[16-a-1]=parseInt(r.substr(a*2,2),16);for(let a=0;a<32;a++)c[a]=c[a]^n[a%16];return c}function Mr(c,e){return{type:R.BookmarkStart,id:e.attr(c,"id"),name:e.attr(c,"name"),colFirst:e.intAttr(c,"colFirst"),colLast:e.intAttr(c,"colLast")}}function Rr(c,e){return{type:R.BookmarkEnd,id:e.attr(c,"id")}}class Fr extends Xt{constructor(){super(...arguments),this.type=R.VmlElement,this.attrs={}}}function ke(c,e){var t=new Fr;switch(c.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(c))switch(r.localName){case"style":t.cssStyleText=r.value;break;case"fillcolor":t.attrs.fill=r.value;break;case"from":const[n,a]=ee(r.value);Object.assign(t.attrs,{x1:n,y1:a});break;case"to":const[i,o]=ee(r.value);Object.assign(t.attrs,{x2:i,y2:o});break}for(const r of E.elements(c))switch(r.localName){case"stroke":Object.assign(t.attrs,Tr(r));break;case"fill":Object.assign(t.attrs,Ir());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=ke(r,e);n&&t.children.push(n);break}return t}function Tr(c){var e;return{stroke:E.attr(c,"color"),"stroke-width":(e=E.lengthAttr(c,"weight",pt.Emu))!=null?e:"1px"}}function Ir(c){return{}}function ee(c){return c.split(",")}var Dt={shd:"inherit",color:"black",borderColor:"black",highlight:"transparent"};const Or=[],re={oMath:R.MmlMath,oMathPara:R.MmlMathParagraph,f:R.MmlFraction,func:R.MmlFunction,fName:R.MmlFunctionName,num:R.MmlNumerator,den:R.MmlDenominator,rad:R.MmlRadical,deg:R.MmlDegree,e:R.MmlBase,sSup:R.MmlSuperscript,sSub:R.MmlSubscript,sPre:R.MmlPreSubSuper,sup:R.MmlSuperArgument,sub:R.MmlSubArgument,d:R.MmlDelimiter,nary:R.MmlNary,eqArr:R.MmlEquationArray,lim:R.MmlLimit,limLow:R.MmlLimitLower,m:R.MmlMatrix,mr:R.MmlMatrixRow,box:R.MmlBox,bar:R.MmlBar,groupChr:R.MmlGroupChar};class Dr{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}parseDocumentFile(e){var t=E.element(e,"body"),r=E.element(e,"background"),n=E.element(t,"sectPr");return{type:R.Document,children:this.parseBodyElements(t),props:n?de(n,E):{},cssStyle:r?this.parseBackground(r):{}}}parseBackground(e){var t={},r=ht.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)));break}return t}parseStylesFile(e){var t=[];return ht.foreach(e,r=>{switch(r.localName){case"style":t.push(this.parseStyle(r));break;case"docDefaults":t.push(this.parseDefaultStyles(r));break}}),t}parseDefaultStyles(e){var t={id:null,name:null,target:null,basedOn:null,styles:[]};return ht.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,{})});break}}),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";break}return ht.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=fe(r,E);break;case"rPr":t.styles.push({target:"span",values:this.parseDefaultProperties(r,{})}),t.runProps=Vt(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 ht.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,{})});break}}),t}parseNumberingFile(e){var t=[],r={},n=[];return ht.foreach(e,a=>{switch(a.localName){case"abstractNum":this.parseAbstractNumbering(a,n).forEach(u=>t.push(u));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;break}}),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 ht.foreach(e,a=>{switch(a.localName){case"lvl":r.push(this.parseNumberingLevel(n,a,t));break}}),r}parseNumberingLevel(e,t,r){var n={id:e,level:E.intAttr(t,"ilvl"),start:1,pStyleName:void 0,pStyle:{},rStyle:{},suff:"tab"};return ht.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.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");break}}),n}parseSdt(e,t){const r=E.element(e,"sdtContent");return r?t(r):[]}parseInserted(e,t){var r,n;return{type:R.Inserted,children:(n=(r=t(e))==null?void 0:r.children)!=null?n:[]}}parseDeleted(e,t){var r,n;return{type:R.Deleted,children:(n=(r=t(e))==null?void 0:r.children)!=null?n:[]}}parseParagraph(e){var t={type:R.Paragraph,children:[]};for(let r of E.elements(e))switch(r.localName){case"pPr":this.parseParagraphProperties(r,t);break;case"r":t.children.push(this.parseRun(r,t));break;case"hyperlink":t.children.push(this.parseHyperlink(r,t));break;case"bookmarkStart":t.children.push(Mr(r,E));break;case"bookmarkEnd":t.children.push(Rr(r,E));break;case"oMath":case"oMathPara":t.children.push(this.parseMathElement(r));break;case"sdt":t.children.push(...this.parseSdt(r,n=>this.parseParagraph(n).children));break;case"ins":t.children.push(this.parseInserted(r,n=>this.parseParagraph(n)));break;case"del":t.children.push(this.parseDeleted(r,n=>this.parseParagraph(n)));break}return t}parseParagraphProperties(e,t){this.parseDefaultProperties(e,t.cssStyle={},null,r=>{if(pe(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){var r=E.attr(e,"dropCap");r=="drop"&&(t.cssStyle.float="left")}parseHyperlink(e,t){var r={type:R.Hyperlink,parent:t,children:[]},n=E.attr(e,"anchor"),a=E.attr(e,"id");return n&&(r.href="#"+n),a&&(r.id=a),ht.foreach(e,i=>{switch(i.localName){case"r":r.children.push(this.parseRun(i,r));break}}),r}parseRun(e,t){var r={type:R.Run,parent:t,children:[]};return ht.foreach(e,n=>{switch(n=this.checkAlternateContent(n),n.localName){case"t":r.children.push({type:R.Text,text:n.textContent});break;case"delText":r.children.push({type:R.DeletedText,text:n.textContent});break;case"fldSimple":r.children.push({type:R.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:R.Instruction,text:n.textContent});break;case"fldChar":r.fieldRun=!0,r.children.push({type:R.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:R.NoBreakHyphen});break;case"br":r.children.push({type:R.Break,break:E.attr(n,"type")||"textWrapping"});break;case"lastRenderedPageBreak":r.children.push({type:R.Break,break:"lastRenderedPageBreak"});break;case"sym":r.children.push({type:R.Symbol,font:E.attr(n,"font"),char:E.attr(n,"char")});break;case"tab":r.children.push({type:R.Tab});break;case"footnoteReference":r.children.push({type:R.FootnoteReference,id:E.attr(n,"id")});break;case"endnoteReference":r.children.push({type:R.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);break}}),r}parseMathElement(e){const t=`${e.localName}Pr`,r={type:re[e.localName],children:[]};for(const a of E.elements(e))if(re[a.localName])r.children.push(this.parseMathElement(a));else if(a.localName=="r"){var n=this.parseRun(a);n.type=R.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");break}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:R.VmlPicture,children:[]};for(const r of E.elements(e)){const n=ke(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(Or.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 w;var t={type:R.Drawing,children:[],cssStyle:{}},r=e.localName=="anchor";let n=null,a=E.boolAttr(e,"simplePos"),i={relative:"page",align:"left",offset:"0"},o={relative:"page",align:"top",offset:"0"};for(var u of E.elements(e))switch(u.localName){case"simplePos":a&&(i.offset=E.lengthAttr(u,"x",pt.Emu),o.offset=E.lengthAttr(u,"y",pt.Emu));break;case"extent":t.cssStyle.width=E.lengthAttr(u,"cx",pt.Emu),t.cssStyle.height=E.lengthAttr(u,"cy",pt.Emu);break;case"positionH":case"positionV":if(!a){let d=u.localName=="positionH"?i:o;var g=E.element(u,"align"),_=E.element(u,"posOffset");d.relative=(w=E.attr(u,"relativeFrom"))!=null?w:d.relative,g&&(d.align=g.textContent),_&&(d.offset=ht.sizeValue(_,pt.Emu))}break;case"wrapTopAndBottom":n="wrapTopAndBottom";break;case"wrapNone":n="wrapNone";break;case"graphic":var y=this.parseGraphic(u);y&&t.children.push(y);break}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))switch(r.localName){case"pic":return this.parsePicture(r)}return null}parsePicture(e){var t={type:R.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");t.cssStyle.position="relative";for(var o of 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);break}return t}parseTable(e){var t={type:R.Table,children:[]};return ht.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);break}}),t}parseTableColumns(e){var t=[];return ht.foreach(e,r=>{switch(r.localName){case"gridCol":t.push({width:E.lengthAttr(r,"w")});break}}),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";break}}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:R.Row,children:[]};return ht.foreach(e,r=>{switch(r.localName){case"tc":t.children.push(this.parseTableCell(r));break;case"trPr":this.parseTableRowProperties(r,t);break}}),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:R.Cell,children:[]};return ht.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);break}}),t}parseTableCellProperties(e,t){t.cssStyle=this.parseDefaultProperties(e,{},null,r=>{var n;switch(r.localName){case"gridSpan":t.span=E.intAttr(r,"val",null);break;case"vMerge":t.verticalMerge=(n=E.attr(r,"val"))!=null?n:"continue";break;case"cnfStyle":t.className=lt.classNameOfCnfStyle(r);break;default:return!1}return!0})}parseDefaultProperties(e,t=null,r=null,n=null){return t=t||{},ht.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=ht.colorAttr(a,"val",null,Dt.color);break;case"sz":t["font-size"]=t["min-height"]=E.lengthAttr(a,"val",pt.FontSize);break;case"shd":t["background-color"]=ht.colorAttr(a,"fill",null,Dt.shd);break;case"highlight":t["background-color"]=ht.colorAttr(a,"val",null,Dt.highlight);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":break;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}`);break}}),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":t["text-decoration"]="underline";break;case"wave":case"wavyDouble":case"wavyHeavy":t["text-decoration"]="underline wavy";break;case"words":t["text-decoration"]="underline";break;case"none":t["text-decoration"]="none";break}var n=ht.colorAttr(e,"color");n&&(t["text-decoration-color"]=n)}}parseFont(e,t){var r=E.attr(e,"ascii"),n=lt.themeValue(e,"asciiTheme"),a=[r,n].filter(i=>i).join(", ");a.length>0&&(t["font-family"]=a)}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"),u=E.lengthAttr(e,"end");r&&(t["text-indent"]=r),n&&(t["text-indent"]=`-${n}`),(a||i)&&(t["margin-left"]=a||i),(o||u)&&(t["margin-right"]=o||u)}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`;break}}parseMarginProperties(e,t){ht.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);break}})}parseTrHeight(e,t){switch(E.attr(e,"hRule")){case"exact":t.height=E.lengthAttr(e,"val");break;case"atLeast":default:t.height=E.lengthAttr(e,"val");break}}parseBorderProperties(e,t){ht.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);break}})}}const Lr=["black","blue","cyan","darkBlue","darkCyan","darkGray","darkGreen","darkMagenta","darkRed","darkYellow","green","lightGray","magenta","none","red","white","yellow"];class ht{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:Lr.includes(a)?a:`#${a}`;var i=E.attr(e,"themeColor");return i?`var(--docx-${i}-color)`:r}static sizeValue(e,t=pt.Dxa){return ce(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){var t=E.attr(e,"val");if(t=="nil")return"none";var r=ht.colorAttr(e,"color"),n=E.lengthAttr(e,"sz",pt.Border);return`${n} solid ${r=="auto"?Dt.borderColor:r}`}static valueOfTblLayout(e){var t=E.attr(e,"val");return t=="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((n,a)=>t[a]=="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")||t&32)&&(r+=" first-row"),(E.boolAttr(e,"lastRow")||t&64)&&(r+=" last-row"),(E.boolAttr(e,"firstColumn")||t&128)&&(r+=" first-col"),(E.boolAttr(e,"lastColumn")||t&256)&&(r+=" last-col"),(E.boolAttr(e,"noHBand")||t&512)&&(r+=" no-hband"),(E.boolAttr(e,"noVBand")||t&1024)&&(r+=" no-vband"),r.trim()}}const ae={pos:0,leader:"none",style:"left"},jr=50;function Ur(c=document.body){const e=document.createElement("div");e.style.width="100pt",c.appendChild(e);const t=100/e.offsetWidth;return c.removeChild(e),t}function Wr(c,e,t,r=72/96){const n=c.closest("p"),a=c.getBoundingClientRect(),i=n.getBoundingClientRect(),o=getComputedStyle(n),u=(e==null?void 0:e.length)>0?e.map(v=>({pos:ne(v.position),leader:v.leader,style:v.style})).sort((v,x)=>v.pos-x.pos):[ae],g=u[u.length-1],_=i.width*r,y=ne(t);let w=g.pos+y;if(w<_)for(;w<_&&u.length<jr;w+=y)u.push({...ae,pos:w});const d=parseFloat(o.marginLeft),k=i.left+d,h=(a.left-k)*r,m=u.find(v=>v.style!="clear"&&v.pos>h);if(m==null)return;let f=1;if(m.style=="right"||m.style=="center"){const v=Array.from(n.querySelectorAll(`.${c.className}`)),x=v.indexOf(c)+1,A=document.createRange();A.setStart(c,1),x<v.length?A.setEndBefore(v[x]):A.setEndAfter(n);const P=m.style=="center"?.5:1,D=A.getBoundingClientRect(),T=D.left+P*D.width-(i.left-d);f=m.pos-T*r}else f=m.pos-h;switch(c.innerHTML="&nbsp;",c.style.textDecoration="inherit",c.style.wordSpacing=`${f.toFixed(0)}pt`,m.leader){case"dot":case"middleDot":c.style.textDecoration="underline",c.style.textDecorationStyle="dotted";break;case"hyphen":case"heavy":case"underscore":c.style.textDecoration="underline";break}}function ne(c){return parseFloat(c)}const at={svg:"http://www.w3.org/2000/svg",mathML:"http://www.w3.org/1998/Math/MathML"};class Hr{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.tabsTimeout=0,this.tasks=[],this.createElement=Ht}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=[],r=r||t,ie(r),ie(t),Bt(r,"docxjs library predefined styles"),r.appendChild(this.renderDefaultStyle()),e.themePart&&(Bt(r,"docxjs document theme values"),this.renderTheme(e.themePart,r)),e.stylesPart!=null&&(this.styleMap=this.processStyles(e.stylesPart.styles),Bt(r,"docxjs document styles"),r.appendChild(this.renderStyles(e.stylesPart.styles))),e.numberingPart&&(this.prodessNumberings(e.numberingPart.domNumberings),Bt(r,"docxjs document numbering styles"),r.appendChild(this.renderNumbering(e.numberingPart.domNumberings,r))),e.footnotesPart&&(this.footnoteMap=xt(e.footnotesPart.notes,o=>o.id)),e.endnotesPart&&(this.endnoteMap=xt(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)):$t(t,a),this.refreshTabStops()}renderTheme(e,t){var o,u;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=(u=e.theme)==null?void 0:u.colorScheme;if(a)for(let[g,_]of Object.entries(a.colors))r[`--docx-${g}-color`]=`#${_}`;const i=this.styleToString(`.${this.className}`,r);t.appendChild(Ct(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":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"),Bt(t,`docxjs ${r.name} font`);const o=this.styleToString("@font-face",i);t.appendChild(Ct(o)),this.refreshTabStops()}))}processStyleName(e){return e?`${this.className}_${$e(e)}`:this.className}processStyles(e){const t=xt(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=Lt(n.paragraphProps,r.paragraphProps),n.runProps=Lt(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==R.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;t==null&&(t={}),r==null&&(r=Object.getOwnPropertyNames(e));for(var n of r)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n]);return t}createSection(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)),t.columns&&t.columns.numberOfColumns&&(r.style.columnCount=`${t.columns.numberOfColumns}`,r.style.columnGap=t.columns.space,t.columns.separator&&(r.style.columnRule="1px solid black"))),r}renderSections(e){const t=[];this.processElement(e);const r=this.splitBySection(e.children);let n=null;for(let i=0,o=r.length;i<o;i++){this.currentFootnoteIds=[];const u=r[i],g=u.sectProps||e.props,_=this.createSection(this.className,g);this.renderStyleValues(e.cssStyle,_),this.options.renderHeaders&&this.renderHeaderFooter(g.headerRefs,g,t.length,n!=g,_);var a=this.createElement("article");this.renderElements(u.elements,a),_.appendChild(a),this.options.renderFootnotes&&this.renderNotes(this.currentFootnoteIds,this.footnoteMap,_),this.options.renderEndnotes&&i==o-1&&this.renderNotes(this.currentEndnoteIds,this.endnoteMap,_),this.options.renderFooters&&this.renderHeaderFooter(g.footerRefs,g,t.length,n!=g,_),t.push(_),n=g}return t}renderHeaderFooter(e,t,r,n,a){var u,g;if(!!e){var i=(g=(u=t.titlePage&&n?e.find(_=>_.type=="first"):null)!=null?u:r%2==1?e.find(_=>_.type=="even"):null)!=null?g:e.find(_=>_.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[_]=this.renderElements([o.rootElement],a);t!=null&&t.pageMargins&&(o.rootElement.type===R.Header?(_.style.marginTop=`calc(${t.pageMargins.header} - ${t.pageMargins.top})`,_.style.minHeight=`calc(${t.pageMargins.top} - ${t.pageMargins.header})`):o.rootElement.type===R.Footer&&(_.style.marginBottom=`calc(${t.pageMargins.footer} - ${t.pageMargins.bottom})`,_.style.minHeight=`calc(${t.pageMargins.bottom} - ${t.pageMargins.footer})`)),this.currentPart=null}}}isPageBreakElement(e){return e.type!=R.Break?!1:e.break=="lastRenderedPageBreak"?!this.options.ignoreLastRenderedPageBreak:e.break=="page"}splitBySection(e){var _;var t={sectProps:null,elements:[]},r=[t];for(let y of e){if(y.type==R.Paragraph){const w=this.findStyle(y.styleName);(_=w==null?void 0:w.paragraphProps)!=null&&_.pageBreakBefore&&(t.sectProps=n,t={sectProps:null,elements:[]},r.push(t))}if(t.elements.push(y),y.type==R.Paragraph){const w=y;var n=w.sectionProps,a=-1,i=-1;if(this.options.breakPages&&w.children&&(a=w.children.findIndex(d=>{var k,h;return i=(h=(k=d.children)==null?void 0:k.findIndex(this.isPageBreakElement.bind(this)))!=null?h:-1,i!=-1})),(n||a!=-1)&&(t.sectProps=n,t={sectProps:null,elements:[]},r.push(t)),a!=-1){let d=w.children[a],k=i<d.children.length-1;if(a<w.children.length-1||k){var o=y.children,u={...y,children:o.slice(a)};if(y.children=o.slice(0,a),t.elements.push(u),k){let h=d.children,m={...d,children:h.slice(0,i)};y.children.push(m),d.children=h.slice(i)}}}}}let g=null;for(let y=r.length-1;y>=0;y--)r[y].sectProps==null?r[y].sectProps=g:g=r[y].sectProps;return r}renderWrapper(e){return this.createElement("div",{className:`${this.className}-wrapper`},e)}renderDefaultStyle(){var e=this.className,t=`
.${e}-wrapper { background: gray; padding: 30px; padding-bottom: 0px; display: flex; flex-flow: column; align-items: center; } 
.${e}-wrapper>section.${e} { background: white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); margin-bottom: 30px; }
.${e} { color: black; hyphens: auto; text-underline-position: from-font; }
section.${e} { box-sizing: border-box; display: flex; flex-flow: column nowrap; position: relative; overflow: hidden; }
section.${e}>article { margin-bottom: auto; z-index: 1; }
section.${e}>footer { z-index: 1; }
.${e} table { border-collapse: collapse; }
.${e} table td, .${e} table th { vertical-align: top; }
.${e} p { margin: 0pt; min-height: 1em; }
.${e} span { white-space: pre-wrap; overflow-wrap: break-word; }
.${e} a { color: inherit; text-decoration: inherit; }
`;return Ct(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 u=`--${this.className}-${a.bullet.src}`.toLowerCase();r+=this.styleToString(`${i}:before`,{content:"' '",display:"inline-block",background:`var(${u})`},a.bullet.style),this.tasks.push(this.document.loadNumberingImage(a.bullet.src).then(g=>{var _=`${this.rootSelector} { ${u}: url(${g}) }`;t.appendChild(Ct(_))}))}else if(a.levelText){let u=this.numberingCounter(a.id,a.level);const g=u+" "+(a.start-1);a.level>0&&(r+=this.styleToString(`p.${this.numberingClass(a.id,a.level-1)}`,{"counter-reset":g})),n.push(g),r+=this.styleToString(`${i}:before`,{content:this.levelTextToContent(a.levelText,a.suff,a.id,this.numFormatToCssValue(a.format)),"counter-increment":u,...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(" ")})),Ct(r)}renderStyles(e){var u;var t="";const r=this.styleMap,n=xt(e.filter(g=>g.isDefault),g=>g.target);for(const g of e){var a=g.styles;if(g.linked){var i=g.linked&&r[g.linked];i?a=a.concat(i.styles):this.options.debug&&console.warn(`Can't find linked style ${g.linked}`)}for(const _ of a){var o=`${(u=g.target)!=null?u:""}.${g.cssName}`;g.target!=_.target&&(o+=` ${_.target}`),n[g.target]==g&&(o=`.${this.className} ${g.target}, `+o),t+=this.styleToString(o,_.values)}}return Ct(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 R.Paragraph:return this.renderParagraph(e);case R.BookmarkStart:return this.renderBookmarkStart(e);case R.BookmarkEnd:return null;case R.Run:return this.renderRun(e);case R.Table:return this.renderTable(e);case R.Row:return this.renderTableRow(e);case R.Cell:return this.renderTableCell(e);case R.Hyperlink:return this.renderHyperlink(e);case R.Drawing:return this.renderDrawing(e);case R.Image:return this.renderImage(e);case R.Text:return this.renderText(e);case R.Text:return this.renderText(e);case R.DeletedText:return this.renderDeletedText(e);case R.Tab:return this.renderTab(e);case R.Symbol:return this.renderSymbol(e);case R.Break:return this.renderBreak(e);case R.Footer:return this.renderContainer(e,"footer");case R.Header:return this.renderContainer(e,"header");case R.Footnote:case R.Endnote:return this.renderContainer(e,"li");case R.FootnoteReference:return this.renderFootnoteReference(e);case R.EndnoteReference:return this.renderEndnoteReference(e);case R.NoBreakHyphen:return this.createElement("wbr");case R.VmlPicture:return this.renderVmlPicture(e);case R.VmlElement:return this.renderVmlElement(e);case R.MmlMath:return this.renderContainerNS(e,at.mathML,"math",{xmlns:at.mathML});case R.MmlMathParagraph:return this.renderContainer(e,"span");case R.MmlFraction:return this.renderContainerNS(e,at.mathML,"mfrac");case R.MmlBase:return this.renderContainerNS(e,at.mathML,e.parent.type==R.MmlMatrixRow?"mtd":"mrow");case R.MmlNumerator:case R.MmlDenominator:case R.MmlFunction:case R.MmlLimit:case R.MmlBox:return this.renderContainerNS(e,at.mathML,"mrow");case R.MmlGroupChar:return this.renderMmlGroupChar(e);case R.MmlLimitLower:return this.renderContainerNS(e,at.mathML,"munder");case R.MmlMatrix:return this.renderContainerNS(e,at.mathML,"mtable");case R.MmlMatrixRow:return this.renderContainerNS(e,at.mathML,"mtr");case R.MmlRadical:return this.renderMmlRadical(e);case R.MmlSuperscript:return this.renderContainerNS(e,at.mathML,"msup");case R.MmlSubscript:return this.renderContainerNS(e,at.mathML,"msub");case R.MmlDegree:case R.MmlSuperArgument:case R.MmlSubArgument:return this.renderContainerNS(e,at.mathML,"mn");case R.MmlFunctionName:return this.renderContainerNS(e,at.mathML,"ms");case R.MmlDelimiter:return this.renderMmlDelimiter(e);case R.MmlRun:return this.renderMmlRun(e);case R.MmlNary:return this.renderMmlNary(e);case R.MmlPreSubSuper:return this.renderMmlPreSubSuper(e);case R.MmlBar:return this.renderMmlBar(e);case R.MmlEquationArray:return this.renderMllList(e);case R.Inserted:return this.renderInserted(e);case R.Deleted:return this.renderDeleted(e)}return null}renderChildren(e,t){return this.renderElements(e.children,t)}renderElements(e,t){if(e==null)return null;var r=e.flatMap(n=>this.renderElement(n)).filter(n=>n!=null);return t&&$t(t,r),r}renderContainer(e,t,r){return this.createElement(t,r,this.renderChildren(e))}renderContainerNS(e,t,r,n){return ct(t,r,n,this.renderChildren(e))}renderParagraph(e){var a,i,o,u;var t=this.createElement("p");const r=this.findStyle(e.styleName);(i=e.tabs)!=null||(e.tabs=(a=r==null?void 0:r.paragraphProps)==null?void 0:a.tabs),this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.renderCommonProperties(t.style,e);const n=(u=e.numbering)!=null?u:(o=r==null?void 0:r.paragraphProps)==null?void 0:o.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.createElement("a");if(this.renderChildren(e,t),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}renderDrawing(e){var t=this.createElement("div");return t.style.display="inline-block",t.style.position="relative",t.style.textIndent="0px",this.renderChildren(e,t),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.renderChildren(e)}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=$r(e,R.Paragraph))==null?void 0:n.tabs;this.currentTabs.push({stops:r,span:t})}return t}renderBookmarkStart(e){var t=this.createElement("span");return t.id=e.name,t}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.renderChildren(e,r),t.appendChild(r)}else this.renderChildren(e,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.renderChildren(e,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.createElement("tr");return this.currentCellPosition.col=0,this.renderClass(e,t),this.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),this.currentCellPosition.row++,t}renderTableCell(e){let t=this.createElement("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.renderChildren(e,t),this.renderStyleValues(e.cssStyle,t),e.span&&(t.colSpan=e.span),this.currentCellPosition.col+=t.colSpan,t}renderVmlPicture(e){var t=Ht("div");return this.renderChildren(e,t),t}renderVmlElement(e){var n,a;var t=se("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=se(e.tagName);Object.entries(e.attrs).forEach(([r,n])=>t.setAttribute(r,n));for(let r of e.children)r.type==R.VmlElement?t.appendChild(this.renderVmlChildElement(r)):t.appendChild(...Nt(this.renderElement(r)));return t}renderMmlRadical(e){var n;const t=e.children.find(a=>a.type==R.MmlBase);if((n=e.props)!=null&&n.hideDegree)return ct(at.mathML,"msqrt",null,this.renderElements([t]));const r=e.children.find(a=>a.type==R.MmlDegree);return ct(at.mathML,"mroot",null,this.renderElements([t,r]))}renderMmlDelimiter(e){var r,n;const t=[];return t.push(ct(at.mathML,"mo",null,[(r=e.props.beginChar)!=null?r:"("])),t.push(...this.renderElements(e.children)),t.push(ct(at.mathML,"mo",null,[(n=e.props.endChar)!=null?n:")"])),ct(at.mathML,"mrow",null,t)}renderMmlNary(e){var g,_;const t=[],r=xt(e.children,y=>y.type),n=r[R.MmlSuperArgument],a=r[R.MmlSubArgument],i=n?ct(at.mathML,"mo",null,Nt(this.renderElement(n))):null,o=a?ct(at.mathML,"mo",null,Nt(this.renderElement(a))):null,u=ct(at.mathML,"mo",null,[(_=(g=e.props)==null?void 0:g.char)!=null?_:"\u222B"]);return i||o?t.push(ct(at.mathML,"munderover",null,[u,o,i])):i?t.push(ct(at.mathML,"mover",null,[u,i])):o?t.push(ct(at.mathML,"munder",null,[u,o])):t.push(u),t.push(...this.renderElements(r[R.MmlBase].children)),ct(at.mathML,"mrow",null,t)}renderMmlPreSubSuper(e){const t=[],r=xt(e.children,g=>g.type),n=r[R.MmlSuperArgument],a=r[R.MmlSubArgument],i=n?ct(at.mathML,"mo",null,Nt(this.renderElement(n))):null,o=a?ct(at.mathML,"mo",null,Nt(this.renderElement(a))):null,u=ct(at.mathML,"mo",null);return t.push(ct(at.mathML,"msubsup",null,[u,o,i])),t.push(...this.renderElements(r[R.MmlBase].children)),ct(at.mathML,"mrow",null,t)}renderMmlGroupChar(e){const t=e.props.verticalJustification==="bot"?"mover":"munder",r=this.renderContainerNS(e,at.mathML,t);return e.props.char&&r.appendChild(ct(at.mathML,"mo",null,[e.props.char])),r}renderMmlBar(e){const t=this.renderContainerNS(e,at.mathML,"mrow");switch(e.props.position){case"top":t.style.textDecoration="overline";break;case"bottom":t.style.textDecoration="underline";break}return t}renderMmlRun(e){const t=ct(at.mathML,"ms");return this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderChildren(e,t),t}renderMllList(e){const t=ct(at.mathML,"mtable");this.renderClass(e,t),this.renderStyleValues(e.cssStyle,t),this.renderChildren(e);for(let r of this.renderChildren(e))t.appendChild(ct(at.mathML,"mtr",null,[ct(at.mathML,"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
`;for(const a in t)a.startsWith("$")||(n+=`  ${a}: ${t[a]};\r
`);return r&&(n+=r),n+`}\r
`}numberingCounter(e,t){return`${this.className}-num-${e}-${t}`}levelTextToContent(e,t,r,n){var o;const a={tab:"\\9",space:"\\a0"};var i=e.replace(/%\d*/g,u=>{let g=parseInt(u.substring(1),10)-1;return`"counter(${this.numberingCounter(r,g)}, ${n})"`});return`"${i}${(o=a[t])!=null?o:""}"`}numFormatToCssValue(e){var r;var t={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"};return(r=t[e])!=null?r:e}refreshTabStops(){!this.options.experimental||(clearTimeout(this.tabsTimeout),this.tabsTimeout=setTimeout(()=>{const e=Ur();for(let t of this.currentTabs)Wr(t.span,t.stops,this.defaultTabSize,e)},500))}}function Ht(c,e,t){return ct(void 0,c,e,t)}function se(c,e,t){return ct(at.svg,c,e,t)}function ct(c,e,t,r){var n=c?document.createElementNS(c,e):document.createElement(e);return Object.assign(n,t),r&&$t(n,r),n}function ie(c){c.innerHTML=""}function $t(c,e){e.forEach(t=>c.appendChild(Ve(t)?document.createTextNode(t):t))}function Ct(c){return Ht("style",{innerHTML:c})}function Bt(c,e){c.appendChild(document.createComment(e))}function $r(c,e){for(var t=c.parent;t!=null&&t.type!=e;)t=t.parent;return t}const ye={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};function Zr(c,e){const t={...ye,...e};return Gt.load(c,new Dr(t),t)}async function Vr(c,e,t,r){const n={...ye,...r},a=new Hr(window.document);return a.render(c,e,t,n),Promise.allSettled(a.tasks.filter(i=>i))}async function Xr(c,e,t,r){const n=await Zr(c,r);return await Vr(n,e,t,r),n}const Gr={ref:"docRef",style:{height:"100%"}},Kr=xe({name:"PreviewReport"}),Jr=Object.assign(Kr,{setup(c){Ne();const{proxy:e}=Ae();Ce(()=>{t()});const t=()=>{(e.$route.query.page==="device"?ze:Be)({reportId:e.$route.query.id}).then(n=>{const a={className:"docx",inWrapper:!0,ignoreWidth:!1,ignoreHeight:!1,ignoreFonts:!1,breakPages:!0,ignoreLastRenderedPageBreak:!0,experimental:!1,trimXmlDeclaration:!0,debug:!1,useBase64URL:!0,useMathMLPolyfill:!1,showChanges:!1};Xr(n,e.$refs.docRef,null,a)})};return(r,n)=>(Ee(),Pe("div",Gr,null,512))}});export{Jr as default};
