@vue-office/docx
Version:
支持多种文件(**docx、excel、pdf、pptx**)预览的vue组件库,支持vue2/3。也支持非Vue框架的预览。
12 lines (9 loc) • 174 kB
JavaScript
(function(dt,ft){typeof exports=="object"&&typeof module!="undefined"?module.exports=ft(require("vue-demi"),require("vue")):typeof define=="function"&&define.amd?define(["vue-demi","vue"],ft):(dt=typeof globalThis!="undefined"?globalThis:dt||self,dt["vue-office-docx"]=ft(dt.VueDemi,dt.Vue))})(this,function(dt,ft){"use strict";var gn=Object.defineProperty,bn=Object.defineProperties;var vn=Object.getOwnPropertyDescriptors;var Re=Object.getOwnPropertySymbols;var kn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable;var Me=(dt,ft,vt)=>ft in dt?gn(dt,ft,{enumerable:!0,configurable:!0,writable:!0,value:vt}):dt[ft]=vt,_t=(dt,ft)=>{for(var vt in ft||(ft={}))kn.call(ft,vt)&&Me(dt,vt,ft[vt]);if(Re)for(var vt of Re(ft))yn.call(ft,vt)&&Me(dt,vt,ft[vt]);return dt},Wt=(dt,ft)=>bn(dt,vn(ft));var wt=(dt,ft,vt)=>new Promise((Jt,Bt)=>{var Ht=ot=>{try{It(vt.next(ot))}catch(Ot){Bt(Ot)}},Qt=ot=>{try{It(vt.throw(ot))}catch(Ot){Bt(Ot)}},It=ot=>ot.done?Jt(ot.value):Promise.resolve(ot.value).then(Ht,Qt);It((vt=vt.apply(dt,ft)).next())});typeof window.setImmediate=="undefined"&&(window.setImmediate=function(i,...e){setTimeout(()=>i(e))});var vt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Jt(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Bt(i){throw new Error('Could not dynamically require "'+i+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ht={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(i,e){(function(t){i.exports=t()})(function(){return function t(r,n,a){function l(b,y){if(!n[b]){if(!r[b]){var _=typeof Bt=="function"&&Bt;if(!y&&_)return _(b,!0);if(o)return o(b,!0);var w=new Error("Cannot find module '"+b+"'");throw w.code="MODULE_NOT_FOUND",w}var d=n[b]={exports:{}};r[b][0].call(d.exports,function(k){var h=r[b][1][k];return l(h||k)},d,d.exports,t,r,n,a)}return n[b].exports}for(var o=typeof Bt=="function"&&Bt,u=0;u<a.length;u++)l(a[u]);return l}({1:[function(t,r,n){var a=t("./utils"),l=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(u){for(var b,y,_,w,d,k,h,m=[],f=0,v=u.length,C=v,A=a.getTypeOf(u)!=="string";f<u.length;)C=v-f,_=A?(b=u[f++],y=f<v?u[f++]:0,f<v?u[f++]:0):(b=u.charCodeAt(f++),y=f<v?u.charCodeAt(f++):0,f<v?u.charCodeAt(f++):0),w=b>>2,d=(3&b)<<4|y>>4,k=1<C?(15&y)<<2|_>>6:64,h=2<C?63&_:64,m.push(o.charAt(w)+o.charAt(d)+o.charAt(k)+o.charAt(h));return m.join("")},n.decode=function(u){var b,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,C=3*(u=u.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(u.charAt(u.length-1)===o.charAt(64)&&C--,u.charAt(u.length-2)===o.charAt(64)&&C--,C%1!=0)throw new Error("Invalid base64 input, bad content length.");for(v=l.uint8array?new Uint8Array(0|C):new Array(0|C);h<u.length;)b=o.indexOf(u.charAt(h++))<<2|(w=o.indexOf(u.charAt(h++)))>>4,y=(15&w)<<4|(d=o.indexOf(u.charAt(h++)))>>2,_=(3&d)<<6|(k=o.indexOf(u.charAt(h++))),v[m++]=b,d!==64&&(v[m++]=y),k!==64&&(v[m++]=_);return v}},{"./support":30,"./utils":32}],2:[function(t,r,n){var a=t("./external"),l=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),u=t("./stream/DataLengthProbe");function b(y,_,w,d,k){this.compressedSize=y,this.uncompressedSize=_,this.crc32=w,this.compression=d,this.compressedContent=k}b.prototype={getContentWorker:function(){var y=new l(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new u("data_length")),_=this;return y.on("end",function(){if(this.streamInfo.data_length!==_.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new l(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},b.createWorkerFrom=function(y,_,w){return y.pipe(new o).pipe(new u("uncompressedSize")).pipe(_.compressWorker(w)).pipe(new u("compressedSize")).withStreamInfo("compression",_)},r.exports=b},{"./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"),l=function(){for(var o,u=[],b=0;b<256;b++){o=b;for(var y=0;y<8;y++)o=1&o?3988292384^o>>>1:o>>>1;u[b]=o}return u}();r.exports=function(o,u){return o!==void 0&&o.length?a.getTypeOf(o)!=="string"?function(b,y,_,w){var d=l,k=w+_;b^=-1;for(var h=w;h<k;h++)b=b>>>8^d[255&(b^y[h])];return-1^b}(0|u,o,o.length,0):function(b,y,_,w){var d=l,k=w+_;b^=-1;for(var h=w;h<k;h++)b=b>>>8^d[255&(b^y.charCodeAt(h))];return-1^b}(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!="undefined"?Promise:t("lie"),r.exports={Promise:a}},{lie:37}],7:[function(t,r,n){var a=typeof Uint8Array!="undefined"&&typeof Uint16Array!="undefined"&&typeof Uint32Array!="undefined",l=t("pako"),o=t("./utils"),u=t("./stream/GenericWorker"),b=a?"uint8array":"array";function y(_,w){u.call(this,"FlateWorker/"+_),this._pako=null,this._pakoAction=_,this._pakoOptions=w,this.meta={}}n.magic="\b\0",o.inherits(y,u),y.prototype.processChunk=function(_){this.meta=_.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(b,_.data),!1)},y.prototype.flush=function(){u.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},y.prototype.cleanUp=function(){u.prototype.cleanUp.call(this),this._pako=null},y.prototype._createPako=function(){this._pako=new l[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var _=this;this._pako.onData=function(w){_.push({data:w,meta:_.meta})}},n.compressWorker=function(_){return new y("Deflate",_)},n.uncompressWorker=function(){return new y("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 l(d,k,h,m,f,v){var C,A,E=d.file,D=d.compression,I=v!==b.utf8encode,W=o.transformTo("string",v(E.name)),T=o.transformTo("string",b.utf8encode(E.name)),X=E.comment,Q=o.transformTo("string",v(X)),S=o.transformTo("string",b.utf8encode(X)),O=T.length!==E.name.length,c=S.length!==X.length,L="",et="",$="",rt=E.dir,H=E.date,tt={crc32:0,compressedSize:0,uncompressedSize:0};k&&!h||(tt.crc32=d.crc32,tt.compressedSize=d.compressedSize,tt.uncompressedSize=d.uncompressedSize);var R=0;k&&(R|=8),I||!O&&!c||(R|=2048);var B=0,J=0;rt&&(B|=16),f==="UNIX"?(J=798,B|=function(G,mt){var yt=G;return G||(yt=mt?16893:33204),(65535&yt)<<16}(E.unixPermissions,rt)):(J=20,B|=function(G){return 63&(G||0)}(E.dosPermissions)),C=H.getUTCHours(),C<<=6,C|=H.getUTCMinutes(),C<<=5,C|=H.getUTCSeconds()/2,A=H.getUTCFullYear()-1980,A<<=4,A|=H.getUTCMonth()+1,A<<=5,A|=H.getUTCDate(),O&&(et=a(1,1)+a(y(W),4)+T,L+="up"+a(et.length,2)+et),c&&($=a(1,1)+a(y(Q),4)+S,L+="uc"+a($.length,2)+$);var q="";return q+=`
\0`,q+=a(R,2),q+=D.magic,q+=a(C,2),q+=a(A,2),q+=a(tt.crc32,4),q+=a(tt.compressedSize,4),q+=a(tt.uncompressedSize,4),q+=a(W.length,2),q+=a(L.length,2),{fileRecord:_.LOCAL_FILE_HEADER+q+W+L,dirRecord:_.CENTRAL_FILE_HEADER+a(J,2)+q+a(Q.length,2)+"\0\0\0\0"+a(B,4)+a(m,4)+W+L+Q}}var o=t("../utils"),u=t("../stream/GenericWorker"),b=t("../utf8"),y=t("../crc32"),_=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=l(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=l(d,k,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),k)this.push({data:function(m){return _.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,C,A,E){var D=o.transformTo("string",E(A));return _.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(f,2)+a(f,2)+a(v,4)+a(C,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(m){}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"),l=t("./ZipFileWorker");n.generateWorker=function(o,u,b){var y=new l(u.streamFiles,b,u.platform,u.encodeFileName),_=0;try{o.forEach(function(w,d){_++;var k=function(v,C){var A=v||C,E=a[A];if(!E)throw new Error(A+" is not a valid compression method !");return E}(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(y)}),y.entriesCount=_}catch(w){y.error(w)}return y}},{"../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 l=new a;for(var o in this)typeof this[o]!="function"&&(l[o]=this[o]);return l}}(a.prototype=t("./object")).loadAsync=t("./load"),a.support=t("./support"),a.defaults=t("./defaults"),a.version="3.10.1",a.loadAsync=function(l,o){return new a().loadAsync(l,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"),l=t("./external"),o=t("./utf8"),u=t("./zipEntries"),b=t("./stream/Crc32Probe"),y=t("./nodejsUtils");function _(w){return new l.Promise(function(d,k){var h=w.decompressed.getContentWorker().pipe(new b);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}),y.isNode&&y.isStream(w)?l.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=[l.Promise.resolve(h)],f=h.files;if(d.checkCRC32)for(var v=0;v<f.length;v++)m.push(_(f[v]));return l.Promise.all(m)}).then(function(h){for(var m=h.shift(),f=m.files,v=0;v<f.length;v++){var C=f[v],A=C.fileNameStr,E=a.resolve(C.fileNameStr);k.file(E,C.decompressed,{binary:!0,optimizedBinaryString:!0,date:C.date,dir:C.dir,comment:C.fileCommentStr.length?C.fileCommentStr:null,unixPermissions:C.unixPermissions,dosPermissions:C.dosPermissions,createFolders:d.createFolders}),C.dir||(k.file(E).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"),l=t("../stream/GenericWorker");function o(u,b){l.call(this,"Nodejs stream input adapter for "+u),this._upstreamEnded=!1,this._bindStream(b)}a.inherits(o,l),o.prototype._bindStream=function(u){var b=this;(this._stream=u).pause(),u.on("data",function(y){b.push({data:y,meta:{percent:0}})}).on("error",function(y){b.isPaused?this.generatedError=y:b.error(y)}).on("end",function(){b.isPaused?b._upstreamEnded=!0:b.end()})},o.prototype.pause=function(){return!!l.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!l.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 l(o,u,b){a.call(this,u),this._helper=o;var y=this;o.on("data",function(_,w){y.push(_)||y._helper.pause(),b&&b(w)}).on("error",function(_){y.emit("error",_)}).on("end",function(){y.push(null)})}t("../utils").inherits(l,a),l.prototype._read=function(){this._helper.resume()},r.exports=l},{"../utils":32,"readable-stream":16}],14:[function(t,r,n){r.exports={isNode:typeof Buffer!="undefined",newBufferFrom:function(a,l){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(a,l);if(typeof a=="number")throw new Error('The "data" argument must not be a number');return new Buffer(a,l)},allocBuffer:function(a){if(Buffer.alloc)return Buffer.alloc(a);var l=new Buffer(a);return l.fill(0),l},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(E,D,I){var W,T=o.getTypeOf(D),X=o.extend(I||{},y);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&&(E=f(E)),X.createFolders&&(W=m(E))&&v.call(this,W,!0);var Q=T==="string"&&X.binary===!1&&X.base64===!1;I&&I.binary!==void 0||(X.binary=!Q),(D instanceof _&&D.uncompressedSize===0||X.dir||!D||D.length===0)&&(X.base64=!1,X.binary=!0,D="",X.compression="STORE",T="string");var S=null;S=D instanceof _||D instanceof u?D:k.isNode&&k.isStream(D)?new h(E,D):o.prepareContent(E,D,X.binary,X.optimizedBinaryString,X.base64);var O=new w(E,S,X);this.files[E]=O}var l=t("./utf8"),o=t("./utils"),u=t("./stream/GenericWorker"),b=t("./stream/StreamHelper"),y=t("./defaults"),_=t("./compressedObject"),w=t("./zipObject"),d=t("./generate"),k=t("./nodejsUtils"),h=t("./nodejs/NodejsStreamInputAdapter"),m=function(E){E.slice(-1)==="/"&&(E=E.substring(0,E.length-1));var D=E.lastIndexOf("/");return 0<D?E.substring(0,D):""},f=function(E){return E.slice(-1)!=="/"&&(E+="/"),E},v=function(E,D){return D=D!==void 0?D:y.createFolders,E=f(E),this.files[E]||a.call(this,E,null,{dir:!0,createFolders:D}),this.files[E]};function C(E){return Object.prototype.toString.call(E)==="[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(E){var D,I,W;for(D in this.files)W=this.files[D],(I=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&E(I,W)},filter:function(E){var D=[];return this.forEach(function(I,W){E(I,W)&&D.push(W)}),D},file:function(E,D,I){if(arguments.length!==1)return E=this.root+E,a.call(this,E,D,I),this;if(C(E)){var W=E;return this.filter(function(X,Q){return!Q.dir&&W.test(X)})}var T=this.files[this.root+E];return T&&!T.dir?T:null},folder:function(E){if(!E)return this;if(C(E))return this.filter(function(T,X){return X.dir&&E.test(T)});var D=this.root+E,I=v.call(this,D),W=this.clone();return W.root=I.name,W},remove:function(E){E=this.root+E;var D=this.files[E];if(D||(E.slice(-1)!=="/"&&(E+="/"),D=this.files[E]),D&&!D.dir)delete this.files[E];else for(var I=this.filter(function(T,X){return X.name.slice(0,E.length)===E}),W=0;W<I.length;W++)delete this.files[I[W].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(E){var D,I={};try{if((I=o.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:l.utf8encode})).type=I.type.toLowerCase(),I.compression=I.compression.toUpperCase(),I.type==="binarystring"&&(I.type="string"),!I.type)throw new Error("No output type specified.");o.checkSupport(I.type),I.platform!=="darwin"&&I.platform!=="freebsd"&&I.platform!=="linux"&&I.platform!=="sunos"||(I.platform="UNIX"),I.platform==="win32"&&(I.platform="DOS");var W=I.comment||this.comment||"";D=d.generateWorker(this,I,W)}catch(T){(D=new u("error")).error(T)}return new b(D,I.type||"string",I.mimeType)},generateAsync:function(E,D){return this.generateInternalStream(E).accumulate(D)},generateNodeStream:function(E,D){return(E=E||{}).type||(E.type="nodebuffer"),this.generateInternalStream(E).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 l(o){a.call(this,o);for(var u=0;u<this.data.length;u++)o[u]=255&o[u]}t("../utils").inherits(l,a),l.prototype.byteAt=function(o){return this.data[this.zero+o]},l.prototype.lastIndexOfSignature=function(o){for(var u=o.charCodeAt(0),b=o.charCodeAt(1),y=o.charCodeAt(2),_=o.charCodeAt(3),w=this.length-4;0<=w;--w)if(this.data[w]===u&&this.data[w+1]===b&&this.data[w+2]===y&&this.data[w+3]===_)return w-this.zero;return-1},l.prototype.readAndCheckSignature=function(o){var u=o.charCodeAt(0),b=o.charCodeAt(1),y=o.charCodeAt(2),_=o.charCodeAt(3),w=this.readData(4);return u===w[0]&&b===w[1]&&y===w[2]&&_===w[3]},l.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=l},{"../utils":32,"./DataReader":18}],18:[function(t,r,n){var a=t("../utils");function l(o){this.data=o,this.length=o.length,this.index=0,this.zero=0}l.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,b=0;for(this.checkOffset(o),u=this.index+o-1;u>=this.index;u--)b=(b<<8)+this.byteAt(u);return this.index+=o,b},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=l},{"../utils":32}],19:[function(t,r,n){var a=t("./Uint8ArrayReader");function l(o){a.call(this,o)}t("../utils").inherits(l,a),l.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=l},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,r,n){var a=t("./DataReader");function l(o){a.call(this,o)}t("../utils").inherits(l,a),l.prototype.byteAt=function(o){return this.data.charCodeAt(this.zero+o)},l.prototype.lastIndexOfSignature=function(o){return this.data.lastIndexOf(o)-this.zero},l.prototype.readAndCheckSignature=function(o){return o===this.readData(4)},l.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=l},{"../utils":32,"./DataReader":18}],21:[function(t,r,n){var a=t("./ArrayReader");function l(o){a.call(this,o)}t("../utils").inherits(l,a),l.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=l},{"../utils":32,"./ArrayReader":17}],22:[function(t,r,n){var a=t("../utils"),l=t("../support"),o=t("./ArrayReader"),u=t("./StringReader"),b=t("./NodeBufferReader"),y=t("./Uint8ArrayReader");r.exports=function(_){var w=a.getTypeOf(_);return a.checkSupport(w),w!=="string"||l.uint8array?w==="nodebuffer"?new b(_):l.uint8array?new y(a.transformTo("uint8array",_)):new o(a.transformTo("array",_)):new u(_)}},{"../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"),l=t("../utils");function o(u){a.call(this,"ConvertWorker to "+u),this.destType=u}l.inherits(o,a),o.prototype.processChunk=function(u){this.push({data:l.transformTo(this.destType,u.data),meta:u.meta})},r.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,r,n){var a=t("./GenericWorker"),l=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=l(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"),l=t("./GenericWorker");function o(u){l.call(this,"DataLengthProbe for "+u),this.propName=u,this.withStreamInfo(u,0)}a.inherits(o,l),o.prototype.processChunk=function(u){if(u){var b=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=b+u.data.length}l.prototype.processChunk.call(this,u)},r.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,r,n){var a=t("../utils"),l=t("./GenericWorker");function o(u){l.call(this,"DataWorker");var b=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,u.then(function(y){b.dataIsReady=!0,b.data=y,b.max=y&&y.length||0,b.type=a.getTypeOf(y),b.isPaused||b._tickAndRepeat()},function(y){b.error(y)})}a.inherits(o,l),o.prototype.cleanUp=function(){l.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!l.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,b=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,b);break;case"uint8array":u=this.data.subarray(this.index,b);break;case"array":case"nodebuffer":u=this.data.slice(this.index,b)}return this.index=b,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(l){this.name=l||"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(l){this.emit("data",l)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(l){this.emit("error",l)}return!0},error:function(l){return!this.isFinished&&(this.isPaused?this.generatedError=l:(this.isFinished=!0,this.emit("error",l),this.previous&&this.previous.error(l),this.cleanUp()),!0)},on:function(l,o){return this._listeners[l].push(o),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(l,o){if(this._listeners[l])for(var u=0;u<this._listeners[l].length;u++)this._listeners[l][u].call(this,o)},pipe:function(l){return l.registerPrevious(this)},registerPrevious:function(l){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=l.streamInfo,this.mergeStreamInfo(),this.previous=l;var o=this;return l.on("data",function(u){o.processChunk(u)}),l.on("end",function(){o.end()}),l.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 l=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),l=!0),this.previous&&this.previous.resume(),!l},flush:function(){},processChunk:function(l){this.push(l)},withStreamInfo:function(l,o){return this.extraStreamInfo[l]=o,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var l in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,l)&&(this.streamInfo[l]=this.extraStreamInfo[l])},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 l="Worker "+this.name;return this.previous?this.previous+" -> "+l:l}},r.exports=a},{}],29:[function(t,r,n){var a=t("../utils"),l=t("./ConvertWorker"),o=t("./GenericWorker"),u=t("../base64"),b=t("../support"),y=t("../external"),_=null;if(b.nodestream)try{_=t("../nodejs/NodejsStreamOutputAdapter")}catch(k){}function w(k,h){return new y.Promise(function(m,f){var v=[],C=k._internalType,A=k._outputType,E=k._mimeType;k.on("data",function(D,I){v.push(D),h&&h(I)}).on("error",function(D){v=[],f(D)}).on("end",function(){try{var D=function(I,W,T){switch(I){case"blob":return a.newBlob(a.transformTo("arraybuffer",W),T);case"base64":return u.encode(W);default:return a.transformTo(I,W)}}(A,function(I,W){var T,X=0,Q=null,S=0;for(T=0;T<W.length;T++)S+=W[T].length;switch(I){case"string":return W.join("");case"array":return Array.prototype.concat.apply([],W);case"uint8array":for(Q=new Uint8Array(S),T=0;T<W.length;T++)Q.set(W[T],X),X+=W[T].length;return Q;case"nodebuffer":return Buffer.concat(W);default:throw new Error("concat : unsupported type '"+I+"'")}}(C,v),E);m(D)}catch(I){f(I)}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 l(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 _(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!="undefined"&&typeof Uint8Array!="undefined",n.nodebuffer=typeof Buffer!="undefined",n.uint8array=typeof Uint8Array!="undefined",typeof ArrayBuffer=="undefined")n.blob=!1;else{var a=new ArrayBuffer(0);try{n.blob=new Blob([a],{type:"application/zip"}).size===0}catch(o){try{var l=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);l.append(a),n.blob=l.getBlob("application/zip").size===0}catch(u){n.blob=!1}}}try{n.nodestream=!!t("readable-stream").Readable}catch(o){n.nodestream=!1}},{"readable-stream":16}],31:[function(t,r,n){for(var a=t("./utils"),l=t("./support"),o=t("./nodejsUtils"),u=t("./stream/GenericWorker"),b=new Array(256),y=0;y<256;y++)b[y]=252<=y?6:248<=y?5:240<=y?4:224<=y?3:192<=y?2:1;b[254]=b[254]=1;function _(){u.call(this,"utf-8 decode"),this.leftOver=null}function w(){u.call(this,"utf-8 encode")}n.utf8encode=function(d){return l.nodebuffer?o.newBufferFrom(d,"utf-8"):function(k){var h,m,f,v,C,A=k.length,E=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++),E+=m<128?1:m<2048?2:m<65536?3:4;for(h=l.uint8array?new Uint8Array(E):new Array(E),v=C=0;C<E;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[C++]=m:(m<2048?h[C++]=192|m>>>6:(m<65536?h[C++]=224|m>>>12:(h[C++]=240|m>>>18,h[C++]=128|m>>>12&63),h[C++]=128|m>>>6&63),h[C++]=128|63&m);return h}(d)},n.utf8decode=function(d){return l.nodebuffer?a.transformTo("nodebuffer",d).toString("utf-8"):function(k){var h,m,f,v,C=k.length,A=new Array(2*C);for(h=m=0;h<C;)if((f=k[h++])<128)A[m++]=f;else if(4<(v=b[f]))A[m++]=65533,h+=v-1;else{for(f&=v===2?31:v===3?15:7;1<v&&h<C;)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(l.uint8array?"uint8array":"array",d))},a.inherits(_,u),_.prototype.processChunk=function(d){var k=a.transformTo(l.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(l.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,C){var A;for((C=C||v.length)>v.length&&(C=v.length),A=C-1;0<=A&&(192&v[A])==128;)A--;return A<0||A===0?C:A+b[v[A]]>C?A:C}(k),f=k;m!==k.length&&(l.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})},_.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=_,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"),l=t("./base64"),o=t("./nodejsUtils"),u=t("./external");function b(h){return h}function y(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(v){try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(h),f.getBlob(m)}catch(C){throw new Error("Bug : can't construct the Blob.")}}};var _={stringifyByChunk:function(h,m,f){var v=[],C=0,A=h.length;if(A<=f)return String.fromCharCode.apply(null,h);for(;C<A;)m==="array"||m==="nodebuffer"?v.push(String.fromCharCode.apply(null,h.slice(C,Math.min(C+f,A)))):v.push(String.fromCharCode.apply(null,h.subarray(C,Math.min(C+f,A)))),C+=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(h){return!1}}(),nodebuffer:function(){try{return a.nodebuffer&&String.fromCharCode.apply(null,o.allocBuffer(1)).length===1}catch(h){return!1}}()}};function w(h){var m=65536,f=n.getTypeOf(h),v=!0;if(f==="uint8array"?v=_.applyCanBeUsed.uint8array:f==="nodebuffer"&&(v=_.applyCanBeUsed.nodebuffer),v)for(;1<m;)try{return _.stringifyByChunk(h,f,m)}catch(C){m=Math.floor(m/2)}return _.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:b,array:function(h){return y(h,new Array(h.length))},arraybuffer:function(h){return k.string.uint8array(h).buffer},uint8array:function(h){return y(h,new Uint8Array(h.length))},nodebuffer:function(h){return y(h,o.allocBuffer(h.length))}},k.array={string:w,array:b,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:b,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:b,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:b},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 C=m[v];C==="."||C===""&&v!==0&&v!==m.length-1||(C===".."?f.pop():f.push(C))}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,C){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!="undefined"?new u.Promise(function(E,D){var I=new FileReader;I.onload=function(W){E(W.target.result)},I.onerror=function(W){D(W.target.error)},I.readAsArrayBuffer(A)}):A}).then(function(A){var E=n.getTypeOf(A);return E?(E==="arraybuffer"?A=n.transformTo("uint8array",A):E==="string"&&(C?A=l.decode(A):f&&v!==!0&&(A=function(D){return y(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"),l=t("./utils"),o=t("./signature"),u=t("./zipEntry"),b=t("./support");function y(_){this.files=[],this.loadOptions=_}y.prototype={checkSignature:function(_){if(!this.reader.readAndCheckSignature(_)){this.reader.index-=4;var w=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+l.pretty(w)+", expected "+l.pretty(_)+")")}},isSignature:function(_,w){var d=this.reader.index;this.reader.setIndex(_);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 _=this.reader.readData(this.zipCommentLength),w=b.uint8array?"uint8array":"array",d=l.transformTo(w,_);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 _,w,d,k=this.zip64EndOfCentralSize-44;0<k;)_=this.reader.readInt(2),w=this.reader.readInt(4),d=this.reader.readData(w),this.zip64ExtensibleData[_]={id:_,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 _,w;for(_=0;_<this.files.length;_++)w=this.files[_],this.reader.setIndex(w.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),w.readLocalPart(this.reader),w.handleUTF8(),w.processAttributes()},readCentralDir:function(){var _;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(_=new u({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(_);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 _=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(_<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(_);var w=_;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===l.MAX_VALUE_16BITS||this.diskWithCentralDirStart===l.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===l.MAX_VALUE_16BITS||this.centralDirRecords===l.MAX_VALUE_16BITS||this.centralDirSize===l.MAX_VALUE_32BITS||this.centralDirOffset===l.MAX_VALUE_32BITS){if(this.zip64=!0,(_=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(_),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(_){this.reader=a(_)},load:function(_){this.prepareReader(_),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},r.exports=y},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(t,r,n){var a=t("./reader/readerFor"),l=t("./utils"),o=t("./compressedObject"),u=t("./crc32"),b=t("./utf8"),y=t("./compressions"),_=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 y)if(Object.prototype.hasOwnProperty.call(y,f)&&y[f].magic===m)return y[f];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+l.pretty(this.compressionMethod)+" unknown (inner file : "+l.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===l.MAX_VALUE_32BITS&&(this.uncompressedSize=d.readInt(8)),this.compressedSize===l.MAX_VALUE_32BITS&&(this.compressedSize=d.readInt(8)),this.localHeaderOffset===l.MAX_VALUE_32BITS&&(this.localHeaderOffset=d.readInt(8)),this.diskNumberStart===l.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=_.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=b.utf8decode(this.fileName),this.fileCommentStr=b.utf8decode(this.fileComment);else{var k=this.findExtraFieldUnicodePath();if(k!==null)this.fileNameStr=k;else{var h=l.transformTo(d,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var m=this.findExtraFieldUnicodeComment();if(m!==null)this.fileCommentStr=m;else{var f=l.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:b.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:b.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 l=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),u=t("./utf8"),b=t("./compressedObject"),y=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(C){(h=new y("error")).error(C)}return new l(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 b&&this._data.compression.magic===k.magic)return this._data.getCompressedWorker();var m=this._decompressWorker();return this._dataBinary||(m=m.pipe(new u.Utf8EncodeWorker)),b.createWorkerFrom(m,k,h)},_decompressWorker:function(){return this._data instanceof b?this._data.getContentWorker():this._data instanceof y?this._data:new o(this._data)}};for(var _=["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<_.length;d++)a.prototype[_[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 l,o,u=a.MutationObserver||a.WebKitMutationObserver;if(u){var b=0,y=new u(k),_=a.document.createTextNode("");y.observe(_,{characterData:!0}),l=function(){_.data=b=++b%2}}else if(a.setImmediate||a.MessageChannel===void 0)l="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,l=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||l()}}).call(this,typeof vt!="undefined"?vt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],37:[function(t,r,n){var a=t("immediate");function l(){}var o={},u=["REJECTED"],b=["FULFILLED"],y=["PENDING"];function _(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=y,this.queue=[],this.outcome=void 0,f!==l&&h(this,f)}function w(f,v,C){this.promise=f,typeof v=="function"&&(this.onFulfilled=v,this.callFulfilled=this.otherCallFulfilled),typeof C=="function"&&(this.onRejected=C,this.callRejected=this.otherCallRejected)}function d(f,v,C){a(function(){var A;try{A=v(C)}catch(E){return o.reject(f,E)}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 C=!1;function A(I){C||(C=!0,o.reject(f,I))}function E(I){C||(C=!0,o.resolve(f,I))}var D=m(function(){v(E,A)});D.status==="error"&&A(D.value)}function m(f,v){var C={};try{C.value=f(v),C.status="success"}catch(A){C.status="error",C.value=A}return C}(r.exports=_).prototype.finally=function(f){if(typeof f!="function")return this;var v=this.constructor;return this.then(function(C){return v.resolve(f()).then(function(){return C})},function(C){return v.resolve(f()).then(function(){throw C})})},_.prototype.catch=function(f){return this.then(null,f)},_.prototype.then=f