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