var Oidc=function(t){var e={};function r(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=t,r.c=e,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)r.d(i,n,function(e){return t[e]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function e(){return t.default}:function e(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=207)}([function(t,e){"function"==typeof Object.create?t.exports=function t(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function t(e,r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r=4){for(var e=arguments.length,r=Array(e),i=0;i=3){for(var e=arguments.length,r=Array(e),i=0;i=2){for(var e=arguments.length,r=Array(e),i=0;i=1){for(var e=arguments.length,r=Array(e),i=0;i1)for(var r=1;r(n>>1)-1?(n>>1)-h:h,o.isubn(a)):a=0,i[s]=a,o.iushrn(1)}return i},i.getJSF=function h(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var i=0,n=0;t.cmpn(-i)>0||e.cmpn(-n)>0;){var o,s,a,h=t.andln(3)+i&3,u=e.andln(3)+n&3;if(3===h&&(h=-1),3===u&&(u=-1),0==(1&h))o=0;else o=3!==(a=t.andln(7)+i&7)&&5!==a||2!==u?h:-h;if(r[0].push(o),0==(1&u))s=0;else s=3!==(a=e.andln(7)+n&7)&&5!==a||2!==h?u:-u;r[1].push(s),2*i===o+1&&(i=1-i),2*n===s+1&&(n=1-n),t.iushrn(1),e.iushrn(1)}return r},i.cachedProperty=function u(t,e,r){var i="_"+e;t.prototype[e]=function t(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},i.parseBytes=function f(t){return"string"==typeof t?i.toArray(t,"hex"):t},i.intFromLE=function c(t){return new n(t,"hex","le")}},function(t,e){var r={}.hasOwnProperty;t.exports=function(t,e){return r.call(t,e)}},function(t,e,r){"use strict";var i=r(10),n=r(0);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function h(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=n,e.toArray=function u(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n>6|192,r[i++]=63&s|128):o(t,n)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++n)),r[i++]=s>>18|240,r[i++]=s>>12&63|128,r[i++]=s>>6&63|128,r[i++]=63&s|128):(r[i++]=s>>12|224,r[i++]=s>>6&63|128,r[i++]=63&s|128)}else for(n=0;n>>0}return s},e.split32=function d(t,e){for(var r=new Array(4*t.length),i=0,n=0;i>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},e.rotr32=function p(t,e){return t>>>e|t<<32-e},e.rotl32=function m(t,e){return t<>>32-e},e.sum32=function g(t,e){return t+e>>>0},e.sum32_3=function v(t,e,r){return t+e+r>>>0},e.sum32_4=function b(t,e,r,i){return t+e+r+i>>>0},e.sum32_5=function y(t,e,r,i,n){return t+e+r+i+n>>>0},e.sum64=function w(t,e,r,i){var n=t[e],o=i+t[e+1]>>>0,s=(o>>0,t[e+1]=o},e.sum64_hi=function _(t,e,r,i){return(e+i>>>0>>0},e.sum64_lo=function M(t,e,r,i){return e+i>>>0},e.sum64_4_hi=function S(t,e,r,i,n,o,s,a){var h=0,u=e;return h+=(u=u+i>>>0)>>0)>>0)>>0},e.sum64_4_lo=function k(t,e,r,i,n,o,s,a){return e+i+o+a>>>0},e.sum64_5_hi=function E(t,e,r,i,n,o,s,a,h,u){var f=0,c=e;return f+=(c=c+i>>>0)>>0)>>0)>>0)>>0},e.sum64_5_lo=function R(t,e,r,i,n,o,s,a,h,u){return e+i+o+a+u>>>0},e.rotr64_hi=function A(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function x(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function T(t,e,r){return t>>>r},e.shr64_lo=function P(t,e,r){return(t<<32-r|e>>>r)>>>0}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,r){var i=r(14);t.exports=function(t){if(!i(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,r){(function(t){!function(t,e){"use strict";function i(t,e){if(!t)throw new Error(e||"Assertion failed")}function n(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s=r(340).Buffer}catch(t){}function a(t,e,r){for(var i=0,n=Math.min(t.length,r),o=e;o=49&&s<=54?s-49+10:s>=17&&s<=22?s-17+10:15&s}return i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}o.isBN=function t(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function t(e,r){return e.cmp(r)>0?e:r},o.min=function t(e,r){return e.cmp(r)<0?e:r},o.prototype._init=function t(e,r,n){if("number"==typeof e)return this._initNumber(e,r,n);if("object"==typeof e)return this._initArray(e,r,n);"hex"===r&&(r=16),i(r===(0|r)&&r>=2&&r<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&o++,16===r?this._parseHex(e,o):this._parseBase(e,r,o),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),r,n)},o.prototype._initNumber=function t(e,r,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),r,n)},o.prototype._initArray=function t(e,r,n){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var o=0;o=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[s]|=a<>>26-h&67108863,(h+=24)>=26&&(h-=26,s++);else if("le"===n)for(o=0,s=0;o>>26-h&67108863,(h+=24)>=26&&(h-=26,s++);return this.strip()},o.prototype._parseHex=function t(e,r){this.length=Math.ceil((e.length-r)/6),this.words=new Array(this.length);for(var i=0;i=r;i-=6)o=a(e,i,i+6),this.words[n]|=o<>>26-s&4194303,(s+=24)>=26&&(s-=26,n++);i+6!==r&&(o=a(e,r,i+6),this.words[n]|=o<>>26-s&4194303),this.strip()},o.prototype._parseBase=function t(e,r,i){this.words=[0],this.length=1;for(var n=0,o=1;o<=67108863;o*=r)n++;n--,o=o/r|0;for(var s=e.length-i,a=s%n,u=Math.min(s,s-a)+i,f=0,c=i;c1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function t(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function t(){return(this.red?""};var u=["","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"],f=[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],c=[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 l(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,c=67108863&h,l=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=l;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+c)/67108864|0,c=67108863&s}r.words[u]=0|c,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}o.prototype.toString=function t(e,r){var n;if(r=0|r||1,16===(e=e||10)||"hex"===e){n="";for(var o=0,s=0,a=0;a>>24-o&16777215)||a!==this.length-1?u[6-l.length]+l+n:l+n,(o+=2)>=26&&(o-=26,a--)}for(0!==s&&(n=s.toString(16)+n);n.length%r!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var d=f[e],p=c[e];n="";var m=this.clone();for(m.negative=0;!m.isZero();){var g=m.modn(p).toString(e);n=(m=m.idivn(p)).isZero()?g+n:u[d-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%r!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function t(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function t(){return this.toString(16)},o.prototype.toBuffer=function t(e,r){return i(void 0!==s),this.toArrayLike(s,e,r)},o.prototype.toArray=function t(e,r){return this.toArrayLike(Array,e,r)},o.prototype.toArrayLike=function t(e,r,n){var o=this.byteLength(),s=n||Math.max(1,o);i(o<=s,"byte array longer than desired length"),i(s>0,"Requested array length <= 0"),this.strip();var a,h,u="le"===r,f=new e(s),c=this.clone();if(u){for(h=0;!c.isZero();h++)a=c.andln(255),c.iushrn(8),f[h]=a;for(;h=4096&&(i+=13,r>>>=13),r>=64&&(i+=7,r>>>=7),r>=8&&(i+=4,r>>>=4),r>=2&&(i+=2,r>>>=2),i+r},o.prototype._zeroBits=function t(e){if(0===e)return 26;var r=e,i=0;return 0==(8191&r)&&(i+=13,r>>>=13),0==(127&r)&&(i+=7,r>>>=7),0==(15&r)&&(i+=4,r>>>=4),0==(3&r)&&(i+=2,r>>>=2),0==(1&r)&&i++,i},o.prototype.bitLength=function t(){var e=this.words[this.length-1],r=this._countBits(e);return 26*(this.length-1)+r},o.prototype.zeroBits=function t(){if(this.isZero())return 0;for(var e=0,r=0;re.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function t(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function t(e){var r;r=this.length>e.length?e:this;for(var i=0;ie.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function t(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function t(e){var r,i;this.length>e.length?(r=this,i=e):(r=e,i=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function t(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function t(e){i("number"==typeof e&&e>=0);var r=0|Math.ceil(e/26),n=e%26;this._expand(r),n>0&&r--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-n),this.strip()},o.prototype.notn=function t(e){return this.clone().inotn(e)},o.prototype.setn=function t(e,r){i("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=r?this.words[n]|1<e.length?(i=this,n=e):(i=e,n=this);for(var o=0,s=0;s>>26;for(;0!==o&&s>>26;if(this.length=i.length,0!==o)this.words[this.length]=o,this.length++;else if(i!==this)for(;se.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function t(e){if(0!==e.negative){e.negative=0;var r=this.iadd(e);return e.negative=1,r._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i,n,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(i=this,n=e):(i=e,n=this);for(var s=0,a=0;a>26,this.words[a]=67108863&r;for(;0!==s&&a>26,this.words[a]=67108863&r;if(0===s&&a>>13,p=0|a[1],m=8191&p,g=p>>>13,v=0|a[2],b=8191&v,y=v>>>13,w=0|a[3],_=8191&w,M=w>>>13,S=0|a[4],k=8191&S,E=S>>>13,R=0|a[5],A=8191&R,x=R>>>13,T=0|a[6],P=8191&T,I=T>>>13,L=0|a[7],O=8191&L,j=L>>>13,B=0|a[8],C=8191&B,U=B>>>13,N=0|a[9],q=8191&N,D=N>>>13,z=0|h[0],F=8191&z,W=z>>>13,H=0|h[1],K=8191&H,Z=H>>>13,V=0|h[2],J=8191&V,Y=V>>>13,G=0|h[3],X=8191&G,Q=G>>>13,$=0|h[4],tt=8191&$,et=$>>>13,rt=0|h[5],it=8191&rt,nt=rt>>>13,ot=0|h[6],st=8191&ot,at=ot>>>13,ht=0|h[7],ut=8191&ht,ft=ht>>>13,ct=0|h[8],lt=8191&ct,dt=ct>>>13,pt=0|h[9],mt=8191&pt,gt=pt>>>13;i.negative=e.negative^r.negative,i.length=19;var vt=(f+(n=Math.imul(l,F))|0)+((8191&(o=(o=Math.imul(l,W))+Math.imul(d,F)|0))<<13)|0;f=((s=Math.imul(d,W))+(o>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(m,F),o=(o=Math.imul(m,W))+Math.imul(g,F)|0,s=Math.imul(g,W);var bt=(f+(n=n+Math.imul(l,K)|0)|0)+((8191&(o=(o=o+Math.imul(l,Z)|0)+Math.imul(d,K)|0))<<13)|0;f=((s=s+Math.imul(d,Z)|0)+(o>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(b,F),o=(o=Math.imul(b,W))+Math.imul(y,F)|0,s=Math.imul(y,W),n=n+Math.imul(m,K)|0,o=(o=o+Math.imul(m,Z)|0)+Math.imul(g,K)|0,s=s+Math.imul(g,Z)|0;var yt=(f+(n=n+Math.imul(l,J)|0)|0)+((8191&(o=(o=o+Math.imul(l,Y)|0)+Math.imul(d,J)|0))<<13)|0;f=((s=s+Math.imul(d,Y)|0)+(o>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(_,F),o=(o=Math.imul(_,W))+Math.imul(M,F)|0,s=Math.imul(M,W),n=n+Math.imul(b,K)|0,o=(o=o+Math.imul(b,Z)|0)+Math.imul(y,K)|0,s=s+Math.imul(y,Z)|0,n=n+Math.imul(m,J)|0,o=(o=o+Math.imul(m,Y)|0)+Math.imul(g,J)|0,s=s+Math.imul(g,Y)|0;var wt=(f+(n=n+Math.imul(l,X)|0)|0)+((8191&(o=(o=o+Math.imul(l,Q)|0)+Math.imul(d,X)|0))<<13)|0;f=((s=s+Math.imul(d,Q)|0)+(o>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,F),o=(o=Math.imul(k,W))+Math.imul(E,F)|0,s=Math.imul(E,W),n=n+Math.imul(_,K)|0,o=(o=o+Math.imul(_,Z)|0)+Math.imul(M,K)|0,s=s+Math.imul(M,Z)|0,n=n+Math.imul(b,J)|0,o=(o=o+Math.imul(b,Y)|0)+Math.imul(y,J)|0,s=s+Math.imul(y,Y)|0,n=n+Math.imul(m,X)|0,o=(o=o+Math.imul(m,Q)|0)+Math.imul(g,X)|0,s=s+Math.imul(g,Q)|0;var _t=(f+(n=n+Math.imul(l,tt)|0)|0)+((8191&(o=(o=o+Math.imul(l,et)|0)+Math.imul(d,tt)|0))<<13)|0;f=((s=s+Math.imul(d,et)|0)+(o>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(A,F),o=(o=Math.imul(A,W))+Math.imul(x,F)|0,s=Math.imul(x,W),n=n+Math.imul(k,K)|0,o=(o=o+Math.imul(k,Z)|0)+Math.imul(E,K)|0,s=s+Math.imul(E,Z)|0,n=n+Math.imul(_,J)|0,o=(o=o+Math.imul(_,Y)|0)+Math.imul(M,J)|0,s=s+Math.imul(M,Y)|0,n=n+Math.imul(b,X)|0,o=(o=o+Math.imul(b,Q)|0)+Math.imul(y,X)|0,s=s+Math.imul(y,Q)|0,n=n+Math.imul(m,tt)|0,o=(o=o+Math.imul(m,et)|0)+Math.imul(g,tt)|0,s=s+Math.imul(g,et)|0;var Mt=(f+(n=n+Math.imul(l,it)|0)|0)+((8191&(o=(o=o+Math.imul(l,nt)|0)+Math.imul(d,it)|0))<<13)|0;f=((s=s+Math.imul(d,nt)|0)+(o>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(P,F),o=(o=Math.imul(P,W))+Math.imul(I,F)|0,s=Math.imul(I,W),n=n+Math.imul(A,K)|0,o=(o=o+Math.imul(A,Z)|0)+Math.imul(x,K)|0,s=s+Math.imul(x,Z)|0,n=n+Math.imul(k,J)|0,o=(o=o+Math.imul(k,Y)|0)+Math.imul(E,J)|0,s=s+Math.imul(E,Y)|0,n=n+Math.imul(_,X)|0,o=(o=o+Math.imul(_,Q)|0)+Math.imul(M,X)|0,s=s+Math.imul(M,Q)|0,n=n+Math.imul(b,tt)|0,o=(o=o+Math.imul(b,et)|0)+Math.imul(y,tt)|0,s=s+Math.imul(y,et)|0,n=n+Math.imul(m,it)|0,o=(o=o+Math.imul(m,nt)|0)+Math.imul(g,it)|0,s=s+Math.imul(g,nt)|0;var St=(f+(n=n+Math.imul(l,st)|0)|0)+((8191&(o=(o=o+Math.imul(l,at)|0)+Math.imul(d,st)|0))<<13)|0;f=((s=s+Math.imul(d,at)|0)+(o>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(O,F),o=(o=Math.imul(O,W))+Math.imul(j,F)|0,s=Math.imul(j,W),n=n+Math.imul(P,K)|0,o=(o=o+Math.imul(P,Z)|0)+Math.imul(I,K)|0,s=s+Math.imul(I,Z)|0,n=n+Math.imul(A,J)|0,o=(o=o+Math.imul(A,Y)|0)+Math.imul(x,J)|0,s=s+Math.imul(x,Y)|0,n=n+Math.imul(k,X)|0,o=(o=o+Math.imul(k,Q)|0)+Math.imul(E,X)|0,s=s+Math.imul(E,Q)|0,n=n+Math.imul(_,tt)|0,o=(o=o+Math.imul(_,et)|0)+Math.imul(M,tt)|0,s=s+Math.imul(M,et)|0,n=n+Math.imul(b,it)|0,o=(o=o+Math.imul(b,nt)|0)+Math.imul(y,it)|0,s=s+Math.imul(y,nt)|0,n=n+Math.imul(m,st)|0,o=(o=o+Math.imul(m,at)|0)+Math.imul(g,st)|0,s=s+Math.imul(g,at)|0;var kt=(f+(n=n+Math.imul(l,ut)|0)|0)+((8191&(o=(o=o+Math.imul(l,ft)|0)+Math.imul(d,ut)|0))<<13)|0;f=((s=s+Math.imul(d,ft)|0)+(o>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(C,F),o=(o=Math.imul(C,W))+Math.imul(U,F)|0,s=Math.imul(U,W),n=n+Math.imul(O,K)|0,o=(o=o+Math.imul(O,Z)|0)+Math.imul(j,K)|0,s=s+Math.imul(j,Z)|0,n=n+Math.imul(P,J)|0,o=(o=o+Math.imul(P,Y)|0)+Math.imul(I,J)|0,s=s+Math.imul(I,Y)|0,n=n+Math.imul(A,X)|0,o=(o=o+Math.imul(A,Q)|0)+Math.imul(x,X)|0,s=s+Math.imul(x,Q)|0,n=n+Math.imul(k,tt)|0,o=(o=o+Math.imul(k,et)|0)+Math.imul(E,tt)|0,s=s+Math.imul(E,et)|0,n=n+Math.imul(_,it)|0,o=(o=o+Math.imul(_,nt)|0)+Math.imul(M,it)|0,s=s+Math.imul(M,nt)|0,n=n+Math.imul(b,st)|0,o=(o=o+Math.imul(b,at)|0)+Math.imul(y,st)|0,s=s+Math.imul(y,at)|0,n=n+Math.imul(m,ut)|0,o=(o=o+Math.imul(m,ft)|0)+Math.imul(g,ut)|0,s=s+Math.imul(g,ft)|0;var Et=(f+(n=n+Math.imul(l,lt)|0)|0)+((8191&(o=(o=o+Math.imul(l,dt)|0)+Math.imul(d,lt)|0))<<13)|0;f=((s=s+Math.imul(d,dt)|0)+(o>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(q,F),o=(o=Math.imul(q,W))+Math.imul(D,F)|0,s=Math.imul(D,W),n=n+Math.imul(C,K)|0,o=(o=o+Math.imul(C,Z)|0)+Math.imul(U,K)|0,s=s+Math.imul(U,Z)|0,n=n+Math.imul(O,J)|0,o=(o=o+Math.imul(O,Y)|0)+Math.imul(j,J)|0,s=s+Math.imul(j,Y)|0,n=n+Math.imul(P,X)|0,o=(o=o+Math.imul(P,Q)|0)+Math.imul(I,X)|0,s=s+Math.imul(I,Q)|0,n=n+Math.imul(A,tt)|0,o=(o=o+Math.imul(A,et)|0)+Math.imul(x,tt)|0,s=s+Math.imul(x,et)|0,n=n+Math.imul(k,it)|0,o=(o=o+Math.imul(k,nt)|0)+Math.imul(E,it)|0,s=s+Math.imul(E,nt)|0,n=n+Math.imul(_,st)|0,o=(o=o+Math.imul(_,at)|0)+Math.imul(M,st)|0,s=s+Math.imul(M,at)|0,n=n+Math.imul(b,ut)|0,o=(o=o+Math.imul(b,ft)|0)+Math.imul(y,ut)|0,s=s+Math.imul(y,ft)|0,n=n+Math.imul(m,lt)|0,o=(o=o+Math.imul(m,dt)|0)+Math.imul(g,lt)|0,s=s+Math.imul(g,dt)|0;var Rt=(f+(n=n+Math.imul(l,mt)|0)|0)+((8191&(o=(o=o+Math.imul(l,gt)|0)+Math.imul(d,mt)|0))<<13)|0;f=((s=s+Math.imul(d,gt)|0)+(o>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(q,K),o=(o=Math.imul(q,Z))+Math.imul(D,K)|0,s=Math.imul(D,Z),n=n+Math.imul(C,J)|0,o=(o=o+Math.imul(C,Y)|0)+Math.imul(U,J)|0,s=s+Math.imul(U,Y)|0,n=n+Math.imul(O,X)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(j,X)|0,s=s+Math.imul(j,Q)|0,n=n+Math.imul(P,tt)|0,o=(o=o+Math.imul(P,et)|0)+Math.imul(I,tt)|0,s=s+Math.imul(I,et)|0,n=n+Math.imul(A,it)|0,o=(o=o+Math.imul(A,nt)|0)+Math.imul(x,it)|0,s=s+Math.imul(x,nt)|0,n=n+Math.imul(k,st)|0,o=(o=o+Math.imul(k,at)|0)+Math.imul(E,st)|0,s=s+Math.imul(E,at)|0,n=n+Math.imul(_,ut)|0,o=(o=o+Math.imul(_,ft)|0)+Math.imul(M,ut)|0,s=s+Math.imul(M,ft)|0,n=n+Math.imul(b,lt)|0,o=(o=o+Math.imul(b,dt)|0)+Math.imul(y,lt)|0,s=s+Math.imul(y,dt)|0;var At=(f+(n=n+Math.imul(m,mt)|0)|0)+((8191&(o=(o=o+Math.imul(m,gt)|0)+Math.imul(g,mt)|0))<<13)|0;f=((s=s+Math.imul(g,gt)|0)+(o>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(q,J),o=(o=Math.imul(q,Y))+Math.imul(D,J)|0,s=Math.imul(D,Y),n=n+Math.imul(C,X)|0,o=(o=o+Math.imul(C,Q)|0)+Math.imul(U,X)|0,s=s+Math.imul(U,Q)|0,n=n+Math.imul(O,tt)|0,o=(o=o+Math.imul(O,et)|0)+Math.imul(j,tt)|0,s=s+Math.imul(j,et)|0,n=n+Math.imul(P,it)|0,o=(o=o+Math.imul(P,nt)|0)+Math.imul(I,it)|0,s=s+Math.imul(I,nt)|0,n=n+Math.imul(A,st)|0,o=(o=o+Math.imul(A,at)|0)+Math.imul(x,st)|0,s=s+Math.imul(x,at)|0,n=n+Math.imul(k,ut)|0,o=(o=o+Math.imul(k,ft)|0)+Math.imul(E,ut)|0,s=s+Math.imul(E,ft)|0,n=n+Math.imul(_,lt)|0,o=(o=o+Math.imul(_,dt)|0)+Math.imul(M,lt)|0,s=s+Math.imul(M,dt)|0;var xt=(f+(n=n+Math.imul(b,mt)|0)|0)+((8191&(o=(o=o+Math.imul(b,gt)|0)+Math.imul(y,mt)|0))<<13)|0;f=((s=s+Math.imul(y,gt)|0)+(o>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(q,X),o=(o=Math.imul(q,Q))+Math.imul(D,X)|0,s=Math.imul(D,Q),n=n+Math.imul(C,tt)|0,o=(o=o+Math.imul(C,et)|0)+Math.imul(U,tt)|0,s=s+Math.imul(U,et)|0,n=n+Math.imul(O,it)|0,o=(o=o+Math.imul(O,nt)|0)+Math.imul(j,it)|0,s=s+Math.imul(j,nt)|0,n=n+Math.imul(P,st)|0,o=(o=o+Math.imul(P,at)|0)+Math.imul(I,st)|0,s=s+Math.imul(I,at)|0,n=n+Math.imul(A,ut)|0,o=(o=o+Math.imul(A,ft)|0)+Math.imul(x,ut)|0,s=s+Math.imul(x,ft)|0,n=n+Math.imul(k,lt)|0,o=(o=o+Math.imul(k,dt)|0)+Math.imul(E,lt)|0,s=s+Math.imul(E,dt)|0;var Tt=(f+(n=n+Math.imul(_,mt)|0)|0)+((8191&(o=(o=o+Math.imul(_,gt)|0)+Math.imul(M,mt)|0))<<13)|0;f=((s=s+Math.imul(M,gt)|0)+(o>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(q,tt),o=(o=Math.imul(q,et))+Math.imul(D,tt)|0,s=Math.imul(D,et),n=n+Math.imul(C,it)|0,o=(o=o+Math.imul(C,nt)|0)+Math.imul(U,it)|0,s=s+Math.imul(U,nt)|0,n=n+Math.imul(O,st)|0,o=(o=o+Math.imul(O,at)|0)+Math.imul(j,st)|0,s=s+Math.imul(j,at)|0,n=n+Math.imul(P,ut)|0,o=(o=o+Math.imul(P,ft)|0)+Math.imul(I,ut)|0,s=s+Math.imul(I,ft)|0,n=n+Math.imul(A,lt)|0,o=(o=o+Math.imul(A,dt)|0)+Math.imul(x,lt)|0,s=s+Math.imul(x,dt)|0;var Pt=(f+(n=n+Math.imul(k,mt)|0)|0)+((8191&(o=(o=o+Math.imul(k,gt)|0)+Math.imul(E,mt)|0))<<13)|0;f=((s=s+Math.imul(E,gt)|0)+(o>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(q,it),o=(o=Math.imul(q,nt))+Math.imul(D,it)|0,s=Math.imul(D,nt),n=n+Math.imul(C,st)|0,o=(o=o+Math.imul(C,at)|0)+Math.imul(U,st)|0,s=s+Math.imul(U,at)|0,n=n+Math.imul(O,ut)|0,o=(o=o+Math.imul(O,ft)|0)+Math.imul(j,ut)|0,s=s+Math.imul(j,ft)|0,n=n+Math.imul(P,lt)|0,o=(o=o+Math.imul(P,dt)|0)+Math.imul(I,lt)|0,s=s+Math.imul(I,dt)|0;var It=(f+(n=n+Math.imul(A,mt)|0)|0)+((8191&(o=(o=o+Math.imul(A,gt)|0)+Math.imul(x,mt)|0))<<13)|0;f=((s=s+Math.imul(x,gt)|0)+(o>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(q,st),o=(o=Math.imul(q,at))+Math.imul(D,st)|0,s=Math.imul(D,at),n=n+Math.imul(C,ut)|0,o=(o=o+Math.imul(C,ft)|0)+Math.imul(U,ut)|0,s=s+Math.imul(U,ft)|0,n=n+Math.imul(O,lt)|0,o=(o=o+Math.imul(O,dt)|0)+Math.imul(j,lt)|0,s=s+Math.imul(j,dt)|0;var Lt=(f+(n=n+Math.imul(P,mt)|0)|0)+((8191&(o=(o=o+Math.imul(P,gt)|0)+Math.imul(I,mt)|0))<<13)|0;f=((s=s+Math.imul(I,gt)|0)+(o>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,n=Math.imul(q,ut),o=(o=Math.imul(q,ft))+Math.imul(D,ut)|0,s=Math.imul(D,ft),n=n+Math.imul(C,lt)|0,o=(o=o+Math.imul(C,dt)|0)+Math.imul(U,lt)|0,s=s+Math.imul(U,dt)|0;var Ot=(f+(n=n+Math.imul(O,mt)|0)|0)+((8191&(o=(o=o+Math.imul(O,gt)|0)+Math.imul(j,mt)|0))<<13)|0;f=((s=s+Math.imul(j,gt)|0)+(o>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(q,lt),o=(o=Math.imul(q,dt))+Math.imul(D,lt)|0,s=Math.imul(D,dt);var jt=(f+(n=n+Math.imul(C,mt)|0)|0)+((8191&(o=(o=o+Math.imul(C,gt)|0)+Math.imul(U,mt)|0))<<13)|0;f=((s=s+Math.imul(U,gt)|0)+(o>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Bt=(f+(n=Math.imul(q,mt))|0)+((8191&(o=(o=Math.imul(q,gt))+Math.imul(D,mt)|0))<<13)|0;return f=((s=Math.imul(D,gt))+(o>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,u[0]=vt,u[1]=bt,u[2]=yt,u[3]=wt,u[4]=_t,u[5]=Mt,u[6]=St,u[7]=kt,u[8]=Et,u[9]=Rt,u[10]=At,u[11]=xt,u[12]=Tt,u[13]=Pt,u[14]=It,u[15]=Lt,u[16]=Ot,u[17]=jt,u[18]=Bt,0!==f&&(u[19]=f,i.length++),i};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=l),o.prototype.mulTo=function t(e,r){var i=this.length+e.length;return 10===this.length&&10===e.length?d(this,e,r):i<63?l(this,e,r):i<1024?function n(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,e,r):p(this,e,r)},m.prototype.makeRBT=function t(e){for(var r=new Array(e),i=o.prototype._countBits(e)-1,n=0;n>=1;return n},m.prototype.permute=function t(e,r,i,n,o,s){for(var a=0;a>>=1)o++;return 1<>>=13,n[2*a+1]=8191&s,s>>>=13;for(a=2*r;a>=26,r+=o/67108864|0,r+=s>>>26,this.words[n]=67108863&s}return 0!==r&&(this.words[n]=r,this.length++),this},o.prototype.muln=function t(e){return this.clone().imuln(e)},o.prototype.sqr=function t(){return this.mul(this)},o.prototype.isqr=function t(){return this.imul(this.clone())},o.prototype.pow=function t(e){var r=function i(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(e);if(0===r.length)return new o(1);for(var n=this,s=0;s=0);var r,n=e%26,o=(e-n)/26,s=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(r=0;r>>26-n}a&&(this.words[r]=a,this.length++)}if(0!==o){for(r=this.length-1;r>=0;r--)this.words[r+o]=this.words[r];for(r=0;r=0),o=r?(r-r%26)/26:0;var s=e%26,a=Math.min((e-s)/26,this.length),h=67108863^67108863>>>s<a)for(this.length-=a,f=0;f=0&&(0!==c||f>=o);f--){var l=0|this.words[f];this.words[f]=c<<26-s|l>>>s,c=l&h}return u&&0!==c&&(u.words[u.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function t(e,r,n){return i(0===this.negative),this.iushrn(e,r,n)},o.prototype.shln=function t(e){return this.clone().ishln(e)},o.prototype.ushln=function t(e){return this.clone().iushln(e)},o.prototype.shrn=function t(e){return this.clone().ishrn(e)},o.prototype.ushrn=function t(e){return this.clone().iushrn(e)},o.prototype.testn=function t(e){i("number"==typeof e&&e>=0);var r=e%26,n=(e-r)/26,o=1<=0);var r=e%26,n=(e-r)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==r&&n++,this.length=Math.min(n,this.length),0!==r){var o=67108863^67108863>>>r<=67108864;r++)this.words[r]-=67108864,r===this.length-1?this.words[r+1]=1:this.words[r+1]++;return this.length=Math.max(this.length,r+1),this},o.prototype.isubn=function t(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var r=0;r>26)-(u/67108864|0),this.words[o+n]=67108863&s}for(;o>26,this.words[o+n]=67108863&s;if(0===h)return this.strip();for(i(-1===h),h=0,o=0;o>26,this.words[o]=67108863&s;return this.negative=1,this.strip()},o.prototype._wordDiv=function t(e,r){var i=(this.length,e.length),n=this.clone(),s=e,a=0|s.words[s.length-1];0!==(i=26-this._countBits(a))&&(s=s.ushln(i),n.iushln(i),a=0|s.words[s.length-1]);var h,u=n.length-s.length;if("mod"!==r){(h=new o(null)).length=u+1,h.words=new Array(h.length);for(var f=0;f=0;l--){var d=67108864*(0|n.words[s.length+l])+(0|n.words[s.length+l-1]);for(d=Math.min(d/a|0,67108863),n._ishlnsubmul(s,d,l);0!==n.negative;)d--,n.negative=0,n._ishlnsubmul(s,1,l),n.isZero()||(n.negative^=1);h&&(h.words[l]=d)}return h&&h.strip(),n.strip(),"div"!==r&&0!==i&&n.iushrn(i),{div:h||null,mod:n}},o.prototype.divmod=function t(e,r,n){return i(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(h=this.neg().divmod(e,r),"mod"!==r&&(s=h.div.neg()),"div"!==r&&(a=h.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:s,mod:a}):0===this.negative&&0!==e.negative?(h=this.divmod(e.neg(),r),"mod"!==r&&(s=h.div.neg()),{div:s,mod:h.mod}):0!=(this.negative&e.negative)?(h=this.neg().divmod(e.neg(),r),"div"!==r&&(a=h.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:h.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===r?{div:this.divn(e.words[0]),mod:null}:"mod"===r?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,r);var s,a,h},o.prototype.div=function t(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function t(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function t(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function t(e){var r=this.divmod(e);if(r.mod.isZero())return r.div;var i=0!==r.div.negative?r.mod.isub(e):r.mod,n=e.ushrn(1),o=e.andln(1),s=i.cmp(n);return s<0||1===o&&0===s?r.div:0!==r.div.negative?r.div.isubn(1):r.div.iaddn(1)},o.prototype.modn=function t(e){i(e<=67108863);for(var r=(1<<26)%e,n=0,o=this.length-1;o>=0;o--)n=(r*n+(0|this.words[o]))%e;return n},o.prototype.idivn=function t(e){i(e<=67108863);for(var r=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*r;this.words[n]=o/e|0,r=o%e}return this.strip()},o.prototype.divn=function t(e){return this.clone().idivn(e)},o.prototype.egcd=function t(e){i(0===e.negative),i(!e.isZero());var r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var s=new o(1),a=new o(0),h=new o(0),u=new o(1),f=0;r.isEven()&&n.isEven();)r.iushrn(1),n.iushrn(1),++f;for(var c=n.clone(),l=r.clone();!r.isZero();){for(var d=0,p=1;0==(r.words[0]&p)&&d<26;++d,p<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||a.isOdd())&&(s.iadd(c),a.isub(l)),s.iushrn(1),a.iushrn(1);for(var m=0,g=1;0==(n.words[0]&g)&&m<26;++m,g<<=1);if(m>0)for(n.iushrn(m);m-- >0;)(h.isOdd()||u.isOdd())&&(h.iadd(c),u.isub(l)),h.iushrn(1),u.iushrn(1);r.cmp(n)>=0?(r.isub(n),s.isub(h),a.isub(u)):(n.isub(r),h.isub(s),u.isub(a))}return{a:h,b:u,gcd:n.iushln(f)}},o.prototype._invmp=function t(e){i(0===e.negative),i(!e.isZero());var r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var s,a=new o(1),h=new o(0),u=n.clone();r.cmpn(1)>0&&n.cmpn(1)>0;){for(var f=0,c=1;0==(r.words[0]&c)&&f<26;++f,c<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);for(var l=0,d=1;0==(n.words[0]&d)&&l<26;++l,d<<=1);if(l>0)for(n.iushrn(l);l-- >0;)h.isOdd()&&h.iadd(u),h.iushrn(1);r.cmp(n)>=0?(r.isub(n),a.isub(h)):(n.isub(r),h.isub(a))}return(s=0===r.cmpn(1)?a:h).cmpn(0)<0&&s.iadd(e),s},o.prototype.gcd=function t(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var r=this.clone(),i=e.clone();r.negative=0,i.negative=0;for(var n=0;r.isEven()&&i.isEven();n++)r.iushrn(1),i.iushrn(1);for(;;){for(;r.isEven();)r.iushrn(1);for(;i.isEven();)i.iushrn(1);var o=r.cmp(i);if(o<0){var s=r;r=i,i=s}else if(0===o||0===i.cmpn(1))break;r.isub(i)}return i.iushln(n)},o.prototype.invm=function t(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function t(){return 0==(1&this.words[0])},o.prototype.isOdd=function t(){return 1==(1&this.words[0])},o.prototype.andln=function t(e){return this.words[0]&e},o.prototype.bincn=function t(e){i("number"==typeof e);var r=e%26,n=(e-r)/26,o=1<>>26,h&=67108863,this.words[a]=h}return 0!==s&&(this.words[a]=s,this.length++),this},o.prototype.isZero=function t(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function t(e){var r,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)r=1;else{n&&(e=-e),i(e<=67108863,"Number is too big");var o=0|this.words[0];r=o===e?0:oe.length)return 1;if(this.length=0;i--){var n=0|this.words[i],o=0|e.words[i];if(n!==o){no&&(r=1);break}}return r},o.prototype.gtn=function t(e){return 1===this.cmpn(e)},o.prototype.gt=function t(e){return 1===this.cmp(e)},o.prototype.gten=function t(e){return this.cmpn(e)>=0},o.prototype.gte=function t(e){return this.cmp(e)>=0},o.prototype.ltn=function t(e){return-1===this.cmpn(e)},o.prototype.lt=function t(e){return-1===this.cmp(e)},o.prototype.lten=function t(e){return this.cmpn(e)<=0},o.prototype.lte=function t(e){return this.cmp(e)<=0},o.prototype.eqn=function t(e){return 0===this.cmpn(e)},o.prototype.eq=function t(e){return 0===this.cmp(e)},o.red=function t(e){return new M(e)},o.prototype.toRed=function t(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function t(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function t(e){return this.red=e,this},o.prototype.forceRed=function t(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function t(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function t(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function t(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function t(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function t(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function t(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function t(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function t(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function t(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function t(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function t(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function t(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function t(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else i(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}v.prototype._tmp=function t(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function t(e){var r,i=e;do{this.split(i,this.tmp),r=(i=(i=this.imulK(i)).iadd(this.tmp)).bitLength()}while(r>this.n);var n=r0?i.isub(this.p):void 0!==i.strip?i.strip():i._strip(),i},v.prototype.split=function t(e,r){e.iushrn(this.n,0,r)},v.prototype.imulK=function t(e){return e.imul(this.k)},n(b,v),b.prototype.split=function t(e,r){for(var i=4194303,n=Math.min(e.length,9),o=0;o>>22,s=a}s>>>=22,e.words[o-10]=s,0===s&&e.length>10?e.length-=10:e.length-=9},b.prototype.imulK=function t(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var r=0,i=0;i>>=26,e.words[i]=o,r=n}return 0!==r&&(e.words[e.length++]=r),e},o._prime=function t(e){if(g[e])return g[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return g[e]=t,t},M.prototype._verify1=function t(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},M.prototype._verify2=function t(e,r){i(0==(e.negative|r.negative),"red works only with positives"),i(e.red&&e.red===r.red,"red works only with red numbers")},M.prototype.imod=function t(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function t(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function t(e,r){this._verify2(e,r);var i=e.add(r);return i.cmp(this.m)>=0&&i.isub(this.m),i._forceRed(this)},M.prototype.iadd=function t(e,r){this._verify2(e,r);var i=e.iadd(r);return i.cmp(this.m)>=0&&i.isub(this.m),i},M.prototype.sub=function t(e,r){this._verify2(e,r);var i=e.sub(r);return i.cmpn(0)<0&&i.iadd(this.m),i._forceRed(this)},M.prototype.isub=function t(e,r){this._verify2(e,r);var i=e.isub(r);return i.cmpn(0)<0&&i.iadd(this.m),i},M.prototype.shl=function t(e,r){return this._verify1(e),this.imod(e.ushln(r))},M.prototype.imul=function t(e,r){return this._verify2(e,r),this.imod(e.imul(r))},M.prototype.mul=function t(e,r){return this._verify2(e,r),this.imod(e.mul(r))},M.prototype.isqr=function t(e){return this.imul(e,e.clone())},M.prototype.sqr=function t(e){return this.mul(e,e)},M.prototype.sqrt=function t(e){if(e.isZero())return e.clone();var r=this.m.andln(3);if(i(r%2==1),3===r){var n=this.m.add(new o(1)).iushrn(2);return this.pow(e,n)}for(var s=this.m.subn(1),a=0;!s.isZero()&&0===s.andln(1);)a++,s.iushrn(1);i(!s.isZero());var h=new o(1).toRed(this),u=h.redNeg(),f=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new o(2*c*c).toRed(this);0!==this.pow(c,f).cmp(u);)c.redIAdd(u);for(var l=this.pow(c,s),d=this.pow(e,s.addn(1).iushrn(1)),p=this.pow(e,s),m=a;0!==p.cmp(h);){for(var g=p,v=0;0!==g.cmp(h);v++)g=g.redSqr();i(v=0;n--){for(var f=r.words[n],c=u-1;c>=0;c--){var l=f>>c&1;s!==i[0]&&(s=this.sqr(s)),0!==l||0!==a?(a<<=1,a|=l,(4===++h||0===n&&0===c)&&(s=this.mul(s,i[a]),h=0,a=0)):h=0}u=26}return s},M.prototype.convertTo=function t(e){var r=e.umod(this.m);return r===e?r.clone():r},M.prototype.convertFrom=function t(e){var r=e.clone();return r.red=null,r},o.mont=function t(e){return new S(e)},n(S,M),S.prototype.convertTo=function t(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function t(e){var r=this.imod(e.mul(this.rinv));return r.red=null,r},S.prototype.imul=function t(e,r){if(e.isZero()||r.isZero())return e.words[0]=0,e.length=1,e;var i=e.imul(r),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=i.isub(n).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.mul=function t(e,r){if(e.isZero()||r.isZero())return new o(0)._forceRed(this);var i=e.mul(r),n=i.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=i.isub(n).iushrn(this.shift),a=s;return s.cmp(this.m)>=0?a=s.isub(this.m):s.cmpn(0)<0&&(a=s.iadd(this.m)),a._forceRed(this)},S.prototype.invm=function t(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,r(28)(t))},function(t,e,r){var i=r(9);t.exports=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,r){var i=r(17),n=r(21),o=r(39);t.exports=i?function(t,e,r){return n.f(t,e,o(1,r))}:function(t,e,r){return t[e]=r,t}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var r=0;r0&&s.length>n&&!s.warned){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,function h(t){console&&console.warn&&console.warn(t)}(a)}return t}function d(){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 p(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=d.bind(i);return n.listener=r,i.wrapFn=n,n}function m(t,e,r){var i=t._events;if(void 0===i)return[];var n=i[e];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function o(t){for(var e=new Array(t.length),r=0;r0&&(a=r[0]),a instanceof Error)throw a;var h=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw h.context=a,h}var u=s[e];if(void 0===u)return!1;if("function"==typeof u)o(u,this,r);else{var f=u.length,c=v(u,f);for(i=0;i=0;s--)if(i[s]===r||i[s].listener===r){a=i[s].listener,o=s;break}if(o<0)return this;0===o?i.shift():function h(t,e){for(;e+1=0;n--)this.removeListener(e,r[n]);return this},a.prototype.listeners=function t(e){return m(this,e,!0)},a.prototype.rawListeners=function t(e){return m(this,e,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},a.prototype.listenerCount=g,a.prototype.eventNames=function t(){return this._eventsCount>0?i(this._events):[]}},function(t,e,r){"use strict";var i=r(2).Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.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 o(t){var e;switch(this.encoding=function r(t){var e=function r(t){if(!t)return"utf8";for(var e;;)switch(t){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 t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=h,this.end=u,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=c,e=3;break;default:return this.write=l,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function i(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return n>0&&(t.lastNeed=n-1),n;if(--i=0)return n>0&&(t.lastNeed=n-2),n;if(--i=0)return n>0&&(2===n?n=0:t.lastNeed=n-3),n;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,r){"use strict";(function(t){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var i=r(154),n=r(291),o=r(152);function s(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(h.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return W(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(t).length;default:if(i)return W(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return L(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return P(this,e,r);case"latin1":case"binary":return I(this,e,r);case"base64":return E(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function g(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function v(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=h.from(e,i)),h.isBuffer(e))return 0===e.length?-1:b(t,e,r,i,n);if("number"==typeof e)return e&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,i,n){var o,s=1,a=t.length,h=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,h/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var f=-1;for(o=r;oa&&(r=a-h),o=r;o>=0;o--){for(var c=!0,l=0;ln&&(i=n):i=n;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s>8,n=r%256,o.push(n),o.push(i);return o}(e,t.length-r),t,r,i)}function E(t,e,r){return 0===e&&r===t.length?i.fromByteArray(t):i.fromByteArray(t.slice(e,r))}function R(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n239?4:u>223?3:u>191?2:1;if(n+c<=r)switch(c){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[n+1]))&&(h=(31&u)<<6|63&o)>127&&(f=h);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(h=(15&u)<<12|(63&o)<<6|63&s)>2047&&(h<55296||h>57343)&&(f=h);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(h=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&h<1114112&&(f=h)}null===f?(f=65533,c=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=c}return function l(t){var e=t.length;if(e<=T)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i0&&(r=this.toString("hex",0,i).match(/.{2}/g).join(" "),this.length>i&&(r+=" ... ")),""},h.prototype.compare=function t(e,r,i,n,o){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===i&&(i=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),r<0||i>e.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&r>=i)return 0;if(n>=o)return-1;if(r>=i)return 1;if(this===e)return 0;for(var s=(o>>>=0)-(n>>>=0),a=(i>>>=0)-(r>>>=0),u=Math.min(s,a),f=this.slice(n,o),c=e.slice(r,i),l=0;lo)&&(i=o),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var s=!1;;)switch(n){case"hex":return y(this,e,r,i);case"utf8":case"utf-8":return w(this,e,r,i);case"ascii":return _(this,e,r,i);case"latin1":case"binary":return M(this,e,r,i);case"base64":return S(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,r,i);default:if(s)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),s=!0}},h.prototype.toJSON=function t(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var T=4096;function P(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;ni)&&(r=i);for(var n="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,i,n,o){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}function C(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-r,2);n>>8*(i?n:1-n)}function U(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-r,4);n>>8*(i?n:3-n)&255}function N(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function q(t,e,r,i,o){return o||N(t,0,r,4),n.write(t,e,r,i,23,4),r+4}function D(t,e,r,i,o){return o||N(t,0,r,8),n.write(t,e,r,i,52,8),r+8}h.prototype.slice=function t(e,r){var i,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r0&&(o*=256);)n+=this[e+--r]*o;return n},h.prototype.readUInt8=function t(e,r){return r||j(e,1,this.length),this[e]},h.prototype.readUInt16LE=function t(e,r){return r||j(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUInt16BE=function t(e,r){return r||j(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUInt32LE=function t(e,r){return r||j(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUInt32BE=function t(e,r){return r||j(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function t(e,r,i){e|=0,r|=0,i||j(e,r,this.length);for(var n=this[e],o=1,s=0;++s=(o*=128)&&(n-=Math.pow(2,8*r)),n},h.prototype.readIntBE=function t(e,r,i){e|=0,r|=0,i||j(e,r,this.length);for(var n=r,o=1,s=this[e+--n];n>0&&(o*=256);)s+=this[e+--n]*o;return s>=(o*=128)&&(s-=Math.pow(2,8*r)),s},h.prototype.readInt8=function t(e,r){return r||j(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function t(e,r){r||j(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt16BE=function t(e,r){r||j(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?4294901760|i:i},h.prototype.readInt32LE=function t(e,r){return r||j(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function t(e,r){return r||j(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function t(e,r){return r||j(e,4,this.length),n.read(this,e,!0,23,4)},h.prototype.readFloatBE=function t(e,r){return r||j(e,4,this.length),n.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function t(e,r){return r||j(e,8,this.length),n.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function t(e,r){return r||j(e,8,this.length),n.read(this,e,!1,52,8)},h.prototype.writeUIntLE=function t(e,r,i,n){(e=+e,r|=0,i|=0,n)||B(this,e,r,i,Math.pow(2,8*i)-1,0);var o=1,s=0;for(this[r]=255&e;++s=0&&(s*=256);)this[r+o]=e/s&255;return r+i},h.prototype.writeUInt8=function t(e,r,i){return e=+e,r|=0,i||B(this,e,r,1,255,0),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[r]=255&e,r+1},h.prototype.writeUInt16LE=function t(e,r,i){return e=+e,r|=0,i||B(this,e,r,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):C(this,e,r,!0),r+2},h.prototype.writeUInt16BE=function t(e,r,i){return e=+e,r|=0,i||B(this,e,r,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):C(this,e,r,!1),r+2},h.prototype.writeUInt32LE=function t(e,r,i){return e=+e,r|=0,i||B(this,e,r,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=255&e):U(this,e,r,!0),r+4},h.prototype.writeUInt32BE=function t(e,r,i){return e=+e,r|=0,i||B(this,e,r,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},h.prototype.writeIntLE=function t(e,r,i,n){if(e=+e,r|=0,!n){var o=Math.pow(2,8*i-1);B(this,e,r,i,o-1,-o)}var s=0,a=1,h=0;for(this[r]=255&e;++s>0)-h&255;return r+i},h.prototype.writeIntBE=function t(e,r,i,n){if(e=+e,r|=0,!n){var o=Math.pow(2,8*i-1);B(this,e,r,i,o-1,-o)}var s=i-1,a=1,h=0;for(this[r+s]=255&e;--s>=0&&(a*=256);)e<0&&0===h&&0!==this[r+s+1]&&(h=1),this[r+s]=(e/a>>0)-h&255;return r+i},h.prototype.writeInt8=function t(e,r,i){return e=+e,r|=0,i||B(this,e,r,1,127,-128),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[r]=255&e,r+1},h.prototype.writeInt16LE=function t(e,r,i){return e=+e,r|=0,i||B(this,e,r,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8):C(this,e,r,!0),r+2},h.prototype.writeInt16BE=function t(e,r,i){return e=+e,r|=0,i||B(this,e,r,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[r]=e>>>8,this[r+1]=255&e):C(this,e,r,!1),r+2},h.prototype.writeInt32LE=function t(e,r,i){return e=+e,r|=0,i||B(this,e,r,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[r]=255&e,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24):U(this,e,r,!0),r+4},h.prototype.writeInt32BE=function t(e,r,i){return e=+e,r|=0,i||B(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),h.TYPED_ARRAY_SUPPORT?(this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=255&e):U(this,e,r,!1),r+4},h.prototype.writeFloatLE=function t(e,r,i){return q(this,e,r,!0,i)},h.prototype.writeFloatBE=function t(e,r,i){return q(this,e,r,!1,i)},h.prototype.writeDoubleLE=function t(e,r,i){return D(this,e,r,!0,i)},h.prototype.writeDoubleBE=function t(e,r,i){return D(this,e,r,!1,i)},h.prototype.copy=function t(e,r,i,n){if(i||(i=0),n||0===n||(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r=0;--o)e[o+r]=this[o+i];else if(s<1e3||!h.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(s=r;s55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(t){return i.toByteArray(function e(t){if((t=function e(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(z,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function K(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}}).call(this,r(5))},function(t,e,r){"use strict";var i=r(61),n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var o=Object.create(r(44));o.inherits=r(0);var s=r(151),a=r(94);o.inherits(c,s);for(var h=n(a.prototype),u=0;u1&&void 0!==arguments[1]?arguments[1]:o.JsonService;if(s(this,t),!e)throw n.Log.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=e,this._jsonService=new r(["application/jwk-set+json"])}return t.prototype.resetSigningKeys=function t(){this._settings=this._settings||{},this._settings.signingKeys=void 0},t.prototype.getMetadata=function t(){var e=this;return this._settings.metadata?(n.Log.debug("MetadataService.getMetadata: Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this.metadataUrl?(n.Log.debug("MetadataService.getMetadata: getting metadata from",this.metadataUrl),this._jsonService.getJson(this.metadataUrl).then((function(t){n.Log.debug("MetadataService.getMetadata: json received");var r=e._settings.metadataSeed||{};return e._settings.metadata=Object.assign({},r,t),e._settings.metadata}))):(n.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))},t.prototype.getIssuer=function t(){return this._getMetadataProperty("issuer")},t.prototype.getAuthorizationEndpoint=function t(){return this._getMetadataProperty("authorization_endpoint")},t.prototype.getUserInfoEndpoint=function t(){return this._getMetadataProperty("userinfo_endpoint")},t.prototype.getTokenEndpoint=function t(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._getMetadataProperty("token_endpoint",e)},t.prototype.getCheckSessionIframe=function t(){return this._getMetadataProperty("check_session_iframe",!0)},t.prototype.getEndSessionEndpoint=function t(){return this._getMetadataProperty("end_session_endpoint",!0)},t.prototype.getRevocationEndpoint=function t(){return this._getMetadataProperty("revocation_endpoint",!0)},t.prototype.getKeysEndpoint=function t(){return this._getMetadataProperty("jwks_uri",!0)},t.prototype._getMetadataProperty=function t(e){var r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return n.Log.debug("MetadataService.getMetadataProperty for: "+e),this.getMetadata().then((function(t){if(n.Log.debug("MetadataService.getMetadataProperty: metadata recieved"),void 0===t[e]){if(!0===r)return void n.Log.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property "+e);throw n.Log.error("MetadataService.getMetadataProperty: Metadata does not contain property "+e),new Error("Metadata does not contain property "+e)}return t[e]}))},t.prototype.getSigningKeys=function t(){var e=this;return this._settings.signingKeys?(n.Log.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then((function(t){return n.Log.debug("MetadataService.getSigningKeys: jwks_uri received",t),e._jsonService.getJson(t).then((function(t){if(n.Log.debug("MetadataService.getSigningKeys: key set received",t),!t.keys)throw n.Log.error("MetadataService.getSigningKeys: Missing keys on keyset"),new Error("Missing keys on keyset");return e._settings.signingKeys=t.keys,e._settings.signingKeys}))}))},i(t,[{key:"metadataUrl",get:function t(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(a)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=a))),this._metadataUrl}}]),t}()},function(t,e,r){"use strict";(function(e,i){var n=65536,o=4294967295;var s=r(2).Buffer,a=e.crypto||e.msCrypto;a&&a.getRandomValues?t.exports=function h(t,e){if(t>o)throw new RangeError("requested too many random bytes");var r=s.allocUnsafe(t);if(t>0)if(t>n)for(var h=0;h2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,n;if("string"==typeof e&&function s(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be",function a(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))n="The ".concat(t," ").concat(i," ").concat(o(e,"type"));else{var h=function u(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";n='The "'.concat(t,'" ').concat(h," ").concat(i," ").concat(o(e,"type"))}return n+=". Received type ".concat(typeof r)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},function(t,e){"function"==typeof Object.create?t.exports=function t(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function t(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}},function(t,e,r){"use strict";(function(e){var i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=u;var n=r(143),o=r(147);r(33)(u,n);for(var s=i(o.prototype),a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n},function(t,e,r){"use strict";var i={};function n(t,e,r){r||(r=Error);var n=function(t){function r(r,i,n){return t.call(this,function o(t,r,i){return"string"==typeof e?e:e(t,r,i)}(r,i,n))||this}return function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(r,t),r}(r);n.prototype.name=r.name,n.prototype.code=t,i[t]=n}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}n("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,n;if("string"==typeof e&&function s(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be",function a(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))n="The ".concat(t," ").concat(i," ").concat(o(e,"type"));else{var h=function u(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";n='The "'.concat(t,'" ').concat(h," ").concat(i," ").concat(o(e,"type"))}return n+=". Received type ".concat(typeof r)}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},function(t,e){"function"==typeof Object.create?t.exports=function t(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function t(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}},function(t,e,r){"use strict";(function(e){var i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=u;var n=r(175),o=r(179);r(37)(u,n);for(var s=i(o.prototype),a=0;a=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=i.join32(e,0,e.length-n,this.endian);for(var o=0;o>>24&255,n[o++]=e>>>16&255,n[o++]=e>>>8&255,n[o++]=255&e}else for(n[o++]=255&e,n[o++]=e>>>8&255,n[o++]=e>>>16&255,n[o++]=e>>>24&255,n[o++]=0,n[o++]=0,n[o++]=0,n[o++]=0,s=8;s1&&void 0!==arguments[1]?arguments[1]:"#",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.Global;"string"!=typeof e&&(e=o.location.href);var s=e.lastIndexOf(r);s>=0&&(e=e.substr(s+1)),"?"===r&&(s=e.indexOf("#"))>=0&&(e=e.substr(0,s));for(var a,h={},u=/([^&=]+)=([^&]*)/g,f=0;a=u.exec(e);)if(h[decodeURIComponent(a[1])]=decodeURIComponent(a[2].replace(/\+/g," ")),f++>50)return i.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",e),{error:"Response exceeded expected number of parameters"};for(var c in h)return h;return{}},t}()},function(t,e,r){var i=r(68),n=r(69);t.exports=function(t){return i(n(t))}},function(t,e){var r={}.toString;t.exports=function(t){return r.call(t).slice(8,-1)}},function(t,e,r){var i,n,o,s=r(211),a=r(3),h=r(14),u=r(18),f=r(12),c=r(74),l=r(75),d=r(76),p=a.WeakMap;if(s){var m=c.state||(c.state=new p),g=m.get,v=m.has,b=m.set;i=function(t,e){return e.facade=t,b.call(m,t,e),e},n=function(t){return g.call(m,t)||{}},o=function(t){return v.call(m,t)}}else{var y=l("state");d[y]=!0,i=function(t,e){return e.facade=t,u(t,y,e),e},n=function(t){return f(t,y)?t[y]:{}},o=function(t){return f(t,y)}}t.exports={set:i,get:n,has:o,enforce:function(t){return o(t)?n(t):i(t,{})},getterFor:function(t){return function(e){var r;if(!h(e)||(r=n(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}}},function(t,e,r){var i=r(3);t.exports=i},function(t,e,r){var i=r(54),n=Math.min;t.exports=function(t){return t>0?n(i(t),9007199254740991):0}},function(t,e){var r=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:r)(t)}},function(t,e,r){var i=r(69);t.exports=function(t){return Object(i(t))}},function(t,e,r){var i=r(15),n=r(219),o=r(53),s=r(57),a=r(221),h=r(222),u=function(t,e){this.stopped=t,this.result=e};t.exports=function(t,e,r){var f,c,l,d,p,m,g,v=r&&r.that,b=!(!r||!r.AS_ENTRIES),y=!(!r||!r.IS_ITERATOR),w=!(!r||!r.INTERRUPTED),_=s(e,v,1+b+w),M=function(t){return f&&h(f),new u(!0,t)},S=function(t){return b?(i(t),w?_(t[0],t[1],M):_(t[0],t[1])):w?_(t,M):_(t)};if(y)f=t;else{if("function"!=typeof(c=a(t)))throw TypeError("Target is not iterable");if(n(c)){for(l=0,d=o(t.length);d>l;l++)if((p=S(t[l]))&&p instanceof u)return p;return new u(!1)}f=c.call(t)}for(m=f.next;!(g=m.call(f)).done;){try{p=S(g.value)}catch(t){throw h(f),t}if("object"==typeof p&&p&&p instanceof u)return p}return new u(!1)}},function(t,e,r){var i=r(23);t.exports=function(t,e,r){if(i(t),void 0===e)return t;switch(r){case 0:return function(){return t.call(e)};case 1:return function(r){return t.call(e,r)};case 2:return function(r,i){return t.call(e,r,i)};case 3:return function(r,i,n){return t.call(e,r,i,n)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},function(t,e,r){var i=r(3),n=r(57),o=Function.call;t.exports=function(t,e,r){return n(o,i[t].prototype[e],r)}},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JoseUtil=void 0;var i=r(271),n=function o(t){return t&&t.__esModule?t:{default:t}}(r(377));e.JoseUtil=(0,n.default)({jws:i.jws,KeyUtil:i.KeyUtil,X509:i.X509,crypto:i.crypto,hextob64u:i.hextob64u,b64tohex:i.b64tohex,AllowedSigningAlgs:i.AllowedSigningAlgs})},function(t,e,r){"use strict";(function(e){!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function r(t,i,n,o){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var s,a,h=arguments.length;switch(h){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function e(){t.call(null,i)}));case 3:return e.nextTick((function e(){t.call(null,i,n)}));case 4:return e.nextTick((function e(){t.call(null,i,n,o)}));default:for(s=new Array(h-1),a=0;a>>24]^f[p>>>16&255]^c[m>>>8&255]^l[255&g]^e[v++],s=u[p>>>24]^f[m>>>16&255]^c[g>>>8&255]^l[255&d]^e[v++],a=u[m>>>24]^f[g>>>16&255]^c[d>>>8&255]^l[255&p]^e[v++],h=u[g>>>24]^f[d>>>16&255]^c[p>>>8&255]^l[255&m]^e[v++],d=o,p=s,m=a,g=h;return o=(i[d>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^e[v++],s=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&d])^e[v++],a=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[d>>>8&255]<<8|i[255&p])^e[v++],h=(i[g>>>24]<<24|i[d>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^e[v++],[o>>>=0,s>>>=0,a>>>=0,h>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,h=0;h<256;++h){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[s]=u,i[u]=s;var f=t[s],c=t[f],l=t[c],d=257*t[u]^16843008*u;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*l^65537*c^257*f^16843008*s,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===s?s=a=1:(s=f^t[t[t[l^f]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function u(t){this._key=n(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=4*(r+1),n=[],o=0;o>>24,s=h.SBOX[s>>>24]<<24|h.SBOX[s>>>16&255]<<16|h.SBOX[s>>>8&255]<<8|h.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e==4&&(s=h.SBOX[s>>>24]<<24|h.SBOX[s>>>16&255]<<16|h.SBOX[s>>>8&255]<<8|h.SBOX[255&s]),n[o]=n[o-e]^s}for(var u=[],f=0;f>>24]]^h.INV_SUB_MIX[1][h.SBOX[l>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[l>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&l]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return s(t=n(t),this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=i.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},u.prototype.decryptBlock=function(t){var e=(t=n(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),o=i.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=u},function(t,e,r){var i=r(2).Buffer,n=r(88);t.exports=function o(t,e,r,s){if(i.isBuffer(t)||(t=i.from(t,"binary")),e&&(i.isBuffer(e)||(e=i.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=r/8,h=i.alloc(a),u=i.alloc(s||0),f=i.alloc(0);a>0||s>0;){var c=new n;c.update(f),c.update(t),e&&c.update(e),f=c.digest();var l=0;if(a>0){var d=h.length-a;l=Math.min(a,f.length),f.copy(h,d,0,l),a-=l}if(l0){var p=u.length-s,m=Math.min(s,f.length-l);f.copy(u,p,l,l+m),s-=m}}return f.fill(0),{key:h,iv:u}}},function(t,e,r){"use strict";var i=r(16),n=r(11),o=n.getNAF,s=n.getJSF,a=n.assert;function h(t,e){this.type=t,this.p=new i(e.p,16),this.red=e.prime?i.red(e.prime):i.mont(this.p),this.zero=new i(0).toRed(this.red),this.one=new i(1).toRed(this.red),this.two=new i(2).toRed(this.red),this.n=e.n&&new i(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function u(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=h,h.prototype.point=function t(){throw new Error("Not implemented")},h.prototype.validate=function t(){throw new Error("Not implemented")},h.prototype._fixedNafMul=function t(e,r){a(e.precomputed);var i=e._getDoubles(),n=o(r,1,this._bitLength),s=(1<=u;r--)f=(f<<1)+n[r];h.push(f)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),d=s;d>0;d--){for(u=0;u=0;f--){for(r=0;f>=0&&0===h[f];f--)r++;if(f>=0&&r++,u=u.dblp(r),f<0)break;var c=h[f];a(0!==c),u="affine"===e.type?c>0?u.mixedAdd(s[c-1>>1]):u.mixedAdd(s[-c-1>>1].neg()):c>0?u.add(s[c-1>>1]):u.add(s[-c-1>>1].neg())}return"affine"===e.type?u.toP():u},h.prototype._wnafMulAdd=function t(e,r,i,n,a){for(var h=this._wnafT1,u=this._wnafT2,f=this._wnafT3,c=0,l=0;l=1;l-=2){var p=l-1,m=l;if(1===h[p]&&1===h[m]){var g=[r[p],null,null,r[m]];0===r[p].y.cmp(r[m].y)?(g[1]=r[p].add(r[m]),g[2]=r[p].toJ().mixedAdd(r[m].neg())):0===r[p].y.cmp(r[m].y.redNeg())?(g[1]=r[p].toJ().mixedAdd(r[m]),g[2]=r[p].add(r[m].neg())):(g[1]=r[p].toJ().mixedAdd(r[m]),g[2]=r[p].toJ().mixedAdd(r[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=s(i[p],i[m]);c=Math.max(b[0].length,c),f[p]=new Array(c),f[m]=new Array(c);for(var y=0;y=0;l--){for(var k=0;l>=0;){var E=!0;for(y=0;y=0&&k++,M=M.dblp(k),l<0)break;for(y=0;y0?R=u[y][A-1>>1]:A<0&&(R=u[y][-A-1>>1].neg()),M="affine"===R.type?M.mixedAdd(R):M.add(R))}}for(l=0;l=Math.ceil((e.bitLength()+1)/r.step)},u.prototype._getDoubles=function t(e,r){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var i=[this],n=this,o=0;o */ var i=r(7),n=i.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?t.exports=i:(o(i,e),e.Buffer=s),s.prototype=Object.create(n.prototype),o(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},function(t,e,r){var i=r(17),n=r(114),o=r(39),s=r(49),a=r(70),h=r(12),u=r(115),f=Object.getOwnPropertyDescriptor;e.f=i?f:function t(e,r){if(e=s(e),r=a(r,!0),u)try{return f(e,r)}catch(t){}if(h(e,r))return o(!n.f.call(e,r),e[r])}},function(t,e,r){var i=r(9),n=r(50),o="".split;t.exports=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==n(t)?o.call(t,""):Object(t)}:Object},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,r){var i=r(14);t.exports=function(t,e){if(!i(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!i(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!i(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!i(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")}},function(t,e,r){var i=r(3),n=r(14),o=i.document,s=n(o)&&n(o.createElement);t.exports=function(t){return s?o.createElement(t):{}}},function(t,e,r){var i=r(3),n=r(18);t.exports=function(t,e){try{n(i,t,e)}catch(r){i[t]=e}return e}},function(t,e,r){var i=r(74),n=Function.toString;"function"!=typeof i.inspectSource&&(i.inspectSource=function(t){return n.call(t)}),t.exports=i.inspectSource},function(t,e,r){var i=r(3),n=r(72),o="__core-js_shared__",s=i[o]||n(o,{});t.exports=s},function(t,e,r){var i=r(116),n=r(117),o=i("keys");t.exports=function(t){return o[t]||(o[t]=n(t))}},function(t,e){t.exports={}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e,r){var i=r(12),n=r(55),o=r(75),s=r(216),a=o("IE_PROTO"),h=Object.prototype;t.exports=s?Object.getPrototypeOf:function(t){return t=n(t),i(t,a)?t[a]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?h:null}},function(t,e,r){var i,n=r(15),o=r(218),s=r(77),a=r(76),h=r(124),u=r(71),f=r(75),c=f("IE_PROTO"),l=function(){},d=function(t){return"