zigap-utils 0.0.42 → 0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +4 -14160
- package/dist/index.es2.js +14 -0
- package/dist/{util → utils}/types.d.ts +0 -4
- package/dist/xphere/index.d.ts +4 -0
- package/dist/xphere.d.ts +1 -0
- package/dist/xphere.es.js +1 -0
- package/dist/zigap/index.d.ts +2 -0
- package/dist/{util/qrService/qrService.d.ts → zigap/qr.d.ts} +3 -3
- package/dist/zigap/types.d.ts +4 -0
- package/dist/zigap.d.ts +1 -0
- package/dist/zigap.es.js +1 -0
- package/package.json +15 -1
- package/dist/index.cjs.js +0 -55
- package/dist/util/index.d.ts +0 -1
- package/dist/util/qrService/index.d.ts +0 -1
- /package/dist/{util → utils}/addressProvide.d.ts +0 -0
- /package/dist/{util → utils}/cryptoUtils.d.ts +0 -0
- /package/dist/{util → utils}/login.d.ts +0 -0
- /package/dist/{util → utils}/socketInstance.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";var a0=Object.defineProperty;var i0=(n,e,r)=>e in n?a0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r;var Tt=(n,e,r)=>(i0(n,typeof e!="symbol"?e+"":e,r),r);import{r as or,c as n0,a as d0,b as c0,C as it}from"./index.es2.js";var Br={};const h0="elliptic",s0="6.5.5",o0="EC cryptography",u0="lib/elliptic.js",b0=["lib"],l0={lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},v0={type:"git",url:"git@github.com:indutny/elliptic"},x0=["EC","Elliptic","curve","Cryptography"],p0="Fedor Indutny <fedor@indutny.com>",y0="MIT",m0={url:"https://github.com/indutny/elliptic/issues"},g0="https://github.com/indutny/elliptic",M0={brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},w0={"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"},_0={name:h0,version:s0,description:o0,main:u0,files:b0,scripts:l0,repository:v0,keywords:x0,author:p0,license:y0,bugs:m0,homepage:g0,devDependencies:M0,dependencies:w0};var Rf={},ur={exports:{}};ur.exports;(function(n){(function(e,r){function i(M,t){if(!M)throw new Error(t||"Assertion failed")}function s(M,t){M.super_=t;var h=function(){};h.prototype=t.prototype,M.prototype=new h,M.prototype.constructor=M}function d(M,t,h){if(d.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((t==="le"||t==="be")&&(h=t,t=10),this._init(M||0,t||10,h||"be"))}typeof e=="object"?e.exports=d:r.BN=d,d.BN=d,d.wordSize=26;var w;try{typeof window<"u"&&typeof window.Buffer<"u"?w=window.Buffer:w=or.Buffer}catch{}d.isBN=function(t){return t instanceof d?!0:t!==null&&typeof t=="object"&&t.constructor.wordSize===d.wordSize&&Array.isArray(t.words)},d.max=function(t,h){return t.cmp(h)>0?t:h},d.min=function(t,h){return t.cmp(h)<0?t:h},d.prototype._init=function(t,h,l){if(typeof t=="number")return this._initNumber(t,h,l);if(typeof t=="object")return this._initArray(t,h,l);h==="hex"&&(h=16),i(h===(h|0)&&h>=2&&h<=36),t=t.toString().replace(/\s+/g,"");var v=0;t[0]==="-"&&(v++,this.negative=1),v<t.length&&(h===16?this._parseHex(t,v,l):(this._parseBase(t,h,v),l==="le"&&this._initArray(this.toArray(),h,l)))},d.prototype._initNumber=function(t,h,l){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[t&67108863],this.length=1):t<4503599627370496?(this.words=[t&67108863,t/67108864&67108863],this.length=2):(i(t<9007199254740992),this.words=[t&67108863,t/67108864&67108863,1],this.length=3),l==="le"&&this._initArray(this.toArray(),h,l)},d.prototype._initArray=function(t,h,l){if(i(typeof t.length=="number"),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var p,_,A=0;if(l==="be")for(v=t.length-1,p=0;v>=0;v-=3)_=t[v]|t[v-1]<<8|t[v-2]<<16,this.words[p]|=_<<A&67108863,this.words[p+1]=_>>>26-A&67108863,A+=24,A>=26&&(A-=26,p++);else if(l==="le")for(v=0,p=0;v<t.length;v+=3)_=t[v]|t[v+1]<<8|t[v+2]<<16,this.words[p]|=_<<A&67108863,this.words[p+1]=_>>>26-A&67108863,A+=24,A>=26&&(A-=26,p++);return this.strip()};function g(M,t){var h=M.charCodeAt(t);return h>=65&&h<=70?h-55:h>=97&&h<=102?h-87:h-48&15}function I(M,t,h){var l=g(M,h);return h-1>=t&&(l|=g(M,h-1)<<4),l}d.prototype._parseHex=function(t,h,l){this.length=Math.ceil((t.length-h)/6),this.words=new Array(this.length);for(var v=0;v<this.length;v++)this.words[v]=0;var p=0,_=0,A;if(l==="be")for(v=t.length-1;v>=h;v-=2)A=I(t,h,v)<<p,this.words[_]|=A&67108863,p>=18?(p-=18,_+=1,this.words[_]|=A>>>26):p+=8;else{var x=t.length-h;for(v=x%2===0?h+1:h;v<t.length;v+=2)A=I(t,h,v)<<p,this.words[_]|=A&67108863,p>=18?(p-=18,_+=1,this.words[_]|=A>>>26):p+=8}this.strip()};function R(M,t,h,l){for(var v=0,p=Math.min(M.length,h),_=t;_<p;_++){var A=M.charCodeAt(_)-48;v*=l,A>=49?v+=A-49+10:A>=17?v+=A-17+10:v+=A}return v}d.prototype._parseBase=function(t,h,l){this.words=[0],this.length=1;for(var v=0,p=1;p<=67108863;p*=h)v++;v--,p=p/h|0;for(var _=t.length-l,A=_%v,x=Math.min(_,_-A)+l,a=0,y=l;y<x;y+=v)a=R(t,y,y+v,h),this.imuln(p),this.words[0]+a<67108864?this.words[0]+=a:this._iaddn(a);if(A!==0){var ee=1;for(a=R(t,y,t.length,h),y=0;y<A;y++)ee*=h;this.imuln(ee),this.words[0]+a<67108864?this.words[0]+=a:this._iaddn(a)}this.strip()},d.prototype.copy=function(t){t.words=new Array(this.length);for(var h=0;h<this.length;h++)t.words[h]=this.words[h];t.length=this.length,t.negative=this.negative,t.red=this.red},d.prototype.clone=function(){var t=new d(null);return this.copy(t),t},d.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},d.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},d.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},d.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var E=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],B=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],O=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];d.prototype.toString=function(t,h){t=t||10,h=h|0||1;var l;if(t===16||t==="hex"){l="";for(var v=0,p=0,_=0;_<this.length;_++){var A=this.words[_],x=((A<<v|p)&16777215).toString(16);p=A>>>24-v&16777215,p!==0||_!==this.length-1?l=E[6-x.length]+x+l:l=x+l,v+=2,v>=26&&(v-=26,_--)}for(p!==0&&(l=p.toString(16)+l);l.length%h!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(t===(t|0)&&t>=2&&t<=36){var a=B[t],y=O[t];l="";var ee=this.clone();for(ee.negative=0;!ee.isZero();){var X=ee.modn(y).toString(t);ee=ee.idivn(y),ee.isZero()?l=X+l:l=E[a-X.length]+X+l}for(this.isZero()&&(l="0"+l);l.length%h!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}i(!1,"Base should be between 2 and 36")},d.prototype.toNumber=function(){var t=this.words[0];return this.length===2?t+=this.words[1]*67108864:this.length===3&&this.words[2]===1?t+=4503599627370496+this.words[1]*67108864:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-t:t},d.prototype.toJSON=function(){return this.toString(16)},d.prototype.toBuffer=function(t,h){return i(typeof w<"u"),this.toArrayLike(w,t,h)},d.prototype.toArray=function(t,h){return this.toArrayLike(Array,t,h)},d.prototype.toArrayLike=function(t,h,l){var v=this.byteLength(),p=l||Math.max(1,v);i(v<=p,"byte array longer than desired length"),i(p>0,"Requested array length <= 0"),this.strip();var _=h==="le",A=new t(p),x,a,y=this.clone();if(_){for(a=0;!y.isZero();a++)x=y.andln(255),y.iushrn(8),A[a]=x;for(;a<p;a++)A[a]=0}else{for(a=0;a<p-v;a++)A[a]=0;for(a=0;!y.isZero();a++)x=y.andln(255),y.iushrn(8),A[p-a-1]=x}return A},Math.clz32?d.prototype._countBits=function(t){return 32-Math.clz32(t)}:d.prototype._countBits=function(t){var h=t,l=0;return h>=4096&&(l+=13,h>>>=13),h>=64&&(l+=7,h>>>=7),h>=8&&(l+=4,h>>>=4),h>=2&&(l+=2,h>>>=2),l+h},d.prototype._zeroBits=function(t){if(t===0)return 26;var h=t,l=0;return h&8191||(l+=13,h>>>=13),h&127||(l+=7,h>>>=7),h&15||(l+=4,h>>>=4),h&3||(l+=2,h>>>=2),h&1||l++,l},d.prototype.bitLength=function(){var t=this.words[this.length-1],h=this._countBits(t);return(this.length-1)*26+h};function F(M){for(var t=new Array(M.bitLength()),h=0;h<t.length;h++){var l=h/26|0,v=h%26;t[h]=(M.words[l]&1<<v)>>>v}return t}d.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,h=0;h<this.length;h++){var l=this._zeroBits(this.words[h]);if(t+=l,l!==26)break}return t},d.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},d.prototype.toTwos=function(t){return this.negative!==0?this.abs().inotn(t).iaddn(1):this.clone()},d.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},d.prototype.isNeg=function(){return this.negative!==0},d.prototype.neg=function(){return this.clone().ineg()},d.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},d.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var h=0;h<t.length;h++)this.words[h]=this.words[h]|t.words[h];return this.strip()},d.prototype.ior=function(t){return i((this.negative|t.negative)===0),this.iuor(t)},d.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},d.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},d.prototype.iuand=function(t){var h;this.length>t.length?h=t:h=this;for(var l=0;l<h.length;l++)this.words[l]=this.words[l]&t.words[l];return this.length=h.length,this.strip()},d.prototype.iand=function(t){return i((this.negative|t.negative)===0),this.iuand(t)},d.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},d.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},d.prototype.iuxor=function(t){var h,l;this.length>t.length?(h=this,l=t):(h=t,l=this);for(var v=0;v<l.length;v++)this.words[v]=h.words[v]^l.words[v];if(this!==h)for(;v<h.length;v++)this.words[v]=h.words[v];return this.length=h.length,this.strip()},d.prototype.ixor=function(t){return i((this.negative|t.negative)===0),this.iuxor(t)},d.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},d.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},d.prototype.inotn=function(t){i(typeof t=="number"&&t>=0);var h=Math.ceil(t/26)|0,l=t%26;this._expand(h),l>0&&h--;for(var v=0;v<h;v++)this.words[v]=~this.words[v]&67108863;return l>0&&(this.words[v]=~this.words[v]&67108863>>26-l),this.strip()},d.prototype.notn=function(t){return this.clone().inotn(t)},d.prototype.setn=function(t,h){i(typeof t=="number"&&t>=0);var l=t/26|0,v=t%26;return this._expand(l+1),h?this.words[l]=this.words[l]|1<<v:this.words[l]=this.words[l]&~(1<<v),this.strip()},d.prototype.iadd=function(t){var h;if(this.negative!==0&&t.negative===0)return this.negative=0,h=this.isub(t),this.negative^=1,this._normSign();if(this.negative===0&&t.negative!==0)return t.negative=0,h=this.isub(t),t.negative=1,h._normSign();var l,v;this.length>t.length?(l=this,v=t):(l=t,v=this);for(var p=0,_=0;_<v.length;_++)h=(l.words[_]|0)+(v.words[_]|0)+p,this.words[_]=h&67108863,p=h>>>26;for(;p!==0&&_<l.length;_++)h=(l.words[_]|0)+p,this.words[_]=h&67108863,p=h>>>26;if(this.length=l.length,p!==0)this.words[this.length]=p,this.length++;else if(l!==this)for(;_<l.length;_++)this.words[_]=l.words[_];return this},d.prototype.add=function(t){var h;return t.negative!==0&&this.negative===0?(t.negative=0,h=this.sub(t),t.negative^=1,h):t.negative===0&&this.negative!==0?(this.negative=0,h=t.sub(this),this.negative=1,h):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},d.prototype.isub=function(t){if(t.negative!==0){t.negative=0;var h=this.iadd(t);return t.negative=1,h._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var l=this.cmp(t);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var v,p;l>0?(v=this,p=t):(v=t,p=this);for(var _=0,A=0;A<p.length;A++)h=(v.words[A]|0)-(p.words[A]|0)+_,_=h>>26,this.words[A]=h&67108863;for(;_!==0&&A<v.length;A++)h=(v.words[A]|0)+_,_=h>>26,this.words[A]=h&67108863;if(_===0&&A<v.length&&v!==this)for(;A<v.length;A++)this.words[A]=v.words[A];return this.length=Math.max(this.length,A),v!==this&&(this.negative=1),this.strip()},d.prototype.sub=function(t){return this.clone().isub(t)};function H(M,t,h){h.negative=t.negative^M.negative;var l=M.length+t.length|0;h.length=l,l=l-1|0;var v=M.words[0]|0,p=t.words[0]|0,_=v*p,A=_&67108863,x=_/67108864|0;h.words[0]=A;for(var a=1;a<l;a++){for(var y=x>>>26,ee=x&67108863,X=Math.min(a,t.length-1),k=Math.max(0,a-M.length+1);k<=X;k++){var Y=a-k|0;v=M.words[Y]|0,p=t.words[k]|0,_=v*p+ee,y+=_/67108864|0,ee=_&67108863}h.words[a]=ee|0,x=y|0}return x!==0?h.words[a]=x|0:h.length--,h.strip()}var J=function(t,h,l){var v=t.words,p=h.words,_=l.words,A=0,x,a,y,ee=v[0]|0,X=ee&8191,k=ee>>>13,Y=v[1]|0,oe=Y&8191,ze=Y>>>13,Lf=v[2]|0,Ee=Lf&8191,Be=Lf>>>13,At=v[3]|0,Ce=At&8191,Ge=At>>>13,Nt=v[4]|0,af=Nt&8191,nf=Nt>>>13,It=v[5]|0,Qe=It&8191,qe=It>>>13,tt=v[6]|0,ef=tt&8191,De=tt>>>13,ot=v[7]|0,He=ot&8191,je=ot>>>13,rt=v[8]|0,Ze=rt&8191,Je=rt>>>13,Et=v[9]|0,df=Et&8191,Xe=Et>>>13,ut=p[0]|0,Ye=ut&8191,Te=ut>>>13,Zf=p[1]|0,Ue=Zf&8191,Ke=Zf>>>13,kf=p[2]|0,Oe=kf&8191,We=kf>>>13,zt=p[3]|0,cf=zt&8191,hf=zt>>>13,Pf=p[4]|0,$e=Pf&8191,Ne=Pf>>>13,bt=p[5]|0,Ve=bt&8191,ff=bt>>>13,Lt=p[6]|0,Me=Lt&8191,tf=Lt>>>13,c=p[7]|0,u=c&8191,o=c>>>13,f=p[8]|0,b=f&8191,S=f>>>13,z=p[9]|0,$=z&8191,T=z>>>13;l.negative=t.negative^h.negative,l.length=19,x=Math.imul(X,Ye),a=Math.imul(X,Te),a=a+Math.imul(k,Ye)|0,y=Math.imul(k,Te);var Q=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(Q>>>26)|0,Q&=67108863,x=Math.imul(oe,Ye),a=Math.imul(oe,Te),a=a+Math.imul(ze,Ye)|0,y=Math.imul(ze,Te),x=x+Math.imul(X,Ue)|0,a=a+Math.imul(X,Ke)|0,a=a+Math.imul(k,Ue)|0,y=y+Math.imul(k,Ke)|0;var D=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(D>>>26)|0,D&=67108863,x=Math.imul(Ee,Ye),a=Math.imul(Ee,Te),a=a+Math.imul(Be,Ye)|0,y=Math.imul(Be,Te),x=x+Math.imul(oe,Ue)|0,a=a+Math.imul(oe,Ke)|0,a=a+Math.imul(ze,Ue)|0,y=y+Math.imul(ze,Ke)|0,x=x+Math.imul(X,Oe)|0,a=a+Math.imul(X,We)|0,a=a+Math.imul(k,Oe)|0,y=y+Math.imul(k,We)|0;var me=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(me>>>26)|0,me&=67108863,x=Math.imul(Ce,Ye),a=Math.imul(Ce,Te),a=a+Math.imul(Ge,Ye)|0,y=Math.imul(Ge,Te),x=x+Math.imul(Ee,Ue)|0,a=a+Math.imul(Ee,Ke)|0,a=a+Math.imul(Be,Ue)|0,y=y+Math.imul(Be,Ke)|0,x=x+Math.imul(oe,Oe)|0,a=a+Math.imul(oe,We)|0,a=a+Math.imul(ze,Oe)|0,y=y+Math.imul(ze,We)|0,x=x+Math.imul(X,cf)|0,a=a+Math.imul(X,hf)|0,a=a+Math.imul(k,cf)|0,y=y+Math.imul(k,hf)|0;var Z=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(Z>>>26)|0,Z&=67108863,x=Math.imul(af,Ye),a=Math.imul(af,Te),a=a+Math.imul(nf,Ye)|0,y=Math.imul(nf,Te),x=x+Math.imul(Ce,Ue)|0,a=a+Math.imul(Ce,Ke)|0,a=a+Math.imul(Ge,Ue)|0,y=y+Math.imul(Ge,Ke)|0,x=x+Math.imul(Ee,Oe)|0,a=a+Math.imul(Ee,We)|0,a=a+Math.imul(Be,Oe)|0,y=y+Math.imul(Be,We)|0,x=x+Math.imul(oe,cf)|0,a=a+Math.imul(oe,hf)|0,a=a+Math.imul(ze,cf)|0,y=y+Math.imul(ze,hf)|0,x=x+Math.imul(X,$e)|0,a=a+Math.imul(X,Ne)|0,a=a+Math.imul(k,$e)|0,y=y+Math.imul(k,Ne)|0;var ae=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(ae>>>26)|0,ae&=67108863,x=Math.imul(Qe,Ye),a=Math.imul(Qe,Te),a=a+Math.imul(qe,Ye)|0,y=Math.imul(qe,Te),x=x+Math.imul(af,Ue)|0,a=a+Math.imul(af,Ke)|0,a=a+Math.imul(nf,Ue)|0,y=y+Math.imul(nf,Ke)|0,x=x+Math.imul(Ce,Oe)|0,a=a+Math.imul(Ce,We)|0,a=a+Math.imul(Ge,Oe)|0,y=y+Math.imul(Ge,We)|0,x=x+Math.imul(Ee,cf)|0,a=a+Math.imul(Ee,hf)|0,a=a+Math.imul(Be,cf)|0,y=y+Math.imul(Be,hf)|0,x=x+Math.imul(oe,$e)|0,a=a+Math.imul(oe,Ne)|0,a=a+Math.imul(ze,$e)|0,y=y+Math.imul(ze,Ne)|0,x=x+Math.imul(X,Ve)|0,a=a+Math.imul(X,ff)|0,a=a+Math.imul(k,Ve)|0,y=y+Math.imul(k,ff)|0;var ie=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(ie>>>26)|0,ie&=67108863,x=Math.imul(ef,Ye),a=Math.imul(ef,Te),a=a+Math.imul(De,Ye)|0,y=Math.imul(De,Te),x=x+Math.imul(Qe,Ue)|0,a=a+Math.imul(Qe,Ke)|0,a=a+Math.imul(qe,Ue)|0,y=y+Math.imul(qe,Ke)|0,x=x+Math.imul(af,Oe)|0,a=a+Math.imul(af,We)|0,a=a+Math.imul(nf,Oe)|0,y=y+Math.imul(nf,We)|0,x=x+Math.imul(Ce,cf)|0,a=a+Math.imul(Ce,hf)|0,a=a+Math.imul(Ge,cf)|0,y=y+Math.imul(Ge,hf)|0,x=x+Math.imul(Ee,$e)|0,a=a+Math.imul(Ee,Ne)|0,a=a+Math.imul(Be,$e)|0,y=y+Math.imul(Be,Ne)|0,x=x+Math.imul(oe,Ve)|0,a=a+Math.imul(oe,ff)|0,a=a+Math.imul(ze,Ve)|0,y=y+Math.imul(ze,ff)|0,x=x+Math.imul(X,Me)|0,a=a+Math.imul(X,tf)|0,a=a+Math.imul(k,Me)|0,y=y+Math.imul(k,tf)|0;var se=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(se>>>26)|0,se&=67108863,x=Math.imul(He,Ye),a=Math.imul(He,Te),a=a+Math.imul(je,Ye)|0,y=Math.imul(je,Te),x=x+Math.imul(ef,Ue)|0,a=a+Math.imul(ef,Ke)|0,a=a+Math.imul(De,Ue)|0,y=y+Math.imul(De,Ke)|0,x=x+Math.imul(Qe,Oe)|0,a=a+Math.imul(Qe,We)|0,a=a+Math.imul(qe,Oe)|0,y=y+Math.imul(qe,We)|0,x=x+Math.imul(af,cf)|0,a=a+Math.imul(af,hf)|0,a=a+Math.imul(nf,cf)|0,y=y+Math.imul(nf,hf)|0,x=x+Math.imul(Ce,$e)|0,a=a+Math.imul(Ce,Ne)|0,a=a+Math.imul(Ge,$e)|0,y=y+Math.imul(Ge,Ne)|0,x=x+Math.imul(Ee,Ve)|0,a=a+Math.imul(Ee,ff)|0,a=a+Math.imul(Be,Ve)|0,y=y+Math.imul(Be,ff)|0,x=x+Math.imul(oe,Me)|0,a=a+Math.imul(oe,tf)|0,a=a+Math.imul(ze,Me)|0,y=y+Math.imul(ze,tf)|0,x=x+Math.imul(X,u)|0,a=a+Math.imul(X,o)|0,a=a+Math.imul(k,u)|0,y=y+Math.imul(k,o)|0;var he=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(he>>>26)|0,he&=67108863,x=Math.imul(Ze,Ye),a=Math.imul(Ze,Te),a=a+Math.imul(Je,Ye)|0,y=Math.imul(Je,Te),x=x+Math.imul(He,Ue)|0,a=a+Math.imul(He,Ke)|0,a=a+Math.imul(je,Ue)|0,y=y+Math.imul(je,Ke)|0,x=x+Math.imul(ef,Oe)|0,a=a+Math.imul(ef,We)|0,a=a+Math.imul(De,Oe)|0,y=y+Math.imul(De,We)|0,x=x+Math.imul(Qe,cf)|0,a=a+Math.imul(Qe,hf)|0,a=a+Math.imul(qe,cf)|0,y=y+Math.imul(qe,hf)|0,x=x+Math.imul(af,$e)|0,a=a+Math.imul(af,Ne)|0,a=a+Math.imul(nf,$e)|0,y=y+Math.imul(nf,Ne)|0,x=x+Math.imul(Ce,Ve)|0,a=a+Math.imul(Ce,ff)|0,a=a+Math.imul(Ge,Ve)|0,y=y+Math.imul(Ge,ff)|0,x=x+Math.imul(Ee,Me)|0,a=a+Math.imul(Ee,tf)|0,a=a+Math.imul(Be,Me)|0,y=y+Math.imul(Be,tf)|0,x=x+Math.imul(oe,u)|0,a=a+Math.imul(oe,o)|0,a=a+Math.imul(ze,u)|0,y=y+Math.imul(ze,o)|0,x=x+Math.imul(X,b)|0,a=a+Math.imul(X,S)|0,a=a+Math.imul(k,b)|0,y=y+Math.imul(k,S)|0;var ne=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(ne>>>26)|0,ne&=67108863,x=Math.imul(df,Ye),a=Math.imul(df,Te),a=a+Math.imul(Xe,Ye)|0,y=Math.imul(Xe,Te),x=x+Math.imul(Ze,Ue)|0,a=a+Math.imul(Ze,Ke)|0,a=a+Math.imul(Je,Ue)|0,y=y+Math.imul(Je,Ke)|0,x=x+Math.imul(He,Oe)|0,a=a+Math.imul(He,We)|0,a=a+Math.imul(je,Oe)|0,y=y+Math.imul(je,We)|0,x=x+Math.imul(ef,cf)|0,a=a+Math.imul(ef,hf)|0,a=a+Math.imul(De,cf)|0,y=y+Math.imul(De,hf)|0,x=x+Math.imul(Qe,$e)|0,a=a+Math.imul(Qe,Ne)|0,a=a+Math.imul(qe,$e)|0,y=y+Math.imul(qe,Ne)|0,x=x+Math.imul(af,Ve)|0,a=a+Math.imul(af,ff)|0,a=a+Math.imul(nf,Ve)|0,y=y+Math.imul(nf,ff)|0,x=x+Math.imul(Ce,Me)|0,a=a+Math.imul(Ce,tf)|0,a=a+Math.imul(Ge,Me)|0,y=y+Math.imul(Ge,tf)|0,x=x+Math.imul(Ee,u)|0,a=a+Math.imul(Ee,o)|0,a=a+Math.imul(Be,u)|0,y=y+Math.imul(Be,o)|0,x=x+Math.imul(oe,b)|0,a=a+Math.imul(oe,S)|0,a=a+Math.imul(ze,b)|0,y=y+Math.imul(ze,S)|0,x=x+Math.imul(X,$)|0,a=a+Math.imul(X,T)|0,a=a+Math.imul(k,$)|0,y=y+Math.imul(k,T)|0;var ce=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(ce>>>26)|0,ce&=67108863,x=Math.imul(df,Ue),a=Math.imul(df,Ke),a=a+Math.imul(Xe,Ue)|0,y=Math.imul(Xe,Ke),x=x+Math.imul(Ze,Oe)|0,a=a+Math.imul(Ze,We)|0,a=a+Math.imul(Je,Oe)|0,y=y+Math.imul(Je,We)|0,x=x+Math.imul(He,cf)|0,a=a+Math.imul(He,hf)|0,a=a+Math.imul(je,cf)|0,y=y+Math.imul(je,hf)|0,x=x+Math.imul(ef,$e)|0,a=a+Math.imul(ef,Ne)|0,a=a+Math.imul(De,$e)|0,y=y+Math.imul(De,Ne)|0,x=x+Math.imul(Qe,Ve)|0,a=a+Math.imul(Qe,ff)|0,a=a+Math.imul(qe,Ve)|0,y=y+Math.imul(qe,ff)|0,x=x+Math.imul(af,Me)|0,a=a+Math.imul(af,tf)|0,a=a+Math.imul(nf,Me)|0,y=y+Math.imul(nf,tf)|0,x=x+Math.imul(Ce,u)|0,a=a+Math.imul(Ce,o)|0,a=a+Math.imul(Ge,u)|0,y=y+Math.imul(Ge,o)|0,x=x+Math.imul(Ee,b)|0,a=a+Math.imul(Ee,S)|0,a=a+Math.imul(Be,b)|0,y=y+Math.imul(Be,S)|0,x=x+Math.imul(oe,$)|0,a=a+Math.imul(oe,T)|0,a=a+Math.imul(ze,$)|0,y=y+Math.imul(ze,T)|0;var de=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(de>>>26)|0,de&=67108863,x=Math.imul(df,Oe),a=Math.imul(df,We),a=a+Math.imul(Xe,Oe)|0,y=Math.imul(Xe,We),x=x+Math.imul(Ze,cf)|0,a=a+Math.imul(Ze,hf)|0,a=a+Math.imul(Je,cf)|0,y=y+Math.imul(Je,hf)|0,x=x+Math.imul(He,$e)|0,a=a+Math.imul(He,Ne)|0,a=a+Math.imul(je,$e)|0,y=y+Math.imul(je,Ne)|0,x=x+Math.imul(ef,Ve)|0,a=a+Math.imul(ef,ff)|0,a=a+Math.imul(De,Ve)|0,y=y+Math.imul(De,ff)|0,x=x+Math.imul(Qe,Me)|0,a=a+Math.imul(Qe,tf)|0,a=a+Math.imul(qe,Me)|0,y=y+Math.imul(qe,tf)|0,x=x+Math.imul(af,u)|0,a=a+Math.imul(af,o)|0,a=a+Math.imul(nf,u)|0,y=y+Math.imul(nf,o)|0,x=x+Math.imul(Ce,b)|0,a=a+Math.imul(Ce,S)|0,a=a+Math.imul(Ge,b)|0,y=y+Math.imul(Ge,S)|0,x=x+Math.imul(Ee,$)|0,a=a+Math.imul(Ee,T)|0,a=a+Math.imul(Be,$)|0,y=y+Math.imul(Be,T)|0;var W=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(W>>>26)|0,W&=67108863,x=Math.imul(df,cf),a=Math.imul(df,hf),a=a+Math.imul(Xe,cf)|0,y=Math.imul(Xe,hf),x=x+Math.imul(Ze,$e)|0,a=a+Math.imul(Ze,Ne)|0,a=a+Math.imul(Je,$e)|0,y=y+Math.imul(Je,Ne)|0,x=x+Math.imul(He,Ve)|0,a=a+Math.imul(He,ff)|0,a=a+Math.imul(je,Ve)|0,y=y+Math.imul(je,ff)|0,x=x+Math.imul(ef,Me)|0,a=a+Math.imul(ef,tf)|0,a=a+Math.imul(De,Me)|0,y=y+Math.imul(De,tf)|0,x=x+Math.imul(Qe,u)|0,a=a+Math.imul(Qe,o)|0,a=a+Math.imul(qe,u)|0,y=y+Math.imul(qe,o)|0,x=x+Math.imul(af,b)|0,a=a+Math.imul(af,S)|0,a=a+Math.imul(nf,b)|0,y=y+Math.imul(nf,S)|0,x=x+Math.imul(Ce,$)|0,a=a+Math.imul(Ce,T)|0,a=a+Math.imul(Ge,$)|0,y=y+Math.imul(Ge,T)|0;var fe=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(fe>>>26)|0,fe&=67108863,x=Math.imul(df,$e),a=Math.imul(df,Ne),a=a+Math.imul(Xe,$e)|0,y=Math.imul(Xe,Ne),x=x+Math.imul(Ze,Ve)|0,a=a+Math.imul(Ze,ff)|0,a=a+Math.imul(Je,Ve)|0,y=y+Math.imul(Je,ff)|0,x=x+Math.imul(He,Me)|0,a=a+Math.imul(He,tf)|0,a=a+Math.imul(je,Me)|0,y=y+Math.imul(je,tf)|0,x=x+Math.imul(ef,u)|0,a=a+Math.imul(ef,o)|0,a=a+Math.imul(De,u)|0,y=y+Math.imul(De,o)|0,x=x+Math.imul(Qe,b)|0,a=a+Math.imul(Qe,S)|0,a=a+Math.imul(qe,b)|0,y=y+Math.imul(qe,S)|0,x=x+Math.imul(af,$)|0,a=a+Math.imul(af,T)|0,a=a+Math.imul(nf,$)|0,y=y+Math.imul(nf,T)|0;var j=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(j>>>26)|0,j&=67108863,x=Math.imul(df,Ve),a=Math.imul(df,ff),a=a+Math.imul(Xe,Ve)|0,y=Math.imul(Xe,ff),x=x+Math.imul(Ze,Me)|0,a=a+Math.imul(Ze,tf)|0,a=a+Math.imul(Je,Me)|0,y=y+Math.imul(Je,tf)|0,x=x+Math.imul(He,u)|0,a=a+Math.imul(He,o)|0,a=a+Math.imul(je,u)|0,y=y+Math.imul(je,o)|0,x=x+Math.imul(ef,b)|0,a=a+Math.imul(ef,S)|0,a=a+Math.imul(De,b)|0,y=y+Math.imul(De,S)|0,x=x+Math.imul(Qe,$)|0,a=a+Math.imul(Qe,T)|0,a=a+Math.imul(qe,$)|0,y=y+Math.imul(qe,T)|0;var V=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(V>>>26)|0,V&=67108863,x=Math.imul(df,Me),a=Math.imul(df,tf),a=a+Math.imul(Xe,Me)|0,y=Math.imul(Xe,tf),x=x+Math.imul(Ze,u)|0,a=a+Math.imul(Ze,o)|0,a=a+Math.imul(Je,u)|0,y=y+Math.imul(Je,o)|0,x=x+Math.imul(He,b)|0,a=a+Math.imul(He,S)|0,a=a+Math.imul(je,b)|0,y=y+Math.imul(je,S)|0,x=x+Math.imul(ef,$)|0,a=a+Math.imul(ef,T)|0,a=a+Math.imul(De,$)|0,y=y+Math.imul(De,T)|0;var G=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(G>>>26)|0,G&=67108863,x=Math.imul(df,u),a=Math.imul(df,o),a=a+Math.imul(Xe,u)|0,y=Math.imul(Xe,o),x=x+Math.imul(Ze,b)|0,a=a+Math.imul(Ze,S)|0,a=a+Math.imul(Je,b)|0,y=y+Math.imul(Je,S)|0,x=x+Math.imul(He,$)|0,a=a+Math.imul(He,T)|0,a=a+Math.imul(je,$)|0,y=y+Math.imul(je,T)|0;var K=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(K>>>26)|0,K&=67108863,x=Math.imul(df,b),a=Math.imul(df,S),a=a+Math.imul(Xe,b)|0,y=Math.imul(Xe,S),x=x+Math.imul(Ze,$)|0,a=a+Math.imul(Ze,T)|0,a=a+Math.imul(Je,$)|0,y=y+Math.imul(Je,T)|0;var P=(A+x|0)+((a&8191)<<13)|0;A=(y+(a>>>13)|0)+(P>>>26)|0,P&=67108863,x=Math.imul(df,$),a=Math.imul(df,T),a=a+Math.imul(Xe,$)|0,y=Math.imul(Xe,T);var q=(A+x|0)+((a&8191)<<13)|0;return A=(y+(a>>>13)|0)+(q>>>26)|0,q&=67108863,_[0]=Q,_[1]=D,_[2]=me,_[3]=Z,_[4]=ae,_[5]=ie,_[6]=se,_[7]=he,_[8]=ne,_[9]=ce,_[10]=de,_[11]=W,_[12]=fe,_[13]=j,_[14]=V,_[15]=G,_[16]=K,_[17]=P,_[18]=q,A!==0&&(_[19]=A,l.length++),l};Math.imul||(J=H);function ue(M,t,h){h.negative=t.negative^M.negative,h.length=M.length+t.length;for(var l=0,v=0,p=0;p<h.length-1;p++){var _=v;v=0;for(var A=l&67108863,x=Math.min(p,t.length-1),a=Math.max(0,p-M.length+1);a<=x;a++){var y=p-a,ee=M.words[y]|0,X=t.words[a]|0,k=ee*X,Y=k&67108863;_=_+(k/67108864|0)|0,Y=Y+A|0,A=Y&67108863,_=_+(Y>>>26)|0,v+=_>>>26,_&=67108863}h.words[p]=A,l=_,_=v}return l!==0?h.words[p]=l:h.length--,h.strip()}function te(M,t,h){var l=new ve;return l.mulp(M,t,h)}d.prototype.mulTo=function(t,h){var l,v=this.length+t.length;return this.length===10&&t.length===10?l=J(this,t,h):v<63?l=H(this,t,h):v<1024?l=ue(this,t,h):l=te(this,t,h),l};function ve(M,t){this.x=M,this.y=t}ve.prototype.makeRBT=function(t){for(var h=new Array(t),l=d.prototype._countBits(t)-1,v=0;v<t;v++)h[v]=this.revBin(v,l,t);return h},ve.prototype.revBin=function(t,h,l){if(t===0||t===l-1)return t;for(var v=0,p=0;p<h;p++)v|=(t&1)<<h-p-1,t>>=1;return v},ve.prototype.permute=function(t,h,l,v,p,_){for(var A=0;A<_;A++)v[A]=h[t[A]],p[A]=l[t[A]]},ve.prototype.transform=function(t,h,l,v,p,_){this.permute(_,t,h,l,v,p);for(var A=1;A<p;A<<=1)for(var x=A<<1,a=Math.cos(2*Math.PI/x),y=Math.sin(2*Math.PI/x),ee=0;ee<p;ee+=x)for(var X=a,k=y,Y=0;Y<A;Y++){var oe=l[ee+Y],ze=v[ee+Y],Lf=l[ee+Y+A],Ee=v[ee+Y+A],Be=X*Lf-k*Ee;Ee=X*Ee+k*Lf,Lf=Be,l[ee+Y]=oe+Lf,v[ee+Y]=ze+Ee,l[ee+Y+A]=oe-Lf,v[ee+Y+A]=ze-Ee,Y!==x&&(Be=a*X-y*k,k=a*k+y*X,X=Be)}},ve.prototype.guessLen13b=function(t,h){var l=Math.max(h,t)|1,v=l&1,p=0;for(l=l/2|0;l;l=l>>>1)p++;return 1<<p+1+v},ve.prototype.conjugate=function(t,h,l){if(!(l<=1))for(var v=0;v<l/2;v++){var p=t[v];t[v]=t[l-v-1],t[l-v-1]=p,p=h[v],h[v]=-h[l-v-1],h[l-v-1]=-p}},ve.prototype.normalize13b=function(t,h){for(var l=0,v=0;v<h/2;v++){var p=Math.round(t[2*v+1]/h)*8192+Math.round(t[2*v]/h)+l;t[v]=p&67108863,p<67108864?l=0:l=p/67108864|0}return t},ve.prototype.convert13b=function(t,h,l,v){for(var p=0,_=0;_<h;_++)p=p+(t[_]|0),l[2*_]=p&8191,p=p>>>13,l[2*_+1]=p&8191,p=p>>>13;for(_=2*h;_<v;++_)l[_]=0;i(p===0),i((p&-8192)===0)},ve.prototype.stub=function(t){for(var h=new Array(t),l=0;l<t;l++)h[l]=0;return h},ve.prototype.mulp=function(t,h,l){var v=2*this.guessLen13b(t.length,h.length),p=this.makeRBT(v),_=this.stub(v),A=new Array(v),x=new Array(v),a=new Array(v),y=new Array(v),ee=new Array(v),X=new Array(v),k=l.words;k.length=v,this.convert13b(t.words,t.length,A,v),this.convert13b(h.words,h.length,y,v),this.transform(A,_,x,a,v,p),this.transform(y,_,ee,X,v,p);for(var Y=0;Y<v;Y++){var oe=x[Y]*ee[Y]-a[Y]*X[Y];a[Y]=x[Y]*X[Y]+a[Y]*ee[Y],x[Y]=oe}return this.conjugate(x,a,v),this.transform(x,a,k,_,v,p),this.conjugate(k,_,v),this.normalize13b(k,v),l.negative=t.negative^h.negative,l.length=t.length+h.length,l.strip()},d.prototype.mul=function(t){var h=new d(null);return h.words=new Array(this.length+t.length),this.mulTo(t,h)},d.prototype.mulf=function(t){var h=new d(null);return h.words=new Array(this.length+t.length),te(this,t,h)},d.prototype.imul=function(t){return this.clone().mulTo(t,this)},d.prototype.imuln=function(t){i(typeof t=="number"),i(t<67108864);for(var h=0,l=0;l<this.length;l++){var v=(this.words[l]|0)*t,p=(v&67108863)+(h&67108863);h>>=26,h+=v/67108864|0,h+=p>>>26,this.words[l]=p&67108863}return h!==0&&(this.words[l]=h,this.length++),this},d.prototype.muln=function(t){return this.clone().imuln(t)},d.prototype.sqr=function(){return this.mul(this)},d.prototype.isqr=function(){return this.imul(this.clone())},d.prototype.pow=function(t){var h=F(t);if(h.length===0)return new d(1);for(var l=this,v=0;v<h.length&&h[v]===0;v++,l=l.sqr());if(++v<h.length)for(var p=l.sqr();v<h.length;v++,p=p.sqr())h[v]!==0&&(l=l.mul(p));return l},d.prototype.iushln=function(t){i(typeof t=="number"&&t>=0);var h=t%26,l=(t-h)/26,v=67108863>>>26-h<<26-h,p;if(h!==0){var _=0;for(p=0;p<this.length;p++){var A=this.words[p]&v,x=(this.words[p]|0)-A<<h;this.words[p]=x|_,_=A>>>26-h}_&&(this.words[p]=_,this.length++)}if(l!==0){for(p=this.length-1;p>=0;p--)this.words[p+l]=this.words[p];for(p=0;p<l;p++)this.words[p]=0;this.length+=l}return this.strip()},d.prototype.ishln=function(t){return i(this.negative===0),this.iushln(t)},d.prototype.iushrn=function(t,h,l){i(typeof t=="number"&&t>=0);var v;h?v=(h-h%26)/26:v=0;var p=t%26,_=Math.min((t-p)/26,this.length),A=67108863^67108863>>>p<<p,x=l;if(v-=_,v=Math.max(0,v),x){for(var a=0;a<_;a++)x.words[a]=this.words[a];x.length=_}if(_!==0)if(this.length>_)for(this.length-=_,a=0;a<this.length;a++)this.words[a]=this.words[a+_];else this.words[0]=0,this.length=1;var y=0;for(a=this.length-1;a>=0&&(y!==0||a>=v);a--){var ee=this.words[a]|0;this.words[a]=y<<26-p|ee>>>p,y=ee&A}return x&&y!==0&&(x.words[x.length++]=y),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},d.prototype.ishrn=function(t,h,l){return i(this.negative===0),this.iushrn(t,h,l)},d.prototype.shln=function(t){return this.clone().ishln(t)},d.prototype.ushln=function(t){return this.clone().iushln(t)},d.prototype.shrn=function(t){return this.clone().ishrn(t)},d.prototype.ushrn=function(t){return this.clone().iushrn(t)},d.prototype.testn=function(t){i(typeof t=="number"&&t>=0);var h=t%26,l=(t-h)/26,v=1<<h;if(this.length<=l)return!1;var p=this.words[l];return!!(p&v)},d.prototype.imaskn=function(t){i(typeof t=="number"&&t>=0);var h=t%26,l=(t-h)/26;if(i(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(h!==0&&l++,this.length=Math.min(l,this.length),h!==0){var v=67108863^67108863>>>h<<h;this.words[this.length-1]&=v}return this.strip()},d.prototype.maskn=function(t){return this.clone().imaskn(t)},d.prototype.iaddn=function(t){return i(typeof t=="number"),i(t<67108864),t<0?this.isubn(-t):this.negative!==0?this.length===1&&(this.words[0]|0)<t?(this.words[0]=t-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},d.prototype._iaddn=function(t){this.words[0]+=t;for(var h=0;h<this.length&&this.words[h]>=67108864;h++)this.words[h]-=67108864,h===this.length-1?this.words[h+1]=1:this.words[h+1]++;return this.length=Math.max(this.length,h+1),this},d.prototype.isubn=function(t){if(i(typeof t=="number"),i(t<67108864),t<0)return this.iaddn(-t);if(this.negative!==0)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var h=0;h<this.length&&this.words[h]<0;h++)this.words[h]+=67108864,this.words[h+1]-=1;return this.strip()},d.prototype.addn=function(t){return this.clone().iaddn(t)},d.prototype.subn=function(t){return this.clone().isubn(t)},d.prototype.iabs=function(){return this.negative=0,this},d.prototype.abs=function(){return this.clone().iabs()},d.prototype._ishlnsubmul=function(t,h,l){var v=t.length+l,p;this._expand(v);var _,A=0;for(p=0;p<t.length;p++){_=(this.words[p+l]|0)+A;var x=(t.words[p]|0)*h;_-=x&67108863,A=(_>>26)-(x/67108864|0),this.words[p+l]=_&67108863}for(;p<this.length-l;p++)_=(this.words[p+l]|0)+A,A=_>>26,this.words[p+l]=_&67108863;if(A===0)return this.strip();for(i(A===-1),A=0,p=0;p<this.length;p++)_=-(this.words[p]|0)+A,A=_>>26,this.words[p]=_&67108863;return this.negative=1,this.strip()},d.prototype._wordDiv=function(t,h){var l=this.length-t.length,v=this.clone(),p=t,_=p.words[p.length-1]|0,A=this._countBits(_);l=26-A,l!==0&&(p=p.ushln(l),v.iushln(l),_=p.words[p.length-1]|0);var x=v.length-p.length,a;if(h!=="mod"){a=new d(null),a.length=x+1,a.words=new Array(a.length);for(var y=0;y<a.length;y++)a.words[y]=0}var ee=v.clone()._ishlnsubmul(p,1,x);ee.negative===0&&(v=ee,a&&(a.words[x]=1));for(var X=x-1;X>=0;X--){var k=(v.words[p.length+X]|0)*67108864+(v.words[p.length+X-1]|0);for(k=Math.min(k/_|0,67108863),v._ishlnsubmul(p,k,X);v.negative!==0;)k--,v.negative=0,v._ishlnsubmul(p,1,X),v.isZero()||(v.negative^=1);a&&(a.words[X]=k)}return a&&a.strip(),v.strip(),h!=="div"&&l!==0&&v.iushrn(l),{div:a||null,mod:v}},d.prototype.divmod=function(t,h,l){if(i(!t.isZero()),this.isZero())return{div:new d(0),mod:new d(0)};var v,p,_;return this.negative!==0&&t.negative===0?(_=this.neg().divmod(t,h),h!=="mod"&&(v=_.div.neg()),h!=="div"&&(p=_.mod.neg(),l&&p.negative!==0&&p.iadd(t)),{div:v,mod:p}):this.negative===0&&t.negative!==0?(_=this.divmod(t.neg(),h),h!=="mod"&&(v=_.div.neg()),{div:v,mod:_.mod}):this.negative&t.negative?(_=this.neg().divmod(t.neg(),h),h!=="div"&&(p=_.mod.neg(),l&&p.negative!==0&&p.isub(t)),{div:_.div,mod:p}):t.length>this.length||this.cmp(t)<0?{div:new d(0),mod:this}:t.length===1?h==="div"?{div:this.divn(t.words[0]),mod:null}:h==="mod"?{div:null,mod:new d(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new d(this.modn(t.words[0]))}:this._wordDiv(t,h)},d.prototype.div=function(t){return this.divmod(t,"div",!1).div},d.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},d.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},d.prototype.divRound=function(t){var h=this.divmod(t);if(h.mod.isZero())return h.div;var l=h.div.negative!==0?h.mod.isub(t):h.mod,v=t.ushrn(1),p=t.andln(1),_=l.cmp(v);return _<0||p===1&&_===0?h.div:h.div.negative!==0?h.div.isubn(1):h.div.iaddn(1)},d.prototype.modn=function(t){i(t<=67108863);for(var h=(1<<26)%t,l=0,v=this.length-1;v>=0;v--)l=(h*l+(this.words[v]|0))%t;return l},d.prototype.idivn=function(t){i(t<=67108863);for(var h=0,l=this.length-1;l>=0;l--){var v=(this.words[l]|0)+h*67108864;this.words[l]=v/t|0,h=v%t}return this.strip()},d.prototype.divn=function(t){return this.clone().idivn(t)},d.prototype.egcd=function(t){i(t.negative===0),i(!t.isZero());var h=this,l=t.clone();h.negative!==0?h=h.umod(t):h=h.clone();for(var v=new d(1),p=new d(0),_=new d(0),A=new d(1),x=0;h.isEven()&&l.isEven();)h.iushrn(1),l.iushrn(1),++x;for(var a=l.clone(),y=h.clone();!h.isZero();){for(var ee=0,X=1;!(h.words[0]&X)&&ee<26;++ee,X<<=1);if(ee>0)for(h.iushrn(ee);ee-- >0;)(v.isOdd()||p.isOdd())&&(v.iadd(a),p.isub(y)),v.iushrn(1),p.iushrn(1);for(var k=0,Y=1;!(l.words[0]&Y)&&k<26;++k,Y<<=1);if(k>0)for(l.iushrn(k);k-- >0;)(_.isOdd()||A.isOdd())&&(_.iadd(a),A.isub(y)),_.iushrn(1),A.iushrn(1);h.cmp(l)>=0?(h.isub(l),v.isub(_),p.isub(A)):(l.isub(h),_.isub(v),A.isub(p))}return{a:_,b:A,gcd:l.iushln(x)}},d.prototype._invmp=function(t){i(t.negative===0),i(!t.isZero());var h=this,l=t.clone();h.negative!==0?h=h.umod(t):h=h.clone();for(var v=new d(1),p=new d(0),_=l.clone();h.cmpn(1)>0&&l.cmpn(1)>0;){for(var A=0,x=1;!(h.words[0]&x)&&A<26;++A,x<<=1);if(A>0)for(h.iushrn(A);A-- >0;)v.isOdd()&&v.iadd(_),v.iushrn(1);for(var a=0,y=1;!(l.words[0]&y)&&a<26;++a,y<<=1);if(a>0)for(l.iushrn(a);a-- >0;)p.isOdd()&&p.iadd(_),p.iushrn(1);h.cmp(l)>=0?(h.isub(l),v.isub(p)):(l.isub(h),p.isub(v))}var ee;return h.cmpn(1)===0?ee=v:ee=p,ee.cmpn(0)<0&&ee.iadd(t),ee},d.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var h=this.clone(),l=t.clone();h.negative=0,l.negative=0;for(var v=0;h.isEven()&&l.isEven();v++)h.iushrn(1),l.iushrn(1);do{for(;h.isEven();)h.iushrn(1);for(;l.isEven();)l.iushrn(1);var p=h.cmp(l);if(p<0){var _=h;h=l,l=_}else if(p===0||l.cmpn(1)===0)break;h.isub(l)}while(!0);return l.iushln(v)},d.prototype.invm=function(t){return this.egcd(t).a.umod(t)},d.prototype.isEven=function(){return(this.words[0]&1)===0},d.prototype.isOdd=function(){return(this.words[0]&1)===1},d.prototype.andln=function(t){return this.words[0]&t},d.prototype.bincn=function(t){i(typeof t=="number");var h=t%26,l=(t-h)/26,v=1<<h;if(this.length<=l)return this._expand(l+1),this.words[l]|=v,this;for(var p=v,_=l;p!==0&&_<this.length;_++){var A=this.words[_]|0;A+=p,p=A>>>26,A&=67108863,this.words[_]=A}return p!==0&&(this.words[_]=p,this.length++),this},d.prototype.isZero=function(){return this.length===1&&this.words[0]===0},d.prototype.cmpn=function(t){var h=t<0;if(this.negative!==0&&!h)return-1;if(this.negative===0&&h)return 1;this.strip();var l;if(this.length>1)l=1;else{h&&(t=-t),i(t<=67108863,"Number is too big");var v=this.words[0]|0;l=v===t?0:v<t?-1:1}return this.negative!==0?-l|0:l},d.prototype.cmp=function(t){if(this.negative!==0&&t.negative===0)return-1;if(this.negative===0&&t.negative!==0)return 1;var h=this.ucmp(t);return this.negative!==0?-h|0:h},d.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var h=0,l=this.length-1;l>=0;l--){var v=this.words[l]|0,p=t.words[l]|0;if(v!==p){v<p?h=-1:v>p&&(h=1);break}}return h},d.prototype.gtn=function(t){return this.cmpn(t)===1},d.prototype.gt=function(t){return this.cmp(t)===1},d.prototype.gten=function(t){return this.cmpn(t)>=0},d.prototype.gte=function(t){return this.cmp(t)>=0},d.prototype.ltn=function(t){return this.cmpn(t)===-1},d.prototype.lt=function(t){return this.cmp(t)===-1},d.prototype.lten=function(t){return this.cmpn(t)<=0},d.prototype.lte=function(t){return this.cmp(t)<=0},d.prototype.eqn=function(t){return this.cmpn(t)===0},d.prototype.eq=function(t){return this.cmp(t)===0},d.red=function(t){return new Se(t)},d.prototype.toRed=function(t){return i(!this.red,"Already a number in reduction context"),i(this.negative===0,"red works only with positives"),t.convertTo(this)._forceRed(t)},d.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},d.prototype._forceRed=function(t){return this.red=t,this},d.prototype.forceRed=function(t){return i(!this.red,"Already a number in reduction context"),this._forceRed(t)},d.prototype.redAdd=function(t){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},d.prototype.redIAdd=function(t){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},d.prototype.redSub=function(t){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},d.prototype.redISub=function(t){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},d.prototype.redShl=function(t){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},d.prototype.redMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},d.prototype.redIMul=function(t){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},d.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},d.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},d.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},d.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},d.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},d.prototype.redPow=function(t){return i(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var ke={k256:null,p224:null,p192:null,p25519:null};function Pe(M,t){this.name=M,this.p=new d(t,16),this.n=this.p.bitLength(),this.k=new d(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Pe.prototype._tmp=function(){var t=new d(null);return t.words=new Array(Math.ceil(this.n/13)),t},Pe.prototype.ireduce=function(t){var h=t,l;do this.split(h,this.tmp),h=this.imulK(h),h=h.iadd(this.tmp),l=h.bitLength();while(l>this.n);var v=l<this.n?-1:h.ucmp(this.p);return v===0?(h.words[0]=0,h.length=1):v>0?h.isub(this.p):h.strip!==void 0?h.strip():h._strip(),h},Pe.prototype.split=function(t,h){t.iushrn(this.n,0,h)},Pe.prototype.imulK=function(t){return t.imul(this.k)};function Le(){Pe.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}s(Le,Pe),Le.prototype.split=function(t,h){for(var l=4194303,v=Math.min(t.length,9),p=0;p<v;p++)h.words[p]=t.words[p];if(h.length=v,t.length<=9){t.words[0]=0,t.length=1;return}var _=t.words[9];for(h.words[h.length++]=_&l,p=10;p<t.length;p++){var A=t.words[p]|0;t.words[p-10]=(A&l)<<4|_>>>22,_=A}_>>>=22,t.words[p-10]=_,_===0&&t.length>10?t.length-=10:t.length-=9},Le.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var h=0,l=0;l<t.length;l++){var v=t.words[l]|0;h+=v*977,t.words[l]=h&67108863,h=v*64+(h/67108864|0)}return t.words[t.length-1]===0&&(t.length--,t.words[t.length-1]===0&&t.length--),t};function rf(){Pe.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}s(rf,Pe);function Sf(){Pe.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}s(Sf,Pe);function Af(){Pe.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}s(Af,Pe),Af.prototype.imulK=function(t){for(var h=0,l=0;l<t.length;l++){var v=(t.words[l]|0)*19+h,p=v&67108863;v>>>=26,t.words[l]=p,h=v}return h!==0&&(t.words[t.length++]=h),t},d._prime=function(t){if(ke[t])return ke[t];var h;if(t==="k256")h=new Le;else if(t==="p224")h=new rf;else if(t==="p192")h=new Sf;else if(t==="p25519")h=new Af;else throw new Error("Unknown prime "+t);return ke[t]=h,h};function Se(M){if(typeof M=="string"){var t=d._prime(M);this.m=t.p,this.prime=t}else i(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}Se.prototype._verify1=function(t){i(t.negative===0,"red works only with positives"),i(t.red,"red works only with red numbers")},Se.prototype._verify2=function(t,h){i((t.negative|h.negative)===0,"red works only with positives"),i(t.red&&t.red===h.red,"red works only with red numbers")},Se.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},Se.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},Se.prototype.add=function(t,h){this._verify2(t,h);var l=t.add(h);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},Se.prototype.iadd=function(t,h){this._verify2(t,h);var l=t.iadd(h);return l.cmp(this.m)>=0&&l.isub(this.m),l},Se.prototype.sub=function(t,h){this._verify2(t,h);var l=t.sub(h);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},Se.prototype.isub=function(t,h){this._verify2(t,h);var l=t.isub(h);return l.cmpn(0)<0&&l.iadd(this.m),l},Se.prototype.shl=function(t,h){return this._verify1(t),this.imod(t.ushln(h))},Se.prototype.imul=function(t,h){return this._verify2(t,h),this.imod(t.imul(h))},Se.prototype.mul=function(t,h){return this._verify2(t,h),this.imod(t.mul(h))},Se.prototype.isqr=function(t){return this.imul(t,t.clone())},Se.prototype.sqr=function(t){return this.mul(t,t)},Se.prototype.sqrt=function(t){if(t.isZero())return t.clone();var h=this.m.andln(3);if(i(h%2===1),h===3){var l=this.m.add(new d(1)).iushrn(2);return this.pow(t,l)}for(var v=this.m.subn(1),p=0;!v.isZero()&&v.andln(1)===0;)p++,v.iushrn(1);i(!v.isZero());var _=new d(1).toRed(this),A=_.redNeg(),x=this.m.subn(1).iushrn(1),a=this.m.bitLength();for(a=new d(2*a*a).toRed(this);this.pow(a,x).cmp(A)!==0;)a.redIAdd(A);for(var y=this.pow(a,v),ee=this.pow(t,v.addn(1).iushrn(1)),X=this.pow(t,v),k=p;X.cmp(_)!==0;){for(var Y=X,oe=0;Y.cmp(_)!==0;oe++)Y=Y.redSqr();i(oe<k);var ze=this.pow(y,new d(1).iushln(k-oe-1));ee=ee.redMul(ze),y=ze.redSqr(),X=X.redMul(y),k=oe}return ee},Se.prototype.invm=function(t){var h=t._invmp(this.m);return h.negative!==0?(h.negative=0,this.imod(h).redNeg()):this.imod(h)},Se.prototype.pow=function(t,h){if(h.isZero())return new d(1).toRed(this);if(h.cmpn(1)===0)return t.clone();var l=4,v=new Array(1<<l);v[0]=new d(1).toRed(this),v[1]=t;for(var p=2;p<v.length;p++)v[p]=this.mul(v[p-1],t);var _=v[0],A=0,x=0,a=h.bitLength()%26;for(a===0&&(a=26),p=h.length-1;p>=0;p--){for(var y=h.words[p],ee=a-1;ee>=0;ee--){var X=y>>ee&1;if(_!==v[0]&&(_=this.sqr(_)),X===0&&A===0){x=0;continue}A<<=1,A|=X,x++,!(x!==l&&(p!==0||ee!==0))&&(_=this.mul(_,v[A]),x=0,A=0)}a=26}return _},Se.prototype.convertTo=function(t){var h=t.umod(this.m);return h===t?h.clone():h},Se.prototype.convertFrom=function(t){var h=t.clone();return h.red=null,h},d.mont=function(t){return new If(t)};function If(M){Se.call(this,M),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new d(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}s(If,Se),If.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},If.prototype.convertFrom=function(t){var h=this.imod(t.mul(this.rinv));return h.red=null,h},If.prototype.imul=function(t,h){if(t.isZero()||h.isZero())return t.words[0]=0,t.length=1,t;var l=t.imul(h),v=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=l.isub(v).iushrn(this.shift),_=p;return p.cmp(this.m)>=0?_=p.isub(this.m):p.cmpn(0)<0&&(_=p.iadd(this.m)),_._forceRed(this)},If.prototype.mul=function(t,h){if(t.isZero()||h.isZero())return new d(0)._forceRed(this);var l=t.mul(h),v=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=l.isub(v).iushrn(this.shift),_=p;return p.cmp(this.m)>=0?_=p.isub(this.m):p.cmpn(0)<0&&(_=p.iadd(this.m)),_._forceRed(this)},If.prototype.invm=function(t){var h=this.imod(t._invmp(this.m).mul(this.r2));return h._forceRed(this)}})(n,n0)})(ur);var Vf=ur.exports,ht=Rr;function Rr(n,e){if(!n)throw new Error(e||"Assertion failed")}Rr.equal=function(e,r,i){if(e!=r)throw new Error(i||"Assertion failed: "+e+" != "+r)};var br={};(function(n){var e=n;function r(d,w){if(Array.isArray(d))return d.slice();if(!d)return[];var g=[];if(typeof d!="string"){for(var I=0;I<d.length;I++)g[I]=d[I]|0;return g}if(w==="hex"){d=d.replace(/[^a-z0-9]+/ig,""),d.length%2!==0&&(d="0"+d);for(var I=0;I<d.length;I+=2)g.push(parseInt(d[I]+d[I+1],16))}else for(var I=0;I<d.length;I++){var R=d.charCodeAt(I),E=R>>8,B=R&255;E?g.push(E,B):g.push(B)}return g}e.toArray=r;function i(d){return d.length===1?"0"+d:d}e.zero2=i;function s(d){for(var w="",g=0;g<d.length;g++)w+=i(d[g].toString(16));return w}e.toHex=s,e.encode=function(w,g){return g==="hex"?s(w):w}})(br);(function(n){var e=n,r=Vf,i=ht,s=br;e.assert=i,e.toArray=s.toArray,e.zero2=s.zero2,e.toHex=s.toHex,e.encode=s.encode;function d(E,B,O){var F=new Array(Math.max(E.bitLength(),O)+1),H;for(H=0;H<F.length;H+=1)F[H]=0;var J=1<<B+1,ue=E.clone();for(H=0;H<F.length;H++){var te,ve=ue.andln(J-1);ue.isOdd()?(ve>(J>>1)-1?te=(J>>1)-ve:te=ve,ue.isubn(te)):te=0,F[H]=te,ue.iushrn(1)}return F}e.getNAF=d;function w(E,B){var O=[[],[]];E=E.clone(),B=B.clone();for(var F=0,H=0,J;E.cmpn(-F)>0||B.cmpn(-H)>0;){var ue=E.andln(3)+F&3,te=B.andln(3)+H&3;ue===3&&(ue=-1),te===3&&(te=-1);var ve;ue&1?(J=E.andln(7)+F&7,(J===3||J===5)&&te===2?ve=-ue:ve=ue):ve=0,O[0].push(ve);var ke;te&1?(J=B.andln(7)+H&7,(J===3||J===5)&&ue===2?ke=-te:ke=te):ke=0,O[1].push(ke),2*F===ve+1&&(F=1-F),2*H===ke+1&&(H=1-H),E.iushrn(1),B.iushrn(1)}return O}e.getJSF=w;function g(E,B,O){var F="_"+B;E.prototype[B]=function(){return this[F]!==void 0?this[F]:this[F]=O.call(this)}}e.cachedProperty=g;function I(E){return typeof E=="string"?e.toArray(E,"hex"):E}e.parseBytes=I;function R(E){return new r(E,"hex","le")}e.intFromLE=R})(Rf);var lr={exports:{}},Qt;lr.exports=function(e){return Qt||(Qt=new Qf(null)),Qt.generate(e)};function Qf(n){this.rand=n}lr.exports.Rand=Qf;Qf.prototype.generate=function(e){return this._rand(e)};Qf.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Qf.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Qf.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Qf.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var mr=or;if(typeof mr.randomBytes!="function")throw new Error("Not supported");Qf.prototype._rand=function(e){return mr.randomBytes(e)}}catch{}var Pr=lr.exports,vr={},at=Vf,qt=Rf,Ft=qt.getNAF,S0=qt.getJSF,Ct=qt.assert;function ft(n,e){this.type=n,this.p=new at(e.p,16),this.red=e.prime?at.red(e.prime):at.mont(this.p),this.zero=new at(0).toRed(this.red),this.one=new at(1).toRed(this.red),this.two=new at(2).toRed(this.red),this.n=e.n&&new at(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Yt=ft;ft.prototype.point=function(){throw new Error("Not implemented")};ft.prototype.validate=function(){throw new Error("Not implemented")};ft.prototype._fixedNafMul=function(e,r){Ct(e.precomputed);var i=e._getDoubles(),s=Ft(r,1,this._bitLength),d=(1<<i.step+1)-(i.step%2===0?2:1);d/=3;var w=[],g,I;for(g=0;g<s.length;g+=i.step){I=0;for(var R=g+i.step-1;R>=g;R--)I=(I<<1)+s[R];w.push(I)}for(var E=this.jpoint(null,null,null),B=this.jpoint(null,null,null),O=d;O>0;O--){for(g=0;g<w.length;g++)I=w[g],I===O?B=B.mixedAdd(i.points[g]):I===-O&&(B=B.mixedAdd(i.points[g].neg()));E=E.add(B)}return E.toP()};ft.prototype._wnafMul=function(e,r){var i=4,s=e._getNAFPoints(i);i=s.wnd;for(var d=s.points,w=Ft(r,i,this._bitLength),g=this.jpoint(null,null,null),I=w.length-1;I>=0;I--){for(var R=0;I>=0&&w[I]===0;I--)R++;if(I>=0&&R++,g=g.dblp(R),I<0)break;var E=w[I];Ct(E!==0),e.type==="affine"?E>0?g=g.mixedAdd(d[E-1>>1]):g=g.mixedAdd(d[-E-1>>1].neg()):E>0?g=g.add(d[E-1>>1]):g=g.add(d[-E-1>>1].neg())}return e.type==="affine"?g.toP():g};ft.prototype._wnafMulAdd=function(e,r,i,s,d){var w=this._wnafT1,g=this._wnafT2,I=this._wnafT3,R=0,E,B,O;for(E=0;E<s;E++){O=r[E];var F=O._getNAFPoints(e);w[E]=F.wnd,g[E]=F.points}for(E=s-1;E>=1;E-=2){var H=E-1,J=E;if(w[H]!==1||w[J]!==1){I[H]=Ft(i[H],w[H],this._bitLength),I[J]=Ft(i[J],w[J],this._bitLength),R=Math.max(I[H].length,R),R=Math.max(I[J].length,R);continue}var ue=[r[H],null,null,r[J]];r[H].y.cmp(r[J].y)===0?(ue[1]=r[H].add(r[J]),ue[2]=r[H].toJ().mixedAdd(r[J].neg())):r[H].y.cmp(r[J].y.redNeg())===0?(ue[1]=r[H].toJ().mixedAdd(r[J]),ue[2]=r[H].add(r[J].neg())):(ue[1]=r[H].toJ().mixedAdd(r[J]),ue[2]=r[H].toJ().mixedAdd(r[J].neg()));var te=[-3,-1,-5,-7,0,7,5,1,3],ve=S0(i[H],i[J]);for(R=Math.max(ve[0].length,R),I[H]=new Array(R),I[J]=new Array(R),B=0;B<R;B++){var ke=ve[0][B]|0,Pe=ve[1][B]|0;I[H][B]=te[(ke+1)*3+(Pe+1)],I[J][B]=0,g[H]=ue}}var Le=this.jpoint(null,null,null),rf=this._wnafT4;for(E=R;E>=0;E--){for(var Sf=0;E>=0;){var Af=!0;for(B=0;B<s;B++)rf[B]=I[B][E]|0,rf[B]!==0&&(Af=!1);if(!Af)break;Sf++,E--}if(E>=0&&Sf++,Le=Le.dblp(Sf),E<0)break;for(B=0;B<s;B++){var Se=rf[B];Se!==0&&(Se>0?O=g[B][Se-1>>1]:Se<0&&(O=g[B][-Se-1>>1].neg()),O.type==="affine"?Le=Le.mixedAdd(O):Le=Le.add(O))}}for(E=0;E<s;E++)g[E]=null;return d?Le:Le.toP()};function $f(n,e){this.curve=n,this.type=e,this.precomputed=null}ft.BasePoint=$f;$f.prototype.eq=function(){throw new Error("Not implemented")};$f.prototype.validate=function(){return this.curve.validate(this)};ft.prototype.decodePoint=function(e,r){e=qt.toArray(e,r);var i=this.p.byteLength();if((e[0]===4||e[0]===6||e[0]===7)&&e.length-1===2*i){e[0]===6?Ct(e[e.length-1]%2===0):e[0]===7&&Ct(e[e.length-1]%2===1);var s=this.point(e.slice(1,1+i),e.slice(1+i,1+2*i));return s}else if((e[0]===2||e[0]===3)&&e.length-1===i)return this.pointFromX(e.slice(1,1+i),e[0]===3);throw new Error("Unknown point format")};$f.prototype.encodeCompressed=function(e){return this.encode(e,!0)};$f.prototype._encode=function(e){var r=this.curve.p.byteLength(),i=this.getX().toArray("be",r);return e?[this.getY().isEven()?2:3].concat(i):[4].concat(i,this.getY().toArray("be",r))};$f.prototype.encode=function(e,r){return qt.encode(this._encode(r),e)};$f.prototype.precompute=function(e){if(this.precomputed)return this;var r={doubles:null,naf:null,beta:null};return r.naf=this._getNAFPoints(8),r.doubles=this._getDoubles(4,e),r.beta=this._getBeta(),this.precomputed=r,this};$f.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var r=this.precomputed.doubles;return r?r.points.length>=Math.ceil((e.bitLength()+1)/r.step):!1};$f.prototype._getDoubles=function(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],s=this,d=0;d<r;d+=e){for(var w=0;w<e;w++)s=s.dbl();i.push(s)}return{step:e,points:i}};$f.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var r=[this],i=(1<<e)-1,s=i===1?null:this.dbl(),d=1;d<i;d++)r[d]=r[d-1].add(s);return{wnd:e,points:r}};$f.prototype._getBeta=function(){return null};$f.prototype.dblp=function(e){for(var r=this,i=0;i<e;i++)r=r.dbl();return r};var dr={exports:{}};typeof Object.create=="function"?dr.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:dr.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}};var Kt=dr.exports,A0=Rf,bf=Vf,xr=Kt,mt=Yt,I0=A0.assert;function Nf(n){mt.call(this,"short",n),this.a=new bf(n.a,16).toRed(this.red),this.b=new bf(n.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(n),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}xr(Nf,mt);var E0=Nf;Nf.prototype._getEndomorphism=function(e){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var r,i;if(e.beta)r=new bf(e.beta,16).toRed(this.red);else{var s=this._getEndoRoots(this.p);r=s[0].cmp(s[1])<0?s[0]:s[1],r=r.toRed(this.red)}if(e.lambda)i=new bf(e.lambda,16);else{var d=this._getEndoRoots(this.n);this.g.mul(d[0]).x.cmp(this.g.x.redMul(r))===0?i=d[0]:(i=d[1],I0(this.g.mul(i).x.cmp(this.g.x.redMul(r))===0))}var w;return e.basis?w=e.basis.map(function(g){return{a:new bf(g.a,16),b:new bf(g.b,16)}}):w=this._getEndoBasis(i),{beta:r,lambda:i,basis:w}}};Nf.prototype._getEndoRoots=function(e){var r=e===this.p?this.red:bf.mont(e),i=new bf(2).toRed(r).redInvm(),s=i.redNeg(),d=new bf(3).toRed(r).redNeg().redSqrt().redMul(i),w=s.redAdd(d).fromRed(),g=s.redSub(d).fromRed();return[w,g]};Nf.prototype._getEndoBasis=function(e){for(var r=this.n.ushrn(Math.floor(this.n.bitLength()/2)),i=e,s=this.n.clone(),d=new bf(1),w=new bf(0),g=new bf(0),I=new bf(1),R,E,B,O,F,H,J,ue=0,te,ve;i.cmpn(0)!==0;){var ke=s.div(i);te=s.sub(ke.mul(i)),ve=g.sub(ke.mul(d));var Pe=I.sub(ke.mul(w));if(!B&&te.cmp(r)<0)R=J.neg(),E=d,B=te.neg(),O=ve;else if(B&&++ue===2)break;J=te,s=i,i=te,g=d,d=ve,I=w,w=Pe}F=te.neg(),H=ve;var Le=B.sqr().add(O.sqr()),rf=F.sqr().add(H.sqr());return rf.cmp(Le)>=0&&(F=R,H=E),B.negative&&(B=B.neg(),O=O.neg()),F.negative&&(F=F.neg(),H=H.neg()),[{a:B,b:O},{a:F,b:H}]};Nf.prototype._endoSplit=function(e){var r=this.endo.basis,i=r[0],s=r[1],d=s.b.mul(e).divRound(this.n),w=i.b.neg().mul(e).divRound(this.n),g=d.mul(i.a),I=w.mul(s.a),R=d.mul(i.b),E=w.mul(s.b),B=e.sub(g).sub(I),O=R.add(E).neg();return{k1:B,k2:O}};Nf.prototype.pointFromX=function(e,r){e=new bf(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),s=i.redSqrt();if(s.redSqr().redSub(i).cmp(this.zero)!==0)throw new Error("invalid point");var d=s.fromRed().isOdd();return(r&&!d||!r&&d)&&(s=s.redNeg()),this.point(e,s)};Nf.prototype.validate=function(e){if(e.inf)return!0;var r=e.x,i=e.y,s=this.a.redMul(r),d=r.redSqr().redMul(r).redIAdd(s).redIAdd(this.b);return i.redSqr().redISub(d).cmpn(0)===0};Nf.prototype._endoWnafMulAdd=function(e,r,i){for(var s=this._endoWnafT1,d=this._endoWnafT2,w=0;w<e.length;w++){var g=this._endoSplit(r[w]),I=e[w],R=I._getBeta();g.k1.negative&&(g.k1.ineg(),I=I.neg(!0)),g.k2.negative&&(g.k2.ineg(),R=R.neg(!0)),s[w*2]=I,s[w*2+1]=R,d[w*2]=g.k1,d[w*2+1]=g.k2}for(var E=this._wnafMulAdd(1,s,d,w*2,i),B=0;B<w*2;B++)s[B]=null,d[B]=null;return E};function yf(n,e,r,i){mt.BasePoint.call(this,n,"affine"),e===null&&r===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new bf(e,16),this.y=new bf(r,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}xr(yf,mt.BasePoint);Nf.prototype.point=function(e,r,i){return new yf(this,e,r,i)};Nf.prototype.pointFromJSON=function(e,r){return yf.fromJSON(this,e,r)};yf.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var r=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var i=this.curve,s=function(d){return i.point(d.x.redMul(i.endo.beta),d.y)};e.beta=r,r.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(s)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(s)}}}return r}};yf.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]};yf.fromJSON=function(e,r,i){typeof r=="string"&&(r=JSON.parse(r));var s=e.point(r[0],r[1],i);if(!r[2])return s;function d(g){return e.point(g[0],g[1],i)}var w=r[2];return s.precomputed={beta:null,doubles:w.doubles&&{step:w.doubles.step,points:[s].concat(w.doubles.points.map(d))},naf:w.naf&&{wnd:w.naf.wnd,points:[s].concat(w.naf.points.map(d))}},s};yf.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"};yf.prototype.isInfinity=function(){return this.inf};yf.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(this.x.cmp(e.x)===0)return this.curve.point(null,null);var r=this.y.redSub(e.y);r.cmpn(0)!==0&&(r=r.redMul(this.x.redSub(e.x).redInvm()));var i=r.redSqr().redISub(this.x).redISub(e.x),s=r.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,s)};yf.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(e.cmpn(0)===0)return this.curve.point(null,null);var r=this.curve.a,i=this.x.redSqr(),s=e.redInvm(),d=i.redAdd(i).redIAdd(i).redIAdd(r).redMul(s),w=d.redSqr().redISub(this.x.redAdd(this.x)),g=d.redMul(this.x.redSub(w)).redISub(this.y);return this.curve.point(w,g)};yf.prototype.getX=function(){return this.x.fromRed()};yf.prototype.getY=function(){return this.y.fromRed()};yf.prototype.mul=function(e){return e=new bf(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)};yf.prototype.mulAdd=function(e,r,i){var s=[this,r],d=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(s,d):this.curve._wnafMulAdd(1,s,d,2)};yf.prototype.jmulAdd=function(e,r,i){var s=[this,r],d=[e,i];return this.curve.endo?this.curve._endoWnafMulAdd(s,d,!0):this.curve._wnafMulAdd(1,s,d,2,!0)};yf.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||this.x.cmp(e.x)===0&&this.y.cmp(e.y)===0)};yf.prototype.neg=function(e){if(this.inf)return this;var r=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var i=this.precomputed,s=function(d){return d.neg()};r.precomputed={naf:i.naf&&{wnd:i.naf.wnd,points:i.naf.points.map(s)},doubles:i.doubles&&{step:i.doubles.step,points:i.doubles.points.map(s)}}}return r};yf.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e};function mf(n,e,r,i){mt.BasePoint.call(this,n,"jacobian"),e===null&&r===null&&i===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new bf(0)):(this.x=new bf(e,16),this.y=new bf(r,16),this.z=new bf(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}xr(mf,mt.BasePoint);Nf.prototype.jpoint=function(e,r,i){return new mf(this,e,r,i)};mf.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),r=e.redSqr(),i=this.x.redMul(r),s=this.y.redMul(r).redMul(e);return this.curve.point(i,s)};mf.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)};mf.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var r=e.z.redSqr(),i=this.z.redSqr(),s=this.x.redMul(r),d=e.x.redMul(i),w=this.y.redMul(r.redMul(e.z)),g=e.y.redMul(i.redMul(this.z)),I=s.redSub(d),R=w.redSub(g);if(I.cmpn(0)===0)return R.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var E=I.redSqr(),B=E.redMul(I),O=s.redMul(E),F=R.redSqr().redIAdd(B).redISub(O).redISub(O),H=R.redMul(O.redISub(F)).redISub(w.redMul(B)),J=this.z.redMul(e.z).redMul(I);return this.curve.jpoint(F,H,J)};mf.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var r=this.z.redSqr(),i=this.x,s=e.x.redMul(r),d=this.y,w=e.y.redMul(r).redMul(this.z),g=i.redSub(s),I=d.redSub(w);if(g.cmpn(0)===0)return I.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var R=g.redSqr(),E=R.redMul(g),B=i.redMul(R),O=I.redSqr().redIAdd(E).redISub(B).redISub(B),F=I.redMul(B.redISub(O)).redISub(d.redMul(E)),H=this.z.redMul(g);return this.curve.jpoint(O,F,H)};mf.prototype.dblp=function(e){if(e===0)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var r;if(this.curve.zeroA||this.curve.threeA){var i=this;for(r=0;r<e;r++)i=i.dbl();return i}var s=this.curve.a,d=this.curve.tinv,w=this.x,g=this.y,I=this.z,R=I.redSqr().redSqr(),E=g.redAdd(g);for(r=0;r<e;r++){var B=w.redSqr(),O=E.redSqr(),F=O.redSqr(),H=B.redAdd(B).redIAdd(B).redIAdd(s.redMul(R)),J=w.redMul(O),ue=H.redSqr().redISub(J.redAdd(J)),te=J.redISub(ue),ve=H.redMul(te);ve=ve.redIAdd(ve).redISub(F);var ke=E.redMul(I);r+1<e&&(R=R.redMul(F)),w=ue,I=ke,E=ve}return this.curve.jpoint(w,E.redMul(d),I)};mf.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()};mf.prototype._zeroDbl=function(){var e,r,i;if(this.zOne){var s=this.x.redSqr(),d=this.y.redSqr(),w=d.redSqr(),g=this.x.redAdd(d).redSqr().redISub(s).redISub(w);g=g.redIAdd(g);var I=s.redAdd(s).redIAdd(s),R=I.redSqr().redISub(g).redISub(g),E=w.redIAdd(w);E=E.redIAdd(E),E=E.redIAdd(E),e=R,r=I.redMul(g.redISub(R)).redISub(E),i=this.y.redAdd(this.y)}else{var B=this.x.redSqr(),O=this.y.redSqr(),F=O.redSqr(),H=this.x.redAdd(O).redSqr().redISub(B).redISub(F);H=H.redIAdd(H);var J=B.redAdd(B).redIAdd(B),ue=J.redSqr(),te=F.redIAdd(F);te=te.redIAdd(te),te=te.redIAdd(te),e=ue.redISub(H).redISub(H),r=J.redMul(H.redISub(e)).redISub(te),i=this.y.redMul(this.z),i=i.redIAdd(i)}return this.curve.jpoint(e,r,i)};mf.prototype._threeDbl=function(){var e,r,i;if(this.zOne){var s=this.x.redSqr(),d=this.y.redSqr(),w=d.redSqr(),g=this.x.redAdd(d).redSqr().redISub(s).redISub(w);g=g.redIAdd(g);var I=s.redAdd(s).redIAdd(s).redIAdd(this.curve.a),R=I.redSqr().redISub(g).redISub(g);e=R;var E=w.redIAdd(w);E=E.redIAdd(E),E=E.redIAdd(E),r=I.redMul(g.redISub(R)).redISub(E),i=this.y.redAdd(this.y)}else{var B=this.z.redSqr(),O=this.y.redSqr(),F=this.x.redMul(O),H=this.x.redSub(B).redMul(this.x.redAdd(B));H=H.redAdd(H).redIAdd(H);var J=F.redIAdd(F);J=J.redIAdd(J);var ue=J.redAdd(J);e=H.redSqr().redISub(ue),i=this.y.redAdd(this.z).redSqr().redISub(O).redISub(B);var te=O.redSqr();te=te.redIAdd(te),te=te.redIAdd(te),te=te.redIAdd(te),r=H.redMul(J.redISub(e)).redISub(te)}return this.curve.jpoint(e,r,i)};mf.prototype._dbl=function(){var e=this.curve.a,r=this.x,i=this.y,s=this.z,d=s.redSqr().redSqr(),w=r.redSqr(),g=i.redSqr(),I=w.redAdd(w).redIAdd(w).redIAdd(e.redMul(d)),R=r.redAdd(r);R=R.redIAdd(R);var E=R.redMul(g),B=I.redSqr().redISub(E.redAdd(E)),O=E.redISub(B),F=g.redSqr();F=F.redIAdd(F),F=F.redIAdd(F),F=F.redIAdd(F);var H=I.redMul(O).redISub(F),J=i.redAdd(i).redMul(s);return this.curve.jpoint(B,H,J)};mf.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr(),s=r.redSqr(),d=e.redAdd(e).redIAdd(e),w=d.redSqr(),g=this.x.redAdd(r).redSqr().redISub(e).redISub(s);g=g.redIAdd(g),g=g.redAdd(g).redIAdd(g),g=g.redISub(w);var I=g.redSqr(),R=s.redIAdd(s);R=R.redIAdd(R),R=R.redIAdd(R),R=R.redIAdd(R);var E=d.redIAdd(g).redSqr().redISub(w).redISub(I).redISub(R),B=r.redMul(E);B=B.redIAdd(B),B=B.redIAdd(B);var O=this.x.redMul(I).redISub(B);O=O.redIAdd(O),O=O.redIAdd(O);var F=this.y.redMul(E.redMul(R.redISub(E)).redISub(g.redMul(I)));F=F.redIAdd(F),F=F.redIAdd(F),F=F.redIAdd(F);var H=this.z.redAdd(g).redSqr().redISub(i).redISub(I);return this.curve.jpoint(O,F,H)};mf.prototype.mul=function(e,r){return e=new bf(e,r),this.curve._wnafMul(this,e)};mf.prototype.eq=function(e){if(e.type==="affine")return this.eq(e.toJ());if(this===e)return!0;var r=this.z.redSqr(),i=e.z.redSqr();if(this.x.redMul(i).redISub(e.x.redMul(r)).cmpn(0)!==0)return!1;var s=r.redMul(this.z),d=i.redMul(e.z);return this.y.redMul(d).redISub(e.y.redMul(s)).cmpn(0)===0};mf.prototype.eqXToP=function(e){var r=this.z.redSqr(),i=e.toRed(this.curve.red).redMul(r);if(this.x.cmp(i)===0)return!0;for(var s=e.clone(),d=this.curve.redN.redMul(r);;){if(s.iadd(this.curve.n),s.cmp(this.curve.p)>=0)return!1;if(i.redIAdd(d),this.x.cmp(i)===0)return!0}};mf.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"};mf.prototype.isInfinity=function(){return this.z.cmpn(0)===0};var lt=Vf,qr=Kt,Dt=Yt,z0=Rf;function gt(n){Dt.call(this,"mont",n),this.a=new lt(n.a,16).toRed(this.red),this.b=new lt(n.b,16).toRed(this.red),this.i4=new lt(4).toRed(this.red).redInvm(),this.two=new lt(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}qr(gt,Dt);var B0=gt;gt.prototype.validate=function(e){var r=e.normalize().x,i=r.redSqr(),s=i.redMul(r).redAdd(i.redMul(this.a)).redAdd(r),d=s.redSqrt();return d.redSqr().cmp(s)===0};function pf(n,e,r){Dt.BasePoint.call(this,n,"projective"),e===null&&r===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new lt(e,16),this.z=new lt(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}qr(pf,Dt.BasePoint);gt.prototype.decodePoint=function(e,r){return this.point(z0.toArray(e,r),1)};gt.prototype.point=function(e,r){return new pf(this,e,r)};gt.prototype.pointFromJSON=function(e){return pf.fromJSON(this,e)};pf.prototype.precompute=function(){};pf.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())};pf.fromJSON=function(e,r){return new pf(e,r[0],r[1]||e.one)};pf.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};pf.prototype.isInfinity=function(){return this.z.cmpn(0)===0};pf.prototype.dbl=function(){var e=this.x.redAdd(this.z),r=e.redSqr(),i=this.x.redSub(this.z),s=i.redSqr(),d=r.redSub(s),w=r.redMul(s),g=d.redMul(s.redAdd(this.curve.a24.redMul(d)));return this.curve.point(w,g)};pf.prototype.add=function(){throw new Error("Not supported on Montgomery curve")};pf.prototype.diffAdd=function(e,r){var i=this.x.redAdd(this.z),s=this.x.redSub(this.z),d=e.x.redAdd(e.z),w=e.x.redSub(e.z),g=w.redMul(i),I=d.redMul(s),R=r.z.redMul(g.redAdd(I).redSqr()),E=r.x.redMul(g.redISub(I).redSqr());return this.curve.point(R,E)};pf.prototype.mul=function(e){for(var r=e.clone(),i=this,s=this.curve.point(null,null),d=this,w=[];r.cmpn(0)!==0;r.iushrn(1))w.push(r.andln(1));for(var g=w.length-1;g>=0;g--)w[g]===0?(i=i.diffAdd(s,d),s=s.dbl()):(s=i.diffAdd(s,d),i=i.dbl());return s};pf.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")};pf.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")};pf.prototype.eq=function(e){return this.getX().cmp(e.getX())===0};pf.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this};pf.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var R0=Rf,Jf=Vf,$r=Kt,jt=Yt,P0=R0.assert;function Df(n){this.twisted=(n.a|0)!==1,this.mOneA=this.twisted&&(n.a|0)===-1,this.extended=this.mOneA,jt.call(this,"edwards",n),this.a=new Jf(n.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new Jf(n.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new Jf(n.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),P0(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(n.c|0)===1}$r(Df,jt);var q0=Df;Df.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)};Df.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)};Df.prototype.jpoint=function(e,r,i,s){return this.point(e,r,i,s)};Df.prototype.pointFromX=function(e,r){e=new Jf(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr(),s=this.c2.redSub(this.a.redMul(i)),d=this.one.redSub(this.c2.redMul(this.d).redMul(i)),w=s.redMul(d.redInvm()),g=w.redSqrt();if(g.redSqr().redSub(w).cmp(this.zero)!==0)throw new Error("invalid point");var I=g.fromRed().isOdd();return(r&&!I||!r&&I)&&(g=g.redNeg()),this.point(e,g)};Df.prototype.pointFromY=function(e,r){e=new Jf(e,16),e.red||(e=e.toRed(this.red));var i=e.redSqr(),s=i.redSub(this.c2),d=i.redMul(this.d).redMul(this.c2).redSub(this.a),w=s.redMul(d.redInvm());if(w.cmp(this.zero)===0){if(r)throw new Error("invalid point");return this.point(this.zero,e)}var g=w.redSqrt();if(g.redSqr().redSub(w).cmp(this.zero)!==0)throw new Error("invalid point");return g.fromRed().isOdd()!==r&&(g=g.redNeg()),this.point(g,e)};Df.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var r=e.x.redSqr(),i=e.y.redSqr(),s=r.redMul(this.a).redAdd(i),d=this.c2.redMul(this.one.redAdd(this.d.redMul(r).redMul(i)));return s.cmp(d)===0};function Fe(n,e,r,i,s){jt.BasePoint.call(this,n,"projective"),e===null&&r===null&&i===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new Jf(e,16),this.y=new Jf(r,16),this.z=i?new Jf(i,16):this.curve.one,this.t=s&&new Jf(s,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}$r(Fe,jt.BasePoint);Df.prototype.pointFromJSON=function(e){return Fe.fromJSON(this,e)};Df.prototype.point=function(e,r,i,s){return new Fe(this,e,r,i,s)};Fe.fromJSON=function(e,r){return new Fe(e,r[0],r[1],r[2])};Fe.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"};Fe.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)};Fe.prototype._extDbl=function(){var e=this.x.redSqr(),r=this.y.redSqr(),i=this.z.redSqr();i=i.redIAdd(i);var s=this.curve._mulA(e),d=this.x.redAdd(this.y).redSqr().redISub(e).redISub(r),w=s.redAdd(r),g=w.redSub(i),I=s.redSub(r),R=d.redMul(g),E=w.redMul(I),B=d.redMul(I),O=g.redMul(w);return this.curve.point(R,E,O,B)};Fe.prototype._projDbl=function(){var e=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),i=this.y.redSqr(),s,d,w,g,I,R;if(this.curve.twisted){g=this.curve._mulA(r);var E=g.redAdd(i);this.zOne?(s=e.redSub(r).redSub(i).redMul(E.redSub(this.curve.two)),d=E.redMul(g.redSub(i)),w=E.redSqr().redSub(E).redSub(E)):(I=this.z.redSqr(),R=E.redSub(I).redISub(I),s=e.redSub(r).redISub(i).redMul(R),d=E.redMul(g.redSub(i)),w=E.redMul(R))}else g=r.redAdd(i),I=this.curve._mulC(this.z).redSqr(),R=g.redSub(I).redSub(I),s=this.curve._mulC(e.redISub(g)).redMul(R),d=this.curve._mulC(g).redMul(r.redISub(i)),w=g.redMul(R);return this.curve.point(s,d,w)};Fe.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()};Fe.prototype._extAdd=function(e){var r=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),i=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),s=this.t.redMul(this.curve.dd).redMul(e.t),d=this.z.redMul(e.z.redAdd(e.z)),w=i.redSub(r),g=d.redSub(s),I=d.redAdd(s),R=i.redAdd(r),E=w.redMul(g),B=I.redMul(R),O=w.redMul(R),F=g.redMul(I);return this.curve.point(E,B,F,O)};Fe.prototype._projAdd=function(e){var r=this.z.redMul(e.z),i=r.redSqr(),s=this.x.redMul(e.x),d=this.y.redMul(e.y),w=this.curve.d.redMul(s).redMul(d),g=i.redSub(w),I=i.redAdd(w),R=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(s).redISub(d),E=r.redMul(g).redMul(R),B,O;return this.curve.twisted?(B=r.redMul(I).redMul(d.redSub(this.curve._mulA(s))),O=g.redMul(I)):(B=r.redMul(I).redMul(d.redSub(s)),O=this.curve._mulC(g).redMul(I)),this.curve.point(E,B,O)};Fe.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)};Fe.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)};Fe.prototype.mulAdd=function(e,r,i){return this.curve._wnafMulAdd(1,[this,r],[e,i],2,!1)};Fe.prototype.jmulAdd=function(e,r,i){return this.curve._wnafMulAdd(1,[this,r],[e,i],2,!0)};Fe.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this};Fe.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())};Fe.prototype.getX=function(){return this.normalize(),this.x.fromRed()};Fe.prototype.getY=function(){return this.normalize(),this.y.fromRed()};Fe.prototype.eq=function(e){return this===e||this.getX().cmp(e.getX())===0&&this.getY().cmp(e.getY())===0};Fe.prototype.eqXToP=function(e){var r=e.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(r)===0)return!0;for(var i=e.clone(),s=this.curve.redN.redMul(this.z);;){if(i.iadd(this.curve.n),i.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(s),this.x.cmp(r)===0)return!0}};Fe.prototype.toP=Fe.prototype.normalize;Fe.prototype.mixedAdd=Fe.prototype.add;(function(n){var e=n;e.base=Yt,e.short=E0,e.mont=B0,e.edwards=q0})(vr);var Zt={},Jt={},ge={},$0=ht,N0=Kt;ge.inherits=N0;function L0(n,e){return(n.charCodeAt(e)&64512)!==55296||e<0||e+1>=n.length?!1:(n.charCodeAt(e+1)&64512)===56320}function T0(n,e){if(Array.isArray(n))return n.slice();if(!n)return[];var r=[];if(typeof n=="string")if(e){if(e==="hex")for(n=n.replace(/[^a-z0-9]+/ig,""),n.length%2!==0&&(n="0"+n),s=0;s<n.length;s+=2)r.push(parseInt(n[s]+n[s+1],16))}else for(var i=0,s=0;s<n.length;s++){var d=n.charCodeAt(s);d<128?r[i++]=d:d<2048?(r[i++]=d>>6|192,r[i++]=d&63|128):L0(n,s)?(d=65536+((d&1023)<<10)+(n.charCodeAt(++s)&1023),r[i++]=d>>18|240,r[i++]=d>>12&63|128,r[i++]=d>>6&63|128,r[i++]=d&63|128):(r[i++]=d>>12|224,r[i++]=d>>6&63|128,r[i++]=d&63|128)}else for(s=0;s<n.length;s++)r[s]=n[s]|0;return r}ge.toArray=T0;function U0(n){for(var e="",r=0;r<n.length;r++)e+=Lr(n[r].toString(16));return e}ge.toHex=U0;function Nr(n){var e=n>>>24|n>>>8&65280|n<<8&16711680|(n&255)<<24;return e>>>0}ge.htonl=Nr;function O0(n,e){for(var r="",i=0;i<n.length;i++){var s=n[i];e==="little"&&(s=Nr(s)),r+=Tr(s.toString(16))}return r}ge.toHex32=O0;function Lr(n){return n.length===1?"0"+n:n}ge.zero2=Lr;function Tr(n){return n.length===7?"0"+n:n.length===6?"00"+n:n.length===5?"000"+n:n.length===4?"0000"+n:n.length===3?"00000"+n:n.length===2?"000000"+n:n.length===1?"0000000"+n:n}ge.zero8=Tr;function F0(n,e,r,i){var s=r-e;$0(s%4===0);for(var d=new Array(s/4),w=0,g=e;w<d.length;w++,g+=4){var I;i==="big"?I=n[g]<<24|n[g+1]<<16|n[g+2]<<8|n[g+3]:I=n[g+3]<<24|n[g+2]<<16|n[g+1]<<8|n[g],d[w]=I>>>0}return d}ge.join32=F0;function C0(n,e){for(var r=new Array(n.length*4),i=0,s=0;i<n.length;i++,s+=4){var d=n[i];e==="big"?(r[s]=d>>>24,r[s+1]=d>>>16&255,r[s+2]=d>>>8&255,r[s+3]=d&255):(r[s+3]=d>>>24,r[s+2]=d>>>16&255,r[s+1]=d>>>8&255,r[s]=d&255)}return r}ge.split32=C0;function H0(n,e){return n>>>e|n<<32-e}ge.rotr32=H0;function Y0(n,e){return n<<e|n>>>32-e}ge.rotl32=Y0;function K0(n,e){return n+e>>>0}ge.sum32=K0;function D0(n,e,r){return n+e+r>>>0}ge.sum32_3=D0;function j0(n,e,r,i){return n+e+r+i>>>0}ge.sum32_4=j0;function Z0(n,e,r,i,s){return n+e+r+i+s>>>0}ge.sum32_5=Z0;function J0(n,e,r,i){var s=n[e],d=n[e+1],w=i+d>>>0,g=(w<i?1:0)+r+s;n[e]=g>>>0,n[e+1]=w}ge.sum64=J0;function X0(n,e,r,i){var s=e+i>>>0,d=(s<e?1:0)+n+r;return d>>>0}ge.sum64_hi=X0;function W0(n,e,r,i){var s=e+i;return s>>>0}ge.sum64_lo=W0;function V0(n,e,r,i,s,d,w,g){var I=0,R=e;R=R+i>>>0,I+=R<e?1:0,R=R+d>>>0,I+=R<d?1:0,R=R+g>>>0,I+=R<g?1:0;var E=n+r+s+w+I;return E>>>0}ge.sum64_4_hi=V0;function k0(n,e,r,i,s,d,w,g){var I=e+i+d+g;return I>>>0}ge.sum64_4_lo=k0;function G0(n,e,r,i,s,d,w,g,I,R){var E=0,B=e;B=B+i>>>0,E+=B<e?1:0,B=B+d>>>0,E+=B<d?1:0,B=B+g>>>0,E+=B<g?1:0,B=B+R>>>0,E+=B<R?1:0;var O=n+r+s+w+I+E;return O>>>0}ge.sum64_5_hi=G0;function Q0(n,e,r,i,s,d,w,g,I,R){var E=e+i+d+g+R;return E>>>0}ge.sum64_5_lo=Q0;function ea(n,e,r){var i=e<<32-r|n>>>r;return i>>>0}ge.rotr64_hi=ea;function fa(n,e,r){var i=n<<32-r|e>>>r;return i>>>0}ge.rotr64_lo=fa;function ta(n,e,r){return n>>>r}ge.shr64_hi=ta;function ra(n,e,r){var i=n<<32-r|e>>>r;return i>>>0}ge.shr64_lo=ra;var Mt={},gr=ge,aa=ht;function Xt(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Mt.BlockHash=Xt;Xt.prototype.update=function(e,r){if(e=gr.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var i=e.length%this._delta8;this.pending=e.slice(e.length-i,e.length),this.pending.length===0&&(this.pending=null),e=gr.join32(e,0,e.length-i,this.endian);for(var s=0;s<e.length;s+=this._delta32)this._update(e,s,s+this._delta32)}return this};Xt.prototype.digest=function(e){return this.update(this._pad()),aa(this.pending===null),this._digest(e)};Xt.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,i=r-(e+this.padLength)%r,s=new Array(i+this.padLength);s[0]=128;for(var d=1;d<i;d++)s[d]=0;if(e<<=3,this.endian==="big"){for(var w=8;w<this.padLength;w++)s[d++]=0;s[d++]=0,s[d++]=0,s[d++]=0,s[d++]=0,s[d++]=e>>>24&255,s[d++]=e>>>16&255,s[d++]=e>>>8&255,s[d++]=e&255}else for(s[d++]=e&255,s[d++]=e>>>8&255,s[d++]=e>>>16&255,s[d++]=e>>>24&255,s[d++]=0,s[d++]=0,s[d++]=0,s[d++]=0,w=8;w<this.padLength;w++)s[d++]=0;return s};var wt={},jf={},ia=ge,Of=ia.rotr32;function na(n,e,r,i){if(n===0)return Ur(e,r,i);if(n===1||n===3)return Fr(e,r,i);if(n===2)return Or(e,r,i)}jf.ft_1=na;function Ur(n,e,r){return n&e^~n&r}jf.ch32=Ur;function Or(n,e,r){return n&e^n&r^e&r}jf.maj32=Or;function Fr(n,e,r){return n^e^r}jf.p32=Fr;function da(n){return Of(n,2)^Of(n,13)^Of(n,22)}jf.s0_256=da;function ca(n){return Of(n,6)^Of(n,11)^Of(n,25)}jf.s1_256=ca;function ha(n){return Of(n,7)^Of(n,18)^n>>>3}jf.g0_256=ha;function sa(n){return Of(n,17)^Of(n,19)^n>>>10}jf.g1_256=sa;var vt=ge,oa=Mt,ua=jf,er=vt.rotl32,Bt=vt.sum32,ba=vt.sum32_5,la=ua.ft_1,Cr=oa.BlockHash,va=[1518500249,1859775393,2400959708,3395469782];function Hf(){if(!(this instanceof Hf))return new Hf;Cr.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}vt.inherits(Hf,Cr);var xa=Hf;Hf.blockSize=512;Hf.outSize=160;Hf.hmacStrength=80;Hf.padLength=64;Hf.prototype._update=function(e,r){for(var i=this.W,s=0;s<16;s++)i[s]=e[r+s];for(;s<i.length;s++)i[s]=er(i[s-3]^i[s-8]^i[s-14]^i[s-16],1);var d=this.h[0],w=this.h[1],g=this.h[2],I=this.h[3],R=this.h[4];for(s=0;s<i.length;s++){var E=~~(s/20),B=ba(er(d,5),la(E,w,g,I),R,i[s],va[E]);R=I,I=g,g=er(w,30),w=d,d=B}this.h[0]=Bt(this.h[0],d),this.h[1]=Bt(this.h[1],w),this.h[2]=Bt(this.h[2],g),this.h[3]=Bt(this.h[3],I),this.h[4]=Bt(this.h[4],R)};Hf.prototype._digest=function(e){return e==="hex"?vt.toHex32(this.h,"big"):vt.split32(this.h,"big")};var xt=ge,pa=Mt,_t=jf,ya=ht,Tf=xt.sum32,ma=xt.sum32_4,ga=xt.sum32_5,Ma=_t.ch32,wa=_t.maj32,_a=_t.s0_256,Sa=_t.s1_256,Aa=_t.g0_256,Ia=_t.g1_256,Hr=pa.BlockHash,Ea=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Yf(){if(!(this instanceof Yf))return new Yf;Hr.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Ea,this.W=new Array(64)}xt.inherits(Yf,Hr);var Yr=Yf;Yf.blockSize=512;Yf.outSize=256;Yf.hmacStrength=192;Yf.padLength=64;Yf.prototype._update=function(e,r){for(var i=this.W,s=0;s<16;s++)i[s]=e[r+s];for(;s<i.length;s++)i[s]=ma(Ia(i[s-2]),i[s-7],Aa(i[s-15]),i[s-16]);var d=this.h[0],w=this.h[1],g=this.h[2],I=this.h[3],R=this.h[4],E=this.h[5],B=this.h[6],O=this.h[7];for(ya(this.k.length===i.length),s=0;s<i.length;s++){var F=ga(O,Sa(R),Ma(R,E,B),this.k[s],i[s]),H=Tf(_a(d),wa(d,w,g));O=B,B=E,E=R,R=Tf(I,F),I=g,g=w,w=d,d=Tf(F,H)}this.h[0]=Tf(this.h[0],d),this.h[1]=Tf(this.h[1],w),this.h[2]=Tf(this.h[2],g),this.h[3]=Tf(this.h[3],I),this.h[4]=Tf(this.h[4],R),this.h[5]=Tf(this.h[5],E),this.h[6]=Tf(this.h[6],B),this.h[7]=Tf(this.h[7],O)};Yf.prototype._digest=function(e){return e==="hex"?xt.toHex32(this.h,"big"):xt.split32(this.h,"big")};var cr=ge,Kr=Yr;function Xf(){if(!(this instanceof Xf))return new Xf;Kr.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}cr.inherits(Xf,Kr);var za=Xf;Xf.blockSize=512;Xf.outSize=224;Xf.hmacStrength=192;Xf.padLength=64;Xf.prototype._digest=function(e){return e==="hex"?cr.toHex32(this.h.slice(0,7),"big"):cr.split32(this.h.slice(0,7),"big")};var zf=ge,Ba=Mt,Ra=ht,Ff=zf.rotr64_hi,Cf=zf.rotr64_lo,Dr=zf.shr64_hi,jr=zf.shr64_lo,Gf=zf.sum64,fr=zf.sum64_hi,tr=zf.sum64_lo,Pa=zf.sum64_4_hi,qa=zf.sum64_4_lo,$a=zf.sum64_5_hi,Na=zf.sum64_5_lo,Zr=Ba.BlockHash,La=[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 Uf(){if(!(this instanceof Uf))return new Uf;Zr.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=La,this.W=new Array(160)}zf.inherits(Uf,Zr);var Jr=Uf;Uf.blockSize=1024;Uf.outSize=512;Uf.hmacStrength=192;Uf.padLength=128;Uf.prototype._prepareBlock=function(e,r){for(var i=this.W,s=0;s<32;s++)i[s]=e[r+s];for(;s<i.length;s+=2){var d=Za(i[s-4],i[s-3]),w=Ja(i[s-4],i[s-3]),g=i[s-14],I=i[s-13],R=Da(i[s-30],i[s-29]),E=ja(i[s-30],i[s-29]),B=i[s-32],O=i[s-31];i[s]=Pa(d,w,g,I,R,E,B,O),i[s+1]=qa(d,w,g,I,R,E,B,O)}};Uf.prototype._update=function(e,r){this._prepareBlock(e,r);var i=this.W,s=this.h[0],d=this.h[1],w=this.h[2],g=this.h[3],I=this.h[4],R=this.h[5],E=this.h[6],B=this.h[7],O=this.h[8],F=this.h[9],H=this.h[10],J=this.h[11],ue=this.h[12],te=this.h[13],ve=this.h[14],ke=this.h[15];Ra(this.k.length===i.length);for(var Pe=0;Pe<i.length;Pe+=2){var Le=ve,rf=ke,Sf=Ya(O,F),Af=Ka(O,F),Se=Ta(O,F,H,J,ue),If=Ua(O,F,H,J,ue,te),M=this.k[Pe],t=this.k[Pe+1],h=i[Pe],l=i[Pe+1],v=$a(Le,rf,Sf,Af,Se,If,M,t,h,l),p=Na(Le,rf,Sf,Af,Se,If,M,t,h,l);Le=Ca(s,d),rf=Ha(s,d),Sf=Oa(s,d,w,g,I),Af=Fa(s,d,w,g,I,R);var _=fr(Le,rf,Sf,Af),A=tr(Le,rf,Sf,Af);ve=ue,ke=te,ue=H,te=J,H=O,J=F,O=fr(E,B,v,p),F=tr(B,B,v,p),E=I,B=R,I=w,R=g,w=s,g=d,s=fr(v,p,_,A),d=tr(v,p,_,A)}Gf(this.h,0,s,d),Gf(this.h,2,w,g),Gf(this.h,4,I,R),Gf(this.h,6,E,B),Gf(this.h,8,O,F),Gf(this.h,10,H,J),Gf(this.h,12,ue,te),Gf(this.h,14,ve,ke)};Uf.prototype._digest=function(e){return e==="hex"?zf.toHex32(this.h,"big"):zf.split32(this.h,"big")};function Ta(n,e,r,i,s){var d=n&r^~n&s;return d<0&&(d+=4294967296),d}function Ua(n,e,r,i,s,d){var w=e&i^~e&d;return w<0&&(w+=4294967296),w}function Oa(n,e,r,i,s){var d=n&r^n&s^r&s;return d<0&&(d+=4294967296),d}function Fa(n,e,r,i,s,d){var w=e&i^e&d^i&d;return w<0&&(w+=4294967296),w}function Ca(n,e){var r=Ff(n,e,28),i=Ff(e,n,2),s=Ff(e,n,7),d=r^i^s;return d<0&&(d+=4294967296),d}function Ha(n,e){var r=Cf(n,e,28),i=Cf(e,n,2),s=Cf(e,n,7),d=r^i^s;return d<0&&(d+=4294967296),d}function Ya(n,e){var r=Ff(n,e,14),i=Ff(n,e,18),s=Ff(e,n,9),d=r^i^s;return d<0&&(d+=4294967296),d}function Ka(n,e){var r=Cf(n,e,14),i=Cf(n,e,18),s=Cf(e,n,9),d=r^i^s;return d<0&&(d+=4294967296),d}function Da(n,e){var r=Ff(n,e,1),i=Ff(n,e,8),s=Dr(n,e,7),d=r^i^s;return d<0&&(d+=4294967296),d}function ja(n,e){var r=Cf(n,e,1),i=Cf(n,e,8),s=jr(n,e,7),d=r^i^s;return d<0&&(d+=4294967296),d}function Za(n,e){var r=Ff(n,e,19),i=Ff(e,n,29),s=Dr(n,e,6),d=r^i^s;return d<0&&(d+=4294967296),d}function Ja(n,e){var r=Cf(n,e,19),i=Cf(e,n,29),s=jr(n,e,6),d=r^i^s;return d<0&&(d+=4294967296),d}var hr=ge,Xr=Jr;function Wf(){if(!(this instanceof Wf))return new Wf;Xr.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}hr.inherits(Wf,Xr);var Xa=Wf;Wf.blockSize=1024;Wf.outSize=384;Wf.hmacStrength=192;Wf.padLength=128;Wf.prototype._digest=function(e){return e==="hex"?hr.toHex32(this.h.slice(0,12),"big"):hr.split32(this.h.slice(0,12),"big")};wt.sha1=xa;wt.sha224=za;wt.sha256=Yr;wt.sha384=Xa;wt.sha512=Jr;var Wr={},ct=ge,Wa=Mt,Ut=ct.rotl32,Mr=ct.sum32,Rt=ct.sum32_3,wr=ct.sum32_4,Vr=Wa.BlockHash;function Kf(){if(!(this instanceof Kf))return new Kf;Vr.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}ct.inherits(Kf,Vr);Wr.ripemd160=Kf;Kf.blockSize=512;Kf.outSize=160;Kf.hmacStrength=192;Kf.padLength=64;Kf.prototype._update=function(e,r){for(var i=this.h[0],s=this.h[1],d=this.h[2],w=this.h[3],g=this.h[4],I=i,R=s,E=d,B=w,O=g,F=0;F<80;F++){var H=Mr(Ut(wr(i,_r(F,s,d,w),e[Ga[F]+r],Va(F)),ei[F]),g);i=g,g=w,w=Ut(d,10),d=s,s=H,H=Mr(Ut(wr(I,_r(79-F,R,E,B),e[Qa[F]+r],ka(F)),fi[F]),O),I=O,O=B,B=Ut(E,10),E=R,R=H}H=Rt(this.h[1],d,B),this.h[1]=Rt(this.h[2],w,O),this.h[2]=Rt(this.h[3],g,I),this.h[3]=Rt(this.h[4],i,R),this.h[4]=Rt(this.h[0],s,E),this.h[0]=H};Kf.prototype._digest=function(e){return e==="hex"?ct.toHex32(this.h,"little"):ct.split32(this.h,"little")};function _r(n,e,r,i){return n<=15?e^r^i:n<=31?e&r|~e&i:n<=47?(e|~r)^i:n<=63?e&i|r&~i:e^(r|~i)}function Va(n){return n<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838}function ka(n){return n<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0}var Ga=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Qa=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],ei=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],fi=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],ti=ge,ri=ht;function pt(n,e,r){if(!(this instanceof pt))return new pt(n,e,r);this.Hash=n,this.blockSize=n.blockSize/8,this.outSize=n.outSize/8,this.inner=null,this.outer=null,this._init(ti.toArray(e,r))}var ai=pt;pt.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),ri(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};pt.prototype.update=function(e,r){return this.inner.update(e,r),this};pt.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)};(function(n){var e=n;e.utils=ge,e.common=Mt,e.sha=wt,e.ripemd=Wr,e.hmac=ai,e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160})(Jt);var rr,Sr;function ii(){return Sr||(Sr=1,rr={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}),rr}(function(n){var e=n,r=Jt,i=vr,s=Rf,d=s.assert;function w(R){R.type==="short"?this.curve=new i.short(R):R.type==="edwards"?this.curve=new i.edwards(R):this.curve=new i.mont(R),this.g=this.curve.g,this.n=this.curve.n,this.hash=R.hash,d(this.g.validate(),"Invalid curve"),d(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}e.PresetCurve=w;function g(R,E){Object.defineProperty(e,R,{configurable:!0,enumerable:!0,get:function(){var B=new w(E);return Object.defineProperty(e,R,{configurable:!0,enumerable:!0,value:B}),B}})}g("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:r.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),g("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:r.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),g("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:r.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),g("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:r.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),g("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:r.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),g("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["9"]}),g("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:r.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var I;try{I=ii()}catch{I=void 0}g("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:r.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",I]})})(Zt);var ni=Jt,nt=br,kr=ht;function et(n){if(!(this instanceof et))return new et(n);this.hash=n.hash,this.predResist=!!n.predResist,this.outLen=this.hash.outSize,this.minEntropy=n.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=nt.toArray(n.entropy,n.entropyEnc||"hex"),r=nt.toArray(n.nonce,n.nonceEnc||"hex"),i=nt.toArray(n.pers,n.persEnc||"hex");kr(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}var di=et;et.prototype._init=function(e,r,i){var s=e.concat(r).concat(i);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var d=0;d<this.V.length;d++)this.K[d]=0,this.V[d]=1;this._update(s),this._reseed=1,this.reseedInterval=281474976710656};et.prototype._hmac=function(){return new ni.hmac(this.hash,this.K)};et.prototype._update=function(e){var r=this._hmac().update(this.V).update([0]);e&&(r=r.update(e)),this.K=r.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())};et.prototype.reseed=function(e,r,i,s){typeof r!="string"&&(s=i,i=r,r=null),e=nt.toArray(e,r),i=nt.toArray(i,s),kr(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(i||[])),this._reseed=1};et.prototype.generate=function(e,r,i,s){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof r!="string"&&(s=i,i=r,r=null),i&&(i=nt.toArray(i,s||"hex"),this._update(i));for(var d=[];d.length<e;)this.V=this._hmac().update(this.V).digest(),d=d.concat(this.V);var w=d.slice(0,e);return this._update(i),this._reseed++,nt.encode(w,r)};var ci=Vf,hi=Rf,sr=hi.assert;function _f(n,e){this.ec=n,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}var si=_f;_f.fromPublic=function(e,r,i){return r instanceof _f?r:new _f(e,{pub:r,pubEnc:i})};_f.fromPrivate=function(e,r,i){return r instanceof _f?r:new _f(e,{priv:r,privEnc:i})};_f.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}};_f.prototype.getPublic=function(e,r){return typeof e=="string"&&(r=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),r?this.pub.encode(r,e):this.pub};_f.prototype.getPrivate=function(e){return e==="hex"?this.priv.toString(16,2):this.priv};_f.prototype._importPrivate=function(e,r){this.priv=new ci(e,r||16),this.priv=this.priv.umod(this.ec.curve.n)};_f.prototype._importPublic=function(e,r){if(e.x||e.y){this.ec.curve.type==="mont"?sr(e.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&sr(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y);return}this.pub=this.ec.curve.decodePoint(e,r)};_f.prototype.derive=function(e){return e.validate()||sr(e.validate(),"public point not validated"),e.mul(this.priv).getX()};_f.prototype.sign=function(e,r,i){return this.ec.sign(e,this,r,i)};_f.prototype.verify=function(e,r){return this.ec.verify(e,r,this)};_f.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Ht=Vf,pr=Rf,oi=pr.assert;function Wt(n,e){if(n instanceof Wt)return n;this._importDER(n,e)||(oi(n.r&&n.s,"Signature without r or s"),this.r=new Ht(n.r,16),this.s=new Ht(n.s,16),n.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=n.recoveryParam)}var ui=Wt;function bi(){this.place=0}function ar(n,e){var r=n[e.place++];if(!(r&128))return r;var i=r&15;if(i===0||i>4)return!1;for(var s=0,d=0,w=e.place;d<i;d++,w++)s<<=8,s|=n[w],s>>>=0;return s<=127?!1:(e.place=w,s)}function Ar(n){for(var e=0,r=n.length-1;!n[e]&&!(n[e+1]&128)&&e<r;)e++;return e===0?n:n.slice(e)}Wt.prototype._importDER=function(e,r){e=pr.toArray(e,r);var i=new bi;if(e[i.place++]!==48)return!1;var s=ar(e,i);if(s===!1||s+i.place!==e.length||e[i.place++]!==2)return!1;var d=ar(e,i);if(d===!1)return!1;var w=e.slice(i.place,d+i.place);if(i.place+=d,e[i.place++]!==2)return!1;var g=ar(e,i);if(g===!1||e.length!==g+i.place)return!1;var I=e.slice(i.place,g+i.place);if(w[0]===0)if(w[1]&128)w=w.slice(1);else return!1;if(I[0]===0)if(I[1]&128)I=I.slice(1);else return!1;return this.r=new Ht(w),this.s=new Ht(I),this.recoveryParam=null,!0};function ir(n,e){if(e<128){n.push(e);return}var r=1+(Math.log(e)/Math.LN2>>>3);for(n.push(r|128);--r;)n.push(e>>>(r<<3)&255);n.push(e)}Wt.prototype.toDER=function(e){var r=this.r.toArray(),i=this.s.toArray();for(r[0]&128&&(r=[0].concat(r)),i[0]&128&&(i=[0].concat(i)),r=Ar(r),i=Ar(i);!i[0]&&!(i[1]&128);)i=i.slice(1);var s=[2];ir(s,r.length),s=s.concat(r),s.push(2),ir(s,i.length);var d=s.concat(i),w=[48];return ir(w,d.length),w=w.concat(d),pr.encode(w,e)};var dt=Vf,Gr=di,li=Rf,nr=Zt,vi=Pr,Qr=li.assert,yr=si,Vt=ui;function qf(n){if(!(this instanceof qf))return new qf(n);typeof n=="string"&&(Qr(Object.prototype.hasOwnProperty.call(nr,n),"Unknown curve "+n),n=nr[n]),n instanceof nr.PresetCurve&&(n={curve:n}),this.curve=n.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=n.curve.g,this.g.precompute(n.curve.n.bitLength()+1),this.hash=n.hash||n.curve.hash}var xi=qf;qf.prototype.keyPair=function(e){return new yr(this,e)};qf.prototype.keyFromPrivate=function(e,r){return yr.fromPrivate(this,e,r)};qf.prototype.keyFromPublic=function(e,r){return yr.fromPublic(this,e,r)};qf.prototype.genKeyPair=function(e){e||(e={});for(var r=new Gr({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||vi(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),i=this.n.byteLength(),s=this.n.sub(new dt(2));;){var d=new dt(r.generate(i));if(!(d.cmp(s)>0))return d.iaddn(1),this.keyFromPrivate(d)}};qf.prototype._truncateToN=function(e,r){var i=e.byteLength()*8-this.n.bitLength();return i>0&&(e=e.ushrn(i)),!r&&e.cmp(this.n)>=0?e.sub(this.n):e};qf.prototype.sign=function(e,r,i,s){typeof i=="object"&&(s=i,i=null),s||(s={}),r=this.keyFromPrivate(r,i),e=this._truncateToN(new dt(e,16));for(var d=this.n.byteLength(),w=r.getPrivate().toArray("be",d),g=e.toArray("be",d),I=new Gr({hash:this.hash,entropy:w,nonce:g,pers:s.pers,persEnc:s.persEnc||"utf8"}),R=this.n.sub(new dt(1)),E=0;;E++){var B=s.k?s.k(E):new dt(I.generate(this.n.byteLength()));if(B=this._truncateToN(B,!0),!(B.cmpn(1)<=0||B.cmp(R)>=0)){var O=this.g.mul(B);if(!O.isInfinity()){var F=O.getX(),H=F.umod(this.n);if(H.cmpn(0)!==0){var J=B.invm(this.n).mul(H.mul(r.getPrivate()).iadd(e));if(J=J.umod(this.n),J.cmpn(0)!==0){var ue=(O.getY().isOdd()?1:0)|(F.cmp(H)!==0?2:0);return s.canonical&&J.cmp(this.nh)>0&&(J=this.n.sub(J),ue^=1),new Vt({r:H,s:J,recoveryParam:ue})}}}}}};qf.prototype.verify=function(e,r,i,s){e=this._truncateToN(new dt(e,16)),i=this.keyFromPublic(i,s),r=new Vt(r,"hex");var d=r.r,w=r.s;if(d.cmpn(1)<0||d.cmp(this.n)>=0||w.cmpn(1)<0||w.cmp(this.n)>=0)return!1;var g=w.invm(this.n),I=g.mul(e).umod(this.n),R=g.mul(d).umod(this.n),E;return this.curve._maxwellTrick?(E=this.g.jmulAdd(I,i.getPublic(),R),E.isInfinity()?!1:E.eqXToP(d)):(E=this.g.mulAdd(I,i.getPublic(),R),E.isInfinity()?!1:E.getX().umod(this.n).cmp(d)===0)};qf.prototype.recoverPubKey=function(n,e,r,i){Qr((3&r)===r,"The recovery param is more than two bits"),e=new Vt(e,i);var s=this.n,d=new dt(n),w=e.r,g=e.s,I=r&1,R=r>>1;if(w.cmp(this.curve.p.umod(this.curve.n))>=0&&R)throw new Error("Unable to find sencond key candinate");R?w=this.curve.pointFromX(w.add(this.curve.n),I):w=this.curve.pointFromX(w,I);var E=e.r.invm(s),B=s.sub(d).mul(E).umod(s),O=g.mul(E).umod(s);return this.g.mulAdd(B,w,O)};qf.prototype.getKeyRecoveryParam=function(n,e,r,i){if(e=new Vt(e,i),e.recoveryParam!==null)return e.recoveryParam;for(var s=0;s<4;s++){var d;try{d=this.recoverPubKey(n,e,s)}catch{continue}if(d.eq(r))return s}throw new Error("Unable to find valid recovery factor")};var $t=Rf,e0=$t.assert,Ir=$t.parseBytes,St=$t.cachedProperty;function xf(n,e){this.eddsa=n,this._secret=Ir(e.secret),n.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Ir(e.pub)}xf.fromPublic=function(e,r){return r instanceof xf?r:new xf(e,{pub:r})};xf.fromSecret=function(e,r){return r instanceof xf?r:new xf(e,{secret:r})};xf.prototype.secret=function(){return this._secret};St(xf,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())});St(xf,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())});St(xf,"privBytes",function(){var e=this.eddsa,r=this.hash(),i=e.encodingLength-1,s=r.slice(0,e.encodingLength);return s[0]&=248,s[i]&=127,s[i]|=64,s});St(xf,"priv",function(){return this.eddsa.decodeInt(this.privBytes())});St(xf,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()});St(xf,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)});xf.prototype.sign=function(e){return e0(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)};xf.prototype.verify=function(e,r){return this.eddsa.verify(e,r,this)};xf.prototype.getSecret=function(e){return e0(this._secret,"KeyPair is public only"),$t.encode(this.secret(),e)};xf.prototype.getPublic=function(e){return $t.encode(this.pubBytes(),e)};var pi=xf,yi=Vf,kt=Rf,mi=kt.assert,Gt=kt.cachedProperty,gi=kt.parseBytes;function st(n,e){this.eddsa=n,typeof e!="object"&&(e=gi(e)),Array.isArray(e)&&(e={R:e.slice(0,n.encodingLength),S:e.slice(n.encodingLength)}),mi(e.R&&e.S,"Signature without R or S"),n.isPoint(e.R)&&(this._R=e.R),e.S instanceof yi&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Gt(st,"S",function(){return this.eddsa.decodeInt(this.Sencoded())});Gt(st,"R",function(){return this.eddsa.decodePoint(this.Rencoded())});Gt(st,"Rencoded",function(){return this.eddsa.encodePoint(this.R())});Gt(st,"Sencoded",function(){return this.eddsa.encodeInt(this.S())});st.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())};st.prototype.toHex=function(){return kt.encode(this.toBytes(),"hex").toUpperCase()};var Mi=st,wi=Jt,_i=Zt,yt=Rf,Si=yt.assert,f0=yt.parseBytes,t0=pi,Er=Mi;function Bf(n){if(Si(n==="ed25519","only tested with ed25519 so far"),!(this instanceof Bf))return new Bf(n);n=_i[n].curve,this.curve=n,this.g=n.g,this.g.precompute(n.n.bitLength()+1),this.pointClass=n.point().constructor,this.encodingLength=Math.ceil(n.n.bitLength()/8),this.hash=wi.sha512}var Ai=Bf;Bf.prototype.sign=function(e,r){e=f0(e);var i=this.keyFromSecret(r),s=this.hashInt(i.messagePrefix(),e),d=this.g.mul(s),w=this.encodePoint(d),g=this.hashInt(w,i.pubBytes(),e).mul(i.priv()),I=s.add(g).umod(this.curve.n);return this.makeSignature({R:d,S:I,Rencoded:w})};Bf.prototype.verify=function(e,r,i){e=f0(e),r=this.makeSignature(r);var s=this.keyFromPublic(i),d=this.hashInt(r.Rencoded(),s.pubBytes(),e),w=this.g.mul(r.S()),g=r.R().add(s.pub().mul(d));return g.eq(w)};Bf.prototype.hashInt=function(){for(var e=this.hash(),r=0;r<arguments.length;r++)e.update(arguments[r]);return yt.intFromLE(e.digest()).umod(this.curve.n)};Bf.prototype.keyFromPublic=function(e){return t0.fromPublic(this,e)};Bf.prototype.keyFromSecret=function(e){return t0.fromSecret(this,e)};Bf.prototype.makeSignature=function(e){return e instanceof Er?e:new Er(this,e)};Bf.prototype.encodePoint=function(e){var r=e.getY().toArray("le",this.encodingLength);return r[this.encodingLength-1]|=e.getX().isOdd()?128:0,r};Bf.prototype.decodePoint=function(e){e=yt.parseBytes(e);var r=e.length-1,i=e.slice(0,r).concat(e[r]&-129),s=(e[r]&128)!==0,d=yt.intFromLE(i);return this.curve.pointFromY(d,s)};Bf.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)};Bf.prototype.decodeInt=function(e){return yt.intFromLE(e)};Bf.prototype.isPoint=function(e){return e instanceof this.pointClass};(function(n){var e=n;e.version=_0.version,e.utils=Rf,e.rand=Pr,e.curve=vr,e.curves=Zt,e.ec=xi,e.eddsa=Ai})(Br);var r0={exports:{}};(function(n){(function(e){var r=function(c){var u,o=new Float64Array(16);if(c)for(u=0;u<c.length;u++)o[u]=c[u];return o},i=function(){throw new Error("no PRNG")},s=new Uint8Array(16),d=new Uint8Array(32);d[0]=9;var w=r(),g=r([1]),I=r([56129,1]),R=r([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),E=r([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),B=r([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),O=r([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),F=r([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function H(c,u,o,f){c[u]=o>>24&255,c[u+1]=o>>16&255,c[u+2]=o>>8&255,c[u+3]=o&255,c[u+4]=f>>24&255,c[u+5]=f>>16&255,c[u+6]=f>>8&255,c[u+7]=f&255}function J(c,u,o,f,b){var S,z=0;for(S=0;S<b;S++)z|=c[u+S]^o[f+S];return(1&z-1>>>8)-1}function ue(c,u,o,f){return J(c,u,o,f,16)}function te(c,u,o,f){return J(c,u,o,f,32)}function ve(c,u,o,f){for(var b=f[0]&255|(f[1]&255)<<8|(f[2]&255)<<16|(f[3]&255)<<24,S=o[0]&255|(o[1]&255)<<8|(o[2]&255)<<16|(o[3]&255)<<24,z=o[4]&255|(o[5]&255)<<8|(o[6]&255)<<16|(o[7]&255)<<24,$=o[8]&255|(o[9]&255)<<8|(o[10]&255)<<16|(o[11]&255)<<24,T=o[12]&255|(o[13]&255)<<8|(o[14]&255)<<16|(o[15]&255)<<24,Q=f[4]&255|(f[5]&255)<<8|(f[6]&255)<<16|(f[7]&255)<<24,D=u[0]&255|(u[1]&255)<<8|(u[2]&255)<<16|(u[3]&255)<<24,me=u[4]&255|(u[5]&255)<<8|(u[6]&255)<<16|(u[7]&255)<<24,Z=u[8]&255|(u[9]&255)<<8|(u[10]&255)<<16|(u[11]&255)<<24,ae=u[12]&255|(u[13]&255)<<8|(u[14]&255)<<16|(u[15]&255)<<24,ie=f[8]&255|(f[9]&255)<<8|(f[10]&255)<<16|(f[11]&255)<<24,se=o[16]&255|(o[17]&255)<<8|(o[18]&255)<<16|(o[19]&255)<<24,he=o[20]&255|(o[21]&255)<<8|(o[22]&255)<<16|(o[23]&255)<<24,ne=o[24]&255|(o[25]&255)<<8|(o[26]&255)<<16|(o[27]&255)<<24,ce=o[28]&255|(o[29]&255)<<8|(o[30]&255)<<16|(o[31]&255)<<24,de=f[12]&255|(f[13]&255)<<8|(f[14]&255)<<16|(f[15]&255)<<24,W=b,fe=S,j=z,V=$,G=T,K=Q,P=D,q=me,U=Z,N=ae,L=ie,C=se,re=he,be=ne,xe=ce,le=de,m,ye=0;ye<20;ye+=2)m=W+re|0,G^=m<<7|m>>>25,m=G+W|0,U^=m<<9|m>>>23,m=U+G|0,re^=m<<13|m>>>19,m=re+U|0,W^=m<<18|m>>>14,m=K+fe|0,N^=m<<7|m>>>25,m=N+K|0,be^=m<<9|m>>>23,m=be+N|0,fe^=m<<13|m>>>19,m=fe+be|0,K^=m<<18|m>>>14,m=L+P|0,xe^=m<<7|m>>>25,m=xe+L|0,j^=m<<9|m>>>23,m=j+xe|0,P^=m<<13|m>>>19,m=P+j|0,L^=m<<18|m>>>14,m=le+C|0,V^=m<<7|m>>>25,m=V+le|0,q^=m<<9|m>>>23,m=q+V|0,C^=m<<13|m>>>19,m=C+q|0,le^=m<<18|m>>>14,m=W+V|0,fe^=m<<7|m>>>25,m=fe+W|0,j^=m<<9|m>>>23,m=j+fe|0,V^=m<<13|m>>>19,m=V+j|0,W^=m<<18|m>>>14,m=K+G|0,P^=m<<7|m>>>25,m=P+K|0,q^=m<<9|m>>>23,m=q+P|0,G^=m<<13|m>>>19,m=G+q|0,K^=m<<18|m>>>14,m=L+N|0,C^=m<<7|m>>>25,m=C+L|0,U^=m<<9|m>>>23,m=U+C|0,N^=m<<13|m>>>19,m=N+U|0,L^=m<<18|m>>>14,m=le+xe|0,re^=m<<7|m>>>25,m=re+le|0,be^=m<<9|m>>>23,m=be+re|0,xe^=m<<13|m>>>19,m=xe+be|0,le^=m<<18|m>>>14;W=W+b|0,fe=fe+S|0,j=j+z|0,V=V+$|0,G=G+T|0,K=K+Q|0,P=P+D|0,q=q+me|0,U=U+Z|0,N=N+ae|0,L=L+ie|0,C=C+se|0,re=re+he|0,be=be+ne|0,xe=xe+ce|0,le=le+de|0,c[0]=W>>>0&255,c[1]=W>>>8&255,c[2]=W>>>16&255,c[3]=W>>>24&255,c[4]=fe>>>0&255,c[5]=fe>>>8&255,c[6]=fe>>>16&255,c[7]=fe>>>24&255,c[8]=j>>>0&255,c[9]=j>>>8&255,c[10]=j>>>16&255,c[11]=j>>>24&255,c[12]=V>>>0&255,c[13]=V>>>8&255,c[14]=V>>>16&255,c[15]=V>>>24&255,c[16]=G>>>0&255,c[17]=G>>>8&255,c[18]=G>>>16&255,c[19]=G>>>24&255,c[20]=K>>>0&255,c[21]=K>>>8&255,c[22]=K>>>16&255,c[23]=K>>>24&255,c[24]=P>>>0&255,c[25]=P>>>8&255,c[26]=P>>>16&255,c[27]=P>>>24&255,c[28]=q>>>0&255,c[29]=q>>>8&255,c[30]=q>>>16&255,c[31]=q>>>24&255,c[32]=U>>>0&255,c[33]=U>>>8&255,c[34]=U>>>16&255,c[35]=U>>>24&255,c[36]=N>>>0&255,c[37]=N>>>8&255,c[38]=N>>>16&255,c[39]=N>>>24&255,c[40]=L>>>0&255,c[41]=L>>>8&255,c[42]=L>>>16&255,c[43]=L>>>24&255,c[44]=C>>>0&255,c[45]=C>>>8&255,c[46]=C>>>16&255,c[47]=C>>>24&255,c[48]=re>>>0&255,c[49]=re>>>8&255,c[50]=re>>>16&255,c[51]=re>>>24&255,c[52]=be>>>0&255,c[53]=be>>>8&255,c[54]=be>>>16&255,c[55]=be>>>24&255,c[56]=xe>>>0&255,c[57]=xe>>>8&255,c[58]=xe>>>16&255,c[59]=xe>>>24&255,c[60]=le>>>0&255,c[61]=le>>>8&255,c[62]=le>>>16&255,c[63]=le>>>24&255}function ke(c,u,o,f){for(var b=f[0]&255|(f[1]&255)<<8|(f[2]&255)<<16|(f[3]&255)<<24,S=o[0]&255|(o[1]&255)<<8|(o[2]&255)<<16|(o[3]&255)<<24,z=o[4]&255|(o[5]&255)<<8|(o[6]&255)<<16|(o[7]&255)<<24,$=o[8]&255|(o[9]&255)<<8|(o[10]&255)<<16|(o[11]&255)<<24,T=o[12]&255|(o[13]&255)<<8|(o[14]&255)<<16|(o[15]&255)<<24,Q=f[4]&255|(f[5]&255)<<8|(f[6]&255)<<16|(f[7]&255)<<24,D=u[0]&255|(u[1]&255)<<8|(u[2]&255)<<16|(u[3]&255)<<24,me=u[4]&255|(u[5]&255)<<8|(u[6]&255)<<16|(u[7]&255)<<24,Z=u[8]&255|(u[9]&255)<<8|(u[10]&255)<<16|(u[11]&255)<<24,ae=u[12]&255|(u[13]&255)<<8|(u[14]&255)<<16|(u[15]&255)<<24,ie=f[8]&255|(f[9]&255)<<8|(f[10]&255)<<16|(f[11]&255)<<24,se=o[16]&255|(o[17]&255)<<8|(o[18]&255)<<16|(o[19]&255)<<24,he=o[20]&255|(o[21]&255)<<8|(o[22]&255)<<16|(o[23]&255)<<24,ne=o[24]&255|(o[25]&255)<<8|(o[26]&255)<<16|(o[27]&255)<<24,ce=o[28]&255|(o[29]&255)<<8|(o[30]&255)<<16|(o[31]&255)<<24,de=f[12]&255|(f[13]&255)<<8|(f[14]&255)<<16|(f[15]&255)<<24,W=b,fe=S,j=z,V=$,G=T,K=Q,P=D,q=me,U=Z,N=ae,L=ie,C=se,re=he,be=ne,xe=ce,le=de,m,ye=0;ye<20;ye+=2)m=W+re|0,G^=m<<7|m>>>25,m=G+W|0,U^=m<<9|m>>>23,m=U+G|0,re^=m<<13|m>>>19,m=re+U|0,W^=m<<18|m>>>14,m=K+fe|0,N^=m<<7|m>>>25,m=N+K|0,be^=m<<9|m>>>23,m=be+N|0,fe^=m<<13|m>>>19,m=fe+be|0,K^=m<<18|m>>>14,m=L+P|0,xe^=m<<7|m>>>25,m=xe+L|0,j^=m<<9|m>>>23,m=j+xe|0,P^=m<<13|m>>>19,m=P+j|0,L^=m<<18|m>>>14,m=le+C|0,V^=m<<7|m>>>25,m=V+le|0,q^=m<<9|m>>>23,m=q+V|0,C^=m<<13|m>>>19,m=C+q|0,le^=m<<18|m>>>14,m=W+V|0,fe^=m<<7|m>>>25,m=fe+W|0,j^=m<<9|m>>>23,m=j+fe|0,V^=m<<13|m>>>19,m=V+j|0,W^=m<<18|m>>>14,m=K+G|0,P^=m<<7|m>>>25,m=P+K|0,q^=m<<9|m>>>23,m=q+P|0,G^=m<<13|m>>>19,m=G+q|0,K^=m<<18|m>>>14,m=L+N|0,C^=m<<7|m>>>25,m=C+L|0,U^=m<<9|m>>>23,m=U+C|0,N^=m<<13|m>>>19,m=N+U|0,L^=m<<18|m>>>14,m=le+xe|0,re^=m<<7|m>>>25,m=re+le|0,be^=m<<9|m>>>23,m=be+re|0,xe^=m<<13|m>>>19,m=xe+be|0,le^=m<<18|m>>>14;c[0]=W>>>0&255,c[1]=W>>>8&255,c[2]=W>>>16&255,c[3]=W>>>24&255,c[4]=K>>>0&255,c[5]=K>>>8&255,c[6]=K>>>16&255,c[7]=K>>>24&255,c[8]=L>>>0&255,c[9]=L>>>8&255,c[10]=L>>>16&255,c[11]=L>>>24&255,c[12]=le>>>0&255,c[13]=le>>>8&255,c[14]=le>>>16&255,c[15]=le>>>24&255,c[16]=P>>>0&255,c[17]=P>>>8&255,c[18]=P>>>16&255,c[19]=P>>>24&255,c[20]=q>>>0&255,c[21]=q>>>8&255,c[22]=q>>>16&255,c[23]=q>>>24&255,c[24]=U>>>0&255,c[25]=U>>>8&255,c[26]=U>>>16&255,c[27]=U>>>24&255,c[28]=N>>>0&255,c[29]=N>>>8&255,c[30]=N>>>16&255,c[31]=N>>>24&255}function Pe(c,u,o,f){ve(c,u,o,f)}function Le(c,u,o,f){ke(c,u,o,f)}var rf=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function Sf(c,u,o,f,b,S,z){var $=new Uint8Array(16),T=new Uint8Array(64),Q,D;for(D=0;D<16;D++)$[D]=0;for(D=0;D<8;D++)$[D]=S[D];for(;b>=64;){for(Pe(T,$,z,rf),D=0;D<64;D++)c[u+D]=o[f+D]^T[D];for(Q=1,D=8;D<16;D++)Q=Q+($[D]&255)|0,$[D]=Q&255,Q>>>=8;b-=64,u+=64,f+=64}if(b>0)for(Pe(T,$,z,rf),D=0;D<b;D++)c[u+D]=o[f+D]^T[D];return 0}function Af(c,u,o,f,b){var S=new Uint8Array(16),z=new Uint8Array(64),$,T;for(T=0;T<16;T++)S[T]=0;for(T=0;T<8;T++)S[T]=f[T];for(;o>=64;){for(Pe(z,S,b,rf),T=0;T<64;T++)c[u+T]=z[T];for($=1,T=8;T<16;T++)$=$+(S[T]&255)|0,S[T]=$&255,$>>>=8;o-=64,u+=64}if(o>0)for(Pe(z,S,b,rf),T=0;T<o;T++)c[u+T]=z[T];return 0}function Se(c,u,o,f,b){var S=new Uint8Array(32);Le(S,f,b,rf);for(var z=new Uint8Array(8),$=0;$<8;$++)z[$]=f[$+16];return Af(c,u,o,z,S)}function If(c,u,o,f,b,S,z){var $=new Uint8Array(32);Le($,S,z,rf);for(var T=new Uint8Array(8),Q=0;Q<8;Q++)T[Q]=S[Q+16];return Sf(c,u,o,f,b,T,$)}var M=function(c){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;var u,o,f,b,S,z,$,T;u=c[0]&255|(c[1]&255)<<8,this.r[0]=u&8191,o=c[2]&255|(c[3]&255)<<8,this.r[1]=(u>>>13|o<<3)&8191,f=c[4]&255|(c[5]&255)<<8,this.r[2]=(o>>>10|f<<6)&7939,b=c[6]&255|(c[7]&255)<<8,this.r[3]=(f>>>7|b<<9)&8191,S=c[8]&255|(c[9]&255)<<8,this.r[4]=(b>>>4|S<<12)&255,this.r[5]=S>>>1&8190,z=c[10]&255|(c[11]&255)<<8,this.r[6]=(S>>>14|z<<2)&8191,$=c[12]&255|(c[13]&255)<<8,this.r[7]=(z>>>11|$<<5)&8065,T=c[14]&255|(c[15]&255)<<8,this.r[8]=($>>>8|T<<8)&8191,this.r[9]=T>>>5&127,this.pad[0]=c[16]&255|(c[17]&255)<<8,this.pad[1]=c[18]&255|(c[19]&255)<<8,this.pad[2]=c[20]&255|(c[21]&255)<<8,this.pad[3]=c[22]&255|(c[23]&255)<<8,this.pad[4]=c[24]&255|(c[25]&255)<<8,this.pad[5]=c[26]&255|(c[27]&255)<<8,this.pad[6]=c[28]&255|(c[29]&255)<<8,this.pad[7]=c[30]&255|(c[31]&255)<<8};M.prototype.blocks=function(c,u,o){for(var f=this.fin?0:2048,b,S,z,$,T,Q,D,me,Z,ae,ie,se,he,ne,ce,de,W,fe,j,V=this.h[0],G=this.h[1],K=this.h[2],P=this.h[3],q=this.h[4],U=this.h[5],N=this.h[6],L=this.h[7],C=this.h[8],re=this.h[9],be=this.r[0],xe=this.r[1],le=this.r[2],m=this.r[3],ye=this.r[4],Ae=this.r[5],Ie=this.r[6],pe=this.r[7],we=this.r[8],_e=this.r[9];o>=16;)b=c[u+0]&255|(c[u+1]&255)<<8,V+=b&8191,S=c[u+2]&255|(c[u+3]&255)<<8,G+=(b>>>13|S<<3)&8191,z=c[u+4]&255|(c[u+5]&255)<<8,K+=(S>>>10|z<<6)&8191,$=c[u+6]&255|(c[u+7]&255)<<8,P+=(z>>>7|$<<9)&8191,T=c[u+8]&255|(c[u+9]&255)<<8,q+=($>>>4|T<<12)&8191,U+=T>>>1&8191,Q=c[u+10]&255|(c[u+11]&255)<<8,N+=(T>>>14|Q<<2)&8191,D=c[u+12]&255|(c[u+13]&255)<<8,L+=(Q>>>11|D<<5)&8191,me=c[u+14]&255|(c[u+15]&255)<<8,C+=(D>>>8|me<<8)&8191,re+=me>>>5|f,Z=0,ae=Z,ae+=V*be,ae+=G*(5*_e),ae+=K*(5*we),ae+=P*(5*pe),ae+=q*(5*Ie),Z=ae>>>13,ae&=8191,ae+=U*(5*Ae),ae+=N*(5*ye),ae+=L*(5*m),ae+=C*(5*le),ae+=re*(5*xe),Z+=ae>>>13,ae&=8191,ie=Z,ie+=V*xe,ie+=G*be,ie+=K*(5*_e),ie+=P*(5*we),ie+=q*(5*pe),Z=ie>>>13,ie&=8191,ie+=U*(5*Ie),ie+=N*(5*Ae),ie+=L*(5*ye),ie+=C*(5*m),ie+=re*(5*le),Z+=ie>>>13,ie&=8191,se=Z,se+=V*le,se+=G*xe,se+=K*be,se+=P*(5*_e),se+=q*(5*we),Z=se>>>13,se&=8191,se+=U*(5*pe),se+=N*(5*Ie),se+=L*(5*Ae),se+=C*(5*ye),se+=re*(5*m),Z+=se>>>13,se&=8191,he=Z,he+=V*m,he+=G*le,he+=K*xe,he+=P*be,he+=q*(5*_e),Z=he>>>13,he&=8191,he+=U*(5*we),he+=N*(5*pe),he+=L*(5*Ie),he+=C*(5*Ae),he+=re*(5*ye),Z+=he>>>13,he&=8191,ne=Z,ne+=V*ye,ne+=G*m,ne+=K*le,ne+=P*xe,ne+=q*be,Z=ne>>>13,ne&=8191,ne+=U*(5*_e),ne+=N*(5*we),ne+=L*(5*pe),ne+=C*(5*Ie),ne+=re*(5*Ae),Z+=ne>>>13,ne&=8191,ce=Z,ce+=V*Ae,ce+=G*ye,ce+=K*m,ce+=P*le,ce+=q*xe,Z=ce>>>13,ce&=8191,ce+=U*be,ce+=N*(5*_e),ce+=L*(5*we),ce+=C*(5*pe),ce+=re*(5*Ie),Z+=ce>>>13,ce&=8191,de=Z,de+=V*Ie,de+=G*Ae,de+=K*ye,de+=P*m,de+=q*le,Z=de>>>13,de&=8191,de+=U*xe,de+=N*be,de+=L*(5*_e),de+=C*(5*we),de+=re*(5*pe),Z+=de>>>13,de&=8191,W=Z,W+=V*pe,W+=G*Ie,W+=K*Ae,W+=P*ye,W+=q*m,Z=W>>>13,W&=8191,W+=U*le,W+=N*xe,W+=L*be,W+=C*(5*_e),W+=re*(5*we),Z+=W>>>13,W&=8191,fe=Z,fe+=V*we,fe+=G*pe,fe+=K*Ie,fe+=P*Ae,fe+=q*ye,Z=fe>>>13,fe&=8191,fe+=U*m,fe+=N*le,fe+=L*xe,fe+=C*be,fe+=re*(5*_e),Z+=fe>>>13,fe&=8191,j=Z,j+=V*_e,j+=G*we,j+=K*pe,j+=P*Ie,j+=q*Ae,Z=j>>>13,j&=8191,j+=U*ye,j+=N*m,j+=L*le,j+=C*xe,j+=re*be,Z+=j>>>13,j&=8191,Z=(Z<<2)+Z|0,Z=Z+ae|0,ae=Z&8191,Z=Z>>>13,ie+=Z,V=ae,G=ie,K=se,P=he,q=ne,U=ce,N=de,L=W,C=fe,re=j,u+=16,o-=16;this.h[0]=V,this.h[1]=G,this.h[2]=K,this.h[3]=P,this.h[4]=q,this.h[5]=U,this.h[6]=N,this.h[7]=L,this.h[8]=C,this.h[9]=re},M.prototype.finish=function(c,u){var o=new Uint16Array(10),f,b,S,z;if(this.leftover){for(z=this.leftover,this.buffer[z++]=1;z<16;z++)this.buffer[z]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(f=this.h[1]>>>13,this.h[1]&=8191,z=2;z<10;z++)this.h[z]+=f,f=this.h[z]>>>13,this.h[z]&=8191;for(this.h[0]+=f*5,f=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=f,f=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=f,o[0]=this.h[0]+5,f=o[0]>>>13,o[0]&=8191,z=1;z<10;z++)o[z]=this.h[z]+f,f=o[z]>>>13,o[z]&=8191;for(o[9]-=8192,b=(f^1)-1,z=0;z<10;z++)o[z]&=b;for(b=~b,z=0;z<10;z++)this.h[z]=this.h[z]&b|o[z];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,S=this.h[0]+this.pad[0],this.h[0]=S&65535,z=1;z<8;z++)S=(this.h[z]+this.pad[z]|0)+(S>>>16)|0,this.h[z]=S&65535;c[u+0]=this.h[0]>>>0&255,c[u+1]=this.h[0]>>>8&255,c[u+2]=this.h[1]>>>0&255,c[u+3]=this.h[1]>>>8&255,c[u+4]=this.h[2]>>>0&255,c[u+5]=this.h[2]>>>8&255,c[u+6]=this.h[3]>>>0&255,c[u+7]=this.h[3]>>>8&255,c[u+8]=this.h[4]>>>0&255,c[u+9]=this.h[4]>>>8&255,c[u+10]=this.h[5]>>>0&255,c[u+11]=this.h[5]>>>8&255,c[u+12]=this.h[6]>>>0&255,c[u+13]=this.h[6]>>>8&255,c[u+14]=this.h[7]>>>0&255,c[u+15]=this.h[7]>>>8&255},M.prototype.update=function(c,u,o){var f,b;if(this.leftover){for(b=16-this.leftover,b>o&&(b=o),f=0;f<b;f++)this.buffer[this.leftover+f]=c[u+f];if(o-=b,u+=b,this.leftover+=b,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(o>=16&&(b=o-o%16,this.blocks(c,u,b),u+=b,o-=b),o){for(f=0;f<o;f++)this.buffer[this.leftover+f]=c[u+f];this.leftover+=o}};function t(c,u,o,f,b,S){var z=new M(S);return z.update(o,f,b),z.finish(c,u),0}function h(c,u,o,f,b,S){var z=new Uint8Array(16);return t(z,0,o,f,b,S),ue(c,u,z,0)}function l(c,u,o,f,b){var S;if(o<32)return-1;for(If(c,0,u,0,o,f,b),t(c,16,c,32,o-32,c),S=0;S<16;S++)c[S]=0;return 0}function v(c,u,o,f,b){var S,z=new Uint8Array(32);if(o<32||(Se(z,0,32,f,b),h(u,16,u,32,o-32,z)!==0))return-1;for(If(c,0,u,0,o,f,b),S=0;S<32;S++)c[S]=0;return 0}function p(c,u){var o;for(o=0;o<16;o++)c[o]=u[o]|0}function _(c){var u,o,f=1;for(u=0;u<16;u++)o=c[u]+f+65535,f=Math.floor(o/65536),c[u]=o-f*65536;c[0]+=f-1+37*(f-1)}function A(c,u,o){for(var f,b=~(o-1),S=0;S<16;S++)f=b&(c[S]^u[S]),c[S]^=f,u[S]^=f}function x(c,u){var o,f,b,S=r(),z=r();for(o=0;o<16;o++)z[o]=u[o];for(_(z),_(z),_(z),f=0;f<2;f++){for(S[0]=z[0]-65517,o=1;o<15;o++)S[o]=z[o]-65535-(S[o-1]>>16&1),S[o-1]&=65535;S[15]=z[15]-32767-(S[14]>>16&1),b=S[15]>>16&1,S[14]&=65535,A(z,S,1-b)}for(o=0;o<16;o++)c[2*o]=z[o]&255,c[2*o+1]=z[o]>>8}function a(c,u){var o=new Uint8Array(32),f=new Uint8Array(32);return x(o,c),x(f,u),te(o,0,f,0)}function y(c){var u=new Uint8Array(32);return x(u,c),u[0]&1}function ee(c,u){var o;for(o=0;o<16;o++)c[o]=u[2*o]+(u[2*o+1]<<8);c[15]&=32767}function X(c,u,o){for(var f=0;f<16;f++)c[f]=u[f]+o[f]}function k(c,u,o){for(var f=0;f<16;f++)c[f]=u[f]-o[f]}function Y(c,u,o){var f,b,S=0,z=0,$=0,T=0,Q=0,D=0,me=0,Z=0,ae=0,ie=0,se=0,he=0,ne=0,ce=0,de=0,W=0,fe=0,j=0,V=0,G=0,K=0,P=0,q=0,U=0,N=0,L=0,C=0,re=0,be=0,xe=0,le=0,m=o[0],ye=o[1],Ae=o[2],Ie=o[3],pe=o[4],we=o[5],_e=o[6],lf=o[7],Re=o[8],sf=o[9],of=o[10],uf=o[11],vf=o[12],gf=o[13],Mf=o[14],wf=o[15];f=u[0],S+=f*m,z+=f*ye,$+=f*Ae,T+=f*Ie,Q+=f*pe,D+=f*we,me+=f*_e,Z+=f*lf,ae+=f*Re,ie+=f*sf,se+=f*of,he+=f*uf,ne+=f*vf,ce+=f*gf,de+=f*Mf,W+=f*wf,f=u[1],z+=f*m,$+=f*ye,T+=f*Ae,Q+=f*Ie,D+=f*pe,me+=f*we,Z+=f*_e,ae+=f*lf,ie+=f*Re,se+=f*sf,he+=f*of,ne+=f*uf,ce+=f*vf,de+=f*gf,W+=f*Mf,fe+=f*wf,f=u[2],$+=f*m,T+=f*ye,Q+=f*Ae,D+=f*Ie,me+=f*pe,Z+=f*we,ae+=f*_e,ie+=f*lf,se+=f*Re,he+=f*sf,ne+=f*of,ce+=f*uf,de+=f*vf,W+=f*gf,fe+=f*Mf,j+=f*wf,f=u[3],T+=f*m,Q+=f*ye,D+=f*Ae,me+=f*Ie,Z+=f*pe,ae+=f*we,ie+=f*_e,se+=f*lf,he+=f*Re,ne+=f*sf,ce+=f*of,de+=f*uf,W+=f*vf,fe+=f*gf,j+=f*Mf,V+=f*wf,f=u[4],Q+=f*m,D+=f*ye,me+=f*Ae,Z+=f*Ie,ae+=f*pe,ie+=f*we,se+=f*_e,he+=f*lf,ne+=f*Re,ce+=f*sf,de+=f*of,W+=f*uf,fe+=f*vf,j+=f*gf,V+=f*Mf,G+=f*wf,f=u[5],D+=f*m,me+=f*ye,Z+=f*Ae,ae+=f*Ie,ie+=f*pe,se+=f*we,he+=f*_e,ne+=f*lf,ce+=f*Re,de+=f*sf,W+=f*of,fe+=f*uf,j+=f*vf,V+=f*gf,G+=f*Mf,K+=f*wf,f=u[6],me+=f*m,Z+=f*ye,ae+=f*Ae,ie+=f*Ie,se+=f*pe,he+=f*we,ne+=f*_e,ce+=f*lf,de+=f*Re,W+=f*sf,fe+=f*of,j+=f*uf,V+=f*vf,G+=f*gf,K+=f*Mf,P+=f*wf,f=u[7],Z+=f*m,ae+=f*ye,ie+=f*Ae,se+=f*Ie,he+=f*pe,ne+=f*we,ce+=f*_e,de+=f*lf,W+=f*Re,fe+=f*sf,j+=f*of,V+=f*uf,G+=f*vf,K+=f*gf,P+=f*Mf,q+=f*wf,f=u[8],ae+=f*m,ie+=f*ye,se+=f*Ae,he+=f*Ie,ne+=f*pe,ce+=f*we,de+=f*_e,W+=f*lf,fe+=f*Re,j+=f*sf,V+=f*of,G+=f*uf,K+=f*vf,P+=f*gf,q+=f*Mf,U+=f*wf,f=u[9],ie+=f*m,se+=f*ye,he+=f*Ae,ne+=f*Ie,ce+=f*pe,de+=f*we,W+=f*_e,fe+=f*lf,j+=f*Re,V+=f*sf,G+=f*of,K+=f*uf,P+=f*vf,q+=f*gf,U+=f*Mf,N+=f*wf,f=u[10],se+=f*m,he+=f*ye,ne+=f*Ae,ce+=f*Ie,de+=f*pe,W+=f*we,fe+=f*_e,j+=f*lf,V+=f*Re,G+=f*sf,K+=f*of,P+=f*uf,q+=f*vf,U+=f*gf,N+=f*Mf,L+=f*wf,f=u[11],he+=f*m,ne+=f*ye,ce+=f*Ae,de+=f*Ie,W+=f*pe,fe+=f*we,j+=f*_e,V+=f*lf,G+=f*Re,K+=f*sf,P+=f*of,q+=f*uf,U+=f*vf,N+=f*gf,L+=f*Mf,C+=f*wf,f=u[12],ne+=f*m,ce+=f*ye,de+=f*Ae,W+=f*Ie,fe+=f*pe,j+=f*we,V+=f*_e,G+=f*lf,K+=f*Re,P+=f*sf,q+=f*of,U+=f*uf,N+=f*vf,L+=f*gf,C+=f*Mf,re+=f*wf,f=u[13],ce+=f*m,de+=f*ye,W+=f*Ae,fe+=f*Ie,j+=f*pe,V+=f*we,G+=f*_e,K+=f*lf,P+=f*Re,q+=f*sf,U+=f*of,N+=f*uf,L+=f*vf,C+=f*gf,re+=f*Mf,be+=f*wf,f=u[14],de+=f*m,W+=f*ye,fe+=f*Ae,j+=f*Ie,V+=f*pe,G+=f*we,K+=f*_e,P+=f*lf,q+=f*Re,U+=f*sf,N+=f*of,L+=f*uf,C+=f*vf,re+=f*gf,be+=f*Mf,xe+=f*wf,f=u[15],W+=f*m,fe+=f*ye,j+=f*Ae,V+=f*Ie,G+=f*pe,K+=f*we,P+=f*_e,q+=f*lf,U+=f*Re,N+=f*sf,L+=f*of,C+=f*uf,re+=f*vf,be+=f*gf,xe+=f*Mf,le+=f*wf,S+=38*fe,z+=38*j,$+=38*V,T+=38*G,Q+=38*K,D+=38*P,me+=38*q,Z+=38*U,ae+=38*N,ie+=38*L,se+=38*C,he+=38*re,ne+=38*be,ce+=38*xe,de+=38*le,b=1,f=S+b+65535,b=Math.floor(f/65536),S=f-b*65536,f=z+b+65535,b=Math.floor(f/65536),z=f-b*65536,f=$+b+65535,b=Math.floor(f/65536),$=f-b*65536,f=T+b+65535,b=Math.floor(f/65536),T=f-b*65536,f=Q+b+65535,b=Math.floor(f/65536),Q=f-b*65536,f=D+b+65535,b=Math.floor(f/65536),D=f-b*65536,f=me+b+65535,b=Math.floor(f/65536),me=f-b*65536,f=Z+b+65535,b=Math.floor(f/65536),Z=f-b*65536,f=ae+b+65535,b=Math.floor(f/65536),ae=f-b*65536,f=ie+b+65535,b=Math.floor(f/65536),ie=f-b*65536,f=se+b+65535,b=Math.floor(f/65536),se=f-b*65536,f=he+b+65535,b=Math.floor(f/65536),he=f-b*65536,f=ne+b+65535,b=Math.floor(f/65536),ne=f-b*65536,f=ce+b+65535,b=Math.floor(f/65536),ce=f-b*65536,f=de+b+65535,b=Math.floor(f/65536),de=f-b*65536,f=W+b+65535,b=Math.floor(f/65536),W=f-b*65536,S+=b-1+37*(b-1),b=1,f=S+b+65535,b=Math.floor(f/65536),S=f-b*65536,f=z+b+65535,b=Math.floor(f/65536),z=f-b*65536,f=$+b+65535,b=Math.floor(f/65536),$=f-b*65536,f=T+b+65535,b=Math.floor(f/65536),T=f-b*65536,f=Q+b+65535,b=Math.floor(f/65536),Q=f-b*65536,f=D+b+65535,b=Math.floor(f/65536),D=f-b*65536,f=me+b+65535,b=Math.floor(f/65536),me=f-b*65536,f=Z+b+65535,b=Math.floor(f/65536),Z=f-b*65536,f=ae+b+65535,b=Math.floor(f/65536),ae=f-b*65536,f=ie+b+65535,b=Math.floor(f/65536),ie=f-b*65536,f=se+b+65535,b=Math.floor(f/65536),se=f-b*65536,f=he+b+65535,b=Math.floor(f/65536),he=f-b*65536,f=ne+b+65535,b=Math.floor(f/65536),ne=f-b*65536,f=ce+b+65535,b=Math.floor(f/65536),ce=f-b*65536,f=de+b+65535,b=Math.floor(f/65536),de=f-b*65536,f=W+b+65535,b=Math.floor(f/65536),W=f-b*65536,S+=b-1+37*(b-1),c[0]=S,c[1]=z,c[2]=$,c[3]=T,c[4]=Q,c[5]=D,c[6]=me,c[7]=Z,c[8]=ae,c[9]=ie,c[10]=se,c[11]=he,c[12]=ne,c[13]=ce,c[14]=de,c[15]=W}function oe(c,u){Y(c,u,u)}function ze(c,u){var o=r(),f;for(f=0;f<16;f++)o[f]=u[f];for(f=253;f>=0;f--)oe(o,o),f!==2&&f!==4&&Y(o,o,u);for(f=0;f<16;f++)c[f]=o[f]}function Lf(c,u){var o=r(),f;for(f=0;f<16;f++)o[f]=u[f];for(f=250;f>=0;f--)oe(o,o),f!==1&&Y(o,o,u);for(f=0;f<16;f++)c[f]=o[f]}function Ee(c,u,o){var f=new Uint8Array(32),b=new Float64Array(80),S,z,$=r(),T=r(),Q=r(),D=r(),me=r(),Z=r();for(z=0;z<31;z++)f[z]=u[z];for(f[31]=u[31]&127|64,f[0]&=248,ee(b,o),z=0;z<16;z++)T[z]=b[z],D[z]=$[z]=Q[z]=0;for($[0]=D[0]=1,z=254;z>=0;--z)S=f[z>>>3]>>>(z&7)&1,A($,T,S),A(Q,D,S),X(me,$,Q),k($,$,Q),X(Q,T,D),k(T,T,D),oe(D,me),oe(Z,$),Y($,Q,$),Y(Q,T,me),X(me,$,Q),k($,$,Q),oe(T,$),k(Q,D,Z),Y($,Q,I),X($,$,D),Y(Q,Q,$),Y($,D,Z),Y(D,T,b),oe(T,me),A($,T,S),A(Q,D,S);for(z=0;z<16;z++)b[z+16]=$[z],b[z+32]=Q[z],b[z+48]=T[z],b[z+64]=D[z];var ae=b.subarray(32),ie=b.subarray(16);return ze(ae,ae),Y(ie,ie,ae),x(c,ie),0}function Be(c,u){return Ee(c,u,d)}function At(c,u){return i(u,32),Be(c,u)}function Ce(c,u,o){var f=new Uint8Array(32);return Ee(f,o,u),Le(c,s,f,rf)}var Ge=l,Nt=v;function af(c,u,o,f,b,S){var z=new Uint8Array(32);return Ce(z,b,S),Ge(c,u,o,f,z)}function nf(c,u,o,f,b,S){var z=new Uint8Array(32);return Ce(z,b,S),Nt(c,u,o,f,z)}var It=[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 Qe(c,u,o,f){for(var b=new Int32Array(16),S=new Int32Array(16),z,$,T,Q,D,me,Z,ae,ie,se,he,ne,ce,de,W,fe,j,V,G,K,P,q,U,N,L,C,re=c[0],be=c[1],xe=c[2],le=c[3],m=c[4],ye=c[5],Ae=c[6],Ie=c[7],pe=u[0],we=u[1],_e=u[2],lf=u[3],Re=u[4],sf=u[5],of=u[6],uf=u[7],vf=0;f>=128;){for(G=0;G<16;G++)K=8*G+vf,b[G]=o[K+0]<<24|o[K+1]<<16|o[K+2]<<8|o[K+3],S[G]=o[K+4]<<24|o[K+5]<<16|o[K+6]<<8|o[K+7];for(G=0;G<80;G++)if(z=re,$=be,T=xe,Q=le,D=m,me=ye,Z=Ae,ae=Ie,ie=pe,se=we,he=_e,ne=lf,ce=Re,de=sf,W=of,fe=uf,P=Ie,q=uf,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=(m>>>14|Re<<18)^(m>>>18|Re<<14)^(Re>>>9|m<<23),q=(Re>>>14|m<<18)^(Re>>>18|m<<14)^(m>>>9|Re<<23),U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,P=m&ye^~m&Ae,q=Re&sf^~Re&of,U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,P=It[G*2],q=It[G*2+1],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,P=b[G%16],q=S[G%16],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,j=L&65535|C<<16,V=U&65535|N<<16,P=j,q=V,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=(re>>>28|pe<<4)^(pe>>>2|re<<30)^(pe>>>7|re<<25),q=(pe>>>28|re<<4)^(re>>>2|pe<<30)^(re>>>7|pe<<25),U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,P=re&be^re&xe^be&xe,q=pe&we^pe&_e^we&_e,U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,ae=L&65535|C<<16,fe=U&65535|N<<16,P=Q,q=ne,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=j,q=V,U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,Q=L&65535|C<<16,ne=U&65535|N<<16,be=z,xe=$,le=T,m=Q,ye=D,Ae=me,Ie=Z,re=ae,we=ie,_e=se,lf=he,Re=ne,sf=ce,of=de,uf=W,pe=fe,G%16===15)for(K=0;K<16;K++)P=b[K],q=S[K],U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=b[(K+9)%16],q=S[(K+9)%16],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,j=b[(K+1)%16],V=S[(K+1)%16],P=(j>>>1|V<<31)^(j>>>8|V<<24)^j>>>7,q=(V>>>1|j<<31)^(V>>>8|j<<24)^(V>>>7|j<<25),U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,j=b[(K+14)%16],V=S[(K+14)%16],P=(j>>>19|V<<13)^(V>>>29|j<<3)^j>>>6,q=(V>>>19|j<<13)^(j>>>29|V<<3)^(V>>>6|j<<26),U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,b[K]=L&65535|C<<16,S[K]=U&65535|N<<16;P=re,q=pe,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=c[0],q=u[0],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,c[0]=re=L&65535|C<<16,u[0]=pe=U&65535|N<<16,P=be,q=we,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=c[1],q=u[1],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,c[1]=be=L&65535|C<<16,u[1]=we=U&65535|N<<16,P=xe,q=_e,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=c[2],q=u[2],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,c[2]=xe=L&65535|C<<16,u[2]=_e=U&65535|N<<16,P=le,q=lf,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=c[3],q=u[3],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,c[3]=le=L&65535|C<<16,u[3]=lf=U&65535|N<<16,P=m,q=Re,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=c[4],q=u[4],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,c[4]=m=L&65535|C<<16,u[4]=Re=U&65535|N<<16,P=ye,q=sf,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=c[5],q=u[5],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,c[5]=ye=L&65535|C<<16,u[5]=sf=U&65535|N<<16,P=Ae,q=of,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=c[6],q=u[6],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,c[6]=Ae=L&65535|C<<16,u[6]=of=U&65535|N<<16,P=Ie,q=uf,U=q&65535,N=q>>>16,L=P&65535,C=P>>>16,P=c[7],q=u[7],U+=q&65535,N+=q>>>16,L+=P&65535,C+=P>>>16,N+=U>>>16,L+=N>>>16,C+=L>>>16,c[7]=Ie=L&65535|C<<16,u[7]=uf=U&65535|N<<16,vf+=128,f-=128}return f}function qe(c,u,o){var f=new Int32Array(8),b=new Int32Array(8),S=new Uint8Array(256),z,$=o;for(f[0]=1779033703,f[1]=3144134277,f[2]=1013904242,f[3]=2773480762,f[4]=1359893119,f[5]=2600822924,f[6]=528734635,f[7]=1541459225,b[0]=4089235720,b[1]=2227873595,b[2]=4271175723,b[3]=1595750129,b[4]=2917565137,b[5]=725511199,b[6]=4215389547,b[7]=327033209,Qe(f,b,u,o),o%=128,z=0;z<o;z++)S[z]=u[$-o+z];for(S[o]=128,o=256-128*(o<112?1:0),S[o-9]=0,H(S,o-8,$/536870912|0,$<<3),Qe(f,b,S,o),z=0;z<8;z++)H(c,8*z,f[z],b[z]);return 0}function tt(c,u){var o=r(),f=r(),b=r(),S=r(),z=r(),$=r(),T=r(),Q=r(),D=r();k(o,c[1],c[0]),k(D,u[1],u[0]),Y(o,o,D),X(f,c[0],c[1]),X(D,u[0],u[1]),Y(f,f,D),Y(b,c[3],u[3]),Y(b,b,E),Y(S,c[2],u[2]),X(S,S,S),k(z,f,o),k($,S,b),X(T,S,b),X(Q,f,o),Y(c[0],z,$),Y(c[1],Q,T),Y(c[2],T,$),Y(c[3],z,Q)}function ef(c,u,o){var f;for(f=0;f<4;f++)A(c[f],u[f],o)}function De(c,u){var o=r(),f=r(),b=r();ze(b,u[2]),Y(o,u[0],b),Y(f,u[1],b),x(c,f),c[31]^=y(o)<<7}function ot(c,u,o){var f,b;for(p(c[0],w),p(c[1],g),p(c[2],g),p(c[3],w),b=255;b>=0;--b)f=o[b/8|0]>>(b&7)&1,ef(c,u,f),tt(u,c),tt(c,c),ef(c,u,f)}function He(c,u){var o=[r(),r(),r(),r()];p(o[0],B),p(o[1],O),p(o[2],g),Y(o[3],B,O),ot(c,o,u)}function je(c,u,o){var f=new Uint8Array(64),b=[r(),r(),r(),r()],S;for(o||i(u,32),qe(f,u,32),f[0]&=248,f[31]&=127,f[31]|=64,He(b,f),De(c,b),S=0;S<32;S++)u[S+32]=c[S];return 0}var rt=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 Ze(c,u){var o,f,b,S;for(f=63;f>=32;--f){for(o=0,b=f-32,S=f-12;b<S;++b)u[b]+=o-16*u[f]*rt[b-(f-32)],o=Math.floor((u[b]+128)/256),u[b]-=o*256;u[b]+=o,u[f]=0}for(o=0,b=0;b<32;b++)u[b]+=o-(u[31]>>4)*rt[b],o=u[b]>>8,u[b]&=255;for(b=0;b<32;b++)u[b]-=o*rt[b];for(f=0;f<32;f++)u[f+1]+=u[f]>>8,c[f]=u[f]&255}function Je(c){var u=new Float64Array(64),o;for(o=0;o<64;o++)u[o]=c[o];for(o=0;o<64;o++)c[o]=0;Ze(c,u)}function Et(c,u,o,f){var b=new Uint8Array(64),S=new Uint8Array(64),z=new Uint8Array(64),$,T,Q=new Float64Array(64),D=[r(),r(),r(),r()];qe(b,f,32),b[0]&=248,b[31]&=127,b[31]|=64;var me=o+64;for($=0;$<o;$++)c[64+$]=u[$];for($=0;$<32;$++)c[32+$]=b[32+$];for(qe(z,c.subarray(32),o+32),Je(z),He(D,z),De(c,D),$=32;$<64;$++)c[$]=f[$];for(qe(S,c,o+64),Je(S),$=0;$<64;$++)Q[$]=0;for($=0;$<32;$++)Q[$]=z[$];for($=0;$<32;$++)for(T=0;T<32;T++)Q[$+T]+=S[$]*b[T];return Ze(c.subarray(32),Q),me}function df(c,u){var o=r(),f=r(),b=r(),S=r(),z=r(),$=r(),T=r();return p(c[2],g),ee(c[1],u),oe(b,c[1]),Y(S,b,R),k(b,b,c[2]),X(S,c[2],S),oe(z,S),oe($,z),Y(T,$,z),Y(o,T,b),Y(o,o,S),Lf(o,o),Y(o,o,b),Y(o,o,S),Y(o,o,S),Y(c[0],o,S),oe(f,c[0]),Y(f,f,S),a(f,b)&&Y(c[0],c[0],F),oe(f,c[0]),Y(f,f,S),a(f,b)?-1:(y(c[0])===u[31]>>7&&k(c[0],w,c[0]),Y(c[3],c[0],c[1]),0)}function Xe(c,u,o,f){var b,S=new Uint8Array(32),z=new Uint8Array(64),$=[r(),r(),r(),r()],T=[r(),r(),r(),r()];if(o<64||df(T,f))return-1;for(b=0;b<o;b++)c[b]=u[b];for(b=0;b<32;b++)c[b+32]=f[b];if(qe(z,c,o),Je(z),ot($,T,z),He(T,u.subarray(32)),tt($,T),De(S,$),o-=64,te(u,0,S,0)){for(b=0;b<o;b++)c[b]=0;return-1}for(b=0;b<o;b++)c[b]=u[b+64];return o}var ut=32,Ye=24,Te=32,Zf=16,Ue=32,Ke=32,kf=32,Oe=32,We=32,zt=Ye,cf=Te,hf=Zf,Pf=64,$e=32,Ne=64,bt=32,Ve=64;e.lowlevel={crypto_core_hsalsa20:Le,crypto_stream_xor:If,crypto_stream:Se,crypto_stream_salsa20_xor:Sf,crypto_stream_salsa20:Af,crypto_onetimeauth:t,crypto_onetimeauth_verify:h,crypto_verify_16:ue,crypto_verify_32:te,crypto_secretbox:l,crypto_secretbox_open:v,crypto_scalarmult:Ee,crypto_scalarmult_base:Be,crypto_box_beforenm:Ce,crypto_box_afternm:Ge,crypto_box:af,crypto_box_open:nf,crypto_box_keypair:At,crypto_hash:qe,crypto_sign:Et,crypto_sign_keypair:je,crypto_sign_open:Xe,crypto_secretbox_KEYBYTES:ut,crypto_secretbox_NONCEBYTES:Ye,crypto_secretbox_ZEROBYTES:Te,crypto_secretbox_BOXZEROBYTES:Zf,crypto_scalarmult_BYTES:Ue,crypto_scalarmult_SCALARBYTES:Ke,crypto_box_PUBLICKEYBYTES:kf,crypto_box_SECRETKEYBYTES:Oe,crypto_box_BEFORENMBYTES:We,crypto_box_NONCEBYTES:zt,crypto_box_ZEROBYTES:cf,crypto_box_BOXZEROBYTES:hf,crypto_sign_BYTES:Pf,crypto_sign_PUBLICKEYBYTES:$e,crypto_sign_SECRETKEYBYTES:Ne,crypto_sign_SEEDBYTES:bt,crypto_hash_BYTES:Ve,gf:r,D:R,L:rt,pack25519:x,unpack25519:ee,M:Y,A:X,S:oe,Z:k,pow2523:Lf,add:tt,set25519:p,modL:Ze,scalarmult:ot,scalarbase:He};function ff(c,u){if(c.length!==ut)throw new Error("bad key size");if(u.length!==Ye)throw new Error("bad nonce size")}function Lt(c,u){if(c.length!==kf)throw new Error("bad public key size");if(u.length!==Oe)throw new Error("bad secret key size")}function Me(){for(var c=0;c<arguments.length;c++)if(!(arguments[c]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function tf(c){for(var u=0;u<c.length;u++)c[u]=0}e.randomBytes=function(c){var u=new Uint8Array(c);return i(u,c),u},e.secretbox=function(c,u,o){Me(c,u,o),ff(o,u);for(var f=new Uint8Array(Te+c.length),b=new Uint8Array(f.length),S=0;S<c.length;S++)f[S+Te]=c[S];return l(b,f,f.length,u,o),b.subarray(Zf)},e.secretbox.open=function(c,u,o){Me(c,u,o),ff(o,u);for(var f=new Uint8Array(Zf+c.length),b=new Uint8Array(f.length),S=0;S<c.length;S++)f[S+Zf]=c[S];return f.length<32||v(b,f,f.length,u,o)!==0?null:b.subarray(Te)},e.secretbox.keyLength=ut,e.secretbox.nonceLength=Ye,e.secretbox.overheadLength=Zf,e.scalarMult=function(c,u){if(Me(c,u),c.length!==Ke)throw new Error("bad n size");if(u.length!==Ue)throw new Error("bad p size");var o=new Uint8Array(Ue);return Ee(o,c,u),o},e.scalarMult.base=function(c){if(Me(c),c.length!==Ke)throw new Error("bad n size");var u=new Uint8Array(Ue);return Be(u,c),u},e.scalarMult.scalarLength=Ke,e.scalarMult.groupElementLength=Ue,e.box=function(c,u,o,f){var b=e.box.before(o,f);return e.secretbox(c,u,b)},e.box.before=function(c,u){Me(c,u),Lt(c,u);var o=new Uint8Array(We);return Ce(o,c,u),o},e.box.after=e.secretbox,e.box.open=function(c,u,o,f){var b=e.box.before(o,f);return e.secretbox.open(c,u,b)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var c=new Uint8Array(kf),u=new Uint8Array(Oe);return At(c,u),{publicKey:c,secretKey:u}},e.box.keyPair.fromSecretKey=function(c){if(Me(c),c.length!==Oe)throw new Error("bad secret key size");var u=new Uint8Array(kf);return Be(u,c),{publicKey:u,secretKey:new Uint8Array(c)}},e.box.publicKeyLength=kf,e.box.secretKeyLength=Oe,e.box.sharedKeyLength=We,e.box.nonceLength=zt,e.box.overheadLength=e.secretbox.overheadLength,e.sign=function(c,u){if(Me(c,u),u.length!==Ne)throw new Error("bad secret key size");var o=new Uint8Array(Pf+c.length);return Et(o,c,c.length,u),o},e.sign.open=function(c,u){if(Me(c,u),u.length!==$e)throw new Error("bad public key size");var o=new Uint8Array(c.length),f=Xe(o,c,c.length,u);if(f<0)return null;for(var b=new Uint8Array(f),S=0;S<b.length;S++)b[S]=o[S];return b},e.sign.detached=function(c,u){for(var o=e.sign(c,u),f=new Uint8Array(Pf),b=0;b<f.length;b++)f[b]=o[b];return f},e.sign.detached.verify=function(c,u,o){if(Me(c,u,o),u.length!==Pf)throw new Error("bad signature size");if(o.length!==$e)throw new Error("bad public key size");var f=new Uint8Array(Pf+c.length),b=new Uint8Array(Pf+c.length),S;for(S=0;S<Pf;S++)f[S]=u[S];for(S=0;S<c.length;S++)f[S+Pf]=c[S];return Xe(b,f,f.length,o)>=0},e.sign.keyPair=function(){var c=new Uint8Array($e),u=new Uint8Array(Ne);return je(c,u),{publicKey:c,secretKey:u}},e.sign.keyPair.fromSecretKey=function(c){if(Me(c),c.length!==Ne)throw new Error("bad secret key size");for(var u=new Uint8Array($e),o=0;o<u.length;o++)u[o]=c[32+o];return{publicKey:u,secretKey:new Uint8Array(c)}},e.sign.keyPair.fromSeed=function(c){if(Me(c),c.length!==bt)throw new Error("bad seed size");for(var u=new Uint8Array($e),o=new Uint8Array(Ne),f=0;f<32;f++)o[f]=c[f];return je(u,o,!0),{publicKey:u,secretKey:o}},e.sign.publicKeyLength=$e,e.sign.secretKeyLength=Ne,e.sign.seedLength=bt,e.sign.signatureLength=Pf,e.hash=function(c){Me(c);var u=new Uint8Array(Ve);return qe(u,c,c.length),u},e.hash.hashLength=Ve,e.verify=function(c,u){return Me(c,u),c.length===0||u.length===0||c.length!==u.length?!1:J(c,0,u,0,c.length)===0},e.setPRNG=function(c){i=c},function(){var c=typeof self<"u"?self.crypto||self.msCrypto:null;if(c&&c.getRandomValues){var u=65536;e.setPRNG(function(o,f){var b,S=new Uint8Array(f);for(b=0;b<f;b+=u)c.getRandomValues(S.subarray(b,b+Math.min(f-b,u)));for(b=0;b<f;b++)o[b]=S[b];tf(S)})}else typeof d0<"u"&&(c=or,c&&c.randomBytes&&e.setPRNG(function(o,f){var b,S=c.randomBytes(f);for(b=0;b<f;b++)o[b]=S[b];tf(S)}))}()})(n.exports?n.exports:self.nacl=self.nacl||{})})(r0);var Ii=r0.exports;const Pt=c0(Ii);class Ei{string(e){let r;return typeof e=="object"&&e!==null?r=JSON.stringify(e):r=String(e),this.stringToUnicode(r.replace(/\//g,"\\/"))}stringToByte(e){const r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i);return r}stringToUnicode(e){return e?Array.prototype.map.call(e,r=>{const i=r.charCodeAt(0).toString(16);return i.length>2?"\\u"+i:r}).join(""):""}byteToHex(e){return e?Array.prototype.map.call(e,r=>("0"+(r&255).toString(16)).slice(-2)).join("").toLowerCase():""}hexToByte(e){if(!e)return new Uint8Array;const r=[];for(let i=0,s=e.length;i<s;i+=2)r.push(parseInt(e.slice(i,i+2),16));return new Uint8Array(r)}isHex(e){return typeof e!="string"?!1:/^[0-9a-fA-F]+$/.test(e)&&e.length%2===0}}const Ef=new Ei;class zi{string(e){return Ef.string(e)}crypto(e,r){return it[e](r).toString(it.enc.Hex)}hash(e){return this.crypto("SHA256",this.string(e))}shortHash(e){return this.crypto("RIPEMD160",this.hash(e))}checksum(e){return this.hash(this.hash(e)).slice(0,4)}idHash(e){const r=this.shortHash(e);return r+this.checksum(r)}isHex(e){return Ef.isHex(e)}}const Ot=new zi;class Bi{constructor(){Tt(this,"KEY_SIZE");Tt(this,"SIGNATURE_SIZE");this.KEY_SIZE=64,this.SIGNATURE_SIZE=128}keyPair(){const e=Pt.sign.keyPair();return{private_key:Ef.byteToHex(e.secretKey).slice(0,this.KEY_SIZE),public_key:Ef.byteToHex(e.publicKey),address:this.address(Ef.byteToHex(e.publicKey))}}privateKey(){return Ef.byteToHex(Pt.sign.keyPair().secretKey).slice(0,this.KEY_SIZE)}publicKey(e){return Ef.byteToHex(Pt.sign.keyPair.fromSeed(Ef.hexToByte(e)).publicKey)}address(e){return Ot.idHash(e)}signature(e,r){return Ef.byteToHex(Pt.sign.detached(Ef.stringToByte(Ot.string(e)),Ef.hexToByte(r+this.publicKey(r))))}signatureValidity(e,r,i){return i.length===this.SIGNATURE_SIZE&&Ot.isHex(i)===!0&&Pt.sign.detached.verify(Ef.stringToByte(Ot.string(e)),Ef.hexToByte(i),Ef.hexToByte(r))}}const zr=new Bi;class Ri{constructor(){Tt(this,"ec");this.ec=new Br.ec("secp256k1")}xphereSign(e,r){return zr.signature(e,r)}xphereVerify(e,r,i){return zr.signatureValidity(e,r,i)}generateKeys(){const e=this.ec.genKeyPair(),r=e.getPrivate("hex"),i=e.getPublic("hex");return{privateKey:r,publicKey:i}}sign(e,r){return this.ec.keyFromPrivate(r,"hex").sign(e)}verify(e,r,i){return this.ec.keyFromPublic(i,"hex").verify(e,r)}encrypt(e,r){return it.AES.encrypt(e,r).toString()}decrypt(e,r){return it.AES.decrypt(e,r).toString(it.enc.Utf8)}generateNonce(e){return it.lib.WordArray.random(e).toString(it.enc.Hex)}}new Ri;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { QrType } from '
|
|
1
|
+
import { QrType } from './types';
|
|
2
2
|
|
|
3
3
|
declare class QrService {
|
|
4
4
|
generateQrCode(type: string, dapp: string, url: string, network: string[]): QrType;
|
|
5
5
|
}
|
|
6
|
-
declare const
|
|
7
|
-
export
|
|
6
|
+
export declare const Qr: QrService;
|
|
7
|
+
export {};
|
package/dist/zigap.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './zigap'
|
package/dist/zigap.es.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";var we=Object.defineProperty;var be=(s,e,t)=>e in s?we(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var A=(s,e,t)=>(be(s,typeof e!="symbol"?e+"":e,t),t);import"./index.es2.js";const d=Object.create(null);d.open="0";d.close="1";d.ping="2";d.pong="3";d.message="4";d.upgrade="5";d.noop="6";const B=Object.create(null);Object.keys(d).forEach(s=>{B[d[s]]=s});const q={type:"error",data:"parser error"},ie=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",re=typeof ArrayBuffer=="function",oe=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,H=({type:s,data:e},t,n)=>ie&&e instanceof Blob?t?n(e):J(e,n):re&&(e instanceof ArrayBuffer||oe(e))?t?n(e):J(new Blob([e]),n):n(d[s]+(e||"")),J=(s,e)=>{const t=new FileReader;return t.onload=function(){const n=t.result.split(",")[1];e("b"+(n||""))},t.readAsDataURL(s)};function X(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}let L;function ve(s,e){if(ie&&s.data instanceof Blob)return s.data.arrayBuffer().then(X).then(e);if(re&&(s.data instanceof ArrayBuffer||oe(s.data)))return e(X(s.data));H(s,!1,t=>{L||(L=new TextEncoder),e(L.encode(t))})}const Q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<Q.length;s++)_[Q.charCodeAt(s)]=s;const ke=s=>{let e=s.length*.75,t=s.length,n,i=0,r,o,a,h;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);const g=new ArrayBuffer(e),y=new Uint8Array(g);for(n=0;n<t;n+=4)r=_[s.charCodeAt(n)],o=_[s.charCodeAt(n+1)],a=_[s.charCodeAt(n+2)],h=_[s.charCodeAt(n+3)],y[i++]=r<<2|o>>4,y[i++]=(o&15)<<4|a>>2,y[i++]=(a&3)<<6|h&63;return g},Ee=typeof ArrayBuffer=="function",K=(s,e)=>{if(typeof s!="string")return{type:"message",data:ce(s,e)};const t=s.charAt(0);return t==="b"?{type:"message",data:_e(s.substring(1),e)}:B[t]?s.length>1?{type:B[t],data:s.substring(1)}:{type:B[t]}:q},_e=(s,e)=>{if(Ee){const t=ke(s);return ce(t,e)}else return{base64:!0,data:s}},ce=(s,e)=>{switch(e){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}},ae="",Ae=(s,e)=>{const t=s.length,n=new Array(t);let i=0;s.forEach((r,o)=>{H(r,!1,a=>{n[o]=a,++i===t&&e(n.join(ae))})})},Re=(s,e)=>{const t=s.split(ae),n=[];for(let i=0;i<t.length;i++){const r=K(t[i],e);if(n.push(r),r.type==="error")break}return n};function Te(){return new TransformStream({transform(s,e){ve(s,t=>{const n=t.length;let i;if(n<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,n);else if(n<65536){i=new Uint8Array(3);const r=new DataView(i.buffer);r.setUint8(0,126),r.setUint16(1,n)}else{i=new Uint8Array(9);const r=new DataView(i.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(n))}s.data&&typeof s.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}let P;function R(s){return s.reduce((e,t)=>e+t.length,0)}function T(s,e){if(s[0].length===e)return s.shift();const t=new Uint8Array(e);let n=0;for(let i=0;i<e;i++)t[i]=s[0][n++],n===s[0].length&&(s.shift(),n=0);return s.length&&n<s[0].length&&(s[0]=s[0].slice(n)),t}function Oe(s,e){P||(P=new TextDecoder);const t=[];let n=0,i=-1,r=!1;return new TransformStream({transform(o,a){for(t.push(o);;){if(n===0){if(R(t)<1)break;const h=T(t,1);r=(h[0]&128)===128,i=h[0]&127,i<126?n=3:i===126?n=1:n=2}else if(n===1){if(R(t)<2)break;const h=T(t,2);i=new DataView(h.buffer,h.byteOffset,h.length).getUint16(0),n=3}else if(n===2){if(R(t)<8)break;const h=T(t,8),g=new DataView(h.buffer,h.byteOffset,h.length),y=g.getUint32(0);if(y>Math.pow(2,21)-1){a.enqueue(q);break}i=y*Math.pow(2,32)+g.getUint32(4),n=3}else{if(R(t)<i)break;const h=T(t,i);a.enqueue(K(r?h:P.decode(h),e)),n=0}if(i===0||i>s){a.enqueue(q);break}}}})}const he=4;function f(s){if(s)return Ce(s)}function Ce(s){for(var e in f.prototype)s[e]=f.prototype[e];return s}f.prototype.on=f.prototype.addEventListener=function(s,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(e),this};f.prototype.once=function(s,e){function t(){this.off(s,t),e.apply(this,arguments)}return t.fn=e,this.on(s,t),this};f.prototype.off=f.prototype.removeListener=f.prototype.removeAllListeners=f.prototype.removeEventListener=function(s,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+s];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var n,i=0;i<t.length;i++)if(n=t[i],n===e||n.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+s],this};f.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+s],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(t){t=t.slice(0);for(var n=0,i=t.length;n<i;++n)t[n].apply(this,e)}return this};f.prototype.emitReserved=f.prototype.emit;f.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};f.prototype.hasListeners=function(s){return!!this.listeners(s).length};const u=typeof self<"u"?self:typeof window<"u"?window:Function("return this")();function fe(s,...e){return e.reduce((t,n)=>(s.hasOwnProperty(n)&&(t[n]=s[n]),t),{})}const Be=u.setTimeout,Se=u.clearTimeout;function x(s,e){e.useNativeTimers?(s.setTimeoutFn=Be.bind(u),s.clearTimeoutFn=Se.bind(u)):(s.setTimeoutFn=u.setTimeout.bind(u),s.clearTimeoutFn=u.clearTimeout.bind(u))}const Ne=1.33;function xe(s){return typeof s=="string"?Le(s):Math.ceil((s.byteLength||s.size)*Ne)}function Le(s){let e=0,t=0;for(let n=0,i=s.length;n<i;n++)e=s.charCodeAt(n),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(n++,t+=4);return t}function Pe(s){let e="";for(let t in s)s.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(s[t]));return e}function qe(s){let e={},t=s.split("&");for(let n=0,i=t.length;n<i;n++){let r=t[n].split("=");e[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return e}class Ie extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type="TransportError"}}class W extends f{constructor(e){super(),this.writable=!1,x(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,n){return super.emitReserved("error",new Ie(e,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=K(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const t=Pe(e);return t.length?"?"+t:""}}const ue="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),I=64,De={};let j=0,O=0,G;function Z(s){let e="";do e=ue[s%I]+e,s=Math.floor(s/I);while(s>0);return e}function le(){const s=Z(+new Date);return s!==G?(j=0,G=s):s+"."+Z(j++)}for(;O<I;O++)De[ue[O]]=O;let pe=!1;try{pe=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ue=pe;function de(s){const e=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Ue))return new XMLHttpRequest}catch{}if(!e)try{return new u[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}function Me(){}const Ve=function(){return new de({xdomain:!1}).responseType!=null}();class Fe extends W{constructor(e){if(super(e),this.polling=!1,typeof location<"u"){const n=location.protocol==="https:";let i=location.port;i||(i=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}const t=e&&e.forceBase64;this.supportsBinary=Ve&&!t,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let n=0;this.polling&&(n++,this.once("pollComplete",function(){--n||t()})),this.writable||(n++,this.once("drain",function(){--n||t()}))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const t=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};Re(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Ae(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=le()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new p(this.uri(),e)}doWrite(e,t){const n=this.request({method:"POST",data:e});n.on("success",t),n.on("error",(i,r)=>{this.onError("xhr post error",i,r)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,n)=>{this.onError("xhr poll error",t,n)}),this.pollXhr=e}}class p extends f{constructor(e,t){super(),x(this,t),this.opts=t,this.method=t.method||"GET",this.uri=e,this.data=t.data!==void 0?t.data:null,this.create()}create(){var e;const t=fe(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd;const n=this.xhr=new de(t);try{n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let i in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(i)&&n.setRequestHeader(i,this.opts.extraHeaders[i])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this.opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var i;n.readyState===3&&((i=this.opts.cookieJar)===null||i===void 0||i.parseCookies(n)),n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(i){this.setTimeoutFn(()=>{this.onError(i)},0);return}typeof document<"u"&&(this.index=p.requestsCount++,p.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=Me,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete p.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}p.requestsCount=0;p.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ee);else if(typeof addEventListener=="function"){const s="onpagehide"in u?"pagehide":"unload";addEventListener(s,ee,!1)}}function ee(){for(let s in p.requests)p.requests.hasOwnProperty(s)&&p.requests[s].abort()}const $=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),C=u.WebSocket||u.MozWebSocket,te=!0,He="arraybuffer",se=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ke extends W{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,n=se?{}:fe(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=te&&!se?t?new C(e,t):new C(e):new C(e,t,n)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],i=t===e.length-1;H(n,this.supportsBinary,r=>{const o={};try{te&&this.ws.send(r)}catch{}i&&$(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=le()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!C}}class We extends W{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(e=>{const t=Oe(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),i=Te();i.readable.pipeTo(e.writable),this.writer=i.writable.getWriter();const r=()=>{n.read().then(({done:a,value:h})=>{a||(this.onPacket(h),r())}).catch(a=>{})};r();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then(()=>this.onOpen())})}))}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const n=e[t],i=t===e.length-1;this.writer.write(n).then(()=>{i&&$(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this.transport)===null||e===void 0||e.close()}}const $e={websocket:Ke,webtransport:We,polling:Fe},Ye=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,ze=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function D(s){if(s.length>2e3)throw"URI too long";const e=s,t=s.indexOf("["),n=s.indexOf("]");t!=-1&&n!=-1&&(s=s.substring(0,t)+s.substring(t,n).replace(/:/g,";")+s.substring(n,s.length));let i=Ye.exec(s||""),r={},o=14;for(;o--;)r[ze[o]]=i[o]||"";return t!=-1&&n!=-1&&(r.source=e,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=Je(r,r.path),r.queryKey=Xe(r,r.query),r}function Je(s,e){const t=/\/{2,9}/g,n=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function Xe(s,e){const t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,i,r){i&&(t[i]=r)}),t}let ye=class b extends f{constructor(e,t={}){super(),this.binaryType=He,this.writeBuffer=[],e&&typeof e=="object"&&(t=e,e=null),e?(e=D(e),t.hostname=e.host,t.secure=e.protocol==="https"||e.protocol==="wss",t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=D(t.host).host),x(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=qe(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=he,t.transport=e,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new $e[e](n)}open(){let e;if(this.opts.rememberUpgrade&&b.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",t=>this.onClose("transport close",t))}probe(e){let t=this.createTransport(e),n=!1;b.priorWebsocketSuccess=!1;const i=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",w=>{if(!n)if(w.type==="pong"&&w.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;b.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(y(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const k=new Error("probe error");k.transport=t.name,this.emitReserved("upgradeError",k)}}))};function r(){n||(n=!0,y(),t.close(),t=null)}const o=w=>{const k=new Error("probe error: "+w);k.transport=t.name,r(),this.emitReserved("upgradeError",k)};function a(){o("transport closed")}function h(){o("socket closed")}function g(w){t&&w.name!==t.name&&r()}const y=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",a),this.off("close",h),this.off("upgrading",g)};t.once("open",i),t.once("error",o),t.once("close",a),this.once("close",h),this.once("upgrading",g),this.upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onOpen(){if(this.readyState="open",b.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e<t;e++)this.probe(this.upgrades[e])}}onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),this.resetPingTimeout(),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const t=new Error("server error");t.code=e.data,this.onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let n=0;n<this.writeBuffer.length;n++){const i=this.writeBuffer[n].data;if(i&&(t+=xe(i)),n>0&&t>this.maxPayload)return this.writeBuffer.slice(0,n);t+=2}return this.writeBuffer}write(e,t,n){return this.sendPacket("message",e,t,n),this}send(e,t,n){return this.sendPacket("message",e,t,n),this}sendPacket(e,t,n,i){if(typeof t=="function"&&(i=t,t=void 0),typeof n=="function"&&(i=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const r={type:e,data:t,options:n};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),i&&this.once("flush",i),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}onError(e){b.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let n=0;const i=e.length;for(;n<i;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}};ye.protocol=he;function Qe(s,e="",t){let n=s;t=t||typeof location<"u"&&location,s==null&&(s=t.protocol+"//"+t.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=t.protocol+s:s=t.host+s),/^(https?|wss?):\/\//.test(s)||(typeof t<"u"?s=t.protocol+"//"+s:s="https://"+s),n=D(s)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const r=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+r+":"+n.port+e,n.href=n.protocol+"://"+r+(t&&t.port===n.port?"":":"+n.port),n}const je=typeof ArrayBuffer=="function",Ge=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,ge=Object.prototype.toString,Ze=typeof Blob=="function"||typeof Blob<"u"&&ge.call(Blob)==="[object BlobConstructor]",et=typeof File=="function"||typeof File<"u"&&ge.call(File)==="[object FileConstructor]";function Y(s){return je&&(s instanceof ArrayBuffer||Ge(s))||Ze&&s instanceof Blob||et&&s instanceof File}function S(s,e){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let t=0,n=s.length;t<n;t++)if(S(s[t]))return!0;return!1}if(Y(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return S(s.toJSON(),!0);for(const t in s)if(Object.prototype.hasOwnProperty.call(s,t)&&S(s[t]))return!0;return!1}function tt(s){const e=[],t=s.data,n=s;return n.data=U(t,e),n.attachments=e.length,{packet:n,buffers:e}}function U(s,e){if(!s)return s;if(Y(s)){const t={_placeholder:!0,num:e.length};return e.push(s),t}else if(Array.isArray(s)){const t=new Array(s.length);for(let n=0;n<s.length;n++)t[n]=U(s[n],e);return t}else if(typeof s=="object"&&!(s instanceof Date)){const t={};for(const n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=U(s[n],e));return t}return s}function st(s,e){return s.data=M(s.data,e),delete s.attachments,s}function M(s,e){if(!s)return s;if(s&&s._placeholder===!0){if(typeof s.num=="number"&&s.num>=0&&s.num<e.length)return e[s.num];throw new Error("illegal attachments")}else if(Array.isArray(s))for(let t=0;t<s.length;t++)s[t]=M(s[t],e);else if(typeof s=="object")for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(s[t]=M(s[t],e));return s}const nt=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],it=5;var c;(function(s){s[s.CONNECT=0]="CONNECT",s[s.DISCONNECT=1]="DISCONNECT",s[s.EVENT=2]="EVENT",s[s.ACK=3]="ACK",s[s.CONNECT_ERROR=4]="CONNECT_ERROR",s[s.BINARY_EVENT=5]="BINARY_EVENT",s[s.BINARY_ACK=6]="BINARY_ACK"})(c||(c={}));class rt{constructor(e){this.replacer=e}encode(e){return(e.type===c.EVENT||e.type===c.ACK)&&S(e)?this.encodeAsBinary({type:e.type===c.EVENT?c.BINARY_EVENT:c.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===c.BINARY_EVENT||e.type===c.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=tt(e),n=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(n),i}}function ne(s){return Object.prototype.toString.call(s)==="[object Object]"}class z extends f{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const n=t.type===c.BINARY_EVENT;n||t.type===c.BINARY_ACK?(t.type=n?c.EVENT:c.ACK,this.reconstructor=new ot(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(Y(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0;const n={type:Number(e.charAt(0))};if(c[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===c.BINARY_EVENT||n.type===c.BINARY_ACK){const r=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);const o=e.substring(r,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");n.attachments=Number(o)}if(e.charAt(t+1)==="/"){const r=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););n.nsp=e.substring(r,t)}else n.nsp="/";const i=e.charAt(t+1);if(i!==""&&Number(i)==i){const r=t+1;for(;++t;){const o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}n.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(z.isPayloadValid(n.type,r))n.data=r;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case c.CONNECT:return ne(t);case c.DISCONNECT:return t===void 0;case c.CONNECT_ERROR:return typeof t=="string"||ne(t);case c.EVENT:case c.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&nt.indexOf(t[0])===-1);case c.ACK:case c.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ot{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const t=st(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ct=Object.freeze(Object.defineProperty({__proto__:null,Decoder:z,Encoder:rt,get PacketType(){return c},protocol:it},Symbol.toStringTag,{value:"Module"}));function l(s,e,t){return s.on(e,t),function(){s.off(e,t)}}const at=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class me extends f{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[l(e,"open",this.onopen.bind(this)),l(e,"packet",this.onpacket.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){if(at.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const n={type:c.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const o=this.ids++,a=t.pop();this._registerAckCallback(o,a),n.id=o}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){var n;const i=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}const r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);t.call(this,new Error("operation has timed out"))},i),o=(...a)=>{this.io.clearTimeoutFn(r),t.apply(this,a)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((n,i)=>{const r=(o,a)=>o?i(o):n(a);r.withError=!0,t.push(r),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...r)=>n!==this._queue[0]?void 0:(i!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...r)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:c.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case c.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case c.EVENT:case c.BINARY_EVENT:this.onevent(e);break;case c.ACK:case c.BINARY_ACK:this.onack(e);break;case c.DISCONNECT:this.ondisconnect();break;case c.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let n=!1;return function(...i){n||(n=!0,t.packet({type:c.ACK,id:e,data:i}))}}onack(e){const t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:c.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,e.data)}}}function v(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}v.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*s);s=Math.floor(e*10)&1?s+t:s-t}return Math.min(s,this.max)|0};v.prototype.reset=function(){this.attempts=0};v.prototype.setMin=function(s){this.ms=s};v.prototype.setMax=function(s){this.max=s};v.prototype.setJitter=function(s){this.jitter=s};class V extends f{constructor(e,t){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,x(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((n=t.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new v({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;const i=t.parser||ct;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ye(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const i=l(t,"open",function(){n.onopen(),e&&e()}),r=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=l(t,"error",r);if(this._timeout!==!1){const a=this._timeout,h=this.setTimeoutFn(()=>{i(),r(new Error("timeout")),t.close()},a);this.opts.autoUnref&&h.unref(),this.subs.push(()=>{this.clearTimeoutFn(h)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(l(e,"ping",this.onping.bind(this)),l(e,"data",this.ondata.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this)),l(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){$(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new me(this,e,t),this.nsps[e]=n),n}_destroy(e){const t=Object.keys(this.nsps);for(const n of t)if(this.nsps[n].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let n=0;n<t.length;n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const E={};function N(s,e){typeof s=="object"&&(e=s,s=void 0),e=e||{};const t=Qe(s,e.path||"/socket.io"),n=t.source,i=t.id,r=t.path,o=E[i]&&r in E[i].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o;let h;return a?h=new V(n,e):(E[i]||(E[i]=new V(n,e)),h=E[i]),t.query&&!e.query&&(e.query=t.queryKey),h.socket(t.path,e)}Object.assign(N,{Manager:V,Socket:me,io:N,connect:N});const ht="http://159.138.233.132:8080",m=class m{constructor(){A(this,"socket");this.socket=N(ht)}static getInstance(){return m.instance||(m.instance=new m),m.instance}};A(m,"instance");let F=m;class ft{constructor(){A(this,"socketInstance");this.socketInstance=F.getInstance()}joinRoom(e){this.socketInstance.socket.emit("joinRoom",e)}leaveRoom(e){this.socketInstance.socket.emit("leaveRoom",e),this.socketInstance.socket.disconnect()}confirmMessage(e,t){return this.socketInstance.socket.emit("confirmMessage",e,t)}onMessageReceived(e,t){e==="accountInfo"?this.socketInstance.socket.on("accountInfo",n=>{t(n)}):e==="requestMessage"?this.socketInstance.socket.on("requestMessage",n=>{t(n)}):e==="addressProvide"&&this.socketInstance.socket.on("addressProvide",n=>{t(n)})}offMessageReceived(e){e==="accountInfo"?this.socketInstance.socket.off("accountInfo"):e==="requestMessage"?this.socketInstance.socket.off("requestMessage"):e==="addressProvide"&&this.socketInstance.socket.off("addressProvide")}}new ft;
|