1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-10 21:29:33 +00:00
8bitworkshop/gen/jszip.min-QZ4ZBVAS.js

15 lines
96 KiB
JavaScript
Raw Normal View History

import{c as _t,d as Et}from"./chunk-WAARL7ET.js";var At=Et((xt,yt)=>{(function(b){typeof xt=="object"&&typeof yt!="undefined"?yt.exports=b():typeof define=="function"&&define.amd?define([],b):(typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:this).JSZip=b()})(function(){return function b(U,k,l){function o(_,y){if(!k[_]){if(!U[_]){var p=typeof _t=="function"&&_t;if(!y&&p)return p(_,!0);if(n)return n(_,!0);var g=new Error("Cannot find module '"+_+"'");throw g.code="MODULE_NOT_FOUND",g}var i=k[_]={exports:{}};U[_][0].call(i.exports,function(c){var e=U[_][1][c];return o(e||c)},i,i.exports,b,U,k,l)}return k[_].exports}for(var n=typeof _t=="function"&&_t,h=0;h<l.length;h++)o(l[h]);return o}({1:[function(b,U,k){"use strict";var l=b("./utils"),o=b("./support"),n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";k.encode=function(h){for(var _,y,p,g,i,c,e,u=[],s=0,d=h.length,v=d,S=l.getTypeOf(h)!=="string";s<h.length;)v=d-s,p=S?(_=h[s++],y=s<d?h[s++]:0,s<d?h[s++]:0):(_=h.charCodeAt(s++),y=s<d?h.charCodeAt(s++):0,s<d?h.charCodeAt(s++):0),g=_>>2,i=(3&_)<<4|y>>4,c=1<v?(15&y)<<2|p>>6:64,e=2<v?63&p:64,u.push(n.charAt(g)+n.charAt(i)+n.charAt(c)+n.charAt(e));return u.join("")},k.decode=function(h){var _,y,p,g,i,c,e=0,u=0,s="data:";if(h.substr(0,s.length)===s)throw new Error("Invalid base64 input, it looks like a data url.");var d,v=3*(h=h.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(h.charAt(h.length-1)===n.charAt(64)&&v--,h.charAt(h.length-2)===n.charAt(64)&&v--,v%1!=0)throw new Error("Invalid base64 input, bad content length.");for(d=o.uint8array?new Uint8Array(0|v):new Array(0|v);e<h.length;)_=n.indexOf(h.charAt(e++))<<2|(g=n.indexOf(h.charAt(e++)))>>4,y=(15&g)<<4|(i=n.indexOf(h.charAt(e++)))>>2,p=(3&i)<<6|(c=n.indexOf(h.charAt(e++))),d[u++]=_,i!==64&&(d[u++]=y),c!==64&&(d[u++]=p);return d}},{"./support":30,"./utils":32}],2:[function(b,U,k){"use strict";var l=b("./external"),o=b("./stream/DataWorker"),n=b("./stream/Crc32Probe"),h=b("./stream/DataLengthProbe");function _(y,p,g,i,c){this.compressedSize=y,this.uncompressedSize=p,this.crc32=g,this.compression=i,this.compressedContent=c}_.prototype={getContentWorker:function(){var y=new o(l.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new h("data_length")),p=this;return y.on("end",function(){if(this.streamInfo.data_length!==p.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new o(l.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},_.createWorkerFrom=function(y,p,g){return y.pipe(new n).pipe(new h("uncompressedSize")).pipe(p.compressWorker(g)).pipe(new h("compressedSize")).withStreamInfo("compression",p)},U.exports=_},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(b,U,k){"use strict";var l=b("./stream/GenericWorker");k.STORE={magic:"\0\0",compressWorker:function(){return new l("STORE compression")},uncompressWorker:function(){return new l("STORE decompression")}},k.DEFLATE=b("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(b,U,k){"use strict";var l=b("./utils"),o=function(){for(var n,h=[],_=0;_<256;_++){n=_;for(var y=0;y<8;y++)n=1&n?3988292384^n>>>1:n>>>1;h[_]=n}return h}();U.exports=function(n,h){return n!==void 0&&n.length?l.getTypeOf(n)!=="string"?function(_,y,p,g){var i=o,c=g+p;_^=-1;for(var e=g;e<c;e++)_=_>>>8^i[255&(_^y[e])];return-1^_}(0|h,n,n.length,0):function(_,y,p,g){var i=o,c=g+p;_^=-1;for(var e=g;e<c;e++)_=_>>>8^i[255&(_^y.charCodeAt(e))];return-1^_}(0|h,n,n.length,0):0}},{"./utils":32}],5:[function(b,U,k){"use strict";k.base64=!1,k.binary=!1,k.dir=!1,k.createFolders=!0,k.date=null,k.compression=null,k.compressionOptions=null,k.comment=null,k.unixPermissions=null,k.dosPermissions=null},{}],6:[function(b,U,k){"use strict";var l=null;l=typeof P
\0`,G+=l(E,2),G+=D.magic,G+=l(v,2),G+=l(S,2),G+=l(q.crc32,4),G+=l(q.compressedSize,4),G+=l(q.uncompressedSize,4),G+=l(L.length,2),G+=l(T.length,2),{fileRecord:p.LOCAL_FILE_HEADER+G+L+T,dirRecord:p.CENTRAL_FILE_HEADER+l(X,2)+G+l(V.length,2)+"\0\0\0\0"+l(C,4)+l(u,4)+L+T+V}}var n=b("../utils"),h=b("../stream/GenericWorker"),_=b("../utf8"),y=b("../crc32"),p=b("../signature");function g(i,c,e,u){h.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=c,this.zipPlatform=e,this.encodeFileName=u,this.streamFiles=i,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}n.inherits(g,h),g.prototype.push=function(i){var c=i.meta.percent||0,e=this.entriesCount,u=this._sources.length;this.accumulate?this.contentBuffer.push(i):(this.bytesWritten+=i.data.length,h.prototype.push.call(this,{data:i.data,meta:{currentFile:this.currentFile,percent:e?(c+100*(e-u-1))/e:100}}))},g.prototype.openedSource=function(i){this.currentSourceOffset=this.bytesWritten,this.currentFile=i.file.name;var c=this.streamFiles&&!i.file.dir;if(c){var e=o(i,c,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:e.fileRecord,meta:{percent:0}})}else this.accumulate=!0},g.prototype.closedSource=function(i){this.accumulate=!1;var c=this.streamFiles&&!i.file.dir,e=o(i,c,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(e.dirRecord),c)this.push({data:function(u){return p.DATA_DESCRIPTOR+l(u.crc32,4)+l(u.compressedSize,4)+l(u.uncompressedSize,4)}(i),meta:{percent:100}});else for(this.push({data:e.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},g.prototype.flush=function(){for(var i=this.bytesWritten,c=0;c<this.dirRecords.length;c++)this.push({data:this.dirRecords[c],meta:{percent:100}});var e=this.bytesWritten-i,u=function(s,d,v,S,x){var D=n.transformTo("string",x(S));return p.CENTRAL_DIRECTORY_END+"\0\0\0\0"+l(s,2)+l(s,2)+l(d,4)+l(v,4)+l(D.length,2)+D}(this.dirRecords.length,e,i,this.zipComment,this.encodeFileName);this.push({data:u,meta:{percent:100}})},g.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},g.prototype.registerPrevious=function(i){this._sources.push(i);var c=this;return i.on("data",function(e){c.processChunk(e)}),i.on("end",function(){c.closedSource(c.previous.streamInfo),c._sources.length?c.prepareNextSource():c.end()}),i.on("error",function(e){c.error(e)}),this},g.prototype.resume=function(){return!!h.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},g.prototype.error=function(i){var c=this._sources;if(!h.prototype.error.call(this,i))return!1;for(var e=0;e<c.length;e++)try{c[e].error(i)}catch(u){}return!0},g.prototype.lock=function(){h.prototype.lock.call(this);for(var i=this._sources,c=0;c<i.length;c++)i[c].lock()},U.exports=g},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(b,U,k){"use strict";var l=b("../compressions"),o=b("./ZipFileWorker");k.generateWorker=function(n,h,_){var y=new o(h.streamFiles,_,h.platform,h.encodeFileName),p=0;try{n.forEach(function(g,i){p++;var c=function(d,v){var S=d||v,x=l[S];if(!x)throw new Error(S+" is not a valid compression method !");return x}(i.options.compression,h.compression),e=i.options.compressionOptions||h.compressionOptions||{},u=i.dir,s=i.date;i._compressWorker(c,e).withStreamInfo("file",{name:g,dir:u,date:s,comment:i.comment||"",unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions}).pipe(y)}),y.entriesCount=p}catch(g){y.error(g)}return y}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(b,U,k){"use strict";function l(){if(!(this instanceof l))return new l;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip
/*!
JSZip v3.10.1 - A JavaScript class for generating and reading zip files
<http://stuartk.com/jszip>
(c) 2009-2016 Stuart Knightley <stuart [at] stuartk.com>
Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/main/LICENSE.markdown.
JSZip uses the library pako released under the MIT license :
https://github.com/nodeca/pako/blob/main/LICENSE
*/
//# sourceMappingURL=jszip.min-QZ4ZBVAS.js.map