UNPKG

@vue-office/docx

Version:

支持多种文件(**docx、excel、pdf、pptx**)预览的vue组件库,支持vue2/3。也支持非Vue框架的预览。

12 lines (9 loc) 175 kB
(function(ft,dt){typeof exports=="object"&&typeof module!="undefined"?module.exports=dt(require("vue-demi")):typeof define=="function"&&define.amd?define(["vue-demi"],dt):(ft=typeof globalThis!="undefined"?globalThis:ft||self,ft["vue-office-docx"]=dt(ft.VueDemi))})(this,function(ft){"use strict";var bn=Object.defineProperty,vn=Object.defineProperties;var _n=Object.getOwnPropertyDescriptors;var Re=Object.getOwnPropertySymbols;var kn=Object.prototype.hasOwnProperty,yn=Object.prototype.propertyIsEnumerable;var Me=(ft,dt,_t)=>dt in ft?bn(ft,dt,{enumerable:!0,configurable:!0,writable:!0,value:_t}):ft[dt]=_t,yt=(ft,dt)=>{for(var _t in dt||(dt={}))kn.call(dt,_t)&&Me(ft,_t,dt[_t]);if(Re)for(var _t of Re(dt))yn.call(dt,_t)&&Me(ft,_t,dt[_t]);return ft},Ht=(ft,dt)=>vn(ft,_n(dt));var wt=(ft,dt,_t)=>new Promise((Mt,Ft)=>{var Jt=At=>{try{lt(_t.next(At))}catch(Tt){Ft(Tt)}},Qt=At=>{try{lt(_t.throw(At))}catch(Tt){Ft(Tt)}},lt=At=>At.done?Mt(At.value):Promise.resolve(At.value).then(Jt,Qt);lt((_t=_t.apply(ft,dt)).next())});typeof window.setImmediate=="undefined"&&(window.setImmediate=function(i,...e){setTimeout(()=>i(e))});var dt=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function _t(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function Mt(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 Ft={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(g,y){if(!n[g]){if(!r[g]){var w=typeof Mt=="function"&&Mt;if(!y&&w)return w(g,!0);if(o)return o(g,!0);var k=new Error("Cannot find module '"+g+"'");throw k.code="MODULE_NOT_FOUND",k}var d=n[g]={exports:{}};r[g][0].call(d.exports,function(v){var u=r[g][1][v];return l(u||v)},d,d.exports,t,r,n,a)}return n[g].exports}for(var o=typeof Mt=="function"&&Mt,h=0;h<a.length;h++)l(a[h]);return l}({1:[function(t,r,n){var a=t("./utils"),l=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(h){for(var g,y,w,k,d,v,u,m=[],f=0,_=h.length,C=_,A=a.getTypeOf(h)!=="string";f<h.length;)C=_-f,w=A?(g=h[f++],y=f<_?h[f++]:0,f<_?h[f++]:0):(g=h.charCodeAt(f++),y=f<_?h.charCodeAt(f++):0,f<_?h.charCodeAt(f++):0),k=g>>2,d=(3&g)<<4|y>>4,v=1<C?(15&y)<<2|w>>6:64,u=2<C?63&w:64,m.push(o.charAt(k)+o.charAt(d)+o.charAt(v)+o.charAt(u));return m.join("")},n.decode=function(h){var g,y,w,k,d,v,u=0,m=0,f="data:";if(h.substr(0,f.length)===f)throw new Error("Invalid base64 input, it looks like a data url.");var _,C=3*(h=h.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(h.charAt(h.length-1)===o.charAt(64)&&C--,h.charAt(h.length-2)===o.charAt(64)&&C--,C%1!=0)throw new Error("Invalid base64 input, bad content length.");for(_=l.uint8array?new Uint8Array(0|C):new Array(0|C);u<h.length;)g=o.indexOf(h.charAt(u++))<<2|(k=o.indexOf(h.charAt(u++)))>>4,y=(15&k)<<4|(d=o.indexOf(h.charAt(u++)))>>2,w=(3&d)<<6|(v=o.indexOf(h.charAt(u++))),_[m++]=g,d!==64&&(_[m++]=y),v!==64&&(_[m++]=w);return _}},{"./support":30,"./utils":32}],2:[function(t,r,n){var a=t("./external"),l=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),h=t("./stream/DataLengthProbe");function g(y,w,k,d,v){this.compressedSize=y,this.uncompressedSize=w,this.crc32=k,this.compression=d,this.compressedContent=v}g.prototype={getContentWorker:function(){var y=new l(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),w=this;return y.on("end",function(){if(this.streamInfo.data_length!==w.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)}},g.createWorkerFrom=function(y,w,k){return y.pipe(new o).pipe(new h("uncompressedSize")).pipe(w.compressWorker(k)).pipe(new h("compressedSize")).withStreamInfo("compression",w)},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"),l=function(){for(var o,h=[],g=0;g<256;g++){o=g;for(var y=0;y<8;y++)o=1&o?3988292384^o>>>1:o>>>1;h[g]=o}return h}();r.exports=function(o,h){return o!==void 0&&o.length?a.getTypeOf(o)!=="string"?function(g,y,w,k){var d=l,v=k+w;g^=-1;for(var u=k;u<v;u++)g=g>>>8^d[255&(g^y[u])];return-1^g}(0|h,o,o.length,0):function(g,y,w,k){var d=l,v=k+w;g^=-1;for(var u=k;u<v;u++)g=g>>>8^d[255&(g^y.charCodeAt(u))];return-1^g}(0|h,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"),h=t("./stream/GenericWorker"),g=a?"uint8array":"array";function y(w,k){h.call(this,"FlateWorker/"+w),this._pako=null,this._pakoAction=w,this._pakoOptions=k,this.meta={}}n.magic="\b\0",o.inherits(y,h),y.prototype.processChunk=function(w){this.meta=w.meta,this._pako===null&&this._createPako(),this._pako.push(o.transformTo(g,w.data),!1)},y.prototype.flush=function(){h.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},y.prototype.cleanUp=function(){h.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 w=this;this._pako.onData=function(k){w.push({data:k,meta:w.meta})}},n.compressWorker=function(w){return new y("Deflate",w)},n.uncompressWorker=function(){return new y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,r,n){function a(d,v){var u,m="";for(u=0;u<v;u++)m+=String.fromCharCode(255&d),d>>>=8;return m}function l(d,v,u,m,f,_){var C,A,E=d.file,D=d.compression,O=_!==g.utf8encode,W=o.transformTo("string",_(E.name)),T=o.transformTo("string",g.utf8encode(E.name)),X=E.comment,Q=o.transformTo("string",_(X)),S=o.transformTo("string",g.utf8encode(X)),I=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};v&&!u||(tt.crc32=d.crc32,tt.compressedSize=d.compressedSize,tt.uncompressedSize=d.uncompressedSize);var R=0;v&&(R|=8),O||!I&&!c||(R|=2048);var B=0,J=0;rt&&(B|=16),f==="UNIX"?(J=798,B|=function(G,mt){var kt=G;return G||(kt=mt?16893:33204),(65535&kt)<<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(),I&&(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:w.LOCAL_FILE_HEADER+q+W+L,dirRecord:w.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"),h=t("../stream/GenericWorker"),g=t("../utf8"),y=t("../crc32"),w=t("../signature");function k(d,v,u,m){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=v,this.zipPlatform=u,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(k,h),k.prototype.push=function(d){var v=d.meta.percent||0,u=this.entriesCount,m=this._sources.length;this.accumulate?this.contentBuffer.push(d):(this.bytesWritten+=d.data.length,h.prototype.push.call(this,{data:d.data,meta:{currentFile:this.currentFile,percent:u?(v+100*(u-m-1))/u:100}}))},k.prototype.openedSource=function(d){this.currentSourceOffset=this.bytesWritten,this.currentFile=d.file.name;var v=this.streamFiles&&!d.file.dir;if(v){var u=l(d,v,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:u.fileRecord,meta:{percent:0}})}else this.accumulate=!0},k.prototype.closedSource=function(d){this.accumulate=!1;var v=this.streamFiles&&!d.file.dir,u=l(d,v,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(u.dirRecord),v)this.push({data:function(m){return w.DATA_DESCRIPTOR+a(m.crc32,4)+a(m.compressedSize,4)+a(m.uncompressedSize,4)}(d),meta:{percent:100}});else for(this.push({data:u.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},k.prototype.flush=function(){for(var d=this.bytesWritten,v=0;v<this.dirRecords.length;v++)this.push({data:this.dirRecords[v],meta:{percent:100}});var u=this.bytesWritten-d,m=function(f,_,C,A,E){var D=o.transformTo("string",E(A));return w.CENTRAL_DIRECTORY_END+"\0\0\0\0"+a(f,2)+a(f,2)+a(_,4)+a(C,4)+a(D.length,2)+D}(this.dirRecords.length,u,d,this.zipComment,this.encodeFileName);this.push({data:m,meta:{percent:100}})},k.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},k.prototype.registerPrevious=function(d){this._sources.push(d);var v=this;return d.on("data",function(u){v.processChunk(u)}),d.on("end",function(){v.closedSource(v.previous.streamInfo),v._sources.length?v.prepareNextSource():v.end()}),d.on("error",function(u){v.error(u)}),this},k.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},k.prototype.error=function(d){var v=this._sources;if(!h.prototype.error.call(this,d))return!1;for(var u=0;u<v.length;u++)try{v[u].error(d)}catch(m){}return!0},k.prototype.lock=function(){h.prototype.lock.call(this);for(var d=this._sources,v=0;v<d.length;v++)d[v].lock()},r.exports=k},{"../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,h,g){var y=new l(h.streamFiles,g,h.platform,h.encodeFileName),w=0;try{o.forEach(function(k,d){w++;var v=function(_,C){var A=_||C,E=a[A];if(!E)throw new Error(A+" is not a valid compression method !");return E}(d.options.compression,h.compression),u=d.options.compressionOptions||h.compressionOptions||{},m=d.dir,f=d.date;d._compressWorker(v,u).withStreamInfo("file",{name:k,dir:m,date:f,comment:d.comment||"",unixPermissions:d.unixPermissions,dosPermissions:d.dosPermissions}).pipe(y)}),y.entriesCount=w}catch(k){y.error(k)}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"),h=t("./zipEntries"),g=t("./stream/Crc32Probe"),y=t("./nodejsUtils");function w(k){return new l.Promise(function(d,v){var u=k.decompressed.getContentWorker().pipe(new g);u.on("error",function(m){v(m)}).on("end",function(){u.streamInfo.crc32!==k.decompressed.crc32?v(new Error("Corrupted zip : CRC32 mismatch")):d()}).resume()})}r.exports=function(k,d){var v=this;return d=a.extend(d||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),y.isNode&&y.isStream(k)?l.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):a.prepareContent("the loaded zip file",k,!0,d.optimizedBinaryString,d.base64).then(function(u){var m=new h(d);return m.load(u),m}).then(function(u){var m=[l.Promise.resolve(u)],f=u.files;if(d.checkCRC32)for(var _=0;_<f.length;_++)m.push(w(f[_]));return l.Promise.all(m)}).then(function(u){for(var m=u.shift(),f=m.files,_=0;_<f.length;_++){var C=f[_],A=C.fileNameStr,E=a.resolve(C.fileNameStr);v.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||(v.file(E).unsafeOriginalName=A)}return m.zipComment.length&&(v.comment=m.zipComment),v})}},{"./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(h,g){l.call(this,"Nodejs stream input adapter for "+h),this._upstreamEnded=!1,this._bindStream(g)}a.inherits(o,l),o.prototype._bindStream=function(h){var g=this;(this._stream=h).pause(),h.on("data",function(y){g.push({data:y,meta:{percent:0}})}).on("error",function(y){g.isPaused?this.generatedError=y:g.error(y)}).on("end",function(){g.isPaused?g._upstreamEnded=!0:g.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,h,g){a.call(this,h),this._helper=o;var y=this;o.on("data",function(w,k){y.push(w)||y._helper.pause(),g&&g(k)}).on("error",function(w){y.emit("error",w)}).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,O){var W,T=o.getTypeOf(D),X=o.extend(O||{},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))&&_.call(this,W,!0);var Q=T==="string"&&X.binary===!1&&X.base64===!1;O&&O.binary!==void 0||(X.binary=!Q),(D instanceof w&&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 w||D instanceof h?D:v.isNode&&v.isStream(D)?new u(E,D):o.prepareContent(E,D,X.binary,X.optimizedBinaryString,X.base64);var I=new k(E,S,X);this.files[E]=I}var l=t("./utf8"),o=t("./utils"),h=t("./stream/GenericWorker"),g=t("./stream/StreamHelper"),y=t("./defaults"),w=t("./compressedObject"),k=t("./zipObject"),d=t("./generate"),v=t("./nodejsUtils"),u=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},_=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,O,W;for(D in this.files)W=this.files[D],(O=D.slice(this.root.length,D.length))&&D.slice(0,this.root.length)===this.root&&E(O,W)},filter:function(E){var D=[];return this.forEach(function(O,W){E(O,W)&&D.push(W)}),D},file:function(E,D,O){if(arguments.length!==1)return E=this.root+E,a.call(this,E,D,O),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,O=_.call(this,D),W=this.clone();return W.root=O.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 O=this.filter(function(T,X){return X.name.slice(0,E.length)===E}),W=0;W<O.length;W++)delete this.files[O[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,O={};try{if((O=o.extend(E||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:l.utf8encode})).type=O.type.toLowerCase(),O.compression=O.compression.toUpperCase(),O.type==="binarystring"&&(O.type="string"),!O.type)throw new Error("No output type specified.");o.checkSupport(O.type),O.platform!=="darwin"&&O.platform!=="freebsd"&&O.platform!=="linux"&&O.platform!=="sunos"||(O.platform="UNIX"),O.platform==="win32"&&(O.platform="DOS");var W=O.comment||this.comment||"";D=d.generateWorker(this,O,W)}catch(T){(D=new h("error")).error(T)}return new g(D,O.type||"string",O.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 h=0;h<this.data.length;h++)o[h]=255&o[h]}t("../utils").inherits(l,a),l.prototype.byteAt=function(o){return this.data[this.zero+o]},l.prototype.lastIndexOfSignature=function(o){for(var h=o.charCodeAt(0),g=o.charCodeAt(1),y=o.charCodeAt(2),w=o.charCodeAt(3),k=this.length-4;0<=k;--k)if(this.data[k]===h&&this.data[k+1]===g&&this.data[k+2]===y&&this.data[k+3]===w)return k-this.zero;return-1},l.prototype.readAndCheckSignature=function(o){var h=o.charCodeAt(0),g=o.charCodeAt(1),y=o.charCodeAt(2),w=o.charCodeAt(3),k=this.readData(4);return h===k[0]&&g===k[1]&&y===k[2]&&w===k[3]},l.prototype.readData=function(o){if(this.checkOffset(o),o===0)return[];var h=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,h},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 h,g=0;for(this.checkOffset(o),h=this.index+o-1;h>=this.index;h--)g=(g<<8)+this.byteAt(h);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=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 h=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,h},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 h=this.data.slice(this.zero+this.index,this.zero+this.index+o);return this.index+=o,h},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 h=this.data.subarray(this.zero+this.index,this.zero+this.index+o);return this.index+=o,h},r.exports=l},{"../utils":32,"./ArrayReader":17}],22:[function(t,r,n){var a=t("../utils"),l=t("../support"),o=t("./ArrayReader"),h=t("./StringReader"),g=t("./NodeBufferReader"),y=t("./Uint8ArrayReader");r.exports=function(w){var k=a.getTypeOf(w);return a.checkSupport(k),k!=="string"||l.uint8array?k==="nodebuffer"?new g(w):l.uint8array?new y(a.transformTo("uint8array",w)):new o(a.transformTo("array",w)):new h(w)}},{"../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(h){a.call(this,"ConvertWorker to "+h),this.destType=h}l.inherits(o,a),o.prototype.processChunk=function(h){this.push({data:l.transformTo(this.destType,h.data),meta:h.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(h){this.streamInfo.crc32=l(h.data,this.streamInfo.crc32||0),this.push(h)},r.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,r,n){var a=t("../utils"),l=t("./GenericWorker");function o(h){l.call(this,"DataLengthProbe for "+h),this.propName=h,this.withStreamInfo(h,0)}a.inherits(o,l),o.prototype.processChunk=function(h){if(h){var g=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=g+h.data.length}l.prototype.processChunk.call(this,h)},r.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,r,n){var a=t("../utils"),l=t("./GenericWorker");function o(h){l.call(this,"DataWorker");var g=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,h.then(function(y){g.dataIsReady=!0,g.data=y,g.max=y&&y.length||0,g.type=a.getTypeOf(y),g.isPaused||g._tickAndRepeat()},function(y){g.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 h=null,g=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":h=this.data.substring(this.index,g);break;case"uint8array":h=this.data.subarray(this.index,g);break;case"array":case"nodebuffer":h=this.data.slice(this.index,g)}return this.index=g,this.push({data:h,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 h=0;h<this._listeners[l].length;h++)this._listeners[l][h].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(h){o.processChunk(h)}),l.on("end",function(){o.end()}),l.on("error",function(h){o.error(h)}),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"),h=t("../base64"),g=t("../support"),y=t("../external"),w=null;if(g.nodestream)try{w=t("../nodejs/NodejsStreamOutputAdapter")}catch(v){}function k(v,u){return new y.Promise(function(m,f){var _=[],C=v._internalType,A=v._outputType,E=v._mimeType;v.on("data",function(D,O){_.push(D),u&&u(O)}).on("error",function(D){_=[],f(D)}).on("end",function(){try{var D=function(O,W,T){switch(O){case"blob":return a.newBlob(a.transformTo("arraybuffer",W),T);case"base64":return h.encode(W);default:return a.transformTo(O,W)}}(A,function(O,W){var T,X=0,Q=null,S=0;for(T=0;T<W.length;T++)S+=W[T].length;switch(O){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 '"+O+"'")}}(C,_),E);m(D)}catch(O){f(O)}_=[]}).resume()})}function d(v,u,m){var f=u;switch(u){case"blob":case"arraybuffer":f="uint8array";break;case"base64":f="string"}try{this._internalType=f,this._outputType=u,this._mimeType=m,a.checkSupport(f),this._worker=v.pipe(new l(f)),v.lock()}catch(_){this._worker=new o("error"),this._worker.error(_)}}d.prototype={accumulate:function(v){return k(this,v)},on:function(v,u){var m=this;return v==="data"?this._worker.on(v,function(f){u.call(m,f.data,f.meta)}):this._worker.on(v,function(){a.delay(u,arguments,m)}),this},resume:function(){return a.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(v){if(a.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new w(this,{objectMode:this._outputType!=="nodebuffer"},v)}},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(h){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"),h=t("./stream/GenericWorker"),g=new Array(256),y=0;y<256;y++)g[y]=252<=y?6:248<=y?5:240<=y?4:224<=y?3:192<=y?2:1;g[254]=g[254]=1;function w(){h.call(this,"utf-8 decode"),this.leftOver=null}function k(){h.call(this,"utf-8 encode")}n.utf8encode=function(d){return l.nodebuffer?o.newBufferFrom(d,"utf-8"):function(v){var u,m,f,_,C,A=v.length,E=0;for(_=0;_<A;_++)(64512&(m=v.charCodeAt(_)))==55296&&_+1<A&&(64512&(f=v.charCodeAt(_+1)))==56320&&(m=65536+(m-55296<<10)+(f-56320),_++),E+=m<128?1:m<2048?2:m<65536?3:4;for(u=l.uint8array?new Uint8Array(E):new Array(E),_=C=0;C<E;_++)(64512&(m=v.charCodeAt(_)))==55296&&_+1<A&&(64512&(f=v.charCodeAt(_+1)))==56320&&(m=65536+(m-55296<<10)+(f-56320),_++),m<128?u[C++]=m:(m<2048?u[C++]=192|m>>>6:(m<65536?u[C++]=224|m>>>12:(u[C++]=240|m>>>18,u[C++]=128|m>>>12&63),u[C++]=128|m>>>6&63),u[C++]=128|63&m);return u}(d)},n.utf8decode=function(d){return l.nodebuffer?a.transformTo("nodebuffer",d).toString("utf-8"):function(v){var u,m,f,_,C=v.length,A=new Array(2*C);for(u=m=0;u<C;)if((f=v[u++])<128)A[m++]=f;else if(4<(_=g[f]))A[m++]=65533,u+=_-1;else{for(f&=_===2?31:_===3?15:7;1<_&&u<C;)f=f<<6|63&v[u++],_--;1<_?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(w,h),w.prototype.processChunk=function(d){var v=a.transformTo(l.uint8array?"uint8array":"array",d.data);if(this.leftOver&&this.leftOver.length){if(l.uint8array){var u=v;(v=new Uint8Array(u.length+this.leftOver.length)).set(this.leftOver,0),v.set(u,this.leftOver.length)}else v=this.leftOver.concat(v);this.leftOver=null}var m=function(_,C){var A;for((C=C||_.length)>_.length&&(C=_.length),A=C-1;0<=A&&(192&_[A])==128;)A--;return A<0||A===0?C:A+g[_[A]]>C?A:C}(v),f=v;m!==v.length&&(l.uint8array?(f=v.subarray(0,m),this.leftOver=v.subarray(m,v.length)):(f=v.slice(0,m),this.leftOver=v.slice(m,v.length))),this.push({data:n.utf8decode(f),meta:d.meta})},w.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=w,a.inherits(k,h),k.prototype.processChunk=function(d){this.push({data:n.utf8encode(d.data),meta:d.meta})},n.Utf8EncodeWorker=k},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,r,n){var a=t("./support"),l=t("./base64"),o=t("./nodejsUtils"),h=t("./external");function g(u){return u}function y(u,m){for(var f=0;f<u.length;++f)m[f]=255&u.charCodeAt(f);return m}t("setimmediate"),n.newBlob=function(u,m){n.checkSupport("blob");try{return new Blob([u],{type:m})}catch(_){try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return f.append(u),f.getBlob(m)}catch(C){throw new Error("Bug : can't construct the Blob.")}}};var w={stringifyByChunk:function(u,m,f){var _=[],C=0,A=u.length;if(A<=f)return String.fromCharCode.apply(null,u);for(;C<A;)m==="array"||m==="nodebuffer"?_.push(String.fromCharCode.apply(null,u.slice(C,Math.min(C+f,A)))):_.push(String.fromCharCode.apply(null,u.subarray(C,Math.min(C+f,A)))),C+=f;return _.join("")},stringifyByChar:function(u){for(var m="",f=0;f<u.length;f++)m+=String.fromCharCode(u[f]);return m},applyCanBeUsed:{uint8array:function(){try{return a.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch(u){return!1}}(),nodebuffer:function(){try{return a.nodebuffer&&String.fromCharCode.apply(null,o.allocBuffer(1)).length===1}catch(u){return!1}}()}};function k(u){var m=65536,f=n.getTypeOf(u),_=!0;if(f==="uint8array"?_=w.applyCanBeUsed.uint8array:f==="nodebuffer"&&(_=w.applyCanBeUsed.nodebuffer),_)for(;1<m;)try{return w.stringifyByChunk(u,f,m)}catch(C){m=Math.floor(m/2)}return w.stringifyByChar(u)}function d(u,m){for(var f=0;f<u.length;f++)m[f]=u[f];return m}n.applyFromCharCode=k;var v={};v.string={string:g,array:function(u){return y(u,new Array(u.length))},arraybuffer:function(u){return v.string.uint8array(u).buffer},uint8array:function(u){return y(u,new Uint8Array(u.length))},nodebuffer:function(u){return y(u,o.allocBuffer(u.length))}},v.array={string:k,array:g,arraybuffer:function(u){return new Uint8Array(u).buffer},uint8array:function(u){return new Uint8Array(u)},nodebuffer:function(u){return o.newBufferFrom(u)}},v.arraybuffer={string:function(u){return k(new Uint8Array(u))},array:function(u){return d(new Uint8Array(u),new Array(u.byteLength))},arraybuffer:g,uint8array:function(u){return new Uint8Array(u)},nodebuffer:function(u){return o.newBufferFrom(new Uint8Array(u))}},v.uint8array={string:k,array:function(u){return d(u,new Array(u.length))},arraybuffer:function(u){return u.buffer},uint8array:g,nodebuffer:function(u){return o.newBufferFrom(u)}},v.nodebuffer={string:k,array:function(u){return d(u,new Array(u.length))},arraybuffer:function(u){return v.nodebuffer.uint8array(u).buffer},uint8array:function(u){return d(u,new Uint8Array(u.length))},nodebuffer:g},n.transformTo=function(u,m){if(m=m||"",!u)return m;n.checkSupport(u);var f=n.getTypeOf(m);return v[f][u](m)},n.resolve=function(u){for(var m=u.split("/"),f=[],_=0;_<m.length;_++){var C=m[_];C==="."||C===""&&_!==0&&_!==m.length-1||(C===".."?f.pop():f.push(C))}return f.join("/")},n.getTypeOf=function(u){return typeof u=="string"?"string":Object.prototype.toString.call(u)==="[object Array]"?"array":a.nodebuffer&&o.isBuffer(u)?"nodebuffer":a.uint8array&&u instanceof Uint8Array?"uint8array":a.arraybuffer&&u instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(u){if(!a[u.toLowerCase()])throw new Error(u+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(u){var m,f,_="";for(f=0;f<(u||"").length;f++)_+="\\x"+((m=u.charCodeAt(f))<16?"0":"")+m.toString(16).toUpperCase();return _},n.delay=function(u,m,f){setImmediate(function(){u.apply(f||null,m||[])})},n.inherits=function(u,m){function f(){}f.prototype=m.prototype,u.prototype=new f},n.extend=function(){var u,m,f={};for(u=0;u<arguments.length;u++)for(m in arguments[u])Object.prototype.hasOwnProperty.call(arguments[u],m)&&f[m]===void 0&&(f[m]=arguments[u][m]);return f},n.prepareContent=function(u,m,f,_,C){return h.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 h.Promise(function(E,D){var O=new FileReader;O.onload=function(W){E(W.target.result)},O.onerror=function(W){D(W.target.error)},O.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&&_!==!0&&(A=function(D){return y(D,a.uint8array?new Uint8Array(D.length):new Array(D.length))}(A))),A):h.Promise.reject(new Error("Can't read the data of '"+u+"'. 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"),h=t("./zipEntry"),g=t("./support");function y(w){this.files=[],this.loadOptions=w}y.prototype={checkSignature:function(w){if(!this.reader.readAndCheckSignature(w)){this.reader.index-=4;var k=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+l.pretty(k)+", expected "+l.pretty(w)+")")}},isSignature:function(w,k){var d=this.reader.index;this.reader.setIndex(w);var v=this.reader.readString(4)===k;return this.reader.setIndex(d),v},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 w=this.reader.readData(this.zipCommentLength),k=g.uint8array?"uint8array":"array",d=l.transformTo(k,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,k,d,v=this.zip64EndOfCentralSize-44;0<v;)w=this.reader.readInt(2),k=this.reader.readInt(4),d=this.reader.readData(k),this.zip64ExtensibleData[w]={id:w,length:k,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,k;for(w=0;w<this.files.length;w++)k=this.files[w],this.reader.setIndex(k.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),k.readLocalPart(this.reader),k.handleUTF8(),k.processAttributes()},readCentralDir:function(){var w;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(w=new h({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(w);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 w=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(w<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(w);var k=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,(w=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(w),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 v=k-d;if(0<v)this.isSignature(k,o.CENTRAL_FILE_HEADER)||(this.reader.zero=v);else if(v<0)throw new Error("Corrupted zip: missing "+Math.abs(v)+" bytes.")},prepareReader:function(w){this.reader=a(w)},load:function(w){this.prepareReader(w),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"),h=t("./crc32"),g=t("./utf8"),y=t("./compressions"),w=t("./support");function k(d,v){this.options=d,this.loadOptions=v}k.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(d){var v,u;if(d.skip(22),this.fileNameLength=d.readInt(2),u=d.readInt(2),this.fileName=d.readData(this.fileNameLength),d.skip(u),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((v=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,v,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 v=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(v),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 v,u,m,f=d.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});d.index+4<f;)v=d.readInt(2),u=d.readInt(2),m=d.readData(u),this.extraFields[v]={id:v,length:u,value:m};d.setIndex(f)},handleUTF8:function(){var d=w.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=g.utf8decode(this.fileName),this.fileCommentStr=g.utf8decode(this.fileComment);else{var v=this.findExtraFieldUnicodePath();if(v!==null)this.fileNameStr=v;else{var u=l.transformTo(d,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(u)}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 v=a(d.value);return v.readInt(1)!==1||h(this.fileName)!==v.readInt(4)?null:g.utf8decode(v.readData(d.length-5))}return null},findExtraFieldUnicodeComment:function(){var d=this.extraFields[25461];if(d){var v=a(d.value);return v.readInt(1)!==1||h(this.fileComment)!==v.readInt(4)?null:g.utf8decode(v.readData(d.length-5))}return null}},r.exports=k},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,r,n){function a(v,u,m){this.name=v,this.dir=m.dir,this.date=m.date,this.comment=m.comment,this.unixPermissions=m.unixPermissions,this.dosPermissions=m.dosPermissions,this._data=u,this._dataBinary=m.binary,this.options={compression:m.compression,compressionOptions:m.compressionOptions}}var l=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),h=t("./utf8"),g=t("./compressedObject"),y=t("./stream/GenericWorker");a.prototype={internalStream:function(v){var u=null,m="string";try{if(!v)throw new Error("No output type specified.");var f=(m=v.toLowerCase())==="string"||m==="text";m!=="binarystring"&&m!=="text"||(m="string"),u=this._decompressWorker();var _=!this._dataBinary;_&&!f&&(u=u.pipe(new h.Utf8EncodeWorker)),!_&&f&&(u=u.pipe(new h.Utf8DecodeWorker))}catch(C){(u=new y("error")).error(C)}return new l(u,m,"")},async:function(v,u){return this.internalStream(v).accumulate(u)},nodeStream:function(v,u){return this.internalStream(v||"nodebuffer").toNodejsStream(u)},_compressWorker:function(v,u){if(this._data instanceof g&&this._data.compression.magic===v.magic)return this._data.getCompressedWorker();var m=this._decompressWorker();return this._dataBinary||(m=m.pipe(new h.Utf8EncodeWorker)),g.createWorkerFrom(m,v,u)},_decompressWorker:function(){return this._data instanceof g?this._data.getContentWorker():this._data instanceof y?this._data:new o(this._data)}};for(var w=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],k=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},d=0;d<w.length;d++)a.prototype[w[d]]=k;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,h=a.MutationObserver||a.WebKitMutationObserver;if(h){var g=0,y=new h(v),w=a.document.createTextNode("");y.observe(w,{characterData:!0}),l=function(){w.data=g=++g%2}}else if(a.setImmediate||a.MessageChannel===void 0)l="document"in a&&"onreadystatechange"in a.document.createElement("script")?function(){var u=a.document.createElement("script");u.onreadystatechange=function(){v(),u.onreadystatechange=null,u.parentNode.removeChild(u),u=null},a.document.documentElement.appendChild(u)}:function(){setTimeout(v,0)};else{var k=new a.MessageChannel;k.port1.onmessage=v,l=function(){k.port2.postMessage(0)}}var d=[];function v(){var u,m;o=!0;for(var f=d.length;f;){for(m=d,d=[],u=-1;++u<f;)m[u]();f=d.length}o=!1}r.exports=function(u){d.push(u)!==1||o||l()}}).call(this,typeof dt!="undefined"?dt:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],37:[function(t,r,n){var a=t("immediate");function l(){}var o={},h=["REJECTED"],g=["FULFILLED"],y=["PENDING"];function w(f){if(typeof f!="function")throw new TypeError("resolver must be a function");this.state=y,this.queue=[],this.outcome=void 0,f!==l&&u(this,f)}function k(f,_,C){this.promise=f,typeof _=="function"&&(this.onFulfilled=_,this.callFulfilled=this.otherCallFulfilled),typeof C=="function"&&(this.onRejected=C,this.callRejected=this.otherCallRejected)}function d(f,_,C){a(function(){var A;try{A=_(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 v(f){var _=f&&f.then;if(f&&(typeof f=="object"||typeof f=="function")&&typeof _=="function")return function(){_.apply(f,arguments)}}function u(f,_){var C=!1;function A(O){C||(C=!0,o.reject(f,O))}function E(O){C||(C=!0,o.resolve(f,O))}var D=m(function(){_(E,A)});D.status==="error"&&A(D.value)}function m(f,_){var C={};try{C.value=f(_),C.status="success"}catch(A){C.status="error",C.value=A}return C}(r.exports=w).prototype.finally=function(f){if(typeof f!="function")return this;var _=this.constructor;return this.then(function(C){return _.resolve(f()).then(function(){return C})},function(C){return _.resolve(f()).then(function(){throw C})})},w.prototype.catch=function(f){return this.then(null,f)},w.prototype.then=function(f,_){if(typeof f!="func