>>0?1:0)|0,this._h=this._h+E+(this._hl>>>0>>0?1:0)|0},r.prototype._hash=function(){function t(t,e,r){n.writeInt32BE(t,r),n.writeInt32BE(e,r+4)}var n=new e(64);return t(this._a,this._al,0),t(this._b,this._bl,8),t(this._c,this._cl,16),t(this._d,this._dl,24),t(this._e,this._el,32),t(this._f,this._fl,40),t(this._g,this._gl,48),t(this._h,this._hl,56),n},t.exports=r}).call(e,n(202).Buffer)},function(t,e,n){(function(t){"use strict";function r(t,e){return o.sign(t,e)}function i(t,e,n){return o.verify(t,e,n)}Object.defineProperty(e,"__esModule",{value:!0}),e.sign=r,e.verify=i;var o={};"undefined"==typeof window?!function(){var e=n(249);o.sign=function(n,r){return n=new t(n),e.Sign(n,r)},o.verify=function(n,r,i){n=new t(n);try{return e.Verify(n,r,i)}catch(o){return!1}}}():!function(){var e=n(255);o.sign=function(n,r){n=new t(n),n=new Uint8Array(n.toJSON().data),r=new Uint8Array(r.toJSON().data);var i=e.sign.detached(n,r);return new t(i)},o.verify=function(n,r,i){return n=new t(n),n=new Uint8Array(n.toJSON().data),r=new Uint8Array(r.toJSON().data),i=new Uint8Array(i.toJSON().data),e.sign.detached.verify(n,r,i)}}()}).call(e,n(202).Buffer)},function(t,e,n){t.exports=n(250)("ed25519")},function(t,e,n){(function(r,i){function o(t){"string"==typeof t?t={bindings:t}:t||(t={}),t.__proto__=l,t.module_root||(t.module_root=e.getRoot(e.getFileName())),".node"!=a.extname(t.bindings)&&(t.bindings+=".node");for(var r,i,o,u=[],c=0,f=t.try.length;f>c;c++){r=s.apply(null,t.try[c].map(function(e){return t[e]||e})),u.push(r);try{return i=t.path?n(252).resolve(r):n(252)(r),t.path||(i.path=r),i}catch(h){if(!/not find/i.test(h.message))throw h}}throw o=new Error("Could not locate the bindings file. Tried:\n"+u.map(function(e){return t.arrow+e}).join("\n")),o.tries=u,o}var u=n(!function(){var t=new Error('Cannot find module "fs"');throw t.code="MODULE_NOT_FOUND",t}()),a=n(251),s=a.join,c=a.dirname,f=u.existsSync||a.existsSync,l={arrow:r.env.NODE_BINDINGS_ARROW||" \u2192 ",compiled:r.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:r.platform,arch:r.arch,version:r.versions.node,bindings:"bindings.node","try":[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"]]};t.exports=e=o,e.getFileName=function(t){var e,n=Error.prepareStackTrace,r=Error.stackTraceLimit,o={};return Error.stackTraceLimit=10,Error.prepareStackTrace=function(n,r){for(var o=0,u=r.length;u>o;o++)if(e=r[o].getFileName(),e!==i){if(!t)return;if(e!==t)return}},Error.captureStackTrace(o),o.stack,Error.prepareStackTrace=n,Error.stackTraceLimit=r,e},e.getRoot=function(t){for(var e,n=c(t);;){if("."===n&&(n=r.cwd()),f(s(n,"package.json"))||f(s(n,"node_modules")))return n;if(e===n)throw new Error('Could not find module root given file: "'+t+'". Do you have a `package.json` file? ');e=n,n=s(n,"..")}}}).call(e,n(189),"/index.js")},function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r=-1&&!i;o--){var u=o>=0?arguments[o]:t.cwd();if("string"!=typeof u)throw new TypeError("Arguments to path.resolve must be strings");u&&(e=u+"/"+e,i="/"===u.charAt(0))}return e=n(r(e.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),o="/"===u(t,-1);return t=n(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&o&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),o=r(n.split("/")),u=Math.min(i.length,o.length),a=u,s=0;u>s;s++)if(i[s]!==o[s]){a=s;break}for(var c=[],s=a;se&&(e=t.length+e),t.substr(e,n)}}).call(e,n(189))},function(t,e,n){function r(t){return n(i(t))}function i(t){return o[t]||function(){throw new Error("Cannot find module '"+t+"'.")}()}var o={"./bindings":250,"./bindings.js":250};r.keys=function(){return Object.keys(o)},r.resolve=i,t.exports=r,r.id=252},,,function(t,e,n){(function(e){!function(t){"use strict";function r(t,e,n,r){t[e]=n>>24&255,t[e+1]=n>>16&255,t[e+2]=n>>8&255,t[e+3]=255&n,t[e+4]=r>>24&255,t[e+5]=r>>16&255,t[e+6]=r>>8&255,t[e+7]=255&r}function i(t,e,n,r,i){var o,u=0;for(o=0;i>o;o++)u|=t[e+o]^n[r+o];return(1&u-1>>>8)-1}function o(t,e,n,r){return i(t,e,n,r,16)}function u(t,e,n,r){return i(t,e,n,r,32)}function a(t,e,n,r){for(var i,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,u=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,s=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,f=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,y=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,m=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,_=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=o,E=u,A=a,O=s,S=c,k=f,x=l,I=h,T=p,P=d,M=g,R=v,N=y,U=m,B=w,L=_,j=0;20>j;j+=2)i=b+N|0,S^=i<<7|i>>>25,i=S+b|0,T^=i<<9|i>>>23,i=T+S|0,N^=i<<13|i>>>19,i=N+T|0,b^=i<<18|i>>>14,i=k+E|0,P^=i<<7|i>>>25,i=P+k|0,U^=i<<9|i>>>23,i=U+P|0,E^=i<<13|i>>>19,i=E+U|0,k^=i<<18|i>>>14,i=M+x|0,B^=i<<7|i>>>25,i=B+M|0,A^=i<<9|i>>>23,i=A+B|0,x^=i<<13|i>>>19,i=x+A|0,M^=i<<18|i>>>14,i=L+R|0,O^=i<<7|i>>>25,i=O+L|0,I^=i<<9|i>>>23,i=I+O|0,R^=i<<13|i>>>19,i=R+I|0,L^=i<<18|i>>>14,i=b+O|0,E^=i<<7|i>>>25,i=E+b|0,A^=i<<9|i>>>23,i=A+E|0,O^=i<<13|i>>>19,i=O+A|0,b^=i<<18|i>>>14,i=k+S|0,x^=i<<7|i>>>25,i=x+k|0,I^=i<<9|i>>>23,i=I+x|0,S^=i<<13|i>>>19,i=S+I|0,k^=i<<18|i>>>14,i=M+P|0,R^=i<<7|i>>>25,i=R+M|0,T^=i<<9|i>>>23,i=T+R|0,P^=i<<13|i>>>19,i=P+T|0,M^=i<<18|i>>>14,i=L+B|0,N^=i<<7|i>>>25,i=N+L|0,U^=i<<9|i>>>23,i=U+N|0,B^=i<<13|i>>>19,i=B+U|0,L^=i<<18|i>>>14;b=b+o|0,E=E+u|0,A=A+a|0,O=O+s|0,S=S+c|0,k=k+f|0,x=x+l|0,I=I+h|0,T=T+p|0,P=P+d|0,M=M+g|0,R=R+v|0,N=N+y|0,U=U+m|0,B=B+w|0,L=L+_|0,t[0]=b>>>0&255,t[1]=b>>>8&255,t[2]=b>>>16&255,t[3]=b>>>24&255,t[4]=E>>>0&255,t[5]=E>>>8&255,t[6]=E>>>16&255,t[7]=E>>>24&255,t[8]=A>>>0&255,t[9]=A>>>8&255,t[10]=A>>>16&255,t[11]=A>>>24&255,t[12]=O>>>0&255,t[13]=O>>>8&255,t[14]=O>>>16&255,t[15]=O>>>24&255,t[16]=S>>>0&255,t[17]=S>>>8&255,t[18]=S>>>16&255,t[19]=S>>>24&255,t[20]=k>>>0&255,t[21]=k>>>8&255,t[22]=k>>>16&255,t[23]=k>>>24&255,t[24]=x>>>0&255,t[25]=x>>>8&255,t[26]=x>>>16&255,t[27]=x>>>24&255,t[28]=I>>>0&255,t[29]=I>>>8&255,t[30]=I>>>16&255,t[31]=I>>>24&255,t[32]=T>>>0&255,t[33]=T>>>8&255,t[34]=T>>>16&255,t[35]=T>>>24&255,t[36]=P>>>0&255,t[37]=P>>>8&255,t[38]=P>>>16&255,t[39]=P>>>24&255,t[40]=M>>>0&255,t[41]=M>>>8&255,t[42]=M>>>16&255,t[43]=M>>>24&255,t[44]=R>>>0&255,t[45]=R>>>8&255,t[46]=R>>>16&255,t[47]=R>>>24&255,t[48]=N>>>0&255,t[49]=N>>>8&255,t[50]=N>>>16&255,t[51]=N>>>24&255,t[52]=U>>>0&255,t[53]=U>>>8&255,t[54]=U>>>16&255,t[55]=U>>>24&255,t[56]=B>>>0&255,t[57]=B>>>8&255,t[58]=B>>>16&255,t[59]=B>>>24&255,t[60]=L>>>0&255,t[61]=L>>>8&255,t[62]=L>>>16&255,t[63]=L>>>24&255}function s(t,e,n,r){for(var i,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,u=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,s=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,c=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,f=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,l=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,y=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,m=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,_=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=o,E=u,A=a,O=s,S=c,k=f,x=l,I=h,T=p,P=d,M=g,R=v,N=y,U=m,B=w,L=_,j=0;20>j;j+=2)i=b+N|0,S^=i<<7|i>>>25,i=S+b|0,T^=i<<9|i>>>23,i=T+S|0,N^=i<<13|i>>>19,i=N+T|0,b^=i<<18|i>>>14,i=k+E|0,P^=i<<7|i>>>25,i=P+k|0,U^=i<<9|i>>>23,i=U+P|0,E^=i<<13|i>>>19,i=E+U|0,k^=i<<18|i>>>14,i=M+x|0,B^=i<<7|i>>>25,i=B+M|0,A^=i<<9|i>>>23,i=A+B|0,x^=i<<13|i>>>19,i=x+A|0,M^=i<<18|i>>>14,i=L+R|0,O^=i<<7|i>>>25,i=O+L|0,I^=i<<9|i>>>23,i=I+O|0,R^=i<<13|i>>>19,i=R+I|0,L^=i<<18|i>>>14,i=b+O|0,E^=i<<7|i>>>25,i=E+b|0,A^=i<<9|i>>>23,i=A+E|0,O^=i<<13|i>>>19,i=O+A|0,b^=i<<18|i>>>14,i=k+S|0,x^=i<<7|i>>>25,i=x+k|0,I^=i<<9|i>>>23,i=I+x|0,S^=i<<13|i>>>19,i=S+I|0,k^=i<<18|i>>>14,i=M+P|0,R^=i<<7|i>>>25,i=R+M|0,T^=i<<9|i>>>23,i=T+R|0,P^=i<<13|i>>>19,i=P+T|0,M^=i<<18|i>>>14,i=L+B|0,N^=i<<7|i>>>25,i=N+L|0,U^=i<<9|i>>>23,i=U+N|0,B^=i<<13|i>>>19,i=B+U|0,L^=i<<18|i>>>14;
t[0]=b>>>0&255,t[1]=b>>>8&255,t[2]=b>>>16&255,t[3]=b>>>24&255,t[4]=k>>>0&255,t[5]=k>>>8&255,t[6]=k>>>16&255,t[7]=k>>>24&255,t[8]=M>>>0&255,t[9]=M>>>8&255,t[10]=M>>>16&255,t[11]=M>>>24&255,t[12]=L>>>0&255,t[13]=L>>>8&255,t[14]=L>>>16&255,t[15]=L>>>24&255,t[16]=x>>>0&255,t[17]=x>>>8&255,t[18]=x>>>16&255,t[19]=x>>>24&255,t[20]=I>>>0&255,t[21]=I>>>8&255,t[22]=I>>>16&255,t[23]=I>>>24&255,t[24]=T>>>0&255,t[25]=T>>>8&255,t[26]=T>>>16&255,t[27]=T>>>24&255,t[28]=P>>>0&255,t[29]=P>>>8&255,t[30]=P>>>16&255,t[31]=P>>>24&255}function c(t,e,n,r){a(t,e,n,r)}function f(t,e,n,r){s(t,e,n,r)}function l(t,e,n,r,i,o,u){var a,s,f=new Uint8Array(16),l=new Uint8Array(64);for(s=0;16>s;s++)f[s]=0;for(s=0;8>s;s++)f[s]=o[s];for(;i>=64;){for(c(l,f,u,pe),s=0;64>s;s++)t[e+s]=n[r+s]^l[s];for(a=1,s=8;16>s;s++)a=a+(255&f[s])|0,f[s]=255&a,a>>>=8;i-=64,e+=64,r+=64}if(i>0)for(c(l,f,u,pe),s=0;i>s;s++)t[e+s]=n[r+s]^l[s];return 0}function h(t,e,n,r,i){var o,u,a=new Uint8Array(16),s=new Uint8Array(64);for(u=0;16>u;u++)a[u]=0;for(u=0;8>u;u++)a[u]=r[u];for(;n>=64;){for(c(s,a,i,pe),u=0;64>u;u++)t[e+u]=s[u];for(o=1,u=8;16>u;u++)o=o+(255&a[u])|0,a[u]=255&o,o>>>=8;n-=64,e+=64}if(n>0)for(c(s,a,i,pe),u=0;n>u;u++)t[e+u]=s[u];return 0}function p(t,e,n,r,i){var o=new Uint8Array(32);f(o,r,i,pe);for(var u=new Uint8Array(8),a=0;8>a;a++)u[a]=r[a+16];return h(t,e,n,u,o)}function d(t,e,n,r,i,o,u){var a=new Uint8Array(32);f(a,o,u,pe);for(var s=new Uint8Array(8),c=0;8>c;c++)s[c]=o[c+16];return l(t,e,n,r,i,s,a)}function g(t,e,n,r,i,o){var u=new de(o);return u.update(n,r,i),u.finish(t,e),0}function v(t,e,n,r,i,u){var a=new Uint8Array(16);return g(a,0,n,r,i,u),o(t,e,a,0)}function y(t,e,n,r,i){var o;if(32>n)return-1;for(d(t,0,e,0,n,r,i),g(t,16,t,32,n-32,t),o=0;16>o;o++)t[o]=0;return 0}function m(t,e,n,r,i){var o,u=new Uint8Array(32);if(32>n)return-1;if(p(u,0,32,r,i),0!==v(e,16,e,32,n-32,u))return-1;for(d(t,0,e,0,n,r,i),o=0;32>o;o++)t[o]=0;return 0}function w(t,e){var n;for(n=0;16>n;n++)t[n]=0|e[n]}function _(t){var e,n,r=1;for(e=0;16>e;e++)n=t[e]+r+65535,r=Math.floor(n/65536),t[e]=n-65536*r;t[0]+=r-1+37*(r-1)}function b(t,e,n){for(var r,i=~(n-1),o=0;16>o;o++)r=i&(t[o]^e[o]),t[o]^=r,e[o]^=r}function E(t,e){var n,r,i,o=ee(),u=ee();for(n=0;16>n;n++)u[n]=e[n];for(_(u),_(u),_(u),r=0;2>r;r++){for(o[0]=u[0]-65517,n=1;15>n;n++)o[n]=u[n]-65535-(o[n-1]>>16&1),o[n-1]&=65535;o[15]=u[15]-32767-(o[14]>>16&1),i=o[15]>>16&1,o[14]&=65535,b(u,o,1-i)}for(n=0;16>n;n++)t[2*n]=255&u[n],t[2*n+1]=u[n]>>8}function A(t,e){var n=new Uint8Array(32),r=new Uint8Array(32);return E(n,t),E(r,e),u(n,0,r,0)}function O(t){var e=new Uint8Array(32);return E(e,t),1&e[0]}function S(t,e){var n;for(n=0;16>n;n++)t[n]=e[2*n]+(e[2*n+1]<<8);t[15]&=32767}function k(t,e,n){for(var r=0;16>r;r++)t[r]=e[r]+n[r]}function x(t,e,n){for(var r=0;16>r;r++)t[r]=e[r]-n[r]}function I(t,e,n){var r,i,o=0,u=0,a=0,s=0,c=0,f=0,l=0,h=0,p=0,d=0,g=0,v=0,y=0,m=0,w=0,_=0,b=0,E=0,A=0,O=0,S=0,k=0,x=0,I=0,T=0,P=0,M=0,R=0,N=0,U=0,B=0,L=n[0],j=n[1],C=n[2],D=n[3],F=n[4],V=n[5],z=n[6],H=n[7],q=n[8],K=n[9],W=n[10],X=n[11],Y=n[12],G=n[13],$=n[14],Z=n[15];r=e[0],o+=r*L,u+=r*j,a+=r*C,s+=r*D,c+=r*F,f+=r*V,l+=r*z,h+=r*H,p+=r*q,d+=r*K,g+=r*W,v+=r*X,y+=r*Y,m+=r*G,w+=r*$,_+=r*Z,r=e[1],u+=r*L,a+=r*j,s+=r*C,c+=r*D,f+=r*F,l+=r*V,h+=r*z,p+=r*H,d+=r*q,g+=r*K,v+=r*W,y+=r*X,m+=r*Y,w+=r*G,_+=r*$,b+=r*Z,r=e[2],a+=r*L,s+=r*j,c+=r*C,f+=r*D,l+=r*F,h+=r*V,p+=r*z,d+=r*H,g+=r*q,v+=r*K,y+=r*W,m+=r*X,w+=r*Y,_+=r*G,b+=r*$,E+=r*Z,r=e[3],s+=r*L,c+=r*j,f+=r*C,l+=r*D,h+=r*F,p+=r*V,d+=r*z,g+=r*H,v+=r*q,y+=r*K,m+=r*W,w+=r*X,_+=r*Y,b+=r*G,E+=r*$,A+=r*Z,r=e[4],c+=r*L,f+=r*j,l+=r*C,h+=r*D,p+=r*F,d+=r*V,g+=r*z,v+=r*H,y+=r*q,m+=r*K,w+=r*W,_+=r*X,b+=r*Y,E+=r*G,A+=r*$,O+=r*Z,r=e[5],f+=r*L,l+=r*j,h+=r*C,p+=r*D,d+=r*F,g+=r*V,v+=r*z,y+=r*H,m+=r*q,w+=r*K,_+=r*W,b+=r*X,E+=r*Y,A+=r*G,O+=r*$,S+=r*Z,r=e[6],l+=r*L,h+=r*j,p+=r*C,d+=r*D,g+=r*F,v+=r*V,y+=r*z,m+=r*H,w+=r*q,_+=r*K,b+=r*W,E+=r*X,A+=r*Y,O+=r*G,S+=r*$,k+=r*Z,r=e[7],h+=r*L,p+=r*j,d+=r*C,g+=r*D,v+=r*F,y+=r*V,m+=r*z,w+=r*H,_+=r*q,b+=r*K,E+=r*W,A+=r*X,O+=r*Y,S+=r*G,k+=r*$,x+=r*Z,r=e[8],p+=r*L,d+=r*j,g+=r*C,v+=r*D,y+=r*F,m+=r*V,w+=r*z,_+=r*H,b+=r*q,E+=r*K,A+=r*W,O+=r*X,S+=r*Y,k+=r*G,x+=r*$,I+=r*Z,r=e[9],d+=r*L,g+=r*j,v+=r*C,y+=r*D,m+=r*F,w+=r*V,_+=r*z,b+=r*H,E+=r*q,A+=r*K,O+=r*W,S+=r*X,k+=r*Y,x+=r*G,I+=r*$,T+=r*Z,r=e[10],g+=r*L,v+=r*j,y+=r*C,m+=r*D,w+=r*F,_+=r*V,b+=r*z,E+=r*H,A+=r*q,O+=r*K,S+=r*W,k+=r*X,x+=r*Y,I+=r*G,T+=r*$,P+=r*Z,r=e[11],v+=r*L,y+=r*j,m+=r*C,w+=r*D,_+=r*F,b+=r*V,E+=r*z,A+=r*H,O+=r*q,S+=r*K,k+=r*W,x+=r*X,I+=r*Y,T+=r*G,P+=r*$,M+=r*Z,r=e[12],y+=r*L,m+=r*j,w+=r*C,_+=r*D,b+=r*F,E+=r*V,A+=r*z,O+=r*H,S+=r*q,k+=r*K,x+=r*W,I+=r*X,T+=r*Y,P+=r*G,M+=r*$,R+=r*Z,r=e[13],m+=r*L,w+=r*j,_+=r*C,b+=r*D,E+=r*F,A+=r*V,O+=r*z,S+=r*H,k+=r*q,x+=r*K,I+=r*W,T+=r*X,P+=r*Y,M+=r*G,R+=r*$,N+=r*Z,r=e[14],w+=r*L,_+=r*j,b+=r*C,E+=r*D,A+=r*F,O+=r*V,S+=r*z,k+=r*H,x+=r*q,I+=r*K,T+=r*W,P+=r*X,M+=r*Y,R+=r*G,N+=r*$,U+=r*Z,r=e[15],_+=r*L,b+=r*j,E+=r*C,A+=r*D,O+=r*F,S+=r*V,k+=r*z,x+=r*H,I+=r*q,T+=r*K,P+=r*W,M+=r*X,R+=r*Y,N+=r*G,U+=r*$,B+=r*Z,o+=38*b,u+=38*E,a+=38*A,s+=38*O,c+=38*S,f+=38*k,l+=38*x,h+=38*I,p+=38*T,d+=38*P,g+=38*M,v+=38*R,y+=38*N,m+=38*U,w+=38*B,i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,o+=i-1+37*(i-1),i=1,r=o+i+65535,i=Math.floor(r/65536),o=r-65536*i,r=u+i+65535,i=Math.floor(r/65536),u=r-65536*i,r=a+i+65535,i=Math.floor(r/65536),a=r-65536*i,r=s+i+65535,i=Math.floor(r/65536),s=r-65536*i,r=c+i+65535,i=Math.floor(r/65536),c=r-65536*i,r=f+i+65535,i=Math.floor(r/65536),f=r-65536*i,r=l+i+65535,i=Math.floor(r/65536),l=r-65536*i,r=h+i+65535,i=Math.floor(r/65536),h=r-65536*i,r=p+i+65535,i=Math.floor(r/65536),p=r-65536*i,r=d+i+65535,i=Math.floor(r/65536),d=r-65536*i,r=g+i+65535,i=Math.floor(r/65536),g=r-65536*i,r=v+i+65535,i=Math.floor(r/65536),v=r-65536*i,r=y+i+65535,i=Math.floor(r/65536),y=r-65536*i,r=m+i+65535,i=Math.floor(r/65536),m=r-65536*i,r=w+i+65535,i=Math.floor(r/65536),w=r-65536*i,r=_+i+65535,i=Math.floor(r/65536),_=r-65536*i,o+=i-1+37*(i-1),t[0]=o,t[1]=u,t[2]=a,t[3]=s,t[4]=c,t[5]=f,t[6]=l,t[7]=h,t[8]=p,t[9]=d,t[10]=g,t[11]=v,t[12]=y,t[13]=m,t[14]=w,t[15]=_}function T(t,e){I(t,e,e)}function P(t,e){var n,r=ee();for(n=0;16>n;n++)r[n]=e[n];for(n=253;n>=0;n--)T(r,r),2!==n&&4!==n&&I(r,r,e);for(n=0;16>n;n++)t[n]=r[n]}function M(t,e){var n,r=ee();for(n=0;16>n;n++)r[n]=e[n];for(n=250;n>=0;n--)T(r,r),1!==n&&I(r,r,e);for(n=0;16>n;n++)t[n]=r[n]}function R(t,e,n){var r,i,o=new Uint8Array(32),u=new Float64Array(80),a=ee(),s=ee(),c=ee(),f=ee(),l=ee(),h=ee();for(i=0;31>i;i++)o[i]=e[i];for(o[31]=127&e[31]|64,o[0]&=248,S(u,n),i=0;16>i;i++)s[i]=u[i],f[i]=a[i]=c[i]=0;for(a[0]=f[0]=1,i=254;i>=0;--i)r=o[i>>>3]>>>(7&i)&1,b(a,s,r),b(c,f,r),k(l,a,c),x(a,a,c),k(c,s,f),x(s,s,f),T(f,l),T(h,a),I(a,c,a),I(c,s,l),k(l,a,c),x(a,a,c),T(s,a),x(c,f,h),I(a,c,ae),k(a,a,f),I(c,c,a),I(a,f,h),I(f,s,u),T(s,l),b(a,s,r),b(c,f,r);for(i=0;16>i;i++)u[i+16]=a[i],u[i+32]=c[i],u[i+48]=s[i],u[i+64]=f[i];var p=u.subarray(32),d=u.subarray(16);return P(p,p),I(d,d,p),E(t,d),0}function N(t,e){return R(t,e,ie)}function U(t,e){return ne(e,32),N(t,e)}function B(t,e,n){var r=new Uint8Array(32);return R(r,n,e),f(t,re,r,pe)}function L(t,e,n,r,i,o){var u=new Uint8Array(32);return B(u,i,o),ge(t,e,n,r,u)}function j(t,e,n,r,i,o){var u=new Uint8Array(32);return B(u,i,o),ve(t,e,n,r,u)}function C(t,e,n,r){for(var i,o,u,a,s,c,f,l,h,p,d,g,v,y,m,w,_,b,E,A,O,S,k,x,I,T,P=new Int32Array(16),M=new Int32Array(16),R=t[0],N=t[1],U=t[2],B=t[3],L=t[4],j=t[5],C=t[6],D=t[7],F=e[0],V=e[1],z=e[2],H=e[3],q=e[4],K=e[5],W=e[6],X=e[7],Y=0;r>=128;){for(E=0;16>E;E++)A=8*E+Y,P[E]=n[A+0]<<24|n[A+1]<<16|n[A+2]<<8|n[A+3],M[E]=n[A+4]<<24|n[A+5]<<16|n[A+6]<<8|n[A+7];for(E=0;80>E;E++)if(i=R,o=N,u=U,a=B,s=L,c=j,f=C,l=D,h=F,p=V,d=z,g=H,v=q,y=K,m=W,w=X,O=D,S=X,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=(L>>>14|q<<18)^(L>>>18|q<<14)^(q>>>9|L<<23),S=(q>>>14|L<<18)^(q>>>18|L<<14)^(L>>>9|q<<23),k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,O=L&j^~L&C,S=q&K^~q&W,k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,O=ye[2*E],S=ye[2*E+1],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,O=P[E%16],S=M[E%16],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,_=65535&I|T<<16,b=65535&k|x<<16,O=_,S=b,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=(R>>>28|F<<4)^(F>>>2|R<<30)^(F>>>7|R<<25),S=(F>>>28|R<<4)^(R>>>2|F<<30)^(R>>>7|F<<25),k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,O=R&N^R&U^N&U,S=F&V^F&z^V&z,k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,l=65535&I|T<<16,w=65535&k|x<<16,O=a,S=g,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=_,S=b,k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,a=65535&I|T<<16,g=65535&k|x<<16,N=i,U=o,B=u,L=a,j=s,C=c,D=f,R=l,V=h,z=p,H=d,q=g,K=v,W=y,X=m,F=w,E%16===15)for(A=0;16>A;A++)O=P[A],S=M[A],k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=P[(A+9)%16],S=M[(A+9)%16],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,_=P[(A+1)%16],b=M[(A+1)%16],O=(_>>>1|b<<31)^(_>>>8|b<<24)^_>>>7,S=(b>>>1|_<<31)^(b>>>8|_<<24)^(b>>>7|_<<25),k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,_=P[(A+14)%16],b=M[(A+14)%16],O=(_>>>19|b<<13)^(b>>>29|_<<3)^_>>>6,S=(b>>>19|_<<13)^(_>>>29|b<<3)^(b>>>6|_<<26),k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,P[A]=65535&I|T<<16,M[A]=65535&k|x<<16;O=R,S=F,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=t[0],S=e[0],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,t[0]=R=65535&I|T<<16,e[0]=F=65535&k|x<<16,O=N,S=V,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=t[1],S=e[1],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,t[1]=N=65535&I|T<<16,e[1]=V=65535&k|x<<16,O=U,S=z,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=t[2],S=e[2],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,t[2]=U=65535&I|T<<16,e[2]=z=65535&k|x<<16,O=B,S=H,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=t[3],S=e[3],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,t[3]=B=65535&I|T<<16,e[3]=H=65535&k|x<<16,O=L,S=q,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=t[4],S=e[4],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,t[4]=L=65535&I|T<<16,e[4]=q=65535&k|x<<16,O=j,S=K,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=t[5],S=e[5],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,t[5]=j=65535&I|T<<16,e[5]=K=65535&k|x<<16,O=C,S=W,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=t[6],S=e[6],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,t[6]=C=65535&I|T<<16,e[6]=W=65535&k|x<<16,O=D,S=X,k=65535&S,x=S>>>16,I=65535&O,T=O>>>16,O=t[7],S=e[7],k+=65535&S,x+=S>>>16,I+=65535&O,T+=O>>>16,x+=k>>>16,I+=x>>>16,T+=I>>>16,t[7]=D=65535&I|T<<16,e[7]=X=65535&k|x<<16,Y+=128,r-=128}return r}function D(t,e,n){var i,o=new Int32Array(8),u=new Int32Array(8),a=new Uint8Array(256),s=n;for(o[0]=1779033703,o[1]=3144134277,o[2]=1013904242,o[3]=2773480762,o[4]=1359893119,o[5]=2600822924,o[6]=528734635,o[7]=1541459225,u[0]=4089235720,u[1]=2227873595,u[2]=4271175723,u[3]=1595750129,u[4]=2917565137,u[5]=725511199,u[6]=4215389547,u[7]=327033209,C(o,u,e,n),n%=128,i=0;n>i;i++)a[i]=e[s-n+i];for(a[n]=128,n=256-128*(112>n?1:0),a[n-9]=0,r(a,n-8,s/536870912|0,s<<3),C(o,u,a,n),i=0;8>i;i++)r(t,8*i,o[i],u[i]);return 0}function F(t,e){var n=ee(),r=ee(),i=ee(),o=ee(),u=ee(),a=ee(),s=ee(),c=ee(),f=ee();x(n,t[1],t[0]),x(f,e[1],e[0]),I(n,n,f),k(r,t[0],t[1]),k(f,e[0],e[1]),I(r,r,f),I(i,t[3],e[3]),I(i,i,ce),I(o,t[2],e[2]),k(o,o,o),x(u,r,n),x(a,o,i),k(s,o,i),k(c,r,n),I(t[0],u,a),I(t[1],c,s),I(t[2],s,a),I(t[3],u,c)}function V(t,e,n){var r;for(r=0;4>r;r++)b(t[r],e[r],n)}function z(t,e){var n=ee(),r=ee(),i=ee();P(i,e[2]),I(n,e[0],i),I(r,e[1],i),E(t,r),t[31]^=O(n)<<7}function H(t,e,n){var r,i;for(w(t[0],oe),w(t[1],ue),w(t[2],ue),w(t[3],oe),i=255;i>=0;--i)r=n[i/8|0]>>(7&i)&1,V(t,e,r),F(e,t),F(t,t),V(t,e,r)}function q(t,e){var n=[ee(),ee(),ee(),ee()];w(n[0],fe),w(n[1],le),w(n[2],ue),I(n[3],fe,le),H(t,n,e)}function K(t,e,n){var r,i=new Uint8Array(64),o=[ee(),ee(),ee(),ee()];for(n||ne(e,32),D(i,e,32),i[0]&=248,i[31]&=127,i[31]|=64,q(o,i),z(t,o),r=0;32>r;r++)e[r+32]=t[r];return 0}function W(t,e){var n,r,i,o;for(r=63;r>=32;--r){for(n=0,i=r-32,o=r-12;o>i;++i)e[i]+=n-16*e[r]*me[i-(r-32)],n=e[i]+128>>8,e[i]-=256*n;e[i]+=n,e[r]=0}for(n=0,i=0;32>i;i++)e[i]+=n-(e[31]>>4)*me[i],n=e[i]>>8,e[i]&=255;for(i=0;32>i;i++)e[i]-=n*me[i];for(r=0;32>r;r++)e[r+1]+=e[r]>>8,t[r]=255&e[r]}function X(t){var e,n=new Float64Array(64);for(e=0;64>e;e++)n[e]=t[e];for(e=0;64>e;e++)t[e]=0;W(t,n)}function Y(t,e,n,r){var i,o,u=new Uint8Array(64),a=new Uint8Array(64),s=new Uint8Array(64),c=new Float64Array(64),f=[ee(),ee(),ee(),ee()];D(u,r,32),u[0]&=248,u[31]&=127,u[31]|=64;var l=n+64;for(i=0;n>i;i++)t[64+i]=e[i];for(i=0;32>i;i++)t[32+i]=u[32+i];for(D(s,t.subarray(32),n+32),X(s),q(f,s),z(t,f),i=32;64>i;i++)t[i]=r[i];for(D(a,t,n+64),X(a),i=0;64>i;i++)c[i]=0;for(i=0;32>i;i++)c[i]=s[i];for(i=0;32>i;i++)for(o=0;32>o;o++)c[i+o]+=a[i]*u[o];return W(t.subarray(32),c),l}function G(t,e){var n=ee(),r=ee(),i=ee(),o=ee(),u=ee(),a=ee(),s=ee();return w(t[2],ue),S(t[1],e),T(i,t[1]),I(o,i,se),x(i,i,t[2]),k(o,t[2],o),T(u,o),T(a,u),I(s,a,u),I(n,s,i),I(n,n,o),M(n,n),I(n,n,i),I(n,n,o),I(n,n,o),I(t[0],n,o),T(r,t[0]),I(r,r,o),A(r,i)&&I(t[0],t[0],he),T(r,t[0]),I(r,r,o),A(r,i)?-1:(O(t[0])===e[31]>>7&&x(t[0],oe,t[0]),I(t[3],t[0],t[1]),0)}function $(t,e,n,r){var i,o,a=new Uint8Array(32),s=new Uint8Array(64),c=[ee(),ee(),ee(),ee()],f=[ee(),ee(),ee(),ee()];if(o=-1,64>n)return-1;if(G(f,r))return-1;for(i=0;n>i;i++)t[i]=e[i];for(i=0;32>i;i++)t[i+32]=r[i];if(D(s,t,n),X(s),H(c,f,s),q(f,e.subarray(32)),F(c,f),z(a,c),n-=64,u(e,0,a,0)){for(i=0;n>i;i++)t[i]=0;return-1}for(i=0;n>i;i++)t[i]=e[i+64];return o=n}function Z(t,e){if(t.length!==we)throw new Error("bad key size");if(e.length!==_e)throw new Error("bad nonce size")}function J(t,e){if(t.length!==Se)throw new Error("bad public key size");if(e.length!==ke)throw new Error("bad secret key size")}function Q(){var t,e;for(e=0;e>>13|n<<3),r=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(n>>>10|r<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(r>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,u=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|u<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(u>>>11|a<<5),s=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|s<<8),this.r[9]=s>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};de.prototype.blocks=function(t,e,n){for(var r,i,o,u,a,s,c,f,l,h,p,d,g,v,y,m,w,_,b,E=this.fin?0:2048,A=this.h[0],O=this.h[1],S=this.h[2],k=this.h[3],x=this.h[4],I=this.h[5],T=this.h[6],P=this.h[7],M=this.h[8],R=this.h[9],N=this.r[0],U=this.r[1],B=this.r[2],L=this.r[3],j=this.r[4],C=this.r[5],D=this.r[6],F=this.r[7],V=this.r[8],z=this.r[9];n>=16;)r=255&t[e+0]|(255&t[e+1])<<8,A+=8191&r,i=255&t[e+2]|(255&t[e+3])<<8,O+=8191&(r>>>13|i<<3),o=255&t[e+4]|(255&t[e+5])<<8,S+=8191&(i>>>10|o<<6),u=255&t[e+6]|(255&t[e+7])<<8,k+=8191&(o>>>7|u<<9),a=255&t[e+8]|(255&t[e+9])<<8,x+=8191&(u>>>4|a<<12),I+=a>>>1&8191,s=255&t[e+10]|(255&t[e+11])<<8,T+=8191&(a>>>14|s<<2),c=255&t[e+12]|(255&t[e+13])<<8,P+=8191&(s>>>11|c<<5),f=255&t[e+14]|(255&t[e+15])<<8,M+=8191&(c>>>8|f<<8),R+=f>>>5|E,l=0,h=l,h+=A*N,h+=5*O*z,h+=5*S*V,h+=5*k*F,h+=5*x*D,l=h>>>13,h&=8191,h+=5*I*C,h+=5*T*j,h+=5*P*L,h+=5*M*B,h+=5*R*U,l+=h>>>13,h&=8191,p=l,p+=A*U,p+=O*N,p+=5*S*z,p+=5*k*V,p+=5*x*F,l=p>>>13,p&=8191,p+=5*I*D,p+=5*T*C,p+=5*P*j,p+=5*M*L,p+=5*R*B,l+=p>>>13,p&=8191,d=l,d+=A*B,d+=O*U,d+=S*N,d+=5*k*z,d+=5*x*V,l=d>>>13,d&=8191,d+=5*I*F,d+=5*T*D,d+=5*P*C,d+=5*M*j,d+=5*R*L,l+=d>>>13,d&=8191,g=l,g+=A*L,g+=O*B,g+=S*U,g+=k*N,g+=5*x*z,l=g>>>13,g&=8191,g+=5*I*V,g+=5*T*F,g+=5*P*D,g+=5*M*C,g+=5*R*j,l+=g>>>13,g&=8191,v=l,v+=A*j,v+=O*L,v+=S*B,v+=k*U,v+=x*N,l=v>>>13,v&=8191,v+=5*I*z,v+=5*T*V,v+=5*P*F,v+=5*M*D,v+=5*R*C,l+=v>>>13,v&=8191,y=l,y+=A*C,y+=O*j,y+=S*L,y+=k*B,y+=x*U,l=y>>>13,y&=8191,y+=I*N,y+=5*T*z,y+=5*P*V,y+=5*M*F,y+=5*R*D,l+=y>>>13,y&=8191,m=l,m+=A*D,m+=O*C,m+=S*j,m+=k*L,m+=x*B,l=m>>>13,m&=8191,m+=I*U,m+=T*N,m+=5*P*z,m+=5*M*V,m+=5*R*F,l+=m>>>13,m&=8191,w=l,w+=A*F,w+=O*D,w+=S*C,w+=k*j,w+=x*L,l=w>>>13,w&=8191,w+=I*B,w+=T*U,w+=P*N,w+=5*M*z,w+=5*R*V,l+=w>>>13,w&=8191,_=l,_+=A*V,_+=O*F,_+=S*D,_+=k*C,_+=x*j,l=_>>>13,_&=8191,_+=I*L,_+=T*B,_+=P*U,_+=M*N,_+=5*R*z,l+=_>>>13,_&=8191,b=l,b+=A*z,b+=O*V,b+=S*F,b+=k*D,b+=x*C,l=b>>>13,b&=8191,b+=I*j,b+=T*L,b+=P*B,b+=M*U,b+=R*N,l+=b>>>13,b&=8191,l=(l<<2)+l|0,l=l+h|0,h=8191&l,l>>>=13,p+=l,A=h,O=p,S=d,k=g,x=v,I=y,T=m,P=w,M=_,R=b,e+=16,n-=16;this.h[0]=A,this.h[1]=O,this.h[2]=S,this.h[3]=k,this.h[4]=x,this.h[5]=I,this.h[6]=T,this.h[7]=P,this.h[8]=M,this.h[9]=R},de.prototype.finish=function(t,e){var n,r,i,o,u=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;16>o;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,o=2;10>o;o++)this.h[o]+=n,n=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,u[0]=this.h[0]+5,n=u[0]>>>13,u[0]&=8191,o=1;10>o;o++)u[o]=this.h[o]+n,n=u[o]>>>13,u[o]&=8191;for(u[9]-=8192,r=(u[9]>>>15)-1,o=0;10>o;o++)u[o]&=r;for(r=~r,o=0;10>o;o++)this.h[o]=this.h[o]&r|u[o];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),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;8>o;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},de.prototype.update=function(t,e,n){var r,i;if(this.leftover){for(i=16-this.leftover,i>n&&(i=n),r=0;i>r;r++)this.buffer[this.leftover+r]=t[e+r];if(n-=i,e+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(t,e,i),e+=i,n-=i),n){for(r=0;n>r;r++)this.buffer[this.leftover+r]=t[e+r];this.leftover+=n}};var ge=y,ve=m,ye=[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],me=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]),we=32,_e=24,be=32,Ee=16,Ae=32,Oe=32,Se=32,ke=32,xe=32,Ie=_e,Te=be,Pe=Ee,Me=64,Re=32,Ne=64,Ue=32,Be=64;t.lowlevel={crypto_core_hsalsa20:f,crypto_stream_xor:d,crypto_stream:p,crypto_stream_salsa20_xor:l,crypto_stream_salsa20:h,crypto_onetimeauth:g,crypto_onetimeauth_verify:v,crypto_verify_16:o,crypto_verify_32:u,crypto_secretbox:y,crypto_secretbox_open:m,crypto_scalarmult:R,crypto_scalarmult_base:N,crypto_box_beforenm:B,crypto_box_afternm:ge,crypto_box:L,crypto_box_open:j,crypto_box_keypair:U,crypto_hash:D,crypto_sign:Y,crypto_sign_keypair:K,crypto_sign_open:$,crypto_secretbox_KEYBYTES:we,crypto_secretbox_NONCEBYTES:_e,crypto_secretbox_ZEROBYTES:be,crypto_secretbox_BOXZEROBYTES:Ee,crypto_scalarmult_BYTES:Ae,crypto_scalarmult_SCALARBYTES:Oe,crypto_box_PUBLICKEYBYTES:Se,crypto_box_SECRETKEYBYTES:ke,crypto_box_BEFORENMBYTES:xe,crypto_box_NONCEBYTES:Ie,crypto_box_ZEROBYTES:Te,crypto_box_BOXZEROBYTES:Pe,crypto_sign_BYTES:Me,crypto_sign_PUBLICKEYBYTES:Re,crypto_sign_SECRETKEYBYTES:Ne,crypto_sign_SEEDBYTES:Ue,crypto_hash_BYTES:Be},t.util={},t.util.decodeUTF8=function(t){var e,n=unescape(encodeURIComponent(t)),r=new Uint8Array(n.length);for(e=0;en;n++)r.push(String.fromCharCode(t[n]));return btoa(r.join(""))},t.util.decodeBase64=function(t){if("undefined"==typeof atob)return new Uint8Array(Array.prototype.slice.call(new e(t,"base64"),0));var n,r=atob(t),i=new Uint8Array(r.length);for(n=0;nr)return null;for(var i=new Uint8Array(r),o=0;or;r++)i[r]=e[r];for(r=0;r=0},t.sign.keyPair=function(){var t=new Uint8Array(Re),e=new Uint8Array(Ne);return K(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(Q(t),t.length!==Ne)throw new Error("bad secret key size");for(var e=new Uint8Array(Re),n=0;nr;r++)n[r]=t[r];return K(e,n,!0),{publicKey:e,secretKey:n}},t.sign.publicKeyLength=Re,t.sign.secretKeyLength=Ne,t.sign.seedLength=Ue,t.sign.signatureLength=Me,t.hash=function(t){Q(t);var e=new Uint8Array(Be);return D(e,t,t.length),e},t.hash.hashLength=Be,t.verify=function(t,e){return Q(t,e),0===t.length||0===e.length?!1:t.length!==e.length?!1:0===i(t,0,e,0,t.length)?!0:!1},t.setPRNG=function(t){ne=t},function(){var e;"undefined"!=typeof window?(window.crypto&&window.crypto.getRandomValues?e=window.crypto:window.msCrypto&&window.msCrypto.getRandomValues&&(e=window.msCrypto),e&&t.setPRNG(function(t,n){var r,i=new Uint8Array(n);for(e.getRandomValues(i),r=0;n>r;r++)t[r]=i[r];te(i)})):(e=n(256),e&&t.setPRNG(function(t,n){var r,i=e.randomBytes(n);for(r=0;n>r;r++)t[r]=i[r];te(i)}))}()}("undefined"!=typeof t&&t.exports?t.exports:window.nacl=window.nacl||{})}).call(e,n(202).Buffer)},function(){},function(t,e,n){(function(t){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e["default"]=t,e}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var u=function(){function t(t,e){for(var n=0;n=0;--e)a+=r[i[e]];return a}function n(t){if(0===t.length)return[];var e,n,r=[0];for(e=0;e>8,r[n]&=255;for(;a;)r.push(255&a),a>>=8}for(e=0;"g"===t[e]&&e0?i|=o<r?(n.push(i|o>>-r),r+=8,i=o<>i,this.buf+=this.alphabet[31&e],i>5&&(i-=5,e=n>>i,this.buf+=this.alphabet[31&e]),i=5-i,o=n<u;u++)i=t[u],n+=i;return o+=n%256,o%256})},function(t){t.exports=function(t,e){var n;return n=function(t,n){return e(t,n)>>>0},n.signed=e,n.unsigned=n,n.model=t,n}},function(t,e,n){var r,i,o;r=n(202).Buffer,o=n(264),i=[0,7,14,9,28,27,18,21,56,63,54,49,36,35,42,45,112,119,126,121,108,107,98,101,72,79,70,65,84,83,90,93,224,231,238,233,252,251,242,245,216,223,214,209,196,195,202,205,144,151,158,153,140,139,130,133,168,175,166,161,180,179,186,189,199,192,201,206,219,220,213,210,255,248,241,246,227,228,237,234,183,176,185,190,171,172,165,162,143,136,129,134,147,148,157,154,39,32,41,46,59,60,53,50,31,24,17,22,3,4,13,10,87,80,89,94,75,76,69,66,111,104,97,102,115,116,125,122,137,142,135,128,149,146,155,156,177,182,191,184,173,170,163,164,249,254,247,240,229,226,235,236,193,198,207,200,221,218,211,212,105,110,103,96,117,114,123,124,81,86,95,88,77,74,67,68,25,30,23,16,5,2,11,12,33,38,47,40,61,58,51,52,78,73,64,71,82,85,92,91,118,113,120,127,106,109,100,99,62,57,48,55,34,37,44,43,6,1,8,15,26,29,20,19,174,169,160,167,178,181,188,187,150,145,152,159,138,141,132,131,222,217,208,215,194,197,204,203,230,225,232,239,250,253,244,243],"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),t.exports=o("crc-8",function(t,e){var n,o,u,a;for(r.isBuffer(t)||(t=r(t)),o=~~e,u=0,a=t.length;a>u;u++)n=t[u],o=255&i[255&(o^n)];return o})},function(t,e,n){var r,i,o;r=n(202).Buffer,o=n(264),i=[0,94,188,226,97,63,221,131,194,156,126,32,163,253,31,65,157,195,33,127,252,162,64,30,95,1,227,189,62,96,130,220,35,125,159,193,66,28,254,160,225,191,93,3,128,222,60,98,190,224,2,92,223,129,99,61,124,34,192,158,29,67,161,255,70,24,250,164,39,121,155,197,132,218,56,102,229,187,89,7,219,133,103,57,186,228,6,88,25,71,165,251,120,38,196,154,101,59,217,135,4,90,184,230,167,249,27,69,198,152,122,36,248,166,68,26,153,199,37,123,58,100,134,216,91,5,231,185,140,210,48,110,237,179,81,15,78,16,242,172,47,113,147,205,17,79,173,243,112,46,204,146,211,141,111,49,178,236,14,80,175,241,19,77,206,144,114,44,109,51,209,143,12,82,176,238,50,108,142,208,83,13,239,177,240,174,76,18,145,207,45,115,202,148,118,40,171,245,23,73,8,86,180,234,105,55,213,139,87,9,235,181,54,104,138,212,149,203,41,119,244,170,72,22,233,183,85,11,136,214,52,106,43,117,151,201,74,20,246,168,116,42,200,150,21,75,169,247,182,232,10,84,215,137,107,53],"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),t.exports=o("dallas-1-wire",function(t,e){var n,o,u,a;for(r.isBuffer(t)||(t=r(t)),o=~~e,u=0,a=t.length;a>u;u++)n=t[u],o=255&i[255&(o^n)];return o})},function(t,e,n){var r,i,o;r=n(202).Buffer,o=n(264),i=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448],"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),t.exports=o("crc-16",function(t,e){var n,o,u,a;for(r.isBuffer(t)||(t=r(t)),o=~~e,u=0,a=t.length;a>u;u++)n=t[u],o=65535&(i[255&(o^n)]^o>>8);return o})},function(t,e,n){var r,i,o;r=n(202).Buffer,o=n(264),i=[0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920],"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),t.exports=o("ccitt",function(t,e){var n,o,u,a;for(r.isBuffer(t)||(t=r(t)),o=null!=e?~~e:65535,u=0,a=t.length;a>u;u++)n=t[u],o=65535&(i[255&(o>>8^n)]^o<<8);return o})},function(t,e,n){var r,i,o;r=n(202).Buffer,o=n(264),i=[0,49345,49537,320,49921,960,640,49729,50689,1728,1920,51009,1280,50625,50305,1088,52225,3264,3456,52545,3840,53185,52865,3648,2560,51905,52097,2880,51457,2496,2176,51265,55297,6336,6528,55617,6912,56257,55937,6720,7680,57025,57217,8e3,56577,7616,7296,56385,5120,54465,54657,5440,55041,6080,5760,54849,53761,4800,4992,54081,4352,53697,53377,4160,61441,12480,12672,61761,13056,62401,62081,12864,13824,63169,63361,14144,62721,13760,13440,62529,15360,64705,64897,15680,65281,16320,16e3,65089,64001,15040,15232,64321,14592,63937,63617,14400,10240,59585,59777,10560,60161,11200,10880,59969,60929,11968,12160,61249,11520,60865,60545,11328,58369,9408,9600,58689,9984,59329,59009,9792,8704,58049,58241,9024,57601,8640,8320,57409,40961,24768,24960,41281,25344,41921,41601,25152,26112,42689,42881,26432,42241,26048,25728,42049,27648,44225,44417,27968,44801,28608,28288,44609,43521,27328,27520,43841,26880,43457,43137,26688,30720,47297,47489,31040,47873,31680,31360,47681,48641,32448,32640,48961,32e3,48577,48257,31808,46081,29888,30080,46401,30464,47041,46721,30272,29184,45761,45953,29504,45313,29120,28800,45121,20480,37057,37249,20800,37633,21440,21120,37441,38401,22208,22400,38721,21760,38337,38017,21568,39937,23744,23936,40257,24320,40897,40577,24128,23040,39617,39809,23360,39169,22976,22656,38977,34817,18624,18816,35137,19200,35777,35457,19008,19968,36545,36737,20288,36097,19904,19584,35905,17408,33985,34177,17728,34561,18368,18048,34369,33281,17088,17280,33601,16640,33217,32897,16448],"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),t.exports=o("crc-16-modbus",function(t,e){var n,o,u,a;for(r.isBuffer(t)||(t=r(t)),o=null!=e?~~e:65535,u=0,a=t.length;a>u;u++)n=t[u],o=65535&(i[255&(o^n)]^o>>8);return o})},function(t,e,n){var r,i;r=n(202).Buffer,i=n(264),t.exports=i("xmodem",function(t,e){var n,i,o,u;for(r.isBuffer(t)||(t=r(t)),o=null!=e?~~e:0,i=t.length,u=0;i>0;)n=o>>>8&255,n^=255&t[u++],n^=n>>>4,o=o<<8&65535,o^=n,n=n<<5&65535,o^=n,n=n<<7&65535,o^=n,i--;return o})},function(t,e,n){var r,i,o;r=n(202).Buffer,o=n(264),i=[0,8801531,9098509,825846,9692897,1419802,1651692,10452759,10584377,2608578,2839604,11344079,3303384,11807523,12104405,4128302,12930697,4391538,5217156,13227903,5679208,13690003,14450021,5910942,6606768,14844747,15604413,6837830,16197969,7431594,8256604,16494759,840169,9084178,8783076,18463,10434312,1670131,1434117,9678590,11358416,2825259,2590173,10602790,4109873,12122826,11821884,3289031,13213536,5231515,4409965,12912278,5929345,14431610,13675660,5693559,6823513,15618722,14863188,6588335,16513208,8238147,7417269,16212302,1680338,10481449,9664223,1391140,9061683,788936,36926,8838341,12067563,4091408,3340262,11844381,2868234,11372785,10555655,2579964,14478683,5939616,5650518,13661357,5180346,13190977,12967607,4428364,8219746,16457881,16234863,7468436,15633027,6866552,6578062,14816117,1405499,9649856,10463030,1698765,8819930,55329,803287,9047340,11858690,3325945,4072975,12086004,2561507,10574104,11387118,2853909,13647026,5664841,5958079,14460228,4446803,12949160,13176670,5194661,7454091,16249200,16476294,8201341,14834538,6559633,6852199,15647388,3360676,11864927,12161705,4185682,10527045,2551230,2782280,11286707,9619101,1346150,1577872,10379115,73852,8875143,9172337,899466,16124205,7357910,8182816,16421083,6680524,14918455,15678145,6911546,5736468,13747439,14507289,5968354,12873461,4334094,5159928,13170435,4167245,12180150,11879232,3346363,11301036,2767959,2532769,10545498,10360692,1596303,1360505,9604738,913813,9157998,8856728,92259,16439492,8164415,7343561,16138546,6897189,15692510,14936872,6662099,5986813,14488838,13733104,5750795,13156124,5174247,4352529,12855018,2810998,11315341,10498427,2522496,12124823,4148844,3397530,11901793,9135439,862644,110658,8912057,1606574,10407765,9590435,1317464,15706879,6940164,6651890,14889737,8145950,16384229,16161043,7394792,5123014,13133629,12910283,4370992,14535975,5997020,5707818,13718737,2504095,10516836,11329682,2796649,11916158,3383173,4130419,12143240,8893606,129117,876971,9121104,1331783,9576124,10389322,1625009,14908182,6633453,6925851,15721184,7380471,16175372,16402682,8127489,4389423,12891860,13119266,5137369,13704398,5722165,6015427,14517560],"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),t.exports=o("crc-24",function(t,e){var n,o,u,a;for(r.isBuffer(t)||(t=r(t)),o=null!=e?~~e:11994318,u=0,a=t.length;a>u;u++)n=t[u],o=16777215&(i[255&(o>>16^n)]^o<<8);return o})},function(t,e,n){var r,i,o;r=n(202).Buffer,o=n(264),i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),t.exports=o("crc-32",function(t,e){var n,o,u,a;for(r.isBuffer(t)||(t=r(t)),o=0===e?0:-1^~~e,u=0,a=t.length;a>u;u++)n=t[u],o=i[255&(o^n)]^o>>>8;return-1^o})},function(t,e,n){(function(t){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;ni;i++)r[i]=arguments[i];c.each(r,function(n){var r=n.signDecorated(e);t.signatures.push(r)})}},{key:"hash",value:function(){return o.hash(this.signatureBase())}},{key:"signatureBase",value:function(){return t.concat([s.Network.current().networkId(),o.xdr.EnvelopeType.envelopeTypeTx().toXDR(),this.tx.toXDR()])}},{key:"toEnvelope",value:function(){var t=this.tx,e=this.signatures,n=new o.xdr.TransactionEnvelope({tx:t,signatures:e});return n}}]),e}();e.Transaction=f}).call(e,n(202).Buffer)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n255))throw new Error("masterWeight value must be between 0 and 255");if(!d.isUndefined(t.lowThreshold)&&(t.lowThreshold<0||t.lowThreshold>255))throw new Error("lowThreshold value must be between 0 and 255");if(!d.isUndefined(t.medThreshold)&&(t.medThreshold<0||t.medThreshold>255))throw new Error("medThreshold value must be between 0 and 255");if(!d.isUndefined(t.highThreshold)&&(t.highThreshold<0||t.highThreshold>255))throw new Error("highThreshold value must be between 0 and 255");if(e.masterWeight=t.masterWeight,e.lowThreshold=t.lowThreshold,e.medThreshold=t.medThreshold,e.highThreshold=t.highThreshold,!d.isUndefined(t.homeDomain)&&!d.isString(t.homeDomain))throw new TypeError("homeDomain argument must be of type String");if(e.homeDomain=t.homeDomain,t.signer){if(!s.Account.isValidAddress(t.signer.address))throw new Error("signer.address is invalid");if(t.signer.weight<0||t.signer.weight>255)throw new Error("signer.weight value must be between 0 and 255");e.signer=new a["default"].Signer({pubKey:c.Keypair.fromAddress(t.signer.address).accountId(),weight:t.signer.weight})}var n=new a["default"].SetOptionsOp(e),r={};r.body=a["default"].OperationBody.setOption(n),this.setSourceAccount(r,t);var i=new a["default"].Operation(r);return i}},{key:"manageOffer",value:function(t){var e={};if(e.selling=t.selling.toXdrObject(),e.buying=t.buying.toXdrObject(),!d.isString(t.amount))throw new TypeError("amount argument must be of type String");if(e.amount=f.Hyper.fromString(t.amount),d.isUndefined(t.price))throw new TypeError("price argument is required");var n=p.best_r(t.price);if(e.price=new a["default"].Price({n:n[0],d:n[1]}),d.isUndefined(t.offerId))t.offerId="0";else if(!d.isString(t.offerId))throw new TypeError("offerId argument must be of type String");e.offerId=f.UnsignedHyper.fromString(t.offerId);var r=new a["default"].ManageOfferOp(e),i={};i.body=a["default"].OperationBody.manageOffer(r),this.setSourceAccount(i,t);var o=new a["default"].Operation(i);return o}},{key:"createPassiveOffer",value:function(t){var e={};if(e.selling=t.selling.toXdrObject(),e.buying=t.buying.toXdrObject(),!d.isString(t.amount))throw new TypeError("amount argument must be of type String");if(e.amount=f.Hyper.fromString(String(t.amount)),d.isUndefined(t.price))throw new TypeError("price argument is required");var n=p.best_r(t.price);e.price=new a["default"].Price({n:n[0],d:n[1]});var r=new a["default"].CreatePassiveOfferOp(e),i={};i.body=a["default"].OperationBody.createPassiveOffer(r),this.setSourceAccount(i,t);var o=new a["default"].Operation(i);return o}},{key:"accountMerge",value:function(t){var e={};if(!s.Account.isValidAddress(t.destination))throw new Error("destination is invalid");e.body=a["default"].OperationBody.accountMerge(c.Keypair.fromAddress(t.destination).accountId()),this.setSourceAccount(e,t);var n=new a["default"].Operation(e);return n}},{key:"inflation",value:function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e={};e.body=a["default"].OperationBody.inflation(),this.setSourceAccount(e,t);var n=new a["default"].Operation(e);return n}},{key:"setSourceAccount",value:function(t,e){if(e.source){if(!s.Account.isValidAddress(e.source))throw new Error("Source address is invalid");t.sourceAccount=c.Keypair.fromAddress(e.source).accountId()}}},{key:"operationToObject",value:function(t){function e(t){return l.encodeCheck("accountId",t.ed25519())}var n={};t.sourceAccount()&&(n.source=e(t.sourceAccount()));var r=t.body().value();switch(t.body()["switch"]().name){case"createAccount":n.type="createAccount",n.destination=e(r.destination()),n.startingBalance=r.startingBalance().toString();break;case"payment":n.type="payment",n.destination=e(r.destination()),n.asset=h.Asset.fromOperation(r.asset()),n.amount=r.amount().toString();break;case"pathPayment":n.type="pathPayment",n.sendAsset=h.Asset.fromOperation(r.sendAsset()),n.sendMax=r.sendMax().toString(),n.destination=e(r.destination()),n.destAsset=h.Asset.fromOperation(r.destAsset()),n.destAmount=r.destAmount().toString(),n.path=r.path();break;case"changeTrust":n.type="changeTrust",n.line=h.Asset.fromOperation(r.line()),n.limit=r.limit().toString();break;case"allowTrust":n.type="allowTrust",n.trustor=e(r.trustor()),n.assetCode=r.asset().value().toString(),n.assetCode=d.trimRight(n.assetCode,"\x00"),n.authorize=r.authorize();break;case"setOption":if(n.type="setOptions",r.inflationDest()&&(n.inflationDest=e(r.inflationDest())),n.clearFlags=r.clearFlags(),n.setFlags=r.setFlags(),n.masterWeight=r.masterWeight(),n.lowThreshold=r.lowThreshold(),n.medThreshold=r.medThreshold(),n.highThreshold=r.highThreshold(),n.homeDomain=r.homeDomain(),r.signer()){var i={};i.address=e(r.signer().pubKey()),i.weight=r.signer().weight(),n.signer=i}break;case"manageOffer":n.type="manageOffer",n.selling=h.Asset.fromOperation(r.selling()),n.buying=h.Asset.fromOperation(r.buying()),n.amount=r.amount().toString(),n.price=r.price().n()/r.price().d(),n.offerId=r.offerId().toString();break;case"createPassiveOffer":n.type="createPassiveOffer",n.selling=h.Asset.fromOperation(r.selling()),n.buying=h.Asset.fromOperation(r.buying()),n.amount=r.amount().toString(),n.price=r.price().n()/r.price().d();break;case"accountMerge":n.type="accountMerge",n.destination=e(r);break;case"inflation":n.type="inflation";break;default:throw new Error("Unknown operation")}return n}}]),t}();e.Operation=g},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n12)throw new Error("Asset code must be 12 characters at max");if("xlm"!==String(e).toLowerCase()&&!n)throw new Error("Issuer cannot be null");if(n&&!s.Account.isValidAddress(n))throw new Error("Issuer is invalid");this.code=e,this.issuer=n}return o(t,null,[{key:"native",value:function(){return new t("XLM")}},{key:"fromOperation",value:function(t){var e=void 0,n=void 0,r=void 0;switch(t["switch"]()){case a["default"].AssetType.assetTypeNative():return this.native();case a["default"].AssetType.assetTypeCreditAlphanum4():return e=t.alphaNum4(),r=f.encodeCheck("accountId",e.issuer().ed25519()),n=l.trimRight(e.assetCode(),"\x00"),new this(n,r);case a["default"].AssetType.assetTypeCreditAlphanum12():return e=t.alphaNum12(),r=f.encodeCheck("accountId",e.issuer().ed25519()),n=l.trimRight(e.assetCode(),"\x00"),new this(n,r);default:throw new Error("Invalid asset type: "+t["switch"]().name)}}}]),o(t,[{key:"toXdrObject",value:function(){if(this.isNative())return a["default"].Asset.assetTypeNative();
var t=void 0,e=void 0;this.code.length<=4?(t=a["default"].AssetAlphaNum4,e="assetTypeCreditAlphanum4"):(t=a["default"].AssetAlphaNum12,e="assetTypeCreditAlphanum12");var n=this.code.length<=4?4:12,r=l.padRight(this.code,n,"\x00"),i=new t({assetCode:r,issuer:c.Keypair.fromAddress(this.issuer).accountId()});return new a["default"].Asset(e,i)}},{key:"getCode",value:function(){return l.clone(this.code)}},{key:"getIssuer",value:function(){return l.clone(this.issuer)}},{key:"isNative",value:function(){return!this.issuer}},{key:"equals",value:function(t){return this.code==t.getCode()&&this.issuer==t.getIssuer()}}]),t}();e.Asset=h},function(t,e){"use strict";function n(t){for(var e,n=Math.floor(t),i=[[0,1],[1,0]],o=2;;){if(t>r)break;n=Math.floor(t),e=t-n;var u=n*i[o-1][0]+i[o-2][0],a=n*i[o-1][1]+i[o-2][1];if(u>r||a>r)break;if(i.push([u,a]),0===e)break;t=1/e,o+=1}return i[i.length-1]}Object.defineProperty(e,"__esModule",{value:!0}),e.best_r=n;var r=2147483647},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n32)throw new Error("Text should be < 32 bytes (ascii encoded). Got "+t.byteLength(e,"ascii"));return a["default"].Memo.memoText(e)}},{key:"id",value:function(t){if("NaN"===Number(t))throw new Error("Expects a int64 as a string. Got "+t);return a["default"].Memo.memoId(t)}},{key:"hash",value:function(e){if("string"==typeof e&&32!=t.byteLength(e))throw new Error("Expects a 32 byte hash value. Got "+t.byteLength(e)+" bytes instead");return a["default"].Memo.memoHash(e)}},{key:"returnHash",value:function(e){if("string"==typeof e&&32!=t.byteLength(e))throw new Error("Expects a 32 byte hash value. Got "+t.byteLength(e)+" bytes instead");return a["default"].Memo.memoReturn(e)}}]),e}();e.Memo=s}).call(e,n(202).Buffer)}]);