UNPKG

@usecannon/ganache

Version:

A library and cli to create a local blockchain for fast Ethereum development.

2 lines 3.8 MB
/*! For license information please see 0.js.LICENSE.txt */ exports.id=0,exports.ids=[0],exports.modules=[function(e,a,g){"use strict";var t=this&&this.__createBinding||(Object.create?function(e,a,g,t){void 0===t&&(t=g);var B=Object.getOwnPropertyDescriptor(a,g);B&&!("get"in B?!a.__esModule:B.writable||B.configurable)||(B={enumerable:!0,get:function(){return a[g]}}),Object.defineProperty(e,t,B)}:function(e,a,g,t){void 0===t&&(t=g),e[t]=a[g]}),B=this&&this.__exportStar||function(e,a){for(var g in e)"default"===g||Object.prototype.hasOwnProperty.call(a,g)||t(a,e,g)};Object.defineProperty(a,"__esModule",{value:!0}),a.toAscii=a.stripHexPrefix=a.padToEven=a.isHexString=a.isHexPrefixed=a.getKeys=a.getBinarySize=a.fromUtf8=a.fromAscii=a.arrayContainsArray=a.ssz=void 0,B(g(63),a),B(g(594),a),B(g(134),a),B(g(340),a),B(g(596),a),B(g(597),a),B(g(38),a),a.ssz=g(251),B(g(161),a),B(g(628),a);var o=g(76);Object.defineProperty(a,"arrayContainsArray",{enumerable:!0,get:function(){return o.arrayContainsArray}}),Object.defineProperty(a,"fromAscii",{enumerable:!0,get:function(){return o.fromAscii}}),Object.defineProperty(a,"fromUtf8",{enumerable:!0,get:function(){return o.fromUtf8}}),Object.defineProperty(a,"getBinarySize",{enumerable:!0,get:function(){return o.getBinarySize}}),Object.defineProperty(a,"getKeys",{enumerable:!0,get:function(){return o.getKeys}}),Object.defineProperty(a,"isHexPrefixed",{enumerable:!0,get:function(){return o.isHexPrefixed}}),Object.defineProperty(a,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(a,"padToEven",{enumerable:!0,get:function(){return o.padToEven}}),Object.defineProperty(a,"stripHexPrefix",{enumerable:!0,get:function(){return o.stripHexPrefix}}),Object.defineProperty(a,"toAscii",{enumerable:!0,get:function(){return o.toAscii}}),B(g(629),a)},,function(e,a,g){"use strict";var t=this&&this.__createBinding||(Object.create?function(e,a,g,t){void 0===t&&(t=g),Object.defineProperty(e,t,{enumerable:!0,get:function(){return a[g]}})}:function(e,a,g,t){void 0===t&&(t=g),e[t]=a[g]}),B=this&&this.__exportStar||function(e,a){for(var g in e)"default"===g||Object.prototype.hasOwnProperty.call(a,g)||t(a,e,g)};Object.defineProperty(a,"__esModule",{value:!0}),B(g(102),a),B(g(341),a),B(g(34),a),B(g(602),a),B(g(142),a),B(g(343),a),B(g(344),a),B(g(163),a)},,function(e,a,g){!function(e,a){"use strict";function assert(e,a){if(!e)throw new Error(a||"Assertion failed")}function inherits(e,a){e.super_=a;var TempCtor=function(){};TempCtor.prototype=a.prototype,e.prototype=new TempCtor,e.prototype.constructor=e}function BN(e,a,g){if(BN.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==a&&"be"!==a||(g=a,a=10),this._init(e||0,a||10,g||"be"))}var t;"object"==typeof e?e.exports=BN:a.BN=BN,BN.BN=BN,BN.wordSize=26;try{t="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:g(21).Buffer}catch(e){}function parseHex4Bits(e,a){var g=e.charCodeAt(a);return g>=65&&g<=70?g-55:g>=97&&g<=102?g-87:g-48&15}function parseHexByte(e,a,g){var t=parseHex4Bits(e,g);return g-1>=a&&(t|=parseHex4Bits(e,g-1)<<4),t}function parseBase(e,a,g,t){for(var B=0,o=Math.min(e.length,g),I=a;I<o;I++){var c=e.charCodeAt(I)-48;B*=t,B+=c>=49?c-49+10:c>=17?c-17+10:c}return B}BN.isBN=function isBN(e){return e instanceof BN||null!==e&&"object"==typeof e&&e.constructor.wordSize===BN.wordSize&&Array.isArray(e.words)},BN.max=function max(e,a){return e.cmp(a)>0?e:a},BN.min=function min(e,a){return e.cmp(a)<0?e:a},BN.prototype._init=function init(e,a,g){if("number"==typeof e)return this._initNumber(e,a,g);if("object"==typeof e)return this._initArray(e,a,g);"hex"===a&&(a=16),assert(a===(0|a)&&a>=2&&a<=36);var t=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(t++,this.negative=1),t<e.length&&(16===a?this._parseHex(e,t,g):(this._parseBase(e,a,t),"le"===g&&this._initArray(this.toArray(),a,g)))},BN.prototype._initNumber=function _initNumber(e,a,g){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):(assert(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===g&&this._initArray(this.toArray(),a,g)},BN.prototype._initArray=function _initArray(e,a,g){if(assert("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 t=0;t<this.length;t++)this.words[t]=0;var B,o,I=0;if("be"===g)for(t=e.length-1,B=0;t>=0;t-=3)o=e[t]|e[t-1]<<8|e[t-2]<<16,this.words[B]|=o<<I&67108863,this.words[B+1]=o>>>26-I&67108863,(I+=24)>=26&&(I-=26,B++);else if("le"===g)for(t=0,B=0;t<e.length;t+=3)o=e[t]|e[t+1]<<8|e[t+2]<<16,this.words[B]|=o<<I&67108863,this.words[B+1]=o>>>26-I&67108863,(I+=24)>=26&&(I-=26,B++);return this.strip()},BN.prototype._parseHex=function _parseHex(e,a,g){this.length=Math.ceil((e.length-a)/6),this.words=new Array(this.length);for(var t=0;t<this.length;t++)this.words[t]=0;var B,o=0,I=0;if("be"===g)for(t=e.length-1;t>=a;t-=2)B=parseHexByte(e,a,t)<<o,this.words[I]|=67108863&B,o>=18?(o-=18,I+=1,this.words[I]|=B>>>26):o+=8;else for(t=(e.length-a)%2==0?a+1:a;t<e.length;t+=2)B=parseHexByte(e,a,t)<<o,this.words[I]|=67108863&B,o>=18?(o-=18,I+=1,this.words[I]|=B>>>26):o+=8;this.strip()},BN.prototype._parseBase=function _parseBase(e,a,g){this.words=[0],this.length=1;for(var t=0,B=1;B<=67108863;B*=a)t++;t--,B=B/a|0;for(var o=e.length-g,I=o%t,c=Math.min(o,o-I)+g,r=0,n=g;n<c;n+=t)r=parseBase(e,n,n+t,a),this.imuln(B),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r);if(0!==I){var d=1;for(r=parseBase(e,n,e.length,a),n=0;n<I;n++)d*=a;this.imuln(d),this.words[0]+r<67108864?this.words[0]+=r:this._iaddn(r)}this.strip()},BN.prototype.copy=function copy(e){e.words=new Array(this.length);for(var a=0;a<this.length;a++)e.words[a]=this.words[a];e.length=this.length,e.negative=this.negative,e.red=this.red},BN.prototype.clone=function clone(){var e=new BN(null);return this.copy(e),e},BN.prototype._expand=function _expand(e){for(;this.length<e;)this.words[this.length++]=0;return this},BN.prototype.strip=function strip(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function _normSign(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},BN.prototype.inspect=function inspect(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var B=["","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"],o=[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],I=[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 smallMulTo(e,a,g){g.negative=a.negative^e.negative;var t=e.length+a.length|0;g.length=t,t=t-1|0;var B=0|e.words[0],o=0|a.words[0],I=B*o,c=67108863&I,r=I/67108864|0;g.words[0]=c;for(var n=1;n<t;n++){for(var d=r>>>26,Q=67108863&r,C=Math.min(n,a.length-1),E=Math.max(0,n-e.length+1);E<=C;E++){var s=n-E|0;d+=(I=(B=0|e.words[s])*(o=0|a.words[E])+Q)/67108864|0,Q=67108863&I}g.words[n]=0|Q,r=0|d}return 0!==r?g.words[n]=0|r:g.length--,g.strip()}BN.prototype.toString=function toString(e,a){var g;if(a=0|a||1,16===(e=e||10)||"hex"===e){g="";for(var t=0,c=0,r=0;r<this.length;r++){var n=this.words[r],d=(16777215&(n<<t|c)).toString(16);g=0!==(c=n>>>24-t&16777215)||r!==this.length-1?B[6-d.length]+d+g:d+g,(t+=2)>=26&&(t-=26,r--)}for(0!==c&&(g=c.toString(16)+g);g.length%a!=0;)g="0"+g;return 0!==this.negative&&(g="-"+g),g}if(e===(0|e)&&e>=2&&e<=36){var Q=o[e],C=I[e];g="";var E=this.clone();for(E.negative=0;!E.isZero();){var s=E.modn(C).toString(e);g=(E=E.idivn(C)).isZero()?s+g:B[Q-s.length]+s+g}for(this.isZero()&&(g="0"+g);g.length%a!=0;)g="0"+g;return 0!==this.negative&&(g="-"+g),g}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function toNumber(){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&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},BN.prototype.toJSON=function toJSON(){return this.toString(16)},BN.prototype.toBuffer=function toBuffer(e,a){return assert(void 0!==t),this.toArrayLike(t,e,a)},BN.prototype.toArray=function toArray(e,a){return this.toArrayLike(Array,e,a)},BN.prototype.toArrayLike=function toArrayLike(e,a,g){var t=this.byteLength(),B=g||Math.max(1,t);assert(t<=B,"byte array longer than desired length"),assert(B>0,"Requested array length <= 0"),this.strip();var o,I,c="le"===a,r=new e(B),n=this.clone();if(c){for(I=0;!n.isZero();I++)o=n.andln(255),n.iushrn(8),r[I]=o;for(;I<B;I++)r[I]=0}else{for(I=0;I<B-t;I++)r[I]=0;for(I=0;!n.isZero();I++)o=n.andln(255),n.iushrn(8),r[B-I-1]=o}return r},Math.clz32?BN.prototype._countBits=function _countBits(e){return 32-Math.clz32(e)}:BN.prototype._countBits=function _countBits(e){var a=e,g=0;return a>=4096&&(g+=13,a>>>=13),a>=64&&(g+=7,a>>>=7),a>=8&&(g+=4,a>>>=4),a>=2&&(g+=2,a>>>=2),g+a},BN.prototype._zeroBits=function _zeroBits(e){if(0===e)return 26;var a=e,g=0;return 0==(8191&a)&&(g+=13,a>>>=13),0==(127&a)&&(g+=7,a>>>=7),0==(15&a)&&(g+=4,a>>>=4),0==(3&a)&&(g+=2,a>>>=2),0==(1&a)&&g++,g},BN.prototype.bitLength=function bitLength(){var e=this.words[this.length-1],a=this._countBits(e);return 26*(this.length-1)+a},BN.prototype.zeroBits=function zeroBits(){if(this.isZero())return 0;for(var e=0,a=0;a<this.length;a++){var g=this._zeroBits(this.words[a]);if(e+=g,26!==g)break}return e},BN.prototype.byteLength=function byteLength(){return Math.ceil(this.bitLength()/8)},BN.prototype.toTwos=function toTwos(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},BN.prototype.fromTwos=function fromTwos(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},BN.prototype.isNeg=function isNeg(){return 0!==this.negative},BN.prototype.neg=function neg(){return this.clone().ineg()},BN.prototype.ineg=function ineg(){return this.isZero()||(this.negative^=1),this},BN.prototype.iuor=function iuor(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var a=0;a<e.length;a++)this.words[a]=this.words[a]|e.words[a];return this.strip()},BN.prototype.ior=function ior(e){return assert(0==(this.negative|e.negative)),this.iuor(e)},BN.prototype.or=function or(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},BN.prototype.uor=function uor(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},BN.prototype.iuand=function iuand(e){var a;a=this.length>e.length?e:this;for(var g=0;g<a.length;g++)this.words[g]=this.words[g]&e.words[g];return this.length=a.length,this.strip()},BN.prototype.iand=function iand(e){return assert(0==(this.negative|e.negative)),this.iuand(e)},BN.prototype.and=function and(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},BN.prototype.uand=function uand(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},BN.prototype.iuxor=function iuxor(e){var a,g;this.length>e.length?(a=this,g=e):(a=e,g=this);for(var t=0;t<g.length;t++)this.words[t]=a.words[t]^g.words[t];if(this!==a)for(;t<a.length;t++)this.words[t]=a.words[t];return this.length=a.length,this.strip()},BN.prototype.ixor=function ixor(e){return assert(0==(this.negative|e.negative)),this.iuxor(e)},BN.prototype.xor=function xor(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},BN.prototype.uxor=function uxor(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},BN.prototype.inotn=function inotn(e){assert("number"==typeof e&&e>=0);var a=0|Math.ceil(e/26),g=e%26;this._expand(a),g>0&&a--;for(var t=0;t<a;t++)this.words[t]=67108863&~this.words[t];return g>0&&(this.words[t]=~this.words[t]&67108863>>26-g),this.strip()},BN.prototype.notn=function notn(e){return this.clone().inotn(e)},BN.prototype.setn=function setn(e,a){assert("number"==typeof e&&e>=0);var g=e/26|0,t=e%26;return this._expand(g+1),this.words[g]=a?this.words[g]|1<<t:this.words[g]&~(1<<t),this.strip()},BN.prototype.iadd=function iadd(e){var a,g,t;if(0!==this.negative&&0===e.negative)return this.negative=0,a=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,a=this.isub(e),e.negative=1,a._normSign();this.length>e.length?(g=this,t=e):(g=e,t=this);for(var B=0,o=0;o<t.length;o++)a=(0|g.words[o])+(0|t.words[o])+B,this.words[o]=67108863&a,B=a>>>26;for(;0!==B&&o<g.length;o++)a=(0|g.words[o])+B,this.words[o]=67108863&a,B=a>>>26;if(this.length=g.length,0!==B)this.words[this.length]=B,this.length++;else if(g!==this)for(;o<g.length;o++)this.words[o]=g.words[o];return this},BN.prototype.add=function add(e){var a;return 0!==e.negative&&0===this.negative?(e.negative=0,a=this.sub(e),e.negative^=1,a):0===e.negative&&0!==this.negative?(this.negative=0,a=e.sub(this),this.negative=1,a):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},BN.prototype.isub=function isub(e){if(0!==e.negative){e.negative=0;var a=this.iadd(e);return e.negative=1,a._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var g,t,B=this.cmp(e);if(0===B)return this.negative=0,this.length=1,this.words[0]=0,this;B>0?(g=this,t=e):(g=e,t=this);for(var o=0,I=0;I<t.length;I++)o=(a=(0|g.words[I])-(0|t.words[I])+o)>>26,this.words[I]=67108863&a;for(;0!==o&&I<g.length;I++)o=(a=(0|g.words[I])+o)>>26,this.words[I]=67108863&a;if(0===o&&I<g.length&&g!==this)for(;I<g.length;I++)this.words[I]=g.words[I];return this.length=Math.max(this.length,I),g!==this&&(this.negative=1),this.strip()},BN.prototype.sub=function sub(e){return this.clone().isub(e)};var c=function comb10MulTo(e,a,g){var t,B,o,I=e.words,c=a.words,r=g.words,n=0,d=0|I[0],Q=8191&d,C=d>>>13,E=0|I[1],s=8191&E,b=E>>>13,l=0|I[2],h=8191&l,u=l>>>13,x=0|I[3],w=8191&x,p=x>>>13,D=0|I[4],m=8191&D,y=D>>>13,k=0|I[5],G=8191&k,N=k>>>13,U=0|I[6],q=8191&U,L=U>>>13,J=0|I[7],H=8191&J,Y=J>>>13,v=0|I[8],T=8191&v,_=v>>>13,z=0|I[9],O=8191&z,j=z>>>13,P=0|c[0],W=8191&P,V=P>>>13,X=0|c[1],$=8191&X,AA=X>>>13,eA=0|c[2],aA=8191&eA,gA=eA>>>13,tA=0|c[3],iA=8191&tA,BA=tA>>>13,oA=0|c[4],IA=8191&oA,cA=oA>>>13,rA=0|c[5],nA=8191&rA,dA=rA>>>13,QA=0|c[6],fA=8191&QA,CA=QA>>>13,EA=0|c[7],sA=8191&EA,bA=EA>>>13,lA=0|c[8],hA=8191&lA,uA=lA>>>13,xA=0|c[9],wA=8191&xA,pA=xA>>>13;g.negative=e.negative^a.negative,g.length=19;var DA=(n+(t=Math.imul(Q,W))|0)+((8191&(B=(B=Math.imul(Q,V))+Math.imul(C,W)|0))<<13)|0;n=((o=Math.imul(C,V))+(B>>>13)|0)+(DA>>>26)|0,DA&=67108863,t=Math.imul(s,W),B=(B=Math.imul(s,V))+Math.imul(b,W)|0,o=Math.imul(b,V);var mA=(n+(t=t+Math.imul(Q,$)|0)|0)+((8191&(B=(B=B+Math.imul(Q,AA)|0)+Math.imul(C,$)|0))<<13)|0;n=((o=o+Math.imul(C,AA)|0)+(B>>>13)|0)+(mA>>>26)|0,mA&=67108863,t=Math.imul(h,W),B=(B=Math.imul(h,V))+Math.imul(u,W)|0,o=Math.imul(u,V),t=t+Math.imul(s,$)|0,B=(B=B+Math.imul(s,AA)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,AA)|0;var yA=(n+(t=t+Math.imul(Q,aA)|0)|0)+((8191&(B=(B=B+Math.imul(Q,gA)|0)+Math.imul(C,aA)|0))<<13)|0;n=((o=o+Math.imul(C,gA)|0)+(B>>>13)|0)+(yA>>>26)|0,yA&=67108863,t=Math.imul(w,W),B=(B=Math.imul(w,V))+Math.imul(p,W)|0,o=Math.imul(p,V),t=t+Math.imul(h,$)|0,B=(B=B+Math.imul(h,AA)|0)+Math.imul(u,$)|0,o=o+Math.imul(u,AA)|0,t=t+Math.imul(s,aA)|0,B=(B=B+Math.imul(s,gA)|0)+Math.imul(b,aA)|0,o=o+Math.imul(b,gA)|0;var kA=(n+(t=t+Math.imul(Q,iA)|0)|0)+((8191&(B=(B=B+Math.imul(Q,BA)|0)+Math.imul(C,iA)|0))<<13)|0;n=((o=o+Math.imul(C,BA)|0)+(B>>>13)|0)+(kA>>>26)|0,kA&=67108863,t=Math.imul(m,W),B=(B=Math.imul(m,V))+Math.imul(y,W)|0,o=Math.imul(y,V),t=t+Math.imul(w,$)|0,B=(B=B+Math.imul(w,AA)|0)+Math.imul(p,$)|0,o=o+Math.imul(p,AA)|0,t=t+Math.imul(h,aA)|0,B=(B=B+Math.imul(h,gA)|0)+Math.imul(u,aA)|0,o=o+Math.imul(u,gA)|0,t=t+Math.imul(s,iA)|0,B=(B=B+Math.imul(s,BA)|0)+Math.imul(b,iA)|0,o=o+Math.imul(b,BA)|0;var MA=(n+(t=t+Math.imul(Q,IA)|0)|0)+((8191&(B=(B=B+Math.imul(Q,cA)|0)+Math.imul(C,IA)|0))<<13)|0;n=((o=o+Math.imul(C,cA)|0)+(B>>>13)|0)+(MA>>>26)|0,MA&=67108863,t=Math.imul(G,W),B=(B=Math.imul(G,V))+Math.imul(N,W)|0,o=Math.imul(N,V),t=t+Math.imul(m,$)|0,B=(B=B+Math.imul(m,AA)|0)+Math.imul(y,$)|0,o=o+Math.imul(y,AA)|0,t=t+Math.imul(w,aA)|0,B=(B=B+Math.imul(w,gA)|0)+Math.imul(p,aA)|0,o=o+Math.imul(p,gA)|0,t=t+Math.imul(h,iA)|0,B=(B=B+Math.imul(h,BA)|0)+Math.imul(u,iA)|0,o=o+Math.imul(u,BA)|0,t=t+Math.imul(s,IA)|0,B=(B=B+Math.imul(s,cA)|0)+Math.imul(b,IA)|0,o=o+Math.imul(b,cA)|0;var GA=(n+(t=t+Math.imul(Q,nA)|0)|0)+((8191&(B=(B=B+Math.imul(Q,dA)|0)+Math.imul(C,nA)|0))<<13)|0;n=((o=o+Math.imul(C,dA)|0)+(B>>>13)|0)+(GA>>>26)|0,GA&=67108863,t=Math.imul(q,W),B=(B=Math.imul(q,V))+Math.imul(L,W)|0,o=Math.imul(L,V),t=t+Math.imul(G,$)|0,B=(B=B+Math.imul(G,AA)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,AA)|0,t=t+Math.imul(m,aA)|0,B=(B=B+Math.imul(m,gA)|0)+Math.imul(y,aA)|0,o=o+Math.imul(y,gA)|0,t=t+Math.imul(w,iA)|0,B=(B=B+Math.imul(w,BA)|0)+Math.imul(p,iA)|0,o=o+Math.imul(p,BA)|0,t=t+Math.imul(h,IA)|0,B=(B=B+Math.imul(h,cA)|0)+Math.imul(u,IA)|0,o=o+Math.imul(u,cA)|0,t=t+Math.imul(s,nA)|0,B=(B=B+Math.imul(s,dA)|0)+Math.imul(b,nA)|0,o=o+Math.imul(b,dA)|0;var SA=(n+(t=t+Math.imul(Q,fA)|0)|0)+((8191&(B=(B=B+Math.imul(Q,CA)|0)+Math.imul(C,fA)|0))<<13)|0;n=((o=o+Math.imul(C,CA)|0)+(B>>>13)|0)+(SA>>>26)|0,SA&=67108863,t=Math.imul(H,W),B=(B=Math.imul(H,V))+Math.imul(Y,W)|0,o=Math.imul(Y,V),t=t+Math.imul(q,$)|0,B=(B=B+Math.imul(q,AA)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,AA)|0,t=t+Math.imul(G,aA)|0,B=(B=B+Math.imul(G,gA)|0)+Math.imul(N,aA)|0,o=o+Math.imul(N,gA)|0,t=t+Math.imul(m,iA)|0,B=(B=B+Math.imul(m,BA)|0)+Math.imul(y,iA)|0,o=o+Math.imul(y,BA)|0,t=t+Math.imul(w,IA)|0,B=(B=B+Math.imul(w,cA)|0)+Math.imul(p,IA)|0,o=o+Math.imul(p,cA)|0,t=t+Math.imul(h,nA)|0,B=(B=B+Math.imul(h,dA)|0)+Math.imul(u,nA)|0,o=o+Math.imul(u,dA)|0,t=t+Math.imul(s,fA)|0,B=(B=B+Math.imul(s,CA)|0)+Math.imul(b,fA)|0,o=o+Math.imul(b,CA)|0;var FA=(n+(t=t+Math.imul(Q,sA)|0)|0)+((8191&(B=(B=B+Math.imul(Q,bA)|0)+Math.imul(C,sA)|0))<<13)|0;n=((o=o+Math.imul(C,bA)|0)+(B>>>13)|0)+(FA>>>26)|0,FA&=67108863,t=Math.imul(T,W),B=(B=Math.imul(T,V))+Math.imul(_,W)|0,o=Math.imul(_,V),t=t+Math.imul(H,$)|0,B=(B=B+Math.imul(H,AA)|0)+Math.imul(Y,$)|0,o=o+Math.imul(Y,AA)|0,t=t+Math.imul(q,aA)|0,B=(B=B+Math.imul(q,gA)|0)+Math.imul(L,aA)|0,o=o+Math.imul(L,gA)|0,t=t+Math.imul(G,iA)|0,B=(B=B+Math.imul(G,BA)|0)+Math.imul(N,iA)|0,o=o+Math.imul(N,BA)|0,t=t+Math.imul(m,IA)|0,B=(B=B+Math.imul(m,cA)|0)+Math.imul(y,IA)|0,o=o+Math.imul(y,cA)|0,t=t+Math.imul(w,nA)|0,B=(B=B+Math.imul(w,dA)|0)+Math.imul(p,nA)|0,o=o+Math.imul(p,dA)|0,t=t+Math.imul(h,fA)|0,B=(B=B+Math.imul(h,CA)|0)+Math.imul(u,fA)|0,o=o+Math.imul(u,CA)|0,t=t+Math.imul(s,sA)|0,B=(B=B+Math.imul(s,bA)|0)+Math.imul(b,sA)|0,o=o+Math.imul(b,bA)|0;var NA=(n+(t=t+Math.imul(Q,hA)|0)|0)+((8191&(B=(B=B+Math.imul(Q,uA)|0)+Math.imul(C,hA)|0))<<13)|0;n=((o=o+Math.imul(C,uA)|0)+(B>>>13)|0)+(NA>>>26)|0,NA&=67108863,t=Math.imul(O,W),B=(B=Math.imul(O,V))+Math.imul(j,W)|0,o=Math.imul(j,V),t=t+Math.imul(T,$)|0,B=(B=B+Math.imul(T,AA)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,AA)|0,t=t+Math.imul(H,aA)|0,B=(B=B+Math.imul(H,gA)|0)+Math.imul(Y,aA)|0,o=o+Math.imul(Y,gA)|0,t=t+Math.imul(q,iA)|0,B=(B=B+Math.imul(q,BA)|0)+Math.imul(L,iA)|0,o=o+Math.imul(L,BA)|0,t=t+Math.imul(G,IA)|0,B=(B=B+Math.imul(G,cA)|0)+Math.imul(N,IA)|0,o=o+Math.imul(N,cA)|0,t=t+Math.imul(m,nA)|0,B=(B=B+Math.imul(m,dA)|0)+Math.imul(y,nA)|0,o=o+Math.imul(y,dA)|0,t=t+Math.imul(w,fA)|0,B=(B=B+Math.imul(w,CA)|0)+Math.imul(p,fA)|0,o=o+Math.imul(p,CA)|0,t=t+Math.imul(h,sA)|0,B=(B=B+Math.imul(h,bA)|0)+Math.imul(u,sA)|0,o=o+Math.imul(u,bA)|0,t=t+Math.imul(s,hA)|0,B=(B=B+Math.imul(s,uA)|0)+Math.imul(b,hA)|0,o=o+Math.imul(b,uA)|0;var UA=(n+(t=t+Math.imul(Q,wA)|0)|0)+((8191&(B=(B=B+Math.imul(Q,pA)|0)+Math.imul(C,wA)|0))<<13)|0;n=((o=o+Math.imul(C,pA)|0)+(B>>>13)|0)+(UA>>>26)|0,UA&=67108863,t=Math.imul(O,$),B=(B=Math.imul(O,AA))+Math.imul(j,$)|0,o=Math.imul(j,AA),t=t+Math.imul(T,aA)|0,B=(B=B+Math.imul(T,gA)|0)+Math.imul(_,aA)|0,o=o+Math.imul(_,gA)|0,t=t+Math.imul(H,iA)|0,B=(B=B+Math.imul(H,BA)|0)+Math.imul(Y,iA)|0,o=o+Math.imul(Y,BA)|0,t=t+Math.imul(q,IA)|0,B=(B=B+Math.imul(q,cA)|0)+Math.imul(L,IA)|0,o=o+Math.imul(L,cA)|0,t=t+Math.imul(G,nA)|0,B=(B=B+Math.imul(G,dA)|0)+Math.imul(N,nA)|0,o=o+Math.imul(N,dA)|0,t=t+Math.imul(m,fA)|0,B=(B=B+Math.imul(m,CA)|0)+Math.imul(y,fA)|0,o=o+Math.imul(y,CA)|0,t=t+Math.imul(w,sA)|0,B=(B=B+Math.imul(w,bA)|0)+Math.imul(p,sA)|0,o=o+Math.imul(p,bA)|0,t=t+Math.imul(h,hA)|0,B=(B=B+Math.imul(h,uA)|0)+Math.imul(u,hA)|0,o=o+Math.imul(u,uA)|0;var RA=(n+(t=t+Math.imul(s,wA)|0)|0)+((8191&(B=(B=B+Math.imul(s,pA)|0)+Math.imul(b,wA)|0))<<13)|0;n=((o=o+Math.imul(b,pA)|0)+(B>>>13)|0)+(RA>>>26)|0,RA&=67108863,t=Math.imul(O,aA),B=(B=Math.imul(O,gA))+Math.imul(j,aA)|0,o=Math.imul(j,gA),t=t+Math.imul(T,iA)|0,B=(B=B+Math.imul(T,BA)|0)+Math.imul(_,iA)|0,o=o+Math.imul(_,BA)|0,t=t+Math.imul(H,IA)|0,B=(B=B+Math.imul(H,cA)|0)+Math.imul(Y,IA)|0,o=o+Math.imul(Y,cA)|0,t=t+Math.imul(q,nA)|0,B=(B=B+Math.imul(q,dA)|0)+Math.imul(L,nA)|0,o=o+Math.imul(L,dA)|0,t=t+Math.imul(G,fA)|0,B=(B=B+Math.imul(G,CA)|0)+Math.imul(N,fA)|0,o=o+Math.imul(N,CA)|0,t=t+Math.imul(m,sA)|0,B=(B=B+Math.imul(m,bA)|0)+Math.imul(y,sA)|0,o=o+Math.imul(y,bA)|0,t=t+Math.imul(w,hA)|0,B=(B=B+Math.imul(w,uA)|0)+Math.imul(p,hA)|0,o=o+Math.imul(p,uA)|0;var qA=(n+(t=t+Math.imul(h,wA)|0)|0)+((8191&(B=(B=B+Math.imul(h,pA)|0)+Math.imul(u,wA)|0))<<13)|0;n=((o=o+Math.imul(u,pA)|0)+(B>>>13)|0)+(qA>>>26)|0,qA&=67108863,t=Math.imul(O,iA),B=(B=Math.imul(O,BA))+Math.imul(j,iA)|0,o=Math.imul(j,BA),t=t+Math.imul(T,IA)|0,B=(B=B+Math.imul(T,cA)|0)+Math.imul(_,IA)|0,o=o+Math.imul(_,cA)|0,t=t+Math.imul(H,nA)|0,B=(B=B+Math.imul(H,dA)|0)+Math.imul(Y,nA)|0,o=o+Math.imul(Y,dA)|0,t=t+Math.imul(q,fA)|0,B=(B=B+Math.imul(q,CA)|0)+Math.imul(L,fA)|0,o=o+Math.imul(L,CA)|0,t=t+Math.imul(G,sA)|0,B=(B=B+Math.imul(G,bA)|0)+Math.imul(N,sA)|0,o=o+Math.imul(N,bA)|0,t=t+Math.imul(m,hA)|0,B=(B=B+Math.imul(m,uA)|0)+Math.imul(y,hA)|0,o=o+Math.imul(y,uA)|0;var LA=(n+(t=t+Math.imul(w,wA)|0)|0)+((8191&(B=(B=B+Math.imul(w,pA)|0)+Math.imul(p,wA)|0))<<13)|0;n=((o=o+Math.imul(p,pA)|0)+(B>>>13)|0)+(LA>>>26)|0,LA&=67108863,t=Math.imul(O,IA),B=(B=Math.imul(O,cA))+Math.imul(j,IA)|0,o=Math.imul(j,cA),t=t+Math.imul(T,nA)|0,B=(B=B+Math.imul(T,dA)|0)+Math.imul(_,nA)|0,o=o+Math.imul(_,dA)|0,t=t+Math.imul(H,fA)|0,B=(B=B+Math.imul(H,CA)|0)+Math.imul(Y,fA)|0,o=o+Math.imul(Y,CA)|0,t=t+Math.imul(q,sA)|0,B=(B=B+Math.imul(q,bA)|0)+Math.imul(L,sA)|0,o=o+Math.imul(L,bA)|0,t=t+Math.imul(G,hA)|0,B=(B=B+Math.imul(G,uA)|0)+Math.imul(N,hA)|0,o=o+Math.imul(N,uA)|0;var JA=(n+(t=t+Math.imul(m,wA)|0)|0)+((8191&(B=(B=B+Math.imul(m,pA)|0)+Math.imul(y,wA)|0))<<13)|0;n=((o=o+Math.imul(y,pA)|0)+(B>>>13)|0)+(JA>>>26)|0,JA&=67108863,t=Math.imul(O,nA),B=(B=Math.imul(O,dA))+Math.imul(j,nA)|0,o=Math.imul(j,dA),t=t+Math.imul(T,fA)|0,B=(B=B+Math.imul(T,CA)|0)+Math.imul(_,fA)|0,o=o+Math.imul(_,CA)|0,t=t+Math.imul(H,sA)|0,B=(B=B+Math.imul(H,bA)|0)+Math.imul(Y,sA)|0,o=o+Math.imul(Y,bA)|0,t=t+Math.imul(q,hA)|0,B=(B=B+Math.imul(q,uA)|0)+Math.imul(L,hA)|0,o=o+Math.imul(L,uA)|0;var HA=(n+(t=t+Math.imul(G,wA)|0)|0)+((8191&(B=(B=B+Math.imul(G,pA)|0)+Math.imul(N,wA)|0))<<13)|0;n=((o=o+Math.imul(N,pA)|0)+(B>>>13)|0)+(HA>>>26)|0,HA&=67108863,t=Math.imul(O,fA),B=(B=Math.imul(O,CA))+Math.imul(j,fA)|0,o=Math.imul(j,CA),t=t+Math.imul(T,sA)|0,B=(B=B+Math.imul(T,bA)|0)+Math.imul(_,sA)|0,o=o+Math.imul(_,bA)|0,t=t+Math.imul(H,hA)|0,B=(B=B+Math.imul(H,uA)|0)+Math.imul(Y,hA)|0,o=o+Math.imul(Y,uA)|0;var YA=(n+(t=t+Math.imul(q,wA)|0)|0)+((8191&(B=(B=B+Math.imul(q,pA)|0)+Math.imul(L,wA)|0))<<13)|0;n=((o=o+Math.imul(L,pA)|0)+(B>>>13)|0)+(YA>>>26)|0,YA&=67108863,t=Math.imul(O,sA),B=(B=Math.imul(O,bA))+Math.imul(j,sA)|0,o=Math.imul(j,bA),t=t+Math.imul(T,hA)|0,B=(B=B+Math.imul(T,uA)|0)+Math.imul(_,hA)|0,o=o+Math.imul(_,uA)|0;var vA=(n+(t=t+Math.imul(H,wA)|0)|0)+((8191&(B=(B=B+Math.imul(H,pA)|0)+Math.imul(Y,wA)|0))<<13)|0;n=((o=o+Math.imul(Y,pA)|0)+(B>>>13)|0)+(vA>>>26)|0,vA&=67108863,t=Math.imul(O,hA),B=(B=Math.imul(O,uA))+Math.imul(j,hA)|0,o=Math.imul(j,uA);var KA=(n+(t=t+Math.imul(T,wA)|0)|0)+((8191&(B=(B=B+Math.imul(T,pA)|0)+Math.imul(_,wA)|0))<<13)|0;n=((o=o+Math.imul(_,pA)|0)+(B>>>13)|0)+(KA>>>26)|0,KA&=67108863;var TA=(n+(t=Math.imul(O,wA))|0)+((8191&(B=(B=Math.imul(O,pA))+Math.imul(j,wA)|0))<<13)|0;return n=((o=Math.imul(j,pA))+(B>>>13)|0)+(TA>>>26)|0,TA&=67108863,r[0]=DA,r[1]=mA,r[2]=yA,r[3]=kA,r[4]=MA,r[5]=GA,r[6]=SA,r[7]=FA,r[8]=NA,r[9]=UA,r[10]=RA,r[11]=qA,r[12]=LA,r[13]=JA,r[14]=HA,r[15]=YA,r[16]=vA,r[17]=KA,r[18]=TA,0!==n&&(r[19]=n,g.length++),g};function jumboMulTo(e,a,g){return(new FFTM).mulp(e,a,g)}function FFTM(e,a){this.x=e,this.y=a}Math.imul||(c=smallMulTo),BN.prototype.mulTo=function mulTo(e,a){var g,t=this.length+e.length;return g=10===this.length&&10===e.length?c(this,e,a):t<63?smallMulTo(this,e,a):t<1024?function bigMulTo(e,a,g){g.negative=a.negative^e.negative,g.length=e.length+a.length;for(var t=0,B=0,o=0;o<g.length-1;o++){var I=B;B=0;for(var c=67108863&t,r=Math.min(o,a.length-1),n=Math.max(0,o-e.length+1);n<=r;n++){var d=o-n,Q=(0|e.words[d])*(0|a.words[n]),C=67108863&Q;c=67108863&(C=C+c|0),B+=(I=(I=I+(Q/67108864|0)|0)+(C>>>26)|0)>>>26,I&=67108863}g.words[o]=c,t=I,I=B}return 0!==t?g.words[o]=t:g.length--,g.strip()}(this,e,a):jumboMulTo(this,e,a),g},FFTM.prototype.makeRBT=function makeRBT(e){for(var a=new Array(e),g=BN.prototype._countBits(e)-1,t=0;t<e;t++)a[t]=this.revBin(t,g,e);return a},FFTM.prototype.revBin=function revBin(e,a,g){if(0===e||e===g-1)return e;for(var t=0,B=0;B<a;B++)t|=(1&e)<<a-B-1,e>>=1;return t},FFTM.prototype.permute=function permute(e,a,g,t,B,o){for(var I=0;I<o;I++)t[I]=a[e[I]],B[I]=g[e[I]]},FFTM.prototype.transform=function transform(e,a,g,t,B,o){this.permute(o,e,a,g,t,B);for(var I=1;I<B;I<<=1)for(var c=I<<1,r=Math.cos(2*Math.PI/c),n=Math.sin(2*Math.PI/c),d=0;d<B;d+=c)for(var Q=r,C=n,E=0;E<I;E++){var s=g[d+E],b=t[d+E],l=g[d+E+I],h=t[d+E+I],u=Q*l-C*h;h=Q*h+C*l,l=u,g[d+E]=s+l,t[d+E]=b+h,g[d+E+I]=s-l,t[d+E+I]=b-h,E!==c&&(u=r*Q-n*C,C=r*C+n*Q,Q=u)}},FFTM.prototype.guessLen13b=function guessLen13b(e,a){var g=1|Math.max(a,e),t=1&g,B=0;for(g=g/2|0;g;g>>>=1)B++;return 1<<B+1+t},FFTM.prototype.conjugate=function conjugate(e,a,g){if(!(g<=1))for(var t=0;t<g/2;t++){var B=e[t];e[t]=e[g-t-1],e[g-t-1]=B,B=a[t],a[t]=-a[g-t-1],a[g-t-1]=-B}},FFTM.prototype.normalize13b=function normalize13b(e,a){for(var g=0,t=0;t<a/2;t++){var B=8192*Math.round(e[2*t+1]/a)+Math.round(e[2*t]/a)+g;e[t]=67108863&B,g=B<67108864?0:B/67108864|0}return e},FFTM.prototype.convert13b=function convert13b(e,a,g,t){for(var B=0,o=0;o<a;o++)B+=0|e[o],g[2*o]=8191&B,B>>>=13,g[2*o+1]=8191&B,B>>>=13;for(o=2*a;o<t;++o)g[o]=0;assert(0===B),assert(0==(-8192&B))},FFTM.prototype.stub=function stub(e){for(var a=new Array(e),g=0;g<e;g++)a[g]=0;return a},FFTM.prototype.mulp=function mulp(e,a,g){var t=2*this.guessLen13b(e.length,a.length),B=this.makeRBT(t),o=this.stub(t),I=new Array(t),c=new Array(t),r=new Array(t),n=new Array(t),d=new Array(t),Q=new Array(t),C=g.words;C.length=t,this.convert13b(e.words,e.length,I,t),this.convert13b(a.words,a.length,n,t),this.transform(I,o,c,r,t,B),this.transform(n,o,d,Q,t,B);for(var E=0;E<t;E++){var s=c[E]*d[E]-r[E]*Q[E];r[E]=c[E]*Q[E]+r[E]*d[E],c[E]=s}return this.conjugate(c,r,t),this.transform(c,r,C,o,t,B),this.conjugate(C,o,t),this.normalize13b(C,t),g.negative=e.negative^a.negative,g.length=e.length+a.length,g.strip()},BN.prototype.mul=function mul(e){var a=new BN(null);return a.words=new Array(this.length+e.length),this.mulTo(e,a)},BN.prototype.mulf=function mulf(e){var a=new BN(null);return a.words=new Array(this.length+e.length),jumboMulTo(this,e,a)},BN.prototype.imul=function imul(e){return this.clone().mulTo(e,this)},BN.prototype.imuln=function imuln(e){assert("number"==typeof e),assert(e<67108864);for(var a=0,g=0;g<this.length;g++){var t=(0|this.words[g])*e,B=(67108863&t)+(67108863&a);a>>=26,a+=t/67108864|0,a+=B>>>26,this.words[g]=67108863&B}return 0!==a&&(this.words[g]=a,this.length++),this},BN.prototype.muln=function muln(e){return this.clone().imuln(e)},BN.prototype.sqr=function sqr(){return this.mul(this)},BN.prototype.isqr=function isqr(){return this.imul(this.clone())},BN.prototype.pow=function pow(e){var a=function toBitArray(e){for(var a=new Array(e.bitLength()),g=0;g<a.length;g++){var t=g/26|0,B=g%26;a[g]=(e.words[t]&1<<B)>>>B}return a}(e);if(0===a.length)return new BN(1);for(var g=this,t=0;t<a.length&&0===a[t];t++,g=g.sqr());if(++t<a.length)for(var B=g.sqr();t<a.length;t++,B=B.sqr())0!==a[t]&&(g=g.mul(B));return g},BN.prototype.iushln=function iushln(e){assert("number"==typeof e&&e>=0);var a,g=e%26,t=(e-g)/26,B=67108863>>>26-g<<26-g;if(0!==g){var o=0;for(a=0;a<this.length;a++){var I=this.words[a]&B,c=(0|this.words[a])-I<<g;this.words[a]=c|o,o=I>>>26-g}o&&(this.words[a]=o,this.length++)}if(0!==t){for(a=this.length-1;a>=0;a--)this.words[a+t]=this.words[a];for(a=0;a<t;a++)this.words[a]=0;this.length+=t}return this.strip()},BN.prototype.ishln=function ishln(e){return assert(0===this.negative),this.iushln(e)},BN.prototype.iushrn=function iushrn(e,a,g){var t;assert("number"==typeof e&&e>=0),t=a?(a-a%26)/26:0;var B=e%26,o=Math.min((e-B)/26,this.length),I=67108863^67108863>>>B<<B,c=g;if(t-=o,t=Math.max(0,t),c){for(var r=0;r<o;r++)c.words[r]=this.words[r];c.length=o}if(0===o);else if(this.length>o)for(this.length-=o,r=0;r<this.length;r++)this.words[r]=this.words[r+o];else this.words[0]=0,this.length=1;var n=0;for(r=this.length-1;r>=0&&(0!==n||r>=t);r--){var d=0|this.words[r];this.words[r]=n<<26-B|d>>>B,n=d&I}return c&&0!==n&&(c.words[c.length++]=n),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},BN.prototype.ishrn=function ishrn(e,a,g){return assert(0===this.negative),this.iushrn(e,a,g)},BN.prototype.shln=function shln(e){return this.clone().ishln(e)},BN.prototype.ushln=function ushln(e){return this.clone().iushln(e)},BN.prototype.shrn=function shrn(e){return this.clone().ishrn(e)},BN.prototype.ushrn=function ushrn(e){return this.clone().iushrn(e)},BN.prototype.testn=function testn(e){assert("number"==typeof e&&e>=0);var a=e%26,g=(e-a)/26,t=1<<a;return!(this.length<=g)&&!!(this.words[g]&t)},BN.prototype.imaskn=function imaskn(e){assert("number"==typeof e&&e>=0);var a=e%26,g=(e-a)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=g)return this;if(0!==a&&g++,this.length=Math.min(g,this.length),0!==a){var t=67108863^67108863>>>a<<a;this.words[this.length-1]&=t}return this.strip()},BN.prototype.maskn=function maskn(e){return this.clone().imaskn(e)},BN.prototype.iaddn=function iaddn(e){return assert("number"==typeof e),assert(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)},BN.prototype._iaddn=function _iaddn(e){this.words[0]+=e;for(var a=0;a<this.length&&this.words[a]>=67108864;a++)this.words[a]-=67108864,a===this.length-1?this.words[a+1]=1:this.words[a+1]++;return this.length=Math.max(this.length,a+1),this},BN.prototype.isubn=function isubn(e){if(assert("number"==typeof e),assert(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 a=0;a<this.length&&this.words[a]<0;a++)this.words[a]+=67108864,this.words[a+1]-=1;return this.strip()},BN.prototype.addn=function addn(e){return this.clone().iaddn(e)},BN.prototype.subn=function subn(e){return this.clone().isubn(e)},BN.prototype.iabs=function iabs(){return this.negative=0,this},BN.prototype.abs=function abs(){return this.clone().iabs()},BN.prototype._ishlnsubmul=function _ishlnsubmul(e,a,g){var t,B,o=e.length+g;this._expand(o);var I=0;for(t=0;t<e.length;t++){B=(0|this.words[t+g])+I;var c=(0|e.words[t])*a;I=((B-=67108863&c)>>26)-(c/67108864|0),this.words[t+g]=67108863&B}for(;t<this.length-g;t++)I=(B=(0|this.words[t+g])+I)>>26,this.words[t+g]=67108863&B;if(0===I)return this.strip();for(assert(-1===I),I=0,t=0;t<this.length;t++)I=(B=-(0|this.words[t])+I)>>26,this.words[t]=67108863&B;return this.negative=1,this.strip()},BN.prototype._wordDiv=function _wordDiv(e,a){var g=(this.length,e.length),t=this.clone(),B=e,o=0|B.words[B.length-1];0!==(g=26-this._countBits(o))&&(B=B.ushln(g),t.iushln(g),o=0|B.words[B.length-1]);var I,c=t.length-B.length;if("mod"!==a){(I=new BN(null)).length=c+1,I.words=new Array(I.length);for(var r=0;r<I.length;r++)I.words[r]=0}var n=t.clone()._ishlnsubmul(B,1,c);0===n.negative&&(t=n,I&&(I.words[c]=1));for(var d=c-1;d>=0;d--){var Q=67108864*(0|t.words[B.length+d])+(0|t.words[B.length+d-1]);for(Q=Math.min(Q/o|0,67108863),t._ishlnsubmul(B,Q,d);0!==t.negative;)Q--,t.negative=0,t._ishlnsubmul(B,1,d),t.isZero()||(t.negative^=1);I&&(I.words[d]=Q)}return I&&I.strip(),t.strip(),"div"!==a&&0!==g&&t.iushrn(g),{div:I||null,mod:t}},BN.prototype.divmod=function divmod(e,a,g){return assert(!e.isZero()),this.isZero()?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===e.negative?(o=this.neg().divmod(e,a),"mod"!==a&&(t=o.div.neg()),"div"!==a&&(B=o.mod.neg(),g&&0!==B.negative&&B.iadd(e)),{div:t,mod:B}):0===this.negative&&0!==e.negative?(o=this.divmod(e.neg(),a),"mod"!==a&&(t=o.div.neg()),{div:t,mod:o.mod}):0!=(this.negative&e.negative)?(o=this.neg().divmod(e.neg(),a),"div"!==a&&(B=o.mod.neg(),g&&0!==B.negative&&B.isub(e)),{div:o.div,mod:B}):e.length>this.length||this.cmp(e)<0?{div:new BN(0),mod:this}:1===e.length?"div"===a?{div:this.divn(e.words[0]),mod:null}:"mod"===a?{div:null,mod:new BN(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new BN(this.modn(e.words[0]))}:this._wordDiv(e,a);var t,B,o},BN.prototype.div=function div(e){return this.divmod(e,"div",!1).div},BN.prototype.mod=function mod(e){return this.divmod(e,"mod",!1).mod},BN.prototype.umod=function umod(e){return this.divmod(e,"mod",!0).mod},BN.prototype.divRound=function divRound(e){var a=this.divmod(e);if(a.mod.isZero())return a.div;var g=0!==a.div.negative?a.mod.isub(e):a.mod,t=e.ushrn(1),B=e.andln(1),o=g.cmp(t);return o<0||1===B&&0===o?a.div:0!==a.div.negative?a.div.isubn(1):a.div.iaddn(1)},BN.prototype.modn=function modn(e){assert(e<=67108863);for(var a=(1<<26)%e,g=0,t=this.length-1;t>=0;t--)g=(a*g+(0|this.words[t]))%e;return g},BN.prototype.idivn=function idivn(e){assert(e<=67108863);for(var a=0,g=this.length-1;g>=0;g--){var t=(0|this.words[g])+67108864*a;this.words[g]=t/e|0,a=t%e}return this.strip()},BN.prototype.divn=function divn(e){return this.clone().idivn(e)},BN.prototype.egcd=function egcd(e){assert(0===e.negative),assert(!e.isZero());var a=this,g=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var t=new BN(1),B=new BN(0),o=new BN(0),I=new BN(1),c=0;a.isEven()&&g.isEven();)a.iushrn(1),g.iushrn(1),++c;for(var r=g.clone(),n=a.clone();!a.isZero();){for(var d=0,Q=1;0==(a.words[0]&Q)&&d<26;++d,Q<<=1);if(d>0)for(a.iushrn(d);d-- >0;)(t.isOdd()||B.isOdd())&&(t.iadd(r),B.isub(n)),t.iushrn(1),B.iushrn(1);for(var C=0,E=1;0==(g.words[0]&E)&&C<26;++C,E<<=1);if(C>0)for(g.iushrn(C);C-- >0;)(o.isOdd()||I.isOdd())&&(o.iadd(r),I.isub(n)),o.iushrn(1),I.iushrn(1);a.cmp(g)>=0?(a.isub(g),t.isub(o),B.isub(I)):(g.isub(a),o.isub(t),I.isub(B))}return{a:o,b:I,gcd:g.iushln(c)}},BN.prototype._invmp=function _invmp(e){assert(0===e.negative),assert(!e.isZero());var a=this,g=e.clone();a=0!==a.negative?a.umod(e):a.clone();for(var t,B=new BN(1),o=new BN(0),I=g.clone();a.cmpn(1)>0&&g.cmpn(1)>0;){for(var c=0,r=1;0==(a.words[0]&r)&&c<26;++c,r<<=1);if(c>0)for(a.iushrn(c);c-- >0;)B.isOdd()&&B.iadd(I),B.iushrn(1);for(var n=0,d=1;0==(g.words[0]&d)&&n<26;++n,d<<=1);if(n>0)for(g.iushrn(n);n-- >0;)o.isOdd()&&o.iadd(I),o.iushrn(1);a.cmp(g)>=0?(a.isub(g),B.isub(o)):(g.isub(a),o.isub(B))}return(t=0===a.cmpn(1)?B:o).cmpn(0)<0&&t.iadd(e),t},BN.prototype.gcd=function gcd(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),g=e.clone();a.negative=0,g.negative=0;for(var t=0;a.isEven()&&g.isEven();t++)a.iushrn(1),g.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;g.isEven();)g.iushrn(1);var B=a.cmp(g);if(B<0){var o=a;a=g,g=o}else if(0===B||0===g.cmpn(1))break;a.isub(g)}return g.iushln(t)},BN.prototype.invm=function invm(e){return this.egcd(e).a.umod(e)},BN.prototype.isEven=function isEven(){return 0==(1&this.words[0])},BN.prototype.isOdd=function isOdd(){return 1==(1&this.words[0])},BN.prototype.andln=function andln(e){return this.words[0]&e},BN.prototype.bincn=function bincn(e){assert("number"==typeof e);var a=e%26,g=(e-a)/26,t=1<<a;if(this.length<=g)return this._expand(g+1),this.words[g]|=t,this;for(var B=t,o=g;0!==B&&o<this.length;o++){var I=0|this.words[o];B=(I+=B)>>>26,I&=67108863,this.words[o]=I}return 0!==B&&(this.words[o]=B,this.length++),this},BN.prototype.isZero=function isZero(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function cmpn(e){var a,g=e<0;if(0!==this.negative&&!g)return-1;if(0===this.negative&&g)return 1;if(this.strip(),this.length>1)a=1;else{g&&(e=-e),assert(e<=67108863,"Number is too big");var t=0|this.words[0];a=t===e?0:t<e?-1:1}return 0!==this.negative?0|-a:a},BN.prototype.cmp=function cmp(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var a=this.ucmp(e);return 0!==this.negative?0|-a:a},BN.prototype.ucmp=function ucmp(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var a=0,g=this.length-1;g>=0;g--){var t=0|this.words[g],B=0|e.words[g];if(t!==B){t<B?a=-1:t>B&&(a=1);break}}return a},BN.prototype.gtn=function gtn(e){return 1===this.cmpn(e)},BN.prototype.gt=function gt(e){return 1===this.cmp(e)},BN.prototype.gten=function gten(e){return this.cmpn(e)>=0},BN.prototype.gte=function gte(e){return this.cmp(e)>=0},BN.prototype.ltn=function ltn(e){return-1===this.cmpn(e)},BN.prototype.lt=function lt(e){return-1===this.cmp(e)},BN.prototype.lten=function lten(e){return this.cmpn(e)<=0},BN.prototype.lte=function lte(e){return this.cmp(e)<=0},BN.prototype.eqn=function eqn(e){return 0===this.cmpn(e)},BN.prototype.eq=function eq(e){return 0===this.cmp(e)},BN.red=function red(e){return new Red(e)},BN.prototype.toRed=function toRed(e){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},BN.prototype.fromRed=function fromRed(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function _forceRed(e){return this.red=e,this},BN.prototype.forceRed=function forceRed(e){return assert(!this.red,"Already a number in reduction context"),this._forceRed(e)},BN.prototype.redAdd=function redAdd(e){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},BN.prototype.redIAdd=function redIAdd(e){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},BN.prototype.redSub=function redSub(e){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},BN.prototype.redISub=function redISub(e){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},BN.prototype.redShl=function redShl(e){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},BN.prototype.redMul=function redMul(e){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},BN.prototype.redIMul=function redIMul(e){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},BN.prototype.redSqr=function redSqr(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function redISqr(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function redSqrt(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function redInvm(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function redNeg(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function redPow(e){return assert(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var r={k256:null,p224:null,p192:null,p25519:null};function MPrime(e,a){this.name=e,this.p=new BN(a,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(e){if("string"==typeof e){var a=BN._prime(e);this.m=a.p,this.prime=a}else assert(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function Mont(e){Red.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function _tmp(){var e=new BN(null);return e.words=new Array(Math.ceil(this.n/13)),e},MPrime.prototype.ireduce=function ireduce(e){var a,g=e;do{this.split(g,this.tmp),a=(g=(g=this.imulK(g)).iadd(this.tmp)).bitLength()}while(a>this.n);var t=a<this.n?-1:g.ucmp(this.p);return 0===t?(g.words[0]=0,g.length=1):t>0?g.isub(this.p):void 0!==g.strip?g.strip():g._strip(),g},MPrime.prototype.split=function split(e,a){e.iushrn(this.n,0,a)},MPrime.prototype.imulK=function imulK(e){return e.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function split(e,a){for(var g=4194303,t=Math.min(e.length,9),B=0;B<t;B++)a.words[B]=e.words[B];if(a.length=t,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(a.words[a.length++]=o&g,B=10;B<e.length;B++){var I=0|e.words[B];e.words[B-10]=(I&g)<<4|o>>>22,o=I}o>>>=22,e.words[B-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},K256.prototype.imulK=function imulK(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var a=0,g=0;g<e.length;g++){var t=0|e.words[g];a+=977*t,e.words[g]=67108863&a,a=64*t+(a/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},inherits(P224,MPrime),inherits(P192,MPrime),inherits(P25519,MPrime),P25519.prototype.imulK=function imulK(e){for(var a=0,g=0;g<e.length;g++){var t=19*(0|e.words[g])+a,B=67108863&t;t>>>=26,e.words[g]=B,a=t}return 0!==a&&(e.words[e.length++]=a),e},BN._prime=function prime(e){if(r[e])return r[e];var prime;if("k256"===e)prime=new K256;else if("p224"===e)prime=new P224;else if("p192"===e)prime=new P192;else{if("p25519"!==e)throw new Error("Unknown prime "+e);prime=new P25519}return r[e]=prime,prime},Red.prototype._verify1=function _verify1(e){assert(0===e.negative,"red works only with positives"),assert(e.red,"red works only with red numbers")},Red.prototype._verify2=function _verify2(e,a){assert(0==(e.negative|a.negative),"red works only with positives"),assert(e.red&&e.red===a.red,"red works only with red numbers")},Red.prototype.imod=function imod(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},Red.prototype.neg=function neg(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},Red.prototype.add=function add(e,a){this._verify2(e,a);var g=e.add(a);return g.cmp(this.m)>=0&&g.isub(this.m),g._forceRed(this)},Red.prototype.iadd=function iadd(e,a){this._verify2(e,a);var g=e.iadd(a);return g.cmp(this.m)>=0&&g.isub(this.m),g},Red.prototype.sub=function sub(e,a){this._verify2(e,a);var g=e.sub(a);return g.cmpn(0)<0&&g.iadd(this.m),g._forceRed(this)},Red.prototype.isub=function isub(e,a){this._verify2(e,a);var g=e.isub(a);return g.cmpn(0)<0&&g.iadd(this.m),g},Red.prototype.shl=function shl(e,a){return this._verify1(e),this.imod(e.ushln(a))},Red.prototype.imul=function imul(e,a){return this._verify2(e,a),this.imod(e.imul(a))},Red.prototype.mul=function mul(e,a){return this._verify2(e,a),this.imod(e.mul(a))},Red.prototype.isqr=function isqr(e){return this.imul(e,e.clone())},Red.prototype.sqr=function sqr(e){return this.mul(e,e)},Red.prototype.sqrt=function sqrt(e){if(e.isZero())return e.clone();var a=this.m.andln(3);if(assert(a%2==1),3===a){var g=this.m.add(new BN(1)).iushrn(2);return this.pow(e,g)}for(var t=this.m.subn(1),B=0;!t.isZero()&&0===t.andln(1);)B++,t.iushrn(1);assert(!t.isZero());var o=new BN(1).toRed(this),I=o.redNeg(),c=this.m.subn(1).iushrn(1),r=this.m.bitLength();for(r=new BN(2*r*r).toRed(this);0!==this.pow(r,c).cmp(I);)r.redIAdd(I);for(var n=this.pow(r,t),d=this.pow(e,t.addn(1).iushrn(1)),Q=this.pow(e,t),C=B;0!==Q.cmp(o);){for(var E=Q,s=0;0!==E.cmp(o);s++)E=E.redSqr();assert(s<C);var b=this.pow(n,new BN(1).iushln(C-s-1));d=d.redMul(b),n=b.redSqr(),Q=Q.redMul(n),C=s}return d},Red.prototype.invm=function invm(e){var a=e._invmp(this.m);return 0!==a.negative?(a.negative=0,this.imod(a).redNeg()):this.imod(a)},Red.prototype.pow=function pow(e,a){if(a.isZero())return new BN(1).toRed(this);if(0===a.cmpn(1))return e.clone();var g=new Array(16);g[0]=new BN(1).toRed(this),g[1]=e;for(var t=2;t<g.length;t++)g[t]=this.mul(g[t-1],e);var B=g[0],o=0,I=0,c=a.bitLength()%26;for(0===c&&(c=26),t=a.length-1;t>=0;t--){for(var r=a.words[t],n=c-1;n>=0;n--){var d=r>>n&1;B!==g[0]&&(B=this.sqr(B)),0!==d||0!==o?(o<<=1,o|=d,(4===++I||0===t&&0===n)&&(B=this.mul(B,g[o]),I=0,o=0)):I=0}c=26}return B},Red.prototype.convertTo=function convertTo(e){var a=e.umod(this.m);return a===e?a.clone():a},Red.prototype.convertFrom=function convertFrom(e){var a=e.clone();return a.red=null,a},BN.mont=function mont(e){return new Mont(e)},inherits(Mont,Red),Mont.prototype.convertTo=function convertTo(e){return this.imod(e.ushln(this.shift))},Mont.prototype.convertFrom=function convertFrom(e){var a=this.imod(e.mul(this.rinv));return a.red=null,a},Mont.prototype.imul=function imul(e,a){if(e.isZero()||a.isZero())return e.words[0]=0,e.length=1,e;var g=e.imul(a),t=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=g.isub(t).iushrn(this.shift),o=B;return B.cmp(this.m)>=0?o=B.isub(this.m):B.cmpn(0)<0&&(o=B.iadd(this.m)),o._forceRed(this)},Mont.prototype.mul=function mul(e,a){if(e.isZero()||a.isZero())return new BN(0)._forceRed(this);var g=e.mul(a),t=g.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=g.isub(t).iushrn(this.shift),o=B;return B.cmp(this.m)>=0?o=B.isub(this.m):B.cmpn(0)<0&&(o=B.iadd(this.m)),o._forceRed(this)},Mont.prototype.invm=function invm(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=g.nmd(e),this)},(e,a,g)=>{try{var t=g(6);if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(a){e.exports=g(281)}},,function(e,a,g){"use strict";var t=this&&this.__createBinding||(Object.create?function(e,a,g,t){void 0===t&&(t=g);var B=Object.getOwnPropertyDescriptor(a,g);B&&!("get"in B?!a.__esModule:B.writable||B.configurable)||(B={enumerable:!0,get:function(){return a[g]}}),Object.defineProperty(e,t,B)}:function(e,a,g,t){void 0===t&&(t=g),e[t]=a[g]}),B=this&&this.__exportStar||function(e,a){for(var g in e)"default"===g||Object.prototype.hasOwnProperty.call(a,g)||t(a,e,g)};Object.defineProperty(a,"__esModule",{value:!0}),B(g(667),a),B(g(91),a),B(g(718),a),B(g(361),a)},(e,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),a.EvmError=a.ERROR=void 0,function(e){e.OUT_OF_GAS="out of gas",e.CODESTORE_OUT_OF_GAS="code store out of gas",e.CODESIZE_EXCEEDS_MAXIMUM="code size to deposit exceeds maximum code size",e.STACK_UNDERFLOW="stack underflow",e.STACK_OVERFLOW="stack overflow",e.INVALID_JUMP="invalid JUMP",e.INVALID_OPCODE="invalid opcode",e.OUT_OF_RANGE="value out of range",e.REVERT="revert",e.STATIC_STATE_CHANGE="static state change",e.INTERNAL_ERROR="internal error",e.CREATE_COLLISION="create collision",e.STOP="stop",e.REFUND_EXHAUSTED="refund exhausted",e.VALUE_OVERFLOW="value overflow",e.INSUFFICIENT_BALANCE="insufficient balance",e.INVALID_BEGINSUB="invalid BEGINSUB",e.INVALID_RETURNSUB="invalid RETURNSUB",e.INVALID_JUMPSUB="invalid JUMPSUB",e.INVALID_BYTECODE_RESULT="invalid bytecode deployed",e.INVALID_EOF_FORMAT="invalid EOF format",e.INITCODE_SIZE_VIOLATION="initcode exceeds max initcode size",e.AUTHCALL_UNSET="attempting to AUTHCALL without AUTH set",e.AUTHCALL_NONZERO_VALUEEXT="attempting to execute AUTHCALL with nonzero external value",e.AUTH_INVALID_S="invalid Signature: s-values greater than secp256k1n/2 are considered invalid",e.BLS_12_381_INVALID_INPUT_LENGTH="invalid input length",e.BLS_12_381_POINT_NOT_ON_CURVE="point not on curve",e.BLS_12_381_INPUT_EMPTY="input is empty",e.BLS_12_381_FP_NOT_IN_FIELD="fp point not in field",e.POINT_GREATER_THAN_BLS_MODULUS="point greater than BLS modulus",e.INVALID_COMMITMENT="kzg commitment does not match versioned hash"}(a.ERROR||(a.ERROR={}));a.EvmError=class EvmError{constructor(e){this.error=e,this.errorType="EvmErro