var HME=function(A){var B={};function Q(g){if(B[g])return B[g].exports;var I=B[g]={i:g,l:!1,exports:{}};return A[g].call(I.exports,I,I.exports,Q),I.l=!0,I.exports}return Q.m=A,Q.c=B,Q.d=function(A,B,g){Q.o(A,B)||Object.defineProperty(A,B,{enumerable:!0,get:g})},Q.r=function(A){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(A,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(A,"__esModule",{value:!0})},Q.t=function(A,B){if(1&B&&(A=Q(A)),8&B)return A;if(4&B&&"object"==typeof A&&A&&A.__esModule)return A;var g=Object.create(null);if(Q.r(g),Object.defineProperty(g,"default",{enumerable:!0,value:A}),2&B&&"string"!=typeof A)for(var I in A)Q.d(g,I,function(B){return A[B]}.bind(null,I));return g},Q.n=function(A){var B=A&&A.__esModule?function(){return A.default}:function(){return A};return Q.d(B,"a",B),B},Q.o=function(A,B){return Object.prototype.hasOwnProperty.call(A,B)},Q.p="",Q(Q.s=101)}([function(A,B){"function"==typeof Object.create?A.exports=function(A,B){B&&(A.super_=B,A.prototype=Object.create(B.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}))}:A.exports=function(A,B){if(B){A.super_=B;var Q=function(){};Q.prototype=B.prototype,A.prototype=new Q,A.prototype.constructor=A}}},function(A,B,Q){var g=Q(2),I=g.Buffer;function E(A,B){for(var Q in A)B[Q]=A[Q]}function i(A,B,Q){return I(A,B,Q)}I.from&&I.alloc&&I.allocUnsafe&&I.allocUnsafeSlow?A.exports=g:(E(g,B),B.Buffer=i),E(I,i),i.from=function(A,B,Q){if("number"==typeof A)throw new TypeError("Argument must not be a number");return I(A,B,Q)},i.alloc=function(A,B,Q){if("number"!=typeof A)throw new TypeError("Argument must be a number");var g=I(A);return void 0!==B?"string"==typeof Q?g.fill(B,Q):g.fill(B):g.fill(0),g},i.allocUnsafe=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return I(A)},i.allocUnsafeSlow=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return g.SlowBuffer(A)}},function(A,B,Q){"use strict";(function(A){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var g=Q(102),I=Q(103),E=Q(48);function i(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function C(A,B){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|A}function n(A,B){if(t.isBuffer(A))return A.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(A)||A instanceof ArrayBuffer))return A.byteLength;"string"!=typeof A&&(A=""+A);var Q=A.length;if(0===Q)return 0;for(var g=!1;;)switch(B){case"ascii":case"latin1":case"binary":return Q;case"utf8":case"utf-8":case void 0:return V(A).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Q;case"hex":return Q>>>1;case"base64":return K(A).length;default:if(g)return V(A).length;B=(""+B).toLowerCase(),g=!0}}function a(A,B,Q){var g=!1;if((void 0===B||B<0)&&(B=0),B>this.length)return"";if((void 0===Q||Q>this.length)&&(Q=this.length),Q<=0)return"";if((Q>>>=0)<=(B>>>=0))return"";for(A||(A="utf8");;)switch(A){case"hex":return Y(this,B,Q);case"utf8":case"utf-8":return N(this,B,Q);case"ascii":return H(this,B,Q);case"latin1":case"binary":return G(this,B,Q);case"base64":return U(this,B,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,B,Q);default:if(g)throw new TypeError("Unknown encoding: "+A);A=(A+"").toLowerCase(),g=!0}}function c(A,B,Q){var g=A[B];A[B]=A[Q],A[Q]=g}function y(A,B,Q,g,I){if(0===A.length)return-1;if("string"==typeof Q?(g=Q,Q=0):Q>2147483647?Q=2147483647:Q<-2147483648&&(Q=-2147483648),Q=+Q,isNaN(Q)&&(Q=I?0:A.length-1),Q<0&&(Q=A.length+Q),Q>=A.length){if(I)return-1;Q=A.length-1}else if(Q<0){if(!I)return-1;Q=0}if("string"==typeof B&&(B=t.from(B,g)),t.isBuffer(B))return 0===B.length?-1:D(A,B,Q,g,I);if("number"==typeof B)return B&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?I?Uint8Array.prototype.indexOf.call(A,B,Q):Uint8Array.prototype.lastIndexOf.call(A,B,Q):D(A,[B],Q,g,I);throw new TypeError("val must be string, number or Buffer")}function D(A,B,Q,g,I){var E,i=1,C=A.length,t=B.length;if(void 0!==g&&("ucs2"===(g=String(g).toLowerCase())||"ucs-2"===g||"utf16le"===g||"utf-16le"===g)){if(A.length<2||B.length<2)return-1;i=2,C/=2,t/=2,Q/=2}function e(A,B){return 1===i?A[B]:A.readUInt16BE(B*i)}if(I){var o=-1;for(E=Q;EC&&(Q=C-t),E=Q;E>=0;E--){for(var s=!0,r=0;rI&&(g=I):g=I;var E=B.length;if(E%2!=0)throw new TypeError("Invalid hex string");g>E/2&&(g=E/2);for(var i=0;i>8,I=Q%256,E.push(I),E.push(g);return E}(B,A.length-Q),A,Q,g)}function U(A,B,Q){return 0===B&&Q===A.length?g.fromByteArray(A):g.fromByteArray(A.slice(B,Q))}function N(A,B,Q){Q=Math.min(A.length,Q);for(var g=[],I=B;I239?4:e>223?3:e>191?2:1;if(I+s<=Q)switch(s){case 1:e<128&&(o=e);break;case 2:128==(192&(E=A[I+1]))&&(t=(31&e)<<6|63&E)>127&&(o=t);break;case 3:E=A[I+1],i=A[I+2],128==(192&E)&&128==(192&i)&&(t=(15&e)<<12|(63&E)<<6|63&i)>2047&&(t<55296||t>57343)&&(o=t);break;case 4:E=A[I+1],i=A[I+2],C=A[I+3],128==(192&E)&&128==(192&i)&&128==(192&C)&&(t=(15&e)<<18|(63&E)<<12|(63&i)<<6|63&C)>65535&&t<1114112&&(o=t)}null===o?(o=65533,s=1):o>65535&&(o-=65536,g.push(o>>>10&1023|55296),o=56320|1023&o),g.push(o),I+=s}return function(A){var B=A.length;if(B<=4096)return String.fromCharCode.apply(String,A);var Q="",g=0;for(;g0&&(A=this.toString("hex",0,Q).match(/.{2}/g).join(" "),this.length>Q&&(A+=" ... ")),""},t.prototype.compare=function(A,B,Q,g,I){if(!t.isBuffer(A))throw new TypeError("Argument must be a Buffer");if(void 0===B&&(B=0),void 0===Q&&(Q=A?A.length:0),void 0===g&&(g=0),void 0===I&&(I=this.length),B<0||Q>A.length||g<0||I>this.length)throw new RangeError("out of range index");if(g>=I&&B>=Q)return 0;if(g>=I)return-1;if(B>=Q)return 1;if(this===A)return 0;for(var E=(I>>>=0)-(g>>>=0),i=(Q>>>=0)-(B>>>=0),C=Math.min(E,i),e=this.slice(g,I),o=A.slice(B,Q),s=0;sI)&&(Q=I),A.length>0&&(Q<0||B<0)||B>this.length)throw new RangeError("Attempt to write outside buffer bounds");g||(g="utf8");for(var E=!1;;)switch(g){case"hex":return u(this,A,B,Q);case"utf8":case"utf-8":return f(this,A,B,Q);case"ascii":return w(this,A,B,Q);case"latin1":case"binary":return F(this,A,B,Q);case"base64":return d(this,A,B,Q);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return l(this,A,B,Q);default:if(E)throw new TypeError("Unknown encoding: "+g);g=(""+g).toLowerCase(),E=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(A,B,Q){var g="";Q=Math.min(A.length,Q);for(var I=B;Ig)&&(Q=g);for(var I="",E=B;EQ)throw new RangeError("Trying to access beyond buffer length")}function p(A,B,Q,g,I,E){if(!t.isBuffer(A))throw new TypeError('"buffer" argument must be a Buffer instance');if(B>I||BA.length)throw new RangeError("Index out of range")}function M(A,B,Q,g){B<0&&(B=65535+B+1);for(var I=0,E=Math.min(A.length-Q,2);I>>8*(g?I:1-I)}function m(A,B,Q,g){B<0&&(B=4294967295+B+1);for(var I=0,E=Math.min(A.length-Q,4);I>>8*(g?I:3-I)&255}function k(A,B,Q,g,I,E){if(Q+g>A.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("Index out of range")}function S(A,B,Q,g,E){return E||k(A,0,Q,4),I.write(A,B,Q,g,23,4),Q+4}function b(A,B,Q,g,E){return E||k(A,0,Q,8),I.write(A,B,Q,g,52,8),Q+8}t.prototype.slice=function(A,B){var Q,g=this.length;if((A=~~A)<0?(A+=g)<0&&(A=0):A>g&&(A=g),(B=void 0===B?g:~~B)<0?(B+=g)<0&&(B=0):B>g&&(B=g),B0&&(I*=256);)g+=this[A+--B]*I;return g},t.prototype.readUInt8=function(A,B){return B||R(A,1,this.length),this[A]},t.prototype.readUInt16LE=function(A,B){return B||R(A,2,this.length),this[A]|this[A+1]<<8},t.prototype.readUInt16BE=function(A,B){return B||R(A,2,this.length),this[A]<<8|this[A+1]},t.prototype.readUInt32LE=function(A,B){return B||R(A,4,this.length),(this[A]|this[A+1]<<8|this[A+2]<<16)+16777216*this[A+3]},t.prototype.readUInt32BE=function(A,B){return B||R(A,4,this.length),16777216*this[A]+(this[A+1]<<16|this[A+2]<<8|this[A+3])},t.prototype.readIntLE=function(A,B,Q){A|=0,B|=0,Q||R(A,B,this.length);for(var g=this[A],I=1,E=0;++E=(I*=128)&&(g-=Math.pow(2,8*B)),g},t.prototype.readIntBE=function(A,B,Q){A|=0,B|=0,Q||R(A,B,this.length);for(var g=B,I=1,E=this[A+--g];g>0&&(I*=256);)E+=this[A+--g]*I;return E>=(I*=128)&&(E-=Math.pow(2,8*B)),E},t.prototype.readInt8=function(A,B){return B||R(A,1,this.length),128&this[A]?-1*(255-this[A]+1):this[A]},t.prototype.readInt16LE=function(A,B){B||R(A,2,this.length);var Q=this[A]|this[A+1]<<8;return 32768&Q?4294901760|Q:Q},t.prototype.readInt16BE=function(A,B){B||R(A,2,this.length);var Q=this[A+1]|this[A]<<8;return 32768&Q?4294901760|Q:Q},t.prototype.readInt32LE=function(A,B){return B||R(A,4,this.length),this[A]|this[A+1]<<8|this[A+2]<<16|this[A+3]<<24},t.prototype.readInt32BE=function(A,B){return B||R(A,4,this.length),this[A]<<24|this[A+1]<<16|this[A+2]<<8|this[A+3]},t.prototype.readFloatLE=function(A,B){return B||R(A,4,this.length),I.read(this,A,!0,23,4)},t.prototype.readFloatBE=function(A,B){return B||R(A,4,this.length),I.read(this,A,!1,23,4)},t.prototype.readDoubleLE=function(A,B){return B||R(A,8,this.length),I.read(this,A,!0,52,8)},t.prototype.readDoubleBE=function(A,B){return B||R(A,8,this.length),I.read(this,A,!1,52,8)},t.prototype.writeUIntLE=function(A,B,Q,g){(A=+A,B|=0,Q|=0,g)||p(this,A,B,Q,Math.pow(2,8*Q)-1,0);var I=1,E=0;for(this[B]=255&A;++E=0&&(E*=256);)this[B+I]=A/E&255;return B+Q},t.prototype.writeUInt8=function(A,B,Q){return A=+A,B|=0,Q||p(this,A,B,1,255,0),t.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),this[B]=255&A,B+1},t.prototype.writeUInt16LE=function(A,B,Q){return A=+A,B|=0,Q||p(this,A,B,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[B]=255&A,this[B+1]=A>>>8):M(this,A,B,!0),B+2},t.prototype.writeUInt16BE=function(A,B,Q){return A=+A,B|=0,Q||p(this,A,B,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[B]=A>>>8,this[B+1]=255&A):M(this,A,B,!1),B+2},t.prototype.writeUInt32LE=function(A,B,Q){return A=+A,B|=0,Q||p(this,A,B,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[B+3]=A>>>24,this[B+2]=A>>>16,this[B+1]=A>>>8,this[B]=255&A):m(this,A,B,!0),B+4},t.prototype.writeUInt32BE=function(A,B,Q){return A=+A,B|=0,Q||p(this,A,B,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[B]=A>>>24,this[B+1]=A>>>16,this[B+2]=A>>>8,this[B+3]=255&A):m(this,A,B,!1),B+4},t.prototype.writeIntLE=function(A,B,Q,g){if(A=+A,B|=0,!g){var I=Math.pow(2,8*Q-1);p(this,A,B,Q,I-1,-I)}var E=0,i=1,C=0;for(this[B]=255&A;++E>0)-C&255;return B+Q},t.prototype.writeIntBE=function(A,B,Q,g){if(A=+A,B|=0,!g){var I=Math.pow(2,8*Q-1);p(this,A,B,Q,I-1,-I)}var E=Q-1,i=1,C=0;for(this[B+E]=255&A;--E>=0&&(i*=256);)A<0&&0===C&&0!==this[B+E+1]&&(C=1),this[B+E]=(A/i>>0)-C&255;return B+Q},t.prototype.writeInt8=function(A,B,Q){return A=+A,B|=0,Q||p(this,A,B,1,127,-128),t.TYPED_ARRAY_SUPPORT||(A=Math.floor(A)),A<0&&(A=255+A+1),this[B]=255&A,B+1},t.prototype.writeInt16LE=function(A,B,Q){return A=+A,B|=0,Q||p(this,A,B,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[B]=255&A,this[B+1]=A>>>8):M(this,A,B,!0),B+2},t.prototype.writeInt16BE=function(A,B,Q){return A=+A,B|=0,Q||p(this,A,B,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[B]=A>>>8,this[B+1]=255&A):M(this,A,B,!1),B+2},t.prototype.writeInt32LE=function(A,B,Q){return A=+A,B|=0,Q||p(this,A,B,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[B]=255&A,this[B+1]=A>>>8,this[B+2]=A>>>16,this[B+3]=A>>>24):m(this,A,B,!0),B+4},t.prototype.writeInt32BE=function(A,B,Q){return A=+A,B|=0,Q||p(this,A,B,4,2147483647,-2147483648),A<0&&(A=4294967295+A+1),t.TYPED_ARRAY_SUPPORT?(this[B]=A>>>24,this[B+1]=A>>>16,this[B+2]=A>>>8,this[B+3]=255&A):m(this,A,B,!1),B+4},t.prototype.writeFloatLE=function(A,B,Q){return S(this,A,B,!0,Q)},t.prototype.writeFloatBE=function(A,B,Q){return S(this,A,B,!1,Q)},t.prototype.writeDoubleLE=function(A,B,Q){return b(this,A,B,!0,Q)},t.prototype.writeDoubleBE=function(A,B,Q){return b(this,A,B,!1,Q)},t.prototype.copy=function(A,B,Q,g){if(Q||(Q=0),g||0===g||(g=this.length),B>=A.length&&(B=A.length),B||(B=0),g>0&&g=this.length)throw new RangeError("sourceStart out of bounds");if(g<0)throw new RangeError("sourceEnd out of bounds");g>this.length&&(g=this.length),A.length-B=0;--I)A[I+B]=this[I+Q];else if(E<1e3||!t.TYPED_ARRAY_SUPPORT)for(I=0;I>>=0,Q=void 0===Q?this.length:Q>>>0,A||(A=0),"number"==typeof A)for(E=B;E55295&&Q<57344){if(!I){if(Q>56319){(B-=3)>-1&&E.push(239,191,189);continue}if(i+1===g){(B-=3)>-1&&E.push(239,191,189);continue}I=Q;continue}if(Q<56320){(B-=3)>-1&&E.push(239,191,189),I=Q;continue}Q=65536+(I-55296<<10|Q-56320)}else I&&(B-=3)>-1&&E.push(239,191,189);if(I=null,Q<128){if((B-=1)<0)break;E.push(Q)}else if(Q<2048){if((B-=2)<0)break;E.push(Q>>6|192,63&Q|128)}else if(Q<65536){if((B-=3)<0)break;E.push(Q>>12|224,Q>>6&63|128,63&Q|128)}else{if(!(Q<1114112))throw new Error("Invalid code point");if((B-=4)<0)break;E.push(Q>>18|240,Q>>12&63|128,Q>>6&63|128,63&Q|128)}}return E}function K(A){return g.toByteArray(function(A){if((A=function(A){return A.trim?A.trim():A.replace(/^\s+|\s+$/g,"")}(A).replace(v,"")).length<2)return"";for(;A.length%4!=0;)A+="=";return A}(A))}function x(A,B,Q,g){for(var I=0;I=B.length||I>=A.length);++I)B[I+Q]=A[I];return I}}).call(this,Q(4))},function(A,B){var Q,g,I=A.exports={};function E(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function C(A){if(Q===setTimeout)return setTimeout(A,0);if((Q===E||!Q)&&setTimeout)return Q=setTimeout,setTimeout(A,0);try{return Q(A,0)}catch(B){try{return Q.call(null,A,0)}catch(B){return Q.call(this,A,0)}}}!function(){try{Q="function"==typeof setTimeout?setTimeout:E}catch(A){Q=E}try{g="function"==typeof clearTimeout?clearTimeout:i}catch(A){g=i}}();var t,e=[],o=!1,s=-1;function r(){o&&t&&(o=!1,t.length?e=t.concat(e):s=-1,e.length&&h())}function h(){if(!o){var A=C(r);o=!0;for(var B=e.length;B;){for(t=e,e=[];++s1)for(var Q=1;Q(I>>1)-1?(I>>1)-t:t,E.isubn(C)):C=0,g[i]=C,E.iushrn(1)}return g},g.getJSF=function(A,B){var Q=[[],[]];A=A.clone(),B=B.clone();for(var g=0,I=0;A.cmpn(-g)>0||B.cmpn(-I)>0;){var E,i,C,t=A.andln(3)+g&3,e=B.andln(3)+I&3;if(3===t&&(t=-1),3===e&&(e=-1),0==(1&t))E=0;else E=3!==(C=A.andln(7)+g&7)&&5!==C||2!==e?t:-t;if(Q[0].push(E),0==(1&e))i=0;else i=3!==(C=B.andln(7)+I&7)&&5!==C||2!==t?e:-e;Q[1].push(i),2*g===E+1&&(g=1-g),2*I===i+1&&(I=1-I),A.iushrn(1),B.iushrn(1)}return Q},g.cachedProperty=function(A,B,Q){var g="_"+B;A.prototype[B]=function(){return void 0!==this[g]?this[g]:this[g]=Q.call(this)}},g.parseBytes=function(A){return"string"==typeof A?g.toArray(A,"hex"):A},g.intFromLE=function(A){return new I(A,"hex","le")}},function(A,B,Q){"use strict";var g=Q(5),I=Q(0);function E(A,B){return 55296==(64512&A.charCodeAt(B))&&(!(B<0||B+1>=A.length)&&56320==(64512&A.charCodeAt(B+1)))}function i(A){return(A>>>24|A>>>8&65280|A<<8&16711680|(255&A)<<24)>>>0}function C(A){return 1===A.length?"0"+A:A}function t(A){return 7===A.length?"0"+A:6===A.length?"00"+A:5===A.length?"000"+A:4===A.length?"0000"+A:3===A.length?"00000"+A:2===A.length?"000000"+A:1===A.length?"0000000"+A:A}B.inherits=I,B.toArray=function(A,B){if(Array.isArray(A))return A.slice();if(!A)return[];var Q=[];if("string"==typeof A)if(B){if("hex"===B)for((A=A.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(A="0"+A),I=0;I>6|192,Q[g++]=63&i|128):E(A,I)?(i=65536+((1023&i)<<10)+(1023&A.charCodeAt(++I)),Q[g++]=i>>18|240,Q[g++]=i>>12&63|128,Q[g++]=i>>6&63|128,Q[g++]=63&i|128):(Q[g++]=i>>12|224,Q[g++]=i>>6&63|128,Q[g++]=63&i|128)}else for(I=0;I>>0}return i},B.split32=function(A,B){for(var Q=new Array(4*A.length),g=0,I=0;g>>24,Q[I+1]=E>>>16&255,Q[I+2]=E>>>8&255,Q[I+3]=255&E):(Q[I+3]=E>>>24,Q[I+2]=E>>>16&255,Q[I+1]=E>>>8&255,Q[I]=255&E)}return Q},B.rotr32=function(A,B){return A>>>B|A<<32-B},B.rotl32=function(A,B){return A<>>32-B},B.sum32=function(A,B){return A+B>>>0},B.sum32_3=function(A,B,Q){return A+B+Q>>>0},B.sum32_4=function(A,B,Q,g){return A+B+Q+g>>>0},B.sum32_5=function(A,B,Q,g,I){return A+B+Q+g+I>>>0},B.sum64=function(A,B,Q,g){var I=A[B],E=g+A[B+1]>>>0,i=(E>>0,A[B+1]=E},B.sum64_hi=function(A,B,Q,g){return(B+g>>>0>>0},B.sum64_lo=function(A,B,Q,g){return B+g>>>0},B.sum64_4_hi=function(A,B,Q,g,I,E,i,C){var t=0,e=B;return t+=(e=e+g>>>0)>>0)>>0)>>0},B.sum64_4_lo=function(A,B,Q,g,I,E,i,C){return B+g+E+C>>>0},B.sum64_5_hi=function(A,B,Q,g,I,E,i,C,t,e){var o=0,s=B;return o+=(s=s+g>>>0)>>0)>>0)>>0)>>0},B.sum64_5_lo=function(A,B,Q,g,I,E,i,C,t,e){return B+g+E+C+e>>>0},B.rotr64_hi=function(A,B,Q){return(B<<32-Q|A>>>Q)>>>0},B.rotr64_lo=function(A,B,Q){return(A<<32-Q|B>>>Q)>>>0},B.shr64_hi=function(A,B,Q){return A>>>Q},B.shr64_lo=function(A,B,Q){return(A<<32-Q|B>>>Q)>>>0}},function(A,B,Q){(function(A){!function(A,B){"use strict";function g(A,B){if(!A)throw new Error(B||"Assertion failed")}function I(A,B){A.super_=B;var Q=function(){};Q.prototype=B.prototype,A.prototype=new Q,A.prototype.constructor=A}function E(A,B,Q){if(E.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,null!==A&&("le"!==B&&"be"!==B||(Q=B,B=10),this._init(A||0,B||10,Q||"be"))}var i;"object"==typeof A?A.exports=E:B.BN=E,E.BN=E,E.wordSize=26;try{i=Q(168).Buffer}catch(A){}function C(A,B,Q){for(var g=0,I=Math.min(A.length,Q),E=B;E=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return g}function t(A,B,Q,g){for(var I=0,E=Math.min(A.length,Q),i=B;i=49?C-49+10:C>=17?C-17+10:C}return I}E.isBN=function(A){return A instanceof E||null!==A&&"object"==typeof A&&A.constructor.wordSize===E.wordSize&&Array.isArray(A.words)},E.max=function(A,B){return A.cmp(B)>0?A:B},E.min=function(A,B){return A.cmp(B)<0?A:B},E.prototype._init=function(A,B,Q){if("number"==typeof A)return this._initNumber(A,B,Q);if("object"==typeof A)return this._initArray(A,B,Q);"hex"===B&&(B=16),g(B===(0|B)&&B>=2&&B<=36);var I=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&I++,16===B?this._parseHex(A,I):this._parseBase(A,B,I),"-"===A[0]&&(this.negative=1),this.strip(),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initNumber=function(A,B,Q){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[67108863&A],this.length=1):A<4503599627370496?(this.words=[67108863&A,A/67108864&67108863],this.length=2):(g(A<9007199254740992),this.words=[67108863&A,A/67108864&67108863,1],this.length=3),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initArray=function(A,B,Q){if(g("number"==typeof A.length),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var I=0;I=0;I-=3)i=A[I]|A[I-1]<<8|A[I-2]<<16,this.words[E]|=i<>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);else if("le"===Q)for(I=0,E=0;I>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);return this.strip()},E.prototype._parseHex=function(A,B){this.length=Math.ceil((A.length-B)/6),this.words=new Array(this.length);for(var Q=0;Q=B;Q-=6)I=C(A,Q,Q+6),this.words[g]|=I<>>26-E&4194303,(E+=24)>=26&&(E-=26,g++);Q+6!==B&&(I=C(A,B,Q+6),this.words[g]|=I<>>26-E&4194303),this.strip()},E.prototype._parseBase=function(A,B,Q){this.words=[0],this.length=1;for(var g=0,I=1;I<=67108863;I*=B)g++;g--,I=I/B|0;for(var E=A.length-Q,i=E%g,C=Math.min(E,E-i)+Q,e=0,o=Q;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},E.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},E.prototype.inspect=function(){return(this.red?""};var e=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],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],s=[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 r(A,B,Q){Q.negative=B.negative^A.negative;var g=A.length+B.length|0;Q.length=g,g=g-1|0;var I=0|A.words[0],E=0|B.words[0],i=I*E,C=67108863&i,t=i/67108864|0;Q.words[0]=C;for(var e=1;e>>26,s=67108863&t,r=Math.min(e,B.length-1),h=Math.max(0,e-A.length+1);h<=r;h++){var n=e-h|0;o+=(i=(I=0|A.words[n])*(E=0|B.words[h])+s)/67108864|0,s=67108863&i}Q.words[e]=0|s,t=0|o}return 0!==t?Q.words[e]=0|t:Q.length--,Q.strip()}E.prototype.toString=function(A,B){var Q;if(B=0|B||1,16===(A=A||10)||"hex"===A){Q="";for(var I=0,E=0,i=0;i>>24-I&16777215)||i!==this.length-1?e[6-t.length]+t+Q:t+Q,(I+=2)>=26&&(I-=26,i--)}for(0!==E&&(Q=E.toString(16)+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}if(A===(0|A)&&A>=2&&A<=36){var r=o[A],h=s[A];Q="";var n=this.clone();for(n.negative=0;!n.isZero();){var a=n.modn(h).toString(A);Q=(n=n.idivn(h)).isZero()?a+Q:e[r-a.length]+a+Q}for(this.isZero()&&(Q="0"+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}g(!1,"Base should be between 2 and 36")},E.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&g(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},E.prototype.toJSON=function(){return this.toString(16)},E.prototype.toBuffer=function(A,B){return g(void 0!==i),this.toArrayLike(i,A,B)},E.prototype.toArray=function(A,B){return this.toArrayLike(Array,A,B)},E.prototype.toArrayLike=function(A,B,Q){var I=this.byteLength(),E=Q||Math.max(1,I);g(I<=E,"byte array longer than desired length"),g(E>0,"Requested array length <= 0"),this.strip();var i,C,t="le"===B,e=new A(E),o=this.clone();if(t){for(C=0;!o.isZero();C++)i=o.andln(255),o.iushrn(8),e[C]=i;for(;C=4096&&(Q+=13,B>>>=13),B>=64&&(Q+=7,B>>>=7),B>=8&&(Q+=4,B>>>=4),B>=2&&(Q+=2,B>>>=2),Q+B},E.prototype._zeroBits=function(A){if(0===A)return 26;var B=A,Q=0;return 0==(8191&B)&&(Q+=13,B>>>=13),0==(127&B)&&(Q+=7,B>>>=7),0==(15&B)&&(Q+=4,B>>>=4),0==(3&B)&&(Q+=2,B>>>=2),0==(1&B)&&Q++,Q},E.prototype.bitLength=function(){var A=this.words[this.length-1],B=this._countBits(A);return 26*(this.length-1)+B},E.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,B=0;BA.length?this.clone().ior(A):A.clone().ior(this)},E.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},E.prototype.iuand=function(A){var B;B=this.length>A.length?A:this;for(var Q=0;QA.length?this.clone().iand(A):A.clone().iand(this)},E.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},E.prototype.iuxor=function(A){var B,Q;this.length>A.length?(B=this,Q=A):(B=A,Q=this);for(var g=0;gA.length?this.clone().ixor(A):A.clone().ixor(this)},E.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},E.prototype.inotn=function(A){g("number"==typeof A&&A>=0);var B=0|Math.ceil(A/26),Q=A%26;this._expand(B),Q>0&&B--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-Q),this.strip()},E.prototype.notn=function(A){return this.clone().inotn(A)},E.prototype.setn=function(A,B){g("number"==typeof A&&A>=0);var Q=A/26|0,I=A%26;return this._expand(Q+1),this.words[Q]=B?this.words[Q]|1<A.length?(Q=this,g=A):(Q=A,g=this);for(var I=0,E=0;E>>26;for(;0!==I&&E>>26;if(this.length=Q.length,0!==I)this.words[this.length]=I,this.length++;else if(Q!==this)for(;EA.length?this.clone().iadd(A):A.clone().iadd(this)},E.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var B=this.iadd(A);return A.negative=1,B._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var Q,g,I=this.cmp(A);if(0===I)return this.negative=0,this.length=1,this.words[0]=0,this;I>0?(Q=this,g=A):(Q=A,g=this);for(var E=0,i=0;i>26,this.words[i]=67108863&B;for(;0!==E&&i>26,this.words[i]=67108863&B;if(0===E&&i>>13,h=0|i[1],n=8191&h,a=h>>>13,c=0|i[2],y=8191&c,D=c>>>13,u=0|i[3],f=8191&u,w=u>>>13,F=0|i[4],d=8191&F,l=F>>>13,U=0|i[5],N=8191&U,H=U>>>13,G=0|i[6],Y=8191&G,L=G>>>13,R=0|i[7],p=8191&R,M=R>>>13,m=0|i[8],k=8191&m,S=m>>>13,b=0|i[9],v=8191&b,J=b>>>13,V=0|C[0],K=8191&V,x=V>>>13,Z=0|C[1],q=8191&Z,O=Z>>>13,j=0|C[2],W=8191&j,X=j>>>13,T=0|C[3],z=8191&T,_=T>>>13,P=0|C[4],$=8191&P,AA=P>>>13,BA=0|C[5],QA=8191&BA,gA=BA>>>13,IA=0|C[6],EA=8191&IA,iA=IA>>>13,CA=0|C[7],tA=8191&CA,eA=CA>>>13,oA=0|C[8],sA=8191&oA,rA=oA>>>13,hA=0|C[9],nA=8191&hA,aA=hA>>>13;Q.negative=A.negative^B.negative,Q.length=19;var cA=(e+(g=Math.imul(s,K))|0)+((8191&(I=(I=Math.imul(s,x))+Math.imul(r,K)|0))<<13)|0;e=((E=Math.imul(r,x))+(I>>>13)|0)+(cA>>>26)|0,cA&=67108863,g=Math.imul(n,K),I=(I=Math.imul(n,x))+Math.imul(a,K)|0,E=Math.imul(a,x);var yA=(e+(g=g+Math.imul(s,q)|0)|0)+((8191&(I=(I=I+Math.imul(s,O)|0)+Math.imul(r,q)|0))<<13)|0;e=((E=E+Math.imul(r,O)|0)+(I>>>13)|0)+(yA>>>26)|0,yA&=67108863,g=Math.imul(y,K),I=(I=Math.imul(y,x))+Math.imul(D,K)|0,E=Math.imul(D,x),g=g+Math.imul(n,q)|0,I=(I=I+Math.imul(n,O)|0)+Math.imul(a,q)|0,E=E+Math.imul(a,O)|0;var DA=(e+(g=g+Math.imul(s,W)|0)|0)+((8191&(I=(I=I+Math.imul(s,X)|0)+Math.imul(r,W)|0))<<13)|0;e=((E=E+Math.imul(r,X)|0)+(I>>>13)|0)+(DA>>>26)|0,DA&=67108863,g=Math.imul(f,K),I=(I=Math.imul(f,x))+Math.imul(w,K)|0,E=Math.imul(w,x),g=g+Math.imul(y,q)|0,I=(I=I+Math.imul(y,O)|0)+Math.imul(D,q)|0,E=E+Math.imul(D,O)|0,g=g+Math.imul(n,W)|0,I=(I=I+Math.imul(n,X)|0)+Math.imul(a,W)|0,E=E+Math.imul(a,X)|0;var uA=(e+(g=g+Math.imul(s,z)|0)|0)+((8191&(I=(I=I+Math.imul(s,_)|0)+Math.imul(r,z)|0))<<13)|0;e=((E=E+Math.imul(r,_)|0)+(I>>>13)|0)+(uA>>>26)|0,uA&=67108863,g=Math.imul(d,K),I=(I=Math.imul(d,x))+Math.imul(l,K)|0,E=Math.imul(l,x),g=g+Math.imul(f,q)|0,I=(I=I+Math.imul(f,O)|0)+Math.imul(w,q)|0,E=E+Math.imul(w,O)|0,g=g+Math.imul(y,W)|0,I=(I=I+Math.imul(y,X)|0)+Math.imul(D,W)|0,E=E+Math.imul(D,X)|0,g=g+Math.imul(n,z)|0,I=(I=I+Math.imul(n,_)|0)+Math.imul(a,z)|0,E=E+Math.imul(a,_)|0;var fA=(e+(g=g+Math.imul(s,$)|0)|0)+((8191&(I=(I=I+Math.imul(s,AA)|0)+Math.imul(r,$)|0))<<13)|0;e=((E=E+Math.imul(r,AA)|0)+(I>>>13)|0)+(fA>>>26)|0,fA&=67108863,g=Math.imul(N,K),I=(I=Math.imul(N,x))+Math.imul(H,K)|0,E=Math.imul(H,x),g=g+Math.imul(d,q)|0,I=(I=I+Math.imul(d,O)|0)+Math.imul(l,q)|0,E=E+Math.imul(l,O)|0,g=g+Math.imul(f,W)|0,I=(I=I+Math.imul(f,X)|0)+Math.imul(w,W)|0,E=E+Math.imul(w,X)|0,g=g+Math.imul(y,z)|0,I=(I=I+Math.imul(y,_)|0)+Math.imul(D,z)|0,E=E+Math.imul(D,_)|0,g=g+Math.imul(n,$)|0,I=(I=I+Math.imul(n,AA)|0)+Math.imul(a,$)|0,E=E+Math.imul(a,AA)|0;var wA=(e+(g=g+Math.imul(s,QA)|0)|0)+((8191&(I=(I=I+Math.imul(s,gA)|0)+Math.imul(r,QA)|0))<<13)|0;e=((E=E+Math.imul(r,gA)|0)+(I>>>13)|0)+(wA>>>26)|0,wA&=67108863,g=Math.imul(Y,K),I=(I=Math.imul(Y,x))+Math.imul(L,K)|0,E=Math.imul(L,x),g=g+Math.imul(N,q)|0,I=(I=I+Math.imul(N,O)|0)+Math.imul(H,q)|0,E=E+Math.imul(H,O)|0,g=g+Math.imul(d,W)|0,I=(I=I+Math.imul(d,X)|0)+Math.imul(l,W)|0,E=E+Math.imul(l,X)|0,g=g+Math.imul(f,z)|0,I=(I=I+Math.imul(f,_)|0)+Math.imul(w,z)|0,E=E+Math.imul(w,_)|0,g=g+Math.imul(y,$)|0,I=(I=I+Math.imul(y,AA)|0)+Math.imul(D,$)|0,E=E+Math.imul(D,AA)|0,g=g+Math.imul(n,QA)|0,I=(I=I+Math.imul(n,gA)|0)+Math.imul(a,QA)|0,E=E+Math.imul(a,gA)|0;var FA=(e+(g=g+Math.imul(s,EA)|0)|0)+((8191&(I=(I=I+Math.imul(s,iA)|0)+Math.imul(r,EA)|0))<<13)|0;e=((E=E+Math.imul(r,iA)|0)+(I>>>13)|0)+(FA>>>26)|0,FA&=67108863,g=Math.imul(p,K),I=(I=Math.imul(p,x))+Math.imul(M,K)|0,E=Math.imul(M,x),g=g+Math.imul(Y,q)|0,I=(I=I+Math.imul(Y,O)|0)+Math.imul(L,q)|0,E=E+Math.imul(L,O)|0,g=g+Math.imul(N,W)|0,I=(I=I+Math.imul(N,X)|0)+Math.imul(H,W)|0,E=E+Math.imul(H,X)|0,g=g+Math.imul(d,z)|0,I=(I=I+Math.imul(d,_)|0)+Math.imul(l,z)|0,E=E+Math.imul(l,_)|0,g=g+Math.imul(f,$)|0,I=(I=I+Math.imul(f,AA)|0)+Math.imul(w,$)|0,E=E+Math.imul(w,AA)|0,g=g+Math.imul(y,QA)|0,I=(I=I+Math.imul(y,gA)|0)+Math.imul(D,QA)|0,E=E+Math.imul(D,gA)|0,g=g+Math.imul(n,EA)|0,I=(I=I+Math.imul(n,iA)|0)+Math.imul(a,EA)|0,E=E+Math.imul(a,iA)|0;var dA=(e+(g=g+Math.imul(s,tA)|0)|0)+((8191&(I=(I=I+Math.imul(s,eA)|0)+Math.imul(r,tA)|0))<<13)|0;e=((E=E+Math.imul(r,eA)|0)+(I>>>13)|0)+(dA>>>26)|0,dA&=67108863,g=Math.imul(k,K),I=(I=Math.imul(k,x))+Math.imul(S,K)|0,E=Math.imul(S,x),g=g+Math.imul(p,q)|0,I=(I=I+Math.imul(p,O)|0)+Math.imul(M,q)|0,E=E+Math.imul(M,O)|0,g=g+Math.imul(Y,W)|0,I=(I=I+Math.imul(Y,X)|0)+Math.imul(L,W)|0,E=E+Math.imul(L,X)|0,g=g+Math.imul(N,z)|0,I=(I=I+Math.imul(N,_)|0)+Math.imul(H,z)|0,E=E+Math.imul(H,_)|0,g=g+Math.imul(d,$)|0,I=(I=I+Math.imul(d,AA)|0)+Math.imul(l,$)|0,E=E+Math.imul(l,AA)|0,g=g+Math.imul(f,QA)|0,I=(I=I+Math.imul(f,gA)|0)+Math.imul(w,QA)|0,E=E+Math.imul(w,gA)|0,g=g+Math.imul(y,EA)|0,I=(I=I+Math.imul(y,iA)|0)+Math.imul(D,EA)|0,E=E+Math.imul(D,iA)|0,g=g+Math.imul(n,tA)|0,I=(I=I+Math.imul(n,eA)|0)+Math.imul(a,tA)|0,E=E+Math.imul(a,eA)|0;var lA=(e+(g=g+Math.imul(s,sA)|0)|0)+((8191&(I=(I=I+Math.imul(s,rA)|0)+Math.imul(r,sA)|0))<<13)|0;e=((E=E+Math.imul(r,rA)|0)+(I>>>13)|0)+(lA>>>26)|0,lA&=67108863,g=Math.imul(v,K),I=(I=Math.imul(v,x))+Math.imul(J,K)|0,E=Math.imul(J,x),g=g+Math.imul(k,q)|0,I=(I=I+Math.imul(k,O)|0)+Math.imul(S,q)|0,E=E+Math.imul(S,O)|0,g=g+Math.imul(p,W)|0,I=(I=I+Math.imul(p,X)|0)+Math.imul(M,W)|0,E=E+Math.imul(M,X)|0,g=g+Math.imul(Y,z)|0,I=(I=I+Math.imul(Y,_)|0)+Math.imul(L,z)|0,E=E+Math.imul(L,_)|0,g=g+Math.imul(N,$)|0,I=(I=I+Math.imul(N,AA)|0)+Math.imul(H,$)|0,E=E+Math.imul(H,AA)|0,g=g+Math.imul(d,QA)|0,I=(I=I+Math.imul(d,gA)|0)+Math.imul(l,QA)|0,E=E+Math.imul(l,gA)|0,g=g+Math.imul(f,EA)|0,I=(I=I+Math.imul(f,iA)|0)+Math.imul(w,EA)|0,E=E+Math.imul(w,iA)|0,g=g+Math.imul(y,tA)|0,I=(I=I+Math.imul(y,eA)|0)+Math.imul(D,tA)|0,E=E+Math.imul(D,eA)|0,g=g+Math.imul(n,sA)|0,I=(I=I+Math.imul(n,rA)|0)+Math.imul(a,sA)|0,E=E+Math.imul(a,rA)|0;var UA=(e+(g=g+Math.imul(s,nA)|0)|0)+((8191&(I=(I=I+Math.imul(s,aA)|0)+Math.imul(r,nA)|0))<<13)|0;e=((E=E+Math.imul(r,aA)|0)+(I>>>13)|0)+(UA>>>26)|0,UA&=67108863,g=Math.imul(v,q),I=(I=Math.imul(v,O))+Math.imul(J,q)|0,E=Math.imul(J,O),g=g+Math.imul(k,W)|0,I=(I=I+Math.imul(k,X)|0)+Math.imul(S,W)|0,E=E+Math.imul(S,X)|0,g=g+Math.imul(p,z)|0,I=(I=I+Math.imul(p,_)|0)+Math.imul(M,z)|0,E=E+Math.imul(M,_)|0,g=g+Math.imul(Y,$)|0,I=(I=I+Math.imul(Y,AA)|0)+Math.imul(L,$)|0,E=E+Math.imul(L,AA)|0,g=g+Math.imul(N,QA)|0,I=(I=I+Math.imul(N,gA)|0)+Math.imul(H,QA)|0,E=E+Math.imul(H,gA)|0,g=g+Math.imul(d,EA)|0,I=(I=I+Math.imul(d,iA)|0)+Math.imul(l,EA)|0,E=E+Math.imul(l,iA)|0,g=g+Math.imul(f,tA)|0,I=(I=I+Math.imul(f,eA)|0)+Math.imul(w,tA)|0,E=E+Math.imul(w,eA)|0,g=g+Math.imul(y,sA)|0,I=(I=I+Math.imul(y,rA)|0)+Math.imul(D,sA)|0,E=E+Math.imul(D,rA)|0;var NA=(e+(g=g+Math.imul(n,nA)|0)|0)+((8191&(I=(I=I+Math.imul(n,aA)|0)+Math.imul(a,nA)|0))<<13)|0;e=((E=E+Math.imul(a,aA)|0)+(I>>>13)|0)+(NA>>>26)|0,NA&=67108863,g=Math.imul(v,W),I=(I=Math.imul(v,X))+Math.imul(J,W)|0,E=Math.imul(J,X),g=g+Math.imul(k,z)|0,I=(I=I+Math.imul(k,_)|0)+Math.imul(S,z)|0,E=E+Math.imul(S,_)|0,g=g+Math.imul(p,$)|0,I=(I=I+Math.imul(p,AA)|0)+Math.imul(M,$)|0,E=E+Math.imul(M,AA)|0,g=g+Math.imul(Y,QA)|0,I=(I=I+Math.imul(Y,gA)|0)+Math.imul(L,QA)|0,E=E+Math.imul(L,gA)|0,g=g+Math.imul(N,EA)|0,I=(I=I+Math.imul(N,iA)|0)+Math.imul(H,EA)|0,E=E+Math.imul(H,iA)|0,g=g+Math.imul(d,tA)|0,I=(I=I+Math.imul(d,eA)|0)+Math.imul(l,tA)|0,E=E+Math.imul(l,eA)|0,g=g+Math.imul(f,sA)|0,I=(I=I+Math.imul(f,rA)|0)+Math.imul(w,sA)|0,E=E+Math.imul(w,rA)|0;var HA=(e+(g=g+Math.imul(y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(y,aA)|0)+Math.imul(D,nA)|0))<<13)|0;e=((E=E+Math.imul(D,aA)|0)+(I>>>13)|0)+(HA>>>26)|0,HA&=67108863,g=Math.imul(v,z),I=(I=Math.imul(v,_))+Math.imul(J,z)|0,E=Math.imul(J,_),g=g+Math.imul(k,$)|0,I=(I=I+Math.imul(k,AA)|0)+Math.imul(S,$)|0,E=E+Math.imul(S,AA)|0,g=g+Math.imul(p,QA)|0,I=(I=I+Math.imul(p,gA)|0)+Math.imul(M,QA)|0,E=E+Math.imul(M,gA)|0,g=g+Math.imul(Y,EA)|0,I=(I=I+Math.imul(Y,iA)|0)+Math.imul(L,EA)|0,E=E+Math.imul(L,iA)|0,g=g+Math.imul(N,tA)|0,I=(I=I+Math.imul(N,eA)|0)+Math.imul(H,tA)|0,E=E+Math.imul(H,eA)|0,g=g+Math.imul(d,sA)|0,I=(I=I+Math.imul(d,rA)|0)+Math.imul(l,sA)|0,E=E+Math.imul(l,rA)|0;var GA=(e+(g=g+Math.imul(f,nA)|0)|0)+((8191&(I=(I=I+Math.imul(f,aA)|0)+Math.imul(w,nA)|0))<<13)|0;e=((E=E+Math.imul(w,aA)|0)+(I>>>13)|0)+(GA>>>26)|0,GA&=67108863,g=Math.imul(v,$),I=(I=Math.imul(v,AA))+Math.imul(J,$)|0,E=Math.imul(J,AA),g=g+Math.imul(k,QA)|0,I=(I=I+Math.imul(k,gA)|0)+Math.imul(S,QA)|0,E=E+Math.imul(S,gA)|0,g=g+Math.imul(p,EA)|0,I=(I=I+Math.imul(p,iA)|0)+Math.imul(M,EA)|0,E=E+Math.imul(M,iA)|0,g=g+Math.imul(Y,tA)|0,I=(I=I+Math.imul(Y,eA)|0)+Math.imul(L,tA)|0,E=E+Math.imul(L,eA)|0,g=g+Math.imul(N,sA)|0,I=(I=I+Math.imul(N,rA)|0)+Math.imul(H,sA)|0,E=E+Math.imul(H,rA)|0;var YA=(e+(g=g+Math.imul(d,nA)|0)|0)+((8191&(I=(I=I+Math.imul(d,aA)|0)+Math.imul(l,nA)|0))<<13)|0;e=((E=E+Math.imul(l,aA)|0)+(I>>>13)|0)+(YA>>>26)|0,YA&=67108863,g=Math.imul(v,QA),I=(I=Math.imul(v,gA))+Math.imul(J,QA)|0,E=Math.imul(J,gA),g=g+Math.imul(k,EA)|0,I=(I=I+Math.imul(k,iA)|0)+Math.imul(S,EA)|0,E=E+Math.imul(S,iA)|0,g=g+Math.imul(p,tA)|0,I=(I=I+Math.imul(p,eA)|0)+Math.imul(M,tA)|0,E=E+Math.imul(M,eA)|0,g=g+Math.imul(Y,sA)|0,I=(I=I+Math.imul(Y,rA)|0)+Math.imul(L,sA)|0,E=E+Math.imul(L,rA)|0;var LA=(e+(g=g+Math.imul(N,nA)|0)|0)+((8191&(I=(I=I+Math.imul(N,aA)|0)+Math.imul(H,nA)|0))<<13)|0;e=((E=E+Math.imul(H,aA)|0)+(I>>>13)|0)+(LA>>>26)|0,LA&=67108863,g=Math.imul(v,EA),I=(I=Math.imul(v,iA))+Math.imul(J,EA)|0,E=Math.imul(J,iA),g=g+Math.imul(k,tA)|0,I=(I=I+Math.imul(k,eA)|0)+Math.imul(S,tA)|0,E=E+Math.imul(S,eA)|0,g=g+Math.imul(p,sA)|0,I=(I=I+Math.imul(p,rA)|0)+Math.imul(M,sA)|0,E=E+Math.imul(M,rA)|0;var RA=(e+(g=g+Math.imul(Y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(Y,aA)|0)+Math.imul(L,nA)|0))<<13)|0;e=((E=E+Math.imul(L,aA)|0)+(I>>>13)|0)+(RA>>>26)|0,RA&=67108863,g=Math.imul(v,tA),I=(I=Math.imul(v,eA))+Math.imul(J,tA)|0,E=Math.imul(J,eA),g=g+Math.imul(k,sA)|0,I=(I=I+Math.imul(k,rA)|0)+Math.imul(S,sA)|0,E=E+Math.imul(S,rA)|0;var pA=(e+(g=g+Math.imul(p,nA)|0)|0)+((8191&(I=(I=I+Math.imul(p,aA)|0)+Math.imul(M,nA)|0))<<13)|0;e=((E=E+Math.imul(M,aA)|0)+(I>>>13)|0)+(pA>>>26)|0,pA&=67108863,g=Math.imul(v,sA),I=(I=Math.imul(v,rA))+Math.imul(J,sA)|0,E=Math.imul(J,rA);var MA=(e+(g=g+Math.imul(k,nA)|0)|0)+((8191&(I=(I=I+Math.imul(k,aA)|0)+Math.imul(S,nA)|0))<<13)|0;e=((E=E+Math.imul(S,aA)|0)+(I>>>13)|0)+(MA>>>26)|0,MA&=67108863;var mA=(e+(g=Math.imul(v,nA))|0)+((8191&(I=(I=Math.imul(v,aA))+Math.imul(J,nA)|0))<<13)|0;return e=((E=Math.imul(J,aA))+(I>>>13)|0)+(mA>>>26)|0,mA&=67108863,t[0]=cA,t[1]=yA,t[2]=DA,t[3]=uA,t[4]=fA,t[5]=wA,t[6]=FA,t[7]=dA,t[8]=lA,t[9]=UA,t[10]=NA,t[11]=HA,t[12]=GA,t[13]=YA,t[14]=LA,t[15]=RA,t[16]=pA,t[17]=MA,t[18]=mA,0!==e&&(t[19]=e,Q.length++),Q};function n(A,B,Q){return(new a).mulp(A,B,Q)}function a(A,B){this.x=A,this.y=B}Math.imul||(h=r),E.prototype.mulTo=function(A,B){var Q=this.length+A.length;return 10===this.length&&10===A.length?h(this,A,B):Q<63?r(this,A,B):Q<1024?function(A,B,Q){Q.negative=B.negative^A.negative,Q.length=A.length+B.length;for(var g=0,I=0,E=0;E>>26)|0)>>>26,i&=67108863}Q.words[E]=C,g=i,i=I}return 0!==g?Q.words[E]=g:Q.length--,Q.strip()}(this,A,B):n(this,A,B)},a.prototype.makeRBT=function(A){for(var B=new Array(A),Q=E.prototype._countBits(A)-1,g=0;g>=1;return g},a.prototype.permute=function(A,B,Q,g,I,E){for(var i=0;i>>=1)I++;return 1<>>=13,Q[2*i+1]=8191&E,E>>>=13;for(i=2*B;i>=26,B+=I/67108864|0,B+=E>>>26,this.words[Q]=67108863&E}return 0!==B&&(this.words[Q]=B,this.length++),this},E.prototype.muln=function(A){return this.clone().imuln(A)},E.prototype.sqr=function(){return this.mul(this)},E.prototype.isqr=function(){return this.imul(this.clone())},E.prototype.pow=function(A){var B=function(A){for(var B=new Array(A.bitLength()),Q=0;Q>>I}return B}(A);if(0===B.length)return new E(1);for(var Q=this,g=0;g=0);var B,Q=A%26,I=(A-Q)/26,E=67108863>>>26-Q<<26-Q;if(0!==Q){var i=0;for(B=0;B>>26-Q}i&&(this.words[B]=i,this.length++)}if(0!==I){for(B=this.length-1;B>=0;B--)this.words[B+I]=this.words[B];for(B=0;B=0),I=B?(B-B%26)/26:0;var E=A%26,i=Math.min((A-E)/26,this.length),C=67108863^67108863>>>E<i)for(this.length-=i,e=0;e=0&&(0!==o||e>=I);e--){var s=0|this.words[e];this.words[e]=o<<26-E|s>>>E,o=s&C}return t&&0!==o&&(t.words[t.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},E.prototype.ishrn=function(A,B,Q){return g(0===this.negative),this.iushrn(A,B,Q)},E.prototype.shln=function(A){return this.clone().ishln(A)},E.prototype.ushln=function(A){return this.clone().iushln(A)},E.prototype.shrn=function(A){return this.clone().ishrn(A)},E.prototype.ushrn=function(A){return this.clone().iushrn(A)},E.prototype.testn=function(A){g("number"==typeof A&&A>=0);var B=A%26,Q=(A-B)/26,I=1<=0);var B=A%26,Q=(A-B)/26;if(g(0===this.negative,"imaskn works only with positive numbers"),this.length<=Q)return this;if(0!==B&&Q++,this.length=Math.min(Q,this.length),0!==B){var I=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},E.prototype.isubn=function(A){if(g("number"==typeof A),g(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(t/67108864|0),this.words[I+Q]=67108863&E}for(;I>26,this.words[I+Q]=67108863&E;if(0===C)return this.strip();for(g(-1===C),C=0,I=0;I>26,this.words[I]=67108863&E;return this.negative=1,this.strip()},E.prototype._wordDiv=function(A,B){var Q=(this.length,A.length),g=this.clone(),I=A,i=0|I.words[I.length-1];0!==(Q=26-this._countBits(i))&&(I=I.ushln(Q),g.iushln(Q),i=0|I.words[I.length-1]);var C,t=g.length-I.length;if("mod"!==B){(C=new E(null)).length=t+1,C.words=new Array(C.length);for(var e=0;e=0;s--){var r=67108864*(0|g.words[I.length+s])+(0|g.words[I.length+s-1]);for(r=Math.min(r/i|0,67108863),g._ishlnsubmul(I,r,s);0!==g.negative;)r--,g.negative=0,g._ishlnsubmul(I,1,s),g.isZero()||(g.negative^=1);C&&(C.words[s]=r)}return C&&C.strip(),g.strip(),"div"!==B&&0!==Q&&g.iushrn(Q),{div:C||null,mod:g}},E.prototype.divmod=function(A,B,Q){return g(!A.isZero()),this.isZero()?{div:new E(0),mod:new E(0)}:0!==this.negative&&0===A.negative?(C=this.neg().divmod(A,B),"mod"!==B&&(I=C.div.neg()),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.iadd(A)),{div:I,mod:i}):0===this.negative&&0!==A.negative?(C=this.divmod(A.neg(),B),"mod"!==B&&(I=C.div.neg()),{div:I,mod:C.mod}):0!=(this.negative&A.negative)?(C=this.neg().divmod(A.neg(),B),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.isub(A)),{div:C.div,mod:i}):A.length>this.length||this.cmp(A)<0?{div:new E(0),mod:this}:1===A.length?"div"===B?{div:this.divn(A.words[0]),mod:null}:"mod"===B?{div:null,mod:new E(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new E(this.modn(A.words[0]))}:this._wordDiv(A,B);var I,i,C},E.prototype.div=function(A){return this.divmod(A,"div",!1).div},E.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},E.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},E.prototype.divRound=function(A){var B=this.divmod(A);if(B.mod.isZero())return B.div;var Q=0!==B.div.negative?B.mod.isub(A):B.mod,g=A.ushrn(1),I=A.andln(1),E=Q.cmp(g);return E<0||1===I&&0===E?B.div:0!==B.div.negative?B.div.isubn(1):B.div.iaddn(1)},E.prototype.modn=function(A){g(A<=67108863);for(var B=(1<<26)%A,Q=0,I=this.length-1;I>=0;I--)Q=(B*Q+(0|this.words[I]))%A;return Q},E.prototype.idivn=function(A){g(A<=67108863);for(var B=0,Q=this.length-1;Q>=0;Q--){var I=(0|this.words[Q])+67108864*B;this.words[Q]=I/A|0,B=I%A}return this.strip()},E.prototype.divn=function(A){return this.clone().idivn(A)},E.prototype.egcd=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I=new E(1),i=new E(0),C=new E(0),t=new E(1),e=0;B.isEven()&&Q.isEven();)B.iushrn(1),Q.iushrn(1),++e;for(var o=Q.clone(),s=B.clone();!B.isZero();){for(var r=0,h=1;0==(B.words[0]&h)&&r<26;++r,h<<=1);if(r>0)for(B.iushrn(r);r-- >0;)(I.isOdd()||i.isOdd())&&(I.iadd(o),i.isub(s)),I.iushrn(1),i.iushrn(1);for(var n=0,a=1;0==(Q.words[0]&a)&&n<26;++n,a<<=1);if(n>0)for(Q.iushrn(n);n-- >0;)(C.isOdd()||t.isOdd())&&(C.iadd(o),t.isub(s)),C.iushrn(1),t.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),I.isub(C),i.isub(t)):(Q.isub(B),C.isub(I),t.isub(i))}return{a:C,b:t,gcd:Q.iushln(e)}},E.prototype._invmp=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I,i=new E(1),C=new E(0),t=Q.clone();B.cmpn(1)>0&&Q.cmpn(1)>0;){for(var e=0,o=1;0==(B.words[0]&o)&&e<26;++e,o<<=1);if(e>0)for(B.iushrn(e);e-- >0;)i.isOdd()&&i.iadd(t),i.iushrn(1);for(var s=0,r=1;0==(Q.words[0]&r)&&s<26;++s,r<<=1);if(s>0)for(Q.iushrn(s);s-- >0;)C.isOdd()&&C.iadd(t),C.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),i.isub(C)):(Q.isub(B),C.isub(i))}return(I=0===B.cmpn(1)?i:C).cmpn(0)<0&&I.iadd(A),I},E.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var B=this.clone(),Q=A.clone();B.negative=0,Q.negative=0;for(var g=0;B.isEven()&&Q.isEven();g++)B.iushrn(1),Q.iushrn(1);for(;;){for(;B.isEven();)B.iushrn(1);for(;Q.isEven();)Q.iushrn(1);var I=B.cmp(Q);if(I<0){var E=B;B=Q,Q=E}else if(0===I||0===Q.cmpn(1))break;B.isub(Q)}return Q.iushln(g)},E.prototype.invm=function(A){return this.egcd(A).a.umod(A)},E.prototype.isEven=function(){return 0==(1&this.words[0])},E.prototype.isOdd=function(){return 1==(1&this.words[0])},E.prototype.andln=function(A){return this.words[0]&A},E.prototype.bincn=function(A){g("number"==typeof A);var B=A%26,Q=(A-B)/26,I=1<>>26,C&=67108863,this.words[i]=C}return 0!==E&&(this.words[i]=E,this.length++),this},E.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},E.prototype.cmpn=function(A){var B,Q=A<0;if(0!==this.negative&&!Q)return-1;if(0===this.negative&&Q)return 1;if(this.strip(),this.length>1)B=1;else{Q&&(A=-A),g(A<=67108863,"Number is too big");var I=0|this.words[0];B=I===A?0:IA.length)return 1;if(this.length=0;Q--){var g=0|this.words[Q],I=0|A.words[Q];if(g!==I){gI&&(B=1);break}}return B},E.prototype.gtn=function(A){return 1===this.cmpn(A)},E.prototype.gt=function(A){return 1===this.cmp(A)},E.prototype.gten=function(A){return this.cmpn(A)>=0},E.prototype.gte=function(A){return this.cmp(A)>=0},E.prototype.ltn=function(A){return-1===this.cmpn(A)},E.prototype.lt=function(A){return-1===this.cmp(A)},E.prototype.lten=function(A){return this.cmpn(A)<=0},E.prototype.lte=function(A){return this.cmp(A)<=0},E.prototype.eqn=function(A){return 0===this.cmpn(A)},E.prototype.eq=function(A){return 0===this.cmp(A)},E.red=function(A){return new F(A)},E.prototype.toRed=function(A){return g(!this.red,"Already a number in reduction context"),g(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},E.prototype.fromRed=function(){return g(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},E.prototype._forceRed=function(A){return this.red=A,this},E.prototype.forceRed=function(A){return g(!this.red,"Already a number in reduction context"),this._forceRed(A)},E.prototype.redAdd=function(A){return g(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},E.prototype.redIAdd=function(A){return g(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},E.prototype.redSub=function(A){return g(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},E.prototype.redISub=function(A){return g(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},E.prototype.redShl=function(A){return g(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},E.prototype.redMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},E.prototype.redIMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},E.prototype.redSqr=function(){return g(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},E.prototype.redISqr=function(){return g(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},E.prototype.redSqrt=function(){return g(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},E.prototype.redInvm=function(){return g(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},E.prototype.redNeg=function(){return g(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},E.prototype.redPow=function(A){return g(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var c={k256:null,p224:null,p192:null,p25519:null};function y(A,B){this.name=A,this.p=new E(B,16),this.n=this.p.bitLength(),this.k=new E(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function D(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function u(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function f(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function F(A){if("string"==typeof A){var B=E._prime(A);this.m=B.p,this.prime=B}else g(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function d(A){F.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new E(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)}y.prototype._tmp=function(){var A=new E(null);return A.words=new Array(Math.ceil(this.n/13)),A},y.prototype.ireduce=function(A){var B,Q=A;do{this.split(Q,this.tmp),B=(Q=(Q=this.imulK(Q)).iadd(this.tmp)).bitLength()}while(B>this.n);var g=B0?Q.isub(this.p):void 0!==Q.strip?Q.strip():Q._strip(),Q},y.prototype.split=function(A,B){A.iushrn(this.n,0,B)},y.prototype.imulK=function(A){return A.imul(this.k)},I(D,y),D.prototype.split=function(A,B){for(var Q=Math.min(A.length,9),g=0;g>>22,I=E}I>>>=22,A.words[g-10]=I,0===I&&A.length>10?A.length-=10:A.length-=9},D.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var B=0,Q=0;Q>>=26,A.words[Q]=I,B=g}return 0!==B&&(A.words[A.length++]=B),A},E._prime=function(A){if(c[A])return c[A];var B;if("k256"===A)B=new D;else if("p224"===A)B=new u;else if("p192"===A)B=new f;else{if("p25519"!==A)throw new Error("Unknown prime "+A);B=new w}return c[A]=B,B},F.prototype._verify1=function(A){g(0===A.negative,"red works only with positives"),g(A.red,"red works only with red numbers")},F.prototype._verify2=function(A,B){g(0==(A.negative|B.negative),"red works only with positives"),g(A.red&&A.red===B.red,"red works only with red numbers")},F.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},F.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},F.prototype.add=function(A,B){this._verify2(A,B);var Q=A.add(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q._forceRed(this)},F.prototype.iadd=function(A,B){this._verify2(A,B);var Q=A.iadd(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q},F.prototype.sub=function(A,B){this._verify2(A,B);var Q=A.sub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q._forceRed(this)},F.prototype.isub=function(A,B){this._verify2(A,B);var Q=A.isub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q},F.prototype.shl=function(A,B){return this._verify1(A),this.imod(A.ushln(B))},F.prototype.imul=function(A,B){return this._verify2(A,B),this.imod(A.imul(B))},F.prototype.mul=function(A,B){return this._verify2(A,B),this.imod(A.mul(B))},F.prototype.isqr=function(A){return this.imul(A,A.clone())},F.prototype.sqr=function(A){return this.mul(A,A)},F.prototype.sqrt=function(A){if(A.isZero())return A.clone();var B=this.m.andln(3);if(g(B%2==1),3===B){var Q=this.m.add(new E(1)).iushrn(2);return this.pow(A,Q)}for(var I=this.m.subn(1),i=0;!I.isZero()&&0===I.andln(1);)i++,I.iushrn(1);g(!I.isZero());var C=new E(1).toRed(this),t=C.redNeg(),e=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new E(2*o*o).toRed(this);0!==this.pow(o,e).cmp(t);)o.redIAdd(t);for(var s=this.pow(o,I),r=this.pow(A,I.addn(1).iushrn(1)),h=this.pow(A,I),n=i;0!==h.cmp(C);){for(var a=h,c=0;0!==a.cmp(C);c++)a=a.redSqr();g(c=0;g--){for(var e=B.words[g],o=t-1;o>=0;o--){var s=e>>o&1;I!==Q[0]&&(I=this.sqr(I)),0!==s||0!==i?(i<<=1,i|=s,(4===++C||0===g&&0===o)&&(I=this.mul(I,Q[i]),C=0,i=0)):C=0}t=26}return I},F.prototype.convertTo=function(A){var B=A.umod(this.m);return B===A?B.clone():B},F.prototype.convertFrom=function(A){var B=A.clone();return B.red=null,B},E.mont=function(A){return new d(A)},I(d,F),d.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},d.prototype.convertFrom=function(A){var B=this.imod(A.mul(this.rinv));return B.red=null,B},d.prototype.imul=function(A,B){if(A.isZero()||B.isZero())return A.words[0]=0,A.length=1,A;var Q=A.imul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),E=I;return I.cmp(this.m)>=0?E=I.isub(this.m):I.cmpn(0)<0&&(E=I.iadd(this.m)),E._forceRed(this)},d.prototype.mul=function(A,B){if(A.isZero()||B.isZero())return new E(0)._forceRed(this);var Q=A.mul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),i=I;return I.cmp(this.m)>=0?i=I.isub(this.m):I.cmpn(0)<0&&(i=I.iadd(this.m)),i._forceRed(this)},d.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A,this)}).call(this,Q(10)(A))},function(A,B,Q){var g=Q(1).Buffer,I=Q(119).Transform,E=Q(12).StringDecoder;function i(A){I.call(this),this.hashMode="string"==typeof A,this.hashMode?this[A]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}Q(0)(i,I),i.prototype.update=function(A,B,Q){"string"==typeof A&&(A=g.from(A,B));var I=this._update(A);return this.hashMode?this:(Q&&(I=this._toString(I,Q)),I)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(A,B,Q){var g;try{this.hashMode?this._update(A):this.push(this._update(A))}catch(A){g=A}finally{Q(g)}},i.prototype._flush=function(A){var B;try{this.push(this.__final())}catch(A){B=A}A(B)},i.prototype._finalOrDigest=function(A){var B=this.__final()||g.alloc(0);return A&&(B=this._toString(B,A,!0)),B},i.prototype._toString=function(A,B,Q){if(this._decoder||(this._decoder=new E(B),this._encoding=B),this._encoding!==B)throw new Error("can't switch encodings");var g=this._decoder.write(A);return Q&&(g+=this._decoder.end()),g},A.exports=i},function(A,B){A.exports=function(A){return A.webpackPolyfill||(A.deprecate=function(){},A.paths=[],A.children||(A.children=[]),Object.defineProperty(A,"loaded",{enumerable:!0,get:function(){return A.l}}),Object.defineProperty(A,"id",{enumerable:!0,get:function(){return A.i}}),A.webpackPolyfill=1),A}},function(A,B,Q){"use strict";var g,I="object"==typeof Reflect?Reflect:null,E=I&&"function"==typeof I.apply?I.apply:function(A,B,Q){return Function.prototype.apply.call(A,B,Q)};g=I&&"function"==typeof I.ownKeys?I.ownKeys:Object.getOwnPropertySymbols?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:function(A){return Object.getOwnPropertyNames(A)};var i=Number.isNaN||function(A){return A!=A};function C(){C.init.call(this)}A.exports=C,C.EventEmitter=C,C.prototype._events=void 0,C.prototype._eventsCount=0,C.prototype._maxListeners=void 0;var t=10;function e(A){if("function"!=typeof A)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}function o(A){return void 0===A._maxListeners?C.defaultMaxListeners:A._maxListeners}function s(A,B,Q,g){var I,E,i,C;if(e(Q),void 0===(E=A._events)?(E=A._events=Object.create(null),A._eventsCount=0):(void 0!==E.newListener&&(A.emit("newListener",B,Q.listener?Q.listener:Q),E=A._events),i=E[B]),void 0===i)i=E[B]=Q,++A._eventsCount;else if("function"==typeof i?i=E[B]=g?[Q,i]:[i,Q]:g?i.unshift(Q):i.push(Q),(I=o(A))>0&&i.length>I&&!i.warned){i.warned=!0;var t=new Error("Possible EventEmitter memory leak detected. "+i.length+" "+String(B)+" listeners added. Use emitter.setMaxListeners() to increase limit");t.name="MaxListenersExceededWarning",t.emitter=A,t.type=B,t.count=i.length,C=t,console&&console.warn&&console.warn(C)}return A}function r(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(A,B,Q){var g={fired:!1,wrapFn:void 0,target:A,type:B,listener:Q},I=r.bind(g);return I.listener=Q,g.wrapFn=I,I}function n(A,B,Q){var g=A._events;if(void 0===g)return[];var I=g[B];return void 0===I?[]:"function"==typeof I?Q?[I.listener||I]:[I]:Q?function(A){for(var B=new Array(A.length),Q=0;Q0&&(i=B[0]),i instanceof Error)throw i;var C=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw C.context=i,C}var t=I[A];if(void 0===t)return!1;if("function"==typeof t)E(t,this,B);else{var e=t.length,o=c(t,e);for(Q=0;Q=0;E--)if(Q[E]===B||Q[E].listener===B){i=Q[E].listener,I=E;break}if(I<0)return this;0===I?Q.shift():function(A,B){for(;B+1=0;g--)this.removeListener(A,B[g]);return this},C.prototype.listeners=function(A){return n(this,A,!0)},C.prototype.rawListeners=function(A){return n(this,A,!1)},C.listenerCount=function(A,B){return"function"==typeof A.listenerCount?A.listenerCount(B):a.call(A,B)},C.prototype.listenerCount=a,C.prototype.eventNames=function(){return this._eventsCount>0?g(this._events):[]}},function(A,B,Q){"use strict";var g=Q(1).Buffer,I=g.isEncoding||function(A){switch((A=""+A)&&A.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function E(A){var B;switch(this.encoding=function(A){var B=function(A){if(!A)return"utf8";for(var B;;)switch(A){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return A;default:if(B)return;A=(""+A).toLowerCase(),B=!0}}(A);if("string"!=typeof B&&(g.isEncoding===I||!I(A)))throw new Error("Unknown encoding: "+A);return B||A}(A),this.encoding){case"utf16le":this.text=t,this.end=e,B=4;break;case"utf8":this.fillLast=C,B=4;break;case"base64":this.text=o,this.end=s,B=3;break;default:return this.write=r,void(this.end=h)}this.lastNeed=0,this.lastTotal=0,this.lastChar=g.allocUnsafe(B)}function i(A){return A<=127?0:A>>5==6?2:A>>4==14?3:A>>3==30?4:A>>6==2?-1:-2}function C(A){var B=this.lastTotal-this.lastNeed,Q=function(A,B,Q){if(128!=(192&B[0]))return A.lastNeed=0,"�";if(A.lastNeed>1&&B.length>1){if(128!=(192&B[1]))return A.lastNeed=1,"�";if(A.lastNeed>2&&B.length>2&&128!=(192&B[2]))return A.lastNeed=2,"�"}}(this,A);return void 0!==Q?Q:this.lastNeed<=A.length?(A.copy(this.lastChar,B,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(A.copy(this.lastChar,B,0,A.length),void(this.lastNeed-=A.length))}function t(A,B){if((A.length-B)%2==0){var Q=A.toString("utf16le",B);if(Q){var g=Q.charCodeAt(Q.length-1);if(g>=55296&&g<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],Q.slice(0,-1)}return Q}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",B,A.length-1)}function e(A){var B=A&&A.length?this.write(A):"";if(this.lastNeed){var Q=this.lastTotal-this.lastNeed;return B+this.lastChar.toString("utf16le",0,Q)}return B}function o(A,B){var Q=(A.length-B)%3;return 0===Q?A.toString("base64",B):(this.lastNeed=3-Q,this.lastTotal=3,1===Q?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",B,A.length-Q))}function s(A){var B=A&&A.length?this.write(A):"";return this.lastNeed?B+this.lastChar.toString("base64",0,3-this.lastNeed):B}function r(A){return A.toString(this.encoding)}function h(A){return A&&A.length?this.write(A):""}B.StringDecoder=E,E.prototype.write=function(A){if(0===A.length)return"";var B,Q;if(this.lastNeed){if(void 0===(B=this.fillLast(A)))return"";Q=this.lastNeed,this.lastNeed=0}else Q=0;return Q=0)return I>0&&(A.lastNeed=I-1),I;if(--g=0)return I>0&&(A.lastNeed=I-2),I;if(--g=0)return I>0&&(2===I?I=0:A.lastNeed=I-3),I;return 0}(this,A,B);if(!this.lastNeed)return A.toString("utf8",B);this.lastTotal=Q;var g=A.length-(Q-this.lastNeed);return A.copy(this.lastChar,0,g),A.toString("utf8",B,g)},E.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length}},function(A,B,Q){"use strict";var g=Q(26),I=Object.keys||function(A){var B=[];for(var Q in A)B.push(Q);return B};A.exports=s;var E=Object.create(Q(21));E.inherits=Q(0);var i=Q(59),C=Q(37);E.inherits(s,i);for(var t=I(C.prototype),e=0;e4294967295)throw new RangeError("requested too many random bytes");var Q=I.allocUnsafe(A);if(A>0)if(A>65536)for(var i=0;i2?"one of ".concat(B," ").concat(A.slice(0,Q-1).join(", "),", or ")+A[Q-1]:2===Q?"one of ".concat(B," ").concat(A[0]," or ").concat(A[1]):"of ".concat(B," ").concat(A[0])}return"of ".concat(B," ").concat(String(A))}I("ERR_INVALID_OPT_VALUE",(function(A,B){return'The value "'+B+'" is invalid for option "'+A+'"'}),TypeError),I("ERR_INVALID_ARG_TYPE",(function(A,B,Q){var g,I,i,C;if("string"==typeof B&&(I="not ",B.substr(!i||i<0?0:+i,I.length)===I)?(g="must not be",B=B.replace(/^not /,"")):g="must be",function(A,B,Q){return(void 0===Q||Q>A.length)&&(Q=A.length),A.substring(Q-B.length,Q)===B}(A," argument"))C="The ".concat(A," ").concat(g," ").concat(E(B,"type"));else{var t=function(A,B,Q){return"number"!=typeof Q&&(Q=0),!(Q+B.length>A.length)&&-1!==A.indexOf(B,Q)}(A,".")?"property":"argument";C='The "'.concat(A,'" ').concat(t," ").concat(g," ").concat(E(B,"type"))}return C+=". Received type ".concat(typeof Q)}),TypeError),I("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),I("ERR_METHOD_NOT_IMPLEMENTED",(function(A){return"The "+A+" method is not implemented"})),I("ERR_STREAM_PREMATURE_CLOSE","Premature close"),I("ERR_STREAM_DESTROYED",(function(A){return"Cannot call "+A+" after a stream was destroyed"})),I("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),I("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),I("ERR_STREAM_WRITE_AFTER_END","write after end"),I("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),I("ERR_UNKNOWN_ENCODING",(function(A){return"Unknown encoding: "+A}),TypeError),I("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),A.exports.codes=g},function(A,B,Q){"use strict";(function(B){var g=Object.keys||function(A){var B=[];for(var Q in A)B.push(Q);return B};A.exports=e;var I=Q(51),E=Q(55);Q(0)(e,I);for(var i=g(E.prototype),C=0;C=this._finalSize&&(this._update(this._block),this._block.fill(0));var Q=8*this._len;if(Q<=4294967295)this._block.writeUInt32BE(Q,this._blockSize-4);else{var g=(4294967295&Q)>>>0,I=(Q-g)/4294967296;this._block.writeUInt32BE(I,this._blockSize-8),this._block.writeUInt32BE(g,this._blockSize-4)}this._update(this._block);var E=this._hash();return A?E.toString(A):E},I.prototype._update=function(){throw new Error("_update must be implemented by subclass")},A.exports=I},function(A,B,Q){"use strict";var g={};function I(A,B,Q){Q||(Q=Error);var I=function(A){var Q,g;function I(Q,g,I){return A.call(this,function(A,Q,g){return"string"==typeof B?B:B(A,Q,g)}(Q,g,I))||this}return g=A,(Q=I).prototype=Object.create(g.prototype),Q.prototype.constructor=Q,Q.__proto__=g,I}(Q);I.prototype.name=Q.name,I.prototype.code=A,g[A]=I}function E(A,B){if(Array.isArray(A)){var Q=A.length;return A=A.map((function(A){return String(A)})),Q>2?"one of ".concat(B," ").concat(A.slice(0,Q-1).join(", "),", or ")+A[Q-1]:2===Q?"one of ".concat(B," ").concat(A[0]," or ").concat(A[1]):"of ".concat(B," ").concat(A[0])}return"of ".concat(B," ").concat(String(A))}I("ERR_INVALID_OPT_VALUE",(function(A,B){return'The value "'+B+'" is invalid for option "'+A+'"'}),TypeError),I("ERR_INVALID_ARG_TYPE",(function(A,B,Q){var g,I,i,C;if("string"==typeof B&&(I="not ",B.substr(!i||i<0?0:+i,I.length)===I)?(g="must not be",B=B.replace(/^not /,"")):g="must be",function(A,B,Q){return(void 0===Q||Q>A.length)&&(Q=A.length),A.substring(Q-B.length,Q)===B}(A," argument"))C="The ".concat(A," ").concat(g," ").concat(E(B,"type"));else{var t=function(A,B,Q){return"number"!=typeof Q&&(Q=0),!(Q+B.length>A.length)&&-1!==A.indexOf(B,Q)}(A,".")?"property":"argument";C='The "'.concat(A,'" ').concat(t," ").concat(g," ").concat(E(B,"type"))}return C+=". Received type ".concat(typeof Q)}),TypeError),I("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),I("ERR_METHOD_NOT_IMPLEMENTED",(function(A){return"The "+A+" method is not implemented"})),I("ERR_STREAM_PREMATURE_CLOSE","Premature close"),I("ERR_STREAM_DESTROYED",(function(A){return"Cannot call "+A+" after a stream was destroyed"})),I("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),I("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),I("ERR_STREAM_WRITE_AFTER_END","write after end"),I("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),I("ERR_UNKNOWN_ENCODING",(function(A){return"Unknown encoding: "+A}),TypeError),I("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),A.exports.codes=g},function(A,B,Q){"use strict";(function(B){var g=Object.keys||function(A){var B=[];for(var Q in A)B.push(Q);return B};A.exports=e;var I=Q(80),E=Q(84);Q(0)(e,I);for(var i=g(E.prototype),C=0;C=this._delta8){var Q=(A=this.pending).length%this._delta8;this.pending=A.slice(A.length-Q,A.length),0===this.pending.length&&(this.pending=null),A=g.join32(A,0,A.length-Q,this.endian);for(var I=0;I>>24&255,g[I++]=A>>>16&255,g[I++]=A>>>8&255,g[I++]=255&A}else for(g[I++]=255&A,g[I++]=A>>>8&255,g[I++]=A>>>16&255,g[I++]=A>>>24&255,g[I++]=0,g[I++]=0,g[I++]=0,g[I++]=0,E=8;E>>24]^o[n>>>16&255]^s[a>>>8&255]^r[255&c]^B[y++],i=e[n>>>24]^o[a>>>16&255]^s[c>>>8&255]^r[255&h]^B[y++],C=e[a>>>24]^o[c>>>16&255]^s[h>>>8&255]^r[255&n]^B[y++],t=e[c>>>24]^o[h>>>16&255]^s[n>>>8&255]^r[255&a]^B[y++],h=E,n=i,a=C,c=t;return E=(g[h>>>24]<<24|g[n>>>16&255]<<16|g[a>>>8&255]<<8|g[255&c])^B[y++],i=(g[n>>>24]<<24|g[a>>>16&255]<<16|g[c>>>8&255]<<8|g[255&h])^B[y++],C=(g[a>>>24]<<24|g[c>>>16&255]<<16|g[h>>>8&255]<<8|g[255&n])^B[y++],t=(g[c>>>24]<<24|g[h>>>16&255]<<16|g[n>>>8&255]<<8|g[255&a])^B[y++],[E>>>=0,i>>>=0,C>>>=0,t>>>=0]}var C=[0,1,2,4,8,16,32,64,128,27,54],t=function(){for(var A=new Array(256),B=0;B<256;B++)A[B]=B<128?B<<1:B<<1^283;for(var Q=[],g=[],I=[[],[],[],[]],E=[[],[],[],[]],i=0,C=0,t=0;t<256;++t){var e=C^C<<1^C<<2^C<<3^C<<4;e=e>>>8^255&e^99,Q[i]=e,g[e]=i;var o=A[i],s=A[o],r=A[s],h=257*A[e]^16843008*e;I[0][i]=h<<24|h>>>8,I[1][i]=h<<16|h>>>16,I[2][i]=h<<8|h>>>24,I[3][i]=h,h=16843009*r^65537*s^257*o^16843008*i,E[0][e]=h<<24|h>>>8,E[1][e]=h<<16|h>>>16,E[2][e]=h<<8|h>>>24,E[3][e]=h,0===i?i=C=1:(i=o^A[A[A[r^o]]],C^=A[A[C]])}return{SBOX:Q,INV_SBOX:g,SUB_MIX:I,INV_SUB_MIX:E}}();function e(A){this._key=I(A),this._reset()}e.blockSize=16,e.keySize=32,e.prototype.blockSize=e.blockSize,e.prototype.keySize=e.keySize,e.prototype._reset=function(){for(var A=this._key,B=A.length,Q=B+6,g=4*(Q+1),I=[],E=0;E>>24,i=t.SBOX[i>>>24]<<24|t.SBOX[i>>>16&255]<<16|t.SBOX[i>>>8&255]<<8|t.SBOX[255&i],i^=C[E/B|0]<<24):B>6&&E%B==4&&(i=t.SBOX[i>>>24]<<24|t.SBOX[i>>>16&255]<<16|t.SBOX[i>>>8&255]<<8|t.SBOX[255&i]),I[E]=I[E-B]^i}for(var e=[],o=0;o>>24]]^t.INV_SUB_MIX[1][t.SBOX[r>>>16&255]]^t.INV_SUB_MIX[2][t.SBOX[r>>>8&255]]^t.INV_SUB_MIX[3][t.SBOX[255&r]]}this._nRounds=Q,this._keySchedule=I,this._invKeySchedule=e},e.prototype.encryptBlockRaw=function(A){return i(A=I(A),this._keySchedule,t.SUB_MIX,t.SBOX,this._nRounds)},e.prototype.encryptBlock=function(A){var B=this.encryptBlockRaw(A),Q=g.allocUnsafe(16);return Q.writeUInt32BE(B[0],0),Q.writeUInt32BE(B[1],4),Q.writeUInt32BE(B[2],8),Q.writeUInt32BE(B[3],12),Q},e.prototype.decryptBlock=function(A){var B=(A=I(A))[1];A[1]=A[3],A[3]=B;var Q=i(A,this._invKeySchedule,t.INV_SUB_MIX,t.INV_SBOX,this._nRounds),E=g.allocUnsafe(16);return E.writeUInt32BE(Q[0],0),E.writeUInt32BE(Q[3],4),E.writeUInt32BE(Q[2],8),E.writeUInt32BE(Q[1],12),E},e.prototype.scrub=function(){E(this._keySchedule),E(this._invKeySchedule),E(this._key)},A.exports.AES=e},function(A,B,Q){var g=Q(1).Buffer,I=Q(31);A.exports=function(A,B,Q,E){if(g.isBuffer(A)||(A=g.from(A,"binary")),B&&(g.isBuffer(B)||(B=g.from(B,"binary")),8!==B.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=Q/8,C=g.alloc(i),t=g.alloc(E||0),e=g.alloc(0);i>0||E>0;){var o=new I;o.update(e),o.update(A),B&&o.update(B),e=o.digest();var s=0;if(i>0){var r=C.length-i;s=Math.min(i,e.length),e.copy(C,r,0,s),i-=s}if(s0){var h=t.length-E,n=Math.min(E,e.length-s);e.copy(t,h,s,s+n),E-=n}}return e.fill(0),{key:C,iv:t}}},function(A,B,Q){"use strict";var g=Q(8),I=Q(6),E=I.getNAF,i=I.getJSF,C=I.assert;function t(A,B){this.type=A,this.p=new g(B.p,16),this.red=B.prime?g.red(B.prime):g.mont(this.p),this.zero=new g(0).toRed(this.red),this.one=new g(1).toRed(this.red),this.two=new g(2).toRed(this.red),this.n=B.n&&new g(B.n,16),this.g=B.g&&this.pointFromJSON(B.g,B.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var Q=this.n&&this.p.div(this.n);!Q||Q.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function e(A,B){this.curve=A,this.type=B,this.precomputed=null}A.exports=t,t.prototype.point=function(){throw new Error("Not implemented")},t.prototype.validate=function(){throw new Error("Not implemented")},t.prototype._fixedNafMul=function(A,B){C(A.precomputed);var Q=A._getDoubles(),g=E(B,1,this._bitLength),I=(1<=t;B--)e=(e<<1)+g[B];i.push(e)}for(var o=this.jpoint(null,null,null),s=this.jpoint(null,null,null),r=I;r>0;r--){for(t=0;t=0;e--){for(B=0;e>=0&&0===i[e];e--)B++;if(e>=0&&B++,t=t.dblp(B),e<0)break;var o=i[e];C(0!==o),t="affine"===A.type?o>0?t.mixedAdd(I[o-1>>1]):t.mixedAdd(I[-o-1>>1].neg()):o>0?t.add(I[o-1>>1]):t.add(I[-o-1>>1].neg())}return"affine"===A.type?t.toP():t},t.prototype._wnafMulAdd=function(A,B,Q,g,I){for(var C=this._wnafT1,t=this._wnafT2,e=this._wnafT3,o=0,s=0;s=1;s-=2){var h=s-1,n=s;if(1===C[h]&&1===C[n]){var a=[B[h],null,null,B[n]];0===B[h].y.cmp(B[n].y)?(a[1]=B[h].add(B[n]),a[2]=B[h].toJ().mixedAdd(B[n].neg())):0===B[h].y.cmp(B[n].y.redNeg())?(a[1]=B[h].toJ().mixedAdd(B[n]),a[2]=B[h].add(B[n].neg())):(a[1]=B[h].toJ().mixedAdd(B[n]),a[2]=B[h].toJ().mixedAdd(B[n].neg()));var c=[-3,-1,-5,-7,0,7,5,1,3],y=i(Q[h],Q[n]);o=Math.max(y[0].length,o),e[h]=new Array(o),e[n]=new Array(o);for(var D=0;D=0;s--){for(var d=0;s>=0;){var l=!0;for(D=0;D=0&&d++,w=w.dblp(d),s<0)break;for(D=0;D0?U=t[D][N-1>>1]:N<0&&(U=t[D][-N-1>>1].neg()),w="affine"===U.type?w.mixedAdd(U):w.add(U))}}for(s=0;s=Math.ceil((A.bitLength()+1)/B.step)},e.prototype._getDoubles=function(A,B){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var Q=[this],g=this,I=0;I>>32-B}function e(A,B,Q,g,I,E,i){return t(A+(B&Q|~B&g)+I+E|0,i)+B|0}function o(A,B,Q,g,I,E,i){return t(A+(B&g|Q&~g)+I+E|0,i)+B|0}function s(A,B,Q,g,I,E,i){return t(A+(B^Q^g)+I+E|0,i)+B|0}function r(A,B,Q,g,I,E,i){return t(A+(Q^(B|~g))+I+E|0,i)+B|0}g(C,I),C.prototype._update=function(){for(var A=i,B=0;B<16;++B)A[B]=this._block.readInt32LE(4*B);var Q=this._a,g=this._b,I=this._c,E=this._d;Q=e(Q,g,I,E,A[0],3614090360,7),E=e(E,Q,g,I,A[1],3905402710,12),I=e(I,E,Q,g,A[2],606105819,17),g=e(g,I,E,Q,A[3],3250441966,22),Q=e(Q,g,I,E,A[4],4118548399,7),E=e(E,Q,g,I,A[5],1200080426,12),I=e(I,E,Q,g,A[6],2821735955,17),g=e(g,I,E,Q,A[7],4249261313,22),Q=e(Q,g,I,E,A[8],1770035416,7),E=e(E,Q,g,I,A[9],2336552879,12),I=e(I,E,Q,g,A[10],4294925233,17),g=e(g,I,E,Q,A[11],2304563134,22),Q=e(Q,g,I,E,A[12],1804603682,7),E=e(E,Q,g,I,A[13],4254626195,12),I=e(I,E,Q,g,A[14],2792965006,17),Q=o(Q,g=e(g,I,E,Q,A[15],1236535329,22),I,E,A[1],4129170786,5),E=o(E,Q,g,I,A[6],3225465664,9),I=o(I,E,Q,g,A[11],643717713,14),g=o(g,I,E,Q,A[0],3921069994,20),Q=o(Q,g,I,E,A[5],3593408605,5),E=o(E,Q,g,I,A[10],38016083,9),I=o(I,E,Q,g,A[15],3634488961,14),g=o(g,I,E,Q,A[4],3889429448,20),Q=o(Q,g,I,E,A[9],568446438,5),E=o(E,Q,g,I,A[14],3275163606,9),I=o(I,E,Q,g,A[3],4107603335,14),g=o(g,I,E,Q,A[8],1163531501,20),Q=o(Q,g,I,E,A[13],2850285829,5),E=o(E,Q,g,I,A[2],4243563512,9),I=o(I,E,Q,g,A[7],1735328473,14),Q=s(Q,g=o(g,I,E,Q,A[12],2368359562,20),I,E,A[5],4294588738,4),E=s(E,Q,g,I,A[8],2272392833,11),I=s(I,E,Q,g,A[11],1839030562,16),g=s(g,I,E,Q,A[14],4259657740,23),Q=s(Q,g,I,E,A[1],2763975236,4),E=s(E,Q,g,I,A[4],1272893353,11),I=s(I,E,Q,g,A[7],4139469664,16),g=s(g,I,E,Q,A[10],3200236656,23),Q=s(Q,g,I,E,A[13],681279174,4),E=s(E,Q,g,I,A[0],3936430074,11),I=s(I,E,Q,g,A[3],3572445317,16),g=s(g,I,E,Q,A[6],76029189,23),Q=s(Q,g,I,E,A[9],3654602809,4),E=s(E,Q,g,I,A[12],3873151461,11),I=s(I,E,Q,g,A[15],530742520,16),Q=r(Q,g=s(g,I,E,Q,A[2],3299628645,23),I,E,A[0],4096336452,6),E=r(E,Q,g,I,A[7],1126891415,10),I=r(I,E,Q,g,A[14],2878612391,15),g=r(g,I,E,Q,A[5],4237533241,21),Q=r(Q,g,I,E,A[12],1700485571,6),E=r(E,Q,g,I,A[3],2399980690,10),I=r(I,E,Q,g,A[10],4293915773,15),g=r(g,I,E,Q,A[1],2240044497,21),Q=r(Q,g,I,E,A[8],1873313359,6),E=r(E,Q,g,I,A[15],4264355552,10),I=r(I,E,Q,g,A[6],2734768916,15),g=r(g,I,E,Q,A[13],1309151649,21),Q=r(Q,g,I,E,A[4],4149444226,6),E=r(E,Q,g,I,A[11],3174756917,10),I=r(I,E,Q,g,A[2],718787259,15),g=r(g,I,E,Q,A[9],3951481745,21),this._a=this._a+Q|0,this._b=this._b+g|0,this._c=this._c+I|0,this._d=this._d+E|0},C.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var A=E.allocUnsafe(16);return A.writeInt32LE(this._a,0),A.writeInt32LE(this._b,4),A.writeInt32LE(this._c,8),A.writeInt32LE(this._d,12),A},A.exports=C},function(A,B,Q){(function(B){function Q(A){try{if(!B.localStorage)return!1}catch(A){return!1}var Q=B.localStorage[A];return null!=Q&&"true"===String(Q).toLowerCase()}A.exports=function(A,B){if(Q("noDeprecation"))return A;var g=!1;return function(){if(!g){if(Q("throwDeprecation"))throw new Error(B);Q("traceDeprecation")?console.trace(B):console.warn(B),g=!0}return A.apply(this,arguments)}}}).call(this,Q(4))},function(A,B,Q){"use strict";var g=Q(15).codes.ERR_STREAM_PREMATURE_CLOSE;function I(){}A.exports=function A(B,Q,E){if("function"==typeof Q)return A(B,null,Q);Q||(Q={}),E=function(A){var B=!1;return function(){if(!B){B=!0;for(var Q=arguments.length,g=new Array(Q),I=0;I>>32-B}function a(A,B,Q,g,I,E,i,C){return n(A+(B^Q^g)+E+i|0,C)+I|0}function c(A,B,Q,g,I,E,i,C){return n(A+(B&Q|~B&g)+E+i|0,C)+I|0}function y(A,B,Q,g,I,E,i,C){return n(A+((B|~Q)^g)+E+i|0,C)+I|0}function D(A,B,Q,g,I,E,i,C){return n(A+(B&g|Q&~g)+E+i|0,C)+I|0}function u(A,B,Q,g,I,E,i,C){return n(A+(B^(Q|~g))+E+i|0,C)+I|0}I(h,E),h.prototype._update=function(){for(var A=i,B=0;B<16;++B)A[B]=this._block.readInt32LE(4*B);for(var Q=0|this._a,g=0|this._b,I=0|this._c,E=0|this._d,h=0|this._e,f=0|this._a,w=0|this._b,F=0|this._c,d=0|this._d,l=0|this._e,U=0;U<80;U+=1){var N,H;U<16?(N=a(Q,g,I,E,h,A[C[U]],s[0],e[U]),H=u(f,w,F,d,l,A[t[U]],r[0],o[U])):U<32?(N=c(Q,g,I,E,h,A[C[U]],s[1],e[U]),H=D(f,w,F,d,l,A[t[U]],r[1],o[U])):U<48?(N=y(Q,g,I,E,h,A[C[U]],s[2],e[U]),H=y(f,w,F,d,l,A[t[U]],r[2],o[U])):U<64?(N=D(Q,g,I,E,h,A[C[U]],s[3],e[U]),H=c(f,w,F,d,l,A[t[U]],r[3],o[U])):(N=u(Q,g,I,E,h,A[C[U]],s[4],e[U]),H=a(f,w,F,d,l,A[t[U]],r[4],o[U])),Q=h,h=E,E=n(I,10),I=g,g=N,f=l,l=d,d=n(F,10),F=w,w=H}var G=this._b+I+d|0;this._b=this._c+E+l|0,this._c=this._d+h+f|0,this._d=this._e+Q+w|0,this._e=this._a+g+F|0,this._a=G},h.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var A=g.alloc?g.alloc(20):new g(20);return A.writeInt32LE(this._a,0),A.writeInt32LE(this._b,4),A.writeInt32LE(this._c,8),A.writeInt32LE(this._d,12),A.writeInt32LE(this._e,16),A},A.exports=h},function(A,B,Q){(B=A.exports=function(A){A=A.toLowerCase();var Q=B[A];if(!Q)throw new Error(A+" is not supported (we accept pull requests)");return new Q}).sha=Q(115),B.sha1=Q(116),B.sha224=Q(117),B.sha256=Q(57),B.sha384=Q(118),B.sha512=Q(58)},function(A,B,Q){(B=A.exports=Q(59)).Stream=B,B.Readable=B,B.Writable=Q(37),B.Duplex=Q(13),B.Transform=Q(62),B.PassThrough=Q(125)},function(A,B,Q){"use strict";(function(B,g,I){var E=Q(26);function i(A){var B=this;this.next=null,this.entry=null,this.finish=function(){!function(A,B,Q){var g=A.entry;A.entry=null;for(;g;){var I=g.callback;B.pendingcb--,I(Q),g=g.next}B.corkedRequestsFree?B.corkedRequestsFree.next=A:B.corkedRequestsFree=A}(B,A)}}A.exports=D;var C,t=!B.browser&&["v0.10","v0.9."].indexOf(B.version.slice(0,5))>-1?g:E.nextTick;D.WritableState=y;var e=Object.create(Q(21));e.inherits=Q(0);var o={deprecate:Q(32)},s=Q(60),r=Q(1).Buffer,h=I.Uint8Array||function(){};var n,a=Q(61);function c(){}function y(A,B){C=C||Q(13),A=A||{};var g=B instanceof C;this.objectMode=!!A.objectMode,g&&(this.objectMode=this.objectMode||!!A.writableObjectMode);var I=A.highWaterMark,e=A.writableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=I||0===I?I:g&&(e||0===e)?e:o,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===A.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=A.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(A){!function(A,B){var Q=A._writableState,g=Q.sync,I=Q.writecb;if(function(A){A.writing=!1,A.writecb=null,A.length-=A.writelen,A.writelen=0}(Q),B)!function(A,B,Q,g,I){--B.pendingcb,Q?(E.nextTick(I,g),E.nextTick(l,A,B),A._writableState.errorEmitted=!0,A.emit("error",g)):(I(g),A._writableState.errorEmitted=!0,A.emit("error",g),l(A,B))}(A,Q,g,B,I);else{var i=F(Q);i||Q.corked||Q.bufferProcessing||!Q.bufferedRequest||w(A,Q),g?t(f,A,Q,i,I):f(A,Q,i,I)}}(B,A)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function D(A){if(C=C||Q(13),!(n.call(D,this)||this instanceof C))return new D(A);this._writableState=new y(A,this),this.writable=!0,A&&("function"==typeof A.write&&(this._write=A.write),"function"==typeof A.writev&&(this._writev=A.writev),"function"==typeof A.destroy&&(this._destroy=A.destroy),"function"==typeof A.final&&(this._final=A.final)),s.call(this)}function u(A,B,Q,g,I,E,i){B.writelen=g,B.writecb=i,B.writing=!0,B.sync=!0,Q?A._writev(I,B.onwrite):A._write(I,E,B.onwrite),B.sync=!1}function f(A,B,Q,g){Q||function(A,B){0===B.length&&B.needDrain&&(B.needDrain=!1,A.emit("drain"))}(A,B),B.pendingcb--,g(),l(A,B)}function w(A,B){B.bufferProcessing=!0;var Q=B.bufferedRequest;if(A._writev&&Q&&Q.next){var g=B.bufferedRequestCount,I=new Array(g),E=B.corkedRequestsFree;E.entry=Q;for(var C=0,t=!0;Q;)I[C]=Q,Q.isBuf||(t=!1),Q=Q.next,C+=1;I.allBuffers=t,u(A,B,!0,B.length,I,"",E.finish),B.pendingcb++,B.lastBufferedRequest=null,E.next?(B.corkedRequestsFree=E.next,E.next=null):B.corkedRequestsFree=new i(B),B.bufferedRequestCount=0}else{for(;Q;){var e=Q.chunk,o=Q.encoding,s=Q.callback;if(u(A,B,!1,B.objectMode?1:e.length,e,o,s),Q=Q.next,B.bufferedRequestCount--,B.writing)break}null===Q&&(B.lastBufferedRequest=null)}B.bufferedRequest=Q,B.bufferProcessing=!1}function F(A){return A.ending&&0===A.length&&null===A.bufferedRequest&&!A.finished&&!A.writing}function d(A,B){A._final((function(Q){B.pendingcb--,Q&&A.emit("error",Q),B.prefinished=!0,A.emit("prefinish"),l(A,B)}))}function l(A,B){var Q=F(B);return Q&&(!function(A,B){B.prefinished||B.finalCalled||("function"==typeof A._final?(B.pendingcb++,B.finalCalled=!0,E.nextTick(d,A,B)):(B.prefinished=!0,A.emit("prefinish")))}(A,B),0===B.pendingcb&&(B.finished=!0,A.emit("finish"))),Q}e.inherits(D,s),y.prototype.getBuffer=function(){for(var A=this.bufferedRequest,B=[];A;)B.push(A),A=A.next;return B},function(){try{Object.defineProperty(y.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(A){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(A){return!!n.call(this,A)||this===D&&(A&&A._writableState instanceof y)}})):n=function(A){return A instanceof this},D.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},D.prototype.write=function(A,B,Q){var g,I=this._writableState,i=!1,C=!I.objectMode&&(g=A,r.isBuffer(g)||g instanceof h);return C&&!r.isBuffer(A)&&(A=function(A){return r.from(A)}(A)),"function"==typeof B&&(Q=B,B=null),C?B="buffer":B||(B=I.defaultEncoding),"function"!=typeof Q&&(Q=c),I.ended?function(A,B){var Q=new Error("write after end");A.emit("error",Q),E.nextTick(B,Q)}(this,Q):(C||function(A,B,Q,g){var I=!0,i=!1;return null===Q?i=new TypeError("May not write null values to stream"):"string"==typeof Q||void 0===Q||B.objectMode||(i=new TypeError("Invalid non-string/buffer chunk")),i&&(A.emit("error",i),E.nextTick(g,i),I=!1),I}(this,I,A,Q))&&(I.pendingcb++,i=function(A,B,Q,g,I,E){if(!Q){var i=function(A,B,Q){A.objectMode||!1===A.decodeStrings||"string"!=typeof B||(B=r.from(B,Q));return B}(B,g,I);g!==i&&(Q=!0,I="buffer",g=i)}var C=B.objectMode?1:g.length;B.length+=C;var t=B.length-1))throw new TypeError("Unknown encoding: "+A);return this._writableState.defaultEncoding=A,this},Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),D.prototype._write=function(A,B,Q){Q(new Error("_write() is not implemented"))},D.prototype._writev=null,D.prototype.end=function(A,B,Q){var g=this._writableState;"function"==typeof A?(Q=A,A=null,B=null):"function"==typeof B&&(Q=B,B=null),null!=A&&this.write(A,B),g.corked&&(g.corked=1,this.uncork()),g.ending||g.finished||function(A,B,Q){B.ending=!0,l(A,B),Q&&(B.finished?E.nextTick(Q):A.once("finish",Q));B.ended=!0,A.writable=!1}(this,g,Q)},Object.defineProperty(D.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(A){this._writableState&&(this._writableState.destroyed=A)}}),D.prototype.destroy=a.destroy,D.prototype._undestroy=a.undestroy,D.prototype._destroy=function(A,B){this.end(),B(A)}}).call(this,Q(3),Q(123).setImmediate,Q(4))},function(A,B,Q){"use strict";var g=Q(5);function I(A){this.options=A,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}A.exports=I,I.prototype._init=function(){},I.prototype.update=function(A){return 0===A.length?[]:"decrypt"===this.type?this._updateDecrypt(A):this._updateEncrypt(A)},I.prototype._buffer=function(A,B){for(var Q=Math.min(this.buffer.length-this.bufferOff,A.length-B),g=0;g0;g--)B+=this._buffer(A,B),Q+=this._flushBuffer(I,Q);return B+=this._buffer(A,B),I},I.prototype.final=function(A){var B,Q;return A&&(B=this.update(A)),Q="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),B?B.concat(Q):Q},I.prototype._pad=function(A,B){if(0===B)return!1;for(;B=0||!Q.umod(A.prime1)||!Q.umod(A.prime2);)Q=new g(I(B));return Q}A.exports=E,E.getr=i}).call(this,Q(2).Buffer)},function(A,B,Q){"use strict";var g=B;g.version=Q(167).version,g.utils=Q(6),g.rand=Q(41),g.curve=Q(87),g.curves=Q(45),g.ec=Q(179),g.eddsa=Q(183)},function(A,B,Q){"use strict";var g,I=B,E=Q(46),i=Q(87),C=Q(6).assert;function t(A){"short"===A.type?this.curve=new i.short(A):"edwards"===A.type?this.curve=new i.edwards(A):this.curve=new i.mont(A),this.g=this.curve.g,this.n=this.curve.n,this.hash=A.hash,C(this.g.validate(),"Invalid curve"),C(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function e(A,B){Object.defineProperty(I,A,{configurable:!0,enumerable:!0,get:function(){var Q=new t(B);return Object.defineProperty(I,A,{configurable:!0,enumerable:!0,value:Q}),Q}})}I.PresetCurve=t,e("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:E.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),e("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:E.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),e("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:E.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),e("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:E.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),e("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:E.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),e("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:E.sha256,gRed:!1,g:["9"]}),e("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:E.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{g=Q(178)}catch(A){g=void 0}e("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:E.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",g]})},function(A,B,Q){var g=B;g.utils=Q(7),g.common=Q(23),g.sha=Q(172),g.ripemd=Q(176),g.hmac=Q(177),g.sha1=g.sha.sha1,g.sha256=g.sha.sha256,g.sha224=g.sha.sha224,g.sha384=g.sha.sha384,g.sha512=g.sha.sha512,g.ripemd160=g.ripemd.ripemd160},function(A,B,Q){(function(A){!function(A,B){"use strict";function g(A,B){if(!A)throw new Error(B||"Assertion failed")}function I(A,B){A.super_=B;var Q=function(){};Q.prototype=B.prototype,A.prototype=new Q,A.prototype.constructor=A}function E(A,B,Q){if(E.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,null!==A&&("le"!==B&&"be"!==B||(Q=B,B=10),this._init(A||0,B||10,Q||"be"))}var i;"object"==typeof A?A.exports=E:B.BN=E,E.BN=E,E.wordSize=26;try{i=Q(208).Buffer}catch(A){}function C(A,B,Q){for(var g=0,I=Math.min(A.length,Q),E=B;E=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return g}function t(A,B,Q,g){for(var I=0,E=Math.min(A.length,Q),i=B;i=49?C-49+10:C>=17?C-17+10:C}return I}E.isBN=function(A){return A instanceof E||null!==A&&"object"==typeof A&&A.constructor.wordSize===E.wordSize&&Array.isArray(A.words)},E.max=function(A,B){return A.cmp(B)>0?A:B},E.min=function(A,B){return A.cmp(B)<0?A:B},E.prototype._init=function(A,B,Q){if("number"==typeof A)return this._initNumber(A,B,Q);if("object"==typeof A)return this._initArray(A,B,Q);"hex"===B&&(B=16),g(B===(0|B)&&B>=2&&B<=36);var I=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&I++,16===B?this._parseHex(A,I):this._parseBase(A,B,I),"-"===A[0]&&(this.negative=1),this.strip(),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initNumber=function(A,B,Q){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[67108863&A],this.length=1):A<4503599627370496?(this.words=[67108863&A,A/67108864&67108863],this.length=2):(g(A<9007199254740992),this.words=[67108863&A,A/67108864&67108863,1],this.length=3),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initArray=function(A,B,Q){if(g("number"==typeof A.length),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var I=0;I=0;I-=3)i=A[I]|A[I-1]<<8|A[I-2]<<16,this.words[E]|=i<>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);else if("le"===Q)for(I=0,E=0;I>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);return this.strip()},E.prototype._parseHex=function(A,B){this.length=Math.ceil((A.length-B)/6),this.words=new Array(this.length);for(var Q=0;Q=B;Q-=6)I=C(A,Q,Q+6),this.words[g]|=I<>>26-E&4194303,(E+=24)>=26&&(E-=26,g++);Q+6!==B&&(I=C(A,B,Q+6),this.words[g]|=I<>>26-E&4194303),this.strip()},E.prototype._parseBase=function(A,B,Q){this.words=[0],this.length=1;for(var g=0,I=1;I<=67108863;I*=B)g++;g--,I=I/B|0;for(var E=A.length-Q,i=E%g,C=Math.min(E,E-i)+Q,e=0,o=Q;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},E.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},E.prototype.inspect=function(){return(this.red?""};var e=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],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],s=[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 r(A,B,Q){Q.negative=B.negative^A.negative;var g=A.length+B.length|0;Q.length=g,g=g-1|0;var I=0|A.words[0],E=0|B.words[0],i=I*E,C=67108863&i,t=i/67108864|0;Q.words[0]=C;for(var e=1;e>>26,s=67108863&t,r=Math.min(e,B.length-1),h=Math.max(0,e-A.length+1);h<=r;h++){var n=e-h|0;o+=(i=(I=0|A.words[n])*(E=0|B.words[h])+s)/67108864|0,s=67108863&i}Q.words[e]=0|s,t=0|o}return 0!==t?Q.words[e]=0|t:Q.length--,Q.strip()}E.prototype.toString=function(A,B){var Q;if(B=0|B||1,16===(A=A||10)||"hex"===A){Q="";for(var I=0,E=0,i=0;i>>24-I&16777215)||i!==this.length-1?e[6-t.length]+t+Q:t+Q,(I+=2)>=26&&(I-=26,i--)}for(0!==E&&(Q=E.toString(16)+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}if(A===(0|A)&&A>=2&&A<=36){var r=o[A],h=s[A];Q="";var n=this.clone();for(n.negative=0;!n.isZero();){var a=n.modn(h).toString(A);Q=(n=n.idivn(h)).isZero()?a+Q:e[r-a.length]+a+Q}for(this.isZero()&&(Q="0"+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}g(!1,"Base should be between 2 and 36")},E.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&g(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},E.prototype.toJSON=function(){return this.toString(16)},E.prototype.toBuffer=function(A,B){return g(void 0!==i),this.toArrayLike(i,A,B)},E.prototype.toArray=function(A,B){return this.toArrayLike(Array,A,B)},E.prototype.toArrayLike=function(A,B,Q){var I=this.byteLength(),E=Q||Math.max(1,I);g(I<=E,"byte array longer than desired length"),g(E>0,"Requested array length <= 0"),this.strip();var i,C,t="le"===B,e=new A(E),o=this.clone();if(t){for(C=0;!o.isZero();C++)i=o.andln(255),o.iushrn(8),e[C]=i;for(;C=4096&&(Q+=13,B>>>=13),B>=64&&(Q+=7,B>>>=7),B>=8&&(Q+=4,B>>>=4),B>=2&&(Q+=2,B>>>=2),Q+B},E.prototype._zeroBits=function(A){if(0===A)return 26;var B=A,Q=0;return 0==(8191&B)&&(Q+=13,B>>>=13),0==(127&B)&&(Q+=7,B>>>=7),0==(15&B)&&(Q+=4,B>>>=4),0==(3&B)&&(Q+=2,B>>>=2),0==(1&B)&&Q++,Q},E.prototype.bitLength=function(){var A=this.words[this.length-1],B=this._countBits(A);return 26*(this.length-1)+B},E.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,B=0;BA.length?this.clone().ior(A):A.clone().ior(this)},E.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},E.prototype.iuand=function(A){var B;B=this.length>A.length?A:this;for(var Q=0;QA.length?this.clone().iand(A):A.clone().iand(this)},E.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},E.prototype.iuxor=function(A){var B,Q;this.length>A.length?(B=this,Q=A):(B=A,Q=this);for(var g=0;gA.length?this.clone().ixor(A):A.clone().ixor(this)},E.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},E.prototype.inotn=function(A){g("number"==typeof A&&A>=0);var B=0|Math.ceil(A/26),Q=A%26;this._expand(B),Q>0&&B--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-Q),this.strip()},E.prototype.notn=function(A){return this.clone().inotn(A)},E.prototype.setn=function(A,B){g("number"==typeof A&&A>=0);var Q=A/26|0,I=A%26;return this._expand(Q+1),this.words[Q]=B?this.words[Q]|1<A.length?(Q=this,g=A):(Q=A,g=this);for(var I=0,E=0;E>>26;for(;0!==I&&E>>26;if(this.length=Q.length,0!==I)this.words[this.length]=I,this.length++;else if(Q!==this)for(;EA.length?this.clone().iadd(A):A.clone().iadd(this)},E.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var B=this.iadd(A);return A.negative=1,B._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var Q,g,I=this.cmp(A);if(0===I)return this.negative=0,this.length=1,this.words[0]=0,this;I>0?(Q=this,g=A):(Q=A,g=this);for(var E=0,i=0;i>26,this.words[i]=67108863&B;for(;0!==E&&i>26,this.words[i]=67108863&B;if(0===E&&i>>13,h=0|i[1],n=8191&h,a=h>>>13,c=0|i[2],y=8191&c,D=c>>>13,u=0|i[3],f=8191&u,w=u>>>13,F=0|i[4],d=8191&F,l=F>>>13,U=0|i[5],N=8191&U,H=U>>>13,G=0|i[6],Y=8191&G,L=G>>>13,R=0|i[7],p=8191&R,M=R>>>13,m=0|i[8],k=8191&m,S=m>>>13,b=0|i[9],v=8191&b,J=b>>>13,V=0|C[0],K=8191&V,x=V>>>13,Z=0|C[1],q=8191&Z,O=Z>>>13,j=0|C[2],W=8191&j,X=j>>>13,T=0|C[3],z=8191&T,_=T>>>13,P=0|C[4],$=8191&P,AA=P>>>13,BA=0|C[5],QA=8191&BA,gA=BA>>>13,IA=0|C[6],EA=8191&IA,iA=IA>>>13,CA=0|C[7],tA=8191&CA,eA=CA>>>13,oA=0|C[8],sA=8191&oA,rA=oA>>>13,hA=0|C[9],nA=8191&hA,aA=hA>>>13;Q.negative=A.negative^B.negative,Q.length=19;var cA=(e+(g=Math.imul(s,K))|0)+((8191&(I=(I=Math.imul(s,x))+Math.imul(r,K)|0))<<13)|0;e=((E=Math.imul(r,x))+(I>>>13)|0)+(cA>>>26)|0,cA&=67108863,g=Math.imul(n,K),I=(I=Math.imul(n,x))+Math.imul(a,K)|0,E=Math.imul(a,x);var yA=(e+(g=g+Math.imul(s,q)|0)|0)+((8191&(I=(I=I+Math.imul(s,O)|0)+Math.imul(r,q)|0))<<13)|0;e=((E=E+Math.imul(r,O)|0)+(I>>>13)|0)+(yA>>>26)|0,yA&=67108863,g=Math.imul(y,K),I=(I=Math.imul(y,x))+Math.imul(D,K)|0,E=Math.imul(D,x),g=g+Math.imul(n,q)|0,I=(I=I+Math.imul(n,O)|0)+Math.imul(a,q)|0,E=E+Math.imul(a,O)|0;var DA=(e+(g=g+Math.imul(s,W)|0)|0)+((8191&(I=(I=I+Math.imul(s,X)|0)+Math.imul(r,W)|0))<<13)|0;e=((E=E+Math.imul(r,X)|0)+(I>>>13)|0)+(DA>>>26)|0,DA&=67108863,g=Math.imul(f,K),I=(I=Math.imul(f,x))+Math.imul(w,K)|0,E=Math.imul(w,x),g=g+Math.imul(y,q)|0,I=(I=I+Math.imul(y,O)|0)+Math.imul(D,q)|0,E=E+Math.imul(D,O)|0,g=g+Math.imul(n,W)|0,I=(I=I+Math.imul(n,X)|0)+Math.imul(a,W)|0,E=E+Math.imul(a,X)|0;var uA=(e+(g=g+Math.imul(s,z)|0)|0)+((8191&(I=(I=I+Math.imul(s,_)|0)+Math.imul(r,z)|0))<<13)|0;e=((E=E+Math.imul(r,_)|0)+(I>>>13)|0)+(uA>>>26)|0,uA&=67108863,g=Math.imul(d,K),I=(I=Math.imul(d,x))+Math.imul(l,K)|0,E=Math.imul(l,x),g=g+Math.imul(f,q)|0,I=(I=I+Math.imul(f,O)|0)+Math.imul(w,q)|0,E=E+Math.imul(w,O)|0,g=g+Math.imul(y,W)|0,I=(I=I+Math.imul(y,X)|0)+Math.imul(D,W)|0,E=E+Math.imul(D,X)|0,g=g+Math.imul(n,z)|0,I=(I=I+Math.imul(n,_)|0)+Math.imul(a,z)|0,E=E+Math.imul(a,_)|0;var fA=(e+(g=g+Math.imul(s,$)|0)|0)+((8191&(I=(I=I+Math.imul(s,AA)|0)+Math.imul(r,$)|0))<<13)|0;e=((E=E+Math.imul(r,AA)|0)+(I>>>13)|0)+(fA>>>26)|0,fA&=67108863,g=Math.imul(N,K),I=(I=Math.imul(N,x))+Math.imul(H,K)|0,E=Math.imul(H,x),g=g+Math.imul(d,q)|0,I=(I=I+Math.imul(d,O)|0)+Math.imul(l,q)|0,E=E+Math.imul(l,O)|0,g=g+Math.imul(f,W)|0,I=(I=I+Math.imul(f,X)|0)+Math.imul(w,W)|0,E=E+Math.imul(w,X)|0,g=g+Math.imul(y,z)|0,I=(I=I+Math.imul(y,_)|0)+Math.imul(D,z)|0,E=E+Math.imul(D,_)|0,g=g+Math.imul(n,$)|0,I=(I=I+Math.imul(n,AA)|0)+Math.imul(a,$)|0,E=E+Math.imul(a,AA)|0;var wA=(e+(g=g+Math.imul(s,QA)|0)|0)+((8191&(I=(I=I+Math.imul(s,gA)|0)+Math.imul(r,QA)|0))<<13)|0;e=((E=E+Math.imul(r,gA)|0)+(I>>>13)|0)+(wA>>>26)|0,wA&=67108863,g=Math.imul(Y,K),I=(I=Math.imul(Y,x))+Math.imul(L,K)|0,E=Math.imul(L,x),g=g+Math.imul(N,q)|0,I=(I=I+Math.imul(N,O)|0)+Math.imul(H,q)|0,E=E+Math.imul(H,O)|0,g=g+Math.imul(d,W)|0,I=(I=I+Math.imul(d,X)|0)+Math.imul(l,W)|0,E=E+Math.imul(l,X)|0,g=g+Math.imul(f,z)|0,I=(I=I+Math.imul(f,_)|0)+Math.imul(w,z)|0,E=E+Math.imul(w,_)|0,g=g+Math.imul(y,$)|0,I=(I=I+Math.imul(y,AA)|0)+Math.imul(D,$)|0,E=E+Math.imul(D,AA)|0,g=g+Math.imul(n,QA)|0,I=(I=I+Math.imul(n,gA)|0)+Math.imul(a,QA)|0,E=E+Math.imul(a,gA)|0;var FA=(e+(g=g+Math.imul(s,EA)|0)|0)+((8191&(I=(I=I+Math.imul(s,iA)|0)+Math.imul(r,EA)|0))<<13)|0;e=((E=E+Math.imul(r,iA)|0)+(I>>>13)|0)+(FA>>>26)|0,FA&=67108863,g=Math.imul(p,K),I=(I=Math.imul(p,x))+Math.imul(M,K)|0,E=Math.imul(M,x),g=g+Math.imul(Y,q)|0,I=(I=I+Math.imul(Y,O)|0)+Math.imul(L,q)|0,E=E+Math.imul(L,O)|0,g=g+Math.imul(N,W)|0,I=(I=I+Math.imul(N,X)|0)+Math.imul(H,W)|0,E=E+Math.imul(H,X)|0,g=g+Math.imul(d,z)|0,I=(I=I+Math.imul(d,_)|0)+Math.imul(l,z)|0,E=E+Math.imul(l,_)|0,g=g+Math.imul(f,$)|0,I=(I=I+Math.imul(f,AA)|0)+Math.imul(w,$)|0,E=E+Math.imul(w,AA)|0,g=g+Math.imul(y,QA)|0,I=(I=I+Math.imul(y,gA)|0)+Math.imul(D,QA)|0,E=E+Math.imul(D,gA)|0,g=g+Math.imul(n,EA)|0,I=(I=I+Math.imul(n,iA)|0)+Math.imul(a,EA)|0,E=E+Math.imul(a,iA)|0;var dA=(e+(g=g+Math.imul(s,tA)|0)|0)+((8191&(I=(I=I+Math.imul(s,eA)|0)+Math.imul(r,tA)|0))<<13)|0;e=((E=E+Math.imul(r,eA)|0)+(I>>>13)|0)+(dA>>>26)|0,dA&=67108863,g=Math.imul(k,K),I=(I=Math.imul(k,x))+Math.imul(S,K)|0,E=Math.imul(S,x),g=g+Math.imul(p,q)|0,I=(I=I+Math.imul(p,O)|0)+Math.imul(M,q)|0,E=E+Math.imul(M,O)|0,g=g+Math.imul(Y,W)|0,I=(I=I+Math.imul(Y,X)|0)+Math.imul(L,W)|0,E=E+Math.imul(L,X)|0,g=g+Math.imul(N,z)|0,I=(I=I+Math.imul(N,_)|0)+Math.imul(H,z)|0,E=E+Math.imul(H,_)|0,g=g+Math.imul(d,$)|0,I=(I=I+Math.imul(d,AA)|0)+Math.imul(l,$)|0,E=E+Math.imul(l,AA)|0,g=g+Math.imul(f,QA)|0,I=(I=I+Math.imul(f,gA)|0)+Math.imul(w,QA)|0,E=E+Math.imul(w,gA)|0,g=g+Math.imul(y,EA)|0,I=(I=I+Math.imul(y,iA)|0)+Math.imul(D,EA)|0,E=E+Math.imul(D,iA)|0,g=g+Math.imul(n,tA)|0,I=(I=I+Math.imul(n,eA)|0)+Math.imul(a,tA)|0,E=E+Math.imul(a,eA)|0;var lA=(e+(g=g+Math.imul(s,sA)|0)|0)+((8191&(I=(I=I+Math.imul(s,rA)|0)+Math.imul(r,sA)|0))<<13)|0;e=((E=E+Math.imul(r,rA)|0)+(I>>>13)|0)+(lA>>>26)|0,lA&=67108863,g=Math.imul(v,K),I=(I=Math.imul(v,x))+Math.imul(J,K)|0,E=Math.imul(J,x),g=g+Math.imul(k,q)|0,I=(I=I+Math.imul(k,O)|0)+Math.imul(S,q)|0,E=E+Math.imul(S,O)|0,g=g+Math.imul(p,W)|0,I=(I=I+Math.imul(p,X)|0)+Math.imul(M,W)|0,E=E+Math.imul(M,X)|0,g=g+Math.imul(Y,z)|0,I=(I=I+Math.imul(Y,_)|0)+Math.imul(L,z)|0,E=E+Math.imul(L,_)|0,g=g+Math.imul(N,$)|0,I=(I=I+Math.imul(N,AA)|0)+Math.imul(H,$)|0,E=E+Math.imul(H,AA)|0,g=g+Math.imul(d,QA)|0,I=(I=I+Math.imul(d,gA)|0)+Math.imul(l,QA)|0,E=E+Math.imul(l,gA)|0,g=g+Math.imul(f,EA)|0,I=(I=I+Math.imul(f,iA)|0)+Math.imul(w,EA)|0,E=E+Math.imul(w,iA)|0,g=g+Math.imul(y,tA)|0,I=(I=I+Math.imul(y,eA)|0)+Math.imul(D,tA)|0,E=E+Math.imul(D,eA)|0,g=g+Math.imul(n,sA)|0,I=(I=I+Math.imul(n,rA)|0)+Math.imul(a,sA)|0,E=E+Math.imul(a,rA)|0;var UA=(e+(g=g+Math.imul(s,nA)|0)|0)+((8191&(I=(I=I+Math.imul(s,aA)|0)+Math.imul(r,nA)|0))<<13)|0;e=((E=E+Math.imul(r,aA)|0)+(I>>>13)|0)+(UA>>>26)|0,UA&=67108863,g=Math.imul(v,q),I=(I=Math.imul(v,O))+Math.imul(J,q)|0,E=Math.imul(J,O),g=g+Math.imul(k,W)|0,I=(I=I+Math.imul(k,X)|0)+Math.imul(S,W)|0,E=E+Math.imul(S,X)|0,g=g+Math.imul(p,z)|0,I=(I=I+Math.imul(p,_)|0)+Math.imul(M,z)|0,E=E+Math.imul(M,_)|0,g=g+Math.imul(Y,$)|0,I=(I=I+Math.imul(Y,AA)|0)+Math.imul(L,$)|0,E=E+Math.imul(L,AA)|0,g=g+Math.imul(N,QA)|0,I=(I=I+Math.imul(N,gA)|0)+Math.imul(H,QA)|0,E=E+Math.imul(H,gA)|0,g=g+Math.imul(d,EA)|0,I=(I=I+Math.imul(d,iA)|0)+Math.imul(l,EA)|0,E=E+Math.imul(l,iA)|0,g=g+Math.imul(f,tA)|0,I=(I=I+Math.imul(f,eA)|0)+Math.imul(w,tA)|0,E=E+Math.imul(w,eA)|0,g=g+Math.imul(y,sA)|0,I=(I=I+Math.imul(y,rA)|0)+Math.imul(D,sA)|0,E=E+Math.imul(D,rA)|0;var NA=(e+(g=g+Math.imul(n,nA)|0)|0)+((8191&(I=(I=I+Math.imul(n,aA)|0)+Math.imul(a,nA)|0))<<13)|0;e=((E=E+Math.imul(a,aA)|0)+(I>>>13)|0)+(NA>>>26)|0,NA&=67108863,g=Math.imul(v,W),I=(I=Math.imul(v,X))+Math.imul(J,W)|0,E=Math.imul(J,X),g=g+Math.imul(k,z)|0,I=(I=I+Math.imul(k,_)|0)+Math.imul(S,z)|0,E=E+Math.imul(S,_)|0,g=g+Math.imul(p,$)|0,I=(I=I+Math.imul(p,AA)|0)+Math.imul(M,$)|0,E=E+Math.imul(M,AA)|0,g=g+Math.imul(Y,QA)|0,I=(I=I+Math.imul(Y,gA)|0)+Math.imul(L,QA)|0,E=E+Math.imul(L,gA)|0,g=g+Math.imul(N,EA)|0,I=(I=I+Math.imul(N,iA)|0)+Math.imul(H,EA)|0,E=E+Math.imul(H,iA)|0,g=g+Math.imul(d,tA)|0,I=(I=I+Math.imul(d,eA)|0)+Math.imul(l,tA)|0,E=E+Math.imul(l,eA)|0,g=g+Math.imul(f,sA)|0,I=(I=I+Math.imul(f,rA)|0)+Math.imul(w,sA)|0,E=E+Math.imul(w,rA)|0;var HA=(e+(g=g+Math.imul(y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(y,aA)|0)+Math.imul(D,nA)|0))<<13)|0;e=((E=E+Math.imul(D,aA)|0)+(I>>>13)|0)+(HA>>>26)|0,HA&=67108863,g=Math.imul(v,z),I=(I=Math.imul(v,_))+Math.imul(J,z)|0,E=Math.imul(J,_),g=g+Math.imul(k,$)|0,I=(I=I+Math.imul(k,AA)|0)+Math.imul(S,$)|0,E=E+Math.imul(S,AA)|0,g=g+Math.imul(p,QA)|0,I=(I=I+Math.imul(p,gA)|0)+Math.imul(M,QA)|0,E=E+Math.imul(M,gA)|0,g=g+Math.imul(Y,EA)|0,I=(I=I+Math.imul(Y,iA)|0)+Math.imul(L,EA)|0,E=E+Math.imul(L,iA)|0,g=g+Math.imul(N,tA)|0,I=(I=I+Math.imul(N,eA)|0)+Math.imul(H,tA)|0,E=E+Math.imul(H,eA)|0,g=g+Math.imul(d,sA)|0,I=(I=I+Math.imul(d,rA)|0)+Math.imul(l,sA)|0,E=E+Math.imul(l,rA)|0;var GA=(e+(g=g+Math.imul(f,nA)|0)|0)+((8191&(I=(I=I+Math.imul(f,aA)|0)+Math.imul(w,nA)|0))<<13)|0;e=((E=E+Math.imul(w,aA)|0)+(I>>>13)|0)+(GA>>>26)|0,GA&=67108863,g=Math.imul(v,$),I=(I=Math.imul(v,AA))+Math.imul(J,$)|0,E=Math.imul(J,AA),g=g+Math.imul(k,QA)|0,I=(I=I+Math.imul(k,gA)|0)+Math.imul(S,QA)|0,E=E+Math.imul(S,gA)|0,g=g+Math.imul(p,EA)|0,I=(I=I+Math.imul(p,iA)|0)+Math.imul(M,EA)|0,E=E+Math.imul(M,iA)|0,g=g+Math.imul(Y,tA)|0,I=(I=I+Math.imul(Y,eA)|0)+Math.imul(L,tA)|0,E=E+Math.imul(L,eA)|0,g=g+Math.imul(N,sA)|0,I=(I=I+Math.imul(N,rA)|0)+Math.imul(H,sA)|0,E=E+Math.imul(H,rA)|0;var YA=(e+(g=g+Math.imul(d,nA)|0)|0)+((8191&(I=(I=I+Math.imul(d,aA)|0)+Math.imul(l,nA)|0))<<13)|0;e=((E=E+Math.imul(l,aA)|0)+(I>>>13)|0)+(YA>>>26)|0,YA&=67108863,g=Math.imul(v,QA),I=(I=Math.imul(v,gA))+Math.imul(J,QA)|0,E=Math.imul(J,gA),g=g+Math.imul(k,EA)|0,I=(I=I+Math.imul(k,iA)|0)+Math.imul(S,EA)|0,E=E+Math.imul(S,iA)|0,g=g+Math.imul(p,tA)|0,I=(I=I+Math.imul(p,eA)|0)+Math.imul(M,tA)|0,E=E+Math.imul(M,eA)|0,g=g+Math.imul(Y,sA)|0,I=(I=I+Math.imul(Y,rA)|0)+Math.imul(L,sA)|0,E=E+Math.imul(L,rA)|0;var LA=(e+(g=g+Math.imul(N,nA)|0)|0)+((8191&(I=(I=I+Math.imul(N,aA)|0)+Math.imul(H,nA)|0))<<13)|0;e=((E=E+Math.imul(H,aA)|0)+(I>>>13)|0)+(LA>>>26)|0,LA&=67108863,g=Math.imul(v,EA),I=(I=Math.imul(v,iA))+Math.imul(J,EA)|0,E=Math.imul(J,iA),g=g+Math.imul(k,tA)|0,I=(I=I+Math.imul(k,eA)|0)+Math.imul(S,tA)|0,E=E+Math.imul(S,eA)|0,g=g+Math.imul(p,sA)|0,I=(I=I+Math.imul(p,rA)|0)+Math.imul(M,sA)|0,E=E+Math.imul(M,rA)|0;var RA=(e+(g=g+Math.imul(Y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(Y,aA)|0)+Math.imul(L,nA)|0))<<13)|0;e=((E=E+Math.imul(L,aA)|0)+(I>>>13)|0)+(RA>>>26)|0,RA&=67108863,g=Math.imul(v,tA),I=(I=Math.imul(v,eA))+Math.imul(J,tA)|0,E=Math.imul(J,eA),g=g+Math.imul(k,sA)|0,I=(I=I+Math.imul(k,rA)|0)+Math.imul(S,sA)|0,E=E+Math.imul(S,rA)|0;var pA=(e+(g=g+Math.imul(p,nA)|0)|0)+((8191&(I=(I=I+Math.imul(p,aA)|0)+Math.imul(M,nA)|0))<<13)|0;e=((E=E+Math.imul(M,aA)|0)+(I>>>13)|0)+(pA>>>26)|0,pA&=67108863,g=Math.imul(v,sA),I=(I=Math.imul(v,rA))+Math.imul(J,sA)|0,E=Math.imul(J,rA);var MA=(e+(g=g+Math.imul(k,nA)|0)|0)+((8191&(I=(I=I+Math.imul(k,aA)|0)+Math.imul(S,nA)|0))<<13)|0;e=((E=E+Math.imul(S,aA)|0)+(I>>>13)|0)+(MA>>>26)|0,MA&=67108863;var mA=(e+(g=Math.imul(v,nA))|0)+((8191&(I=(I=Math.imul(v,aA))+Math.imul(J,nA)|0))<<13)|0;return e=((E=Math.imul(J,aA))+(I>>>13)|0)+(mA>>>26)|0,mA&=67108863,t[0]=cA,t[1]=yA,t[2]=DA,t[3]=uA,t[4]=fA,t[5]=wA,t[6]=FA,t[7]=dA,t[8]=lA,t[9]=UA,t[10]=NA,t[11]=HA,t[12]=GA,t[13]=YA,t[14]=LA,t[15]=RA,t[16]=pA,t[17]=MA,t[18]=mA,0!==e&&(t[19]=e,Q.length++),Q};function n(A,B,Q){return(new a).mulp(A,B,Q)}function a(A,B){this.x=A,this.y=B}Math.imul||(h=r),E.prototype.mulTo=function(A,B){var Q=this.length+A.length;return 10===this.length&&10===A.length?h(this,A,B):Q<63?r(this,A,B):Q<1024?function(A,B,Q){Q.negative=B.negative^A.negative,Q.length=A.length+B.length;for(var g=0,I=0,E=0;E>>26)|0)>>>26,i&=67108863}Q.words[E]=C,g=i,i=I}return 0!==g?Q.words[E]=g:Q.length--,Q.strip()}(this,A,B):n(this,A,B)},a.prototype.makeRBT=function(A){for(var B=new Array(A),Q=E.prototype._countBits(A)-1,g=0;g>=1;return g},a.prototype.permute=function(A,B,Q,g,I,E){for(var i=0;i>>=1)I++;return 1<>>=13,Q[2*i+1]=8191&E,E>>>=13;for(i=2*B;i>=26,B+=I/67108864|0,B+=E>>>26,this.words[Q]=67108863&E}return 0!==B&&(this.words[Q]=B,this.length++),this},E.prototype.muln=function(A){return this.clone().imuln(A)},E.prototype.sqr=function(){return this.mul(this)},E.prototype.isqr=function(){return this.imul(this.clone())},E.prototype.pow=function(A){var B=function(A){for(var B=new Array(A.bitLength()),Q=0;Q>>I}return B}(A);if(0===B.length)return new E(1);for(var Q=this,g=0;g=0);var B,Q=A%26,I=(A-Q)/26,E=67108863>>>26-Q<<26-Q;if(0!==Q){var i=0;for(B=0;B>>26-Q}i&&(this.words[B]=i,this.length++)}if(0!==I){for(B=this.length-1;B>=0;B--)this.words[B+I]=this.words[B];for(B=0;B=0),I=B?(B-B%26)/26:0;var E=A%26,i=Math.min((A-E)/26,this.length),C=67108863^67108863>>>E<i)for(this.length-=i,e=0;e=0&&(0!==o||e>=I);e--){var s=0|this.words[e];this.words[e]=o<<26-E|s>>>E,o=s&C}return t&&0!==o&&(t.words[t.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},E.prototype.ishrn=function(A,B,Q){return g(0===this.negative),this.iushrn(A,B,Q)},E.prototype.shln=function(A){return this.clone().ishln(A)},E.prototype.ushln=function(A){return this.clone().iushln(A)},E.prototype.shrn=function(A){return this.clone().ishrn(A)},E.prototype.ushrn=function(A){return this.clone().iushrn(A)},E.prototype.testn=function(A){g("number"==typeof A&&A>=0);var B=A%26,Q=(A-B)/26,I=1<=0);var B=A%26,Q=(A-B)/26;if(g(0===this.negative,"imaskn works only with positive numbers"),this.length<=Q)return this;if(0!==B&&Q++,this.length=Math.min(Q,this.length),0!==B){var I=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},E.prototype.isubn=function(A){if(g("number"==typeof A),g(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(t/67108864|0),this.words[I+Q]=67108863&E}for(;I>26,this.words[I+Q]=67108863&E;if(0===C)return this.strip();for(g(-1===C),C=0,I=0;I>26,this.words[I]=67108863&E;return this.negative=1,this.strip()},E.prototype._wordDiv=function(A,B){var Q=(this.length,A.length),g=this.clone(),I=A,i=0|I.words[I.length-1];0!==(Q=26-this._countBits(i))&&(I=I.ushln(Q),g.iushln(Q),i=0|I.words[I.length-1]);var C,t=g.length-I.length;if("mod"!==B){(C=new E(null)).length=t+1,C.words=new Array(C.length);for(var e=0;e=0;s--){var r=67108864*(0|g.words[I.length+s])+(0|g.words[I.length+s-1]);for(r=Math.min(r/i|0,67108863),g._ishlnsubmul(I,r,s);0!==g.negative;)r--,g.negative=0,g._ishlnsubmul(I,1,s),g.isZero()||(g.negative^=1);C&&(C.words[s]=r)}return C&&C.strip(),g.strip(),"div"!==B&&0!==Q&&g.iushrn(Q),{div:C||null,mod:g}},E.prototype.divmod=function(A,B,Q){return g(!A.isZero()),this.isZero()?{div:new E(0),mod:new E(0)}:0!==this.negative&&0===A.negative?(C=this.neg().divmod(A,B),"mod"!==B&&(I=C.div.neg()),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.iadd(A)),{div:I,mod:i}):0===this.negative&&0!==A.negative?(C=this.divmod(A.neg(),B),"mod"!==B&&(I=C.div.neg()),{div:I,mod:C.mod}):0!=(this.negative&A.negative)?(C=this.neg().divmod(A.neg(),B),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.isub(A)),{div:C.div,mod:i}):A.length>this.length||this.cmp(A)<0?{div:new E(0),mod:this}:1===A.length?"div"===B?{div:this.divn(A.words[0]),mod:null}:"mod"===B?{div:null,mod:new E(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new E(this.modn(A.words[0]))}:this._wordDiv(A,B);var I,i,C},E.prototype.div=function(A){return this.divmod(A,"div",!1).div},E.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},E.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},E.prototype.divRound=function(A){var B=this.divmod(A);if(B.mod.isZero())return B.div;var Q=0!==B.div.negative?B.mod.isub(A):B.mod,g=A.ushrn(1),I=A.andln(1),E=Q.cmp(g);return E<0||1===I&&0===E?B.div:0!==B.div.negative?B.div.isubn(1):B.div.iaddn(1)},E.prototype.modn=function(A){g(A<=67108863);for(var B=(1<<26)%A,Q=0,I=this.length-1;I>=0;I--)Q=(B*Q+(0|this.words[I]))%A;return Q},E.prototype.idivn=function(A){g(A<=67108863);for(var B=0,Q=this.length-1;Q>=0;Q--){var I=(0|this.words[Q])+67108864*B;this.words[Q]=I/A|0,B=I%A}return this.strip()},E.prototype.divn=function(A){return this.clone().idivn(A)},E.prototype.egcd=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I=new E(1),i=new E(0),C=new E(0),t=new E(1),e=0;B.isEven()&&Q.isEven();)B.iushrn(1),Q.iushrn(1),++e;for(var o=Q.clone(),s=B.clone();!B.isZero();){for(var r=0,h=1;0==(B.words[0]&h)&&r<26;++r,h<<=1);if(r>0)for(B.iushrn(r);r-- >0;)(I.isOdd()||i.isOdd())&&(I.iadd(o),i.isub(s)),I.iushrn(1),i.iushrn(1);for(var n=0,a=1;0==(Q.words[0]&a)&&n<26;++n,a<<=1);if(n>0)for(Q.iushrn(n);n-- >0;)(C.isOdd()||t.isOdd())&&(C.iadd(o),t.isub(s)),C.iushrn(1),t.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),I.isub(C),i.isub(t)):(Q.isub(B),C.isub(I),t.isub(i))}return{a:C,b:t,gcd:Q.iushln(e)}},E.prototype._invmp=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I,i=new E(1),C=new E(0),t=Q.clone();B.cmpn(1)>0&&Q.cmpn(1)>0;){for(var e=0,o=1;0==(B.words[0]&o)&&e<26;++e,o<<=1);if(e>0)for(B.iushrn(e);e-- >0;)i.isOdd()&&i.iadd(t),i.iushrn(1);for(var s=0,r=1;0==(Q.words[0]&r)&&s<26;++s,r<<=1);if(s>0)for(Q.iushrn(s);s-- >0;)C.isOdd()&&C.iadd(t),C.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),i.isub(C)):(Q.isub(B),C.isub(i))}return(I=0===B.cmpn(1)?i:C).cmpn(0)<0&&I.iadd(A),I},E.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var B=this.clone(),Q=A.clone();B.negative=0,Q.negative=0;for(var g=0;B.isEven()&&Q.isEven();g++)B.iushrn(1),Q.iushrn(1);for(;;){for(;B.isEven();)B.iushrn(1);for(;Q.isEven();)Q.iushrn(1);var I=B.cmp(Q);if(I<0){var E=B;B=Q,Q=E}else if(0===I||0===Q.cmpn(1))break;B.isub(Q)}return Q.iushln(g)},E.prototype.invm=function(A){return this.egcd(A).a.umod(A)},E.prototype.isEven=function(){return 0==(1&this.words[0])},E.prototype.isOdd=function(){return 1==(1&this.words[0])},E.prototype.andln=function(A){return this.words[0]&A},E.prototype.bincn=function(A){g("number"==typeof A);var B=A%26,Q=(A-B)/26,I=1<>>26,C&=67108863,this.words[i]=C}return 0!==E&&(this.words[i]=E,this.length++),this},E.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},E.prototype.cmpn=function(A){var B,Q=A<0;if(0!==this.negative&&!Q)return-1;if(0===this.negative&&Q)return 1;if(this.strip(),this.length>1)B=1;else{Q&&(A=-A),g(A<=67108863,"Number is too big");var I=0|this.words[0];B=I===A?0:IA.length)return 1;if(this.length=0;Q--){var g=0|this.words[Q],I=0|A.words[Q];if(g!==I){gI&&(B=1);break}}return B},E.prototype.gtn=function(A){return 1===this.cmpn(A)},E.prototype.gt=function(A){return 1===this.cmp(A)},E.prototype.gten=function(A){return this.cmpn(A)>=0},E.prototype.gte=function(A){return this.cmp(A)>=0},E.prototype.ltn=function(A){return-1===this.cmpn(A)},E.prototype.lt=function(A){return-1===this.cmp(A)},E.prototype.lten=function(A){return this.cmpn(A)<=0},E.prototype.lte=function(A){return this.cmp(A)<=0},E.prototype.eqn=function(A){return 0===this.cmpn(A)},E.prototype.eq=function(A){return 0===this.cmp(A)},E.red=function(A){return new F(A)},E.prototype.toRed=function(A){return g(!this.red,"Already a number in reduction context"),g(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},E.prototype.fromRed=function(){return g(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},E.prototype._forceRed=function(A){return this.red=A,this},E.prototype.forceRed=function(A){return g(!this.red,"Already a number in reduction context"),this._forceRed(A)},E.prototype.redAdd=function(A){return g(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},E.prototype.redIAdd=function(A){return g(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},E.prototype.redSub=function(A){return g(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},E.prototype.redISub=function(A){return g(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},E.prototype.redShl=function(A){return g(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},E.prototype.redMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},E.prototype.redIMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},E.prototype.redSqr=function(){return g(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},E.prototype.redISqr=function(){return g(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},E.prototype.redSqrt=function(){return g(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},E.prototype.redInvm=function(){return g(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},E.prototype.redNeg=function(){return g(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},E.prototype.redPow=function(A){return g(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var c={k256:null,p224:null,p192:null,p25519:null};function y(A,B){this.name=A,this.p=new E(B,16),this.n=this.p.bitLength(),this.k=new E(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function D(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function u(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function f(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function F(A){if("string"==typeof A){var B=E._prime(A);this.m=B.p,this.prime=B}else g(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function d(A){F.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new E(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)}y.prototype._tmp=function(){var A=new E(null);return A.words=new Array(Math.ceil(this.n/13)),A},y.prototype.ireduce=function(A){var B,Q=A;do{this.split(Q,this.tmp),B=(Q=(Q=this.imulK(Q)).iadd(this.tmp)).bitLength()}while(B>this.n);var g=B0?Q.isub(this.p):Q.strip(),Q},y.prototype.split=function(A,B){A.iushrn(this.n,0,B)},y.prototype.imulK=function(A){return A.imul(this.k)},I(D,y),D.prototype.split=function(A,B){for(var Q=Math.min(A.length,9),g=0;g>>22,I=E}I>>>=22,A.words[g-10]=I,0===I&&A.length>10?A.length-=10:A.length-=9},D.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var B=0,Q=0;Q>>=26,A.words[Q]=I,B=g}return 0!==B&&(A.words[A.length++]=B),A},E._prime=function(A){if(c[A])return c[A];var B;if("k256"===A)B=new D;else if("p224"===A)B=new u;else if("p192"===A)B=new f;else{if("p25519"!==A)throw new Error("Unknown prime "+A);B=new w}return c[A]=B,B},F.prototype._verify1=function(A){g(0===A.negative,"red works only with positives"),g(A.red,"red works only with red numbers")},F.prototype._verify2=function(A,B){g(0==(A.negative|B.negative),"red works only with positives"),g(A.red&&A.red===B.red,"red works only with red numbers")},F.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},F.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},F.prototype.add=function(A,B){this._verify2(A,B);var Q=A.add(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q._forceRed(this)},F.prototype.iadd=function(A,B){this._verify2(A,B);var Q=A.iadd(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q},F.prototype.sub=function(A,B){this._verify2(A,B);var Q=A.sub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q._forceRed(this)},F.prototype.isub=function(A,B){this._verify2(A,B);var Q=A.isub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q},F.prototype.shl=function(A,B){return this._verify1(A),this.imod(A.ushln(B))},F.prototype.imul=function(A,B){return this._verify2(A,B),this.imod(A.imul(B))},F.prototype.mul=function(A,B){return this._verify2(A,B),this.imod(A.mul(B))},F.prototype.isqr=function(A){return this.imul(A,A.clone())},F.prototype.sqr=function(A){return this.mul(A,A)},F.prototype.sqrt=function(A){if(A.isZero())return A.clone();var B=this.m.andln(3);if(g(B%2==1),3===B){var Q=this.m.add(new E(1)).iushrn(2);return this.pow(A,Q)}for(var I=this.m.subn(1),i=0;!I.isZero()&&0===I.andln(1);)i++,I.iushrn(1);g(!I.isZero());var C=new E(1).toRed(this),t=C.redNeg(),e=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new E(2*o*o).toRed(this);0!==this.pow(o,e).cmp(t);)o.redIAdd(t);for(var s=this.pow(o,I),r=this.pow(A,I.addn(1).iushrn(1)),h=this.pow(A,I),n=i;0!==h.cmp(C);){for(var a=h,c=0;0!==a.cmp(C);c++)a=a.redSqr();g(c=0;g--){for(var e=B.words[g],o=t-1;o>=0;o--){var s=e>>o&1;I!==Q[0]&&(I=this.sqr(I)),0!==s||0!==i?(i<<=1,i|=s,(4===++C||0===g&&0===o)&&(I=this.mul(I,Q[i]),C=0,i=0)):C=0}t=26}return I},F.prototype.convertTo=function(A){var B=A.umod(this.m);return B===A?B.clone():B},F.prototype.convertFrom=function(A){var B=A.clone();return B.red=null,B},E.mont=function(A){return new d(A)},I(d,F),d.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},d.prototype.convertFrom=function(A){var B=this.imod(A.mul(this.rinv));return B.red=null,B},d.prototype.imul=function(A,B){if(A.isZero()||B.isZero())return A.words[0]=0,A.length=1,A;var Q=A.imul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),E=I;return I.cmp(this.m)>=0?E=I.isub(this.m):I.cmpn(0)<0&&(E=I.iadd(this.m)),E._forceRed(this)},d.prototype.mul=function(A,B){if(A.isZero()||B.isZero())return new E(0)._forceRed(this);var Q=A.mul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),i=I;return I.cmp(this.m)>=0?i=I.isub(this.m):I.cmpn(0)<0&&(i=I.iadd(this.m)),i._forceRed(this)},d.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A,this)}).call(this,Q(10)(A))},function(A,B){var Q={}.toString;A.exports=Array.isArray||function(A){return"[object Array]"==Q.call(A)}},function(A,B,Q){(function(A){function Q(A,B){for(var Q=0,g=A.length-1;g>=0;g--){var I=A[g];"."===I?A.splice(g,1):".."===I?(A.splice(g,1),Q++):Q&&(A.splice(g,1),Q--)}if(B)for(;Q--;Q)A.unshift("..");return A}function g(A,B){if(A.filter)return A.filter(B);for(var Q=[],g=0;g=-1&&!I;E--){var i=E>=0?arguments[E]:A.cwd();if("string"!=typeof i)throw new TypeError("Arguments to path.resolve must be strings");i&&(B=i+"/"+B,I="/"===i.charAt(0))}return(I?"/":"")+(B=Q(g(B.split("/"),(function(A){return!!A})),!I).join("/"))||"."},B.normalize=function(A){var E=B.isAbsolute(A),i="/"===I(A,-1);return(A=Q(g(A.split("/"),(function(A){return!!A})),!E).join("/"))||E||(A="."),A&&i&&(A+="/"),(E?"/":"")+A},B.isAbsolute=function(A){return"/"===A.charAt(0)},B.join=function(){var A=Array.prototype.slice.call(arguments,0);return B.normalize(g(A,(function(A,B){if("string"!=typeof A)throw new TypeError("Arguments to path.join must be strings");return A})).join("/"))},B.relative=function(A,Q){function g(A){for(var B=0;B=0&&""===A[Q];Q--);return B>Q?[]:A.slice(B,Q-B+1)}A=B.resolve(A).substr(1),Q=B.resolve(Q).substr(1);for(var I=g(A.split("/")),E=g(Q.split("/")),i=Math.min(I.length,E.length),C=i,t=0;t=1;--E)if(47===(B=A.charCodeAt(E))){if(!I){g=E;break}}else I=!1;return-1===g?Q?"/":".":Q&&1===g?"/":A.slice(0,g)},B.basename=function(A,B){var Q=function(A){"string"!=typeof A&&(A+="");var B,Q=0,g=-1,I=!0;for(B=A.length-1;B>=0;--B)if(47===A.charCodeAt(B)){if(!I){Q=B+1;break}}else-1===g&&(I=!1,g=B+1);return-1===g?"":A.slice(Q,g)}(A);return B&&Q.substr(-1*B.length)===B&&(Q=Q.substr(0,Q.length-B.length)),Q},B.extname=function(A){"string"!=typeof A&&(A+="");for(var B=-1,Q=0,g=-1,I=!0,E=0,i=A.length-1;i>=0;--i){var C=A.charCodeAt(i);if(47!==C)-1===g&&(I=!1,g=i+1),46===C?-1===B?B=i:1!==E&&(E=1):-1!==B&&(E=-1);else if(!I){Q=i+1;break}}return-1===B||-1===g||0===E||1===E&&B===g-1&&B===Q+1?"":A.slice(B,g)};var I="b"==="ab".substr(-1)?function(A,B,Q){return A.substr(B,Q)}:function(A,B,Q){return B<0&&(B=A.length+B),A.substr(B,Q)}}).call(this,Q(3))},function(A,B,Q){"use strict";var g=Q(106).Buffer,I=Q(107).Transform;function E(A){I.call(this),this._block=g.allocUnsafe(A),this._blockSize=A,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Q(0)(E,I),E.prototype._transform=function(A,B,Q){var g=null;try{this.update(A,B)}catch(A){g=A}Q(g)},E.prototype._flush=function(A){var B=null;try{this.push(this.digest())}catch(A){B=A}A(B)},E.prototype.update=function(A,B){if(function(A,B){if(!g.isBuffer(A)&&"string"!=typeof A)throw new TypeError(B+" must be a string or a buffer")}(A,"Data"),this._finalized)throw new Error("Digest already called");g.isBuffer(A)||(A=g.from(A,B));for(var Q=this._block,I=0;this._blockOffset+A.length-I>=this._blockSize;){for(var E=this._blockOffset;E0;++i)this._length[i]+=C,(C=this._length[i]/4294967296|0)>0&&(this._length[i]-=4294967296*C);return this},E.prototype._update=function(){throw new Error("_update is not implemented")},E.prototype.digest=function(A){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var B=this._digest();void 0!==A&&(B=B.toString(A)),this._block.fill(0),this._blockOffset=0;for(var Q=0;Q<4;++Q)this._length[Q]=0;return B},E.prototype._digest=function(){throw new Error("_digest is not implemented")},A.exports=E},function(A,B,Q){"use strict";(function(B,g){var I;A.exports=U,U.ReadableState=l;Q(11).EventEmitter;var E=function(A,B){return A.listeners(B).length},i=Q(52),C=Q(2).Buffer,t=B.Uint8Array||function(){};var e,o=Q(108);e=o&&o.debuglog?o.debuglog("stream"):function(){};var s,r,h,n=Q(109),a=Q(53),c=Q(54).getHighWaterMark,y=Q(15).codes,D=y.ERR_INVALID_ARG_TYPE,u=y.ERR_STREAM_PUSH_AFTER_EOF,f=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Q(0)(U,i);var F=a.errorOrDestroy,d=["error","close","destroy","pause","resume"];function l(A,B,g){I=I||Q(16),A=A||{},"boolean"!=typeof g&&(g=B instanceof I),this.objectMode=!!A.objectMode,g&&(this.objectMode=this.objectMode||!!A.readableObjectMode),this.highWaterMark=c(this,A,"readableHighWaterMark",g),this.buffer=new n,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==A.emitClose,this.autoDestroy=!!A.autoDestroy,this.destroyed=!1,this.defaultEncoding=A.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,A.encoding&&(s||(s=Q(12).StringDecoder),this.decoder=new s(A.encoding),this.encoding=A.encoding)}function U(A){if(I=I||Q(16),!(this instanceof U))return new U(A);var B=this instanceof I;this._readableState=new l(A,this,B),this.readable=!0,A&&("function"==typeof A.read&&(this._read=A.read),"function"==typeof A.destroy&&(this._destroy=A.destroy)),i.call(this)}function N(A,B,Q,g,I){e("readableAddChunk",B);var E,i=A._readableState;if(null===B)i.reading=!1,function(A,B){if(e("onEofChunk"),B.ended)return;if(B.decoder){var Q=B.decoder.end();Q&&Q.length&&(B.buffer.push(Q),B.length+=B.objectMode?1:Q.length)}B.ended=!0,B.sync?Y(A):(B.needReadable=!1,B.emittedReadable||(B.emittedReadable=!0,L(A)))}(A,i);else if(I||(E=function(A,B){var Q;g=B,C.isBuffer(g)||g instanceof t||"string"==typeof B||void 0===B||A.objectMode||(Q=new D("chunk",["string","Buffer","Uint8Array"],B));var g;return Q}(i,B)),E)F(A,E);else if(i.objectMode||B&&B.length>0)if("string"==typeof B||i.objectMode||Object.getPrototypeOf(B)===C.prototype||(B=function(A){return C.from(A)}(B)),g)i.endEmitted?F(A,new w):H(A,i,B,!0);else if(i.ended)F(A,new u);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!Q?(B=i.decoder.write(B),i.objectMode||0!==B.length?H(A,i,B,!1):R(A,i)):H(A,i,B,!1)}else g||(i.reading=!1,R(A,i));return!i.ended&&(i.lengthB.highWaterMark&&(B.highWaterMark=function(A){return A>=1073741824?A=1073741824:(A--,A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A++),A}(A)),A<=B.length?A:B.ended?B.length:(B.needReadable=!0,0))}function Y(A){var B=A._readableState;e("emitReadable",B.needReadable,B.emittedReadable),B.needReadable=!1,B.emittedReadable||(e("emitReadable",B.flowing),B.emittedReadable=!0,g.nextTick(L,A))}function L(A){var B=A._readableState;e("emitReadable_",B.destroyed,B.length,B.ended),B.destroyed||!B.length&&!B.ended||(A.emit("readable"),B.emittedReadable=!1),B.needReadable=!B.flowing&&!B.ended&&B.length<=B.highWaterMark,S(A)}function R(A,B){B.readingMore||(B.readingMore=!0,g.nextTick(p,A,B))}function p(A,B){for(;!B.reading&&!B.ended&&(B.length0,B.resumeScheduled&&!B.paused?B.flowing=!0:A.listenerCount("data")>0&&A.resume()}function m(A){e("readable nexttick read 0"),A.read(0)}function k(A,B){e("resume",B.reading),B.reading||A.read(0),B.resumeScheduled=!1,A.emit("resume"),S(A),B.flowing&&!B.reading&&A.read(0)}function S(A){var B=A._readableState;for(e("flow",B.flowing);B.flowing&&null!==A.read(););}function b(A,B){return 0===B.length?null:(B.objectMode?Q=B.buffer.shift():!A||A>=B.length?(Q=B.decoder?B.buffer.join(""):1===B.buffer.length?B.buffer.first():B.buffer.concat(B.length),B.buffer.clear()):Q=B.buffer.consume(A,B.decoder),Q);var Q}function v(A){var B=A._readableState;e("endReadable",B.endEmitted),B.endEmitted||(B.ended=!0,g.nextTick(J,B,A))}function J(A,B){if(e("endReadableNT",A.endEmitted,A.length),!A.endEmitted&&0===A.length&&(A.endEmitted=!0,B.readable=!1,B.emit("end"),A.autoDestroy)){var Q=B._writableState;(!Q||Q.autoDestroy&&Q.finished)&&B.destroy()}}function V(A,B){for(var Q=0,g=A.length;Q=B.highWaterMark:B.length>0)||B.ended))return e("read: emitReadable",B.length,B.ended),0===B.length&&B.ended?v(this):Y(this),null;if(0===(A=G(A,B))&&B.ended)return 0===B.length&&v(this),null;var g,I=B.needReadable;return e("need readable",I),(0===B.length||B.length-A0?b(A,B):null)?(B.needReadable=B.length<=B.highWaterMark,A=0):(B.length-=A,B.awaitDrain=0),0===B.length&&(B.ended||(B.needReadable=!0),Q!==A&&B.ended&&v(this)),null!==g&&this.emit("data",g),g},U.prototype._read=function(A){F(this,new f("_read()"))},U.prototype.pipe=function(A,B){var Q=this,I=this._readableState;switch(I.pipesCount){case 0:I.pipes=A;break;case 1:I.pipes=[I.pipes,A];break;default:I.pipes.push(A)}I.pipesCount+=1,e("pipe count=%d opts=%j",I.pipesCount,B);var i=(!B||!1!==B.end)&&A!==g.stdout&&A!==g.stderr?t:c;function C(B,g){e("onunpipe"),B===Q&&g&&!1===g.hasUnpiped&&(g.hasUnpiped=!0,e("cleanup"),A.removeListener("close",n),A.removeListener("finish",a),A.removeListener("drain",o),A.removeListener("error",h),A.removeListener("unpipe",C),Q.removeListener("end",t),Q.removeListener("end",c),Q.removeListener("data",r),s=!0,!I.awaitDrain||A._writableState&&!A._writableState.needDrain||o())}function t(){e("onend"),A.end()}I.endEmitted?g.nextTick(i):Q.once("end",i),A.on("unpipe",C);var o=function(A){return function(){var B=A._readableState;e("pipeOnDrain",B.awaitDrain),B.awaitDrain&&B.awaitDrain--,0===B.awaitDrain&&E(A,"data")&&(B.flowing=!0,S(A))}}(Q);A.on("drain",o);var s=!1;function r(B){e("ondata");var g=A.write(B);e("dest.write",g),!1===g&&((1===I.pipesCount&&I.pipes===A||I.pipesCount>1&&-1!==V(I.pipes,A))&&!s&&(e("false write response, pause",I.awaitDrain),I.awaitDrain++),Q.pause())}function h(B){e("onerror",B),c(),A.removeListener("error",h),0===E(A,"error")&&F(A,B)}function n(){A.removeListener("finish",a),c()}function a(){e("onfinish"),A.removeListener("close",n),c()}function c(){e("unpipe"),Q.unpipe(A)}return Q.on("data",r),function(A,B,Q){if("function"==typeof A.prependListener)return A.prependListener(B,Q);A._events&&A._events[B]?Array.isArray(A._events[B])?A._events[B].unshift(Q):A._events[B]=[Q,A._events[B]]:A.on(B,Q)}(A,"error",h),A.once("close",n),A.once("finish",a),A.emit("pipe",Q),I.flowing||(e("pipe resume"),Q.resume()),A},U.prototype.unpipe=function(A){var B=this._readableState,Q={hasUnpiped:!1};if(0===B.pipesCount)return this;if(1===B.pipesCount)return A&&A!==B.pipes||(A||(A=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,A&&A.emit("unpipe",this,Q)),this;if(!A){var g=B.pipes,I=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var E=0;E0,!1!==I.flowing&&this.resume()):"readable"===A&&(I.endEmitted||I.readableListening||(I.readableListening=I.needReadable=!0,I.flowing=!1,I.emittedReadable=!1,e("on readable",I.length,I.reading),I.length?Y(this):I.reading||g.nextTick(m,this))),Q},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(A,B){var Q=i.prototype.removeListener.call(this,A,B);return"readable"===A&&g.nextTick(M,this),Q},U.prototype.removeAllListeners=function(A){var B=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==A&&void 0!==A||g.nextTick(M,this),B},U.prototype.resume=function(){var A=this._readableState;return A.flowing||(e("resume"),A.flowing=!A.readableListening,function(A,B){B.resumeScheduled||(B.resumeScheduled=!0,g.nextTick(k,A,B))}(this,A)),A.paused=!1,this},U.prototype.pause=function(){return e("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(e("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},U.prototype.wrap=function(A){var B=this,Q=this._readableState,g=!1;for(var I in A.on("end",(function(){if(e("wrapped end"),Q.decoder&&!Q.ended){var A=Q.decoder.end();A&&A.length&&B.push(A)}B.push(null)})),A.on("data",(function(I){(e("wrapped data"),Q.decoder&&(I=Q.decoder.write(I)),Q.objectMode&&null==I)||(Q.objectMode||I&&I.length)&&(B.push(I)||(g=!0,A.pause()))})),A)void 0===this[I]&&"function"==typeof A[I]&&(this[I]=function(B){return function(){return A[B].apply(A,arguments)}}(I));for(var E=0;E-1))throw new w(A);return this._writableState.defaultEncoding=A,this},Object.defineProperty(U.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),U.prototype._write=function(A,B,Q){Q(new a("_write()"))},U.prototype._writev=null,U.prototype.end=function(A,B,Q){var I=this._writableState;return"function"==typeof A?(Q=A,A=null,B=null):"function"==typeof B&&(Q=B,B=null),null!=A&&this.write(A,B),I.corked&&(I.corked=1,this.uncork()),I.ending||function(A,B,Q){B.ending=!0,R(A,B),Q&&(B.finished?g.nextTick(Q):A.once("finish",Q));B.ended=!0,A.writable=!1}(this,I,Q),this},Object.defineProperty(U.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(A){this._writableState&&(this._writableState.destroyed=A)}}),U.prototype.destroy=s.destroy,U.prototype._undestroy=s.undestroy,U.prototype._destroy=function(A,B){B(A)}}).call(this,Q(4),Q(3))},function(A,B,Q){"use strict";A.exports=o;var g=Q(15).codes,I=g.ERR_METHOD_NOT_IMPLEMENTED,E=g.ERR_MULTIPLE_CALLBACK,i=g.ERR_TRANSFORM_ALREADY_TRANSFORMING,C=g.ERR_TRANSFORM_WITH_LENGTH_0,t=Q(16);function e(A,B){var Q=this._transformState;Q.transforming=!1;var g=Q.writecb;if(null===g)return this.emit("error",new E);Q.writechunk=null,Q.writecb=null,null!=B&&this.push(B),g(A);var I=this._readableState;I.reading=!1,(I.needReadable||I.length>>2|A<<30)^(A>>>13|A<<19)^(A>>>22|A<<10)}function r(A){return(A>>>6|A<<26)^(A>>>11|A<<21)^(A>>>25|A<<7)}function h(A){return(A>>>7|A<<25)^(A>>>18|A<<14)^A>>>3}g(t,I),t.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},t.prototype._update=function(A){for(var B,Q=this._w,g=0|this._a,I=0|this._b,E=0|this._c,C=0|this._d,t=0|this._e,n=0|this._f,a=0|this._g,c=0|this._h,y=0;y<16;++y)Q[y]=A.readInt32BE(4*y);for(;y<64;++y)Q[y]=0|(((B=Q[y-2])>>>17|B<<15)^(B>>>19|B<<13)^B>>>10)+Q[y-7]+h(Q[y-15])+Q[y-16];for(var D=0;D<64;++D){var u=c+r(t)+e(t,n,a)+i[D]+Q[D]|0,f=s(g)+o(g,I,E)|0;c=a,a=n,n=t,t=C+u|0,C=E,E=I,I=g,g=u+f|0}this._a=g+this._a|0,this._b=I+this._b|0,this._c=E+this._c|0,this._d=C+this._d|0,this._e=t+this._e|0,this._f=n+this._f|0,this._g=a+this._g|0,this._h=c+this._h|0},t.prototype._hash=function(){var A=E.allocUnsafe(32);return A.writeInt32BE(this._a,0),A.writeInt32BE(this._b,4),A.writeInt32BE(this._c,8),A.writeInt32BE(this._d,12),A.writeInt32BE(this._e,16),A.writeInt32BE(this._f,20),A.writeInt32BE(this._g,24),A.writeInt32BE(this._h,28),A},A.exports=t},function(A,B,Q){var g=Q(0),I=Q(17),E=Q(1).Buffer,i=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],C=new Array(160);function t(){this.init(),this._w=C,I.call(this,128,112)}function e(A,B,Q){return Q^A&(B^Q)}function o(A,B,Q){return A&B|Q&(A|B)}function s(A,B){return(A>>>28|B<<4)^(B>>>2|A<<30)^(B>>>7|A<<25)}function r(A,B){return(A>>>14|B<<18)^(A>>>18|B<<14)^(B>>>9|A<<23)}function h(A,B){return(A>>>1|B<<31)^(A>>>8|B<<24)^A>>>7}function n(A,B){return(A>>>1|B<<31)^(A>>>8|B<<24)^(A>>>7|B<<25)}function a(A,B){return(A>>>19|B<<13)^(B>>>29|A<<3)^A>>>6}function c(A,B){return(A>>>19|B<<13)^(B>>>29|A<<3)^(A>>>6|B<<26)}function y(A,B){return A>>>0>>0?1:0}g(t,I),t.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},t.prototype._update=function(A){for(var B=this._w,Q=0|this._ah,g=0|this._bh,I=0|this._ch,E=0|this._dh,C=0|this._eh,t=0|this._fh,D=0|this._gh,u=0|this._hh,f=0|this._al,w=0|this._bl,F=0|this._cl,d=0|this._dl,l=0|this._el,U=0|this._fl,N=0|this._gl,H=0|this._hl,G=0;G<32;G+=2)B[G]=A.readInt32BE(4*G),B[G+1]=A.readInt32BE(4*G+4);for(;G<160;G+=2){var Y=B[G-30],L=B[G-30+1],R=h(Y,L),p=n(L,Y),M=a(Y=B[G-4],L=B[G-4+1]),m=c(L,Y),k=B[G-14],S=B[G-14+1],b=B[G-32],v=B[G-32+1],J=p+S|0,V=R+k+y(J,p)|0;V=(V=V+M+y(J=J+m|0,m)|0)+b+y(J=J+v|0,v)|0,B[G]=V,B[G+1]=J}for(var K=0;K<160;K+=2){V=B[K],J=B[K+1];var x=o(Q,g,I),Z=o(f,w,F),q=s(Q,f),O=s(f,Q),j=r(C,l),W=r(l,C),X=i[K],T=i[K+1],z=e(C,t,D),_=e(l,U,N),P=H+W|0,$=u+j+y(P,H)|0;$=($=($=$+z+y(P=P+_|0,_)|0)+X+y(P=P+T|0,T)|0)+V+y(P=P+J|0,J)|0;var AA=O+Z|0,BA=q+x+y(AA,O)|0;u=D,H=N,D=t,N=U,t=C,U=l,C=E+$+y(l=d+P|0,d)|0,E=I,d=F,I=g,F=w,g=Q,w=f,Q=$+BA+y(f=P+AA|0,P)|0}this._al=this._al+f|0,this._bl=this._bl+w|0,this._cl=this._cl+F|0,this._dl=this._dl+d|0,this._el=this._el+l|0,this._fl=this._fl+U|0,this._gl=this._gl+N|0,this._hl=this._hl+H|0,this._ah=this._ah+Q+y(this._al,f)|0,this._bh=this._bh+g+y(this._bl,w)|0,this._ch=this._ch+I+y(this._cl,F)|0,this._dh=this._dh+E+y(this._dl,d)|0,this._eh=this._eh+C+y(this._el,l)|0,this._fh=this._fh+t+y(this._fl,U)|0,this._gh=this._gh+D+y(this._gl,N)|0,this._hh=this._hh+u+y(this._hl,H)|0},t.prototype._hash=function(){var A=E.allocUnsafe(64);function B(B,Q,g){A.writeInt32BE(B,g),A.writeInt32BE(Q,g+4)}return B(this._ah,this._al,0),B(this._bh,this._bl,8),B(this._ch,this._cl,16),B(this._dh,this._dl,24),B(this._eh,this._el,32),B(this._fh,this._fl,40),B(this._gh,this._gl,48),B(this._hh,this._hl,56),A},A.exports=t},function(A,B,Q){"use strict";(function(B,g){var I=Q(26);A.exports=u;var E,i=Q(48);u.ReadableState=D;Q(11).EventEmitter;var C=function(A,B){return A.listeners(B).length},t=Q(60),e=Q(1).Buffer,o=B.Uint8Array||function(){};var s=Object.create(Q(21));s.inherits=Q(0);var r=Q(120),h=void 0;h=r&&r.debuglog?r.debuglog("stream"):function(){};var n,a=Q(121),c=Q(61);s.inherits(u,t);var y=["error","close","destroy","pause","resume"];function D(A,B){A=A||{};var g=B instanceof(E=E||Q(13));this.objectMode=!!A.objectMode,g&&(this.objectMode=this.objectMode||!!A.readableObjectMode);var I=A.highWaterMark,i=A.readableHighWaterMark,C=this.objectMode?16:16384;this.highWaterMark=I||0===I?I:g&&(i||0===i)?i:C,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new a,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=A.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,A.encoding&&(n||(n=Q(12).StringDecoder),this.decoder=new n(A.encoding),this.encoding=A.encoding)}function u(A){if(E=E||Q(13),!(this instanceof u))return new u(A);this._readableState=new D(A,this),this.readable=!0,A&&("function"==typeof A.read&&(this._read=A.read),"function"==typeof A.destroy&&(this._destroy=A.destroy)),t.call(this)}function f(A,B,Q,g,I){var E,i=A._readableState;null===B?(i.reading=!1,function(A,B){if(B.ended)return;if(B.decoder){var Q=B.decoder.end();Q&&Q.length&&(B.buffer.push(Q),B.length+=B.objectMode?1:Q.length)}B.ended=!0,d(A)}(A,i)):(I||(E=function(A,B){var Q;g=B,e.isBuffer(g)||g instanceof o||"string"==typeof B||void 0===B||A.objectMode||(Q=new TypeError("Invalid non-string/buffer chunk"));var g;return Q}(i,B)),E?A.emit("error",E):i.objectMode||B&&B.length>0?("string"==typeof B||i.objectMode||Object.getPrototypeOf(B)===e.prototype||(B=function(A){return e.from(A)}(B)),g?i.endEmitted?A.emit("error",new Error("stream.unshift() after end event")):w(A,i,B,!0):i.ended?A.emit("error",new Error("stream.push() after EOF")):(i.reading=!1,i.decoder&&!Q?(B=i.decoder.write(B),i.objectMode||0!==B.length?w(A,i,B,!1):U(A,i)):w(A,i,B,!1))):g||(i.reading=!1));return function(A){return!A.ended&&(A.needReadable||A.lengthB.highWaterMark&&(B.highWaterMark=function(A){return A>=8388608?A=8388608:(A--,A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A++),A}(A)),A<=B.length?A:B.ended?B.length:(B.needReadable=!0,0))}function d(A){var B=A._readableState;B.needReadable=!1,B.emittedReadable||(h("emitReadable",B.flowing),B.emittedReadable=!0,B.sync?I.nextTick(l,A):l(A))}function l(A){h("emit readable"),A.emit("readable"),Y(A)}function U(A,B){B.readingMore||(B.readingMore=!0,I.nextTick(N,A,B))}function N(A,B){for(var Q=B.length;!B.reading&&!B.flowing&&!B.ended&&B.length=B.length?(Q=B.decoder?B.buffer.join(""):1===B.buffer.length?B.buffer.head.data:B.buffer.concat(B.length),B.buffer.clear()):Q=function(A,B,Q){var g;AE.length?E.length:A;if(i===E.length?I+=E:I+=E.slice(0,A),0===(A-=i)){i===E.length?(++g,Q.next?B.head=Q.next:B.head=B.tail=null):(B.head=Q,Q.data=E.slice(i));break}++g}return B.length-=g,I}(A,B):function(A,B){var Q=e.allocUnsafe(A),g=B.head,I=1;g.data.copy(Q),A-=g.data.length;for(;g=g.next;){var E=g.data,i=A>E.length?E.length:A;if(E.copy(Q,Q.length-A,0,i),0===(A-=i)){i===E.length?(++I,g.next?B.head=g.next:B.head=B.tail=null):(B.head=g,g.data=E.slice(i));break}++I}return B.length-=I,Q}(A,B);return g}(A,B.buffer,B.decoder),Q);var Q}function R(A){var B=A._readableState;if(B.length>0)throw new Error('"endReadable()" called on non-empty stream');B.endEmitted||(B.ended=!0,I.nextTick(p,B,A))}function p(A,B){A.endEmitted||0!==A.length||(A.endEmitted=!0,B.readable=!1,B.emit("end"))}function M(A,B){for(var Q=0,g=A.length;Q=B.highWaterMark||B.ended))return h("read: emitReadable",B.length,B.ended),0===B.length&&B.ended?R(this):d(this),null;if(0===(A=F(A,B))&&B.ended)return 0===B.length&&R(this),null;var g,I=B.needReadable;return h("need readable",I),(0===B.length||B.length-A0?L(A,B):null)?(B.needReadable=!0,A=0):B.length-=A,0===B.length&&(B.ended||(B.needReadable=!0),Q!==A&&B.ended&&R(this)),null!==g&&this.emit("data",g),g},u.prototype._read=function(A){this.emit("error",new Error("_read() is not implemented"))},u.prototype.pipe=function(A,B){var Q=this,E=this._readableState;switch(E.pipesCount){case 0:E.pipes=A;break;case 1:E.pipes=[E.pipes,A];break;default:E.pipes.push(A)}E.pipesCount+=1,h("pipe count=%d opts=%j",E.pipesCount,B);var t=(!B||!1!==B.end)&&A!==g.stdout&&A!==g.stderr?o:u;function e(B,g){h("onunpipe"),B===Q&&g&&!1===g.hasUnpiped&&(g.hasUnpiped=!0,h("cleanup"),A.removeListener("close",y),A.removeListener("finish",D),A.removeListener("drain",s),A.removeListener("error",c),A.removeListener("unpipe",e),Q.removeListener("end",o),Q.removeListener("end",u),Q.removeListener("data",a),r=!0,!E.awaitDrain||A._writableState&&!A._writableState.needDrain||s())}function o(){h("onend"),A.end()}E.endEmitted?I.nextTick(t):Q.once("end",t),A.on("unpipe",e);var s=function(A){return function(){var B=A._readableState;h("pipeOnDrain",B.awaitDrain),B.awaitDrain&&B.awaitDrain--,0===B.awaitDrain&&C(A,"data")&&(B.flowing=!0,Y(A))}}(Q);A.on("drain",s);var r=!1;var n=!1;function a(B){h("ondata"),n=!1,!1!==A.write(B)||n||((1===E.pipesCount&&E.pipes===A||E.pipesCount>1&&-1!==M(E.pipes,A))&&!r&&(h("false write response, pause",Q._readableState.awaitDrain),Q._readableState.awaitDrain++,n=!0),Q.pause())}function c(B){h("onerror",B),u(),A.removeListener("error",c),0===C(A,"error")&&A.emit("error",B)}function y(){A.removeListener("finish",D),u()}function D(){h("onfinish"),A.removeListener("close",y),u()}function u(){h("unpipe"),Q.unpipe(A)}return Q.on("data",a),function(A,B,Q){if("function"==typeof A.prependListener)return A.prependListener(B,Q);A._events&&A._events[B]?i(A._events[B])?A._events[B].unshift(Q):A._events[B]=[Q,A._events[B]]:A.on(B,Q)}(A,"error",c),A.once("close",y),A.once("finish",D),A.emit("pipe",Q),E.flowing||(h("pipe resume"),Q.resume()),A},u.prototype.unpipe=function(A){var B=this._readableState,Q={hasUnpiped:!1};if(0===B.pipesCount)return this;if(1===B.pipesCount)return A&&A!==B.pipes||(A||(A=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,A&&A.emit("unpipe",this,Q)),this;if(!A){var g=B.pipes,I=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var E=0;EQ)?B=("rmd160"===A?new t:e(A)).update(B).digest():B.lengthQ||E!=E)throw new TypeError("Bad key length")}}).call(this,Q(2).Buffer)},function(A,B,Q){(function(B){var Q;B.browser?Q="utf-8":Q=parseInt(B.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";A.exports=Q}).call(this,Q(3))},function(A,B,Q){var g=Q(64),I=Q(34),E=Q(35),i=Q(67),C=Q(68),t=Q(1).Buffer,e=t.alloc(128),o={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function s(A,B,Q){var i=function(A){function B(B){return E(A).update(B).digest()}return"rmd160"===A||"ripemd160"===A?function(A){return(new I).update(A).digest()}:"md5"===A?g:B}(A),C="sha512"===A||"sha384"===A?128:64;B.length>C?B=i(B):B.length>>0},B.writeUInt32BE=function(A,B,Q){A[0+Q]=B>>>24,A[1+Q]=B>>>16&255,A[2+Q]=B>>>8&255,A[3+Q]=255&B},B.ip=function(A,B,Q,g){for(var I=0,E=0,i=6;i>=0;i-=2){for(var C=0;C<=24;C+=8)I<<=1,I|=B>>>C+i&1;for(C=0;C<=24;C+=8)I<<=1,I|=A>>>C+i&1}for(i=6;i>=0;i-=2){for(C=1;C<=25;C+=8)E<<=1,E|=B>>>C+i&1;for(C=1;C<=25;C+=8)E<<=1,E|=A>>>C+i&1}Q[g+0]=I>>>0,Q[g+1]=E>>>0},B.rip=function(A,B,Q,g){for(var I=0,E=0,i=0;i<4;i++)for(var C=24;C>=0;C-=8)I<<=1,I|=B>>>C+i&1,I<<=1,I|=A>>>C+i&1;for(i=4;i<8;i++)for(C=24;C>=0;C-=8)E<<=1,E|=B>>>C+i&1,E<<=1,E|=A>>>C+i&1;Q[g+0]=I>>>0,Q[g+1]=E>>>0},B.pc1=function(A,B,Q,g){for(var I=0,E=0,i=7;i>=5;i--){for(var C=0;C<=24;C+=8)I<<=1,I|=B>>C+i&1;for(C=0;C<=24;C+=8)I<<=1,I|=A>>C+i&1}for(C=0;C<=24;C+=8)I<<=1,I|=B>>C+i&1;for(i=1;i<=3;i++){for(C=0;C<=24;C+=8)E<<=1,E|=B>>C+i&1;for(C=0;C<=24;C+=8)E<<=1,E|=A>>C+i&1}for(C=0;C<=24;C+=8)E<<=1,E|=A>>C+i&1;Q[g+0]=I>>>0,Q[g+1]=E>>>0},B.r28shl=function(A,B){return A<>>28-B};var g=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];B.pc2=function(A,B,Q,I){for(var E=0,i=0,C=g.length>>>1,t=0;t>>g[t]&1;for(t=C;t>>g[t]&1;Q[I+0]=E>>>0,Q[I+1]=i>>>0},B.expand=function(A,B,Q){var g=0,I=0;g=(1&A)<<5|A>>>27;for(var E=23;E>=15;E-=4)g<<=6,g|=A>>>E&63;for(E=11;E>=3;E-=4)I|=A>>>E&63,I<<=6;I|=(31&A)<<1|A>>>31,B[Q+0]=g>>>0,B[Q+1]=I>>>0};var I=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];B.substitute=function(A,B){for(var Q=0,g=0;g<4;g++){Q<<=4,Q|=I[64*g+(A>>>18-6*g&63)]}for(g=0;g<4;g++){Q<<=4,Q|=I[256+64*g+(B>>>18-6*g&63)]}return Q>>>0};var E=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];B.permute=function(A){for(var B=0,Q=0;Q>>E[Q]&1;return B>>>0},B.padSplit=function(A,B,Q){for(var g=A.toString(2);g.length>>1];Q=E.r28shl(Q,C),I=E.r28shl(I,C),E.pc2(Q,I,A.keys,i)}},t.prototype._update=function(A,B,Q,g){var I=this._desState,i=E.readUInt32BE(A,B),C=E.readUInt32BE(A,B+4);E.ip(i,C,I.tmp,0),i=I.tmp[0],C=I.tmp[1],"encrypt"===this.type?this._encrypt(I,i,C,I.tmp,0):this._decrypt(I,i,C,I.tmp,0),i=I.tmp[0],C=I.tmp[1],E.writeUInt32BE(Q,i,g),E.writeUInt32BE(Q,C,g+4)},t.prototype._pad=function(A,B){for(var Q=A.length-B,g=B;g>>0,i=r}E.rip(C,i,g,I)},t.prototype._decrypt=function(A,B,Q,g,I){for(var i=Q,C=B,t=A.keys.length-2;t>=0;t-=2){var e=A.keys[t],o=A.keys[t+1];E.expand(i,A.tmp,0),e^=A.tmp[0],o^=A.tmp[1];var s=E.substitute(e,o),r=i;i=(C^E.permute(s))>>>0,C=r}E.rip(i,C,g,I)}},function(A,B,Q){var g=Q(22),I=Q(1).Buffer,E=Q(73);function i(A){var B=A._cipher.encryptBlockRaw(A._prev);return E(A._prev),B}B.encrypt=function(A,B){var Q=Math.ceil(B.length/16),E=A._cache.length;A._cache=I.concat([A._cache,I.allocUnsafe(16*Q)]);for(var C=0;CA;)Q.ishrn(1);if(Q.isEven()&&Q.iadd(C),Q.testn(1)||Q.iadd(t),B.cmp(t)){if(!B.cmp(e))for(;Q.mod(o).cmp(s);)Q.iadd(h)}else for(;Q.mod(E).cmp(r);)Q.iadd(h);if(c(n=Q.shrn(1))&&c(Q)&&y(n)&&y(Q)&&i.test(n)&&i.test(Q))return Q}}},function(A,B,Q){(function(A){!function(A,B){"use strict";function g(A,B){if(!A)throw new Error(B||"Assertion failed")}function I(A,B){A.super_=B;var Q=function(){};Q.prototype=B.prototype,A.prototype=new Q,A.prototype.constructor=A}function E(A,B,Q){if(E.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,null!==A&&("le"!==B&&"be"!==B||(Q=B,B=10),this._init(A||0,B||10,Q||"be"))}var i;"object"==typeof A?A.exports=E:B.BN=E,E.BN=E,E.wordSize=26;try{i=Q(149).Buffer}catch(A){}function C(A,B,Q){for(var g=0,I=Math.min(A.length,Q),E=B;E=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return g}function t(A,B,Q,g){for(var I=0,E=Math.min(A.length,Q),i=B;i=49?C-49+10:C>=17?C-17+10:C}return I}E.isBN=function(A){return A instanceof E||null!==A&&"object"==typeof A&&A.constructor.wordSize===E.wordSize&&Array.isArray(A.words)},E.max=function(A,B){return A.cmp(B)>0?A:B},E.min=function(A,B){return A.cmp(B)<0?A:B},E.prototype._init=function(A,B,Q){if("number"==typeof A)return this._initNumber(A,B,Q);if("object"==typeof A)return this._initArray(A,B,Q);"hex"===B&&(B=16),g(B===(0|B)&&B>=2&&B<=36);var I=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&I++,16===B?this._parseHex(A,I):this._parseBase(A,B,I),"-"===A[0]&&(this.negative=1),this.strip(),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initNumber=function(A,B,Q){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[67108863&A],this.length=1):A<4503599627370496?(this.words=[67108863&A,A/67108864&67108863],this.length=2):(g(A<9007199254740992),this.words=[67108863&A,A/67108864&67108863,1],this.length=3),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initArray=function(A,B,Q){if(g("number"==typeof A.length),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var I=0;I=0;I-=3)i=A[I]|A[I-1]<<8|A[I-2]<<16,this.words[E]|=i<>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);else if("le"===Q)for(I=0,E=0;I>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);return this.strip()},E.prototype._parseHex=function(A,B){this.length=Math.ceil((A.length-B)/6),this.words=new Array(this.length);for(var Q=0;Q=B;Q-=6)I=C(A,Q,Q+6),this.words[g]|=I<>>26-E&4194303,(E+=24)>=26&&(E-=26,g++);Q+6!==B&&(I=C(A,B,Q+6),this.words[g]|=I<>>26-E&4194303),this.strip()},E.prototype._parseBase=function(A,B,Q){this.words=[0],this.length=1;for(var g=0,I=1;I<=67108863;I*=B)g++;g--,I=I/B|0;for(var E=A.length-Q,i=E%g,C=Math.min(E,E-i)+Q,e=0,o=Q;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},E.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},E.prototype.inspect=function(){return(this.red?""};var e=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],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],s=[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 r(A,B,Q){Q.negative=B.negative^A.negative;var g=A.length+B.length|0;Q.length=g,g=g-1|0;var I=0|A.words[0],E=0|B.words[0],i=I*E,C=67108863&i,t=i/67108864|0;Q.words[0]=C;for(var e=1;e>>26,s=67108863&t,r=Math.min(e,B.length-1),h=Math.max(0,e-A.length+1);h<=r;h++){var n=e-h|0;o+=(i=(I=0|A.words[n])*(E=0|B.words[h])+s)/67108864|0,s=67108863&i}Q.words[e]=0|s,t=0|o}return 0!==t?Q.words[e]=0|t:Q.length--,Q.strip()}E.prototype.toString=function(A,B){var Q;if(B=0|B||1,16===(A=A||10)||"hex"===A){Q="";for(var I=0,E=0,i=0;i>>24-I&16777215)||i!==this.length-1?e[6-t.length]+t+Q:t+Q,(I+=2)>=26&&(I-=26,i--)}for(0!==E&&(Q=E.toString(16)+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}if(A===(0|A)&&A>=2&&A<=36){var r=o[A],h=s[A];Q="";var n=this.clone();for(n.negative=0;!n.isZero();){var a=n.modn(h).toString(A);Q=(n=n.idivn(h)).isZero()?a+Q:e[r-a.length]+a+Q}for(this.isZero()&&(Q="0"+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}g(!1,"Base should be between 2 and 36")},E.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&g(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},E.prototype.toJSON=function(){return this.toString(16)},E.prototype.toBuffer=function(A,B){return g(void 0!==i),this.toArrayLike(i,A,B)},E.prototype.toArray=function(A,B){return this.toArrayLike(Array,A,B)},E.prototype.toArrayLike=function(A,B,Q){var I=this.byteLength(),E=Q||Math.max(1,I);g(I<=E,"byte array longer than desired length"),g(E>0,"Requested array length <= 0"),this.strip();var i,C,t="le"===B,e=new A(E),o=this.clone();if(t){for(C=0;!o.isZero();C++)i=o.andln(255),o.iushrn(8),e[C]=i;for(;C=4096&&(Q+=13,B>>>=13),B>=64&&(Q+=7,B>>>=7),B>=8&&(Q+=4,B>>>=4),B>=2&&(Q+=2,B>>>=2),Q+B},E.prototype._zeroBits=function(A){if(0===A)return 26;var B=A,Q=0;return 0==(8191&B)&&(Q+=13,B>>>=13),0==(127&B)&&(Q+=7,B>>>=7),0==(15&B)&&(Q+=4,B>>>=4),0==(3&B)&&(Q+=2,B>>>=2),0==(1&B)&&Q++,Q},E.prototype.bitLength=function(){var A=this.words[this.length-1],B=this._countBits(A);return 26*(this.length-1)+B},E.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,B=0;BA.length?this.clone().ior(A):A.clone().ior(this)},E.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},E.prototype.iuand=function(A){var B;B=this.length>A.length?A:this;for(var Q=0;QA.length?this.clone().iand(A):A.clone().iand(this)},E.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},E.prototype.iuxor=function(A){var B,Q;this.length>A.length?(B=this,Q=A):(B=A,Q=this);for(var g=0;gA.length?this.clone().ixor(A):A.clone().ixor(this)},E.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},E.prototype.inotn=function(A){g("number"==typeof A&&A>=0);var B=0|Math.ceil(A/26),Q=A%26;this._expand(B),Q>0&&B--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-Q),this.strip()},E.prototype.notn=function(A){return this.clone().inotn(A)},E.prototype.setn=function(A,B){g("number"==typeof A&&A>=0);var Q=A/26|0,I=A%26;return this._expand(Q+1),this.words[Q]=B?this.words[Q]|1<A.length?(Q=this,g=A):(Q=A,g=this);for(var I=0,E=0;E>>26;for(;0!==I&&E>>26;if(this.length=Q.length,0!==I)this.words[this.length]=I,this.length++;else if(Q!==this)for(;EA.length?this.clone().iadd(A):A.clone().iadd(this)},E.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var B=this.iadd(A);return A.negative=1,B._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var Q,g,I=this.cmp(A);if(0===I)return this.negative=0,this.length=1,this.words[0]=0,this;I>0?(Q=this,g=A):(Q=A,g=this);for(var E=0,i=0;i>26,this.words[i]=67108863&B;for(;0!==E&&i>26,this.words[i]=67108863&B;if(0===E&&i>>13,h=0|i[1],n=8191&h,a=h>>>13,c=0|i[2],y=8191&c,D=c>>>13,u=0|i[3],f=8191&u,w=u>>>13,F=0|i[4],d=8191&F,l=F>>>13,U=0|i[5],N=8191&U,H=U>>>13,G=0|i[6],Y=8191&G,L=G>>>13,R=0|i[7],p=8191&R,M=R>>>13,m=0|i[8],k=8191&m,S=m>>>13,b=0|i[9],v=8191&b,J=b>>>13,V=0|C[0],K=8191&V,x=V>>>13,Z=0|C[1],q=8191&Z,O=Z>>>13,j=0|C[2],W=8191&j,X=j>>>13,T=0|C[3],z=8191&T,_=T>>>13,P=0|C[4],$=8191&P,AA=P>>>13,BA=0|C[5],QA=8191&BA,gA=BA>>>13,IA=0|C[6],EA=8191&IA,iA=IA>>>13,CA=0|C[7],tA=8191&CA,eA=CA>>>13,oA=0|C[8],sA=8191&oA,rA=oA>>>13,hA=0|C[9],nA=8191&hA,aA=hA>>>13;Q.negative=A.negative^B.negative,Q.length=19;var cA=(e+(g=Math.imul(s,K))|0)+((8191&(I=(I=Math.imul(s,x))+Math.imul(r,K)|0))<<13)|0;e=((E=Math.imul(r,x))+(I>>>13)|0)+(cA>>>26)|0,cA&=67108863,g=Math.imul(n,K),I=(I=Math.imul(n,x))+Math.imul(a,K)|0,E=Math.imul(a,x);var yA=(e+(g=g+Math.imul(s,q)|0)|0)+((8191&(I=(I=I+Math.imul(s,O)|0)+Math.imul(r,q)|0))<<13)|0;e=((E=E+Math.imul(r,O)|0)+(I>>>13)|0)+(yA>>>26)|0,yA&=67108863,g=Math.imul(y,K),I=(I=Math.imul(y,x))+Math.imul(D,K)|0,E=Math.imul(D,x),g=g+Math.imul(n,q)|0,I=(I=I+Math.imul(n,O)|0)+Math.imul(a,q)|0,E=E+Math.imul(a,O)|0;var DA=(e+(g=g+Math.imul(s,W)|0)|0)+((8191&(I=(I=I+Math.imul(s,X)|0)+Math.imul(r,W)|0))<<13)|0;e=((E=E+Math.imul(r,X)|0)+(I>>>13)|0)+(DA>>>26)|0,DA&=67108863,g=Math.imul(f,K),I=(I=Math.imul(f,x))+Math.imul(w,K)|0,E=Math.imul(w,x),g=g+Math.imul(y,q)|0,I=(I=I+Math.imul(y,O)|0)+Math.imul(D,q)|0,E=E+Math.imul(D,O)|0,g=g+Math.imul(n,W)|0,I=(I=I+Math.imul(n,X)|0)+Math.imul(a,W)|0,E=E+Math.imul(a,X)|0;var uA=(e+(g=g+Math.imul(s,z)|0)|0)+((8191&(I=(I=I+Math.imul(s,_)|0)+Math.imul(r,z)|0))<<13)|0;e=((E=E+Math.imul(r,_)|0)+(I>>>13)|0)+(uA>>>26)|0,uA&=67108863,g=Math.imul(d,K),I=(I=Math.imul(d,x))+Math.imul(l,K)|0,E=Math.imul(l,x),g=g+Math.imul(f,q)|0,I=(I=I+Math.imul(f,O)|0)+Math.imul(w,q)|0,E=E+Math.imul(w,O)|0,g=g+Math.imul(y,W)|0,I=(I=I+Math.imul(y,X)|0)+Math.imul(D,W)|0,E=E+Math.imul(D,X)|0,g=g+Math.imul(n,z)|0,I=(I=I+Math.imul(n,_)|0)+Math.imul(a,z)|0,E=E+Math.imul(a,_)|0;var fA=(e+(g=g+Math.imul(s,$)|0)|0)+((8191&(I=(I=I+Math.imul(s,AA)|0)+Math.imul(r,$)|0))<<13)|0;e=((E=E+Math.imul(r,AA)|0)+(I>>>13)|0)+(fA>>>26)|0,fA&=67108863,g=Math.imul(N,K),I=(I=Math.imul(N,x))+Math.imul(H,K)|0,E=Math.imul(H,x),g=g+Math.imul(d,q)|0,I=(I=I+Math.imul(d,O)|0)+Math.imul(l,q)|0,E=E+Math.imul(l,O)|0,g=g+Math.imul(f,W)|0,I=(I=I+Math.imul(f,X)|0)+Math.imul(w,W)|0,E=E+Math.imul(w,X)|0,g=g+Math.imul(y,z)|0,I=(I=I+Math.imul(y,_)|0)+Math.imul(D,z)|0,E=E+Math.imul(D,_)|0,g=g+Math.imul(n,$)|0,I=(I=I+Math.imul(n,AA)|0)+Math.imul(a,$)|0,E=E+Math.imul(a,AA)|0;var wA=(e+(g=g+Math.imul(s,QA)|0)|0)+((8191&(I=(I=I+Math.imul(s,gA)|0)+Math.imul(r,QA)|0))<<13)|0;e=((E=E+Math.imul(r,gA)|0)+(I>>>13)|0)+(wA>>>26)|0,wA&=67108863,g=Math.imul(Y,K),I=(I=Math.imul(Y,x))+Math.imul(L,K)|0,E=Math.imul(L,x),g=g+Math.imul(N,q)|0,I=(I=I+Math.imul(N,O)|0)+Math.imul(H,q)|0,E=E+Math.imul(H,O)|0,g=g+Math.imul(d,W)|0,I=(I=I+Math.imul(d,X)|0)+Math.imul(l,W)|0,E=E+Math.imul(l,X)|0,g=g+Math.imul(f,z)|0,I=(I=I+Math.imul(f,_)|0)+Math.imul(w,z)|0,E=E+Math.imul(w,_)|0,g=g+Math.imul(y,$)|0,I=(I=I+Math.imul(y,AA)|0)+Math.imul(D,$)|0,E=E+Math.imul(D,AA)|0,g=g+Math.imul(n,QA)|0,I=(I=I+Math.imul(n,gA)|0)+Math.imul(a,QA)|0,E=E+Math.imul(a,gA)|0;var FA=(e+(g=g+Math.imul(s,EA)|0)|0)+((8191&(I=(I=I+Math.imul(s,iA)|0)+Math.imul(r,EA)|0))<<13)|0;e=((E=E+Math.imul(r,iA)|0)+(I>>>13)|0)+(FA>>>26)|0,FA&=67108863,g=Math.imul(p,K),I=(I=Math.imul(p,x))+Math.imul(M,K)|0,E=Math.imul(M,x),g=g+Math.imul(Y,q)|0,I=(I=I+Math.imul(Y,O)|0)+Math.imul(L,q)|0,E=E+Math.imul(L,O)|0,g=g+Math.imul(N,W)|0,I=(I=I+Math.imul(N,X)|0)+Math.imul(H,W)|0,E=E+Math.imul(H,X)|0,g=g+Math.imul(d,z)|0,I=(I=I+Math.imul(d,_)|0)+Math.imul(l,z)|0,E=E+Math.imul(l,_)|0,g=g+Math.imul(f,$)|0,I=(I=I+Math.imul(f,AA)|0)+Math.imul(w,$)|0,E=E+Math.imul(w,AA)|0,g=g+Math.imul(y,QA)|0,I=(I=I+Math.imul(y,gA)|0)+Math.imul(D,QA)|0,E=E+Math.imul(D,gA)|0,g=g+Math.imul(n,EA)|0,I=(I=I+Math.imul(n,iA)|0)+Math.imul(a,EA)|0,E=E+Math.imul(a,iA)|0;var dA=(e+(g=g+Math.imul(s,tA)|0)|0)+((8191&(I=(I=I+Math.imul(s,eA)|0)+Math.imul(r,tA)|0))<<13)|0;e=((E=E+Math.imul(r,eA)|0)+(I>>>13)|0)+(dA>>>26)|0,dA&=67108863,g=Math.imul(k,K),I=(I=Math.imul(k,x))+Math.imul(S,K)|0,E=Math.imul(S,x),g=g+Math.imul(p,q)|0,I=(I=I+Math.imul(p,O)|0)+Math.imul(M,q)|0,E=E+Math.imul(M,O)|0,g=g+Math.imul(Y,W)|0,I=(I=I+Math.imul(Y,X)|0)+Math.imul(L,W)|0,E=E+Math.imul(L,X)|0,g=g+Math.imul(N,z)|0,I=(I=I+Math.imul(N,_)|0)+Math.imul(H,z)|0,E=E+Math.imul(H,_)|0,g=g+Math.imul(d,$)|0,I=(I=I+Math.imul(d,AA)|0)+Math.imul(l,$)|0,E=E+Math.imul(l,AA)|0,g=g+Math.imul(f,QA)|0,I=(I=I+Math.imul(f,gA)|0)+Math.imul(w,QA)|0,E=E+Math.imul(w,gA)|0,g=g+Math.imul(y,EA)|0,I=(I=I+Math.imul(y,iA)|0)+Math.imul(D,EA)|0,E=E+Math.imul(D,iA)|0,g=g+Math.imul(n,tA)|0,I=(I=I+Math.imul(n,eA)|0)+Math.imul(a,tA)|0,E=E+Math.imul(a,eA)|0;var lA=(e+(g=g+Math.imul(s,sA)|0)|0)+((8191&(I=(I=I+Math.imul(s,rA)|0)+Math.imul(r,sA)|0))<<13)|0;e=((E=E+Math.imul(r,rA)|0)+(I>>>13)|0)+(lA>>>26)|0,lA&=67108863,g=Math.imul(v,K),I=(I=Math.imul(v,x))+Math.imul(J,K)|0,E=Math.imul(J,x),g=g+Math.imul(k,q)|0,I=(I=I+Math.imul(k,O)|0)+Math.imul(S,q)|0,E=E+Math.imul(S,O)|0,g=g+Math.imul(p,W)|0,I=(I=I+Math.imul(p,X)|0)+Math.imul(M,W)|0,E=E+Math.imul(M,X)|0,g=g+Math.imul(Y,z)|0,I=(I=I+Math.imul(Y,_)|0)+Math.imul(L,z)|0,E=E+Math.imul(L,_)|0,g=g+Math.imul(N,$)|0,I=(I=I+Math.imul(N,AA)|0)+Math.imul(H,$)|0,E=E+Math.imul(H,AA)|0,g=g+Math.imul(d,QA)|0,I=(I=I+Math.imul(d,gA)|0)+Math.imul(l,QA)|0,E=E+Math.imul(l,gA)|0,g=g+Math.imul(f,EA)|0,I=(I=I+Math.imul(f,iA)|0)+Math.imul(w,EA)|0,E=E+Math.imul(w,iA)|0,g=g+Math.imul(y,tA)|0,I=(I=I+Math.imul(y,eA)|0)+Math.imul(D,tA)|0,E=E+Math.imul(D,eA)|0,g=g+Math.imul(n,sA)|0,I=(I=I+Math.imul(n,rA)|0)+Math.imul(a,sA)|0,E=E+Math.imul(a,rA)|0;var UA=(e+(g=g+Math.imul(s,nA)|0)|0)+((8191&(I=(I=I+Math.imul(s,aA)|0)+Math.imul(r,nA)|0))<<13)|0;e=((E=E+Math.imul(r,aA)|0)+(I>>>13)|0)+(UA>>>26)|0,UA&=67108863,g=Math.imul(v,q),I=(I=Math.imul(v,O))+Math.imul(J,q)|0,E=Math.imul(J,O),g=g+Math.imul(k,W)|0,I=(I=I+Math.imul(k,X)|0)+Math.imul(S,W)|0,E=E+Math.imul(S,X)|0,g=g+Math.imul(p,z)|0,I=(I=I+Math.imul(p,_)|0)+Math.imul(M,z)|0,E=E+Math.imul(M,_)|0,g=g+Math.imul(Y,$)|0,I=(I=I+Math.imul(Y,AA)|0)+Math.imul(L,$)|0,E=E+Math.imul(L,AA)|0,g=g+Math.imul(N,QA)|0,I=(I=I+Math.imul(N,gA)|0)+Math.imul(H,QA)|0,E=E+Math.imul(H,gA)|0,g=g+Math.imul(d,EA)|0,I=(I=I+Math.imul(d,iA)|0)+Math.imul(l,EA)|0,E=E+Math.imul(l,iA)|0,g=g+Math.imul(f,tA)|0,I=(I=I+Math.imul(f,eA)|0)+Math.imul(w,tA)|0,E=E+Math.imul(w,eA)|0,g=g+Math.imul(y,sA)|0,I=(I=I+Math.imul(y,rA)|0)+Math.imul(D,sA)|0,E=E+Math.imul(D,rA)|0;var NA=(e+(g=g+Math.imul(n,nA)|0)|0)+((8191&(I=(I=I+Math.imul(n,aA)|0)+Math.imul(a,nA)|0))<<13)|0;e=((E=E+Math.imul(a,aA)|0)+(I>>>13)|0)+(NA>>>26)|0,NA&=67108863,g=Math.imul(v,W),I=(I=Math.imul(v,X))+Math.imul(J,W)|0,E=Math.imul(J,X),g=g+Math.imul(k,z)|0,I=(I=I+Math.imul(k,_)|0)+Math.imul(S,z)|0,E=E+Math.imul(S,_)|0,g=g+Math.imul(p,$)|0,I=(I=I+Math.imul(p,AA)|0)+Math.imul(M,$)|0,E=E+Math.imul(M,AA)|0,g=g+Math.imul(Y,QA)|0,I=(I=I+Math.imul(Y,gA)|0)+Math.imul(L,QA)|0,E=E+Math.imul(L,gA)|0,g=g+Math.imul(N,EA)|0,I=(I=I+Math.imul(N,iA)|0)+Math.imul(H,EA)|0,E=E+Math.imul(H,iA)|0,g=g+Math.imul(d,tA)|0,I=(I=I+Math.imul(d,eA)|0)+Math.imul(l,tA)|0,E=E+Math.imul(l,eA)|0,g=g+Math.imul(f,sA)|0,I=(I=I+Math.imul(f,rA)|0)+Math.imul(w,sA)|0,E=E+Math.imul(w,rA)|0;var HA=(e+(g=g+Math.imul(y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(y,aA)|0)+Math.imul(D,nA)|0))<<13)|0;e=((E=E+Math.imul(D,aA)|0)+(I>>>13)|0)+(HA>>>26)|0,HA&=67108863,g=Math.imul(v,z),I=(I=Math.imul(v,_))+Math.imul(J,z)|0,E=Math.imul(J,_),g=g+Math.imul(k,$)|0,I=(I=I+Math.imul(k,AA)|0)+Math.imul(S,$)|0,E=E+Math.imul(S,AA)|0,g=g+Math.imul(p,QA)|0,I=(I=I+Math.imul(p,gA)|0)+Math.imul(M,QA)|0,E=E+Math.imul(M,gA)|0,g=g+Math.imul(Y,EA)|0,I=(I=I+Math.imul(Y,iA)|0)+Math.imul(L,EA)|0,E=E+Math.imul(L,iA)|0,g=g+Math.imul(N,tA)|0,I=(I=I+Math.imul(N,eA)|0)+Math.imul(H,tA)|0,E=E+Math.imul(H,eA)|0,g=g+Math.imul(d,sA)|0,I=(I=I+Math.imul(d,rA)|0)+Math.imul(l,sA)|0,E=E+Math.imul(l,rA)|0;var GA=(e+(g=g+Math.imul(f,nA)|0)|0)+((8191&(I=(I=I+Math.imul(f,aA)|0)+Math.imul(w,nA)|0))<<13)|0;e=((E=E+Math.imul(w,aA)|0)+(I>>>13)|0)+(GA>>>26)|0,GA&=67108863,g=Math.imul(v,$),I=(I=Math.imul(v,AA))+Math.imul(J,$)|0,E=Math.imul(J,AA),g=g+Math.imul(k,QA)|0,I=(I=I+Math.imul(k,gA)|0)+Math.imul(S,QA)|0,E=E+Math.imul(S,gA)|0,g=g+Math.imul(p,EA)|0,I=(I=I+Math.imul(p,iA)|0)+Math.imul(M,EA)|0,E=E+Math.imul(M,iA)|0,g=g+Math.imul(Y,tA)|0,I=(I=I+Math.imul(Y,eA)|0)+Math.imul(L,tA)|0,E=E+Math.imul(L,eA)|0,g=g+Math.imul(N,sA)|0,I=(I=I+Math.imul(N,rA)|0)+Math.imul(H,sA)|0,E=E+Math.imul(H,rA)|0;var YA=(e+(g=g+Math.imul(d,nA)|0)|0)+((8191&(I=(I=I+Math.imul(d,aA)|0)+Math.imul(l,nA)|0))<<13)|0;e=((E=E+Math.imul(l,aA)|0)+(I>>>13)|0)+(YA>>>26)|0,YA&=67108863,g=Math.imul(v,QA),I=(I=Math.imul(v,gA))+Math.imul(J,QA)|0,E=Math.imul(J,gA),g=g+Math.imul(k,EA)|0,I=(I=I+Math.imul(k,iA)|0)+Math.imul(S,EA)|0,E=E+Math.imul(S,iA)|0,g=g+Math.imul(p,tA)|0,I=(I=I+Math.imul(p,eA)|0)+Math.imul(M,tA)|0,E=E+Math.imul(M,eA)|0,g=g+Math.imul(Y,sA)|0,I=(I=I+Math.imul(Y,rA)|0)+Math.imul(L,sA)|0,E=E+Math.imul(L,rA)|0;var LA=(e+(g=g+Math.imul(N,nA)|0)|0)+((8191&(I=(I=I+Math.imul(N,aA)|0)+Math.imul(H,nA)|0))<<13)|0;e=((E=E+Math.imul(H,aA)|0)+(I>>>13)|0)+(LA>>>26)|0,LA&=67108863,g=Math.imul(v,EA),I=(I=Math.imul(v,iA))+Math.imul(J,EA)|0,E=Math.imul(J,iA),g=g+Math.imul(k,tA)|0,I=(I=I+Math.imul(k,eA)|0)+Math.imul(S,tA)|0,E=E+Math.imul(S,eA)|0,g=g+Math.imul(p,sA)|0,I=(I=I+Math.imul(p,rA)|0)+Math.imul(M,sA)|0,E=E+Math.imul(M,rA)|0;var RA=(e+(g=g+Math.imul(Y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(Y,aA)|0)+Math.imul(L,nA)|0))<<13)|0;e=((E=E+Math.imul(L,aA)|0)+(I>>>13)|0)+(RA>>>26)|0,RA&=67108863,g=Math.imul(v,tA),I=(I=Math.imul(v,eA))+Math.imul(J,tA)|0,E=Math.imul(J,eA),g=g+Math.imul(k,sA)|0,I=(I=I+Math.imul(k,rA)|0)+Math.imul(S,sA)|0,E=E+Math.imul(S,rA)|0;var pA=(e+(g=g+Math.imul(p,nA)|0)|0)+((8191&(I=(I=I+Math.imul(p,aA)|0)+Math.imul(M,nA)|0))<<13)|0;e=((E=E+Math.imul(M,aA)|0)+(I>>>13)|0)+(pA>>>26)|0,pA&=67108863,g=Math.imul(v,sA),I=(I=Math.imul(v,rA))+Math.imul(J,sA)|0,E=Math.imul(J,rA);var MA=(e+(g=g+Math.imul(k,nA)|0)|0)+((8191&(I=(I=I+Math.imul(k,aA)|0)+Math.imul(S,nA)|0))<<13)|0;e=((E=E+Math.imul(S,aA)|0)+(I>>>13)|0)+(MA>>>26)|0,MA&=67108863;var mA=(e+(g=Math.imul(v,nA))|0)+((8191&(I=(I=Math.imul(v,aA))+Math.imul(J,nA)|0))<<13)|0;return e=((E=Math.imul(J,aA))+(I>>>13)|0)+(mA>>>26)|0,mA&=67108863,t[0]=cA,t[1]=yA,t[2]=DA,t[3]=uA,t[4]=fA,t[5]=wA,t[6]=FA,t[7]=dA,t[8]=lA,t[9]=UA,t[10]=NA,t[11]=HA,t[12]=GA,t[13]=YA,t[14]=LA,t[15]=RA,t[16]=pA,t[17]=MA,t[18]=mA,0!==e&&(t[19]=e,Q.length++),Q};function n(A,B,Q){return(new a).mulp(A,B,Q)}function a(A,B){this.x=A,this.y=B}Math.imul||(h=r),E.prototype.mulTo=function(A,B){var Q=this.length+A.length;return 10===this.length&&10===A.length?h(this,A,B):Q<63?r(this,A,B):Q<1024?function(A,B,Q){Q.negative=B.negative^A.negative,Q.length=A.length+B.length;for(var g=0,I=0,E=0;E>>26)|0)>>>26,i&=67108863}Q.words[E]=C,g=i,i=I}return 0!==g?Q.words[E]=g:Q.length--,Q.strip()}(this,A,B):n(this,A,B)},a.prototype.makeRBT=function(A){for(var B=new Array(A),Q=E.prototype._countBits(A)-1,g=0;g>=1;return g},a.prototype.permute=function(A,B,Q,g,I,E){for(var i=0;i>>=1)I++;return 1<>>=13,Q[2*i+1]=8191&E,E>>>=13;for(i=2*B;i>=26,B+=I/67108864|0,B+=E>>>26,this.words[Q]=67108863&E}return 0!==B&&(this.words[Q]=B,this.length++),this},E.prototype.muln=function(A){return this.clone().imuln(A)},E.prototype.sqr=function(){return this.mul(this)},E.prototype.isqr=function(){return this.imul(this.clone())},E.prototype.pow=function(A){var B=function(A){for(var B=new Array(A.bitLength()),Q=0;Q>>I}return B}(A);if(0===B.length)return new E(1);for(var Q=this,g=0;g=0);var B,Q=A%26,I=(A-Q)/26,E=67108863>>>26-Q<<26-Q;if(0!==Q){var i=0;for(B=0;B>>26-Q}i&&(this.words[B]=i,this.length++)}if(0!==I){for(B=this.length-1;B>=0;B--)this.words[B+I]=this.words[B];for(B=0;B=0),I=B?(B-B%26)/26:0;var E=A%26,i=Math.min((A-E)/26,this.length),C=67108863^67108863>>>E<i)for(this.length-=i,e=0;e=0&&(0!==o||e>=I);e--){var s=0|this.words[e];this.words[e]=o<<26-E|s>>>E,o=s&C}return t&&0!==o&&(t.words[t.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},E.prototype.ishrn=function(A,B,Q){return g(0===this.negative),this.iushrn(A,B,Q)},E.prototype.shln=function(A){return this.clone().ishln(A)},E.prototype.ushln=function(A){return this.clone().iushln(A)},E.prototype.shrn=function(A){return this.clone().ishrn(A)},E.prototype.ushrn=function(A){return this.clone().iushrn(A)},E.prototype.testn=function(A){g("number"==typeof A&&A>=0);var B=A%26,Q=(A-B)/26,I=1<=0);var B=A%26,Q=(A-B)/26;if(g(0===this.negative,"imaskn works only with positive numbers"),this.length<=Q)return this;if(0!==B&&Q++,this.length=Math.min(Q,this.length),0!==B){var I=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},E.prototype.isubn=function(A){if(g("number"==typeof A),g(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(t/67108864|0),this.words[I+Q]=67108863&E}for(;I>26,this.words[I+Q]=67108863&E;if(0===C)return this.strip();for(g(-1===C),C=0,I=0;I>26,this.words[I]=67108863&E;return this.negative=1,this.strip()},E.prototype._wordDiv=function(A,B){var Q=(this.length,A.length),g=this.clone(),I=A,i=0|I.words[I.length-1];0!==(Q=26-this._countBits(i))&&(I=I.ushln(Q),g.iushln(Q),i=0|I.words[I.length-1]);var C,t=g.length-I.length;if("mod"!==B){(C=new E(null)).length=t+1,C.words=new Array(C.length);for(var e=0;e=0;s--){var r=67108864*(0|g.words[I.length+s])+(0|g.words[I.length+s-1]);for(r=Math.min(r/i|0,67108863),g._ishlnsubmul(I,r,s);0!==g.negative;)r--,g.negative=0,g._ishlnsubmul(I,1,s),g.isZero()||(g.negative^=1);C&&(C.words[s]=r)}return C&&C.strip(),g.strip(),"div"!==B&&0!==Q&&g.iushrn(Q),{div:C||null,mod:g}},E.prototype.divmod=function(A,B,Q){return g(!A.isZero()),this.isZero()?{div:new E(0),mod:new E(0)}:0!==this.negative&&0===A.negative?(C=this.neg().divmod(A,B),"mod"!==B&&(I=C.div.neg()),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.iadd(A)),{div:I,mod:i}):0===this.negative&&0!==A.negative?(C=this.divmod(A.neg(),B),"mod"!==B&&(I=C.div.neg()),{div:I,mod:C.mod}):0!=(this.negative&A.negative)?(C=this.neg().divmod(A.neg(),B),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.isub(A)),{div:C.div,mod:i}):A.length>this.length||this.cmp(A)<0?{div:new E(0),mod:this}:1===A.length?"div"===B?{div:this.divn(A.words[0]),mod:null}:"mod"===B?{div:null,mod:new E(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new E(this.modn(A.words[0]))}:this._wordDiv(A,B);var I,i,C},E.prototype.div=function(A){return this.divmod(A,"div",!1).div},E.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},E.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},E.prototype.divRound=function(A){var B=this.divmod(A);if(B.mod.isZero())return B.div;var Q=0!==B.div.negative?B.mod.isub(A):B.mod,g=A.ushrn(1),I=A.andln(1),E=Q.cmp(g);return E<0||1===I&&0===E?B.div:0!==B.div.negative?B.div.isubn(1):B.div.iaddn(1)},E.prototype.modn=function(A){g(A<=67108863);for(var B=(1<<26)%A,Q=0,I=this.length-1;I>=0;I--)Q=(B*Q+(0|this.words[I]))%A;return Q},E.prototype.idivn=function(A){g(A<=67108863);for(var B=0,Q=this.length-1;Q>=0;Q--){var I=(0|this.words[Q])+67108864*B;this.words[Q]=I/A|0,B=I%A}return this.strip()},E.prototype.divn=function(A){return this.clone().idivn(A)},E.prototype.egcd=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I=new E(1),i=new E(0),C=new E(0),t=new E(1),e=0;B.isEven()&&Q.isEven();)B.iushrn(1),Q.iushrn(1),++e;for(var o=Q.clone(),s=B.clone();!B.isZero();){for(var r=0,h=1;0==(B.words[0]&h)&&r<26;++r,h<<=1);if(r>0)for(B.iushrn(r);r-- >0;)(I.isOdd()||i.isOdd())&&(I.iadd(o),i.isub(s)),I.iushrn(1),i.iushrn(1);for(var n=0,a=1;0==(Q.words[0]&a)&&n<26;++n,a<<=1);if(n>0)for(Q.iushrn(n);n-- >0;)(C.isOdd()||t.isOdd())&&(C.iadd(o),t.isub(s)),C.iushrn(1),t.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),I.isub(C),i.isub(t)):(Q.isub(B),C.isub(I),t.isub(i))}return{a:C,b:t,gcd:Q.iushln(e)}},E.prototype._invmp=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I,i=new E(1),C=new E(0),t=Q.clone();B.cmpn(1)>0&&Q.cmpn(1)>0;){for(var e=0,o=1;0==(B.words[0]&o)&&e<26;++e,o<<=1);if(e>0)for(B.iushrn(e);e-- >0;)i.isOdd()&&i.iadd(t),i.iushrn(1);for(var s=0,r=1;0==(Q.words[0]&r)&&s<26;++s,r<<=1);if(s>0)for(Q.iushrn(s);s-- >0;)C.isOdd()&&C.iadd(t),C.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),i.isub(C)):(Q.isub(B),C.isub(i))}return(I=0===B.cmpn(1)?i:C).cmpn(0)<0&&I.iadd(A),I},E.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var B=this.clone(),Q=A.clone();B.negative=0,Q.negative=0;for(var g=0;B.isEven()&&Q.isEven();g++)B.iushrn(1),Q.iushrn(1);for(;;){for(;B.isEven();)B.iushrn(1);for(;Q.isEven();)Q.iushrn(1);var I=B.cmp(Q);if(I<0){var E=B;B=Q,Q=E}else if(0===I||0===Q.cmpn(1))break;B.isub(Q)}return Q.iushln(g)},E.prototype.invm=function(A){return this.egcd(A).a.umod(A)},E.prototype.isEven=function(){return 0==(1&this.words[0])},E.prototype.isOdd=function(){return 1==(1&this.words[0])},E.prototype.andln=function(A){return this.words[0]&A},E.prototype.bincn=function(A){g("number"==typeof A);var B=A%26,Q=(A-B)/26,I=1<>>26,C&=67108863,this.words[i]=C}return 0!==E&&(this.words[i]=E,this.length++),this},E.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},E.prototype.cmpn=function(A){var B,Q=A<0;if(0!==this.negative&&!Q)return-1;if(0===this.negative&&Q)return 1;if(this.strip(),this.length>1)B=1;else{Q&&(A=-A),g(A<=67108863,"Number is too big");var I=0|this.words[0];B=I===A?0:IA.length)return 1;if(this.length=0;Q--){var g=0|this.words[Q],I=0|A.words[Q];if(g!==I){gI&&(B=1);break}}return B},E.prototype.gtn=function(A){return 1===this.cmpn(A)},E.prototype.gt=function(A){return 1===this.cmp(A)},E.prototype.gten=function(A){return this.cmpn(A)>=0},E.prototype.gte=function(A){return this.cmp(A)>=0},E.prototype.ltn=function(A){return-1===this.cmpn(A)},E.prototype.lt=function(A){return-1===this.cmp(A)},E.prototype.lten=function(A){return this.cmpn(A)<=0},E.prototype.lte=function(A){return this.cmp(A)<=0},E.prototype.eqn=function(A){return 0===this.cmpn(A)},E.prototype.eq=function(A){return 0===this.cmp(A)},E.red=function(A){return new F(A)},E.prototype.toRed=function(A){return g(!this.red,"Already a number in reduction context"),g(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},E.prototype.fromRed=function(){return g(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},E.prototype._forceRed=function(A){return this.red=A,this},E.prototype.forceRed=function(A){return g(!this.red,"Already a number in reduction context"),this._forceRed(A)},E.prototype.redAdd=function(A){return g(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},E.prototype.redIAdd=function(A){return g(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},E.prototype.redSub=function(A){return g(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},E.prototype.redISub=function(A){return g(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},E.prototype.redShl=function(A){return g(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},E.prototype.redMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},E.prototype.redIMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},E.prototype.redSqr=function(){return g(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},E.prototype.redISqr=function(){return g(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},E.prototype.redSqrt=function(){return g(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},E.prototype.redInvm=function(){return g(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},E.prototype.redNeg=function(){return g(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},E.prototype.redPow=function(A){return g(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var c={k256:null,p224:null,p192:null,p25519:null};function y(A,B){this.name=A,this.p=new E(B,16),this.n=this.p.bitLength(),this.k=new E(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function D(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function u(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function f(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function F(A){if("string"==typeof A){var B=E._prime(A);this.m=B.p,this.prime=B}else g(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function d(A){F.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new E(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)}y.prototype._tmp=function(){var A=new E(null);return A.words=new Array(Math.ceil(this.n/13)),A},y.prototype.ireduce=function(A){var B,Q=A;do{this.split(Q,this.tmp),B=(Q=(Q=this.imulK(Q)).iadd(this.tmp)).bitLength()}while(B>this.n);var g=B0?Q.isub(this.p):Q.strip(),Q},y.prototype.split=function(A,B){A.iushrn(this.n,0,B)},y.prototype.imulK=function(A){return A.imul(this.k)},I(D,y),D.prototype.split=function(A,B){for(var Q=Math.min(A.length,9),g=0;g>>22,I=E}I>>>=22,A.words[g-10]=I,0===I&&A.length>10?A.length-=10:A.length-=9},D.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var B=0,Q=0;Q>>=26,A.words[Q]=I,B=g}return 0!==B&&(A.words[A.length++]=B),A},E._prime=function(A){if(c[A])return c[A];var B;if("k256"===A)B=new D;else if("p224"===A)B=new u;else if("p192"===A)B=new f;else{if("p25519"!==A)throw new Error("Unknown prime "+A);B=new w}return c[A]=B,B},F.prototype._verify1=function(A){g(0===A.negative,"red works only with positives"),g(A.red,"red works only with red numbers")},F.prototype._verify2=function(A,B){g(0==(A.negative|B.negative),"red works only with positives"),g(A.red&&A.red===B.red,"red works only with red numbers")},F.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},F.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},F.prototype.add=function(A,B){this._verify2(A,B);var Q=A.add(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q._forceRed(this)},F.prototype.iadd=function(A,B){this._verify2(A,B);var Q=A.iadd(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q},F.prototype.sub=function(A,B){this._verify2(A,B);var Q=A.sub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q._forceRed(this)},F.prototype.isub=function(A,B){this._verify2(A,B);var Q=A.isub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q},F.prototype.shl=function(A,B){return this._verify1(A),this.imod(A.ushln(B))},F.prototype.imul=function(A,B){return this._verify2(A,B),this.imod(A.imul(B))},F.prototype.mul=function(A,B){return this._verify2(A,B),this.imod(A.mul(B))},F.prototype.isqr=function(A){return this.imul(A,A.clone())},F.prototype.sqr=function(A){return this.mul(A,A)},F.prototype.sqrt=function(A){if(A.isZero())return A.clone();var B=this.m.andln(3);if(g(B%2==1),3===B){var Q=this.m.add(new E(1)).iushrn(2);return this.pow(A,Q)}for(var I=this.m.subn(1),i=0;!I.isZero()&&0===I.andln(1);)i++,I.iushrn(1);g(!I.isZero());var C=new E(1).toRed(this),t=C.redNeg(),e=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new E(2*o*o).toRed(this);0!==this.pow(o,e).cmp(t);)o.redIAdd(t);for(var s=this.pow(o,I),r=this.pow(A,I.addn(1).iushrn(1)),h=this.pow(A,I),n=i;0!==h.cmp(C);){for(var a=h,c=0;0!==a.cmp(C);c++)a=a.redSqr();g(c=0;g--){for(var e=B.words[g],o=t-1;o>=0;o--){var s=e>>o&1;I!==Q[0]&&(I=this.sqr(I)),0!==s||0!==i?(i<<=1,i|=s,(4===++C||0===g&&0===o)&&(I=this.mul(I,Q[i]),C=0,i=0)):C=0}t=26}return I},F.prototype.convertTo=function(A){var B=A.umod(this.m);return B===A?B.clone():B},F.prototype.convertFrom=function(A){var B=A.clone();return B.red=null,B},E.mont=function(A){return new d(A)},I(d,F),d.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},d.prototype.convertFrom=function(A){var B=this.imod(A.mul(this.rinv));return B.red=null,B},d.prototype.imul=function(A,B){if(A.isZero()||B.isZero())return A.words[0]=0,A.length=1,A;var Q=A.imul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),E=I;return I.cmp(this.m)>=0?E=I.isub(this.m):I.cmpn(0)<0&&(E=I.iadd(this.m)),E._forceRed(this)},d.prototype.mul=function(A,B){if(A.isZero()||B.isZero())return new E(0)._forceRed(this);var Q=A.mul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),i=I;return I.cmp(this.m)>=0?i=I.isub(this.m):I.cmpn(0)<0&&(i=I.iadd(this.m)),i._forceRed(this)},d.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A,this)}).call(this,Q(10)(A))},function(A,B,Q){var g=Q(150),I=Q(41);function E(A){this.rand=A||new I.Rand}A.exports=E,E.create=function(A){return new E(A)},E.prototype._randbelow=function(A){var B=A.bitLength(),Q=Math.ceil(B/8);do{var I=new g(this.rand.generate(Q))}while(I.cmp(A)>=0);return I},E.prototype._randrange=function(A,B){var Q=B.sub(A);return A.add(this._randbelow(Q))},E.prototype.test=function(A,B,Q){var I=A.bitLength(),E=g.mont(A),i=new g(1).toRed(E);B||(B=Math.max(1,I/48|0));for(var C=A.subn(1),t=0;!C.testn(t);t++);for(var e=A.shrn(t),o=C.toRed(E);B>0;B--){var s=this._randrange(new g(2),C);Q&&Q(s);var r=s.toRed(E).redPow(e);if(0!==r.cmp(i)&&0!==r.cmp(o)){for(var h=1;h0;B--){var o=this._randrange(new g(2),i),s=A.gcd(o);if(0!==s.cmpn(1))return s;var r=o.toRed(I).redPow(t);if(0!==r.cmp(E)&&0!==r.cmp(e)){for(var h=1;h0)if("string"==typeof B||i.objectMode||Object.getPrototypeOf(B)===C.prototype||(B=function(A){return C.from(A)}(B)),g)i.endEmitted?F(A,new w):H(A,i,B,!0);else if(i.ended)F(A,new u);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!Q?(B=i.decoder.write(B),i.objectMode||0!==B.length?H(A,i,B,!1):R(A,i)):H(A,i,B,!1)}else g||(i.reading=!1,R(A,i));return!i.ended&&(i.lengthB.highWaterMark&&(B.highWaterMark=function(A){return A>=1073741824?A=1073741824:(A--,A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,A|=A>>>16,A++),A}(A)),A<=B.length?A:B.ended?B.length:(B.needReadable=!0,0))}function Y(A){var B=A._readableState;e("emitReadable",B.needReadable,B.emittedReadable),B.needReadable=!1,B.emittedReadable||(e("emitReadable",B.flowing),B.emittedReadable=!0,g.nextTick(L,A))}function L(A){var B=A._readableState;e("emitReadable_",B.destroyed,B.length,B.ended),B.destroyed||!B.length&&!B.ended||(A.emit("readable"),B.emittedReadable=!1),B.needReadable=!B.flowing&&!B.ended&&B.length<=B.highWaterMark,S(A)}function R(A,B){B.readingMore||(B.readingMore=!0,g.nextTick(p,A,B))}function p(A,B){for(;!B.reading&&!B.ended&&(B.length0,B.resumeScheduled&&!B.paused?B.flowing=!0:A.listenerCount("data")>0&&A.resume()}function m(A){e("readable nexttick read 0"),A.read(0)}function k(A,B){e("resume",B.reading),B.reading||A.read(0),B.resumeScheduled=!1,A.emit("resume"),S(A),B.flowing&&!B.reading&&A.read(0)}function S(A){var B=A._readableState;for(e("flow",B.flowing);B.flowing&&null!==A.read(););}function b(A,B){return 0===B.length?null:(B.objectMode?Q=B.buffer.shift():!A||A>=B.length?(Q=B.decoder?B.buffer.join(""):1===B.buffer.length?B.buffer.first():B.buffer.concat(B.length),B.buffer.clear()):Q=B.buffer.consume(A,B.decoder),Q);var Q}function v(A){var B=A._readableState;e("endReadable",B.endEmitted),B.endEmitted||(B.ended=!0,g.nextTick(J,B,A))}function J(A,B){if(e("endReadableNT",A.endEmitted,A.length),!A.endEmitted&&0===A.length&&(A.endEmitted=!0,B.readable=!1,B.emit("end"),A.autoDestroy)){var Q=B._writableState;(!Q||Q.autoDestroy&&Q.finished)&&B.destroy()}}function V(A,B){for(var Q=0,g=A.length;Q=B.highWaterMark:B.length>0)||B.ended))return e("read: emitReadable",B.length,B.ended),0===B.length&&B.ended?v(this):Y(this),null;if(0===(A=G(A,B))&&B.ended)return 0===B.length&&v(this),null;var g,I=B.needReadable;return e("need readable",I),(0===B.length||B.length-A0?b(A,B):null)?(B.needReadable=B.length<=B.highWaterMark,A=0):(B.length-=A,B.awaitDrain=0),0===B.length&&(B.ended||(B.needReadable=!0),Q!==A&&B.ended&&v(this)),null!==g&&this.emit("data",g),g},U.prototype._read=function(A){F(this,new f("_read()"))},U.prototype.pipe=function(A,B){var Q=this,I=this._readableState;switch(I.pipesCount){case 0:I.pipes=A;break;case 1:I.pipes=[I.pipes,A];break;default:I.pipes.push(A)}I.pipesCount+=1,e("pipe count=%d opts=%j",I.pipesCount,B);var i=(!B||!1!==B.end)&&A!==g.stdout&&A!==g.stderr?t:c;function C(B,g){e("onunpipe"),B===Q&&g&&!1===g.hasUnpiped&&(g.hasUnpiped=!0,e("cleanup"),A.removeListener("close",n),A.removeListener("finish",a),A.removeListener("drain",o),A.removeListener("error",h),A.removeListener("unpipe",C),Q.removeListener("end",t),Q.removeListener("end",c),Q.removeListener("data",r),s=!0,!I.awaitDrain||A._writableState&&!A._writableState.needDrain||o())}function t(){e("onend"),A.end()}I.endEmitted?g.nextTick(i):Q.once("end",i),A.on("unpipe",C);var o=function(A){return function(){var B=A._readableState;e("pipeOnDrain",B.awaitDrain),B.awaitDrain&&B.awaitDrain--,0===B.awaitDrain&&E(A,"data")&&(B.flowing=!0,S(A))}}(Q);A.on("drain",o);var s=!1;function r(B){e("ondata");var g=A.write(B);e("dest.write",g),!1===g&&((1===I.pipesCount&&I.pipes===A||I.pipesCount>1&&-1!==V(I.pipes,A))&&!s&&(e("false write response, pause",I.awaitDrain),I.awaitDrain++),Q.pause())}function h(B){e("onerror",B),c(),A.removeListener("error",h),0===E(A,"error")&&F(A,B)}function n(){A.removeListener("finish",a),c()}function a(){e("onfinish"),A.removeListener("close",n),c()}function c(){e("unpipe"),Q.unpipe(A)}return Q.on("data",r),function(A,B,Q){if("function"==typeof A.prependListener)return A.prependListener(B,Q);A._events&&A._events[B]?Array.isArray(A._events[B])?A._events[B].unshift(Q):A._events[B]=[Q,A._events[B]]:A.on(B,Q)}(A,"error",h),A.once("close",n),A.once("finish",a),A.emit("pipe",Q),I.flowing||(e("pipe resume"),Q.resume()),A},U.prototype.unpipe=function(A){var B=this._readableState,Q={hasUnpiped:!1};if(0===B.pipesCount)return this;if(1===B.pipesCount)return A&&A!==B.pipes||(A||(A=B.pipes),B.pipes=null,B.pipesCount=0,B.flowing=!1,A&&A.emit("unpipe",this,Q)),this;if(!A){var g=B.pipes,I=B.pipesCount;B.pipes=null,B.pipesCount=0,B.flowing=!1;for(var E=0;E0,!1!==I.flowing&&this.resume()):"readable"===A&&(I.endEmitted||I.readableListening||(I.readableListening=I.needReadable=!0,I.flowing=!1,I.emittedReadable=!1,e("on readable",I.length,I.reading),I.length?Y(this):I.reading||g.nextTick(m,this))),Q},U.prototype.addListener=U.prototype.on,U.prototype.removeListener=function(A,B){var Q=i.prototype.removeListener.call(this,A,B);return"readable"===A&&g.nextTick(M,this),Q},U.prototype.removeAllListeners=function(A){var B=i.prototype.removeAllListeners.apply(this,arguments);return"readable"!==A&&void 0!==A||g.nextTick(M,this),B},U.prototype.resume=function(){var A=this._readableState;return A.flowing||(e("resume"),A.flowing=!A.readableListening,function(A,B){B.resumeScheduled||(B.resumeScheduled=!0,g.nextTick(k,A,B))}(this,A)),A.paused=!1,this},U.prototype.pause=function(){return e("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(e("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},U.prototype.wrap=function(A){var B=this,Q=this._readableState,g=!1;for(var I in A.on("end",(function(){if(e("wrapped end"),Q.decoder&&!Q.ended){var A=Q.decoder.end();A&&A.length&&B.push(A)}B.push(null)})),A.on("data",(function(I){(e("wrapped data"),Q.decoder&&(I=Q.decoder.write(I)),Q.objectMode&&null==I)||(Q.objectMode||I&&I.length)&&(B.push(I)||(g=!0,A.pause()))})),A)void 0===this[I]&&"function"==typeof A[I]&&(this[I]=function(B){return function(){return A[B].apply(A,arguments)}}(I));for(var E=0;E-1))throw new w(A);return this._writableState.defaultEncoding=A,this},Object.defineProperty(U.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(U.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),U.prototype._write=function(A,B,Q){Q(new a("_write()"))},U.prototype._writev=null,U.prototype.end=function(A,B,Q){var I=this._writableState;return"function"==typeof A?(Q=A,A=null,B=null):"function"==typeof B&&(Q=B,B=null),null!=A&&this.write(A,B),I.corked&&(I.corked=1,this.uncork()),I.ending||function(A,B,Q){B.ending=!0,R(A,B),Q&&(B.finished?g.nextTick(Q):A.once("finish",Q));B.ended=!0,A.writable=!1}(this,I,Q),this},Object.defineProperty(U.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(U.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(A){this._writableState&&(this._writableState.destroyed=A)}}),U.prototype.destroy=s.destroy,U.prototype._undestroy=s.undestroy,U.prototype._destroy=function(A,B){B(A)}}).call(this,Q(4),Q(3))},function(A,B,Q){"use strict";A.exports=o;var g=Q(18).codes,I=g.ERR_METHOD_NOT_IMPLEMENTED,E=g.ERR_MULTIPLE_CALLBACK,i=g.ERR_TRANSFORM_ALREADY_TRANSFORMING,C=g.ERR_TRANSFORM_WITH_LENGTH_0,t=Q(19);function e(A,B){var Q=this._transformState;Q.transforming=!1;var g=Q.writecb;if(null===g)return this.emit("error",new E);Q.writechunk=null,Q.writecb=null,null!=B&&this.push(B),g(A);var I=this._readableState;I.reading=!1,(I.needReadable||I.length>8,i=255&I;E?Q.push(E,i):Q.push(i)}return Q},g.zero2=I,g.toHex=E,g.encode=function(A,B){return"hex"===B?E(A):A}},function(A,B,Q){"use strict";var g=B;g.base=Q(29),g.short=Q(169),g.mont=Q(170),g.edwards=Q(171)},function(A,B,Q){"use strict";var g=Q(7).rotr32;function I(A,B,Q){return A&B^~A&Q}function E(A,B,Q){return A&B^A&Q^B&Q}function i(A,B,Q){return A^B^Q}B.ft_1=function(A,B,Q,g){return 0===A?I(B,Q,g):1===A||3===A?i(B,Q,g):2===A?E(B,Q,g):void 0},B.ch32=I,B.maj32=E,B.p32=i,B.s0_256=function(A){return g(A,2)^g(A,13)^g(A,22)},B.s1_256=function(A){return g(A,6)^g(A,11)^g(A,25)},B.g0_256=function(A){return g(A,7)^g(A,18)^A>>>3},B.g1_256=function(A){return g(A,17)^g(A,19)^A>>>10}},function(A,B,Q){"use strict";var g=Q(7),I=Q(23),E=Q(88),i=Q(5),C=g.sum32,t=g.sum32_4,e=g.sum32_5,o=E.ch32,s=E.maj32,r=E.s0_256,h=E.s1_256,n=E.g0_256,a=E.g1_256,c=I.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function D(){if(!(this instanceof D))return new D;c.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}g.inherits(D,c),A.exports=D,D.blockSize=512,D.outSize=256,D.hmacStrength=192,D.padLength=64,D.prototype._update=function(A,B){for(var Q=this.W,g=0;g<16;g++)Q[g]=A[B+g];for(;g=49&&e<=54?e-49+10:e>=17&&e<=22?e-17+10:e,i|=t}return g(!(240&i),"Invalid character in "+A),I}function t(A,B,Q,I){for(var E=0,i=0,C=Math.min(A.length,Q),t=B;t=49?e-49+10:e>=17?e-17+10:e,g(e>=0&&i"}E.isBN=function(A){return A instanceof E||null!==A&&"object"==typeof A&&A.constructor.wordSize===E.wordSize&&Array.isArray(A.words)},E.max=function(A,B){return A.cmp(B)>0?A:B},E.min=function(A,B){return A.cmp(B)<0?A:B},E.prototype._init=function(A,B,Q){if("number"==typeof A)return this._initNumber(A,B,Q);if("object"==typeof A)return this._initArray(A,B,Q);"hex"===B&&(B=16),g(B===(0|B)&&B>=2&&B<=36);var I=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&I++,16===B?this._parseHex(A,I):this._parseBase(A,B,I),"-"===A[0]&&(this.negative=1),this._strip(),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initNumber=function(A,B,Q){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[67108863&A],this.length=1):A<4503599627370496?(this.words=[67108863&A,A/67108864&67108863],this.length=2):(g(A<9007199254740992),this.words=[67108863&A,A/67108864&67108863,1],this.length=3),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initArray=function(A,B,Q){if(g("number"==typeof A.length),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var I=0;I=0;I-=3)i=A[I]|A[I-1]<<8|A[I-2]<<16,this.words[E]|=i<>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);else if("le"===Q)for(I=0,E=0;I>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);return this._strip()},E.prototype._parseHex=function(A,B){this.length=Math.ceil((A.length-B)/6),this.words=new Array(this.length);for(var Q=0;Q=B;Q-=6)I=C(A,Q,Q+6),this.words[g]|=I<>>26-E&4194303,(E+=24)>=26&&(E-=26,g++);Q+6!==B&&(I=C(A,B,Q+6),this.words[g]|=I<>>26-E&4194303),this._strip()},E.prototype._parseBase=function(A,B,Q){this.words=[0],this.length=1;for(var g=0,I=1;I<=67108863;I*=B)g++;g--,I=I/B|0;for(var E=A.length-Q,i=E%g,C=Math.min(E,E-i)+Q,e=0,o=Q;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},E.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for?E.prototype[Symbol.for("nodejs.util.inspect.custom")]=o:E.prototype.inspect=o;var s=["","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"],r=[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],h=[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];E.prototype.toString=function(A,B){var Q;if(B=0|B||1,16===(A=A||10)||"hex"===A){Q="";for(var I=0,E=0,i=0;i>>24-I&16777215)||i!==this.length-1?s[6-t.length]+t+Q:t+Q,(I+=2)>=26&&(I-=26,i--)}for(0!==E&&(Q=E.toString(16)+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}if(A===(0|A)&&A>=2&&A<=36){var e=r[A],o=h[A];Q="";var n=this.clone();for(n.negative=0;!n.isZero();){var a=n.modrn(o).toString(A);Q=(n=n.idivn(o)).isZero()?a+Q:s[e-a.length]+a+Q}for(this.isZero()&&(Q="0"+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}g(!1,"Base should be between 2 and 36")},E.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&g(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},E.prototype.toJSON=function(){return this.toString(16,2)},i&&(E.prototype.toBuffer=function(A,B){return this.toArrayLike(i,A,B)}),E.prototype.toArray=function(A,B){return this.toArrayLike(Array,A,B)};function n(A,B,Q){Q.negative=B.negative^A.negative;var g=A.length+B.length|0;Q.length=g,g=g-1|0;var I=0|A.words[0],E=0|B.words[0],i=I*E,C=67108863&i,t=i/67108864|0;Q.words[0]=C;for(var e=1;e>>26,s=67108863&t,r=Math.min(e,B.length-1),h=Math.max(0,e-A.length+1);h<=r;h++){var n=e-h|0;o+=(i=(I=0|A.words[n])*(E=0|B.words[h])+s)/67108864|0,s=67108863&i}Q.words[e]=0|s,t=0|o}return 0!==t?Q.words[e]=0|t:Q.length--,Q._strip()}E.prototype.toArrayLike=function(A,B,Q){this._strip();var I=this.byteLength(),E=Q||Math.max(1,I);g(I<=E,"byte array longer than desired length"),g(E>0,"Requested array length <= 0");var i=function(A,B){return A.allocUnsafe?A.allocUnsafe(B):new A(B)}(A,E);return this["_toArrayLike"+("le"===B?"LE":"BE")](i,I),i},E.prototype._toArrayLikeLE=function(A,B){for(var Q=0,g=0,I=0,E=0;I>8&255),Q>16&255),6===E?(Q>24&255),g=0,E=0):(g=i>>>24,E+=2)}if(Q=0&&(A[Q--]=i>>8&255),Q>=0&&(A[Q--]=i>>16&255),6===E?(Q>=0&&(A[Q--]=i>>24&255),g=0,E=0):(g=i>>>24,E+=2)}if(Q>=0)for(A[Q--]=g;Q>=0;)A[Q--]=0},Math.clz32?E.prototype._countBits=function(A){return 32-Math.clz32(A)}:E.prototype._countBits=function(A){var B=A,Q=0;return B>=4096&&(Q+=13,B>>>=13),B>=64&&(Q+=7,B>>>=7),B>=8&&(Q+=4,B>>>=4),B>=2&&(Q+=2,B>>>=2),Q+B},E.prototype._zeroBits=function(A){if(0===A)return 26;var B=A,Q=0;return 0==(8191&B)&&(Q+=13,B>>>=13),0==(127&B)&&(Q+=7,B>>>=7),0==(15&B)&&(Q+=4,B>>>=4),0==(3&B)&&(Q+=2,B>>>=2),0==(1&B)&&Q++,Q},E.prototype.bitLength=function(){var A=this.words[this.length-1],B=this._countBits(A);return 26*(this.length-1)+B},E.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,B=0;BA.length?this.clone().ior(A):A.clone().ior(this)},E.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},E.prototype.iuand=function(A){var B;B=this.length>A.length?A:this;for(var Q=0;QA.length?this.clone().iand(A):A.clone().iand(this)},E.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},E.prototype.iuxor=function(A){var B,Q;this.length>A.length?(B=this,Q=A):(B=A,Q=this);for(var g=0;gA.length?this.clone().ixor(A):A.clone().ixor(this)},E.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},E.prototype.inotn=function(A){g("number"==typeof A&&A>=0);var B=0|Math.ceil(A/26),Q=A%26;this._expand(B),Q>0&&B--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-Q),this._strip()},E.prototype.notn=function(A){return this.clone().inotn(A)},E.prototype.setn=function(A,B){g("number"==typeof A&&A>=0);var Q=A/26|0,I=A%26;return this._expand(Q+1),this.words[Q]=B?this.words[Q]|1<A.length?(Q=this,g=A):(Q=A,g=this);for(var I=0,E=0;E>>26;for(;0!==I&&E>>26;if(this.length=Q.length,0!==I)this.words[this.length]=I,this.length++;else if(Q!==this)for(;EA.length?this.clone().iadd(A):A.clone().iadd(this)},E.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var B=this.iadd(A);return A.negative=1,B._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var Q,g,I=this.cmp(A);if(0===I)return this.negative=0,this.length=1,this.words[0]=0,this;I>0?(Q=this,g=A):(Q=A,g=this);for(var E=0,i=0;i>26,this.words[i]=67108863&B;for(;0!==E&&i>26,this.words[i]=67108863&B;if(0===E&&i>>13,h=0|i[1],n=8191&h,a=h>>>13,c=0|i[2],y=8191&c,D=c>>>13,u=0|i[3],f=8191&u,w=u>>>13,F=0|i[4],d=8191&F,l=F>>>13,U=0|i[5],N=8191&U,H=U>>>13,G=0|i[6],Y=8191&G,L=G>>>13,R=0|i[7],p=8191&R,M=R>>>13,m=0|i[8],k=8191&m,S=m>>>13,b=0|i[9],v=8191&b,J=b>>>13,V=0|C[0],K=8191&V,x=V>>>13,Z=0|C[1],q=8191&Z,O=Z>>>13,j=0|C[2],W=8191&j,X=j>>>13,T=0|C[3],z=8191&T,_=T>>>13,P=0|C[4],$=8191&P,AA=P>>>13,BA=0|C[5],QA=8191&BA,gA=BA>>>13,IA=0|C[6],EA=8191&IA,iA=IA>>>13,CA=0|C[7],tA=8191&CA,eA=CA>>>13,oA=0|C[8],sA=8191&oA,rA=oA>>>13,hA=0|C[9],nA=8191&hA,aA=hA>>>13;Q.negative=A.negative^B.negative,Q.length=19;var cA=(e+(g=Math.imul(s,K))|0)+((8191&(I=(I=Math.imul(s,x))+Math.imul(r,K)|0))<<13)|0;e=((E=Math.imul(r,x))+(I>>>13)|0)+(cA>>>26)|0,cA&=67108863,g=Math.imul(n,K),I=(I=Math.imul(n,x))+Math.imul(a,K)|0,E=Math.imul(a,x);var yA=(e+(g=g+Math.imul(s,q)|0)|0)+((8191&(I=(I=I+Math.imul(s,O)|0)+Math.imul(r,q)|0))<<13)|0;e=((E=E+Math.imul(r,O)|0)+(I>>>13)|0)+(yA>>>26)|0,yA&=67108863,g=Math.imul(y,K),I=(I=Math.imul(y,x))+Math.imul(D,K)|0,E=Math.imul(D,x),g=g+Math.imul(n,q)|0,I=(I=I+Math.imul(n,O)|0)+Math.imul(a,q)|0,E=E+Math.imul(a,O)|0;var DA=(e+(g=g+Math.imul(s,W)|0)|0)+((8191&(I=(I=I+Math.imul(s,X)|0)+Math.imul(r,W)|0))<<13)|0;e=((E=E+Math.imul(r,X)|0)+(I>>>13)|0)+(DA>>>26)|0,DA&=67108863,g=Math.imul(f,K),I=(I=Math.imul(f,x))+Math.imul(w,K)|0,E=Math.imul(w,x),g=g+Math.imul(y,q)|0,I=(I=I+Math.imul(y,O)|0)+Math.imul(D,q)|0,E=E+Math.imul(D,O)|0,g=g+Math.imul(n,W)|0,I=(I=I+Math.imul(n,X)|0)+Math.imul(a,W)|0,E=E+Math.imul(a,X)|0;var uA=(e+(g=g+Math.imul(s,z)|0)|0)+((8191&(I=(I=I+Math.imul(s,_)|0)+Math.imul(r,z)|0))<<13)|0;e=((E=E+Math.imul(r,_)|0)+(I>>>13)|0)+(uA>>>26)|0,uA&=67108863,g=Math.imul(d,K),I=(I=Math.imul(d,x))+Math.imul(l,K)|0,E=Math.imul(l,x),g=g+Math.imul(f,q)|0,I=(I=I+Math.imul(f,O)|0)+Math.imul(w,q)|0,E=E+Math.imul(w,O)|0,g=g+Math.imul(y,W)|0,I=(I=I+Math.imul(y,X)|0)+Math.imul(D,W)|0,E=E+Math.imul(D,X)|0,g=g+Math.imul(n,z)|0,I=(I=I+Math.imul(n,_)|0)+Math.imul(a,z)|0,E=E+Math.imul(a,_)|0;var fA=(e+(g=g+Math.imul(s,$)|0)|0)+((8191&(I=(I=I+Math.imul(s,AA)|0)+Math.imul(r,$)|0))<<13)|0;e=((E=E+Math.imul(r,AA)|0)+(I>>>13)|0)+(fA>>>26)|0,fA&=67108863,g=Math.imul(N,K),I=(I=Math.imul(N,x))+Math.imul(H,K)|0,E=Math.imul(H,x),g=g+Math.imul(d,q)|0,I=(I=I+Math.imul(d,O)|0)+Math.imul(l,q)|0,E=E+Math.imul(l,O)|0,g=g+Math.imul(f,W)|0,I=(I=I+Math.imul(f,X)|0)+Math.imul(w,W)|0,E=E+Math.imul(w,X)|0,g=g+Math.imul(y,z)|0,I=(I=I+Math.imul(y,_)|0)+Math.imul(D,z)|0,E=E+Math.imul(D,_)|0,g=g+Math.imul(n,$)|0,I=(I=I+Math.imul(n,AA)|0)+Math.imul(a,$)|0,E=E+Math.imul(a,AA)|0;var wA=(e+(g=g+Math.imul(s,QA)|0)|0)+((8191&(I=(I=I+Math.imul(s,gA)|0)+Math.imul(r,QA)|0))<<13)|0;e=((E=E+Math.imul(r,gA)|0)+(I>>>13)|0)+(wA>>>26)|0,wA&=67108863,g=Math.imul(Y,K),I=(I=Math.imul(Y,x))+Math.imul(L,K)|0,E=Math.imul(L,x),g=g+Math.imul(N,q)|0,I=(I=I+Math.imul(N,O)|0)+Math.imul(H,q)|0,E=E+Math.imul(H,O)|0,g=g+Math.imul(d,W)|0,I=(I=I+Math.imul(d,X)|0)+Math.imul(l,W)|0,E=E+Math.imul(l,X)|0,g=g+Math.imul(f,z)|0,I=(I=I+Math.imul(f,_)|0)+Math.imul(w,z)|0,E=E+Math.imul(w,_)|0,g=g+Math.imul(y,$)|0,I=(I=I+Math.imul(y,AA)|0)+Math.imul(D,$)|0,E=E+Math.imul(D,AA)|0,g=g+Math.imul(n,QA)|0,I=(I=I+Math.imul(n,gA)|0)+Math.imul(a,QA)|0,E=E+Math.imul(a,gA)|0;var FA=(e+(g=g+Math.imul(s,EA)|0)|0)+((8191&(I=(I=I+Math.imul(s,iA)|0)+Math.imul(r,EA)|0))<<13)|0;e=((E=E+Math.imul(r,iA)|0)+(I>>>13)|0)+(FA>>>26)|0,FA&=67108863,g=Math.imul(p,K),I=(I=Math.imul(p,x))+Math.imul(M,K)|0,E=Math.imul(M,x),g=g+Math.imul(Y,q)|0,I=(I=I+Math.imul(Y,O)|0)+Math.imul(L,q)|0,E=E+Math.imul(L,O)|0,g=g+Math.imul(N,W)|0,I=(I=I+Math.imul(N,X)|0)+Math.imul(H,W)|0,E=E+Math.imul(H,X)|0,g=g+Math.imul(d,z)|0,I=(I=I+Math.imul(d,_)|0)+Math.imul(l,z)|0,E=E+Math.imul(l,_)|0,g=g+Math.imul(f,$)|0,I=(I=I+Math.imul(f,AA)|0)+Math.imul(w,$)|0,E=E+Math.imul(w,AA)|0,g=g+Math.imul(y,QA)|0,I=(I=I+Math.imul(y,gA)|0)+Math.imul(D,QA)|0,E=E+Math.imul(D,gA)|0,g=g+Math.imul(n,EA)|0,I=(I=I+Math.imul(n,iA)|0)+Math.imul(a,EA)|0,E=E+Math.imul(a,iA)|0;var dA=(e+(g=g+Math.imul(s,tA)|0)|0)+((8191&(I=(I=I+Math.imul(s,eA)|0)+Math.imul(r,tA)|0))<<13)|0;e=((E=E+Math.imul(r,eA)|0)+(I>>>13)|0)+(dA>>>26)|0,dA&=67108863,g=Math.imul(k,K),I=(I=Math.imul(k,x))+Math.imul(S,K)|0,E=Math.imul(S,x),g=g+Math.imul(p,q)|0,I=(I=I+Math.imul(p,O)|0)+Math.imul(M,q)|0,E=E+Math.imul(M,O)|0,g=g+Math.imul(Y,W)|0,I=(I=I+Math.imul(Y,X)|0)+Math.imul(L,W)|0,E=E+Math.imul(L,X)|0,g=g+Math.imul(N,z)|0,I=(I=I+Math.imul(N,_)|0)+Math.imul(H,z)|0,E=E+Math.imul(H,_)|0,g=g+Math.imul(d,$)|0,I=(I=I+Math.imul(d,AA)|0)+Math.imul(l,$)|0,E=E+Math.imul(l,AA)|0,g=g+Math.imul(f,QA)|0,I=(I=I+Math.imul(f,gA)|0)+Math.imul(w,QA)|0,E=E+Math.imul(w,gA)|0,g=g+Math.imul(y,EA)|0,I=(I=I+Math.imul(y,iA)|0)+Math.imul(D,EA)|0,E=E+Math.imul(D,iA)|0,g=g+Math.imul(n,tA)|0,I=(I=I+Math.imul(n,eA)|0)+Math.imul(a,tA)|0,E=E+Math.imul(a,eA)|0;var lA=(e+(g=g+Math.imul(s,sA)|0)|0)+((8191&(I=(I=I+Math.imul(s,rA)|0)+Math.imul(r,sA)|0))<<13)|0;e=((E=E+Math.imul(r,rA)|0)+(I>>>13)|0)+(lA>>>26)|0,lA&=67108863,g=Math.imul(v,K),I=(I=Math.imul(v,x))+Math.imul(J,K)|0,E=Math.imul(J,x),g=g+Math.imul(k,q)|0,I=(I=I+Math.imul(k,O)|0)+Math.imul(S,q)|0,E=E+Math.imul(S,O)|0,g=g+Math.imul(p,W)|0,I=(I=I+Math.imul(p,X)|0)+Math.imul(M,W)|0,E=E+Math.imul(M,X)|0,g=g+Math.imul(Y,z)|0,I=(I=I+Math.imul(Y,_)|0)+Math.imul(L,z)|0,E=E+Math.imul(L,_)|0,g=g+Math.imul(N,$)|0,I=(I=I+Math.imul(N,AA)|0)+Math.imul(H,$)|0,E=E+Math.imul(H,AA)|0,g=g+Math.imul(d,QA)|0,I=(I=I+Math.imul(d,gA)|0)+Math.imul(l,QA)|0,E=E+Math.imul(l,gA)|0,g=g+Math.imul(f,EA)|0,I=(I=I+Math.imul(f,iA)|0)+Math.imul(w,EA)|0,E=E+Math.imul(w,iA)|0,g=g+Math.imul(y,tA)|0,I=(I=I+Math.imul(y,eA)|0)+Math.imul(D,tA)|0,E=E+Math.imul(D,eA)|0,g=g+Math.imul(n,sA)|0,I=(I=I+Math.imul(n,rA)|0)+Math.imul(a,sA)|0,E=E+Math.imul(a,rA)|0;var UA=(e+(g=g+Math.imul(s,nA)|0)|0)+((8191&(I=(I=I+Math.imul(s,aA)|0)+Math.imul(r,nA)|0))<<13)|0;e=((E=E+Math.imul(r,aA)|0)+(I>>>13)|0)+(UA>>>26)|0,UA&=67108863,g=Math.imul(v,q),I=(I=Math.imul(v,O))+Math.imul(J,q)|0,E=Math.imul(J,O),g=g+Math.imul(k,W)|0,I=(I=I+Math.imul(k,X)|0)+Math.imul(S,W)|0,E=E+Math.imul(S,X)|0,g=g+Math.imul(p,z)|0,I=(I=I+Math.imul(p,_)|0)+Math.imul(M,z)|0,E=E+Math.imul(M,_)|0,g=g+Math.imul(Y,$)|0,I=(I=I+Math.imul(Y,AA)|0)+Math.imul(L,$)|0,E=E+Math.imul(L,AA)|0,g=g+Math.imul(N,QA)|0,I=(I=I+Math.imul(N,gA)|0)+Math.imul(H,QA)|0,E=E+Math.imul(H,gA)|0,g=g+Math.imul(d,EA)|0,I=(I=I+Math.imul(d,iA)|0)+Math.imul(l,EA)|0,E=E+Math.imul(l,iA)|0,g=g+Math.imul(f,tA)|0,I=(I=I+Math.imul(f,eA)|0)+Math.imul(w,tA)|0,E=E+Math.imul(w,eA)|0,g=g+Math.imul(y,sA)|0,I=(I=I+Math.imul(y,rA)|0)+Math.imul(D,sA)|0,E=E+Math.imul(D,rA)|0;var NA=(e+(g=g+Math.imul(n,nA)|0)|0)+((8191&(I=(I=I+Math.imul(n,aA)|0)+Math.imul(a,nA)|0))<<13)|0;e=((E=E+Math.imul(a,aA)|0)+(I>>>13)|0)+(NA>>>26)|0,NA&=67108863,g=Math.imul(v,W),I=(I=Math.imul(v,X))+Math.imul(J,W)|0,E=Math.imul(J,X),g=g+Math.imul(k,z)|0,I=(I=I+Math.imul(k,_)|0)+Math.imul(S,z)|0,E=E+Math.imul(S,_)|0,g=g+Math.imul(p,$)|0,I=(I=I+Math.imul(p,AA)|0)+Math.imul(M,$)|0,E=E+Math.imul(M,AA)|0,g=g+Math.imul(Y,QA)|0,I=(I=I+Math.imul(Y,gA)|0)+Math.imul(L,QA)|0,E=E+Math.imul(L,gA)|0,g=g+Math.imul(N,EA)|0,I=(I=I+Math.imul(N,iA)|0)+Math.imul(H,EA)|0,E=E+Math.imul(H,iA)|0,g=g+Math.imul(d,tA)|0,I=(I=I+Math.imul(d,eA)|0)+Math.imul(l,tA)|0,E=E+Math.imul(l,eA)|0,g=g+Math.imul(f,sA)|0,I=(I=I+Math.imul(f,rA)|0)+Math.imul(w,sA)|0,E=E+Math.imul(w,rA)|0;var HA=(e+(g=g+Math.imul(y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(y,aA)|0)+Math.imul(D,nA)|0))<<13)|0;e=((E=E+Math.imul(D,aA)|0)+(I>>>13)|0)+(HA>>>26)|0,HA&=67108863,g=Math.imul(v,z),I=(I=Math.imul(v,_))+Math.imul(J,z)|0,E=Math.imul(J,_),g=g+Math.imul(k,$)|0,I=(I=I+Math.imul(k,AA)|0)+Math.imul(S,$)|0,E=E+Math.imul(S,AA)|0,g=g+Math.imul(p,QA)|0,I=(I=I+Math.imul(p,gA)|0)+Math.imul(M,QA)|0,E=E+Math.imul(M,gA)|0,g=g+Math.imul(Y,EA)|0,I=(I=I+Math.imul(Y,iA)|0)+Math.imul(L,EA)|0,E=E+Math.imul(L,iA)|0,g=g+Math.imul(N,tA)|0,I=(I=I+Math.imul(N,eA)|0)+Math.imul(H,tA)|0,E=E+Math.imul(H,eA)|0,g=g+Math.imul(d,sA)|0,I=(I=I+Math.imul(d,rA)|0)+Math.imul(l,sA)|0,E=E+Math.imul(l,rA)|0;var GA=(e+(g=g+Math.imul(f,nA)|0)|0)+((8191&(I=(I=I+Math.imul(f,aA)|0)+Math.imul(w,nA)|0))<<13)|0;e=((E=E+Math.imul(w,aA)|0)+(I>>>13)|0)+(GA>>>26)|0,GA&=67108863,g=Math.imul(v,$),I=(I=Math.imul(v,AA))+Math.imul(J,$)|0,E=Math.imul(J,AA),g=g+Math.imul(k,QA)|0,I=(I=I+Math.imul(k,gA)|0)+Math.imul(S,QA)|0,E=E+Math.imul(S,gA)|0,g=g+Math.imul(p,EA)|0,I=(I=I+Math.imul(p,iA)|0)+Math.imul(M,EA)|0,E=E+Math.imul(M,iA)|0,g=g+Math.imul(Y,tA)|0,I=(I=I+Math.imul(Y,eA)|0)+Math.imul(L,tA)|0,E=E+Math.imul(L,eA)|0,g=g+Math.imul(N,sA)|0,I=(I=I+Math.imul(N,rA)|0)+Math.imul(H,sA)|0,E=E+Math.imul(H,rA)|0;var YA=(e+(g=g+Math.imul(d,nA)|0)|0)+((8191&(I=(I=I+Math.imul(d,aA)|0)+Math.imul(l,nA)|0))<<13)|0;e=((E=E+Math.imul(l,aA)|0)+(I>>>13)|0)+(YA>>>26)|0,YA&=67108863,g=Math.imul(v,QA),I=(I=Math.imul(v,gA))+Math.imul(J,QA)|0,E=Math.imul(J,gA),g=g+Math.imul(k,EA)|0,I=(I=I+Math.imul(k,iA)|0)+Math.imul(S,EA)|0,E=E+Math.imul(S,iA)|0,g=g+Math.imul(p,tA)|0,I=(I=I+Math.imul(p,eA)|0)+Math.imul(M,tA)|0,E=E+Math.imul(M,eA)|0,g=g+Math.imul(Y,sA)|0,I=(I=I+Math.imul(Y,rA)|0)+Math.imul(L,sA)|0,E=E+Math.imul(L,rA)|0;var LA=(e+(g=g+Math.imul(N,nA)|0)|0)+((8191&(I=(I=I+Math.imul(N,aA)|0)+Math.imul(H,nA)|0))<<13)|0;e=((E=E+Math.imul(H,aA)|0)+(I>>>13)|0)+(LA>>>26)|0,LA&=67108863,g=Math.imul(v,EA),I=(I=Math.imul(v,iA))+Math.imul(J,EA)|0,E=Math.imul(J,iA),g=g+Math.imul(k,tA)|0,I=(I=I+Math.imul(k,eA)|0)+Math.imul(S,tA)|0,E=E+Math.imul(S,eA)|0,g=g+Math.imul(p,sA)|0,I=(I=I+Math.imul(p,rA)|0)+Math.imul(M,sA)|0,E=E+Math.imul(M,rA)|0;var RA=(e+(g=g+Math.imul(Y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(Y,aA)|0)+Math.imul(L,nA)|0))<<13)|0;e=((E=E+Math.imul(L,aA)|0)+(I>>>13)|0)+(RA>>>26)|0,RA&=67108863,g=Math.imul(v,tA),I=(I=Math.imul(v,eA))+Math.imul(J,tA)|0,E=Math.imul(J,eA),g=g+Math.imul(k,sA)|0,I=(I=I+Math.imul(k,rA)|0)+Math.imul(S,sA)|0,E=E+Math.imul(S,rA)|0;var pA=(e+(g=g+Math.imul(p,nA)|0)|0)+((8191&(I=(I=I+Math.imul(p,aA)|0)+Math.imul(M,nA)|0))<<13)|0;e=((E=E+Math.imul(M,aA)|0)+(I>>>13)|0)+(pA>>>26)|0,pA&=67108863,g=Math.imul(v,sA),I=(I=Math.imul(v,rA))+Math.imul(J,sA)|0,E=Math.imul(J,rA);var MA=(e+(g=g+Math.imul(k,nA)|0)|0)+((8191&(I=(I=I+Math.imul(k,aA)|0)+Math.imul(S,nA)|0))<<13)|0;e=((E=E+Math.imul(S,aA)|0)+(I>>>13)|0)+(MA>>>26)|0,MA&=67108863;var mA=(e+(g=Math.imul(v,nA))|0)+((8191&(I=(I=Math.imul(v,aA))+Math.imul(J,nA)|0))<<13)|0;return e=((E=Math.imul(J,aA))+(I>>>13)|0)+(mA>>>26)|0,mA&=67108863,t[0]=cA,t[1]=yA,t[2]=DA,t[3]=uA,t[4]=fA,t[5]=wA,t[6]=FA,t[7]=dA,t[8]=lA,t[9]=UA,t[10]=NA,t[11]=HA,t[12]=GA,t[13]=YA,t[14]=LA,t[15]=RA,t[16]=pA,t[17]=MA,t[18]=mA,0!==e&&(t[19]=e,Q.length++),Q};function c(A,B,Q){Q.negative=B.negative^A.negative,Q.length=A.length+B.length;for(var g=0,I=0,E=0;E>>26)|0)>>>26,i&=67108863}Q.words[E]=C,g=i,i=I}return 0!==g?Q.words[E]=g:Q.length--,Q._strip()}function y(A,B,Q){return c(A,B,Q)}function D(A,B){this.x=A,this.y=B}Math.imul||(a=n),E.prototype.mulTo=function(A,B){var Q=this.length+A.length;return 10===this.length&&10===A.length?a(this,A,B):Q<63?n(this,A,B):Q<1024?c(this,A,B):y(this,A,B)},D.prototype.makeRBT=function(A){for(var B=new Array(A),Q=E.prototype._countBits(A)-1,g=0;g>=1;return g},D.prototype.permute=function(A,B,Q,g,I,E){for(var i=0;i>>=1)I++;return 1<>>=13,Q[2*i+1]=8191&E,E>>>=13;for(i=2*B;i>=26,Q+=E/67108864|0,Q+=i>>>26,this.words[I]=67108863&i}return 0!==Q&&(this.words[I]=Q,this.length++),B?this.ineg():this},E.prototype.muln=function(A){return this.clone().imuln(A)},E.prototype.sqr=function(){return this.mul(this)},E.prototype.isqr=function(){return this.imul(this.clone())},E.prototype.pow=function(A){var B=function(A){for(var B=new Array(A.bitLength()),Q=0;Q>>I&1}return B}(A);if(0===B.length)return new E(1);for(var Q=this,g=0;g=0);var B,Q=A%26,I=(A-Q)/26,E=67108863>>>26-Q<<26-Q;if(0!==Q){var i=0;for(B=0;B>>26-Q}i&&(this.words[B]=i,this.length++)}if(0!==I){for(B=this.length-1;B>=0;B--)this.words[B+I]=this.words[B];for(B=0;B=0),I=B?(B-B%26)/26:0;var E=A%26,i=Math.min((A-E)/26,this.length),C=67108863^67108863>>>E<i)for(this.length-=i,e=0;e=0&&(0!==o||e>=I);e--){var s=0|this.words[e];this.words[e]=o<<26-E|s>>>E,o=s&C}return t&&0!==o&&(t.words[t.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},E.prototype.ishrn=function(A,B,Q){return g(0===this.negative),this.iushrn(A,B,Q)},E.prototype.shln=function(A){return this.clone().ishln(A)},E.prototype.ushln=function(A){return this.clone().iushln(A)},E.prototype.shrn=function(A){return this.clone().ishrn(A)},E.prototype.ushrn=function(A){return this.clone().iushrn(A)},E.prototype.testn=function(A){g("number"==typeof A&&A>=0);var B=A%26,Q=(A-B)/26,I=1<=0);var B=A%26,Q=(A-B)/26;if(g(0===this.negative,"imaskn works only with positive numbers"),this.length<=Q)return this;if(0!==B&&Q++,this.length=Math.min(Q,this.length),0!==B){var I=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},E.prototype.isubn=function(A){if(g("number"==typeof A),g(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(t/67108864|0),this.words[I+Q]=67108863&E}for(;I>26,this.words[I+Q]=67108863&E;if(0===C)return this._strip();for(g(-1===C),C=0,I=0;I>26,this.words[I]=67108863&E;return this.negative=1,this._strip()},E.prototype._wordDiv=function(A,B){var Q=(this.length,A.length),g=this.clone(),I=A,i=0|I.words[I.length-1];0!==(Q=26-this._countBits(i))&&(I=I.ushln(Q),g.iushln(Q),i=0|I.words[I.length-1]);var C,t=g.length-I.length;if("mod"!==B){(C=new E(null)).length=t+1,C.words=new Array(C.length);for(var e=0;e=0;s--){var r=67108864*(0|g.words[I.length+s])+(0|g.words[I.length+s-1]);for(r=Math.min(r/i|0,67108863),g._ishlnsubmul(I,r,s);0!==g.negative;)r--,g.negative=0,g._ishlnsubmul(I,1,s),g.isZero()||(g.negative^=1);C&&(C.words[s]=r)}return C&&C._strip(),g._strip(),"div"!==B&&0!==Q&&g.iushrn(Q),{div:C||null,mod:g}},E.prototype.divmod=function(A,B,Q){return g(!A.isZero()),this.isZero()?{div:new E(0),mod:new E(0)}:0!==this.negative&&0===A.negative?(C=this.neg().divmod(A,B),"mod"!==B&&(I=C.div.neg()),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.iadd(A)),{div:I,mod:i}):0===this.negative&&0!==A.negative?(C=this.divmod(A.neg(),B),"mod"!==B&&(I=C.div.neg()),{div:I,mod:C.mod}):0!=(this.negative&A.negative)?(C=this.neg().divmod(A.neg(),B),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.isub(A)),{div:C.div,mod:i}):A.length>this.length||this.cmp(A)<0?{div:new E(0),mod:this}:1===A.length?"div"===B?{div:this.divn(A.words[0]),mod:null}:"mod"===B?{div:null,mod:new E(this.modrn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new E(this.modrn(A.words[0]))}:this._wordDiv(A,B);var I,i,C},E.prototype.div=function(A){return this.divmod(A,"div",!1).div},E.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},E.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},E.prototype.divRound=function(A){var B=this.divmod(A);if(B.mod.isZero())return B.div;var Q=0!==B.div.negative?B.mod.isub(A):B.mod,g=A.ushrn(1),I=A.andln(1),E=Q.cmp(g);return E<0||1===I&&0===E?B.div:0!==B.div.negative?B.div.isubn(1):B.div.iaddn(1)},E.prototype.modrn=function(A){var B=A<0;B&&(A=-A),g(A<=67108863);for(var Q=(1<<26)%A,I=0,E=this.length-1;E>=0;E--)I=(Q*I+(0|this.words[E]))%A;return B?-I:I},E.prototype.modn=function(A){return this.modrn(A)},E.prototype.idivn=function(A){var B=A<0;B&&(A=-A),g(A<=67108863);for(var Q=0,I=this.length-1;I>=0;I--){var E=(0|this.words[I])+67108864*Q;this.words[I]=E/A|0,Q=E%A}return this._strip(),B?this.ineg():this},E.prototype.divn=function(A){return this.clone().idivn(A)},E.prototype.egcd=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I=new E(1),i=new E(0),C=new E(0),t=new E(1),e=0;B.isEven()&&Q.isEven();)B.iushrn(1),Q.iushrn(1),++e;for(var o=Q.clone(),s=B.clone();!B.isZero();){for(var r=0,h=1;0==(B.words[0]&h)&&r<26;++r,h<<=1);if(r>0)for(B.iushrn(r);r-- >0;)(I.isOdd()||i.isOdd())&&(I.iadd(o),i.isub(s)),I.iushrn(1),i.iushrn(1);for(var n=0,a=1;0==(Q.words[0]&a)&&n<26;++n,a<<=1);if(n>0)for(Q.iushrn(n);n-- >0;)(C.isOdd()||t.isOdd())&&(C.iadd(o),t.isub(s)),C.iushrn(1),t.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),I.isub(C),i.isub(t)):(Q.isub(B),C.isub(I),t.isub(i))}return{a:C,b:t,gcd:Q.iushln(e)}},E.prototype._invmp=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I,i=new E(1),C=new E(0),t=Q.clone();B.cmpn(1)>0&&Q.cmpn(1)>0;){for(var e=0,o=1;0==(B.words[0]&o)&&e<26;++e,o<<=1);if(e>0)for(B.iushrn(e);e-- >0;)i.isOdd()&&i.iadd(t),i.iushrn(1);for(var s=0,r=1;0==(Q.words[0]&r)&&s<26;++s,r<<=1);if(s>0)for(Q.iushrn(s);s-- >0;)C.isOdd()&&C.iadd(t),C.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),i.isub(C)):(Q.isub(B),C.isub(i))}return(I=0===B.cmpn(1)?i:C).cmpn(0)<0&&I.iadd(A),I},E.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var B=this.clone(),Q=A.clone();B.negative=0,Q.negative=0;for(var g=0;B.isEven()&&Q.isEven();g++)B.iushrn(1),Q.iushrn(1);for(;;){for(;B.isEven();)B.iushrn(1);for(;Q.isEven();)Q.iushrn(1);var I=B.cmp(Q);if(I<0){var E=B;B=Q,Q=E}else if(0===I||0===Q.cmpn(1))break;B.isub(Q)}return Q.iushln(g)},E.prototype.invm=function(A){return this.egcd(A).a.umod(A)},E.prototype.isEven=function(){return 0==(1&this.words[0])},E.prototype.isOdd=function(){return 1==(1&this.words[0])},E.prototype.andln=function(A){return this.words[0]&A},E.prototype.bincn=function(A){g("number"==typeof A);var B=A%26,Q=(A-B)/26,I=1<>>26,C&=67108863,this.words[i]=C}return 0!==E&&(this.words[i]=E,this.length++),this},E.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},E.prototype.cmpn=function(A){var B,Q=A<0;if(0!==this.negative&&!Q)return-1;if(0===this.negative&&Q)return 1;if(this._strip(),this.length>1)B=1;else{Q&&(A=-A),g(A<=67108863,"Number is too big");var I=0|this.words[0];B=I===A?0:IA.length)return 1;if(this.length=0;Q--){var g=0|this.words[Q],I=0|A.words[Q];if(g!==I){gI&&(B=1);break}}return B},E.prototype.gtn=function(A){return 1===this.cmpn(A)},E.prototype.gt=function(A){return 1===this.cmp(A)},E.prototype.gten=function(A){return this.cmpn(A)>=0},E.prototype.gte=function(A){return this.cmp(A)>=0},E.prototype.ltn=function(A){return-1===this.cmpn(A)},E.prototype.lt=function(A){return-1===this.cmp(A)},E.prototype.lten=function(A){return this.cmpn(A)<=0},E.prototype.lte=function(A){return this.cmp(A)<=0},E.prototype.eqn=function(A){return 0===this.cmpn(A)},E.prototype.eq=function(A){return 0===this.cmp(A)},E.red=function(A){return new U(A)},E.prototype.toRed=function(A){return g(!this.red,"Already a number in reduction context"),g(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},E.prototype.fromRed=function(){return g(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},E.prototype._forceRed=function(A){return this.red=A,this},E.prototype.forceRed=function(A){return g(!this.red,"Already a number in reduction context"),this._forceRed(A)},E.prototype.redAdd=function(A){return g(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},E.prototype.redIAdd=function(A){return g(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},E.prototype.redSub=function(A){return g(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},E.prototype.redISub=function(A){return g(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},E.prototype.redShl=function(A){return g(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},E.prototype.redMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},E.prototype.redIMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},E.prototype.redSqr=function(){return g(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},E.prototype.redISqr=function(){return g(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},E.prototype.redSqrt=function(){return g(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},E.prototype.redInvm=function(){return g(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},E.prototype.redNeg=function(){return g(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},E.prototype.redPow=function(A){return g(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var u={k256:null,p224:null,p192:null,p25519:null};function f(A,B){this.name=A,this.p=new E(B,16),this.n=this.p.bitLength(),this.k=new E(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){f.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function F(){f.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function d(){f.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function l(){f.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function U(A){if("string"==typeof A){var B=E._prime(A);this.m=B.p,this.prime=B}else g(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function N(A){U.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new E(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)}f.prototype._tmp=function(){var A=new E(null);return A.words=new Array(Math.ceil(this.n/13)),A},f.prototype.ireduce=function(A){var B,Q=A;do{this.split(Q,this.tmp),B=(Q=(Q=this.imulK(Q)).iadd(this.tmp)).bitLength()}while(B>this.n);var g=B0?Q.isub(this.p):Q._strip(),Q},f.prototype.split=function(A,B){A.iushrn(this.n,0,B)},f.prototype.imulK=function(A){return A.imul(this.k)},I(w,f),w.prototype.split=function(A,B){for(var Q=Math.min(A.length,9),g=0;g>>22,I=E}I>>>=22,A.words[g-10]=I,0===I&&A.length>10?A.length-=10:A.length-=9},w.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var B=0,Q=0;Q>>=26,A.words[Q]=I,B=g}return 0!==B&&(A.words[A.length++]=B),A},E._prime=function(A){if(u[A])return u[A];var B;if("k256"===A)B=new w;else if("p224"===A)B=new F;else if("p192"===A)B=new d;else{if("p25519"!==A)throw new Error("Unknown prime "+A);B=new l}return u[A]=B,B},U.prototype._verify1=function(A){g(0===A.negative,"red works only with positives"),g(A.red,"red works only with red numbers")},U.prototype._verify2=function(A,B){g(0==(A.negative|B.negative),"red works only with positives"),g(A.red&&A.red===B.red,"red works only with red numbers")},U.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):(e(A,A.umod(this.m)._forceRed(this)),A)},U.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},U.prototype.add=function(A,B){this._verify2(A,B);var Q=A.add(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q._forceRed(this)},U.prototype.iadd=function(A,B){this._verify2(A,B);var Q=A.iadd(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q},U.prototype.sub=function(A,B){this._verify2(A,B);var Q=A.sub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q._forceRed(this)},U.prototype.isub=function(A,B){this._verify2(A,B);var Q=A.isub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q},U.prototype.shl=function(A,B){return this._verify1(A),this.imod(A.ushln(B))},U.prototype.imul=function(A,B){return this._verify2(A,B),this.imod(A.imul(B))},U.prototype.mul=function(A,B){return this._verify2(A,B),this.imod(A.mul(B))},U.prototype.isqr=function(A){return this.imul(A,A.clone())},U.prototype.sqr=function(A){return this.mul(A,A)},U.prototype.sqrt=function(A){if(A.isZero())return A.clone();var B=this.m.andln(3);if(g(B%2==1),3===B){var Q=this.m.add(new E(1)).iushrn(2);return this.pow(A,Q)}for(var I=this.m.subn(1),i=0;!I.isZero()&&0===I.andln(1);)i++,I.iushrn(1);g(!I.isZero());var C=new E(1).toRed(this),t=C.redNeg(),e=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new E(2*o*o).toRed(this);0!==this.pow(o,e).cmp(t);)o.redIAdd(t);for(var s=this.pow(o,I),r=this.pow(A,I.addn(1).iushrn(1)),h=this.pow(A,I),n=i;0!==h.cmp(C);){for(var a=h,c=0;0!==a.cmp(C);c++)a=a.redSqr();g(c=0;g--){for(var e=B.words[g],o=t-1;o>=0;o--){var s=e>>o&1;I!==Q[0]&&(I=this.sqr(I)),0!==s||0!==i?(i<<=1,i|=s,(4===++C||0===g&&0===o)&&(I=this.mul(I,Q[i]),C=0,i=0)):C=0}t=26}return I},U.prototype.convertTo=function(A){var B=A.umod(this.m);return B===A?B.clone():B},U.prototype.convertFrom=function(A){var B=A.clone();return B.red=null,B},E.mont=function(A){return new N(A)},I(N,U),N.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},N.prototype.convertFrom=function(A){var B=this.imod(A.mul(this.rinv));return B.red=null,B},N.prototype.imul=function(A,B){if(A.isZero()||B.isZero())return A.words[0]=0,A.length=1,A;var Q=A.imul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),E=I;return I.cmp(this.m)>=0?E=I.isub(this.m):I.cmpn(0)<0&&(E=I.iadd(this.m)),E._forceRed(this)},N.prototype.mul=function(A,B){if(A.isZero()||B.isZero())return new E(0)._forceRed(this);var Q=A.mul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),i=I;return I.cmp(this.m)>=0?i=I.isub(this.m):I.cmpn(0)<0&&(i=I.iadd(this.m)),i._forceRed(this)},N.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A,this)}).call(this,Q(10)(A))},function(A,B,Q){var g=Q(0),I=Q(25).Reporter,E=Q(2).Buffer;function i(A,B){I.call(this,B),E.isBuffer(A)?(this.base=A,this.offset=0,this.length=A.length):this.error("Input not Buffer")}function C(A,B){if(Array.isArray(A))this.length=0,this.value=A.map((function(A){return A instanceof C||(A=new C(A,B)),this.length+=A.length,A}),this);else if("number"==typeof A){if(!(0<=A&&A<=255))return B.error("non-byte EncoderBuffer value");this.value=A,this.length=1}else if("string"==typeof A)this.value=A,this.length=E.byteLength(A);else{if(!E.isBuffer(A))return B.error("Unsupported type: "+typeof A);this.value=A,this.length=A.length}}g(i,I),B.DecoderBuffer=i,i.prototype.save=function(){return{offset:this.offset,reporter:I.prototype.save.call(this)}},i.prototype.restore=function(A){var B=new i(this.base);return B.offset=A.offset,B.length=this.offset,this.offset=A.offset,I.prototype.restore.call(this,A.reporter),B},i.prototype.isEmpty=function(){return this.offset===this.length},i.prototype.readUInt8=function(A){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(A||"DecoderBuffer overrun")},i.prototype.skip=function(A,B){if(!(this.offset+A<=this.length))return this.error(B||"DecoderBuffer overrun");var Q=new i(this.base);return Q._reporterState=this._reporterState,Q.offset=this.offset,Q.length=this.offset+A,this.offset+=A,Q},i.prototype.raw=function(A){return this.base.slice(A?A.offset:this.offset,this.length)},B.EncoderBuffer=C,C.prototype.join=function(A,B){return A||(A=new E(this.length)),B||(B=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(Q){Q.join(A,B),B+=Q.length})):("number"==typeof this.value?A[B]=this.value:"string"==typeof this.value?A.write(this.value,B):E.isBuffer(this.value)&&this.value.copy(A,B),B+=this.length)),A}},function(A,B,Q){var g=B;g._reverse=function(A){var B={};return Object.keys(A).forEach((function(Q){(0|Q)==Q&&(Q|=0);var g=A[Q];B[g]=Q})),B},g.der=Q(194)},function(A,B,Q){var g=Q(0),I=Q(24),E=I.base,i=I.bignum,C=I.constants.der;function t(A){this.enc="der",this.name=A.name,this.entity=A,this.tree=new e,this.tree._init(A.body)}function e(A){E.Node.call(this,"der",A)}function o(A,B){var Q=A.readUInt8(B);if(A.isError(Q))return Q;var g=C.tagClass[Q>>6],I=0==(32&Q);if(31==(31&Q)){var E=Q;for(Q=0;128==(128&E);){if(E=A.readUInt8(B),A.isError(E))return E;Q<<=7,Q|=127&E}}else Q&=31;return{cls:g,primitive:I,tag:Q,tagStr:C.tag[Q]}}function s(A,B,Q){var g=A.readUInt8(Q);if(A.isError(g))return g;if(!B&&128===g)return null;if(0==(128&g))return g;var I=127&g;if(I>4)return A.error("length octect is too long");g=0;for(var E=0;E=31)return g.error("Multi-octet tag encoding unsupported");B||(I|=32);return I|=C.tagClassByName[Q||"universal"]<<6}(A,B,Q,this.reporter);if(g.length<128)return(E=new I(2))[0]=i,E[1]=g.length,this._createEncoderBuffer([E,g]);for(var t=1,e=g.length;e>=256;e>>=8)t++;(E=new I(2+t))[0]=i,E[1]=128|t;e=1+t;for(var o=g.length;o>0;e--,o>>=8)E[e]=255&o;return this._createEncoderBuffer([E,g])},e.prototype._encodeStr=function(A,B){if("bitstr"===B)return this._createEncoderBuffer([0|A.unused,A.data]);if("bmpstr"===B){for(var Q=new I(2*A.length),g=0;g=40)return this.reporter.error("Second objid identifier OOB");A.splice(0,2,40*A[0]+A[1])}var E=0;for(g=0;g=128;i>>=7)E++}var C=new I(E),t=C.length-1;for(g=A.length-1;g>=0;g--){i=A[g];for(C[t--]=127&i;(i>>=7)>0;)C[t--]=128|127&i}return this._createEncoderBuffer(C)},e.prototype._encodeTime=function(A,B){var Q,g=new Date(A);return"gentime"===B?Q=[o(g.getFullYear()),o(g.getUTCMonth()+1),o(g.getUTCDate()),o(g.getUTCHours()),o(g.getUTCMinutes()),o(g.getUTCSeconds()),"Z"].join(""):"utctime"===B?Q=[o(g.getFullYear()%100),o(g.getUTCMonth()+1),o(g.getUTCDate()),o(g.getUTCHours()),o(g.getUTCMinutes()),o(g.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+B+" time is not supported yet"),this._encodeStr(Q,"octstr")},e.prototype._encodeNull=function(){return this._createEncoderBuffer("")},e.prototype._encodeInt=function(A,B){if("string"==typeof A){if(!B)return this.reporter.error("String int or enum given, but no values map");if(!B.hasOwnProperty(A))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(A));A=B[A]}if("number"!=typeof A&&!I.isBuffer(A)){var Q=A.toArray();!A.sign&&128&Q[0]&&Q.unshift(0),A=new I(Q)}if(I.isBuffer(A)){var g=A.length;0===A.length&&g++;var E=new I(g);return A.copy(E),0===A.length&&(E[0]=0),this._createEncoderBuffer(E)}if(A<128)return this._createEncoderBuffer(A);if(A<256)return this._createEncoderBuffer([0,A]);g=1;for(var i=A;i>=256;i>>=8)g++;for(i=(E=new Array(g)).length-1;i>=0;i--)E[i]=255&A,A>>=8;return 128&E[0]&&E.unshift(0),this._createEncoderBuffer(new I(E))},e.prototype._encodeBool=function(A){return this._createEncoderBuffer(A?255:0)},e.prototype._use=function(A,B){return"function"==typeof A&&(A=A(B)),A._getEncoder("der").tree},e.prototype._skipDefault=function(A,B,Q){var g,I=this._baseState;if(null===I.default)return!1;var E=A.join();if(void 0===I.defaultBuffer&&(I.defaultBuffer=this._encodeValue(I.default,B,Q).join()),E.length!==I.defaultBuffer.length)return!1;for(g=0;g=g);)++Q;if(16(I=224==(240&I)?(15&I)<<12|E<<6|i:(7&I)<<18|E<<12|i<<6|63&A[B++])?g+=String.fromCharCode(I):(I-=65536,g+=String.fromCharCode(55296|I>>10,56320|1023&I))}}else g+=String.fromCharCode(I)}return g}function Y(A){return A?G(m,A,void 0):""}function L(A,B,Q,g){if(!(0=i&&(i=65536+((1023&i)<<10)|1023&A.charCodeAt(++E)),127>=i){if(Q>=g)break;B[Q++]=i}else{if(2047>=i){if(Q+1>=g)break;B[Q++]=192|i>>6}else{if(65535>=i){if(Q+2>=g)break;B[Q++]=224|i>>12}else{if(Q+3>=g)break;B[Q++]=240|i>>18,B[Q++]=128|i>>12&63}B[Q++]=128|i>>6&63}B[Q++]=128|63&i}}return B[Q]=0,Q-I}function R(A){for(var B=0,Q=0;Q=g&&(g=65536+((1023&g)<<10)|1023&A.charCodeAt(++Q)),127>=g?++B:B=2047>=g?B+2:65535>=g?B+3:B+4}return B}var p,M,m,k,S,b,v,J,V,K="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0;function x(A){var B;for(B=A>>1;k[B];)++B;if(32<(B<<=1)-A&&K)return K.decode(m.subarray(A,B));B=0;for(var Q="";;){var g=k[A+2*B>>1];if(0==g)return Q;++B,Q+=String.fromCharCode(g)}}function Z(A,B,Q){if(void 0===Q&&(Q=2147483647),2>Q)return 0;var g=B;Q=(Q-=2)<2*A.length?Q/2:A.length;for(var I=0;I>1]=A.charCodeAt(I),B+=2;return k[B>>1]=0,B-g}function q(A){return 2*A.length}function O(A){for(var B=0,Q="";;){var g=b[A+4*B>>2];if(0==g)return Q;++B,65536<=g?(g-=65536,Q+=String.fromCharCode(55296|g>>10,56320|1023&g)):Q+=String.fromCharCode(g)}}function j(A,B,Q){if(void 0===Q&&(Q=2147483647),4>Q)return 0;var g=B;Q=g+Q-4;for(var I=0;I=E&&(E=65536+((1023&E)<<10)|1023&A.charCodeAt(++I)),b[B>>2]=E,(B+=4)+4>Q)break}return b[B>>2]=0,B-g}function W(A){for(var B=0,Q=0;Q=g&&++Q,B+=4}return B}function X(A){p=A,B.HEAP8=M=new Int8Array(A),B.HEAP16=k=new Int16Array(A),B.HEAP32=b=new Int32Array(A),B.HEAPU8=m=new Uint8Array(A),B.HEAPU16=S=new Uint16Array(A),B.HEAPU32=v=new Uint32Array(A),B.HEAPF32=J=new Float32Array(A),B.HEAPF64=V=new Float64Array(A)}var T=B.INITIAL_MEMORY||16777216;function z(A){for(;0>2]=A}function NA(A,B){for(var Q=0,g=A.length-1;0<=g;g--){var I=A[g];"."===I?A.splice(g,1):".."===I?(A.splice(g,1),Q++):Q&&(A.splice(g,1),Q--)}if(B)for(;Q;Q--)A.unshift("..");return A}function HA(A){var B="/"===A.charAt(0),Q="/"===A.substr(-1);return(A=NA(A.split("/").filter((function(A){return!!A})),!B).join("/"))||B||(A="."),A&&Q&&(A+="/"),(B?"/":"")+A}function GA(A){var B=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(A).slice(1);return A=B[0],B=B[1],A||B?(B&&(B=B.substr(0,B.length-1)),A+B):"."}function YA(A){if("/"===A)return"/";var B=A.lastIndexOf("/");return-1===B?A:A.substr(B+1)}function LA(){var A=Array.prototype.slice.call(arguments,0);return HA(A.join("/"))}function RA(A,B){return HA(A+"/"+B)}function pA(){for(var A="",B=!1,Q=arguments.length-1;-1<=Q&&!B;Q--){if("string"!=typeof(B=0<=Q?arguments[Q]:VA.cwd()))throw new TypeError("Arguments to path.resolve must be strings");if(!B)return"";A=B+"/"+A,B="/"===B.charAt(0)}return(B?"/":"")+(A=NA(A.split("/").filter((function(A){return!!A})),!B).join("/"))||"."}function MA(A,B){function Q(A){for(var B=0;BQ?[]:A.slice(B,Q-B+1)}A=pA(A).substr(1),B=pA(B).substr(1),A=Q(A.split("/")),B=Q(B.split("/"));for(var g=Math.min(A.length,B.length),I=g,E=0;E=B||(B=Math.max(B,Q*(1048576>Q?2:1.125)>>>0),0!=Q&&(B=Math.max(B,256)),Q=A.f,A.f=new Uint8Array(B),0B)A.f.length=B;else for(;A.f.length=A.node.l)return 0;if(8<(A=Math.min(A.node.l-I,g))&&E.subarray)B.set(E.subarray(I,I+A),Q);else for(g=0;gB)throw new VA.b(28);return B},ia:function(A,B,Q){JA.lb(A.node,B+Q),A.node.l=Math.max(A.node.l,B+Q)},na:function(A,B,Q,g,I,E,i){if(!VA.isFile(A.node.mode))throw new VA.b(43);if(A=A.node.f,2&i||A.buffer!==B.buffer){if((0>>0)%VA.L.length},sb:function(A){var B=VA.Pa(A.parent.id,A.name);A.Y=VA.L[B],VA.L[B]=A},tb:function(A){var B=VA.Pa(A.parent.id,A.name);if(VA.L[B]===A)VA.L[B]=A.Y;else for(B=VA.L[B];B;){if(B.Y===A){B.Y=A.Y;break}B=B.Y}},P:function(A,B){var Q=VA.bc(A);if(Q)throw new VA.b(Q,A);for(Q=VA.L[VA.Pa(A.id,B)];Q;Q=Q.Y){var g=Q.name;if(Q.parent.id===A.id&&g===B)return Q}return VA.lookup(A,B)},createNode:function(A,B,Q,g){return A=new VA.Ab(A,B,Q,g),VA.sb(A),A},La:function(A){VA.tb(A)},Aa:function(A){return A===A.parent},W:function(A){return!!A.oa},isFile:function(A){return 32768==(61440&A)},v:function(A){return 16384==(61440&A)},ma:function(A){return 40960==(61440&A)},ya:function(A){return 8192==(61440&A)},$b:function(A){return 24576==(61440&A)},isFIFO:function(A){return 4096==(61440&A)},isSocket:function(A){return 49152==(49152&A)},Vb:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},dc:function(A){var B=VA.Vb[A];if(void 0===B)throw Error("Unknown file open mode: "+A);return B},mb:function(A){var B=["r","w","rw"][3&A];return 512&A&&(B+="w"),B},Z:function(A,B){return VA.ub||(-1===B.indexOf("r")||292&A.mode)&&(-1===B.indexOf("w")||146&A.mode)&&(-1===B.indexOf("x")||73&A.mode)?0:2},bc:function(A){var B=VA.Z(A,"x");return B||(A.g.lookup?0:2)},Wa:function(A,B){try{return VA.P(A,B),20}catch(A){}return VA.Z(A,"wx")},Ca:function(A,B,Q){try{var g=VA.P(A,B)}catch(A){return A.B}if(A=VA.Z(A,"wx"))return A;if(Q){if(!VA.v(g.mode))return 54;if(VA.Aa(g)||VA.I(g)===VA.cwd())return 10}else if(VA.v(g.mode))return 31;return 0},cc:function(A,B){return A?VA.ma(A.mode)?32:VA.v(A.mode)&&("r"!==VA.mb(B)||512&B)?31:VA.Z(A,VA.mb(B)):44},Bb:4096,fc:function(A,B){for(B=B||VA.Bb,A=A||0;A<=B;A++)if(!VA.streams[A])return A;throw new VA.b(33)},ba:function(A){return VA.streams[A]},Sb:function(A,B,Q){VA.Ja||(VA.Ja=function(){},VA.Ja.prototype={object:{get:function(){return this.node},set:function(A){this.node=A}}});var g,I=new VA.Ja;for(g in A)I[g]=A[g];return A=I,B=VA.fc(B,Q),A.fd=B,VA.streams[B]=A},Lb:function(A){VA.streams[A]=null},Kb:{open:function(A){A.h=VA.Xb(A.node.rdev).h,A.h.open&&A.h.open(A)},K:function(){throw new VA.b(70)}},Va:function(A){return A>>8},Oc:function(A){return 255&A},X:function(A,B){return A<<8|B},$a:function(A,B){VA.jb[A]={h:B}},Xb:function(A){return VA.jb[A]},pb:function(A){var B=[];for(A=[A];A.length;){var Q=A.pop();B.push(Q),A.push.apply(A,Q.pa)}return B},yb:function(A,B){function Q(A){return VA.Fa--,B(A)}function g(A){if(A){if(!g.S)return g.S=!0,Q(A)}else++E>=I.length&&Q(null)}"function"==typeof A&&(B=A,A=!1),VA.Fa++,1B)throw new VA.b(28);var Q;if(!(Q="string"==typeof A?VA.m(A,{H:!0}).node:A).g.A)throw new VA.b(63);if(VA.v(Q.mode))throw new VA.b(31);if(!VA.isFile(Q.mode))throw new VA.b(28);if(A=VA.Z(Q,"w"))throw new VA.b(A);Q.g.A(Q,{size:B,timestamp:Date.now()})},Fc:function(A,B){if(!(A=VA.ba(A)))throw new VA.b(8);if(0==(2097155&A.flags))throw new VA.b(28);VA.truncate(A.node,B)},Xc:function(A,B,Q){(A=VA.m(A,{H:!0}).node).g.A(A,{timestamp:Math.max(B,Q)})},open:function(A,Q,g,I,E){if(""===A)throw new VA.b(44);if(g=64&(Q="string"==typeof Q?VA.dc(Q):Q)?4095&(void 0===g?438:g)|32768:0,"object"==typeof A)var i=A;else{A=HA(A);try{i=VA.m(A,{H:!(131072&Q)}).node}catch(A){}}var C=!1;if(64&Q)if(i){if(128&Q)throw new VA.b(20)}else i=VA.R(A,g,0),C=!0;if(!i)throw new VA.b(44);if(VA.ya(i.mode)&&(Q&=-513),65536&Q&&!VA.v(i.mode))throw new VA.b(54);if(!C&&(g=VA.cc(i,Q)))throw new VA.b(g);512&Q&&VA.truncate(i,0),Q&=-131713,(I=VA.Sb({node:i,path:VA.I(i),flags:Q,seekable:!0,position:0,h:i.h,wc:[],error:!1},I,E)).h.open&&I.h.open(I),!B.logReadFiles||1&Q||(VA.Ya||(VA.Ya={}),A in VA.Ya||(VA.Ya[A]=1,f("FS.trackingDelegate error on read file: "+A)));try{VA.u.onOpenFile&&(E=0,1!=(2097155&Q)&&(E|=VA.zb.wb.Cb),0!=(2097155&Q)&&(E|=VA.zb.wb.Db),VA.u.onOpenFile(A,E))}catch(B){f("FS.trackingDelegate['onOpenFile']('"+A+"', flags) threw an exception: "+B.message)}return I},close:function(A){if(VA.la(A))throw new VA.b(8);A.Oa&&(A.Oa=null);try{A.h.close&&A.h.close(A)}catch(A){throw A}finally{VA.Lb(A.fd)}A.fd=null},la:function(A){return null===A.fd},K:function(A,B,Q){if(VA.la(A))throw new VA.b(8);if(!A.seekable||!A.h.K)throw new VA.b(70);if(0!=Q&&1!=Q&&2!=Q)throw new VA.b(28);return A.position=A.h.K(A,B,Q),A.wc=[],A.position},read:function(A,B,Q,g,I){if(0>g||0>I)throw new VA.b(28);if(VA.la(A))throw new VA.b(8);if(1==(2097155&A.flags))throw new VA.b(8);if(VA.v(A.node.mode))throw new VA.b(31);if(!A.h.read)throw new VA.b(28);var E=void 0!==I;if(E){if(!A.seekable)throw new VA.b(70)}else I=A.position;return B=A.h.read(A,B,Q,g,I),E||(A.position+=B),B},write:function(A,B,Q,g,I,E){if(0>g||0>I)throw new VA.b(28);if(VA.la(A))throw new VA.b(8);if(0==(2097155&A.flags))throw new VA.b(8);if(VA.v(A.node.mode))throw new VA.b(31);if(!A.h.write)throw new VA.b(28);A.seekable&&1024&A.flags&&VA.K(A,0,2);var i=void 0!==I;if(i){if(!A.seekable)throw new VA.b(70)}else I=A.position;B=A.h.write(A,B,Q,g,I,E),i||(A.position+=B);try{A.path&&VA.u.onWriteToFile&&VA.u.onWriteToFile(A.path)}catch(B){f("FS.trackingDelegate['onWriteToFile']('"+A.path+"') threw an exception: "+B.message)}return B},ia:function(A,B,Q){if(VA.la(A))throw new VA.b(8);if(0>B||0>=Q)throw new VA.b(28);if(0==(2097155&A.flags))throw new VA.b(8);if(!VA.isFile(A.node.mode)&&!VA.v(A.node.mode))throw new VA.b(43);if(!A.h.ia)throw new VA.b(138);A.h.ia(A,B,Q)},na:function(A,B,Q,g,I,E,i){if(0!=(2&E)&&0==(2&i)&&2!=(2097155&A.flags))throw new VA.b(2);if(1==(2097155&A.flags))throw new VA.b(2);if(!A.h.na)throw new VA.b(43);return A.h.na(A,B,Q,g,I,E,i)},da:function(A,B,Q,g,I){return A&&A.h.da?A.h.da(A,B,Q,g,I):0},Qc:function(){return 0},Ra:function(A,B,Q){if(!A.h.Ra)throw new VA.b(59);return A.h.Ra(A,B,Q)},readFile:function(A,B){if((B=B||{}).flags=B.flags||"r",B.encoding=B.encoding||"binary","utf8"!==B.encoding&&"binary"!==B.encoding)throw Error('Invalid encoding type "'+B.encoding+'"');var Q,g=VA.open(A,B.flags);A=VA.stat(A).size;var I=new Uint8Array(A);return VA.read(g,I,0,A,0),"utf8"===B.encoding?Q=G(I,0):"binary"===B.encoding&&(Q=I),VA.close(g),Q},writeFile:function(A,B,Q){if((Q=Q||{}).flags=Q.flags||"w",A=VA.open(A,Q.flags,Q.mode),"string"==typeof B){var g=new Uint8Array(R(B)+1);B=L(B,g,0,g.length),VA.write(A,g,0,B,void 0,Q.Jb)}else{if(!ArrayBuffer.isView(B))throw Error("Unsupported data type");VA.write(A,B,0,B.byteLength,void 0,Q.Jb)}VA.close(A)},cwd:function(){return VA.ib},chdir:function(A){if(null===(A=VA.m(A,{H:!0})).node)throw new VA.b(44);if(!VA.v(A.node.mode))throw new VA.b(54);var B=VA.Z(A.node,"x");if(B)throw new VA.b(B);VA.ib=A.path},Ob:function(){VA.mkdir("/tmp"),VA.mkdir("/home"),VA.mkdir("/home/web_user")},Nb:function(){if(VA.mkdir("/dev"),VA.$a(VA.X(1,3),{read:function(){return 0},write:function(A,B,Q,g){return g}}),VA.Da("/dev/null",VA.X(1,3)),kA(VA.X(5,0),bA),kA(VA.X(6,0),vA),VA.Da("/dev/tty",VA.X(5,0)),VA.Da("/dev/tty1",VA.X(6,0)),"object"==typeof crypto&&"function"==typeof crypto.getRandomValues)var A=new Uint8Array(1),B=function(){return crypto.getRandomValues(A),A[0]};else if(s)try{var g=Q(105);B=function(){return g.randomBytes(1)[0]}}catch(A){}B||(B=function(){rA("random_device")}),VA.T("/dev","random",B),VA.T("/dev","urandom",B),VA.mkdir("/dev/shm"),VA.mkdir("/dev/shm/tmp")},Qb:function(){VA.mkdir("/proc"),VA.mkdir("/proc/self"),VA.mkdir("/proc/self/fd"),VA.s({s:function(){var A=VA.createNode("/proc/self","fd",16895,73);return A.g={lookup:function(A,B){var Q=VA.ba(+B);if(!Q)throw new VA.b(8);return(A={parent:null,s:{vb:"fake"},g:{readlink:function(){return Q.path}}}).parent=A}},A}},{},"/proc/self/fd")},Rb:function(){B.stdin?VA.T("/dev","stdin",B.stdin):VA.symlink("/dev/tty","/dev/stdin"),B.stdout?VA.T("/dev","stdout",null,B.stdout):VA.symlink("/dev/tty","/dev/stdout"),B.stderr?VA.T("/dev","stderr",null,B.stderr):VA.symlink("/dev/tty1","/dev/stderr"),VA.open("/dev/stdin","r"),VA.open("/dev/stdout","w"),VA.open("/dev/stderr","w")},kb:function(){VA.b||(VA.b=function(A,B){this.node=B,this.pc=function(A){this.B=A},this.pc(A),this.message="FS error"},VA.b.prototype=Error(),VA.b.prototype.constructor=VA.b,[44].forEach((function(A){VA.Na[A]=new VA.b(A),VA.Na[A].stack=""})))},rc:function(){VA.kb(),VA.L=Array(4096),VA.s(JA,{},"/"),VA.Ob(),VA.Nb(),VA.Qb(),VA.Ub={MEMFS:JA}},ka:function(A,Q,g){VA.ka.Qa=!0,VA.kb(),B.stdin=A||B.stdin,B.stdout=Q||B.stdout,B.stderr=g||B.stderr,VA.Rb()},quit:function(){VA.ka.Qa=!1;var A=B._fflush;for(A&&A(0),A=0;Athis.length-1||0>A)){var B=A%this.chunkSize;return this.rb(A/this.chunkSize|0)[B]}},E.prototype.Ib=function(A){this.rb=A},E.prototype.eb=function(){var A=new XMLHttpRequest;if(A.open("HEAD",Q,!1),A.send(null),!(200<=A.status&&300>A.status||304===A.status))throw Error("Couldn't load "+Q+". Status: "+A.status);var B,g=Number(A.getResponseHeader("Content-length")),I=(B=A.getResponseHeader("Accept-Ranges"))&&"bytes"===B;A=(B=A.getResponseHeader("Content-Encoding"))&&"gzip"===B;var E=1048576;I||(E=g);var i=this;i.Ib((function(A){var B=A*E,I=(A+1)*E-1;if(I=Math.min(I,g-1),void 0===i.S[A]){var C=i.S;if(B>I)throw Error("invalid range ("+B+", "+I+") or no bytes requested!");if(I>g-1)throw Error("only "+g+" bytes available! programmer error!");var t=new XMLHttpRequest;if(t.open("GET",Q,!1),g!==E&&t.setRequestHeader("Range","bytes="+B+"-"+I),"undefined"!=typeof Uint8Array&&(t.responseType="arraybuffer"),t.overrideMimeType&&t.overrideMimeType("text/plain; charset=x-user-defined"),t.send(null),!(200<=t.status&&300>t.status||304===t.status))throw Error("Couldn't load "+Q+". Status: "+t.status);B=void 0!==t.response?new Uint8Array(t.response||[]):_B(t.responseText||"",!0),C[A]=B}if(void 0===i.S[A])throw Error("doXHR failed!");return i.S[A]})),!A&&g||(E=g=1,E=g=this.rb(0).length,u("LazyFiles on gzip forces download of the whole file when length is accessed")),this.Fb=g,this.Eb=E,this.Ua=!0},"undefined"!=typeof XMLHttpRequest){if(!o)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i=new E;Object.defineProperties(i,{length:{get:function(){return this.Ua||this.eb(),this.Fb}},chunkSize:{get:function(){return this.Ua||this.eb(),this.Eb}}}),i={Sa:!1,f:i}}else i={Sa:!1,url:Q};var C=VA.Pb(A,B,i,g,I);i.f?C.f=i.f:i.url&&(C.f=null,C.url=i.url),Object.defineProperties(C,{l:{get:function(){return this.f.length}}});var t={};return Object.keys(C.h).forEach((function(A){var B=C.h[A];t[A]=function(){if(!VA.nb(C))throw new VA.b(29);return B.apply(null,arguments)}})),t.read=function(A,B,Q,g,I){if(!VA.nb(C))throw new VA.b(29);if(I>=(A=A.node.f).length)return 0;if(g=Math.min(A.length-I,g),A.slice)for(var E=0;E>2]}function qA(A){if(!(A=VA.ba(A)))throw new VA.b(8);return A}function OA(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}var jA=void 0;function WA(A){for(var B="";m[A];)B+=jA[m[A++]];return B}var XA={},TA={},zA={};function _A(A){if(void 0===A)return"_unknown";var B=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=B&&57>=B?"_"+A:A}function PA(A,B){return A=_A(A),new Function("body","return function "+A+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(B)}function $A(A){var B=Error,Q=PA(A,(function(B){this.name=A,this.message=B,void 0!==(B=Error(B).stack)&&(this.stack=this.toString()+"\n"+B.replace(/^Error(:[^\n]*)?\n/,""))}));return Q.prototype=Object.create(B.prototype),Q.prototype.constructor=Q,Q.prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},Q}var AB=void 0;function BB(A){throw new AB(A)}var QB=void 0;function gB(A){throw new QB(A)}function IB(A,B,Q){function g(B){(B=Q(B)).length!==A.length&&gB("Mismatched type converter count");for(var g=0;g>2])}var lB={};function UB(A,B){return B.o&&B.j||gB("makeClassHandle requires ptr and ptrType"),!!B.F!=!!B.D&&gB("Both smartPtrType and smartPtr must be specified"),B.count={value:1},sB(Object.create(A,{c:{value:B}}))}function NB(A,B,Q,g){this.name=A,this.i=B,this.Ta=Q,this.za=g,this.Ba=!1,this.$=this.nc=this.mc=this.xb=this.qc=this.kc=void 0,void 0!==B.G?this.toWireType=wB:(this.toWireType=g?fB:FB,this.O=null)}function HB(A,Q){A=WA(A);for(var g=B["dynCall_"+A],I=[],E=1;E>2)+g]);return Q}function pB(A){for(;A.length;){var B=A.pop();A.pop()(B)}}function MB(A,B,Q){return A instanceof Object||BB(Q+' with invalid "this": '+A),A instanceof B.i.constructor||BB(Q+' incompatible with "this" of type '+A.constructor.name),A.c.j||BB("cannot call emscripten binding method "+Q+" on deleted object"),uB(A.c.j,A.c.o.i,B.i)}var mB=[],kB=[{},{value:void 0},{value:null},{value:!0},{value:!1}];function SB(A){switch(A){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:var B=mB.length?mB.pop():kB.length;return kB[B]={ra:1,value:A},B}}function bB(A){if(null===A)return"null";var B=typeof A;return"object"===B||"array"===B||"function"===B?A.toString():""+A}function vB(A,B){switch(B){case 2:return function(A){return this.fromWireType(J[A>>2])};case 3:return function(A){return this.fromWireType(V[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function JB(A,B,Q){switch(B){case 0:return Q?function(A){return M[A]}:function(A){return m[A]};case 1:return Q?function(A){return k[A>>1]}:function(A){return S[A>>1]};case 2:return Q?function(A){return b[A>>2]}:function(A){return v[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}var VB,KB={};function xB(){if(!VB){var A,B={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:h||"./this.program"};for(A in KB)B[A]=KB[A];var Q=[];for(A in B)Q.push(A+"="+B[A]);VB=Q}return VB}function ZB(A){return 0==A%4&&(0!=A%100||0==A%400)}function qB(A,B){for(var Q=0,g=0;g<=B;Q+=A[g++]);return Q}var OB=[31,29,31,30,31,30,31,31,30,31,30,31],jB=[31,28,31,30,31,30,31,31,30,31,30,31];function WB(A,B){for(A=new Date(A.getTime());0g-A.getDate())){A.setDate(A.getDate()+B);break}B-=g-A.getDate()+1,A.setDate(1),11>Q?A.setMonth(Q+1):(A.setMonth(0),A.setFullYear(A.getFullYear()+1))}return A}function XB(A,B,Q,g){A||(A=this),this.parent=A,this.s=A.s,this.oa=null,this.id=VA.ec++,this.name=B,this.mode=Q,this.g={},this.h={},this.rdev=g}Object.defineProperties(XB.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(A){A?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(A){A?this.mode|=146:this.mode&=-147}},ac:{get:function(){return VA.v(this.mode)}},Sa:{get:function(){return VA.ya(this.mode)}}}),VA.Ab=XB,VA.rc();for(var TB=Array(256),zB=0;256>zB;++zB)TB[zB]=String.fromCharCode(zB);function _B(A,B){var Q=Array(R(A)+1);return A=L(A,Q,0,Q.length),B&&(Q.length=A),Q}function PB(A){for(var B=[],Q=0;Q>4,I=(15&I)<<4|E>>2;var C=(3&E)<<6|i;B+=String.fromCharCode(g),64!==E&&(B+=String.fromCharCode(I)),64!==i&&(B+=String.fromCharCode(C))}while(Q>2],B.ha.push(A),F=g[I],0|A;return A=b[A>>2],F=Q,0|A},__cxa_find_matching_catch_3:function(){var A=dA;if(!A)return F=0;var B=fA[A],Q=B.type;if(!Q)return F=0,0|A;var g=Array.prototype.slice.call(arguments);oQ(Q),b[22792]=A,A=91168;for(var I=0;I>2],B.ha.push(A),F=g[I],0|A;return A=b[A>>2],F=Q,0|A},__cxa_find_matching_catch_4:function(){var A=dA;if(!A)return F=0;var B=fA[A],Q=B.type;if(!Q)return F=0,0|A;var g=Array.prototype.slice.call(arguments);oQ(Q),b[22792]=A,A=91168;for(var I=0;I>2],B.ha.push(A),F=g[I],0|A;return A=b[A>>2],F=Q,0|A},__cxa_find_matching_catch_5:function(){var A=dA;if(!A)return F=0;var B=fA[A],Q=B.type;if(!Q)return F=0,0|A;var g=Array.prototype.slice.call(arguments);oQ(Q),b[22792]=A,A=91168;for(var I=0;I>2],B.ha.push(A),F=g[I],0|A;return A=b[A>>2],F=Q,0|A},__cxa_free_exception:lA,__cxa_get_exception_ptr:function(A){return A},__cxa_rethrow:function(){var A=wA.pop();throw A=FA(A),fA[A].Ea||(wA.push(A),fA[A].Ea=!0),dA=A,A},__cxa_throw:function(A,B,Q){throw fA[A]={j:A,ha:[A],type:B,ja:Q,ra:0,fb:!1,Ea:!1},dA=A,"uncaught_exception"in tQ?tQ.ab++:tQ.ab=1,A},__cxa_uncaught_exceptions:function(){return tQ.ab},__map_file:function(){return UA(63),-1},__resumeException:function(A){throw dA||(dA=A),A},__sys_fcntl64:function(A,B,Q){xA=Q;try{var g=qA(A);switch(B){case 0:var I=ZA();return 0>I?-28:VA.open(g.path,g.flags,0,I).fd;case 1:case 2:return 0;case 3:return g.flags;case 4:return I=ZA(),g.flags|=I,0;case 12:return I=ZA(),k[I+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return UA(28),-1;default:return-28}}catch(A){return void 0!==VA&&A instanceof VA.b||rA(A),-A.B}},__sys_ioctl:function(A,B,Q){xA=Q;try{var g=qA(A);switch(B){case 21509:case 21505:return g.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return g.tty?0:-59;case 21519:if(!g.tty)return-59;var I=ZA();return b[I>>2]=0;case 21520:return g.tty?-28:-59;case 21531:return I=ZA(),VA.Ra(g,B,I);case 21523:case 21524:return g.tty?0:-59;default:rA("bad ioctl syscall "+B)}}catch(A){return void 0!==VA&&A instanceof VA.b||rA(A),-A.B}},__sys_munmap:function(A,B){try{if(-1==(0|A)||0===B)var Q=-28;else{var g=KA[A];if(g&&B===g.Lc){var I=VA.ba(g.fd);if(2&g.Sc){var E=g.flags,i=g.offset,C=m.slice(A,A+B);VA.da(I,C,i,B,E)}KA[A]=null,g.Gb&&EQ(g.Nc)}Q=0}return Q}catch(A){return void 0!==VA&&A instanceof VA.b||rA(A),-A.B}},__sys_open:function(A,B,Q){xA=Q;try{var g=Y(A),I=ZA();return VA.open(g,B,I).fd}catch(A){return void 0!==VA&&A instanceof VA.b||rA(A),-A.B}},__sys_stat64:function(A,B){try{A=Y(A);A:{var Q=VA.stat;try{var g=Q(A)}catch(B){if(B&&B.node&&HA(A)!==HA(VA.I(B.node))){var I=-54;break A}throw B}b[B>>2]=g.dev,b[B+4>>2]=0,b[B+8>>2]=g.ino,b[B+12>>2]=g.mode,b[B+16>>2]=g.nlink,b[B+20>>2]=g.uid,b[B+24>>2]=g.gid,b[B+28>>2]=g.rdev,b[B+32>>2]=0,aA=[g.size>>>0,(nA=g.size,1<=+gA(nA)?0>>0:~~+IA((nA-+(~~nA>>>0))/4294967296)>>>0:0)],b[B+40>>2]=aA[0],b[B+44>>2]=aA[1],b[B+48>>2]=4096,b[B+52>>2]=g.blocks,b[B+56>>2]=g.atime.getTime()/1e3|0,b[B+60>>2]=0,b[B+64>>2]=g.mtime.getTime()/1e3|0,b[B+68>>2]=0,b[B+72>>2]=g.ctime.getTime()/1e3|0,b[B+76>>2]=0,aA=[g.ino>>>0,(nA=g.ino,1<=+gA(nA)?0>>0:~~+IA((nA-+(~~nA>>>0))/4294967296)>>>0:0)],b[B+80>>2]=aA[0],b[B+84>>2]=aA[1],I=0}return I}catch(A){return void 0!==VA&&A instanceof VA.b||rA(A),-A.B}},_embind_register_bool:function(A,B,Q,g,I){var E=OA(Q);EB(A,{name:B=WA(B),fromWireType:function(A){return!!A},toWireType:function(A,B){return B?g:I},argPackAdvance:8,readValueFromPointer:function(A){if(1===Q)var g=M;else if(2===Q)g=k;else{if(4!==Q)throw new TypeError("Unknown boolean type size: "+B);g=b}return this.fromWireType(g[A>>E])},O:null})},_embind_register_class:function(A,Q,g,I,E,i,C,t,e,o,s,r,h){s=WA(s),i=HB(E,i),t&&(t=HB(C,t)),o&&(o=HB(e,o)),h=HB(r,h);var n=_A(s);!function(A,Q){B.hasOwnProperty(A)?(BB("Cannot register public name '"+A+"' twice"),yB(B,A,A),B.hasOwnProperty(void 0)&&BB("Cannot register multiple overloads of a function with the same number of arguments (undefined)!"),B[A].N[void 0]=Q):B[A]=Q}(n,(function(){LB("Cannot construct "+s+" due to unbound types",[I])})),IB([A,Q,g],I?[I]:[],(function(Q){if(Q=Q[0],I)var g=Q.i,E=g.U;else E=aB.prototype;Q=PA(n,(function(){if(Object.getPrototypeOf(this)!==C)throw new AB("Use 'new' to construct "+s);if(void 0===e.V)throw new AB(s+" has no accessible constructor");var A=e.V[arguments.length];if(void 0===A)throw new AB("Tried to invoke ctor of "+s+" with invalid number of parameters ("+arguments.length+") - expected ("+Object.keys(e.V).toString()+") parameters instead!");return A.apply(this,arguments)}));var C=Object.create(E,{constructor:{value:Q}});Q.prototype=C;var e=new DB(s,Q,C,h,g,i,t,o);g=new NB(s,e,!0,!1),E=new NB(s+"*",e,!1,!1);var r=new NB(s+" const*",e,!1,!0);return cB[A]={pointerType:E,Mb:r},function(A,Q){B.hasOwnProperty(A)||gB("Replacing nonexistant public symbol"),B[A]=Q,B[A].va=void 0}(n,Q),[g,E,r]}))},_embind_register_class_constructor:function(A,B,Q,g,I,E){N(0s&&BB("argTypes array size mismatch! Must at least get return value and 'this' types!");var r=null!==g[1]&&null!==t,h=!1;for(t=1;t>>C}}var t=-1!=B.indexOf("unsigned");EB(A,{name:B,fromWireType:E,toWireType:function(A,Q){if("number"!=typeof Q&&"boolean"!=typeof Q)throw new TypeError('Cannot convert "'+bB(Q)+'" to '+this.name);if(QI)throw new TypeError('Passing a number "'+bB(Q)+'" from JS side to C/C++ side to an argument of type "'+B+'", which is outside the valid range ['+g+", "+I+"]!");return t?Q>>>0:0|Q},argPackAdvance:8,readValueFromPointer:JB(B,i,0!==g),O:null})},_embind_register_memory_view:function(A,B,Q){function g(A){var B=v;return new I(p,B[1+(A>>=2)],B[A])}var I=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][B];EB(A,{name:Q=WA(Q),fromWireType:g,argPackAdvance:8,readValueFromPointer:g},{Zb:!0})},_embind_register_std_string:function(A,B){var Q="std::string"===(B=WA(B));EB(A,{name:B,fromWireType:function(A){var B=v[A>>2];if(Q){var g=m[A+4+B],I=0;0!=g&&(I=g,m[A+4+B]=0);var E=A+4;for(g=0;g<=B;++g){var i=A+4+g;if(0==m[i]){if(E=Y(E),void 0===C)var C=E;else C+=String.fromCharCode(0),C+=E;E=i+1}}0!=I&&(m[A+4+B]=I)}else{for(C=Array(B),g=0;g>2]=I,Q&&g)L(B,m,E+4,I+1);else if(g)for(g=0;g>2],I=i(),E=I[A+4+Q*B>>C],t=0;0!=E&&(t=E,I[A+4+Q*B>>C]=0);var e=A+4;for(E=0;E<=Q;++E){var o=A+4+E*B;if(0==I[o>>C]){if(e=g(e),void 0===s)var s=e;else s+=String.fromCharCode(0),s+=e;e=o+B}}return 0!=t&&(I[A+4+Q*B>>C]=t),EQ(A),s},toWireType:function(A,g){"string"!=typeof g&&BB("Cannot pass non-string to C++ string type "+Q);var i=E(g),t=IQ(4+i+B);return v[t>>2]=i>>C,I(g,t+4,i+B),null!==A&&A.push(EQ,t),t},argPackAdvance:8,readValueFromPointer:dB,O:function(A){EQ(A)}})},_embind_register_void:function(A,B){EB(A,{Jc:!0,name:B=WA(B),argPackAdvance:0,fromWireType:function(){},toWireType:function(){}})},abort:function(){rA()},emscripten_get_sbrk_ptr:function(){return 91008},emscripten_memcpy_big:function(A,B,Q){m.copyWithin(A,B,B+Q)},emscripten_resize_heap:function(A){A>>>=0;var B=m.length;if(2147483648=Q;Q*=2){var g=B*(1+.2/Q);g=Math.min(g,A+100663296),0<(g=Math.max(16777216,A,g))%65536&&(g+=65536-g%65536);A:{try{d.grow(Math.min(2147483648,g)-p.byteLength+65535>>>16),X(d.buffer);var I=1;break A}catch(A){}I=void 0}if(I)return!0}return!1},environ_get:function(A,B){var Q=0;return xB().forEach((function(g,I){var E=B+Q;for(I=b[A+4*I>>2]=E,E=0;E>0]=g.charCodeAt(E);M[I>>0]=0,Q+=g.length+1})),0},environ_sizes_get:function(A,B){var Q=xB();b[A>>2]=Q.length;var g=0;return Q.forEach((function(A){g+=A.length+1})),b[B>>2]=g,0},fd_close:function(A){try{var B=qA(A);return VA.close(B),0}catch(A){return void 0!==VA&&A instanceof VA.b||rA(A),A.B}},fd_read:function(A,B,Q,g){try{A:{for(var I=qA(A),E=A=0;E>2],C=VA.read(I,M,b[B+8*E>>2],i,void 0);if(0>C){var t=-1;break A}if(A+=C,C>2]=t,0}catch(A){return void 0!==VA&&A instanceof VA.b||rA(A),A.B}},fd_seek:function(A,B,Q,g,I){try{var E=qA(A);return-9007199254740992>=(A=4294967296*Q+(B>>>0))||9007199254740992<=A?-61:(VA.K(E,A,g),aA=[E.position>>>0,(nA=E.position,1<=+gA(nA)?0>>0:~~+IA((nA-+(~~nA>>>0))/4294967296)>>>0:0)],b[I>>2]=aA[0],b[I+4>>2]=aA[1],E.Oa&&0===A&&0===g&&(E.Oa=null),0)}catch(A){return void 0!==VA&&A instanceof VA.b||rA(A),A.B}},fd_write:function(A,B,Q,g){try{A:{for(var I=qA(A),E=A=0;E>2],b[B+(8*E+4)>>2],void 0);if(0>i){var C=-1;break A}A+=i}C=A}return b[g>>2]=C,0}catch(A){return void 0!==VA&&A instanceof VA.b||rA(A),A.B}},getTempRet0:function(){return 0|F},gettimeofday:function(A){var B=Date.now();return b[A>>2]=B/1e3|0,b[A+4>>2]=B%1e3*1e3|0,0},invoke_diii:function(A,B,Q,g){var I=qQ();try{return ZQ(A,B,Q,g)}catch(A){if(jQ(I),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_fiii:function(A,B,Q,g){var I=qQ();try{return xQ(A,B,Q,g)}catch(A){if(jQ(I),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_i:function(A){var B=qQ();try{return lQ(A)}catch(A){if(jQ(B),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_ii:function(A,B){var Q=qQ();try{return UQ(A,B)}catch(A){if(jQ(Q),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iif:function(A,B,Q){var g=qQ();try{return JQ(A,B,Q)}catch(A){if(jQ(g),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iii:function(A,B,Q){var g=qQ();try{return NQ(A,B,Q)}catch(A){if(jQ(g),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiii:function(A,B,Q,g){var I=qQ();try{return HQ(A,B,Q,g)}catch(A){if(jQ(I),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiiii:function(A,B,Q,g,I){var E=qQ();try{return GQ(A,B,Q,g,I)}catch(A){if(jQ(E),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiiiid:function(A,B,Q,g,I,E){var i=qQ();try{return SQ(A,B,Q,g,I,E)}catch(A){if(jQ(i),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiiiii:function(A,B,Q,g,I,E){var i=qQ();try{return YQ(A,B,Q,g,I,E)}catch(A){if(jQ(i),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiiiiii:function(A,B,Q,g,I,E,i){var C=qQ();try{return LQ(A,B,Q,g,I,E,i)}catch(A){if(jQ(C),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiiiiiii:function(A,B,Q,g,I,E,i,C){var t=qQ();try{return RQ(A,B,Q,g,I,E,i,C)}catch(A){if(jQ(t),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiiiiiiiiii:function(A,B,Q,g,I,E,i,C,t,e,o){var s=qQ();try{return pQ(A,B,Q,g,I,E,i,C,t,e,o)}catch(A){if(jQ(s),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiiiiiiiiiii:function(A,B,Q,g,I,E,i,C,t,e,o,s){var r=qQ();try{return MQ(A,B,Q,g,I,E,i,C,t,e,o,s)}catch(A){if(jQ(r),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiiiiiiiiiiii:function(A,B,Q,g,I,E,i,C,t,e,o,s,r){var h=qQ();try{return mQ(A,B,Q,g,I,E,i,C,t,e,o,s,r)}catch(A){if(jQ(h),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiiiij:function(A,B,Q,g,I,E,i){var C=qQ();try{return kQ(A,B,Q,g,I,E,i)}catch(A){if(jQ(C),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iiijiiiiii:function(A,B,Q,g,I,E,i,C,t,e,o){var s=qQ();try{return bQ(A,B,Q,g,I,E,i,C,t,e,o)}catch(A){if(jQ(s),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_iij:function(A,B,Q,g){var I=qQ();try{return vQ(A,B,Q,g)}catch(A){if(jQ(I),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_jii:function(A,B,Q){var g=qQ();try{return VQ(A,B,Q)}catch(A){if(jQ(g),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_jiiii:function(A,B,Q,g,I){var E=qQ();try{return KQ(A,B,Q,g,I)}catch(A){if(jQ(E),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_v:function(A){var B=qQ();try{rQ(A)}catch(A){if(jQ(B),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_vi:function(A,B){var Q=qQ();try{hQ(A,B)}catch(A){if(jQ(Q),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_vii:function(A,B,Q){var g=qQ();try{nQ(A,B,Q)}catch(A){if(jQ(g),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_viii:function(A,B,Q,g){var I=qQ();try{aQ(A,B,Q,g)}catch(A){if(jQ(I),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_viiii:function(A,B,Q,g,I){var E=qQ();try{cQ(A,B,Q,g,I)}catch(A){if(jQ(E),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_viiiii:function(A,B,Q,g,I,E){var i=qQ();try{yQ(A,B,Q,g,I,E)}catch(A){if(jQ(i),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_viiiiiii:function(A,B,Q,g,I,E,i,C){var t=qQ();try{DQ(A,B,Q,g,I,E,i,C)}catch(A){if(jQ(t),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_viiiiiiiiii:function(A,B,Q,g,I,E,i,C,t,e,o){var s=qQ();try{uQ(A,B,Q,g,I,E,i,C,t,e,o)}catch(A){if(jQ(s),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_viiiiiiiiiiiiiii:function(A,B,Q,g,I,E,i,C,t,e,o,s,r,h,n,a){var c=qQ();try{fQ(A,B,Q,g,I,E,i,C,t,e,o,s,r,h,n,a)}catch(A){if(jQ(c),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_viiiijji:function(A,B,Q,g,I,E,i,C,t,e){var o=qQ();try{wQ(A,B,Q,g,I,E,i,C,t,e)}catch(A){if(jQ(o),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_viijii:function(A,B,Q,g,I,E,i){var C=qQ();try{FQ(A,B,Q,g,I,E,i)}catch(A){if(jQ(C),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},invoke_viji:function(A,B,Q,g,I){var E=qQ();try{dQ(A,B,Q,g,I)}catch(A){if(jQ(E),A!==A+0&&"longjmp"!==A)throw A;CQ(1,0)}},llvm_eh_typeid_for:function(A){return A},memory:d,setTempRet0:function(A){F=0|A},strftime_l:function(A,B,Q,g){return function(A,B,Q,g){function I(A,B,Q){for(A="number"==typeof A?A.toString():A||"";A.lengthA?-1:0=i(Q,A)?0>=i(B,A)?A.getFullYear()+1:A.getFullYear():A.getFullYear()-1}var e=b[g+40>>2];for(var o in g={uc:b[g>>2],tc:b[g+4>>2],Ga:b[g+8>>2],sa:b[g+12>>2],fa:b[g+16>>2],C:b[g+20>>2],Ha:b[g+24>>2],Ia:b[g+28>>2],Vc:b[g+32>>2],sc:b[g+36>>2],vc:e?Y(e):""},Q=Y(Q),e={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})Q=Q.replace(new RegExp(o,"g"),e[o]);var s="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),r="January February March April May June July August September October November December".split(" ");for(o in e={"%a":function(A){return s[A.Ha].substring(0,3)},"%A":function(A){return s[A.Ha]},"%b":function(A){return r[A.fa].substring(0,3)},"%B":function(A){return r[A.fa]},"%C":function(A){return E((A.C+1900)/100|0,2)},"%d":function(A){return E(A.sa,2)},"%e":function(A){return I(A.sa,2," ")},"%g":function(A){return t(A).toString().substring(2)},"%G":function(A){return t(A)},"%H":function(A){return E(A.Ga,2)},"%I":function(A){return 0==(A=A.Ga)?A=12:12A.Ga?"AM":"PM"},"%S":function(A){return E(A.uc,2)},"%t":function(){return"\t"},"%u":function(A){return A.Ha||7},"%U":function(A){var B=new Date(A.C+1900,0,1),Q=0===B.getDay()?B:WB(B,7-B.getDay());return 0>i(Q,A=new Date(A.C+1900,A.fa,A.sa))?E(Math.ceil((31-Q.getDate()+(qB(ZB(A.getFullYear())?OB:jB,A.getMonth()-1)-31)+A.getDate())/7),2):0===i(Q,B)?"01":"00"},"%V":function(A){var B=new Date(A.C+1901,0,4),Q=C(new Date(A.C+1900,0,4));B=C(B);var g=WB(new Date(A.C+1900,0,1),A.Ia);return 0>i(g,Q)?"53":0>=i(B,g)?"01":E(Math.ceil((Q.getFullYear()i(Q,A=new Date(A.C+1900,A.fa,A.sa))?E(Math.ceil((31-Q.getDate()+(qB(ZB(A.getFullYear())?OB:jB,A.getMonth()-1)-31)+A.getDate())/7),2):0===i(Q,B)?"01":"00"},"%y":function(A){return(A.C+1900).toString().substring(2)},"%Y":function(A){return A.C+1900},"%z":function(A){var B=0<=(A=A.sc);return A=Math.abs(A)/60,(B?"+":"-")+String("0000"+(A/60*100+A%60)).slice(-4)},"%Z":function(A){return A.vc},"%%":function(){return"%"}})0<=Q.indexOf(o)&&(Q=Q.replace(new RegExp(o,"g"),e[o](g)));return(o=_B(Q,!1)).length>B?0:(M.set(o,A),o.length-1)}(A,B,Q,g)},table:l},QQ=function(){function A(A){B.asm=A.exports,sA()}function Q(B){A(B.instance)}function g(A){return(w||!e&&!o||"function"!=typeof fetch||hA(yA,"file://")?new Promise((function(A){A(uA())})):fetch(yA,{credentials:"same-origin"}).then((function(A){if(!A.ok)throw"failed to load wasm binary file at '"+yA+"'";return A.arrayBuffer()})).catch((function(){return uA()}))).then((function(A){return WebAssembly.instantiate(A,I)})).then(A,(function(A){f("failed to asynchronously prepare wasm: "+A),rA(A)}))}var I={env:BQ,wasi_snapshot_preview1:BQ};if(oA(),B.instantiateWasm)try{return B.instantiateWasm(I,A)}catch(A){return f("Module.instantiateWasm callback failed with error: "+A),!1}return function(){if(w||"function"!=typeof WebAssembly.instantiateStreaming||hA(yA,cA)||hA(yA,"file://")||"function"!=typeof fetch)return g(Q);fetch(yA,{credentials:"same-origin"}).then((function(A){return WebAssembly.instantiateStreaming(A,I).then(Q,(function(A){f("wasm streaming compile failed: "+A),f("falling back to ArrayBuffer instantiation"),g(Q)}))}))}(),{}}();B.asm=QQ;var gQ=B.___wasm_call_ctors=function(){return(gQ=B.___wasm_call_ctors=B.asm.__wasm_call_ctors).apply(null,arguments)},IQ=B._malloc=function(){return(IQ=B._malloc=B.asm.malloc).apply(null,arguments)},EQ=B._free=function(){return(EQ=B._free=B.asm.free).apply(null,arguments)},iQ=B.___errno_location=function(){return(iQ=B.___errno_location=B.asm.__errno_location).apply(null,arguments)},CQ=B._setThrew=function(){return(CQ=B._setThrew=B.asm.setThrew).apply(null,arguments)},tQ=B.__ZSt18uncaught_exceptionv=function(){return(tQ=B.__ZSt18uncaught_exceptionv=B.asm._ZSt18uncaught_exceptionv).apply(null,arguments)},eQ=B.___cxa_can_catch=function(){return(eQ=B.___cxa_can_catch=B.asm.__cxa_can_catch).apply(null,arguments)},oQ=B.___cxa_is_pointer_type=function(){return(oQ=B.___cxa_is_pointer_type=B.asm.__cxa_is_pointer_type).apply(null,arguments)},sQ=B.___getTypeName=function(){return(sQ=B.___getTypeName=B.asm.__getTypeName).apply(null,arguments)};B.___embind_register_native_and_builtin_types=function(){return(B.___embind_register_native_and_builtin_types=B.asm.__embind_register_native_and_builtin_types).apply(null,arguments)};var rQ=B.dynCall_v=function(){return(rQ=B.dynCall_v=B.asm.dynCall_v).apply(null,arguments)},hQ=B.dynCall_vi=function(){return(hQ=B.dynCall_vi=B.asm.dynCall_vi).apply(null,arguments)},nQ=B.dynCall_vii=function(){return(nQ=B.dynCall_vii=B.asm.dynCall_vii).apply(null,arguments)},aQ=B.dynCall_viii=function(){return(aQ=B.dynCall_viii=B.asm.dynCall_viii).apply(null,arguments)},cQ=B.dynCall_viiii=function(){return(cQ=B.dynCall_viiii=B.asm.dynCall_viiii).apply(null,arguments)},yQ=B.dynCall_viiiii=function(){return(yQ=B.dynCall_viiiii=B.asm.dynCall_viiiii).apply(null,arguments)},DQ=B.dynCall_viiiiiii=function(){return(DQ=B.dynCall_viiiiiii=B.asm.dynCall_viiiiiii).apply(null,arguments)},uQ=B.dynCall_viiiiiiiiii=function(){return(uQ=B.dynCall_viiiiiiiiii=B.asm.dynCall_viiiiiiiiii).apply(null,arguments)},fQ=B.dynCall_viiiiiiiiiiiiiii=function(){return(fQ=B.dynCall_viiiiiiiiiiiiiii=B.asm.dynCall_viiiiiiiiiiiiiii).apply(null,arguments)},wQ=B.dynCall_viiiijji=function(){return(wQ=B.dynCall_viiiijji=B.asm.dynCall_viiiijji).apply(null,arguments)},FQ=B.dynCall_viijii=function(){return(FQ=B.dynCall_viijii=B.asm.dynCall_viijii).apply(null,arguments)},dQ=B.dynCall_viji=function(){return(dQ=B.dynCall_viji=B.asm.dynCall_viji).apply(null,arguments)},lQ=B.dynCall_i=function(){return(lQ=B.dynCall_i=B.asm.dynCall_i).apply(null,arguments)},UQ=B.dynCall_ii=function(){return(UQ=B.dynCall_ii=B.asm.dynCall_ii).apply(null,arguments)},NQ=B.dynCall_iii=function(){return(NQ=B.dynCall_iii=B.asm.dynCall_iii).apply(null,arguments)},HQ=B.dynCall_iiii=function(){return(HQ=B.dynCall_iiii=B.asm.dynCall_iiii).apply(null,arguments)},GQ=B.dynCall_iiiii=function(){return(GQ=B.dynCall_iiiii=B.asm.dynCall_iiiii).apply(null,arguments)},YQ=B.dynCall_iiiiii=function(){return(YQ=B.dynCall_iiiiii=B.asm.dynCall_iiiiii).apply(null,arguments)},LQ=B.dynCall_iiiiiii=function(){return(LQ=B.dynCall_iiiiiii=B.asm.dynCall_iiiiiii).apply(null,arguments)},RQ=B.dynCall_iiiiiiii=function(){return(RQ=B.dynCall_iiiiiiii=B.asm.dynCall_iiiiiiii).apply(null,arguments)},pQ=B.dynCall_iiiiiiiiiii=function(){return(pQ=B.dynCall_iiiiiiiiiii=B.asm.dynCall_iiiiiiiiiii).apply(null,arguments)},MQ=B.dynCall_iiiiiiiiiiii=function(){return(MQ=B.dynCall_iiiiiiiiiiii=B.asm.dynCall_iiiiiiiiiiii).apply(null,arguments)},mQ=B.dynCall_iiiiiiiiiiiii=function(){return(mQ=B.dynCall_iiiiiiiiiiiii=B.asm.dynCall_iiiiiiiiiiiii).apply(null,arguments)},kQ=B.dynCall_iiiiij=function(){return(kQ=B.dynCall_iiiiij=B.asm.dynCall_iiiiij).apply(null,arguments)},SQ=B.dynCall_iiiiid=function(){return(SQ=B.dynCall_iiiiid=B.asm.dynCall_iiiiid).apply(null,arguments)},bQ=B.dynCall_iiijiiiiii=function(){return(bQ=B.dynCall_iiijiiiiii=B.asm.dynCall_iiijiiiiii).apply(null,arguments)},vQ=B.dynCall_iij=function(){return(vQ=B.dynCall_iij=B.asm.dynCall_iij).apply(null,arguments)},JQ=B.dynCall_iif=function(){return(JQ=B.dynCall_iif=B.asm.dynCall_iif).apply(null,arguments)},VQ=B.dynCall_jii=function(){return(VQ=B.dynCall_jii=B.asm.dynCall_jii).apply(null,arguments)},KQ=B.dynCall_jiiii=function(){return(KQ=B.dynCall_jiiii=B.asm.dynCall_jiiii).apply(null,arguments)},xQ=B.dynCall_fiii=function(){return(xQ=B.dynCall_fiii=B.asm.dynCall_fiii).apply(null,arguments)},ZQ=B.dynCall_diii=function(){return(ZQ=B.dynCall_diii=B.asm.dynCall_diii).apply(null,arguments)},qQ=B.stackSave=function(){return(qQ=B.stackSave=B.asm.stackSave).apply(null,arguments)};B.stackAlloc=function(){return(B.stackAlloc=B.asm.stackAlloc).apply(null,arguments)};var OQ,jQ=B.stackRestore=function(){return(jQ=B.stackRestore=B.asm.stackRestore).apply(null,arguments)};function WQ(){function A(){if(!OQ&&(OQ=!0,B.calledRun=!0,!U)){if(B.noFSInit||VA.ka.Qa||VA.ka(),z(P),VA.ub=!1,z($),B.onRuntimeInitialized&&B.onRuntimeInitialized(),B.postRun)for("function"==typeof B.postRun&&(B.postRun=[B.postRun]);B.postRun.length;){var A=B.postRun.shift();BA.unshift(A)}z(BA)}}if(!(0{E.then(()=>{A()})}),C=()=>I(void 0,void 0,void 0,(function*(){yield i;const A=new E.H264MP4Encoder;return A.FS=E.FS,A}))},function(A,B,Q){"use strict";B.byteLength=function(A){var B=e(A),Q=B[0],g=B[1];return 3*(Q+g)/4-g},B.toByteArray=function(A){var B,Q,g=e(A),i=g[0],C=g[1],t=new E(function(A,B,Q){return 3*(B+Q)/4-Q}(0,i,C)),o=0,s=C>0?i-4:i;for(Q=0;Q>16&255,t[o++]=B>>8&255,t[o++]=255&B;2===C&&(B=I[A.charCodeAt(Q)]<<2|I[A.charCodeAt(Q+1)]>>4,t[o++]=255&B);1===C&&(B=I[A.charCodeAt(Q)]<<10|I[A.charCodeAt(Q+1)]<<4|I[A.charCodeAt(Q+2)]>>2,t[o++]=B>>8&255,t[o++]=255&B);return t},B.fromByteArray=function(A){for(var B,Q=A.length,I=Q%3,E=[],i=0,C=Q-I;iC?C:i+16383));1===I?(B=A[Q-1],E.push(g[B>>2]+g[B<<4&63]+"==")):2===I&&(B=(A[Q-2]<<8)+A[Q-1],E.push(g[B>>10]+g[B>>4&63]+g[B<<2&63]+"="));return E.join("")};for(var g=[],I=[],E="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",C=0,t=i.length;C0)throw new Error("Invalid string. Length must be a multiple of 4");var Q=A.indexOf("=");return-1===Q&&(Q=B),[Q,Q===B?0:4-Q%4]}function o(A,B,Q){for(var I,E,i=[],C=B;C>18&63]+g[E>>12&63]+g[E>>6&63]+g[63&E]);return i.join("")}I["-".charCodeAt(0)]=62,I["_".charCodeAt(0)]=63},function(A,B){B.read=function(A,B,Q,g,I){var E,i,C=8*I-g-1,t=(1<>1,o=-7,s=Q?I-1:0,r=Q?-1:1,h=A[B+s];for(s+=r,E=h&(1<<-o)-1,h>>=-o,o+=C;o>0;E=256*E+A[B+s],s+=r,o-=8);for(i=E&(1<<-o)-1,E>>=-o,o+=g;o>0;i=256*i+A[B+s],s+=r,o-=8);if(0===E)E=1-e;else{if(E===t)return i?NaN:1/0*(h?-1:1);i+=Math.pow(2,g),E-=e}return(h?-1:1)*i*Math.pow(2,E-g)},B.write=function(A,B,Q,g,I,E){var i,C,t,e=8*E-I-1,o=(1<>1,r=23===I?Math.pow(2,-24)-Math.pow(2,-77):0,h=g?0:E-1,n=g?1:-1,a=B<0||0===B&&1/B<0?1:0;for(B=Math.abs(B),isNaN(B)||B===1/0?(C=isNaN(B)?1:0,i=o):(i=Math.floor(Math.log(B)/Math.LN2),B*(t=Math.pow(2,-i))<1&&(i--,t*=2),(B+=i+s>=1?r/t:r*Math.pow(2,1-s))*t>=2&&(i++,t/=2),i+s>=o?(C=0,i=o):i+s>=1?(C=(B*t-1)*Math.pow(2,I),i+=s):(C=B*Math.pow(2,s-1)*Math.pow(2,I),i=0));I>=8;A[Q+h]=255&C,h+=n,C/=256,I-=8);for(i=i<0;A[Q+h]=255&i,h+=n,i/=256,e-=8);A[Q+h-n]|=128*a}},function(A,B){},function(A,B,Q){"use strict";B.randomBytes=B.rng=B.pseudoRandomBytes=B.prng=Q(14),B.createHash=B.Hash=Q(20),B.createHmac=B.Hmac=Q(63);var g=Q(131),I=Object.keys(g),E=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(I);B.getHashes=function(){return E};var i=Q(66);B.pbkdf2=i.pbkdf2,B.pbkdf2Sync=i.pbkdf2Sync;var C=Q(133);B.Cipher=C.Cipher,B.createCipher=C.createCipher,B.Cipheriv=C.Cipheriv,B.createCipheriv=C.createCipheriv,B.Decipher=C.Decipher,B.createDecipher=C.createDecipher,B.Decipheriv=C.Decipheriv,B.createDecipheriv=C.createDecipheriv,B.getCiphers=C.getCiphers,B.listCiphers=C.listCiphers;var t=Q(148);B.DiffieHellmanGroup=t.DiffieHellmanGroup,B.createDiffieHellmanGroup=t.createDiffieHellmanGroup,B.getDiffieHellman=t.getDiffieHellman,B.createDiffieHellman=t.createDiffieHellman,B.DiffieHellman=t.DiffieHellman;var e=Q(155);B.createSign=e.createSign,B.Sign=e.Sign,B.createVerify=e.createVerify,B.Verify=e.Verify,B.createECDH=Q(203);var o=Q(206);B.publicEncrypt=o.publicEncrypt,B.privateEncrypt=o.privateEncrypt,B.publicDecrypt=o.publicDecrypt,B.privateDecrypt=o.privateDecrypt;var s=Q(210);B.randomFill=s.randomFill,B.randomFillSync=s.randomFillSync,B.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},B.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(A,B,Q){ /*! safe-buffer. MIT License. Feross Aboukhadijeh */ var g=Q(2),I=g.Buffer;function E(A,B){for(var Q in A)B[Q]=A[Q]}function i(A,B,Q){return I(A,B,Q)}I.from&&I.alloc&&I.allocUnsafe&&I.allocUnsafeSlow?A.exports=g:(E(g,B),B.Buffer=i),i.prototype=Object.create(I.prototype),E(I,i),i.from=function(A,B,Q){if("number"==typeof A)throw new TypeError("Argument must not be a number");return I(A,B,Q)},i.alloc=function(A,B,Q){if("number"!=typeof A)throw new TypeError("Argument must be a number");var g=I(A);return void 0!==B?"string"==typeof Q?g.fill(B,Q):g.fill(B):g.fill(0),g},i.allocUnsafe=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return I(A)},i.allocUnsafeSlow=function(A){if("number"!=typeof A)throw new TypeError("Argument must be a number");return g.SlowBuffer(A)}},function(A,B,Q){(B=A.exports=Q(51)).Stream=B,B.Readable=B,B.Writable=Q(55),B.Duplex=Q(16),B.Transform=Q(56),B.PassThrough=Q(113),B.finished=Q(33),B.pipeline=Q(114)},function(A,B){},function(A,B,Q){"use strict";function g(A,B){var Q=Object.keys(A);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(A);B&&(g=g.filter((function(B){return Object.getOwnPropertyDescriptor(A,B).enumerable}))),Q.push.apply(Q,g)}return Q}function I(A,B,Q){return B in A?Object.defineProperty(A,B,{value:Q,enumerable:!0,configurable:!0,writable:!0}):A[B]=Q,A}function E(A,B){for(var Q=0;Q0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(A){var B={data:A,next:this.head};0===this.length&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(0!==this.length){var A=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,A}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(A){if(0===this.length)return"";for(var B=this.head,Q=""+B.data;B=B.next;)Q+=A+B.data;return Q}},{key:"concat",value:function(A){if(0===this.length)return i.alloc(0);for(var B,Q,g,I=i.allocUnsafe(A>>>0),E=this.head,C=0;E;)B=E.data,Q=I,g=C,i.prototype.copy.call(B,Q,g),C+=E.data.length,E=E.next;return I}},{key:"consume",value:function(A,B){var Q;return AI.length?I.length:A;if(E===I.length?g+=I:g+=I.slice(0,A),0==(A-=E)){E===I.length?(++Q,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=I.slice(E));break}++Q}return this.length-=Q,g}},{key:"_getBuffer",value:function(A){var B=i.allocUnsafe(A),Q=this.head,g=1;for(Q.data.copy(B),A-=Q.data.length;Q=Q.next;){var I=Q.data,E=A>I.length?I.length:A;if(I.copy(B,B.length-A,0,E),0==(A-=E)){E===I.length?(++g,Q.next?this.head=Q.next:this.head=this.tail=null):(this.head=Q,Q.data=I.slice(E));break}++g}return this.length-=g,B}},{key:t,value:function(A,B){return C(this,function(A){for(var B=1;B0,(function(A){g||(g=A),A&&i.forEach(e),E||(i.forEach(e),I(g))}))}));return B.reduce(o)}},function(A,B,Q){var g=Q(0),I=Q(17),E=Q(1).Buffer,i=[1518500249,1859775393,-1894007588,-899497514],C=new Array(80);function t(){this.init(),this._w=C,I.call(this,64,56)}function e(A){return A<<30|A>>>2}function o(A,B,Q,g){return 0===A?B&Q|~B&g:2===A?B&Q|B&g|Q&g:B^Q^g}g(t,I),t.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},t.prototype._update=function(A){for(var B,Q=this._w,g=0|this._a,I=0|this._b,E=0|this._c,C=0|this._d,t=0|this._e,s=0;s<16;++s)Q[s]=A.readInt32BE(4*s);for(;s<80;++s)Q[s]=Q[s-3]^Q[s-8]^Q[s-14]^Q[s-16];for(var r=0;r<80;++r){var h=~~(r/20),n=0|((B=g)<<5|B>>>27)+o(h,I,E,C)+t+Q[r]+i[h];t=C,C=E,E=e(I),I=g,g=n}this._a=g+this._a|0,this._b=I+this._b|0,this._c=E+this._c|0,this._d=C+this._d|0,this._e=t+this._e|0},t.prototype._hash=function(){var A=E.allocUnsafe(20);return A.writeInt32BE(0|this._a,0),A.writeInt32BE(0|this._b,4),A.writeInt32BE(0|this._c,8),A.writeInt32BE(0|this._d,12),A.writeInt32BE(0|this._e,16),A},A.exports=t},function(A,B,Q){var g=Q(0),I=Q(17),E=Q(1).Buffer,i=[1518500249,1859775393,-1894007588,-899497514],C=new Array(80);function t(){this.init(),this._w=C,I.call(this,64,56)}function e(A){return A<<5|A>>>27}function o(A){return A<<30|A>>>2}function s(A,B,Q,g){return 0===A?B&Q|~B&g:2===A?B&Q|B&g|Q&g:B^Q^g}g(t,I),t.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},t.prototype._update=function(A){for(var B,Q=this._w,g=0|this._a,I=0|this._b,E=0|this._c,C=0|this._d,t=0|this._e,r=0;r<16;++r)Q[r]=A.readInt32BE(4*r);for(;r<80;++r)Q[r]=(B=Q[r-3]^Q[r-8]^Q[r-14]^Q[r-16])<<1|B>>>31;for(var h=0;h<80;++h){var n=~~(h/20),a=e(g)+s(n,I,E,C)+t+Q[h]+i[n]|0;t=C,C=E,E=o(I),I=g,g=a}this._a=g+this._a|0,this._b=I+this._b|0,this._c=E+this._c|0,this._d=C+this._d|0,this._e=t+this._e|0},t.prototype._hash=function(){var A=E.allocUnsafe(20);return A.writeInt32BE(0|this._a,0),A.writeInt32BE(0|this._b,4),A.writeInt32BE(0|this._c,8),A.writeInt32BE(0|this._d,12),A.writeInt32BE(0|this._e,16),A},A.exports=t},function(A,B,Q){var g=Q(0),I=Q(57),E=Q(17),i=Q(1).Buffer,C=new Array(64);function t(){this.init(),this._w=C,E.call(this,64,56)}g(t,I),t.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},t.prototype._hash=function(){var A=i.allocUnsafe(28);return A.writeInt32BE(this._a,0),A.writeInt32BE(this._b,4),A.writeInt32BE(this._c,8),A.writeInt32BE(this._d,12),A.writeInt32BE(this._e,16),A.writeInt32BE(this._f,20),A.writeInt32BE(this._g,24),A},A.exports=t},function(A,B,Q){var g=Q(0),I=Q(58),E=Q(17),i=Q(1).Buffer,C=new Array(160);function t(){this.init(),this._w=C,E.call(this,128,112)}g(t,I),t.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},t.prototype._hash=function(){var A=i.allocUnsafe(48);function B(B,Q,g){A.writeInt32BE(B,g),A.writeInt32BE(Q,g+4)}return B(this._ah,this._al,0),B(this._bh,this._bl,8),B(this._ch,this._cl,16),B(this._dh,this._dl,24),B(this._eh,this._el,32),B(this._fh,this._fl,40),A},A.exports=t},function(A,B,Q){A.exports=I;var g=Q(11).EventEmitter;function I(){g.call(this)}Q(0)(I,g),I.Readable=Q(36),I.Writable=Q(126),I.Duplex=Q(127),I.Transform=Q(128),I.PassThrough=Q(129),I.Stream=I,I.prototype.pipe=function(A,B){var Q=this;function I(B){A.writable&&!1===A.write(B)&&Q.pause&&Q.pause()}function E(){Q.readable&&Q.resume&&Q.resume()}Q.on("data",I),A.on("drain",E),A._isStdio||B&&!1===B.end||(Q.on("end",C),Q.on("close",t));var i=!1;function C(){i||(i=!0,A.end())}function t(){i||(i=!0,"function"==typeof A.destroy&&A.destroy())}function e(A){if(o(),0===g.listenerCount(this,"error"))throw A}function o(){Q.removeListener("data",I),A.removeListener("drain",E),Q.removeListener("end",C),Q.removeListener("close",t),Q.removeListener("error",e),A.removeListener("error",e),Q.removeListener("end",o),Q.removeListener("close",o),A.removeListener("close",o)}return Q.on("error",e),A.on("error",e),Q.on("end",o),Q.on("close",o),A.on("close",o),A.emit("pipe",Q),A}},function(A,B){},function(A,B,Q){"use strict";var g=Q(1).Buffer,I=Q(122);A.exports=function(){function A(){!function(A,B){if(!(A instanceof B))throw new TypeError("Cannot call a class as a function")}(this,A),this.head=null,this.tail=null,this.length=0}return A.prototype.push=function(A){var B={data:A,next:null};this.length>0?this.tail.next=B:this.head=B,this.tail=B,++this.length},A.prototype.unshift=function(A){var B={data:A,next:this.head};0===this.length&&(this.tail=B),this.head=B,++this.length},A.prototype.shift=function(){if(0!==this.length){var A=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,A}},A.prototype.clear=function(){this.head=this.tail=null,this.length=0},A.prototype.join=function(A){if(0===this.length)return"";for(var B=this.head,Q=""+B.data;B=B.next;)Q+=A+B.data;return Q},A.prototype.concat=function(A){if(0===this.length)return g.alloc(0);if(1===this.length)return this.head.data;for(var B,Q,I,E=g.allocUnsafe(A>>>0),i=this.head,C=0;i;)B=i.data,Q=E,I=C,B.copy(Q,I),C+=i.data.length,i=i.next;return E},A}(),I&&I.inspect&&I.inspect.custom&&(A.exports.prototype[I.inspect.custom]=function(){var A=I.inspect({length:this.length});return this.constructor.name+" "+A})},function(A,B){},function(A,B,Q){(function(A){var g=void 0!==A&&A||"undefined"!=typeof self&&self||window,I=Function.prototype.apply;function E(A,B){this._id=A,this._clearFn=B}B.setTimeout=function(){return new E(I.call(setTimeout,g,arguments),clearTimeout)},B.setInterval=function(){return new E(I.call(setInterval,g,arguments),clearInterval)},B.clearTimeout=B.clearInterval=function(A){A&&A.close()},E.prototype.unref=E.prototype.ref=function(){},E.prototype.close=function(){this._clearFn.call(g,this._id)},B.enroll=function(A,B){clearTimeout(A._idleTimeoutId),A._idleTimeout=B},B.unenroll=function(A){clearTimeout(A._idleTimeoutId),A._idleTimeout=-1},B._unrefActive=B.active=function(A){clearTimeout(A._idleTimeoutId);var B=A._idleTimeout;B>=0&&(A._idleTimeoutId=setTimeout((function(){A._onTimeout&&A._onTimeout()}),B))},Q(124),B.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==A&&A.setImmediate||this&&this.setImmediate,B.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==A&&A.clearImmediate||this&&this.clearImmediate}).call(this,Q(4))},function(A,B,Q){(function(A,B){!function(A,Q){"use strict";if(!A.setImmediate){var g,I,E,i,C,t=1,e={},o=!1,s=A.document,r=Object.getPrototypeOf&&Object.getPrototypeOf(A);r=r&&r.setTimeout?r:A,"[object process]"==={}.toString.call(A.process)?g=function(A){B.nextTick((function(){n(A)}))}:!function(){if(A.postMessage&&!A.importScripts){var B=!0,Q=A.onmessage;return A.onmessage=function(){B=!1},A.postMessage("","*"),A.onmessage=Q,B}}()?A.MessageChannel?((E=new MessageChannel).port1.onmessage=function(A){n(A.data)},g=function(A){E.port2.postMessage(A)}):s&&"onreadystatechange"in s.createElement("script")?(I=s.documentElement,g=function(A){var B=s.createElement("script");B.onreadystatechange=function(){n(A),B.onreadystatechange=null,I.removeChild(B),B=null},I.appendChild(B)}):g=function(A){setTimeout(n,0,A)}:(i="setImmediate$"+Math.random()+"$",C=function(B){B.source===A&&"string"==typeof B.data&&0===B.data.indexOf(i)&&n(+B.data.slice(i.length))},A.addEventListener?A.addEventListener("message",C,!1):A.attachEvent("onmessage",C),g=function(B){A.postMessage(i+B,"*")}),r.setImmediate=function(A){"function"!=typeof A&&(A=new Function(""+A));for(var B=new Array(arguments.length-1),Q=0;Q64?B=A(B):B.length<64&&(B=I.concat([B,i],64));for(var Q=this._ipad=I.allocUnsafe(64),g=this._opad=I.allocUnsafe(64),C=0;C<64;C++)Q[C]=54^B[C],g[C]=92^B[C];this._hash=[Q]}g(C,E),C.prototype._update=function(A){this._hash.push(A)},C.prototype._final=function(){var A=this._alg(I.concat(this._hash));return this._alg(I.concat([this._opad,A]))},A.exports=C},function(A,B,Q){A.exports=Q(65)},function(A,B,Q){(function(B,g){var I,E=Q(67),i=Q(68),C=Q(69),t=Q(1).Buffer,e=B.crypto&&B.crypto.subtle,o={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},s=[];function r(A,B,Q,g,I){return e.importKey("raw",A,{name:"PBKDF2"},!1,["deriveBits"]).then((function(A){return e.deriveBits({name:"PBKDF2",salt:B,iterations:Q,hash:{name:I}},A,g<<3)})).then((function(A){return t.from(A)}))}A.exports=function(A,Q,h,n,a,c){"function"==typeof a&&(c=a,a=void 0);var y=o[(a=a||"sha1").toLowerCase()];if(!y||"function"!=typeof B.Promise)return g.nextTick((function(){var B;try{B=C(A,Q,h,n,a)}catch(A){return c(A)}c(null,B)}));if(E(A,Q,h,n),"function"!=typeof c)throw new Error("No callback provided to pbkdf2");t.isBuffer(A)||(A=t.from(A,i)),t.isBuffer(Q)||(Q=t.from(Q,i)),function(A,B){A.then((function(A){g.nextTick((function(){B(null,A)}))}),(function(A){g.nextTick((function(){B(A)}))}))}(function(A){if(B.process&&!B.process.browser)return Promise.resolve(!1);if(!e||!e.importKey||!e.deriveBits)return Promise.resolve(!1);if(void 0!==s[A])return s[A];var Q=r(I=I||t.alloc(8),I,10,128,A).then((function(){return!0})).catch((function(){return!1}));return s[A]=Q,Q}(y).then((function(B){return B?r(A,Q,h,n,y):C(A,Q,h,n,a)})),c)}}).call(this,Q(4),Q(3))},function(A,B,Q){var g=Q(134),I=Q(39),E=Q(40),i=Q(147),C=Q(28);function t(A,B,Q){if(A=A.toLowerCase(),E[A])return I.createCipheriv(A,B,Q);if(i[A])return new g({key:B,iv:Q,mode:A});throw new TypeError("invalid suite type")}function e(A,B,Q){if(A=A.toLowerCase(),E[A])return I.createDecipheriv(A,B,Q);if(i[A])return new g({key:B,iv:Q,mode:A,decrypt:!0});throw new TypeError("invalid suite type")}B.createCipher=B.Cipher=function(A,B){var Q,g;if(A=A.toLowerCase(),E[A])Q=E[A].key,g=E[A].iv;else{if(!i[A])throw new TypeError("invalid suite type");Q=8*i[A].key,g=i[A].iv}var I=C(B,!1,Q,g);return t(A,I.key,I.iv)},B.createCipheriv=B.Cipheriv=t,B.createDecipher=B.Decipher=function(A,B){var Q,g;if(A=A.toLowerCase(),E[A])Q=E[A].key,g=E[A].iv;else{if(!i[A])throw new TypeError("invalid suite type");Q=8*i[A].key,g=i[A].iv}var I=C(B,!1,Q,g);return e(A,I.key,I.iv)},B.createDecipheriv=B.Decipheriv=e,B.listCiphers=B.getCiphers=function(){return Object.keys(i).concat(I.getCiphers())}},function(A,B,Q){var g=Q(9),I=Q(135),E=Q(0),i=Q(1).Buffer,C={"des-ede3-cbc":I.CBC.instantiate(I.EDE),"des-ede3":I.EDE,"des-ede-cbc":I.CBC.instantiate(I.EDE),"des-ede":I.EDE,"des-cbc":I.CBC.instantiate(I.DES),"des-ecb":I.DES};function t(A){g.call(this);var B,Q=A.mode.toLowerCase(),I=C[Q];B=A.decrypt?"decrypt":"encrypt";var E=A.key;i.isBuffer(E)||(E=i.from(E)),"des-ede"!==Q&&"des-ede-cbc"!==Q||(E=i.concat([E,E.slice(0,8)]));var t=A.iv;i.isBuffer(t)||(t=i.from(t)),this._des=I.create({key:E,iv:t,type:B})}C.des=C["des-cbc"],C.des3=C["des-ede3-cbc"],A.exports=t,E(t,g),t.prototype._update=function(A){return i.from(this._des.update(A))},t.prototype._final=function(){return i.from(this._des.final())}},function(A,B,Q){"use strict";B.utils=Q(70),B.Cipher=Q(38),B.DES=Q(71),B.CBC=Q(136),B.EDE=Q(137)},function(A,B,Q){"use strict";var g=Q(5),I=Q(0),E={};function i(A){g.equal(A.length,8,"Invalid IV length"),this.iv=new Array(8);for(var B=0;B15){var A=this.cache.slice(0,16);return this.cache=this.cache.slice(16),A}return null},r.prototype.flush=function(){for(var A=16-this.cache.length,B=E.allocUnsafe(A),Q=-1;++Q>i%8,A._prev=E(A._prev,Q?g:I);return C}function E(A,B){var Q=A.length,I=-1,E=g.allocUnsafe(A.length);for(A=g.concat([A,g.from([B])]);++I>7;return E}B.encrypt=function(A,B,Q){for(var E=B.length,i=g.allocUnsafe(E),C=-1;++C>>0,0),B.writeUInt32BE(A[1]>>>0,4),B.writeUInt32BE(A[2]>>>0,8),B.writeUInt32BE(A[3]>>>0,12),B}function i(A){this.h=A,this.state=g.alloc(16,0),this.cache=g.allocUnsafe(0)}i.prototype.ghash=function(A){for(var B=-1;++B0;B--)g[B]=g[B]>>>1|(1&g[B-1])<<31;g[0]=g[0]>>>1,Q&&(g[0]=g[0]^225<<24)}this.state=E(I)},i.prototype.update=function(A){var B;for(this.cache=g.concat([this.cache,A]);this.cache.length>=16;)B=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(B)},i.prototype.final=function(A,B){return this.cache.length&&this.ghash(g.concat([this.cache,I],16)),this.ghash(E([0,A,0,B])),this.state},A.exports=i},function(A,B,Q){var g=Q(75),I=Q(1).Buffer,E=Q(40),i=Q(76),C=Q(9),t=Q(27),e=Q(28);function o(A,B,Q){C.call(this),this._cache=new s,this._last=void 0,this._cipher=new t.AES(B),this._prev=I.from(Q),this._mode=A,this._autopadding=!0}function s(){this.cache=I.allocUnsafe(0)}function r(A,B,Q){var C=E[A.toLowerCase()];if(!C)throw new TypeError("invalid suite type");if("string"==typeof Q&&(Q=I.from(Q)),"GCM"!==C.mode&&Q.length!==C.iv)throw new TypeError("invalid iv length "+Q.length);if("string"==typeof B&&(B=I.from(B)),B.length!==C.key/8)throw new TypeError("invalid key length "+B.length);return"stream"===C.type?new i(C.module,B,Q,!0):"auth"===C.type?new g(C.module,B,Q,!0):new o(C.module,B,Q)}Q(0)(o,C),o.prototype._update=function(A){var B,Q;this._cache.add(A);for(var g=[];B=this._cache.get(this._autopadding);)Q=this._mode.decrypt(this,B),g.push(Q);return I.concat(g)},o.prototype._final=function(){var A=this._cache.flush();if(this._autopadding)return function(A){var B=A[15];if(B<1||B>16)throw new Error("unable to decrypt data");var Q=-1;for(;++Q16)return B=this.cache.slice(0,16),this.cache=this.cache.slice(16),B}else if(this.cache.length>=16)return B=this.cache.slice(0,16),this.cache=this.cache.slice(16),B;return null},s.prototype.flush=function(){if(this.cache.length)return this.cache},B.createDecipher=function(A,B){var Q=E[A.toLowerCase()];if(!Q)throw new TypeError("invalid suite type");var g=e(B,!1,Q.key,Q.iv);return r(A,g.key,g.iv)},B.createDecipheriv=r},function(A,B){B["des-ecb"]={key:8,iv:0},B["des-cbc"]=B.des={key:8,iv:8},B["des-ede3-cbc"]=B.des3={key:24,iv:8},B["des-ede3"]={key:24,iv:0},B["des-ede-cbc"]={key:16,iv:8},B["des-ede"]={key:16,iv:0}},function(A,B,Q){(function(A){var g=Q(77),I=Q(153),E=Q(154);var i={binary:!0,hex:!0,base64:!0};B.DiffieHellmanGroup=B.createDiffieHellmanGroup=B.getDiffieHellman=function(B){var Q=new A(I[B].prime,"hex"),g=new A(I[B].gen,"hex");return new E(Q,g)},B.createDiffieHellman=B.DiffieHellman=function B(Q,I,C,t){return A.isBuffer(I)||void 0===i[I]?B(Q,"binary",I,C):(I=I||"binary",t=t||"binary",C=C||new A([2]),A.isBuffer(C)||(C=new A(C,t)),"number"==typeof Q?new E(g(Q,C),C,!0):(A.isBuffer(Q)||(Q=new A(Q,I)),new E(Q,C,!0)))}}).call(this,Q(2).Buffer)},function(A,B){},function(A,B,Q){(function(A){!function(A,B){"use strict";function g(A,B){if(!A)throw new Error(B||"Assertion failed")}function I(A,B){A.super_=B;var Q=function(){};Q.prototype=B.prototype,A.prototype=new Q,A.prototype.constructor=A}function E(A,B,Q){if(E.isBN(A))return A;this.negative=0,this.words=null,this.length=0,this.red=null,null!==A&&("le"!==B&&"be"!==B||(Q=B,B=10),this._init(A||0,B||10,Q||"be"))}var i;"object"==typeof A?A.exports=E:B.BN=E,E.BN=E,E.wordSize=26;try{i=Q(151).Buffer}catch(A){}function C(A,B,Q){for(var g=0,I=Math.min(A.length,Q),E=B;E=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return g}function t(A,B,Q,g){for(var I=0,E=Math.min(A.length,Q),i=B;i=49?C-49+10:C>=17?C-17+10:C}return I}E.isBN=function(A){return A instanceof E||null!==A&&"object"==typeof A&&A.constructor.wordSize===E.wordSize&&Array.isArray(A.words)},E.max=function(A,B){return A.cmp(B)>0?A:B},E.min=function(A,B){return A.cmp(B)<0?A:B},E.prototype._init=function(A,B,Q){if("number"==typeof A)return this._initNumber(A,B,Q);if("object"==typeof A)return this._initArray(A,B,Q);"hex"===B&&(B=16),g(B===(0|B)&&B>=2&&B<=36);var I=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&I++,16===B?this._parseHex(A,I):this._parseBase(A,B,I),"-"===A[0]&&(this.negative=1),this.strip(),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initNumber=function(A,B,Q){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[67108863&A],this.length=1):A<4503599627370496?(this.words=[67108863&A,A/67108864&67108863],this.length=2):(g(A<9007199254740992),this.words=[67108863&A,A/67108864&67108863,1],this.length=3),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initArray=function(A,B,Q){if(g("number"==typeof A.length),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var I=0;I=0;I-=3)i=A[I]|A[I-1]<<8|A[I-2]<<16,this.words[E]|=i<>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);else if("le"===Q)for(I=0,E=0;I>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);return this.strip()},E.prototype._parseHex=function(A,B){this.length=Math.ceil((A.length-B)/6),this.words=new Array(this.length);for(var Q=0;Q=B;Q-=6)I=C(A,Q,Q+6),this.words[g]|=I<>>26-E&4194303,(E+=24)>=26&&(E-=26,g++);Q+6!==B&&(I=C(A,B,Q+6),this.words[g]|=I<>>26-E&4194303),this.strip()},E.prototype._parseBase=function(A,B,Q){this.words=[0],this.length=1;for(var g=0,I=1;I<=67108863;I*=B)g++;g--,I=I/B|0;for(var E=A.length-Q,i=E%g,C=Math.min(E,E-i)+Q,e=0,o=Q;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},E.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},E.prototype.inspect=function(){return(this.red?""};var e=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],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],s=[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 r(A,B,Q){Q.negative=B.negative^A.negative;var g=A.length+B.length|0;Q.length=g,g=g-1|0;var I=0|A.words[0],E=0|B.words[0],i=I*E,C=67108863&i,t=i/67108864|0;Q.words[0]=C;for(var e=1;e>>26,s=67108863&t,r=Math.min(e,B.length-1),h=Math.max(0,e-A.length+1);h<=r;h++){var n=e-h|0;o+=(i=(I=0|A.words[n])*(E=0|B.words[h])+s)/67108864|0,s=67108863&i}Q.words[e]=0|s,t=0|o}return 0!==t?Q.words[e]=0|t:Q.length--,Q.strip()}E.prototype.toString=function(A,B){var Q;if(B=0|B||1,16===(A=A||10)||"hex"===A){Q="";for(var I=0,E=0,i=0;i>>24-I&16777215)||i!==this.length-1?e[6-t.length]+t+Q:t+Q,(I+=2)>=26&&(I-=26,i--)}for(0!==E&&(Q=E.toString(16)+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}if(A===(0|A)&&A>=2&&A<=36){var r=o[A],h=s[A];Q="";var n=this.clone();for(n.negative=0;!n.isZero();){var a=n.modn(h).toString(A);Q=(n=n.idivn(h)).isZero()?a+Q:e[r-a.length]+a+Q}for(this.isZero()&&(Q="0"+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}g(!1,"Base should be between 2 and 36")},E.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&g(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},E.prototype.toJSON=function(){return this.toString(16)},E.prototype.toBuffer=function(A,B){return g(void 0!==i),this.toArrayLike(i,A,B)},E.prototype.toArray=function(A,B){return this.toArrayLike(Array,A,B)},E.prototype.toArrayLike=function(A,B,Q){var I=this.byteLength(),E=Q||Math.max(1,I);g(I<=E,"byte array longer than desired length"),g(E>0,"Requested array length <= 0"),this.strip();var i,C,t="le"===B,e=new A(E),o=this.clone();if(t){for(C=0;!o.isZero();C++)i=o.andln(255),o.iushrn(8),e[C]=i;for(;C=4096&&(Q+=13,B>>>=13),B>=64&&(Q+=7,B>>>=7),B>=8&&(Q+=4,B>>>=4),B>=2&&(Q+=2,B>>>=2),Q+B},E.prototype._zeroBits=function(A){if(0===A)return 26;var B=A,Q=0;return 0==(8191&B)&&(Q+=13,B>>>=13),0==(127&B)&&(Q+=7,B>>>=7),0==(15&B)&&(Q+=4,B>>>=4),0==(3&B)&&(Q+=2,B>>>=2),0==(1&B)&&Q++,Q},E.prototype.bitLength=function(){var A=this.words[this.length-1],B=this._countBits(A);return 26*(this.length-1)+B},E.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,B=0;BA.length?this.clone().ior(A):A.clone().ior(this)},E.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},E.prototype.iuand=function(A){var B;B=this.length>A.length?A:this;for(var Q=0;QA.length?this.clone().iand(A):A.clone().iand(this)},E.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},E.prototype.iuxor=function(A){var B,Q;this.length>A.length?(B=this,Q=A):(B=A,Q=this);for(var g=0;gA.length?this.clone().ixor(A):A.clone().ixor(this)},E.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},E.prototype.inotn=function(A){g("number"==typeof A&&A>=0);var B=0|Math.ceil(A/26),Q=A%26;this._expand(B),Q>0&&B--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-Q),this.strip()},E.prototype.notn=function(A){return this.clone().inotn(A)},E.prototype.setn=function(A,B){g("number"==typeof A&&A>=0);var Q=A/26|0,I=A%26;return this._expand(Q+1),this.words[Q]=B?this.words[Q]|1<A.length?(Q=this,g=A):(Q=A,g=this);for(var I=0,E=0;E>>26;for(;0!==I&&E>>26;if(this.length=Q.length,0!==I)this.words[this.length]=I,this.length++;else if(Q!==this)for(;EA.length?this.clone().iadd(A):A.clone().iadd(this)},E.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var B=this.iadd(A);return A.negative=1,B._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var Q,g,I=this.cmp(A);if(0===I)return this.negative=0,this.length=1,this.words[0]=0,this;I>0?(Q=this,g=A):(Q=A,g=this);for(var E=0,i=0;i>26,this.words[i]=67108863&B;for(;0!==E&&i>26,this.words[i]=67108863&B;if(0===E&&i>>13,h=0|i[1],n=8191&h,a=h>>>13,c=0|i[2],y=8191&c,D=c>>>13,u=0|i[3],f=8191&u,w=u>>>13,F=0|i[4],d=8191&F,l=F>>>13,U=0|i[5],N=8191&U,H=U>>>13,G=0|i[6],Y=8191&G,L=G>>>13,R=0|i[7],p=8191&R,M=R>>>13,m=0|i[8],k=8191&m,S=m>>>13,b=0|i[9],v=8191&b,J=b>>>13,V=0|C[0],K=8191&V,x=V>>>13,Z=0|C[1],q=8191&Z,O=Z>>>13,j=0|C[2],W=8191&j,X=j>>>13,T=0|C[3],z=8191&T,_=T>>>13,P=0|C[4],$=8191&P,AA=P>>>13,BA=0|C[5],QA=8191&BA,gA=BA>>>13,IA=0|C[6],EA=8191&IA,iA=IA>>>13,CA=0|C[7],tA=8191&CA,eA=CA>>>13,oA=0|C[8],sA=8191&oA,rA=oA>>>13,hA=0|C[9],nA=8191&hA,aA=hA>>>13;Q.negative=A.negative^B.negative,Q.length=19;var cA=(e+(g=Math.imul(s,K))|0)+((8191&(I=(I=Math.imul(s,x))+Math.imul(r,K)|0))<<13)|0;e=((E=Math.imul(r,x))+(I>>>13)|0)+(cA>>>26)|0,cA&=67108863,g=Math.imul(n,K),I=(I=Math.imul(n,x))+Math.imul(a,K)|0,E=Math.imul(a,x);var yA=(e+(g=g+Math.imul(s,q)|0)|0)+((8191&(I=(I=I+Math.imul(s,O)|0)+Math.imul(r,q)|0))<<13)|0;e=((E=E+Math.imul(r,O)|0)+(I>>>13)|0)+(yA>>>26)|0,yA&=67108863,g=Math.imul(y,K),I=(I=Math.imul(y,x))+Math.imul(D,K)|0,E=Math.imul(D,x),g=g+Math.imul(n,q)|0,I=(I=I+Math.imul(n,O)|0)+Math.imul(a,q)|0,E=E+Math.imul(a,O)|0;var DA=(e+(g=g+Math.imul(s,W)|0)|0)+((8191&(I=(I=I+Math.imul(s,X)|0)+Math.imul(r,W)|0))<<13)|0;e=((E=E+Math.imul(r,X)|0)+(I>>>13)|0)+(DA>>>26)|0,DA&=67108863,g=Math.imul(f,K),I=(I=Math.imul(f,x))+Math.imul(w,K)|0,E=Math.imul(w,x),g=g+Math.imul(y,q)|0,I=(I=I+Math.imul(y,O)|0)+Math.imul(D,q)|0,E=E+Math.imul(D,O)|0,g=g+Math.imul(n,W)|0,I=(I=I+Math.imul(n,X)|0)+Math.imul(a,W)|0,E=E+Math.imul(a,X)|0;var uA=(e+(g=g+Math.imul(s,z)|0)|0)+((8191&(I=(I=I+Math.imul(s,_)|0)+Math.imul(r,z)|0))<<13)|0;e=((E=E+Math.imul(r,_)|0)+(I>>>13)|0)+(uA>>>26)|0,uA&=67108863,g=Math.imul(d,K),I=(I=Math.imul(d,x))+Math.imul(l,K)|0,E=Math.imul(l,x),g=g+Math.imul(f,q)|0,I=(I=I+Math.imul(f,O)|0)+Math.imul(w,q)|0,E=E+Math.imul(w,O)|0,g=g+Math.imul(y,W)|0,I=(I=I+Math.imul(y,X)|0)+Math.imul(D,W)|0,E=E+Math.imul(D,X)|0,g=g+Math.imul(n,z)|0,I=(I=I+Math.imul(n,_)|0)+Math.imul(a,z)|0,E=E+Math.imul(a,_)|0;var fA=(e+(g=g+Math.imul(s,$)|0)|0)+((8191&(I=(I=I+Math.imul(s,AA)|0)+Math.imul(r,$)|0))<<13)|0;e=((E=E+Math.imul(r,AA)|0)+(I>>>13)|0)+(fA>>>26)|0,fA&=67108863,g=Math.imul(N,K),I=(I=Math.imul(N,x))+Math.imul(H,K)|0,E=Math.imul(H,x),g=g+Math.imul(d,q)|0,I=(I=I+Math.imul(d,O)|0)+Math.imul(l,q)|0,E=E+Math.imul(l,O)|0,g=g+Math.imul(f,W)|0,I=(I=I+Math.imul(f,X)|0)+Math.imul(w,W)|0,E=E+Math.imul(w,X)|0,g=g+Math.imul(y,z)|0,I=(I=I+Math.imul(y,_)|0)+Math.imul(D,z)|0,E=E+Math.imul(D,_)|0,g=g+Math.imul(n,$)|0,I=(I=I+Math.imul(n,AA)|0)+Math.imul(a,$)|0,E=E+Math.imul(a,AA)|0;var wA=(e+(g=g+Math.imul(s,QA)|0)|0)+((8191&(I=(I=I+Math.imul(s,gA)|0)+Math.imul(r,QA)|0))<<13)|0;e=((E=E+Math.imul(r,gA)|0)+(I>>>13)|0)+(wA>>>26)|0,wA&=67108863,g=Math.imul(Y,K),I=(I=Math.imul(Y,x))+Math.imul(L,K)|0,E=Math.imul(L,x),g=g+Math.imul(N,q)|0,I=(I=I+Math.imul(N,O)|0)+Math.imul(H,q)|0,E=E+Math.imul(H,O)|0,g=g+Math.imul(d,W)|0,I=(I=I+Math.imul(d,X)|0)+Math.imul(l,W)|0,E=E+Math.imul(l,X)|0,g=g+Math.imul(f,z)|0,I=(I=I+Math.imul(f,_)|0)+Math.imul(w,z)|0,E=E+Math.imul(w,_)|0,g=g+Math.imul(y,$)|0,I=(I=I+Math.imul(y,AA)|0)+Math.imul(D,$)|0,E=E+Math.imul(D,AA)|0,g=g+Math.imul(n,QA)|0,I=(I=I+Math.imul(n,gA)|0)+Math.imul(a,QA)|0,E=E+Math.imul(a,gA)|0;var FA=(e+(g=g+Math.imul(s,EA)|0)|0)+((8191&(I=(I=I+Math.imul(s,iA)|0)+Math.imul(r,EA)|0))<<13)|0;e=((E=E+Math.imul(r,iA)|0)+(I>>>13)|0)+(FA>>>26)|0,FA&=67108863,g=Math.imul(p,K),I=(I=Math.imul(p,x))+Math.imul(M,K)|0,E=Math.imul(M,x),g=g+Math.imul(Y,q)|0,I=(I=I+Math.imul(Y,O)|0)+Math.imul(L,q)|0,E=E+Math.imul(L,O)|0,g=g+Math.imul(N,W)|0,I=(I=I+Math.imul(N,X)|0)+Math.imul(H,W)|0,E=E+Math.imul(H,X)|0,g=g+Math.imul(d,z)|0,I=(I=I+Math.imul(d,_)|0)+Math.imul(l,z)|0,E=E+Math.imul(l,_)|0,g=g+Math.imul(f,$)|0,I=(I=I+Math.imul(f,AA)|0)+Math.imul(w,$)|0,E=E+Math.imul(w,AA)|0,g=g+Math.imul(y,QA)|0,I=(I=I+Math.imul(y,gA)|0)+Math.imul(D,QA)|0,E=E+Math.imul(D,gA)|0,g=g+Math.imul(n,EA)|0,I=(I=I+Math.imul(n,iA)|0)+Math.imul(a,EA)|0,E=E+Math.imul(a,iA)|0;var dA=(e+(g=g+Math.imul(s,tA)|0)|0)+((8191&(I=(I=I+Math.imul(s,eA)|0)+Math.imul(r,tA)|0))<<13)|0;e=((E=E+Math.imul(r,eA)|0)+(I>>>13)|0)+(dA>>>26)|0,dA&=67108863,g=Math.imul(k,K),I=(I=Math.imul(k,x))+Math.imul(S,K)|0,E=Math.imul(S,x),g=g+Math.imul(p,q)|0,I=(I=I+Math.imul(p,O)|0)+Math.imul(M,q)|0,E=E+Math.imul(M,O)|0,g=g+Math.imul(Y,W)|0,I=(I=I+Math.imul(Y,X)|0)+Math.imul(L,W)|0,E=E+Math.imul(L,X)|0,g=g+Math.imul(N,z)|0,I=(I=I+Math.imul(N,_)|0)+Math.imul(H,z)|0,E=E+Math.imul(H,_)|0,g=g+Math.imul(d,$)|0,I=(I=I+Math.imul(d,AA)|0)+Math.imul(l,$)|0,E=E+Math.imul(l,AA)|0,g=g+Math.imul(f,QA)|0,I=(I=I+Math.imul(f,gA)|0)+Math.imul(w,QA)|0,E=E+Math.imul(w,gA)|0,g=g+Math.imul(y,EA)|0,I=(I=I+Math.imul(y,iA)|0)+Math.imul(D,EA)|0,E=E+Math.imul(D,iA)|0,g=g+Math.imul(n,tA)|0,I=(I=I+Math.imul(n,eA)|0)+Math.imul(a,tA)|0,E=E+Math.imul(a,eA)|0;var lA=(e+(g=g+Math.imul(s,sA)|0)|0)+((8191&(I=(I=I+Math.imul(s,rA)|0)+Math.imul(r,sA)|0))<<13)|0;e=((E=E+Math.imul(r,rA)|0)+(I>>>13)|0)+(lA>>>26)|0,lA&=67108863,g=Math.imul(v,K),I=(I=Math.imul(v,x))+Math.imul(J,K)|0,E=Math.imul(J,x),g=g+Math.imul(k,q)|0,I=(I=I+Math.imul(k,O)|0)+Math.imul(S,q)|0,E=E+Math.imul(S,O)|0,g=g+Math.imul(p,W)|0,I=(I=I+Math.imul(p,X)|0)+Math.imul(M,W)|0,E=E+Math.imul(M,X)|0,g=g+Math.imul(Y,z)|0,I=(I=I+Math.imul(Y,_)|0)+Math.imul(L,z)|0,E=E+Math.imul(L,_)|0,g=g+Math.imul(N,$)|0,I=(I=I+Math.imul(N,AA)|0)+Math.imul(H,$)|0,E=E+Math.imul(H,AA)|0,g=g+Math.imul(d,QA)|0,I=(I=I+Math.imul(d,gA)|0)+Math.imul(l,QA)|0,E=E+Math.imul(l,gA)|0,g=g+Math.imul(f,EA)|0,I=(I=I+Math.imul(f,iA)|0)+Math.imul(w,EA)|0,E=E+Math.imul(w,iA)|0,g=g+Math.imul(y,tA)|0,I=(I=I+Math.imul(y,eA)|0)+Math.imul(D,tA)|0,E=E+Math.imul(D,eA)|0,g=g+Math.imul(n,sA)|0,I=(I=I+Math.imul(n,rA)|0)+Math.imul(a,sA)|0,E=E+Math.imul(a,rA)|0;var UA=(e+(g=g+Math.imul(s,nA)|0)|0)+((8191&(I=(I=I+Math.imul(s,aA)|0)+Math.imul(r,nA)|0))<<13)|0;e=((E=E+Math.imul(r,aA)|0)+(I>>>13)|0)+(UA>>>26)|0,UA&=67108863,g=Math.imul(v,q),I=(I=Math.imul(v,O))+Math.imul(J,q)|0,E=Math.imul(J,O),g=g+Math.imul(k,W)|0,I=(I=I+Math.imul(k,X)|0)+Math.imul(S,W)|0,E=E+Math.imul(S,X)|0,g=g+Math.imul(p,z)|0,I=(I=I+Math.imul(p,_)|0)+Math.imul(M,z)|0,E=E+Math.imul(M,_)|0,g=g+Math.imul(Y,$)|0,I=(I=I+Math.imul(Y,AA)|0)+Math.imul(L,$)|0,E=E+Math.imul(L,AA)|0,g=g+Math.imul(N,QA)|0,I=(I=I+Math.imul(N,gA)|0)+Math.imul(H,QA)|0,E=E+Math.imul(H,gA)|0,g=g+Math.imul(d,EA)|0,I=(I=I+Math.imul(d,iA)|0)+Math.imul(l,EA)|0,E=E+Math.imul(l,iA)|0,g=g+Math.imul(f,tA)|0,I=(I=I+Math.imul(f,eA)|0)+Math.imul(w,tA)|0,E=E+Math.imul(w,eA)|0,g=g+Math.imul(y,sA)|0,I=(I=I+Math.imul(y,rA)|0)+Math.imul(D,sA)|0,E=E+Math.imul(D,rA)|0;var NA=(e+(g=g+Math.imul(n,nA)|0)|0)+((8191&(I=(I=I+Math.imul(n,aA)|0)+Math.imul(a,nA)|0))<<13)|0;e=((E=E+Math.imul(a,aA)|0)+(I>>>13)|0)+(NA>>>26)|0,NA&=67108863,g=Math.imul(v,W),I=(I=Math.imul(v,X))+Math.imul(J,W)|0,E=Math.imul(J,X),g=g+Math.imul(k,z)|0,I=(I=I+Math.imul(k,_)|0)+Math.imul(S,z)|0,E=E+Math.imul(S,_)|0,g=g+Math.imul(p,$)|0,I=(I=I+Math.imul(p,AA)|0)+Math.imul(M,$)|0,E=E+Math.imul(M,AA)|0,g=g+Math.imul(Y,QA)|0,I=(I=I+Math.imul(Y,gA)|0)+Math.imul(L,QA)|0,E=E+Math.imul(L,gA)|0,g=g+Math.imul(N,EA)|0,I=(I=I+Math.imul(N,iA)|0)+Math.imul(H,EA)|0,E=E+Math.imul(H,iA)|0,g=g+Math.imul(d,tA)|0,I=(I=I+Math.imul(d,eA)|0)+Math.imul(l,tA)|0,E=E+Math.imul(l,eA)|0,g=g+Math.imul(f,sA)|0,I=(I=I+Math.imul(f,rA)|0)+Math.imul(w,sA)|0,E=E+Math.imul(w,rA)|0;var HA=(e+(g=g+Math.imul(y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(y,aA)|0)+Math.imul(D,nA)|0))<<13)|0;e=((E=E+Math.imul(D,aA)|0)+(I>>>13)|0)+(HA>>>26)|0,HA&=67108863,g=Math.imul(v,z),I=(I=Math.imul(v,_))+Math.imul(J,z)|0,E=Math.imul(J,_),g=g+Math.imul(k,$)|0,I=(I=I+Math.imul(k,AA)|0)+Math.imul(S,$)|0,E=E+Math.imul(S,AA)|0,g=g+Math.imul(p,QA)|0,I=(I=I+Math.imul(p,gA)|0)+Math.imul(M,QA)|0,E=E+Math.imul(M,gA)|0,g=g+Math.imul(Y,EA)|0,I=(I=I+Math.imul(Y,iA)|0)+Math.imul(L,EA)|0,E=E+Math.imul(L,iA)|0,g=g+Math.imul(N,tA)|0,I=(I=I+Math.imul(N,eA)|0)+Math.imul(H,tA)|0,E=E+Math.imul(H,eA)|0,g=g+Math.imul(d,sA)|0,I=(I=I+Math.imul(d,rA)|0)+Math.imul(l,sA)|0,E=E+Math.imul(l,rA)|0;var GA=(e+(g=g+Math.imul(f,nA)|0)|0)+((8191&(I=(I=I+Math.imul(f,aA)|0)+Math.imul(w,nA)|0))<<13)|0;e=((E=E+Math.imul(w,aA)|0)+(I>>>13)|0)+(GA>>>26)|0,GA&=67108863,g=Math.imul(v,$),I=(I=Math.imul(v,AA))+Math.imul(J,$)|0,E=Math.imul(J,AA),g=g+Math.imul(k,QA)|0,I=(I=I+Math.imul(k,gA)|0)+Math.imul(S,QA)|0,E=E+Math.imul(S,gA)|0,g=g+Math.imul(p,EA)|0,I=(I=I+Math.imul(p,iA)|0)+Math.imul(M,EA)|0,E=E+Math.imul(M,iA)|0,g=g+Math.imul(Y,tA)|0,I=(I=I+Math.imul(Y,eA)|0)+Math.imul(L,tA)|0,E=E+Math.imul(L,eA)|0,g=g+Math.imul(N,sA)|0,I=(I=I+Math.imul(N,rA)|0)+Math.imul(H,sA)|0,E=E+Math.imul(H,rA)|0;var YA=(e+(g=g+Math.imul(d,nA)|0)|0)+((8191&(I=(I=I+Math.imul(d,aA)|0)+Math.imul(l,nA)|0))<<13)|0;e=((E=E+Math.imul(l,aA)|0)+(I>>>13)|0)+(YA>>>26)|0,YA&=67108863,g=Math.imul(v,QA),I=(I=Math.imul(v,gA))+Math.imul(J,QA)|0,E=Math.imul(J,gA),g=g+Math.imul(k,EA)|0,I=(I=I+Math.imul(k,iA)|0)+Math.imul(S,EA)|0,E=E+Math.imul(S,iA)|0,g=g+Math.imul(p,tA)|0,I=(I=I+Math.imul(p,eA)|0)+Math.imul(M,tA)|0,E=E+Math.imul(M,eA)|0,g=g+Math.imul(Y,sA)|0,I=(I=I+Math.imul(Y,rA)|0)+Math.imul(L,sA)|0,E=E+Math.imul(L,rA)|0;var LA=(e+(g=g+Math.imul(N,nA)|0)|0)+((8191&(I=(I=I+Math.imul(N,aA)|0)+Math.imul(H,nA)|0))<<13)|0;e=((E=E+Math.imul(H,aA)|0)+(I>>>13)|0)+(LA>>>26)|0,LA&=67108863,g=Math.imul(v,EA),I=(I=Math.imul(v,iA))+Math.imul(J,EA)|0,E=Math.imul(J,iA),g=g+Math.imul(k,tA)|0,I=(I=I+Math.imul(k,eA)|0)+Math.imul(S,tA)|0,E=E+Math.imul(S,eA)|0,g=g+Math.imul(p,sA)|0,I=(I=I+Math.imul(p,rA)|0)+Math.imul(M,sA)|0,E=E+Math.imul(M,rA)|0;var RA=(e+(g=g+Math.imul(Y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(Y,aA)|0)+Math.imul(L,nA)|0))<<13)|0;e=((E=E+Math.imul(L,aA)|0)+(I>>>13)|0)+(RA>>>26)|0,RA&=67108863,g=Math.imul(v,tA),I=(I=Math.imul(v,eA))+Math.imul(J,tA)|0,E=Math.imul(J,eA),g=g+Math.imul(k,sA)|0,I=(I=I+Math.imul(k,rA)|0)+Math.imul(S,sA)|0,E=E+Math.imul(S,rA)|0;var pA=(e+(g=g+Math.imul(p,nA)|0)|0)+((8191&(I=(I=I+Math.imul(p,aA)|0)+Math.imul(M,nA)|0))<<13)|0;e=((E=E+Math.imul(M,aA)|0)+(I>>>13)|0)+(pA>>>26)|0,pA&=67108863,g=Math.imul(v,sA),I=(I=Math.imul(v,rA))+Math.imul(J,sA)|0,E=Math.imul(J,rA);var MA=(e+(g=g+Math.imul(k,nA)|0)|0)+((8191&(I=(I=I+Math.imul(k,aA)|0)+Math.imul(S,nA)|0))<<13)|0;e=((E=E+Math.imul(S,aA)|0)+(I>>>13)|0)+(MA>>>26)|0,MA&=67108863;var mA=(e+(g=Math.imul(v,nA))|0)+((8191&(I=(I=Math.imul(v,aA))+Math.imul(J,nA)|0))<<13)|0;return e=((E=Math.imul(J,aA))+(I>>>13)|0)+(mA>>>26)|0,mA&=67108863,t[0]=cA,t[1]=yA,t[2]=DA,t[3]=uA,t[4]=fA,t[5]=wA,t[6]=FA,t[7]=dA,t[8]=lA,t[9]=UA,t[10]=NA,t[11]=HA,t[12]=GA,t[13]=YA,t[14]=LA,t[15]=RA,t[16]=pA,t[17]=MA,t[18]=mA,0!==e&&(t[19]=e,Q.length++),Q};function n(A,B,Q){return(new a).mulp(A,B,Q)}function a(A,B){this.x=A,this.y=B}Math.imul||(h=r),E.prototype.mulTo=function(A,B){var Q=this.length+A.length;return 10===this.length&&10===A.length?h(this,A,B):Q<63?r(this,A,B):Q<1024?function(A,B,Q){Q.negative=B.negative^A.negative,Q.length=A.length+B.length;for(var g=0,I=0,E=0;E>>26)|0)>>>26,i&=67108863}Q.words[E]=C,g=i,i=I}return 0!==g?Q.words[E]=g:Q.length--,Q.strip()}(this,A,B):n(this,A,B)},a.prototype.makeRBT=function(A){for(var B=new Array(A),Q=E.prototype._countBits(A)-1,g=0;g>=1;return g},a.prototype.permute=function(A,B,Q,g,I,E){for(var i=0;i>>=1)I++;return 1<>>=13,Q[2*i+1]=8191&E,E>>>=13;for(i=2*B;i>=26,B+=I/67108864|0,B+=E>>>26,this.words[Q]=67108863&E}return 0!==B&&(this.words[Q]=B,this.length++),this},E.prototype.muln=function(A){return this.clone().imuln(A)},E.prototype.sqr=function(){return this.mul(this)},E.prototype.isqr=function(){return this.imul(this.clone())},E.prototype.pow=function(A){var B=function(A){for(var B=new Array(A.bitLength()),Q=0;Q>>I}return B}(A);if(0===B.length)return new E(1);for(var Q=this,g=0;g=0);var B,Q=A%26,I=(A-Q)/26,E=67108863>>>26-Q<<26-Q;if(0!==Q){var i=0;for(B=0;B>>26-Q}i&&(this.words[B]=i,this.length++)}if(0!==I){for(B=this.length-1;B>=0;B--)this.words[B+I]=this.words[B];for(B=0;B=0),I=B?(B-B%26)/26:0;var E=A%26,i=Math.min((A-E)/26,this.length),C=67108863^67108863>>>E<i)for(this.length-=i,e=0;e=0&&(0!==o||e>=I);e--){var s=0|this.words[e];this.words[e]=o<<26-E|s>>>E,o=s&C}return t&&0!==o&&(t.words[t.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},E.prototype.ishrn=function(A,B,Q){return g(0===this.negative),this.iushrn(A,B,Q)},E.prototype.shln=function(A){return this.clone().ishln(A)},E.prototype.ushln=function(A){return this.clone().iushln(A)},E.prototype.shrn=function(A){return this.clone().ishrn(A)},E.prototype.ushrn=function(A){return this.clone().iushrn(A)},E.prototype.testn=function(A){g("number"==typeof A&&A>=0);var B=A%26,Q=(A-B)/26,I=1<=0);var B=A%26,Q=(A-B)/26;if(g(0===this.negative,"imaskn works only with positive numbers"),this.length<=Q)return this;if(0!==B&&Q++,this.length=Math.min(Q,this.length),0!==B){var I=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},E.prototype.isubn=function(A){if(g("number"==typeof A),g(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(t/67108864|0),this.words[I+Q]=67108863&E}for(;I>26,this.words[I+Q]=67108863&E;if(0===C)return this.strip();for(g(-1===C),C=0,I=0;I>26,this.words[I]=67108863&E;return this.negative=1,this.strip()},E.prototype._wordDiv=function(A,B){var Q=(this.length,A.length),g=this.clone(),I=A,i=0|I.words[I.length-1];0!==(Q=26-this._countBits(i))&&(I=I.ushln(Q),g.iushln(Q),i=0|I.words[I.length-1]);var C,t=g.length-I.length;if("mod"!==B){(C=new E(null)).length=t+1,C.words=new Array(C.length);for(var e=0;e=0;s--){var r=67108864*(0|g.words[I.length+s])+(0|g.words[I.length+s-1]);for(r=Math.min(r/i|0,67108863),g._ishlnsubmul(I,r,s);0!==g.negative;)r--,g.negative=0,g._ishlnsubmul(I,1,s),g.isZero()||(g.negative^=1);C&&(C.words[s]=r)}return C&&C.strip(),g.strip(),"div"!==B&&0!==Q&&g.iushrn(Q),{div:C||null,mod:g}},E.prototype.divmod=function(A,B,Q){return g(!A.isZero()),this.isZero()?{div:new E(0),mod:new E(0)}:0!==this.negative&&0===A.negative?(C=this.neg().divmod(A,B),"mod"!==B&&(I=C.div.neg()),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.iadd(A)),{div:I,mod:i}):0===this.negative&&0!==A.negative?(C=this.divmod(A.neg(),B),"mod"!==B&&(I=C.div.neg()),{div:I,mod:C.mod}):0!=(this.negative&A.negative)?(C=this.neg().divmod(A.neg(),B),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.isub(A)),{div:C.div,mod:i}):A.length>this.length||this.cmp(A)<0?{div:new E(0),mod:this}:1===A.length?"div"===B?{div:this.divn(A.words[0]),mod:null}:"mod"===B?{div:null,mod:new E(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new E(this.modn(A.words[0]))}:this._wordDiv(A,B);var I,i,C},E.prototype.div=function(A){return this.divmod(A,"div",!1).div},E.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},E.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},E.prototype.divRound=function(A){var B=this.divmod(A);if(B.mod.isZero())return B.div;var Q=0!==B.div.negative?B.mod.isub(A):B.mod,g=A.ushrn(1),I=A.andln(1),E=Q.cmp(g);return E<0||1===I&&0===E?B.div:0!==B.div.negative?B.div.isubn(1):B.div.iaddn(1)},E.prototype.modn=function(A){g(A<=67108863);for(var B=(1<<26)%A,Q=0,I=this.length-1;I>=0;I--)Q=(B*Q+(0|this.words[I]))%A;return Q},E.prototype.idivn=function(A){g(A<=67108863);for(var B=0,Q=this.length-1;Q>=0;Q--){var I=(0|this.words[Q])+67108864*B;this.words[Q]=I/A|0,B=I%A}return this.strip()},E.prototype.divn=function(A){return this.clone().idivn(A)},E.prototype.egcd=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I=new E(1),i=new E(0),C=new E(0),t=new E(1),e=0;B.isEven()&&Q.isEven();)B.iushrn(1),Q.iushrn(1),++e;for(var o=Q.clone(),s=B.clone();!B.isZero();){for(var r=0,h=1;0==(B.words[0]&h)&&r<26;++r,h<<=1);if(r>0)for(B.iushrn(r);r-- >0;)(I.isOdd()||i.isOdd())&&(I.iadd(o),i.isub(s)),I.iushrn(1),i.iushrn(1);for(var n=0,a=1;0==(Q.words[0]&a)&&n<26;++n,a<<=1);if(n>0)for(Q.iushrn(n);n-- >0;)(C.isOdd()||t.isOdd())&&(C.iadd(o),t.isub(s)),C.iushrn(1),t.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),I.isub(C),i.isub(t)):(Q.isub(B),C.isub(I),t.isub(i))}return{a:C,b:t,gcd:Q.iushln(e)}},E.prototype._invmp=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I,i=new E(1),C=new E(0),t=Q.clone();B.cmpn(1)>0&&Q.cmpn(1)>0;){for(var e=0,o=1;0==(B.words[0]&o)&&e<26;++e,o<<=1);if(e>0)for(B.iushrn(e);e-- >0;)i.isOdd()&&i.iadd(t),i.iushrn(1);for(var s=0,r=1;0==(Q.words[0]&r)&&s<26;++s,r<<=1);if(s>0)for(Q.iushrn(s);s-- >0;)C.isOdd()&&C.iadd(t),C.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),i.isub(C)):(Q.isub(B),C.isub(i))}return(I=0===B.cmpn(1)?i:C).cmpn(0)<0&&I.iadd(A),I},E.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var B=this.clone(),Q=A.clone();B.negative=0,Q.negative=0;for(var g=0;B.isEven()&&Q.isEven();g++)B.iushrn(1),Q.iushrn(1);for(;;){for(;B.isEven();)B.iushrn(1);for(;Q.isEven();)Q.iushrn(1);var I=B.cmp(Q);if(I<0){var E=B;B=Q,Q=E}else if(0===I||0===Q.cmpn(1))break;B.isub(Q)}return Q.iushln(g)},E.prototype.invm=function(A){return this.egcd(A).a.umod(A)},E.prototype.isEven=function(){return 0==(1&this.words[0])},E.prototype.isOdd=function(){return 1==(1&this.words[0])},E.prototype.andln=function(A){return this.words[0]&A},E.prototype.bincn=function(A){g("number"==typeof A);var B=A%26,Q=(A-B)/26,I=1<>>26,C&=67108863,this.words[i]=C}return 0!==E&&(this.words[i]=E,this.length++),this},E.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},E.prototype.cmpn=function(A){var B,Q=A<0;if(0!==this.negative&&!Q)return-1;if(0===this.negative&&Q)return 1;if(this.strip(),this.length>1)B=1;else{Q&&(A=-A),g(A<=67108863,"Number is too big");var I=0|this.words[0];B=I===A?0:IA.length)return 1;if(this.length=0;Q--){var g=0|this.words[Q],I=0|A.words[Q];if(g!==I){gI&&(B=1);break}}return B},E.prototype.gtn=function(A){return 1===this.cmpn(A)},E.prototype.gt=function(A){return 1===this.cmp(A)},E.prototype.gten=function(A){return this.cmpn(A)>=0},E.prototype.gte=function(A){return this.cmp(A)>=0},E.prototype.ltn=function(A){return-1===this.cmpn(A)},E.prototype.lt=function(A){return-1===this.cmp(A)},E.prototype.lten=function(A){return this.cmpn(A)<=0},E.prototype.lte=function(A){return this.cmp(A)<=0},E.prototype.eqn=function(A){return 0===this.cmpn(A)},E.prototype.eq=function(A){return 0===this.cmp(A)},E.red=function(A){return new F(A)},E.prototype.toRed=function(A){return g(!this.red,"Already a number in reduction context"),g(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},E.prototype.fromRed=function(){return g(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},E.prototype._forceRed=function(A){return this.red=A,this},E.prototype.forceRed=function(A){return g(!this.red,"Already a number in reduction context"),this._forceRed(A)},E.prototype.redAdd=function(A){return g(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},E.prototype.redIAdd=function(A){return g(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},E.prototype.redSub=function(A){return g(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},E.prototype.redISub=function(A){return g(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},E.prototype.redShl=function(A){return g(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},E.prototype.redMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},E.prototype.redIMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},E.prototype.redSqr=function(){return g(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},E.prototype.redISqr=function(){return g(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},E.prototype.redSqrt=function(){return g(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},E.prototype.redInvm=function(){return g(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},E.prototype.redNeg=function(){return g(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},E.prototype.redPow=function(A){return g(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var c={k256:null,p224:null,p192:null,p25519:null};function y(A,B){this.name=A,this.p=new E(B,16),this.n=this.p.bitLength(),this.k=new E(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function D(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function u(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function f(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function F(A){if("string"==typeof A){var B=E._prime(A);this.m=B.p,this.prime=B}else g(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function d(A){F.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new E(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)}y.prototype._tmp=function(){var A=new E(null);return A.words=new Array(Math.ceil(this.n/13)),A},y.prototype.ireduce=function(A){var B,Q=A;do{this.split(Q,this.tmp),B=(Q=(Q=this.imulK(Q)).iadd(this.tmp)).bitLength()}while(B>this.n);var g=B0?Q.isub(this.p):Q.strip(),Q},y.prototype.split=function(A,B){A.iushrn(this.n,0,B)},y.prototype.imulK=function(A){return A.imul(this.k)},I(D,y),D.prototype.split=function(A,B){for(var Q=Math.min(A.length,9),g=0;g>>22,I=E}I>>>=22,A.words[g-10]=I,0===I&&A.length>10?A.length-=10:A.length-=9},D.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var B=0,Q=0;Q>>=26,A.words[Q]=I,B=g}return 0!==B&&(A.words[A.length++]=B),A},E._prime=function(A){if(c[A])return c[A];var B;if("k256"===A)B=new D;else if("p224"===A)B=new u;else if("p192"===A)B=new f;else{if("p25519"!==A)throw new Error("Unknown prime "+A);B=new w}return c[A]=B,B},F.prototype._verify1=function(A){g(0===A.negative,"red works only with positives"),g(A.red,"red works only with red numbers")},F.prototype._verify2=function(A,B){g(0==(A.negative|B.negative),"red works only with positives"),g(A.red&&A.red===B.red,"red works only with red numbers")},F.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},F.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},F.prototype.add=function(A,B){this._verify2(A,B);var Q=A.add(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q._forceRed(this)},F.prototype.iadd=function(A,B){this._verify2(A,B);var Q=A.iadd(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q},F.prototype.sub=function(A,B){this._verify2(A,B);var Q=A.sub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q._forceRed(this)},F.prototype.isub=function(A,B){this._verify2(A,B);var Q=A.isub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q},F.prototype.shl=function(A,B){return this._verify1(A),this.imod(A.ushln(B))},F.prototype.imul=function(A,B){return this._verify2(A,B),this.imod(A.imul(B))},F.prototype.mul=function(A,B){return this._verify2(A,B),this.imod(A.mul(B))},F.prototype.isqr=function(A){return this.imul(A,A.clone())},F.prototype.sqr=function(A){return this.mul(A,A)},F.prototype.sqrt=function(A){if(A.isZero())return A.clone();var B=this.m.andln(3);if(g(B%2==1),3===B){var Q=this.m.add(new E(1)).iushrn(2);return this.pow(A,Q)}for(var I=this.m.subn(1),i=0;!I.isZero()&&0===I.andln(1);)i++,I.iushrn(1);g(!I.isZero());var C=new E(1).toRed(this),t=C.redNeg(),e=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new E(2*o*o).toRed(this);0!==this.pow(o,e).cmp(t);)o.redIAdd(t);for(var s=this.pow(o,I),r=this.pow(A,I.addn(1).iushrn(1)),h=this.pow(A,I),n=i;0!==h.cmp(C);){for(var a=h,c=0;0!==a.cmp(C);c++)a=a.redSqr();g(c=0;g--){for(var e=B.words[g],o=t-1;o>=0;o--){var s=e>>o&1;I!==Q[0]&&(I=this.sqr(I)),0!==s||0!==i?(i<<=1,i|=s,(4===++C||0===g&&0===o)&&(I=this.mul(I,Q[i]),C=0,i=0)):C=0}t=26}return I},F.prototype.convertTo=function(A){var B=A.umod(this.m);return B===A?B.clone():B},F.prototype.convertFrom=function(A){var B=A.clone();return B.red=null,B},E.mont=function(A){return new d(A)},I(d,F),d.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},d.prototype.convertFrom=function(A){var B=this.imod(A.mul(this.rinv));return B.red=null,B},d.prototype.imul=function(A,B){if(A.isZero()||B.isZero())return A.words[0]=0,A.length=1,A;var Q=A.imul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),E=I;return I.cmp(this.m)>=0?E=I.isub(this.m):I.cmpn(0)<0&&(E=I.iadd(this.m)),E._forceRed(this)},d.prototype.mul=function(A,B){if(A.isZero()||B.isZero())return new E(0)._forceRed(this);var Q=A.mul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),i=I;return I.cmp(this.m)>=0?i=I.isub(this.m):I.cmpn(0)<0&&(i=I.iadd(this.m)),i._forceRed(this)},d.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A,this)}).call(this,Q(10)(A))},function(A,B){},function(A,B){},function(A){A.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(A,B,Q){(function(B){var g=Q(78),I=new(Q(79)),E=new g(24),i=new g(11),C=new g(10),t=new g(3),e=new g(7),o=Q(77),s=Q(14);function r(A,Q){return Q=Q||"utf8",B.isBuffer(A)||(A=new B(A,Q)),this._pub=new g(A),this}function h(A,Q){return Q=Q||"utf8",B.isBuffer(A)||(A=new B(A,Q)),this._priv=new g(A),this}A.exports=a;var n={};function a(A,B,Q){this.setGenerator(B),this.__prime=new g(A),this._prime=g.mont(this.__prime),this._primeLen=A.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,Q?(this.setPublicKey=r,this.setPrivateKey=h):this._primeCode=8}function c(A,Q){var g=new B(A.toArray());return Q?g.toString(Q):g}Object.defineProperty(a.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(A,B){var Q=B.toString("hex"),g=[Q,A.toString(16)].join("_");if(g in n)return n[g];var s,r=0;if(A.isEven()||!o.simpleSieve||!o.fermatTest(A)||!I.test(A))return r+=1,r+="02"===Q||"05"===Q?8:4,n[g]=r,r;switch(I.test(A.shrn(1))||(r+=2),Q){case"02":A.mod(E).cmp(i)&&(r+=8);break;case"05":(s=A.mod(C)).cmp(t)&&s.cmp(e)&&(r+=8);break;default:r+=4}return n[g]=r,r}(this.__prime,this.__gen)),this._primeCode}}),a.prototype.generateKeys=function(){return this._priv||(this._priv=new g(s(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},a.prototype.computeSecret=function(A){var Q=(A=(A=new g(A)).toRed(this._prime)).redPow(this._priv).fromRed(),I=new B(Q.toArray()),E=this.getPrime();if(I.length0?this.tail.next=B:this.head=B,this.tail=B,++this.length}},{key:"unshift",value:function(A){var B={data:A,next:this.head};0===this.length&&(this.tail=B),this.head=B,++this.length}},{key:"shift",value:function(){if(0!==this.length){var A=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,A}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(A){if(0===this.length)return"";for(var B=this.head,Q=""+B.data;B=B.next;)Q+=A+B.data;return Q}},{key:"concat",value:function(A){if(0===this.length)return i.alloc(0);for(var B,Q,g,I=i.allocUnsafe(A>>>0),E=this.head,C=0;E;)B=E.data,Q=I,g=C,i.prototype.copy.call(B,Q,g),C+=E.data.length,E=E.next;return I}},{key:"consume",value:function(A,B){var Q;return AI.length?I.length:A;if(E===I.length?g+=I:g+=I.slice(0,A),0==(A-=E)){E===I.length?(++Q,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=I.slice(E));break}++Q}return this.length-=Q,g}},{key:"_getBuffer",value:function(A){var B=i.allocUnsafe(A),Q=this.head,g=1;for(Q.data.copy(B),A-=Q.data.length;Q=Q.next;){var I=Q.data,E=A>I.length?I.length:A;if(I.copy(B,B.length-A,0,E),0==(A-=E)){E===I.length?(++g,Q.next?this.head=Q.next:this.head=this.tail=null):(this.head=Q,Q.data=I.slice(E));break}++g}return this.length-=g,B}},{key:t,value:function(A,B){return C(this,function(A){for(var B=1;B0,(function(A){g||(g=A),A&&i.forEach(e),E||(i.forEach(e),I(g))}))}));return B.reduce(o)}},function(A,B,Q){var g=Q(2).Buffer,I=Q(63),E=Q(43),i=Q(44).ec,C=Q(91),t=Q(30),e=Q(96);function o(A,B,Q,E){if((A=g.from(A.toArray())).length0&&Q.ishrn(g),Q}function r(A,B,Q){var E,i;do{for(E=g.alloc(0);8*E.length=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return g}function t(A,B,Q,g){for(var I=0,E=Math.min(A.length,Q),i=B;i=49?C-49+10:C>=17?C-17+10:C}return I}E.isBN=function(A){return A instanceof E||null!==A&&"object"==typeof A&&A.constructor.wordSize===E.wordSize&&Array.isArray(A.words)},E.max=function(A,B){return A.cmp(B)>0?A:B},E.min=function(A,B){return A.cmp(B)<0?A:B},E.prototype._init=function(A,B,Q){if("number"==typeof A)return this._initNumber(A,B,Q);if("object"==typeof A)return this._initArray(A,B,Q);"hex"===B&&(B=16),g(B===(0|B)&&B>=2&&B<=36);var I=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&I++,16===B?this._parseHex(A,I):this._parseBase(A,B,I),"-"===A[0]&&(this.negative=1),this.strip(),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initNumber=function(A,B,Q){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[67108863&A],this.length=1):A<4503599627370496?(this.words=[67108863&A,A/67108864&67108863],this.length=2):(g(A<9007199254740992),this.words=[67108863&A,A/67108864&67108863,1],this.length=3),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initArray=function(A,B,Q){if(g("number"==typeof A.length),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var I=0;I=0;I-=3)i=A[I]|A[I-1]<<8|A[I-2]<<16,this.words[E]|=i<>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);else if("le"===Q)for(I=0,E=0;I>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);return this.strip()},E.prototype._parseHex=function(A,B){this.length=Math.ceil((A.length-B)/6),this.words=new Array(this.length);for(var Q=0;Q=B;Q-=6)I=C(A,Q,Q+6),this.words[g]|=I<>>26-E&4194303,(E+=24)>=26&&(E-=26,g++);Q+6!==B&&(I=C(A,B,Q+6),this.words[g]|=I<>>26-E&4194303),this.strip()},E.prototype._parseBase=function(A,B,Q){this.words=[0],this.length=1;for(var g=0,I=1;I<=67108863;I*=B)g++;g--,I=I/B|0;for(var E=A.length-Q,i=E%g,C=Math.min(E,E-i)+Q,e=0,o=Q;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},E.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},E.prototype.inspect=function(){return(this.red?""};var e=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],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],s=[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 r(A,B,Q){Q.negative=B.negative^A.negative;var g=A.length+B.length|0;Q.length=g,g=g-1|0;var I=0|A.words[0],E=0|B.words[0],i=I*E,C=67108863&i,t=i/67108864|0;Q.words[0]=C;for(var e=1;e>>26,s=67108863&t,r=Math.min(e,B.length-1),h=Math.max(0,e-A.length+1);h<=r;h++){var n=e-h|0;o+=(i=(I=0|A.words[n])*(E=0|B.words[h])+s)/67108864|0,s=67108863&i}Q.words[e]=0|s,t=0|o}return 0!==t?Q.words[e]=0|t:Q.length--,Q.strip()}E.prototype.toString=function(A,B){var Q;if(B=0|B||1,16===(A=A||10)||"hex"===A){Q="";for(var I=0,E=0,i=0;i>>24-I&16777215)||i!==this.length-1?e[6-t.length]+t+Q:t+Q,(I+=2)>=26&&(I-=26,i--)}for(0!==E&&(Q=E.toString(16)+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}if(A===(0|A)&&A>=2&&A<=36){var r=o[A],h=s[A];Q="";var n=this.clone();for(n.negative=0;!n.isZero();){var a=n.modn(h).toString(A);Q=(n=n.idivn(h)).isZero()?a+Q:e[r-a.length]+a+Q}for(this.isZero()&&(Q="0"+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}g(!1,"Base should be between 2 and 36")},E.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&g(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},E.prototype.toJSON=function(){return this.toString(16)},E.prototype.toBuffer=function(A,B){return g(void 0!==i),this.toArrayLike(i,A,B)},E.prototype.toArray=function(A,B){return this.toArrayLike(Array,A,B)},E.prototype.toArrayLike=function(A,B,Q){var I=this.byteLength(),E=Q||Math.max(1,I);g(I<=E,"byte array longer than desired length"),g(E>0,"Requested array length <= 0"),this.strip();var i,C,t="le"===B,e=new A(E),o=this.clone();if(t){for(C=0;!o.isZero();C++)i=o.andln(255),o.iushrn(8),e[C]=i;for(;C=4096&&(Q+=13,B>>>=13),B>=64&&(Q+=7,B>>>=7),B>=8&&(Q+=4,B>>>=4),B>=2&&(Q+=2,B>>>=2),Q+B},E.prototype._zeroBits=function(A){if(0===A)return 26;var B=A,Q=0;return 0==(8191&B)&&(Q+=13,B>>>=13),0==(127&B)&&(Q+=7,B>>>=7),0==(15&B)&&(Q+=4,B>>>=4),0==(3&B)&&(Q+=2,B>>>=2),0==(1&B)&&Q++,Q},E.prototype.bitLength=function(){var A=this.words[this.length-1],B=this._countBits(A);return 26*(this.length-1)+B},E.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,B=0;BA.length?this.clone().ior(A):A.clone().ior(this)},E.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},E.prototype.iuand=function(A){var B;B=this.length>A.length?A:this;for(var Q=0;QA.length?this.clone().iand(A):A.clone().iand(this)},E.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},E.prototype.iuxor=function(A){var B,Q;this.length>A.length?(B=this,Q=A):(B=A,Q=this);for(var g=0;gA.length?this.clone().ixor(A):A.clone().ixor(this)},E.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},E.prototype.inotn=function(A){g("number"==typeof A&&A>=0);var B=0|Math.ceil(A/26),Q=A%26;this._expand(B),Q>0&&B--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-Q),this.strip()},E.prototype.notn=function(A){return this.clone().inotn(A)},E.prototype.setn=function(A,B){g("number"==typeof A&&A>=0);var Q=A/26|0,I=A%26;return this._expand(Q+1),this.words[Q]=B?this.words[Q]|1<A.length?(Q=this,g=A):(Q=A,g=this);for(var I=0,E=0;E>>26;for(;0!==I&&E>>26;if(this.length=Q.length,0!==I)this.words[this.length]=I,this.length++;else if(Q!==this)for(;EA.length?this.clone().iadd(A):A.clone().iadd(this)},E.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var B=this.iadd(A);return A.negative=1,B._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var Q,g,I=this.cmp(A);if(0===I)return this.negative=0,this.length=1,this.words[0]=0,this;I>0?(Q=this,g=A):(Q=A,g=this);for(var E=0,i=0;i>26,this.words[i]=67108863&B;for(;0!==E&&i>26,this.words[i]=67108863&B;if(0===E&&i>>13,h=0|i[1],n=8191&h,a=h>>>13,c=0|i[2],y=8191&c,D=c>>>13,u=0|i[3],f=8191&u,w=u>>>13,F=0|i[4],d=8191&F,l=F>>>13,U=0|i[5],N=8191&U,H=U>>>13,G=0|i[6],Y=8191&G,L=G>>>13,R=0|i[7],p=8191&R,M=R>>>13,m=0|i[8],k=8191&m,S=m>>>13,b=0|i[9],v=8191&b,J=b>>>13,V=0|C[0],K=8191&V,x=V>>>13,Z=0|C[1],q=8191&Z,O=Z>>>13,j=0|C[2],W=8191&j,X=j>>>13,T=0|C[3],z=8191&T,_=T>>>13,P=0|C[4],$=8191&P,AA=P>>>13,BA=0|C[5],QA=8191&BA,gA=BA>>>13,IA=0|C[6],EA=8191&IA,iA=IA>>>13,CA=0|C[7],tA=8191&CA,eA=CA>>>13,oA=0|C[8],sA=8191&oA,rA=oA>>>13,hA=0|C[9],nA=8191&hA,aA=hA>>>13;Q.negative=A.negative^B.negative,Q.length=19;var cA=(e+(g=Math.imul(s,K))|0)+((8191&(I=(I=Math.imul(s,x))+Math.imul(r,K)|0))<<13)|0;e=((E=Math.imul(r,x))+(I>>>13)|0)+(cA>>>26)|0,cA&=67108863,g=Math.imul(n,K),I=(I=Math.imul(n,x))+Math.imul(a,K)|0,E=Math.imul(a,x);var yA=(e+(g=g+Math.imul(s,q)|0)|0)+((8191&(I=(I=I+Math.imul(s,O)|0)+Math.imul(r,q)|0))<<13)|0;e=((E=E+Math.imul(r,O)|0)+(I>>>13)|0)+(yA>>>26)|0,yA&=67108863,g=Math.imul(y,K),I=(I=Math.imul(y,x))+Math.imul(D,K)|0,E=Math.imul(D,x),g=g+Math.imul(n,q)|0,I=(I=I+Math.imul(n,O)|0)+Math.imul(a,q)|0,E=E+Math.imul(a,O)|0;var DA=(e+(g=g+Math.imul(s,W)|0)|0)+((8191&(I=(I=I+Math.imul(s,X)|0)+Math.imul(r,W)|0))<<13)|0;e=((E=E+Math.imul(r,X)|0)+(I>>>13)|0)+(DA>>>26)|0,DA&=67108863,g=Math.imul(f,K),I=(I=Math.imul(f,x))+Math.imul(w,K)|0,E=Math.imul(w,x),g=g+Math.imul(y,q)|0,I=(I=I+Math.imul(y,O)|0)+Math.imul(D,q)|0,E=E+Math.imul(D,O)|0,g=g+Math.imul(n,W)|0,I=(I=I+Math.imul(n,X)|0)+Math.imul(a,W)|0,E=E+Math.imul(a,X)|0;var uA=(e+(g=g+Math.imul(s,z)|0)|0)+((8191&(I=(I=I+Math.imul(s,_)|0)+Math.imul(r,z)|0))<<13)|0;e=((E=E+Math.imul(r,_)|0)+(I>>>13)|0)+(uA>>>26)|0,uA&=67108863,g=Math.imul(d,K),I=(I=Math.imul(d,x))+Math.imul(l,K)|0,E=Math.imul(l,x),g=g+Math.imul(f,q)|0,I=(I=I+Math.imul(f,O)|0)+Math.imul(w,q)|0,E=E+Math.imul(w,O)|0,g=g+Math.imul(y,W)|0,I=(I=I+Math.imul(y,X)|0)+Math.imul(D,W)|0,E=E+Math.imul(D,X)|0,g=g+Math.imul(n,z)|0,I=(I=I+Math.imul(n,_)|0)+Math.imul(a,z)|0,E=E+Math.imul(a,_)|0;var fA=(e+(g=g+Math.imul(s,$)|0)|0)+((8191&(I=(I=I+Math.imul(s,AA)|0)+Math.imul(r,$)|0))<<13)|0;e=((E=E+Math.imul(r,AA)|0)+(I>>>13)|0)+(fA>>>26)|0,fA&=67108863,g=Math.imul(N,K),I=(I=Math.imul(N,x))+Math.imul(H,K)|0,E=Math.imul(H,x),g=g+Math.imul(d,q)|0,I=(I=I+Math.imul(d,O)|0)+Math.imul(l,q)|0,E=E+Math.imul(l,O)|0,g=g+Math.imul(f,W)|0,I=(I=I+Math.imul(f,X)|0)+Math.imul(w,W)|0,E=E+Math.imul(w,X)|0,g=g+Math.imul(y,z)|0,I=(I=I+Math.imul(y,_)|0)+Math.imul(D,z)|0,E=E+Math.imul(D,_)|0,g=g+Math.imul(n,$)|0,I=(I=I+Math.imul(n,AA)|0)+Math.imul(a,$)|0,E=E+Math.imul(a,AA)|0;var wA=(e+(g=g+Math.imul(s,QA)|0)|0)+((8191&(I=(I=I+Math.imul(s,gA)|0)+Math.imul(r,QA)|0))<<13)|0;e=((E=E+Math.imul(r,gA)|0)+(I>>>13)|0)+(wA>>>26)|0,wA&=67108863,g=Math.imul(Y,K),I=(I=Math.imul(Y,x))+Math.imul(L,K)|0,E=Math.imul(L,x),g=g+Math.imul(N,q)|0,I=(I=I+Math.imul(N,O)|0)+Math.imul(H,q)|0,E=E+Math.imul(H,O)|0,g=g+Math.imul(d,W)|0,I=(I=I+Math.imul(d,X)|0)+Math.imul(l,W)|0,E=E+Math.imul(l,X)|0,g=g+Math.imul(f,z)|0,I=(I=I+Math.imul(f,_)|0)+Math.imul(w,z)|0,E=E+Math.imul(w,_)|0,g=g+Math.imul(y,$)|0,I=(I=I+Math.imul(y,AA)|0)+Math.imul(D,$)|0,E=E+Math.imul(D,AA)|0,g=g+Math.imul(n,QA)|0,I=(I=I+Math.imul(n,gA)|0)+Math.imul(a,QA)|0,E=E+Math.imul(a,gA)|0;var FA=(e+(g=g+Math.imul(s,EA)|0)|0)+((8191&(I=(I=I+Math.imul(s,iA)|0)+Math.imul(r,EA)|0))<<13)|0;e=((E=E+Math.imul(r,iA)|0)+(I>>>13)|0)+(FA>>>26)|0,FA&=67108863,g=Math.imul(p,K),I=(I=Math.imul(p,x))+Math.imul(M,K)|0,E=Math.imul(M,x),g=g+Math.imul(Y,q)|0,I=(I=I+Math.imul(Y,O)|0)+Math.imul(L,q)|0,E=E+Math.imul(L,O)|0,g=g+Math.imul(N,W)|0,I=(I=I+Math.imul(N,X)|0)+Math.imul(H,W)|0,E=E+Math.imul(H,X)|0,g=g+Math.imul(d,z)|0,I=(I=I+Math.imul(d,_)|0)+Math.imul(l,z)|0,E=E+Math.imul(l,_)|0,g=g+Math.imul(f,$)|0,I=(I=I+Math.imul(f,AA)|0)+Math.imul(w,$)|0,E=E+Math.imul(w,AA)|0,g=g+Math.imul(y,QA)|0,I=(I=I+Math.imul(y,gA)|0)+Math.imul(D,QA)|0,E=E+Math.imul(D,gA)|0,g=g+Math.imul(n,EA)|0,I=(I=I+Math.imul(n,iA)|0)+Math.imul(a,EA)|0,E=E+Math.imul(a,iA)|0;var dA=(e+(g=g+Math.imul(s,tA)|0)|0)+((8191&(I=(I=I+Math.imul(s,eA)|0)+Math.imul(r,tA)|0))<<13)|0;e=((E=E+Math.imul(r,eA)|0)+(I>>>13)|0)+(dA>>>26)|0,dA&=67108863,g=Math.imul(k,K),I=(I=Math.imul(k,x))+Math.imul(S,K)|0,E=Math.imul(S,x),g=g+Math.imul(p,q)|0,I=(I=I+Math.imul(p,O)|0)+Math.imul(M,q)|0,E=E+Math.imul(M,O)|0,g=g+Math.imul(Y,W)|0,I=(I=I+Math.imul(Y,X)|0)+Math.imul(L,W)|0,E=E+Math.imul(L,X)|0,g=g+Math.imul(N,z)|0,I=(I=I+Math.imul(N,_)|0)+Math.imul(H,z)|0,E=E+Math.imul(H,_)|0,g=g+Math.imul(d,$)|0,I=(I=I+Math.imul(d,AA)|0)+Math.imul(l,$)|0,E=E+Math.imul(l,AA)|0,g=g+Math.imul(f,QA)|0,I=(I=I+Math.imul(f,gA)|0)+Math.imul(w,QA)|0,E=E+Math.imul(w,gA)|0,g=g+Math.imul(y,EA)|0,I=(I=I+Math.imul(y,iA)|0)+Math.imul(D,EA)|0,E=E+Math.imul(D,iA)|0,g=g+Math.imul(n,tA)|0,I=(I=I+Math.imul(n,eA)|0)+Math.imul(a,tA)|0,E=E+Math.imul(a,eA)|0;var lA=(e+(g=g+Math.imul(s,sA)|0)|0)+((8191&(I=(I=I+Math.imul(s,rA)|0)+Math.imul(r,sA)|0))<<13)|0;e=((E=E+Math.imul(r,rA)|0)+(I>>>13)|0)+(lA>>>26)|0,lA&=67108863,g=Math.imul(v,K),I=(I=Math.imul(v,x))+Math.imul(J,K)|0,E=Math.imul(J,x),g=g+Math.imul(k,q)|0,I=(I=I+Math.imul(k,O)|0)+Math.imul(S,q)|0,E=E+Math.imul(S,O)|0,g=g+Math.imul(p,W)|0,I=(I=I+Math.imul(p,X)|0)+Math.imul(M,W)|0,E=E+Math.imul(M,X)|0,g=g+Math.imul(Y,z)|0,I=(I=I+Math.imul(Y,_)|0)+Math.imul(L,z)|0,E=E+Math.imul(L,_)|0,g=g+Math.imul(N,$)|0,I=(I=I+Math.imul(N,AA)|0)+Math.imul(H,$)|0,E=E+Math.imul(H,AA)|0,g=g+Math.imul(d,QA)|0,I=(I=I+Math.imul(d,gA)|0)+Math.imul(l,QA)|0,E=E+Math.imul(l,gA)|0,g=g+Math.imul(f,EA)|0,I=(I=I+Math.imul(f,iA)|0)+Math.imul(w,EA)|0,E=E+Math.imul(w,iA)|0,g=g+Math.imul(y,tA)|0,I=(I=I+Math.imul(y,eA)|0)+Math.imul(D,tA)|0,E=E+Math.imul(D,eA)|0,g=g+Math.imul(n,sA)|0,I=(I=I+Math.imul(n,rA)|0)+Math.imul(a,sA)|0,E=E+Math.imul(a,rA)|0;var UA=(e+(g=g+Math.imul(s,nA)|0)|0)+((8191&(I=(I=I+Math.imul(s,aA)|0)+Math.imul(r,nA)|0))<<13)|0;e=((E=E+Math.imul(r,aA)|0)+(I>>>13)|0)+(UA>>>26)|0,UA&=67108863,g=Math.imul(v,q),I=(I=Math.imul(v,O))+Math.imul(J,q)|0,E=Math.imul(J,O),g=g+Math.imul(k,W)|0,I=(I=I+Math.imul(k,X)|0)+Math.imul(S,W)|0,E=E+Math.imul(S,X)|0,g=g+Math.imul(p,z)|0,I=(I=I+Math.imul(p,_)|0)+Math.imul(M,z)|0,E=E+Math.imul(M,_)|0,g=g+Math.imul(Y,$)|0,I=(I=I+Math.imul(Y,AA)|0)+Math.imul(L,$)|0,E=E+Math.imul(L,AA)|0,g=g+Math.imul(N,QA)|0,I=(I=I+Math.imul(N,gA)|0)+Math.imul(H,QA)|0,E=E+Math.imul(H,gA)|0,g=g+Math.imul(d,EA)|0,I=(I=I+Math.imul(d,iA)|0)+Math.imul(l,EA)|0,E=E+Math.imul(l,iA)|0,g=g+Math.imul(f,tA)|0,I=(I=I+Math.imul(f,eA)|0)+Math.imul(w,tA)|0,E=E+Math.imul(w,eA)|0,g=g+Math.imul(y,sA)|0,I=(I=I+Math.imul(y,rA)|0)+Math.imul(D,sA)|0,E=E+Math.imul(D,rA)|0;var NA=(e+(g=g+Math.imul(n,nA)|0)|0)+((8191&(I=(I=I+Math.imul(n,aA)|0)+Math.imul(a,nA)|0))<<13)|0;e=((E=E+Math.imul(a,aA)|0)+(I>>>13)|0)+(NA>>>26)|0,NA&=67108863,g=Math.imul(v,W),I=(I=Math.imul(v,X))+Math.imul(J,W)|0,E=Math.imul(J,X),g=g+Math.imul(k,z)|0,I=(I=I+Math.imul(k,_)|0)+Math.imul(S,z)|0,E=E+Math.imul(S,_)|0,g=g+Math.imul(p,$)|0,I=(I=I+Math.imul(p,AA)|0)+Math.imul(M,$)|0,E=E+Math.imul(M,AA)|0,g=g+Math.imul(Y,QA)|0,I=(I=I+Math.imul(Y,gA)|0)+Math.imul(L,QA)|0,E=E+Math.imul(L,gA)|0,g=g+Math.imul(N,EA)|0,I=(I=I+Math.imul(N,iA)|0)+Math.imul(H,EA)|0,E=E+Math.imul(H,iA)|0,g=g+Math.imul(d,tA)|0,I=(I=I+Math.imul(d,eA)|0)+Math.imul(l,tA)|0,E=E+Math.imul(l,eA)|0,g=g+Math.imul(f,sA)|0,I=(I=I+Math.imul(f,rA)|0)+Math.imul(w,sA)|0,E=E+Math.imul(w,rA)|0;var HA=(e+(g=g+Math.imul(y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(y,aA)|0)+Math.imul(D,nA)|0))<<13)|0;e=((E=E+Math.imul(D,aA)|0)+(I>>>13)|0)+(HA>>>26)|0,HA&=67108863,g=Math.imul(v,z),I=(I=Math.imul(v,_))+Math.imul(J,z)|0,E=Math.imul(J,_),g=g+Math.imul(k,$)|0,I=(I=I+Math.imul(k,AA)|0)+Math.imul(S,$)|0,E=E+Math.imul(S,AA)|0,g=g+Math.imul(p,QA)|0,I=(I=I+Math.imul(p,gA)|0)+Math.imul(M,QA)|0,E=E+Math.imul(M,gA)|0,g=g+Math.imul(Y,EA)|0,I=(I=I+Math.imul(Y,iA)|0)+Math.imul(L,EA)|0,E=E+Math.imul(L,iA)|0,g=g+Math.imul(N,tA)|0,I=(I=I+Math.imul(N,eA)|0)+Math.imul(H,tA)|0,E=E+Math.imul(H,eA)|0,g=g+Math.imul(d,sA)|0,I=(I=I+Math.imul(d,rA)|0)+Math.imul(l,sA)|0,E=E+Math.imul(l,rA)|0;var GA=(e+(g=g+Math.imul(f,nA)|0)|0)+((8191&(I=(I=I+Math.imul(f,aA)|0)+Math.imul(w,nA)|0))<<13)|0;e=((E=E+Math.imul(w,aA)|0)+(I>>>13)|0)+(GA>>>26)|0,GA&=67108863,g=Math.imul(v,$),I=(I=Math.imul(v,AA))+Math.imul(J,$)|0,E=Math.imul(J,AA),g=g+Math.imul(k,QA)|0,I=(I=I+Math.imul(k,gA)|0)+Math.imul(S,QA)|0,E=E+Math.imul(S,gA)|0,g=g+Math.imul(p,EA)|0,I=(I=I+Math.imul(p,iA)|0)+Math.imul(M,EA)|0,E=E+Math.imul(M,iA)|0,g=g+Math.imul(Y,tA)|0,I=(I=I+Math.imul(Y,eA)|0)+Math.imul(L,tA)|0,E=E+Math.imul(L,eA)|0,g=g+Math.imul(N,sA)|0,I=(I=I+Math.imul(N,rA)|0)+Math.imul(H,sA)|0,E=E+Math.imul(H,rA)|0;var YA=(e+(g=g+Math.imul(d,nA)|0)|0)+((8191&(I=(I=I+Math.imul(d,aA)|0)+Math.imul(l,nA)|0))<<13)|0;e=((E=E+Math.imul(l,aA)|0)+(I>>>13)|0)+(YA>>>26)|0,YA&=67108863,g=Math.imul(v,QA),I=(I=Math.imul(v,gA))+Math.imul(J,QA)|0,E=Math.imul(J,gA),g=g+Math.imul(k,EA)|0,I=(I=I+Math.imul(k,iA)|0)+Math.imul(S,EA)|0,E=E+Math.imul(S,iA)|0,g=g+Math.imul(p,tA)|0,I=(I=I+Math.imul(p,eA)|0)+Math.imul(M,tA)|0,E=E+Math.imul(M,eA)|0,g=g+Math.imul(Y,sA)|0,I=(I=I+Math.imul(Y,rA)|0)+Math.imul(L,sA)|0,E=E+Math.imul(L,rA)|0;var LA=(e+(g=g+Math.imul(N,nA)|0)|0)+((8191&(I=(I=I+Math.imul(N,aA)|0)+Math.imul(H,nA)|0))<<13)|0;e=((E=E+Math.imul(H,aA)|0)+(I>>>13)|0)+(LA>>>26)|0,LA&=67108863,g=Math.imul(v,EA),I=(I=Math.imul(v,iA))+Math.imul(J,EA)|0,E=Math.imul(J,iA),g=g+Math.imul(k,tA)|0,I=(I=I+Math.imul(k,eA)|0)+Math.imul(S,tA)|0,E=E+Math.imul(S,eA)|0,g=g+Math.imul(p,sA)|0,I=(I=I+Math.imul(p,rA)|0)+Math.imul(M,sA)|0,E=E+Math.imul(M,rA)|0;var RA=(e+(g=g+Math.imul(Y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(Y,aA)|0)+Math.imul(L,nA)|0))<<13)|0;e=((E=E+Math.imul(L,aA)|0)+(I>>>13)|0)+(RA>>>26)|0,RA&=67108863,g=Math.imul(v,tA),I=(I=Math.imul(v,eA))+Math.imul(J,tA)|0,E=Math.imul(J,eA),g=g+Math.imul(k,sA)|0,I=(I=I+Math.imul(k,rA)|0)+Math.imul(S,sA)|0,E=E+Math.imul(S,rA)|0;var pA=(e+(g=g+Math.imul(p,nA)|0)|0)+((8191&(I=(I=I+Math.imul(p,aA)|0)+Math.imul(M,nA)|0))<<13)|0;e=((E=E+Math.imul(M,aA)|0)+(I>>>13)|0)+(pA>>>26)|0,pA&=67108863,g=Math.imul(v,sA),I=(I=Math.imul(v,rA))+Math.imul(J,sA)|0,E=Math.imul(J,rA);var MA=(e+(g=g+Math.imul(k,nA)|0)|0)+((8191&(I=(I=I+Math.imul(k,aA)|0)+Math.imul(S,nA)|0))<<13)|0;e=((E=E+Math.imul(S,aA)|0)+(I>>>13)|0)+(MA>>>26)|0,MA&=67108863;var mA=(e+(g=Math.imul(v,nA))|0)+((8191&(I=(I=Math.imul(v,aA))+Math.imul(J,nA)|0))<<13)|0;return e=((E=Math.imul(J,aA))+(I>>>13)|0)+(mA>>>26)|0,mA&=67108863,t[0]=cA,t[1]=yA,t[2]=DA,t[3]=uA,t[4]=fA,t[5]=wA,t[6]=FA,t[7]=dA,t[8]=lA,t[9]=UA,t[10]=NA,t[11]=HA,t[12]=GA,t[13]=YA,t[14]=LA,t[15]=RA,t[16]=pA,t[17]=MA,t[18]=mA,0!==e&&(t[19]=e,Q.length++),Q};function n(A,B,Q){return(new a).mulp(A,B,Q)}function a(A,B){this.x=A,this.y=B}Math.imul||(h=r),E.prototype.mulTo=function(A,B){var Q=this.length+A.length;return 10===this.length&&10===A.length?h(this,A,B):Q<63?r(this,A,B):Q<1024?function(A,B,Q){Q.negative=B.negative^A.negative,Q.length=A.length+B.length;for(var g=0,I=0,E=0;E>>26)|0)>>>26,i&=67108863}Q.words[E]=C,g=i,i=I}return 0!==g?Q.words[E]=g:Q.length--,Q.strip()}(this,A,B):n(this,A,B)},a.prototype.makeRBT=function(A){for(var B=new Array(A),Q=E.prototype._countBits(A)-1,g=0;g>=1;return g},a.prototype.permute=function(A,B,Q,g,I,E){for(var i=0;i>>=1)I++;return 1<>>=13,Q[2*i+1]=8191&E,E>>>=13;for(i=2*B;i>=26,B+=I/67108864|0,B+=E>>>26,this.words[Q]=67108863&E}return 0!==B&&(this.words[Q]=B,this.length++),this},E.prototype.muln=function(A){return this.clone().imuln(A)},E.prototype.sqr=function(){return this.mul(this)},E.prototype.isqr=function(){return this.imul(this.clone())},E.prototype.pow=function(A){var B=function(A){for(var B=new Array(A.bitLength()),Q=0;Q>>I}return B}(A);if(0===B.length)return new E(1);for(var Q=this,g=0;g=0);var B,Q=A%26,I=(A-Q)/26,E=67108863>>>26-Q<<26-Q;if(0!==Q){var i=0;for(B=0;B>>26-Q}i&&(this.words[B]=i,this.length++)}if(0!==I){for(B=this.length-1;B>=0;B--)this.words[B+I]=this.words[B];for(B=0;B=0),I=B?(B-B%26)/26:0;var E=A%26,i=Math.min((A-E)/26,this.length),C=67108863^67108863>>>E<i)for(this.length-=i,e=0;e=0&&(0!==o||e>=I);e--){var s=0|this.words[e];this.words[e]=o<<26-E|s>>>E,o=s&C}return t&&0!==o&&(t.words[t.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},E.prototype.ishrn=function(A,B,Q){return g(0===this.negative),this.iushrn(A,B,Q)},E.prototype.shln=function(A){return this.clone().ishln(A)},E.prototype.ushln=function(A){return this.clone().iushln(A)},E.prototype.shrn=function(A){return this.clone().ishrn(A)},E.prototype.ushrn=function(A){return this.clone().iushrn(A)},E.prototype.testn=function(A){g("number"==typeof A&&A>=0);var B=A%26,Q=(A-B)/26,I=1<=0);var B=A%26,Q=(A-B)/26;if(g(0===this.negative,"imaskn works only with positive numbers"),this.length<=Q)return this;if(0!==B&&Q++,this.length=Math.min(Q,this.length),0!==B){var I=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},E.prototype.isubn=function(A){if(g("number"==typeof A),g(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(t/67108864|0),this.words[I+Q]=67108863&E}for(;I>26,this.words[I+Q]=67108863&E;if(0===C)return this.strip();for(g(-1===C),C=0,I=0;I>26,this.words[I]=67108863&E;return this.negative=1,this.strip()},E.prototype._wordDiv=function(A,B){var Q=(this.length,A.length),g=this.clone(),I=A,i=0|I.words[I.length-1];0!==(Q=26-this._countBits(i))&&(I=I.ushln(Q),g.iushln(Q),i=0|I.words[I.length-1]);var C,t=g.length-I.length;if("mod"!==B){(C=new E(null)).length=t+1,C.words=new Array(C.length);for(var e=0;e=0;s--){var r=67108864*(0|g.words[I.length+s])+(0|g.words[I.length+s-1]);for(r=Math.min(r/i|0,67108863),g._ishlnsubmul(I,r,s);0!==g.negative;)r--,g.negative=0,g._ishlnsubmul(I,1,s),g.isZero()||(g.negative^=1);C&&(C.words[s]=r)}return C&&C.strip(),g.strip(),"div"!==B&&0!==Q&&g.iushrn(Q),{div:C||null,mod:g}},E.prototype.divmod=function(A,B,Q){return g(!A.isZero()),this.isZero()?{div:new E(0),mod:new E(0)}:0!==this.negative&&0===A.negative?(C=this.neg().divmod(A,B),"mod"!==B&&(I=C.div.neg()),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.iadd(A)),{div:I,mod:i}):0===this.negative&&0!==A.negative?(C=this.divmod(A.neg(),B),"mod"!==B&&(I=C.div.neg()),{div:I,mod:C.mod}):0!=(this.negative&A.negative)?(C=this.neg().divmod(A.neg(),B),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.isub(A)),{div:C.div,mod:i}):A.length>this.length||this.cmp(A)<0?{div:new E(0),mod:this}:1===A.length?"div"===B?{div:this.divn(A.words[0]),mod:null}:"mod"===B?{div:null,mod:new E(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new E(this.modn(A.words[0]))}:this._wordDiv(A,B);var I,i,C},E.prototype.div=function(A){return this.divmod(A,"div",!1).div},E.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},E.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},E.prototype.divRound=function(A){var B=this.divmod(A);if(B.mod.isZero())return B.div;var Q=0!==B.div.negative?B.mod.isub(A):B.mod,g=A.ushrn(1),I=A.andln(1),E=Q.cmp(g);return E<0||1===I&&0===E?B.div:0!==B.div.negative?B.div.isubn(1):B.div.iaddn(1)},E.prototype.modn=function(A){g(A<=67108863);for(var B=(1<<26)%A,Q=0,I=this.length-1;I>=0;I--)Q=(B*Q+(0|this.words[I]))%A;return Q},E.prototype.idivn=function(A){g(A<=67108863);for(var B=0,Q=this.length-1;Q>=0;Q--){var I=(0|this.words[Q])+67108864*B;this.words[Q]=I/A|0,B=I%A}return this.strip()},E.prototype.divn=function(A){return this.clone().idivn(A)},E.prototype.egcd=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I=new E(1),i=new E(0),C=new E(0),t=new E(1),e=0;B.isEven()&&Q.isEven();)B.iushrn(1),Q.iushrn(1),++e;for(var o=Q.clone(),s=B.clone();!B.isZero();){for(var r=0,h=1;0==(B.words[0]&h)&&r<26;++r,h<<=1);if(r>0)for(B.iushrn(r);r-- >0;)(I.isOdd()||i.isOdd())&&(I.iadd(o),i.isub(s)),I.iushrn(1),i.iushrn(1);for(var n=0,a=1;0==(Q.words[0]&a)&&n<26;++n,a<<=1);if(n>0)for(Q.iushrn(n);n-- >0;)(C.isOdd()||t.isOdd())&&(C.iadd(o),t.isub(s)),C.iushrn(1),t.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),I.isub(C),i.isub(t)):(Q.isub(B),C.isub(I),t.isub(i))}return{a:C,b:t,gcd:Q.iushln(e)}},E.prototype._invmp=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I,i=new E(1),C=new E(0),t=Q.clone();B.cmpn(1)>0&&Q.cmpn(1)>0;){for(var e=0,o=1;0==(B.words[0]&o)&&e<26;++e,o<<=1);if(e>0)for(B.iushrn(e);e-- >0;)i.isOdd()&&i.iadd(t),i.iushrn(1);for(var s=0,r=1;0==(Q.words[0]&r)&&s<26;++s,r<<=1);if(s>0)for(Q.iushrn(s);s-- >0;)C.isOdd()&&C.iadd(t),C.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),i.isub(C)):(Q.isub(B),C.isub(i))}return(I=0===B.cmpn(1)?i:C).cmpn(0)<0&&I.iadd(A),I},E.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var B=this.clone(),Q=A.clone();B.negative=0,Q.negative=0;for(var g=0;B.isEven()&&Q.isEven();g++)B.iushrn(1),Q.iushrn(1);for(;;){for(;B.isEven();)B.iushrn(1);for(;Q.isEven();)Q.iushrn(1);var I=B.cmp(Q);if(I<0){var E=B;B=Q,Q=E}else if(0===I||0===Q.cmpn(1))break;B.isub(Q)}return Q.iushln(g)},E.prototype.invm=function(A){return this.egcd(A).a.umod(A)},E.prototype.isEven=function(){return 0==(1&this.words[0])},E.prototype.isOdd=function(){return 1==(1&this.words[0])},E.prototype.andln=function(A){return this.words[0]&A},E.prototype.bincn=function(A){g("number"==typeof A);var B=A%26,Q=(A-B)/26,I=1<>>26,C&=67108863,this.words[i]=C}return 0!==E&&(this.words[i]=E,this.length++),this},E.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},E.prototype.cmpn=function(A){var B,Q=A<0;if(0!==this.negative&&!Q)return-1;if(0===this.negative&&Q)return 1;if(this.strip(),this.length>1)B=1;else{Q&&(A=-A),g(A<=67108863,"Number is too big");var I=0|this.words[0];B=I===A?0:IA.length)return 1;if(this.length=0;Q--){var g=0|this.words[Q],I=0|A.words[Q];if(g!==I){gI&&(B=1);break}}return B},E.prototype.gtn=function(A){return 1===this.cmpn(A)},E.prototype.gt=function(A){return 1===this.cmp(A)},E.prototype.gten=function(A){return this.cmpn(A)>=0},E.prototype.gte=function(A){return this.cmp(A)>=0},E.prototype.ltn=function(A){return-1===this.cmpn(A)},E.prototype.lt=function(A){return-1===this.cmp(A)},E.prototype.lten=function(A){return this.cmpn(A)<=0},E.prototype.lte=function(A){return this.cmp(A)<=0},E.prototype.eqn=function(A){return 0===this.cmpn(A)},E.prototype.eq=function(A){return 0===this.cmp(A)},E.red=function(A){return new F(A)},E.prototype.toRed=function(A){return g(!this.red,"Already a number in reduction context"),g(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},E.prototype.fromRed=function(){return g(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},E.prototype._forceRed=function(A){return this.red=A,this},E.prototype.forceRed=function(A){return g(!this.red,"Already a number in reduction context"),this._forceRed(A)},E.prototype.redAdd=function(A){return g(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},E.prototype.redIAdd=function(A){return g(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},E.prototype.redSub=function(A){return g(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},E.prototype.redISub=function(A){return g(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},E.prototype.redShl=function(A){return g(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},E.prototype.redMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},E.prototype.redIMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},E.prototype.redSqr=function(){return g(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},E.prototype.redISqr=function(){return g(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},E.prototype.redSqrt=function(){return g(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},E.prototype.redInvm=function(){return g(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},E.prototype.redNeg=function(){return g(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},E.prototype.redPow=function(A){return g(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var c={k256:null,p224:null,p192:null,p25519:null};function y(A,B){this.name=A,this.p=new E(B,16),this.n=this.p.bitLength(),this.k=new E(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function D(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function u(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function f(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function F(A){if("string"==typeof A){var B=E._prime(A);this.m=B.p,this.prime=B}else g(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function d(A){F.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new E(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)}y.prototype._tmp=function(){var A=new E(null);return A.words=new Array(Math.ceil(this.n/13)),A},y.prototype.ireduce=function(A){var B,Q=A;do{this.split(Q,this.tmp),B=(Q=(Q=this.imulK(Q)).iadd(this.tmp)).bitLength()}while(B>this.n);var g=B0?Q.isub(this.p):Q.strip(),Q},y.prototype.split=function(A,B){A.iushrn(this.n,0,B)},y.prototype.imulK=function(A){return A.imul(this.k)},I(D,y),D.prototype.split=function(A,B){for(var Q=Math.min(A.length,9),g=0;g>>22,I=E}I>>>=22,A.words[g-10]=I,0===I&&A.length>10?A.length-=10:A.length-=9},D.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var B=0,Q=0;Q>>=26,A.words[Q]=I,B=g}return 0!==B&&(A.words[A.length++]=B),A},E._prime=function(A){if(c[A])return c[A];var B;if("k256"===A)B=new D;else if("p224"===A)B=new u;else if("p192"===A)B=new f;else{if("p25519"!==A)throw new Error("Unknown prime "+A);B=new w}return c[A]=B,B},F.prototype._verify1=function(A){g(0===A.negative,"red works only with positives"),g(A.red,"red works only with red numbers")},F.prototype._verify2=function(A,B){g(0==(A.negative|B.negative),"red works only with positives"),g(A.red&&A.red===B.red,"red works only with red numbers")},F.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},F.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},F.prototype.add=function(A,B){this._verify2(A,B);var Q=A.add(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q._forceRed(this)},F.prototype.iadd=function(A,B){this._verify2(A,B);var Q=A.iadd(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q},F.prototype.sub=function(A,B){this._verify2(A,B);var Q=A.sub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q._forceRed(this)},F.prototype.isub=function(A,B){this._verify2(A,B);var Q=A.isub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q},F.prototype.shl=function(A,B){return this._verify1(A),this.imod(A.ushln(B))},F.prototype.imul=function(A,B){return this._verify2(A,B),this.imod(A.imul(B))},F.prototype.mul=function(A,B){return this._verify2(A,B),this.imod(A.mul(B))},F.prototype.isqr=function(A){return this.imul(A,A.clone())},F.prototype.sqr=function(A){return this.mul(A,A)},F.prototype.sqrt=function(A){if(A.isZero())return A.clone();var B=this.m.andln(3);if(g(B%2==1),3===B){var Q=this.m.add(new E(1)).iushrn(2);return this.pow(A,Q)}for(var I=this.m.subn(1),i=0;!I.isZero()&&0===I.andln(1);)i++,I.iushrn(1);g(!I.isZero());var C=new E(1).toRed(this),t=C.redNeg(),e=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new E(2*o*o).toRed(this);0!==this.pow(o,e).cmp(t);)o.redIAdd(t);for(var s=this.pow(o,I),r=this.pow(A,I.addn(1).iushrn(1)),h=this.pow(A,I),n=i;0!==h.cmp(C);){for(var a=h,c=0;0!==a.cmp(C);c++)a=a.redSqr();g(c=0;g--){for(var e=B.words[g],o=t-1;o>=0;o--){var s=e>>o&1;I!==Q[0]&&(I=this.sqr(I)),0!==s||0!==i?(i<<=1,i|=s,(4===++C||0===g&&0===o)&&(I=this.mul(I,Q[i]),C=0,i=0)):C=0}t=26}return I},F.prototype.convertTo=function(A){var B=A.umod(this.m);return B===A?B.clone():B},F.prototype.convertFrom=function(A){var B=A.clone();return B.red=null,B},E.mont=function(A){return new d(A)},I(d,F),d.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},d.prototype.convertFrom=function(A){var B=this.imod(A.mul(this.rinv));return B.red=null,B},d.prototype.imul=function(A,B){if(A.isZero()||B.isZero())return A.words[0]=0,A.length=1,A;var Q=A.imul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),E=I;return I.cmp(this.m)>=0?E=I.isub(this.m):I.cmpn(0)<0&&(E=I.iadd(this.m)),E._forceRed(this)},d.prototype.mul=function(A,B){if(A.isZero()||B.isZero())return new E(0)._forceRed(this);var Q=A.mul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),i=I;return I.cmp(this.m)>=0?i=I.isub(this.m):I.cmpn(0)<0&&(i=I.iadd(this.m)),i._forceRed(this)},d.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A,this)}).call(this,Q(10)(A))},function(A,B){},function(A){A.exports=JSON.parse('{"_args":[["elliptic@6.5.3","/home/user"]],"_development":true,"_from":"elliptic@6.5.3","_id":"elliptic@6.5.3","_inBundle":false,"_integrity":"sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"elliptic@6.5.3","name":"elliptic","escapedName":"elliptic","rawSpec":"6.5.3","saveSpec":null,"fetchSpec":"6.5.3"},"_requiredBy":["/browserify-sign","/create-ecdh"],"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz","_spec":"6.5.3","_where":"/home/user","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"dependencies":{"bn.js":"^4.4.0","brorand":"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0","inherits":"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},"description":"EC cryptography","devDependencies":{"brfs":"^1.4.3","coveralls":"^3.0.8","grunt":"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.2","jscs":"^3.0.7","jshint":"^2.10.3","mocha":"^6.2.2"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"jscs":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","jshint":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","lint":"npm run jscs && npm run jshint","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.3"}')},function(A,B){},function(A,B,Q){"use strict";var g=Q(6),I=Q(8),E=Q(0),i=Q(29),C=g.assert;function t(A){i.call(this,"short",A),this.a=new I(A.a,16).toRed(this.red),this.b=new I(A.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(A),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function e(A,B,Q,g){i.BasePoint.call(this,A,"affine"),null===B&&null===Q?(this.x=null,this.y=null,this.inf=!0):(this.x=new I(B,16),this.y=new I(Q,16),g&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function o(A,B,Q,g){i.BasePoint.call(this,A,"jacobian"),null===B&&null===Q&&null===g?(this.x=this.curve.one,this.y=this.curve.one,this.z=new I(0)):(this.x=new I(B,16),this.y=new I(Q,16),this.z=new I(g,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}E(t,i),A.exports=t,t.prototype._getEndomorphism=function(A){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var B,Q;if(A.beta)B=new I(A.beta,16).toRed(this.red);else{var g=this._getEndoRoots(this.p);B=(B=g[0].cmp(g[1])<0?g[0]:g[1]).toRed(this.red)}if(A.lambda)Q=new I(A.lambda,16);else{var E=this._getEndoRoots(this.n);0===this.g.mul(E[0]).x.cmp(this.g.x.redMul(B))?Q=E[0]:(Q=E[1],C(0===this.g.mul(Q).x.cmp(this.g.x.redMul(B))))}return{beta:B,lambda:Q,basis:A.basis?A.basis.map((function(A){return{a:new I(A.a,16),b:new I(A.b,16)}})):this._getEndoBasis(Q)}}},t.prototype._getEndoRoots=function(A){var B=A===this.p?this.red:I.mont(A),Q=new I(2).toRed(B).redInvm(),g=Q.redNeg(),E=new I(3).toRed(B).redNeg().redSqrt().redMul(Q);return[g.redAdd(E).fromRed(),g.redSub(E).fromRed()]},t.prototype._getEndoBasis=function(A){for(var B,Q,g,E,i,C,t,e,o,s=this.n.ushrn(Math.floor(this.n.bitLength()/2)),r=A,h=this.n.clone(),n=new I(1),a=new I(0),c=new I(0),y=new I(1),D=0;0!==r.cmpn(0);){var u=h.div(r);e=h.sub(u.mul(r)),o=c.sub(u.mul(n));var f=y.sub(u.mul(a));if(!g&&e.cmp(s)<0)B=t.neg(),Q=n,g=e.neg(),E=o;else if(g&&2==++D)break;t=e,h=r,r=e,c=n,n=o,y=a,a=f}i=e.neg(),C=o;var w=g.sqr().add(E.sqr());return i.sqr().add(C.sqr()).cmp(w)>=0&&(i=B,C=Q),g.negative&&(g=g.neg(),E=E.neg()),i.negative&&(i=i.neg(),C=C.neg()),[{a:g,b:E},{a:i,b:C}]},t.prototype._endoSplit=function(A){var B=this.endo.basis,Q=B[0],g=B[1],I=g.b.mul(A).divRound(this.n),E=Q.b.neg().mul(A).divRound(this.n),i=I.mul(Q.a),C=E.mul(g.a),t=I.mul(Q.b),e=E.mul(g.b);return{k1:A.sub(i).sub(C),k2:t.add(e).neg()}},t.prototype.pointFromX=function(A,B){(A=new I(A,16)).red||(A=A.toRed(this.red));var Q=A.redSqr().redMul(A).redIAdd(A.redMul(this.a)).redIAdd(this.b),g=Q.redSqrt();if(0!==g.redSqr().redSub(Q).cmp(this.zero))throw new Error("invalid point");var E=g.fromRed().isOdd();return(B&&!E||!B&&E)&&(g=g.redNeg()),this.point(A,g)},t.prototype.validate=function(A){if(A.inf)return!0;var B=A.x,Q=A.y,g=this.a.redMul(B),I=B.redSqr().redMul(B).redIAdd(g).redIAdd(this.b);return 0===Q.redSqr().redISub(I).cmpn(0)},t.prototype._endoWnafMulAdd=function(A,B,Q){for(var g=this._endoWnafT1,I=this._endoWnafT2,E=0;E":""},e.prototype.isInfinity=function(){return this.inf},e.prototype.add=function(A){if(this.inf)return A;if(A.inf)return this;if(this.eq(A))return this.dbl();if(this.neg().eq(A))return this.curve.point(null,null);if(0===this.x.cmp(A.x))return this.curve.point(null,null);var B=this.y.redSub(A.y);0!==B.cmpn(0)&&(B=B.redMul(this.x.redSub(A.x).redInvm()));var Q=B.redSqr().redISub(this.x).redISub(A.x),g=B.redMul(this.x.redSub(Q)).redISub(this.y);return this.curve.point(Q,g)},e.prototype.dbl=function(){if(this.inf)return this;var A=this.y.redAdd(this.y);if(0===A.cmpn(0))return this.curve.point(null,null);var B=this.curve.a,Q=this.x.redSqr(),g=A.redInvm(),I=Q.redAdd(Q).redIAdd(Q).redIAdd(B).redMul(g),E=I.redSqr().redISub(this.x.redAdd(this.x)),i=I.redMul(this.x.redSub(E)).redISub(this.y);return this.curve.point(E,i)},e.prototype.getX=function(){return this.x.fromRed()},e.prototype.getY=function(){return this.y.fromRed()},e.prototype.mul=function(A){return A=new I(A,16),this.isInfinity()?this:this._hasDoubles(A)?this.curve._fixedNafMul(this,A):this.curve.endo?this.curve._endoWnafMulAdd([this],[A]):this.curve._wnafMul(this,A)},e.prototype.mulAdd=function(A,B,Q){var g=[this,B],I=[A,Q];return this.curve.endo?this.curve._endoWnafMulAdd(g,I):this.curve._wnafMulAdd(1,g,I,2)},e.prototype.jmulAdd=function(A,B,Q){var g=[this,B],I=[A,Q];return this.curve.endo?this.curve._endoWnafMulAdd(g,I,!0):this.curve._wnafMulAdd(1,g,I,2,!0)},e.prototype.eq=function(A){return this===A||this.inf===A.inf&&(this.inf||0===this.x.cmp(A.x)&&0===this.y.cmp(A.y))},e.prototype.neg=function(A){if(this.inf)return this;var B=this.curve.point(this.x,this.y.redNeg());if(A&&this.precomputed){var Q=this.precomputed,g=function(A){return A.neg()};B.precomputed={naf:Q.naf&&{wnd:Q.naf.wnd,points:Q.naf.points.map(g)},doubles:Q.doubles&&{step:Q.doubles.step,points:Q.doubles.points.map(g)}}}return B},e.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},E(o,i.BasePoint),t.prototype.jpoint=function(A,B,Q){return new o(this,A,B,Q)},o.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var A=this.z.redInvm(),B=A.redSqr(),Q=this.x.redMul(B),g=this.y.redMul(B).redMul(A);return this.curve.point(Q,g)},o.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},o.prototype.add=function(A){if(this.isInfinity())return A;if(A.isInfinity())return this;var B=A.z.redSqr(),Q=this.z.redSqr(),g=this.x.redMul(B),I=A.x.redMul(Q),E=this.y.redMul(B.redMul(A.z)),i=A.y.redMul(Q.redMul(this.z)),C=g.redSub(I),t=E.redSub(i);if(0===C.cmpn(0))return 0!==t.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var e=C.redSqr(),o=e.redMul(C),s=g.redMul(e),r=t.redSqr().redIAdd(o).redISub(s).redISub(s),h=t.redMul(s.redISub(r)).redISub(E.redMul(o)),n=this.z.redMul(A.z).redMul(C);return this.curve.jpoint(r,h,n)},o.prototype.mixedAdd=function(A){if(this.isInfinity())return A.toJ();if(A.isInfinity())return this;var B=this.z.redSqr(),Q=this.x,g=A.x.redMul(B),I=this.y,E=A.y.redMul(B).redMul(this.z),i=Q.redSub(g),C=I.redSub(E);if(0===i.cmpn(0))return 0!==C.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var t=i.redSqr(),e=t.redMul(i),o=Q.redMul(t),s=C.redSqr().redIAdd(e).redISub(o).redISub(o),r=C.redMul(o.redISub(s)).redISub(I.redMul(e)),h=this.z.redMul(i);return this.curve.jpoint(s,r,h)},o.prototype.dblp=function(A){if(0===A)return this;if(this.isInfinity())return this;if(!A)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var B=this,Q=0;Q=0)return!1;if(Q.redIAdd(I),0===this.x.cmp(Q))return!0}},o.prototype.inspect=function(){return this.isInfinity()?"":""},o.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(A,B,Q){"use strict";var g=Q(8),I=Q(0),E=Q(29),i=Q(6);function C(A){E.call(this,"mont",A),this.a=new g(A.a,16).toRed(this.red),this.b=new g(A.b,16).toRed(this.red),this.i4=new g(4).toRed(this.red).redInvm(),this.two=new g(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function t(A,B,Q){E.BasePoint.call(this,A,"projective"),null===B&&null===Q?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new g(B,16),this.z=new g(Q,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}I(C,E),A.exports=C,C.prototype.validate=function(A){var B=A.normalize().x,Q=B.redSqr(),g=Q.redMul(B).redAdd(Q.redMul(this.a)).redAdd(B);return 0===g.redSqrt().redSqr().cmp(g)},I(t,E.BasePoint),C.prototype.decodePoint=function(A,B){return this.point(i.toArray(A,B),1)},C.prototype.point=function(A,B){return new t(this,A,B)},C.prototype.pointFromJSON=function(A){return t.fromJSON(this,A)},t.prototype.precompute=function(){},t.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},t.fromJSON=function(A,B){return new t(A,B[0],B[1]||A.one)},t.prototype.inspect=function(){return this.isInfinity()?"":""},t.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},t.prototype.dbl=function(){var A=this.x.redAdd(this.z).redSqr(),B=this.x.redSub(this.z).redSqr(),Q=A.redSub(B),g=A.redMul(B),I=Q.redMul(B.redAdd(this.curve.a24.redMul(Q)));return this.curve.point(g,I)},t.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},t.prototype.diffAdd=function(A,B){var Q=this.x.redAdd(this.z),g=this.x.redSub(this.z),I=A.x.redAdd(A.z),E=A.x.redSub(A.z).redMul(Q),i=I.redMul(g),C=B.z.redMul(E.redAdd(i).redSqr()),t=B.x.redMul(E.redISub(i).redSqr());return this.curve.point(C,t)},t.prototype.mul=function(A){for(var B=A.clone(),Q=this,g=this.curve.point(null,null),I=[];0!==B.cmpn(0);B.iushrn(1))I.push(B.andln(1));for(var E=I.length-1;E>=0;E--)0===I[E]?(Q=Q.diffAdd(g,this),g=g.dbl()):(g=Q.diffAdd(g,this),Q=Q.dbl());return g},t.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},t.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},t.prototype.eq=function(A){return 0===this.getX().cmp(A.getX())},t.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},t.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(A,B,Q){"use strict";var g=Q(6),I=Q(8),E=Q(0),i=Q(29),C=g.assert;function t(A){this.twisted=1!=(0|A.a),this.mOneA=this.twisted&&-1==(0|A.a),this.extended=this.mOneA,i.call(this,"edwards",A),this.a=new I(A.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new I(A.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new I(A.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),C(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|A.c)}function e(A,B,Q,g,E){i.BasePoint.call(this,A,"projective"),null===B&&null===Q&&null===g?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new I(B,16),this.y=new I(Q,16),this.z=g?new I(g,16):this.curve.one,this.t=E&&new I(E,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}E(t,i),A.exports=t,t.prototype._mulA=function(A){return this.mOneA?A.redNeg():this.a.redMul(A)},t.prototype._mulC=function(A){return this.oneC?A:this.c.redMul(A)},t.prototype.jpoint=function(A,B,Q,g){return this.point(A,B,Q,g)},t.prototype.pointFromX=function(A,B){(A=new I(A,16)).red||(A=A.toRed(this.red));var Q=A.redSqr(),g=this.c2.redSub(this.a.redMul(Q)),E=this.one.redSub(this.c2.redMul(this.d).redMul(Q)),i=g.redMul(E.redInvm()),C=i.redSqrt();if(0!==C.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");var t=C.fromRed().isOdd();return(B&&!t||!B&&t)&&(C=C.redNeg()),this.point(A,C)},t.prototype.pointFromY=function(A,B){(A=new I(A,16)).red||(A=A.toRed(this.red));var Q=A.redSqr(),g=Q.redSub(this.c2),E=Q.redMul(this.d).redMul(this.c2).redSub(this.a),i=g.redMul(E.redInvm());if(0===i.cmp(this.zero)){if(B)throw new Error("invalid point");return this.point(this.zero,A)}var C=i.redSqrt();if(0!==C.redSqr().redSub(i).cmp(this.zero))throw new Error("invalid point");return C.fromRed().isOdd()!==B&&(C=C.redNeg()),this.point(C,A)},t.prototype.validate=function(A){if(A.isInfinity())return!0;A.normalize();var B=A.x.redSqr(),Q=A.y.redSqr(),g=B.redMul(this.a).redAdd(Q),I=this.c2.redMul(this.one.redAdd(this.d.redMul(B).redMul(Q)));return 0===g.cmp(I)},E(e,i.BasePoint),t.prototype.pointFromJSON=function(A){return e.fromJSON(this,A)},t.prototype.point=function(A,B,Q,g){return new e(this,A,B,Q,g)},e.fromJSON=function(A,B){return new e(A,B[0],B[1],B[2])},e.prototype.inspect=function(){return this.isInfinity()?"":""},e.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},e.prototype._extDbl=function(){var A=this.x.redSqr(),B=this.y.redSqr(),Q=this.z.redSqr();Q=Q.redIAdd(Q);var g=this.curve._mulA(A),I=this.x.redAdd(this.y).redSqr().redISub(A).redISub(B),E=g.redAdd(B),i=E.redSub(Q),C=g.redSub(B),t=I.redMul(i),e=E.redMul(C),o=I.redMul(C),s=i.redMul(E);return this.curve.point(t,e,s,o)},e.prototype._projDbl=function(){var A,B,Q,g=this.x.redAdd(this.y).redSqr(),I=this.x.redSqr(),E=this.y.redSqr();if(this.curve.twisted){var i=(e=this.curve._mulA(I)).redAdd(E);if(this.zOne)A=g.redSub(I).redSub(E).redMul(i.redSub(this.curve.two)),B=i.redMul(e.redSub(E)),Q=i.redSqr().redSub(i).redSub(i);else{var C=this.z.redSqr(),t=i.redSub(C).redISub(C);A=g.redSub(I).redISub(E).redMul(t),B=i.redMul(e.redSub(E)),Q=i.redMul(t)}}else{var e=I.redAdd(E);C=this.curve._mulC(this.z).redSqr(),t=e.redSub(C).redSub(C);A=this.curve._mulC(g.redISub(e)).redMul(t),B=this.curve._mulC(e).redMul(I.redISub(E)),Q=e.redMul(t)}return this.curve.point(A,B,Q)},e.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},e.prototype._extAdd=function(A){var B=this.y.redSub(this.x).redMul(A.y.redSub(A.x)),Q=this.y.redAdd(this.x).redMul(A.y.redAdd(A.x)),g=this.t.redMul(this.curve.dd).redMul(A.t),I=this.z.redMul(A.z.redAdd(A.z)),E=Q.redSub(B),i=I.redSub(g),C=I.redAdd(g),t=Q.redAdd(B),e=E.redMul(i),o=C.redMul(t),s=E.redMul(t),r=i.redMul(C);return this.curve.point(e,o,r,s)},e.prototype._projAdd=function(A){var B,Q,g=this.z.redMul(A.z),I=g.redSqr(),E=this.x.redMul(A.x),i=this.y.redMul(A.y),C=this.curve.d.redMul(E).redMul(i),t=I.redSub(C),e=I.redAdd(C),o=this.x.redAdd(this.y).redMul(A.x.redAdd(A.y)).redISub(E).redISub(i),s=g.redMul(t).redMul(o);return this.curve.twisted?(B=g.redMul(e).redMul(i.redSub(this.curve._mulA(E))),Q=t.redMul(e)):(B=g.redMul(e).redMul(i.redSub(E)),Q=this.curve._mulC(t).redMul(e)),this.curve.point(s,B,Q)},e.prototype.add=function(A){return this.isInfinity()?A:A.isInfinity()?this:this.curve.extended?this._extAdd(A):this._projAdd(A)},e.prototype.mul=function(A){return this._hasDoubles(A)?this.curve._fixedNafMul(this,A):this.curve._wnafMul(this,A)},e.prototype.mulAdd=function(A,B,Q){return this.curve._wnafMulAdd(1,[this,B],[A,Q],2,!1)},e.prototype.jmulAdd=function(A,B,Q){return this.curve._wnafMulAdd(1,[this,B],[A,Q],2,!0)},e.prototype.normalize=function(){if(this.zOne)return this;var A=this.z.redInvm();return this.x=this.x.redMul(A),this.y=this.y.redMul(A),this.t&&(this.t=this.t.redMul(A)),this.z=this.curve.one,this.zOne=!0,this},e.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},e.prototype.getX=function(){return this.normalize(),this.x.fromRed()},e.prototype.getY=function(){return this.normalize(),this.y.fromRed()},e.prototype.eq=function(A){return this===A||0===this.getX().cmp(A.getX())&&0===this.getY().cmp(A.getY())},e.prototype.eqXToP=function(A){var B=A.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(B))return!0;for(var Q=A.clone(),g=this.curve.redN.redMul(this.z);;){if(Q.iadd(this.curve.n),Q.cmp(this.curve.p)>=0)return!1;if(B.redIAdd(g),0===this.x.cmp(B))return!0}},e.prototype.toP=e.prototype.normalize,e.prototype.mixedAdd=e.prototype.add},function(A,B,Q){"use strict";B.sha1=Q(173),B.sha224=Q(174),B.sha256=Q(89),B.sha384=Q(175),B.sha512=Q(90)},function(A,B,Q){"use strict";var g=Q(7),I=Q(23),E=Q(88),i=g.rotl32,C=g.sum32,t=g.sum32_5,e=E.ft_1,o=I.BlockHash,s=[1518500249,1859775393,2400959708,3395469782];function r(){if(!(this instanceof r))return new r;o.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}g.inherits(r,o),A.exports=r,r.blockSize=512,r.outSize=160,r.hmacStrength=80,r.padLength=64,r.prototype._update=function(A,B){for(var Q=this.W,g=0;g<16;g++)Q[g]=A[B+g];for(;gthis.blockSize&&(A=(new this.Hash).update(A).digest()),I(A.length<=this.blockSize);for(var B=A.length;B0))return i.iaddn(1),this.keyFromPrivate(i)}},s.prototype._truncateToN=function(A,B){var Q=8*A.byteLength()-this.n.bitLength();return Q>0&&(A=A.ushrn(Q)),!B&&A.cmp(this.n)>=0?A.sub(this.n):A},s.prototype.sign=function(A,B,Q,E){"object"==typeof Q&&(E=Q,Q=null),E||(E={}),B=this.keyFromPrivate(B,Q),A=this._truncateToN(new g(A,16));for(var i=this.n.byteLength(),C=B.getPrivate().toArray("be",i),t=A.toArray("be",i),e=new I({hash:this.hash,entropy:C,nonce:t,pers:E.pers,persEnc:E.persEnc||"utf8"}),s=this.n.sub(new g(1)),r=0;;r++){var h=E.k?E.k(r):new g(e.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(s)>=0)){var n=this.g.mul(h);if(!n.isInfinity()){var a=n.getX(),c=a.umod(this.n);if(0!==c.cmpn(0)){var y=h.invm(this.n).mul(c.mul(B.getPrivate()).iadd(A));if(0!==(y=y.umod(this.n)).cmpn(0)){var D=(n.getY().isOdd()?1:0)|(0!==a.cmp(c)?2:0);return E.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),D^=1),new o({r:c,s:y,recoveryParam:D})}}}}}},s.prototype.verify=function(A,B,Q,I){A=this._truncateToN(new g(A,16)),Q=this.keyFromPublic(Q,I);var E=(B=new o(B,"hex")).r,i=B.s;if(E.cmpn(1)<0||E.cmp(this.n)>=0)return!1;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;var C,t=i.invm(this.n),e=t.mul(A).umod(this.n),s=t.mul(E).umod(this.n);return this.curve._maxwellTrick?!(C=this.g.jmulAdd(e,Q.getPublic(),s)).isInfinity()&&C.eqXToP(E):!(C=this.g.mulAdd(e,Q.getPublic(),s)).isInfinity()&&0===C.getX().umod(this.n).cmp(E)},s.prototype.recoverPubKey=function(A,B,Q,I){t((3&Q)===Q,"The recovery param is more than two bits"),B=new o(B,I);var E=this.n,i=new g(A),C=B.r,e=B.s,s=1&Q,r=Q>>1;if(C.cmp(this.curve.p.umod(this.curve.n))>=0&&r)throw new Error("Unable to find sencond key candinate");C=r?this.curve.pointFromX(C.add(this.curve.n),s):this.curve.pointFromX(C,s);var h=B.r.invm(E),n=E.sub(i).mul(h).umod(E),a=e.mul(h).umod(E);return this.g.mulAdd(n,C,a)},s.prototype.getKeyRecoveryParam=function(A,B,Q,g){if(null!==(B=new o(B,g)).recoveryParam)return B.recoveryParam;for(var I=0;I<4;I++){var E;try{E=this.recoverPubKey(A,B,I)}catch(A){continue}if(E.eq(Q))return I}throw new Error("Unable to find valid recovery factor")}},function(A,B,Q){"use strict";var g=Q(46),I=Q(86),E=Q(5);function i(A){if(!(this instanceof i))return new i(A);this.hash=A.hash,this.predResist=!!A.predResist,this.outLen=this.hash.outSize,this.minEntropy=A.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var B=I.toArray(A.entropy,A.entropyEnc||"hex"),Q=I.toArray(A.nonce,A.nonceEnc||"hex"),g=I.toArray(A.pers,A.persEnc||"hex");E(B.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(B,Q,g)}A.exports=i,i.prototype._init=function(A,B,Q){var g=A.concat(B).concat(Q);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var I=0;I=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(A.concat(Q||[])),this._reseed=1},i.prototype.generate=function(A,B,Q,g){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof B&&(g=Q,Q=B,B=null),Q&&(Q=I.toArray(Q,g||"hex"),this._update(Q));for(var E=[];E.length"}},function(A,B,Q){"use strict";var g=Q(8),I=Q(6),E=I.assert;function i(A,B){if(A instanceof i)return A;this._importDER(A,B)||(E(A.r&&A.s,"Signature without r or s"),this.r=new g(A.r,16),this.s=new g(A.s,16),void 0===A.recoveryParam?this.recoveryParam=null:this.recoveryParam=A.recoveryParam)}function C(){this.place=0}function t(A,B){var Q=A[B.place++];if(!(128&Q))return Q;var g=15&Q;if(0===g||g>4)return!1;for(var I=0,E=0,i=B.place;E>>=0;return!(I<=127)&&(B.place=i,I)}function e(A){for(var B=0,Q=A.length-1;!A[B]&&!(128&A[B+1])&&B>>3);for(A.push(128|Q);--Q;)A.push(B>>>(Q<<3)&255);A.push(B)}}A.exports=i,i.prototype._importDER=function(A,B){A=I.toArray(A,B);var Q=new C;if(48!==A[Q.place++])return!1;var E=t(A,Q);if(!1===E)return!1;if(E+Q.place!==A.length)return!1;if(2!==A[Q.place++])return!1;var i=t(A,Q);if(!1===i)return!1;var e=A.slice(Q.place,i+Q.place);if(Q.place+=i,2!==A[Q.place++])return!1;var o=t(A,Q);if(!1===o)return!1;if(A.length!==o+Q.place)return!1;var s=A.slice(Q.place,o+Q.place);if(0===e[0]){if(!(128&e[1]))return!1;e=e.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new g(e),this.s=new g(s),this.recoveryParam=null,!0},i.prototype.toDER=function(A){var B=this.r.toArray(),Q=this.s.toArray();for(128&B[0]&&(B=[0].concat(B)),128&Q[0]&&(Q=[0].concat(Q)),B=e(B),Q=e(Q);!(Q[0]||128&Q[1]);)Q=Q.slice(1);var g=[2];o(g,B.length),(g=g.concat(B)).push(2),o(g,Q.length);var E=g.concat(Q),i=[48];return o(i,E.length),i=i.concat(E),I.encode(i,A)}},function(A,B,Q){"use strict";var g=Q(46),I=Q(45),E=Q(6),i=E.assert,C=E.parseBytes,t=Q(184),e=Q(185);function o(A){if(i("ed25519"===A,"only tested with ed25519 so far"),!(this instanceof o))return new o(A);A=I[A].curve;this.curve=A,this.g=A.g,this.g.precompute(A.n.bitLength()+1),this.pointClass=A.point().constructor,this.encodingLength=Math.ceil(A.n.bitLength()/8),this.hash=g.sha512}A.exports=o,o.prototype.sign=function(A,B){A=C(A);var Q=this.keyFromSecret(B),g=this.hashInt(Q.messagePrefix(),A),I=this.g.mul(g),E=this.encodePoint(I),i=this.hashInt(E,Q.pubBytes(),A).mul(Q.priv()),t=g.add(i).umod(this.curve.n);return this.makeSignature({R:I,S:t,Rencoded:E})},o.prototype.verify=function(A,B,Q){A=C(A),B=this.makeSignature(B);var g=this.keyFromPublic(Q),I=this.hashInt(B.Rencoded(),g.pubBytes(),A),E=this.g.mul(B.S());return B.R().add(g.pub().mul(I)).eq(E)},o.prototype.hashInt=function(){for(var A=this.hash(),B=0;B=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return g}function t(A,B,Q,g){for(var I=0,E=Math.min(A.length,Q),i=B;i=49?C-49+10:C>=17?C-17+10:C}return I}E.isBN=function(A){return A instanceof E||null!==A&&"object"==typeof A&&A.constructor.wordSize===E.wordSize&&Array.isArray(A.words)},E.max=function(A,B){return A.cmp(B)>0?A:B},E.min=function(A,B){return A.cmp(B)<0?A:B},E.prototype._init=function(A,B,Q){if("number"==typeof A)return this._initNumber(A,B,Q);if("object"==typeof A)return this._initArray(A,B,Q);"hex"===B&&(B=16),g(B===(0|B)&&B>=2&&B<=36);var I=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&I++,16===B?this._parseHex(A,I):this._parseBase(A,B,I),"-"===A[0]&&(this.negative=1),this.strip(),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initNumber=function(A,B,Q){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[67108863&A],this.length=1):A<4503599627370496?(this.words=[67108863&A,A/67108864&67108863],this.length=2):(g(A<9007199254740992),this.words=[67108863&A,A/67108864&67108863,1],this.length=3),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initArray=function(A,B,Q){if(g("number"==typeof A.length),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var I=0;I=0;I-=3)i=A[I]|A[I-1]<<8|A[I-2]<<16,this.words[E]|=i<>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);else if("le"===Q)for(I=0,E=0;I>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);return this.strip()},E.prototype._parseHex=function(A,B){this.length=Math.ceil((A.length-B)/6),this.words=new Array(this.length);for(var Q=0;Q=B;Q-=6)I=C(A,Q,Q+6),this.words[g]|=I<>>26-E&4194303,(E+=24)>=26&&(E-=26,g++);Q+6!==B&&(I=C(A,B,Q+6),this.words[g]|=I<>>26-E&4194303),this.strip()},E.prototype._parseBase=function(A,B,Q){this.words=[0],this.length=1;for(var g=0,I=1;I<=67108863;I*=B)g++;g--,I=I/B|0;for(var E=A.length-Q,i=E%g,C=Math.min(E,E-i)+Q,e=0,o=Q;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},E.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},E.prototype.inspect=function(){return(this.red?""};var e=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],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],s=[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 r(A,B,Q){Q.negative=B.negative^A.negative;var g=A.length+B.length|0;Q.length=g,g=g-1|0;var I=0|A.words[0],E=0|B.words[0],i=I*E,C=67108863&i,t=i/67108864|0;Q.words[0]=C;for(var e=1;e>>26,s=67108863&t,r=Math.min(e,B.length-1),h=Math.max(0,e-A.length+1);h<=r;h++){var n=e-h|0;o+=(i=(I=0|A.words[n])*(E=0|B.words[h])+s)/67108864|0,s=67108863&i}Q.words[e]=0|s,t=0|o}return 0!==t?Q.words[e]=0|t:Q.length--,Q.strip()}E.prototype.toString=function(A,B){var Q;if(B=0|B||1,16===(A=A||10)||"hex"===A){Q="";for(var I=0,E=0,i=0;i>>24-I&16777215)||i!==this.length-1?e[6-t.length]+t+Q:t+Q,(I+=2)>=26&&(I-=26,i--)}for(0!==E&&(Q=E.toString(16)+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}if(A===(0|A)&&A>=2&&A<=36){var r=o[A],h=s[A];Q="";var n=this.clone();for(n.negative=0;!n.isZero();){var a=n.modn(h).toString(A);Q=(n=n.idivn(h)).isZero()?a+Q:e[r-a.length]+a+Q}for(this.isZero()&&(Q="0"+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}g(!1,"Base should be between 2 and 36")},E.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&g(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},E.prototype.toJSON=function(){return this.toString(16)},E.prototype.toBuffer=function(A,B){return g(void 0!==i),this.toArrayLike(i,A,B)},E.prototype.toArray=function(A,B){return this.toArrayLike(Array,A,B)},E.prototype.toArrayLike=function(A,B,Q){var I=this.byteLength(),E=Q||Math.max(1,I);g(I<=E,"byte array longer than desired length"),g(E>0,"Requested array length <= 0"),this.strip();var i,C,t="le"===B,e=new A(E),o=this.clone();if(t){for(C=0;!o.isZero();C++)i=o.andln(255),o.iushrn(8),e[C]=i;for(;C=4096&&(Q+=13,B>>>=13),B>=64&&(Q+=7,B>>>=7),B>=8&&(Q+=4,B>>>=4),B>=2&&(Q+=2,B>>>=2),Q+B},E.prototype._zeroBits=function(A){if(0===A)return 26;var B=A,Q=0;return 0==(8191&B)&&(Q+=13,B>>>=13),0==(127&B)&&(Q+=7,B>>>=7),0==(15&B)&&(Q+=4,B>>>=4),0==(3&B)&&(Q+=2,B>>>=2),0==(1&B)&&Q++,Q},E.prototype.bitLength=function(){var A=this.words[this.length-1],B=this._countBits(A);return 26*(this.length-1)+B},E.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,B=0;BA.length?this.clone().ior(A):A.clone().ior(this)},E.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},E.prototype.iuand=function(A){var B;B=this.length>A.length?A:this;for(var Q=0;QA.length?this.clone().iand(A):A.clone().iand(this)},E.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},E.prototype.iuxor=function(A){var B,Q;this.length>A.length?(B=this,Q=A):(B=A,Q=this);for(var g=0;gA.length?this.clone().ixor(A):A.clone().ixor(this)},E.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},E.prototype.inotn=function(A){g("number"==typeof A&&A>=0);var B=0|Math.ceil(A/26),Q=A%26;this._expand(B),Q>0&&B--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-Q),this.strip()},E.prototype.notn=function(A){return this.clone().inotn(A)},E.prototype.setn=function(A,B){g("number"==typeof A&&A>=0);var Q=A/26|0,I=A%26;return this._expand(Q+1),this.words[Q]=B?this.words[Q]|1<A.length?(Q=this,g=A):(Q=A,g=this);for(var I=0,E=0;E>>26;for(;0!==I&&E>>26;if(this.length=Q.length,0!==I)this.words[this.length]=I,this.length++;else if(Q!==this)for(;EA.length?this.clone().iadd(A):A.clone().iadd(this)},E.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var B=this.iadd(A);return A.negative=1,B._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var Q,g,I=this.cmp(A);if(0===I)return this.negative=0,this.length=1,this.words[0]=0,this;I>0?(Q=this,g=A):(Q=A,g=this);for(var E=0,i=0;i>26,this.words[i]=67108863&B;for(;0!==E&&i>26,this.words[i]=67108863&B;if(0===E&&i>>13,h=0|i[1],n=8191&h,a=h>>>13,c=0|i[2],y=8191&c,D=c>>>13,u=0|i[3],f=8191&u,w=u>>>13,F=0|i[4],d=8191&F,l=F>>>13,U=0|i[5],N=8191&U,H=U>>>13,G=0|i[6],Y=8191&G,L=G>>>13,R=0|i[7],p=8191&R,M=R>>>13,m=0|i[8],k=8191&m,S=m>>>13,b=0|i[9],v=8191&b,J=b>>>13,V=0|C[0],K=8191&V,x=V>>>13,Z=0|C[1],q=8191&Z,O=Z>>>13,j=0|C[2],W=8191&j,X=j>>>13,T=0|C[3],z=8191&T,_=T>>>13,P=0|C[4],$=8191&P,AA=P>>>13,BA=0|C[5],QA=8191&BA,gA=BA>>>13,IA=0|C[6],EA=8191&IA,iA=IA>>>13,CA=0|C[7],tA=8191&CA,eA=CA>>>13,oA=0|C[8],sA=8191&oA,rA=oA>>>13,hA=0|C[9],nA=8191&hA,aA=hA>>>13;Q.negative=A.negative^B.negative,Q.length=19;var cA=(e+(g=Math.imul(s,K))|0)+((8191&(I=(I=Math.imul(s,x))+Math.imul(r,K)|0))<<13)|0;e=((E=Math.imul(r,x))+(I>>>13)|0)+(cA>>>26)|0,cA&=67108863,g=Math.imul(n,K),I=(I=Math.imul(n,x))+Math.imul(a,K)|0,E=Math.imul(a,x);var yA=(e+(g=g+Math.imul(s,q)|0)|0)+((8191&(I=(I=I+Math.imul(s,O)|0)+Math.imul(r,q)|0))<<13)|0;e=((E=E+Math.imul(r,O)|0)+(I>>>13)|0)+(yA>>>26)|0,yA&=67108863,g=Math.imul(y,K),I=(I=Math.imul(y,x))+Math.imul(D,K)|0,E=Math.imul(D,x),g=g+Math.imul(n,q)|0,I=(I=I+Math.imul(n,O)|0)+Math.imul(a,q)|0,E=E+Math.imul(a,O)|0;var DA=(e+(g=g+Math.imul(s,W)|0)|0)+((8191&(I=(I=I+Math.imul(s,X)|0)+Math.imul(r,W)|0))<<13)|0;e=((E=E+Math.imul(r,X)|0)+(I>>>13)|0)+(DA>>>26)|0,DA&=67108863,g=Math.imul(f,K),I=(I=Math.imul(f,x))+Math.imul(w,K)|0,E=Math.imul(w,x),g=g+Math.imul(y,q)|0,I=(I=I+Math.imul(y,O)|0)+Math.imul(D,q)|0,E=E+Math.imul(D,O)|0,g=g+Math.imul(n,W)|0,I=(I=I+Math.imul(n,X)|0)+Math.imul(a,W)|0,E=E+Math.imul(a,X)|0;var uA=(e+(g=g+Math.imul(s,z)|0)|0)+((8191&(I=(I=I+Math.imul(s,_)|0)+Math.imul(r,z)|0))<<13)|0;e=((E=E+Math.imul(r,_)|0)+(I>>>13)|0)+(uA>>>26)|0,uA&=67108863,g=Math.imul(d,K),I=(I=Math.imul(d,x))+Math.imul(l,K)|0,E=Math.imul(l,x),g=g+Math.imul(f,q)|0,I=(I=I+Math.imul(f,O)|0)+Math.imul(w,q)|0,E=E+Math.imul(w,O)|0,g=g+Math.imul(y,W)|0,I=(I=I+Math.imul(y,X)|0)+Math.imul(D,W)|0,E=E+Math.imul(D,X)|0,g=g+Math.imul(n,z)|0,I=(I=I+Math.imul(n,_)|0)+Math.imul(a,z)|0,E=E+Math.imul(a,_)|0;var fA=(e+(g=g+Math.imul(s,$)|0)|0)+((8191&(I=(I=I+Math.imul(s,AA)|0)+Math.imul(r,$)|0))<<13)|0;e=((E=E+Math.imul(r,AA)|0)+(I>>>13)|0)+(fA>>>26)|0,fA&=67108863,g=Math.imul(N,K),I=(I=Math.imul(N,x))+Math.imul(H,K)|0,E=Math.imul(H,x),g=g+Math.imul(d,q)|0,I=(I=I+Math.imul(d,O)|0)+Math.imul(l,q)|0,E=E+Math.imul(l,O)|0,g=g+Math.imul(f,W)|0,I=(I=I+Math.imul(f,X)|0)+Math.imul(w,W)|0,E=E+Math.imul(w,X)|0,g=g+Math.imul(y,z)|0,I=(I=I+Math.imul(y,_)|0)+Math.imul(D,z)|0,E=E+Math.imul(D,_)|0,g=g+Math.imul(n,$)|0,I=(I=I+Math.imul(n,AA)|0)+Math.imul(a,$)|0,E=E+Math.imul(a,AA)|0;var wA=(e+(g=g+Math.imul(s,QA)|0)|0)+((8191&(I=(I=I+Math.imul(s,gA)|0)+Math.imul(r,QA)|0))<<13)|0;e=((E=E+Math.imul(r,gA)|0)+(I>>>13)|0)+(wA>>>26)|0,wA&=67108863,g=Math.imul(Y,K),I=(I=Math.imul(Y,x))+Math.imul(L,K)|0,E=Math.imul(L,x),g=g+Math.imul(N,q)|0,I=(I=I+Math.imul(N,O)|0)+Math.imul(H,q)|0,E=E+Math.imul(H,O)|0,g=g+Math.imul(d,W)|0,I=(I=I+Math.imul(d,X)|0)+Math.imul(l,W)|0,E=E+Math.imul(l,X)|0,g=g+Math.imul(f,z)|0,I=(I=I+Math.imul(f,_)|0)+Math.imul(w,z)|0,E=E+Math.imul(w,_)|0,g=g+Math.imul(y,$)|0,I=(I=I+Math.imul(y,AA)|0)+Math.imul(D,$)|0,E=E+Math.imul(D,AA)|0,g=g+Math.imul(n,QA)|0,I=(I=I+Math.imul(n,gA)|0)+Math.imul(a,QA)|0,E=E+Math.imul(a,gA)|0;var FA=(e+(g=g+Math.imul(s,EA)|0)|0)+((8191&(I=(I=I+Math.imul(s,iA)|0)+Math.imul(r,EA)|0))<<13)|0;e=((E=E+Math.imul(r,iA)|0)+(I>>>13)|0)+(FA>>>26)|0,FA&=67108863,g=Math.imul(p,K),I=(I=Math.imul(p,x))+Math.imul(M,K)|0,E=Math.imul(M,x),g=g+Math.imul(Y,q)|0,I=(I=I+Math.imul(Y,O)|0)+Math.imul(L,q)|0,E=E+Math.imul(L,O)|0,g=g+Math.imul(N,W)|0,I=(I=I+Math.imul(N,X)|0)+Math.imul(H,W)|0,E=E+Math.imul(H,X)|0,g=g+Math.imul(d,z)|0,I=(I=I+Math.imul(d,_)|0)+Math.imul(l,z)|0,E=E+Math.imul(l,_)|0,g=g+Math.imul(f,$)|0,I=(I=I+Math.imul(f,AA)|0)+Math.imul(w,$)|0,E=E+Math.imul(w,AA)|0,g=g+Math.imul(y,QA)|0,I=(I=I+Math.imul(y,gA)|0)+Math.imul(D,QA)|0,E=E+Math.imul(D,gA)|0,g=g+Math.imul(n,EA)|0,I=(I=I+Math.imul(n,iA)|0)+Math.imul(a,EA)|0,E=E+Math.imul(a,iA)|0;var dA=(e+(g=g+Math.imul(s,tA)|0)|0)+((8191&(I=(I=I+Math.imul(s,eA)|0)+Math.imul(r,tA)|0))<<13)|0;e=((E=E+Math.imul(r,eA)|0)+(I>>>13)|0)+(dA>>>26)|0,dA&=67108863,g=Math.imul(k,K),I=(I=Math.imul(k,x))+Math.imul(S,K)|0,E=Math.imul(S,x),g=g+Math.imul(p,q)|0,I=(I=I+Math.imul(p,O)|0)+Math.imul(M,q)|0,E=E+Math.imul(M,O)|0,g=g+Math.imul(Y,W)|0,I=(I=I+Math.imul(Y,X)|0)+Math.imul(L,W)|0,E=E+Math.imul(L,X)|0,g=g+Math.imul(N,z)|0,I=(I=I+Math.imul(N,_)|0)+Math.imul(H,z)|0,E=E+Math.imul(H,_)|0,g=g+Math.imul(d,$)|0,I=(I=I+Math.imul(d,AA)|0)+Math.imul(l,$)|0,E=E+Math.imul(l,AA)|0,g=g+Math.imul(f,QA)|0,I=(I=I+Math.imul(f,gA)|0)+Math.imul(w,QA)|0,E=E+Math.imul(w,gA)|0,g=g+Math.imul(y,EA)|0,I=(I=I+Math.imul(y,iA)|0)+Math.imul(D,EA)|0,E=E+Math.imul(D,iA)|0,g=g+Math.imul(n,tA)|0,I=(I=I+Math.imul(n,eA)|0)+Math.imul(a,tA)|0,E=E+Math.imul(a,eA)|0;var lA=(e+(g=g+Math.imul(s,sA)|0)|0)+((8191&(I=(I=I+Math.imul(s,rA)|0)+Math.imul(r,sA)|0))<<13)|0;e=((E=E+Math.imul(r,rA)|0)+(I>>>13)|0)+(lA>>>26)|0,lA&=67108863,g=Math.imul(v,K),I=(I=Math.imul(v,x))+Math.imul(J,K)|0,E=Math.imul(J,x),g=g+Math.imul(k,q)|0,I=(I=I+Math.imul(k,O)|0)+Math.imul(S,q)|0,E=E+Math.imul(S,O)|0,g=g+Math.imul(p,W)|0,I=(I=I+Math.imul(p,X)|0)+Math.imul(M,W)|0,E=E+Math.imul(M,X)|0,g=g+Math.imul(Y,z)|0,I=(I=I+Math.imul(Y,_)|0)+Math.imul(L,z)|0,E=E+Math.imul(L,_)|0,g=g+Math.imul(N,$)|0,I=(I=I+Math.imul(N,AA)|0)+Math.imul(H,$)|0,E=E+Math.imul(H,AA)|0,g=g+Math.imul(d,QA)|0,I=(I=I+Math.imul(d,gA)|0)+Math.imul(l,QA)|0,E=E+Math.imul(l,gA)|0,g=g+Math.imul(f,EA)|0,I=(I=I+Math.imul(f,iA)|0)+Math.imul(w,EA)|0,E=E+Math.imul(w,iA)|0,g=g+Math.imul(y,tA)|0,I=(I=I+Math.imul(y,eA)|0)+Math.imul(D,tA)|0,E=E+Math.imul(D,eA)|0,g=g+Math.imul(n,sA)|0,I=(I=I+Math.imul(n,rA)|0)+Math.imul(a,sA)|0,E=E+Math.imul(a,rA)|0;var UA=(e+(g=g+Math.imul(s,nA)|0)|0)+((8191&(I=(I=I+Math.imul(s,aA)|0)+Math.imul(r,nA)|0))<<13)|0;e=((E=E+Math.imul(r,aA)|0)+(I>>>13)|0)+(UA>>>26)|0,UA&=67108863,g=Math.imul(v,q),I=(I=Math.imul(v,O))+Math.imul(J,q)|0,E=Math.imul(J,O),g=g+Math.imul(k,W)|0,I=(I=I+Math.imul(k,X)|0)+Math.imul(S,W)|0,E=E+Math.imul(S,X)|0,g=g+Math.imul(p,z)|0,I=(I=I+Math.imul(p,_)|0)+Math.imul(M,z)|0,E=E+Math.imul(M,_)|0,g=g+Math.imul(Y,$)|0,I=(I=I+Math.imul(Y,AA)|0)+Math.imul(L,$)|0,E=E+Math.imul(L,AA)|0,g=g+Math.imul(N,QA)|0,I=(I=I+Math.imul(N,gA)|0)+Math.imul(H,QA)|0,E=E+Math.imul(H,gA)|0,g=g+Math.imul(d,EA)|0,I=(I=I+Math.imul(d,iA)|0)+Math.imul(l,EA)|0,E=E+Math.imul(l,iA)|0,g=g+Math.imul(f,tA)|0,I=(I=I+Math.imul(f,eA)|0)+Math.imul(w,tA)|0,E=E+Math.imul(w,eA)|0,g=g+Math.imul(y,sA)|0,I=(I=I+Math.imul(y,rA)|0)+Math.imul(D,sA)|0,E=E+Math.imul(D,rA)|0;var NA=(e+(g=g+Math.imul(n,nA)|0)|0)+((8191&(I=(I=I+Math.imul(n,aA)|0)+Math.imul(a,nA)|0))<<13)|0;e=((E=E+Math.imul(a,aA)|0)+(I>>>13)|0)+(NA>>>26)|0,NA&=67108863,g=Math.imul(v,W),I=(I=Math.imul(v,X))+Math.imul(J,W)|0,E=Math.imul(J,X),g=g+Math.imul(k,z)|0,I=(I=I+Math.imul(k,_)|0)+Math.imul(S,z)|0,E=E+Math.imul(S,_)|0,g=g+Math.imul(p,$)|0,I=(I=I+Math.imul(p,AA)|0)+Math.imul(M,$)|0,E=E+Math.imul(M,AA)|0,g=g+Math.imul(Y,QA)|0,I=(I=I+Math.imul(Y,gA)|0)+Math.imul(L,QA)|0,E=E+Math.imul(L,gA)|0,g=g+Math.imul(N,EA)|0,I=(I=I+Math.imul(N,iA)|0)+Math.imul(H,EA)|0,E=E+Math.imul(H,iA)|0,g=g+Math.imul(d,tA)|0,I=(I=I+Math.imul(d,eA)|0)+Math.imul(l,tA)|0,E=E+Math.imul(l,eA)|0,g=g+Math.imul(f,sA)|0,I=(I=I+Math.imul(f,rA)|0)+Math.imul(w,sA)|0,E=E+Math.imul(w,rA)|0;var HA=(e+(g=g+Math.imul(y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(y,aA)|0)+Math.imul(D,nA)|0))<<13)|0;e=((E=E+Math.imul(D,aA)|0)+(I>>>13)|0)+(HA>>>26)|0,HA&=67108863,g=Math.imul(v,z),I=(I=Math.imul(v,_))+Math.imul(J,z)|0,E=Math.imul(J,_),g=g+Math.imul(k,$)|0,I=(I=I+Math.imul(k,AA)|0)+Math.imul(S,$)|0,E=E+Math.imul(S,AA)|0,g=g+Math.imul(p,QA)|0,I=(I=I+Math.imul(p,gA)|0)+Math.imul(M,QA)|0,E=E+Math.imul(M,gA)|0,g=g+Math.imul(Y,EA)|0,I=(I=I+Math.imul(Y,iA)|0)+Math.imul(L,EA)|0,E=E+Math.imul(L,iA)|0,g=g+Math.imul(N,tA)|0,I=(I=I+Math.imul(N,eA)|0)+Math.imul(H,tA)|0,E=E+Math.imul(H,eA)|0,g=g+Math.imul(d,sA)|0,I=(I=I+Math.imul(d,rA)|0)+Math.imul(l,sA)|0,E=E+Math.imul(l,rA)|0;var GA=(e+(g=g+Math.imul(f,nA)|0)|0)+((8191&(I=(I=I+Math.imul(f,aA)|0)+Math.imul(w,nA)|0))<<13)|0;e=((E=E+Math.imul(w,aA)|0)+(I>>>13)|0)+(GA>>>26)|0,GA&=67108863,g=Math.imul(v,$),I=(I=Math.imul(v,AA))+Math.imul(J,$)|0,E=Math.imul(J,AA),g=g+Math.imul(k,QA)|0,I=(I=I+Math.imul(k,gA)|0)+Math.imul(S,QA)|0,E=E+Math.imul(S,gA)|0,g=g+Math.imul(p,EA)|0,I=(I=I+Math.imul(p,iA)|0)+Math.imul(M,EA)|0,E=E+Math.imul(M,iA)|0,g=g+Math.imul(Y,tA)|0,I=(I=I+Math.imul(Y,eA)|0)+Math.imul(L,tA)|0,E=E+Math.imul(L,eA)|0,g=g+Math.imul(N,sA)|0,I=(I=I+Math.imul(N,rA)|0)+Math.imul(H,sA)|0,E=E+Math.imul(H,rA)|0;var YA=(e+(g=g+Math.imul(d,nA)|0)|0)+((8191&(I=(I=I+Math.imul(d,aA)|0)+Math.imul(l,nA)|0))<<13)|0;e=((E=E+Math.imul(l,aA)|0)+(I>>>13)|0)+(YA>>>26)|0,YA&=67108863,g=Math.imul(v,QA),I=(I=Math.imul(v,gA))+Math.imul(J,QA)|0,E=Math.imul(J,gA),g=g+Math.imul(k,EA)|0,I=(I=I+Math.imul(k,iA)|0)+Math.imul(S,EA)|0,E=E+Math.imul(S,iA)|0,g=g+Math.imul(p,tA)|0,I=(I=I+Math.imul(p,eA)|0)+Math.imul(M,tA)|0,E=E+Math.imul(M,eA)|0,g=g+Math.imul(Y,sA)|0,I=(I=I+Math.imul(Y,rA)|0)+Math.imul(L,sA)|0,E=E+Math.imul(L,rA)|0;var LA=(e+(g=g+Math.imul(N,nA)|0)|0)+((8191&(I=(I=I+Math.imul(N,aA)|0)+Math.imul(H,nA)|0))<<13)|0;e=((E=E+Math.imul(H,aA)|0)+(I>>>13)|0)+(LA>>>26)|0,LA&=67108863,g=Math.imul(v,EA),I=(I=Math.imul(v,iA))+Math.imul(J,EA)|0,E=Math.imul(J,iA),g=g+Math.imul(k,tA)|0,I=(I=I+Math.imul(k,eA)|0)+Math.imul(S,tA)|0,E=E+Math.imul(S,eA)|0,g=g+Math.imul(p,sA)|0,I=(I=I+Math.imul(p,rA)|0)+Math.imul(M,sA)|0,E=E+Math.imul(M,rA)|0;var RA=(e+(g=g+Math.imul(Y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(Y,aA)|0)+Math.imul(L,nA)|0))<<13)|0;e=((E=E+Math.imul(L,aA)|0)+(I>>>13)|0)+(RA>>>26)|0,RA&=67108863,g=Math.imul(v,tA),I=(I=Math.imul(v,eA))+Math.imul(J,tA)|0,E=Math.imul(J,eA),g=g+Math.imul(k,sA)|0,I=(I=I+Math.imul(k,rA)|0)+Math.imul(S,sA)|0,E=E+Math.imul(S,rA)|0;var pA=(e+(g=g+Math.imul(p,nA)|0)|0)+((8191&(I=(I=I+Math.imul(p,aA)|0)+Math.imul(M,nA)|0))<<13)|0;e=((E=E+Math.imul(M,aA)|0)+(I>>>13)|0)+(pA>>>26)|0,pA&=67108863,g=Math.imul(v,sA),I=(I=Math.imul(v,rA))+Math.imul(J,sA)|0,E=Math.imul(J,rA);var MA=(e+(g=g+Math.imul(k,nA)|0)|0)+((8191&(I=(I=I+Math.imul(k,aA)|0)+Math.imul(S,nA)|0))<<13)|0;e=((E=E+Math.imul(S,aA)|0)+(I>>>13)|0)+(MA>>>26)|0,MA&=67108863;var mA=(e+(g=Math.imul(v,nA))|0)+((8191&(I=(I=Math.imul(v,aA))+Math.imul(J,nA)|0))<<13)|0;return e=((E=Math.imul(J,aA))+(I>>>13)|0)+(mA>>>26)|0,mA&=67108863,t[0]=cA,t[1]=yA,t[2]=DA,t[3]=uA,t[4]=fA,t[5]=wA,t[6]=FA,t[7]=dA,t[8]=lA,t[9]=UA,t[10]=NA,t[11]=HA,t[12]=GA,t[13]=YA,t[14]=LA,t[15]=RA,t[16]=pA,t[17]=MA,t[18]=mA,0!==e&&(t[19]=e,Q.length++),Q};function n(A,B,Q){return(new a).mulp(A,B,Q)}function a(A,B){this.x=A,this.y=B}Math.imul||(h=r),E.prototype.mulTo=function(A,B){var Q=this.length+A.length;return 10===this.length&&10===A.length?h(this,A,B):Q<63?r(this,A,B):Q<1024?function(A,B,Q){Q.negative=B.negative^A.negative,Q.length=A.length+B.length;for(var g=0,I=0,E=0;E>>26)|0)>>>26,i&=67108863}Q.words[E]=C,g=i,i=I}return 0!==g?Q.words[E]=g:Q.length--,Q.strip()}(this,A,B):n(this,A,B)},a.prototype.makeRBT=function(A){for(var B=new Array(A),Q=E.prototype._countBits(A)-1,g=0;g>=1;return g},a.prototype.permute=function(A,B,Q,g,I,E){for(var i=0;i>>=1)I++;return 1<>>=13,Q[2*i+1]=8191&E,E>>>=13;for(i=2*B;i>=26,B+=I/67108864|0,B+=E>>>26,this.words[Q]=67108863&E}return 0!==B&&(this.words[Q]=B,this.length++),this},E.prototype.muln=function(A){return this.clone().imuln(A)},E.prototype.sqr=function(){return this.mul(this)},E.prototype.isqr=function(){return this.imul(this.clone())},E.prototype.pow=function(A){var B=function(A){for(var B=new Array(A.bitLength()),Q=0;Q>>I}return B}(A);if(0===B.length)return new E(1);for(var Q=this,g=0;g=0);var B,Q=A%26,I=(A-Q)/26,E=67108863>>>26-Q<<26-Q;if(0!==Q){var i=0;for(B=0;B>>26-Q}i&&(this.words[B]=i,this.length++)}if(0!==I){for(B=this.length-1;B>=0;B--)this.words[B+I]=this.words[B];for(B=0;B=0),I=B?(B-B%26)/26:0;var E=A%26,i=Math.min((A-E)/26,this.length),C=67108863^67108863>>>E<i)for(this.length-=i,e=0;e=0&&(0!==o||e>=I);e--){var s=0|this.words[e];this.words[e]=o<<26-E|s>>>E,o=s&C}return t&&0!==o&&(t.words[t.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},E.prototype.ishrn=function(A,B,Q){return g(0===this.negative),this.iushrn(A,B,Q)},E.prototype.shln=function(A){return this.clone().ishln(A)},E.prototype.ushln=function(A){return this.clone().iushln(A)},E.prototype.shrn=function(A){return this.clone().ishrn(A)},E.prototype.ushrn=function(A){return this.clone().iushrn(A)},E.prototype.testn=function(A){g("number"==typeof A&&A>=0);var B=A%26,Q=(A-B)/26,I=1<=0);var B=A%26,Q=(A-B)/26;if(g(0===this.negative,"imaskn works only with positive numbers"),this.length<=Q)return this;if(0!==B&&Q++,this.length=Math.min(Q,this.length),0!==B){var I=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},E.prototype.isubn=function(A){if(g("number"==typeof A),g(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(t/67108864|0),this.words[I+Q]=67108863&E}for(;I>26,this.words[I+Q]=67108863&E;if(0===C)return this.strip();for(g(-1===C),C=0,I=0;I>26,this.words[I]=67108863&E;return this.negative=1,this.strip()},E.prototype._wordDiv=function(A,B){var Q=(this.length,A.length),g=this.clone(),I=A,i=0|I.words[I.length-1];0!==(Q=26-this._countBits(i))&&(I=I.ushln(Q),g.iushln(Q),i=0|I.words[I.length-1]);var C,t=g.length-I.length;if("mod"!==B){(C=new E(null)).length=t+1,C.words=new Array(C.length);for(var e=0;e=0;s--){var r=67108864*(0|g.words[I.length+s])+(0|g.words[I.length+s-1]);for(r=Math.min(r/i|0,67108863),g._ishlnsubmul(I,r,s);0!==g.negative;)r--,g.negative=0,g._ishlnsubmul(I,1,s),g.isZero()||(g.negative^=1);C&&(C.words[s]=r)}return C&&C.strip(),g.strip(),"div"!==B&&0!==Q&&g.iushrn(Q),{div:C||null,mod:g}},E.prototype.divmod=function(A,B,Q){return g(!A.isZero()),this.isZero()?{div:new E(0),mod:new E(0)}:0!==this.negative&&0===A.negative?(C=this.neg().divmod(A,B),"mod"!==B&&(I=C.div.neg()),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.iadd(A)),{div:I,mod:i}):0===this.negative&&0!==A.negative?(C=this.divmod(A.neg(),B),"mod"!==B&&(I=C.div.neg()),{div:I,mod:C.mod}):0!=(this.negative&A.negative)?(C=this.neg().divmod(A.neg(),B),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.isub(A)),{div:C.div,mod:i}):A.length>this.length||this.cmp(A)<0?{div:new E(0),mod:this}:1===A.length?"div"===B?{div:this.divn(A.words[0]),mod:null}:"mod"===B?{div:null,mod:new E(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new E(this.modn(A.words[0]))}:this._wordDiv(A,B);var I,i,C},E.prototype.div=function(A){return this.divmod(A,"div",!1).div},E.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},E.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},E.prototype.divRound=function(A){var B=this.divmod(A);if(B.mod.isZero())return B.div;var Q=0!==B.div.negative?B.mod.isub(A):B.mod,g=A.ushrn(1),I=A.andln(1),E=Q.cmp(g);return E<0||1===I&&0===E?B.div:0!==B.div.negative?B.div.isubn(1):B.div.iaddn(1)},E.prototype.modn=function(A){g(A<=67108863);for(var B=(1<<26)%A,Q=0,I=this.length-1;I>=0;I--)Q=(B*Q+(0|this.words[I]))%A;return Q},E.prototype.idivn=function(A){g(A<=67108863);for(var B=0,Q=this.length-1;Q>=0;Q--){var I=(0|this.words[Q])+67108864*B;this.words[Q]=I/A|0,B=I%A}return this.strip()},E.prototype.divn=function(A){return this.clone().idivn(A)},E.prototype.egcd=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I=new E(1),i=new E(0),C=new E(0),t=new E(1),e=0;B.isEven()&&Q.isEven();)B.iushrn(1),Q.iushrn(1),++e;for(var o=Q.clone(),s=B.clone();!B.isZero();){for(var r=0,h=1;0==(B.words[0]&h)&&r<26;++r,h<<=1);if(r>0)for(B.iushrn(r);r-- >0;)(I.isOdd()||i.isOdd())&&(I.iadd(o),i.isub(s)),I.iushrn(1),i.iushrn(1);for(var n=0,a=1;0==(Q.words[0]&a)&&n<26;++n,a<<=1);if(n>0)for(Q.iushrn(n);n-- >0;)(C.isOdd()||t.isOdd())&&(C.iadd(o),t.isub(s)),C.iushrn(1),t.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),I.isub(C),i.isub(t)):(Q.isub(B),C.isub(I),t.isub(i))}return{a:C,b:t,gcd:Q.iushln(e)}},E.prototype._invmp=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I,i=new E(1),C=new E(0),t=Q.clone();B.cmpn(1)>0&&Q.cmpn(1)>0;){for(var e=0,o=1;0==(B.words[0]&o)&&e<26;++e,o<<=1);if(e>0)for(B.iushrn(e);e-- >0;)i.isOdd()&&i.iadd(t),i.iushrn(1);for(var s=0,r=1;0==(Q.words[0]&r)&&s<26;++s,r<<=1);if(s>0)for(Q.iushrn(s);s-- >0;)C.isOdd()&&C.iadd(t),C.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),i.isub(C)):(Q.isub(B),C.isub(i))}return(I=0===B.cmpn(1)?i:C).cmpn(0)<0&&I.iadd(A),I},E.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var B=this.clone(),Q=A.clone();B.negative=0,Q.negative=0;for(var g=0;B.isEven()&&Q.isEven();g++)B.iushrn(1),Q.iushrn(1);for(;;){for(;B.isEven();)B.iushrn(1);for(;Q.isEven();)Q.iushrn(1);var I=B.cmp(Q);if(I<0){var E=B;B=Q,Q=E}else if(0===I||0===Q.cmpn(1))break;B.isub(Q)}return Q.iushln(g)},E.prototype.invm=function(A){return this.egcd(A).a.umod(A)},E.prototype.isEven=function(){return 0==(1&this.words[0])},E.prototype.isOdd=function(){return 1==(1&this.words[0])},E.prototype.andln=function(A){return this.words[0]&A},E.prototype.bincn=function(A){g("number"==typeof A);var B=A%26,Q=(A-B)/26,I=1<>>26,C&=67108863,this.words[i]=C}return 0!==E&&(this.words[i]=E,this.length++),this},E.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},E.prototype.cmpn=function(A){var B,Q=A<0;if(0!==this.negative&&!Q)return-1;if(0===this.negative&&Q)return 1;if(this.strip(),this.length>1)B=1;else{Q&&(A=-A),g(A<=67108863,"Number is too big");var I=0|this.words[0];B=I===A?0:IA.length)return 1;if(this.length=0;Q--){var g=0|this.words[Q],I=0|A.words[Q];if(g!==I){gI&&(B=1);break}}return B},E.prototype.gtn=function(A){return 1===this.cmpn(A)},E.prototype.gt=function(A){return 1===this.cmp(A)},E.prototype.gten=function(A){return this.cmpn(A)>=0},E.prototype.gte=function(A){return this.cmp(A)>=0},E.prototype.ltn=function(A){return-1===this.cmpn(A)},E.prototype.lt=function(A){return-1===this.cmp(A)},E.prototype.lten=function(A){return this.cmpn(A)<=0},E.prototype.lte=function(A){return this.cmp(A)<=0},E.prototype.eqn=function(A){return 0===this.cmpn(A)},E.prototype.eq=function(A){return 0===this.cmp(A)},E.red=function(A){return new F(A)},E.prototype.toRed=function(A){return g(!this.red,"Already a number in reduction context"),g(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},E.prototype.fromRed=function(){return g(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},E.prototype._forceRed=function(A){return this.red=A,this},E.prototype.forceRed=function(A){return g(!this.red,"Already a number in reduction context"),this._forceRed(A)},E.prototype.redAdd=function(A){return g(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},E.prototype.redIAdd=function(A){return g(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},E.prototype.redSub=function(A){return g(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},E.prototype.redISub=function(A){return g(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},E.prototype.redShl=function(A){return g(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},E.prototype.redMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},E.prototype.redIMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},E.prototype.redSqr=function(){return g(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},E.prototype.redISqr=function(){return g(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},E.prototype.redSqrt=function(){return g(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},E.prototype.redInvm=function(){return g(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},E.prototype.redNeg=function(){return g(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},E.prototype.redPow=function(A){return g(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var c={k256:null,p224:null,p192:null,p25519:null};function y(A,B){this.name=A,this.p=new E(B,16),this.n=this.p.bitLength(),this.k=new E(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function D(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function u(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function f(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function F(A){if("string"==typeof A){var B=E._prime(A);this.m=B.p,this.prime=B}else g(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function d(A){F.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new E(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)}y.prototype._tmp=function(){var A=new E(null);return A.words=new Array(Math.ceil(this.n/13)),A},y.prototype.ireduce=function(A){var B,Q=A;do{this.split(Q,this.tmp),B=(Q=(Q=this.imulK(Q)).iadd(this.tmp)).bitLength()}while(B>this.n);var g=B0?Q.isub(this.p):Q.strip(),Q},y.prototype.split=function(A,B){A.iushrn(this.n,0,B)},y.prototype.imulK=function(A){return A.imul(this.k)},I(D,y),D.prototype.split=function(A,B){for(var Q=Math.min(A.length,9),g=0;g>>22,I=E}I>>>=22,A.words[g-10]=I,0===I&&A.length>10?A.length-=10:A.length-=9},D.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var B=0,Q=0;Q>>=26,A.words[Q]=I,B=g}return 0!==B&&(A.words[A.length++]=B),A},E._prime=function(A){if(c[A])return c[A];var B;if("k256"===A)B=new D;else if("p224"===A)B=new u;else if("p192"===A)B=new f;else{if("p25519"!==A)throw new Error("Unknown prime "+A);B=new w}return c[A]=B,B},F.prototype._verify1=function(A){g(0===A.negative,"red works only with positives"),g(A.red,"red works only with red numbers")},F.prototype._verify2=function(A,B){g(0==(A.negative|B.negative),"red works only with positives"),g(A.red&&A.red===B.red,"red works only with red numbers")},F.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},F.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},F.prototype.add=function(A,B){this._verify2(A,B);var Q=A.add(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q._forceRed(this)},F.prototype.iadd=function(A,B){this._verify2(A,B);var Q=A.iadd(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q},F.prototype.sub=function(A,B){this._verify2(A,B);var Q=A.sub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q._forceRed(this)},F.prototype.isub=function(A,B){this._verify2(A,B);var Q=A.isub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q},F.prototype.shl=function(A,B){return this._verify1(A),this.imod(A.ushln(B))},F.prototype.imul=function(A,B){return this._verify2(A,B),this.imod(A.imul(B))},F.prototype.mul=function(A,B){return this._verify2(A,B),this.imod(A.mul(B))},F.prototype.isqr=function(A){return this.imul(A,A.clone())},F.prototype.sqr=function(A){return this.mul(A,A)},F.prototype.sqrt=function(A){if(A.isZero())return A.clone();var B=this.m.andln(3);if(g(B%2==1),3===B){var Q=this.m.add(new E(1)).iushrn(2);return this.pow(A,Q)}for(var I=this.m.subn(1),i=0;!I.isZero()&&0===I.andln(1);)i++,I.iushrn(1);g(!I.isZero());var C=new E(1).toRed(this),t=C.redNeg(),e=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new E(2*o*o).toRed(this);0!==this.pow(o,e).cmp(t);)o.redIAdd(t);for(var s=this.pow(o,I),r=this.pow(A,I.addn(1).iushrn(1)),h=this.pow(A,I),n=i;0!==h.cmp(C);){for(var a=h,c=0;0!==a.cmp(C);c++)a=a.redSqr();g(c=0;g--){for(var e=B.words[g],o=t-1;o>=0;o--){var s=e>>o&1;I!==Q[0]&&(I=this.sqr(I)),0!==s||0!==i?(i<<=1,i|=s,(4===++C||0===g&&0===o)&&(I=this.mul(I,Q[i]),C=0,i=0)):C=0}t=26}return I},F.prototype.convertTo=function(A){var B=A.umod(this.m);return B===A?B.clone():B},F.prototype.convertFrom=function(A){var B=A.clone();return B.red=null,B},E.mont=function(A){return new d(A)},I(d,F),d.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},d.prototype.convertFrom=function(A){var B=this.imod(A.mul(this.rinv));return B.red=null,B},d.prototype.imul=function(A,B){if(A.isZero()||B.isZero())return A.words[0]=0,A.length=1,A;var Q=A.imul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),E=I;return I.cmp(this.m)>=0?E=I.isub(this.m):I.cmpn(0)<0&&(E=I.iadd(this.m)),E._forceRed(this)},d.prototype.mul=function(A,B){if(A.isZero()||B.isZero())return new E(0)._forceRed(this);var Q=A.mul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),i=I;return I.cmp(this.m)>=0?i=I.isub(this.m):I.cmpn(0)<0&&(i=I.iadd(this.m)),i._forceRed(this)},d.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A,this)}).call(this,Q(10)(A))},function(A,B){},function(A,B,Q){var g=Q(24),I=Q(0);function E(A,B){this.name=A,this.body=B,this.decoders={},this.encoders={}}B.define=function(A,B){return new E(A,B)},E.prototype._createNamed=function(A){var B;try{B=Q(191).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(A){B=function(A){this._initNamed(A)}}return I(B,A),B.prototype._initNamed=function(B){A.call(this,B)},new B(this)},E.prototype._getDecoder=function(A){return A=A||"der",this.decoders.hasOwnProperty(A)||(this.decoders[A]=this._createNamed(g.decoders[A])),this.decoders[A]},E.prototype.decode=function(A,B,Q){return this._getDecoder(B).decode(A,Q)},E.prototype._getEncoder=function(A){return A=A||"der",this.encoders.hasOwnProperty(A)||(this.encoders[A]=this._createNamed(g.encoders[A])),this.encoders[A]},E.prototype.encode=function(A,B,Q){return this._getEncoder(B).encode(A,Q)}},function(module,exports){var indexOf=function(A,B){if(A.indexOf)return A.indexOf(B);for(var Q=0;Q=B)throw new Error("invalid sig")}A.exports=function(A,B,Q,e,o){var s=i(Q);if("ec"===s.type){if("ecdsa"!==e&&"ecdsa/rsa"!==e)throw new Error("wrong public key type");return function(A,B,Q){var g=C[Q.data.algorithm.curve.join(".")];if(!g)throw new Error("unknown curve "+Q.data.algorithm.curve.join("."));var I=new E(g),i=Q.data.subjectPrivateKey.data;return I.verify(B,A,i)}(A,B,s)}if("dsa"===s.type){if("dsa"!==e)throw new Error("wrong public key type");return function(A,B,Q){var g=Q.data.p,E=Q.data.q,C=Q.data.g,e=Q.data.pub_key,o=i.signature.decode(A,"der"),s=o.s,r=o.r;t(s,E),t(r,E);var h=I.mont(g),n=s.invm(E);return 0===C.toRed(h).redPow(new I(B).mul(n).mod(E)).fromRed().mul(e.toRed(h).redPow(r.mul(n).mod(E)).fromRed()).mod(g).mod(E).cmp(r)}(A,B,s)}if("rsa"!==e&&"ecdsa/rsa"!==e)throw new Error("wrong public key type");B=g.concat([o,B]);for(var r=s.modulus.byteLength(),h=[1],n=0;B.length+h.length+2=49&&i<=54?i-49+10:i>=17&&i<=22?i-17+10:15&i}return g}function t(A,B,Q,g){for(var I=0,E=Math.min(A.length,Q),i=B;i=49?C-49+10:C>=17?C-17+10:C}return I}E.isBN=function(A){return A instanceof E||null!==A&&"object"==typeof A&&A.constructor.wordSize===E.wordSize&&Array.isArray(A.words)},E.max=function(A,B){return A.cmp(B)>0?A:B},E.min=function(A,B){return A.cmp(B)<0?A:B},E.prototype._init=function(A,B,Q){if("number"==typeof A)return this._initNumber(A,B,Q);if("object"==typeof A)return this._initArray(A,B,Q);"hex"===B&&(B=16),g(B===(0|B)&&B>=2&&B<=36);var I=0;"-"===(A=A.toString().replace(/\s+/g,""))[0]&&I++,16===B?this._parseHex(A,I):this._parseBase(A,B,I),"-"===A[0]&&(this.negative=1),this.strip(),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initNumber=function(A,B,Q){A<0&&(this.negative=1,A=-A),A<67108864?(this.words=[67108863&A],this.length=1):A<4503599627370496?(this.words=[67108863&A,A/67108864&67108863],this.length=2):(g(A<9007199254740992),this.words=[67108863&A,A/67108864&67108863,1],this.length=3),"le"===Q&&this._initArray(this.toArray(),B,Q)},E.prototype._initArray=function(A,B,Q){if(g("number"==typeof A.length),A.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(A.length/3),this.words=new Array(this.length);for(var I=0;I=0;I-=3)i=A[I]|A[I-1]<<8|A[I-2]<<16,this.words[E]|=i<>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);else if("le"===Q)for(I=0,E=0;I>>26-C&67108863,(C+=24)>=26&&(C-=26,E++);return this.strip()},E.prototype._parseHex=function(A,B){this.length=Math.ceil((A.length-B)/6),this.words=new Array(this.length);for(var Q=0;Q=B;Q-=6)I=C(A,Q,Q+6),this.words[g]|=I<>>26-E&4194303,(E+=24)>=26&&(E-=26,g++);Q+6!==B&&(I=C(A,B,Q+6),this.words[g]|=I<>>26-E&4194303),this.strip()},E.prototype._parseBase=function(A,B,Q){this.words=[0],this.length=1;for(var g=0,I=1;I<=67108863;I*=B)g++;g--,I=I/B|0;for(var E=A.length-Q,i=E%g,C=Math.min(E,E-i)+Q,e=0,o=Q;o1&&0===this.words[this.length-1];)this.length--;return this._normSign()},E.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},E.prototype.inspect=function(){return(this.red?""};var e=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],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],s=[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 r(A,B,Q){Q.negative=B.negative^A.negative;var g=A.length+B.length|0;Q.length=g,g=g-1|0;var I=0|A.words[0],E=0|B.words[0],i=I*E,C=67108863&i,t=i/67108864|0;Q.words[0]=C;for(var e=1;e>>26,s=67108863&t,r=Math.min(e,B.length-1),h=Math.max(0,e-A.length+1);h<=r;h++){var n=e-h|0;o+=(i=(I=0|A.words[n])*(E=0|B.words[h])+s)/67108864|0,s=67108863&i}Q.words[e]=0|s,t=0|o}return 0!==t?Q.words[e]=0|t:Q.length--,Q.strip()}E.prototype.toString=function(A,B){var Q;if(B=0|B||1,16===(A=A||10)||"hex"===A){Q="";for(var I=0,E=0,i=0;i>>24-I&16777215)||i!==this.length-1?e[6-t.length]+t+Q:t+Q,(I+=2)>=26&&(I-=26,i--)}for(0!==E&&(Q=E.toString(16)+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}if(A===(0|A)&&A>=2&&A<=36){var r=o[A],h=s[A];Q="";var n=this.clone();for(n.negative=0;!n.isZero();){var a=n.modn(h).toString(A);Q=(n=n.idivn(h)).isZero()?a+Q:e[r-a.length]+a+Q}for(this.isZero()&&(Q="0"+Q);Q.length%B!=0;)Q="0"+Q;return 0!==this.negative&&(Q="-"+Q),Q}g(!1,"Base should be between 2 and 36")},E.prototype.toNumber=function(){var A=this.words[0];return 2===this.length?A+=67108864*this.words[1]:3===this.length&&1===this.words[2]?A+=4503599627370496+67108864*this.words[1]:this.length>2&&g(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-A:A},E.prototype.toJSON=function(){return this.toString(16)},E.prototype.toBuffer=function(A,B){return g(void 0!==i),this.toArrayLike(i,A,B)},E.prototype.toArray=function(A,B){return this.toArrayLike(Array,A,B)},E.prototype.toArrayLike=function(A,B,Q){var I=this.byteLength(),E=Q||Math.max(1,I);g(I<=E,"byte array longer than desired length"),g(E>0,"Requested array length <= 0"),this.strip();var i,C,t="le"===B,e=new A(E),o=this.clone();if(t){for(C=0;!o.isZero();C++)i=o.andln(255),o.iushrn(8),e[C]=i;for(;C=4096&&(Q+=13,B>>>=13),B>=64&&(Q+=7,B>>>=7),B>=8&&(Q+=4,B>>>=4),B>=2&&(Q+=2,B>>>=2),Q+B},E.prototype._zeroBits=function(A){if(0===A)return 26;var B=A,Q=0;return 0==(8191&B)&&(Q+=13,B>>>=13),0==(127&B)&&(Q+=7,B>>>=7),0==(15&B)&&(Q+=4,B>>>=4),0==(3&B)&&(Q+=2,B>>>=2),0==(1&B)&&Q++,Q},E.prototype.bitLength=function(){var A=this.words[this.length-1],B=this._countBits(A);return 26*(this.length-1)+B},E.prototype.zeroBits=function(){if(this.isZero())return 0;for(var A=0,B=0;BA.length?this.clone().ior(A):A.clone().ior(this)},E.prototype.uor=function(A){return this.length>A.length?this.clone().iuor(A):A.clone().iuor(this)},E.prototype.iuand=function(A){var B;B=this.length>A.length?A:this;for(var Q=0;QA.length?this.clone().iand(A):A.clone().iand(this)},E.prototype.uand=function(A){return this.length>A.length?this.clone().iuand(A):A.clone().iuand(this)},E.prototype.iuxor=function(A){var B,Q;this.length>A.length?(B=this,Q=A):(B=A,Q=this);for(var g=0;gA.length?this.clone().ixor(A):A.clone().ixor(this)},E.prototype.uxor=function(A){return this.length>A.length?this.clone().iuxor(A):A.clone().iuxor(this)},E.prototype.inotn=function(A){g("number"==typeof A&&A>=0);var B=0|Math.ceil(A/26),Q=A%26;this._expand(B),Q>0&&B--;for(var I=0;I0&&(this.words[I]=~this.words[I]&67108863>>26-Q),this.strip()},E.prototype.notn=function(A){return this.clone().inotn(A)},E.prototype.setn=function(A,B){g("number"==typeof A&&A>=0);var Q=A/26|0,I=A%26;return this._expand(Q+1),this.words[Q]=B?this.words[Q]|1<A.length?(Q=this,g=A):(Q=A,g=this);for(var I=0,E=0;E>>26;for(;0!==I&&E>>26;if(this.length=Q.length,0!==I)this.words[this.length]=I,this.length++;else if(Q!==this)for(;EA.length?this.clone().iadd(A):A.clone().iadd(this)},E.prototype.isub=function(A){if(0!==A.negative){A.negative=0;var B=this.iadd(A);return A.negative=1,B._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(A),this.negative=1,this._normSign();var Q,g,I=this.cmp(A);if(0===I)return this.negative=0,this.length=1,this.words[0]=0,this;I>0?(Q=this,g=A):(Q=A,g=this);for(var E=0,i=0;i>26,this.words[i]=67108863&B;for(;0!==E&&i>26,this.words[i]=67108863&B;if(0===E&&i>>13,h=0|i[1],n=8191&h,a=h>>>13,c=0|i[2],y=8191&c,D=c>>>13,u=0|i[3],f=8191&u,w=u>>>13,F=0|i[4],d=8191&F,l=F>>>13,U=0|i[5],N=8191&U,H=U>>>13,G=0|i[6],Y=8191&G,L=G>>>13,R=0|i[7],p=8191&R,M=R>>>13,m=0|i[8],k=8191&m,S=m>>>13,b=0|i[9],v=8191&b,J=b>>>13,V=0|C[0],K=8191&V,x=V>>>13,Z=0|C[1],q=8191&Z,O=Z>>>13,j=0|C[2],W=8191&j,X=j>>>13,T=0|C[3],z=8191&T,_=T>>>13,P=0|C[4],$=8191&P,AA=P>>>13,BA=0|C[5],QA=8191&BA,gA=BA>>>13,IA=0|C[6],EA=8191&IA,iA=IA>>>13,CA=0|C[7],tA=8191&CA,eA=CA>>>13,oA=0|C[8],sA=8191&oA,rA=oA>>>13,hA=0|C[9],nA=8191&hA,aA=hA>>>13;Q.negative=A.negative^B.negative,Q.length=19;var cA=(e+(g=Math.imul(s,K))|0)+((8191&(I=(I=Math.imul(s,x))+Math.imul(r,K)|0))<<13)|0;e=((E=Math.imul(r,x))+(I>>>13)|0)+(cA>>>26)|0,cA&=67108863,g=Math.imul(n,K),I=(I=Math.imul(n,x))+Math.imul(a,K)|0,E=Math.imul(a,x);var yA=(e+(g=g+Math.imul(s,q)|0)|0)+((8191&(I=(I=I+Math.imul(s,O)|0)+Math.imul(r,q)|0))<<13)|0;e=((E=E+Math.imul(r,O)|0)+(I>>>13)|0)+(yA>>>26)|0,yA&=67108863,g=Math.imul(y,K),I=(I=Math.imul(y,x))+Math.imul(D,K)|0,E=Math.imul(D,x),g=g+Math.imul(n,q)|0,I=(I=I+Math.imul(n,O)|0)+Math.imul(a,q)|0,E=E+Math.imul(a,O)|0;var DA=(e+(g=g+Math.imul(s,W)|0)|0)+((8191&(I=(I=I+Math.imul(s,X)|0)+Math.imul(r,W)|0))<<13)|0;e=((E=E+Math.imul(r,X)|0)+(I>>>13)|0)+(DA>>>26)|0,DA&=67108863,g=Math.imul(f,K),I=(I=Math.imul(f,x))+Math.imul(w,K)|0,E=Math.imul(w,x),g=g+Math.imul(y,q)|0,I=(I=I+Math.imul(y,O)|0)+Math.imul(D,q)|0,E=E+Math.imul(D,O)|0,g=g+Math.imul(n,W)|0,I=(I=I+Math.imul(n,X)|0)+Math.imul(a,W)|0,E=E+Math.imul(a,X)|0;var uA=(e+(g=g+Math.imul(s,z)|0)|0)+((8191&(I=(I=I+Math.imul(s,_)|0)+Math.imul(r,z)|0))<<13)|0;e=((E=E+Math.imul(r,_)|0)+(I>>>13)|0)+(uA>>>26)|0,uA&=67108863,g=Math.imul(d,K),I=(I=Math.imul(d,x))+Math.imul(l,K)|0,E=Math.imul(l,x),g=g+Math.imul(f,q)|0,I=(I=I+Math.imul(f,O)|0)+Math.imul(w,q)|0,E=E+Math.imul(w,O)|0,g=g+Math.imul(y,W)|0,I=(I=I+Math.imul(y,X)|0)+Math.imul(D,W)|0,E=E+Math.imul(D,X)|0,g=g+Math.imul(n,z)|0,I=(I=I+Math.imul(n,_)|0)+Math.imul(a,z)|0,E=E+Math.imul(a,_)|0;var fA=(e+(g=g+Math.imul(s,$)|0)|0)+((8191&(I=(I=I+Math.imul(s,AA)|0)+Math.imul(r,$)|0))<<13)|0;e=((E=E+Math.imul(r,AA)|0)+(I>>>13)|0)+(fA>>>26)|0,fA&=67108863,g=Math.imul(N,K),I=(I=Math.imul(N,x))+Math.imul(H,K)|0,E=Math.imul(H,x),g=g+Math.imul(d,q)|0,I=(I=I+Math.imul(d,O)|0)+Math.imul(l,q)|0,E=E+Math.imul(l,O)|0,g=g+Math.imul(f,W)|0,I=(I=I+Math.imul(f,X)|0)+Math.imul(w,W)|0,E=E+Math.imul(w,X)|0,g=g+Math.imul(y,z)|0,I=(I=I+Math.imul(y,_)|0)+Math.imul(D,z)|0,E=E+Math.imul(D,_)|0,g=g+Math.imul(n,$)|0,I=(I=I+Math.imul(n,AA)|0)+Math.imul(a,$)|0,E=E+Math.imul(a,AA)|0;var wA=(e+(g=g+Math.imul(s,QA)|0)|0)+((8191&(I=(I=I+Math.imul(s,gA)|0)+Math.imul(r,QA)|0))<<13)|0;e=((E=E+Math.imul(r,gA)|0)+(I>>>13)|0)+(wA>>>26)|0,wA&=67108863,g=Math.imul(Y,K),I=(I=Math.imul(Y,x))+Math.imul(L,K)|0,E=Math.imul(L,x),g=g+Math.imul(N,q)|0,I=(I=I+Math.imul(N,O)|0)+Math.imul(H,q)|0,E=E+Math.imul(H,O)|0,g=g+Math.imul(d,W)|0,I=(I=I+Math.imul(d,X)|0)+Math.imul(l,W)|0,E=E+Math.imul(l,X)|0,g=g+Math.imul(f,z)|0,I=(I=I+Math.imul(f,_)|0)+Math.imul(w,z)|0,E=E+Math.imul(w,_)|0,g=g+Math.imul(y,$)|0,I=(I=I+Math.imul(y,AA)|0)+Math.imul(D,$)|0,E=E+Math.imul(D,AA)|0,g=g+Math.imul(n,QA)|0,I=(I=I+Math.imul(n,gA)|0)+Math.imul(a,QA)|0,E=E+Math.imul(a,gA)|0;var FA=(e+(g=g+Math.imul(s,EA)|0)|0)+((8191&(I=(I=I+Math.imul(s,iA)|0)+Math.imul(r,EA)|0))<<13)|0;e=((E=E+Math.imul(r,iA)|0)+(I>>>13)|0)+(FA>>>26)|0,FA&=67108863,g=Math.imul(p,K),I=(I=Math.imul(p,x))+Math.imul(M,K)|0,E=Math.imul(M,x),g=g+Math.imul(Y,q)|0,I=(I=I+Math.imul(Y,O)|0)+Math.imul(L,q)|0,E=E+Math.imul(L,O)|0,g=g+Math.imul(N,W)|0,I=(I=I+Math.imul(N,X)|0)+Math.imul(H,W)|0,E=E+Math.imul(H,X)|0,g=g+Math.imul(d,z)|0,I=(I=I+Math.imul(d,_)|0)+Math.imul(l,z)|0,E=E+Math.imul(l,_)|0,g=g+Math.imul(f,$)|0,I=(I=I+Math.imul(f,AA)|0)+Math.imul(w,$)|0,E=E+Math.imul(w,AA)|0,g=g+Math.imul(y,QA)|0,I=(I=I+Math.imul(y,gA)|0)+Math.imul(D,QA)|0,E=E+Math.imul(D,gA)|0,g=g+Math.imul(n,EA)|0,I=(I=I+Math.imul(n,iA)|0)+Math.imul(a,EA)|0,E=E+Math.imul(a,iA)|0;var dA=(e+(g=g+Math.imul(s,tA)|0)|0)+((8191&(I=(I=I+Math.imul(s,eA)|0)+Math.imul(r,tA)|0))<<13)|0;e=((E=E+Math.imul(r,eA)|0)+(I>>>13)|0)+(dA>>>26)|0,dA&=67108863,g=Math.imul(k,K),I=(I=Math.imul(k,x))+Math.imul(S,K)|0,E=Math.imul(S,x),g=g+Math.imul(p,q)|0,I=(I=I+Math.imul(p,O)|0)+Math.imul(M,q)|0,E=E+Math.imul(M,O)|0,g=g+Math.imul(Y,W)|0,I=(I=I+Math.imul(Y,X)|0)+Math.imul(L,W)|0,E=E+Math.imul(L,X)|0,g=g+Math.imul(N,z)|0,I=(I=I+Math.imul(N,_)|0)+Math.imul(H,z)|0,E=E+Math.imul(H,_)|0,g=g+Math.imul(d,$)|0,I=(I=I+Math.imul(d,AA)|0)+Math.imul(l,$)|0,E=E+Math.imul(l,AA)|0,g=g+Math.imul(f,QA)|0,I=(I=I+Math.imul(f,gA)|0)+Math.imul(w,QA)|0,E=E+Math.imul(w,gA)|0,g=g+Math.imul(y,EA)|0,I=(I=I+Math.imul(y,iA)|0)+Math.imul(D,EA)|0,E=E+Math.imul(D,iA)|0,g=g+Math.imul(n,tA)|0,I=(I=I+Math.imul(n,eA)|0)+Math.imul(a,tA)|0,E=E+Math.imul(a,eA)|0;var lA=(e+(g=g+Math.imul(s,sA)|0)|0)+((8191&(I=(I=I+Math.imul(s,rA)|0)+Math.imul(r,sA)|0))<<13)|0;e=((E=E+Math.imul(r,rA)|0)+(I>>>13)|0)+(lA>>>26)|0,lA&=67108863,g=Math.imul(v,K),I=(I=Math.imul(v,x))+Math.imul(J,K)|0,E=Math.imul(J,x),g=g+Math.imul(k,q)|0,I=(I=I+Math.imul(k,O)|0)+Math.imul(S,q)|0,E=E+Math.imul(S,O)|0,g=g+Math.imul(p,W)|0,I=(I=I+Math.imul(p,X)|0)+Math.imul(M,W)|0,E=E+Math.imul(M,X)|0,g=g+Math.imul(Y,z)|0,I=(I=I+Math.imul(Y,_)|0)+Math.imul(L,z)|0,E=E+Math.imul(L,_)|0,g=g+Math.imul(N,$)|0,I=(I=I+Math.imul(N,AA)|0)+Math.imul(H,$)|0,E=E+Math.imul(H,AA)|0,g=g+Math.imul(d,QA)|0,I=(I=I+Math.imul(d,gA)|0)+Math.imul(l,QA)|0,E=E+Math.imul(l,gA)|0,g=g+Math.imul(f,EA)|0,I=(I=I+Math.imul(f,iA)|0)+Math.imul(w,EA)|0,E=E+Math.imul(w,iA)|0,g=g+Math.imul(y,tA)|0,I=(I=I+Math.imul(y,eA)|0)+Math.imul(D,tA)|0,E=E+Math.imul(D,eA)|0,g=g+Math.imul(n,sA)|0,I=(I=I+Math.imul(n,rA)|0)+Math.imul(a,sA)|0,E=E+Math.imul(a,rA)|0;var UA=(e+(g=g+Math.imul(s,nA)|0)|0)+((8191&(I=(I=I+Math.imul(s,aA)|0)+Math.imul(r,nA)|0))<<13)|0;e=((E=E+Math.imul(r,aA)|0)+(I>>>13)|0)+(UA>>>26)|0,UA&=67108863,g=Math.imul(v,q),I=(I=Math.imul(v,O))+Math.imul(J,q)|0,E=Math.imul(J,O),g=g+Math.imul(k,W)|0,I=(I=I+Math.imul(k,X)|0)+Math.imul(S,W)|0,E=E+Math.imul(S,X)|0,g=g+Math.imul(p,z)|0,I=(I=I+Math.imul(p,_)|0)+Math.imul(M,z)|0,E=E+Math.imul(M,_)|0,g=g+Math.imul(Y,$)|0,I=(I=I+Math.imul(Y,AA)|0)+Math.imul(L,$)|0,E=E+Math.imul(L,AA)|0,g=g+Math.imul(N,QA)|0,I=(I=I+Math.imul(N,gA)|0)+Math.imul(H,QA)|0,E=E+Math.imul(H,gA)|0,g=g+Math.imul(d,EA)|0,I=(I=I+Math.imul(d,iA)|0)+Math.imul(l,EA)|0,E=E+Math.imul(l,iA)|0,g=g+Math.imul(f,tA)|0,I=(I=I+Math.imul(f,eA)|0)+Math.imul(w,tA)|0,E=E+Math.imul(w,eA)|0,g=g+Math.imul(y,sA)|0,I=(I=I+Math.imul(y,rA)|0)+Math.imul(D,sA)|0,E=E+Math.imul(D,rA)|0;var NA=(e+(g=g+Math.imul(n,nA)|0)|0)+((8191&(I=(I=I+Math.imul(n,aA)|0)+Math.imul(a,nA)|0))<<13)|0;e=((E=E+Math.imul(a,aA)|0)+(I>>>13)|0)+(NA>>>26)|0,NA&=67108863,g=Math.imul(v,W),I=(I=Math.imul(v,X))+Math.imul(J,W)|0,E=Math.imul(J,X),g=g+Math.imul(k,z)|0,I=(I=I+Math.imul(k,_)|0)+Math.imul(S,z)|0,E=E+Math.imul(S,_)|0,g=g+Math.imul(p,$)|0,I=(I=I+Math.imul(p,AA)|0)+Math.imul(M,$)|0,E=E+Math.imul(M,AA)|0,g=g+Math.imul(Y,QA)|0,I=(I=I+Math.imul(Y,gA)|0)+Math.imul(L,QA)|0,E=E+Math.imul(L,gA)|0,g=g+Math.imul(N,EA)|0,I=(I=I+Math.imul(N,iA)|0)+Math.imul(H,EA)|0,E=E+Math.imul(H,iA)|0,g=g+Math.imul(d,tA)|0,I=(I=I+Math.imul(d,eA)|0)+Math.imul(l,tA)|0,E=E+Math.imul(l,eA)|0,g=g+Math.imul(f,sA)|0,I=(I=I+Math.imul(f,rA)|0)+Math.imul(w,sA)|0,E=E+Math.imul(w,rA)|0;var HA=(e+(g=g+Math.imul(y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(y,aA)|0)+Math.imul(D,nA)|0))<<13)|0;e=((E=E+Math.imul(D,aA)|0)+(I>>>13)|0)+(HA>>>26)|0,HA&=67108863,g=Math.imul(v,z),I=(I=Math.imul(v,_))+Math.imul(J,z)|0,E=Math.imul(J,_),g=g+Math.imul(k,$)|0,I=(I=I+Math.imul(k,AA)|0)+Math.imul(S,$)|0,E=E+Math.imul(S,AA)|0,g=g+Math.imul(p,QA)|0,I=(I=I+Math.imul(p,gA)|0)+Math.imul(M,QA)|0,E=E+Math.imul(M,gA)|0,g=g+Math.imul(Y,EA)|0,I=(I=I+Math.imul(Y,iA)|0)+Math.imul(L,EA)|0,E=E+Math.imul(L,iA)|0,g=g+Math.imul(N,tA)|0,I=(I=I+Math.imul(N,eA)|0)+Math.imul(H,tA)|0,E=E+Math.imul(H,eA)|0,g=g+Math.imul(d,sA)|0,I=(I=I+Math.imul(d,rA)|0)+Math.imul(l,sA)|0,E=E+Math.imul(l,rA)|0;var GA=(e+(g=g+Math.imul(f,nA)|0)|0)+((8191&(I=(I=I+Math.imul(f,aA)|0)+Math.imul(w,nA)|0))<<13)|0;e=((E=E+Math.imul(w,aA)|0)+(I>>>13)|0)+(GA>>>26)|0,GA&=67108863,g=Math.imul(v,$),I=(I=Math.imul(v,AA))+Math.imul(J,$)|0,E=Math.imul(J,AA),g=g+Math.imul(k,QA)|0,I=(I=I+Math.imul(k,gA)|0)+Math.imul(S,QA)|0,E=E+Math.imul(S,gA)|0,g=g+Math.imul(p,EA)|0,I=(I=I+Math.imul(p,iA)|0)+Math.imul(M,EA)|0,E=E+Math.imul(M,iA)|0,g=g+Math.imul(Y,tA)|0,I=(I=I+Math.imul(Y,eA)|0)+Math.imul(L,tA)|0,E=E+Math.imul(L,eA)|0,g=g+Math.imul(N,sA)|0,I=(I=I+Math.imul(N,rA)|0)+Math.imul(H,sA)|0,E=E+Math.imul(H,rA)|0;var YA=(e+(g=g+Math.imul(d,nA)|0)|0)+((8191&(I=(I=I+Math.imul(d,aA)|0)+Math.imul(l,nA)|0))<<13)|0;e=((E=E+Math.imul(l,aA)|0)+(I>>>13)|0)+(YA>>>26)|0,YA&=67108863,g=Math.imul(v,QA),I=(I=Math.imul(v,gA))+Math.imul(J,QA)|0,E=Math.imul(J,gA),g=g+Math.imul(k,EA)|0,I=(I=I+Math.imul(k,iA)|0)+Math.imul(S,EA)|0,E=E+Math.imul(S,iA)|0,g=g+Math.imul(p,tA)|0,I=(I=I+Math.imul(p,eA)|0)+Math.imul(M,tA)|0,E=E+Math.imul(M,eA)|0,g=g+Math.imul(Y,sA)|0,I=(I=I+Math.imul(Y,rA)|0)+Math.imul(L,sA)|0,E=E+Math.imul(L,rA)|0;var LA=(e+(g=g+Math.imul(N,nA)|0)|0)+((8191&(I=(I=I+Math.imul(N,aA)|0)+Math.imul(H,nA)|0))<<13)|0;e=((E=E+Math.imul(H,aA)|0)+(I>>>13)|0)+(LA>>>26)|0,LA&=67108863,g=Math.imul(v,EA),I=(I=Math.imul(v,iA))+Math.imul(J,EA)|0,E=Math.imul(J,iA),g=g+Math.imul(k,tA)|0,I=(I=I+Math.imul(k,eA)|0)+Math.imul(S,tA)|0,E=E+Math.imul(S,eA)|0,g=g+Math.imul(p,sA)|0,I=(I=I+Math.imul(p,rA)|0)+Math.imul(M,sA)|0,E=E+Math.imul(M,rA)|0;var RA=(e+(g=g+Math.imul(Y,nA)|0)|0)+((8191&(I=(I=I+Math.imul(Y,aA)|0)+Math.imul(L,nA)|0))<<13)|0;e=((E=E+Math.imul(L,aA)|0)+(I>>>13)|0)+(RA>>>26)|0,RA&=67108863,g=Math.imul(v,tA),I=(I=Math.imul(v,eA))+Math.imul(J,tA)|0,E=Math.imul(J,eA),g=g+Math.imul(k,sA)|0,I=(I=I+Math.imul(k,rA)|0)+Math.imul(S,sA)|0,E=E+Math.imul(S,rA)|0;var pA=(e+(g=g+Math.imul(p,nA)|0)|0)+((8191&(I=(I=I+Math.imul(p,aA)|0)+Math.imul(M,nA)|0))<<13)|0;e=((E=E+Math.imul(M,aA)|0)+(I>>>13)|0)+(pA>>>26)|0,pA&=67108863,g=Math.imul(v,sA),I=(I=Math.imul(v,rA))+Math.imul(J,sA)|0,E=Math.imul(J,rA);var MA=(e+(g=g+Math.imul(k,nA)|0)|0)+((8191&(I=(I=I+Math.imul(k,aA)|0)+Math.imul(S,nA)|0))<<13)|0;e=((E=E+Math.imul(S,aA)|0)+(I>>>13)|0)+(MA>>>26)|0,MA&=67108863;var mA=(e+(g=Math.imul(v,nA))|0)+((8191&(I=(I=Math.imul(v,aA))+Math.imul(J,nA)|0))<<13)|0;return e=((E=Math.imul(J,aA))+(I>>>13)|0)+(mA>>>26)|0,mA&=67108863,t[0]=cA,t[1]=yA,t[2]=DA,t[3]=uA,t[4]=fA,t[5]=wA,t[6]=FA,t[7]=dA,t[8]=lA,t[9]=UA,t[10]=NA,t[11]=HA,t[12]=GA,t[13]=YA,t[14]=LA,t[15]=RA,t[16]=pA,t[17]=MA,t[18]=mA,0!==e&&(t[19]=e,Q.length++),Q};function n(A,B,Q){return(new a).mulp(A,B,Q)}function a(A,B){this.x=A,this.y=B}Math.imul||(h=r),E.prototype.mulTo=function(A,B){var Q=this.length+A.length;return 10===this.length&&10===A.length?h(this,A,B):Q<63?r(this,A,B):Q<1024?function(A,B,Q){Q.negative=B.negative^A.negative,Q.length=A.length+B.length;for(var g=0,I=0,E=0;E>>26)|0)>>>26,i&=67108863}Q.words[E]=C,g=i,i=I}return 0!==g?Q.words[E]=g:Q.length--,Q.strip()}(this,A,B):n(this,A,B)},a.prototype.makeRBT=function(A){for(var B=new Array(A),Q=E.prototype._countBits(A)-1,g=0;g>=1;return g},a.prototype.permute=function(A,B,Q,g,I,E){for(var i=0;i>>=1)I++;return 1<>>=13,Q[2*i+1]=8191&E,E>>>=13;for(i=2*B;i>=26,B+=I/67108864|0,B+=E>>>26,this.words[Q]=67108863&E}return 0!==B&&(this.words[Q]=B,this.length++),this},E.prototype.muln=function(A){return this.clone().imuln(A)},E.prototype.sqr=function(){return this.mul(this)},E.prototype.isqr=function(){return this.imul(this.clone())},E.prototype.pow=function(A){var B=function(A){for(var B=new Array(A.bitLength()),Q=0;Q>>I}return B}(A);if(0===B.length)return new E(1);for(var Q=this,g=0;g=0);var B,Q=A%26,I=(A-Q)/26,E=67108863>>>26-Q<<26-Q;if(0!==Q){var i=0;for(B=0;B>>26-Q}i&&(this.words[B]=i,this.length++)}if(0!==I){for(B=this.length-1;B>=0;B--)this.words[B+I]=this.words[B];for(B=0;B=0),I=B?(B-B%26)/26:0;var E=A%26,i=Math.min((A-E)/26,this.length),C=67108863^67108863>>>E<i)for(this.length-=i,e=0;e=0&&(0!==o||e>=I);e--){var s=0|this.words[e];this.words[e]=o<<26-E|s>>>E,o=s&C}return t&&0!==o&&(t.words[t.length++]=o),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},E.prototype.ishrn=function(A,B,Q){return g(0===this.negative),this.iushrn(A,B,Q)},E.prototype.shln=function(A){return this.clone().ishln(A)},E.prototype.ushln=function(A){return this.clone().iushln(A)},E.prototype.shrn=function(A){return this.clone().ishrn(A)},E.prototype.ushrn=function(A){return this.clone().iushrn(A)},E.prototype.testn=function(A){g("number"==typeof A&&A>=0);var B=A%26,Q=(A-B)/26,I=1<=0);var B=A%26,Q=(A-B)/26;if(g(0===this.negative,"imaskn works only with positive numbers"),this.length<=Q)return this;if(0!==B&&Q++,this.length=Math.min(Q,this.length),0!==B){var I=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},E.prototype.isubn=function(A){if(g("number"==typeof A),g(A<67108864),A<0)return this.iaddn(-A);if(0!==this.negative)return this.negative=0,this.iaddn(A),this.negative=1,this;if(this.words[0]-=A,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(t/67108864|0),this.words[I+Q]=67108863&E}for(;I>26,this.words[I+Q]=67108863&E;if(0===C)return this.strip();for(g(-1===C),C=0,I=0;I>26,this.words[I]=67108863&E;return this.negative=1,this.strip()},E.prototype._wordDiv=function(A,B){var Q=(this.length,A.length),g=this.clone(),I=A,i=0|I.words[I.length-1];0!==(Q=26-this._countBits(i))&&(I=I.ushln(Q),g.iushln(Q),i=0|I.words[I.length-1]);var C,t=g.length-I.length;if("mod"!==B){(C=new E(null)).length=t+1,C.words=new Array(C.length);for(var e=0;e=0;s--){var r=67108864*(0|g.words[I.length+s])+(0|g.words[I.length+s-1]);for(r=Math.min(r/i|0,67108863),g._ishlnsubmul(I,r,s);0!==g.negative;)r--,g.negative=0,g._ishlnsubmul(I,1,s),g.isZero()||(g.negative^=1);C&&(C.words[s]=r)}return C&&C.strip(),g.strip(),"div"!==B&&0!==Q&&g.iushrn(Q),{div:C||null,mod:g}},E.prototype.divmod=function(A,B,Q){return g(!A.isZero()),this.isZero()?{div:new E(0),mod:new E(0)}:0!==this.negative&&0===A.negative?(C=this.neg().divmod(A,B),"mod"!==B&&(I=C.div.neg()),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.iadd(A)),{div:I,mod:i}):0===this.negative&&0!==A.negative?(C=this.divmod(A.neg(),B),"mod"!==B&&(I=C.div.neg()),{div:I,mod:C.mod}):0!=(this.negative&A.negative)?(C=this.neg().divmod(A.neg(),B),"div"!==B&&(i=C.mod.neg(),Q&&0!==i.negative&&i.isub(A)),{div:C.div,mod:i}):A.length>this.length||this.cmp(A)<0?{div:new E(0),mod:this}:1===A.length?"div"===B?{div:this.divn(A.words[0]),mod:null}:"mod"===B?{div:null,mod:new E(this.modn(A.words[0]))}:{div:this.divn(A.words[0]),mod:new E(this.modn(A.words[0]))}:this._wordDiv(A,B);var I,i,C},E.prototype.div=function(A){return this.divmod(A,"div",!1).div},E.prototype.mod=function(A){return this.divmod(A,"mod",!1).mod},E.prototype.umod=function(A){return this.divmod(A,"mod",!0).mod},E.prototype.divRound=function(A){var B=this.divmod(A);if(B.mod.isZero())return B.div;var Q=0!==B.div.negative?B.mod.isub(A):B.mod,g=A.ushrn(1),I=A.andln(1),E=Q.cmp(g);return E<0||1===I&&0===E?B.div:0!==B.div.negative?B.div.isubn(1):B.div.iaddn(1)},E.prototype.modn=function(A){g(A<=67108863);for(var B=(1<<26)%A,Q=0,I=this.length-1;I>=0;I--)Q=(B*Q+(0|this.words[I]))%A;return Q},E.prototype.idivn=function(A){g(A<=67108863);for(var B=0,Q=this.length-1;Q>=0;Q--){var I=(0|this.words[Q])+67108864*B;this.words[Q]=I/A|0,B=I%A}return this.strip()},E.prototype.divn=function(A){return this.clone().idivn(A)},E.prototype.egcd=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I=new E(1),i=new E(0),C=new E(0),t=new E(1),e=0;B.isEven()&&Q.isEven();)B.iushrn(1),Q.iushrn(1),++e;for(var o=Q.clone(),s=B.clone();!B.isZero();){for(var r=0,h=1;0==(B.words[0]&h)&&r<26;++r,h<<=1);if(r>0)for(B.iushrn(r);r-- >0;)(I.isOdd()||i.isOdd())&&(I.iadd(o),i.isub(s)),I.iushrn(1),i.iushrn(1);for(var n=0,a=1;0==(Q.words[0]&a)&&n<26;++n,a<<=1);if(n>0)for(Q.iushrn(n);n-- >0;)(C.isOdd()||t.isOdd())&&(C.iadd(o),t.isub(s)),C.iushrn(1),t.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),I.isub(C),i.isub(t)):(Q.isub(B),C.isub(I),t.isub(i))}return{a:C,b:t,gcd:Q.iushln(e)}},E.prototype._invmp=function(A){g(0===A.negative),g(!A.isZero());var B=this,Q=A.clone();B=0!==B.negative?B.umod(A):B.clone();for(var I,i=new E(1),C=new E(0),t=Q.clone();B.cmpn(1)>0&&Q.cmpn(1)>0;){for(var e=0,o=1;0==(B.words[0]&o)&&e<26;++e,o<<=1);if(e>0)for(B.iushrn(e);e-- >0;)i.isOdd()&&i.iadd(t),i.iushrn(1);for(var s=0,r=1;0==(Q.words[0]&r)&&s<26;++s,r<<=1);if(s>0)for(Q.iushrn(s);s-- >0;)C.isOdd()&&C.iadd(t),C.iushrn(1);B.cmp(Q)>=0?(B.isub(Q),i.isub(C)):(Q.isub(B),C.isub(i))}return(I=0===B.cmpn(1)?i:C).cmpn(0)<0&&I.iadd(A),I},E.prototype.gcd=function(A){if(this.isZero())return A.abs();if(A.isZero())return this.abs();var B=this.clone(),Q=A.clone();B.negative=0,Q.negative=0;for(var g=0;B.isEven()&&Q.isEven();g++)B.iushrn(1),Q.iushrn(1);for(;;){for(;B.isEven();)B.iushrn(1);for(;Q.isEven();)Q.iushrn(1);var I=B.cmp(Q);if(I<0){var E=B;B=Q,Q=E}else if(0===I||0===Q.cmpn(1))break;B.isub(Q)}return Q.iushln(g)},E.prototype.invm=function(A){return this.egcd(A).a.umod(A)},E.prototype.isEven=function(){return 0==(1&this.words[0])},E.prototype.isOdd=function(){return 1==(1&this.words[0])},E.prototype.andln=function(A){return this.words[0]&A},E.prototype.bincn=function(A){g("number"==typeof A);var B=A%26,Q=(A-B)/26,I=1<>>26,C&=67108863,this.words[i]=C}return 0!==E&&(this.words[i]=E,this.length++),this},E.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},E.prototype.cmpn=function(A){var B,Q=A<0;if(0!==this.negative&&!Q)return-1;if(0===this.negative&&Q)return 1;if(this.strip(),this.length>1)B=1;else{Q&&(A=-A),g(A<=67108863,"Number is too big");var I=0|this.words[0];B=I===A?0:IA.length)return 1;if(this.length=0;Q--){var g=0|this.words[Q],I=0|A.words[Q];if(g!==I){gI&&(B=1);break}}return B},E.prototype.gtn=function(A){return 1===this.cmpn(A)},E.prototype.gt=function(A){return 1===this.cmp(A)},E.prototype.gten=function(A){return this.cmpn(A)>=0},E.prototype.gte=function(A){return this.cmp(A)>=0},E.prototype.ltn=function(A){return-1===this.cmpn(A)},E.prototype.lt=function(A){return-1===this.cmp(A)},E.prototype.lten=function(A){return this.cmpn(A)<=0},E.prototype.lte=function(A){return this.cmp(A)<=0},E.prototype.eqn=function(A){return 0===this.cmpn(A)},E.prototype.eq=function(A){return 0===this.cmp(A)},E.red=function(A){return new F(A)},E.prototype.toRed=function(A){return g(!this.red,"Already a number in reduction context"),g(0===this.negative,"red works only with positives"),A.convertTo(this)._forceRed(A)},E.prototype.fromRed=function(){return g(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},E.prototype._forceRed=function(A){return this.red=A,this},E.prototype.forceRed=function(A){return g(!this.red,"Already a number in reduction context"),this._forceRed(A)},E.prototype.redAdd=function(A){return g(this.red,"redAdd works only with red numbers"),this.red.add(this,A)},E.prototype.redIAdd=function(A){return g(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,A)},E.prototype.redSub=function(A){return g(this.red,"redSub works only with red numbers"),this.red.sub(this,A)},E.prototype.redISub=function(A){return g(this.red,"redISub works only with red numbers"),this.red.isub(this,A)},E.prototype.redShl=function(A){return g(this.red,"redShl works only with red numbers"),this.red.shl(this,A)},E.prototype.redMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.mul(this,A)},E.prototype.redIMul=function(A){return g(this.red,"redMul works only with red numbers"),this.red._verify2(this,A),this.red.imul(this,A)},E.prototype.redSqr=function(){return g(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},E.prototype.redISqr=function(){return g(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},E.prototype.redSqrt=function(){return g(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},E.prototype.redInvm=function(){return g(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},E.prototype.redNeg=function(){return g(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},E.prototype.redPow=function(A){return g(this.red&&!A.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,A)};var c={k256:null,p224:null,p192:null,p25519:null};function y(A,B){this.name=A,this.p=new E(B,16),this.n=this.p.bitLength(),this.k=new E(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function D(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function u(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function f(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function F(A){if("string"==typeof A){var B=E._prime(A);this.m=B.p,this.prime=B}else g(A.gtn(1),"modulus must be greater than 1"),this.m=A,this.prime=null}function d(A){F.call(this,A),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new E(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)}y.prototype._tmp=function(){var A=new E(null);return A.words=new Array(Math.ceil(this.n/13)),A},y.prototype.ireduce=function(A){var B,Q=A;do{this.split(Q,this.tmp),B=(Q=(Q=this.imulK(Q)).iadd(this.tmp)).bitLength()}while(B>this.n);var g=B0?Q.isub(this.p):Q.strip(),Q},y.prototype.split=function(A,B){A.iushrn(this.n,0,B)},y.prototype.imulK=function(A){return A.imul(this.k)},I(D,y),D.prototype.split=function(A,B){for(var Q=Math.min(A.length,9),g=0;g>>22,I=E}I>>>=22,A.words[g-10]=I,0===I&&A.length>10?A.length-=10:A.length-=9},D.prototype.imulK=function(A){A.words[A.length]=0,A.words[A.length+1]=0,A.length+=2;for(var B=0,Q=0;Q>>=26,A.words[Q]=I,B=g}return 0!==B&&(A.words[A.length++]=B),A},E._prime=function(A){if(c[A])return c[A];var B;if("k256"===A)B=new D;else if("p224"===A)B=new u;else if("p192"===A)B=new f;else{if("p25519"!==A)throw new Error("Unknown prime "+A);B=new w}return c[A]=B,B},F.prototype._verify1=function(A){g(0===A.negative,"red works only with positives"),g(A.red,"red works only with red numbers")},F.prototype._verify2=function(A,B){g(0==(A.negative|B.negative),"red works only with positives"),g(A.red&&A.red===B.red,"red works only with red numbers")},F.prototype.imod=function(A){return this.prime?this.prime.ireduce(A)._forceRed(this):A.umod(this.m)._forceRed(this)},F.prototype.neg=function(A){return A.isZero()?A.clone():this.m.sub(A)._forceRed(this)},F.prototype.add=function(A,B){this._verify2(A,B);var Q=A.add(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q._forceRed(this)},F.prototype.iadd=function(A,B){this._verify2(A,B);var Q=A.iadd(B);return Q.cmp(this.m)>=0&&Q.isub(this.m),Q},F.prototype.sub=function(A,B){this._verify2(A,B);var Q=A.sub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q._forceRed(this)},F.prototype.isub=function(A,B){this._verify2(A,B);var Q=A.isub(B);return Q.cmpn(0)<0&&Q.iadd(this.m),Q},F.prototype.shl=function(A,B){return this._verify1(A),this.imod(A.ushln(B))},F.prototype.imul=function(A,B){return this._verify2(A,B),this.imod(A.imul(B))},F.prototype.mul=function(A,B){return this._verify2(A,B),this.imod(A.mul(B))},F.prototype.isqr=function(A){return this.imul(A,A.clone())},F.prototype.sqr=function(A){return this.mul(A,A)},F.prototype.sqrt=function(A){if(A.isZero())return A.clone();var B=this.m.andln(3);if(g(B%2==1),3===B){var Q=this.m.add(new E(1)).iushrn(2);return this.pow(A,Q)}for(var I=this.m.subn(1),i=0;!I.isZero()&&0===I.andln(1);)i++,I.iushrn(1);g(!I.isZero());var C=new E(1).toRed(this),t=C.redNeg(),e=this.m.subn(1).iushrn(1),o=this.m.bitLength();for(o=new E(2*o*o).toRed(this);0!==this.pow(o,e).cmp(t);)o.redIAdd(t);for(var s=this.pow(o,I),r=this.pow(A,I.addn(1).iushrn(1)),h=this.pow(A,I),n=i;0!==h.cmp(C);){for(var a=h,c=0;0!==a.cmp(C);c++)a=a.redSqr();g(c=0;g--){for(var e=B.words[g],o=t-1;o>=0;o--){var s=e>>o&1;I!==Q[0]&&(I=this.sqr(I)),0!==s||0!==i?(i<<=1,i|=s,(4===++C||0===g&&0===o)&&(I=this.mul(I,Q[i]),C=0,i=0)):C=0}t=26}return I},F.prototype.convertTo=function(A){var B=A.umod(this.m);return B===A?B.clone():B},F.prototype.convertFrom=function(A){var B=A.clone();return B.red=null,B},E.mont=function(A){return new d(A)},I(d,F),d.prototype.convertTo=function(A){return this.imod(A.ushln(this.shift))},d.prototype.convertFrom=function(A){var B=this.imod(A.mul(this.rinv));return B.red=null,B},d.prototype.imul=function(A,B){if(A.isZero()||B.isZero())return A.words[0]=0,A.length=1,A;var Q=A.imul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),E=I;return I.cmp(this.m)>=0?E=I.isub(this.m):I.cmpn(0)<0&&(E=I.iadd(this.m)),E._forceRed(this)},d.prototype.mul=function(A,B){if(A.isZero()||B.isZero())return new E(0)._forceRed(this);var Q=A.mul(B),g=Q.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),I=Q.isub(g).iushrn(this.shift),i=I;return I.cmp(this.m)>=0?i=I.isub(this.m):I.cmpn(0)<0&&(i=I.iadd(this.m)),i._forceRed(this)},d.prototype.invm=function(A){return this.imod(A._invmp(this.m).mul(this.r2))._forceRed(this)}}(A,this)}).call(this,Q(10)(A))},function(A,B){},function(A,B,Q){B.publicEncrypt=Q(207),B.privateDecrypt=Q(209),B.privateEncrypt=function(A,Q){return B.publicEncrypt(A,Q,!0)},B.publicDecrypt=function(A,Q){return B.privateDecrypt(A,Q,!0)}},function(A,B,Q){var g=Q(30),I=Q(14),E=Q(20),i=Q(97),C=Q(98),t=Q(47),e=Q(99),o=Q(43),s=Q(1).Buffer;A.exports=function(A,B,Q){var r;r=A.padding?A.padding:Q?1:4;var h,n=g(A);if(4===r)h=function(A,B){var Q=A.modulus.byteLength(),g=B.length,e=E("sha1").update(s.alloc(0)).digest(),o=e.length,r=2*o;if(g>Q-r-2)throw new Error("message too long");var h=s.alloc(Q-g-r-2),n=Q-o-1,a=I(o),c=C(s.concat([e,h,s.alloc(1,1),B],n),i(a,n)),y=C(a,i(c,o));return new t(s.concat([s.alloc(1),y,c],Q))}(n,B);else if(1===r)h=function(A,B,Q){var g,E=B.length,i=A.modulus.byteLength();if(E>i-11)throw new Error("message too long");g=Q?s.alloc(i-E-3,255):function(A){var B,Q=s.allocUnsafe(A),g=0,E=I(2*A),i=0;for(;g=0)throw new Error("data too long for modulus")}return Q?o(h,n):e(h,n)}},function(A,B){},function(A,B,Q){var g=Q(30),I=Q(97),E=Q(98),i=Q(47),C=Q(43),t=Q(20),e=Q(99),o=Q(1).Buffer;A.exports=function(A,B,Q){var s;s=A.padding?A.padding:Q?1:4;var r,h=g(A),n=h.modulus.byteLength();if(B.length>n||new i(B).cmp(h.modulus)>=0)throw new Error("decryption error");r=Q?e(new i(B),h):C(B,h);var a=o.alloc(n-r.length);if(r=o.concat([a,r],n),4===s)return function(A,B){var Q=A.modulus.byteLength(),g=t("sha1").update(o.alloc(0)).digest(),i=g.length;if(0!==B[0])throw new Error("decryption error");var C=B.slice(1,i+1),e=B.slice(i+1),s=E(C,I(e,i)),r=E(e,I(s,Q-i-1));if(function(A,B){A=o.from(A),B=o.from(B);var Q=0,g=A.length;A.length!==B.length&&(Q++,g=Math.min(A.length,B.length));var I=-1;for(;++I=B.length){E++;break}var i=B.slice(2,I-1);("0002"!==g.toString("hex")&&!Q||"0001"!==g.toString("hex")&&Q)&&E++;i.length<8&&E++;if(E)throw new Error("decryption error");return B.slice(I)}(0,r,Q);if(3===s)return r;throw new Error("unknown padding")}},function(A,B,Q){"use strict";(function(A,g){function I(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var E=Q(1),i=Q(14),C=E.Buffer,t=E.kMaxLength,e=A.crypto||A.msCrypto,o=Math.pow(2,32)-1;function s(A,B){if("number"!=typeof A||A!=A)throw new TypeError("offset must be a number");if(A>o||A<0)throw new TypeError("offset must be a uint32");if(A>t||A>B)throw new RangeError("offset out of range")}function r(A,B,Q){if("number"!=typeof A||A!=A)throw new TypeError("size must be a number");if(A>o||A<0)throw new TypeError("size must be a uint32");if(A+B>Q||A>t)throw new RangeError("buffer too small")}function h(A,B,Q,I){if(g.browser){var E=A.buffer,C=new Uint8Array(E,B,Q);return e.getRandomValues(C),I?void g.nextTick((function(){I(null,A)})):A}if(!I)return i(Q).copy(A,B),A;i(Q,(function(Q,g){if(Q)return I(Q);g.copy(A,B),I(null,A)}))}e&&e.getRandomValues||!g.browser?(B.randomFill=function(B,Q,g,I){if(!(C.isBuffer(B)||B instanceof A.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof Q)I=Q,Q=0,g=B.length;else if("function"==typeof g)I=g,g=B.length-Q;else if("function"!=typeof I)throw new TypeError('"cb" argument must be a function');return s(Q,B.length),r(g,Q,B.length),h(B,Q,g,I)},B.randomFillSync=function(B,Q,g){void 0===Q&&(Q=0);if(!(C.isBuffer(B)||B instanceof A.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');s(Q,B.length),void 0===g&&(g=B.length-Q);return r(g,Q,B.length),h(B,Q,g)}):(B.randomFill=I,B.randomFillSync=I)}).call(this,Q(4),Q(3))}]); //# sourceMappingURL=h264-mp4-encoder.web.js.map