UNPKG

@zxr3680166/simple-mind-map

Version:

一个简单的web在线思维导图

2 lines 1.55 MB
var nL=Object.create;var Vg=Object.defineProperty;var iL=Object.getOwnPropertyDescriptor;var aL=Object.getOwnPropertyNames;var oL=Object.getPrototypeOf,sL=Object.prototype.hasOwnProperty;var mc=(r=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(t,e)=>(typeof require<"u"?require:t)[e]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+r+'" is not supported')});var Fn=(r,t)=>()=>(r&&(t=r(r=0)),t);var Tt=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),vc=(r,t)=>{for(var e in t)Vg(r,e,{get:t[e],enumerable:!0})},AL=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of aL(t))!sL.call(r,i)&&i!==e&&Vg(r,i,{get:()=>t[i],enumerable:!(n=iL(t,i))||n.enumerable});return r};var We=(r,t,e)=>(e=r!=null?nL(oL(r)):{},AL(t||!r||!r.__esModule?Vg(e,"default",{value:r,enumerable:!0}):e,r));var q5=Tt((nX,Xg)=>{"use strict";var hL=Object.prototype.hasOwnProperty,Yi="~";function yc(){}Object.create&&(yc.prototype=Object.create(null),new yc().__proto__||(Yi=!1));function cL(r,t,e){this.fn=r,this.context=t,this.once=e||!1}function z5(r,t,e,n,i){if(typeof e!="function")throw new TypeError("The listener must be a function");var a=new cL(e,n||r,i),o=Yi?Yi+t:t;return r._events[o]?r._events[o].fn?r._events[o]=[r._events[o],a]:r._events[o].push(a):(r._events[o]=a,r._eventsCount++),r}function Yd(r,t){--r._eventsCount===0?r._events=new yc:delete r._events[t]}function Li(){this._events=new yc,this._eventsCount=0}Li.prototype.eventNames=function(){var t=[],e,n;if(this._eventsCount===0)return t;for(n in e=this._events)hL.call(e,n)&&t.push(Yi?n.slice(1):n);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(e)):t};Li.prototype.listeners=function(t){var e=Yi?Yi+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=new Array(a);i<a;i++)o[i]=n[i].fn;return o};Li.prototype.listenerCount=function(t){var e=Yi?Yi+t:t,n=this._events[e];return n?n.fn?1:n.length:0};Li.prototype.emit=function(t,e,n,i,a,o){var s=Yi?Yi+t:t;if(!this._events[s])return!1;var A=this._events[s],l=arguments.length,u,c;if(A.fn){switch(A.once&&this.removeListener(t,A.fn,void 0,!0),l){case 1:return A.fn.call(A.context),!0;case 2:return A.fn.call(A.context,e),!0;case 3:return A.fn.call(A.context,e,n),!0;case 4:return A.fn.call(A.context,e,n,i),!0;case 5:return A.fn.call(A.context,e,n,i,a),!0;case 6:return A.fn.call(A.context,e,n,i,a,o),!0}for(c=1,u=new Array(l-1);c<l;c++)u[c-1]=arguments[c];A.fn.apply(A.context,u)}else{var f=A.length,h;for(c=0;c<f;c++)switch(A[c].once&&this.removeListener(t,A[c].fn,void 0,!0),l){case 1:A[c].fn.call(A[c].context);break;case 2:A[c].fn.call(A[c].context,e);break;case 3:A[c].fn.call(A[c].context,e,n);break;case 4:A[c].fn.call(A[c].context,e,n,i);break;default:if(!u)for(h=1,u=new Array(l-1);h<l;h++)u[h-1]=arguments[h];A[c].fn.apply(A[c].context,u)}}return!0};Li.prototype.on=function(t,e,n){return z5(this,t,e,n,!1)};Li.prototype.once=function(t,e,n){return z5(this,t,e,n,!0)};Li.prototype.removeListener=function(t,e,n,i){var a=Yi?Yi+t:t;if(!this._events[a])return this;if(!e)return Yd(this,a),this;var o=this._events[a];if(o.fn)o.fn===e&&(!i||o.once)&&(!n||o.context===n)&&Yd(this,a);else{for(var s=0,A=[],l=o.length;s<l;s++)(o[s].fn!==e||i&&!o[s].once||n&&o[s].context!==n)&&A.push(o[s]);A.length?this._events[a]=A.length===1?A[0]:A:Yd(this,a)}return this};Li.prototype.removeAllListeners=function(t){var e;return t?(e=Yi?Yi+t:t,this._events[e]&&Yd(this,e)):(this._events=new yc,this._eventsCount=0),this};Li.prototype.off=Li.prototype.removeListener;Li.prototype.addListener=Li.prototype.on;Li.prefixed=Yi;Li.EventEmitter=Li;typeof Xg<"u"&&(Xg.exports=Li)});var fr=Tt((oX,G5)=>{"use strict";var Xd=function(t){return fL(t)&&!dL(t)};function fL(r){return!!r&&typeof r=="object"}function dL(r){var t=Object.prototype.toString.call(r);return t==="[object RegExp]"||t==="[object Date]"||mL(r)}var pL=typeof Symbol=="function"&&Symbol.for,gL=pL?Symbol.for("react.element"):60103;function mL(r){return r.$$typeof===gL}function vL(r){return Array.isArray(r)?[]:{}}function wc(r,t){var e=t&&t.clone===!0;return e&&Xd(r)?Pu(vL(r),r,t):r}function V5(r,t,e){var n=r.slice();return t.forEach(function(i,a){typeof n[a]>"u"?n[a]=wc(i,e):Xd(i)?n[a]=Pu(r[a],i,e):r.indexOf(i)===-1&&n.push(wc(i,e))}),n}function yL(r,t,e){var n={};return Xd(r)&&Object.keys(r).forEach(function(i){n[i]=wc(r[i],e)}),Object.keys(t).forEach(function(i){!Xd(t[i])||!r[i]?n[i]=wc(t[i],e):n[i]=Pu(r[i],t[i],e)}),n}function Pu(r,t,e){var n=Array.isArray(t),i=Array.isArray(r),a=e||{arrayMerge:V5},o=n===i;if(o)if(n){var s=a.arrayMerge||V5;return s(r,t,e)}else return yL(r,t,e);else return wc(t,e)}Pu.all=function(t,e){if(!Array.isArray(t)||t.length<2)throw new Error("first argument should be an array with at least two elements");return t.reduce(function(n,i){return Pu(n,i,e)})};var wL=Pu;G5.exports=wL});var J4=Tt((Z4,im)=>{(function(r){typeof Z4=="object"&&typeof im<"u"?im.exports=r():typeof define=="function"&&define.amd?define([],r):(typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this).JSZip=r()})(function(){return function r(t,e,n){function i(s,A){if(!e[s]){if(!t[s]){var l=typeof mc=="function"&&mc;if(!A&&l)return l(s,!0);if(a)return a(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=e[s]={exports:{}};t[s][0].call(c.exports,function(f){var h=t[s][1][f];return i(h||f)},c,c.exports,r,t,e,n)}return e[s].exports}for(var a=typeof mc=="function"&&mc,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(r,t,e){"use strict";var n=r("./utils"),i=r("./support"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";e.encode=function(o){for(var s,A,l,u,c,f,h,p=[],d=0,g=o.length,m=g,y=n.getTypeOf(o)!=="string";d<o.length;)m=g-d,l=y?(s=o[d++],A=d<g?o[d++]:0,d<g?o[d++]:0):(s=o.charCodeAt(d++),A=d<g?o.charCodeAt(d++):0,d<g?o.charCodeAt(d++):0),u=s>>2,c=(3&s)<<4|A>>4,f=1<m?(15&A)<<2|l>>6:64,h=2<m?63&l:64,p.push(a.charAt(u)+a.charAt(c)+a.charAt(f)+a.charAt(h));return p.join("")},e.decode=function(o){var s,A,l,u,c,f,h=0,p=0,d="data:";if(o.substr(0,d.length)===d)throw new Error("Invalid base64 input, it looks like a data url.");var g,m=3*(o=o.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(o.charAt(o.length-1)===a.charAt(64)&&m--,o.charAt(o.length-2)===a.charAt(64)&&m--,m%1!=0)throw new Error("Invalid base64 input, bad content length.");for(g=i.uint8array?new Uint8Array(0|m):new Array(0|m);h<o.length;)s=a.indexOf(o.charAt(h++))<<2|(u=a.indexOf(o.charAt(h++)))>>4,A=(15&u)<<4|(c=a.indexOf(o.charAt(h++)))>>2,l=(3&c)<<6|(f=a.indexOf(o.charAt(h++))),g[p++]=s,c!==64&&(g[p++]=A),f!==64&&(g[p++]=l);return g}},{"./support":30,"./utils":32}],2:[function(r,t,e){"use strict";var n=r("./external"),i=r("./stream/DataWorker"),a=r("./stream/Crc32Probe"),o=r("./stream/DataLengthProbe");function s(A,l,u,c,f){this.compressedSize=A,this.uncompressedSize=l,this.crc32=u,this.compression=c,this.compressedContent=f}s.prototype={getContentWorker:function(){var A=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),l=this;return A.on("end",function(){if(this.streamInfo.data_length!==l.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),A},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(A,l,u){return A.pipe(new a).pipe(new o("uncompressedSize")).pipe(l.compressWorker(u)).pipe(new o("compressedSize")).withStreamInfo("compression",l)},t.exports=s},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(r,t,e){"use strict";var n=r("./stream/GenericWorker");e.STORE={magic:"\0\0",compressWorker:function(){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},e.DEFLATE=r("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(r,t,e){"use strict";var n=r("./utils"),i=function(){for(var a,o=[],s=0;s<256;s++){a=s;for(var A=0;A<8;A++)a=1&a?3988292384^a>>>1:a>>>1;o[s]=a}return o}();t.exports=function(a,o){return a!==void 0&&a.length?n.getTypeOf(a)!=="string"?function(s,A,l,u){var c=i,f=u+l;s^=-1;for(var h=u;h<f;h++)s=s>>>8^c[255&(s^A[h])];return-1^s}(0|o,a,a.length,0):function(s,A,l,u){var c=i,f=u+l;s^=-1;for(var h=u;h<f;h++)s=s>>>8^c[255&(s^A.charCodeAt(h))];return-1^s}(0|o,a,a.length,0):0}},{"./utils":32}],5:[function(r,t,e){"use strict";e.base64=!1,e.binary=!1,e.dir=!1,e.createFolders=!0,e.date=null,e.compression=null,e.compressionOptions=null,e.comment=null,e.unixPermissions=null,e.dosPermissions=null},{}],6:[function(r,t,e){"use strict";var n=null;n=typeof Promise<"u"?Promise:r("lie"),t.exports={Promise:n}},{lie:37}],7:[function(r,t,e){"use strict";var n=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",i=r("pako"),a=r("./utils"),o=r("./stream/GenericWorker"),s=n?"uint8array":"array";function A(l,u){o.call(this,"FlateWorker/"+l),this._pako=null,this._pakoAction=l,this._pakoOptions=u,this.meta={}}e.magic="\b\0",a.inherits(A,o),A.prototype.processChunk=function(l){this.meta=l.meta,this._pako===null&&this._createPako(),this._pako.push(a.transformTo(s,l.data),!1)},A.prototype.flush=function(){o.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},A.prototype.cleanUp=function(){o.prototype.cleanUp.call(this),this._pako=null},A.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var l=this;this._pako.onData=function(u){l.push({data:u,meta:l.meta})}},e.compressWorker=function(l){return new A("Deflate",l)},e.uncompressWorker=function(){return new A("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(r,t,e){"use strict";function n(c,f){var h,p="";for(h=0;h<f;h++)p+=String.fromCharCode(255&c),c>>>=8;return p}function i(c,f,h,p,d,g){var m,y,C=c.file,U=c.compression,O=g!==s.utf8encode,I=a.transformTo("string",g(C.name)),k=a.transformTo("string",s.utf8encode(C.name)),T=C.comment,D=a.transformTo("string",g(T)),L=a.transformTo("string",s.utf8encode(T)),S=k.length!==C.name.length,E=L.length!==T.length,H="",Y="",Z="",ct=C.dir,J=C.date,W={crc32:0,compressedSize:0,uncompressedSize:0};f&&!h||(W.crc32=c.crc32,W.compressedSize=c.compressedSize,W.uncompressedSize=c.uncompressedSize);var R=0;f&&(R|=8),O||!S&&!E||(R|=2048);var q=0,z=0;ct&&(q|=16),d==="UNIX"?(z=798,q|=function(G,K){var $=G;return G||($=K?16893:33204),(65535&$)<<16}(C.unixPermissions,ct)):(z=20,q|=function(G){return 63&(G||0)}(C.dosPermissions)),m=J.getUTCHours(),m<<=6,m|=J.getUTCMinutes(),m<<=5,m|=J.getUTCSeconds()/2,y=J.getUTCFullYear()-1980,y<<=4,y|=J.getUTCMonth()+1,y<<=5,y|=J.getUTCDate(),S&&(Y=n(1,1)+n(A(I),4)+k,H+="up"+n(Y.length,2)+Y),E&&(Z=n(1,1)+n(A(D),4)+L,H+="uc"+n(Z.length,2)+Z);var F="";return F+=` \0`,F+=n(R,2),F+=U.magic,F+=n(m,2),F+=n(y,2),F+=n(W.crc32,4),F+=n(W.compressedSize,4),F+=n(W.uncompressedSize,4),F+=n(I.length,2),F+=n(H.length,2),{fileRecord:l.LOCAL_FILE_HEADER+F+I+H,dirRecord:l.CENTRAL_FILE_HEADER+n(z,2)+F+n(D.length,2)+"\0\0\0\0"+n(q,4)+n(p,4)+I+H+D}}var a=r("../utils"),o=r("../stream/GenericWorker"),s=r("../utf8"),A=r("../crc32"),l=r("../signature");function u(c,f,h,p){o.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=f,this.zipPlatform=h,this.encodeFileName=p,this.streamFiles=c,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}a.inherits(u,o),u.prototype.push=function(c){var f=c.meta.percent||0,h=this.entriesCount,p=this._sources.length;this.accumulate?this.contentBuffer.push(c):(this.bytesWritten+=c.data.length,o.prototype.push.call(this,{data:c.data,meta:{currentFile:this.currentFile,percent:h?(f+100*(h-p-1))/h:100}}))},u.prototype.openedSource=function(c){this.currentSourceOffset=this.bytesWritten,this.currentFile=c.file.name;var f=this.streamFiles&&!c.file.dir;if(f){var h=i(c,f,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:h.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(c){this.accumulate=!1;var f=this.streamFiles&&!c.file.dir,h=i(c,f,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(h.dirRecord),f)this.push({data:function(p){return l.DATA_DESCRIPTOR+n(p.crc32,4)+n(p.compressedSize,4)+n(p.uncompressedSize,4)}(c),meta:{percent:100}});else for(this.push({data:h.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var c=this.bytesWritten,f=0;f<this.dirRecords.length;f++)this.push({data:this.dirRecords[f],meta:{percent:100}});var h=this.bytesWritten-c,p=function(d,g,m,y,C){var U=a.transformTo("string",C(y));return l.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(d,2)+n(d,2)+n(g,4)+n(m,4)+n(U.length,2)+U}(this.dirRecords.length,h,c,this.zipComment,this.encodeFileName);this.push({data:p,meta:{percent:100}})},u.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},u.prototype.registerPrevious=function(c){this._sources.push(c);var f=this;return c.on("data",function(h){f.processChunk(h)}),c.on("end",function(){f.closedSource(f.previous.streamInfo),f._sources.length?f.prepareNextSource():f.end()}),c.on("error",function(h){f.error(h)}),this},u.prototype.resume=function(){return!!o.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},u.prototype.error=function(c){var f=this._sources;if(!o.prototype.error.call(this,c))return!1;for(var h=0;h<f.length;h++)try{f[h].error(c)}catch{}return!0},u.prototype.lock=function(){o.prototype.lock.call(this);for(var c=this._sources,f=0;f<c.length;f++)c[f].lock()},t.exports=u},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(r,t,e){"use strict";var n=r("../compressions"),i=r("./ZipFileWorker");e.generateWorker=function(a,o,s){var A=new i(o.streamFiles,s,o.platform,o.encodeFileName),l=0;try{a.forEach(function(u,c){l++;var f=function(g,m){var y=g||m,C=n[y];if(!C)throw new Error(y+" is not a valid compression method !");return C}(c.options.compression,o.compression),h=c.options.compressionOptions||o.compressionOptions||{},p=c.dir,d=c.date;c._compressWorker(f,h).withStreamInfo("file",{name:u,dir:p,date:d,comment:c.comment||"",unixPermissions:c.unixPermissions,dosPermissions:c.dosPermissions}).pipe(A)}),A.entriesCount=l}catch(u){A.error(u)}return A}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(r,t,e){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var i=new n;for(var a in this)typeof this[a]!="function"&&(i[a]=this[a]);return i}}(n.prototype=r("./object")).loadAsync=r("./load"),n.support=r("./support"),n.defaults=r("./defaults"),n.version="3.10.1",n.loadAsync=function(i,a){return new n().loadAsync(i,a)},n.external=r("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(r,t,e){"use strict";var n=r("./utils"),i=r("./external"),a=r("./utf8"),o=r("./zipEntries"),s=r("./stream/Crc32Probe"),A=r("./nodejsUtils");function l(u){return new i.Promise(function(c,f){var h=u.decompressed.getContentWorker().pipe(new s);h.on("error",function(p){f(p)}).on("end",function(){h.streamInfo.crc32!==u.decompressed.crc32?f(new Error("Corrupted zip : CRC32 mismatch")):c()}).resume()})}t.exports=function(u,c){var f=this;return c=n.extend(c||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:a.utf8decode}),A.isNode&&A.isStream(u)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",u,!0,c.optimizedBinaryString,c.base64).then(function(h){var p=new o(c);return p.load(h),p}).then(function(h){var p=[i.Promise.resolve(h)],d=h.files;if(c.checkCRC32)for(var g=0;g<d.length;g++)p.push(l(d[g]));return i.Promise.all(p)}).then(function(h){for(var p=h.shift(),d=p.files,g=0;g<d.length;g++){var m=d[g],y=m.fileNameStr,C=n.resolve(m.fileNameStr);f.file(C,m.decompressed,{binary:!0,optimizedBinaryString:!0,date:m.date,dir:m.dir,comment:m.fileCommentStr.length?m.fileCommentStr:null,unixPermissions:m.unixPermissions,dosPermissions:m.dosPermissions,createFolders:c.createFolders}),m.dir||(f.file(C).unsafeOriginalName=y)}return p.zipComment.length&&(f.comment=p.zipComment),f})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(r,t,e){"use strict";var n=r("../utils"),i=r("../stream/GenericWorker");function a(o,s){i.call(this,"Nodejs stream input adapter for "+o),this._upstreamEnded=!1,this._bindStream(s)}n.inherits(a,i),a.prototype._bindStream=function(o){var s=this;(this._stream=o).pause(),o.on("data",function(A){s.push({data:A,meta:{percent:0}})}).on("error",function(A){s.isPaused?this.generatedError=A:s.error(A)}).on("end",function(){s.isPaused?s._upstreamEnded=!0:s.end()})},a.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=a},{"../stream/GenericWorker":28,"../utils":32}],13:[function(r,t,e){"use strict";var n=r("readable-stream").Readable;function i(a,o,s){n.call(this,o),this._helper=a;var A=this;a.on("data",function(l,u){A.push(l)||A._helper.pause(),s&&s(u)}).on("error",function(l){A.emit("error",l)}).on("end",function(){A.push(null)})}r("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":32,"readable-stream":16}],14:[function(r,t,e){"use strict";t.exports={isNode:typeof Buffer<"u",newBufferFrom:function(n,i){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(n,i);if(typeof n=="number")throw new Error('The "data" argument must not be a number');return new Buffer(n,i)},allocBuffer:function(n){if(Buffer.alloc)return Buffer.alloc(n);var i=new Buffer(n);return i.fill(0),i},isBuffer:function(n){return Buffer.isBuffer(n)},isStream:function(n){return n&&typeof n.on=="function"&&typeof n.pause=="function"&&typeof n.resume=="function"}}},{}],15:[function(r,t,e){"use strict";function n(C,U,O){var I,k=a.getTypeOf(U),T=a.extend(O||{},A);T.date=T.date||new Date,T.compression!==null&&(T.compression=T.compression.toUpperCase()),typeof T.unixPermissions=="string"&&(T.unixPermissions=parseInt(T.unixPermissions,8)),T.unixPermissions&&16384&T.unixPermissions&&(T.dir=!0),T.dosPermissions&&16&T.dosPermissions&&(T.dir=!0),T.dir&&(C=d(C)),T.createFolders&&(I=p(C))&&g.call(this,I,!0);var D=k==="string"&&T.binary===!1&&T.base64===!1;O&&O.binary!==void 0||(T.binary=!D),(U instanceof l&&U.uncompressedSize===0||T.dir||!U||U.length===0)&&(T.base64=!1,T.binary=!0,U="",T.compression="STORE",k="string");var L=null;L=U instanceof l||U instanceof o?U:f.isNode&&f.isStream(U)?new h(C,U):a.prepareContent(C,U,T.binary,T.optimizedBinaryString,T.base64);var S=new u(C,L,T);this.files[C]=S}var i=r("./utf8"),a=r("./utils"),o=r("./stream/GenericWorker"),s=r("./stream/StreamHelper"),A=r("./defaults"),l=r("./compressedObject"),u=r("./zipObject"),c=r("./generate"),f=r("./nodejsUtils"),h=r("./nodejs/NodejsStreamInputAdapter"),p=function(C){C.slice(-1)==="/"&&(C=C.substring(0,C.length-1));var U=C.lastIndexOf("/");return 0<U?C.substring(0,U):""},d=function(C){return C.slice(-1)!=="/"&&(C+="/"),C},g=function(C,U){return U=U!==void 0?U:A.createFolders,C=d(C),this.files[C]||n.call(this,C,null,{dir:!0,createFolders:U}),this.files[C]};function m(C){return Object.prototype.toString.call(C)==="[object RegExp]"}var y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(C){var U,O,I;for(U in this.files)I=this.files[U],(O=U.slice(this.root.length,U.length))&&U.slice(0,this.root.length)===this.root&&C(O,I)},filter:function(C){var U=[];return this.forEach(function(O,I){C(O,I)&&U.push(I)}),U},file:function(C,U,O){if(arguments.length!==1)return C=this.root+C,n.call(this,C,U,O),this;if(m(C)){var I=C;return this.filter(function(T,D){return!D.dir&&I.test(T)})}var k=this.files[this.root+C];return k&&!k.dir?k:null},folder:function(C){if(!C)return this;if(m(C))return this.filter(function(k,T){return T.dir&&C.test(k)});var U=this.root+C,O=g.call(this,U),I=this.clone();return I.root=O.name,I},remove:function(C){C=this.root+C;var U=this.files[C];if(U||(C.slice(-1)!=="/"&&(C+="/"),U=this.files[C]),U&&!U.dir)delete this.files[C];else for(var O=this.filter(function(k,T){return T.name.slice(0,C.length)===C}),I=0;I<O.length;I++)delete this.files[O[I].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(C){var U,O={};try{if((O=a.extend(C||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=O.type.toLowerCase(),O.compression=O.compression.toUpperCase(),O.type==="binarystring"&&(O.type="string"),!O.type)throw new Error("No output type specified.");a.checkSupport(O.type),O.platform!=="darwin"&&O.platform!=="freebsd"&&O.platform!=="linux"&&O.platform!=="sunos"||(O.platform="UNIX"),O.platform==="win32"&&(O.platform="DOS");var I=O.comment||this.comment||"";U=c.generateWorker(this,O,I)}catch(k){(U=new o("error")).error(k)}return new s(U,O.type||"string",O.mimeType)},generateAsync:function(C,U){return this.generateInternalStream(C).accumulate(U)},generateNodeStream:function(C,U){return(C=C||{}).type||(C.type="nodebuffer"),this.generateInternalStream(C).toNodejsStream(U)}};t.exports=y},{"./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(r,t,e){"use strict";t.exports=r("stream")},{stream:void 0}],17:[function(r,t,e){"use strict";var n=r("./DataReader");function i(a){n.call(this,a);for(var o=0;o<this.data.length;o++)a[o]=255&a[o]}r("../utils").inherits(i,n),i.prototype.byteAt=function(a){return this.data[this.zero+a]},i.prototype.lastIndexOfSignature=function(a){for(var o=a.charCodeAt(0),s=a.charCodeAt(1),A=a.charCodeAt(2),l=a.charCodeAt(3),u=this.length-4;0<=u;--u)if(this.data[u]===o&&this.data[u+1]===s&&this.data[u+2]===A&&this.data[u+3]===l)return u-this.zero;return-1},i.prototype.readAndCheckSignature=function(a){var o=a.charCodeAt(0),s=a.charCodeAt(1),A=a.charCodeAt(2),l=a.charCodeAt(3),u=this.readData(4);return o===u[0]&&s===u[1]&&A===u[2]&&l===u[3]},i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return[];var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(r,t,e){"use strict";var n=r("../utils");function i(a){this.data=a,this.length=a.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<this.zero+a||a<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var o,s=0;for(this.checkOffset(a),o=this.index+a-1;o>=this.index;o--)s=(s<<8)+this.byteAt(o);return this.index+=a,s},readString:function(a){return n.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date(Date.UTC(1980+(a>>25&127),(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1))}},t.exports=i},{"../utils":32}],19:[function(r,t,e){"use strict";var n=r("./Uint8ArrayReader");function i(a){n.call(this,a)}r("../utils").inherits(i,n),i.prototype.readData=function(a){this.checkOffset(a);var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(r,t,e){"use strict";var n=r("./DataReader");function i(a){n.call(this,a)}r("../utils").inherits(i,n),i.prototype.byteAt=function(a){return this.data.charCodeAt(this.zero+a)},i.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)-this.zero},i.prototype.readAndCheckSignature=function(a){return a===this.readData(4)},i.prototype.readData=function(a){this.checkOffset(a);var o=this.data.slice(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(r,t,e){"use strict";var n=r("./ArrayReader");function i(a){n.call(this,a)}r("../utils").inherits(i,n),i.prototype.readData=function(a){if(this.checkOffset(a),a===0)return new Uint8Array(0);var o=this.data.subarray(this.zero+this.index,this.zero+this.index+a);return this.index+=a,o},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(r,t,e){"use strict";var n=r("../utils"),i=r("../support"),a=r("./ArrayReader"),o=r("./StringReader"),s=r("./NodeBufferReader"),A=r("./Uint8ArrayReader");t.exports=function(l){var u=n.getTypeOf(l);return n.checkSupport(u),u!=="string"||i.uint8array?u==="nodebuffer"?new s(l):i.uint8array?new A(n.transformTo("uint8array",l)):new a(n.transformTo("array",l)):new o(l)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(r,t,e){"use strict";e.LOCAL_FILE_HEADER="PK",e.CENTRAL_FILE_HEADER="PK",e.CENTRAL_DIRECTORY_END="PK",e.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",e.ZIP64_CENTRAL_DIRECTORY_END="PK",e.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(r,t,e){"use strict";var n=r("./GenericWorker"),i=r("../utils");function a(o){n.call(this,"ConvertWorker to "+o),this.destType=o}i.inherits(a,n),a.prototype.processChunk=function(o){this.push({data:i.transformTo(this.destType,o.data),meta:o.meta})},t.exports=a},{"../utils":32,"./GenericWorker":28}],25:[function(r,t,e){"use strict";var n=r("./GenericWorker"),i=r("../crc32");function a(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}r("../utils").inherits(a,n),a.prototype.processChunk=function(o){this.streamInfo.crc32=i(o.data,this.streamInfo.crc32||0),this.push(o)},t.exports=a},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(r,t,e){"use strict";var n=r("../utils"),i=r("./GenericWorker");function a(o){i.call(this,"DataLengthProbe for "+o),this.propName=o,this.withStreamInfo(o,0)}n.inherits(a,i),a.prototype.processChunk=function(o){if(o){var s=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=s+o.data.length}i.prototype.processChunk.call(this,o)},t.exports=a},{"../utils":32,"./GenericWorker":28}],27:[function(r,t,e){"use strict";var n=r("../utils"),i=r("./GenericWorker");function a(o){i.call(this,"DataWorker");var s=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,o.then(function(A){s.dataIsReady=!0,s.data=A,s.max=A&&A.length||0,s.type=n.getTypeOf(A),s.isPaused||s._tickAndRepeat()},function(A){s.error(A)})}n.inherits(a,i),a.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},a.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},a.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},a.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var o=null,s=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":o=this.data.substring(this.index,s);break;case"uint8array":o=this.data.subarray(this.index,s);break;case"array":case"nodebuffer":o=this.data.slice(this.index,s)}return this.index=s,this.push({data:o,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=a},{"../utils":32,"./GenericWorker":28}],28:[function(r,t,e){"use strict";function n(i){this.name=i||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(i){this.emit("data",i)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(i){this.emit("error",i)}return!0},error:function(i){return!this.isFinished&&(this.isPaused?this.generatedError=i:(this.isFinished=!0,this.emit("error",i),this.previous&&this.previous.error(i),this.cleanUp()),!0)},on:function(i,a){return this._listeners[i].push(a),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(i,a){if(this._listeners[i])for(var o=0;o<this._listeners[i].length;o++)this._listeners[i][o].call(this,a)},pipe:function(i){return i.registerPrevious(this)},registerPrevious:function(i){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=i.streamInfo,this.mergeStreamInfo(),this.previous=i;var a=this;return i.on("data",function(o){a.processChunk(o)}),i.on("end",function(){a.end()}),i.on("error",function(o){a.error(o)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var i=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),i=!0),this.previous&&this.previous.resume(),!i},flush:function(){},processChunk:function(i){this.push(i)},withStreamInfo:function(i,a){return this.extraStreamInfo[i]=a,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var i in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,i)&&(this.streamInfo[i]=this.extraStreamInfo[i])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var i="Worker "+this.name;return this.previous?this.previous+" -> "+i:i}},t.exports=n},{}],29:[function(r,t,e){"use strict";var n=r("../utils"),i=r("./ConvertWorker"),a=r("./GenericWorker"),o=r("../base64"),s=r("../support"),A=r("../external"),l=null;if(s.nodestream)try{l=r("../nodejs/NodejsStreamOutputAdapter")}catch{}function u(f,h){return new A.Promise(function(p,d){var g=[],m=f._internalType,y=f._outputType,C=f._mimeType;f.on("data",function(U,O){g.push(U),h&&h(O)}).on("error",function(U){g=[],d(U)}).on("end",function(){try{var U=function(O,I,k){switch(O){case"blob":return n.newBlob(n.transformTo("arraybuffer",I),k);case"base64":return o.encode(I);default:return n.transformTo(O,I)}}(y,function(O,I){var k,T=0,D=null,L=0;for(k=0;k<I.length;k++)L+=I[k].length;switch(O){case"string":return I.join("");case"array":return Array.prototype.concat.apply([],I);case"uint8array":for(D=new Uint8Array(L),k=0;k<I.length;k++)D.set(I[k],T),T+=I[k].length;return D;case"nodebuffer":return Buffer.concat(I);default:throw new Error("concat : unsupported type '"+O+"'")}}(m,g),C);p(U)}catch(O){d(O)}g=[]}).resume()})}function c(f,h,p){var d=h;switch(h){case"blob":case"arraybuffer":d="uint8array";break;case"base64":d="string"}try{this._internalType=d,this._outputType=h,this._mimeType=p,n.checkSupport(d),this._worker=f.pipe(new i(d)),f.lock()}catch(g){this._worker=new a("error"),this._worker.error(g)}}c.prototype={accumulate:function(f){return u(this,f)},on:function(f,h){var p=this;return f==="data"?this._worker.on(f,function(d){h.call(p,d.data,d.meta)}):this._worker.on(f,function(){n.delay(h,arguments,p)}),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(f){if(n.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new l(this,{objectMode:this._outputType!=="nodebuffer"},f)}},t.exports=c},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(r,t,e){"use strict";if(e.base64=!0,e.array=!0,e.string=!0,e.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",e.nodebuffer=typeof Buffer<"u",e.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")e.blob=!1;else{var n=new ArrayBuffer(0);try{e.blob=new Blob([n],{type:"application/zip"}).size===0}catch{try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),e.blob=i.getBlob("application/zip").size===0}catch{e.blob=!1}}}try{e.nodestream=!!r("readable-stream").Readable}catch{e.nodestream=!1}},{"readable-stream":16}],31:[function(r,t,e){"use strict";for(var n=r("./utils"),i=r("./support"),a=r("./nodejsUtils"),o=r("./stream/GenericWorker"),s=new Array(256),A=0;A<256;A++)s[A]=252<=A?6:248<=A?5:240<=A?4:224<=A?3:192<=A?2:1;s[254]=s[254]=1;function l(){o.call(this,"utf-8 decode"),this.leftOver=null}function u(){o.call(this,"utf-8 encode")}e.utf8encode=function(c){return i.nodebuffer?a.newBufferFrom(c,"utf-8"):function(f){var h,p,d,g,m,y=f.length,C=0;for(g=0;g<y;g++)(64512&(p=f.charCodeAt(g)))==55296&&g+1<y&&(64512&(d=f.charCodeAt(g+1)))==56320&&(p=65536+(p-55296<<10)+(d-56320),g++),C+=p<128?1:p<2048?2:p<65536?3:4;for(h=i.uint8array?new Uint8Array(C):new Array(C),g=m=0;m<C;g++)(64512&(p=f.charCodeAt(g)))==55296&&g+1<y&&(64512&(d=f.charCodeAt(g+1)))==56320&&(p=65536+(p-55296<<10)+(d-56320),g++),p<128?h[m++]=p:(p<2048?h[m++]=192|p>>>6:(p<65536?h[m++]=224|p>>>12:(h[m++]=240|p>>>18,h[m++]=128|p>>>12&63),h[m++]=128|p>>>6&63),h[m++]=128|63&p);return h}(c)},e.utf8decode=function(c){return i.nodebuffer?n.transformTo("nodebuffer",c).toString("utf-8"):function(f){var h,p,d,g,m=f.length,y=new Array(2*m);for(h=p=0;h<m;)if((d=f[h++])<128)y[p++]=d;else if(4<(g=s[d]))y[p++]=65533,h+=g-1;else{for(d&=g===2?31:g===3?15:7;1<g&&h<m;)d=d<<6|63&f[h++],g--;1<g?y[p++]=65533:d<65536?y[p++]=d:(d-=65536,y[p++]=55296|d>>10&1023,y[p++]=56320|1023&d)}return y.length!==p&&(y.subarray?y=y.subarray(0,p):y.length=p),n.applyFromCharCode(y)}(c=n.transformTo(i.uint8array?"uint8array":"array",c))},n.inherits(l,o),l.prototype.processChunk=function(c){var f=n.transformTo(i.uint8array?"uint8array":"array",c.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var h=f;(f=new Uint8Array(h.length+this.leftOver.length)).set(this.leftOver,0),f.set(h,this.leftOver.length)}else f=this.leftOver.concat(f);this.leftOver=null}var p=function(g,m){var y;for((m=m||g.length)>g.length&&(m=g.length),y=m-1;0<=y&&(192&g[y])==128;)y--;return y<0||y===0?m:y+s[g[y]]>m?y:m}(f),d=f;p!==f.length&&(i.uint8array?(d=f.subarray(0,p),this.leftOver=f.subarray(p,f.length)):(d=f.slice(0,p),this.leftOver=f.slice(p,f.length))),this.push({data:e.utf8decode(d),meta:c.meta})},l.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:e.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},e.Utf8DecodeWorker=l,n.inherits(u,o),u.prototype.processChunk=function(c){this.push({data:e.utf8encode(c.data),meta:c.meta})},e.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(r,t,e){"use strict";var n=r("./support"),i=r("./base64"),a=r("./nodejsUtils"),o=r("./external");function s(h){return h}function A(h,p){for(var d=0;d<h.length;++d)p[d]=255&h.charCodeAt(d);return p}r("setimmediate"),e.newBlob=function(h,p){e.checkSupport("blob");try{return new Blob([h],{type:p})}catch{try{var d=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return d.append(h),d.getBlob(p)}catch{throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(h,p,d){var g=[],m=0,y=h.length;if(y<=d)return String.fromCharCode.apply(null,h);for(;m<y;)p==="array"||p==="nodebuffer"?g.push(String.fromCharCode.apply(null,h.slice(m,Math.min(m+d,y)))):g.push(String.fromCharCode.apply(null,h.subarray(m,Math.min(m+d,y)))),m+=d;return g.join("")},stringifyByChar:function(h){for(var p="",d=0;d<h.length;d++)p+=String.fromCharCode(h[d]);return p},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&String.fromCharCode.apply(null,a.allocBuffer(1)).length===1}catch{return!1}}()}};function u(h){var p=65536,d=e.getTypeOf(h),g=!0;if(d==="uint8array"?g=l.applyCanBeUsed.uint8array:d==="nodebuffer"&&(g=l.applyCanBeUsed.nodebuffer),g)for(;1<p;)try{return l.stringifyByChunk(h,d,p)}catch{p=Math.floor(p/2)}return l.stringifyByChar(h)}function c(h,p){for(var d=0;d<h.length;d++)p[d]=h[d];return p}e.applyFromCharCode=u;var f={};f.string={string:s,array:function(h){return A(h,new Array(h.length))},arraybuffer:function(h){return f.string.uint8array(h).buffer},uint8array:function(h){return A(h,new Uint8Array(h.length))},nodebuffer:function(h){return A(h,a.allocBuffer(h.length))}},f.array={string:u,array:s,arraybuffer:function(h){return new Uint8Array(h).buffer},uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(h)}},f.arraybuffer={string:function(h){return u(new Uint8Array(h))},array:function(h){return c(new Uint8Array(h),new Array(h.byteLength))},arraybuffer:s,uint8array:function(h){return new Uint8Array(h)},nodebuffer:function(h){return a.newBufferFrom(new Uint8Array(h))}},f.uint8array={string:u,array:function(h){return c(h,new Array(h.length))},arraybuffer:function(h){return h.buffer},uint8array:s,nodebuffer:function(h){return a.newBufferFrom(h)}},f.nodebuffer={string:u,array:function(h){return c(h,new Array(h.length))},arraybuffer:function(h){return f.nodebuffer.uint8array(h).buffer},uint8array:function(h){return c(h,new Uint8Array(h.length))},nodebuffer:s},e.transformTo=function(h,p){if(p=p||"",!h)return p;e.checkSupport(h);var d=e.getTypeOf(p);return f[d][h](p)},e.resolve=function(h){for(var p=h.split("/"),d=[],g=0;g<p.length;g++){var m=p[g];m==="."||m===""&&g!==0&&g!==p.length-1||(m===".."?d.pop():d.push(m))}return d.join("/")},e.getTypeOf=function(h){return typeof h=="string"?"string":Object.prototype.toString.call(h)==="[object Array]"?"array":n.nodebuffer&&a.isBuffer(h)?"nodebuffer":n.uint8array&&h instanceof Uint8Array?"uint8array":n.arraybuffer&&h instanceof ArrayBuffer?"arraybuffer":void 0},e.checkSupport=function(h){if(!n[h.toLowerCase()])throw new Error(h+" is not supported by this platform")},e.MAX_VALUE_16BITS=65535,e.MAX_VALUE_32BITS=-1,e.pretty=function(h){var p,d,g="";for(d=0;d<(h||"").length;d++)g+="\\x"+((p=h.charCodeAt(d))<16?"0":"")+p.toString(16).toUpperCase();return g},e.delay=function(h,p,d){setImmediate(function(){h.apply(d||null,p||[])})},e.inherits=function(h,p){function d(){}d.prototype=p.prototype,h.prototype=new d},e.extend=function(){var h,p,d={};for(h=0;h<arguments.length;h++)for(p in arguments[h])Object.prototype.hasOwnProperty.call(arguments[h],p)&&d[p]===void 0&&(d[p]=arguments[h][p]);return d},e.prepareContent=function(h,p,d,g,m){return o.Promise.resolve(p).then(function(y){return n.blob&&(y instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(y))!==-1)&&typeof FileReader<"u"?new o.Promise(function(C,U){var O=new FileReader;O.onload=function(I){C(I.target.result)},O.onerror=function(I){U(I.target.error)},O.readAsArrayBuffer(y)}):y}).then(function(y){var C=e.getTypeOf(y);return C?(C==="arraybuffer"?y=e.transformTo("uint8array",y):C==="string"&&(m?y=i.decode(y):d&&g!==!0&&(y=function(U){return A(U,n.uint8array?new Uint8Array(U.length):new Array(U.length))}(y))),y):o.Promise.reject(new Error("Can't read the data of '"+h+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(r,t,e){"use strict";var n=r("./reader/readerFor"),i=r("./utils"),a=r("./signature"),o=r("./zipEntry"),s=r("./support");function A(l){this.files=[],this.loadOptions=l}A.prototype={checkSignature:function(l){if(!this.reader.readAndCheckSignature(l)){this.reader.index-=4;var u=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(u)+", expected "+i.pretty(l)+")")}},isSignature:function(l,u){var c=this.reader.index;this.reader.setIndex(l);var f=this.reader.readString(4)===u;return this.reader.setIndex(c),f},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 l=this.reader.readData(this.zipCommentLength),u=s.uint8array?"uint8array":"array",c=i.transformTo(u,l);this.zipComment=this.loadOptions.decodeFileName(c)},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 l,u,c,f=this.zip64EndOfCentralSize-44;0<f;)l=this.reader.readInt(2),u=this.reader.readInt(4),c=this.reader.readData(u),this.zip64ExtensibleData[l]={id:l,length:u,value:c}},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 l,u;for(l=0;l<this.files.length;l++)u=this.files[l],this.reader.setIndex(u.localHeaderOffset),this.checkSignature(a.LOCAL_FILE_HEADER),u.readLocalPart(this.reader),u.handleUTF8(),u.processAttributes()},readCentralDir:function(){var l;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(a.CENTRAL_FILE_HEADER);)(l=new o({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(l);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var l=this.reader.lastIndexOfSignature(a.CENTRAL_DIRECTORY_END);if(l<0)throw this.isSignature(0,a.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(l);var u=l;if(this.checkSignature(a.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(l=this.reader.lastIndexOfSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(l),this.checkSignature(a.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,a.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(a.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(a.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var c=this.centralDirOffset+this.centralDirSize;this.zip64&&(c+=20,c+=12+this.zip64EndOfCentralSize);var f=u-c;if(0<f)this.isSignature(u,a.CENTRAL_FILE_HEADER)||(this.reader.zero=f);else if(f<0)throw new Error("Corrupted zip: missing "+Math.abs(f)+" bytes.")},prepareReader:function(l){this.reader=n(l)},load:function(l){this.prepareReader(l),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=A},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(r,t,e){"use strict";var n=r("./reader/readerFor"),i=r("./utils"),a=r("./compressedObject"),o=r("./crc32"),s=r("./utf8"),A=r("./compressions"),l=r("./support");function u(c,f){this.options=c,this.loadOptions=f}u.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(c){var f,h;if(c.skip(22),this.fileNameLength=c.readInt(2),h=c.readInt(2),this.fileName=c.readData(this.fileNameLength),c.skip(h),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((f=function(p){for(var d in A)if(Object.prototype.hasOwnProperty.call(A,d)&&A[d].magic===p)return A[d];return null}(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new a(this.compressedSize,this.uncompressedSize,this.crc32,f,c.readData(this.compressedSize))},readCentralPart:function(c){this.versionMadeBy=c.readInt(2),c.skip(2),this.bitFlag=c.readInt(2),this.compressionMethod=c.readString(2),this.date=c.readDate(),this.crc32=c.readInt(4),this.compressedSize=c.readInt(4),this.uncompressedSize=c.readInt(4);var f=c.readInt(2);if(this.extraFieldsLength=c.readInt(2),this.fileCommentLength=c.readInt(2),this.diskNumberStart=c.readInt(2),this.internalFileAttributes=c.readInt(2),this.externalFileAttributes=c.readInt(4),this.localHeaderOffset=c.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");c.skip(f),this.readExtraFields(c),this.parseZIP64ExtraField(c),this.fileComment=c.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var c=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),c==0&&(this.dosPermissions=63&this.externalFileAttributes),c==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var c=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=c.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=c.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=c.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=c.readInt(4))}},readExtraFields:function(c){var f,h,p,d=c.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});c.index+4<d;)f=c.readInt(2),h=c.readInt(2),p=c.readData(h),this.extraFields[f]={id:f,length:h,value:p};c.setIndex(d)},handleUTF8:function(){var c=l.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment);else{var f=this.findExtraFieldUnicodePath();if(f!==null)this.fileNameStr=f;else{var h=i.transformTo(c,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(h)}var p=this.findExtraFieldUnicodeComment();if(p!==null)this.fileCommentStr=p;else{var d=i.transformTo(c,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(d)}}},findExtraFieldUnicodePath:function(){var c=this.extraFields[28789];if(c){var f=n(c.value);return f.readInt(1)!==1||o(this.fileName)!==f.readInt(4)?null:s.utf8decode(f.readData(c.length-5))}return null},findExtraFieldUnicodeComment:function(){var c=this.extraFields[25461];if(c){var f=n(c.value);return f.readInt(1)!==1||o(this.fileComment)!==f.readInt(4)?null:s.utf8decode(f.readData(c.length-5))}return null}},t.exports=u},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(r,t,e){"use strict";function n(f,h,p){this.name=f,this.dir=p.dir,this.date=p.date,this.comment=p.comment,this.unixPermissions=p.unixPermissions,this.dosPermissions=p.dosPermissions,this._data=h,this._dataBinary=p.binary,this.options={compression:p.compression,compressionOptions:p.compressionOptions}}var i=r("./stream/StreamHelper"),a=r("./stream/DataWorker"),o=r("./utf8"),s=r("./compressedObject"),A=r("./stream/GenericWorker");n.prototype={internalStream:function(f){var h=null,p="string";try{if(!f)throw new Error("No output type specified.");var d=(p=f.toLowerCase())==="string"||p==="text";p!=="binarystring"&&p!=="text"||(p="string"),h=th