-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUraniumCompressJS.min.js
1 lines (1 loc) · 22.3 KB
/
UraniumCompressJS.min.js
1
!function(){var t,e,r,i=t={};function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===n||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:n}catch(t){e=n}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var h,a=[],c=!1,u=-1;function f(){c&&h&&(c=!1,h.length?a=h.concat(a):u=-1,a.length&&l())}function l(){if(!c){var t=s(f);c=!0;for(var e=a.length;e;){for(h=a,a=[];++u<e;)h&&h[u].run();u=-1,e=a.length}h=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];a.push(new p(t,e)),1!==a.length||c||s(l)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=d,i.addListener=d,i.once=d,i.off=d,i.removeListener=d,i.removeAllListeners=d,i.emit=d,i.prependListener=d,i.prependOnceListener=d,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0};var y={exports:{}};(function(t){(function(){var e,r,i,n,o,s,h,a,c,u,f;e=function(){var t=Math.imul,e=Math.pow(2,31),r=e>>>8,i=Math.pow(2,32)-1,n=function(t){this.low=0,this.range=e,this.buffer=0,this.help=0,this.bytecount=0,this.stream=t},o=function(t,n){for(;t.range<=r;){if(t.low<255<<23){for(n.writeByte(t.buffer);t.help;t.help--)n.writeByte(255);t.buffer=t.low>>>23&255}else if(t.low&e){for(n.writeByte(t.buffer+1);t.help;t.help--)n.writeByte(0);t.buffer=t.low>>>23&255}else if(t.help++,t.help>i)throw new Error("Too many bytes outstanding, file too large!");t.range=t.range<<8>>>0,t.low=(t.low<<8&e-1)>>>0,t.bytecount++}};n.prototype.encodeStart=function(t,r){this.low=0,this.range=e,this.buffer=t,this.help=0,this.bytecount=r},n.prototype.encodeFreq=function(e,r,i){o(this,this.stream);var n=this.range/i>>>0,s=t(n,r);this.low+=s,r+e<i?this.range=t(n,e):this.range-=s},n.prototype.encodeShift=function(e,r,i){o(this,this.stream);var n=this.range>>>i,s=t(n,r);this.low+=s,r+e>>>i?this.range-=s:this.range=t(n,e)},n.prototype.encodeBit=function(t){this.encodeShift(1,t?1:0,1)},n.prototype.encodeByte=function(t){this.encodeShift(1,t,8)},n.prototype.encodeShort=function(t){this.encodeShift(1,t,16)},n.prototype.encodeFinish=function(){var t=this.stream;o(this,t),this.bytecount+=5;var e=this.low>>>23;if((this.low&r-1)>=(16777215&this.bytecount)>>>1&&e++,e>255)for(t.writeByte(this.buffer+1);this.help;this.help--)t.writeByte(0);else for(t.writeByte(this.buffer);this.help;this.help--)t.writeByte(255);return t.writeByte(255&e),t.writeByte(this.bytecount>>>16&255),t.writeByte(this.bytecount>>>8&255),t.writeByte(255&this.bytecount),this.bytecount},n.prototype.decodeStart=function(t){var e=t?0:this.stream.readByte();return"number"!=typeof e||e<0||(this.buffer=this.stream.readByte(),this.low=this.buffer>>>1,this.range=128),e};var s=function(t,e){for(;t.range<=r;)t.low=t.low<<8|t.buffer<<7&255,t.buffer=e.readByte(),t.low|=t.buffer>>>1,t.low=t.low>>>0,t.range=t.range<<8>>>0};return n.prototype.decodeCulFreq=function(t){s(this,this.stream),this.help=this.range/t>>>0;var e=this.low/this.help>>>0;return e>=t?t-1:e},n.prototype.decodeCulShift=function(t){s(this,this.stream),this.help=this.range>>>t;var e=this.low/this.help>>>0;return e>>>t?(1<<t)-1:e},n.prototype.decodeUpdate=function(t,e,r){var i=this.help*e;this.low-=i,e+t<r?this.range=this.help*t:this.range-=i},n.prototype.decodeBit=function(){var t=this.decodeCulShift(1);return this.decodeUpdate(1,t,2),t},n.prototype.decodeByte=function(){var t=this.decodeCulShift(8);return this.decodeUpdate(1,t,256),t},n.prototype.decodeShort=function(){var t=this.decodeCulShift(16);return this.decodeUpdate(1,t,65536),t},n.prototype.decodeFinish=function(){s(this,this.stream)},n.prototype.writeBit=n.prototype.encodeBit,n.prototype.readBit=n.prototype.decodeBit,n.prototype.writeByte=n.prototype.encodeByte,n.prototype.readByte=n.prototype.decodeByte,n}(),r=function(){var t=function(){};return t.prototype.readByte=function(){var t=[0];return 0===this.read(t,0,1)?(this._eof=!0,-1):t[0]},t.prototype.read=function(t,e,r){for(var i,n=0;n<r;){if(-1===(i=this.readByte())){this._eof=!0;break}t[e+n++]=i}return n},t.prototype.eof=function(){return!!this._eof},t.prototype.seek=function(t){throw new Error("Stream is not seekable.")},t.prototype.tell=function(){throw new Error("Stream is not seekable.")},t.prototype.writeByte=function(t){var e=[t];this.write(e,0,1)},t.prototype.write=function(t,e,r){var i;for(i=0;i<r;i=i+1|0)this.writeByte(t[e+i]);return r},t.prototype.flush=function(){},t.EOF=-1,t}(),i=function(){var t=function(t){(function(){var e=256;this.readBit=function(){if(0==(255&e)){var i=t.readByte();if(i===r.EOF)return this._eof=!0,i;e=i<<1|1}var n=256&e?1:0;return e<<=1,n},this.readByte=function(){return 0==(255&e)?t.readByte():this.readBits(8)},this.seek=function(r){t.seek(r),e=256}}).call(this),function(){var e=1;this.writeBit=function(r){e<<=1,r&&(e|=1),256&e&&(t.writeByte(255&e),e=1)},this.writeByte=function(r){1===e?t.writeByte(r):t.writeBits(8,r)},this.flush=function(){for(;1!==e;)this.writeBit(0);t.flush&&t.flush()}}.call(this)};return t.EOF=r.EOF,(t.prototype=Object.create(r.prototype)).readBits=function(t){var e,r=0;if(t>31)return(r=65536*this.readBits(t-16))+this.readBits(16);for(e=0;e<t;e=e+1|0)r<<=1,this.readBit()>0&&r++;return r},t.prototype.writeBits=function(t,e){if(t>32){var r=65535&e,i=(e-r)/65536;return this.writeBits(t-16,i),void this.writeBits(16,r)}var n;for(n=t-1;n>=0;n=n-1|0)this.writeBit(e>>>n&1)},t}(),n=function(){var e=Object.create(null),i=r.EOF;e.coerceInputStream=function(t,e){if("readByte"in t){if(e&&!("read"in t)){var n=t;(t=new r).readByte=function(){var t=n.readByte();return t===i&&(this._eof=!0),t},"size"in n&&(t.size=n.size),"seek"in n&&(t.seek=function(t){n.seek(t),this._eof=!1}),"tell"in n&&(t.tell=n.tell.bind(n))}}else{var o=t;(t=new r).size=o.length,t.pos=0,t.readByte=function(){return this.pos>=this.size?i:o[this.pos++]},t.read=function(t,e,r){for(var i=0;i<r&&this.pos<o.length;)t[e++]=o[this.pos++],i++;return i},t.seek=function(t){this.pos=t},t.tell=function(){return this.pos},t.eof=function(){return this.pos>=o.length}}return t};var n=function(t,e){this.buffer=t,this.resizeOk=e,this.pos=0};(n.prototype=Object.create(r.prototype)).writeByte=function(t){if(this.resizeOk&&this.pos>=this.buffer.length){var r=e.makeU8Buffer(2*this.buffer.length);r.set(this.buffer),this.buffer=r}this.buffer[this.pos++]=t},n.prototype.getBuffer=function(){if(this.pos!==this.buffer.length){if(!this.resizeOk)throw new TypeError("outputsize does not match decoded input");var t=e.makeU8Buffer(this.pos);t.set(this.buffer.subarray(0,this.pos)),this.buffer=t}return this.buffer},e.coerceOutputStream=function(t,r){var i={stream:t,retval:t};if(t){if("object"==typeof t&&"writeByte"in t)return i;i.stream=new n("number"==typeof r?e.makeU8Buffer(r):t,!1)}else i.stream=new n(e.makeU8Buffer(16384),!0);return Object.defineProperty(i,"retval",{get:i.stream.getBuffer.bind(i.stream)}),i},e.compressFileHelper=function(t,r,i){return function(n,o,s){n=e.coerceInputStream(n);var h,a,c=e.coerceOutputStream(o,o);for(o=c.stream,h=0;h<t.length;h=h+1|0)o.writeByte(t.charCodeAt(h));if(a="size"in n&&n.size>=0?n.size:-1,i){var u=e.coerceOutputStream([]);for(e.writeUnsignedNumber(u.stream,a+1),u=u.retval,h=0;h<u.length-1;h=h+1|0)o.writeByte(u[h]);i=u[u.length-1]}else e.writeUnsignedNumber(o,a+1);return r(n,o,a,s,i),c.retval}},e.decompressFileHelper=function(t,r){return function(i,n){var o;for(i=e.coerceInputStream(i),o=0;o<t.length;o=o+1|0)if(t.charCodeAt(o)!==i.readByte())throw new Error("Bad magic");var s=e.readUnsignedNumber(i)-1,h=e.coerceOutputStream(n,s);return n=h.stream,r(i,n,s),h.retval}},e.compressWithModel=function(t,e,r){for(var n=0;n!==e;){var o=t.readByte();if(o===i){r.encode(256);break}r.encode(o),n++}},e.decompressWithModel=function(t,e,r){for(var i=0;i!==e;){var n=r.decode();if(256===n)break;t.writeByte(n),i++}},e.writeUnsignedNumber=function(t,e){var r,i=[];do{i.push(127&e),e=Math.floor(e/128)}while(0!==e);for(i[0]|=128,r=i.length-1;r>=0;r=r-1|0)t.writeByte(i[r]);return t},e.readUnsignedNumber=function(t){for(var e,r=0;;){if(128&(e=t.readByte())){r+=127&e;break}r=128*(r+e)}return r};var o=function(t){for(var e=0,r=t.length;e<r;e=e+1|0)t[e]=0;return t},s=function(t){return o(new Array(t))},h=function(t){return t};void 0!==t&&Array.prototype.some.call(new Uint32Array(128),(function(t){return 0!==t}))&&(h=o),e.makeU8Buffer="undefined"!=typeof Uint8Array?function(t){return h(new Uint8Array(t))}:s,e.makeU16Buffer="undefined"!=typeof Uint16Array?function(t){return h(new Uint16Array(t))}:s,e.makeU32Buffer="undefined"!=typeof Uint32Array?function(t){return h(new Uint32Array(t))}:s,e.makeS32Buffer="undefined"!=typeof Int32Array?function(t){return h(new Int32Array(t))}:s,e.arraycopy=function(t,e){for(var r=0,i=e.length;r<i;r=r+1|0)t[r]=e[r];return t};var a=Uint8Array.of(0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8),c=e.fls=function(t){return t>4294967295?32+c(Math.floor(t/4294967296)):0!=(4294901760&t)?0!=(4278190080&t)?24+a[t>>>24&255]:16+a[t>>>16]:0!=(65280&t)?8+a[t>>>8]:a[t]};return e.log2c=function(t){return 0===t?-1:c(t-1)},e}(),o=function(){var t=function(t,e,r,i){var o,s=n.fls(t-1);for(this.extraStates=+e||0,this.lgDistanceModel=r(1+s+e),this.distanceModel=[],o=2;o<=s;o=o+1|0){var h=o-1;this.distanceModel[o]=i(1<<h)}};return t.prototype.encode=function(t){if(t<2)this.lgDistanceModel.encode(t+this.extraStates);else{var e=n.fls(t);this.lgDistanceModel.encode(e+this.extraStates);var r=t&(1<<e-1)-1;this.distanceModel[e].encode(r)}},t.prototype.decode=function(){var t=this.lgDistanceModel.decode()-this.extraStates;return t<2?t:(1<<t-1)+this.distanceModel[t].decode()},t}(),s=function(){var t=function(t,e,r,i){this.up=t,this.down=e,this.symbol=r,this.weight=i};t.prototype.clone=function(){return new t(this.up,this.down,this.symbol,this.weight)},t.prototype.set=function(t){this.up=t.up,this.down=t.down,this.symbol=t.symbol,this.weight=t.weight};var e=function(e,r,i,n){var o;for((!r||r>e)&&(r=e),(r<<=1)&&r--,this.table=[],o=0;o<=r;o=o+1|0)this.table[o]=new t(0,0,0,0);if(this.map=[],this.size=e)for(o=0;o<e;o=o+1|0)this.map[o]=0;this.esc=this.root=r,i&&(this.readBit=i.readBit.bind(i),this.writeBit=i.writeBit.bind(i)),this.max_weight=n};return e.factory=function(t,r){return function(i){return new e(i,i,t,r)}},e.prototype.split=function(t){var e,r;return(e=this.esc)?(this.esc--,(r=this.esc)?(this.table[e].down=r,this.table[e].weight=1,this.table[r].up=e,this.esc--):(e=0,r=1),this.table[r].symbol=t,this.table[r].weight=0,this.table[r].down=0,this.map[t]=r,this.table[this.esc].weight=0,this.table[this.esc].down=0,this.table[this.esc].up=e,r):0},e.prototype.leader=function(t){for(var e,r,i=this.table[t].weight,n=t;i===this.table[n+1].weight;)n++;return n===t?t:(r=this.table[t].symbol,e=this.table[n].symbol,this.table[n].symbol=r,this.table[t].symbol=e,this.map[r]=n,this.map[e]=t,n)},e.prototype.slide=function(t){var e,r=t;if(1&(e=this.table[r++].clone()).weight)for(;e.weight>this.table[r+1].weight;)r++;return this.table[t].set(this.table[r]),this.table[r].set(e),this.table[r].up=this.table[t].up,this.table[t].up=e.up,1&e.weight?(this.table[e.down].up=r,this.table[e.down-1].up=r,this.map[this.table[t].symbol]=t):(this.table[this.table[t].down-1].up=t,this.table[this.table[t].down].up=t,this.map[e.symbol]=r),r},e.prototype.increment=function(t){var e;for(this.table[t].up===t+1?(this.table[t].weight+=2,t++):t=this.leader(t);this.table[t].weight+=2,e=this.table[t].up;){for(;this.table[t].weight>this.table[t+1].weight;)t=this.slide(t);t=1&this.table[t].weight?e:this.table[t].up}this.max_weight&&this.table[this.root].weight>=this.max_weight&&this.scale(1)},e.prototype.scale=function(t){for(var e,r,i=this.esc;++i<=this.root;)for(1&this.table[i].weight?(e=-2&this.table[this.table[i].down].weight)&&(e+=1|this.table[this.table[i].down-1].weight):(e=this.table[i].weight>>t&-2)||(this.map[this.table[i].symbol]=0,this.esc++&&this.esc++),this.table[i].weight=e,r=i;e<this.table[--r].weight;)this.slide(r);this.table[this.esc].down=0},e.prototype.sendid=function(t){for(var e,r=0;t--;)this.map[t]||r++;if(e=this.size-Math.floor((this.root-this.esc)/2)-1)do{this.writeBit(1&r),r>>=1}while(e>>=1)},e.prototype.encode=function(t){var e,r,i,n,o=1;if(t<this.size&&((i=n=this.map[t])||(i=this.esc))){for(;r=this.table[i].up;)o<<=1,o|=1&i,i=r;for(;e=1&o,o>>=1;)this.writeBit(e);n||(this.sendid(t),n=this.split(t)),this.increment(n)}},e.prototype.readid=function(){var t,e,r=0,i=1;if(t=this.size-Math.floor((this.root-this.esc)/2)-1)do{r|=this.readBit()?i:0,i<<=1}while(t>>=1);for(e=0;e<this.size;e++)if(!this.map[e]&&!r--)return e;return 0},e.prototype.decode=function(){for(var t,e,r=this.root;e=this.table[r].down;)r=this.readBit()?e-1:e;if(r===this.esc){if(!this.esc)return 0;t=this.readid(),r=this.split(t)}else t=this.table[r].symbol;return this.increment(r),t},e.MAGIC="huff",e.compressFile=n.compressFileHelper(e.MAGIC,(function(t,r,o,s){var h=new i(r),a=256;o<0&&a++;var c=new e(257,a,h,8191);n.compressWithModel(t,o,c),h.flush()})),e.decompressFile=n.decompressFileHelper(e.MAGIC,(function(t,r,o){var s=new i(t),h=256;o<0&&h++;var a=new e(257,h,s,8191);n.decompressWithModel(r,o,a)})),e}(),h=function(){var t=function(t,e){this.bitstream=t,this.bits=n.fls(e-1)};return t.factory=function(e){return function(r){return new t(e,r)}},t.prototype.encode=function(t){var e;for(e=this.bits-1;e>=0;e=e-1|0){var r=t>>>e&1;this.bitstream.writeBit(r)}},t.prototype.decode=function(){var t,e=0;for(t=this.bits-1;t>=0;t=t-1|0)e<<=1,this.bitstream.readBit()&&e++;return e},t.MAGIC="nomo",t.compressFile=n.compressFileHelper(t.MAGIC,(function(e,r,o,s){var h=new i(r),a=new t(h,o<0?257:256);n.compressWithModel(e,o,a),h.flush()})),t.decompressFile=n.decompressFileHelper(t.MAGIC,(function(e,r,o){var s=new i(e),h=new t(s,o<0?257:256);n.decompressWithModel(r,o,h)})),t}(),a=function(){var t=function(t,e,r,i){var o;for(this.coder=t,this.numSyms=e+1,this.tree=n.makeU32Buffer(2*this.numSyms),this.increment=+i||256,this.max_prob=+r||65280,o=0;o<e;o=o+1|0)this.tree[this.numSyms+o]=1;this.tree[this.numSyms+o]=0|this.increment<<16,this._sumTree()};return t.factory=function(e,r,i){return function(n){return new t(e,n,r,i)}},t.prototype.clone=function(){var e,r=new t(this.coder,this.size,this.max_prob,this.increment);for(e=1;e<this.tree.length;e=e+1|0)r.tree[e]=0|this.tree[e];return r},t.prototype.encode=function(t){var e=this.numSyms+t,r=this.tree[e],i=4294901760,n=16,o=this.increment<<16;0==(4294901760&r)?(this.encode(this.numSyms-1),i=65535,o-=1,n=0):t===this.numSyms-1&&(65535&this.tree[1])>>>0==1&&(o=-this.tree[e]);for(var s=0;e>1;){var h=e>>>1;1&e&&(s+=this.tree[2*h]),this.tree[e]+=o,e=h}var a=this.tree[1];this.tree[1]+=o,r=(r&i)>>>n,s=(s&i)>>>n,a=(a&i)>>>n,this.coder.encodeFreq(r,s,a),(4294901760&this.tree[1])>>>16>=this.max_prob&&this._rescale()},t.prototype._decode=function(t){var e=4294901760,r=16,i=this.increment<<16;t&&(e=65535,i-=1,r=0);for(var n=(this.tree[1]&e)>>>r,o=this.coder.decodeCulFreq(n),s=1,h=0;s<this.numSyms;){this.tree[s]+=i;var a=(this.tree[s<<1]&e)>>>r;s*=2,o-h>=a&&(h+=a,s=s+1|0)}var c=s-this.numSyms,u=(this.tree[s]&e)>>>r;if(this.tree[s]+=i,this.coder.decodeUpdate(u,h,n),c===this.numSyms-1&&(65535&this.tree[1])>>>0==1)for(i=-this.tree[s];s>=1;)this.tree[s]+=i,s>>>=1;return(4294901760&this.tree[1])>>>16>=this.max_prob&&this._rescale(),c},t.prototype.decode=function(){var t=this._decode(!1);return t===this.numSyms-1&&(t=this._decode(!0)),t},t.prototype._rescale=function(){var t,e,r=!0;for(t=0;t<this.numSyms-1;t=t+1|0)0==(65535&(e=this.tree[this.numSyms+t]))?(0==(e=(4294901758&e)>>>1)&&(e=1,r=!1),this.tree[this.numSyms+t]=e):r=!1;e=(4294901758&(e=this.tree[this.numSyms+t]))>>>1,r?e=0:0===e&&(e=65536),this.tree[this.numSyms+t]=e,this._sumTree()},t.prototype._sumTree=function(){var t;for(t=this.numSyms-1;t>0;t=t-1|0)this.tree[t]=this.tree[t<<1]+this.tree[1+(t<<1)]},t.MAGIC="fenw",t.compressFile=n.compressFileHelper(t.MAGIC,(function(r,i,o,s,h){var a=new e(i);a.encodeStart(h,1);var c=new t(a,o<0?257:256);n.compressWithModel(r,o,c),a.encodeFinish()}),!0),t.decompressFile=n.decompressFileHelper(t.MAGIC,(function(r,i,o){var s=new e(r);s.decodeStart(!0);var h=new t(s,o<0?257:256);n.decompressWithModel(i,o,h),s.decodeFinish()})),t}(),c=function(){var t=function(t,e,r){var i;for(this.literalModel=[],i=0;i<e;i=i+1|0)this.literalModel[i]=t(r)};return t.prototype.encode=function(t,e){this.literalModel[e].encode(t)},t.prototype.decode=function(t){return this.literalModel[t].decode()},t.MAGIC="ctx1",t.compressFile=n.compressFileHelper(t.MAGIC,(function(e,r,o,h){var a=new i(r),c=256;o<0&&c++;var u=s.factory(a,8191),f=new t(u,256,c),l=32,p={encode:function(t){f.encode(t,l),l=t}};n.compressWithModel(e,o,p),a.flush()})),t.decompressFile=n.decompressFileHelper(t.MAGIC,(function(e,r,o){var h=new i(e),a=256;o<0&&a++;var c=s.factory(h,8191),u=new t(c,256,a),f=32,l={decode:function(){var t=u.decode(f);return f=t,t}};n.decompressWithModel(r,o,l)})),t}(),u=function(){var t=Object.create(null);return t.MAGIC="lzjR",t.compressFile=n.compressFileHelper(t.MAGIC,(function(t,i,s,u,f){var l,p,d,y,m,w,v,b=1024,g=1;"number"==typeof u&&(b*=2,u=Math.max(1,Math.min(9,u))-1,g=1<<Math.floor(u/2),1&u&&(g=Math.round(1.5*g)),u>=2&&u<=4&&g++);var B=new e(i);B.encodeStart(f,1),w=n.makeU16Buffer(b*g);for(var F=n.makeU8Buffer(1024),M=0,S=function(t){return F[M++]=t,M>=F.length&&(M=0),t},k=[],x=function(){return k.length?k.pop():t.readByte()},U=function(t){k.push(t)},A=[],C=h.factory(B),I=a.factory(B,65280,256),O=new c(I,256,1+(s<0?257:256)),T=function(t){return t<=32?I(t):C(t)},_=new o(64,0,I,T),z=new o(1024,1,I,T),E=32,G=0;;){var H=M,W=x();if(W===r.EOF)break;var j=x();if(j===r.EOF){O.encode(S(W),E);break}var D=x();if(D!==r.EOF){for(y=(W<<16)+(j<<8)+D,y^=y>>9,y+=y>>5,m=((y^=W)&b-1)*g,A.length=0,v=0;v<g;v=v+1|0){d=M-w[m+v]&1023,l=F.length+M-d;var L=F[1023&l],N=F[l+1&1023],q=F[l+2&1023];1==d?(N=W,q=j):2==d&&(q=W),W===L&&j===N&&D===q&&A.push(d)}for(v=g-1;v>0;v--)w[m+v]=w[m+v-1];if(w[m]=M,0===A.length)O.encode(S(W),E),U(D),U(j),E=W;else{O.encode(256,E),S(W),S(j),S(D),E=D;var J=x(),P=A[0],R=F.length+M;for(p=3;p<66&&J!==r.EOF;p++,R++){for(v=0;v<A.length;)J!==F[R-A[v]&1023]?(P=A[v],A.splice(v,1)):v=v+1|0;if(0===A.length)break;S(J),E=J,J=x()}0!==A.length&&(P=A[0]),U(J),_.encode(p-3),(d=H-P&1023)===G?z.encode(-1):(z.encode(d),G=d)}}else O.encode(S(W),E),U(j),E=W}s<0&&O.encode(257,E),B.encodeFinish()}),!0),t.decompressFile=n.decompressFileHelper(t.MAGIC,(function(t,r,i){var s,u,f,l=n.makeU8Buffer(1024),p=0,d=new e(t);d.decodeStart(!0);for(var y=h.factory(d),m=a.factory(d,65280,256),w=new c(m,256,1+(i<0?257:256)),v=function(t){return t<=32?m(t):y(t)},b=new o(64,0,m,v),g=new o(1024,1,m,v),B=32,F=0;0!==i&&257!==(f=w.decode(B));)if(256===f)for(u=b.decode()+3,(s=g.decode())<0?s=F:F=s,i>=0&&(i-=u);--u>=0;)f=B=l[p++]=l[s++],r.writeByte(f),p>=l.length&&(p=0),s>=l.length&&(s=0);else r.writeByte(f),l[p++]=B=f,p>=l.length&&(p=0),i>=0&&i--;d.decodeFinish()})),t}();var l=[(f=function(){var t=Object.create(null);t.MAGIC="lzp3";var u=function(t){this.buffer=n.makeU8Buffer(Math.min(t+4,1048576)),this.pos=0,this.ctxt4=n.makeU32Buffer(65536),this.ctxt3=n.makeU32Buffer(4096),this.ctxt2=n.makeU32Buffer(65536),this.put(99),this.put(83),this.put(97),this.put(32)};return u.prototype.put=function(t){return this.buffer[this.pos++]=t,this.pos>=1048576&&(this.pos=0),t},u.prototype.get=function(t){return this.buffer[1048575&t]},u.prototype.context=function(t,e){var r,i=0;for(t=t-e&1048575,r=0;r<e;r=r+1|0)i=i<<8|this.buffer[t++],t>=1048576&&(t=0);return i},u.prototype.getIndex=function(t,e){var r=this.context(t,4),i=65535&(r>>>15^r),n=4095&(r>>>11^r),o=65535&r,s=0;return 0===e&&(0!==(s=this.ctxt4[i])&&r!==this.context(s-1,4)&&(s=0),0===s&&(0!==(s=this.ctxt3[n])&&(16777215&r)!==this.context(s-1,3)&&(s=0),0===s&&0!==(s=this.ctxt2[o])&&(r&&65535)!==this.context(s-1,2)&&(s=0))),e&&e--,this.ctxt4[i]=this.ctxt3[n]=this.ctxt2[o]=1+(t|e<<20),s},t.compressFile=n.compressFileHelper(t.MAGIC,(function(t,i,n,s){var f,l,p,d=new u(n>=0?n:1048576),y=new e(i);y.encodeStart(0,0),f=a.factory(y,65280,256);var m=h.factory(y);l=function(t){return t>256?m(t):f(t)},p=function(){y.encodeFinish()};var w,v=new c(f,256,n<0?257:256),b=[];for(w=0;w<16;w=w+1|0)b[w]=new o(1048576,1,f,l);for(var g,B=0,F=0;B!==n;){var M=t.readByte();g=d.pos;var S=d.getIndex(g,0);if(0!==S){for(var k=1+(--S>>>20),x=0;d.get(S+x)===M&&x<1048575;)x++,d.put(M),M=t.readByte();k===x?b[15&F].encode(-1):b[15&F].encode(x),d.getIndex(g,x),B+=x,F<<=1,x>0&&(F|=1)}var U=d.get(d.pos-1);if(M===r.EOF){n<0&&v.encode(256,U);break}v.encode(M,U),d.put(M),B++}p&&p()})),t.decompressFile=n.decompressFileHelper(t.MAGIC,(function(t,r,n){var f,l,p,d=!!(128&t.readByte()),y=new u(n>=0?n:1048576);if(d){var m=new i(t);f=s.factory(m,65535),l=h.factory(m)}else{var w=new e(t);w.decodeStart(!0),f=a.factory(w,65280,256);var v=h.factory(w);l=function(t){return t>256?v(t):f(t)},p=function(){w.decodeFinish()}}var b,g=new c(f,256,n<0?257:256),B=[];for(b=0;b<16;b=b+1|0)B[b]=new o(1048576,1,f,l);for(var F,M,S=0,k=0;S!==n;){F=y.pos;var x=y.getIndex(F,0);if(0!==x){var U=1+(--x>>>20),A=B[15&k].decode();for(A<0&&(A=U),b=0;b<A;b=b+1|0)M=y.get(x+b),r.writeByte(y.put(M));y.getIndex(F,A),S+=A,k<<=1,A>0&&(k|=1)}if(S===n)break;var C=y.get(y.pos-1);if(256===(M=g.decode(C)))break;r.writeByte(y.put(M)),S++}p&&p()})),t}()).compressFile,u.compressFile],p=[f.decompressFile,u.decompressFile];y.exports={UraniumJSEnrichFunctionCalls:l,UraniumJSDepleteFunctionCalls:p}}).call(this)}).call(this,t),y=y.exports}();