!function(t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).SimpleZip=t()}(function(){return function r(n,u,a){function s(e,t){if(!u[e]){if(!n[e]){var i="function"==typeof require&&require;if(!t&&i)return i(e,!0);if(h)return h(e,!0);throw(t=new Error("Cannot find module '"+e+"'")).code="MODULE_NOT_FOUND",t}i=u[e]={exports:{}},n[e][0].call(i.exports,function(t){return s(n[e][1][t]||t)},i,i.exports,r,n,u,a)}return u[e].exports}for(var h="function"==typeof require&&require,t=0;tthis.array.byteLength&&(console.log("Reallocate Zip From",this.array.byteLength,"to",t),(t=new Uint8Array(t)).set(this.array.slice(0,this.index),0),delete this.array,this.array=t)},r.prototype.getArrayBuffer=function(){return this.array.buffer.byteLength===this.index?this.array.buffer:this.array.buffer.slice(0,this.index)},r.prototype.getCapacity=function(){return this.array.byteLength},r.prototype.getIndex=function(){return this.index},r.prototype.writeStr=function(t){for(var e=0;e>8&255},r.prototype.writeu32=function(t){this.array[this.index++]=255&t,this.array[this.index++]=t>>8&255,this.array[this.index++]=t>>16&255,this.array[this.index++]=t>>24&255},r.prototype.writeu64=function(t){this.writeu32(t[1]),this.writeu32(t[0])};var s=r;function r(t){this.array=new Uint8Array(t),this.index=0}var h=new Date("01-Jan-1601 00:00:00 UTC");function l(t){this.files=[],this.ntfsTimeSinceEpoch=[],this.cdrAccumulate=0,this.buf=new s(t);var t=new Date,e=t.getHours(),i=t.getMinutes(),r=Math.floor(t.getSeconds()/2),n=t.getFullYear()-1980,u=t.getMonth()+1,a=t.getDate(),e=(this.createdTime=(31&e)<<11|(63&i)<<5|31&r,this.createdDate=(127&n)<<9|(15&u)<<5|31&a,t.getTime()-h.getTime()),i=Math.floor(e/429496.7296),r=1e4*(4294967295&e)&4294967295;this.ntfsTimeSinceEpoch.push(i),this.ntfsTimeSinceEpoch.push(r)}l.prototype.ensureRemainingSpace=function(t){this.buf.ensureRemaining(t)},l.prototype.appendFile=function(t){this.appendFiles([t])},l.prototype.appendFiles=function(t){for(var e=[],i=0,r=0,n=t;r0 characters");var a=function(t){for(var e=[],i=0,r=t;i>6)):(n<65536||(n&=65535),e.push(224+(n>>12)),e.push(128+(n>>6&63))),e.push(128+(63&n)))}return Uint8Array.from(e)}(u.name),s=void 0;if("string"==typeof u.data){s=new Uint8Array(u.data.length);for(var h=0;h>>8^l.crcTable[255&(e^t[i])];return(-1^e)>>>0},l.genCRCTable=function(){if(null===l.crcTable){l.crcTable=Array(256);for(var t=void 0,e=0;e<256;e++){for(var t=e,i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;l.crcTable[e]=t}}},l.crcTable=null,e.exports=l},{}]},{},[1])(1)});