UNPKG

pptxgenjs

Version:

Create JavaScript PowerPoint Presentations

2 lines 461 kB
/* PptxGenJS 4.0.1 @ 2025-06-25T23:35:35.101Z */ !function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=e()}(function(){return function a(n,o,i){function s(t,e){if(!o[t]){if(!n[t]){var r="function"==typeof require&&require;if(!e&&r)return r(t,!0);if(A)return A(t,!0);e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}r=o[t]={exports:{}};n[t][0].call(r.exports,function(e){return s(n[t][1][e]||e)},r,r.exports,a,n,o,i)}return o[t].exports}for(var A="function"==typeof require&&require,e=0;e<i.length;e++)s(i[e]);return s}({1:[function(e,t,r){var p=e("./utils"),c=e("./support"),u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,a,n,o,i,s=[],A=0,l=e.length,c="string"!==p.getTypeOf(e);A<e.length;)i=l-A,a=c?(t=e[A++],r=A<l?e[A++]:0,A<l?e[A++]:0):(t=e.charCodeAt(A++),r=A<l?e.charCodeAt(A++):0,A<l?e.charCodeAt(A++):0),n=(3&t)<<4|r>>4,o=1<i?(15&r)<<2|a>>6:64,i=2<i?63&a:64,s.push(u.charAt(t>>2)+u.charAt(n)+u.charAt(o)+u.charAt(i));return s.join("")},r.decode=function(e){var t,r,a,n,o,i=0,s=0,A="data:";if(e.substr(0,A.length)===A)throw new Error("Invalid base64 input, it looks like a data url.");var l,A=3*(e=e.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(e.charAt(e.length-1)===u.charAt(64)&&A--,e.charAt(e.length-2)===u.charAt(64)&&A--,A%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=new(c.uint8array?Uint8Array:Array)(0|A);i<e.length;)t=u.indexOf(e.charAt(i++))<<2|(n=u.indexOf(e.charAt(i++)))>>4,r=(15&n)<<4|(n=u.indexOf(e.charAt(i++)))>>2,a=(3&n)<<6|(o=u.indexOf(e.charAt(i++))),l[s++]=t,64!==n&&(l[s++]=r),64!==o&&(l[s++]=a);return l}},{"./support":30,"./utils":32}],2:[function(e,t,r){var a=e("./external"),n=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),i=e("./stream/DataLengthProbe");function s(e,t,r,a,n){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=a,this.compressedContent=n}s.prototype={getContentWorker:function(){var e=new n(a.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new i("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new n(a.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,r){return e.pipe(new o).pipe(new i("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new i("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){var a=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(){return new a("STORE compression")},uncompressWorker:function(){return new a("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){var a=e("./utils"),i=(()=>{for(var e=[],t=0;t<256;t++){for(var r=t,a=0;a<8;a++)r=1&r?3988292384^r>>>1:r>>>1;e[t]=r}return e})();t.exports=function(e,t){return void 0!==e&&e.length?("string"!==a.getTypeOf(e)?(e,t,r)=>{var a=i,n=0+r;e^=-1;for(var o=0;o<n;o++)e=e>>>8^a[255&(e^t[o])];return-1^e}:(e,t,r)=>{var a=i,n=0+r;e^=-1;for(var o=0;o<n;o++)e=e>>>8^a[255&(e^t.charCodeAt(o))];return-1^e})(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,r){r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){e="undefined"!=typeof Promise?Promise:e("lie");t.exports={Promise:e}},{lie:37}],7:[function(e,t,r){var a="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,n=e("pako"),o=e("./utils"),i=e("./stream/GenericWorker"),s=a?"uint8array":"array";function A(e,t){i.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",o.inherits(A,i),A.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},A.prototype.flush=function(){i.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},A.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this._pako=null},A.prototype._createPako=function(){this._pako=new n[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(e){return new A("Deflate",e)},r.uncompressWorker=function(){return new A("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){function v(e,t){for(var r="",a=0;a<t;a++)r+=String.fromCharCode(255&e),e>>>=8;return r}function a(e,t,r,a,n,o){var i=e.file,s=e.compression,A=o!==b.utf8encode,l=y.transformTo("string",o(i.name)),c=y.transformTo("string",b.utf8encode(i.name)),p=i.comment,o=y.transformTo("string",o(p)),u=y.transformTo("string",b.utf8encode(p)),f=c.length!==i.name.length,p=u.length!==p.length,d="",h=i.dir,g=i.date,m={crc32:0,compressedSize:0,uncompressedSize:0},r=(t&&!r||(m.crc32=e.crc32,m.compressedSize=e.compressedSize,m.uncompressedSize=e.uncompressedSize),0),e=(t&&(r|=8),A||!f&&!p||(r|=2048),0),t=0,g=(h&&(e|=16),"UNIX"===n?(t=798,e|=(65535&((A=i.unixPermissions)?A:h?16893:33204))<<16):(t=20,e|=63&(i.dosPermissions||0)),n=g.getUTCHours(),n=(n=((n<<=6)|g.getUTCMinutes())<<5)|g.getUTCSeconds()/2,A=g.getUTCFullYear()-1980,A=(A=((A<<=4)|g.getUTCMonth()+1)<<5)|g.getUTCDate(),f&&(h=v(1,1)+v(w(l),4)+c,d+="up"+v(h.length,2)+h),p&&(i=v(1,1)+v(w(o),4)+u,d+="uc"+v(i.length,2)+i),""),g=(g=(g=(g=(g=(g=(g=(g=(g=(g+="\n\0")+v(r,2))+s.magic)+v(n,2))+v(A,2))+v(m.crc32,4))+v(m.compressedSize,4))+v(m.uncompressedSize,4))+v(l.length,2))+v(d.length,2);return{fileRecord:x.LOCAL_FILE_HEADER+g+l+d,dirRecord:x.CENTRAL_FILE_HEADER+v(t,2)+g+v(o.length,2)+"\0\0\0\0"+v(e,4)+v(a,4)+l+d+o}}var y=e("../utils"),n=e("../stream/GenericWorker"),b=e("../utf8"),w=e("../crc32"),x=e("../signature");function o(e,t,r,a){n.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=a,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}y.inherits(o,n),o.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,a=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,n.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-a-1))/r:100}}))},o.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;t?(e=a(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName),this.push({data:e.fileRecord,meta:{percent:0}})):this.accumulate=!0},o.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=a(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:(t=e,x.DATA_DESCRIPTOR+v(t.crc32,4)+v(t.compressedSize,4)+v(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},o.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,r=((e,t,r,a,n)=>(n=y.transformTo("string",n(a)),x.CENTRAL_DIRECTORY_END+"\0\0\0\0"+v(e,2)+v(e,2)+v(t,4)+v(r,4)+v(n.length,2)+n))(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:r,meta:{percent:100}})},o.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},o.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},o.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},o.prototype.error=function(e){var t=this._sources;if(!n.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},o.prototype.lock=function(){n.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=o},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){var l=e("../compressions"),a=e("./ZipFileWorker");r.generateWorker=function(e,i,t){var s=new a(i.streamFiles,t,i.platform,i.encodeFileName),A=0;try{e.forEach(function(e,t){A++;var r=((e,t)=>{if(t=l[e=e||t])return t;throw new Error(e+" is not a valid compression method !")})(t.options.compression,i.compression),a=t.options.compressionOptions||i.compressionOptions||{},n=t.dir,o=t.date;t._compressWorker(r,a).withStreamInfo("file",{name:e,dir:n,date:o,comment:t.comment||"",unixPermissions:t.unixPermissions,dosPermissions:t.dosPermissions}).pipe(s)}),s.entriesCount=A}catch(e){s.error(e)}return s}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){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 e,t=new a;for(e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(a.prototype=e("./object")).loadAsync=e("./load"),a.support=e("./support"),a.defaults=e("./defaults"),a.version="3.10.1",a.loadAsync=function(e,t){return(new a).loadAsync(e,t)},a.external=e("./external"),t.exports=a},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){var A=e("./utils"),n=e("./external"),a=e("./utf8"),o=e("./zipEntries"),l=e("./stream/Crc32Probe"),c=e("./nodejsUtils");t.exports=function(e,i){var s=this;return i=A.extend(i||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),c.isNode&&c.isStream(e)?n.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):A.prepareContent("the loaded zip file",e,!0,i.optimizedBinaryString,i.base64).then(function(e){var t=new o(i);return t.load(e),t}).then(function(e){var t=[n.Promise.resolve(e)],r=e.files;if(i.checkCRC32)for(var a=0;a<r.length;a++)t.push((a=>new n.Promise(function(e,t){var r=a.decompressed.getContentWorker().pipe(new l);r.on("error",function(e){t(e)}).on("end",function(){r.streamInfo.crc32!==a.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()}))(r[a]));return n.Promise.all(t)}).then(function(e){for(var e=e.shift(),t=e.files,r=0;r<t.length;r++){var a=t[r],n=a.fileNameStr,o=A.resolve(a.fileNameStr);s.file(o,a.decompressed,{binary:!0,optimizedBinaryString:!0,date:a.date,dir:a.dir,comment:a.fileCommentStr.length?a.fileCommentStr:null,unixPermissions:a.unixPermissions,dosPermissions:a.dosPermissions,createFolders:i.createFolders}),a.dir||(s.file(o).unsafeOriginalName=n)}return e.zipComment.length&&(s.comment=e.zipComment),s})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){var a=e("../utils"),n=e("../stream/GenericWorker");function o(e,t){n.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}a.inherits(o,n),o.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},o.prototype.pause=function(){return!!n.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!n.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){var n=e("readable-stream").Readable;function a(e,t,r){n.call(this,t),this._helper=e;var a=this;e.on("data",function(e,t){a.push(e)||a._helper.pause(),r&&r(t)}).on("error",function(e){a.emit("error",e)}).on("end",function(){a.push(null)})}e("../utils").inherits(a,n),a.prototype._read=function(){this._helper.resume()},t.exports=a},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){return Buffer.alloc?Buffer.alloc(e):((e=new Buffer(e)).fill(0),e)},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){function n(e,t,r){var a=A.getTypeOf(t),n=A.extend(r||{},p),o=(n.date=n.date||new Date,null!==n.compression&&(n.compression=n.compression.toUpperCase()),"string"==typeof n.unixPermissions&&(n.unixPermissions=parseInt(n.unixPermissions,8)),n.unixPermissions&&16384&n.unixPermissions&&(n.dir=!0),n.dosPermissions&&16&n.dosPermissions&&(n.dir=!0),n.dir&&(e=m(e)),n.createFolders&&(o=i(e))&&s.call(this,o,!0),"string"===a&&!1===n.binary&&!1===n.base64),a=(r&&void 0!==r.binary||(n.binary=!o),(t instanceof u&&0===t.uncompressedSize||n.dir||!t||0===t.length)&&(n.base64=!1,n.binary=!0,t="",n.compression="STORE"),t instanceof u||t instanceof l?t:h.isNode&&h.isStream(t)?new g(e,t):A.prepareContent(e,t,n.binary,n.optimizedBinaryString,n.base64)),r=new f(e,a,n);this.files[e]=r}function i(e){var t=(e="/"===e.slice(-1)?e.substring(0,e.length-1):e).lastIndexOf("/");return 0<t?e.substring(0,t):""}function s(e,t){return t=void 0!==t?t:p.createFolders,e=m(e),this.files[e]||n.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]}var o=e("./utf8"),A=e("./utils"),l=e("./stream/GenericWorker"),c=e("./stream/StreamHelper"),p=e("./defaults"),u=e("./compressedObject"),f=e("./zipObject"),d=e("./generate"),h=e("./nodejsUtils"),g=e("./nodejs/NodejsStreamInputAdapter"),m=function(e){return"/"!==e.slice(-1)&&(e+="/"),e};function v(e){return"[object RegExp]"===Object.prototype.toString.call(e)}t.exports={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,a;for(t in this.files)a=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,a)},filter:function(r){var a=[];return this.forEach(function(e,t){r(e,t)&&a.push(t)}),a},file:function(e,t,r){var a;return 1!==arguments.length?(e=this.root+e,n.call(this,e,t,r),this):v(e)?(a=e,this.filter(function(e,t){return!t.dir&&a.test(e)})):(t=this.files[this.root+e])&&!t.dir?t:null},folder:function(r){var e,t;return r?v(r)?this.filter(function(e,t){return t.dir&&r.test(e)}):(e=this.root+r,e=s.call(this,e),(t=this.clone()).root=e.name,t):this},remove:function(r){r=this.root+r;var e=this.files[r];if(e||("/"!==r.slice(-1)&&(r+="/"),e=this.files[r]),e&&!e.dir)delete this.files[r];else for(var t=this.filter(function(e,t){return t.name.slice(0,r.length)===r}),a=0;a<t.length;a++)delete this.files[t[a].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 t={};try{if((t=A.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),"binarystring"===t.type&&(t.type="string"),!t.type)throw new Error("No output type specified.");A.checkSupport(t.type),"darwin"!==t.platform&&"freebsd"!==t.platform&&"linux"!==t.platform&&"sunos"!==t.platform||(t.platform="UNIX"),"win32"===t.platform&&(t.platform="DOS");var r=t.comment||this.comment||"",a=d.generateWorker(this,t,r)}catch(e){(a=new l("error")).error(e)}return new c(a,t.type||"string",t.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}}},{"./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(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){var a=e("./DataReader");function n(e){a.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(n,a),n.prototype.byteAt=function(e){return this.data[this.zero+e]},n.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),a=e.charCodeAt(2),n=e.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===t&&this.data[o+1]===r&&this.data[o+2]===a&&this.data[o+3]===n)return o-this.zero;return-1},n.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),a=e.charCodeAt(2),e=e.charCodeAt(3),n=this.readData(4);return t===n[0]&&r===n[1]&&a===n[2]&&e===n[3]},n.prototype.readData=function(e){var t;return this.checkOffset(e),0===e?[]:(t=this.data.slice(this.zero+this.index,this.zero+this.index+e),this.index+=e,t)},t.exports=n},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){var a=e("../utils");function n(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}n.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return a.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=n},{"../utils":32}],19:[function(e,t,r){var a=e("./Uint8ArrayReader");function n(e){a.call(this,e)}e("../utils").inherits(n,a),n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){var a=e("./DataReader");function n(e){a.call(this,e)}e("../utils").inherits(n,a),n.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},n.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},n.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},n.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=n},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){var a=e("./ArrayReader");function n(e){a.call(this,e)}e("../utils").inherits(n,a),n.prototype.readData=function(e){var t;return this.checkOffset(e),0===e?new Uint8Array(0):(t=this.data.subarray(this.zero+this.index,this.zero+this.index+e),this.index+=e,t)},t.exports=n},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){var a=e("../utils"),n=e("../support"),o=e("./ArrayReader"),i=e("./StringReader"),s=e("./NodeBufferReader"),A=e("./Uint8ArrayReader");t.exports=function(e){var t=a.getTypeOf(e);return a.checkSupport(t),"string"!==t||n.uint8array?"nodebuffer"===t?new s(e):n.uint8array?new A(a.transformTo("uint8array",e)):new o(a.transformTo("array",e)):new i(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){var a=e("./GenericWorker"),n=e("../utils");function o(e){a.call(this,"ConvertWorker to "+e),this.destType=e}n.inherits(o,a),o.prototype.processChunk=function(e){this.push({data:n.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){var a=e("./GenericWorker"),n=e("../crc32");function o(){a.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,a),o.prototype.processChunk=function(e){this.streamInfo.crc32=n(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){var a=e("../utils"),n=e("./GenericWorker");function o(e){n.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}a.inherits(o,n),o.prototype.processChunk=function(e){var t;e&&(t=this.streamInfo[this.propName]||0,this.streamInfo[this.propName]=t+e.data.length),n.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){var a=e("../utils"),n=e("./GenericWorker");function o(e){n.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=a.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}a.inherits(o,n),o.prototype.cleanUp=function(){n.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!n.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 e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){function a(e){this.name=e||"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(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){var e;return!(!this.isPaused||this.isFinished||(e=this.isPaused=!1,this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),e))},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},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 e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=a},{}],29:[function(e,t,r){var A=e("../utils"),n=e("./ConvertWorker"),o=e("./GenericWorker"),l=e("../base64"),a=e("../support"),i=e("../external"),s=null;if(a.nodestream)try{s=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function c(e,s){return new i.Promise(function(t,r){var a=[],n=e._internalType,o=e._outputType,i=e._mimeType;e.on("data",function(e,t){a.push(e),s&&s(t)}).on("error",function(e){a=[],r(e)}).on("end",function(){try{var e=((e,t,r)=>{switch(e){case"blob":return A.newBlob(A.transformTo("arraybuffer",t),r);case"base64":return l.encode(t);default:return A.transformTo(e,t)}})(o,((e,t)=>{for(var r=0,a=null,n=0,o=0;o<t.length;o++)n+=t[o].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(a=new Uint8Array(n),o=0;o<t.length;o++)a.set(t[o],r),r+=t[o].length;return a;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}})(n,a),i);t(e)}catch(e){r(e)}a=[]}).resume()})}function p(e,t,r){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=r,A.checkSupport(a),this._worker=e.pipe(new n(a)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}p.prototype={accumulate:function(e){return c(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta)}):this._worker.on(e,function(){A.delay(t,arguments,r)}),this},resume:function(){return A.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(A.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new s(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=p},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var a=new ArrayBuffer(0);try{r.blob=0===new Blob([a],{type:"application/zip"}).size}catch(e){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);n.append(a),r.blob=0===n.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,n){for(var A=e("./utils"),l=e("./support"),c=e("./nodejsUtils"),r=e("./stream/GenericWorker"),p=new Array(256),a=0;a<256;a++)p[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function o(){r.call(this,"utf-8 decode"),this.leftOver=null}function i(){r.call(this,"utf-8 encode")}p[254]=p[254]=1,n.utf8encode=function(e){if(l.nodebuffer)return c.newBufferFrom(e,"utf-8");for(var t,r,a,n,o=e,i=o.length,s=0,A=0;A<i;A++)55296==(64512&(r=o.charCodeAt(A)))&&A+1<i&&56320==(64512&(a=o.charCodeAt(A+1)))&&(r=65536+(r-55296<<10)+(a-56320),A++),s+=r<128?1:r<2048?2:r<65536?3:4;for(t=new(l.uint8array?Uint8Array:Array)(s),A=n=0;n<s;A++)55296==(64512&(r=o.charCodeAt(A)))&&A+1<i&&56320==(64512&(a=o.charCodeAt(A+1)))&&(r=65536+(r-55296<<10)+(a-56320),A++),r<128?t[n++]=r:(r<2048?t[n++]=192|r>>>6:(r<65536?t[n++]=224|r>>>12:(t[n++]=240|r>>>18,t[n++]=128|r>>>12&63),t[n++]=128|r>>>6&63),t[n++]=128|63&r);return t},n.utf8decode=function(e){if(l.nodebuffer)return A.transformTo("nodebuffer",e).toString("utf-8");for(var t,r,a,n=e=A.transformTo(l.uint8array?"uint8array":"array",e),o=n.length,i=new Array(2*o),s=t=0;s<o;)if((r=n[s++])<128)i[t++]=r;else if(4<(a=p[r]))i[t++]=65533,s+=a-1;else{for(r&=2===a?31:3===a?15:7;1<a&&s<o;)r=r<<6|63&n[s++],a--;1<a?i[t++]=65533:r<65536?i[t++]=r:(r-=65536,i[t++]=55296|r>>10&1023,i[t++]=56320|1023&r)}return i.length!==t&&(i.subarray?i=i.subarray(0,t):i.length=t),A.applyFromCharCode(i)},A.inherits(o,r),o.prototype.processChunk=function(e){var t=A.transformTo(l.uint8array?"uint8array":"array",e.data),r=(this.leftOver&&this.leftOver.length&&(l.uint8array?(r=t,(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length)):t=this.leftOver.concat(t),this.leftOver=null),((e,t)=>{for(var r=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=r&&128==(192&e[r]);)r--;return!(r<0)&&0!==r&&r+p[e[r]]>t?r:t})(t)),a=t;r!==t.length&&(l.uint8array?(a=t.subarray(0,r),this.leftOver=t.subarray(r,t.length)):(a=t.slice(0,r),this.leftOver=t.slice(r,t.length))),this.push({data:n.utf8decode(a),meta:e.meta})},o.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=o,A.inherits(i,r),i.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=i},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,i){var s=e("./support"),A=e("./base64"),r=e("./nodejsUtils"),l=e("./external");function a(e){return e}function c(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),i.newBlob=function(t,r){i.checkSupport("blob");try{return new Blob([t],{type:r})}catch(e){try{var a=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return a.append(t),a.getBlob(r)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var n={stringifyByChunk:function(e,t,r){var a=[],n=0,o=e.length;if(o<=r)return String.fromCharCode.apply(null,e);for(;n<o;)a.push("array"===t||"nodebuffer"===t?String.fromCharCode.apply(null,e.slice(n,Math.min(n+r,o))):String.fromCharCode.apply(null,e.subarray(n,Math.min(n+r,o)))),n+=r;return a.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:(()=>{try{return s.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}})(),nodebuffer:(()=>{try{return s.nodebuffer&&1===String.fromCharCode.apply(null,r.allocBuffer(1)).length}catch(e){return!1}})()}};function o(e){var t=65536,r=i.getTypeOf(e),a=!0;if("uint8array"===r?a=n.applyCanBeUsed.uint8array:"nodebuffer"===r&&(a=n.applyCanBeUsed.nodebuffer),a)for(;1<t;)try{return n.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2)}return n.stringifyByChar(e)}function p(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}i.applyFromCharCode=o;var u={};u.string={string:a,array:function(e){return c(e,new Array(e.length))},arraybuffer:function(e){return u.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,r.allocBuffer(e.length))}},u.array={string:o,array:a,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r.newBufferFrom(e)}},u.arraybuffer={string:function(e){return o(new Uint8Array(e))},array:function(e){return p(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:a,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r.newBufferFrom(new Uint8Array(e))}},u.uint8array={string:o,array:function(e){return p(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:a,nodebuffer:function(e){return r.newBufferFrom(e)}},u.nodebuffer={string:o,array:function(e){return p(e,new Array(e.length))},arraybuffer:function(e){return u.nodebuffer.uint8array(e).buffer},uint8array:function(e){return p(e,new Uint8Array(e.length))},nodebuffer:a},i.transformTo=function(e,t){if(t=t||"",!e)return t;i.checkSupport(e);var r=i.getTypeOf(t);return u[r][e](t)},i.resolve=function(e){for(var t=e.split("/"),r=[],a=0;a<t.length;a++){var n=t[a];"."===n||""===n&&0!==a&&a!==t.length-1||(".."===n?r.pop():r.push(n))}return r.join("/")},i.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":s.nodebuffer&&r.isBuffer(e)?"nodebuffer":s.uint8array&&e instanceof Uint8Array?"uint8array":s.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},i.checkSupport=function(e){if(!s[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},i.MAX_VALUE_16BITS=65535,i.MAX_VALUE_32BITS=-1,i.pretty=function(e){for(var t,r="",a=0;a<(e||"").length;a++)r+="\\x"+((t=e.charCodeAt(a))<16?"0":"")+t.toString(16).toUpperCase();return r},i.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})},i.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},i.extend=function(){for(var e,t={},r=0;r<arguments.length;r++)for(e in arguments[r])Object.prototype.hasOwnProperty.call(arguments[r],e)&&void 0===t[e]&&(t[e]=arguments[r][e]);return t},i.prepareContent=function(r,e,a,n,o){return l.Promise.resolve(e).then(function(a){return s.blob&&(a instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(a)))&&"undefined"!=typeof FileReader?new l.Promise(function(t,r){var e=new FileReader;e.onload=function(e){t(e.target.result)},e.onerror=function(e){r(e.target.error)},e.readAsArrayBuffer(a)}):a}).then(function(e){var t=i.getTypeOf(e);return t?("arraybuffer"===t?e=i.transformTo("uint8array",e):"string"===t&&(o?e=A.decode(e):a&&!0!==n&&(e=c(t=e,new(s.uint8array?Uint8Array:Array)(t.length)))),e):l.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){var a=e("./reader/readerFor"),n=e("./utils"),o=e("./signature"),i=e("./zipEntry"),s=e("./support");function A(e){this.files=[],this.loadOptions=e}A.prototype={checkSignature:function(e){var t;if(!this.reader.readAndCheckSignature(e))throw this.reader.index-=4,t=this.reader.readString(4),new Error("Corrupted zip or bug: unexpected signature ("+n.pretty(t)+", expected "+n.pretty(e)+")")},isSignature:function(e,t){var r=this.reader.index,e=(this.reader.setIndex(e),this.reader.readString(4)===t);return this.reader.setIndex(r),e},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 e=this.reader.readData(this.zipCommentLength),t=s.uint8array?"uint8array":"array",t=n.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(t)},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 e,t,r,a=this.zip64EndOfCentralSize-44;0<a;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},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(){for(var e,t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new i({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<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(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===n.MAX_VALUE_16BITS||this.diskWithCentralDirStart===n.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===n.MAX_VALUE_16BITS||this.centralDirRecords===n.MAX_VALUE_16BITS||this.centralDirSize===n.MAX_VALUE_32BITS||this.centralDirOffset===n.MAX_VALUE_32BITS){if(this.zip64=!0,(e=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(e),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()}e=this.centralDirOffset+this.centralDirSize,e=t-(e=this.zip64?e+20+(12+this.zip64EndOfCentralSize):e);if(0<e)this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=e);else if(e<0)throw new Error("Corrupted zip: missing "+Math.abs(e)+" bytes.")},prepareReader:function(e){this.reader=a(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=A},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){var a=e("./reader/readerFor"),n=e("./utils"),o=e("./compressedObject"),i=e("./crc32"),s=e("./utf8"),A=e("./compressions"),l=e("./support");function c(e,t){this.options=e,this.loadOptions=t}c.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t;if(e.skip(22),this.fileNameLength=e.readInt(2),t=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(t),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=(e=>{for(var t in A)if(Object.prototype.hasOwnProperty.call(A,t)&&A[t].magic===e)return A[t];return null})(this.compressionMethod)))throw new Error("Corrupted zip : compression "+n.pretty(this.compressionMethod)+" unknown (inner file : "+n.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){var e;this.extraFields[1]&&(e=a(this.extraFields[1].value),this.uncompressedSize===n.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===n.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===n.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===n.MAX_VALUE_32BITS)&&(this.diskNumberStart=e.readInt(4))},readExtraFields:function(e){var t,r,a,n=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<n;)t=e.readInt(2),r=e.readInt(2),a=e.readData(r),this.extraFields[t]={id:t,length:r,value:a};e.setIndex(n)},handleUTF8:function(){var e,t=l.uint8array?"uint8array":"array";this.useUTF8()?(this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment)):(null!==(e=this.findExtraFieldUnicodePath())?this.fileNameStr=e:(e=n.transformTo(t,this.fileName),this.fileNameStr=this.loadOptions.decodeFileName(e)),null!==(e=this.findExtraFieldUnicodeComment())?this.fileCommentStr=e:(e=n.transformTo(t,this.fileComment),this.fileCommentStr=this.loadOptions.decodeFileName(e)))},findExtraFieldUnicodePath:function(){var e,t=this.extraFields[28789];return!t||1!==(e=a(t.value)).readInt(1)||i(this.fileName)!==e.readInt(4)?null:s.utf8decode(e.readData(t.length-5))},findExtraFieldUnicodeComment:function(){var e,t=this.extraFields[25461];return!t||1!==(e=a(t.value)).readInt(1)||i(this.fileComment)!==e.readInt(4)?null:s.utf8decode(e.readData(t.length-5))}},t.exports=c},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){function a(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var o=e("./stream/StreamHelper"),n=e("./stream/DataWorker"),i=e("./utf8"),s=e("./compressedObject"),A=e("./stream/GenericWorker");a.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var a="string"===(r=e.toLowerCase())||"text"===r,n=("binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker(),!this._dataBinary);n&&!a&&(t=t.pipe(new i.Utf8EncodeWorker)),!n&&a&&(t=t.pipe(new i.Utf8DecodeWorker))}catch(e){(t=new A("error")).error(e)}return new o(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){var r;return this._data instanceof s&&this._data.compression.magic===e.magic?this._data.getCompressedWorker():(r=this._decompressWorker(),this._dataBinary||(r=r.pipe(new i.Utf8EncodeWorker)),s.createWorkerFrom(r,e,t))},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof A?this._data:new n(this._data)}};for(var l=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],c=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},p=0;p<l.length;p++)a.prototype[l[p]]=c;t.exports=a},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,l,t){!function(t){var a,e,r,n,o=t.MutationObserver||t.WebKitMutationObserver,i=o?(e=0,o=new o(A),r=t.document.createTextNode(""),o.observe(r,{characterData:!0}),function(){r.data=e=++e%2}):t.setImmediate||void 0===t.MessageChannel?"document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){A(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(A,0)}:((n=new t.MessageChannel).port1.onmessage=A,function(){n.port2.postMessage(0)}),s=[];function A(){var e,t;a=!0;for(var r=s.length;r;){for(t=s,s=[],e=-1;++e<r;)t[e]();r=s.length}a=!1}l.exports=function(e){1!==s.push(e)||a||i()}}.call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){var n=e("immediate");function A(){}var l={},o=["REJECTED"],i=["FULFILLED"],a=["PENDING"];function s(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=a,this.queue=[],this.outcome=void 0,e!==A&&f(this,e)}function c(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function p(t,r,a){n(function(){var e;try{e=r(a)}catch(e){return l.reject(t,e)}e===t?l.reject(t,new TypeError("Cannot resolve promise with itself")):l.resolve(t,e)})}function u(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(t,e){var r=!1;function a(e){r||(r=!0,l.reject(t,e))}function n(e){r||(r=!0,l.resolve(t,e))}var o=d(function(){e(n,a)});"error"===o.status&&a(o.value)}function d(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=s).prototype.finally=function(t){var r;return"function"!=typeof t?this:(r=this.constructor,this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})}))},s.prototype.catch=function(e){return this.then(null,e)},s.prototype.then=function(e,t){var r;return"function"!=typeof e&&this.state===i||"function"!=typeof t&&this.state===o?this:(r=new this.constructor(A),this.state!==a?p(r,this.state===i?e:t,this.outcome):this.queue.push(new c(r,e,t)),r)},c.prototype.callFulfilled=function(e){l.resolve(this.promise,e)},c.prototype.otherCallFulfilled=function(e){p(this.promise,this.onFulfilled,e)},c.prototype.callRejected=function(e){l.reject(this.promise,e)},c.prototype.otherCallRejected=function(e){p(this.promise,this.onRejected,e)},l.resolve=function(e,t){var r=d(u,t);if("error"===r.status)return l.reject(e,r.value);r=r.value;if(r)f(e,r);else{e.state=i,e.outcome=t;for(var a=-1,n=e.queue.length;++a<n;)e.queue[a].callFulfilled(t)}return e},l.reject=function(e,t){e.state=o,e.outcome=t;for(var r=-1,a=e.queue.length;++r<a;)e.queue[r].callRejected(t);return e},s.resolve=function(e){return e instanceof this?e:l.resolve(new this(A),e)},s.reject=function(e){var t=new this(A);return l.reject(t,e)},s.all=function(e){var r=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var a=e.length,n=!1;if(!a)return this.resolve([]);for(var o=new Array(a),i=0,t=-1,s=new this(A);++t<a;)((e,t)=>{r.resolve(e).then(function(e){o[t]=e,++i!==a||n||(n=!0,l.resolve(s,o))},function(e){n||(n=!0,l.reject(s,e))})})(e[t],t);return s},s.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,r=!1;if(!t)return this.resolve([]);for(var a,n=-1,o=new this(A);++n<t;)a=e[n],this.resolve(a).then(function(e){r||(r=!0,l.resolve(o,e))},function(e){r||(r=!0,l.reject(o,e))});return o}},{immediate:36}],38:[function(e,t,r){var a={};(0,e("./lib/utils/common").assign)(a,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=a},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){var i=e("./zlib/deflate"),s=e("./utils/common"),A=e("./utils/strings"),a=e("./zlib/messages"),n=e("./zlib/zstream"),l=Object.prototype.toString;function o(e){if(!(this instanceof o))return new o(e);this.options=s.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var e=this.options,t=(e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windo