forked from dchest/tweetnacl-js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnacl-fast.min.js
1 lines (1 loc) · 31.1 KB
/
nacl-fast.min.js
1
!function(i){var w=function(r){var t,n=new Float64Array(16);if(r)for(t=0;t<r.length;t++)n[t]=r[t];return n},h=function(){throw new Error("no PRNG")},C=new Uint8Array(16),e=new Uint8Array(32),s=(e[0]=9,w()),u=w([1]),F=w([56129,1]),I=w([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),Z=w([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),G=w([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),q=w([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),D=w([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function V(r,t,n,e){r[t]=n>>24&255,r[t+1]=n>>16&255,r[t+2]=n>>8&255,r[t+3]=255&n,r[t+4]=e>>24&255,r[t+5]=e>>16&255,r[t+6]=e>>8&255,r[t+7]=255&e}function o(r,t,n,e,o){for(var i=0,h=0;h<o;h++)i|=r[t+h]^n[e+h];return(1&i-1>>>8)-1}function X(r,t,n,e){return o(r,t,n,e,16)}function c(r,t,n,e){return o(r,t,n,e,32)}function y(r,t,n,e){for(var o,i=255&(e=e)[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=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,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,t=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,w=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,p=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,b=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,n=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,e=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=i,A=h,_=a,U=f,d=s,E=u,x=c,M=y,m=l,B=t,S=w,k=p,K=v,Y=b,L=n,T=e,z=0;z<20;z+=2)g^=(o=(K^=(o=(m^=(o=(d^=(o=g+K|0)<<7|o>>>25)+g|0)<<9|o>>>23)+d|0)<<13|o>>>19)+m|0)<<18|o>>>14,E^=(o=(A^=(o=(Y^=(o=(B^=(o=E+A|0)<<7|o>>>25)+E|0)<<9|o>>>23)+B|0)<<13|o>>>19)+Y|0)<<18|o>>>14,S^=(o=(x^=(o=(_^=(o=(L^=(o=S+x|0)<<7|o>>>25)+S|0)<<9|o>>>23)+L|0)<<13|o>>>19)+_|0)<<18|o>>>14,T^=(o=(k^=(o=(M^=(o=(U^=(o=T+k|0)<<7|o>>>25)+T|0)<<9|o>>>23)+U|0)<<13|o>>>19)+M|0)<<18|o>>>14,g^=(o=(U^=(o=(_^=(o=(A^=(o=g+U|0)<<7|o>>>25)+g|0)<<9|o>>>23)+A|0)<<13|o>>>19)+_|0)<<18|o>>>14,E^=(o=(d^=(o=(M^=(o=(x^=(o=E+d|0)<<7|o>>>25)+E|0)<<9|o>>>23)+x|0)<<13|o>>>19)+M|0)<<18|o>>>14,S^=(o=(B^=(o=(m^=(o=(k^=(o=S+B|0)<<7|o>>>25)+S|0)<<9|o>>>23)+k|0)<<13|o>>>19)+m|0)<<18|o>>>14,T^=(o=(L^=(o=(Y^=(o=(K^=(o=T+L|0)<<7|o>>>25)+T|0)<<9|o>>>23)+K|0)<<13|o>>>19)+Y|0)<<18|o>>>14;A=A+h|0,_=_+a|0,U=U+f|0,d=d+s|0,E=E+u|0,x=x+c|0,M=M+y|0,m=m+l|0,B=B+t|0,S=S+w|0,k=k+p|0,K=K+v|0,Y=Y+b|0,L=L+n|0,T=T+e|0,r[0]=(g=g+i|0)>>>0&255,r[1]=g>>>8&255,r[2]=g>>>16&255,r[3]=g>>>24&255,r[4]=A>>>0&255,r[5]=A>>>8&255,r[6]=A>>>16&255,r[7]=A>>>24&255,r[8]=_>>>0&255,r[9]=_>>>8&255,r[10]=_>>>16&255,r[11]=_>>>24&255,r[12]=U>>>0&255,r[13]=U>>>8&255,r[14]=U>>>16&255,r[15]=U>>>24&255,r[16]=d>>>0&255,r[17]=d>>>8&255,r[18]=d>>>16&255,r[19]=d>>>24&255,r[20]=E>>>0&255,r[21]=E>>>8&255,r[22]=E>>>16&255,r[23]=E>>>24&255,r[24]=x>>>0&255,r[25]=x>>>8&255,r[26]=x>>>16&255,r[27]=x>>>24&255,r[28]=M>>>0&255,r[29]=M>>>8&255,r[30]=M>>>16&255,r[31]=M>>>24&255,r[32]=m>>>0&255,r[33]=m>>>8&255,r[34]=m>>>16&255,r[35]=m>>>24&255,r[36]=B>>>0&255,r[37]=B>>>8&255,r[38]=B>>>16&255,r[39]=B>>>24&255,r[40]=S>>>0&255,r[41]=S>>>8&255,r[42]=S>>>16&255,r[43]=S>>>24&255,r[44]=k>>>0&255,r[45]=k>>>8&255,r[46]=k>>>16&255,r[47]=k>>>24&255,r[48]=K>>>0&255,r[49]=K>>>8&255,r[50]=K>>>16&255,r[51]=K>>>24&255,r[52]=Y>>>0&255,r[53]=Y>>>8&255,r[54]=Y>>>16&255,r[55]=Y>>>24&255,r[56]=L>>>0&255,r[57]=L>>>8&255,r[58]=L>>>16&255,r[59]=L>>>24&255,r[60]=T>>>0&255,r[61]=T>>>8&255,r[62]=T>>>16&255,r[63]=T>>>24&255}function l(r,t,n,e){for(var o,i=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,h=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,f=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,s=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,u=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,y=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,l=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,w=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,v=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,g=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,A=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,_=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,U=0;U<20;U+=2)i^=(o=(b^=(o=(l^=(o=(s^=(o=i+b|0)<<7|o>>>25)+i|0)<<9|o>>>23)+s|0)<<13|o>>>19)+l|0)<<18|o>>>14,u^=(o=(h^=(o=(g^=(o=(w^=(o=u+h|0)<<7|o>>>25)+u|0)<<9|o>>>23)+w|0)<<13|o>>>19)+g|0)<<18|o>>>14,p^=(o=(c^=(o=(a^=(o=(A^=(o=p+c|0)<<7|o>>>25)+p|0)<<9|o>>>23)+A|0)<<13|o>>>19)+a|0)<<18|o>>>14,_^=(o=(v^=(o=(y^=(o=(f^=(o=_+v|0)<<7|o>>>25)+_|0)<<9|o>>>23)+f|0)<<13|o>>>19)+y|0)<<18|o>>>14,i^=(o=(f^=(o=(a^=(o=(h^=(o=i+f|0)<<7|o>>>25)+i|0)<<9|o>>>23)+h|0)<<13|o>>>19)+a|0)<<18|o>>>14,u^=(o=(s^=(o=(y^=(o=(c^=(o=u+s|0)<<7|o>>>25)+u|0)<<9|o>>>23)+c|0)<<13|o>>>19)+y|0)<<18|o>>>14,p^=(o=(w^=(o=(l^=(o=(v^=(o=p+w|0)<<7|o>>>25)+p|0)<<9|o>>>23)+v|0)<<13|o>>>19)+l|0)<<18|o>>>14,_^=(o=(A^=(o=(g^=(o=(b^=(o=_+A|0)<<7|o>>>25)+_|0)<<9|o>>>23)+b|0)<<13|o>>>19)+g|0)<<18|o>>>14;r[0]=i>>>0&255,r[1]=i>>>8&255,r[2]=i>>>16&255,r[3]=i>>>24&255,r[4]=u>>>0&255,r[5]=u>>>8&255,r[6]=u>>>16&255,r[7]=u>>>24&255,r[8]=p>>>0&255,r[9]=p>>>8&255,r[10]=p>>>16&255,r[11]=p>>>24&255,r[12]=_>>>0&255,r[13]=_>>>8&255,r[14]=_>>>16&255,r[15]=_>>>24&255,r[16]=c>>>0&255,r[17]=c>>>8&255,r[18]=c>>>16&255,r[19]=c>>>24&255,r[20]=y>>>0&255,r[21]=y>>>8&255,r[22]=y>>>16&255,r[23]=y>>>24&255,r[24]=l>>>0&255,r[25]=l>>>8&255,r[26]=l>>>16&255,r[27]=l>>>24&255,r[28]=w>>>0&255,r[29]=w>>>8&255,r[30]=w>>>16&255,r[31]=w>>>24&255}var p=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function j(r,t,n,e,o,i,h){for(var a,f=new Uint8Array(16),s=new Uint8Array(64),u=0;u<16;u++)f[u]=0;for(u=0;u<8;u++)f[u]=i[u];for(;64<=o;){for(y(s,f,h,p),u=0;u<64;u++)r[t+u]=n[e+u]^s[u];for(a=1,u=8;u<16;u++)a=a+(255&f[u])|0,f[u]=255&a,a>>>=8;o-=64,t+=64,e+=64}if(0<o)for(y(s,f,h,p),u=0;u<o;u++)r[t+u]=n[e+u]^s[u];return 0}function H(r,t,n,e,o){for(var i,h=new Uint8Array(16),a=new Uint8Array(64),f=0;f<16;f++)h[f]=0;for(f=0;f<8;f++)h[f]=e[f];for(;64<=n;){for(y(a,h,o,p),f=0;f<64;f++)r[t+f]=a[f];for(i=1,f=8;f<16;f++)i=i+(255&h[f])|0,h[f]=255&i,i>>>=8;n-=64,t+=64}if(0<n)for(y(a,h,o,p),f=0;f<n;f++)r[t+f]=a[f];return 0}function J(r,t,n,e,o){for(var i=new Uint8Array(32),h=(l(i,e,o,p),new Uint8Array(8)),a=0;a<8;a++)h[a]=e[a+16];return H(r,t,n,h,i)}function a(r,t,n,e,o,i,h){for(var a=new Uint8Array(32),f=(l(a,i,h,p),new Uint8Array(8)),s=0;s<8;s++)f[s]=i[s+16];return j(r,t,n,e,o,f,a)}var f=function(r){var t,n;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,t=255&r[this.fin=0]|(255&r[1])<<8,this.r[0]=8191&t,n=255&r[2]|(255&r[3])<<8,this.r[1]=8191&(t>>>13|n<<3),t=255&r[4]|(255&r[5])<<8,this.r[2]=7939&(n>>>10|t<<6),n=255&r[6]|(255&r[7])<<8,this.r[3]=8191&(t>>>7|n<<9),t=255&r[8]|(255&r[9])<<8,this.r[4]=255&(n>>>4|t<<12),this.r[5]=t>>>1&8190,n=255&r[10]|(255&r[11])<<8,this.r[6]=8191&(t>>>14|n<<2),t=255&r[12]|(255&r[13])<<8,this.r[7]=8065&(n>>>11|t<<5),n=255&r[14]|(255&r[15])<<8,this.r[8]=8191&(t>>>8|n<<8),this.r[9]=n>>>5&127,this.pad[0]=255&r[16]|(255&r[17])<<8,this.pad[1]=255&r[18]|(255&r[19])<<8,this.pad[2]=255&r[20]|(255&r[21])<<8,this.pad[3]=255&r[22]|(255&r[23])<<8,this.pad[4]=255&r[24]|(255&r[25])<<8,this.pad[5]=255&r[26]|(255&r[27])<<8,this.pad[6]=255&r[28]|(255&r[29])<<8,this.pad[7]=255&r[30]|(255&r[31])<<8};function v(r,t,n,e,o,i){i=new f(i);return i.update(n,e,o),i.finish(r,t),0}function Q(r,t,n,e,o,i){var h=new Uint8Array(16);return v(h,0,n,e,o,i),X(r,t,h,0)}function b(r,t,n,e,o){var i;if(n<32)return-1;for(a(r,0,t,0,n,e,o),v(r,16,r,32,n-32,r),i=0;i<16;i++)r[i]=0;return 0}function g(r,t,n,e,o){var i,h=new Uint8Array(32);if(n<32)return-1;if(J(h,0,32,e,o),0!==Q(t,16,t,32,n-32,h))return-1;for(a(r,0,t,0,n,e,o),i=0;i<32;i++)r[i]=0;return 0}function A(r,t){for(var n=0;n<16;n++)r[n]=0|t[n]}function _(r){for(var t,n=1,e=0;e<16;e++)t=r[e]+n+65535,n=Math.floor(t/65536),r[e]=t-65536*n;r[0]+=n-1+37*(n-1)}function U(r,t,n){for(var e,o=~(n-1),i=0;i<16;i++)e=o&(r[i]^t[i]),r[i]^=e,t[i]^=e}function d(r,t){for(var n,e,o=w(),i=w(),h=0;h<16;h++)i[h]=t[h];for(_(i),_(i),_(i),n=0;n<2;n++){for(o[0]=i[0]-65517,h=1;h<15;h++)o[h]=i[h]-65535-(o[h-1]>>16&1),o[h-1]&=65535;o[15]=i[15]-32767-(o[14]>>16&1),e=o[15]>>16&1,o[14]&=65535,U(i,o,1-e)}for(h=0;h<16;h++)r[2*h]=255&i[h],r[2*h+1]=i[h]>>8}function W(r,t){var n=new Uint8Array(32),e=new Uint8Array(32);return d(n,r),d(e,t),c(n,0,e,0)}function $(r){var t=new Uint8Array(32);return d(t,r),1&t[0]}function E(r,t){for(var n=0;n<16;n++)r[n]=t[2*n]+(t[2*n+1]<<8);r[15]&=32767}function x(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]+n[e]}function M(r,t,n){for(var e=0;e<16;e++)r[e]=t[e]-n[e]}function m(r,t,n){var P=0,N=0,O=0,C=0,e=0,o=0,i=0,h=0,a=0,f=0,s=0,u=0,c=0,y=0,l=0,w=0,p=0,v=0,b=0,g=0,A=0,F=0,I=0,Z=0,G=0,q=0,D=0,V=0,X=0,j=0,H=0,_=n[0],U=n[1],d=n[2],E=n[3],x=n[4],M=n[5],m=n[6],B=n[7],S=n[8],k=n[9],K=n[10],Y=n[11],L=n[12],T=n[13],z=n[14],n=n[15],R=t[0];P+=R*_,O+=R*d,C+=R*E,e+=R*x,o+=R*M,i+=R*m,h+=R*B,a+=R*S,f+=R*k,s+=R*K,u+=R*Y,c+=R*L,y+=R*T,l+=R*z,w+=R*n,N=0+R*U+(R=t[1])*_,C+=R*d,e+=R*E,o+=R*x,i+=R*M,h+=R*m,a+=R*B,f+=R*S,s+=R*k,u+=R*K,c+=R*Y,y+=R*L,l+=R*T,w+=R*z,p+=R*n,O=O+R*U+(R=t[2])*_,e+=R*d,o+=R*E,i+=R*x,h+=R*M,a+=R*m,f+=R*B,s+=R*S,u+=R*k,c+=R*K,y+=R*Y,l+=R*L,w+=R*T,p+=R*z,v+=R*n,C=C+R*U+(R=t[3])*_,o+=R*d,i+=R*E,h+=R*x,a+=R*M,f+=R*m,s+=R*B,u+=R*S,c+=R*k,y+=R*K,l+=R*Y,w+=R*L,p+=R*T,v+=R*z,b+=R*n,e=e+R*U+(R=t[4])*_,i+=R*d,h+=R*E,a+=R*x,f+=R*M,s+=R*m,u+=R*B,c+=R*S,y+=R*k,l+=R*K,w+=R*Y,p+=R*L,v+=R*T,b+=R*z,g+=R*n,o=o+R*U+(R=t[5])*_,h+=R*d,a+=R*E,f+=R*x,s+=R*M,u+=R*m,c+=R*B,y+=R*S,l+=R*k,w+=R*K,p+=R*Y,v+=R*L,b+=R*T,g+=R*z,A+=R*n,i=i+R*U+(R=t[6])*_,a+=R*d,f+=R*E,s+=R*x,u+=R*M,c+=R*m,y+=R*B,l+=R*S,w+=R*k,p+=R*K,v+=R*Y,b+=R*L,g+=R*T,A+=R*z,F+=R*n,h=h+R*U+(R=t[7])*_,f+=R*d,s+=R*E,u+=R*x,c+=R*M,y+=R*m,l+=R*B,w+=R*S,p+=R*k,v+=R*K,b+=R*Y,g+=R*L,A+=R*T,F+=R*z,I+=R*n,a=a+R*U+(R=t[8])*_,s+=R*d,u+=R*E,c+=R*x,y+=R*M,l+=R*m,w+=R*B,p+=R*S,v+=R*k,b+=R*K,g+=R*Y,A+=R*L,F+=R*T,I+=R*z,Z+=R*n,f=f+R*U+(R=t[9])*_,u+=R*d,c+=R*E,y+=R*x,l+=R*M,w+=R*m,p+=R*B,v+=R*S,b+=R*k,g+=R*K,A+=R*Y,F+=R*L,I+=R*T,Z+=R*z,G+=R*n,s=s+R*U+(R=t[10])*_,c+=R*d,y+=R*E,l+=R*x,w+=R*M,p+=R*m,v+=R*B,b+=R*S,g+=R*k,A+=R*K,F+=R*Y,I+=R*L,Z+=R*T,G+=R*z,q+=R*n,u=u+R*U+(R=t[11])*_,y+=R*d,l+=R*E,w+=R*x,p+=R*M,v+=R*m,b+=R*B,g+=R*S,A+=R*k,F+=R*K,I+=R*Y,Z+=R*L,G+=R*T,q+=R*z,D+=R*n,c=c+R*U+(R=t[12])*_,l+=R*d,w+=R*E,p+=R*x,v+=R*M,b+=R*m,g+=R*B,A+=R*S,F+=R*k,I+=R*K,Z+=R*Y,G+=R*L,q+=R*T,D+=R*z,V+=R*n,y=y+R*U+(R=t[13])*_,w+=R*d,p+=R*E,v+=R*x,b+=R*M,g+=R*m,A+=R*B,F+=R*S,I+=R*k,Z+=R*K,G+=R*Y,q+=R*L,D+=R*T,V+=R*z,X+=R*n,l=l+R*U+(R=t[14])*_,p+=R*d,v+=R*E,b+=R*x,g+=R*M,A+=R*m,F+=R*B,I+=R*S,Z+=R*k,G+=R*K,q+=R*Y,D+=R*L,V+=R*T,X+=R*z,j+=R*n,w=w+R*U+(R=t[15])*_,N+=38*(v+=R*d),O+=38*(b+=R*E),C+=38*(g+=R*x),e+=38*(A+=R*M),o+=38*(F+=R*m),i+=38*(I+=R*B),h+=38*(Z+=R*S),a+=38*(G+=R*k),f+=38*(q+=R*K),s+=38*(D+=R*Y),u+=38*(V+=R*L),c+=38*(X+=R*T),y+=38*(j+=R*z),l+=38*(H+=R*n),P=(R=1+(P+=38*(p+=R*U))+65535)-65536*(t=Math.floor(R/65536)),N=(R=N+t+65535)-65536*(t=Math.floor(R/65536)),O=(R=O+t+65535)-65536*(t=Math.floor(R/65536)),C=(R=C+t+65535)-65536*(t=Math.floor(R/65536)),e=(R=e+t+65535)-65536*(t=Math.floor(R/65536)),o=(R=o+t+65535)-65536*(t=Math.floor(R/65536)),i=(R=i+t+65535)-65536*(t=Math.floor(R/65536)),h=(R=h+t+65535)-65536*(t=Math.floor(R/65536)),a=(R=a+t+65535)-65536*(t=Math.floor(R/65536)),f=(R=f+t+65535)-65536*(t=Math.floor(R/65536)),s=(R=s+t+65535)-65536*(t=Math.floor(R/65536)),u=(R=u+t+65535)-65536*(t=Math.floor(R/65536)),c=(R=c+t+65535)-65536*(t=Math.floor(R/65536)),y=(R=y+t+65535)-65536*(t=Math.floor(R/65536)),l=(R=l+t+65535)-65536*(t=Math.floor(R/65536)),w=(R=w+t+65535)-65536*(t=Math.floor(R/65536)),P+=t-1+37*(t-1),P=(R=1+P+65535)-65536*(t=Math.floor(R/65536)),N=(R=N+t+65535)-65536*(t=Math.floor(R/65536)),O=(R=O+t+65535)-65536*(t=Math.floor(R/65536)),C=(R=C+t+65535)-65536*(t=Math.floor(R/65536)),e=(R=e+t+65535)-65536*(t=Math.floor(R/65536)),o=(R=o+t+65535)-65536*(t=Math.floor(R/65536)),i=(R=i+t+65535)-65536*(t=Math.floor(R/65536)),h=(R=h+t+65535)-65536*(t=Math.floor(R/65536)),a=(R=a+t+65535)-65536*(t=Math.floor(R/65536)),f=(R=f+t+65535)-65536*(t=Math.floor(R/65536)),s=(R=s+t+65535)-65536*(t=Math.floor(R/65536)),u=(R=u+t+65535)-65536*(t=Math.floor(R/65536)),c=(R=c+t+65535)-65536*(t=Math.floor(R/65536)),y=(R=y+t+65535)-65536*(t=Math.floor(R/65536)),l=(R=l+t+65535)-65536*(t=Math.floor(R/65536)),w=(R=w+t+65535)-65536*(t=Math.floor(R/65536)),r[0]=P+=t-1+37*(t-1),r[1]=N,r[2]=O,r[3]=C,r[4]=e,r[5]=o,r[6]=i,r[7]=h,r[8]=a,r[9]=f,r[10]=s,r[11]=u,r[12]=c,r[13]=y,r[14]=l,r[15]=w}function B(r,t){m(r,t,t)}function r5(r,t){for(var n=w(),e=0;e<16;e++)n[e]=t[e];for(e=253;0<=e;e--)B(n,n),2!==e&&4!==e&&m(n,n,t);for(e=0;e<16;e++)r[e]=n[e]}function t5(r,t){for(var n=w(),e=0;e<16;e++)n[e]=t[e];for(e=250;0<=e;e--)B(n,n),1!==e&&m(n,n,t);for(e=0;e<16;e++)r[e]=n[e]}function S(r,t,n){for(var e,o=new Uint8Array(32),i=new Float64Array(80),h=w(),a=w(),f=w(),s=w(),u=w(),c=w(),y=0;y<31;y++)o[y]=t[y];for(o[31]=127&t[31]|64,o[0]&=248,E(i,n),y=0;y<16;y++)a[y]=i[y],s[y]=h[y]=f[y]=0;for(h[0]=s[0]=1,y=254;0<=y;--y)U(h,a,e=o[y>>>3]>>>(7&y)&1),U(f,s,e),x(u,h,f),M(h,h,f),x(f,a,s),M(a,a,s),B(s,u),B(c,h),m(h,f,h),m(f,a,u),x(u,h,f),M(h,h,f),B(a,h),M(f,s,c),m(h,f,F),x(h,h,s),m(f,f,h),m(h,s,c),m(s,a,i),B(a,u),U(h,a,e),U(f,s,e);for(y=0;y<16;y++)i[y+16]=h[y],i[y+32]=f[y],i[y+48]=a[y],i[y+64]=s[y];var n=i.subarray(32),l=i.subarray(16);return r5(n,n),m(l,l,n),d(r,l),0}function n(r,t){return S(r,t,e)}function n5(r,t){return h(t,32),n(r,t)}function k(r,t,n){var e=new Uint8Array(32);return S(e,n,t),l(r,C,e,p)}f.prototype.blocks=function(r,t,n){for(var e,o,i,h,a,f,s,u,c,y,l,w=this.fin?0:2048,p=this.h[0],v=this.h[1],b=this.h[2],g=this.h[3],A=this.h[4],_=this.h[5],U=this.h[6],d=this.h[7],E=this.h[8],x=this.h[9],M=this.r[0],m=this.r[1],B=this.r[2],S=this.r[3],k=this.r[4],K=this.r[5],Y=this.r[6],L=this.r[7],T=this.r[8],z=this.r[9];16<=n;)o=e=0,e=(o=(o=(o+=(p+=8191&(i=255&r[t+0]|(255&r[t+1])<<8))*M)+(v+=8191&(i>>>13|(i=255&r[t+2]|(255&r[t+3])<<8)<<3))*(5*z)+(b+=8191&(i>>>10|(i=255&r[t+4]|(255&r[t+5])<<8)<<6))*(5*T))+(g+=8191&(i>>>7|(i=255&r[t+6]|(255&r[t+7])<<8)<<9))*(5*L)+(A+=8191&(i>>>4|(i=255&r[t+8]|(255&r[t+9])<<8)<<12))*(5*Y))>>>13,i=e+=(o=(o=(o=(o&8191)+(_+=i>>>1&8191)*(5*K))+(U+=8191&(i>>>14|(i=255&r[t+10]|(255&r[t+11])<<8)<<2))*(5*k)+(d+=8191&(i>>>11|(i=255&r[t+12]|(255&r[t+13])<<8)<<5))*(5*S))+(E+=8191&(i>>>8|(i=255&r[t+14]|(255&r[t+15])<<8)<<8))*(5*B)+(x+=i>>>5|w)*(5*m))>>>13,e=(i=(i=(i+=p*m)+v*M+b*(5*z))+g*(5*T)+A*(5*L))>>>13,h=e+=(i=(i=(i=(i&8191)+_*(5*Y))+U*(5*K)+d*(5*k))+E*(5*S)+x*(5*B))>>>13,e=(h=(h=(h+=p*B)+v*m+b*M)+g*(5*z)+A*(5*T))>>>13,a=e+=(h=(h=(h=(h&8191)+_*(5*L))+U*(5*Y)+d*(5*K))+E*(5*k)+x*(5*S))>>>13,e=(a=(a=(a+=p*S)+v*B+b*m)+g*M+A*(5*z))>>>13,f=e+=(a=(a=(a=(a&8191)+_*(5*T))+U*(5*L)+d*(5*Y))+E*(5*K)+x*(5*k))>>>13,e=(f=(f=(f+=p*k)+v*S+b*B)+g*m+A*M)>>>13,s=e+=(f=(f=(f=(f&8191)+_*(5*z))+U*(5*T)+d*(5*L))+E*(5*Y)+x*(5*K))>>>13,e=(s=(s=(s+=p*K)+v*k+b*S)+g*B+A*m)>>>13,u=e+=(s=(s=(s=(s&8191)+_*M)+U*(5*z)+d*(5*T))+E*(5*L)+x*(5*Y))>>>13,e=(u=(u=(u+=p*Y)+v*K+b*k)+g*S+A*B)>>>13,c=e+=(u=(u=(u=(u&8191)+_*m)+U*M+d*(5*z))+E*(5*T)+x*(5*L))>>>13,e=(c=(c=(c+=p*L)+v*Y+b*K)+g*k+A*S)>>>13,y=e+=(c=(c=(c=(c&8191)+_*B)+U*m+d*M)+E*(5*z)+x*(5*T))>>>13,e=(y=(y=(y+=p*T)+v*L+b*Y)+g*K+A*k)>>>13,l=e+=(y=(y=(y=(y&8191)+_*S)+U*B+d*m)+E*M+x*(5*z))>>>13,e=(l=(l=(l+=p*z)+v*T+b*L)+g*Y+A*K)>>>13,p=o=8191&(e=(e=((e+=(l=(l=(l=(l&8191)+_*k)+U*S+d*B)+E*m+x*M)>>>13)<<2)+e|0)+(o&=8191)|0),v=i=(i&8191)+(e>>>=13),b=h&=8191,g=a&=8191,A=f&=8191,_=s&=8191,U=u&=8191,d=c&=8191,E=y&=8191,x=l&=8191,t+=16,n-=16;this.h[0]=p,this.h[1]=v,this.h[2]=b,this.h[3]=g,this.h[4]=A,this.h[5]=_,this.h[6]=U,this.h[7]=d,this.h[8]=E,this.h[9]=x},f.prototype.finish=function(r,t){var n,e,o,i,h=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(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=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,h[0]=this.h[0]+5,n=h[0]>>>13,h[0]&=8191,i=1;i<10;i++)h[i]=this.h[i]+n,n=h[i]>>>13,h[i]&=8191;for(h[9]-=8192,e=(1^n)-1,i=0;i<10;i++)h[i]&=e;for(e=~e,i=0;i<10;i++)this.h[i]=this.h[i]&e|h[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),o=this.h[0]+this.pad[0],this.h[0]=65535&o,i=1;i<8;i++)o=(this.h[i]+this.pad[i]|0)+(o>>>16)|0,this.h[i]=65535&o;r[t+0]=this.h[0]>>>0&255,r[t+1]=this.h[0]>>>8&255,r[t+2]=this.h[1]>>>0&255,r[t+3]=this.h[1]>>>8&255,r[t+4]=this.h[2]>>>0&255,r[t+5]=this.h[2]>>>8&255,r[t+6]=this.h[3]>>>0&255,r[t+7]=this.h[3]>>>8&255,r[t+8]=this.h[4]>>>0&255,r[t+9]=this.h[4]>>>8&255,r[t+10]=this.h[5]>>>0&255,r[t+11]=this.h[5]>>>8&255,r[t+12]=this.h[6]>>>0&255,r[t+13]=this.h[6]>>>8&255,r[t+14]=this.h[7]>>>0&255,r[t+15]=this.h[7]>>>8&255},f.prototype.update=function(r,t,n){var e,o;if(this.leftover){for(n<(o=16-this.leftover)&&(o=n),e=0;e<o;e++)this.buffer[this.leftover+e]=r[t+e];if(n-=o,t+=o,this.leftover+=o,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(16<=n&&(this.blocks(r,t,o=n-n%16),t+=o,n-=o),n){for(e=0;e<n;e++)this.buffer[this.leftover+e]=r[t+e];this.leftover+=n}};var e5=b,o5=g;var i5=[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 h5(r,t,n,e){for(var o,i,h,a,P,N,O,C,F,I,Z,G,q,D,V,X,f,s,u,c,y,l,w,p,v,b,g=new Int32Array(16),A=new Int32Array(16),_=r[0],U=r[1],d=r[2],E=r[3],x=r[4],M=r[5],m=r[6],B=r[7],S=t[0],k=t[1],K=t[2],Y=t[3],L=t[4],T=t[5],z=t[6],R=t[7],j=0;128<=e;){for(u=0;u<16;u++)g[u]=n[(c=8*u+j)+0]<<24|n[c+1]<<16|n[c+2]<<8|n[c+3],A[u]=n[c+4]<<24|n[c+5]<<16|n[c+6]<<8|n[c+7];for(u=0;u<80;u++)if(o=_,i=U,h=d,a=E,F=S,I=k,Z=K,G=Y,w=65535&(l=R),p=l>>>16,v=65535&(y=B),b=y>>>16,p+=(l=((q=L)>>>14|(P=x)<<18)^(L>>>18|x<<14)^(x>>>9|L<<23))>>>16,b+=(y=(x>>>14|L<<18)^(x>>>18|L<<14)^(L>>>9|x<<23))>>>16,w=w+(65535&l)+(65535&(l=L&(D=T)^~L&(V=z))),p+=l>>>16,v=v+(65535&y)+(65535&(y=x&(N=M)^~x&(O=m))),b+=y>>>16,y=i5[2*u],w+=65535&(l=i5[2*u+1]),p+=l>>>16,b+=y>>>16,v=(v+=65535&y)+(65535&(y=g[u%16]))+((p=p+((l=A[u%16])>>>16)+((w+=65535&l)>>>16))>>>16),w=65535&(l=s=65535&w|p<<16),p=l>>>16,v=65535&(y=f=65535&v|(b=b+(y>>>16)+(v>>>16))<<16),b=y>>>16,w+=65535&(l=(S>>>28|_<<4)^(_>>>2|S<<30)^(_>>>7|S<<25)),b+=(y=(_>>>28|S<<4)^(S>>>2|_<<30)^(S>>>7|_<<25))>>>16,C=65535&(v=(v+=65535&y)+(65535&(y=_&U^_&d^U&d))+((p=(p+=l>>>16)+((l=S&k^S&K^k&K)>>>16)+((w+=65535&l)>>>16))>>>16))|(b=b+(y>>>16)+(v>>>16))<<16,X=65535&w|p<<16,w=65535&(l=G),b=(y=a)>>>16,U=o,d=i,E=h,x=65535&(v=(v=65535&y)+(65535&(y=f))+((p=(p=l>>>16)+((l=s)>>>16)+((w+=65535&l)>>>16))>>>16))|(b=b+(y>>>16)+(v>>>16))<<16,M=P,m=N,B=O,_=C,k=F,K=I,Y=Z,L=65535&w|p<<16,T=q,z=D,R=V,S=X,u%16==15)for(c=0;c<16;c++)y=g[c],w=65535&(l=A[c]),p=l>>>16,v=65535&y,b=y>>>16,y=g[(c+9)%16],w+=65535&(l=A[(c+9)%16]),p+=l>>>16,v+=65535&y,b+=y>>>16,f=g[(c+1)%16],w+=65535&(l=((s=A[(c+1)%16])>>>1|f<<31)^(s>>>8|f<<24)^(s>>>7|f<<25)),p+=l>>>16,v+=65535&(y=(f>>>1|s<<31)^(f>>>8|s<<24)^f>>>7),b=(b+=y>>>16)+((y=((f=g[(c+14)%16])>>>19|(s=A[(c+14)%16])<<13)^(s>>>29|f<<3)^f>>>6)>>>16)+((v=v+(65535&y)+((p=p+((l=(s>>>19|f<<13)^(f>>>29|s<<3)^(s>>>6|f<<26))>>>16)+((w+=65535&l)>>>16))>>>16))>>>16),g[c]=65535&v|b<<16,A[c]=65535&w|p<<16;w=65535&(l=S),v=65535&(y=_),b=(b=y>>>16)+((y=r[0])>>>16)+((v=v+(65535&y)+((p=(p=l>>>16)+((l=t[0])>>>16)+((w+=65535&l)>>>16))>>>16))>>>16),r[0]=_=65535&v|b<<16,t[0]=S=65535&w|p<<16,w=65535&(l=k),v=65535&(y=U),b=(b=y>>>16)+((y=r[1])>>>16)+((v=v+(65535&y)+((p=(p=l>>>16)+((l=t[1])>>>16)+((w+=65535&l)>>>16))>>>16))>>>16),r[1]=U=65535&v|b<<16,t[1]=k=65535&w|p<<16,w=65535&(l=K),v=65535&(y=d),b=(b=y>>>16)+((y=r[2])>>>16)+((v=v+(65535&y)+((p=(p=l>>>16)+((l=t[2])>>>16)+((w+=65535&l)>>>16))>>>16))>>>16),r[2]=d=65535&v|b<<16,t[2]=K=65535&w|p<<16,w=65535&(l=Y),v=65535&(y=E),b=(b=y>>>16)+((y=r[3])>>>16)+((v=v+(65535&y)+((p=(p=l>>>16)+((l=t[3])>>>16)+((w+=65535&l)>>>16))>>>16))>>>16),r[3]=E=65535&v|b<<16,t[3]=Y=65535&w|p<<16,w=65535&(l=L),v=65535&(y=x),b=(b=y>>>16)+((y=r[4])>>>16)+((v=v+(65535&y)+((p=(p=l>>>16)+((l=t[4])>>>16)+((w+=65535&l)>>>16))>>>16))>>>16),r[4]=x=65535&v|b<<16,t[4]=L=65535&w|p<<16,w=65535&(l=T),v=65535&(y=M),b=(b=y>>>16)+((y=r[5])>>>16)+((v=v+(65535&y)+((p=(p=l>>>16)+((l=t[5])>>>16)+((w+=65535&l)>>>16))>>>16))>>>16),r[5]=M=65535&v|b<<16,t[5]=T=65535&w|p<<16,w=65535&(l=z),v=65535&(y=m),b=(b=y>>>16)+((y=r[6])>>>16)+((v=v+(65535&y)+((p=(p=l>>>16)+((l=t[6])>>>16)+((w+=65535&l)>>>16))>>>16))>>>16),r[6]=m=65535&v|b<<16,t[6]=z=65535&w|p<<16,w=65535&(l=R),v=65535&(y=B),b=(b=y>>>16)+((y=r[7])>>>16)+((v=v+(65535&y)+((p=(p=l>>>16)+((l=t[7])>>>16)+((w+=65535&l)>>>16))>>>16))>>>16),r[7]=B=65535&v|b<<16,t[7]=R=65535&w|p<<16,j+=128,e-=128}}function K(r,t,n){var e,o=new Int32Array(8),i=new Int32Array(8),h=new Uint8Array(256),a=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,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,h5(o,i,t,n),n%=128,e=0;e<n;e++)h[e]=t[a-n+e];for(h[n]=128,h[(n=256-128*(n<112?1:0))-9]=0,V(h,n-8,a/536870912|0,a<<3),h5(o,i,h,n),e=0;e<8;e++)V(r,8*e,o[e],i[e]);return 0}function Y(r,t){var n=w(),e=w(),o=w(),i=w(),h=w(),a=w(),f=w(),s=w(),u=w();M(n,r[1],r[0]),M(u,t[1],t[0]),m(n,n,u),x(e,r[0],r[1]),x(u,t[0],t[1]),m(e,e,u),m(o,r[3],t[3]),m(o,o,Z),m(i,r[2],t[2]),x(i,i,i),M(h,e,n),M(a,i,o),x(f,i,o),x(s,e,n),m(r[0],h,a),m(r[1],s,f),m(r[2],f,a),m(r[3],h,s)}function a5(r,t,n){for(var e=0;e<4;e++)U(r[e],t[e],n)}function L(r,t){var n=w(),e=w(),o=w();r5(o,t[2]),m(n,t[0],o),m(e,t[1],o),d(r,e),r[31]^=$(n)<<7}function T(r,t,n){var e,o;for(A(r[0],s),A(r[1],u),A(r[2],u),A(r[3],s),o=255;0<=o;--o)a5(r,t,e=n[o/8|0]>>(7&o)&1),Y(t,r),Y(r,r),a5(r,t,e)}function z(r,t){var n=[w(),w(),w(),w()];A(n[0],G),A(n[1],q),A(n[2],u),m(n[3],G,q),T(r,n,t)}function R(r,t,n){var e,o=new Uint8Array(64),i=[w(),w(),w(),w()];for(n||h(t,32),K(o,t,32),o[0]&=248,o[31]&=127,o[31]|=64,z(i,o),L(r,i),e=0;e<32;e++)t[e+32]=r[e];return 0}var P=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 f5(r,t){for(var n,e,o,i=63;32<=i;--i){for(n=0,e=i-32,o=i-12;e<o;++e)t[e]+=n-16*t[i]*P[e-(i-32)],n=Math.floor((t[e]+128)/256),t[e]-=256*n;t[e]+=n,t[i]=0}for(e=n=0;e<32;e++)t[e]+=n-(t[31]>>4)*P[e],n=t[e]>>8,t[e]&=255;for(e=0;e<32;e++)t[e]-=n*P[e];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,r[i]=255&t[i]}function s5(r){for(var t=new Float64Array(64),n=0;n<64;n++)t[n]=r[n];for(n=0;n<64;n++)r[n]=0;f5(r,t)}function u5(r,t,n,e){for(var o,i=new Uint8Array(64),h=new Uint8Array(64),a=new Uint8Array(64),f=new Float64Array(64),s=[w(),w(),w(),w()],u=(K(i,e,32),i[0]&=248,i[31]&=127,i[31]|=64,n+64),c=0;c<n;c++)r[64+c]=t[c];for(c=0;c<32;c++)r[32+c]=i[32+c];for(K(a,r.subarray(32),n+32),s5(a),z(s,a),L(r,s),c=32;c<64;c++)r[c]=e[c];for(K(h,r,n+64),s5(h),c=0;c<64;c++)f[c]=0;for(c=0;c<32;c++)f[c]=a[c];for(c=0;c<32;c++)for(o=0;o<32;o++)f[c+o]+=h[c]*i[o];return f5(r.subarray(32),f),u}function c5(r,t,n,e){var o,i=new Uint8Array(32),h=new Uint8Array(64),a=[w(),w(),w(),w()],f=[w(),w(),w(),w()];if(n<64)return-1;if(function(r,t){var n=w(),e=w(),o=w(),i=w(),h=w(),a=w(),f=w();if(A(r[2],u),E(r[1],t),B(o,r[1]),m(i,o,I),M(o,o,r[2]),x(i,r[2],i),B(h,i),B(a,h),m(f,a,h),m(n,f,o),m(n,n,i),t5(n,n),m(n,n,o),m(n,n,i),m(n,n,i),m(r[0],n,i),B(e,r[0]),m(e,e,i),W(e,o)&&m(r[0],r[0],D),B(e,r[0]),m(e,e,i),W(e,o))return 1;$(r[0])===t[31]>>7&&M(r[0],s,r[0]),m(r[3],r[0],r[1])}(f,e))return-1;for(o=0;o<n;o++)r[o]=t[o];for(o=0;o<32;o++)r[o+32]=e[o];if(K(h,r,n),s5(h),T(a,f,h),z(f,t.subarray(32)),Y(a,f),L(i,a),n-=64,c(t,0,i,0)){for(o=0;o<n;o++)r[o]=0;return-1}for(o=0;o<n;o++)r[o]=t[o+64];return n}var N;function y5(r,t){if(32!==r.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function O(){for(var r=0;r<arguments.length;r++)if(!(arguments[r]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function l5(r){for(var t=0;t<r.length;t++)r[t]=0}i.lowlevel={crypto_core_hsalsa20:l,crypto_stream_xor:a,crypto_stream:J,crypto_stream_salsa20_xor:j,crypto_stream_salsa20:H,crypto_onetimeauth:v,crypto_onetimeauth_verify:Q,crypto_verify_16:X,crypto_verify_32:c,crypto_secretbox:b,crypto_secretbox_open:g,crypto_scalarmult:S,crypto_scalarmult_base:n,crypto_box_beforenm:k,crypto_box_afternm:e5,crypto_box:function(r,t,n,e,o,i){var h=new Uint8Array(32);return k(h,o,i),e5(r,t,n,e,h)},crypto_box_open:function(r,t,n,e,o,i){var h=new Uint8Array(32);return k(h,o,i),o5(r,t,n,e,h)},crypto_box_keypair:n5,crypto_hash:K,crypto_sign:u5,crypto_sign_keypair:R,crypto_sign_open:c5,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:64,crypto_sign_PUBLICKEYBYTES:32,crypto_sign_SECRETKEYBYTES:64,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:w,D:I,L:P,pack:L,pack25519:d,unpack25519:E,M:m,A:x,S:B,Z:M,pow2523:t5,add:Y,set25519:A,modL:f5,scalarmult:T,scalarbase:z},i.randomBytes=function(r){var t=new Uint8Array(r);return h(t,r),t},i.secretbox=function(r,t,n){O(r,t,n),y5(n,t);for(var e=new Uint8Array(32+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+32]=r[i];return b(o,e,e.length,t,n),o.subarray(16)},i.secretbox.open=function(r,t,n){O(r,t,n),y5(n,t);for(var e=new Uint8Array(16+r.length),o=new Uint8Array(e.length),i=0;i<r.length;i++)e[i+16]=r[i];return e.length<32||0!==g(o,e,e.length,t,n)?null:o.subarray(32)},i.secretbox.keyLength=32,i.secretbox.nonceLength=24,i.secretbox.overheadLength=16,i.scalarMult=function(r,t){if(O(r,t),32!==r.length)throw new Error("bad n size");if(32!==t.length)throw new Error("bad p size");var n=new Uint8Array(32);return S(n,r,t),n},i.scalarMult.base=function(r){if(O(r),32!==r.length)throw new Error("bad n size");var t=new Uint8Array(32);return n(t,r),t},i.scalarMult.scalarLength=32,i.scalarMult.groupElementLength=32,i.box=function(r,t,n,e){n=i.box.before(n,e);return i.secretbox(r,t,n)},i.box.before=function(r,t){O(r,t);var n=t;if(32!==r.length)throw new Error("bad public key size");if(32!==n.length)throw new Error("bad secret key size");n=new Uint8Array(32);return k(n,r,t),n},i.box.after=i.secretbox,i.box.open=function(r,t,n,e){n=i.box.before(n,e);return i.secretbox.open(r,t,n)},i.box.open.after=i.secretbox.open,i.box.keyPair=function(){var r=new Uint8Array(32),t=new Uint8Array(32);return n5(r,t),{publicKey:r,secretKey:t}},i.box.keyPair.fromSecretKey=function(r){if(O(r),32!==r.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return n(t,r),{publicKey:t,secretKey:new Uint8Array(r)}},i.box.publicKeyLength=32,i.box.secretKeyLength=32,i.box.sharedKeyLength=32,i.box.nonceLength=24,i.box.overheadLength=i.secretbox.overheadLength,i.sign=function(r,t){if(O(r,t),64!==t.length)throw new Error("bad secret key size");var n=new Uint8Array(64+r.length);return u5(n,r,r.length,t),n},i.sign.open=function(r,t){if(O(r,t),32!==t.length)throw new Error("bad public key size");var n=new Uint8Array(r.length),r=c5(n,r,r.length,t);if(r<0)return null;for(var e=new Uint8Array(r),o=0;o<e.length;o++)e[o]=n[o];return e},i.sign.detached=function(r,t){for(var n=i.sign(r,t),e=new Uint8Array(64),o=0;o<e.length;o++)e[o]=n[o];return e},i.sign.detached.verify=function(r,t,n){if(O(r,t,n),64!==t.length)throw new Error("bad signature size");if(32!==n.length)throw new Error("bad public key size");for(var e=new Uint8Array(64+r.length),o=new Uint8Array(64+r.length),i=0;i<64;i++)e[i]=t[i];for(i=0;i<r.length;i++)e[i+64]=r[i];return 0<=c5(o,e,e.length,n)},i.sign.keyPair=function(){var r=new Uint8Array(32),t=new Uint8Array(64);return R(r,t),{publicKey:r,secretKey:t}},i.sign.keyPair.fromSecretKey=function(r){if(O(r),64!==r.length)throw new Error("bad secret key size");for(var t=new Uint8Array(32),n=0;n<t.length;n++)t[n]=r[32+n];return{publicKey:t,secretKey:new Uint8Array(r)}},i.sign.keyPair.fromSeed=function(r){if(O(r),32!==r.length)throw new Error("bad seed size");for(var t=new Uint8Array(32),n=new Uint8Array(64),e=0;e<32;e++)n[e]=r[e];return R(t,n,!0),{publicKey:t,secretKey:n}},i.sign.publicKeyLength=32,i.sign.secretKeyLength=64,i.sign.seedLength=32,i.sign.signatureLength=64,i.hash=function(r){O(r);var t=new Uint8Array(64);return K(t,r,r.length),t},i.hash.hashLength=64,i.verify=function(r,t){return O(r,t),0!==r.length&&0!==t.length&&r.length===t.length&&0===o(r,0,t,0,r.length)},i.setPRNG=function(r){h=r},(N="undefined"!=typeof self?self.crypto||self.msCrypto:null)&&N.getRandomValues?i.setPRNG(function(r,t){for(var n=new Uint8Array(t),e=0;e<t;e+=65536)N.getRandomValues(n.subarray(e,e+Math.min(t-e,65536)));for(e=0;e<t;e++)r[e]=n[e];l5(n)}):"undefined"!=typeof require&&(N=require("crypto"))&&N.randomBytes&&i.setPRNG(function(r,t){for(var n=N.randomBytes(t),e=0;e<t;e++)r[e]=n[e];l5(n)})}("undefined"!=typeof module&&module.exports?module.exports:self.nacl=self.nacl||{});