-
Notifications
You must be signed in to change notification settings - Fork 31
/
xxhash.min.js
2 lines (2 loc) · 40.6 KB
/
xxhash.min.js
1
2
var XXH=function(t){function r(e){if(i[e])return i[e].exports;var h=i[e]={exports:{},id:e,loaded:!1};return t[e].call(h.exports,h,h.exports,r),h.loaded=!0,h.exports}var i={};return r.m=t,r.c=i,r.p="",r(0)}([function(t,r,i){t.exports={h32:i(1),h64:i(9)}},function(t,r,i){(function(r){function e(t){for(var r=[],i=0,e=t.length;e>i;i++){var h=t.charCodeAt(i);128>h?r.push(h):2048>h?r.push(192|h>>6,128|63&h):55296>h||h>=57344?r.push(224|h>>12,128|h>>6&63,128|63&h):(i++,h=65536+((1023&h)<<10|1023&t.charCodeAt(i)),r.push(240|h>>18,128|h>>12&63,128|h>>6&63,128|63&h))}return new Uint8Array(r)}function h(){return 2==arguments.length?new h(arguments[1]).update(arguments[0]).digest():this instanceof h?void o.call(this,arguments[0]):new h(arguments[0])}function o(t){return this.seed=t instanceof n?t.clone():n(t),this.v1=this.seed.clone().add(s).add(a),this.v2=this.seed.clone().add(a),this.v3=this.seed.clone(),this.v4=this.seed.clone().subtract(s),this.total_len=0,this.memsize=0,this.memory=null,this}var n=i(6).UINT32;n.prototype.xxh_update=function(t,r){var i,e,h=a._low,o=a._high;e=t*h,i=e>>>16,i+=r*h,i&=65535,i+=t*o;var n=this._low+(65535&e),u=n>>>16;u+=this._high+(65535&i);var f=u<<16|65535&n;f=f<<13|f>>>19,n=65535&f,u=f>>>16,h=s._low,o=s._high,e=n*h,i=e>>>16,i+=u*h,i&=65535,i+=n*o,this._low=65535&e,this._high=65535&i};var s=n("2654435761"),a=n("2246822519"),u=n("3266489917"),f=n("668265263"),l=n("374761393");h.prototype.init=o,h.prototype.update=function(t){var i,h="string"==typeof t;h&&(t=e(t),h=!1,i=!0),"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer&&(i=!0,t=new Uint8Array(t));var o=0,n=t.length,s=o+n;if(0==n)return this;if(this.total_len+=n,0==this.memsize&&(this.memory=h?"":i?new Uint8Array(16):new r(16)),this.memsize+n<16)return h?this.memory+=t:i?this.memory.set(t.subarray(0,n),this.memsize):t.copy(this.memory,this.memsize,0,n),this.memsize+=n,this;if(this.memsize>0){h?this.memory+=t.slice(0,16-this.memsize):i?this.memory.set(t.subarray(0,16-this.memsize),this.memsize):t.copy(this.memory,this.memsize,0,16-this.memsize);var a=0;h?(this.v1.xxh_update(this.memory.charCodeAt(a+1)<<8|this.memory.charCodeAt(a),this.memory.charCodeAt(a+3)<<8|this.memory.charCodeAt(a+2)),a+=4,this.v2.xxh_update(this.memory.charCodeAt(a+1)<<8|this.memory.charCodeAt(a),this.memory.charCodeAt(a+3)<<8|this.memory.charCodeAt(a+2)),a+=4,this.v3.xxh_update(this.memory.charCodeAt(a+1)<<8|this.memory.charCodeAt(a),this.memory.charCodeAt(a+3)<<8|this.memory.charCodeAt(a+2)),a+=4,this.v4.xxh_update(this.memory.charCodeAt(a+1)<<8|this.memory.charCodeAt(a),this.memory.charCodeAt(a+3)<<8|this.memory.charCodeAt(a+2))):(this.v1.xxh_update(this.memory[a+1]<<8|this.memory[a],this.memory[a+3]<<8|this.memory[a+2]),a+=4,this.v2.xxh_update(this.memory[a+1]<<8|this.memory[a],this.memory[a+3]<<8|this.memory[a+2]),a+=4,this.v3.xxh_update(this.memory[a+1]<<8|this.memory[a],this.memory[a+3]<<8|this.memory[a+2]),a+=4,this.v4.xxh_update(this.memory[a+1]<<8|this.memory[a],this.memory[a+3]<<8|this.memory[a+2])),o+=16-this.memsize,this.memsize=0,h&&(this.memory="")}if(s-16>=o){var u=s-16;do h?(this.v1.xxh_update(t.charCodeAt(o+1)<<8|t.charCodeAt(o),t.charCodeAt(o+3)<<8|t.charCodeAt(o+2)),o+=4,this.v2.xxh_update(t.charCodeAt(o+1)<<8|t.charCodeAt(o),t.charCodeAt(o+3)<<8|t.charCodeAt(o+2)),o+=4,this.v3.xxh_update(t.charCodeAt(o+1)<<8|t.charCodeAt(o),t.charCodeAt(o+3)<<8|t.charCodeAt(o+2)),o+=4,this.v4.xxh_update(t.charCodeAt(o+1)<<8|t.charCodeAt(o),t.charCodeAt(o+3)<<8|t.charCodeAt(o+2))):(this.v1.xxh_update(t[o+1]<<8|t[o],t[o+3]<<8|t[o+2]),o+=4,this.v2.xxh_update(t[o+1]<<8|t[o],t[o+3]<<8|t[o+2]),o+=4,this.v3.xxh_update(t[o+1]<<8|t[o],t[o+3]<<8|t[o+2]),o+=4,this.v4.xxh_update(t[o+1]<<8|t[o],t[o+3]<<8|t[o+2])),o+=4;while(u>=o)}return s>o&&(h?this.memory+=t.slice(o):i?this.memory.set(t.subarray(o,s),this.memsize):t.copy(this.memory,this.memsize,o,s),this.memsize=s-o),this},h.prototype.digest=function(){var t,r,i=this.memory,e="string"==typeof i,h=0,o=this.memsize,c=new n;for(t=this.total_len>=16?this.v1.rotl(1).add(this.v2.rotl(7).add(this.v3.rotl(12).add(this.v4.rotl(18)))):this.seed.clone().add(l),t.add(c.fromNumber(this.total_len));o-4>=h;)e?c.fromBits(i.charCodeAt(h+1)<<8|i.charCodeAt(h),i.charCodeAt(h+3)<<8|i.charCodeAt(h+2)):c.fromBits(i[h+1]<<8|i[h],i[h+3]<<8|i[h+2]),t.add(c.multiply(u)).rotl(17).multiply(f),h+=4;for(;o>h;)c.fromBits(e?i.charCodeAt(h++):i[h++],0),t.add(c.multiply(l)).rotl(11).multiply(s);return r=t.clone().shiftRight(15),t.xor(r).multiply(a),r=t.clone().shiftRight(13),t.xor(r).multiply(u),r=t.clone().shiftRight(16),t.xor(r),this.init(this.seed),t},t.exports=h}).call(r,i(2).Buffer)},function(t,r,i){(function(t,e){"use strict";function h(){function t(){}try{var r=new Uint8Array(1);return r.foo=function(){return 42},r.constructor=t,42===r.foo()&&r.constructor===t&&"function"==typeof r.subarray&&0===r.subarray(1,1).byteLength}catch(i){return!1}}function o(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function t(r){return this instanceof t?(t.TYPED_ARRAY_SUPPORT||(this.length=0,this.parent=void 0),"number"==typeof r?n(this,r):"string"==typeof r?s(this,r,arguments.length>1?arguments[1]:"utf8"):a(this,r)):arguments.length>1?new t(r,arguments[1]):new t(r)}function n(r,i){if(r=d(r,0>i?0:0|_(i)),!t.TYPED_ARRAY_SUPPORT)for(var e=0;i>e;e++)r[e]=0;return r}function s(t,r,i){("string"!=typeof i||""===i)&&(i="utf8");var e=0|g(r,i);return t=d(t,e),t.write(r,i),t}function a(r,i){if(t.isBuffer(i))return u(r,i);if(Q(i))return f(r,i);if(null==i)throw new TypeError("must start with number, buffer, array or string");if("undefined"!=typeof ArrayBuffer){if(i.buffer instanceof ArrayBuffer)return l(r,i);if(i instanceof ArrayBuffer)return c(r,i)}return i.length?m(r,i):p(r,i)}function u(t,r){var i=0|_(r.length);return t=d(t,i),r.copy(t,0,0,i),t}function f(t,r){var i=0|_(r.length);t=d(t,i);for(var e=0;i>e;e+=1)t[e]=255&r[e];return t}function l(t,r){var i=0|_(r.length);t=d(t,i);for(var e=0;i>e;e+=1)t[e]=255&r[e];return t}function c(r,i){return t.TYPED_ARRAY_SUPPORT?(i.byteLength,r=t._augment(new Uint8Array(i))):r=l(r,new Uint8Array(i)),r}function m(t,r){var i=0|_(r.length);t=d(t,i);for(var e=0;i>e;e+=1)t[e]=255&r[e];return t}function p(t,r){var i,e=0;"Buffer"===r.type&&Q(r.data)&&(i=r.data,e=0|_(i.length)),t=d(t,e);for(var h=0;e>h;h+=1)t[h]=255&i[h];return t}function d(r,i){t.TYPED_ARRAY_SUPPORT?(r=t._augment(new Uint8Array(i)),r.__proto__=t.prototype):(r.length=i,r._isBuffer=!0);var e=0!==i&&i<=t.poolSize>>>1;return e&&(r.parent=V),r}function _(t){if(t>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function y(r,i){if(!(this instanceof y))return new y(r,i);var e=new t(r,i);return delete e.parent,e}function g(t,r){"string"!=typeof t&&(t=""+t);var i=t.length;if(0===i)return 0;for(var e=!1;;)switch(r){case"ascii":case"binary":case"raw":case"raws":return i;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return H(t).length;default:if(e)return j(t).length;r=(""+r).toLowerCase(),e=!0}}function w(t,r,i){var e=!1;if(r=0|r,i=void 0===i||i===1/0?this.length:0|i,t||(t="utf8"),0>r&&(r=0),i>this.length&&(i=this.length),r>=i)return"";for(;;)switch(t){case"hex":return T(this,r,i);case"utf8":case"utf-8":return R(this,r,i);case"ascii":return x(this,r,i);case"binary":return P(this,r,i);case"base64":return b(this,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,r,i);default:if(e)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),e=!0}}function A(t,r,i,e){i=Number(i)||0;var h=t.length-i;e?(e=Number(e),e>h&&(e=h)):e=h;var o=r.length;if(o%2!==0)throw new Error("Invalid hex string");e>o/2&&(e=o/2);for(var n=0;e>n;n++){var s=parseInt(r.substr(2*n,2),16);if(isNaN(s))throw new Error("Invalid hex string");t[i+n]=s}return n}function v(t,r,i,e){return Z(j(r,t.length-i),t,i,e)}function E(t,r,i,e){return Z(X(r),t,i,e)}function C(t,r,i,e){return E(t,r,i,e)}function B(t,r,i,e){return Z(H(r),t,i,e)}function I(t,r,i,e){return Z(J(r,t.length-i),t,i,e)}function b(t,r,i){return G.fromByteArray(0===r&&i===t.length?t:t.slice(r,i))}function R(t,r,i){i=Math.min(t.length,i);for(var e=[],h=r;i>h;){var o=t[h],n=null,s=o>239?4:o>223?3:o>191?2:1;if(i>=h+s){var a,u,f,l;switch(s){case 1:128>o&&(n=o);break;case 2:a=t[h+1],128===(192&a)&&(l=(31&o)<<6|63&a,l>127&&(n=l));break;case 3:a=t[h+1],u=t[h+2],128===(192&a)&&128===(192&u)&&(l=(15&o)<<12|(63&a)<<6|63&u,l>2047&&(55296>l||l>57343)&&(n=l));break;case 4:a=t[h+1],u=t[h+2],f=t[h+3],128===(192&a)&&128===(192&u)&&128===(192&f)&&(l=(15&o)<<18|(63&a)<<12|(63&u)<<6|63&f,l>65535&&1114112>l&&(n=l))}}null===n?(n=65533,s=1):n>65535&&(n-=65536,e.push(n>>>10&1023|55296),n=56320|1023&n),e.push(n),h+=s}return U(e)}function U(t){var r=t.length;if(W>=r)return String.fromCharCode.apply(String,t);for(var i="",e=0;r>e;)i+=String.fromCharCode.apply(String,t.slice(e,e+=W));return i}function x(t,r,i){var e="";i=Math.min(t.length,i);for(var h=r;i>h;h++)e+=String.fromCharCode(127&t[h]);return e}function P(t,r,i){var e="";i=Math.min(t.length,i);for(var h=r;i>h;h++)e+=String.fromCharCode(t[h]);return e}function T(t,r,i){var e=t.length;(!r||0>r)&&(r=0),(!i||0>i||i>e)&&(i=e);for(var h="",o=r;i>o;o++)h+=q(t[o]);return h}function S(t,r,i){for(var e=t.slice(r,i),h="",o=0;o<e.length;o+=2)h+=String.fromCharCode(e[o]+256*e[o+1]);return h}function L(t,r,i){if(t%1!==0||0>t)throw new RangeError("offset is not uint");if(t+r>i)throw new RangeError("Trying to access beyond buffer length")}function Y(r,i,e,h,o,n){if(!t.isBuffer(r))throw new TypeError("buffer must be a Buffer instance");if(i>o||n>i)throw new RangeError("value is out of bounds");if(e+h>r.length)throw new RangeError("index out of range")}function z(t,r,i,e){0>r&&(r=65535+r+1);for(var h=0,o=Math.min(t.length-i,2);o>h;h++)t[i+h]=(r&255<<8*(e?h:1-h))>>>8*(e?h:1-h)}function M(t,r,i,e){0>r&&(r=4294967295+r+1);for(var h=0,o=Math.min(t.length-i,4);o>h;h++)t[i+h]=r>>>8*(e?h:3-h)&255}function D(t,r,i,e,h,o){if(r>h||o>r)throw new RangeError("value is out of bounds");if(i+e>t.length)throw new RangeError("index out of range");if(0>i)throw new RangeError("index out of range")}function O(t,r,i,e,h){return h||D(t,r,i,4,3.4028234663852886e38,-3.4028234663852886e38),K.write(t,r,i,e,23,4),i+4}function N(t,r,i,e,h){return h||D(t,r,i,8,1.7976931348623157e308,-1.7976931348623157e308),K.write(t,r,i,e,52,8),i+8}function F(t){if(t=k(t).replace(tt,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function k(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function q(t){return 16>t?"0"+t.toString(16):t.toString(16)}function j(t,r){r=r||1/0;for(var i,e=t.length,h=null,o=[],n=0;e>n;n++){if(i=t.charCodeAt(n),i>55295&&57344>i){if(!h){if(i>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(n+1===e){(r-=3)>-1&&o.push(239,191,189);continue}h=i;continue}if(56320>i){(r-=3)>-1&&o.push(239,191,189),h=i;continue}i=(h-55296<<10|i-56320)+65536}else h&&(r-=3)>-1&&o.push(239,191,189);if(h=null,128>i){if((r-=1)<0)break;o.push(i)}else if(2048>i){if((r-=2)<0)break;o.push(i>>6|192,63&i|128)}else if(65536>i){if((r-=3)<0)break;o.push(i>>12|224,i>>6&63|128,63&i|128)}else{if(!(1114112>i))throw new Error("Invalid code point");if((r-=4)<0)break;o.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}}return o}function X(t){for(var r=[],i=0;i<t.length;i++)r.push(255&t.charCodeAt(i));return r}function J(t,r){for(var i,e,h,o=[],n=0;n<t.length&&!((r-=2)<0);n++)i=t.charCodeAt(n),e=i>>8,h=i%256,o.push(h),o.push(e);return o}function H(t){return G.toByteArray(F(t))}function Z(t,r,i,e){for(var h=0;e>h&&!(h+i>=r.length||h>=t.length);h++)r[h+i]=t[h];return h}var G=i(3),K=i(4),Q=i(5);r.Buffer=t,r.SlowBuffer=y,r.INSPECT_MAX_BYTES=50,t.poolSize=8192;var V={};t.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:h(),t.TYPED_ARRAY_SUPPORT?(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array):(t.prototype.length=void 0,t.prototype.parent=void 0),t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(r,i){if(!t.isBuffer(r)||!t.isBuffer(i))throw new TypeError("Arguments must be Buffers");if(r===i)return 0;for(var e=r.length,h=i.length,o=0,n=Math.min(e,h);n>o&&r[o]===i[o];)++o;return o!==n&&(e=r[o],h=i[o]),h>e?-1:e>h?1:0},t.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(r,i){if(!Q(r))throw new TypeError("list argument must be an Array of Buffers.");if(0===r.length)return new t(0);var e;if(void 0===i)for(i=0,e=0;e<r.length;e++)i+=r[e].length;var h=new t(i),o=0;for(e=0;e<r.length;e++){var n=r[e];n.copy(h,o),o+=n.length}return h},t.byteLength=g,t.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?R(this,0,t):w.apply(this,arguments)},t.prototype.equals=function(r){if(!t.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?!0:0===t.compare(this,r)},t.prototype.inspect=function(){var t="",i=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(t+=" ... ")),"<Buffer "+t+">"},t.prototype.compare=function(r){if(!t.isBuffer(r))throw new TypeError("Argument must be a Buffer");return this===r?0:t.compare(this,r)},t.prototype.indexOf=function(r,i){function e(t,r,i){for(var e=-1,h=0;i+h<t.length;h++)if(t[i+h]===r[-1===e?0:h-e]){if(-1===e&&(e=h),h-e+1===r.length)return i+e}else e=-1;return-1}if(i>2147483647?i=2147483647:-2147483648>i&&(i=-2147483648),i>>=0,0===this.length)return-1;if(i>=this.length)return-1;if(0>i&&(i=Math.max(this.length+i,0)),"string"==typeof r)return 0===r.length?-1:String.prototype.indexOf.call(this,r,i);if(t.isBuffer(r))return e(this,r,i);if("number"==typeof r)return t.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,r,i):e(this,[r],i);throw new TypeError("val must be string, number or Buffer")},t.prototype.get=function(t){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(t)},t.prototype.set=function(t,r){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(t,r)},t.prototype.write=function(t,r,i,e){if(void 0===r)e="utf8",i=this.length,r=0;else if(void 0===i&&"string"==typeof r)e=r,i=this.length,r=0;else if(isFinite(r))r=0|r,isFinite(i)?(i=0|i,void 0===e&&(e="utf8")):(e=i,i=void 0);else{var h=e;e=r,r=0|i,i=h}var o=this.length-r;if((void 0===i||i>o)&&(i=o),t.length>0&&(0>i||0>r)||r>this.length)throw new RangeError("attempt to write outside buffer bounds");e||(e="utf8");for(var n=!1;;)switch(e){case"hex":return A(this,t,r,i);case"utf8":case"utf-8":return v(this,t,r,i);case"ascii":return E(this,t,r,i);case"binary":return C(this,t,r,i);case"base64":return B(this,t,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r,i);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),n=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var W=4096;t.prototype.slice=function(r,i){var e=this.length;r=~~r,i=void 0===i?e:~~i,0>r?(r+=e,0>r&&(r=0)):r>e&&(r=e),0>i?(i+=e,0>i&&(i=0)):i>e&&(i=e),r>i&&(i=r);var h;if(t.TYPED_ARRAY_SUPPORT)h=t._augment(this.subarray(r,i));else{var o=i-r;h=new t(o,void 0);for(var n=0;o>n;n++)h[n]=this[n+r]}return h.length&&(h.parent=this.parent||this),h},t.prototype.readUIntLE=function(t,r,i){t=0|t,r=0|r,i||L(t,r,this.length);for(var e=this[t],h=1,o=0;++o<r&&(h*=256);)e+=this[t+o]*h;return e},t.prototype.readUIntBE=function(t,r,i){t=0|t,r=0|r,i||L(t,r,this.length);for(var e=this[t+--r],h=1;r>0&&(h*=256);)e+=this[t+--r]*h;return e},t.prototype.readUInt8=function(t,r){return r||L(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,r){return r||L(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,r){return r||L(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,r){return r||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,r){return r||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,r,i){t=0|t,r=0|r,i||L(t,r,this.length);for(var e=this[t],h=1,o=0;++o<r&&(h*=256);)e+=this[t+o]*h;return h*=128,e>=h&&(e-=Math.pow(2,8*r)),e},t.prototype.readIntBE=function(t,r,i){t=0|t,r=0|r,i||L(t,r,this.length);for(var e=r,h=1,o=this[t+--e];e>0&&(h*=256);)o+=this[t+--e]*h;return h*=128,o>=h&&(o-=Math.pow(2,8*r)),o},t.prototype.readInt8=function(t,r){return r||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},t.prototype.readInt16LE=function(t,r){r||L(t,2,this.length);var i=this[t]|this[t+1]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt16BE=function(t,r){r||L(t,2,this.length);var i=this[t+1]|this[t]<<8;return 32768&i?4294901760|i:i},t.prototype.readInt32LE=function(t,r){return r||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,r){return r||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,r){return r||L(t,4,this.length),K.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,r){return r||L(t,4,this.length),K.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,r){return r||L(t,8,this.length),K.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,r){return r||L(t,8,this.length),K.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,r,i,e){t=+t,r=0|r,i=0|i,e||Y(this,t,r,i,Math.pow(2,8*i),0);var h=1,o=0;for(this[r]=255&t;++o<i&&(h*=256);)this[r+o]=t/h&255;return r+i},t.prototype.writeUIntBE=function(t,r,i,e){t=+t,r=0|r,i=0|i,e||Y(this,t,r,i,Math.pow(2,8*i),0);var h=i-1,o=1;for(this[r+h]=255&t;--h>=0&&(o*=256);)this[r+h]=t/o&255;return r+i},t.prototype.writeUInt8=function(r,i,e){return r=+r,i=0|i,e||Y(this,r,i,1,255,0),t.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),this[i]=255&r,i+1},t.prototype.writeUInt16LE=function(r,i,e){return r=+r,i=0|i,e||Y(this,r,i,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[i]=255&r,this[i+1]=r>>>8):z(this,r,i,!0),i+2},t.prototype.writeUInt16BE=function(r,i,e){return r=+r,i=0|i,e||Y(this,r,i,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>8,this[i+1]=255&r):z(this,r,i,!1),i+2},t.prototype.writeUInt32LE=function(r,i,e){return r=+r,i=0|i,e||Y(this,r,i,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[i+3]=r>>>24,this[i+2]=r>>>16,this[i+1]=r>>>8,this[i]=255&r):M(this,r,i,!0),i+4},t.prototype.writeUInt32BE=function(r,i,e){return r=+r,i=0|i,e||Y(this,r,i,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=255&r):M(this,r,i,!1),i+4},t.prototype.writeIntLE=function(t,r,i,e){if(t=+t,r=0|r,!e){var h=Math.pow(2,8*i-1);Y(this,t,r,i,h-1,-h)}var o=0,n=1,s=0>t?1:0;for(this[r]=255&t;++o<i&&(n*=256);)this[r+o]=(t/n>>0)-s&255;return r+i},t.prototype.writeIntBE=function(t,r,i,e){if(t=+t,r=0|r,!e){var h=Math.pow(2,8*i-1);Y(this,t,r,i,h-1,-h)}var o=i-1,n=1,s=0>t?1:0;for(this[r+o]=255&t;--o>=0&&(n*=256);)this[r+o]=(t/n>>0)-s&255;return r+i},t.prototype.writeInt8=function(r,i,e){return r=+r,i=0|i,e||Y(this,r,i,1,127,-128),t.TYPED_ARRAY_SUPPORT||(r=Math.floor(r)),0>r&&(r=255+r+1),this[i]=255&r,i+1},t.prototype.writeInt16LE=function(r,i,e){return r=+r,i=0|i,e||Y(this,r,i,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[i]=255&r,this[i+1]=r>>>8):z(this,r,i,!0),i+2},t.prototype.writeInt16BE=function(r,i,e){return r=+r,i=0|i,e||Y(this,r,i,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>8,this[i+1]=255&r):z(this,r,i,!1),i+2},t.prototype.writeInt32LE=function(r,i,e){return r=+r,i=0|i,e||Y(this,r,i,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[i]=255&r,this[i+1]=r>>>8,this[i+2]=r>>>16,this[i+3]=r>>>24):M(this,r,i,!0),i+4},t.prototype.writeInt32BE=function(r,i,e){return r=+r,i=0|i,e||Y(this,r,i,4,2147483647,-2147483648),0>r&&(r=4294967295+r+1),t.TYPED_ARRAY_SUPPORT?(this[i]=r>>>24,this[i+1]=r>>>16,this[i+2]=r>>>8,this[i+3]=255&r):M(this,r,i,!1),i+4},t.prototype.writeFloatLE=function(t,r,i){return O(this,t,r,!0,i)},t.prototype.writeFloatBE=function(t,r,i){return O(this,t,r,!1,i)},t.prototype.writeDoubleLE=function(t,r,i){return N(this,t,r,!0,i)},t.prototype.writeDoubleBE=function(t,r,i){return N(this,t,r,!1,i)},t.prototype.copy=function(r,i,e,h){if(e||(e=0),h||0===h||(h=this.length),i>=r.length&&(i=r.length),i||(i=0),h>0&&e>h&&(h=e),h===e)return 0;if(0===r.length||0===this.length)return 0;if(0>i)throw new RangeError("targetStart out of bounds");if(0>e||e>=this.length)throw new RangeError("sourceStart out of bounds");if(0>h)throw new RangeError("sourceEnd out of bounds");h>this.length&&(h=this.length),r.length-i<h-e&&(h=r.length-i+e);var o,n=h-e;if(this===r&&i>e&&h>i)for(o=n-1;o>=0;o--)r[o+i]=this[o+e];else if(1e3>n||!t.TYPED_ARRAY_SUPPORT)for(o=0;n>o;o++)r[o+i]=this[o+e];else r._set(this.subarray(e,e+n),i);return n},t.prototype.fill=function(t,r,i){if(t||(t=0),r||(r=0),i||(i=this.length),r>i)throw new RangeError("end < start");if(i!==r&&0!==this.length){if(0>r||r>=this.length)throw new RangeError("start out of bounds");if(0>i||i>this.length)throw new RangeError("end out of bounds");var e;if("number"==typeof t)for(e=r;i>e;e++)this[e]=t;else{var h=j(t.toString()),o=h.length;for(e=r;i>e;e++)this[e]=h[e%o]}return this}},t.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(t.TYPED_ARRAY_SUPPORT)return new t(this).buffer;for(var r=new Uint8Array(this.length),i=0,e=r.length;e>i;i+=1)r[i]=this[i];return r.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var $=t.prototype;t._augment=function(r){return r.constructor=t,r._isBuffer=!0,r._set=r.set,r.get=$.get,r.set=$.set,r.write=$.write,r.toString=$.toString,r.toLocaleString=$.toString,r.toJSON=$.toJSON,r.equals=$.equals,r.compare=$.compare,r.indexOf=$.indexOf,r.copy=$.copy,r.slice=$.slice,r.readUIntLE=$.readUIntLE,r.readUIntBE=$.readUIntBE,r.readUInt8=$.readUInt8,r.readUInt16LE=$.readUInt16LE,r.readUInt16BE=$.readUInt16BE,r.readUInt32LE=$.readUInt32LE,r.readUInt32BE=$.readUInt32BE,r.readIntLE=$.readIntLE,r.readIntBE=$.readIntBE,r.readInt8=$.readInt8,r.readInt16LE=$.readInt16LE,r.readInt16BE=$.readInt16BE,r.readInt32LE=$.readInt32LE,r.readInt32BE=$.readInt32BE,r.readFloatLE=$.readFloatLE,r.readFloatBE=$.readFloatBE,r.readDoubleLE=$.readDoubleLE,r.readDoubleBE=$.readDoubleBE,r.writeUInt8=$.writeUInt8,r.writeUIntLE=$.writeUIntLE,r.writeUIntBE=$.writeUIntBE,r.writeUInt16LE=$.writeUInt16LE,r.writeUInt16BE=$.writeUInt16BE,r.writeUInt32LE=$.writeUInt32LE,r.writeUInt32BE=$.writeUInt32BE,r.writeIntLE=$.writeIntLE,r.writeIntBE=$.writeIntBE,r.writeInt8=$.writeInt8,r.writeInt16LE=$.writeInt16LE,r.writeInt16BE=$.writeInt16BE,r.writeInt32LE=$.writeInt32LE,r.writeInt32BE=$.writeInt32BE,r.writeFloatLE=$.writeFloatLE,r.writeFloatBE=$.writeFloatBE,r.writeDoubleLE=$.writeDoubleLE,r.writeDoubleBE=$.writeDoubleBE,r.fill=$.fill,r.inspect=$.inspect,r.toArrayBuffer=$.toArrayBuffer,r};var tt=/[^+\/0-9A-Za-z-_]/g}).call(r,i(2).Buffer,function(){return this}())},function(t,r){var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(t){"use strict";function r(t){var r=t.charCodeAt(0);return r===n||r===l?62:r===s||r===c?63:a>r?-1:a+10>r?r-a+26+26:f+26>r?r-f:u+26>r?r-u+26:void 0}function e(t){function i(t){u[l++]=t}var e,h,n,s,a,u;if(t.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var f=t.length;a="="===t.charAt(f-2)?2:"="===t.charAt(f-1)?1:0,u=new o(3*t.length/4-a),n=a>0?t.length-4:t.length;var l=0;for(e=0,h=0;n>e;e+=4,h+=3)s=r(t.charAt(e))<<18|r(t.charAt(e+1))<<12|r(t.charAt(e+2))<<6|r(t.charAt(e+3)),i((16711680&s)>>16),i((65280&s)>>8),i(255&s);return 2===a?(s=r(t.charAt(e))<<2|r(t.charAt(e+1))>>4,i(255&s)):1===a&&(s=r(t.charAt(e))<<10|r(t.charAt(e+1))<<4|r(t.charAt(e+2))>>2,i(s>>8&255),i(255&s)),u}function h(t){function r(t){return i.charAt(t)}function e(t){return r(t>>18&63)+r(t>>12&63)+r(t>>6&63)+r(63&t)}var h,o,n,s=t.length%3,a="";for(h=0,n=t.length-s;n>h;h+=3)o=(t[h]<<16)+(t[h+1]<<8)+t[h+2],a+=e(o);switch(s){case 1:o=t[t.length-1],a+=r(o>>2),a+=r(o<<4&63),a+="==";break;case 2:o=(t[t.length-2]<<8)+t[t.length-1],a+=r(o>>10),a+=r(o>>4&63),a+=r(o<<2&63),a+="="}return a}var o="undefined"!=typeof Uint8Array?Uint8Array:Array,n="+".charCodeAt(0),s="/".charCodeAt(0),a="0".charCodeAt(0),u="a".charCodeAt(0),f="A".charCodeAt(0),l="-".charCodeAt(0),c="_".charCodeAt(0);t.toByteArray=e,t.fromByteArray=h}(r)},function(t,r){r.read=function(t,r,i,e,h){var o,n,s=8*h-e-1,a=(1<<s)-1,u=a>>1,f=-7,l=i?h-1:0,c=i?-1:1,m=t[r+l];for(l+=c,o=m&(1<<-f)-1,m>>=-f,f+=s;f>0;o=256*o+t[r+l],l+=c,f-=8);for(n=o&(1<<-f)-1,o>>=-f,f+=e;f>0;n=256*n+t[r+l],l+=c,f-=8);if(0===o)o=1-u;else{if(o===a)return n?0/0:(m?-1:1)*(1/0);n+=Math.pow(2,e),o-=u}return(m?-1:1)*n*Math.pow(2,o-e)},r.write=function(t,r,i,e,h,o){var n,s,a,u=8*o-h-1,f=(1<<u)-1,l=f>>1,c=23===h?Math.pow(2,-24)-Math.pow(2,-77):0,m=e?0:o-1,p=e?1:-1,d=0>r||0===r&&0>1/r?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,n=f):(n=Math.floor(Math.log(r)/Math.LN2),r*(a=Math.pow(2,-n))<1&&(n--,a*=2),r+=n+l>=1?c/a:c*Math.pow(2,1-l),r*a>=2&&(n++,a/=2),n+l>=f?(s=0,n=f):n+l>=1?(s=(r*a-1)*Math.pow(2,h),n+=l):(s=r*Math.pow(2,l-1)*Math.pow(2,h),n=0));h>=8;t[i+m]=255&s,m+=p,s/=256,h-=8);for(n=n<<h|s,u+=h;u>0;t[i+m]=255&n,m+=p,n/=256,u-=8);t[i+m-p]|=128*d}},function(t){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,r,i){r.UINT32=i(7),r.UINT64=i(8)},function(t,r){var i,e;!function(h){function o(t,r){return this instanceof o?(this._low=0,this._high=0,this.remainder=null,"undefined"==typeof r?s.call(this,t):"string"==typeof t?a.call(this,t,r):void n.call(this,t,r)):new o(t,r)}function n(t,r){return this._low=0|t,this._high=0|r,this}function s(t){return this._low=65535&t,this._high=t>>>16,this}function a(t,r){var i=parseInt(t,r||10);return this._low=65535&i,this._high=i>>>16,this}var u=({36:o(Math.pow(36,5)),16:o(Math.pow(16,7)),10:o(Math.pow(10,9)),2:o(Math.pow(2,30))},{36:o(36),16:o(16),10:o(10),2:o(2)});o.prototype.fromBits=n,o.prototype.fromNumber=s,o.prototype.fromString=a,o.prototype.toNumber=function(){return this._high<<16|this._low},o.prototype.toString=function(t){t=t||10;var r=u[t]||new o(t);if(!this.gt(r))return this.toNumber().toString(t);for(var i=this.clone(),e=new Array(32),h=31;h>=0&&(i.div(r),e[h]=i.remainder.toNumber().toString(t),i.gt(r));h--);return e[h-1]=i.toNumber().toString(t),e.join("")},o.prototype.add=function(t){var r=this._low+t._low,i=r>>>16;return i+=this._high+t._high,this._low=65535&r,this._high=65535&i,this},o.prototype.subtract=function(t){return this.add(t.clone().negate())},o.prototype.multiply=function(t){var r,i,e=this._high,h=this._low,o=t._high,n=t._low;return i=h*n,r=i>>>16,r+=e*n,r&=65535,r+=h*o,this._low=65535&i,this._high=65535&r,this},o.prototype.div=function(t){if(0==t._low&&0==t._high)throw Error("division by zero");if(0==t._high&&1==t._low)return this.remainder=new o(0),this;if(t.gt(this))return this.remainder=new o(0),this._low=0,this._high=0,this;if(this.eq(t))return this.remainder=new o(0),this._low=1,this._high=0,this;for(var r=t.clone(),i=-1;!this.lt(r);)r.shiftLeft(1,!0),i++;for(this.remainder=this.clone(),this._low=0,this._high=0;i>=0;i--)r.shiftRight(1),this.remainder.lt(r)||(this.remainder.subtract(r),i>=16?this._high|=1<<i-16:this._low|=1<<i);return this},o.prototype.negate=o.prototype.not=function(){var t=(65535&~this._low)+1;return this._low=65535&t,this._high=~this._high+(t>>>16)&65535,this},o.prototype.equals=o.prototype.eq=function(t){return this._low==t._low&&this._high==t._high},o.prototype.greaterThan=o.prototype.gt=function(t){return this._high>t._high?!0:this._high<t._high?!1:this._low>t._low},o.prototype.lessThan=o.prototype.lt=function(t){return this._high<t._high?!0:this._high>t._high?!1:this._low<t._low},o.prototype.or=function(t){return this._low|=t._low,this._high|=t._high,this},o.prototype.and=function(t){return this._low&=t._low,this._high&=t._high,this},o.prototype.xor=function(t){return this._low^=t._low,this._high^=t._high,this},o.prototype.shiftRight=o.prototype.shiftr=function(t){return t>16?(this._low=this._high>>t-16,this._high=0):16==t?(this._low=this._high,this._high=0):(this._low=this._low>>t|this._high<<16-t&65535,this._high>>=t),this},o.prototype.shiftLeft=o.prototype.shiftl=function(t,r){return t>16?(this._high=this._low<<t-16,this._low=0,r||(this._high&=65535)):16==t?(this._high=this._low,this._low=0):(this._high=this._high<<t|this._low>>16-t,this._low=this._low<<t&65535,r||(this._high&=65535)),this},o.prototype.rotateLeft=o.prototype.rotl=function(t){var r=this._high<<16|this._low;return r=r<<t|r>>>32-t,this._low=65535&r,this._high=r>>>16,this},o.prototype.rotateRight=o.prototype.rotr=function(t){var r=this._high<<16|this._low;return r=r>>>t|r<<32-t,this._low=65535&r,this._high=r>>>16,this},o.prototype.clone=function(){return new o(this._low,this._high)},i=[],e=function(){return o}.apply(r,i),!(void 0!==e&&(t.exports=e))}(this)},function(t,r){var i,e;!function(h){function o(t,r,i,e){return this instanceof o?(this.remainder=null,"string"==typeof t?a.call(this,t,r):"undefined"==typeof r?s.call(this,t):void n.apply(this,arguments)):new o(t,r,i,e)}function n(t,r,i,e){return"undefined"==typeof i?(this._a00=65535&t,this._a16=t>>>16,this._a32=65535&r,this._a48=r>>>16,this):(this._a00=0|t,this._a16=0|r,this._a32=0|i,this._a48=0|e,this)}function s(t){return this._a00=65535&t,this._a16=t>>>16,this._a32=0,this._a48=0,this}function a(t,r){r=r||10,this._a00=0,this._a16=0,this._a32=0,this._a48=0;for(var i=u[r]||new o(Math.pow(r,5)),e=0,h=t.length;h>e;e+=5){var n=Math.min(5,h-e),s=parseInt(t.slice(e,e+n),r);this.multiply(5>n?new o(Math.pow(r,n)):i).add(new o(s))}return this}var u={16:o(Math.pow(16,5)),10:o(Math.pow(10,5)),2:o(Math.pow(2,5))},f={16:o(16),10:o(10),2:o(2)};o.prototype.fromBits=n,o.prototype.fromNumber=s,o.prototype.fromString=a,o.prototype.toNumber=function(){return this._a16<<16|this._a00},o.prototype.toString=function(t){t=t||10;var r=f[t]||new o(t);if(!this.gt(r))return this.toNumber().toString(t);for(var i=this.clone(),e=new Array(64),h=63;h>=0&&(i.div(r),e[h]=i.remainder.toNumber().toString(t),i.gt(r));h--);return e[h-1]=i.toNumber().toString(t),e.join("")},o.prototype.add=function(t){var r=this._a00+t._a00,i=r>>>16;i+=this._a16+t._a16;var e=i>>>16;e+=this._a32+t._a32;var h=e>>>16;return h+=this._a48+t._a48,this._a00=65535&r,this._a16=65535&i,this._a32=65535&e,this._a48=65535&h,this},o.prototype.subtract=function(t){return this.add(t.clone().negate())},o.prototype.multiply=function(t){var r=this._a00,i=this._a16,e=this._a32,h=this._a48,o=t._a00,n=t._a16,s=t._a32,a=t._a48,u=r*o,f=u>>>16;f+=r*n;var l=f>>>16;f&=65535,f+=i*o,l+=f>>>16,l+=r*s;var c=l>>>16;return l&=65535,l+=i*n,c+=l>>>16,l&=65535,l+=e*o,c+=l>>>16,c+=r*a,c&=65535,c+=i*s,c&=65535,c+=e*n,c&=65535,c+=h*o,this._a00=65535&u,this._a16=65535&f,this._a32=65535&l,this._a48=65535&c,this},o.prototype.div=function(t){if(0==t._a16&&0==t._a32&&0==t._a48){if(0==t._a00)throw Error("division by zero");if(1==t._a00)return this.remainder=new o(0),this}if(t.gt(this))return this.remainder=new o(0),this._a00=0,this._a16=0,this._a32=0,this._a48=0,this;if(this.eq(t))return this.remainder=new o(0),this._a00=1,this._a16=0,this._a32=0,this._a48=0,this;for(var r=t.clone(),i=-1;!this.lt(r);)r.shiftLeft(1,!0),i++;for(this.remainder=this.clone(),this._a00=0,this._a16=0,this._a32=0,this._a48=0;i>=0;i--)r.shiftRight(1),this.remainder.lt(r)||(this.remainder.subtract(r),i>=48?this._a48|=1<<i-48:i>=32?this._a32|=1<<i-32:i>=16?this._a16|=1<<i-16:this._a00|=1<<i);return this},o.prototype.negate=o.prototype.not=function(){var t=(65535&~this._a00)+1;return this._a00=65535&t,t=(65535&~this._a16)+(t>>>16),this._a16=65535&t,t=(65535&~this._a32)+(t>>>16),this._a32=65535&t,
this._a48=~this._a48+(t>>>16)&65535,this},o.prototype.equals=o.prototype.eq=function(t){return this._a48==t._a48&&this._a00==t._a00&&this._a32==t._a32&&this._a16==t._a16},o.prototype.greaterThan=o.prototype.gt=function(t){return this._a48>t._a48?!0:this._a48<t._a48?!1:this._a32>t._a32?!0:this._a32<t._a32?!1:this._a16>t._a16?!0:this._a16<t._a16?!1:this._a00>t._a00},o.prototype.lessThan=o.prototype.lt=function(t){return this._a48<t._a48?!0:this._a48>t._a48?!1:this._a32<t._a32?!0:this._a32>t._a32?!1:this._a16<t._a16?!0:this._a16>t._a16?!1:this._a00<t._a00},o.prototype.or=function(t){return this._a00|=t._a00,this._a16|=t._a16,this._a32|=t._a32,this._a48|=t._a48,this},o.prototype.and=function(t){return this._a00&=t._a00,this._a16&=t._a16,this._a32&=t._a32,this._a48&=t._a48,this},o.prototype.xor=function(t){return this._a00^=t._a00,this._a16^=t._a16,this._a32^=t._a32,this._a48^=t._a48,this},o.prototype.shiftRight=o.prototype.shiftr=function(t){return t%=64,t>=48?(this._a00=this._a48>>t-48,this._a16=0,this._a32=0,this._a48=0):t>=32?(t-=32,this._a00=65535&(this._a32>>t|this._a48<<16-t),this._a16=this._a48>>t&65535,this._a32=0,this._a48=0):t>=16?(t-=16,this._a00=65535&(this._a16>>t|this._a32<<16-t),this._a16=65535&(this._a32>>t|this._a48<<16-t),this._a32=this._a48>>t&65535,this._a48=0):(this._a00=65535&(this._a00>>t|this._a16<<16-t),this._a16=65535&(this._a16>>t|this._a32<<16-t),this._a32=65535&(this._a32>>t|this._a48<<16-t),this._a48=this._a48>>t&65535),this},o.prototype.shiftLeft=o.prototype.shiftl=function(t,r){return t%=64,t>=48?(this._a48=this._a00<<t-48,this._a32=0,this._a16=0,this._a00=0):t>=32?(t-=32,this._a48=this._a16<<t|this._a00>>16-t,this._a32=this._a00<<t&65535,this._a16=0,this._a00=0):t>=16?(t-=16,this._a48=this._a32<<t|this._a16>>16-t,this._a32=65535&(this._a16<<t|this._a00>>16-t),this._a16=this._a00<<t&65535,this._a00=0):(this._a48=this._a48<<t|this._a32>>16-t,this._a32=65535&(this._a32<<t|this._a16>>16-t),this._a16=65535&(this._a16<<t|this._a00>>16-t),this._a00=this._a00<<t&65535),r||(this._a48&=65535),this},o.prototype.rotateLeft=o.prototype.rotl=function(t){if(t%=64,0==t)return this;if(t>=32){var r=this._a00;if(this._a00=this._a32,this._a32=r,r=this._a48,this._a48=this._a16,this._a16=r,32==t)return this;t-=32}var i=this._a48<<16|this._a32,e=this._a16<<16|this._a00,h=i<<t|e>>>32-t,o=e<<t|i>>>32-t;return this._a00=65535&o,this._a16=o>>>16,this._a32=65535&h,this._a48=h>>>16,this},o.prototype.rotateRight=o.prototype.rotr=function(t){if(t%=64,0==t)return this;if(t>=32){var r=this._a00;if(this._a00=this._a32,this._a32=r,r=this._a48,this._a48=this._a16,this._a16=r,32==t)return this;t-=32}var i=this._a48<<16|this._a32,e=this._a16<<16|this._a00,h=i>>>t|e<<32-t,o=e>>>t|i<<32-t;return this._a00=65535&o,this._a16=o>>>16,this._a32=65535&h,this._a48=h>>>16,this},o.prototype.clone=function(){return new o(this._a00,this._a16,this._a32,this._a48)},i=[],e=function(){return o}.apply(r,i),!(void 0!==e&&(t.exports=e))}(this)},function(t,r,i){(function(r){function e(t){for(var r=[],i=0,e=t.length;e>i;i++){var h=t.charCodeAt(i);128>h?r.push(h):2048>h?r.push(192|h>>6,128|63&h):55296>h||h>=57344?r.push(224|h>>12,128|h>>6&63,128|63&h):(i++,h=65536+((1023&h)<<10|1023&t.charCodeAt(i)),r.push(240|h>>18,128|h>>12&63,128|h>>6&63,128|63&h))}return new Uint8Array(r)}function h(){return 2==arguments.length?new h(arguments[1]).update(arguments[0]).digest():this instanceof h?void o.call(this,arguments[0]):new h(arguments[0])}function o(t){return this.seed=t instanceof n?t.clone():n(t),this.v1=this.seed.clone().add(s).add(a),this.v2=this.seed.clone().add(a),this.v3=this.seed.clone(),this.v4=this.seed.clone().subtract(s),this.total_len=0,this.memsize=0,this.memory=null,this}var n=i(6).UINT64,s=n("11400714785074694791"),a=n("14029467366897019727"),u=n("1609587929392839161"),f=n("9650029242287828579"),l=n("2870177450012600261");h.prototype.init=o,h.prototype.update=function(t){var i,h="string"==typeof t;h&&(t=e(t),h=!1,i=!0),"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer&&(i=!0,t=new Uint8Array(t));var o=0,u=t.length,f=o+u;if(0==u)return this;if(this.total_len+=u,0==this.memsize&&(this.memory=h?"":i?new Uint8Array(32):new r(32)),this.memsize+u<32)return h?this.memory+=t:i?this.memory.set(t.subarray(0,u),this.memsize):t.copy(this.memory,this.memsize,0,u),this.memsize+=u,this;if(this.memsize>0){h?this.memory+=t.slice(0,32-this.memsize):i?this.memory.set(t.subarray(0,32-this.memsize),this.memsize):t.copy(this.memory,this.memsize,0,32-this.memsize);var l=0;if(h){var c;c=n(this.memory.charCodeAt(l+1)<<8|this.memory.charCodeAt(l),this.memory.charCodeAt(l+3)<<8|this.memory.charCodeAt(l+2),this.memory.charCodeAt(l+5)<<8|this.memory.charCodeAt(l+4),this.memory.charCodeAt(l+7)<<8|this.memory.charCodeAt(l+6)),this.v1.add(c.multiply(a)).rotl(31).multiply(s),l+=8,c=n(this.memory.charCodeAt(l+1)<<8|this.memory.charCodeAt(l),this.memory.charCodeAt(l+3)<<8|this.memory.charCodeAt(l+2),this.memory.charCodeAt(l+5)<<8|this.memory.charCodeAt(l+4),this.memory.charCodeAt(l+7)<<8|this.memory.charCodeAt(l+6)),this.v2.add(c.multiply(a)).rotl(31).multiply(s),l+=8,c=n(this.memory.charCodeAt(l+1)<<8|this.memory.charCodeAt(l),this.memory.charCodeAt(l+3)<<8|this.memory.charCodeAt(l+2),this.memory.charCodeAt(l+5)<<8|this.memory.charCodeAt(l+4),this.memory.charCodeAt(l+7)<<8|this.memory.charCodeAt(l+6)),this.v3.add(c.multiply(a)).rotl(31).multiply(s),l+=8,c=n(this.memory.charCodeAt(l+1)<<8|this.memory.charCodeAt(l),this.memory.charCodeAt(l+3)<<8|this.memory.charCodeAt(l+2),this.memory.charCodeAt(l+5)<<8|this.memory.charCodeAt(l+4),this.memory.charCodeAt(l+7)<<8|this.memory.charCodeAt(l+6)),this.v4.add(c.multiply(a)).rotl(31).multiply(s)}else{var c;c=n(this.memory[l+1]<<8|this.memory[l],this.memory[l+3]<<8|this.memory[l+2],this.memory[l+5]<<8|this.memory[l+4],this.memory[l+7]<<8|this.memory[l+6]),this.v1.add(c.multiply(a)).rotl(31).multiply(s),l+=8,c=n(this.memory[l+1]<<8|this.memory[l],this.memory[l+3]<<8|this.memory[l+2],this.memory[l+5]<<8|this.memory[l+4],this.memory[l+7]<<8|this.memory[l+6]),this.v2.add(c.multiply(a)).rotl(31).multiply(s),l+=8,c=n(this.memory[l+1]<<8|this.memory[l],this.memory[l+3]<<8|this.memory[l+2],this.memory[l+5]<<8|this.memory[l+4],this.memory[l+7]<<8|this.memory[l+6]),this.v3.add(c.multiply(a)).rotl(31).multiply(s),l+=8,c=n(this.memory[l+1]<<8|this.memory[l],this.memory[l+3]<<8|this.memory[l+2],this.memory[l+5]<<8|this.memory[l+4],this.memory[l+7]<<8|this.memory[l+6]),this.v4.add(c.multiply(a)).rotl(31).multiply(s)}o+=32-this.memsize,this.memsize=0,h&&(this.memory="")}if(f-32>=o){var m=f-32;do{if(h){var c;c=n(t.charCodeAt(o+1)<<8|t.charCodeAt(o),t.charCodeAt(o+3)<<8|t.charCodeAt(o+2),t.charCodeAt(o+5)<<8|t.charCodeAt(o+4),t.charCodeAt(o+7)<<8|t.charCodeAt(o+6)),this.v1.add(c.multiply(a)).rotl(31).multiply(s),o+=8,c=n(t.charCodeAt(o+1)<<8|t.charCodeAt(o),t.charCodeAt(o+3)<<8|t.charCodeAt(o+2),t.charCodeAt(o+5)<<8|t.charCodeAt(o+4),t.charCodeAt(o+7)<<8|t.charCodeAt(o+6)),this.v2.add(c.multiply(a)).rotl(31).multiply(s),o+=8,c=n(t.charCodeAt(o+1)<<8|t.charCodeAt(o),t.charCodeAt(o+3)<<8|t.charCodeAt(o+2),t.charCodeAt(o+5)<<8|t.charCodeAt(o+4),t.charCodeAt(o+7)<<8|t.charCodeAt(o+6)),this.v3.add(c.multiply(a)).rotl(31).multiply(s),o+=8,c=n(t.charCodeAt(o+1)<<8|t.charCodeAt(o),t.charCodeAt(o+3)<<8|t.charCodeAt(o+2),t.charCodeAt(o+5)<<8|t.charCodeAt(o+4),t.charCodeAt(o+7)<<8|t.charCodeAt(o+6)),this.v4.add(c.multiply(a)).rotl(31).multiply(s)}else{var c;c=n(t[o+1]<<8|t[o],t[o+3]<<8|t[o+2],t[o+5]<<8|t[o+4],t[o+7]<<8|t[o+6]),this.v1.add(c.multiply(a)).rotl(31).multiply(s),o+=8,c=n(t[o+1]<<8|t[o],t[o+3]<<8|t[o+2],t[o+5]<<8|t[o+4],t[o+7]<<8|t[o+6]),this.v2.add(c.multiply(a)).rotl(31).multiply(s),o+=8,c=n(t[o+1]<<8|t[o],t[o+3]<<8|t[o+2],t[o+5]<<8|t[o+4],t[o+7]<<8|t[o+6]),this.v3.add(c.multiply(a)).rotl(31).multiply(s),o+=8,c=n(t[o+1]<<8|t[o],t[o+3]<<8|t[o+2],t[o+5]<<8|t[o+4],t[o+7]<<8|t[o+6]),this.v4.add(c.multiply(a)).rotl(31).multiply(s)}o+=8}while(m>=o)}return f>o&&(h?this.memory+=t.slice(o):i?this.memory.set(t.subarray(o,f),this.memsize):t.copy(this.memory,this.memsize,o,f),this.memsize=f-o),this},h.prototype.digest=function(){var t,r,i=this.memory,e="string"==typeof i,h=0,o=this.memsize,c=new n;for(this.total_len>=32?(t=this.v1.clone().rotl(1),t.add(this.v2.clone().rotl(7)),t.add(this.v3.clone().rotl(12)),t.add(this.v4.clone().rotl(18)),t.xor(this.v1.multiply(a).rotl(31).multiply(s)),t.multiply(s).add(f),t.xor(this.v2.multiply(a).rotl(31).multiply(s)),t.multiply(s).add(f),t.xor(this.v3.multiply(a).rotl(31).multiply(s)),t.multiply(s).add(f),t.xor(this.v4.multiply(a).rotl(31).multiply(s)),t.multiply(s).add(f)):t=this.seed.clone().add(l),t.add(c.fromNumber(this.total_len));o-8>=h;)e?c.fromBits(i.charCodeAt(h+1)<<8|i.charCodeAt(h),i.charCodeAt(h+3)<<8|i.charCodeAt(h+2),i.charCodeAt(h+5)<<8|i.charCodeAt(h+4),i.charCodeAt(h+7)<<8|i.charCodeAt(h+6)):c.fromBits(i[h+1]<<8|i[h],i[h+3]<<8|i[h+2],i[h+5]<<8|i[h+4],i[h+7]<<8|i[h+6]),c.multiply(a).rotl(31).multiply(s),t.xor(c).rotl(27).multiply(s).add(f),h+=8;for(o>=h+4&&(e?c.fromBits(i.charCodeAt(h+1)<<8|i.charCodeAt(h),i.charCodeAt(h+3)<<8|i.charCodeAt(h+2),0,0):c.fromBits(i[h+1]<<8|i[h],i[h+3]<<8|i[h+2],0,0),t.xor(c.multiply(s)).rotl(23).multiply(a).add(u),h+=4);o>h;)c.fromBits(e?i.charCodeAt(h++):i[h++],0,0,0),t.xor(c.multiply(l)).rotl(11).multiply(s);return r=t.clone().shiftRight(33),t.xor(r).multiply(a),r=t.clone().shiftRight(29),t.xor(r).multiply(u),r=t.clone().shiftRight(32),t.xor(r),this.init(this.seed),t},t.exports=h}).call(r,i(2).Buffer)}]);