UNPKG

@tendermint/sig

Version:

A signing library for Cosmos

1 lines 298 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Sig=t():e.Sig=t()}(global,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var f=t[n]={i:n,l:!1,exports:{}};return e[n].call(f.exports,f,f.exports,r),f.l=!0,f.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var f in e)r.d(n,f,function(t){return e[t]}.bind(null,f));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=45)}([function(e,t,r){(function(e){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function f(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var a;"object"==typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{a=r(18).Buffer}catch(e){}function d(e,t,r){for(var n=0,f=Math.min(e.length,r),i=t;i<f;i++){var a=e.charCodeAt(i)-48;n<<=4,n|=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return n}function c(e,t,r,n){for(var f=0,i=Math.min(e.length,r),a=t;a<i;a++){var d=e.charCodeAt(a)-48;f*=n,f+=d>=49?d-49+10:d>=17?d-17+10:d}return f}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var f=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&f++,16===t?this._parseHex(e,f):this._parseBase(e,t,f),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},i.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var f=0;f<this.length;f++)this.words[f]=0;var i,a,d=0;if("be"===r)for(f=e.length-1,i=0;f>=0;f-=3)a=e[f]|e[f-1]<<8|e[f-2]<<16,this.words[i]|=a<<d&67108863,this.words[i+1]=a>>>26-d&67108863,(d+=24)>=26&&(d-=26,i++);else if("le"===r)for(f=0,i=0;f<e.length;f+=3)a=e[f]|e[f+1]<<8|e[f+2]<<16,this.words[i]|=a<<d&67108863,this.words[i+1]=a>>>26-d&67108863,(d+=24)>=26&&(d-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,f,i=0;for(r=e.length-6,n=0;r>=t;r-=6)f=d(e,r,r+6),this.words[n]|=f<<i&67108863,this.words[n+1]|=f>>>26-i&4194303,(i+=24)>=26&&(i-=26,n++);r+6!==t&&(f=d(e,t,r+6),this.words[n]|=f<<i&67108863,this.words[n+1]|=f>>>26-i&4194303),this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,f=1;f<=67108863;f*=t)n++;n--,f=f/t|0;for(var i=e.length-r,a=i%n,d=Math.min(i,i-a)+r,o=0,s=r;s<d;s+=n)o=c(e,s,s+n,t),this.imuln(f),this.words[0]+o<67108864?this.words[0]+=o:this._iaddn(o);if(0!==a){var u=1;for(o=c(e,s,e.length,t),s=0;s<a;s++)u*=t;this.imuln(u),this.words[0]+o<67108864?this.words[0]+=o:this._iaddn(o)}},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var o=["","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"],s=[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],u=[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];function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var f=0|e.words[0],i=0|t.words[0],a=f*i,d=67108863&a,c=a/67108864|0;r.words[0]=d;for(var o=1;o<n;o++){for(var s=c>>>26,u=67108863&c,h=Math.min(o,t.length-1),b=Math.max(0,o-e.length+1);b<=h;b++){var l=o-b|0;s+=(a=(f=0|e.words[l])*(i=0|t.words[b])+u)/67108864|0,u=67108863&a}r.words[o]=0|u,c=0|s}return 0!==c?r.words[o]=0|c:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var f=0,i=0,a=0;a<this.length;a++){var d=this.words[a],c=(16777215&(d<<f|i)).toString(16);r=0!==(i=d>>>24-f&16777215)||a!==this.length-1?o[6-c.length]+c+r:c+r,(f+=2)>=26&&(f-=26,a--)}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var h=s[e],b=u[e];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var p=l.modn(b).toString(e);r=(l=l.idivn(b)).isZero()?p+r:o[h-p.length]+p+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var f=this.byteLength(),i=r||Math.max(1,f);n(f<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var a,d,c="le"===t,o=new e(i),s=this.clone();if(c){for(d=0;!s.isZero();d++)a=s.andln(255),s.iushrn(8),o[d]=a;for(;d<i;d++)o[d]=0}else{for(d=0;d<i-f;d++)o[d]=0;for(d=0;!s.isZero();d++)a=s.andln(255),s.iushrn(8),o[i-d-1]=a}return o},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0==(8191&t)&&(r+=13,t>>>=13),0==(127&t)&&(r+=7,t>>>=7),0==(15&t)&&(r+=4,t>>>=4),0==(3&t)&&(r+=2,t>>>=2),0==(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var f=0;f<t;f++)this.words[f]=67108863&~this.words[f];return r>0&&(this.words[f]=~this.words[f]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,f=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<f:this.words[r]&~(1<<f),this.strip()},i.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var f=0,i=0;i<n.length;i++)t=(0|r.words[i])+(0|n.words[i])+f,this.words[i]=67108863&t,f=t>>>26;for(;0!==f&&i<r.length;i++)t=(0|r.words[i])+f,this.words[i]=67108863&t,f=t>>>26;if(this.length=r.length,0!==f)this.words[this.length]=f,this.length++;else if(r!==this)for(;i<r.length;i++)this.words[i]=r.words[i];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,f=this.cmp(e);if(0===f)return this.negative=0,this.length=1,this.words[0]=0,this;f>0?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)i=(t=(0|r.words[a])-(0|n.words[a])+i)>>26,this.words[a]=67108863&t;for(;0!==i&&a<r.length;a++)i=(t=(0|r.words[a])+i)>>26,this.words[a]=67108863&t;if(0===i&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var b=function(e,t,r){var n,f,i,a=e.words,d=t.words,c=r.words,o=0,s=0|a[0],u=8191&s,h=s>>>13,b=0|a[1],l=8191&b,p=b>>>13,y=0|a[2],m=8191&y,v=y>>>13,g=0|a[3],w=8191&g,M=g>>>13,S=0|a[4],A=8191&S,_=S>>>13,x=0|a[5],I=8191&x,E=x>>>13,O=0|a[6],P=8191&O,R=O>>>13,T=0|a[7],j=8191&T,k=T>>>13,z=0|a[8],N=8191&z,B=z>>>13,q=0|a[9],U=8191&q,L=q>>>13,C=0|d[0],D=8191&C,F=C>>>13,K=0|d[1],J=8191&K,Y=K>>>13,H=0|d[2],X=8191&H,Z=H>>>13,W=0|d[3],V=8191&W,$=W>>>13,G=0|d[4],Q=8191&G,ee=G>>>13,te=0|d[5],re=8191&te,ne=te>>>13,fe=0|d[6],ie=8191&fe,ae=fe>>>13,de=0|d[7],ce=8191&de,oe=de>>>13,se=0|d[8],ue=8191&se,he=se>>>13,be=0|d[9],le=8191&be,pe=be>>>13;r.negative=e.negative^t.negative,r.length=19;var ye=(o+(n=Math.imul(u,D))|0)+((8191&(f=(f=Math.imul(u,F))+Math.imul(h,D)|0))<<13)|0;o=((i=Math.imul(h,F))+(f>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(l,D),f=(f=Math.imul(l,F))+Math.imul(p,D)|0,i=Math.imul(p,F);var me=(o+(n=n+Math.imul(u,J)|0)|0)+((8191&(f=(f=f+Math.imul(u,Y)|0)+Math.imul(h,J)|0))<<13)|0;o=((i=i+Math.imul(h,Y)|0)+(f>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(m,D),f=(f=Math.imul(m,F))+Math.imul(v,D)|0,i=Math.imul(v,F),n=n+Math.imul(l,J)|0,f=(f=f+Math.imul(l,Y)|0)+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0;var ve=(o+(n=n+Math.imul(u,X)|0)|0)+((8191&(f=(f=f+Math.imul(u,Z)|0)+Math.imul(h,X)|0))<<13)|0;o=((i=i+Math.imul(h,Z)|0)+(f>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,D),f=(f=Math.imul(w,F))+Math.imul(M,D)|0,i=Math.imul(M,F),n=n+Math.imul(m,J)|0,f=(f=f+Math.imul(m,Y)|0)+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,n=n+Math.imul(l,X)|0,f=(f=f+Math.imul(l,Z)|0)+Math.imul(p,X)|0,i=i+Math.imul(p,Z)|0;var ge=(o+(n=n+Math.imul(u,V)|0)|0)+((8191&(f=(f=f+Math.imul(u,$)|0)+Math.imul(h,V)|0))<<13)|0;o=((i=i+Math.imul(h,$)|0)+(f>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(A,D),f=(f=Math.imul(A,F))+Math.imul(_,D)|0,i=Math.imul(_,F),n=n+Math.imul(w,J)|0,f=(f=f+Math.imul(w,Y)|0)+Math.imul(M,J)|0,i=i+Math.imul(M,Y)|0,n=n+Math.imul(m,X)|0,f=(f=f+Math.imul(m,Z)|0)+Math.imul(v,X)|0,i=i+Math.imul(v,Z)|0,n=n+Math.imul(l,V)|0,f=(f=f+Math.imul(l,$)|0)+Math.imul(p,V)|0,i=i+Math.imul(p,$)|0;var we=(o+(n=n+Math.imul(u,Q)|0)|0)+((8191&(f=(f=f+Math.imul(u,ee)|0)+Math.imul(h,Q)|0))<<13)|0;o=((i=i+Math.imul(h,ee)|0)+(f>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(I,D),f=(f=Math.imul(I,F))+Math.imul(E,D)|0,i=Math.imul(E,F),n=n+Math.imul(A,J)|0,f=(f=f+Math.imul(A,Y)|0)+Math.imul(_,J)|0,i=i+Math.imul(_,Y)|0,n=n+Math.imul(w,X)|0,f=(f=f+Math.imul(w,Z)|0)+Math.imul(M,X)|0,i=i+Math.imul(M,Z)|0,n=n+Math.imul(m,V)|0,f=(f=f+Math.imul(m,$)|0)+Math.imul(v,V)|0,i=i+Math.imul(v,$)|0,n=n+Math.imul(l,Q)|0,f=(f=f+Math.imul(l,ee)|0)+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0;var Me=(o+(n=n+Math.imul(u,re)|0)|0)+((8191&(f=(f=f+Math.imul(u,ne)|0)+Math.imul(h,re)|0))<<13)|0;o=((i=i+Math.imul(h,ne)|0)+(f>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(P,D),f=(f=Math.imul(P,F))+Math.imul(R,D)|0,i=Math.imul(R,F),n=n+Math.imul(I,J)|0,f=(f=f+Math.imul(I,Y)|0)+Math.imul(E,J)|0,i=i+Math.imul(E,Y)|0,n=n+Math.imul(A,X)|0,f=(f=f+Math.imul(A,Z)|0)+Math.imul(_,X)|0,i=i+Math.imul(_,Z)|0,n=n+Math.imul(w,V)|0,f=(f=f+Math.imul(w,$)|0)+Math.imul(M,V)|0,i=i+Math.imul(M,$)|0,n=n+Math.imul(m,Q)|0,f=(f=f+Math.imul(m,ee)|0)+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(l,re)|0,f=(f=f+Math.imul(l,ne)|0)+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0;var Se=(o+(n=n+Math.imul(u,ie)|0)|0)+((8191&(f=(f=f+Math.imul(u,ae)|0)+Math.imul(h,ie)|0))<<13)|0;o=((i=i+Math.imul(h,ae)|0)+(f>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,D),f=(f=Math.imul(j,F))+Math.imul(k,D)|0,i=Math.imul(k,F),n=n+Math.imul(P,J)|0,f=(f=f+Math.imul(P,Y)|0)+Math.imul(R,J)|0,i=i+Math.imul(R,Y)|0,n=n+Math.imul(I,X)|0,f=(f=f+Math.imul(I,Z)|0)+Math.imul(E,X)|0,i=i+Math.imul(E,Z)|0,n=n+Math.imul(A,V)|0,f=(f=f+Math.imul(A,$)|0)+Math.imul(_,V)|0,i=i+Math.imul(_,$)|0,n=n+Math.imul(w,Q)|0,f=(f=f+Math.imul(w,ee)|0)+Math.imul(M,Q)|0,i=i+Math.imul(M,ee)|0,n=n+Math.imul(m,re)|0,f=(f=f+Math.imul(m,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(l,ie)|0,f=(f=f+Math.imul(l,ae)|0)+Math.imul(p,ie)|0,i=i+Math.imul(p,ae)|0;var Ae=(o+(n=n+Math.imul(u,ce)|0)|0)+((8191&(f=(f=f+Math.imul(u,oe)|0)+Math.imul(h,ce)|0))<<13)|0;o=((i=i+Math.imul(h,oe)|0)+(f>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(N,D),f=(f=Math.imul(N,F))+Math.imul(B,D)|0,i=Math.imul(B,F),n=n+Math.imul(j,J)|0,f=(f=f+Math.imul(j,Y)|0)+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,n=n+Math.imul(P,X)|0,f=(f=f+Math.imul(P,Z)|0)+Math.imul(R,X)|0,i=i+Math.imul(R,Z)|0,n=n+Math.imul(I,V)|0,f=(f=f+Math.imul(I,$)|0)+Math.imul(E,V)|0,i=i+Math.imul(E,$)|0,n=n+Math.imul(A,Q)|0,f=(f=f+Math.imul(A,ee)|0)+Math.imul(_,Q)|0,i=i+Math.imul(_,ee)|0,n=n+Math.imul(w,re)|0,f=(f=f+Math.imul(w,ne)|0)+Math.imul(M,re)|0,i=i+Math.imul(M,ne)|0,n=n+Math.imul(m,ie)|0,f=(f=f+Math.imul(m,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,n=n+Math.imul(l,ce)|0,f=(f=f+Math.imul(l,oe)|0)+Math.imul(p,ce)|0,i=i+Math.imul(p,oe)|0;var _e=(o+(n=n+Math.imul(u,ue)|0)|0)+((8191&(f=(f=f+Math.imul(u,he)|0)+Math.imul(h,ue)|0))<<13)|0;o=((i=i+Math.imul(h,he)|0)+(f>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(U,D),f=(f=Math.imul(U,F))+Math.imul(L,D)|0,i=Math.imul(L,F),n=n+Math.imul(N,J)|0,f=(f=f+Math.imul(N,Y)|0)+Math.imul(B,J)|0,i=i+Math.imul(B,Y)|0,n=n+Math.imul(j,X)|0,f=(f=f+Math.imul(j,Z)|0)+Math.imul(k,X)|0,i=i+Math.imul(k,Z)|0,n=n+Math.imul(P,V)|0,f=(f=f+Math.imul(P,$)|0)+Math.imul(R,V)|0,i=i+Math.imul(R,$)|0,n=n+Math.imul(I,Q)|0,f=(f=f+Math.imul(I,ee)|0)+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(A,re)|0,f=(f=f+Math.imul(A,ne)|0)+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,n=n+Math.imul(w,ie)|0,f=(f=f+Math.imul(w,ae)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,ae)|0,n=n+Math.imul(m,ce)|0,f=(f=f+Math.imul(m,oe)|0)+Math.imul(v,ce)|0,i=i+Math.imul(v,oe)|0,n=n+Math.imul(l,ue)|0,f=(f=f+Math.imul(l,he)|0)+Math.imul(p,ue)|0,i=i+Math.imul(p,he)|0;var xe=(o+(n=n+Math.imul(u,le)|0)|0)+((8191&(f=(f=f+Math.imul(u,pe)|0)+Math.imul(h,le)|0))<<13)|0;o=((i=i+Math.imul(h,pe)|0)+(f>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(U,J),f=(f=Math.imul(U,Y))+Math.imul(L,J)|0,i=Math.imul(L,Y),n=n+Math.imul(N,X)|0,f=(f=f+Math.imul(N,Z)|0)+Math.imul(B,X)|0,i=i+Math.imul(B,Z)|0,n=n+Math.imul(j,V)|0,f=(f=f+Math.imul(j,$)|0)+Math.imul(k,V)|0,i=i+Math.imul(k,$)|0,n=n+Math.imul(P,Q)|0,f=(f=f+Math.imul(P,ee)|0)+Math.imul(R,Q)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(I,re)|0,f=(f=f+Math.imul(I,ne)|0)+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(A,ie)|0,f=(f=f+Math.imul(A,ae)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,ae)|0,n=n+Math.imul(w,ce)|0,f=(f=f+Math.imul(w,oe)|0)+Math.imul(M,ce)|0,i=i+Math.imul(M,oe)|0,n=n+Math.imul(m,ue)|0,f=(f=f+Math.imul(m,he)|0)+Math.imul(v,ue)|0,i=i+Math.imul(v,he)|0;var Ie=(o+(n=n+Math.imul(l,le)|0)|0)+((8191&(f=(f=f+Math.imul(l,pe)|0)+Math.imul(p,le)|0))<<13)|0;o=((i=i+Math.imul(p,pe)|0)+(f>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(U,X),f=(f=Math.imul(U,Z))+Math.imul(L,X)|0,i=Math.imul(L,Z),n=n+Math.imul(N,V)|0,f=(f=f+Math.imul(N,$)|0)+Math.imul(B,V)|0,i=i+Math.imul(B,$)|0,n=n+Math.imul(j,Q)|0,f=(f=f+Math.imul(j,ee)|0)+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,n=n+Math.imul(P,re)|0,f=(f=f+Math.imul(P,ne)|0)+Math.imul(R,re)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(I,ie)|0,f=(f=f+Math.imul(I,ae)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,ae)|0,n=n+Math.imul(A,ce)|0,f=(f=f+Math.imul(A,oe)|0)+Math.imul(_,ce)|0,i=i+Math.imul(_,oe)|0,n=n+Math.imul(w,ue)|0,f=(f=f+Math.imul(w,he)|0)+Math.imul(M,ue)|0,i=i+Math.imul(M,he)|0;var Ee=(o+(n=n+Math.imul(m,le)|0)|0)+((8191&(f=(f=f+Math.imul(m,pe)|0)+Math.imul(v,le)|0))<<13)|0;o=((i=i+Math.imul(v,pe)|0)+(f>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,V),f=(f=Math.imul(U,$))+Math.imul(L,V)|0,i=Math.imul(L,$),n=n+Math.imul(N,Q)|0,f=(f=f+Math.imul(N,ee)|0)+Math.imul(B,Q)|0,i=i+Math.imul(B,ee)|0,n=n+Math.imul(j,re)|0,f=(f=f+Math.imul(j,ne)|0)+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,n=n+Math.imul(P,ie)|0,f=(f=f+Math.imul(P,ae)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,ae)|0,n=n+Math.imul(I,ce)|0,f=(f=f+Math.imul(I,oe)|0)+Math.imul(E,ce)|0,i=i+Math.imul(E,oe)|0,n=n+Math.imul(A,ue)|0,f=(f=f+Math.imul(A,he)|0)+Math.imul(_,ue)|0,i=i+Math.imul(_,he)|0;var Oe=(o+(n=n+Math.imul(w,le)|0)|0)+((8191&(f=(f=f+Math.imul(w,pe)|0)+Math.imul(M,le)|0))<<13)|0;o=((i=i+Math.imul(M,pe)|0)+(f>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(U,Q),f=(f=Math.imul(U,ee))+Math.imul(L,Q)|0,i=Math.imul(L,ee),n=n+Math.imul(N,re)|0,f=(f=f+Math.imul(N,ne)|0)+Math.imul(B,re)|0,i=i+Math.imul(B,ne)|0,n=n+Math.imul(j,ie)|0,f=(f=f+Math.imul(j,ae)|0)+Math.imul(k,ie)|0,i=i+Math.imul(k,ae)|0,n=n+Math.imul(P,ce)|0,f=(f=f+Math.imul(P,oe)|0)+Math.imul(R,ce)|0,i=i+Math.imul(R,oe)|0,n=n+Math.imul(I,ue)|0,f=(f=f+Math.imul(I,he)|0)+Math.imul(E,ue)|0,i=i+Math.imul(E,he)|0;var Pe=(o+(n=n+Math.imul(A,le)|0)|0)+((8191&(f=(f=f+Math.imul(A,pe)|0)+Math.imul(_,le)|0))<<13)|0;o=((i=i+Math.imul(_,pe)|0)+(f>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(U,re),f=(f=Math.imul(U,ne))+Math.imul(L,re)|0,i=Math.imul(L,ne),n=n+Math.imul(N,ie)|0,f=(f=f+Math.imul(N,ae)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,ae)|0,n=n+Math.imul(j,ce)|0,f=(f=f+Math.imul(j,oe)|0)+Math.imul(k,ce)|0,i=i+Math.imul(k,oe)|0,n=n+Math.imul(P,ue)|0,f=(f=f+Math.imul(P,he)|0)+Math.imul(R,ue)|0,i=i+Math.imul(R,he)|0;var Re=(o+(n=n+Math.imul(I,le)|0)|0)+((8191&(f=(f=f+Math.imul(I,pe)|0)+Math.imul(E,le)|0))<<13)|0;o=((i=i+Math.imul(E,pe)|0)+(f>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(U,ie),f=(f=Math.imul(U,ae))+Math.imul(L,ie)|0,i=Math.imul(L,ae),n=n+Math.imul(N,ce)|0,f=(f=f+Math.imul(N,oe)|0)+Math.imul(B,ce)|0,i=i+Math.imul(B,oe)|0,n=n+Math.imul(j,ue)|0,f=(f=f+Math.imul(j,he)|0)+Math.imul(k,ue)|0,i=i+Math.imul(k,he)|0;var Te=(o+(n=n+Math.imul(P,le)|0)|0)+((8191&(f=(f=f+Math.imul(P,pe)|0)+Math.imul(R,le)|0))<<13)|0;o=((i=i+Math.imul(R,pe)|0)+(f>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(U,ce),f=(f=Math.imul(U,oe))+Math.imul(L,ce)|0,i=Math.imul(L,oe),n=n+Math.imul(N,ue)|0,f=(f=f+Math.imul(N,he)|0)+Math.imul(B,ue)|0,i=i+Math.imul(B,he)|0;var je=(o+(n=n+Math.imul(j,le)|0)|0)+((8191&(f=(f=f+Math.imul(j,pe)|0)+Math.imul(k,le)|0))<<13)|0;o=((i=i+Math.imul(k,pe)|0)+(f>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(U,ue),f=(f=Math.imul(U,he))+Math.imul(L,ue)|0,i=Math.imul(L,he);var ke=(o+(n=n+Math.imul(N,le)|0)|0)+((8191&(f=(f=f+Math.imul(N,pe)|0)+Math.imul(B,le)|0))<<13)|0;o=((i=i+Math.imul(B,pe)|0)+(f>>>13)|0)+(ke>>>26)|0,ke&=67108863;var ze=(o+(n=Math.imul(U,le))|0)+((8191&(f=(f=Math.imul(U,pe))+Math.imul(L,le)|0))<<13)|0;return o=((i=Math.imul(L,pe))+(f>>>13)|0)+(ze>>>26)|0,ze&=67108863,c[0]=ye,c[1]=me,c[2]=ve,c[3]=ge,c[4]=we,c[5]=Me,c[6]=Se,c[7]=Ae,c[8]=_e,c[9]=xe,c[10]=Ie,c[11]=Ee,c[12]=Oe,c[13]=Pe,c[14]=Re,c[15]=Te,c[16]=je,c[17]=ke,c[18]=ze,0!==o&&(c[19]=o,r.length++),r};function l(e,t,r){return(new p).mulp(e,t,r)}function p(e,t){this.x=e,this.y=t}Math.imul||(b=h),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,f=0,i=0;i<r.length-1;i++){var a=f;f=0;for(var d=67108863&n,c=Math.min(i,t.length-1),o=Math.max(0,i-e.length+1);o<=c;o++){var s=i-o,u=(0|e.words[s])*(0|t.words[o]),h=67108863&u;d=67108863&(h=h+d|0),f+=(a=(a=a+(u/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}r.words[i]=d,n=a,a=f}return 0!==n?r.words[i]=n:r.length--,r.strip()}(this,e,t):l(this,e,t)},p.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},p.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,f=0;f<t;f++)n|=(1&e)<<t-f-1,e>>=1;return n},p.prototype.permute=function(e,t,r,n,f,i){for(var a=0;a<i;a++)n[a]=t[e[a]],f[a]=r[e[a]]},p.prototype.transform=function(e,t,r,n,f,i){this.permute(i,e,t,r,n,f);for(var a=1;a<f;a<<=1)for(var d=a<<1,c=Math.cos(2*Math.PI/d),o=Math.sin(2*Math.PI/d),s=0;s<f;s+=d)for(var u=c,h=o,b=0;b<a;b++){var l=r[s+b],p=n[s+b],y=r[s+b+a],m=n[s+b+a],v=u*y-h*m;m=u*m+h*y,y=v,r[s+b]=l+y,n[s+b]=p+m,r[s+b+a]=l-y,n[s+b+a]=p-m,b!==d&&(v=c*u-o*h,h=c*h+o*u,u=v)}},p.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,f=0;for(r=r/2|0;r;r>>>=1)f++;return 1<<f+1+n},p.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var f=e[n];e[n]=e[r-n-1],e[r-n-1]=f,f=t[n],t[n]=-t[r-n-1],t[r-n-1]=-f}},p.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var f=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&f,r=f<67108864?0:f/67108864|0}return e},p.prototype.convert13b=function(e,t,r,f){for(var i=0,a=0;a<t;a++)i+=0|e[a],r[2*a]=8191&i,i>>>=13,r[2*a+1]=8191&i,i>>>=13;for(a=2*t;a<f;++a)r[a]=0;n(0===i),n(0==(-8192&i))},p.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},p.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),f=this.makeRBT(n),i=this.stub(n),a=new Array(n),d=new Array(n),c=new Array(n),o=new Array(n),s=new Array(n),u=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,o,n),this.transform(a,i,d,c,n,f),this.transform(o,i,s,u,n,f);for(var b=0;b<n;b++){var l=d[b]*s[b]-c[b]*u[b];c[b]=d[b]*u[b]+c[b]*s[b],d[b]=l}return this.conjugate(d,c,n),this.transform(d,c,h,i,n,f),this.conjugate(h,i,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),l(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var f=(0|this.words[r])*e,i=(67108863&f)+(67108863&t);t>>=26,t+=f/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,f=r%26;t[r]=(e.words[n]&1<<f)>>>f}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var f=r.sqr();n<t.length;n++,f=f.sqr())0!==t[n]&&(r=r.mul(f));return r},i.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,f=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var d=this.words[t]&i,c=(0|this.words[t])-d<<r;this.words[t]=c|a,a=d>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==f){for(t=this.length-1;t>=0;t--)this.words[t+f]=this.words[t];for(t=0;t<f;t++)this.words[t]=0;this.length+=f}return this.strip()},i.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,r){var f;n("number"==typeof e&&e>=0),f=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),d=67108863^67108863>>>i<<i,c=r;if(f-=a,f=Math.max(0,f),c){for(var o=0;o<a;o++)c.words[o]=this.words[o];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,o=0;o<this.length;o++)this.words[o]=this.words[o+a];else this.words[0]=0,this.length=1;var s=0;for(o=this.length-1;o>=0&&(0!==s||o>=f);o--){var u=0|this.words[o];this.words[o]=s<<26-i|u>>>i,s=u&d}return c&&0!==s&&(c.words[c.length++]=s),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,f=1<<t;return!(this.length<=r)&&!!(this.words[r]&f)},i.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var f=67108863^67108863>>>t<<t;this.words[this.length-1]&=f}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,r){var f,i,a=e.length+r;this._expand(a);var d=0;for(f=0;f<e.length;f++){i=(0|this.words[f+r])+d;var c=(0|e.words[f])*t;d=((i-=67108863&c)>>26)-(c/67108864|0),this.words[f+r]=67108863&i}for(;f<this.length-r;f++)d=(i=(0|this.words[f+r])+d)>>26,this.words[f+r]=67108863&i;if(0===d)return this.strip();for(n(-1===d),d=0,f=0;f<this.length;f++)d=(i=-(0|this.words[f])+d)>>26,this.words[f]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),f=e,a=0|f.words[f.length-1];0!==(r=26-this._countBits(a))&&(f=f.ushln(r),n.iushln(r),a=0|f.words[f.length-1]);var d,c=n.length-f.length;if("mod"!==t){(d=new i(null)).length=c+1,d.words=new Array(d.length);for(var o=0;o<d.length;o++)d.words[o]=0}var s=n.clone()._ishlnsubmul(f,1,c);0===s.negative&&(n=s,d&&(d.words[c]=1));for(var u=c-1;u>=0;u--){var h=67108864*(0|n.words[f.length+u])+(0|n.words[f.length+u-1]);for(h=Math.min(h/a|0,67108863),n._ishlnsubmul(f,h,u);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(f,1,u),n.isZero()||(n.negative^=1);d&&(d.words[u]=h)}return d&&d.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:d||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(d=this.neg().divmod(e,t),"mod"!==t&&(f=d.div.neg()),"div"!==t&&(a=d.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:f,mod:a}):0===this.negative&&0!==e.negative?(d=this.divmod(e.neg(),t),"mod"!==t&&(f=d.div.neg()),{div:f,mod:d.mod}):0!=(this.negative&e.negative)?(d=this.neg().divmod(e.neg(),t),"div"!==t&&(a=d.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:d.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var f,a,d},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),f=e.andln(1),i=r.cmp(n);return i<0||1===f&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,f=this.length-1;f>=0;f--)r=(t*r+(0|this.words[f]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var f=(0|this.words[r])+67108864*t;this.words[r]=f/e|0,t=f%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var f=new i(1),a=new i(0),d=new i(0),c=new i(1),o=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++o;for(var s=r.clone(),u=t.clone();!t.isZero();){for(var h=0,b=1;0==(t.words[0]&b)&&h<26;++h,b<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(f.isOdd()||a.isOdd())&&(f.iadd(s),a.isub(u)),f.iushrn(1),a.iushrn(1);for(var l=0,p=1;0==(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(r.iushrn(l);l-- >0;)(d.isOdd()||c.isOdd())&&(d.iadd(s),c.isub(u)),d.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),f.isub(d),a.isub(c)):(r.isub(t),d.isub(f),c.isub(a))}return{a:d,b:c,gcd:r.iushln(o)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var f,a=new i(1),d=new i(0),c=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var o=0,s=1;0==(t.words[0]&s)&&o<26;++o,s<<=1);if(o>0)for(t.iushrn(o);o-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var u=0,h=1;0==(r.words[0]&h)&&u<26;++u,h<<=1);if(u>0)for(r.iushrn(u);u-- >0;)d.isOdd()&&d.iadd(c),d.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(d)):(r.isub(t),d.isub(a))}return(f=0===t.cmpn(1)?a:d).cmpn(0)<0&&f.iadd(e),f},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var f=t.cmp(r);if(f<0){var i=t;t=r,r=i}else if(0===f||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0==(1&this.words[0])},i.prototype.isOdd=function(){return 1==(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,f=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=f,this;for(var i=f,a=r;0!==i&&a<this.length;a++){var d=0|this.words[a];i=(d+=i)>>>26,d&=67108863,this.words[a]=d}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var f=0|this.words[0];t=f===e?0:f<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],f=0|e.words[r];if(n!==f){n<f?t=-1:n>f&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function g(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function A(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(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)}m.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):r.strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},f(v,m),v.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n<r;n++)t.words[n]=e.words[n];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var f=e.words[9];for(t.words[t.length++]=4194303&f,n=10;n<e.length;n++){var i=0|e.words[n];e.words[n-10]=(4194303&i)<<4|f>>>22,f=i}f>>>=22,e.words[n-10]=f,0===f&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},f(g,m),f(w,m),f(M,m),M.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,f=67108863&n;n>>>=26,e.words[r]=f,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new g;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new M}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var f=this.m.subn(1),a=0;!f.isZero()&&0===f.andln(1);)a++,f.iushrn(1);n(!f.isZero());var d=new i(1).toRed(this),c=d.redNeg(),o=this.m.subn(1).iushrn(1),s=this.m.bitLength();for(s=new i(2*s*s).toRed(this);0!==this.pow(s,o).cmp(c);)s.redIAdd(c);for(var u=this.pow(s,f),h=this.pow(e,f.addn(1).iushrn(1)),b=this.pow(e,f),l=a;0!==b.cmp(d);){for(var p=b,y=0;0!==p.cmp(d);y++)p=p.redSqr();n(y<l);var m=this.pow(u,new i(1).iushln(l-y-1));h=h.redMul(m),u=m.redSqr(),b=b.redMul(u),l=y}return h},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new i(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var f=r[0],a=0,d=0,c=t.bitLength()%26;for(0===c&&(c=26),n=t.length-1;n>=0;n--){for(var o=t.words[n],s=c-1;s>=0;s--){var u=o>>s&1;f!==r[0]&&(f=this.sqr(f)),0!==u||0!==a?(a<<=1,a|=u,(4===++d||0===n&&0===s)&&(f=this.mul(f,r[a]),d=0,a=0)):d=0}c=26}return f},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new A(e)},f(A,S),A.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},A.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},A.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=r.isub(n).iushrn(this.shift),i=f;return f.cmp(this.m)>=0?i=f.isub(this.m):f.cmpn(0)<0&&(i=f.iadd(this.m)),i._forceRed(this)},A.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),f=r.isub(n).iushrn(this.shift),a=f;return f.cmp(this.m)>=0?a=f.isub(this.m):f.cmpn(0)<0&&(a=f.iadd(this.m)),a._forceRed(this)},A.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,r(58)(e))},function(e,t,r){"use strict";var n=t,f=r(0),i=r(6),a=r(21);n.assert=i,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t){for(var r=[],n=1<<t+1,f=e.clone();f.cmpn(1)>=0;){var i;if(f.isOdd()){var a=f.andln(n-1);i=a>(n>>1)-1?(n>>1)-a:a,f.isubn(i)}else i=0;r.push(i);for(var d=0!==f.cmpn(0)&&0===f.andln(n-1)?t+1:1,c=1;c<d;c++)r.push(0);f.iushrn(d)}return r},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,f=0;e.cmpn(-n)>0||t.cmpn(-f)>0;){var i,a,d,c=e.andln(3)+n&3,o=t.andln(3)+f&3;if(3===c&&(c=-1),3===o&&(o=-1),0==(1&c))i=0;else i=3!==(d=e.andln(7)+n&7)&&5!==d||2!==o?c:-c;if(r[0].push(i),0==(1&o))a=0;else a=3!==(d=t.andln(7)+f&7)&&5!==d||2!==c?o:-o;r[1].push(a),2*n===i+1&&(n=1-n),2*f===a+1&&(f=1-f),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new f(e,"hex","le")}},function(e,t,r){"use strict";var n=t,f=r(0),i=r(6),a=r(21);n.assert=i,n.toArray=a.toArray,n.zero2=a.zero2,n.toHex=a.toHex,n.encode=a.encode,n.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var f=1<<t+1,i=e.clone(),a=0;a<n.length;a++){var d,c=i.andln(f-1);i.isOdd()?(d=c>(f>>1)-1?(f>>1)-c:c,i.isubn(d)):d=0,n[a]=d,i.iushrn(1)}return n},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n=0,f=0;e.cmpn(-n)>0||t.cmpn(-f)>0;){var i,a,d,c=e.andln(3)+n&3,o=t.andln(3)+f&3;if(3===c&&(c=-1),3===o&&(o=-1),0==(1&c))i=0;else i=3!==(d=e.andln(7)+n&7)&&5!==d||2!==o?c:-c;if(r[0].push(i),0==(1&o))a=0;else a=3!==(d=t.andln(7)+f&7)&&5!==d||2!==c?o:-o;r[1].push(a),2*n===i+1&&(n=1-n),2*f===a+1&&(f=1-f),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new f(e,"hex","le")}},function(e,t,r){let n=!1;try{n="[object process]"===Object.prototype.toString.call(global.process)}catch(e){}e.exports=r(n?46:47)},function(e,t,r){"use strict";var n=r(6),f=r(7);function i(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function d(e){return 1===e.length?"0"+e:e}function c(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=f,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),f=0;f<e.length;f+=2)r.push(parseInt(e[f]+e[f+1],16))}else for(var n=0,f=0;f<e.length;f++){var a=e.charCodeAt(f);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):i(e,f)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++f)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(f=0;f<e.length;f++)r[f]=0|e[f];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=d(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var f=e[n];"little"===t&&(f=a(f)),r+=c(f.toString(16))}return r},t.zero2=d,t.zero8=c,t.join32=function(e,t,r,f){var i=r-t;n(i%4==0);for(var a=new Array(i/4),d=0,c=t;d<a.length;d++,c+=4){var o;o="big"===f?e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3]:e[c+3]<<24|e[c+2]<<16|e[c+1]<<8|e[c],a[d]=o>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,f=0;n<e.length;n++,f+=4){var i=e[n];"big"===t?(r[f]=i>>>24,r[f+1]=i>>>16&255,r[f+2]=i>>>8&255,r[f+3]=255&i):(r[f+3]=i>>>24,r[f+2]=i>>>16&255,r[f+1]=i>>>8&255,r[f]=255&i)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,f){return e+t+r+n+f>>>0},t.sum64=function(e,t,r,n){var f=e[t],i=n+e[t+1]>>>0,a=(i<n?1:0)+r+f;e[t]=a>>>0,e[t+1]=i},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,f,i,a,d){var c=0,o=t;return c+=(o=o+n>>>0)<t?1:0,c+=(o=o+i>>>0)<i?1:0,e+r+f+a+(c+=(o=o+d>>>0)<d?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,f,i,a,d){return t+n+i+d>>>0},t.sum64_5_hi=function(e,t,r,n,f,i,a,d,c,o){var s=0,u=t;return s+=(u=u+n>>>0)<t?1:0,s+=(u=u+i>>>0)<i?1:0,s+=(u=u+d>>>0)<d?1:0,e+r+f+a+c+(s+=(u=u+o>>>0)<o?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,f,i,a,d,c,o){return t+n+i+d+o>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){"use strict";r.d(t,"e",(function(){return n})),r.d(t,"d",(function(){return f})),r.d(t,"c",(function(){return i})),r.d(t,"a",(function(){return a})),r.d(t,"b",(function(){return d}));var n="cosmos",f="m/44'/118'/0'/0/0",i="sync",a="async",d="block"},function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},function(e,t,r){try{var n=r(28);if("function"!=typeof n.inherits)throw"";e.exports=n.inherits}catch(t){e.exports=r(62)}},function(e,t,r){"use strict";r.d(t,"b",(function(){return a})),r.d(t,"a",(function(){return d}));var n=r(3),f=r(9),i=r.n(f);function a(e){var t=e instanceof Buffer?e:Buffer.from(e),r=i()("sha256").update(t).digest();return Object(n.bufferToB