UNPKG

factom-vote

Version:

JS implementation of the Factom voting specification

8 lines 232 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["factom-vote-struct"]=t():e["factom-vote-struct"]=t()}(window,function(){return function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(r.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(a,n,function(t){return e[t]}.bind(null,n));return a},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=101)}([function(e,t,r){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ var a=r(50),n=r(51),i=r(40);function o(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(o()<t)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=h.prototype:(null===e&&(e=new h(t)),e.length=t),e}function h(e,t,r){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return u(this,e,t,r)}function u(e,t,r,a){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,a){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(a||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===a?new Uint8Array(t):void 0===a?new Uint8Array(t,r):new Uint8Array(t,r,a);h.TYPED_ARRAY_SUPPORT?(e=t).__proto__=h.prototype:e=f(e,t);return e}(e,t,r,a):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!h.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var a=0|p(t,r),n=(e=s(e,a)).write(t,r);n!==a&&(e=e.slice(0,n));return e}(e,t,r):function(e,t){if(h.isBuffer(t)){var r=0|d(t.length);return 0===(e=s(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(a=t.length)!=a?s(e,0):f(e,t);if("Buffer"===t.type&&i(t.data))return f(e,t.data)}var a;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t){if(c(t),e=s(e,t<0?0:0|d(t)),!h.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function f(e,t){var r=t.length<0?0:0|d(t.length);e=s(e,r);for(var a=0;a<r;a+=1)e[a]=255&t[a];return e}function d(e){if(e>=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|e}function p(e,t){if(h.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(a)return B(e).length;t=(""+t).toLowerCase(),a=!0}}function m(e,t,r){var a=e[t];e[t]=e[r],e[r]=a}function v(e,t,r,a,n){if(0===e.length)return-1;if("string"==typeof r?(a=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return-1;r=e.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof t&&(t=h.from(t,a)),h.isBuffer(t))return 0===t.length?-1:g(e,t,r,a,n);if("number"==typeof t)return t&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,a,n);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,a,n){var i,o=1,s=e.length,h=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;o=2,s/=2,h/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var c=-1;for(i=r;i<s;i++)if(u(e,i)===u(t,-1===c?0:i-c)){if(-1===c&&(c=i),i-c+1===h)return c*o}else-1!==c&&(i-=i-c),c=-1}else for(r+h>s&&(r=s-h),i=r;i>=0;i--){for(var l=!0,f=0;f<h;f++)if(u(e,i+f)!==u(t,f)){l=!1;break}if(l)return i}return-1}function y(e,t,r,a){r=Number(r)||0;var n=e.length-r;a?(a=Number(a))>n&&(a=n):a=n;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");a>i/2&&(a=i/2);for(var o=0;o<a;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function E(e,t,r,a){return V(B(t,e.length-r),e,r,a)}function w(e,t,r,a){return V(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,a)}function P(e,t,r,a){return w(e,t,r,a)}function b(e,t,r,a){return V(z(t),e,r,a)}function _(e,t,r,a){return V(function(e,t){for(var r,a,n,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),a=r>>8,n=r%256,i.push(n),i.push(a);return i}(t,e.length-r),e,r,a)}function S(e,t,r){return 0===t&&r===e.length?a.fromByteArray(e):a.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);for(var a=[],n=t;n<r;){var i,o,s,h,u=e[n],c=null,l=u>239?4:u>223?3:u>191?2:1;if(n+l<=r)switch(l){case 1:u<128&&(c=u);break;case 2:128==(192&(i=e[n+1]))&&(h=(31&u)<<6|63&i)>127&&(c=h);break;case 3:i=e[n+1],o=e[n+2],128==(192&i)&&128==(192&o)&&(h=(15&u)<<12|(63&i)<<6|63&o)>2047&&(h<55296||h>57343)&&(c=h);break;case 4:i=e[n+1],o=e[n+2],s=e[n+3],128==(192&i)&&128==(192&o)&&128==(192&s)&&(h=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&h<1114112&&(c=h)}null===c?(c=65533,l=1):c>65535&&(c-=65536,a.push(c>>>10&1023|55296),c=56320|1023&c),a.push(c),n+=l}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);var r="",a=0;for(;a<t;)r+=String.fromCharCode.apply(String,e.slice(a,a+=A));return r}(a)}t.Buffer=h,t.SlowBuffer=function(e){+e!=e&&(e=0);return h.alloc(+e)},t.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=o(),h.poolSize=8192,h._augment=function(e){return e.__proto__=h.prototype,e},h.from=function(e,t,r){return u(null,e,t,r)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(e,t,r){return function(e,t,r,a){return c(t),t<=0?s(e,t):void 0!==r?"string"==typeof a?s(e,t).fill(r,a):s(e,t).fill(r):s(e,t)}(null,e,t,r)},h.allocUnsafe=function(e){return l(null,e)},h.allocUnsafeSlow=function(e){return l(null,e)},h.isBuffer=function(e){return!(null==e||!e._isBuffer)},h.compare=function(e,t){if(!h.isBuffer(e)||!h.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,a=t.length,n=0,i=Math.min(r,a);n<i;++n)if(e[n]!==t[n]){r=e[n],a=t[n];break}return r<a?-1:a<r?1:0},h.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(e,t){if(!i(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var a=h.allocUnsafe(t),n=0;for(r=0;r<e.length;++r){var o=e[r];if(!h.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(a,n),n+=o.length}return a},h.byteLength=p,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},h.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},h.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},h.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?x(this,0,e):function(e,t,r){var a=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return R(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,t,r);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}.apply(this,arguments)},h.prototype.equals=function(e){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===h.compare(this,e)},h.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},h.prototype.compare=function(e,t,r,a,n){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===a&&(a=0),void 0===n&&(n=this.length),t<0||r>e.length||a<0||n>this.length)throw new RangeError("out of range index");if(a>=n&&t>=r)return 0;if(a>=n)return-1;if(t>=r)return 1;if(this===e)return 0;for(var i=(n>>>=0)-(a>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(i,o),u=this.slice(a,n),c=e.slice(t,r),l=0;l<s;++l)if(u[l]!==c[l]){i=u[l],o=c[l];break}return i<o?-1:o<i?1:0},h.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},h.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},h.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},h.prototype.write=function(e,t,r,a){if(void 0===t)a="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)a=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===a&&(a="utf8")):(a=r,r=void 0)}var n=this.length-t;if((void 0===r||r>n)&&(r=n),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var i=!1;;)switch(a){case"hex":return y(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return w(this,e,t,r);case"latin1":case"binary":return P(this,e,t,r);case"base64":return b(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),i=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function R(e,t,r){var a="";r=Math.min(e.length,r);for(var n=t;n<r;++n)a+=String.fromCharCode(127&e[n]);return a}function I(e,t,r){var a="";r=Math.min(e.length,r);for(var n=t;n<r;++n)a+=String.fromCharCode(e[n]);return a}function D(e,t,r){var a=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>a)&&(r=a);for(var n="",i=t;i<r;++i)n+=N(e[i]);return n}function F(e,t,r){for(var a=e.slice(t,r),n="",i=0;i<a.length;i+=2)n+=String.fromCharCode(a[i]+256*a[i+1]);return n}function O(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,a,n,i){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<i)throw new RangeError('"value" argument is out of bounds');if(r+a>e.length)throw new RangeError("Index out of range")}function T(e,t,r,a){t<0&&(t=65535+t+1);for(var n=0,i=Math.min(e.length-r,2);n<i;++n)e[r+n]=(t&255<<8*(a?n:1-n))>>>8*(a?n:1-n)}function $(e,t,r,a){t<0&&(t=4294967295+t+1);for(var n=0,i=Math.min(e.length-r,4);n<i;++n)e[r+n]=t>>>8*(a?n:3-n)&255}function k(e,t,r,a,n,i){if(r+a>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,a,i){return i||k(e,0,r,4),n.write(e,t,r,a,23,4),r+4}function U(e,t,r,a,i){return i||k(e,0,r,8),n.write(e,t,r,a,52,8),r+8}h.prototype.slice=function(e,t){var r,a=this.length;if((e=~~e)<0?(e+=a)<0&&(e=0):e>a&&(e=a),(t=void 0===t?a:~~t)<0?(t+=a)<0&&(t=0):t>a&&(t=a),t<e&&(t=e),h.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=h.prototype;else{var n=t-e;r=new h(n,void 0);for(var i=0;i<n;++i)r[i]=this[i+e]}return r},h.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var a=this[e],n=1,i=0;++i<t&&(n*=256);)a+=this[e+i]*n;return a},h.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var a=this[e+--t],n=1;t>0&&(n*=256);)a+=this[e+--t]*n;return a},h.prototype.readUInt8=function(e,t){return t||O(e,1,this.length),this[e]},h.prototype.readUInt16LE=function(e,t){return t||O(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUInt16BE=function(e,t){return t||O(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUInt32LE=function(e,t){return t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUInt32BE=function(e,t){return t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var a=this[e],n=1,i=0;++i<t&&(n*=256);)a+=this[e+i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},h.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||O(e,t,this.length);for(var a=t,n=1,i=this[e+--a];a>0&&(n*=256);)i+=this[e+--a]*n;return i>=(n*=128)&&(i-=Math.pow(2,8*t)),i},h.prototype.readInt8=function(e,t){return t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){t||O(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(e,t){t||O(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(e,t){return t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return t||O(e,4,this.length),n.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return t||O(e,4,this.length),n.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return t||O(e,8,this.length),n.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return t||O(e,8,this.length),n.read(this,e,!1,52,8)},h.prototype.writeUIntLE=function(e,t,r,a){(e=+e,t|=0,r|=0,a)||C(this,e,t,r,Math.pow(2,8*r)-1,0);var n=1,i=0;for(this[t]=255&e;++i<r&&(n*=256);)this[t+i]=e/n&255;return t+r},h.prototype.writeUIntBE=function(e,t,r,a){(e=+e,t|=0,r|=0,a)||C(this,e,t,r,Math.pow(2,8*r)-1,0);var n=r-1,i=1;for(this[t+n]=255&e;--n>=0&&(i*=256);)this[t+n]=e/i&255;return t+r},h.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,255,0),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},h.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},h.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},h.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):$(this,e,t,!0),t+4},h.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},h.prototype.writeIntLE=function(e,t,r,a){if(e=+e,t|=0,!a){var n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}var i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},h.prototype.writeIntBE=function(e,t,r,a){if(e=+e,t|=0,!a){var n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}var i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o>>0)-s&255;return t+r},h.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,1,127,-128),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},h.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):T(this,e,t,!0),t+2},h.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):T(this,e,t,!1),t+2},h.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):$(this,e,t,!0),t+4},h.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):$(this,e,t,!1),t+4},h.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},h.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},h.prototype.writeDoubleLE=function(e,t,r){return U(this,e,t,!0,r)},h.prototype.writeDoubleBE=function(e,t,r){return U(this,e,t,!1,r)},h.prototype.copy=function(e,t,r,a){if(r||(r=0),a||0===a||(a=this.length),t>=e.length&&(t=e.length),t||(t=0),a>0&&a<r&&(a=r),a===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),e.length-t<a-r&&(a=e.length-t+r);var n,i=a-r;if(this===e&&r<t&&t<a)for(n=i-1;n>=0;--n)e[n+t]=this[n+r];else if(i<1e3||!h.TYPED_ARRAY_SUPPORT)for(n=0;n<i;++n)e[n+t]=this[n+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},h.prototype.fill=function(e,t,r,a){if("string"==typeof e){if("string"==typeof t?(a=t,t=0,r=this.length):"string"==typeof r&&(a=r,r=this.length),1===e.length){var n=e.charCodeAt(0);n<256&&(e=n)}if(void 0!==a&&"string"!=typeof a)throw new TypeError("encoding must be a string");if("string"==typeof a&&!h.isEncoding(a))throw new TypeError("Unknown encoding: "+a)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var o=h.isBuffer(e)?e:B(new h(e,a).toString()),s=o.length;for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};var j=/[^+\/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function B(e,t){var r;t=t||1/0;for(var a=e.length,n=null,i=[],o=0;o<a;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!n){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===a){(t-=3)>-1&&i.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(t-=3)>-1&&i.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function z(e){return a.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(j,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,a){for(var n=0;n<a&&!(n+r>=t.length||n>=e.length);++n)t[n+r]=e[n];return n}}).call(this,r(4))},function(e,t,r){"use strict";var a=r(11),n=r(15);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function o(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function h(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=n,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(var a=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?r[a++]=o:o<2048?(r[a++]=o>>6|192,r[a++]=63&o|128):i(e,n)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++n)),r[a++]=o>>18|240,r[a++]=o>>12&63|128,r[a++]=o>>6&63|128,r[a++]=63&o|128):(r[a++]=o>>12|224,r[a++]=o>>6&63|128,r[a++]=63&o|128)}else for(n=0;n<e.length;n++)r[n]=0|e[n];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=o,t.toHex32=function(e,t){for(var r="",a=0;a<e.length;a++){var n=e[a];"little"===t&&(n=o(n)),r+=h(n.toString(16))}return r},t.zero2=s,t.zero8=h,t.join32=function(e,t,r,n){var i=r-t;a(i%4==0);for(var o=new Array(i/4),s=0,h=t;s<o.length;s++,h+=4){var u;u="big"===n?e[h]<<24|e[h+1]<<16|e[h+2]<<8|e[h+3]:e[h+3]<<24|e[h+2]<<16|e[h+1]<<8|e[h],o[s]=u>>>0}return o},t.split32=function(e,t){for(var r=new Array(4*e.length),a=0,n=0;a<e.length;a++,n+=4){var i=e[a];"big"===t?(r[n]=i>>>24,r[n+1]=i>>>16&255,r[n+2]=i>>>8&255,r[n+3]=255&i):(r[n+3]=i>>>24,r[n+2]=i>>>16&255,r[n+1]=i>>>8&255,r[n]=255&i)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,a){return e+t+r+a>>>0},t.sum32_5=function(e,t,r,a,n){return e+t+r+a+n>>>0},t.sum64=function(e,t,r,a){var n=e[t],i=a+e[t+1]>>>0,o=(i<a?1:0)+r+n;e[t]=o>>>0,e[t+1]=i},t.sum64_hi=function(e,t,r,a){return(t+a>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,a){return t+a>>>0},t.sum64_4_hi=function(e,t,r,a,n,i,o,s){var h=0,u=t;return h+=(u=u+a>>>0)<t?1:0,h+=(u=u+i>>>0)<i?1:0,e+r+n+o+(h+=(u=u+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,a,n,i,o,s){return t+a+i+s>>>0},t.sum64_5_hi=function(e,t,r,a,n,i,o,s,h,u){var c=0,l=t;return c+=(l=l+a>>>0)<t?1:0,c+=(l=l+i>>>0)<i?1:0,c+=(l=l+s>>>0)<s?1:0,e+r+n+o+h+(c+=(l=l+u>>>0)<u?1:0)>>>0},t.sum64_5_lo=function(e,t,r,a,n,i,o,s,h,u){return t+a+i+s+u>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},a=function(){throw new Error("no PRNG")},n=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var o=t(),s=t([1]),h=t([56129,1]),u=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),c=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,a){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=a>>24&255,e[t+5]=a>>16&255,e[t+6]=a>>8&255,e[t+7]=255&a}function m(e,t,r,a,n){var i,o=0;for(i=0;i<n;i++)o|=e[t+i]^r[a+i];return(1&o-1>>>8)-1}function v(e,t,r,a){return m(e,t,r,a,16)}function g(e,t,r,a){return m(e,t,r,a,32)}function y(e,t,r,a){!function(e,t,r,a){for(var n,i=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,h=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,v=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,y=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,E=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,P=i,b=o,_=s,S=h,x=u,A=c,R=l,I=f,D=d,F=p,O=m,C=v,T=g,$=y,k=E,L=w,U=0;U<20;U+=2)P^=(n=(T^=(n=(D^=(n=(x^=(n=P+T|0)<<7|n>>>25)+P|0)<<9|n>>>23)+x|0)<<13|n>>>19)+D|0)<<18|n>>>14,A^=(n=(b^=(n=($^=(n=(F^=(n=A+b|0)<<7|n>>>25)+A|0)<<9|n>>>23)+F|0)<<13|n>>>19)+$|0)<<18|n>>>14,O^=(n=(R^=(n=(_^=(n=(k^=(n=O+R|0)<<7|n>>>25)+O|0)<<9|n>>>23)+k|0)<<13|n>>>19)+_|0)<<18|n>>>14,L^=(n=(C^=(n=(I^=(n=(S^=(n=L+C|0)<<7|n>>>25)+L|0)<<9|n>>>23)+S|0)<<13|n>>>19)+I|0)<<18|n>>>14,P^=(n=(S^=(n=(_^=(n=(b^=(n=P+S|0)<<7|n>>>25)+P|0)<<9|n>>>23)+b|0)<<13|n>>>19)+_|0)<<18|n>>>14,A^=(n=(x^=(n=(I^=(n=(R^=(n=A+x|0)<<7|n>>>25)+A|0)<<9|n>>>23)+R|0)<<13|n>>>19)+I|0)<<18|n>>>14,O^=(n=(F^=(n=(D^=(n=(C^=(n=O+F|0)<<7|n>>>25)+O|0)<<9|n>>>23)+C|0)<<13|n>>>19)+D|0)<<18|n>>>14,L^=(n=(k^=(n=($^=(n=(T^=(n=L+k|0)<<7|n>>>25)+L|0)<<9|n>>>23)+T|0)<<13|n>>>19)+$|0)<<18|n>>>14;P=P+i|0,b=b+o|0,_=_+s|0,S=S+h|0,x=x+u|0,A=A+c|0,R=R+l|0,I=I+f|0,D=D+d|0,F=F+p|0,O=O+m|0,C=C+v|0,T=T+g|0,$=$+y|0,k=k+E|0,L=L+w|0,e[0]=P>>>0&255,e[1]=P>>>8&255,e[2]=P>>>16&255,e[3]=P>>>24&255,e[4]=b>>>0&255,e[5]=b>>>8&255,e[6]=b>>>16&255,e[7]=b>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=x>>>0&255,e[17]=x>>>8&255,e[18]=x>>>16&255,e[19]=x>>>24&255,e[20]=A>>>0&255,e[21]=A>>>8&255,e[22]=A>>>16&255,e[23]=A>>>24&255,e[24]=R>>>0&255,e[25]=R>>>8&255,e[26]=R>>>16&255,e[27]=R>>>24&255,e[28]=I>>>0&255,e[29]=I>>>8&255,e[30]=I>>>16&255,e[31]=I>>>24&255,e[32]=D>>>0&255,e[33]=D>>>8&255,e[34]=D>>>16&255,e[35]=D>>>24&255,e[36]=F>>>0&255,e[37]=F>>>8&255,e[38]=F>>>16&255,e[39]=F>>>24&255,e[40]=O>>>0&255,e[41]=O>>>8&255,e[42]=O>>>16&255,e[43]=O>>>24&255,e[44]=C>>>0&255,e[45]=C>>>8&255,e[46]=C>>>16&255,e[47]=C>>>24&255,e[48]=T>>>0&255,e[49]=T>>>8&255,e[50]=T>>>16&255,e[51]=T>>>24&255,e[52]=$>>>0&255,e[53]=$>>>8&255,e[54]=$>>>16&255,e[55]=$>>>24&255,e[56]=k>>>0&255,e[57]=k>>>8&255,e[58]=k>>>16&255,e[59]=k>>>24&255,e[60]=L>>>0&255,e[61]=L>>>8&255,e[62]=L>>>16&255,e[63]=L>>>24&255}(e,t,r,a)}function E(e,t,r,a){!function(e,t,r,a){for(var n,i=255&a[0]|(255&a[1])<<8|(255&a[2])<<16|(255&a[3])<<24,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,h=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,c=255&a[4]|(255&a[5])<<8|(255&a[6])<<16|(255&a[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&a[8]|(255&a[9])<<8|(255&a[10])<<16|(255&a[11])<<24,v=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,g=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,y=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,E=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&a[12]|(255&a[13])<<8|(255&a[14])<<16|(255&a[15])<<24,P=0;P<20;P+=2)i^=(n=(g^=(n=(d^=(n=(u^=(n=i+g|0)<<7|n>>>25)+i|0)<<9|n>>>23)+u|0)<<13|n>>>19)+d|0)<<18|n>>>14,c^=(n=(o^=(n=(y^=(n=(p^=(n=c+o|0)<<7|n>>>25)+c|0)<<9|n>>>23)+p|0)<<13|n>>>19)+y|0)<<18|n>>>14,m^=(n=(l^=(n=(s^=(n=(E^=(n=m+l|0)<<7|n>>>25)+m|0)<<9|n>>>23)+E|0)<<13|n>>>19)+s|0)<<18|n>>>14,w^=(n=(v^=(n=(f^=(n=(h^=(n=w+v|0)<<7|n>>>25)+w|0)<<9|n>>>23)+h|0)<<13|n>>>19)+f|0)<<18|n>>>14,i^=(n=(h^=(n=(s^=(n=(o^=(n=i+h|0)<<7|n>>>25)+i|0)<<9|n>>>23)+o|0)<<13|n>>>19)+s|0)<<18|n>>>14,c^=(n=(u^=(n=(f^=(n=(l^=(n=c+u|0)<<7|n>>>25)+c|0)<<9|n>>>23)+l|0)<<13|n>>>19)+f|0)<<18|n>>>14,m^=(n=(p^=(n=(d^=(n=(v^=(n=m+p|0)<<7|n>>>25)+m|0)<<9|n>>>23)+v|0)<<13|n>>>19)+d|0)<<18|n>>>14,w^=(n=(E^=(n=(y^=(n=(g^=(n=w+E|0)<<7|n>>>25)+w|0)<<9|n>>>23)+g|0)<<13|n>>>19)+y|0)<<18|n>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=c>>>0&255,e[5]=c>>>8&255,e[6]=c>>>16&255,e[7]=c>>>24&255,e[8]=m>>>0&255,e[9]=m>>>8&255,e[10]=m>>>16&255,e[11]=m>>>24&255,e[12]=w>>>0&255,e[13]=w>>>8&255,e[14]=w>>>16&255,e[15]=w>>>24&255,e[16]=l>>>0&255,e[17]=l>>>8&255,e[18]=l>>>16&255,e[19]=l>>>24&255,e[20]=f>>>0&255,e[21]=f>>>8&255,e[22]=f>>>16&255,e[23]=f>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,a)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function P(e,t,r,a,n,i,o){var s,h,u=new Uint8Array(16),c=new Uint8Array(64);for(h=0;h<16;h++)u[h]=0;for(h=0;h<8;h++)u[h]=i[h];for(;n>=64;){for(y(c,u,o,w),h=0;h<64;h++)e[t+h]=r[a+h]^c[h];for(s=1,h=8;h<16;h++)s=s+(255&u[h])|0,u[h]=255&s,s>>>=8;n-=64,t+=64,a+=64}if(n>0)for(y(c,u,o,w),h=0;h<n;h++)e[t+h]=r[a+h]^c[h];return 0}function b(e,t,r,a,n){var i,o,s=new Uint8Array(16),h=new Uint8Array(64);for(o=0;o<16;o++)s[o]=0;for(o=0;o<8;o++)s[o]=a[o];for(;r>=64;){for(y(h,s,n,w),o=0;o<64;o++)e[t+o]=h[o];for(i=1,o=8;o<16;o++)i=i+(255&s[o])|0,s[o]=255&i,i>>>=8;r-=64,t+=64}if(r>0)for(y(h,s,n,w),o=0;o<r;o++)e[t+o]=h[o];return 0}function _(e,t,r,a,n){var i=new Uint8Array(32);E(i,a,n,w);for(var o=new Uint8Array(8),s=0;s<8;s++)o[s]=a[s+16];return b(e,t,r,o,i)}function S(e,t,r,a,n,i,o){var s=new Uint8Array(32);E(s,i,o,w);for(var h=new Uint8Array(8),u=0;u<8;u++)h[u]=i[u+16];return P(e,t,r,a,n,h,s)}var x=function(e){var t,r,a,n,i,o,s,h;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),a=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|a<<6),n=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(a>>>7|n<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(n>>>4|i<<12),this.r[5]=i>>>1&8190,o=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|o<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(o>>>11|s<<5),h=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|h<<8),this.r[9]=h>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function A(e,t,r,a,n,i){var o=new x(i);return o.update(r,a,n),o.finish(e,t),0}function R(e,t,r,a,n,i){var o=new Uint8Array(16);return A(o,0,r,a,n,i),v(e,t,o,0)}function I(e,t,r,a,n){var i;if(r<32)return-1;for(S(e,0,t,0,r,a,n),A(e,16,e,32,r-32,e),i=0;i<16;i++)e[i]=0;return 0}function D(e,t,r,a,n){var i,o=new Uint8Array(32);if(r<32)return-1;if(_(o,0,32,a,n),0!==R(t,16,t,32,r-32,o))return-1;for(S(e,0,t,0,r,a,n),i=0;i<32;i++)e[i]=0;return 0}function F(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function O(e){var t,r,a=1;for(t=0;t<16;t++)r=e[t]+a+65535,a=Math.floor(r/65536),e[t]=r-65536*a;e[0]+=a-1+37*(a-1)}function C(e,t,r){for(var a,n=~(r-1),i=0;i<16;i++)a=n&(e[i]^t[i]),e[i]^=a,t[i]^=a}function T(e,r){var a,n,i,o=t(),s=t();for(a=0;a<16;a++)s[a]=r[a];for(O(s),O(s),O(s),n=0;n<2;n++){for(o[0]=s[0]-65517,a=1;a<15;a++)o[a]=s[a]-65535-(o[a-1]>>16&1),o[a-1]&=65535;o[15]=s[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,C(s,o,1-i)}for(a=0;a<16;a++)e[2*a]=255&s[a],e[2*a+1]=s[a]>>8}function $(e,t){var r=new Uint8Array(32),a=new Uint8Array(32);return T(r,e),T(a,t),g(r,0,a,0)}function k(e){var t=new Uint8Array(32);return T(t,e),1&t[0]}function L(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function U(e,t,r){for(var a=0;a<16;a++)e[a]=t[a]+r[a]}function j(e,t,r){for(var a=0;a<16;a++)e[a]=t[a]-r[a]}function N(e,t,r){var a,n,i=0,o=0,s=0,h=0,u=0,c=0,l=0,f=0,d=0,p=0,m=0,v=0,g=0,y=0,E=0,w=0,P=0,b=0,_=0,S=0,x=0,A=0,R=0,I=0,D=0,F=0,O=0,C=0,T=0,$=0,k=0,L=r[0],U=r[1],j=r[2],N=r[3],B=r[4],z=r[5],V=r[6],M=r[7],q=r[8],K=r[9],H=r[10],Y=r[11],Q=r[12],Z=r[13],J=r[14],X=r[15];i+=(a=t[0])*L,o+=a*U,s+=a*j,h+=a*N,u+=a*B,c+=a*z,l+=a*V,f+=a*M,d+=a*q,p+=a*K,m+=a*H,v+=a*Y,g+=a*Q,y+=a*Z,E+=a*J,w+=a*X,o+=(a=t[1])*L,s+=a*U,h+=a*j,u+=a*N,c+=a*B,l+=a*z,f+=a*V,d+=a*M,p+=a*q,m+=a*K,v+=a*H,g+=a*Y,y+=a*Q,E+=a*Z,w+=a*J,P+=a*X,s+=(a=t[2])*L,h+=a*U,u+=a*j,c+=a*N,l+=a*B,f+=a*z,d+=a*V,p+=a*M,m+=a*q,v+=a*K,g+=a*H,y+=a*Y,E+=a*Q,w+=a*Z,P+=a*J,b+=a*X,h+=(a=t[3])*L,u+=a*U,c+=a*j,l+=a*N,f+=a*B,d+=a*z,p+=a*V,m+=a*M,v+=a*q,g+=a*K,y+=a*H,E+=a*Y,w+=a*Q,P+=a*Z,b+=a*J,_+=a*X,u+=(a=t[4])*L,c+=a*U,l+=a*j,f+=a*N,d+=a*B,p+=a*z,m+=a*V,v+=a*M,g+=a*q,y+=a*K,E+=a*H,w+=a*Y,P+=a*Q,b+=a*Z,_+=a*J,S+=a*X,c+=(a=t[5])*L,l+=a*U,f+=a*j,d+=a*N,p+=a*B,m+=a*z,v+=a*V,g+=a*M,y+=a*q,E+=a*K,w+=a*H,P+=a*Y,b+=a*Q,_+=a*Z,S+=a*J,x+=a*X,l+=(a=t[6])*L,f+=a*U,d+=a*j,p+=a*N,m+=a*B,v+=a*z,g+=a*V,y+=a*M,E+=a*q,w+=a*K,P+=a*H,b+=a*Y,_+=a*Q,S+=a*Z,x+=a*J,A+=a*X,f+=(a=t[7])*L,d+=a*U,p+=a*j,m+=a*N,v+=a*B,g+=a*z,y+=a*V,E+=a*M,w+=a*q,P+=a*K,b+=a*H,_+=a*Y,S+=a*Q,x+=a*Z,A+=a*J,R+=a*X,d+=(a=t[8])*L,p+=a*U,m+=a*j,v+=a*N,g+=a*B,y+=a*z,E+=a*V,w+=a*M,P+=a*q,b+=a*K,_+=a*H,S+=a*Y,x+=a*Q,A+=a*Z,R+=a*J,I+=a*X,p+=(a=t[9])*L,m+=a*U,v+=a*j,g+=a*N,y+=a*B,E+=a*z,w+=a*V,P+=a*M,b+=a*q,_+=a*K,S+=a*H,x+=a*Y,A+=a*Q,R+=a*Z,I+=a*J,D+=a*X,m+=(a=t[10])*L,v+=a*U,g+=a*j,y+=a*N,E+=a*B,w+=a*z,P+=a*V,b+=a*M,_+=a*q,S+=a*K,x+=a*H,A+=a*Y,R+=a*Q,I+=a*Z,D+=a*J,F+=a*X,v+=(a=t[11])*L,g+=a*U,y+=a*j,E+=a*N,w+=a*B,P+=a*z,b+=a*V,_+=a*M,S+=a*q,x+=a*K,A+=a*H,R+=a*Y,I+=a*Q,D+=a*Z,F+=a*J,O+=a*X,g+=(a=t[12])*L,y+=a*U,E+=a*j,w+=a*N,P+=a*B,b+=a*z,_+=a*V,S+=a*M,x+=a*q,A+=a*K,R+=a*H,I+=a*Y,D+=a*Q,F+=a*Z,O+=a*J,C+=a*X,y+=(a=t[13])*L,E+=a*U,w+=a*j,P+=a*N,b+=a*B,_+=a*z,S+=a*V,x+=a*M,A+=a*q,R+=a*K,I+=a*H,D+=a*Y,F+=a*Q,O+=a*Z,C+=a*J,T+=a*X,E+=(a=t[14])*L,w+=a*U,P+=a*j,b+=a*N,_+=a*B,S+=a*z,x+=a*V,A+=a*M,R+=a*q,I+=a*K,D+=a*H,F+=a*Y,O+=a*Q,C+=a*Z,T+=a*J,$+=a*X,w+=(a=t[15])*L,o+=38*(b+=a*j),s+=38*(_+=a*N),h+=38*(S+=a*B),u+=38*(x+=a*z),c+=38*(A+=a*V),l+=38*(R+=a*M),f+=38*(I+=a*q),d+=38*(D+=a*K),p+=38*(F+=a*H),m+=38*(O+=a*Y),v+=38*(C+=a*Q),g+=38*(T+=a*Z),y+=38*($+=a*J),E+=38*(k+=a*X),i=(a=(i+=38*(P+=a*U))+(n=1)+65535)-65536*(n=Math.floor(a/65536)),o=(a=o+n+65535)-65536*(n=Math.floor(a/65536)),s=(a=s+n+65535)-65536*(n=Math.floor(a/65536)),h=(a=h+n+65535)-65536*(n=Math.floor(a/65536)),u=(a=u+n+65535)-65536*(n=Math.floor(a/65536)),c=(a=c+n+65535)-65536*(n=Math.floor(a/65536)),l=(a=l+n+65535)-65536*(n=Math.floor(a/65536)),f=(a=f+n+65535)-65536*(n=Math.floor(a/65536)),d=(a=d+n+65535)-65536*(n=Math.floor(a/65536)),p=(a=p+n+65535)-65536*(n=Math.floor(a/65536)),m=(a=m+n+65535)-65536*(n=Math.floor(a/65536)),v=(a=v+n+65535)-65536*(n=Math.floor(a/65536)),g=(a=g+n+65535)-65536*(n=Math.floor(a/65536)),y=(a=y+n+65535)-65536*(n=Math.floor(a/65536)),E=(a=E+n+65535)-65536*(n=Math.floor(a/65536)),w=(a=w+n+65535)-65536*(n=Math.floor(a/65536)),i=(a=(i+=n-1+37*(n-1))+(n=1)+65535)-65536*(n=Math.floor(a/65536)),o=(a=o+n+65535)-65536*(n=Math.floor(a/65536)),s=(a=s+n+65535)-65536*(n=Math.floor(a/65536)),h=(a=h+n+65535)-65536*(n=Math.floor(a/65536)),u=(a=u+n+65535)-65536*(n=Math.floor(a/65536)),c=(a=c+n+65535)-65536*(n=Math.floor(a/65536)),l=(a=l+n+65535)-65536*(n=Math.floor(a/65536)),f=(a=f+n+65535)-65536*(n=Math.floor(a/65536)),d=(a=d+n+65535)-65536*(n=Math.floor(a/65536)),p=(a=p+n+65535)-65536*(n=Math.floor(a/65536)),m=(a=m+n+65535)-65536*(n=Math.floor(a/65536)),v=(a=v+n+65535)-65536*(n=Math.floor(a/65536)),g=(a=g+n+65535)-65536*(n=Math.floor(a/65536)),y=(a=y+n+65535)-65536*(n=Math.floor(a/65536)),E=(a=E+n+65535)-65536*(n=Math.floor(a/65536)),w=(a=w+n+65535)-65536*(n=Math.floor(a/65536)),i+=n-1+37*(n-1),e[0]=i,e[1]=o,e[2]=s,e[3]=h,e[4]=u,e[5]=c,e[6]=l,e[7]=f,e[8]=d,e[9]=p,e[10]=m,e[11]=v,e[12]=g,e[13]=y,e[14]=E,e[15]=w}function B(e,t){N(e,t,t)}function z(e,r){var a,n=t();for(a=0;a<16;a++)n[a]=r[a];for(a=253;a>=0;a--)B(n,n),2!==a&&4!==a&&N(n,n,r);for(a=0;a<16;a++)e[a]=n[a]}function V(e,r,a){var n,i,o=new Uint8Array(32),s=new Float64Array(80),u=t(),c=t(),l=t(),f=t(),d=t(),p=t();for(i=0;i<31;i++)o[i]=r[i];for(o[31]=127&r[31]|64,o[0]&=248,L(s,a),i=0;i<16;i++)c[i]=s[i],f[i]=u[i]=l[i]=0;for(u[0]=f[0]=1,i=254;i>=0;--i)C(u,c,n=o[i>>>3]>>>(7&i)&1),C(l,f,n),U(d,u,l),j(u,u,l),U(l,c,f),j(c,c,f),B(f,d),B(p,u),N(u,l,u),N(l,c,d),U(d,u,l),j(u,u,l),B(c,u),j(l,f,p),N(u,l,h),U(u,u,f),N(l,l,u),N(u,f,p),N(f,c,s),B(c,d),C(u,c,n),C(l,f,n);for(i=0;i<16;i++)s[i+16]=u[i],s[i+32]=l[i],s[i+48]=c[i],s[i+64]=f[i];var m=s.subarray(32),v=s.subarray(16);return z(m,m),N(v,v,m),T(e,v),0}function M(e,t){return V(e,t,i)}function q(e,t){return a(t,32),M(e,t)}function K(e,t,r){var a=new Uint8Array(32);return V(a,r,t),E(e,n,a,w)}x.prototype.blocks=function(e,t,r){for(var a,n,i,o,s,h,u,c,l,f,d,p,m,v,g,y,E,w,P,b=this.fin?0:2048,_=this.h[0],S=this.h[1],x=this.h[2],A=this.h[3],R=this.h[4],I=this.h[5],D=this.h[6],F=this.h[7],O=this.h[8],C=this.h[9],T=this.r[0],$=this.r[1],k=this.r[2],L=this.r[3],U=this.r[4],j=this.r[5],N=this.r[6],B=this.r[7],z=this.r[8],V=this.r[9];r>=16;)f=l=0,f+=(_+=8191&(a=255&e[t+0]|(255&e[t+1])<<8))*T,f+=(S+=8191&(a>>>13|(n=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*V),f+=(x+=8191&(n>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*z),f+=(A+=8191&(i>>>7|(o=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*B),l=(f+=(R+=8191&(o>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*N))>>>13,f&=8191,f+=(I+=s>>>1&8191)*(5*j),f+=(D+=8191&(s>>>14|(h=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*U),f+=(F+=8191&(h>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*L),f+=(O+=8191&(u>>>8|(c=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*k),d=l+=(f+=(C+=c>>>5|b)*(5*$))>>>13,d+=_*$,d+=S*T,d+=x*(5*V),d+=A*(5*z),l=(d+=R*(5*B))>>>13,d&=8191,d+=I*(5*N),d+=D*(5*j),d+=F*(5*U),d+=O*(5*L),l+=(d+=C*(5*k))>>>13,d&=8191,p=l,p+=_*k,p+=S*$,p+=x*T,p+=A*(5*V),l=(p+=R*(5*z))>>>13,p&=8191,p+=I*(5*B),p+=D*(5*N),p+=F*(5*j),p+=O*(5*U),m=l+=(p+=C*(5*L))>>>13,m+=_*L,m+=S*k,m+=x*$,m+=A*T,l=(m+=R*(5*V))>>>13,m&=8191,m+=I*(5*z),m+=D*(5*B),m+=F*(5*N),m+=O*(5*j),v=l+=(m+=C*(5*U))>>>13,v+=_*U,v+=S*L,v+=x*k,v+=A*$,l=(v+=R*T)>>>13,v&=8191,v+=I*(5*V),v+=D*(5*z),v+=F*(5*B),v+=O*(5*N),g=l+=(v+=C*(5*j))>>>13,g+=_*j,g+=S*U,g+=x*L,g+=A*k,l=(g+=R*$)>>>13,g&=8191,g+=I*T,g+=D*(5*V),g+=F*(5*z),g+=O*(5*B),y=l+=(g+=C*(5*N))>>>13,y+=_*N,y+=S*j,y+=x*U,y+=A*L,l=(y+=R*k)>>>13,y&=8191,y+=I*$,y+=D*T,y+=F*(5*V),y+=O*(5*z),E=l+=(y+=C*(5*B))>>>13,E+=_*B,E+=S*N,E+=x*j,E+=A*U,l=(E+=R*L)>>>13,E&=8191,E+=I*k,E+=D*$,E+=F*T,E+=O*(5*V),w=l+=(E+=C*(5*z))>>>13,w+=_*z,w+=S*B,w+=x*N,w+=A*j,l=(w+=R*U)>>>13,w&=8191,w+=I*L,w+=D*k,w+=F*$,w+=O*T,P=l+=(w+=C*(5*V))>>>13,P+=_*V,P+=S*z,P+=x*B,P+=A*N,l=(P+=R*j)>>>13,P&=8191,P+=I*U,P+=D*L,P+=F*k,P+=O*$,_=f=8191&(l=(l=((l+=(P+=C*T)>>>13)<<2)+l|0)+(f&=8191)|0),S=d+=l>>>=13,x=p&=8191,A=m&=8191,R=v&=8191,I=g&=8191,D=y&=8191,F=E&=8191,O=w&=8191,C=P&=8191,t+=16,r-=16;this.h[0]=_,this.h[1]=S,this.h[2]=x,this.h[3]=A,this.h[4]=R,this.h[5]=I,this.h[6]=D,this.h[7]=F,this.h[8]=O,this.h[9]=C},x.prototype.finish=function(e,t){var r,a,n,i,o=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=r,r=this.h[i]>>>13,this.h[i]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,o[0]=this.h[0]+5,r=o[0]>>>13,o[0]&=8191,i=1;i<10;i++)o[i]=this.h[i]+r,r=o[i]>>>13,o[i]&=8191;for(o[9]-=8192,a=(1^r)-1,i=0;i<10;i++)o[i]&=a;for(a=~a,i=0;i<10;i++)this.h[i]=this.h[i]&a|o[i];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),n=this.h[0]+this.pad[0],this.h[0]=65535&n,i=1;i<8;i++)n=(this.h[i]+this.pad[i]|0)+(n>>>16)|0,this.h[i]=65535&n;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},x.prototype.update=function(e,t,r){var a,n;if(this.leftover){for((n=16-this.leftover)>r&&(n=r),a=0;a<n;a++)this.buffer[this.leftover+a]=e[t+a];if(r-=n,t+=n,this.leftover+=n,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(n=r-r%16,this.blocks(e,t,n),t+=n,r-=n),r){for(a=0;a<r;a++)this.buffer[this.leftover+a]=e[t+a];this.leftover+=r}};var H=I,Y=D;var Q=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Z(e,t,r,a){for(var n,i,o,s,h,u,c,l,f,d,p,m,v,g,y,E,w,P,b,_,S,x,A,R,I,D,F=new Int32Array(16),O=new Int32Array(16),C=e[0],T=e[1],$=e[2],k=e[3],L=e[4],U=e[5],j=e[6],N=e[7],B=t[0],z=t[1],V=t[2],M=t[3],q=t[4],K=t[5],H=t[6],Y=t[7],Z=0;a>=128;){for(b=0;b<16;b++)_=8*b+Z,F[b]=r[_+0]<<24|r[_+1]<<16|r[_+2]<<8|r[_+3],O[b]=r[_+4]<<24|r[_+5]<<16|r[_+6]<<8|r[_+7];for(b=0;b<80;b++)if(n=C,i=T,o=$,s=k,h=L,u=U,c=j,N,f=B,d=z,p=V,m=M,v=q,g=K,y=H,Y,A=65535&(x=Y),R=x>>>16,I=65535&(S=N),D=S>>>16,A+=65535&(x=(q>>>14|L<<18)^(q>>>18|L<<14)^(L>>>9|q<<23)),R+=x>>>16,I+=65535&(S=(L>>>14|q<<18)^(L>>>18|q<<14)^(q>>>9|L<<23)),D+=S>>>16,A+=65535&(x=q&K^~q&H),R+=x>>>16,I+=65535&(S=L&U^~L&j),D+=S>>>16,S=Q[2*b],A+=65535&(x=Q[2*b+1]),R+=x>>>16,I+=65535&S,D+=S>>>16,S=F[b%16],R+=(x=O[b%16])>>>16,I+=65535&S,D+=S>>>16,I+=(R+=(A+=65535&x)>>>16)>>>16,A=65535&(x=P=65535&A|R<<16),R=x>>>16,I=65535&(S=w=65535&I|(D+=I>>>16)<<16),D=S>>>16,A+=65535&(x=(B>>>28|C<<4)^(C>>>2|B<<30)^(C>>>7|B<<25)),R+=x>>>16,I+=65535&(S=(C>>>28|B<<4)^(B>>>2|C<<30)^(B>>>7|C<<25)),D+=S>>>16,R+=(x=B&z^B&V^z&V)>>>16,I+=65535&(S=C&T^C&$^T&$),D+=S>>>16,l=65535&(I+=(R+=(A+=65535&x)>>>16)>>>16)|(D+=I>>>16)<<16,E=65535&A|R<<16,A=65535&(x=m),R=x>>>16,I=65535&(S=s),D=S>>>16,R+=(x=P)>>>16,I+=65535&(S=w),D+=S>>>16,T=n,$=i,k=o,L=s=65535&(I+=(R+=(A+=65535&x)>>>16)>>>16)|(D+=I>>>16)<<16,U=h,j=u,N=c,C=l,z=f,V=d,M=p,q=m=65535&A|R<<16,K=v,H=g,Y=y,B=E,b%16==15)for(_=0;_<16;_++)S=F[_],A=65535&(x=O[_]),R=x>>>16,I=65535&S,D=S>>>16,S=F[(_+9)%16],A+=65535&(x=O[(_+9)%16]),R+=x>>>16,I+=65535&S,D+=S>>>16,w=F[(_+1)%16],A+=65535&(x=((P=O[(_+1)%16])>>>1|w<<31)^(P>>>8|w<<24)^(P>>>7|w<<25)),R+=x>>>16,I+=65535&(S=(w>>>1|P<<31)^(w>>>8|P<<24)^w>>>7),D+=S>>>16,w=F[(_+14)%16],R+=(x=((P=O[(_+14)%16])>>>19|w<<13)^(w>>>29|P<<3)^(P>>>6|w<<26))>>>16,I+=65535&(S=(w>>>19|P<<13)^(P>>>29|w<<3)^w>>>6),D+=S>>>16,D+=(I+=(R+=(A+=65535&x)>>>16)>>>16)>>>16,F[_]=65535&I|D<<16,O[_]=65535&A|R<<16;A=65535&(x=B),R=x>>>16,I=65535&(S=C),D=S>>>16,S=e[0],R+=(x=t[0])>>>16,I+=65535&S,D+=S>>>16,D+=(I+=(R+=(A+=65535&x)>>>16)>>>16)>>>16,e[0]=C=65535&I|D<<16,t[0]=B=65535&A|R<<16,A=65535&(x=z),R=x>>>16,I=65535&(S=T),D=S>>>16,S=e[1],R+=(x=t[1])>>>16,I+=65535&S,D+=S>>>16,D+=(I+=(R+=(A+=65535&x)>>>16)>>>16)>>>16,e[1]=T=65535&I|D<<16,t[1]=z=65535&A|R<<16,A=65535&(x=V),R=x>>>16,I=65535&(S=$),D=S>>>16,S=e[2],R+=(x=t[2])>>>16,I+=65535&S,D+=S>>>16,D+=(I+=(R+=(A+=65535&x)>>>16)>>>16)>>>16,e[2]=$=65535&I|D<<16,t[2]=V=65535&A|R<<16,A=65535&(x=M),R=x>>>16,I=65535&(S=k),D=S>>>16,S=e[3],R+=(x=t[3])>>>16,I+=65535&S,D+=S>>>16,D+=(I+=(R+=(A+=65535&x)>>>16)>>>16)>>>16,e[3]=k=65535&I|D<<16,t[3]=M=65535&A|R<<16,A=65535&(x=q),R=x>>>16,I=65535&(S=L),D=S>>>16,S=e[4],R+=(x=t[4])>>>16,I+=65535&S,D+=S>>>16,D+=(I+=(R+=(A+=65535&x)>>>16)>>>16)>>>16,e[4]=L=65535&I|D<<16,t[4]=q=65535&A|R<<16,A=65535&(x=K),R=x>>>16,I=65535&(S=U),D=S>>>16,S=e[5],R+=(x=t[5])>>>16,I+=65535&S,D+=S>>>16,D+=(I+=(R+=(A+=65535&x)>>>16)>>>16)>>>16,e[5]=U=65535&I|D<<16,t[5]=K=65535&A|R<<16,A=65535&(x=H),R=x>>>16,I=65535&(S=j),D=S>>>16,S=e[6],R+=(x=t[6])>>>16,I+=65535&S,D+=S>>>16,D+=(I+=(R+=(A+=65535&x)>>>16)>>>16)>>>16,e[6]=j=65535&I|D<<16,t[6]=H=65535&A|R<<16,A=65535&(x=Y),R=x>>>16,I=65535&(S=N),D=S>>>16,S=e[7],R+=(x=t[7])>>>16,I+=65535&S,D+=S>>>16,D+=(I+=(R+=(A+=65535&x)>>>16)>>>16)>>>16,e[7]=N=65535&I|D<<16,t[7]=Y=65535&A|R<<16,Z+=128,a-=128}return a}function J(e,t,r){var a,n=new Int32Array(8),i=new Int32Array(8),o=new Uint8Array(256),s=r;for(n[0]=1779033703,n[1]=3144134277,n[2]=1013904242,n[3]=2773480762,n[4]=1359893119,n[5]=2600822924,n[6]=528734635,n[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Z(n,i,t,r),r%=128,a=0;a<r;a++)o[a]=t[s-r+a];for(o[r]=128,o[(r=256-128*(r<112?1:0))-9]=0,p(o,r-8,s/536870912|0,s<<3),Z(n,i,o,r),a=0;a<8;a++)p(e,8*a,n[a],i[a]);return 0}function X(e,r){var a=t(),n=t(),i=t(),o=t(),s=t(),h=t(),u=t(),l=t(),f=t();j(a,e[1],e[0]),j(f,r[1],r[0]),N(a,a,f),U(n,e[0],e[1]),U(f,r[0],r[1]),N(n,n,f),N(i,e[3],r[3]),N(i,i,c),N(o,e[2],r[2]),U(o,o,o),j(s,n,a),j(h,o,i),U(u,o,i),U(l,n,a),N(e[0],s,h),N(e[1],l,u),N(e[2],u,h),N(e[3],s,l)}function G(e,t,r){var a;for(a=0;a<4;a++)C(e[a],t[a],r)}function W(e,r){var a=t(),n=t(),i=t();z(i,r[2]),N(a,r[0],i),N(n,r[1],i),T(e,n),e[31]^=k(a)<<7}function ee(e,t,r){var a,n;for(F(e[0],o),F(e[1],s),F(e[2],s),F(e[3],o),n=255;n>=0;--n)G(e,t,a=r[n/8|0]>>(7&n)&1),X(t,e),X(e,e),G(e,t,a)}function te(e,r){var a=[t(),t(),t(),t()];F(a[0],l),F(a[1],f),F(a[2],s),N(a[3],l,f),ee(e,a,r)}function re(e,r,n){var i,o=new Uint8Array(64),s=[t(),t(),t(),t()];for(n||a(r,32),J(o,r,32),o[0]&=248,o[31]&=127,o[31]|=64,te(s,o),W(e,s),i=0;i<32;i++)r[i+32]=e[i];return 0}var ae=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ne(e,t){var r,a,n,i;for(a=63;a>=32;--a){for(r=0,n=a-32,i=a-12;n<i;++n)t[n]+=r-16*t[a]*ae[n-(a-32)],r=t[n]+128>>8,t[n]-=256*r;t[n]+=r,t[a]=0}for(r=0,n=0;n<32;n++)t[n]+=r-(t[31]>>4)*ae[n],r=t[n]>>8,t[n]&=255;for(n=0;n<32;n++)t[n]-=r*ae[n];for(a=0;a<32;a++)t[a+1]+=t[a]>>8,e[a]=255&t[a]}function ie(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ne(e,r)}function oe(e,r,a,n){var i,o,s=new Uint8Array(64),h=new Uint8Array(64),u=new Uint8Array(64),c=new Float64Array(64),l=[t(),t(),t(),t()];J(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64;var f=a+64;for(i=0;i<a;i++)e[64+i]=r[i];for(i=0;i<32;i++)e[32+i]=s[32+i];for(J(u,e.subarray(32),a+32),ie(u),te(l,u),W(e,l),i=32;i<64;i++)e[i]=n[i];for(J(h,e,a+64),ie(h),i=0;i<64;i++)c[i]=0;for(i=0;i<32;i++)c[i]=u[i];for(i=0;i<32;i++)for(o=0;o<32;o++)c[i+o]+=h[i]*s[o];return ne(e.subarray(32),c),f}function se(e,r){var a=t(),n=t(),i=t(),h=t(),c=t(),l=t(),f=t();return F(e[2],s),L(e[1],r),B(i,e[1]),N(h,i,u),j(i,i,e[2]),U(h,e[2],h),B(c,h),B(l,c),N(f,l,c),N(a,f,i),N(a,a,h),function(e,r){var a,n=t();for(a=0;a<16;a++)n[a]=r[a];for(a=250;a>=0;a--)B(n,n),1!==a&&N(n,n,r);for(a=0;a<16;a++)e[a]=n[a]}(a,a),N(a,a,i),N