@dice-roller/vue 0.1.9 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -1
- package/README.md +202 -13
- package/dist/favicon.ico +0 -0
- package/dist/vue.js +30776 -0
- package/dist/vue.umd.cjs +83 -0
- package/package.json +29 -21
- package/dist/demo.html +0 -17
- package/dist/vue.common.js +0 -139382
- package/dist/vue.common.js.map +0 -1
- package/dist/vue.umd.js +0 -139392
- package/dist/vue.umd.js.map +0 -1
- package/dist/vue.umd.min.js +0 -33
- package/dist/vue.umd.min.js.map +0 -1
- package/src/DiceRoller.vue +0 -118
- package/src/main.js +0 -8
package/dist/vue.umd.min.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports["vue"]=t():e["vue"]=t()})("undefined"!==typeof self?self:this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s="fb15")}({0:function(e,t){},"00dc":function(e,t,r){(function(e){var n=r("58a2"),i=r("c24d"),a=r("561d");function o(t){var r=new e(i[t].prime,"hex"),n=new e(i[t].gen,"hex");return new a(r,n)}var s={binary:!0,hex:!0,base64:!0};function u(t,r,i,o){return e.isBuffer(r)||void 0===s[r]?u(t,"binary",r,i):(r=r||"binary",o=o||"binary",i=i||new e([2]),e.isBuffer(i)||(i=new e(i,o)),"number"===typeof t?new a(n(t,i),i,!0):(e.isBuffer(t)||(t=new e(t,r)),new a(t,i,!0)))}t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=o,t.createDiffieHellman=t.DiffieHellman=u}).call(this,r("b639").Buffer)},"00ee":function(e,t,r){var n=r("b622"),i=n("toStringTag"),a={};a[i]="z",e.exports="[object z]"===String(a)},"0106":function(e,t,r){(function(e){(function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(15).Buffer}catch(E){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a<i;a++){var o=e.charCodeAt(a)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function u(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=e.length-6,n=0;r>=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,a+=24,a>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,f=r;f<s;f+=n)c=u(e,f,f+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var h=1;for(c=u(e,f,e.length,t),f=0;f<o;f++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){while(this.length<e)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&0===this.words[this.length-1])this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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],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];function l(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;i=0|e.words[p],a=0|t.words[d],o=i*a+h,f+=o/67108864|0,h=67108863&o}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<i|a)).toString(16);a=s>>>24-i&16777215,r=0!==a||o!==this.length-1?c[6-u.length]+u+r:u+r,i+=2,i>=26&&(i-=26,o--)}0!==a&&(r=a.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(d).toString(e);p=p.idivn(d),r=p.isZero()?m+r:c[l-m.length]+m+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n("undefined"!==typeof o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===t,c=new e(a),f=this.clone();if(u){for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){while(this.length<e.length)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)t=(0|r.words[o])-(0|n.words[o])+a,a=t>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)t=(0|r.words[o])+a,a=t>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,s=t.words,u=r.words,c=0,f=0|o[0],h=8191&f,l=f>>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],w=8191&b,M=b>>>13,x=0|o[4],_=8191&x,S=x>>>13,N=0|o[5],E=8191&N,A=N>>>13,D=0|o[6],k=8191&D,O=D>>>13,C=0|o[7],T=8191&C,R=C>>>13,B=0|o[8],I=8191&B,q=B>>>13,P=0|o[9],j=8191&P,z=P>>>13,L=0|s[0],U=8191&L,F=L>>>13,H=0|s[1],Z=8191&H,W=H>>>13,V=0|s[2],G=8191&V,$=V>>>13,K=0|s[3],J=8191&K,Y=K>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,F),i=i+Math.imul(l,U)|0,a=Math.imul(l,F);var ge=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=Math.imul(p,F),i=i+Math.imul(m,U)|0,a=Math.imul(m,F),n=n+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(l,Z)|0,a=a+Math.imul(l,W)|0;var ve=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,U),i=Math.imul(v,F),i=i+Math.imul(y,U)|0,a=Math.imul(y,F),n=n+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(h,G)|0,i=i+Math.imul(h,$)|0,i=i+Math.imul(l,G)|0,a=a+Math.imul(l,$)|0;var ye=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=Math.imul(w,F),i=i+Math.imul(M,U)|0,a=Math.imul(M,F),n=n+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(y,Z)|0,a=a+Math.imul(y,W)|0,n=n+Math.imul(p,G)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(m,G)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,Y)|0,i=i+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0;var be=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,U),i=Math.imul(_,F),i=i+Math.imul(S,U)|0,a=Math.imul(S,F),n=n+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,n=n+Math.imul(v,G)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(y,G)|0,a=a+Math.imul(y,$)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,ee)|0,i=i+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0;var we=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,U),i=Math.imul(E,F),i=i+Math.imul(A,U)|0,a=Math.imul(A,F),n=n+Math.imul(_,Z)|0,i=i+Math.imul(_,W)|0,i=i+Math.imul(S,Z)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(w,G)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(M,G)|0,a=a+Math.imul(M,$)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(h,re)|0,i=i+Math.imul(h,ne)|0,i=i+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0;var Me=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(k,U),i=Math.imul(k,F),i=i+Math.imul(O,U)|0,a=Math.imul(O,F),n=n+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,i=i+Math.imul(A,Z)|0,a=a+Math.imul(A,W)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(S,G)|0,a=a+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,i=i+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,n=n+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(h,ae)|0,i=i+Math.imul(h,oe)|0,i=i+Math.imul(l,ae)|0,a=a+Math.imul(l,oe)|0;var xe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),i=Math.imul(T,F),i=i+Math.imul(R,U)|0,a=Math.imul(R,F),n=n+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(O,Z)|0,a=a+Math.imul(O,W)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(A,G)|0,a=a+Math.imul(A,$)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Y)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(h,ue)|0,i=i+Math.imul(h,ce)|0,i=i+Math.imul(l,ue)|0,a=a+Math.imul(l,ce)|0;var _e=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,U),i=Math.imul(I,F),i=i+Math.imul(q,U)|0,a=Math.imul(q,F),n=n+Math.imul(T,Z)|0,i=i+Math.imul(T,W)|0,i=i+Math.imul(R,Z)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(k,G)|0,i=i+Math.imul(k,$)|0,i=i+Math.imul(O,G)|0,a=a+Math.imul(O,$)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Y)|0,i=i+Math.imul(A,J)|0,a=a+Math.imul(A,Y)|0,n=n+Math.imul(_,Q)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,n=n+Math.imul(p,ue)|0,i=i+Math.imul(p,ce)|0,i=i+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(h,he)|0,i=i+Math.imul(h,le)|0,i=i+Math.imul(l,he)|0,a=a+Math.imul(l,le)|0;var Se=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,U),i=Math.imul(j,F),i=i+Math.imul(z,U)|0,a=Math.imul(z,F),n=n+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0,i=i+Math.imul(q,Z)|0,a=a+Math.imul(q,W)|0,n=n+Math.imul(T,G)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(R,G)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,i=i+Math.imul(O,J)|0,a=a+Math.imul(O,Y)|0,n=n+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,n=n+Math.imul(v,ue)|0,i=i+Math.imul(v,ce)|0,i=i+Math.imul(y,ue)|0,a=a+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=i+Math.imul(p,le)|0,i=i+Math.imul(m,he)|0,a=a+Math.imul(m,le)|0,n=n+Math.imul(h,pe)|0,i=i+Math.imul(h,me)|0,i=i+Math.imul(l,pe)|0,a=a+Math.imul(l,me)|0;var Ne=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,Z),i=Math.imul(j,W),i=i+Math.imul(z,Z)|0,a=Math.imul(z,W),n=n+Math.imul(I,G)|0,i=i+Math.imul(I,$)|0,i=i+Math.imul(q,G)|0,a=a+Math.imul(q,$)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Y)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,i=i+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,ue)|0,i=i+Math.imul(w,ce)|0,i=i+Math.imul(M,ue)|0,a=a+Math.imul(M,ce)|0,n=n+Math.imul(v,he)|0,i=i+Math.imul(v,le)|0,i=i+Math.imul(y,he)|0,a=a+Math.imul(y,le)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,me)|0;var Ee=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,G),i=Math.imul(j,$),i=i+Math.imul(z,G)|0,a=Math.imul(z,$),n=n+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,i=i+Math.imul(q,J)|0,a=a+Math.imul(q,Y)|0,n=n+Math.imul(T,Q)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,i=i+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(_,ue)|0,i=i+Math.imul(_,ce)|0,i=i+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,he)|0,i=i+Math.imul(w,le)|0,i=i+Math.imul(M,he)|0,a=a+Math.imul(M,le)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(y,pe)|0,a=a+Math.imul(y,me)|0;var Ae=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=Math.imul(j,Y),i=i+Math.imul(z,J)|0,a=Math.imul(z,Y),n=n+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,i=i+Math.imul(q,Q)|0,a=a+Math.imul(q,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(k,ae)|0,i=i+Math.imul(k,oe)|0,i=i+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(E,ue)|0,i=i+Math.imul(E,ce)|0,i=i+Math.imul(A,ue)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(_,he)|0,i=i+Math.imul(_,le)|0,i=i+Math.imul(S,he)|0,a=a+Math.imul(S,le)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(M,pe)|0,a=a+Math.imul(M,me)|0;var De=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,Q),i=Math.imul(j,ee),i=i+Math.imul(z,Q)|0,a=Math.imul(z,ee),n=n+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,i=i+Math.imul(q,re)|0,a=a+Math.imul(q,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(k,ue)|0,i=i+Math.imul(k,ce)|0,i=i+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(E,he)|0,i=i+Math.imul(E,le)|0,i=i+Math.imul(A,he)|0,a=a+Math.imul(A,le)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(S,pe)|0,a=a+Math.imul(S,me)|0;var ke=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,re),i=Math.imul(j,ne),i=i+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(I,ae)|0,i=i+Math.imul(I,oe)|0,i=i+Math.imul(q,ae)|0,a=a+Math.imul(q,oe)|0,n=n+Math.imul(T,ue)|0,i=i+Math.imul(T,ce)|0,i=i+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(k,he)|0,i=i+Math.imul(k,le)|0,i=i+Math.imul(O,he)|0,a=a+Math.imul(O,le)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(A,pe)|0,a=a+Math.imul(A,me)|0;var Oe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ae),i=Math.imul(j,oe),i=i+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(I,ue)|0,i=i+Math.imul(I,ce)|0,i=i+Math.imul(q,ue)|0,a=a+Math.imul(q,ce)|0,n=n+Math.imul(T,he)|0,i=i+Math.imul(T,le)|0,i=i+Math.imul(R,he)|0,a=a+Math.imul(R,le)|0,n=n+Math.imul(k,pe)|0,i=i+Math.imul(k,me)|0,i=i+Math.imul(O,pe)|0,a=a+Math.imul(O,me)|0;var Ce=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=Math.imul(j,ce),i=i+Math.imul(z,ue)|0,a=Math.imul(z,ce),n=n+Math.imul(I,he)|0,i=i+Math.imul(I,le)|0,i=i+Math.imul(q,he)|0,a=a+Math.imul(q,le)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(R,pe)|0,a=a+Math.imul(R,me)|0;var Te=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,he),i=Math.imul(j,le),i=i+Math.imul(z,he)|0,a=Math.imul(z,le),n=n+Math.imul(I,pe)|0,i=i+Math.imul(I,me)|0,i=i+Math.imul(q,pe)|0,a=a+Math.imul(q,me)|0;var Re=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,pe),i=Math.imul(j,me),i=i+Math.imul(z,pe)|0,a=Math.imul(z,me);var Be=(c+n|0)+((8191&i)<<13)|0;return c=(a+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=Me,u[6]=xe,u[7]=_e,u[8]=Se,u[9]=Ne,u[10]=Ee,u[11]=Ae,u[12]=De,u[13]=ke,u[14]=Oe,u[15]=Ce,u[16]=Te,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,u=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=u;c++){var f=a-c,h=0|e.words[f],l=0|t.words[c],d=h*l,p=67108863&d;o=o+(d/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function g(e,t,r){var n=new v;return n.mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?d(this,e,t):n<1024?m(this,e,t):g(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},v.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<o;d++){var p=r[f+d],m=n[f+d],g=r[f+d+o],v=n[f+d+o],y=h*g-l*v;v=h*v+l*g,g=y,r[f+d]=p+g,n[f+d]=m+v,r[f+d+o]=p-g,n[f+d+o]=m-v,d!==s&&(y=u*h-c*l,l=u*l+c*h,h=y)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0===(-8192&a))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,s,u,n,i),this.transform(c,a,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),g(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"===typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=l(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length;n++,r=r.sqr())if(0!==t[n])break;if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-a|h>>>a,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return!1;var a=this.words[r];return!!(a&i)},a.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;a-=67108863&u,s=(a>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)a=(0|this.words[i+r])+s,s=a>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)a=-(0|this.words[i])+s,s=a>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1],s=this._countBits(o);r=26-s,0!==r&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var u,c=n.length-i.length;if("mod"!==t){u=new a(null),u.length=c+1,u.words=new Array(u.length);for(var f=0;f<u.length;f++)u.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,c);0===h.negative&&(n=h,u&&(u.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,l);while(0!==n.negative)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:u||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++c;var f=r.clone(),h=t.clone();while(!t.isZero()){for(var l=0,d=1;0===(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0){t.iushrn(l);while(l-- >0)(i.isOdd()||o.isOdd())&&(i.iadd(f),o.isub(h)),i.iushrn(1),o.iushrn(1)}for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0){r.iushrn(p);while(p-- >0)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1)}t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(u)):(r.isub(t),s.isub(i),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i,o=new a(1),s=new a(0),u=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0){t.iushrn(c);while(c-- >0)o.isOdd()&&o.iadd(u),o.iushrn(1)}for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0){r.iushrn(h);while(h-- >0)s.isOdd()&&s.iadd(u),s.iushrn(1)}t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return i=0===t.cmpn(1)?o:s,i.cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(w,b),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,b),i(x,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new M;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1),o=0;while(!i.isZero()&&0===i.andln(1))o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new a(2*f*f).toRed(this);while(0!==this.pow(f,c).cmp(u))f.redIAdd(u);var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;while(0!==d.cmp(s)){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new a(1).iushln(p-g-1));l=l.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return l},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=4,n=new Array(1<<r);n[0]=new a(1).toRed(this),n[1]=e;for(var i=2;i<n.length;i++)n[i]=this.mul(n[i-1],e);var o=n[0],s=0,u=0,c=t.bitLength()%26;for(0===c&&(c=26),i=t.length-1;i>=0;i--){for(var f=t.words[i],h=c-1;h>=0;h--){var l=f>>h&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,u++,(u===r||0===i&&0===h)&&(o=this.mul(o,n[s]),u=0,s=0)):u=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new N(e)},i(N,S),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},N.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(e,this)}).call(this,r("62e4")(e))},"0145":function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},"0184":function(e,t,r){"use strict";var n=r("da3e");function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var a=e.length-(e.length-t)%this.blockSize;t<a;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;while(t<e.length)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},"01d3":function(e,t,r){var n=r("d480");"string"===typeof n&&(n=[[e.i,n,""]]),n.locals&&(e.exports=n.locals);var i=r("499e").default;i("d5df87e4",n,!0,{sourceMap:!1,shadowMode:!1})},"0211":function(e,t,r){var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r("8b71")},"05f0":function(e,t,r){"use strict";var n=r("d113").codes.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function a(e,t,r,a){var o=i(t,a,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0){var s=a?r:"highWaterMark";throw new n(s,o)}return Math.floor(o)}return e.objectMode?16:16384}e.exports={getHighWaterMark:a}},"06cf":function(e,t,r){var n=r("83ab"),i=r("d1e7"),a=r("5c6c"),o=r("fc6a"),s=r("c04e"),u=r("5135"),c=r("0cfb"),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(e,t){if(e=o(e),t=s(t,!0),c)try{return f(e,t)}catch(r){}if(u(e,t))return a(!i.f.call(e,t),e[t])}},"0706":function(module,exports){var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(e),(function(t){r[t]=e[t]})),forEach(globals,(function(t){e[t]&&(r[t]=e[t])}));var a=Object_keys(r),o=n.call(r,this.code);return forEach(Object_keys(r),(function(t){(t in e||-1===indexOf(a,t))&&(e[t]=r[t])})),forEach(globals,(function(t){t in e||defineProp(e,t,r[t])})),document.body.removeChild(t),o},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),(function(r){e[r]=t[r]})),r},forEach(Object_keys(Script.prototype),(function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}})),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"===typeof e&&forEach(Object_keys(e),(function(r){t[r]=e[r]})),t}},"07d6":function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},"07f2":function(e,t,r){"use strict";var n=r("c3c0"),i=r("6eed");function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=512,a.outSize=224,a.hmacStrength=192,a.padLength=64,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},"087f":function(e,t,r){var n=r("3fb5"),i=r("b672"),a=r("8707").Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function h(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,s=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=t[u-3]^t[u-8]^t[u-14]^t[u-16];for(var l=0;l<80;++l){var d=~~(l/20),p=c(r)+h(d,n,i,a)+s+t[l]+o[d]|0;s=a,a=i,i=f(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},"0960":function(e,t,r){e.exports=r("b19a")},"09dc":function(e,t,r){"use strict";e.exports=f;var n=r("9d8a").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r("e666");function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!==typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,r){l(e,t,r)}))}function l(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}r("3fb5")(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},"09f5":function(e,t,r){var n=r("39f5"),i=r("8707").Buffer,a=r("6430"),o=r("3fb5");function s(e,t,r,o){a.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._mode=e}o(s,a),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},"0ae3":function(e,t,r){"use strict";e.exports=i;var n=r("09dc");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r("3fb5")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},"0be8":function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},"0cbb":function(e,t,r){"use strict";var n,i=t,a=r("7d92"),o=r("4136"),s=r("f3a3"),u=s.assert;function c(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,u(this.g.validate(),"Invalid curve"),u(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function f(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new c(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=c,f("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:a.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),f("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:a.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),f("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:a.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),f("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:a.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"]}),f("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:a.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"]}),f("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a.sha256,gRed:!1,g:["9"]}),f("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:a.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r("409b")}catch(h){n=void 0}f("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:a.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},"0cfb":function(e,t,r){var n=r("83ab"),i=r("d039"),a=r("cc12");e.exports=!n&&!i((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},"0da4":function(e,t,r){"use strict";var n=r("da3e"),i=r("3fb5"),a={};function o(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}function s(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(a),n=0;n<r.length;n++){var o=r[n];t.prototype[o]=a[o]}return t.create=function(e){return new t(e)},t}t.instantiate=s,a._cbcInit=function(){var e=new o(this.options.iv);this._cbcState=e},a._update=function(e,t,r,n){var i=this._cbcState,a=this.constructor.super_.prototype,o=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)o[s]^=e[t+s];a._update.call(this,o,0,r,n);for(s=0;s<this.blockSize;s++)o[s]=r[n+s]}else{a._update.call(this,e,t,r,n);for(s=0;s<this.blockSize;s++)r[n+s]^=o[s];for(s=0;s<this.blockSize;s++)o[s]=e[t+s]}}},"0f2c":function(e,t,r){var n=r("2aee"),i=r("f460"),a=r("83d5"),o=r("0106"),s=r("a958"),u=r("98e6"),c=r("5291"),f=r("8707").Buffer;function h(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(f.alloc(0)).digest(),o=n.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,o+1),c=t.slice(o+1),h=a(s,i(c,o)),l=a(c,i(h,r-o-1));if(d(n,l.slice(0,o)))throw new Error("decryption error");var p=o;while(0===l[p])p++;if(1!==l[p++])throw new Error("decryption error");return l.slice(p)}function l(e,t,r){var n=t.slice(0,2),i=2,a=0;while(0!==t[i++])if(i>=t.length){a++;break}var o=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&a++,o.length<8&&a++,a)throw new Error("decryption error");return t.slice(i)}function d(e,t){e=f.from(e),t=f.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));var i=-1;while(++i<n)r+=e[i]^t[i];return r}e.exports=function(e,t,r){var i;i=e.padding?e.padding:r?1:4;var a,u=n(e),d=u.modulus.byteLength();if(t.length>d||new o(t).cmp(u.modulus)>=0)throw new Error("decryption error");a=r?c(new o(t),u):s(t,u);var p=f.alloc(d-a.length);if(a=f.concat([p,a],d),4===i)return h(u,a);if(1===i)return l(u,a,r);if(3===i)return a;throw new Error("unknown padding")}},1:function(e,t){},10:function(e,t){},11:function(e,t){},"116d":function(e,t,r){e.exports=r("b4e8")},"11a1":function(e,t,r){"use strict";r.r(t),r.d(t,"Random",(function(){return te})),r.d(t,"browserCrypto",(function(){return oe})),r.d(t,"nativeMath",(function(){return ee})),r.d(t,"MersenneTwister19937",(function(){return pe})),r.d(t,"nodeCrypto",(function(){return Me})),r.d(t,"bool",(function(){return C})),r.d(t,"date",(function(){return T})),r.d(t,"dice",(function(){return B})),r.d(t,"die",(function(){return R})),r.d(t,"hex",(function(){return L})),r.d(t,"int32",(function(){return h})),r.d(t,"int53",(function(){return d})),r.d(t,"int53Full",(function(){return p})),r.d(t,"integer",(function(){return A})),r.d(t,"pick",(function(){return H})),r.d(t,"picker",(function(){return xe})),r.d(t,"real",(function(){return G})),r.d(t,"realZeroToOneExclusive",(function(){return W})),r.d(t,"realZeroToOneInclusive",(function(){return V})),r.d(t,"sample",(function(){return J})),r.d(t,"shuffle",(function(){return K})),r.d(t,"string",(function(){return q})),r.d(t,"uint32",(function(){return m})),r.d(t,"uint53",(function(){return g})),r.d(t,"uint53Full",(function(){return v})),r.d(t,"uuid4",(function(){return Q})),r.d(t,"createEntropy",(function(){return se}));const n=9007199254740992,i=n-1,a=-1>>>0,o=a+1,s=o/2,u=s-1,c=1<<21,f=c-1;function h(e){return 0|e.next()}function l(e,t){return 0===t?e:r=>e(r)+t}function d(e){const t=0|e.next(),r=e.next()>>>0;return(t&f)*o+r+(t&c?-n:0)}function p(e){while(1){const t=0|e.next();if(!(4194304&t)){const r=e.next()>>>0;return(t&f)*o+r+(t&c?-n:0)}if(4194304===(8388607&t)&&0===(0|e.next()))return n}}function m(e){return e.next()>>>0}function g(e){const t=e.next()&f,r=e.next()>>>0;return t*o+r}function v(e){while(1){const t=0|e.next();if(!(t&c)){const r=e.next()>>>0;return(t&f)*o+r}if(0===(t&f)&&0===(0|e.next()))return n}}function y(e){return 0===(e+1&e)}function b(e){return t=>t.next()&e}function w(e){const t=e+1,r=t*Math.floor(o/t);return e=>{let n=0;do{n=e.next()>>>0}while(n>=r);return n%t}}function M(e){return y(e)?b(e):w(e)}function x(e){return 0===(0|e)}function _(e){return t=>{const r=t.next()&e,n=t.next()>>>0;return r*o+n}}function S(e){const t=e*Math.floor(n/e);return r=>{let n=0;do{const e=r.next()&f,t=r.next()>>>0;n=e*o+t}while(n>=t);return n%e}}function N(e){const t=e+1;if(x(t)){const e=(t/o|0)-1;if(y(e))return _(e)}return S(t)}function E(e,t){return r=>{let i=0;do{const e=0|r.next(),t=r.next()>>>0;i=(e&f)*o+t+(e&c?-n:0)}while(i<e||i>t);return i}}function A(e,t){if(e=Math.floor(e),t=Math.floor(t),e<-n||!isFinite(e))throw new RangeError("Expected min to be at least "+-n);if(t>n||!isFinite(t))throw new RangeError("Expected max to be at most "+n);const r=t-e;return r<=0||!isFinite(r)?()=>e:r===a?0===e?m:l(h,e+s):r<a?l(M(r),e):r===i?l(g,e):r<i?l(N(r),e):t-1-e===i?l(v,e):e===-n&&t===n?p:e===-n&&t===i?d:e===-i&&t===n?l(d,1):t===n?l(E(e-1,t-1),1):E(e,t)}function D(e){return 1===(1&e.next())}function k(e,t){return r=>e(r)<t}function O(e){if(e<=0)return()=>!1;if(e>=1)return()=>!0;{const t=e*o;return t%1===0?k(h,t-s|0):k(g,Math.round(e*n))}}function C(e,t){return null==t?null==e?D:O(e):e<=0?()=>!1:e>=t?()=>!0:k(A(0,t-1),e)}function T(e,t){const r=A(+e,+t);return e=>new Date(r(e))}function R(e){return A(1,e)}function B(e,t){const r=R(e);return e=>{const n=[];for(let i=0;i<t;++i)n.push(r(e));return n}}const I="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-";function q(e=I){const t=e.length;if(!t)throw new Error("Expected pool not to be an empty string");const r=A(0,t-1);return(t,n)=>{let i="";for(let a=0;a<n;++a){const n=r(t);i+=e.charAt(n)}return i}}const P="0123456789abcdef",j=q(P),z=q(P.toUpperCase());function L(e){return e?z:j}function U(e,t){return e<0?Math.max(e+t,0):Math.min(e,t)}function F(e){const t=+e;return t<0?Math.ceil(t):Math.floor(t)}function H(e,t,r,n){const i=t.length;if(0===i)throw new RangeError("Cannot pick from an empty array");const a=null==r?0:U(F(r),i),o=void 0===n?i:U(F(n),i);if(a>=o)throw new RangeError(`Cannot pick between bounds ${a} and ${o}`);const s=A(a,o-1);return t[s(e)]}function Z(e,t){return 1===t?e:0===t?()=>0:r=>e(r)*t}function W(e){return g(e)/n}function V(e){return v(e)/n}function G(e,t,r=!1){if(!isFinite(e))throw new RangeError("Expected min to be a finite number");if(!isFinite(t))throw new RangeError("Expected max to be a finite number");return l(Z(r?V:W,t-e),e)}const $=Array.prototype.slice;function K(e,t,r=0){const n=t.length;if(n)for(let i=n-1>>>0;i>r;--i){const r=A(0,i),n=r(e);if(i!==n){const e=t[i];t[i]=t[n],t[n]=e}}return t}function J(e,t,r){if(r<0||r>t.length||!isFinite(r))throw new RangeError("Expected sampleSize to be within 0 and the length of the population");if(0===r)return[];const n=$.call(t),i=n.length;if(i===r)return K(e,n,0);const a=i-r;return K(e,n,a-1).slice(a)}const Y=(()=>{try{if("xxx"==="x".repeat(3))return(e,t)=>e.repeat(t)}catch(e){}return(e,t)=>{let r="";while(t>0)1&t&&(r+=e),t>>=1,e+=e;return r}})();function X(e,t){return Y("0",t-e.length)+e}function Q(e){const t=e.next()>>>0,r=0|e.next(),n=0|e.next(),i=e.next()>>>0;return X(t.toString(16),8)+"-"+X((65535&r).toString(16),4)+"-"+X((r>>4&4095|16384).toString(16),4)+"-"+X((16383&n|32768).toString(16),4)+"-"+X((n>>4&65535).toString(16),4)+X(i.toString(16),8)}const ee={next(){return Math.random()*o|0}};class te{constructor(e=ee){this.engine=e}int32(){return h(this.engine)}uint32(){return m(this.engine)}uint53(){return g(this.engine)}uint53Full(){return v(this.engine)}int53(){return d(this.engine)}int53Full(){return p(this.engine)}integer(e,t){return A(e,t)(this.engine)}realZeroToOneInclusive(){return V(this.engine)}realZeroToOneExclusive(){return W(this.engine)}real(e,t,r=!1){return G(e,t,r)(this.engine)}bool(e,t){return C(e,t)(this.engine)}pick(e,t,r){return H(this.engine,e,t,r)}shuffle(e){return K(this.engine,e)}sample(e,t){return J(this.engine,e,t)}die(e){return R(e)(this.engine)}dice(e,t){return B(e,t)(this.engine)}uuid4(){return Q(this.engine)}string(e,t){return q(t)(this.engine,e)}hex(e,t){return L(t)(this.engine,e)}date(e,t){return T(e,t)(this.engine)}}const re=(()=>{try{const e=new ArrayBuffer(4),t=new Int32Array(e);if(t[0]=s,t[0]===-s)return Int32Array}catch(e){}return Array})();let ne=null;const ie=128;let ae=ie;const oe={next(){return ae>=ie&&(null===ne&&(ne=new re(ie)),crypto.getRandomValues(ne),ae=0),0|ne[ae++]}};function se(e=ee,t=16){const r=[];r.push(0|(new Date).getTime());for(let n=1;n<t;++n)r[n]=0|e.next();return r}const ue=(()=>{try{if(-5===Math.imul(a,5))return Math.imul}catch(t){}const e=65535;return(t,r)=>{const n=t>>>16&e,i=t&e,a=r>>>16&e,o=r&e;return i*o+(n*o+i*a<<16>>>0)|0}})(),ce=624,fe=ce-1,he=397,le=ce-he,de=2567483615;class pe{constructor(){this.data=new re(ce),this.index=0,this.uses=0}static seed(e){return(new pe).seed(e)}static seedWithArray(e){return(new pe).seedWithArray(e)}static autoSeed(){return pe.seedWithArray(se())}next(){(0|this.index)>=ce&&(me(this.data),this.index=0);const e=this.data[this.index];return this.index=this.index+1|0,this.uses+=1,0|ge(e)}getUseCount(){return this.uses}discard(e){if(e<=0)return this;this.uses+=e,(0|this.index)>=ce&&(me(this.data),this.index=0);while(e+this.index>ce)e-=ce-this.index,me(this.data),this.index=0;return this.index=this.index+e|0,this}seed(e){let t=0;this.data[0]=t=0|e;for(let r=1;r<ce;r=r+1|0)this.data[r]=t=ue(t^t>>>30,1812433253)+r|0;return this.index=ce,this.uses=0,this}seedWithArray(e){return this.seed(19650218),ve(this.data,e),this}}function me(e){let t=0,r=0;for(;(0|t)<le;t=t+1|0)r=e[t]&s|e[t+1|0]&u,e[t]=e[t+he|0]^r>>>1^(1&r?de:0);for(;(0|t)<fe;t=t+1|0)r=e[t]&s|e[t+1|0]&u,e[t]=e[t-le|0]^r>>>1^(1&r?de:0);r=e[fe]&s|e[0]&u,e[fe]=e[he-1]^r>>>1^(1&r?de:0)}function ge(e){return e^=e>>>11,e^=e<<7&2636928640,e^=e<<15&4022730752,e^e>>>18}function ve(e,t){let r=1,n=0;const i=t.length;let a=0|Math.max(i,ce),o=0|e[0];for(;(0|a)>0;--a)e[r]=o=(e[r]^ue(o^o>>>30,1664525))+(0|t[n])+(0|n)|0,r=r+1|0,++n,(0|r)>fe&&(e[0]=e[fe],r=1),n>=i&&(n=0);for(a=fe;(0|a)>0;--a)e[r]=o=(e[r]^ue(o^o>>>30,1566083941))-r|0,r=r+1|0,(0|r)>fe&&(e[0]=e[fe],r=1);e[0]=s}let ye=null;const be=128;let we=be;const Me={next(){return we>=be&&(ye=new Int32Array(new Int8Array(r("1c46").randomBytes(4*be)).buffer),we=0),0|ye[we++]}};function xe(e,t,r){const n=$.call(e,t,r);if(0===n.length)throw new RangeError("Cannot pick from a source with no items");const i=A(0,n.length-1);return e=>n[i(e)]}},"11dc":function(e,t,r){"use strict";(function(t,n){var i=65536,a=4294967295;function o(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}var s=r("8707").Buffer,u=t.crypto||t.msCrypto;function c(e,t){if(e>a)throw new RangeError("requested too many random bytes");var r=s.allocUnsafe(e);if(e>0)if(e>i)for(var o=0;o<e;o+=i)u.getRandomValues(r.slice(o,o+i));else u.getRandomValues(r);return"function"===typeof t?n.nextTick((function(){t(null,r)})):r}u&&u.getRandomValues?e.exports=c:e.exports=o}).call(this,r("c8ba"),r("4362"))},12:function(e,t){},1212:function(e,t,r){(function(e){var n;(function(e,i,a){function o(e){var t=this,r=c();t.next=function(){var e=2091639*t.s0+2.3283064365386963e-10*t.c;return t.s0=t.s1,t.s1=t.s2,t.s2=e-(t.c=0|e)},t.c=1,t.s0=r(" "),t.s1=r(" "),t.s2=r(" "),t.s0-=r(e),t.s0<0&&(t.s0+=1),t.s1-=r(e),t.s1<0&&(t.s1+=1),t.s2-=r(e),t.s2<0&&(t.s2+=1),r=null}function s(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function u(e,t){var r=new o(e),n=t&&t.state,i=r.next;return i.int32=function(){return 4294967296*r.next()|0},i.double=function(){return i()+11102230246251565e-32*(2097152*i()|0)},i.quick=i,n&&("object"==typeof n&&s(n,r),i.state=function(){return s(r,{})}),i}function c(){var e=4022871197,t=function(t){t=String(t);for(var r=0;r<t.length;r++){e+=t.charCodeAt(r);var n=.02519603282416938*e;e=n>>>0,n-=e,n*=e,e=n>>>0,n-=e,e+=4294967296*n}return 2.3283064365386963e-10*(e>>>0)};return t}i&&i.exports?i.exports=u:r("07d6")&&r("3c35")?(n=function(){return u}.call(t,r,t,i),void 0===n||(i.exports=n)):this.alea=u})(0,e,r("07d6"))}).call(this,r("62e4")(e))},13:function(e,t){},"13e2":function(e,t,r){"use strict";var n=r("c3c0"),i=r("edc9"),a=r("aa56"),o=n.rotl32,s=n.sum32,u=n.sum32_5,c=a.ft_1,f=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,f),e.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=o(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],a=this.h[1],f=this.h[2],l=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=u(o(i,5),c(p,a,f,l),d,r[n],h[p]);d=l,l=f,f=o(a,30),a=i,i=m}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],f),this.h[3]=s(this.h[3],l),this.h[4]=s(this.h[4],d)},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},14:function(e,t){},15:function(e,t){},1545:function(e,t,r){"use strict";t.utils=r("5ee7"),t.Cipher=r("0184"),t.DES=r("4e2b"),t.CBC=r("0da4"),t.EDE=r("1fec")},"19ea":function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){W(t,e)}}var a;e.exports=D,D.WritableState=A;var o={deprecate:r("b7d1")},s=r("5bbb"),u=r("b639").Buffer,c=t.Uint8Array||function(){};function f(e){return u.from(e)}function h(e){return u.isBuffer(e)||e instanceof c}var l,d=r("493f"),p=r("b9b5"),m=p.getHighWaterMark,g=r("9d8a").codes,v=g.ERR_INVALID_ARG_TYPE,y=g.ERR_METHOD_NOT_IMPLEMENTED,b=g.ERR_MULTIPLE_CALLBACK,w=g.ERR_STREAM_CANNOT_PIPE,M=g.ERR_STREAM_DESTROYED,x=g.ERR_STREAM_NULL_VALUES,_=g.ERR_STREAM_WRITE_AFTER_END,S=g.ERR_UNKNOWN_ENCODING,N=d.errorOrDestroy;function E(){}function A(e,t,n){a=a||r("e666"),e=e||{},"boolean"!==typeof n&&(n=t instanceof a),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=m(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){q(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function D(e){a=a||r("e666");var t=this instanceof a;if(!t&&!l.call(D,this))return new D(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),s.call(this)}function k(e,t){var r=new _;N(e,r),n.nextTick(t,r)}function O(e,t,r,i){var a;return null===r?a=new x:"string"===typeof r||t.objectMode||(a=new v("chunk",["string","Buffer"],r)),!a||(N(e,a),n.nextTick(i,a),!1)}function C(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=u.from(t,r)),t}function T(e,t,r,n,i,a){if(!r){var o=C(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,s,n,i,a);return u}function R(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new M("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function B(e,t,r,i,a){--t.pendingcb,r?(n.nextTick(a,i),n.nextTick(H,e,t),e._writableState.errorEmitted=!0,N(e,i)):(a(i),e._writableState.errorEmitted=!0,N(e,i),H(e,t))}function I(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function q(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if("function"!==typeof a)throw new b;if(I(r),t)B(e,r,i,t,a);else{var o=L(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||z(e,r),i?n.nextTick(P,e,r,o,a):P(e,r,o,a)}}function P(e,t,r,n){r||j(e,t),t.pendingcb--,n(),H(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function z(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),o=t.corkedRequestsFree;o.entry=r;var s=0,u=!0;while(r)a[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;a.allBuffers=u,R(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{while(r){var c=r.chunk,f=r.encoding,h=r.callback,l=t.objectMode?1:c.length;if(R(e,t,!1,l,c,f,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function L(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function U(e,t){e._final((function(r){t.pendingcb--,r&&N(e,r),t.prefinished=!0,e.emit("prefinish"),H(e,t)}))}function F(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(U,e,t)))}function H(e,t){var r=L(t);if(r&&(F(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function Z(e,t,r){t.ending=!0,H(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function W(e,t,r){var n=e.entry;e.entry=null;while(n){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}r("3fb5")(D,s),A.prototype.getBuffer=function(){var e=this.bufferedRequest,t=[];while(e)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===D&&(e&&e._writableState instanceof A)}})):l=function(e){return e instanceof this},D.prototype.pipe=function(){N(this,new w)},D.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&h(e);return a&&!u.isBuffer(e)&&(e=f(e)),"function"===typeof t&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!==typeof r&&(r=E),n.ending?k(this,r):(a||O(this,n,e,r))&&(n.pendingcb++,i=T(this,n,a,e,t,r)),i},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||z(this,e))},D.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),D.prototype._write=function(e,t,r){r(new y("_write()"))},D.prototype._writev=null,D.prototype.end=function(e,t,r){var n=this._writableState;return"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||Z(this,n,r),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),D.prototype.destroy=d.destroy,D.prototype._undestroy=d.undestroy,D.prototype._destroy=function(e,t){t(e)}}).call(this,r("c8ba"),r("4362"))},"1a2a":function(e,t,r){"use strict";var n=r("3fb5"),i=r("d424"),a=r("6430"),o=r("8707").Buffer,s=r("5a76"),u=r("b5ca"),c=r("69f2"),f=o.alloc(128);function h(e,t){a.call(this,"digest"),"string"===typeof t&&(t=o.from(t));var r="sha512"===e||"sha384"===e?128:64;if(this._alg=e,this._key=t,t.length>r){var n="rmd160"===e?new u:c(e);t=n.update(t).digest()}else t.length<r&&(t=o.concat([t,f],r));for(var i=this._ipad=o.allocUnsafe(r),s=this._opad=o.allocUnsafe(r),h=0;h<r;h++)i[h]=54^t[h],s[h]=92^t[h];this._hash="rmd160"===e?new u:c(e),this._hash.update(i)}n(h,a),h.prototype._update=function(e){this._hash.update(e)},h.prototype._final=function(){var e=this._hash.digest(),t="rmd160"===this._alg?new u:c(this._alg);return t.update(this._opad).update(e).digest()},e.exports=function(e,t){return e=e.toLowerCase(),"rmd160"===e||"ripemd160"===e?new h("rmd160",t):"md5"===e?new i(s,t):new h(e,t)}},"1c46":function(e,t,r){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r("11dc"),t.createHash=t.Hash=r("98e6"),t.createHmac=t.Hmac=r("1a2a");var n=r("116d"),i=Object.keys(n),a=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return a};var o=r("a099");t.pbkdf2=o.pbkdf2,t.pbkdf2Sync=o.pbkdf2Sync;var s=r("956a");t.Cipher=s.Cipher,t.createCipher=s.createCipher,t.Cipheriv=s.Cipheriv,t.createCipheriv=s.createCipheriv,t.Decipher=s.Decipher,t.createDecipher=s.createDecipher,t.Decipheriv=s.Decipheriv,t.createDecipheriv=s.createDecipheriv,t.getCiphers=s.getCiphers,t.listCiphers=s.listCiphers;var u=r("00dc");t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=r("b692");t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=r("e1d3");var f=r("6442");t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var h=r("75cc");t.randomFill=h.randomFill,t.randomFillSync=h.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.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}},"1d80":function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},"1e3c":function(e,t,r){var n=r("6430"),i=r("1545"),a=r("3fb5"),o=r("8707").Buffer,s={"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 u(e){n.call(this);var t,r=e.mode.toLowerCase(),i=s[r];t=e.decrypt?"decrypt":"encrypt";var a=e.key;o.isBuffer(a)||(a=o.from(a)),"des-ede"!==r&&"des-ede-cbc"!==r||(a=o.concat([a,a.slice(0,8)]));var u=e.iv;o.isBuffer(u)||(u=o.from(u)),this._des=i.create({key:a,iv:u,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=u,a(u,n),u.prototype._update=function(e){return o.from(this._des.update(e))},u.prototype._final=function(){return o.from(this._des.final())}},"1eb2":function(e,t,r){"use strict";if("undefined"!==typeof window){var n=window.document.currentScript,i=r("8875");n=i(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:i});var a=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);a&&(r.p=a[1])}},"1fb5":function(e,t,r){"use strict";t.byteLength=f,t.toByteArray=l,t.fromByteArray=m;for(var n=[],i=[],a="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=o.length;s<u;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function f(e){var t=c(e),r=t[0],n=t[1];return 3*(r+n)/4-n}function h(e,t,r){return 3*(t+r)/4-r}function l(e){var t,r,n=c(e),o=n[0],s=n[1],u=new a(h(e,o,s)),f=0,l=s>0?o-4:o;for(r=0;r<l;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,u[f++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t),u}function d(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function p(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(d(n));return i.join("")}function m(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,u=r-i;s<u;s+=o)a.push(p(e,s,s+o>u?u:s+o));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},"1fec":function(e,t,r){"use strict";var n=r("da3e"),i=r("3fb5"),a=r("0184"),o=r("4e2b");function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[o.create({type:"encrypt",key:r}),o.create({type:"decrypt",key:i}),o.create({type:"encrypt",key:a})]:[o.create({type:"decrypt",key:a}),o.create({type:"encrypt",key:i}),o.create({type:"decrypt",key:r})]}function u(e){a.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}i(u,a),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=o.prototype._pad,u.prototype._unpad=o.prototype._unpad},2:function(e,t){},"206d":function(e,t,r){(function(t,n){var i,a=r("7d2a"),o=r("9f9d"),s=r("e07b"),u=r("8707").Buffer,c=t.crypto&&t.crypto.subtle,f={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"},h=[];function l(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];i=i||u.alloc(8);var r=d(i,i,10,128,e).then((function(){return!0})).catch((function(){return!1}));return h[e]=r,r}function d(e,t,r,n,i){return c.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return c.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return u.from(e)}))}function p(e,t){e.then((function(e){n.nextTick((function(){t(null,e)}))}),(function(e){n.nextTick((function(){t(e)}))}))}e.exports=function(e,r,i,c,h,m){"function"===typeof h&&(m=h,h=void 0),h=h||"sha1";var g=f[h.toLowerCase()];if(!g||"function"!==typeof t.Promise)return n.nextTick((function(){var t;try{t=s(e,r,i,c,h)}catch(n){return m(n)}m(null,t)}));if(a(e,r,i,c),"function"!==typeof m)throw new Error("No callback provided to pbkdf2");u.isBuffer(e)||(e=u.from(e,o)),u.isBuffer(r)||(r=u.from(r,o)),p(l(g).then((function(t){return t?d(e,r,i,c,g):s(e,r,i,c,h)})),m)}}).call(this,r("c8ba"),r("4362"))},"20f6":function(e,t,r){var n=t;n.der=r("cfbd"),n.pem=r("8df7")},2137:function(e,t,r){"use strict";var n=r("c3c0"),i=r("da3e");function a(e,t,r){if(!(this instanceof a))return new a(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=a,a.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},a.prototype.update=function(e,t){return this.inner.update(e,t),this},a.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},"22ab":function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}var c=r("b639"),f=c.Buffer,h=r(9),l=h.inspect,d=l&&l.custom||"inspect";function p(e,t,r){f.prototype.copy.call(e,t,r)}e.exports=function(){function e(){o(this,e),this.head=null,this.tail=null,this.length=0}return u(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";var t=this.head,r=""+t.data;while(t=t.next)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return f.alloc(0);var t=f.allocUnsafe(e>>>0),r=this.head,n=0;while(r)p(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;e-=n.length;while(t=t.next){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),e-=a,0===e){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=f.allocUnsafe(e),r=this.head,n=1;r.data.copy(t),e-=r.data.length;while(r=r.next){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),e-=a,0===e){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:d,value:function(e,t){return l(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},"23cb":function(e,t,r){var n=r("a691"),i=Math.max,a=Math.min;e.exports=function(e,t){var r=n(e);return r<0?i(r+t,0):a(r,t)}},"23e7":function(e,t,r){var n=r("da84"),i=r("06cf").f,a=r("9112"),o=r("6eeb"),s=r("ce4e"),u=r("e893"),c=r("94ca");e.exports=function(e,t){var r,f,h,l,d,p,m=e.target,g=e.global,v=e.stat;if(f=g?n:v?n[m]||s(m,{}):(n[m]||{}).prototype,f)for(h in t){if(d=t[h],e.noTargetGet?(p=i(f,h),l=p&&p.value):l=f[h],r=c(g?h:m+(v?".":"#")+h,e.forced),!r&&void 0!==l){if(typeof d===typeof l)continue;u(d,l)}(e.sham||l&&l.sham)&&a(d,"sham",!0),o(f,h,d,e)}}},"241c":function(e,t,r){var n=r("ca84"),i=r("7839"),a=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,a)}},"24fb":function(e,t,r){"use strict";function n(e,t){var r=e[1]||"",n=e[3];if(!n)return r;if(t&&"function"===typeof btoa){var a=i(n),o=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[r].concat(o).concat([a]).join("\n")}return[r].join("\n")}function i(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(t);return"/*# ".concat(r," */")}e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=n(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,n){"string"===typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var a=0;a<this.length;a++){var o=this[a][0];null!=o&&(i[o]=!0)}for(var s=0;s<e.length;s++){var u=[].concat(e[s]);n&&i[u[0]]||(r&&(u[2]?u[2]="".concat(r," and ").concat(u[2]):u[2]=r),t.push(u))}},t}},"25f0":function(e,t,r){"use strict";var n=r("6eeb"),i=r("825a"),a=r("d039"),o=r("ad6d"),s="toString",u=RegExp.prototype,c=u[s],f=a((function(){return"/a/b"!=c.call({source:"a",flags:"b"})})),h=c.name!=s;(f||h)&&n(RegExp.prototype,s,(function(){var e=i(this),t=String(e.source),r=e.flags,n=String(void 0===r&&e instanceof RegExp&&!("flags"in u)?o.call(e):r);return"/"+t+"/"+n}),{unsafe:!0})},"27bf":function(e,t,r){"use strict";e.exports=o;var n=r("b19a"),i=Object.create(r("3a7c"));function a(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function o(e){if(!(this instanceof o))return new o(e);n.call(this,e),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",s)}function s(){var e=this;"function"===typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r("3fb5"),i.inherits(o,n),o.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},o.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},o.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},o.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},o.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},2801:function(e){e.exports=JSON.parse('{"name":"elliptic","version":"6.5.3","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"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","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","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"},"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"}}')},2877:function(e,t,r){"use strict";function n(e,t,r,n,i,a,o,s){var u,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=r,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),o?(u=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},c._ssrRegister=u):i&&(u=s?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),u)if(c.functional){c._injectStyles=u;var f=c.render;c.render=function(e,t){return u.call(t),f(e,t)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,u):[u]}return{exports:e,options:c}}r.d(t,"a",(function(){return n}))},"2aee":function(e,t,r){var n=r("4111"),i=r("d70e"),a=r("4dd0"),o=r("fda6"),s=r("a099"),u=r("8707").Buffer;function c(e){var t;"object"!==typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"===typeof e&&(e=u.from(e));var r,i,o=a(e,t),s=o.tag,c=o.data;switch(s){case"CERTIFICATE":i=n.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(i||(i=n.PublicKey.decode(c,"der")),r=i.algorithm.algorithm.join("."),r){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(i.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return i.subjectPrivateKey=i.subjectPublicKey,{type:"ec",data:i};case"1.2.840.10040.4.1":return i.algorithm.params.pub_key=n.DSAparam.decode(i.subjectPublicKey.data,"der"),{type:"dsa",data:i.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+s);case"ENCRYPTED PRIVATE KEY":c=n.EncryptedPrivateKey.decode(c,"der"),c=f(c,t);case"PRIVATE KEY":switch(i=n.PrivateKey.decode(c,"der"),r=i.algorithm.algorithm.join("."),r){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(i.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:i.algorithm.curve,privateKey:n.ECPrivateKey.decode(i.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return i.algorithm.params.priv_key=n.DSAparam.decode(i.subjectPrivateKey,"der"),{type:"dsa",params:i.algorithm.params};default:throw new Error("unknown key id "+r)}throw new Error("unknown key type "+s);case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return c=n.ECPrivateKey.decode(c,"der"),{curve:c.parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+s)}}function f(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,f=e.subjectPrivateKey,h=parseInt(a.split("-")[1],10)/8,l=s.pbkdf2Sync(t,r,n,h,"sha1"),d=o.createDecipheriv(a,l,c),p=[];return p.push(d.update(f)),p.push(d.final()),u.concat(p)}e.exports=c,c.signature=n.signature},"2c63":function(e,t,r){e.exports=r("dc14")},3:function(e,t){},3300:function(e,t,r){"use strict";var n=r("f3a3"),i=r("80af"),a=r("3fb5"),o=r("ea53"),s=n.assert;function u(e){o.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.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(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){o.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(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 f(e,t,r,n){o.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,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}a(u,o),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r,n;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var a=this._getEndoRoots(this.p);t=a[0].cmp(a[1])<0?a[0]:a[1],t=t.toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],s(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return n=e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r),{beta:t,lambda:r,basis:n}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),a=new i(3).toRed(t).redNeg().redSqrt().redMul(r),o=n.redAdd(a).fromRed(),s=n.redSub(a).fromRed();return[o,s]},u.prototype._getEndoBasis=function(e){var t,r,n,a,o,s,u,c,f,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=e,d=this.n.clone(),p=new i(1),m=new i(0),g=new i(0),v=new i(1),y=0;while(0!==l.cmpn(0)){var b=d.div(l);c=d.sub(b.mul(l)),f=g.sub(b.mul(p));var w=v.sub(b.mul(m));if(!n&&c.cmp(h)<0)t=u.neg(),r=p,n=c.neg(),a=f;else if(n&&2===++y)break;u=c,d=l,l=c,g=p,p=f,v=m,m=w}o=c.neg(),s=f;var M=n.sqr().add(a.sqr()),x=o.sqr().add(s.sqr());return x.cmp(M)>=0&&(o=t,s=r),n.negative&&(n=n.neg(),a=a.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:n,b:a},{a:o,b:s}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),u=i.mul(r.b),c=a.mul(n.b),f=e.sub(o).sub(s),h=u.add(c).neg();return{k1:f,k2:h}},u.prototype.pointFromX=function(e,t){e=new i(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var a=n.fromRed().isOdd();return(t&&!a||!t&&a)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a<e.length;a++){var o=this._endoSplit(t[a]),s=e[a],u=s._getBeta();o.k1.negative&&(o.k1.ineg(),s=s.neg(!0)),o.k2.negative&&(o.k2.ineg(),u=u.neg(!0)),n[2*a]=s,n[2*a+1]=u,i[2*a]=o.k1,i[2*a+1]=o.k2}for(var c=this._wnafMulAdd(1,n,i,2*a,r),f=0;f<2*a;f++)n[f]=null,i[f]=null;return c},a(c,o.BasePoint),u.prototype.point=function(e,t,r){return new c(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"===typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var a=t[2];return n.precomputed={beta:null,doubles:a.doubles&&{step:a.doubles.step,points:[n].concat(a.doubles.points.map(i))},naf:a.naf&&{wnd:a.naf.wnd,points:[n].concat(a.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},a(f,o.BasePoint),u.prototype.jpoint=function(e,t,r){return new f(this,e,t,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),u=a.redSub(o);if(0===s.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),f=c.redMul(s),h=n.redMul(c),l=u.redSqr().redIAdd(f).redISub(h).redISub(h),d=u.redMul(h.redISub(l)).redISub(a.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,d,p)},f.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=o.redSqr(),c=u.redMul(o),f=r.redMul(u),h=s.redSqr().redIAdd(c).redISub(f).redISub(f),l=s.redMul(f.redISub(h)).redISub(i.redMul(c)),d=this.z.redMul(o);return this.curve.jpoint(h,l,d)},f.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}var n=this.curve.a,i=this.curve.tinv,a=this.x,o=this.y,s=this.z,u=s.redSqr().redSqr(),c=o.redAdd(o);for(r=0;r<e;r++){var f=a.redSqr(),h=c.redSqr(),l=h.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),p=a.redMul(h),m=d.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=d.redMul(g);v=v.redIAdd(v).redISub(l);var y=c.redMul(s);r+1<e&&(u=u.redMul(l)),a=m,s=y,c=v}return this.curve.jpoint(a,c.redMul(i),s)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var s=n.redAdd(n).redIAdd(n),u=s.redSqr().redISub(o).redISub(o),c=a.redIAdd(a);c=c.redIAdd(c),c=c.redIAdd(c),e=u,t=s.redMul(o.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),l=h.redSqr(),d=this.x.redAdd(h).redSqr().redISub(f).redISub(l);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),g=l.redIAdd(l);g=g.redIAdd(g),g=g.redIAdd(g),e=m.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(g),r=this.y.redMul(this.z),r=r.redIAdd(r)}return this.curve.jpoint(e,t,r)},f.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),a=i.redSqr(),o=this.x.redAdd(i).redSqr().redISub(n).redISub(a);o=o.redIAdd(o);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=s.redSqr().redISub(o).redISub(o);e=u;var c=a.redIAdd(a);c=c.redIAdd(c),c=c.redIAdd(c),t=s.redMul(o.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),h=this.y.redSqr(),l=this.x.redMul(h),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=l.redIAdd(l);p=p.redIAdd(p);var m=p.redAdd(p);e=d.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(f);var g=h.redSqr();g=g.redIAdd(g),g=g.redIAdd(g),g=g.redIAdd(g),t=d.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,r)},f.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),a=t.redSqr(),o=r.redSqr(),s=a.redAdd(a).redIAdd(a).redIAdd(e.redMul(i)),u=t.redAdd(t);u=u.redIAdd(u);var c=u.redMul(o),f=s.redSqr().redISub(c.redAdd(c)),h=c.redISub(f),l=o.redSqr();l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var d=s.redMul(h).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),a=i.redSqr(),o=this.x.redAdd(t).redSqr().redISub(e).redISub(n);o=o.redIAdd(o),o=o.redAdd(o).redIAdd(o),o=o.redISub(a);var s=o.redSqr(),u=n.redIAdd(n);u=u.redIAdd(u),u=u.redIAdd(u),u=u.redIAdd(u);var c=i.redIAdd(o).redSqr().redISub(a).redISub(s).redISub(u),f=t.redMul(c);f=f.redIAdd(f),f=f.redIAdd(f);var h=this.x.redMul(s).redISub(f);h=h.redIAdd(h),h=h.redIAdd(h);var l=this.y.redMul(c.redMul(u.redISub(c)).redISub(o.redMul(s)));l=l.redIAdd(l),l=l.redIAdd(l),l=l.redIAdd(l);var d=this.z.redAdd(o).redSqr().redISub(r).redISub(s);return this.curve.jpoint(h,l,d)},f.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},f.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},3337:function(e,t,r){"use strict";var n=t;n.version=r("2801").version,n.utils=r("f3a3"),n.rand=r("fdac"),n.curve=r("4136"),n.curves=r("0cbb"),n.ec=r("b9a8"),n.eddsa=r("945d")},"334a":function(e,t,r){t=e.exports=r("4250"),t.Stream=t,t.Readable=t,t.Writable=r("19ea"),t.Duplex=r("e666"),t.Transform=r("09dc"),t.PassThrough=r("0ae3"),t.finished=r("ee93"),t.pipeline=r("fbd5")},"343e":function(e,t,r){var n=t;n.der=r("3768"),n.pem=r("85b3")},"34d5":function(e,t,r){t=e.exports=r("cf35"),t.Stream=t,t.Readable=t,t.Writable=r("49ce"),t.Duplex=r("5e7d"),t.Transform=r("f1c8"),t.PassThrough=r("9d28"),t.finished=r("42a7"),t.pipeline=r("ac4f")},3505:function(e,t,r){var n=r("8707").Buffer,i=r("8c8a");function a(e,t,r){var a=t.length,o=i(t,e._cache);return e._cache=e._cache.slice(a),e._prev=n.concat([e._prev,r?t:o]),o}t.encrypt=function(e,t,r){var i,o=n.allocUnsafe(0);while(t.length){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){o=n.concat([o,a(e,t,r)]);break}i=e._cache.length,o=n.concat([o,a(e,t.slice(0,i),r)]),t=t.slice(i)}return o}},3768:function(e,t,r){var n=r("3fb5"),i=r("b639").Buffer,a=r("7f7a"),o=a.base,s=a.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function f(e){return e<10?"0"+e:e}function h(e,t,r,n){var i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),s.tagByName.hasOwnProperty(e))i=s.tagByName[e];else{if("number"!==typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=s.tagClassByName[r||"universal"]<<6,i)}e.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,o.Node),c.prototype._encodeComposite=function(e,t,r,n){var a=h(e,t,r,this.reporter);if(n.length<128){var o=new i(2);return o[0]=a,o[1]=n.length,this._createEncoderBuffer([o,n])}for(var s=1,u=n.length;u>=256;u>>=8)s++;o=new i(2+s);o[0]=a,o[1]=128|s;u=1+s;for(var c=n.length;c>0;u--,c>>=8)o[u]=255&c;return this._createEncoderBuffer([o,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n<e.length;n++)r.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},c.prototype._encodeObjid=function(e,t,r){if("string"===typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var a=0;for(n=0;n<e.length;n++){var o=e[n];for(a++;o>=128;o>>=7)a++}var s=new i(a),u=s.length-1;for(n=e.length-1;n>=0;n--){o=e[n];s[u--]=127&o;while((o>>=7)>0)s[u--]=128|127&o}return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[f(n.getFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[f(n.getFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"===typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!==typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var a=new i(n);return e.copy(a),0===e.length&&(a[0]=0),this._createEncoderBuffer(a)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var o=e;o>=256;o>>=8)n++;for(a=new Array(n),o=a.length-1;o>=0;o--)a[o]=255&e,e>>=8;return 128&a[0]&&a.unshift(0),this._createEncoderBuffer(new i(a))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i["default"])return!1;var a=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i["default"],t,r).join()),a.length!==i.defaultBuffer.length)return!1;for(n=0;n<a.length;n++)if(a[n]!==i.defaultBuffer[n])return!1;return!0}},"37e6":function(e,t,r){(function(e){(function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(14).Buffer}catch(E){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a<i;a++){var o=e.charCodeAt(a)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function u(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=e.length-6,n=0;r>=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,a+=24,a>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,f=r;f<s;f+=n)c=u(e,f,f+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var h=1;for(c=u(e,f,e.length,t),f=0;f<o;f++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){while(this.length<e)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&0===this.words[this.length-1])this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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],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];function l(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;i=0|e.words[p],a=0|t.words[d],o=i*a+h,f+=o/67108864|0,h=67108863&o}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<i|a)).toString(16);a=s>>>24-i&16777215,r=0!==a||o!==this.length-1?c[6-u.length]+u+r:u+r,i+=2,i>=26&&(i-=26,o--)}0!==a&&(r=a.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(d).toString(e);p=p.idivn(d),r=p.isZero()?m+r:c[l-m.length]+m+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n("undefined"!==typeof o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===t,c=new e(a),f=this.clone();if(u){for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){while(this.length<e.length)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)t=(0|r.words[o])-(0|n.words[o])+a,a=t>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)t=(0|r.words[o])+a,a=t>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,s=t.words,u=r.words,c=0,f=0|o[0],h=8191&f,l=f>>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],w=8191&b,M=b>>>13,x=0|o[4],_=8191&x,S=x>>>13,N=0|o[5],E=8191&N,A=N>>>13,D=0|o[6],k=8191&D,O=D>>>13,C=0|o[7],T=8191&C,R=C>>>13,B=0|o[8],I=8191&B,q=B>>>13,P=0|o[9],j=8191&P,z=P>>>13,L=0|s[0],U=8191&L,F=L>>>13,H=0|s[1],Z=8191&H,W=H>>>13,V=0|s[2],G=8191&V,$=V>>>13,K=0|s[3],J=8191&K,Y=K>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,F),i=i+Math.imul(l,U)|0,a=Math.imul(l,F);var ge=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=Math.imul(p,F),i=i+Math.imul(m,U)|0,a=Math.imul(m,F),n=n+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(l,Z)|0,a=a+Math.imul(l,W)|0;var ve=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,U),i=Math.imul(v,F),i=i+Math.imul(y,U)|0,a=Math.imul(y,F),n=n+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(h,G)|0,i=i+Math.imul(h,$)|0,i=i+Math.imul(l,G)|0,a=a+Math.imul(l,$)|0;var ye=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=Math.imul(w,F),i=i+Math.imul(M,U)|0,a=Math.imul(M,F),n=n+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(y,Z)|0,a=a+Math.imul(y,W)|0,n=n+Math.imul(p,G)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(m,G)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,Y)|0,i=i+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0;var be=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,U),i=Math.imul(_,F),i=i+Math.imul(S,U)|0,a=Math.imul(S,F),n=n+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,n=n+Math.imul(v,G)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(y,G)|0,a=a+Math.imul(y,$)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,ee)|0,i=i+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0;var we=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,U),i=Math.imul(E,F),i=i+Math.imul(A,U)|0,a=Math.imul(A,F),n=n+Math.imul(_,Z)|0,i=i+Math.imul(_,W)|0,i=i+Math.imul(S,Z)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(w,G)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(M,G)|0,a=a+Math.imul(M,$)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(h,re)|0,i=i+Math.imul(h,ne)|0,i=i+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0;var Me=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(k,U),i=Math.imul(k,F),i=i+Math.imul(O,U)|0,a=Math.imul(O,F),n=n+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,i=i+Math.imul(A,Z)|0,a=a+Math.imul(A,W)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(S,G)|0,a=a+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,i=i+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,n=n+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(h,ae)|0,i=i+Math.imul(h,oe)|0,i=i+Math.imul(l,ae)|0,a=a+Math.imul(l,oe)|0;var xe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),i=Math.imul(T,F),i=i+Math.imul(R,U)|0,a=Math.imul(R,F),n=n+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(O,Z)|0,a=a+Math.imul(O,W)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(A,G)|0,a=a+Math.imul(A,$)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Y)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(h,ue)|0,i=i+Math.imul(h,ce)|0,i=i+Math.imul(l,ue)|0,a=a+Math.imul(l,ce)|0;var _e=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,U),i=Math.imul(I,F),i=i+Math.imul(q,U)|0,a=Math.imul(q,F),n=n+Math.imul(T,Z)|0,i=i+Math.imul(T,W)|0,i=i+Math.imul(R,Z)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(k,G)|0,i=i+Math.imul(k,$)|0,i=i+Math.imul(O,G)|0,a=a+Math.imul(O,$)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Y)|0,i=i+Math.imul(A,J)|0,a=a+Math.imul(A,Y)|0,n=n+Math.imul(_,Q)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,n=n+Math.imul(p,ue)|0,i=i+Math.imul(p,ce)|0,i=i+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(h,he)|0,i=i+Math.imul(h,le)|0,i=i+Math.imul(l,he)|0,a=a+Math.imul(l,le)|0;var Se=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,U),i=Math.imul(j,F),i=i+Math.imul(z,U)|0,a=Math.imul(z,F),n=n+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0,i=i+Math.imul(q,Z)|0,a=a+Math.imul(q,W)|0,n=n+Math.imul(T,G)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(R,G)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,i=i+Math.imul(O,J)|0,a=a+Math.imul(O,Y)|0,n=n+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,n=n+Math.imul(v,ue)|0,i=i+Math.imul(v,ce)|0,i=i+Math.imul(y,ue)|0,a=a+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=i+Math.imul(p,le)|0,i=i+Math.imul(m,he)|0,a=a+Math.imul(m,le)|0,n=n+Math.imul(h,pe)|0,i=i+Math.imul(h,me)|0,i=i+Math.imul(l,pe)|0,a=a+Math.imul(l,me)|0;var Ne=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,Z),i=Math.imul(j,W),i=i+Math.imul(z,Z)|0,a=Math.imul(z,W),n=n+Math.imul(I,G)|0,i=i+Math.imul(I,$)|0,i=i+Math.imul(q,G)|0,a=a+Math.imul(q,$)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Y)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,i=i+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,ue)|0,i=i+Math.imul(w,ce)|0,i=i+Math.imul(M,ue)|0,a=a+Math.imul(M,ce)|0,n=n+Math.imul(v,he)|0,i=i+Math.imul(v,le)|0,i=i+Math.imul(y,he)|0,a=a+Math.imul(y,le)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,me)|0;var Ee=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,G),i=Math.imul(j,$),i=i+Math.imul(z,G)|0,a=Math.imul(z,$),n=n+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,i=i+Math.imul(q,J)|0,a=a+Math.imul(q,Y)|0,n=n+Math.imul(T,Q)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,i=i+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(_,ue)|0,i=i+Math.imul(_,ce)|0,i=i+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,he)|0,i=i+Math.imul(w,le)|0,i=i+Math.imul(M,he)|0,a=a+Math.imul(M,le)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(y,pe)|0,a=a+Math.imul(y,me)|0;var Ae=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=Math.imul(j,Y),i=i+Math.imul(z,J)|0,a=Math.imul(z,Y),n=n+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,i=i+Math.imul(q,Q)|0,a=a+Math.imul(q,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(k,ae)|0,i=i+Math.imul(k,oe)|0,i=i+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(E,ue)|0,i=i+Math.imul(E,ce)|0,i=i+Math.imul(A,ue)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(_,he)|0,i=i+Math.imul(_,le)|0,i=i+Math.imul(S,he)|0,a=a+Math.imul(S,le)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(M,pe)|0,a=a+Math.imul(M,me)|0;var De=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,Q),i=Math.imul(j,ee),i=i+Math.imul(z,Q)|0,a=Math.imul(z,ee),n=n+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,i=i+Math.imul(q,re)|0,a=a+Math.imul(q,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(k,ue)|0,i=i+Math.imul(k,ce)|0,i=i+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(E,he)|0,i=i+Math.imul(E,le)|0,i=i+Math.imul(A,he)|0,a=a+Math.imul(A,le)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(S,pe)|0,a=a+Math.imul(S,me)|0;var ke=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,re),i=Math.imul(j,ne),i=i+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(I,ae)|0,i=i+Math.imul(I,oe)|0,i=i+Math.imul(q,ae)|0,a=a+Math.imul(q,oe)|0,n=n+Math.imul(T,ue)|0,i=i+Math.imul(T,ce)|0,i=i+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(k,he)|0,i=i+Math.imul(k,le)|0,i=i+Math.imul(O,he)|0,a=a+Math.imul(O,le)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(A,pe)|0,a=a+Math.imul(A,me)|0;var Oe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ae),i=Math.imul(j,oe),i=i+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(I,ue)|0,i=i+Math.imul(I,ce)|0,i=i+Math.imul(q,ue)|0,a=a+Math.imul(q,ce)|0,n=n+Math.imul(T,he)|0,i=i+Math.imul(T,le)|0,i=i+Math.imul(R,he)|0,a=a+Math.imul(R,le)|0,n=n+Math.imul(k,pe)|0,i=i+Math.imul(k,me)|0,i=i+Math.imul(O,pe)|0,a=a+Math.imul(O,me)|0;var Ce=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=Math.imul(j,ce),i=i+Math.imul(z,ue)|0,a=Math.imul(z,ce),n=n+Math.imul(I,he)|0,i=i+Math.imul(I,le)|0,i=i+Math.imul(q,he)|0,a=a+Math.imul(q,le)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(R,pe)|0,a=a+Math.imul(R,me)|0;var Te=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,he),i=Math.imul(j,le),i=i+Math.imul(z,he)|0,a=Math.imul(z,le),n=n+Math.imul(I,pe)|0,i=i+Math.imul(I,me)|0,i=i+Math.imul(q,pe)|0,a=a+Math.imul(q,me)|0;var Re=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,pe),i=Math.imul(j,me),i=i+Math.imul(z,pe)|0,a=Math.imul(z,me);var Be=(c+n|0)+((8191&i)<<13)|0;return c=(a+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=Me,u[6]=xe,u[7]=_e,u[8]=Se,u[9]=Ne,u[10]=Ee,u[11]=Ae,u[12]=De,u[13]=ke,u[14]=Oe,u[15]=Ce,u[16]=Te,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,u=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=u;c++){var f=a-c,h=0|e.words[f],l=0|t.words[c],d=h*l,p=67108863&d;o=o+(d/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function g(e,t,r){var n=new v;return n.mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?d(this,e,t):n<1024?m(this,e,t):g(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},v.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<o;d++){var p=r[f+d],m=n[f+d],g=r[f+d+o],v=n[f+d+o],y=h*g-l*v;v=h*v+l*g,g=y,r[f+d]=p+g,n[f+d]=m+v,r[f+d+o]=p-g,n[f+d+o]=m-v,d!==s&&(y=u*h-c*l,l=u*l+c*h,h=y)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0===(-8192&a))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,s,u,n,i),this.transform(c,a,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),g(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"===typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=l(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length;n++,r=r.sqr())if(0!==t[n])break;if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-a|h>>>a,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return!1;var a=this.words[r];return!!(a&i)},a.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;a-=67108863&u,s=(a>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)a=(0|this.words[i+r])+s,s=a>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)a=-(0|this.words[i])+s,s=a>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1],s=this._countBits(o);r=26-s,0!==r&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var u,c=n.length-i.length;if("mod"!==t){u=new a(null),u.length=c+1,u.words=new Array(u.length);for(var f=0;f<u.length;f++)u.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,c);0===h.negative&&(n=h,u&&(u.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,l);while(0!==n.negative)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:u||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++c;var f=r.clone(),h=t.clone();while(!t.isZero()){for(var l=0,d=1;0===(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0){t.iushrn(l);while(l-- >0)(i.isOdd()||o.isOdd())&&(i.iadd(f),o.isub(h)),i.iushrn(1),o.iushrn(1)}for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0){r.iushrn(p);while(p-- >0)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1)}t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(u)):(r.isub(t),s.isub(i),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i,o=new a(1),s=new a(0),u=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0){t.iushrn(c);while(c-- >0)o.isOdd()&&o.iadd(u),o.iushrn(1)}for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0){r.iushrn(h);while(h-- >0)s.isOdd()&&s.iadd(u),s.iushrn(1)}t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return i=0===t.cmpn(1)?o:s,i.cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(w,b),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,b),i(x,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new M;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1),o=0;while(!i.isZero()&&0===i.andln(1))o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new a(2*f*f).toRed(this);while(0!==this.pow(f,c).cmp(u))f.redIAdd(u);var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;while(0!==d.cmp(s)){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new a(1).iushln(p-g-1));l=l.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return l},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=4,n=new Array(1<<r);n[0]=new a(1).toRed(this),n[1]=e;for(var i=2;i<n.length;i++)n[i]=this.mul(n[i-1],e);var o=n[0],s=0,u=0,c=t.bitLength()%26;for(0===c&&(c=26),i=t.length-1;i>=0;i--){for(var f=t.words[i],h=c-1;h>=0;h--){var l=f>>h&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,u++,(u===r||0===i&&0===h)&&(o=this.mul(o,n[s]),u=0,s=0)):u=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new N(e)},i(N,S),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},N.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(e,this)}).call(this,r("62e4")(e))},"380f":function(e,t,r){"use strict";var n=r("f3a3"),i=n.assert,a=n.parseBytes,o=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=a(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=a(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},o(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),o(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),o(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),o(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),o(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),o(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s},3903:function(e,t,r){"use strict";r.r(t);var n=r("72f8"),i=r("92c8");for(var a in i)["default"].indexOf(a)<0&&function(e){r.d(t,e,(function(){return i[e]}))}(a);r("cfc9");var o=r("2877"),s=Object(o["a"])(i["default"],n["a"],n["b"],!1,null,"b6ea1562",null);t["default"]=s.exports},"399f":function(e,t,r){(function(e){(function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(12).Buffer}catch(k){}function s(e,t,r){for(var i=0,a=Math.min(e.length,r),o=0,s=t;s<a;s++){var u,c=e.charCodeAt(s)-48;i<<=4,u=c>=49&&c<=54?c-49+10:c>=17&&c<=22?c-17+10:c,i|=u,o|=u}return n(!(240&o),"Invalid character in "+e),i}function u(e,t,r,i){for(var a=0,o=0,s=Math.min(e.length,r),u=t;u<s;u++){var c=e.charCodeAt(u)-48;a*=i,o=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&o<i,"Invalid character"),a+=o}return a}function c(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}a.isBN=function(e){return e instanceof a||null!==e&&"object"===typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this._strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this._strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=e.length-6,n=0;r>=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,a+=24,a>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this._strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,f=r;f<s;f+=n)c=u(e,f,f+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var h=1;for(c=u(e,f,e.length,t),f=0;f<o;f++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype._move=function(e){c(e,this)},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){while(this.length<e)this.words[this.length++]=0;return this},a.prototype._strip=function(){while(this.length>1&&0===this.words[this.length-1])this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!==typeof Symbol&&"function"===typeof Symbol.for?a.prototype[Symbol.for("nodejs.util.inspect.custom")]=f:a.prototype.inspect=f;var h=["","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"],l=[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],d=[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];a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<i|a)).toString(16);a=s>>>24-i&16777215,r=0!==a||o!==this.length-1?h[6-u.length]+u+r:u+r,i+=2,i>=26&&(i-=26,o--)}0!==a&&(r=a.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=l[e],f=d[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modrn(f).toString(e);p=p.idivn(f),r=p.isZero()?m+r:h[c-m.length]+m+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16,2)},o&&(a.prototype.toBuffer=function(e,t){return this.toArrayLike(o,e,t)}),a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};var p=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)};function m(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}function g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;i=0|e.words[p],a=0|t.words[d],o=i*a+h,f+=o/67108864|0,h=67108863&o}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}a.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0");var o=p(e,a),s="le"===t?"LE":"BE";return this["_toArrayLike"+s](o,i),o},a.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,a=0;i<this.length;i++){var o=this.words[i]<<a|n;e[r++]=255&o,r<e.length&&(e[r++]=o>>8&255),r<e.length&&(e[r++]=o>>16&255),6===a?(r<e.length&&(e[r++]=o>>24&255),n=0,a=0):(n=o>>>24,a+=2)}if(r<e.length){e[r++]=n;while(r<e.length)e[r++]=0}},a.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,a=0;i<this.length;i++){var o=this.words[i]<<a|n;e[r--]=255&o,r>=0&&(e[r--]=o>>8&255),r>=0&&(e[r--]=o>>16&255),6===a?(r>=0&&(e[r--]=o>>24&255),n=0,a=0):(n=o>>>24,a+=2)}if(r>=0){e[r--]=n;while(r>=0)e[r--]=0}},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){while(this.length<e.length)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},a.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},a.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},a.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)t=(0|r.words[o])-(0|n.words[o])+a,a=t>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)t=(0|r.words[o])+a,a=t>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this._strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var v=function(e,t,r){var n,i,a,o=e.words,s=t.words,u=r.words,c=0,f=0|o[0],h=8191&f,l=f>>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],w=8191&b,M=b>>>13,x=0|o[4],_=8191&x,S=x>>>13,N=0|o[5],E=8191&N,A=N>>>13,D=0|o[6],k=8191&D,O=D>>>13,C=0|o[7],T=8191&C,R=C>>>13,B=0|o[8],I=8191&B,q=B>>>13,P=0|o[9],j=8191&P,z=P>>>13,L=0|s[0],U=8191&L,F=L>>>13,H=0|s[1],Z=8191&H,W=H>>>13,V=0|s[2],G=8191&V,$=V>>>13,K=0|s[3],J=8191&K,Y=K>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,F),i=i+Math.imul(l,U)|0,a=Math.imul(l,F);var ge=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=Math.imul(p,F),i=i+Math.imul(m,U)|0,a=Math.imul(m,F),n=n+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(l,Z)|0,a=a+Math.imul(l,W)|0;var ve=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,U),i=Math.imul(v,F),i=i+Math.imul(y,U)|0,a=Math.imul(y,F),n=n+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(h,G)|0,i=i+Math.imul(h,$)|0,i=i+Math.imul(l,G)|0,a=a+Math.imul(l,$)|0;var ye=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=Math.imul(w,F),i=i+Math.imul(M,U)|0,a=Math.imul(M,F),n=n+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(y,Z)|0,a=a+Math.imul(y,W)|0,n=n+Math.imul(p,G)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(m,G)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,Y)|0,i=i+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0;var be=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,U),i=Math.imul(_,F),i=i+Math.imul(S,U)|0,a=Math.imul(S,F),n=n+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,n=n+Math.imul(v,G)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(y,G)|0,a=a+Math.imul(y,$)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,ee)|0,i=i+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0;var we=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,U),i=Math.imul(E,F),i=i+Math.imul(A,U)|0,a=Math.imul(A,F),n=n+Math.imul(_,Z)|0,i=i+Math.imul(_,W)|0,i=i+Math.imul(S,Z)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(w,G)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(M,G)|0,a=a+Math.imul(M,$)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(h,re)|0,i=i+Math.imul(h,ne)|0,i=i+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0;var Me=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(k,U),i=Math.imul(k,F),i=i+Math.imul(O,U)|0,a=Math.imul(O,F),n=n+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,i=i+Math.imul(A,Z)|0,a=a+Math.imul(A,W)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(S,G)|0,a=a+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,i=i+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,n=n+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(h,ae)|0,i=i+Math.imul(h,oe)|0,i=i+Math.imul(l,ae)|0,a=a+Math.imul(l,oe)|0;var xe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),i=Math.imul(T,F),i=i+Math.imul(R,U)|0,a=Math.imul(R,F),n=n+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(O,Z)|0,a=a+Math.imul(O,W)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(A,G)|0,a=a+Math.imul(A,$)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Y)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(h,ue)|0,i=i+Math.imul(h,ce)|0,i=i+Math.imul(l,ue)|0,a=a+Math.imul(l,ce)|0;var _e=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,U),i=Math.imul(I,F),i=i+Math.imul(q,U)|0,a=Math.imul(q,F),n=n+Math.imul(T,Z)|0,i=i+Math.imul(T,W)|0,i=i+Math.imul(R,Z)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(k,G)|0,i=i+Math.imul(k,$)|0,i=i+Math.imul(O,G)|0,a=a+Math.imul(O,$)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Y)|0,i=i+Math.imul(A,J)|0,a=a+Math.imul(A,Y)|0,n=n+Math.imul(_,Q)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,n=n+Math.imul(p,ue)|0,i=i+Math.imul(p,ce)|0,i=i+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(h,he)|0,i=i+Math.imul(h,le)|0,i=i+Math.imul(l,he)|0,a=a+Math.imul(l,le)|0;var Se=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,U),i=Math.imul(j,F),i=i+Math.imul(z,U)|0,a=Math.imul(z,F),n=n+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0,i=i+Math.imul(q,Z)|0,a=a+Math.imul(q,W)|0,n=n+Math.imul(T,G)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(R,G)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,i=i+Math.imul(O,J)|0,a=a+Math.imul(O,Y)|0,n=n+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,n=n+Math.imul(v,ue)|0,i=i+Math.imul(v,ce)|0,i=i+Math.imul(y,ue)|0,a=a+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=i+Math.imul(p,le)|0,i=i+Math.imul(m,he)|0,a=a+Math.imul(m,le)|0,n=n+Math.imul(h,pe)|0,i=i+Math.imul(h,me)|0,i=i+Math.imul(l,pe)|0,a=a+Math.imul(l,me)|0;var Ne=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,Z),i=Math.imul(j,W),i=i+Math.imul(z,Z)|0,a=Math.imul(z,W),n=n+Math.imul(I,G)|0,i=i+Math.imul(I,$)|0,i=i+Math.imul(q,G)|0,a=a+Math.imul(q,$)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Y)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,i=i+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,ue)|0,i=i+Math.imul(w,ce)|0,i=i+Math.imul(M,ue)|0,a=a+Math.imul(M,ce)|0,n=n+Math.imul(v,he)|0,i=i+Math.imul(v,le)|0,i=i+Math.imul(y,he)|0,a=a+Math.imul(y,le)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,me)|0;var Ee=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,G),i=Math.imul(j,$),i=i+Math.imul(z,G)|0,a=Math.imul(z,$),n=n+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,i=i+Math.imul(q,J)|0,a=a+Math.imul(q,Y)|0,n=n+Math.imul(T,Q)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,i=i+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(_,ue)|0,i=i+Math.imul(_,ce)|0,i=i+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,he)|0,i=i+Math.imul(w,le)|0,i=i+Math.imul(M,he)|0,a=a+Math.imul(M,le)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(y,pe)|0,a=a+Math.imul(y,me)|0;var Ae=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=Math.imul(j,Y),i=i+Math.imul(z,J)|0,a=Math.imul(z,Y),n=n+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,i=i+Math.imul(q,Q)|0,a=a+Math.imul(q,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(k,ae)|0,i=i+Math.imul(k,oe)|0,i=i+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(E,ue)|0,i=i+Math.imul(E,ce)|0,i=i+Math.imul(A,ue)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(_,he)|0,i=i+Math.imul(_,le)|0,i=i+Math.imul(S,he)|0,a=a+Math.imul(S,le)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(M,pe)|0,a=a+Math.imul(M,me)|0;var De=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,Q),i=Math.imul(j,ee),i=i+Math.imul(z,Q)|0,a=Math.imul(z,ee),n=n+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,i=i+Math.imul(q,re)|0,a=a+Math.imul(q,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(k,ue)|0,i=i+Math.imul(k,ce)|0,i=i+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(E,he)|0,i=i+Math.imul(E,le)|0,i=i+Math.imul(A,he)|0,a=a+Math.imul(A,le)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(S,pe)|0,a=a+Math.imul(S,me)|0;var ke=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,re),i=Math.imul(j,ne),i=i+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(I,ae)|0,i=i+Math.imul(I,oe)|0,i=i+Math.imul(q,ae)|0,a=a+Math.imul(q,oe)|0,n=n+Math.imul(T,ue)|0,i=i+Math.imul(T,ce)|0,i=i+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(k,he)|0,i=i+Math.imul(k,le)|0,i=i+Math.imul(O,he)|0,a=a+Math.imul(O,le)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(A,pe)|0,a=a+Math.imul(A,me)|0;var Oe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ae),i=Math.imul(j,oe),i=i+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(I,ue)|0,i=i+Math.imul(I,ce)|0,i=i+Math.imul(q,ue)|0,a=a+Math.imul(q,ce)|0,n=n+Math.imul(T,he)|0,i=i+Math.imul(T,le)|0,i=i+Math.imul(R,he)|0,a=a+Math.imul(R,le)|0,n=n+Math.imul(k,pe)|0,i=i+Math.imul(k,me)|0,i=i+Math.imul(O,pe)|0,a=a+Math.imul(O,me)|0;var Ce=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=Math.imul(j,ce),i=i+Math.imul(z,ue)|0,a=Math.imul(z,ce),n=n+Math.imul(I,he)|0,i=i+Math.imul(I,le)|0,i=i+Math.imul(q,he)|0,a=a+Math.imul(q,le)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(R,pe)|0,a=a+Math.imul(R,me)|0;var Te=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,he),i=Math.imul(j,le),i=i+Math.imul(z,he)|0,a=Math.imul(z,le),n=n+Math.imul(I,pe)|0,i=i+Math.imul(I,me)|0,i=i+Math.imul(q,pe)|0,a=a+Math.imul(q,me)|0;var Re=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,pe),i=Math.imul(j,me),i=i+Math.imul(z,pe)|0,a=Math.imul(z,me);var Be=(c+n|0)+((8191&i)<<13)|0;return c=(a+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=Me,u[6]=xe,u[7]=_e,u[8]=Se,u[9]=Ne,u[10]=Ee,u[11]=Ae,u[12]=De,u[13]=ke,u[14]=Oe,u[15]=Ce,u[16]=Te,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,u=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=u;c++){var f=a-c,h=0|e.words[f],l=0|t.words[c],d=h*l,p=67108863&d;o=o+(d/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r._strip()}function b(e,t,r){return y(e,t,r)}function w(e,t){this.x=e,this.y=t}Math.imul||(v=g),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?v(this,e,t):n<63?g(this,e,t):n<1024?y(this,e,t):b(this,e,t),r},w.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},w.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},w.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},w.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<o;d++){var p=r[f+d],m=n[f+d],g=r[f+d+o],v=n[f+d+o],y=h*g-l*v;v=h*v+l*g,g=y,r[f+d]=p+g,n[f+d]=m+v,r[f+d+o]=p-g,n[f+d+o]=m-v,d!==s&&(y=u*h-c*l,l=u*l+c*h,h=y)}},w.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},w.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},w.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},w.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0===(-8192&a))},w.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},w.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,s,u,n,i),this.transform(c,a,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),b(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"===typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var a=(0|this.words[i])*e,o=(67108863&a)+(67108863&r);r>>=26,r+=a/67108864|0,r+=o>>>26,this.words[i]=67108863&o}return 0!==r&&(this.words[i]=r,this.length++),t?this.ineg():this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=m(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length;n++,r=r.sqr())if(0!==t[n])break;if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-a|h>>>a,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return!1;var a=this.words[r];return!!(a&i)},a.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;a-=67108863&u,s=(a>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)a=(0|this.words[i+r])+s,s=a>>26,this.words[i+r]=67108863&a;if(0===s)return this._strip();for(n(-1===s),s=0,i=0;i<this.length;i++)a=-(0|this.words[i])+s,s=a>>26,this.words[i]=67108863&a;return this.negative=1,this._strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1],s=this._countBits(o);r=26-s,0!==r&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var u,c=n.length-i.length;if("mod"!==t){u=new a(null),u.length=c+1,u.words=new Array(u.length);for(var f=0;f<u.length;f++)u.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,c);0===h.negative&&(n=h,u&&(u.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,l);while(0!==n.negative)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);u&&(u.words[l]=d)}return u&&u._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:u||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,a=this.length-1;a>=0;a--)i=(r*i+(0|this.words[a]))%e;return t?-i:i},a.prototype.modn=function(e){return this.modrn(e)},a.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var a=(0|this.words[i])+67108864*r;this.words[i]=a/e|0,r=a%e}return this._strip(),t?this.ineg():this},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++c;var f=r.clone(),h=t.clone();while(!t.isZero()){for(var l=0,d=1;0===(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0){t.iushrn(l);while(l-- >0)(i.isOdd()||o.isOdd())&&(i.iadd(f),o.isub(h)),i.iushrn(1),o.iushrn(1)}for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0){r.iushrn(p);while(p-- >0)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1)}t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(u)):(r.isub(t),s.isub(i),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i,o=new a(1),s=new a(0),u=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0){t.iushrn(c);while(c-- >0)o.isOdd()&&o.iadd(u),o.iushrn(1)}for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0){r.iushrn(h);while(h-- >0)s.isOdd()&&s.iadd(u),s.iushrn(1)}t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return i=0===t.cmpn(1)?o:s,i.cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new A(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var M={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function N(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"===typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function D(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}x.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},i(_,x),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(S,x),i(N,x),i(E,x),E.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(M[e])return M[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new S;else if("p192"===e)t=new N;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return M[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(c(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1),o=0;while(!i.isZero()&&0===i.andln(1))o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new a(2*f*f).toRed(this);while(0!==this.pow(f,c).cmp(u))f.redIAdd(u);var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;while(0!==d.cmp(s)){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new a(1).iushln(p-g-1));l=l.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return l},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=4,n=new Array(1<<r);n[0]=new a(1).toRed(this),n[1]=e;for(var i=2;i<n.length;i++)n[i]=this.mul(n[i-1],e);var o=n[0],s=0,u=0,c=t.bitLength()%26;for(0===c&&(c=26),i=t.length-1;i>=0;i--){for(var f=t.words[i],h=c-1;h>=0;h--){var l=f>>h&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,u++,(u===r||0===i&&0===h)&&(o=this.mul(o,n[s]),u=0,s=0)):u=0}c=26}return o},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new D(e)},i(D,A),D.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},D.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},D.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},D.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},D.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(e,this)}).call(this,r("62e4")(e))},"39f5":function(e,t,r){var n=r("8707").Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function a(e){for(var t=0;t<e.length;e++)e[t]=0}function o(e,t,r,n,i){for(var a,o,s,u,c=r[0],f=r[1],h=r[2],l=r[3],d=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],v=4,y=1;y<i;y++)a=c[d>>>24]^f[p>>>16&255]^h[m>>>8&255]^l[255&g]^t[v++],o=c[p>>>24]^f[m>>>16&255]^h[g>>>8&255]^l[255&d]^t[v++],s=c[m>>>24]^f[g>>>16&255]^h[d>>>8&255]^l[255&p]^t[v++],u=c[g>>>24]^f[d>>>16&255]^h[p>>>8&255]^l[255&m]^t[v++],d=a,p=o,m=s,g=u;return a=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&g])^t[v++],o=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[g>>>8&255]<<8|n[255&d])^t[v++],s=(n[m>>>24]<<24|n[g>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[v++],u=(n[g>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[v++],a>>>=0,o>>>=0,s>>>=0,u>>>=0,[a,o,s,u]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],a=[[],[],[],[]],o=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,r[o]=c,n[c]=o;var f=e[o],h=e[f],l=e[h],d=257*e[c]^16843008*c;i[0][o]=d<<24|d>>>8,i[1][o]=d<<16|d>>>16,i[2][o]=d<<8|d>>>24,i[3][o]=d,d=16843009*l^65537*h^257*f^16843008*o,a[0][c]=d<<24|d>>>8,a[1][c]=d<<16|d>>>16,a[2][c]=d<<8|d>>>24,a[3][c]=d,0===o?o=s=1:(o=f^e[e[e[l^f]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:a}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],a=0;a<t;a++)i[a]=e[a];for(a=t;a<n;a++){var o=i[a-1];a%t===0?(o=o<<8|o>>>24,o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o],o^=s[a/t|0]<<24):t>6&&a%t===4&&(o=u.SBOX[o>>>24]<<24|u.SBOX[o>>>16&255]<<16|u.SBOX[o>>>8&255]<<8|u.SBOX[255&o]),i[a]=i[a-t]^o}for(var c=[],f=0;f<n;f++){var h=n-f,l=i[h-(f%4?0:4)];c[f]=f<4||h<=4?l:u.INV_SUB_MIX[0][u.SBOX[l>>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return e=i(e),o(e,this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){e=i(e);var t=e[1];e[1]=e[3],e[3]=t;var r=o(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),a=n.allocUnsafe(16);return a.writeUInt32BE(r[0],0),a.writeUInt32BE(r[3],4),a.writeUInt32BE(r[2],8),a.writeUInt32BE(r[1],12),a},c.prototype.scrub=function(){a(this._keySchedule),a(this._invKeySchedule),a(this._key)},e.exports.AES=c},"3a7c":function(e,t,r){(function(e){function r(e){return Array.isArray?Array.isArray(e):"[object Array]"===g(e)}function n(e){return"boolean"===typeof e}function i(e){return null===e}function a(e){return null==e}function o(e){return"number"===typeof e}function s(e){return"string"===typeof e}function u(e){return"symbol"===typeof e}function c(e){return void 0===e}function f(e){return"[object RegExp]"===g(e)}function h(e){return"object"===typeof e&&null!==e}function l(e){return"[object Date]"===g(e)}function d(e){return"[object Error]"===g(e)||e instanceof Error}function p(e){return"function"===typeof e}function m(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e}function g(e){return Object.prototype.toString.call(e)}t.isArray=r,t.isBoolean=n,t.isNull=i,t.isNullOrUndefined=a,t.isNumber=o,t.isString=s,t.isSymbol=u,t.isUndefined=c,t.isRegExp=f,t.isObject=h,t.isDate=l,t.isError=d,t.isFunction=p,t.isPrimitive=m,t.isBuffer=e.isBuffer}).call(this,r("b639").Buffer)},"3c35":function(e,t){(function(t){e.exports=t}).call(this,{})},"3daf":function(e,t,r){"use strict";var n=r("f3a3"),i=r("80af"),a=r("3fb5"),o=r("ea53"),s=n.assert;function u(e){this.twisted=1!==(0|e.a),this.mOneA=this.twisted&&-1===(0|e.a),this.extended=this.mOneA,o.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|e.c)}function c(e,t,r,n,a){o.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(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(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=a&&new i(a,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()))))}a(u,o),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){e=new i(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),a=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(a.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var u=s.fromRed().isOdd();return(t&&!u||!t&&u)&&(s=s.redNeg()),this.point(e,s)},u.prototype.pointFromY=function(e,t){e=new i(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),a=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(a.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},a(c,o.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),u=i.redMul(o),c=a.redMul(s),f=i.redMul(s),h=o.redMul(a);return this.curve.point(u,c,h,f)},c.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=this.curve._mulA(i),s=o.redAdd(a);if(this.zOne)e=n.redSub(i).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(o.redSub(a)),r=s.redSqr().redSub(s).redSub(s);else{var u=this.z.redSqr(),c=s.redSub(u).redISub(u);e=n.redSub(i).redISub(a).redMul(c),t=s.redMul(o.redSub(a)),r=s.redMul(c)}}else{o=i.redAdd(a),u=this.curve._mulC(this.z).redSqr(),c=o.redSub(u).redSub(u);e=this.curve._mulC(n.redISub(o)).redMul(c),t=this.curve._mulC(o).redMul(i.redISub(a)),r=o.redMul(c)}return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),u=r.redAdd(t),c=a.redMul(o),f=s.redMul(u),h=a.redMul(u),l=o.redMul(s);return this.curve.point(c,f,l,h)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),u=i.redSub(s),c=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),h=n.redMul(u).redMul(f);return this.curve.twisted?(t=n.redMul(c).redMul(o.redSub(this.curve._mulA(a))),r=u.redMul(c)):(t=n.redMul(c).redMul(o.redSub(a)),r=this.curve._mulC(u).redMul(c)),this.curve.point(h,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},"3f62":function(e,t,r){var n=r("8707").Buffer,i=n.alloc(16,0);function a(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){var t=-1;while(++t<e.length)this.state[t]^=e[t];this._multiply()},s.prototype._multiply=function(){var e,t,r,n=a(this.h),i=[0,0,0,0],s=-1;while(++s<128){for(t=0!==(this.state[~~(s/8)]&1<<7-s%8),t&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!==(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;this.cache=n.concat([this.cache,e]);while(this.cache.length>=16)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},"3fb5":function(e,t){"function"===typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},4:function(e,t){},"409b":function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},4111:function(e,t,r){"use strict";var n=r("7f7a");t.certificate=r("56b5");var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var a=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=a;var o=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=o;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var f=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=f,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var h=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=h;var l=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},4128:function(e,t,r){var n;(function(i){"use strict";var a,o,s,u=9e15,c=1e9,f="0123456789abcdef",h="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",l="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",d={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-u,maxE:u,crypto:!1},p=!0,m="[DecimalError] ",g=m+"Invalid argument: ",v=m+"Precision limit exceeded",y=m+"crypto unavailable",b="[object Decimal]",w=Math.floor,M=Math.pow,x=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,S=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,N=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,E=1e7,A=7,D=9007199254740991,k=h.length-1,O=l.length-1,C={toStringTag:b};function T(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=A-n.length,r&&(a+=Z(r)),a+=n;o=e[t],n=o+"",r=A-n.length,r&&(a+=Z(r))}else if(0===o)return"0";for(;o%10===0;)o/=10;return a+o}function R(e,t,r){if(e!==~~e||e<t||e>r)throw Error(g+e)}function B(e,t,r,n){var i,a,o,s;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=A,i=0):(i=Math.ceil((t+1)/A),t%=A),a=M(10,A-t),s=e[i]%a|0,null==n?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),o=r<4&&99999==s||r>3&&49999==s||5e4==s||0==s):o=(r<4&&s+1==a||r>3&&s+1==a/2)&&(e[i+1]/a/100|0)==M(10,t-2)-1||(s==a/2||0==s)&&0==(e[i+1]/a/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),o=(n||r<4)&&9999==s||!n&&r>3&&4999==s):o=((n||r<4)&&s+1==a||!n&&r>3&&s+1==a/2)&&(e[i+1]/a/1e3|0)==M(10,t-3)-1,o}function I(e,t,r){for(var n,i,a=[0],o=0,s=e.length;o<s;){for(i=a.length;i--;)a[i]*=t;for(a[0]+=f.indexOf(e.charAt(o++)),n=0;n<a.length;n++)a[n]>r-1&&(void 0===a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function q(e,t){var r,n,i;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),i=(1/te(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),e.precision+=r,t=ee(e,1,t.times(i),new e(1));for(var a=r;a--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=r,t}C.absoluteValue=C.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),j(e)},C.ceil=function(){return j(new this.constructor(this),this.e+1,2)},C.clampedTo=C.clamp=function(e,t){var r,n=this,i=n.constructor;if(e=new i(e),t=new i(t),!e.s||!t.s)return new i(NaN);if(e.gt(t))throw Error(g+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new i(n)},C.comparedTo=C.cmp=function(e){var t,r,n,i,a=this,o=a.d,s=(e=new a.constructor(e)).d,u=a.s,c=e.s;if(!o||!s)return u&&c?u!==c?u:o===s?0:!o^u<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?u:s[0]?-c:0;if(u!==c)return u;if(a.e!==e.e)return a.e>e.e^u<0?1:-1;for(n=o.length,i=s.length,t=0,r=n<i?n:i;t<r;++t)if(o[t]!==s[t])return o[t]>s[t]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1},C.cosine=C.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+A,n.rounding=1,r=q(n,re(n,r)),n.precision=e,n.rounding=t,j(2==s||3==s?r.neg():r,e,t,!0)):new n(1):new n(NaN)},C.cubeRoot=C.cbrt=function(){var e,t,r,n,i,a,o,s,u,c,f=this,h=f.constructor;if(!f.isFinite()||f.isZero())return new h(f);for(p=!1,a=f.s*M(f.s*f,1/3),a&&Math.abs(a)!=1/0?n=new h(a.toString()):(r=T(f.d),e=f.e,(a=(e-r.length+1)%3)&&(r+=1==a||-2==a?"0":"00"),a=M(r,1/3),e=w((e+1)/3)-(e%3==(e<0?-1:2)),a==1/0?r="5e"+e:(r=a.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new h(r),n.s=f.s),o=(e=h.precision)+3;;)if(s=n,u=s.times(s).times(s),c=u.plus(f),n=P(c.plus(f).times(s),c.plus(u),o+2,1),T(s.d).slice(0,o)===(r=T(n.d)).slice(0,o)){if(r=r.slice(o-3,o+1),"9999"!=r&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(j(n,e+1,1),t=!n.times(n).times(n).eq(f));break}if(!i&&(j(s,e+1,0),s.times(s).times(s).eq(f))){n=s;break}o+=4,i=1}return p=!0,j(n,e,h.rounding,t)},C.decimalPlaces=C.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-w(this.e/A))*A,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},C.dividedBy=C.div=function(e){return P(this,new this.constructor(e))},C.dividedToIntegerBy=C.divToInt=function(e){var t=this,r=t.constructor;return j(P(t,new r(e),0,1,1),r.precision,r.rounding)},C.equals=C.eq=function(e){return 0===this.cmp(e)},C.floor=function(){return j(new this.constructor(this),this.e+1,3)},C.greaterThan=C.gt=function(e){return this.cmp(e)>0},C.greaterThanOrEqualTo=C.gte=function(e){var t=this.cmp(e);return 1==t||0===t},C.hyperbolicCosine=C.cosh=function(){var e,t,r,n,i,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;r=o.precision,n=o.rounding,o.precision=r+Math.max(a.e,a.sd())+4,o.rounding=1,i=a.d.length,i<32?(e=Math.ceil(i/3),t=(1/te(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),a=ee(o,1,a.times(t),new o(1),!0);for(var u,c=e,f=new o(8);c--;)u=a.times(a),a=s.minus(u.times(f.minus(u.times(f))));return j(a,o.precision=r,o.rounding=n,!0)},C.hyperbolicSine=C.sinh=function(){var e,t,r,n,i=this,a=i.constructor;if(!i.isFinite()||i.isZero())return new a(i);if(t=a.precision,r=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,n=i.d.length,n<3)i=ee(a,2,i,i,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:0|e,i=i.times(1/te(5,e)),i=ee(a,2,i,i,!0);for(var o,s=new a(5),u=new a(16),c=new a(20);e--;)o=i.times(i),i=i.times(s.plus(o.times(u.times(o).plus(c))))}return a.precision=t,a.rounding=r,j(i,t,r,!0)},C.hyperbolicTangent=C.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,P(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},C.inverseCosine=C.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,a=r.rounding;return-1!==n?0===n?t.isNeg()?F(r,i,a):new r(0):new r(NaN):t.isZero()?F(r,i+4,a).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=F(r,i+4,a).times(.5),r.precision=i,r.rounding=a,e.minus(t))},C.inverseHyperbolicCosine=C.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,p=!1,r=r.times(r).minus(1).sqrt().plus(r),p=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},C.inverseHyperbolicSine=C.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,p=!1,r=r.times(r).plus(1).sqrt().plus(r),p=!0,n.precision=e,n.rounding=t,r.ln())},C.inverseHyperbolicTangent=C.atanh=function(){var e,t,r,n,i=this,a=i.constructor;return i.isFinite()?i.e>=0?new a(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=a.precision,t=a.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?j(new a(i),e,t,!0):(a.precision=r=n-i.e,i=P(i.plus(1),new a(1).minus(i),r+e,1),a.precision=e+4,a.rounding=1,i=i.ln(),a.precision=e,a.rounding=t,i.times(.5))):new a(NaN)},C.inverseSine=C.asin=function(){var e,t,r,n,i=this,a=i.constructor;return i.isZero()?new a(i):(t=i.abs().cmp(1),r=a.precision,n=a.rounding,-1!==t?0===t?(e=F(a,r+4,n).times(.5),e.s=i.s,e):new a(NaN):(a.precision=r+6,a.rounding=1,i=i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(),a.precision=r,a.rounding=n,i.times(2)))},C.inverseTangent=C.atan=function(){var e,t,r,n,i,a,o,s,u,c=this,f=c.constructor,h=f.precision,l=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&h+4<=O)return o=F(f,h+4,l).times(.25),o.s=c.s,o}else{if(!c.s)return new f(NaN);if(h+4<=O)return o=F(f,h+4,l).times(.5),o.s=c.s,o}for(f.precision=s=h+10,f.rounding=1,r=Math.min(28,s/A+2|0),e=r;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(p=!1,t=Math.ceil(s/A),n=1,u=c.times(c),o=new f(c),i=c;-1!==e;)if(i=i.times(u),a=o.minus(i.div(n+=2)),i=i.times(u),o=a.plus(i.div(n+=2)),void 0!==o.d[t])for(e=t;o.d[e]===a.d[e]&&e--;);return r&&(o=o.times(2<<r-1)),p=!0,j(o,f.precision=h,f.rounding=l,!0)},C.isFinite=function(){return!!this.d},C.isInteger=C.isInt=function(){return!!this.d&&w(this.e/A)>this.d.length-2},C.isNaN=function(){return!this.s},C.isNegative=C.isNeg=function(){return this.s<0},C.isPositive=C.isPos=function(){return this.s>0},C.isZero=function(){return!!this.d&&0===this.d[0]},C.lessThan=C.lt=function(e){return this.cmp(e)<0},C.lessThanOrEqualTo=C.lte=function(e){return this.cmp(e)<1},C.logarithm=C.log=function(e){var t,r,n,i,a,o,s,u,c=this,f=c.constructor,h=f.precision,l=f.rounding,d=5;if(null==e)e=new f(10),t=!0;else{if(e=new f(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new f(NaN);t=e.eq(10)}if(r=c.d,c.s<0||!r||!r[0]||c.eq(1))return new f(r&&!r[0]?-1/0:1!=c.s?NaN:r?0:1/0);if(t)if(r.length>1)a=!0;else{for(i=r[0];i%10===0;)i/=10;a=1!==i}if(p=!1,s=h+d,o=K(c,s),n=t?U(f,s+10):K(e,s),u=P(o,n,s,1),B(u.d,i=h,l))do{if(s+=10,o=K(c,s),n=t?U(f,s+10):K(e,s),u=P(o,n,s,1),!a){+T(u.d).slice(i+1,i+15)+1==1e14&&(u=j(u,h+1,0));break}}while(B(u.d,i+=10,l));return p=!0,j(u,h,l)},C.minus=C.sub=function(e){var t,r,n,i,a,o,s,u,c,f,h,l,d=this,m=d.constructor;if(e=new m(e),!d.d||!e.d)return d.s&&e.s?d.d?e.s=-e.s:e=new m(e.d||d.s!==e.s?d:NaN):e=new m(NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(c=d.d,l=e.d,s=m.precision,u=m.rounding,!c[0]||!l[0]){if(l[0])e.s=-e.s;else{if(!c[0])return new m(3===u?-0:0);e=new m(d)}return p?j(e,s,u):e}if(r=w(e.e/A),f=w(d.e/A),c=c.slice(),a=f-r,a){for(h=a<0,h?(t=c,a=-a,o=l.length):(t=l,r=f,o=c.length),n=Math.max(Math.ceil(s/A),o)+2,a>n&&(a=n,t.length=1),t.reverse(),n=a;n--;)t.push(0);t.reverse()}else{for(n=c.length,o=l.length,h=n<o,h&&(o=n),n=0;n<o;n++)if(c[n]!=l[n]){h=c[n]<l[n];break}a=0}for(h&&(t=c,c=l,l=t,e.s=-e.s),o=c.length,n=l.length-o;n>0;--n)c[o++]=0;for(n=l.length;n>a;){if(c[--n]<l[n]){for(i=n;i&&0===c[--i];)c[i]=E-1;--c[i],c[n]+=E}c[n]-=l[n]}for(;0===c[--o];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(e.d=c,e.e=L(c,r),p?j(e,s,u):e):new m(3===u?-0:0)},C.modulo=C.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?j(new n(r),n.precision,n.rounding):(p=!1,9==n.modulo?(t=P(r,e.abs(),0,3,1),t.s*=e.s):t=P(r,e,0,n.modulo,1),t=t.times(e),p=!0,r.minus(t))},C.naturalExponential=C.exp=function(){return $(this)},C.naturalLogarithm=C.ln=function(){return K(this)},C.negated=C.neg=function(){var e=new this.constructor(this);return e.s=-e.s,j(e)},C.plus=C.add=function(e){var t,r,n,i,a,o,s,u,c,f,h=this,l=h.constructor;if(e=new l(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new l(e.d||h.s===e.s?h:NaN)):e=new l(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(c=h.d,f=e.d,s=l.precision,u=l.rounding,!c[0]||!f[0])return f[0]||(e=new l(h)),p?j(e,s,u):e;if(a=w(h.e/A),n=w(e.e/A),c=c.slice(),i=a-n,i){for(i<0?(r=c,i=-i,o=f.length):(r=f,n=a,o=c.length),a=Math.ceil(s/A),o=a>o?a+1:o+1,i>o&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(o=c.length,i=f.length,o-i<0&&(i=o,r=f,f=c,c=r),t=0;i;)t=(c[--i]=c[i]+f[i]+t)/E|0,c[i]%=E;for(t&&(c.unshift(t),++n),o=c.length;0==c[--o];)c.pop();return e.d=c,e.e=L(c,n),p?j(e,s,u):e},C.precision=C.sd=function(e){var t,r=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(g+e);return r.d?(t=H(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},C.round=function(){var e=this,t=e.constructor;return j(new t(e),e.e+1,t.rounding)},C.sine=C.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+A,n.rounding=1,r=Q(n,re(n,r)),n.precision=e,n.rounding=t,j(s>2?r.neg():r,e,t,!0)):new n(NaN)},C.squareRoot=C.sqrt=function(){var e,t,r,n,i,a,o=this,s=o.d,u=o.e,c=o.s,f=o.constructor;if(1!==c||!s||!s[0])return new f(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);for(p=!1,c=Math.sqrt(+o),0==c||c==1/0?(t=T(s),(t.length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=w((u+1)/2)-(u<0||u%2),c==1/0?t="5e"+u:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new f(t)):n=new f(c.toString()),r=(u=f.precision)+3;;)if(a=n,n=a.plus(P(o,a,r+2,1)).times(.5),T(a.d).slice(0,r)===(t=T(n.d)).slice(0,r)){if(t=t.slice(r-3,r+1),"9999"!=t&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(j(n,u+1,1),e=!n.times(n).eq(o));break}if(!i&&(j(a,u+1,0),a.times(a).eq(o))){n=a;break}r+=4,i=1}return p=!0,j(n,u,f.rounding,e)},C.tangent=C.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=P(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,j(2==s||4==s?r.neg():r,e,t,!0)):new n(NaN)},C.times=C.mul=function(e){var t,r,n,i,a,o,s,u,c,f=this,h=f.constructor,l=f.d,d=(e=new h(e)).d;if(e.s*=f.s,!l||!l[0]||!d||!d[0])return new h(!e.s||l&&!l[0]&&!d||d&&!d[0]&&!l?NaN:l&&d?0*e.s:e.s/0);for(r=w(f.e/A)+w(e.e/A),u=l.length,c=d.length,u<c&&(a=l,l=d,d=a,o=u,u=c,c=o),a=[],o=u+c,n=o;n--;)a.push(0);for(n=c;--n>=0;){for(t=0,i=u+n;i>n;)s=a[i]+d[n]*l[i-n-1]+t,a[i--]=s%E|0,t=s/E|0;a[i]=(a[i]+t)%E|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=L(a,r),p?j(e,h.precision,h.rounding):e},C.toBinary=function(e,t){return ne(this,2,e,t)},C.toDecimalPlaces=C.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(R(e,0,c),void 0===t?t=n.rounding:R(t,0,8),j(r,e+r.e+1,t))},C.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=z(n,!0):(R(e,0,c),void 0===t?t=i.rounding:R(t,0,8),n=j(new i(n),e+1,t),r=z(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},C.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return void 0===e?r=z(i):(R(e,0,c),void 0===t?t=a.rounding:R(t,0,8),n=j(new a(i),e+i.e+1,t),r=z(n,!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r},C.toFraction=function(e){var t,r,n,i,a,o,s,u,c,f,h,l,d=this,m=d.d,v=d.constructor;if(!m)return new v(d);if(c=r=new v(1),n=u=new v(0),t=new v(n),a=t.e=H(m)-d.e-1,o=a%A,t.d[0]=M(10,o<0?A+o:o),null==e)e=a>0?t:c;else{if(s=new v(e),!s.isInt()||s.lt(c))throw Error(g+s);e=s.gt(t)?a>0?t:c:s}for(p=!1,s=new v(T(m)),f=v.precision,v.precision=a=m.length*A*2;;){if(h=P(s,t,0,1,1),i=r.plus(h.times(n)),1==i.cmp(e))break;r=n,n=i,i=c,c=u.plus(h.times(i)),u=i,i=t,t=s.minus(h.times(i)),s=i}return i=P(e.minus(r),n,0,1,1),u=u.plus(i.times(c)),r=r.plus(i.times(n)),u.s=c.s=d.s,l=P(c,n,a,1).minus(d).abs().cmp(P(u,r,a,1).minus(d).abs())<1?[c,n]:[u,r],v.precision=f,p=!0,l},C.toHexadecimal=C.toHex=function(e,t){return ne(this,16,e,t)},C.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:R(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(p=!1,r=P(r,e,0,t,1).times(e),p=!0,j(r)):(e.s=r.s,r=e),r},C.toNumber=function(){return+this},C.toOctal=function(e,t){return ne(this,8,e,t)},C.toPower=C.pow=function(e){var t,r,n,i,a,o,s=this,u=s.constructor,c=+(e=new u(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new u(M(+s,c));if(s=new u(s),s.eq(1))return s;if(n=u.precision,a=u.rounding,e.eq(1))return j(s,n,a);if(t=w(e.e/A),t>=e.d.length-1&&(r=c<0?-c:c)<=D)return i=W(u,s,r,n),e.s<0?new u(1).div(i):j(i,n,a);if(o=s.s,o<0){if(t<e.d.length-1)return new u(NaN);if(0==(1&e.d[t])&&(o=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=o,s}return r=M(+s,c),t=0!=r&&isFinite(r)?new u(r+"").e:w(c*(Math.log("0."+T(s.d))/Math.LN10+s.e+1)),t>u.maxE+1||t<u.minE-1?new u(t>0?o/0:0):(p=!1,u.rounding=s.s=1,r=Math.min(12,(t+"").length),i=$(e.times(K(s,n+r)),n),i.d&&(i=j(i,n+5,1),B(i.d,n,a)&&(t=n+10,i=j($(e.times(K(s,t+r)),t),t+5,1),+T(i.d).slice(n+1,n+15)+1==1e14&&(i=j(i,n+1,0)))),i.s=o,p=!0,u.rounding=a,j(i,n,a))},C.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=z(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(R(e,1,c),void 0===t?t=i.rounding:R(t,0,8),n=j(new i(n),e,t),r=z(n,e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},C.toSignificantDigits=C.toSD=function(e,t){var r=this,n=r.constructor;return void 0===e?(e=n.precision,t=n.rounding):(R(e,1,c),void 0===t?t=n.rounding:R(t,0,8)),j(new n(r),e,t)},C.toString=function(){var e=this,t=e.constructor,r=z(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},C.truncated=C.trunc=function(){return j(new this.constructor(this),this.e+1,1)},C.valueOf=C.toJSON=function(){var e=this,t=e.constructor,r=z(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var P=function(){function e(e,t,r){var n,i=0,a=e.length;for(e=e.slice();a--;)n=e[a]*t+i,e[a]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,a,s,u,c){var f,h,l,d,p,m,g,v,y,b,M,x,_,S,N,D,k,O,C,T,R=n.constructor,B=n.s==i.s?1:-1,I=n.d,q=i.d;if(!I||!I[0]||!q||!q[0])return new R(n.s&&i.s&&(I?!q||I[0]!=q[0]:q)?I&&0==I[0]||!q?0*B:B/0:NaN);for(c?(p=1,h=n.e-i.e):(c=E,p=A,h=w(n.e/p)-w(i.e/p)),C=q.length,k=I.length,y=new R(B),b=y.d=[],l=0;q[l]==(I[l]||0);l++);if(q[l]>(I[l]||0)&&h--,null==a?(S=a=R.precision,s=R.rounding):S=u?a+(n.e-i.e)+1:a,S<0)b.push(1),m=!0;else{if(S=S/p+2|0,l=0,1==C){for(d=0,q=q[0],S++;(l<k||d)&&S--;l++)N=d*c+(I[l]||0),b[l]=N/q|0,d=N%q|0;m=d||l<k}else{for(d=c/(q[0]+1)|0,d>1&&(q=e(q,d,c),I=e(I,d,c),C=q.length,k=I.length),D=C,M=I.slice(0,C),x=M.length;x<C;)M[x++]=0;T=q.slice(),T.unshift(0),O=q[0],q[1]>=c/2&&++O;do{d=0,f=t(q,M,C,x),f<0?(_=M[0],C!=x&&(_=_*c+(M[1]||0)),d=_/O|0,d>1?(d>=c&&(d=c-1),g=e(q,d,c),v=g.length,x=M.length,f=t(g,M,v,x),1==f&&(d--,r(g,C<v?T:q,v,c))):(0==d&&(f=d=1),g=q.slice()),v=g.length,v<x&&g.unshift(0),r(M,g,x,c),-1==f&&(x=M.length,f=t(q,M,C,x),f<1&&(d++,r(M,C<x?T:q,x,c))),x=M.length):0===f&&(d++,M=[0]),b[l++]=d,f&&M[0]?M[x++]=I[D]||0:(M=[I[D]],x=1)}while((D++<k||void 0!==M[0])&&S--);m=void 0!==M[0]}b[0]||b.shift()}if(1==p)y.e=h,o=m;else{for(l=1,d=b[0];d>=10;d/=10)l++;y.e=l+h*p-1,j(y,u?a+y.e+1:a,s,m)}return y}}();function j(e,t,r,n){var i,a,o,s,u,c,f,h,l,d=e.constructor;e:if(null!=t){if(h=e.d,!h)return e;for(i=1,s=h[0];s>=10;s/=10)i++;if(a=t-i,a<0)a+=A,o=t,f=h[l=0],u=f/M(10,i-o-1)%10|0;else if(l=Math.ceil((a+1)/A),s=h.length,l>=s){if(!n)break e;for(;s++<=l;)h.push(0);f=u=0,i=1,a%=A,o=a-A+1}else{for(f=s=h[l],i=1;s>=10;s/=10)i++;a%=A,o=a-A+i,u=o<0?0:f/M(10,i-o-1)%10|0}if(n=n||t<0||void 0!==h[l+1]||(o<0?f:f%M(10,i-o-1)),c=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(a>0?o>0?f/M(10,i-o):0:h[l-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,c?(t-=e.e+1,h[0]=M(10,(A-t%A)%A),e.e=-t||0):h[0]=e.e=0,e;if(0==a?(h.length=l,s=1,l--):(h.length=l+1,s=M(10,A-a),h[l]=o>0?(f/M(10,i-o)%M(10,o)|0)*s:0),c)for(;;){if(0==l){for(a=1,o=h[0];o>=10;o/=10)a++;for(o=h[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(e.e++,h[0]==E&&(h[0]=1));break}if(h[l]+=s,h[l]!=E)break;h[l--]=0,s=1}for(a=h.length;0===h[--a];)h.pop()}return p&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function z(e,t,r){if(!e.isFinite())return J(e);var n,i=e.e,a=T(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+Z(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):i<0?(a="0."+Z(-i-1)+a,r&&(n=r-o)>0&&(a+=Z(n))):i>=o?(a+=Z(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+Z(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=Z(n))),a}function L(e,t){var r=e[0];for(t*=A;r>=10;r/=10)t++;return t}function U(e,t,r){if(t>k)throw p=!0,r&&(e.precision=r),Error(v);return j(new e(h),t,1,!0)}function F(e,t,r){if(t>O)throw Error(v);return j(new e(l),t,r,!0)}function H(e){var t=e.length-1,r=t*A+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Z(e){for(var t="";e--;)t+="0";return t}function W(e,t,r,n){var i,a=new e(1),o=Math.ceil(n/A+4);for(p=!1;;){if(r%2&&(a=a.times(t),ie(a.d,o)&&(i=!0)),r=w(r/2),0===r){r=a.d.length-1,i&&0===a.d[r]&&++a.d[r];break}t=t.times(t),ie(t.d,o)}return p=!0,a}function V(e){return 1&e.d[e.d.length-1]}function G(e,t,r){for(var n,i=new e(t[0]),a=0;++a<t.length;){if(n=new e(t[a]),!n.s){i=n;break}i[r](n)&&(i=n)}return i}function $(e,t){var r,n,i,a,o,s,u,c=0,f=0,h=0,l=e.constructor,d=l.rounding,m=l.precision;if(!e.d||!e.d[0]||e.e>17)return new l(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);null==t?(p=!1,u=m):u=t,s=new l(.03125);while(e.e>-2)e=e.times(s),h+=5;for(n=Math.log(M(2,h))/Math.LN10*2+5|0,u+=n,r=a=o=new l(1),l.precision=u;;){if(a=j(a.times(e),u,1),r=r.times(++f),s=o.plus(P(a,r,u,1)),T(s.d).slice(0,u)===T(o.d).slice(0,u)){i=h;while(i--)o=j(o.times(o),u,1);if(null!=t)return l.precision=m,o;if(!(c<3&&B(o.d,u-n,d,c)))return j(o,l.precision=m,d,p=!0);l.precision=u+=10,r=a=s=new l(1),f=0,c++}o=s}}function K(e,t){var r,n,i,a,o,s,u,c,f,h,l,d=1,m=10,g=e,v=g.d,y=g.constructor,b=y.rounding,w=y.precision;if(g.s<0||!v||!v[0]||!g.e&&1==v[0]&&1==v.length)return new y(v&&!v[0]?-1/0:1!=g.s?NaN:v?0:g);if(null==t?(p=!1,f=w):f=t,y.precision=f+=m,r=T(v),n=r.charAt(0),!(Math.abs(a=g.e)<15e14))return c=U(y,f+2,w).times(a+""),g=K(new y(n+"."+r.slice(1)),f-m).plus(c),y.precision=w,null==t?j(g,w,b,p=!0):g;while(n<7&&1!=n||1==n&&r.charAt(1)>3)g=g.times(e),r=T(g.d),n=r.charAt(0),d++;for(a=g.e,n>1?(g=new y("0."+r),a++):g=new y(n+"."+r.slice(1)),h=g,u=o=g=P(g.minus(1),g.plus(1),f,1),l=j(g.times(g),f,1),i=3;;){if(o=j(o.times(l),f,1),c=u.plus(P(o,new y(i),f,1)),T(c.d).slice(0,f)===T(u.d).slice(0,f)){if(u=u.times(2),0!==a&&(u=u.plus(U(y,f+2,w).times(a+""))),u=P(u,new y(d),f,1),null!=t)return y.precision=w,u;if(!B(u.d,f-m,b,s))return j(u,y.precision=w,b,p=!0);y.precision=f+=m,c=o=g=P(h.minus(1),h.plus(1),f,1),l=j(g.times(g),f,1),i=s=1}u=c,i+=2}}function J(e){return String(e.s*e.s/0)}function Y(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i),t){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%A,r<0&&(n+=A),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=A;n<i;)e.d.push(+t.slice(n,n+=A));t=t.slice(n),n=A-t.length}else n-=i;for(;n--;)t+="0";e.d.push(+t),p&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function X(e,t){var r,n,i,o,s,u,c,f,h;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),N.test(t))return Y(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(_.test(t))r=16,t=t.toLowerCase();else if(x.test(t))r=2;else{if(!S.test(t))throw Error(g+t);r=8}for(o=t.search(/p/i),o>0?(c=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),s=o>=0,n=e.constructor,s&&(t=t.replace(".",""),u=t.length,o=u-o,i=W(n,new n(r),o,2*o)),f=I(t,r,E),h=f.length-1,o=h;0===f[o];--o)f.pop();return o<0?new n(0*e.s):(e.e=L(f,h),e.d=f,p=!1,s&&(e=P(e,i,4*u)),c&&(e=e.times(Math.abs(c)<54?M(2,c):a.pow(2,c))),p=!0,e)}function Q(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:ee(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:0|r,t=t.times(1/te(5,r)),t=ee(e,2,t,t);for(var i,a=new e(5),o=new e(16),s=new e(20);r--;)i=t.times(t),t=t.times(a.plus(i.times(o.times(i).minus(s))));return t}function ee(e,t,r,n,i){var a,o,s,u,c=e.precision,f=Math.ceil(c/A);for(p=!1,u=r.times(r),s=new e(n);;){if(o=P(s.times(u),new e(t++*t++),c,1),s=i?n.plus(o):n.minus(o),n=P(o.times(u),new e(t++*t++),c,1),o=s.plus(n),void 0!==o.d[f]){for(a=f;o.d[a]===s.d[a]&&a--;);if(-1==a)break}a=s,s=n,n=o,o=a}return p=!0,o.d.length=f+1,o}function te(e,t){var r=e;while(--t)r*=e;return r}function re(e,t){var r,n=t.s<0,i=F(e,e.precision,1),a=i.times(.5);if(t=t.abs(),t.lte(a))return s=n?4:1,t;if(r=t.divToInt(i),r.isZero())s=n?3:2;else{if(t=t.minus(r.times(i)),t.lte(a))return s=V(r)?n?2:3:n?4:1,t;s=V(r)?n?1:4:n?3:2}return t.minus(i).abs()}function ne(e,t,r,n){var i,a,s,u,h,l,d,p,m,g=e.constructor,v=void 0!==r;if(v?(R(r,1,c),void 0===n?n=g.rounding:R(n,0,8)):(r=g.precision,n=g.rounding),e.isFinite()){for(d=z(e),s=d.indexOf("."),v?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,s>=0&&(d=d.replace(".",""),m=new g(1),m.e=d.length-s,m.d=I(z(m),10,i),m.e=m.d.length),p=I(d,10,i),a=h=p.length;0==p[--h];)p.pop();if(p[0]){if(s<0?a--:(e=new g(e),e.d=p,e.e=a,e=P(e,m,r,n,0,i),p=e.d,a=e.e,l=o),s=p[r],u=i/2,l=l||void 0!==p[r+1],l=n<4?(void 0!==s||l)&&(0===n||n===(e.s<0?3:2)):s>u||s===u&&(4===n||l||6===n&&1&p[r-1]||n===(e.s<0?8:7)),p.length=r,l)for(;++p[--r]>i-1;)p[r]=0,r||(++a,p.unshift(1));for(h=p.length;!p[h-1];--h);for(s=0,d="";s<h;s++)d+=f.charAt(p[s]);if(v){if(h>1)if(16==t||8==t){for(s=16==t?4:3,--h;h%s;h++)d+="0";for(p=I(d,i,t),h=p.length;!p[h-1];--h);for(s=1,d="1.";s<h;s++)d+=f.charAt(p[s])}else d=d.charAt(0)+"."+d.slice(1);d=d+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)d="0"+d;d="0."+d}else if(++a>h)for(a-=h;a--;)d+="0";else a<h&&(d=d.slice(0,a)+"."+d.slice(a))}else d=v?"0p+0":"0";d=(16==t?"0x":2==t?"0b":8==t?"0o":"")+d}else d=J(e);return e.s<0?"-"+d:d}function ie(e,t){if(e.length>t)return e.length=t,!0}function ae(e){return new this(e).abs()}function oe(e){return new this(e).acos()}function se(e){return new this(e).acosh()}function ue(e,t){return new this(e).plus(t)}function ce(e){return new this(e).asin()}function fe(e){return new this(e).asinh()}function he(e){return new this(e).atan()}function le(e){return new this(e).atanh()}function de(e,t){e=new this(e),t=new this(t);var r,n=this.precision,i=this.rounding,a=n+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(r=t.s<0?F(this,n,i):new this(0),r.s=e.s):!e.d||t.isZero()?(r=F(this,a,1).times(.5),r.s=e.s):t.s<0?(this.precision=a,this.rounding=1,r=this.atan(P(e,t,a,1)),t=F(this,a,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(P(e,t,a,1)):(r=F(this,a,1).times(t.s>0?.25:.75),r.s=e.s):r=new this(NaN),r}function pe(e){return new this(e).cbrt()}function me(e){return j(e=new this(e),e.e+1,2)}function ge(e,t,r){return new this(e).clamp(t,r)}function ve(e){if(!e||"object"!==typeof e)throw Error(m+"Object expected");var t,r,n,i=!0===e.defaults,a=["precision",1,c,"rounding",0,8,"toExpNeg",-u,0,"toExpPos",0,u,"maxE",0,u,"minE",-u,0,"modulo",0,9];for(t=0;t<a.length;t+=3)if(r=a[t],i&&(this[r]=d[r]),void 0!==(n=e[r])){if(!(w(n)===n&&n>=a[t+1]&&n<=a[t+2]))throw Error(g+r+": "+n);this[r]=n}if(r="crypto",i&&(this[r]=d[r]),void 0!==(n=e[r])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(g+r+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(y);this[r]=!0}else this[r]=!1}return this}function ye(e){return new this(e).cos()}function be(e){return new this(e).cosh()}function we(e){var t,r,n;function i(e){var t,r,n,a=this;if(!(a instanceof i))return new i(e);if(a.constructor=i,Ne(e))return a.s=e.s,void(p?!e.d||e.e>i.maxE?(a.e=NaN,a.d=null):e.e<i.minE?(a.e=0,a.d=[0]):(a.e=e.e,a.d=e.d.slice()):(a.e=e.e,a.d=e.d?e.d.slice():e.d));if(n=typeof e,"number"===n){if(0===e)return a.s=1/e<0?-1:1,a.e=0,void(a.d=[0]);if(e<0?(e=-e,a.s=-1):a.s=1,e===~~e&&e<1e7){for(t=0,r=e;r>=10;r/=10)t++;return void(p?t>i.maxE?(a.e=NaN,a.d=null):t<i.minE?(a.e=0,a.d=[0]):(a.e=t,a.d=[e]):(a.e=t,a.d=[e]))}return 0*e!==0?(e||(a.s=NaN),a.e=NaN,void(a.d=null)):Y(a,e.toString())}if("string"!==n)throw Error(g+e);return 45===(r=e.charCodeAt(0))?(e=e.slice(1),a.s=-1):(43===r&&(e=e.slice(1)),a.s=1),N.test(e)?Y(a,e):X(a,e)}if(i.prototype=C,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=ve,i.clone=we,i.isDecimal=Ne,i.abs=ae,i.acos=oe,i.acosh=se,i.add=ue,i.asin=ce,i.asinh=fe,i.atan=he,i.atanh=le,i.atan2=de,i.cbrt=pe,i.ceil=me,i.clamp=ge,i.cos=ye,i.cosh=be,i.div=Me,i.exp=xe,i.floor=_e,i.hypot=Se,i.ln=Ee,i.log=Ae,i.log10=ke,i.log2=De,i.max=Oe,i.min=Ce,i.mod=Te,i.mul=Re,i.pow=Be,i.random=Ie,i.round=qe,i.sign=Pe,i.sin=je,i.sinh=ze,i.sqrt=Le,i.sub=Ue,i.sum=Fe,i.tan=He,i.tanh=Ze,i.trunc=We,void 0===e&&(e={}),e&&!0!==e.defaults)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function Me(e,t){return new this(e).div(t)}function xe(e){return new this(e).exp()}function _e(e){return j(e=new this(e),e.e+1,3)}function Se(){var e,t,r=new this(0);for(p=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return p=!0,new this(1/0);r=t}return p=!0,r.sqrt()}function Ne(e){return e instanceof a||e&&e.toStringTag===b||!1}function Ee(e){return new this(e).ln()}function Ae(e,t){return new this(e).log(t)}function De(e){return new this(e).log(2)}function ke(e){return new this(e).log(10)}function Oe(){return G(this,arguments,"lt")}function Ce(){return G(this,arguments,"gt")}function Te(e,t){return new this(e).mod(t)}function Re(e,t){return new this(e).mul(t)}function Be(e,t){return new this(e).pow(t)}function Ie(e){var t,r,n,i,a=0,o=new this(1),s=[];if(void 0===e?e=this.precision:R(e,1,c),n=Math.ceil(e/A),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));a<n;)i=t[a],i>=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:s[a++]=i%1e7;else{if(!crypto.randomBytes)throw Error(y);for(t=crypto.randomBytes(n*=4);a<n;)i=t[a]+(t[a+1]<<8)+(t[a+2]<<16)+((127&t[a+3])<<24),i>=214e7?crypto.randomBytes(4).copy(t,a):(s.push(i%1e7),a+=4);a=n/4}else for(;a<n;)s[a++]=1e7*Math.random()|0;for(n=s[--a],e%=A,n&&e&&(i=M(10,A-e),s[a]=(n/i|0)*i);0===s[a];a--)s.pop();if(a<0)r=0,s=[0];else{for(r=-1;0===s[0];r-=A)s.shift();for(n=1,i=s[0];i>=10;i/=10)n++;n<A&&(r-=A-n)}return o.e=r,o.d=s,o}function qe(e){return j(e=new this(e),e.e+1,this.rounding)}function Pe(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function je(e){return new this(e).sin()}function ze(e){return new this(e).sinh()}function Le(e){return new this(e).sqrt()}function Ue(e,t){return new this(e).sub(t)}function Fe(){var e=0,t=arguments,r=new this(t[e]);for(p=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return p=!0,j(r,this.precision,this.rounding)}function He(e){return new this(e).tan()}function Ze(e){return new this(e).tanh()}function We(e){return j(e=new this(e),e.e+1,1)}a=we(d),a.prototype.constructor=a,a["default"]=a.Decimal=a,h=new a(h),l=new a(l),n=function(){return a}.call(t,r,t,e),void 0===n||(e.exports=n)})()},4136:function(e,t,r){"use strict";var n=t;n.base=r("ea53"),n.short=r("3300"),n.mont=r("676f"),n.edwards=r("3daf")},4186:function(e,t,r){"use strict";(function(t){var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r("ee93"),o=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),l=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var r=e[l].read();null!==r&&(e[f]=null,e[o]=null,e[s]=null,t(d(r,!1)))}}function m(e){t.nextTick(p,e)}function g(e,t){return function(r,n){e.then((function(){t[c]?r(d(void 0,!0)):t[h](r,n)}),n)}}var v=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((n={get stream(){return this[l]},next:function(){var e=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[l].destroyed)return new Promise((function(r,n){t.nextTick((function(){e[u]?n(e[u]):r(d(void 0,!0))}))}));var n,i=this[f];if(i)n=new Promise(g(i,this));else{var a=this[l].read();if(null!==a)return Promise.resolve(d(a,!1));n=new Promise(this[h])}return this[f]=n,n}},i(n,Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[l].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),v),b=function(e){var t,r=Object.create(y,(t={},i(t,l,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var n=r[l].read();n?(r[f]=null,r[o]=null,r[s]=null,e(d(n,!1))):(r[o]=e,r[s]=t)},writable:!0}),t));return r[f]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[f]=null,r[o]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[o];null!==n&&(r[f]=null,r[o]=null,r[s]=null,n(d(void 0,!0))),r[c]=!0})),e.on("readable",m.bind(null,r)),r};e.exports=b}).call(this,r("4362"))},"41df":function(e,t,r){var n=t;n.Reporter=r("d1c8").Reporter,n.DecoderBuffer=r("6283").DecoderBuffer,n.EncoderBuffer=r("6283").EncoderBuffer,n.Node=r("8360")},4228:function(e,t,r){var n=r("82f0"),i=r("8707").Buffer,a=r("bac2"),o=r("09f5"),s=r("6430"),u=r("39f5"),c=r("ae84"),f=r("3fb5");function h(e,t,r){s.call(this),this._cache=new l,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function d(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var r=-1;while(++r<t)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}function p(e,t,r){var s=a[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof r&&(r=i.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);if("string"===typeof t&&(t=i.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===s.type?new o(s.module,t,r,!0):"auth"===s.type?new n(s.module,t,r,!0):new h(s.module,t,r)}function m(e,t){var r=a[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return p(e,n.key,n.iv)}f(h,s),h.prototype._update=function(e){var t,r;this._cache.add(e);var n=[];while(t=this._cache.get(this._autopadding))r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return d(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},l.prototype.add=function(e){this.cache=i.concat([this.cache,e])},l.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=m,t.createDecipheriv=p},4250:function(e,t,r){"use strict";(function(t,n){var i;e.exports=k,k.ReadableState=D;r("faa1").EventEmitter;var a=function(e,t){return e.listeners(t).length},o=r("5bbb"),s=r("b639").Buffer,u=t.Uint8Array||function(){};function c(e){return s.from(e)}function f(e){return s.isBuffer(e)||e instanceof u}var h,l=r(1);h=l&&l.debuglog?l.debuglog("stream"):function(){};var d,p,m,g=r("96a5"),v=r("493f"),y=r("b9b5"),b=y.getHighWaterMark,w=r("9d8a").codes,M=w.ERR_INVALID_ARG_TYPE,x=w.ERR_STREAM_PUSH_AFTER_EOF,_=w.ERR_METHOD_NOT_IMPLEMENTED,S=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r("3fb5")(k,o);var N=v.errorOrDestroy,E=["error","close","destroy","pause","resume"];function A(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function D(e,t,n){i=i||r("e666"),e=e||{},"boolean"!==typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=b(this,e,"readableHighWaterMark",n),this.buffer=new g,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!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r("7d72").StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function k(e){if(i=i||r("e666"),!(this instanceof k))return new k(e);var t=this instanceof i;this._readableState=new D(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function O(e,t,r,n,i){h("readableAddChunk",t);var a,o=e._readableState;if(null===t)o.reading=!1,q(e,o);else if(i||(a=T(o,t)),a)N(e,a);else if(o.objectMode||t&&t.length>0)if("string"===typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=c(t)),n)o.endEmitted?N(e,new S):C(e,o,t,!0);else if(o.ended)N(e,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?C(e,o,t,!1):z(e,o)):C(e,o,t,!1)}else n||(o.reading=!1,z(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&P(e)),z(e,t)}function T(e,t){var r;return f(t)||"string"===typeof t||void 0===t||e.objectMode||(r=new M("chunk",["string","Buffer","Uint8Array"],t)),r}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=v.destroy,k.prototype._undestroy=v.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"===typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=s.from(e,t),t=""),r=!0),O(this,e,t,!1,r)},k.prototype.unshift=function(e){return O(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){d||(d=r("7d72").StringDecoder);var t=new d(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var n=this._readableState.buffer.head,i="";while(null!==n)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function B(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=B(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function q(e,t){if(h("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?P(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}}function P(e){var t=e._readableState;h("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(j,e))}function j(e){var t=e._readableState;h("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,V(e)}function z(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(L,e,t))}function L(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length)){var r=t.length;if(h("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function U(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,V(e))}}function F(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function H(e){h("readable nexttick read 0"),e.read(0)}function Z(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(W,e,t))}function W(e,t){h("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),V(e),t.flowing&&!t.reading&&e.read(0)}function V(e){var t=e._readableState;h("flow",t.flowing);while(t.flowing&&null!==e.read());}function G(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function $(e){var t=e._readableState;h("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(K,t,e))}function K(e,t){if(h("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function J(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}k.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?$(this):P(this),null;if(e=I(e,t),0===e&&t.ended)return 0===t.length&&$(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,h("length less than watermark",i)),t.ended||t.reading?(i=!1,h("reading or ended",i)):i&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(r,t))),n=e>0?G(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&$(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){N(this,new _("_read()"))},k.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,h("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr,s=o?c:y;function u(e,t){h("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,d())}function c(){h("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",u);var f=U(r);e.on("drain",f);var l=!1;function d(){h("cleanup"),e.removeListener("close",g),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",m),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",p),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}function p(t){h("ondata");var n=e.write(t);h("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==J(i.pipes,e))&&!l&&(h("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function m(t){h("onerror",t),y(),e.removeListener("error",m),0===a(e,"error")&&N(e,t)}function g(){e.removeListener("finish",v),y()}function v(){h("onfinish"),e.removeListener("close",g),y()}function y(){h("unpipe"),r.unpipe(e)}return r.on("data",p),A(e,"error",m),e.once("close",g),e.once("finish",v),e.emit("pipe",r),i.flowing||(h("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=J(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,h("on readable",i.length,i.reading),i.length?P(this):i.reading||n.nextTick(H,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(F,this),r},k.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(F,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!e.readableListening,Z(this,e)),e.paused=!1,this},k.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){if(h("wrapped data"),r.decoder&&(i=r.decoder.write(i)),(!r.objectMode||null!==i&&void 0!==i)&&(r.objectMode||i&&i.length)){var a=t.push(i);a||(n=!0,e.pause())}})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<E.length;a++)e.on(E[a],this.emit.bind(this,E[a]));return this._read=function(t){h("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"===typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=r("4186")),p(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=G,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(k.from=function(e,t){return void 0===m&&(m=r("919c")),m(k,e,t)})}).call(this,r("c8ba"),r("4362"))},"428f":function(e,t,r){var n=r("da84");e.exports=n},"429b":function(e,t,r){e.exports=r("faa1").EventEmitter},"42a7":function(e,t,r){"use strict";var n=r("d113").codes.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function a(){}function o(e){return e.setHeader&&"function"===typeof e.abort}function s(e,t,r){if("function"===typeof t)return s(e,null,t);t||(t={}),r=i(r||a);var u=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,f=function(){e.writable||l()},h=e._writableState&&e._writableState.finished,l=function(){c=!1,h=!0,u||r.call(e)},d=e._readableState&&e._readableState.endEmitted,p=function(){u=!1,d=!0,c||r.call(e)},m=function(t){r.call(e,t)},g=function(){var t;return u&&!d?(e._readableState&&e._readableState.ended||(t=new n),r.call(e,t)):c&&!h?(e._writableState&&e._writableState.ended||(t=new n),r.call(e,t)):void 0},v=function(){e.req.on("finish",l)};return o(e)?(e.on("complete",l),e.on("abort",g),e.req?v():e.on("request",v)):c&&!e._writableState&&(e.on("end",f),e.on("close",f)),e.on("end",p),e.on("finish",l),!1!==t.error&&e.on("error",m),e.on("close",g),function(){e.removeListener("complete",l),e.removeListener("abort",g),e.removeListener("request",v),e.req&&e.req.removeListener("finish",l),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",l),e.removeListener("end",p),e.removeListener("error",m),e.removeListener("close",g)}}e.exports=s},4362:function(e,t,r){t.nextTick=function(e){var t=Array.prototype.slice.call(arguments);t.shift(),setTimeout((function(){e.apply(null,t)}),0)},t.platform=t.arch=t.execPath=t.title="browser",t.pid=1,t.browser=!0,t.env={},t.argv=[],t.binding=function(e){throw new Error("No such module. (Possibly not yet loaded)")},function(){var e,n="/";t.cwd=function(){return n},t.chdir=function(t){e||(e=r("df7c")),n=e.resolve(t,n)}}(),t.exit=t.kill=t.umask=t.dlopen=t.uptime=t.memoryUsage=t.uvCounters=function(){},t.features={}},"44a3":function(e,t,r){"use strict";var n=r("80af"),i=r("f3a3"),a=i.assert,o=i.cachedProperty,s=i.parseBytes;function u(e,t){this.eddsa=e,"object"!==typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}o(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),o(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),o(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),o(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},"44ad":function(e,t,r){var n=r("d039"),i=r("c6b6"),a="".split;e.exports=n((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?a.call(e,""):Object(e)}:Object},4681:function(e,t,r){"use strict";var n=r("966d");function i(e,t){var r=this,i=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return i||a?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||n.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(n.nextTick(o,r,e),r._writableState&&(r._writableState.errorEmitted=!0)):t&&t(e)})),this)}function a(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(e,t){e.emit("error",t)}e.exports={destroy:i,undestroy:a}},4788:function(e,t,r){"use strict";var n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},a={"–":"\\--","—":"\\---"," ":"~","\t":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},o=function(e,t){return n({},e,t)};e.exports=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.preserveFormatting,s=void 0!==r&&r,u=t.escapeMapFn,c=void 0===u?o:u,f=String(e),h="",l=c(n({},i),s?n({},a):{}),d=Object.keys(l),p=function(){var e=!1;d.forEach((function(t,r){e||f.length>=t.length&&f.slice(0,t.length)===t&&(h+=l[d[r]],f=f.slice(t.length,f.length),e=!0)})),e||(h+=f.slice(0,1),f=f.slice(1,f.length))};while(f)p();return h}},"48e6":function(e,t,r){(function(e){(function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(5).Buffer}catch(E){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a<i;a++){var o=e.charCodeAt(a)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function u(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=e.length-6,n=0;r>=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,a+=24,a>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,f=r;f<s;f+=n)c=u(e,f,f+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var h=1;for(c=u(e,f,e.length,t),f=0;f<o;f++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){while(this.length<e)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&0===this.words[this.length-1])this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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],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];function l(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;i=0|e.words[p],a=0|t.words[d],o=i*a+h,f+=o/67108864|0,h=67108863&o}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<i|a)).toString(16);a=s>>>24-i&16777215,r=0!==a||o!==this.length-1?c[6-u.length]+u+r:u+r,i+=2,i>=26&&(i-=26,o--)}0!==a&&(r=a.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(d).toString(e);p=p.idivn(d),r=p.isZero()?m+r:c[l-m.length]+m+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n("undefined"!==typeof o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===t,c=new e(a),f=this.clone();if(u){for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){while(this.length<e.length)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)t=(0|r.words[o])-(0|n.words[o])+a,a=t>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)t=(0|r.words[o])+a,a=t>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,s=t.words,u=r.words,c=0,f=0|o[0],h=8191&f,l=f>>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],w=8191&b,M=b>>>13,x=0|o[4],_=8191&x,S=x>>>13,N=0|o[5],E=8191&N,A=N>>>13,D=0|o[6],k=8191&D,O=D>>>13,C=0|o[7],T=8191&C,R=C>>>13,B=0|o[8],I=8191&B,q=B>>>13,P=0|o[9],j=8191&P,z=P>>>13,L=0|s[0],U=8191&L,F=L>>>13,H=0|s[1],Z=8191&H,W=H>>>13,V=0|s[2],G=8191&V,$=V>>>13,K=0|s[3],J=8191&K,Y=K>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,F),i=i+Math.imul(l,U)|0,a=Math.imul(l,F);var ge=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=Math.imul(p,F),i=i+Math.imul(m,U)|0,a=Math.imul(m,F),n=n+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(l,Z)|0,a=a+Math.imul(l,W)|0;var ve=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,U),i=Math.imul(v,F),i=i+Math.imul(y,U)|0,a=Math.imul(y,F),n=n+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(h,G)|0,i=i+Math.imul(h,$)|0,i=i+Math.imul(l,G)|0,a=a+Math.imul(l,$)|0;var ye=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=Math.imul(w,F),i=i+Math.imul(M,U)|0,a=Math.imul(M,F),n=n+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(y,Z)|0,a=a+Math.imul(y,W)|0,n=n+Math.imul(p,G)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(m,G)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,Y)|0,i=i+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0;var be=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,U),i=Math.imul(_,F),i=i+Math.imul(S,U)|0,a=Math.imul(S,F),n=n+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,n=n+Math.imul(v,G)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(y,G)|0,a=a+Math.imul(y,$)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,ee)|0,i=i+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0;var we=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,U),i=Math.imul(E,F),i=i+Math.imul(A,U)|0,a=Math.imul(A,F),n=n+Math.imul(_,Z)|0,i=i+Math.imul(_,W)|0,i=i+Math.imul(S,Z)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(w,G)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(M,G)|0,a=a+Math.imul(M,$)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(h,re)|0,i=i+Math.imul(h,ne)|0,i=i+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0;var Me=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(k,U),i=Math.imul(k,F),i=i+Math.imul(O,U)|0,a=Math.imul(O,F),n=n+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,i=i+Math.imul(A,Z)|0,a=a+Math.imul(A,W)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(S,G)|0,a=a+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,i=i+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,n=n+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(h,ae)|0,i=i+Math.imul(h,oe)|0,i=i+Math.imul(l,ae)|0,a=a+Math.imul(l,oe)|0;var xe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),i=Math.imul(T,F),i=i+Math.imul(R,U)|0,a=Math.imul(R,F),n=n+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(O,Z)|0,a=a+Math.imul(O,W)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(A,G)|0,a=a+Math.imul(A,$)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Y)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(h,ue)|0,i=i+Math.imul(h,ce)|0,i=i+Math.imul(l,ue)|0,a=a+Math.imul(l,ce)|0;var _e=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,U),i=Math.imul(I,F),i=i+Math.imul(q,U)|0,a=Math.imul(q,F),n=n+Math.imul(T,Z)|0,i=i+Math.imul(T,W)|0,i=i+Math.imul(R,Z)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(k,G)|0,i=i+Math.imul(k,$)|0,i=i+Math.imul(O,G)|0,a=a+Math.imul(O,$)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Y)|0,i=i+Math.imul(A,J)|0,a=a+Math.imul(A,Y)|0,n=n+Math.imul(_,Q)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,n=n+Math.imul(p,ue)|0,i=i+Math.imul(p,ce)|0,i=i+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(h,he)|0,i=i+Math.imul(h,le)|0,i=i+Math.imul(l,he)|0,a=a+Math.imul(l,le)|0;var Se=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,U),i=Math.imul(j,F),i=i+Math.imul(z,U)|0,a=Math.imul(z,F),n=n+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0,i=i+Math.imul(q,Z)|0,a=a+Math.imul(q,W)|0,n=n+Math.imul(T,G)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(R,G)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,i=i+Math.imul(O,J)|0,a=a+Math.imul(O,Y)|0,n=n+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,n=n+Math.imul(v,ue)|0,i=i+Math.imul(v,ce)|0,i=i+Math.imul(y,ue)|0,a=a+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=i+Math.imul(p,le)|0,i=i+Math.imul(m,he)|0,a=a+Math.imul(m,le)|0,n=n+Math.imul(h,pe)|0,i=i+Math.imul(h,me)|0,i=i+Math.imul(l,pe)|0,a=a+Math.imul(l,me)|0;var Ne=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,Z),i=Math.imul(j,W),i=i+Math.imul(z,Z)|0,a=Math.imul(z,W),n=n+Math.imul(I,G)|0,i=i+Math.imul(I,$)|0,i=i+Math.imul(q,G)|0,a=a+Math.imul(q,$)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Y)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,i=i+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,ue)|0,i=i+Math.imul(w,ce)|0,i=i+Math.imul(M,ue)|0,a=a+Math.imul(M,ce)|0,n=n+Math.imul(v,he)|0,i=i+Math.imul(v,le)|0,i=i+Math.imul(y,he)|0,a=a+Math.imul(y,le)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,me)|0;var Ee=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,G),i=Math.imul(j,$),i=i+Math.imul(z,G)|0,a=Math.imul(z,$),n=n+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,i=i+Math.imul(q,J)|0,a=a+Math.imul(q,Y)|0,n=n+Math.imul(T,Q)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,i=i+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(_,ue)|0,i=i+Math.imul(_,ce)|0,i=i+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,he)|0,i=i+Math.imul(w,le)|0,i=i+Math.imul(M,he)|0,a=a+Math.imul(M,le)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(y,pe)|0,a=a+Math.imul(y,me)|0;var Ae=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=Math.imul(j,Y),i=i+Math.imul(z,J)|0,a=Math.imul(z,Y),n=n+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,i=i+Math.imul(q,Q)|0,a=a+Math.imul(q,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(k,ae)|0,i=i+Math.imul(k,oe)|0,i=i+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(E,ue)|0,i=i+Math.imul(E,ce)|0,i=i+Math.imul(A,ue)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(_,he)|0,i=i+Math.imul(_,le)|0,i=i+Math.imul(S,he)|0,a=a+Math.imul(S,le)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(M,pe)|0,a=a+Math.imul(M,me)|0;var De=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,Q),i=Math.imul(j,ee),i=i+Math.imul(z,Q)|0,a=Math.imul(z,ee),n=n+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,i=i+Math.imul(q,re)|0,a=a+Math.imul(q,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(k,ue)|0,i=i+Math.imul(k,ce)|0,i=i+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(E,he)|0,i=i+Math.imul(E,le)|0,i=i+Math.imul(A,he)|0,a=a+Math.imul(A,le)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(S,pe)|0,a=a+Math.imul(S,me)|0;var ke=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,re),i=Math.imul(j,ne),i=i+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(I,ae)|0,i=i+Math.imul(I,oe)|0,i=i+Math.imul(q,ae)|0,a=a+Math.imul(q,oe)|0,n=n+Math.imul(T,ue)|0,i=i+Math.imul(T,ce)|0,i=i+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(k,he)|0,i=i+Math.imul(k,le)|0,i=i+Math.imul(O,he)|0,a=a+Math.imul(O,le)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(A,pe)|0,a=a+Math.imul(A,me)|0;var Oe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ae),i=Math.imul(j,oe),i=i+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(I,ue)|0,i=i+Math.imul(I,ce)|0,i=i+Math.imul(q,ue)|0,a=a+Math.imul(q,ce)|0,n=n+Math.imul(T,he)|0,i=i+Math.imul(T,le)|0,i=i+Math.imul(R,he)|0,a=a+Math.imul(R,le)|0,n=n+Math.imul(k,pe)|0,i=i+Math.imul(k,me)|0,i=i+Math.imul(O,pe)|0,a=a+Math.imul(O,me)|0;var Ce=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=Math.imul(j,ce),i=i+Math.imul(z,ue)|0,a=Math.imul(z,ce),n=n+Math.imul(I,he)|0,i=i+Math.imul(I,le)|0,i=i+Math.imul(q,he)|0,a=a+Math.imul(q,le)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(R,pe)|0,a=a+Math.imul(R,me)|0;var Te=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,he),i=Math.imul(j,le),i=i+Math.imul(z,he)|0,a=Math.imul(z,le),n=n+Math.imul(I,pe)|0,i=i+Math.imul(I,me)|0,i=i+Math.imul(q,pe)|0,a=a+Math.imul(q,me)|0;var Re=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,pe),i=Math.imul(j,me),i=i+Math.imul(z,pe)|0,a=Math.imul(z,me);var Be=(c+n|0)+((8191&i)<<13)|0;return c=(a+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=Me,u[6]=xe,u[7]=_e,u[8]=Se,u[9]=Ne,u[10]=Ee,u[11]=Ae,u[12]=De,u[13]=ke,u[14]=Oe,u[15]=Ce,u[16]=Te,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,u=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=u;c++){var f=a-c,h=0|e.words[f],l=0|t.words[c],d=h*l,p=67108863&d;o=o+(d/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function g(e,t,r){var n=new v;return n.mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?d(this,e,t):n<1024?m(this,e,t):g(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},v.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<o;d++){var p=r[f+d],m=n[f+d],g=r[f+d+o],v=n[f+d+o],y=h*g-l*v;v=h*v+l*g,g=y,r[f+d]=p+g,n[f+d]=m+v,r[f+d+o]=p-g,n[f+d+o]=m-v,d!==s&&(y=u*h-c*l,l=u*l+c*h,h=y)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0===(-8192&a))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,s,u,n,i),this.transform(c,a,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),g(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"===typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=l(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length;n++,r=r.sqr())if(0!==t[n])break;if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-a|h>>>a,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return!1;var a=this.words[r];return!!(a&i)},a.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;a-=67108863&u,s=(a>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)a=(0|this.words[i+r])+s,s=a>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)a=-(0|this.words[i])+s,s=a>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1],s=this._countBits(o);r=26-s,0!==r&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var u,c=n.length-i.length;if("mod"!==t){u=new a(null),u.length=c+1,u.words=new Array(u.length);for(var f=0;f<u.length;f++)u.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,c);0===h.negative&&(n=h,u&&(u.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,l);while(0!==n.negative)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:u||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++c;var f=r.clone(),h=t.clone();while(!t.isZero()){for(var l=0,d=1;0===(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0){t.iushrn(l);while(l-- >0)(i.isOdd()||o.isOdd())&&(i.iadd(f),o.isub(h)),i.iushrn(1),o.iushrn(1)}for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0){r.iushrn(p);while(p-- >0)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1)}t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(u)):(r.isub(t),s.isub(i),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i,o=new a(1),s=new a(0),u=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0){t.iushrn(c);while(c-- >0)o.isOdd()&&o.iadd(u),o.iushrn(1)}for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0){r.iushrn(h);while(h-- >0)s.isOdd()&&s.iadd(u),s.iushrn(1)}t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return i=0===t.cmpn(1)?o:s,i.cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(w,b),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,b),i(x,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new M;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1),o=0;while(!i.isZero()&&0===i.andln(1))o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new a(2*f*f).toRed(this);while(0!==this.pow(f,c).cmp(u))f.redIAdd(u);var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;while(0!==d.cmp(s)){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new a(1).iushln(p-g-1));l=l.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return l},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=4,n=new Array(1<<r);n[0]=new a(1).toRed(this),n[1]=e;for(var i=2;i<n.length;i++)n[i]=this.mul(n[i-1],e);var o=n[0],s=0,u=0,c=t.bitLength()%26;for(0===c&&(c=26),i=t.length-1;i>=0;i--){for(var f=t.words[i],h=c-1;h>=0;h--){var l=f>>h&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,u++,(u===r||0===i&&0===h)&&(o=this.mul(o,n[s]),u=0,s=0)):u=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new N(e)},i(N,S),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},N.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(e,this)}).call(this,r("62e4")(e))},4930:function(e,t,r){var n=r("d039");e.exports=!!Object.getOwnPropertySymbols&&!n((function(){return!String(Symbol())}))},"493f":function(e,t,r){"use strict";(function(t){function r(e,r){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(o,this,e)):t.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!r&&e?a._writableState?a._writableState.errorEmitted?t.nextTick(i,a):(a._writableState.errorEmitted=!0,t.nextTick(n,a,e)):t.nextTick(n,a,e):r?(t.nextTick(i,a),r(e)):t.nextTick(i,a)})),this)}function n(e,t){o(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(e,t){e.emit("error",t)}function s(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:r,undestroy:a,errorOrDestroy:s}}).call(this,r("4362"))},"499e":function(e,t,r){"use strict";function n(e,t){for(var r=[],n={},i=0;i<t.length;i++){var a=t[i],o=a[0],s=a[1],u=a[2],c=a[3],f={id:e+":"+i,css:s,media:u,sourceMap:c};n[o]?n[o].parts.push(f):r.push(n[o]={id:o,parts:[f]})}return r}r.r(t),r.d(t,"default",(function(){return p}));var i="undefined"!==typeof document;if("undefined"!==typeof DEBUG&&DEBUG&&!i)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var a={},o=i&&(document.head||document.getElementsByTagName("head")[0]),s=null,u=0,c=!1,f=function(){},h=null,l="data-vue-ssr-id",d="undefined"!==typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function p(e,t,r,i){c=r,h=i||{};var o=n(e,t);return m(o),function(t){for(var r=[],i=0;i<o.length;i++){var s=o[i],u=a[s.id];u.refs--,r.push(u)}t?(o=n(e,t),m(o)):o=[];for(i=0;i<r.length;i++){u=r[i];if(0===u.refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete a[u.id]}}}}function m(e){for(var t=0;t<e.length;t++){var r=e[t],n=a[r.id];if(n){n.refs++;for(var i=0;i<n.parts.length;i++)n.parts[i](r.parts[i]);for(;i<r.parts.length;i++)n.parts.push(v(r.parts[i]));n.parts.length>r.parts.length&&(n.parts.length=r.parts.length)}else{var o=[];for(i=0;i<r.parts.length;i++)o.push(v(r.parts[i]));a[r.id]={id:r.id,refs:1,parts:o}}}}function g(){var e=document.createElement("style");return e.type="text/css",o.appendChild(e),e}function v(e){var t,r,n=document.querySelector("style["+l+'~="'+e.id+'"]');if(n){if(c)return f;n.parentNode.removeChild(n)}if(d){var i=u++;n=s||(s=g()),t=b.bind(null,n,i,!1),r=b.bind(null,n,i,!0)}else n=g(),t=w.bind(null,n),r=function(){n.parentNode.removeChild(n)};return t(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap)return;t(e=n)}else r()}}var y=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}();function b(e,t,r,n){var i=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=y(t,i);else{var a=document.createTextNode(i),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(a,o[t]):e.appendChild(a)}}function w(e,t){var r=t.css,n=t.media,i=t.sourceMap;if(n&&e.setAttribute("media",n),h.ssrId&&e.setAttribute(l,t.id),i&&(r+="\n/*# sourceURL="+i.sources[0]+" */",r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),e.styleSheet)e.styleSheet.cssText=r;else{while(e.firstChild)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}},"49ce":function(e,t,r){"use strict";(function(t,n){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){W(t,e)}}var a;e.exports=D,D.WritableState=A;var o={deprecate:r("b7d1")},s=r("f12a"),u=r("b639").Buffer,c=t.Uint8Array||function(){};function f(e){return u.from(e)}function h(e){return u.isBuffer(e)||e instanceof c}var l,d=r("9019"),p=r("05f0"),m=p.getHighWaterMark,g=r("d113").codes,v=g.ERR_INVALID_ARG_TYPE,y=g.ERR_METHOD_NOT_IMPLEMENTED,b=g.ERR_MULTIPLE_CALLBACK,w=g.ERR_STREAM_CANNOT_PIPE,M=g.ERR_STREAM_DESTROYED,x=g.ERR_STREAM_NULL_VALUES,_=g.ERR_STREAM_WRITE_AFTER_END,S=g.ERR_UNKNOWN_ENCODING,N=d.errorOrDestroy;function E(){}function A(e,t,n){a=a||r("5e7d"),e=e||{},"boolean"!==typeof n&&(n=t instanceof a),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=m(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===e.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){q(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function D(e){a=a||r("5e7d");var t=this instanceof a;if(!t&&!l.call(D,this))return new D(e);this._writableState=new A(e,this,t),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),s.call(this)}function k(e,t){var r=new _;N(e,r),n.nextTick(t,r)}function O(e,t,r,i){var a;return null===r?a=new x:"string"===typeof r||t.objectMode||(a=new v("chunk",["string","Buffer"],r)),!a||(N(e,a),n.nextTick(i,a),!1)}function C(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=u.from(t,r)),t}function T(e,t,r,n,i,a){if(!r){var o=C(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,s,n,i,a);return u}function R(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new M("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function B(e,t,r,i,a){--t.pendingcb,r?(n.nextTick(a,i),n.nextTick(H,e,t),e._writableState.errorEmitted=!0,N(e,i)):(a(i),e._writableState.errorEmitted=!0,N(e,i),H(e,t))}function I(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function q(e,t){var r=e._writableState,i=r.sync,a=r.writecb;if("function"!==typeof a)throw new b;if(I(r),t)B(e,r,i,t,a);else{var o=L(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||z(e,r),i?n.nextTick(P,e,r,o,a):P(e,r,o,a)}}function P(e,t,r,n){r||j(e,t),t.pendingcb--,n(),H(e,t)}function j(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function z(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),o=t.corkedRequestsFree;o.entry=r;var s=0,u=!0;while(r)a[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;a.allBuffers=u,R(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{while(r){var c=r.chunk,f=r.encoding,h=r.callback,l=t.objectMode?1:c.length;if(R(e,t,!1,l,c,f,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function L(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function U(e,t){e._final((function(r){t.pendingcb--,r&&N(e,r),t.prefinished=!0,e.emit("prefinish"),H(e,t)}))}function F(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,n.nextTick(U,e,t)))}function H(e,t){var r=L(t);if(r&&(F(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function Z(e,t,r){t.ending=!0,H(e,t),r&&(t.finished?n.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function W(e,t,r){var n=e.entry;e.entry=null;while(n){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}r("3fb5")(D,s),A.prototype.getBuffer=function(){var e=this.bufferedRequest,t=[];while(e)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(A.prototype,"buffer",{get:o.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(e){return!!l.call(this,e)||this===D&&(e&&e._writableState instanceof A)}})):l=function(e){return e instanceof this},D.prototype.pipe=function(){N(this,new w)},D.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&h(e);return a&&!u.isBuffer(e)&&(e=f(e)),"function"===typeof t&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!==typeof r&&(r=E),n.ending?k(this,r):(a||O(this,n,e,r))&&(n.pendingcb++,i=T(this,n,a,e,t,r)),i},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||z(this,e))},D.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),D.prototype._write=function(e,t,r){r(new y("_write()"))},D.prototype._writev=null,D.prototype.end=function(e,t,r){var n=this._writableState;return"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||Z(this,n,r),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),D.prototype.destroy=d.destroy,D.prototype._undestroy=d.undestroy,D.prototype._destroy=function(e,t){t(e)}}).call(this,r("c8ba"),r("4362"))},"4d2c":function(e,t,r){r("b0c0"),r("d3b7"),r("25f0");var n=r("53a5"),i=n.DiceRoll,a=0;e.exports={beforeCreate:function(){this.uuid=a.toString(),a+=1},data:function(){return{error:null,notationString:this.notation,output:null}},props:{notation:{type:String,required:!1}},methods:{roll:function(){this.error=null;try{this.output=this.notationString?new i(this.notationString):null}catch(e){this.output=null,"SyntaxError"===e.name?this.error="Invalid notation; ".concat(e.message):this.error="An error has occurred: ".concat(e.message)}finally{this.$emit("roll",this.notationString)}}}}},"4d64":function(e,t,r){var n=r("fc6a"),i=r("50c4"),a=r("23cb"),o=function(e){return function(t,r,o){var s,u=n(t),c=i(u.length),f=a(o,c);if(e&&r!=r){while(c>f)if(s=u[f++],s!=s)return!0}else for(;c>f;f++)if((e||f in u)&&u[f]===r)return e||f||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},"4dd0":function(e,t,r){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,a=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,o=r("ae84"),s=r("fda6"),u=r("8707").Buffer;e.exports=function(e,t){var r,c=e.toString(),f=c.match(n);if(f){var h="aes"+f[1],l=u.from(f[2],"hex"),d=u.from(f[3].replace(/[\r\n]/g,""),"base64"),p=o(t,l.slice(0,8),parseInt(f[1],10)).key,m=[],g=s.createDecipheriv(h,p,l);m.push(g.update(d)),m.push(g.final()),r=u.concat(m)}else{var v=c.match(a);r=new u(v[2].replace(/[\r\n]/g,""),"base64")}var y=c.match(i)[1];return{tag:y,data:r}}},"4e2b":function(e,t,r){"use strict";var n=r("da3e"),i=r("3fb5"),a=r("5ee7"),o=r("0184");function s(){this.tmp=new Array(2),this.keys=null}function u(e){o.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(u,o),e.exports=u,u.create=function(e){return new u(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=a.readUInt32BE(t,0),i=a.readUInt32BE(t,4);a.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var o=0;o<e.keys.length;o+=2){var s=c[o>>>1];r=a.r28shl(r,s),i=a.r28shl(i,s),a.pc2(r,i,e.keys,o)}},u.prototype._update=function(e,t,r,n){var i=this._desState,o=a.readUInt32BE(e,t),s=a.readUInt32BE(e,t+4);a.ip(o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,o,s,i.tmp,0):this._decrypt(i,o,s,i.tmp,0),o=i.tmp[0],s=i.tmp[1],a.writeUInt32BE(r,o,n),a.writeUInt32BE(r,s,n+4)},u.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,r,n,i){for(var o=t,s=r,u=0;u<e.keys.length;u+=2){var c=e.keys[u],f=e.keys[u+1];a.expand(s,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var h=a.substitute(c,f),l=a.permute(h),d=s;s=(o^l)>>>0,o=d}a.rip(s,o,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var o=r,s=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],f=e.keys[u+1];a.expand(o,e.tmp,0),c^=e.tmp[0],f^=e.tmp[1];var h=a.substitute(c,f),l=a.permute(h),d=o;o=(s^l)>>>0,s=d}a.rip(o,s,n,i)}},"4fd1":function(e,t,r){var n=r("3fb5"),i=r("b672"),a=r("8707").Buffer,o=[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],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function l(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0<t>>>0?1:0}n(u,i),u.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},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,a=0|this._dh,s=0|this._eh,u=0|this._fh,y=0|this._gh,b=0|this._hh,w=0|this._al,M=0|this._bl,x=0|this._cl,_=0|this._dl,S=0|this._el,N=0|this._fl,E=0|this._gl,A=0|this._hl,D=0;D<32;D+=2)t[D]=e.readInt32BE(4*D),t[D+1]=e.readInt32BE(4*D+4);for(;D<160;D+=2){var k=t[D-30],O=t[D-30+1],C=d(k,O),T=p(O,k);k=t[D-4],O=t[D-4+1];var R=m(k,O),B=g(O,k),I=t[D-14],q=t[D-14+1],P=t[D-32],j=t[D-32+1],z=T+q|0,L=C+I+v(z,T)|0;z=z+B|0,L=L+R+v(z,B)|0,z=z+j|0,L=L+P+v(z,j)|0,t[D]=L,t[D+1]=z}for(var U=0;U<160;U+=2){L=t[U],z=t[U+1];var F=f(r,n,i),H=f(w,M,x),Z=h(r,w),W=h(w,r),V=l(s,S),G=l(S,s),$=o[U],K=o[U+1],J=c(s,u,y),Y=c(S,N,E),X=A+G|0,Q=b+V+v(X,A)|0;X=X+Y|0,Q=Q+J+v(X,Y)|0,X=X+K|0,Q=Q+$+v(X,K)|0,X=X+z|0,Q=Q+L+v(X,z)|0;var ee=W+H|0,te=Z+F+v(ee,W)|0;b=y,A=E,y=u,E=N,u=s,N=S,S=_+X|0,s=a+Q+v(S,_)|0,a=i,_=x,i=n,x=M,n=r,M=w,w=X+ee|0,r=Q+te+v(w,X)|0}this._al=this._al+w|0,this._bl=this._bl+M|0,this._cl=this._cl+x|0,this._dl=this._dl+_|0,this._el=this._el+S|0,this._fl=this._fl+N|0,this._gl=this._gl+E|0,this._hl=this._hl+A|0,this._ah=this._ah+r+v(this._al,w)|0,this._bh=this._bh+n+v(this._bl,M)|0,this._ch=this._ch+i+v(this._cl,x)|0,this._dh=this._dh+a+v(this._dl,_)|0,this._eh=this._eh+s+v(this._el,S)|0,this._fh=this._fh+u+v(this._fl,N)|0,this._gh=this._gh+y+v(this._gl,E)|0,this._hh=this._hh+b+v(this._hl,A)|0},u.prototype._hash=function(){var e=a.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},5:function(e,t){},"50c4":function(e,t,r){var n=r("a691"),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},5135:function(e,t){var r={}.hasOwnProperty;e.exports=function(e,t){return r.call(e,t)}},5165:function(e,t,r){(function(e){var n=r("8c8a");function i(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,r){while(t._cache.length<r.length)t._cache=e.concat([t._cache,i(t)]);var a=t._cache.slice(0,r.length);return t._cache=t._cache.slice(r.length),n(r,a)}}).call(this,r("b639").Buffer)},5239:function(e,t,r){var n=r("8707").Buffer;function i(e,t,r){var n,i,o,s=-1,u=8,c=0;while(++s<u)n=e._cipher.encryptBlock(e._prev),i=t&1<<7-s?128:0,o=n[0]^i,c+=(128&o)>>s%8,e._prev=a(e._prev,r?i:o);return c}function a(e,t){var r=e.length,i=-1,a=n.allocUnsafe(e.length);e=n.concat([e,n.from([t])]);while(++i<r)a[i]=e[i]<<1|e[i+1]>>7;return a}t.encrypt=function(e,t,r){var a=t.length,o=n.allocUnsafe(a),s=-1;while(++s<a)o[s]=i(e,t[s],r);return o}},5291:function(e,t,r){var n=r("0106"),i=r("8707").Buffer;function a(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}e.exports=a},"53a5":function(e,t,r){
|
|
2
|
-
/**
|
|
3
|
-
* rpg-dice-roller - An advanced JS based dice roller that can roll various types of dice and modifiers, along with mathematical equations.
|
|
4
|
-
*
|
|
5
|
-
* @version 5.0.0
|
|
6
|
-
* @license MIT
|
|
7
|
-
* @author GreenImp <info@greenimp.co.uk> (http://greenimp.co.uk)
|
|
8
|
-
* @link https://greenimp.github.io/rpg-dice-roller/
|
|
9
|
-
*/
|
|
10
|
-
(function(e,n){n(t,r("c70b"),r("11a1"))})(0,(function(e,t,r){"use strict";function n(e){return n="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function u(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function l(e,t,r){return l=h()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var i=Function.bind.apply(e,n),a=new i;return r&&f(a,r.prototype),a},l.apply(null,arguments)}function d(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function p(e){var t="function"===typeof Map?new Map:void 0;return p=function(e){if(null===e||!d(e))return e;if("function"!==typeof e)throw new TypeError("Super expression must either be null or a function");if("undefined"!==typeof t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),f(r,e)},p(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return!t||"object"!==typeof t&&"function"!==typeof t?m(e):t}function v(e){var t=h();return function(){var r,n=c(e);if(t){var i=c(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return g(this,r)}}function y(e,t){while(!Object.prototype.hasOwnProperty.call(e,t))if(e=c(e),null===e)break;return e}function b(e,t,r){return b="undefined"!==typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=y(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}},b(e,t,r||e)}function w(e,t,r,n){return w="undefined"!==typeof Reflect&&Reflect.set?Reflect.set:function(e,t,r,n){var i,a=y(e,t);if(a){if(i=Object.getOwnPropertyDescriptor(a,t),i.set)return i.set.call(n,r),!0;if(!i.writable)return!1}if(i=Object.getOwnPropertyDescriptor(n,t),i){if(!i.writable)return!1;i.value=r,Object.defineProperty(n,t,i)}else s(n,t,r);return!0},w(e,t,r,n)}function M(e,t,r,n,i){var a=w(e,t,r,n||e);if(!a&&i)throw new Error("failed to set property");return r}function x(e,t){return N(e)||A(e,t)||D(e,t)||C()}function _(e){return S(e)||E(e)||D(e)||O()}function S(e){if(Array.isArray(e))return k(e)}function N(e){if(Array.isArray(e))return e}function E(e){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}function A(e,t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(n=(o=s.next()).done);n=!0)if(r.push(o.value),t&&r.length===t)break}catch(u){i=!0,a=u}finally{try{n||null==s["return"]||s["return"]()}finally{if(i)throw a}}return r}}function D(e,t){if(e){if("string"===typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function O(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function C(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var T=function(e){u(r,e);var t=v(r);function r(e){var n;return i(this,r),n=t.call(this,'Operator "'.concat(e,'" is invalid')),TypeError.captureStackTrace&&TypeError.captureStackTrace(m(n),r),n.name="CompareOperatorError",n.operator=e,n}return r}(p(TypeError)),R=function(e){u(r,e);var t=v(r);function r(e){var n;return i(this,r),n=t.call(this,"Invalid data format: ".concat(e)),Error.captureStackTrace&&Error.captureStackTrace(m(n),r),n.name="ImportError",n.data=e,n}return r}(p(Error)),B=function(e){u(r,e);var t=v(r);function r(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return i(this,r),n=t.call(this,'Die "'.concat(e,'" must have more than 1 possible value to ').concat(a||"do this action")),Error.captureStackTrace&&Error.captureStackTrace(m(n),r),n.name="DieActionValueError",n.action=a,n.die=e,n}return r}(p(Error)),I=function(e){u(r,e);var t=v(r);function r(e){var n;return i(this,r),n=t.call(this,'Notation "'.concat(e,'" is invalid')),Error.captureStackTrace&&Error.captureStackTrace(m(n),r),n.name="NotationError",n.notation=e,n}return r}(p(Error)),q=function(e){u(r,e);var t=v(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return i(this,r),e=t.call(this,"Missing argument".concat(n?' "'.concat(n,'"'):"")),Error.captureStackTrace&&Error.captureStackTrace(m(e),r),e.argumentName=n,e}return r}(p(Error)),P=Object.freeze({__proto__:null,CompareOperatorError:T,DataFormatError:R,DieActionValueError:B,NotationError:I,RequiredArgumentError:q}),j=function(e,t,r){var n,i=Number(e),a=Number(t);if(Number.isNaN(i)||Number.isNaN(a))return!1;switch(r){case"=":case"==":n=i===a;break;case"<":n=i<a;break;case">":n=i>a;break;case"<=":n=i<=a;break;case">=":n=i>=a;break;case"!":case"!=":n=i!==a;break;default:n=!1;break}return n},z=function(e){return t.evaluate(e)},L=function(e){return("number"===typeof e||"string"===typeof e)&&(!Number.isNaN(e)&&Number.isFinite(Number(e)))},U=function(e){if(!L(e))return!1;var t=Number(e);return t<=Number.MAX_SAFE_INTEGER&&t>=Number.MIN_SAFE_INTEGER},F=function(e){return Array.isArray(e)?e.reduce((function(e,t){return e+(L(t)?parseFloat("".concat(t)):0)}),0):0},H=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(parseFloat("".concat(e)).toFixed(t||0))},Z=Symbol("engine"),W=Symbol("random"),V={range:[],next:function(){return this.range[1]-this.range[0]}},G={next:function(){return 0}},$={browserCrypto:r.browserCrypto,nodeCrypto:r.nodeCrypto,MersenneTwister19937:r.MersenneTwister19937,nativeMath:r.nativeMath,min:G,max:V},K=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r.nativeMath;i(this,e),this.engine=t||r.nativeMath}return o(e,[{key:"engine",get:function(){return this[Z]},set:function(e){if(e&&"function"!==typeof e.next)throw new TypeError("engine must have function `next()`");this[Z]=e||r.nativeMath,this[W]=new r.Random(this[Z])}},{key:"integer",value:function(e,t){return this[Z].range=[e,t],this[W].integer(e,t)}},{key:"real",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return this[Z].range=[e,t],this[W].real(e,t,r)}}]),e}(),J=new K,Y=Object.freeze({__proto__:null,engines:$,generator:J}),X=Symbol("operator"),Q=Symbol("value"),ee=function(){function e(t,r){if(i(this,e),!t)throw new q("operator");if(!r&&0!==r)throw new q("value");this.operator=t,this.value=r}return o(e,[{key:"operator",get:function(){return this[X]},set:function(e){if(!this.constructor.isValidOperator(e))throw new T(e);this[X]=e}},{key:"value",get:function(){return this[Q]},set:function(e){if(!L(e))throw new TypeError("value must be a finite number");this[Q]=Number(e)}},{key:"isMatch",value:function(e){return j(e,this.value,this.operator)}},{key:"toJSON",value:function(){var e=this.operator,t=this.value;return{operator:e,type:"compare-point",value:t}}},{key:"toString",value:function(){return"".concat(this.operator).concat(this.value)}}],[{key:"isValidOperator",value:function(e){return"string"===typeof e&&/^(?:[<>!]?=|[<>])$/.test(e)}}]),e}(),te=function(){function e(){i(this,e),this.order=999}return o(e,[{key:"name",get:function(){return"modifier"}},{key:"notation",get:function(){return""}},{key:"maxIterations",get:function(){return 1e3}},{key:"run",value:function(e,t){return e}},{key:"toJSON",value:function(){var e=this.notation,t=this.name;return{name:t,notation:e,type:"modifier"}}},{key:"toString",value:function(){return this.notation}}]),e}(),re=Symbol("compare-point"),ne=function(e){u(r,e);var t=v(r);function r(e){var n;return i(this,r),n=t.call(this),e&&(n.comparePoint=e),n}return o(r,[{key:"comparePoint",get:function(){return this[re]},set:function(e){if(!(e instanceof ee))throw new TypeError("comparePoint must be instance of ComparePoint");this[re]=e}},{key:"name",get:function(){return"comparison"}},{key:"notation",get:function(){return"".concat(this.comparePoint||"")}},{key:"isComparePoint",value:function(e){return!!this.comparePoint&&this.comparePoint.isMatch(e)}},{key:"toJSON",value:function(){var e=this.comparePoint;return Object.assign(b(c(r.prototype),"toJSON",this).call(this),{comparePoint:e})}}]),r}(te),ie=Symbol("compound"),ae=Symbol("penetrate"),oe=function(e){u(r,e);var t=v(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,a=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return i(this,r),e=t.call(this,n),e[ie]=!!a,e[ae]=!!o,e.order=3,e}return o(r,[{key:"compound",get:function(){return this[ie]}},{key:"name",get:function(){return"explode"}},{key:"notation",get:function(){return"!".concat(this.compound?"!":"").concat(this.penetrate?"p":"").concat(b(c(r.prototype),"notation",this))}},{key:"penetrate",get:function(){return this[ae]}},{key:"run",value:function(e,t){var r=this;if(t.min===t.max)throw new B(t,"explode");var n=e;return n.rolls=e.rolls.map((function(e){for(var n=[e],i=e.value,a=0;a<r.maxIterations&&r.isComparePoint(i);a++){var o=n[n.length-1],s=t.rollOnce();i=s.value,o.modifiers.add("explode"),r.penetrate&&(o.modifiers.add("penetrate"),s.value-=1),n.push(s)}return r.compound&&n.length>1?(e.value=F(n.map((function(e){return e.value}))),e.modifiers=["explode","compound"],r.penetrate&&e.modifiers.add("penetrate"),e):n})).flat(),n}},{key:"toJSON",value:function(){var e=this.compound,t=this.penetrate;return Object.assign(b(c(r.prototype),"toJSON",this).call(this),{compound:e,penetrate:t})}}]),r}(ne),se={compound:"!",explode:"!","critical-failure":"__","critical-success":"**",drop:"d",max:"v",min:"^",penetrate:"p","re-roll":"r","re-roll-once":"ro","target-failure":"_","target-success":"*"},ue=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return[].concat(t).reduce((function(e,t){var r;return r=t instanceof te?t.name:t,e+(se[r]||r)}),"")},ce=Symbol("calculation-value"),fe=Symbol("modifiers"),he=Symbol("initial-value"),le=Symbol("use-in-total"),de=Symbol("value"),pe=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(i(this,e),L(t))this[he]=Number(t),this.modifiers=r||[],this.useInTotal=a;else{if(!t||"object"!==n(t)||Array.isArray(t))throw t===1/0?new RangeError("Result value must be a finite number"):new TypeError("Result value is invalid: ".concat(t));var o=L(t.initialValue)?t.initialValue:t.value;if(!L(o))throw new TypeError("Result value is invalid: ".concat(o));this[he]=Number(o),L(t.value)&&Number(t.value)!==this[he]&&(this.value=t.value),L(t.calculationValue)&&parseFloat("".concat(t.calculationValue))!==this.value&&(this.calculationValue=t.calculationValue),this.modifiers=t.modifiers||r||[],this.useInTotal="boolean"===typeof t.useInTotal?t.useInTotal:a||!1}}return o(e,[{key:"calculationValue",get:function(){return L(this[ce])?parseFloat(this[ce]):this.value},set:function(e){var t=L(e);if(e===1/0)throw new RangeError("Result calculation value must be a finite number");if(e&&!t)throw new TypeError("Result calculation value is invalid: ".concat(e));this[ce]=t?parseFloat("".concat(e)):null}},{key:"initialValue",get:function(){return this[he]}},{key:"modifierFlags",get:function(){return ue.apply(void 0,_(this.modifiers))}},{key:"modifiers",get:function(){return this[fe]},set:function(e){if((Array.isArray(e)||e instanceof Set)&&_(e).every((function(e){return"string"===typeof e})))this[fe]=new Set(_(e));else{if(e||0===e)throw new TypeError("modifiers must be a Set or array of modifier names: ".concat(e));this[fe]=new Set}}},{key:"useInTotal",get:function(){return!!this[le]},set:function(e){this[le]=!!e}},{key:"value",get:function(){return L(this[de])?this[de]:this[he]},set:function(e){if(e===1/0)throw new RangeError("Result value must be a finite number");if(!L(e))throw new TypeError("Result value is invalid: ".concat(e));this[de]=Number(e)}},{key:"toJSON",value:function(){var e=this.calculationValue,t=this.initialValue,r=this.modifierFlags,n=this.modifiers,i=this.useInTotal,a=this.value;return{calculationValue:e,initialValue:t,modifierFlags:r,modifiers:_(n),type:"result",useInTotal:i,value:a}}},{key:"toString",value:function(){return this.value+this.modifierFlags}}]),e}(),me=Symbol("rolls"),ge=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];i(this,e),this.rolls=t}return o(e,[{key:"length",get:function(){return this.rolls.length||0}},{key:"rolls",get:function(){return _(this[me])},set:function(e){var t=this;if(!e||!Array.isArray(e))throw new TypeError("rolls must be an array: ".concat(e));this[me]=[],e.forEach((function(e){t.addRoll(e)}))}},{key:"value",get:function(){return this.rolls.reduce((function(e,t){return e+(t.useInTotal?t.calculationValue:0)}),0)}},{key:"addRoll",value:function(e){var t=e instanceof pe?e:new pe(e);this[me].push(t)}},{key:"toJSON",value:function(){var e=this.rolls,t=this.value;return{rolls:e,type:"roll-results",value:t}}},{key:"toString",value:function(){return"[".concat(this.rolls.join(", "),"]")}}]),e}(),ve=Symbol("once"),ye=function(e){u(r,e);var t=v(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return i(this,r),e=t.call(this,a),e.once=!!n,e.order=4,e}return o(r,[{key:"name",get:function(){return"re-roll"}},{key:"notation",get:function(){return"r".concat(this.once?"o":"").concat(b(c(r.prototype),"notation",this))}},{key:"once",get:function(){return!!this[ve]},set:function(e){this[ve]=!!e}},{key:"run",value:function(e,t){var r=this;if(t.min===t.max)throw new B(t,"re-roll");return e.rolls.map((function(e){for(var n=0;n<r.maxIterations&&r.isComparePoint(e.value);n++){var i=t.rollOnce();if(e.value=i.value,e.modifiers.add("re-roll".concat(r.once?"-once":"")),r.once)break}return e})),e}},{key:"toJSON",value:function(){var e=this.once;return Object.assign(b(c(r.prototype),"toJSON",this).call(this),{once:e})}}]),r}(ne),be=Symbol("modifiers"),we=Symbol("qty"),Me=Symbol("sides"),xe=Symbol("min-value"),_e=Symbol("max-value"),Se=function(){function e(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;if(i(this,e),!t&&0!==t)throw new q("sides");if(t===1/0)throw new RangeError("numerical sides must be finite number");if(L(t)){if(t<1||!U(t))throw new RangeError("numerical sides must be a positive finite number")}else if("string"!==typeof t)throw new TypeError("non-numerical sides must be a string");if(!L(r))throw new TypeError("qty must be a positive finite integer");if(r<1||r>999)throw new RangeError("qty must be between 1 and 999");if(!L(a))throw new TypeError("min must a finite number");if(!U(a))throw new RangeError("min must a finite number");if(o&&!L(o))throw new TypeError("max must a finite number");if(o&&!U(o))throw new RangeError("max must a finite number");this[we]=parseInt("".concat(r),10),this[Me]=t,n&&(this.modifiers=n),this[xe]=parseInt(a,10),this[_e]=o?parseInt("".concat(o),10):t}return o(e,[{key:"average",get:function(){return(this.min+this.max)/2}},{key:"modifiers",get:function(){return this[be]?new Map(_(this[be]).sort((function(e,t){return e[1].order-t[1].order}))):null},set:function(e){var t,r=this;if(e instanceof Map)t=e;else if(Array.isArray(e))t=new Map(e.map((function(e){return[e.name,e]})));else{if("object"!==n(e))throw new TypeError("modifiers should be a Map, array, or an Object containing Modifiers");t=new Map(Object.entries(e))}if(t.size&&_(t.entries()).some((function(e){return!(e[1]instanceof te)})))throw new TypeError("modifiers must only contain Modifier instances");this[be]=t,this[be].forEach((function(e){e instanceof oe&&!e.comparePoint?e.comparePoint=new ee("=",r.max):e instanceof ye&&!e.comparePoint&&(e.comparePoint=new ee("=",r.min))}))}},{key:"max",get:function(){return this[_e]}},{key:"min",get:function(){return this[xe]}},{key:"name",get:function(){return"standard"}},{key:"notation",get:function(){var e="".concat(this.qty,"d").concat(this.sides);return this.modifiers&&this.modifiers.size&&(e+=_(this.modifiers.values()).reduce((function(e,t){return e+t.notation}),"")),e}},{key:"qty",get:function(){return this[we]}},{key:"sides",get:function(){return this[Me]}},{key:"roll",value:function(){for(var e=this,t=new ge,r=0;r<this.qty;r++)t.addRoll(this.rollOnce());return(this.modifiers||[]).forEach((function(r){r.run(t,e)})),t}},{key:"rollOnce",value:function(){return new pe(J.integer(this.min,this.max))}},{key:"toJSON",value:function(){var e=this.average,t=this.max,r=this.min,n=this.modifiers,i=this.name,a=this.notation,o=this.qty,s=this.sides;return{average:e,max:t,min:r,modifiers:n,name:i,notation:a,qty:o,sides:s,type:"die"}}},{key:"toString",value:function(){return this.notation}}]),e}(),Ne=function(e){u(r,e);var t=v(r);function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;i(this,r);var o=e;if(o||0===o){if(1!==o&&2!==o)throw new RangeError("nonBlanks must be 1 or 2")}else o=2;return t.call(this,o,n,a,-1,1)}return o(r,[{key:"name",get:function(){return"fudge"}},{key:"nonBlanks",get:function(){return b(c(r.prototype),"sides",this)}},{key:"sides",get:function(){return"F.".concat(this.nonBlanks)}},{key:"rollOnce",value:function(){var e=0;if(2===this.nonBlanks)e=J.integer(1,3)-2;else if(1===this.nonBlanks){var t=J.integer(1,6);1===t?e=-1:6===t&&(e=1)}return new pe(e)}}]),r}(Se),Ee=function(e){u(r,e);var t=v(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return i(this,r),e=t.call(this,100,n,a),e.sidesAsNumber=!!o,e}return o(r,[{key:"name",get:function(){return"percentile"}},{key:"sides",get:function(){return this.sidesAsNumber?b(c(r.prototype),"sides",this):"%"}}]),r}(Se),Ae=Object.freeze({__proto__:null,FudgeDice:Ne,PercentileDice:Ee,StandardDice:Se}),De=function(e){u(r,e);var t=v(r);function r(e){var n;return i(this,r),n=t.call(this,e),n.order=9,n}return o(r,[{key:"name",get:function(){return"critical-failure"}},{key:"notation",get:function(){return"cf".concat(b(c(r.prototype),"notation",this))}},{key:"run",value:function(e,t){var r=this;return e.rolls.forEach((function(e){return r.isComparePoint(e.value)&&e.modifiers.add("critical-failure"),e})),e}}]),r}(ne),ke=function(e){u(r,e);var t=v(r);function r(e){var n;return i(this,r),n=t.call(this,e),n.order=8,n}return o(r,[{key:"name",get:function(){return"critical-success"}},{key:"notation",get:function(){return"cs".concat(b(c(r.prototype),"notation",this))}},{key:"run",value:function(e,t){var r=this;return e.rolls.forEach((function(e){return r.isComparePoint(e.value)&&e.modifiers.add("critical-success"),e})),e}}]),r}(ne),Oe=Symbol("calculation-value"),Ce=Symbol("is-roll-group"),Te=Symbol("modifiers"),Re=Symbol("results"),Be=Symbol("use-in-total"),Ie=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];i(this,e),this.isRollGroup=n,this.modifiers=r,this.results=t,this.useInTotal=a}return o(e,[{key:"calculationValue",get:function(){return L(this[Oe])?parseFloat(this[Oe]):this.value},set:function(e){var t=L(e);if(e===1/0)throw new RangeError("Results calculation value must be a finite number");if(e&&!t)throw new TypeError("Results calculation value is invalid: ".concat(e));this[Oe]=t?parseFloat("".concat(e)):null}},{key:"isRollGroup",get:function(){return this[Ce]},set:function(e){this[Ce]=!!e}},{key:"length",get:function(){return this.results.length||0}},{key:"modifierFlags",get:function(){return ue.apply(void 0,_(this.modifiers))}},{key:"modifiers",get:function(){return this[Te]},set:function(e){if((Array.isArray(e)||e instanceof Set)&&_(e).every((function(e){return"string"===typeof e})))this[Te]=new Set(_(e));else{if(e||0===e)throw new TypeError("modifiers must be a Set or array of modifier names: ".concat(e));this[Te]=new Set}}},{key:"results",get:function(){return _(this[Re])},set:function(e){var t=this;if(!e||!Array.isArray(e))throw new TypeError("results must be an array: ".concat(e));this[Re]=[],e.forEach((function(e){t.addResult(e)}))}},{key:"useInTotal",get:function(){return!!this[Be]},set:function(e){this[Be]=!!e}},{key:"value",get:function(){if(!this.results.length)return 0;var t=this.results.reduce((function(t,r){var n=r;return r instanceof e?n=r.useInTotal?r.calculationValue:0:r instanceof ge&&(n=r.value),t+n}),"string"===typeof this.results[0]?"":0);return"string"===typeof t?z(t):t}},{key:"addResult",value:function(t){var r;if(t instanceof e||t instanceof ge)r=t;else{if("string"!==typeof t&&!L(t))throw new TypeError("value must be one of ResultGroup, RollResults, string, or number");r=t}this[Re].push(r)}},{key:"toJSON",value:function(){var e=this.calculationValue,t=this.isRollGroup,r=this.modifierFlags,n=this.modifiers,i=this.results,a=this.useInTotal,o=this.value;return{calculationValue:e,isRollGroup:t,modifierFlags:r,modifiers:_(n),results:i,type:"result-group",useInTotal:a,value:o}}},{key:"toString",value:function(){var e;return e=this.isRollGroup?"{".concat(this.results.join(", "),"}"):this.results.join(""),this.modifierFlags&&(e="(".concat(e,")").concat(this.modifierFlags)),e}}]),e}(),qe=Symbol("end"),Pe=Symbol("qty"),je=function(e){u(r,e);var t=v(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"h",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return i(this,r),e=t.call(this),e.end=n,e.qty=a,e.order=5,e}return o(r,[{key:"end",get:function(){return this[qe]},set:function(e){if("h"!==e&&"l"!==e)throw new RangeError('End must be "h" or "l"');this[qe]=e}},{key:"name",get:function(){return"keep-".concat(this.end)}},{key:"notation",get:function(){return"k".concat(this.end).concat(this.qty)}},{key:"qty",get:function(){return this[Pe]},set:function(e){if(e===1/0)throw new RangeError("qty must be a finite number");if(!L(e)||e<1)throw new TypeError("qty must be a positive finite integer");this[Pe]=Math.floor(e)}},{key:"rangeToDrop",value:function(e){return"h"===this.end?[0,e.length-this.qty]:[this.qty,e.length]}},{key:"run",value:function(e,t){var r,n,i;return e instanceof Ie?(n=e.results,i=1===n.length&&n[0]instanceof Ie?n[0].results.map((function(e,t){return e instanceof ge?e.rolls.map((function(e,r){return{value:e.value,index:[t,r]}})):null})).flat().filter(Boolean):_(n).map((function(e,t){return{value:e.value,index:t}}))):(n=e.rolls,i=_(n).map((function(e,t){return{value:e.value,index:t}}))),i=(r=i.sort((function(e,t){return e.value-t.value})).map((function(e){return e.index}))).slice.apply(r,_(this.rangeToDrop(i))),i.forEach((function(e){var t;t=Array.isArray(e)?n[0].results[e[0]].rolls[e[1]]:n[e],t.modifiers.add("drop"),t.useInTotal=!1})),e}},{key:"toJSON",value:function(){var e=this.end,t=this.qty;return Object.assign(b(c(r.prototype),"toJSON",this).call(this),{end:e,qty:t})}}]),r}(te),ze=function(e){u(r,e);var t=v(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"l",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return i(this,r),e=t.call(this,n,a),e.order=6,e}return o(r,[{key:"name",get:function(){return"drop-".concat(this.end)}},{key:"notation",get:function(){return"d".concat(this.end).concat(this.qty)}},{key:"rangeToDrop",value:function(e){return"h"===this.end?[e.length-this.qty,e.length]:[0,this.qty]}}]),r}(je),Le=Symbol("max"),Ue=function(e){u(r,e);var t=v(r);function r(e){var n;return i(this,r),n=t.call(this),n.max=e,n.order=2,n}return o(r,[{key:"max",get:function(){return this[Le]},set:function(e){if(!L(e))throw new TypeError("max must be a number");this[Le]=parseFloat("".concat(e))}},{key:"name",get:function(){return"max"}},{key:"notation",get:function(){return"max".concat(this.max)}},{key:"run",value:function(e,t){var r=this,n=e;return n.rolls=e.rolls.map((function(e){var t=e;return e.value>r.max&&(t.value=r.max,t.modifiers.add("max")),t})),n}},{key:"toJSON",value:function(){var e=this.max;return Object.assign(b(c(r.prototype),"toJSON",this).call(this),{max:e})}}]),r}(te),Fe=Symbol("min"),He=function(e){u(r,e);var t=v(r);function r(e){var n;return i(this,r),n=t.call(this),n.min=e,n.order=1,n}return o(r,[{key:"min",get:function(){return this[Fe]},set:function(e){if(!L(e))throw new TypeError("min must be a number");this[Fe]=parseFloat("".concat(e))}},{key:"name",get:function(){return"min"}},{key:"notation",get:function(){return"min".concat(this.min)}},{key:"run",value:function(e,t){var r=this,n=e;return n.rolls=e.rolls.map((function(e){var t=e;return e.value<r.min&&(t.value=r.min,t.modifiers.add("min")),t})),n}},{key:"toJSON",value:function(){var e=this.min;return Object.assign(b(c(r.prototype),"toJSON",this).call(this),{min:e})}}]),r}(te),Ze=Symbol("direction"),We=function(e){u(r,e);var t=v(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"a";return i(this,r),e=t.call(this),e.direction=n,e.order=10,e}return o(r,[{key:"direction",get:function(){return this[Ze]},set:function(e){if("a"!==e&&"d"!==e)throw new RangeError('Direction must be "a" (Ascending) or "d" (Descending)');this[Ze]=e}},{key:"name",get:function(){return"sorting"}},{key:"notation",get:function(){return"s".concat(this.direction)}},{key:"run",value:function(e,t){var r,n=this;return r=e instanceof Ie?"results":"rolls",e[r]=e[r].sort((function(e,t){return"d"===n.direction?t.value-e.value:e.value-t.value})),e instanceof Ie&&(e[r]=e[r].map((function(e){return e instanceof Ie||e instanceof ge?n.run(e,t):e}))),e}},{key:"toJSON",value:function(){var e=this.direction;return Object.assign(b(c(r.prototype),"toJSON",this).call(this),{direction:e})}}]),r}(te),Ve=Symbol("failure-cp"),Ge=function(e){u(r,e);var t=v(r);function r(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return i(this,r),n=t.call(this,e),n.failureComparePoint=a,n.order=7,n}return o(r,[{key:"failureComparePoint",get:function(){return this[Ve]},set:function(e){if(e&&!(e instanceof ee))throw new TypeError("failure comparePoint must be instance of ComparePoint or null");this[Ve]=e||null}},{key:"name",get:function(){return"target"}},{key:"notation",get:function(){return"".concat(b(c(r.prototype),"notation",this)).concat(this.failureComparePoint?"f".concat(this.failureComparePoint):"")}},{key:"successComparePoint",get:function(){return this.comparePoint},set:function(e){M(c(r.prototype),"comparePoint",e,this,!0)}},{key:"getStateValue",value:function(e){return this.isSuccess(e)?1:this.isFailure(e)?-1:0}},{key:"isFailure",value:function(e){return!!this.failureComparePoint&&this.failureComparePoint.isMatch(e)}},{key:"isNeutral",value:function(e){return!this.isSuccess(e)&&!this.isFailure(e)}},{key:"isSuccess",value:function(e){return this.isComparePoint(e)}},{key:"run",value:function(e,t){var r,n=this;return r=e instanceof Ie?e.results:e.rolls,r.forEach((function(e){n.isSuccess(e.value)?e.modifiers.add("target-success"):n.isFailure(e.value)&&e.modifiers.add("target-failure"),e.calculationValue=n.getStateValue(e.value)})),e}},{key:"toJSON",value:function(){var e=this.failureComparePoint,t=this.successComparePoint,n=b(c(r.prototype),"toJSON",this).call(this);return delete n.comparePoint,Object.assign(n,{failureComparePoint:e,successComparePoint:t})}}]),r}(ne),$e=Object.freeze({__proto__:null,ComparisonModifier:ne,CriticalFailureModifier:De,CriticalSuccessModifier:ke,DropModifier:ze,ExplodeModifier:oe,KeepModifier:je,MaxModifier:Ue,MinModifier:He,Modifier:te,ReRollModifier:ye,SortingModifier:We,TargetModifier:Ge}),Ke=Object.freeze({__proto__:null,ResultGroup:Ie,RollResult:pe,RollResults:ge}),Je=function(e){try{return!(!e||btoa(atob(e))!==e)}catch(t){return!1}},Ye=function(e){try{var t=!!e&&JSON.parse(e);return!(!t||"object"!==n(t))}catch(r){return!1}},Xe=Symbol("modifiers"),Qe=Symbol("expressions"),et=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];i(this,e),this.expressions=t,this.modifiers=r}return o(e,[{key:"expressions",get:function(){return _(this[Qe]||[])},set:function(e){var t=this;if(!e)throw new q("expressions");if(!Array.isArray(e))throw new TypeError("expressions must be an array: ".concat(e));this[Qe]=[],e.forEach((function(r){if(!r||!Array.isArray(r))throw new TypeError("Expressions must be an array of arrays: ".concat(e));if(0===r.length)throw new TypeError("Sub expressions cannot be empty: ".concat(e));if(!r.every((function(e){return e instanceof Se||"string"===typeof e||"number"===typeof e})))throw new TypeError("Sub expression items must be Dice, numbers, or strings");t[Qe].push(r)}))}},{key:"modifiers",get:function(){return this[Xe]?new Map(_(this[Xe]).sort((function(e,t){return e[1].order-t[1].order}))):null},set:function(e){var t;if(e instanceof Map)t=e;else if(Array.isArray(e))t=new Map(e.map((function(e){return[e.name,e]})));else{if("object"!==n(e))throw new TypeError("modifiers should be a Map, array, or an Object containing Modifiers");t=new Map(Object.entries(e))}if(t.size&&_(t.entries()).some((function(e){return!(e[1]instanceof te)})))throw new TypeError("modifiers must only contain Modifier instances");this[Xe]=t}},{key:"notation",get:function(){var e=this.expressions.map((function(e){return e.reduce((function(e,t){return e+t}),"")})).join(", ");return e="{".concat(e,"}"),this.modifiers&&this.modifiers.size&&(e+=_(this.modifiers.values()).reduce((function(e,t){return e+t.notation}),"")),e}},{key:"roll",value:function(){var e=this,t=new Ie(this.expressions.map((function(e){var t=e.map((function(e){return e instanceof Se?e.roll():e}));return new Ie(t)})));return t.isRollGroup=!0,(this.modifiers||[]).forEach((function(r){r.run(t,e)})),t}},{key:"toJSON",value:function(){var e=this.modifiers,t=this.notation,r=this.expressions;return{expressions:r,modifiers:e,notation:t,type:"group"}}},{key:"toString",value:function(){return this.notation}}]),e}();function tt(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function rt(e,t,r,n){this.message=e,this.expected=t,this.found=r,this.location=n,this.name="SyntaxError","function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,rt)}function nt(e,t){t=void 0!==t?t:{};var r,n={},i={Main:cr},a=cr,o="{",u=tr("{",!1),c=",",f=tr(",",!1),h="}",l=tr("}",!1),d=function(e,t,r){return new et([e].concat(_(t.map((function(e){return e[3]})))),Object.assign.apply(Object,[{}].concat(_(r.map((function(e){return s({},e.name,e)}))))))},p=function(e,t){return e.modifiers=Object.assign.apply(Object,[{}].concat(_(t.map((function(e){return s({},e.name,e)}))))),e},m="d",g=tr("d",!1),v=function(e,t){return new Se(t,e||1)},y="d%",b=tr("d%",!1),w=function(e){return new Ee(e||1)},M="dF",S=tr("dF",!1),N=".",E=tr(".",!1),A=/^[12]/,D=rr(["1","2"],!1,!1),k=function(e,t){return new Ne(t?parseInt(t[1],10):2,e||1)},O="!",C=tr("!",!1),T="p",R=tr("p",!1),B=function(e,t,r){return new oe(r,!!e,!!t)},I=function(e,t){return new Ge(e,t)},q=/^[lh]/,P=rr(["l","h"],!1,!1),j=function(e,t){return new ze(e||"l",t)},L="k",U=tr("k",!1),F=function(e,t){return new je(e||"h",t)},H="max",Z=tr("max",!1),W=function(e){return new Ue(e)},V="min",G=tr("min",!1),$=function(e){return new He(e)},K="r",J=tr("r",!1),Y="o",X=tr("o",!1),Q=function(e,t){return new ye(!!e,t)},te="cs",re=tr("cs",!1),ne=function(e){return new ke(e)},ie="cf",ae=tr("cf",!1),se=function(e){return new De(e)},ue="s",ce=tr("s",!1),fe="a",he=tr("a",!1),le=function(e){return new We(e||"a")},de="f",pe=tr("f",!1),me=function(e){return e},ge=function(e,t){return new ee(e,t)},ve="!=",be=tr("!=",!1),we="<=",Me=tr("<=",!1),xe=">=",_e=tr(">=",!1),Ae="=",Oe=tr("=",!1),Ce=">",Te=tr(">",!1),Re="<",Be=tr("<",!1),Ie="(",qe=tr("(",!1),Pe=")",Le=tr(")",!1),Fe=function(e,t,r){return z(er())},Ze=function(e,t){return e=Array.isArray(e)?e:[e],[].concat(_(e),_(t.map((function(e){var t=x(e,4),r=t[1],n=t[3];return[r,n]})).flat(2)))},Ve=function(e,t,r){return[e].concat(_(t),[r])},$e="abs",Ke=tr("abs",!1),Je="ceil",Ye=tr("ceil",!1),Xe="cos",Qe=tr("cos",!1),tt="exp",nt=tr("exp",!1),it="floor",at=tr("floor",!1),ot="log",st=tr("log",!1),ut="round",ct=tr("round",!1),ft="sign",ht=tr("sign",!1),lt="sin",dt=tr("sin",!1),pt="sqrt",mt=tr("sqrt",!1),gt="tan",vt=tr("tan",!1),yt=function(e,t){return["".concat(e,"(")].concat(_(t),[")"])},bt="pow",wt=tr("pow",!1),Mt=function(e,t,r){return["".concat(e,"(")].concat(_(t),[","],_(r),[")"])},xt="-",_t=tr("-",!1),St=/^[.]/,Nt=rr(["."],!1,!1),Et=function(){return parseFloat(er())},At=/^[1-9]/,Dt=rr([["1","9"]],!1,!1),kt=/^[0-9]/,Ot=rr([["0","9"]],!1,!1),Ct=function(){return parseInt(er(),10)},Tt="**",Rt=tr("**",!1),Bt=function(){return"^"},It="*",qt=tr("*",!1),Pt="^",jt=tr("^",!1),zt="%",Lt=tr("%",!1),Ut="/",Ft=tr("/",!1),Ht="+",Zt=tr("+",!1),Wt=ir("whitespace"),Vt=/^[ \t\n\r]/,Gt=rr([" ","\t","\n","\r"],!1,!1),$t=0,Kt=0,Jt=[{line:1,column:1}],Yt=0,Xt=[],Qt=0;if("startRule"in t){if(!(t.startRule in i))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=i[t.startRule]}function er(){return e.substring(Kt,$t)}function tr(e,t){return{type:"literal",text:e,ignoreCase:t}}function rr(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function nr(){return{type:"end"}}function ir(e){return{type:"other",description:e}}function ar(t){var r,n=Jt[t];if(n)return n;r=t-1;while(!Jt[r])r--;n=Jt[r],n={line:n.line,column:n.column};while(r<t)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return Jt[t]=n,n}function or(e,t){var r=ar(e),n=ar(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:n.line,column:n.column}}}function sr(e){$t<Yt||($t>Yt&&(Yt=$t,Xt=[]),Xt.push(e))}function ur(e,t,r){return new rt(rt.buildMessage(e,t),e,t,r)}function cr(){var e;return e=Or(),e}function fr(){var t,r,i,a,s,p,m,g,v,y;if(t=$t,123===e.charCodeAt($t)?(r=o,$t++):(r=n,0===Qt&&sr(u)),r!==n)if(i=Pr(),i!==n)if(a=Or(),a!==n){s=[],p=$t,m=Pr(),m!==n?(44===e.charCodeAt($t)?(g=c,$t++):(g=n,0===Qt&&sr(f)),g!==n?(v=Pr(),v!==n?(y=Or(),y!==n?(m=[m,g,v,y],p=m):($t=p,p=n)):($t=p,p=n)):($t=p,p=n)):($t=p,p=n);while(p!==n)s.push(p),p=$t,m=Pr(),m!==n?(44===e.charCodeAt($t)?(g=c,$t++):(g=n,0===Qt&&sr(f)),g!==n?(v=Pr(),v!==n?(y=Or(),y!==n?(m=[m,g,v,y],p=m):($t=p,p=n)):($t=p,p=n)):($t=p,p=n)):($t=p,p=n);if(s!==n)if(p=Pr(),p!==n)if(125===e.charCodeAt($t)?(m=h,$t++):(m=n,0===Qt&&sr(l)),m!==n){g=[],v=mr();while(v!==n)g.push(v),v=mr();g!==n?(Kt=t,r=d(a,s,g),t=r):($t=t,t=n)}else $t=t,t=n;else $t=t,t=n;else $t=t,t=n}else $t=t,t=n;else $t=t,t=n;else $t=t,t=n;return t}function hr(){var e,t,r,i;if(e=$t,t=lr(),t===n&&(t=dr(),t===n&&(t=pr())),t!==n){r=[],i=mr();while(i!==n)r.push(i),i=mr();r!==n?(Kt=e,t=p(t,r),e=t):($t=e,e=n)}else $t=e,e=n;return e}function lr(){var t,r,i,a;return t=$t,r=kr(),r===n&&(r=null),r!==n?(100===e.charCodeAt($t)?(i=m,$t++):(i=n,0===Qt&&sr(g)),i!==n?(a=kr(),a!==n?(Kt=t,r=v(r,a),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n),t}function dr(){var t,r,i;return t=$t,r=kr(),r===n&&(r=null),r!==n?(e.substr($t,2)===y?(i=y,$t+=2):(i=n,0===Qt&&sr(b)),i!==n?(Kt=t,r=w(r),t=r):($t=t,t=n)):($t=t,t=n),t}function pr(){var t,r,i,a,o,s;return t=$t,r=kr(),r===n&&(r=null),r!==n?(e.substr($t,2)===M?(i=M,$t+=2):(i=n,0===Qt&&sr(S)),i!==n?(a=$t,46===e.charCodeAt($t)?(o=N,$t++):(o=n,0===Qt&&sr(E)),o!==n?(A.test(e.charAt($t))?(s=e.charAt($t),$t++):(s=n,0===Qt&&sr(D)),s!==n?(o=[o,s],a=o):($t=a,a=n)):($t=a,a=n),a===n&&(a=null),a!==n?(Kt=t,r=k(r,a),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n),t}function mr(){var e;return e=gr(),e===n&&(e=vr(),e===n&&(e=yr(),e===n&&(e=br(),e===n&&(e=xr(),e===n&&(e=_r(),e===n&&(e=Sr(),e===n&&(e=Nr(),e===n&&(e=wr(),e===n&&(e=Mr()))))))))),e}function gr(){var t,r,i,a,o;return t=$t,33===e.charCodeAt($t)?(r=O,$t++):(r=n,0===Qt&&sr(C)),r!==n?(33===e.charCodeAt($t)?(i=O,$t++):(i=n,0===Qt&&sr(C)),i===n&&(i=null),i!==n?(112===e.charCodeAt($t)?(a=T,$t++):(a=n,0===Qt&&sr(R)),a===n&&(a=null),a!==n?(o=Ar(),o===n&&(o=null),o!==n?(Kt=t,r=B(i,a,o),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n),t}function vr(){var e,t,r;return e=$t,t=Ar(),t!==n?(r=Er(),r===n&&(r=null),r!==n?(Kt=e,t=I(t,r),e=t):($t=e,e=n)):($t=e,e=n),e}function yr(){var t,r,i,a;return t=$t,100===e.charCodeAt($t)?(r=m,$t++):(r=n,0===Qt&&sr(g)),r!==n?(q.test(e.charAt($t))?(i=e.charAt($t),$t++):(i=n,0===Qt&&sr(P)),i===n&&(i=null),i!==n?(a=Br(),a!==n?(Kt=t,r=j(i,a),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n),t}function br(){var t,r,i,a;return t=$t,107===e.charCodeAt($t)?(r=L,$t++):(r=n,0===Qt&&sr(U)),r!==n?(q.test(e.charAt($t))?(i=e.charAt($t),$t++):(i=n,0===Qt&&sr(P)),i===n&&(i=null),i!==n?(a=Br(),a!==n?(Kt=t,r=F(i,a),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n),t}function wr(){var t,r,i;return t=$t,e.substr($t,3)===H?(r=H,$t+=3):(r=n,0===Qt&&sr(Z)),r!==n?(i=Rr(),i!==n?(Kt=t,r=W(i),t=r):($t=t,t=n)):($t=t,t=n),t}function Mr(){var t,r,i;return t=$t,e.substr($t,3)===V?(r=V,$t+=3):(r=n,0===Qt&&sr(G)),r!==n?(i=Rr(),i!==n?(Kt=t,r=$(i),t=r):($t=t,t=n)):($t=t,t=n),t}function xr(){var t,r,i,a;return t=$t,114===e.charCodeAt($t)?(r=K,$t++):(r=n,0===Qt&&sr(J)),r!==n?(111===e.charCodeAt($t)?(i=Y,$t++):(i=n,0===Qt&&sr(X)),i===n&&(i=null),i!==n?(a=Ar(),a===n&&(a=null),a!==n?(Kt=t,r=Q(i,a),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n),t}function _r(){var t,r,i;return t=$t,e.substr($t,2)===te?(r=te,$t+=2):(r=n,0===Qt&&sr(re)),r!==n?(i=Ar(),i!==n?(Kt=t,r=ne(i),t=r):($t=t,t=n)):($t=t,t=n),t}function Sr(){var t,r,i;return t=$t,e.substr($t,2)===ie?(r=ie,$t+=2):(r=n,0===Qt&&sr(ae)),r!==n?(i=Ar(),i!==n?(Kt=t,r=se(i),t=r):($t=t,t=n)):($t=t,t=n),t}function Nr(){var t,r,i;return t=$t,115===e.charCodeAt($t)?(r=ue,$t++):(r=n,0===Qt&&sr(ce)),r!==n?(97===e.charCodeAt($t)?(i=fe,$t++):(i=n,0===Qt&&sr(he)),i===n&&(100===e.charCodeAt($t)?(i=m,$t++):(i=n,0===Qt&&sr(g))),i===n&&(i=null),i!==n?(Kt=t,r=le(i),t=r):($t=t,t=n)):($t=t,t=n),t}function Er(){var t,r,i;return t=$t,102===e.charCodeAt($t)?(r=de,$t++):(r=n,0===Qt&&sr(pe)),r!==n?(i=Ar(),i!==n?(Kt=t,r=me(i),t=r):($t=t,t=n)):($t=t,t=n),t}function Ar(){var e,t,r;return e=$t,t=Dr(),t!==n?(r=Rr(),r!==n?(Kt=e,t=ge(t,r),e=t):($t=e,e=n)):($t=e,e=n),e}function Dr(){var t;return e.substr($t,2)===ve?(t=ve,$t+=2):(t=n,0===Qt&&sr(be)),t===n&&(e.substr($t,2)===we?(t=we,$t+=2):(t=n,0===Qt&&sr(Me)),t===n&&(e.substr($t,2)===xe?(t=xe,$t+=2):(t=n,0===Qt&&sr(_e)),t===n&&(61===e.charCodeAt($t)?(t=Ae,$t++):(t=n,0===Qt&&sr(Oe)),t===n&&(62===e.charCodeAt($t)?(t=Ce,$t++):(t=n,0===Qt&&sr(Te)),t===n&&(60===e.charCodeAt($t)?(t=Re,$t++):(t=n,0===Qt&&sr(Be))))))),t}function kr(){var t,r,i,a,o,s,u,c,f,h,l;if(t=Br(),t===n)if(t=$t,40===e.charCodeAt($t)?(r=Ie,$t++):(r=n,0===Qt&&sr(qe)),r!==n)if(i=Pr(),i!==n){if(a=$t,o=Rr(),o!==n){if(s=[],u=$t,c=Pr(),c!==n?(f=qr(),f!==n?(h=Pr(),h!==n?(l=Rr(),l!==n?(c=[c,f,h,l],u=c):($t=u,u=n)):($t=u,u=n)):($t=u,u=n)):($t=u,u=n),u!==n)while(u!==n)s.push(u),u=$t,c=Pr(),c!==n?(f=qr(),f!==n?(h=Pr(),h!==n?(l=Rr(),l!==n?(c=[c,f,h,l],u=c):($t=u,u=n)):($t=u,u=n)):($t=u,u=n)):($t=u,u=n);else s=n;s!==n?(o=[o,s],a=o):($t=a,a=n)}else $t=a,a=n;a!==n?(o=Pr(),o!==n?(41===e.charCodeAt($t)?(s=Pe,$t++):(s=n,0===Qt&&sr(Le)),s!==n?(Kt=t,r=Fe(),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)}else $t=t,t=n;else $t=t,t=n;return t}function Or(){var e,t,r,i,a,o,s,u;if(e=$t,t=Cr(),t!==n){r=[],i=$t,a=Pr(),a!==n?(o=qr(),o!==n?(s=Pr(),s!==n?(u=Cr(),u!==n?(a=[a,o,s,u],i=a):($t=i,i=n)):($t=i,i=n)):($t=i,i=n)):($t=i,i=n);while(i!==n)r.push(i),i=$t,a=Pr(),a!==n?(o=qr(),o!==n?(s=Pr(),s!==n?(u=Cr(),u!==n?(a=[a,o,s,u],i=a):($t=i,i=n)):($t=i,i=n)):($t=i,i=n)):($t=i,i=n);r!==n?(Kt=e,t=Ze(t,r),e=t):($t=e,e=n)}else $t=e,e=n;return e}function Cr(){var t,r,i,a,o,s;return t=Tr(),t===n&&(t=hr(),t===n&&(t=Rr(),t===n&&(t=$t,40===e.charCodeAt($t)?(r=Ie,$t++):(r=n,0===Qt&&sr(qe)),r!==n?(i=Pr(),i!==n?(a=Or(),a!==n?(o=Pr(),o!==n?(41===e.charCodeAt($t)?(s=Pe,$t++):(s=n,0===Qt&&sr(Le)),s!==n?(Kt=t,r=Ve(r,a,s),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n),t===n&&(t=fr())))),t}function Tr(){var t,r,i,a,o,s,u,h,l,d,p;return t=$t,e.substr($t,3)===$e?(r=$e,$t+=3):(r=n,0===Qt&&sr(Ke)),r===n&&(e.substr($t,4)===Je?(r=Je,$t+=4):(r=n,0===Qt&&sr(Ye)),r===n&&(e.substr($t,3)===Xe?(r=Xe,$t+=3):(r=n,0===Qt&&sr(Qe)),r===n&&(e.substr($t,3)===tt?(r=tt,$t+=3):(r=n,0===Qt&&sr(nt)),r===n&&(e.substr($t,5)===it?(r=it,$t+=5):(r=n,0===Qt&&sr(at)),r===n&&(e.substr($t,3)===ot?(r=ot,$t+=3):(r=n,0===Qt&&sr(st)),r===n&&(e.substr($t,5)===ut?(r=ut,$t+=5):(r=n,0===Qt&&sr(ct)),r===n&&(e.substr($t,4)===ft?(r=ft,$t+=4):(r=n,0===Qt&&sr(ht)),r===n&&(e.substr($t,3)===lt?(r=lt,$t+=3):(r=n,0===Qt&&sr(dt)),r===n&&(e.substr($t,4)===pt?(r=pt,$t+=4):(r=n,0===Qt&&sr(mt)),r===n&&(e.substr($t,3)===gt?(r=gt,$t+=3):(r=n,0===Qt&&sr(vt)))))))))))),r!==n?(40===e.charCodeAt($t)?(i=Ie,$t++):(i=n,0===Qt&&sr(qe)),i!==n?(a=Pr(),a!==n?(o=Or(),o!==n?(s=Pr(),s!==n?(41===e.charCodeAt($t)?(u=Pe,$t++):(u=n,0===Qt&&sr(Le)),u!==n?(Kt=t,r=yt(r,o),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n),t===n&&(t=$t,e.substr($t,3)===bt?(r=bt,$t+=3):(r=n,0===Qt&&sr(wt)),r===n&&(e.substr($t,3)===H?(r=H,$t+=3):(r=n,0===Qt&&sr(Z)),r===n&&(e.substr($t,3)===V?(r=V,$t+=3):(r=n,0===Qt&&sr(G)))),r!==n?(40===e.charCodeAt($t)?(i=Ie,$t++):(i=n,0===Qt&&sr(qe)),i!==n?(a=Pr(),a!==n?(o=Or(),o!==n?(s=Pr(),s!==n?(44===e.charCodeAt($t)?(u=c,$t++):(u=n,0===Qt&&sr(f)),u!==n?(h=Pr(),h!==n?(l=Or(),l!==n?(d=Pr(),d!==n?(41===e.charCodeAt($t)?(p=Pe,$t++):(p=n,0===Qt&&sr(Le)),p!==n?(Kt=t,r=Mt(r,o,l),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)):($t=t,t=n)),t}function Rr(){var t,r,i,a,o,s;return t=$t,45===e.charCodeAt($t)?(r=xt,$t++):(r=n,0===Qt&&sr(_t)),r===n&&(r=null),r!==n?(i=Ir(),i!==n?(a=$t,St.test(e.charAt($t))?(o=e.charAt($t),$t++):(o=n,0===Qt&&sr(Nt)),o!==n?(s=Ir(),s!==n?(o=[o,s],a=o):($t=a,a=n)):($t=a,a=n),a===n&&(a=null),a!==n?(Kt=t,r=Et(),t=r):($t=t,t=n)):($t=t,t=n)):($t=t,t=n),t}function Br(){var t,r,i,a;if(t=$t,At.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=n,0===Qt&&sr(Dt)),r!==n){i=[],kt.test(e.charAt($t))?(a=e.charAt($t),$t++):(a=n,0===Qt&&sr(Ot));while(a!==n)i.push(a),kt.test(e.charAt($t))?(a=e.charAt($t),$t++):(a=n,0===Qt&&sr(Ot));i!==n?(Kt=t,r=Ct(),t=r):($t=t,t=n)}else $t=t,t=n;return t}function Ir(){var t,r,i;if(t=$t,r=[],kt.test(e.charAt($t))?(i=e.charAt($t),$t++):(i=n,0===Qt&&sr(Ot)),i!==n)while(i!==n)r.push(i),kt.test(e.charAt($t))?(i=e.charAt($t),$t++):(i=n,0===Qt&&sr(Ot));else r=n;return r!==n&&(Kt=t,r=Ct()),t=r,t}function qr(){var t,r;return t=$t,e.substr($t,2)===Tt?(r=Tt,$t+=2):(r=n,0===Qt&&sr(Rt)),r!==n&&(Kt=t,r=Bt()),t=r,t===n&&(42===e.charCodeAt($t)?(t=It,$t++):(t=n,0===Qt&&sr(qt)),t===n&&(94===e.charCodeAt($t)?(t=Pt,$t++):(t=n,0===Qt&&sr(jt)),t===n&&(37===e.charCodeAt($t)?(t=zt,$t++):(t=n,0===Qt&&sr(Lt)),t===n&&(47===e.charCodeAt($t)?(t=Ut,$t++):(t=n,0===Qt&&sr(Ft)),t===n&&(43===e.charCodeAt($t)?(t=Ht,$t++):(t=n,0===Qt&&sr(Zt)),t===n&&(45===e.charCodeAt($t)?(t=xt,$t++):(t=n,0===Qt&&sr(_t)))))))),t}function Pr(){var t,r;Qt++,t=[],Vt.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=n,0===Qt&&sr(Gt));while(r!==n)t.push(r),Vt.test(e.charAt($t))?(r=e.charAt($t),$t++):(r=n,0===Qt&&sr(Gt));return Qt--,t===n&&(r=n,0===Qt&&sr(Wt)),t}if(r=a(),r!==n&&$t===e.length)return r;throw r!==n&&$t<e.length&&sr(nr()),ur(Xt,Yt<e.length?e.charAt(Yt):null,Yt<e.length?or(Yt,Yt+1):or(Yt,Yt))}tt(rt,Error),rt.buildMessage=function(e,t){var r={literal:function(e){return'"'+i(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?a(e[0])+"-"+a(e[1]):a(e)}));return"["+(e.inverted?"^":"")+t+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function i(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function a(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function o(e){return r[e.type](e)}function s(e){var t,r,n=e.map(o);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}function u(e){return e?'"'+i(e)+'"':"end of input"}return"Expected "+s(e)+" but "+u(t)+" found."};var it=function(){function e(){i(this,e)}return o(e,null,[{key:"parse",value:function(e){if(!e)throw new q("notation");if("string"!==typeof e)throw new TypeError("Notation must be a string");return nt(e)}}]),e}(),at=Object.freeze({BASE_64:1,JSON:0,OBJECT:2}),ot=Symbol("notation"),st=Symbol("maxTotal"),ut=Symbol("minTotal"),ct=Symbol("expressions"),ft=Symbol("roll-method"),ht=Symbol("rolls"),lt=Symbol("set-rolls"),dt=Symbol("total"),pt=function(e){return H(e.calculationValue,2)},mt=function(){function e(t){if(i(this,e),!t)throw new q("notation");if(this[ct]=[],t instanceof Object&&!Array.isArray(t)){if(!t.notation)throw new q("notation");if("string"!==typeof t.notation)throw new I(t.notation);t.rolls&&this[lt](t.rolls),this[ot]=t.notation,this[ct]=it.parse(this.notation),this.hasRolls()||this.roll()}else{if("string"!==typeof t)throw new I(t);this[ot]=t,this[ct]=it.parse(this.notation),this.roll()}}return o(e,[{key:"averageTotal",get:function(){return(this.maxTotal+this.minTotal)/2}},{key:"maxTotal",get:function(){if(!this.hasExpressions())return 0;if(!this[st]){var e=this[ft]($.max);this[st]=pt(e)}return this[st]}},{key:"minTotal",get:function(){if(!this.hasExpressions())return 0;if(!this[ut]){var e=this[ft]($.min);this[ut]=pt(e)}return this[ut]}},{key:"notation",get:function(){return this[ot]}},{key:"output",get:function(){var e="".concat(this.notation,": ");return this.hasRolls()?e+="".concat(this[ht]," = ").concat(this.total):e+="No dice rolled",e}},{key:"rolls",get:function(){return this[ht]?this[ht].results:[]}},{key:"total",get:function(){return!this[dt]&&this.hasRolls()&&(this[dt]=pt(this[ht])),this[dt]||0}},{key:"export",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:at.JSON;switch(e){case at.BASE_64:return btoa(this.export(at.JSON));case at.JSON:return JSON.stringify(this);case at.OBJECT:return JSON.parse(this.export(at.JSON));default:throw new TypeError('Invalid export format "'.concat(e,'"'))}}},{key:"hasExpressions",value:function(){return this[ct]&&this[ct].length>0}},{key:"hasRolls",value:function(){return this.hasExpressions()&&this.rolls.length>0}},{key:"roll",value:function(){return this[dt]=0,this[ht]=this[ft](),this.rolls}},{key:"toJSON",value:function(){var e=this.averageTotal,t=this.maxTotal,r=this.minTotal,n=this.notation,i=this.output,a=this.rolls,o=this.total;return{averageTotal:e,maxTotal:t,minTotal:r,notation:n,output:i,rolls:a,total:o,type:"dice-roll"}}},{key:"toString",value:function(){return this.output}},{key:ft,value:function(e){var t;e&&(t=J.engine,J.engine=e);var r=new Ie(this[ct].map((function(e){return e instanceof Se||e instanceof et?e.roll():e})).filter((function(e){return!!e||0===e})));return e&&(J.engine=t),r}},{key:lt,value:function(e){if(e instanceof Ie)this[ht]=e;else if(e instanceof ge)this[ht]=new Ie([e]);else{if(!Array.isArray(e))throw new TypeError("Rolls must be a valid result object, or an array");this[ht]=new Ie(e.map((function(e){if(e instanceof Ie||e instanceof ge)return e;if(Array.isArray(e))return new ge(e);if("object"===n(e)){if(Array.isArray(e.results))return new Ie(e.results,e.modifiers||[],e.isRollGroup||!1,"boolean"!==typeof e.useInTotal||e.useInTotal);if(Array.isArray(e.rolls))return new ge(e.rolls)}return e})))}}}],[{key:"import",value:function(t){if(t){if(Ye(t))return e.import(JSON.parse(t));if(Je(t))return e.import(atob(t));if("object"===n(t))return new e(t);throw new R(t)}throw new q("data")}}]),e}(),gt=Symbol("log"),vt=function(){function e(t){i(this,e),this[gt]=[],t&&this.import(t)}return o(e,[{key:"log",get:function(){return this[gt]||[]}},{key:"output",get:function(){return this.log.join("; ")}},{key:"total",get:function(){return this.log.reduce((function(e,t){return e+t.total}),0)}},{key:"clearLog",value:function(){this[gt].length=0}},{key:"export",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:at.JSON;switch(e){case at.BASE_64:return btoa(this.export(at.JSON));case at.JSON:return JSON.stringify(this);case at.OBJECT:return JSON.parse(this.export(at.JSON));default:throw new TypeError('Invalid export format "'.concat(e,'"'))}}},{key:"import",value:function(e){var t=this;if(e){if(Ye(e))return this.import(JSON.parse(e));if(Je(e))return this.import(atob(e));if("object"===n(e)){var r=e.log||null;if(!e.log&&Array.isArray(e)&&e.length&&(r=e),r&&Array.isArray(r))r.forEach((function(e){t[gt].push(mt.import(e))}));else if(r)throw new TypeError("log must be an array");return this.log}throw new R(e)}throw new q("data")}},{key:"roll",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(0===i.length)throw new q("notations");var a=i.map((function(t){var r=new mt(t);return e[gt].push(r),r}));return a.length>1?a:a[0]}},{key:"toJSON",value:function(){var e=this.log,t=this.output,r=this.total;return{log:e,output:t,total:r,type:"dice-roller"}}},{key:"toString",value:function(){return this.output}}],[{key:"import",value:function(t){var r=new e;return r.import(t),r}}]),e}();e.ComparePoint=ee,e.Dice=Ae,e.DiceRoll=mt,e.DiceRoller=vt,e.Exceptions=P,e.Modifiers=$e,e.NumberGenerator=Y,e.Parser=it,e.Results=Ke,e.RollGroup=et,e.exportFormats=at,Object.defineProperty(e,"__esModule",{value:!0})}))},"561d":function(e,t,r){(function(t){var n=r("48e6"),i=r("7a10"),a=new i,o=new n(24),s=new n(11),u=new n(10),c=new n(3),f=new n(7),h=r("58a2"),l=r("11dc");function d(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._pub=new n(e),this}function p(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this._priv=new n(e),this}e.exports=v;var m={};function g(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in m)return m[n];var i,l=0;if(e.isEven()||!h.simpleSieve||!h.fermatTest(e)||!a.test(e))return l+=1,l+="02"===r||"05"===r?8:4,m[n]=l,l;switch(a.test(e.shrn(1))||(l+=2),r){case"02":e.mod(o).cmp(s)&&(l+=8);break;case"05":i=e.mod(u),i.cmp(c)&&i.cmp(f)&&(l+=8);break;default:l+=4}return m[n]=l,l}function v(e,t,r){this.setGenerator(t),this.__prime=new n(e),this._prime=n.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function y(e,r){var n=new t(e.toArray());return r?n.toString(r):n}Object.defineProperty(v.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!==typeof this._primeCode&&(this._primeCode=g(this.__prime,this.__gen)),this._primeCode}}),v.prototype.generateKeys=function(){return this._priv||(this._priv=new n(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},v.prototype.computeSecret=function(e){e=new n(e),e=e.toRed(this._prime);var r=e.redPow(this._priv).fromRed(),i=new t(r.toArray()),a=this.getPrime();if(i.length<a.length){var o=new t(a.length-i.length);o.fill(0),i=t.concat([o,i])}return i},v.prototype.getPublicKey=function(e){return y(this._pub,e)},v.prototype.getPrivateKey=function(e){return y(this._priv,e)},v.prototype.getPrime=function(e){return y(this.__prime,e)},v.prototype.getGenerator=function(e){return y(this._gen,e)},v.prototype.setGenerator=function(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this.__gen=e,this._gen=new n(e),this}}).call(this,r("b639").Buffer)},5692:function(e,t,r){var n=r("c430"),i=r("c6cd");(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:n?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56b5":function(e,t,r){"use strict";var n=r("7f7a"),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),a=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),o=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(a)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),h=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),l=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(f),this.key("validity").use(h),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())}));e.exports=p},"56ef":function(e,t,r){var n=r("d066"),i=r("241c"),a=r("7418"),o=r("825a");e.exports=n("Reflect","ownKeys")||function(e){var t=i.f(o(e)),r=a.f;return r?t.concat(r(e)):t}},"57e2":function(e,t,r){"use strict";(function(t){var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=r("42a7"),o=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),l=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var r=e[l].read();null!==r&&(e[f]=null,e[o]=null,e[s]=null,t(d(r,!1)))}}function m(e){t.nextTick(p,e)}function g(e,t){return function(r,n){e.then((function(){t[c]?r(d(void 0,!0)):t[h](r,n)}),n)}}var v=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((n={get stream(){return this[l]},next:function(){var e=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[l].destroyed)return new Promise((function(r,n){t.nextTick((function(){e[u]?n(e[u]):r(d(void 0,!0))}))}));var n,i=this[f];if(i)n=new Promise(g(i,this));else{var a=this[l].read();if(null!==a)return Promise.resolve(d(a,!1));n=new Promise(this[h])}return this[f]=n,n}},i(n,Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var e=this;return new Promise((function(t,r){e[l].destroy(null,(function(e){e?r(e):t(d(void 0,!0))}))}))})),n),v),b=function(e){var t,r=Object.create(y,(t={},i(t,l,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var n=r[l].read();n?(r[f]=null,r[o]=null,r[s]=null,e(d(n,!1))):(r[o]=e,r[s]=t)},writable:!0}),t));return r[f]=null,a(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[f]=null,r[o]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[o];null!==n&&(r[f]=null,r[o]=null,r[s]=null,n(d(void 0,!0))),r[c]=!0})),e.on("readable",m.bind(null,r)),r};e.exports=b}).call(this,r("4362"))},"58a2":function(e,t,r){var n=r("11dc");e.exports=b,b.simpleSieve=v,b.fermatTest=y;var i=r("48e6"),a=new i(24),o=r("7a10"),s=new o,u=new i(1),c=new i(2),f=new i(5),h=(new i(16),new i(8),new i(10)),l=new i(3),d=(new i(7),new i(11)),p=new i(4),m=(new i(12),null);function g(){if(null!==m)return m;var e=1048576,t=[];t[0]=2;for(var r=1,n=3;n<e;n+=2){for(var i=Math.ceil(Math.sqrt(n)),a=0;a<r&&t[a]<=i;a++)if(n%t[a]===0)break;r!==a&&t[a]<=i||(t[r++]=n)}return m=t,t}function v(e){for(var t=g(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function y(e){var t=i.mont(e);return 0===c.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function b(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,o;t=new i(t);while(1){r=new i(n(Math.ceil(e/8)));while(r.bitLength()>e)r.ishrn(1);if(r.isEven()&&r.iadd(u),r.testn(1)||r.iadd(c),t.cmp(c)){if(!t.cmp(f))while(r.mod(h).cmp(l))r.iadd(p)}else while(r.mod(a).cmp(d))r.iadd(p);if(o=r.shrn(1),v(o)&&v(r)&&y(o)&&y(r)&&s.test(o)&&s.test(r))return r}}},5919:function(e,t,r){"use strict";t.sha1=r("13e2"),t.sha224=r("07f2"),t.sha256=r("6eed"),t.sha384=r("8b95"),t.sha512=r("b525")},"5a76":function(e,t,r){var n=r("f576");e.exports=function(e){return(new n).update(e).digest()}},"5bbb":function(e,t,r){e.exports=r("faa1").EventEmitter},"5c6c":function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"5e1a":function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var i=r("a8f0").Buffer,a=r(4);function o(e,t,r){e.copy(t,r)}e.exports=function(){function e(){n(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";var t=this.head,r=""+t.data;while(t=t.next)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;var t=i.allocUnsafe(e>>>0),r=this.head,n=0;while(r)o(r.data,t,n),n+=r.data.length,r=r.next;return t},e}(),a&&a.inspect&&a.inspect.custom&&(e.exports.prototype[a.inspect.custom]=function(){var e=a.inspect({length:this.length});return this.constructor.name+" "+e})},"5e7d":function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=r("cf35"),a=r("49ce");r("3fb5")(c,i);for(var o=n(a.prototype),s=0;s<o.length;s++){var u=o[s];c.prototype[u]||(c.prototype[u]=a.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||t.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,r("4362"))},"5ee7":function(e,t,r){"use strict";t.readUInt32BE=function(e,t){var r=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return r>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+o&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>>s+o&1}for(o=6;o>=0;o-=2){for(s=1;s<=25;s+=8)a<<=1,a|=t>>>s+o&1;for(s=1;s<=25;s+=8)a<<=1,a|=e>>>s+o&1}r[n+0]=i>>>0,r[n+1]=a>>>0},t.rip=function(e,t,r,n){for(var i=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+o&1,i<<=1,i|=e>>>s+o&1;for(o=4;o<8;o++)for(s=24;s>=0;s-=8)a<<=1,a|=t>>>s+o&1,a<<=1,a|=e>>>s+o&1;r[n+0]=i>>>0,r[n+1]=a>>>0},t.pc1=function(e,t,r,n){for(var i=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1}for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(o=1;o<=3;o++){for(s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1}for(s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1;r[n+0]=i>>>0,r[n+1]=a>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var n=[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];t.pc2=function(e,t,r,i){for(var a=0,o=0,s=n.length>>>1,u=0;u<s;u++)a<<=1,a|=e>>>n[u]&1;for(u=s;u<n.length;u++)o<<=1,o|=t>>>n[u]&1;r[i+0]=a>>>0,r[i+1]=o>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=e>>>a&63;for(a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+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];t.substitute=function(e,t){for(var r=0,n=0;n<4;n++){var a=e>>>18-6*n&63,o=i[64*n+a];r<<=4,r|=o}for(n=0;n<4;n++){a=t>>>18-6*n&63,o=i[256+64*n+a];r<<=4,r|=o}return r>>>0};var a=[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];t.permute=function(e){for(var t=0,r=0;r<a.length;r++)t<<=1,t|=e>>>a[r]&1;return t>>>0},t.padSplit=function(e,t,r){var n=e.toString(2);while(n.length<t)n="0"+n;for(var i=[],a=0;a<t;a+=r)i.push(n.slice(a,a+r));return i.join(" ")}},6:function(e,t){},"60da":function(e,t,r){"use strict";var n=r("83ab"),i=r("d039"),a=r("df75"),o=r("7418"),s=r("d1e7"),u=r("7b0b"),c=r("44ad"),f=Object.assign,h=Object.defineProperty;e.exports=!f||i((function(){if(n&&1!==f({b:1},f(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),i="abcdefghijklmnopqrst";return e[r]=7,i.split("").forEach((function(e){t[e]=e})),7!=f({},e)[r]||a(f({},t)).join("")!=i}))?function(e,t){var r=u(e),i=arguments.length,f=1,h=o.f,l=s.f;while(i>f){var d,p=c(arguments[f++]),m=h?a(p).concat(h(p)):a(p),g=m.length,v=0;while(g>v)d=m[v++],n&&!l.call(p,d)||(r[d]=p[d])}return r}:f},6125:function(e,t,r){var n=r("1212"),i=r("b838"),a=r("a49e"),o=r("cae0"),s=r("7aec"),u=r("89ed"),c=r("a49d");c.alea=n,c.xor128=i,c.xorwow=a,c.xorshift7=o,c.xor4096=s,c.tychei=u,e.exports=c},6283:function(e,t,r){var n=r("3fb5"),i=r("41df").Reporter,a=r("b639").Buffer;function o(e,t){i.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"===typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"===typeof e)this.value=e,this.length=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(o,i),t.DecoderBuffer=o,o.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},o.prototype.restore=function(e){var t=new o(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},o.prototype.isEmpty=function(){return this.offset===this.length},o.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},o.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new o(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},o.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=s,s.prototype.join=function(e,t){return e||(e=new a(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"===typeof this.value?e[t]=this.value:"string"===typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},"62c8":function(e,t,r){var n=r("b639"),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),a(i,o),o.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},"62c9":function(e,t,r){var n=r("8707").Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev),a=i[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:a])]),a}t.encrypt=function(e,t,r){var a=t.length,o=n.allocUnsafe(a),s=-1;while(++s<a)o[s]=i(e,t[s],r);return o}},"62e4":function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},6430:function(e,t,r){var n=r("8707").Buffer,i=r("d485").Transform,a=r("7d72").StringDecoder,o=r("3fb5");function s(e){i.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}o(s,i),s.prototype.update=function(e,t,r){"string"===typeof e&&(e=n.from(e,t));var i=this._update(e);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){n=i}finally{r(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new a(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=s},6442:function(e,t,r){t.publicEncrypt=r("ad25"),t.privateDecrypt=r("0f2c"),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},"676f":function(e,t,r){"use strict";var n=r("80af"),i=r("3fb5"),a=r("ea53"),o=r("f3a3");function s(e){a.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){a.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,a),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),i=n.redSqrt();return 0===i.redSqr().cmp(n)},i(u,a.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(o.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=t.redSub(n),a=t.redMul(n),o=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(a,o)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z),o=a.redMul(r),s=i.redMul(n),u=t.z.redMul(o.redAdd(s).redSqr()),c=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(u,c)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=this,a=[];0!==t.cmpn(0);t.iushrn(1))a.push(t.andln(1));for(var o=a.length-1;o>=0;o--)0===a[o]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},"69f2":function(e,t,r){t=e.exports=function(e){e=e.toLowerCase();var r=t[e];if(!r)throw new Error(e+" is not supported (we accept pull requests)");return new r};t.sha=r("087f"),t.sha1=r("7e78"),t.sha224=r("72aa"),t.sha256=r("a255"),t.sha384=r("b837"),t.sha512=r("4fd1")},"69f3":function(e,t,r){var n,i,a,o=r("7f9a"),s=r("da84"),u=r("861d"),c=r("9112"),f=r("5135"),h=r("f772"),l=r("d012"),d=s.WeakMap,p=function(e){return a(e)?i(e):n(e,{})},m=function(e){return function(t){var r;if(!u(t)||(r=i(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}};if(o){var g=new d,v=g.get,y=g.has,b=g.set;n=function(e,t){return b.call(g,e,t),t},i=function(e){return v.call(g,e)||{}},a=function(e){return y.call(g,e)}}else{var w=h("state");l[w]=!0,n=function(e,t){return c(e,w,t),t},i=function(e){return f(e,w)?e[w]:{}},a=function(e){return f(e,w)}}e.exports={set:n,get:i,has:a,enforce:p,getterFor:m}},"6aa2":function(e,t,r){"use strict";var n=r("7d92"),i=r("7658"),a=r("da3e");function o(e){if(!(this instanceof o))return new o(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");a(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=o,o.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},o.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},o.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},o.prototype.reseed=function(e,t,r,n){"string"!==typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),a(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},o.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));var a=[];while(a.length<e)this.V=this._hmac().update(this.V).digest(),a=a.concat(this.V);var o=a.slice(0,e);return this._update(r),this._reseed++,i.encode(o,t)}},"6ade":function(e,t,r){var n=r("8c8a"),i=r("8707").Buffer,a=r("bd9d");function o(e){var t=e._cipher.encryptBlockRaw(e._prev);return a(e._prev),t}var s=16;t.encrypt=function(e,t){var r=Math.ceil(t.length/s),a=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(r*s)]);for(var u=0;u<r;u++){var c=o(e),f=a+u*s;e._cache.writeUInt32BE(c[0],f+0),e._cache.writeUInt32BE(c[1],f+4),e._cache.writeUInt32BE(c[2],f+8),e._cache.writeUInt32BE(c[3],f+12)}var h=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,h)}},"6eeb":function(e,t,r){var n=r("da84"),i=r("9112"),a=r("5135"),o=r("ce4e"),s=r("8925"),u=r("69f3"),c=u.get,f=u.enforce,h=String(String).split("String");(e.exports=function(e,t,r,s){var u=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,l=!!s&&!!s.noTargetGet;"function"==typeof r&&("string"!=typeof t||a(r,"name")||i(r,"name",t),f(r).source=h.join("string"==typeof t?t:"")),e!==n?(u?!l&&e[t]&&(c=!0):delete e[t],c?e[t]=r:i(e,t,r)):c?e[t]=r:o(t,r)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},"6eed":function(e,t,r){"use strict";var n=r("c3c0"),i=r("edc9"),a=r("aa56"),o=r("da3e"),s=n.sum32,u=n.sum32_4,c=n.sum32_5,f=a.ch32,h=a.maj32,l=a.s0_256,d=a.s1_256,p=a.g0_256,m=a.g1_256,g=i.BlockHash,v=[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 y(){if(!(this instanceof y))return new y;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(y,g),e.exports=y,y.blockSize=512,y.outSize=256,y.hmacStrength=192,y.padLength=64,y.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],a=this.h[1],g=this.h[2],v=this.h[3],y=this.h[4],b=this.h[5],w=this.h[6],M=this.h[7];for(o(this.k.length===r.length),n=0;n<r.length;n++){var x=c(M,d(y),f(y,b,w),this.k[n],r[n]),_=s(l(i),h(i,a,g));M=w,w=b,b=y,y=s(v,x),v=g,g=a,a=i,i=s(x,_)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],v),this.h[4]=s(this.h[4],y),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],M)},y.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},"6fe7":function(e,t,r){var n=r("8707").Buffer,i=r("1a2a"),a=r("a958"),o=r("3337").ec,s=r("399f"),u=r("2aee"),c=r("cd91");function f(e,t,r,i,o){var s=u(t);if(s.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return h(e,s)}if("dsa"===s.type){if("dsa"!==i)throw new Error("wrong private key type");return l(e,s,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=n.concat([o,e]);var c=s.modulus.byteLength(),f=[0,1];while(e.length+f.length+1<c)f.push(255);f.push(0);var d=-1;while(++d<e.length)f.push(e[d]);var p=a(f,s);return p}function h(e,t){var r=c[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new o(r),a=i.keyFromPrivate(t.privateKey),s=a.sign(e);return n.from(s.toDER())}function l(e,t,r){var n,i=t.params.priv_key,a=t.params.p,o=t.params.q,u=t.params.g,c=new s(0),f=m(e,o).mod(o),h=!1,l=p(i,o,e,r);while(!1===h)n=v(o,l,r),c=y(u,n,a,o),h=n.invm(o).imul(f.add(i.mul(c))).mod(o),0===h.cmpn(0)&&(h=!1,c=new s(0));return d(c,h)}function d(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=e.length+t.length+4,i=[48,r,2,e.length];return i=i.concat(e,[2,t.length],t),n.from(i)}function p(e,t,r,a){if(e=n.from(e.toArray()),e.length<t.byteLength()){var o=n.alloc(t.byteLength()-e.length);e=n.concat([o,e])}var s=r.length,u=g(r,t),c=n.alloc(s);c.fill(1);var f=n.alloc(s);return f=i(a,f).update(c).update(n.from([0])).update(e).update(u).digest(),c=i(a,f).update(c).digest(),f=i(a,f).update(c).update(n.from([1])).update(e).update(u).digest(),c=i(a,f).update(c).digest(),{k:f,v:c}}function m(e,t){var r=new s(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function g(e,t){e=m(e,t),e=e.mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}function v(e,t,r){var a,o;do{a=n.alloc(0);while(8*a.length<e.bitLength())t.v=i(r,t.k).update(t.v).digest(),a=n.concat([a,t.v]);o=m(a,e),t.k=i(r,t.k).update(t.v).update(n.from([0])).digest(),t.v=i(r,t.k).update(t.v).digest()}while(-1!==o.cmp(e));return o}function y(e,t,r,n){return e.toRed(s.mont(r)).redPow(t).fromRed().mod(n)}e.exports=f,e.exports.getKey=p,e.exports.makeKey=v},7:function(e,t){},"72aa":function(e,t,r){var n=r("3fb5"),i=r("a255"),a=r("b672"),o=r("8707").Buffer,s=new Array(64);function u(){this.init(),this._w=s,a.call(this,64,56)}n(u,i),u.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},u.prototype._hash=function(){var e=o.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},"72f8":function(e,t,r){"use strict";r.d(t,"a",(function(){return n})),r.d(t,"b",(function(){return i}));var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("section",{staticClass:"dice-roller"},[r("transition",{attrs:{name:"fade"}},[e.output?r("output",{staticClass:"output",attrs:{name:"output",for:"notation-"+this.uuid}},[e._v(" "+e._s(e.output)+" ")]):e._e()]),r("input",{directives:[{name:"model",rawName:"v-model",value:e.notationString,expression:"notationString"}],class:e.error?"is-invalid":"",attrs:{type:"text",name:"notation",id:"notation-"+this.uuid,placeholder:"e.g. "+(this.notation||"4d6")},domProps:{value:e.notationString},on:{change:function(t){return e.$emit("notation:change",t.target.value)},keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.roll(t)},input:function(t){t.target.composing||(e.notationString=t.target.value)}}}),r("transition",{attrs:{name:"fade"}},[e.error?r("span",{staticClass:"invalid-feedback"},[e._v(e._s(e.error))]):e._e()]),r("footer",[r("label",{attrs:{for:"notation-"+this.uuid}},[e._v(' Enter the notation and press "enter" to roll the dice! ')])])],1)},i=[]},7418:function(e,t){t.f=Object.getOwnPropertySymbols},"75cc":function(e,t,r){"use strict";(function(e,n){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var a=r("8707"),o=r("11dc"),s=a.Buffer,u=a.kMaxLength,c=e.crypto||e.msCrypto,f=Math.pow(2,32)-1;function h(e,t){if("number"!==typeof e||e!==e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function l(e,t,r){if("number"!==typeof e||e!==e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function d(t,r,n,i){if(!s.isBuffer(t)&&!(t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"===typeof r)i=r,r=0,n=t.length;else if("function"===typeof n)i=n,n=t.length-r;else if("function"!==typeof i)throw new TypeError('"cb" argument must be a function');return h(r,t.length),l(n,r,t.length),p(t,r,n,i)}function p(e,t,r,i){if(n.browser){var a=e.buffer,s=new Uint8Array(a,t,r);return c.getRandomValues(s),i?void n.nextTick((function(){i(null,e)})):e}if(!i){var u=o(r);return u.copy(e,t),e}o(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}function m(t,r,n){if("undefined"===typeof r&&(r=0),!s.isBuffer(t)&&!(t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(r,t.length),void 0===n&&(n=t.length-r),l(n,r,t.length),p(t,r,n)}c&&c.getRandomValues||!n.browser?(t.randomFill=d,t.randomFillSync=m):(t.randomFill=i,t.randomFillSync=i)}).call(this,r("c8ba"),r("4362"))},7634:function(e,t,r){"use strict";var n,i,a;(function(r,o){i=[],n=o,a="function"===typeof n?n.apply(t,i):n,void 0===a||(e.exports=a)})(0,(function(){function e(){return!0}function t(){return!1}function r(){}function n(){var i=[{name:"number",test:function(e){return"number"===typeof e}},{name:"string",test:function(e){return"string"===typeof e}},{name:"boolean",test:function(e){return"boolean"===typeof e}},{name:"Function",test:function(e){return"function"===typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"===typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],a={name:"any",test:e},o=[],s=[],u={types:i,conversions:s,ignore:o};function c(e){var t=$(u.types,(function(t){return t.name===e}));if(t)return t;if("any"===e)return a;var r=$(u.types,(function(t){return t.name.toLowerCase()===e.toLowerCase()}));throw new TypeError('Unknown type "'+e+'"'+(r?'. Did you mean "'+r.name+'"?':""))}function f(e){return e===a?999:u.types.indexOf(e)}function h(e){var t=$(u.types,(function(t){return t.test(e)}));if(t)return t.name;throw new TypeError("Value has unknown type. Value: "+e)}function l(e,t){if(!e.signatures)throw new TypeError("Function is no typed-function");var r;if("string"===typeof t){r=t.split(",");for(var n=0;n<r.length;n++)r[n]=r[n].trim()}else{if(!Array.isArray(t))throw new TypeError("String array or a comma separated string expected");r=t}var i=r.join(","),a=e.signatures[i];if(a)return a;throw new TypeError("Signature not found (signature: "+(e.name||"unnamed")+"("+r.join(", ")+"))")}function d(e,t){var r=h(e);if(t===r)return e;for(var n=0;n<u.conversions.length;n++){var i=u.conversions[n];if(i.from===r&&i.to===t)return i.convert(e)}throw new Error("Cannot convert from "+r+" to "+t)}function p(e){return e.map((function(e){var t=e.types.map(_);return(e.restParam?"...":"")+t.join("|")})).join(",")}function m(e,t){var r=0===e.indexOf("..."),n=r?e.length>3?e.slice(3):"any":e,i=n.split("|").map(z).filter(L).filter(j),a=C(t,i),o=i.map((function(e){var t=c(e);return{name:e,typeIndex:f(t),test:t.test,conversion:null,conversionIndex:-1}})),s=a.map((function(e){var r=c(e.from);return{name:e.from,typeIndex:f(r),test:r.test,conversion:e,conversionIndex:t.indexOf(e)}}));return{types:o.concat(s),restParam:r}}function g(e,t,r){var n=[];return""!==e.trim()&&(n=e.split(",").map(z).map((function(e,t,n){var i=m(e,r);if(i.restParam&&t!==n.length-1)throw new SyntaxError('Unexpected rest parameter "'+e+'": only allowed for the last parameter');return i}))),n.some(F)?null:{params:n,fn:t}}function v(e){var t=Z(e);return!!t&&t.restParam}function y(e){return e.types.some((function(e){return null!=e.conversion}))}function b(t){if(t&&0!==t.types.length){if(1===t.types.length)return c(t.types[0].name).test;if(2===t.types.length){var r=c(t.types[0].name).test,n=c(t.types[1].name).test;return function(e){return r(e)||n(e)}}var i=t.types.map((function(e){return c(e.name).test}));return function(e){for(var t=0;t<i.length;t++)if(i[t](e))return!0;return!1}}return e}function w(e){var t,r,n;if(v(e)){t=H(e).map(b);var i=t.length,a=b(Z(e)),o=function(e){for(var t=i;t<e.length;t++)if(!a(e[t]))return!1;return!0};return function(e){for(var r=0;r<t.length;r++)if(!t[r](e[r]))return!1;return o(e)&&e.length>=i+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(r=b(e[0]),function(e){return r(e[0])&&1===e.length}):2===e.length?(r=b(e[0]),n=b(e[1]),function(e){return r(e[0])&&n(e[1])&&2===e.length}):(t=e.map(b),function(e){for(var r=0;r<t.length;r++)if(!t[r](e[r]))return!1;return e.length===t.length})}function M(e,t){return t<e.params.length?e.params[t]:v(e.params)?Z(e.params):null}function x(e,t,r){var n=M(e,t),i=n?r?n.types.filter(S):n.types:[];return i.map(_)}function _(e){return e.name}function S(e){return null===e.conversion||void 0===e.conversion}function N(e,t){var r=K(J(e,(function(e){return x(e,t,!1)})));return-1!==r.indexOf("any")?["any"]:r}function E(e,t,r){var n,i,a,o=e||"unnamed",s=r;for(a=0;a<t.length;a++){var u=s.filter((function(e){var r=b(M(e,a));return(a<e.params.length||v(e.params))&&r(t[a])}));if(0===u.length){if(i=N(s,a),i.length>0){var c=h(t[a]);return n=new TypeError("Unexpected type of argument in function "+o+" (expected: "+i.join(" or ")+", actual: "+c+", index: "+a+")"),n.data={category:"wrongType",fn:o,index:a,actual:c,expected:i},n}}else s=u}var f=s.map((function(e){return v(e.params)?1/0:e.params.length}));if(t.length<Math.min.apply(null,f))return i=N(s,a),n=new TypeError("Too few arguments in function "+o+" (expected: "+i.join(" or ")+", index: "+t.length+")"),n.data={category:"tooFewArgs",fn:o,index:t.length,expected:i},n;var l=Math.max.apply(null,f);return t.length>l?(n=new TypeError("Too many arguments in function "+o+" (expected: "+l+", actual: "+t.length+")"),n.data={category:"tooManyArgs",fn:o,index:t.length,expectedLength:l},n):(n=new TypeError('Arguments of type "'+t.join(", ")+'" do not match any of the defined signatures of function '+o+"."),n.data={category:"mismatch",actual:t.map(h)},n)}function A(e){for(var t=999,r=0;r<e.types.length;r++)S(e.types[r])&&(t=Math.min(t,e.types[r].typeIndex));return t}function D(e){for(var t=999,r=0;r<e.types.length;r++)S(e.types[r])||(t=Math.min(t,e.types[r].conversionIndex));return t}function k(e,t){var r;return r=e.restParam-t.restParam,0!==r?r:(r=y(e)-y(t),0!==r?r:(r=A(e)-A(t),0!==r?r:D(e)-D(t)))}function O(e,t){var r,n,i=Math.min(e.params.length,t.params.length);if(n=e.params.some(y)-t.params.some(y),0!==n)return n;for(r=0;r<i;r++)if(n=y(e.params[r])-y(t.params[r]),0!==n)return n;for(r=0;r<i;r++)if(n=k(e.params[r],t.params[r]),0!==n)return n;return e.params.length-t.params.length}function C(e,t){var r={};return e.forEach((function(e){-1!==t.indexOf(e.from)||-1===t.indexOf(e.to)||r[e.from]||(r[e.from]=e)})),Object.keys(r).map((function(e){return r[e]}))}function T(e,t){var r=t;if(e.some(y)){var n=v(e),i=e.map(R);r=function(){for(var e=[],r=n?arguments.length-1:arguments.length,a=0;a<r;a++)e[a]=i[a](arguments[a]);return n&&(e[r]=arguments[r].map(i[r])),t.apply(this,e)}}var a=r;if(v(e)){var o=e.length-1;a=function(){return r.apply(this,W(arguments,0,o).concat([W(arguments,o)]))}}return a}function R(e){var t,r,n,i,a=[],o=[];switch(e.types.forEach((function(e){e.conversion&&(a.push(c(e.conversion.from).test),o.push(e.conversion.convert))})),o.length){case 0:return function(e){return e};case 1:return t=a[0],n=o[0],function(e){return t(e)?n(e):e};case 2:return t=a[0],r=a[1],n=o[0],i=o[1],function(e){return t(e)?n(e):r(e)?i(e):e};default:return function(e){for(var t=0;t<o.length;t++)if(a[t](e))return o[t](e);return e}}}function B(e){var t={};return e.forEach((function(e){e.params.some(y)||I(e.params,!0).forEach((function(r){t[p(r)]=e.fn}))})),t}function I(e,t){function r(e,n,i){if(n<e.length){var a,o=e[n],s=t?o.types.filter(S):o.types;if(o.restParam){var u=s.filter(S);a=u.length<s.length?[u,s]:[s]}else a=s.map((function(e){return[e]}));return J(a,(function(t){return r(e,n+1,i.concat([t]))}))}var c=i.map((function(t,r){return{types:t,restParam:r===e.length-1&&v(e)}}));return[c]}return r(e,0,[])}function q(e,t){for(var r=Math.max(e.params.length,t.params.length),n=0;n<r;n++){var i=x(e,n,!0),a=x(t,n,!0);if(!G(i,a))return!1}var o=e.params.length,s=t.params.length,u=v(e.params),c=v(t.params);return u?c?o===s:s>=o:c?o>=s:o===s}function P(e,n){if(0===Object.keys(n).length)throw new SyntaxError("No signatures provided");var i=[];Object.keys(n).map((function(e){return g(e,n[e],u.conversions)})).filter(U).forEach((function(e){var t=$(i,(function(t){return q(t,e)}));if(t)throw new TypeError('Conflicting signatures "'+p(t.params)+'" and "'+p(e.params)+'".');i.push(e)}));var a=J(i,(function(e){var t=e?I(e.params,!1):[];return t.map((function(t){return{params:t,fn:e.fn}}))})).filter(U);a.sort(O);var o=a[0]&&a[0].params.length<=2&&!v(a[0].params),s=a[1]&&a[1].params.length<=2&&!v(a[1].params),c=a[2]&&a[2].params.length<=2&&!v(a[2].params),f=a[3]&&a[3].params.length<=2&&!v(a[3].params),h=a[4]&&a[4].params.length<=2&&!v(a[4].params),l=a[5]&&a[5].params.length<=2&&!v(a[5].params),d=o&&s&&c&&f&&h&&l,m=a.map((function(e){return w(e.params)})),y=o?b(a[0].params[0]):t,M=s?b(a[1].params[0]):t,x=c?b(a[2].params[0]):t,_=f?b(a[3].params[0]):t,S=h?b(a[4].params[0]):t,N=l?b(a[5].params[0]):t,A=o?b(a[0].params[1]):t,D=s?b(a[1].params[1]):t,k=c?b(a[2].params[1]):t,C=f?b(a[3].params[1]):t,R=h?b(a[4].params[1]):t,P=l?b(a[5].params[1]):t,j=a.map((function(e){return T(e.params,e.fn)})),z=o?j[0]:r,L=s?j[1]:r,F=c?j[2]:r,H=f?j[3]:r,Z=h?j[4]:r,W=l?j[5]:r,V=o?a[0].params.length:-1,G=s?a[1].params.length:-1,K=c?a[2].params.length:-1,Y=f?a[3].params.length:-1,X=h?a[4].params.length:-1,Q=l?a[5].params.length:-1,ee=d?6:0,te=a.length,re=function(){for(var t=ee;t<te;t++)if(m[t](arguments))return j[t].apply(this,arguments);throw E(e,arguments,a)},ne=function e(t,r){return arguments.length===V&&y(t)&&A(r)?z.apply(e,arguments):arguments.length===G&&M(t)&&D(r)?L.apply(e,arguments):arguments.length===K&&x(t)&&k(r)?F.apply(e,arguments):arguments.length===Y&&_(t)&&C(r)?H.apply(e,arguments):arguments.length===X&&S(t)&&R(r)?Z.apply(e,arguments):arguments.length===Q&&N(t)&&P(r)?W.apply(e,arguments):re.apply(e,arguments)};try{Object.defineProperty(ne,"name",{value:e})}catch(ie){}return ne.signatures=B(a),ne}function j(e){return-1===u.ignore.indexOf(e)}function z(e){return e.trim()}function L(e){return!!e}function U(e){return null!==e}function F(e){return 0===e.types.length}function H(e){return e.slice(0,e.length-1)}function Z(e){return e[e.length-1]}function W(e,t,r){return Array.prototype.slice.call(e,t,r)}function V(e,t){return-1!==e.indexOf(t)}function G(e,t){for(var r=0;r<e.length;r++)if(V(t,e[r]))return!0;return!1}function $(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return e[r]}function K(e){for(var t={},r=0;r<e.length;r++)t[e[r]]=!0;return Object.keys(t)}function J(e,t){return Array.prototype.concat.apply([],e.map(t))}function Y(e){for(var t="",r=0;r<e.length;r++){var n=e[r];if(("object"===typeof n.signatures||"string"===typeof n.signature)&&""!==n.name)if(""===t)t=n.name;else if(t!==n.name){var i=new Error("Function names do not match (expected: "+t+", actual: "+n.name+")");throw i.data={actual:n.name,expected:t},i}}return t}function X(e){var t,r={};function n(e,n){if(r.hasOwnProperty(e)&&n!==r[e])throw t=new Error('Signature "'+e+'" is defined twice'),t.data={signature:e},t}for(var i=0;i<e.length;i++){var a=e[i];if("object"===typeof a.signatures)for(var o in a.signatures)a.signatures.hasOwnProperty(o)&&(n(o,a.signatures[o]),r[o]=a.signatures[o]);else{if("string"!==typeof a.signature)throw t=new TypeError("Function is no typed-function (index: "+i+")"),t.data={index:i},t;n(a.signature,a),r[a.signature]=a}}return r}return u=P("typed",{"string, Object":P,Object:function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);var n=Y(t);return P(n,e)},"...Function":function(e){return P(Y(e),X(e))},"string, ...Function":function(e,t){return P(e,X(t))}}),u.create=n,u.types=i,u.conversions=s,u.ignore=o,u.convert=d,u.find=l,u.addType=function(e,t){if(!e||"string"!==typeof e.name||"function"!==typeof e.test)throw new TypeError("Object with properties {name: string, test: function} expected");if(!1!==t)for(var r=0;r<u.types.length;r++)if("Object"===u.types[r].name)return void u.types.splice(r,0,e);u.types.push(e)},u.addConversion=function(e){if(!e||"string"!==typeof e.from||"string"!==typeof e.to||"function"!==typeof e.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");u.conversions.push(e)},u}return n()}))},7658:function(e,t,r){"use strict";var n=t;function i(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!==typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t){e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!==0&&(e="0"+e);for(n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16))}else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),a=i>>8,o=255&i;a?r.push(a,o):r.push(o)}return r}function a(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t}n.toArray=i,n.zero2=a,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}},"780f":function(e,t,r){"use strict";e.exports=a;var n=r("27bf"),i=Object.create(r("3a7c"));function a(e){if(!(this instanceof a))return new a(e);n.call(this,e)}i.inherits=r("3fb5"),i.inherits(a,n),a.prototype._transform=function(e,t,r){r(null,e)}},7839:function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7a10":function(e,t,r){var n=r("d0eb"),i=r("fdac");function a(e){this.rand=e||new i.Rand}e.exports=a,a.create=function(e){return new a(e)},a.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},a.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},a.prototype.test=function(e,t,r){var i=e.bitLength(),a=n.mont(e),o=new n(1).toRed(a);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),f=s.toRed(a),h=!0;t>0;t--){var l=this._randrange(new n(2),s);r&&r(l);var d=l.toRed(a).redPow(c);if(0!==d.cmp(o)&&0!==d.cmp(f)){for(var p=1;p<u;p++){if(d=d.redSqr(),0===d.cmp(o))return!1;if(0===d.cmp(f))break}if(p===u)return!1}}return h},a.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),a=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var o=e.subn(1),s=0;!o.testn(s);s++);for(var u=e.shrn(s),c=o.toRed(i);t>0;t--){var f=this._randrange(new n(2),o),h=e.gcd(f);if(0!==h.cmpn(1))return h;var l=f.toRed(i).redPow(u);if(0!==l.cmp(a)&&0!==l.cmp(c)){for(var d=1;d<s;d++){if(l=l.redSqr(),0===l.cmp(a))return l.fromRed().subn(1).gcd(e);if(0===l.cmp(c))break}if(d===s)return l=l.redSqr(),l.fromRed().subn(1).gcd(e)}}return!1}},"7aec":function(e,t,r){(function(e){var n;(function(e,i,a){function o(e){var t=this;function r(e,t){var r,n,i,a,o,s=[],u=128;for(t===(0|t)?(n=t,t=null):(t+="\0",n=0,u=Math.max(u,t.length)),i=0,a=-32;a<u;++a)t&&(n^=t.charCodeAt((a+32)%t.length)),0===a&&(o=n),n^=n<<10,n^=n>>>15,n^=n<<4,n^=n>>>13,a>=0&&(o=o+1640531527|0,r=s[127&a]^=n+o,i=0==r?i+1:0);for(i>=128&&(s[127&(t&&t.length||0)]=-1),i=127,a=512;a>0;--a)n=s[i+34&127],r=s[i=i+1&127],n^=n<<13,r^=r<<17,n^=n>>>15,r^=r>>>12,s[i]=n^r;e.w=o,e.X=s,e.i=i}t.next=function(){var e,r,n=t.w,i=t.X,a=t.i;return t.w=n=n+1640531527|0,r=i[a+34&127],e=i[a=a+1&127],r^=r<<13,e^=e<<17,r^=r>>>15,e^=e>>>12,r=i[a]=r^e,t.i=a,r+(n^n>>>16)|0},r(t,e)}function s(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function u(e,t){null==e&&(e=+new Date);var r=new o(e),n=t&&t.state,i=function(){return(r.next()>>>0)/4294967296};return i.double=function(){do{var e=r.next()>>>11,t=(r.next()>>>0)/4294967296,n=(e+t)/(1<<21)}while(0===n);return n},i.int32=r.next,i.quick=i,n&&(n.X&&s(n,r),i.state=function(){return s(r,{})}),i}i&&i.exports?i.exports=u:r("07d6")&&r("3c35")?(n=function(){return u}.call(t,r,t,i),void 0===n||(i.exports=n)):this.xor4096=u})(0,e,r("07d6"))}).call(this,r("62e4")(e))},"7b0b":function(e,t,r){var n=r("1d80");e.exports=function(e){return Object(n(e))}},"7d2a":function(e,t,r){(function(t){var r=Math.pow(2,30)-1;function n(e,r){if("string"!==typeof e&&!t.isBuffer(e))throw new TypeError(r+" must be a buffer or string")}e.exports=function(e,t,i,a){if(n(e,"Password"),n(t,"Salt"),"number"!==typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!==typeof a)throw new TypeError("Key length not a number");if(a<0||a>r||a!==a)throw new TypeError("Bad key length")}}).call(this,r("b639").Buffer)},"7d72":function(e,t,r){"use strict";var n=r("62c8").Buffer,i=n.isEncoding||function(e){switch(e=""+e,e&&e.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 a(e){if(!e)return"utf8";var t;while(1)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function o(e){var t=a(e);if("string"!==typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}function s(e){var t;switch(this.encoding=o(e),this.encoding){case"utf16le":this.text=p,this.end=m,t=4;break;case"utf8":this.fillLast=h,t=4;break;case"base64":this.text=g,this.end=v,t=3;break;default:return this.write=y,void(this.end=b)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function u(e){return e<=127?0:e>>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function c(e,t,r){var n=t.length-1;if(n<r)return 0;var i=u(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=u(t[n]),i>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=u(t[n]),i>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0))}function f(e,t,r){if(128!==(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!==(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!==(192&t[2]))return e.lastNeed=2,"�"}}function h(e){var t=this.lastTotal-this.lastNeed,r=f(this,e,t);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){var r=c(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function d(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t}function p(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function m(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function g(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function v(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function y(e){return e.toString(this.encoding)}function b(e){return e&&e.length?this.write(e):""}t.StringDecoder=s,s.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),void 0===t)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},s.prototype.end=d,s.prototype.text=l,s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},"7d92":function(e,t,r){var n=t;n.utils=r("c3c0"),n.common=r("edc9"),n.sha=r("5919"),n.ripemd=r("bb44"),n.hmac=r("2137"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},"7e78":function(e,t,r){var n=r("3fb5"),i=r("b672"),a=r("8707").Buffer,o=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e){return e<<1|e>>>31}function f(e){return e<<5|e>>>27}function h(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,s=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=c(t[u-3]^t[u-8]^t[u-14]^t[u-16]);for(var d=0;d<80;++d){var p=~~(d/20),m=f(r)+l(p,n,i,a)+s+t[d]+o[p]|0;s=a,a=i,i=h(n),n=r,r=m}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var e=a.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},"7f7a":function(e,t,r){var n=t;n.bignum=r("bc12"),n.define=r("ef3a").define,n.base=r("41df"),n.constants=r("0211"),n.decoders=r("20f6"),n.encoders=r("343e")},"7f9a":function(e,t,r){var n=r("da84"),i=r("8925"),a=n.WeakMap;e.exports="function"===typeof a&&/native code/.test(i(a))},8:function(e,t){},"80af":function(e,t,r){(function(e){(function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(11).Buffer}catch(E){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a<i;a++){var o=e.charCodeAt(a)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function u(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=e.length-6,n=0;r>=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,a+=24,a>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,f=r;f<s;f+=n)c=u(e,f,f+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var h=1;for(c=u(e,f,e.length,t),f=0;f<o;f++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){while(this.length<e)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&0===this.words[this.length-1])this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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],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];function l(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;i=0|e.words[p],a=0|t.words[d],o=i*a+h,f+=o/67108864|0,h=67108863&o}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<i|a)).toString(16);a=s>>>24-i&16777215,r=0!==a||o!==this.length-1?c[6-u.length]+u+r:u+r,i+=2,i>=26&&(i-=26,o--)}0!==a&&(r=a.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(d).toString(e);p=p.idivn(d),r=p.isZero()?m+r:c[l-m.length]+m+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n("undefined"!==typeof o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===t,c=new e(a),f=this.clone();if(u){for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){while(this.length<e.length)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)t=(0|r.words[o])-(0|n.words[o])+a,a=t>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)t=(0|r.words[o])+a,a=t>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,s=t.words,u=r.words,c=0,f=0|o[0],h=8191&f,l=f>>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],w=8191&b,M=b>>>13,x=0|o[4],_=8191&x,S=x>>>13,N=0|o[5],E=8191&N,A=N>>>13,D=0|o[6],k=8191&D,O=D>>>13,C=0|o[7],T=8191&C,R=C>>>13,B=0|o[8],I=8191&B,q=B>>>13,P=0|o[9],j=8191&P,z=P>>>13,L=0|s[0],U=8191&L,F=L>>>13,H=0|s[1],Z=8191&H,W=H>>>13,V=0|s[2],G=8191&V,$=V>>>13,K=0|s[3],J=8191&K,Y=K>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,F),i=i+Math.imul(l,U)|0,a=Math.imul(l,F);var ge=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=Math.imul(p,F),i=i+Math.imul(m,U)|0,a=Math.imul(m,F),n=n+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(l,Z)|0,a=a+Math.imul(l,W)|0;var ve=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,U),i=Math.imul(v,F),i=i+Math.imul(y,U)|0,a=Math.imul(y,F),n=n+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(h,G)|0,i=i+Math.imul(h,$)|0,i=i+Math.imul(l,G)|0,a=a+Math.imul(l,$)|0;var ye=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=Math.imul(w,F),i=i+Math.imul(M,U)|0,a=Math.imul(M,F),n=n+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(y,Z)|0,a=a+Math.imul(y,W)|0,n=n+Math.imul(p,G)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(m,G)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,Y)|0,i=i+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0;var be=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,U),i=Math.imul(_,F),i=i+Math.imul(S,U)|0,a=Math.imul(S,F),n=n+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,n=n+Math.imul(v,G)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(y,G)|0,a=a+Math.imul(y,$)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,ee)|0,i=i+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0;var we=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,U),i=Math.imul(E,F),i=i+Math.imul(A,U)|0,a=Math.imul(A,F),n=n+Math.imul(_,Z)|0,i=i+Math.imul(_,W)|0,i=i+Math.imul(S,Z)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(w,G)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(M,G)|0,a=a+Math.imul(M,$)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(h,re)|0,i=i+Math.imul(h,ne)|0,i=i+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0;var Me=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(k,U),i=Math.imul(k,F),i=i+Math.imul(O,U)|0,a=Math.imul(O,F),n=n+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,i=i+Math.imul(A,Z)|0,a=a+Math.imul(A,W)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(S,G)|0,a=a+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,i=i+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,n=n+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(h,ae)|0,i=i+Math.imul(h,oe)|0,i=i+Math.imul(l,ae)|0,a=a+Math.imul(l,oe)|0;var xe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),i=Math.imul(T,F),i=i+Math.imul(R,U)|0,a=Math.imul(R,F),n=n+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(O,Z)|0,a=a+Math.imul(O,W)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(A,G)|0,a=a+Math.imul(A,$)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Y)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(h,ue)|0,i=i+Math.imul(h,ce)|0,i=i+Math.imul(l,ue)|0,a=a+Math.imul(l,ce)|0;var _e=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,U),i=Math.imul(I,F),i=i+Math.imul(q,U)|0,a=Math.imul(q,F),n=n+Math.imul(T,Z)|0,i=i+Math.imul(T,W)|0,i=i+Math.imul(R,Z)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(k,G)|0,i=i+Math.imul(k,$)|0,i=i+Math.imul(O,G)|0,a=a+Math.imul(O,$)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Y)|0,i=i+Math.imul(A,J)|0,a=a+Math.imul(A,Y)|0,n=n+Math.imul(_,Q)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,n=n+Math.imul(p,ue)|0,i=i+Math.imul(p,ce)|0,i=i+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(h,he)|0,i=i+Math.imul(h,le)|0,i=i+Math.imul(l,he)|0,a=a+Math.imul(l,le)|0;var Se=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,U),i=Math.imul(j,F),i=i+Math.imul(z,U)|0,a=Math.imul(z,F),n=n+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0,i=i+Math.imul(q,Z)|0,a=a+Math.imul(q,W)|0,n=n+Math.imul(T,G)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(R,G)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,i=i+Math.imul(O,J)|0,a=a+Math.imul(O,Y)|0,n=n+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,n=n+Math.imul(v,ue)|0,i=i+Math.imul(v,ce)|0,i=i+Math.imul(y,ue)|0,a=a+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=i+Math.imul(p,le)|0,i=i+Math.imul(m,he)|0,a=a+Math.imul(m,le)|0,n=n+Math.imul(h,pe)|0,i=i+Math.imul(h,me)|0,i=i+Math.imul(l,pe)|0,a=a+Math.imul(l,me)|0;var Ne=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,Z),i=Math.imul(j,W),i=i+Math.imul(z,Z)|0,a=Math.imul(z,W),n=n+Math.imul(I,G)|0,i=i+Math.imul(I,$)|0,i=i+Math.imul(q,G)|0,a=a+Math.imul(q,$)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Y)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,i=i+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,ue)|0,i=i+Math.imul(w,ce)|0,i=i+Math.imul(M,ue)|0,a=a+Math.imul(M,ce)|0,n=n+Math.imul(v,he)|0,i=i+Math.imul(v,le)|0,i=i+Math.imul(y,he)|0,a=a+Math.imul(y,le)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,me)|0;var Ee=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,G),i=Math.imul(j,$),i=i+Math.imul(z,G)|0,a=Math.imul(z,$),n=n+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,i=i+Math.imul(q,J)|0,a=a+Math.imul(q,Y)|0,n=n+Math.imul(T,Q)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,i=i+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(_,ue)|0,i=i+Math.imul(_,ce)|0,i=i+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,he)|0,i=i+Math.imul(w,le)|0,i=i+Math.imul(M,he)|0,a=a+Math.imul(M,le)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(y,pe)|0,a=a+Math.imul(y,me)|0;var Ae=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=Math.imul(j,Y),i=i+Math.imul(z,J)|0,a=Math.imul(z,Y),n=n+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,i=i+Math.imul(q,Q)|0,a=a+Math.imul(q,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(k,ae)|0,i=i+Math.imul(k,oe)|0,i=i+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(E,ue)|0,i=i+Math.imul(E,ce)|0,i=i+Math.imul(A,ue)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(_,he)|0,i=i+Math.imul(_,le)|0,i=i+Math.imul(S,he)|0,a=a+Math.imul(S,le)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(M,pe)|0,a=a+Math.imul(M,me)|0;var De=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,Q),i=Math.imul(j,ee),i=i+Math.imul(z,Q)|0,a=Math.imul(z,ee),n=n+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,i=i+Math.imul(q,re)|0,a=a+Math.imul(q,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(k,ue)|0,i=i+Math.imul(k,ce)|0,i=i+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(E,he)|0,i=i+Math.imul(E,le)|0,i=i+Math.imul(A,he)|0,a=a+Math.imul(A,le)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(S,pe)|0,a=a+Math.imul(S,me)|0;var ke=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,re),i=Math.imul(j,ne),i=i+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(I,ae)|0,i=i+Math.imul(I,oe)|0,i=i+Math.imul(q,ae)|0,a=a+Math.imul(q,oe)|0,n=n+Math.imul(T,ue)|0,i=i+Math.imul(T,ce)|0,i=i+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(k,he)|0,i=i+Math.imul(k,le)|0,i=i+Math.imul(O,he)|0,a=a+Math.imul(O,le)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(A,pe)|0,a=a+Math.imul(A,me)|0;var Oe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ae),i=Math.imul(j,oe),i=i+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(I,ue)|0,i=i+Math.imul(I,ce)|0,i=i+Math.imul(q,ue)|0,a=a+Math.imul(q,ce)|0,n=n+Math.imul(T,he)|0,i=i+Math.imul(T,le)|0,i=i+Math.imul(R,he)|0,a=a+Math.imul(R,le)|0,n=n+Math.imul(k,pe)|0,i=i+Math.imul(k,me)|0,i=i+Math.imul(O,pe)|0,a=a+Math.imul(O,me)|0;var Ce=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=Math.imul(j,ce),i=i+Math.imul(z,ue)|0,a=Math.imul(z,ce),n=n+Math.imul(I,he)|0,i=i+Math.imul(I,le)|0,i=i+Math.imul(q,he)|0,a=a+Math.imul(q,le)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(R,pe)|0,a=a+Math.imul(R,me)|0;var Te=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,he),i=Math.imul(j,le),i=i+Math.imul(z,he)|0,a=Math.imul(z,le),n=n+Math.imul(I,pe)|0,i=i+Math.imul(I,me)|0,i=i+Math.imul(q,pe)|0,a=a+Math.imul(q,me)|0;var Re=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,pe),i=Math.imul(j,me),i=i+Math.imul(z,pe)|0,a=Math.imul(z,me);var Be=(c+n|0)+((8191&i)<<13)|0;return c=(a+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=Me,u[6]=xe,u[7]=_e,u[8]=Se,u[9]=Ne,u[10]=Ee,u[11]=Ae,u[12]=De,u[13]=ke,u[14]=Oe,u[15]=Ce,u[16]=Te,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,u=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=u;c++){var f=a-c,h=0|e.words[f],l=0|t.words[c],d=h*l,p=67108863&d;o=o+(d/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function g(e,t,r){var n=new v;return n.mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?d(this,e,t):n<1024?m(this,e,t):g(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},v.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<o;d++){var p=r[f+d],m=n[f+d],g=r[f+d+o],v=n[f+d+o],y=h*g-l*v;v=h*v+l*g,g=y,r[f+d]=p+g,n[f+d]=m+v,r[f+d+o]=p-g,n[f+d+o]=m-v,d!==s&&(y=u*h-c*l,l=u*l+c*h,h=y)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0===(-8192&a))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,s,u,n,i),this.transform(c,a,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),g(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"===typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=l(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length;n++,r=r.sqr())if(0!==t[n])break;if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-a|h>>>a,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return!1;var a=this.words[r];return!!(a&i)},a.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;a-=67108863&u,s=(a>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)a=(0|this.words[i+r])+s,s=a>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)a=-(0|this.words[i])+s,s=a>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1],s=this._countBits(o);r=26-s,0!==r&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var u,c=n.length-i.length;if("mod"!==t){u=new a(null),u.length=c+1,u.words=new Array(u.length);for(var f=0;f<u.length;f++)u.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,c);0===h.negative&&(n=h,u&&(u.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,l);while(0!==n.negative)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:u||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++c;var f=r.clone(),h=t.clone();while(!t.isZero()){for(var l=0,d=1;0===(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0){t.iushrn(l);while(l-- >0)(i.isOdd()||o.isOdd())&&(i.iadd(f),o.isub(h)),i.iushrn(1),o.iushrn(1)}for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0){r.iushrn(p);while(p-- >0)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1)}t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(u)):(r.isub(t),s.isub(i),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i,o=new a(1),s=new a(0),u=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0){t.iushrn(c);while(c-- >0)o.isOdd()&&o.iadd(u),o.iushrn(1)}for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0){r.iushrn(h);while(h-- >0)s.isOdd()&&s.iadd(u),s.iushrn(1)}t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return i=0===t.cmpn(1)?o:s,i.cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(w,b),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,b),i(x,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new M;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1),o=0;while(!i.isZero()&&0===i.andln(1))o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new a(2*f*f).toRed(this);while(0!==this.pow(f,c).cmp(u))f.redIAdd(u);var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;while(0!==d.cmp(s)){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new a(1).iushln(p-g-1));l=l.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return l},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=4,n=new Array(1<<r);n[0]=new a(1).toRed(this),n[1]=e;for(var i=2;i<n.length;i++)n[i]=this.mul(n[i-1],e);var o=n[0],s=0,u=0,c=t.bitLength()%26;for(0===c&&(c=26),i=t.length-1;i>=0;i--){for(var f=t.words[i],h=c-1;h>=0;h--){var l=f>>h&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,u++,(u===r||0===i&&0===h)&&(o=this.mul(o,n[s]),u=0,s=0)):u=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new N(e)},i(N,S),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},N.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(e,this)}).call(this,r("62e4")(e))},"825a":function(e,t,r){var n=r("861d");e.exports=function(e){if(!n(e))throw TypeError(String(e)+" is not an object");return e}},"82f0":function(e,t,r){var n=r("39f5"),i=r("8707").Buffer,a=r("6430"),o=r("3fb5"),s=r("3f62"),u=r("8c8a"),c=r("bd9d");function f(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}function h(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new s(r),a=t.length,o=a%16;n.update(t),o&&(o=16-o,n.update(i.alloc(o,0))),n.update(i.alloc(8,0));var u=8*a,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),e._finID=n.state;var h=i.from(e._finID);return c(h),h}function l(e,t,r,o){a.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var c=this._cipher.encryptBlock(u);this._ghash=new s(c),r=h(this,r,c),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=o,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}o(l,a),l.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&f(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},l.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},l.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},l.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=l},8360:function(e,t,r){var n=r("41df").Reporter,i=r("41df").EncoderBuffer,a=r("41df").DecoderBuffer,o=r("da3e"),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s),c=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function f(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r["default"]=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=f;var h=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){var e=this._baseState,t={};h.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},f.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},f.prototype._init=function(e){var t=this._baseState;o(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),o.equal(t.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(o(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(o(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!==typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},c.forEach((function(e){f.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){f.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return o(null===t.tag),t.tag=e,this._useArgs(r),this}})),f.prototype.use=function(e){o(e);var t=this._baseState;return o(null===t.use),t.use=e,this},f.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this},f.prototype.def=function(e){var t=this._baseState;return o(null===t["default"]),t["default"]=e,t.optional=!0,this},f.prototype.explicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.explicit=e,this},f.prototype.implicit=function(e){var t=this._baseState;return o(null===t.explicit&&null===t.implicit),t.implicit=e,this},f.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},f.prototype.key=function(e){var t=this._baseState;return o(null===t.key),t.key=e,this},f.prototype.any=function(){var e=this._baseState;return e.any=!0,this},f.prototype.choice=function(e){var t=this._baseState;return o(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},f.prototype.contains=function(e){var t=this._baseState;return o(null===t.use),t.contains=e,this},f.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r["default"],o=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(o=this._peekTag(e,u,r.any),e.isError(o))return o}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),o=!0}catch(p){o=!1}e.restore(c)}}if(r.obj&&o&&(n=e.enterObject()),o){if(null!==r.explicit){var f=this._decodeTag(e,r.explicit);if(e.isError(f))return f;e=f}var h=e.offset;if(null===r.use&&null===r.choice){if(r.any)c=e.save();var l=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(l))return l;r.any?i=e.raw(c):e=l}if(t&&t.track&&null!==r.tag&&t.track(e.path(),h,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),i=r.any?i:null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new a(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(d,t)}}return r.obj&&o&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==o?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,i),i},f.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},f.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),o(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},f.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(a){var o=e.save(),s=r.choice[a];try{var u=s._decode(e,t);if(e.isError(u))return!1;n={type:a,value:u},i=!0}catch(c){return e.restore(o),!1}return!0}),this),i?n:e.error("Choice not matched")},f.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},f.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n["default"]||n["default"]!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},f.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var a=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i["default"])return;e=i["default"]}var o=null,s=!1;if(i.any)a=this._createEncoderBuffer(e);else if(i.choice)a=this._encodeChoice(e,t);else if(i.contains)o=this._getUse(i.contains,r)._encode(e,t),s=!0;else if(i.children)o=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!==typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,o=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),u))}else null!==i.use?a=this._getUse(i.use,r)._encode(e,t):(o=this._encodePrimitive(i.tag,e),s=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===c?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(a=this._encodeComposite(c,s,f,o))}return null!==i.explicit&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a},f.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||o(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},f.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},f.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},f.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},"83ab":function(e,t,r){var n=r("d039");e.exports=!n((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"83d5":function(e,t){e.exports=function(e,t){var r=e.length,n=-1;while(++n<r)e[n]^=t[n];return e}},"85b3":function(e,t,r){var n=r("3fb5"),i=r("3768");function a(e){i.call(this,e),this.enc="pem"}n(a,i),e.exports=a,a.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e),n=r.toString("base64"),a=["-----BEGIN "+t.label+"-----"],o=0;o<n.length;o+=64)a.push(n.slice(o,o+64));return a.push("-----END "+t.label+"-----"),a.join("\n")}},"861d":function(e,t){e.exports=function(e){return"object"===typeof e?null!==e:"function"===typeof e}},8707:function(e,t,r){
|
|
11
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
12
|
-
var n=r("b639"),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},8875:function(e,t,r){var n,i,a;(function(r,o){i=[],n=o,a="function"===typeof n?n.apply(t,i):n,void 0===a||(e.exports=a)})("undefined"!==typeof self&&self,(function(){function e(){var t=Object.getOwnPropertyDescriptor(document,"currentScript");if(!t&&"currentScript"in document&&document.currentScript)return document.currentScript;if(t&&t.get!==e&&document.currentScript)return document.currentScript;try{throw new Error}catch(d){var r,n,i,a=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,o=/@([^@]*):(\d+):(\d+)\s*$/gi,s=a.exec(d.stack)||o.exec(d.stack),u=s&&s[1]||!1,c=s&&s[2]||!1,f=document.location.href.replace(document.location.hash,""),h=document.getElementsByTagName("script");u===f&&(r=document.documentElement.outerHTML,n=new RegExp("(?:[^\\n]+?\\n){0,"+(c-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),i=r.replace(n,"$1").trim());for(var l=0;l<h.length;l++){if("interactive"===h[l].readyState)return h[l];if(h[l].src===u)return h[l];if(u===f&&h[l].innerHTML&&h[l].innerHTML.trim()===i)return h[l]}return null}}return e}))},8925:function(e,t,r){var n=r("c6cd"),i=Function.toString;"function"!=typeof n.inspectSource&&(n.inspectSource=function(e){return i.call(e)}),e.exports=n.inspectSource},8947:function(e,t,r){var n=r("bac2"),i=r("82f0"),a=r("8707").Buffer,o=r("09f5"),s=r("6430"),u=r("39f5"),c=r("ae84"),f=r("3fb5");function h(e,t,r){s.call(this),this._cache=new d,this._cipher=new u.AES(t),this._prev=a.from(r),this._mode=e,this._autopadding=!0}f(h,s),h.prototype._update=function(e){var t,r;this._cache.add(e);var n=[];while(t=this._cache.get())r=this._mode.encrypt(this,t),n.push(r);return a.concat(n)};var l=a.alloc(16,16);function d(){this.cache=a.allocUnsafe(0)}function p(e,t,r){var s=n[e.toLowerCase()];if(!s)throw new TypeError("invalid suite type");if("string"===typeof t&&(t=a.from(t)),t.length!==s.key/8)throw new TypeError("invalid key length "+t.length);if("string"===typeof r&&(r=a.from(r)),"GCM"!==s.mode&&r.length!==s.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===s.type?new o(s.module,t,r):"auth"===s.type?new i(s.module,t,r):new h(s.module,t,r)}function m(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(t,!1,r.key,r.iv);return p(e,i.key,i.iv)}h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},d.prototype.add=function(e){this.cache=a.concat([this.cache,e])},d.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},d.prototype.flush=function(){var e=16-this.cache.length,t=a.allocUnsafe(e),r=-1;while(++r<e)t.writeUInt8(e,r);return a.concat([this.cache,t])},t.createCipheriv=p,t.createCipher=m},"89ed":function(e,t,r){(function(e){var n;(function(e,i,a){function o(e){var t=this,r="";t.next=function(){var e=t.b,r=t.c,n=t.d,i=t.a;return e=e<<25^e>>>7^r,r=r-n|0,n=n<<24^n>>>8^i,i=i-e|0,t.b=e=e<<20^e>>>12^r,t.c=r=r-n|0,t.d=n<<16^r>>>16^i,t.a=i-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):r+=e;for(var n=0;n<r.length+20;n++)t.b^=0|r.charCodeAt(n),t.next()}function s(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function u(e,t){var r=new o(e),n=t&&t.state,i=function(){return(r.next()>>>0)/4294967296};return i.double=function(){do{var e=r.next()>>>11,t=(r.next()>>>0)/4294967296,n=(e+t)/(1<<21)}while(0===n);return n},i.int32=r.next,i.quick=i,n&&("object"==typeof n&&s(n,r),i.state=function(){return s(r,{})}),i}i&&i.exports?i.exports=u:r("07d6")&&r("3c35")?(n=function(){return u}.call(t,r,t,i),void 0===n||(i.exports=n)):this.tychei=u})(0,e,r("07d6"))}).call(this,r("62e4")(e))},"8b71":function(e,t,r){var n=r("0211");t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n._reverse(t.tag)},"8b95":function(e,t,r){"use strict";var n=r("c3c0"),i=r("b525");function a(){if(!(this instanceof a))return new a;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(a,i),e.exports=a,a.blockSize=1024,a.outSize=384,a.hmacStrength=192,a.padLength=128,a.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},"8c8a":function(e,t,r){(function(t){e.exports=function(e,r){for(var n=Math.min(e.length,r.length),i=new t(n),a=0;a<n;++a)i[a]=e[a]^r[a];return i}}).call(this,r("b639").Buffer)},"8df7":function(e,t,r){var n=r("3fb5"),i=r("b639").Buffer,a=r("cfbd");function o(e){a.call(this,e),this.enc="pem"}n(o,a),e.exports=o,o.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),o=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,u=-1,c=0;c<r.length;c++){var f=r[c].match(o);if(null!==f&&f[2]===n){if(-1!==s){if("END"!==f[1])break;u=c;break}if("BEGIN"!==f[1])break;s=c}}if(-1===s||-1===u)throw new Error("PEM section not found for: "+n);var h=r.slice(s+1,u).join("");h.replace(/[^a-z0-9\+\/=]+/gi,"");var l=new i(h,"base64");return a.prototype.decode.call(this,l,t)}},9:function(e,t){},9019:function(e,t,r){"use strict";(function(t){function r(e,r){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(o,this,e)):t.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!r&&e?a._writableState?a._writableState.errorEmitted?t.nextTick(i,a):(a._writableState.errorEmitted=!0,t.nextTick(n,a,e)):t.nextTick(n,a,e):r?(t.nextTick(i,a),r(e)):t.nextTick(i,a)})),this)}function n(e,t){o(e,t),i(e)}function i(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function a(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(e,t){e.emit("error",t)}function s(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}e.exports={destroy:r,undestroy:a,errorOrDestroy:s}}).call(this,r("4362"))},"90e3":function(e,t){var r=0,n=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+n).toString(36)}},9112:function(e,t,r){var n=r("83ab"),i=r("9bf2"),a=r("5c6c");e.exports=n?function(e,t,r){return i.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},9152:function(e,t){t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,c=u>>1,f=-7,h=r?i-1:0,l=r?-1:1,d=e[t+h];for(h+=l,a=d&(1<<-f)-1,d>>=-f,f+=s;f>0;a=256*a+e[t+h],h+=l,f-=8);for(o=a&(1<<-f)-1,a>>=-f,f+=n;f>0;o=256*o+e[t+h],h+=l,f-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=c}return(d?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,u,c=8*a-i-1,f=(1<<c)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=f):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+h>=1?l/u:l*Math.pow(2,1-h),t*u>=2&&(o++,u/=2),o+h>=f?(s=0,o=f):o+h>=1?(s=(t*u-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[r+d]=255&o,d+=p,o/=256,c-=8);e[r+d-p]|=128*m}},"919c":function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},"92c8":function(e,t,r){"use strict";r.r(t);var n=r("4d2c"),i=r.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){r.d(t,e,(function(){return n[e]}))}(a);t["default"]=i.a},"93e6":function(e,t,r){"use strict";var n=r("8707").Buffer,i=r("334a").Transform,a=r("3fb5");function o(e,t){if(!n.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}function s(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}a(s,i),s.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(i){n=i}r(n)},s.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)},s.prototype.update=function(e,t){if(o(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));var r=this._block,i=0;while(this._blockOffset+e.length-i>=this._blockSize){for(var a=this._blockOffset;a<this._blockSize;)r[a++]=e[i++];this._update(),this._blockOffset=0}while(i<e.length)r[this._blockOffset++]=e[i++];for(var s=0,u=8*e.length;u>0;++s)this._length[s]+=u,u=this._length[s]/4294967296|0,u>0&&(this._length[s]-=4294967296*u);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},s.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=s},"945d":function(e,t,r){"use strict";var n=r("7d92"),i=r("0cbb"),a=r("f3a3"),o=a.assert,s=a.parseBytes,u=r("380f"),c=r("44a3");function f(e){if(o("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof f))return new f(e);e=i[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=f,f.prototype.sign=function(e,t){e=s(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),u=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:a})},f.prototype.verify=function(e,t,r){e=s(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S()),o=t.R().add(n.pub().mul(i));return o.eq(a)},f.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return a.intFromLE(e.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},f.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},f.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},f.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},f.prototype.decodePoint=function(e){e=a.parseBytes(e);var t=e.length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!==(128&e[t]),i=a.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(e){return a.intFromLE(e)},f.prototype.isPoint=function(e){return e instanceof this.pointClass}},"94ca":function(e,t,r){var n=r("d039"),i=/#|\.prototype\./,a=function(e,t){var r=s[o(e)];return r==c||r!=u&&("function"==typeof t?n(t):!!t)},o=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},s=a.data={},u=a.NATIVE="N",c=a.POLYFILL="P";e.exports=a},9523:function(e,t){function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}e.exports=r,e.exports["default"]=e.exports,e.exports.__esModule=!0},"956a":function(e,t,r){var n=r("1e3c"),i=r("fda6"),a=r("bac2"),o=r("0be8"),s=r("ae84");function u(e,t){var r,n;if(e=e.toLowerCase(),a[e])r=a[e].key,n=a[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");r=8*o[e].key,n=o[e].iv}var i=s(t,!1,r,n);return f(e,i.key,i.iv)}function c(e,t){var r,n;if(e=e.toLowerCase(),a[e])r=a[e].key,n=a[e].iv;else{if(!o[e])throw new TypeError("invalid suite type");r=8*o[e].key,n=o[e].iv}var i=s(t,!1,r,n);return h(e,i.key,i.iv)}function f(e,t,r){if(e=e.toLowerCase(),a[e])return i.createCipheriv(e,t,r);if(o[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function h(e,t,r){if(e=e.toLowerCase(),a[e])return i.createDecipheriv(e,t,r);if(o[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function l(){return Object.keys(o).concat(i.getCiphers())}t.createCipher=t.Cipher=u,t.createCipheriv=t.Cipheriv=f,t.createDecipher=t.Decipher=c,t.createDecipheriv=t.Decipheriv=h,t.listCiphers=t.getCiphers=l},"966d":function(e,t,r){"use strict";(function(t){function r(e,r,n,i){if("function"!==typeof e)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,r)}));case 3:return t.nextTick((function(){e.call(null,r,n)}));case 4:return t.nextTick((function(){e.call(null,r,n,i)}));default:a=new Array(s-1),o=0;while(o<a.length)a[o++]=arguments[o];return t.nextTick((function(){e.apply(null,a)}))}}"undefined"===typeof t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:r}:e.exports=t}).call(this,r("4362"))},"96a5":function(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,r){return t&&s(e.prototype,t),r&&s(e,r),e}var c=r("b639"),f=c.Buffer,h=r(2),l=h.inspect,d=l&&l.custom||"inspect";function p(e,t,r){f.prototype.copy.call(e,t,r)}e.exports=function(){function e(){o(this,e),this.head=null,this.tail=null,this.length=0}return u(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";var t=this.head,r=""+t.data;while(t=t.next)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return f.alloc(0);var t=f.allocUnsafe(e>>>0),r=this.head,n=0;while(r)p(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;e-=n.length;while(t=t.next){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),e-=a,0===e){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=f.allocUnsafe(e),r=this.head,n=1;r.data.copy(t),e-=r.data.length;while(r=r.next){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),e-=a,0===e){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:d,value:function(e,t){return l(this,i({},t,{depth:0,customInspect:!1}))}}]),e}()},"980c":function(e,t,r){var n=r("8707").Buffer,i=r("399f"),a=r("3337").ec,o=r("2aee"),s=r("cd91");function u(e,t,r,a,s){var u=o(r);if("ec"===u.type){if("ecdsa"!==a&&"ecdsa/rsa"!==a)throw new Error("wrong public key type");return c(e,t,u)}if("dsa"===u.type){if("dsa"!==a)throw new Error("wrong public key type");return f(e,t,u)}if("rsa"!==a&&"ecdsa/rsa"!==a)throw new Error("wrong public key type");t=n.concat([s,t]);var h=u.modulus.byteLength(),l=[1],d=0;while(t.length+l.length+2<h)l.push(255),d++;l.push(0);var p=-1;while(++p<t.length)l.push(t[p]);l=n.from(l);var m=i.mont(u.modulus);e=new i(e).toRed(m),e=e.redPow(new i(u.publicExponent)),e=n.from(e.fromRed().toArray());var g=d<8?1:0;h=Math.min(e.length,l.length),e.length!==l.length&&(g=1),p=-1;while(++p<h)g|=e[p]^l[p];return 0===g}function c(e,t,r){var n=s[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new a(n),o=r.data.subjectPrivateKey.data;return i.verify(t,e,o)}function f(e,t,r){var n=r.data.p,a=r.data.q,s=r.data.g,u=r.data.pub_key,c=o.signature.decode(e,"der"),f=c.s,l=c.r;h(f,a),h(l,a);var d=i.mont(n),p=f.invm(a),m=s.toRed(d).redPow(new i(t).mul(p).mod(a)).fromRed().mul(u.toRed(d).redPow(l.mul(p).mod(a)).fromRed()).mod(n).mod(a);return 0===m.cmp(l)}function h(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=u},"98e6":function(e,t,r){"use strict";var n=r("3fb5"),i=r("f576"),a=r("b5ca"),o=r("69f2"),s=r("6430");function u(e){s.call(this,"digest"),this._hash=e}n(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return e=e.toLowerCase(),"md5"===e?new i:"rmd160"===e||"ripemd160"===e?new a:new u(o(e))}},"9bf2":function(e,t,r){var n=r("83ab"),i=r("0cfb"),a=r("825a"),o=r("c04e"),s=Object.defineProperty;t.f=n?s:function(e,t,r){if(a(e),t=o(t,!0),a(r),i)try{return s(e,t,r)}catch(n){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},"9d28":function(e,t,r){"use strict";e.exports=i;var n=r("f1c8");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r("3fb5")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},"9d8a":function(e,t,r){"use strict";function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var i={};function a(e,t,r){function a(e,r,n){return"string"===typeof t?t:t(e,r,n)}r||(r=Error);var o=function(e){function t(t,r,n){return e.call(this,a(t,r,n))||this}return n(t,e),t}(r);o.prototype.name=r.name,o.prototype.code=e,i[e]=o}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}function s(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function u(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function c(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i;if("string"===typeof t&&s(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be",u(e," argument"))i="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var a=c(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(o(t,"type"))}return i+=". Received type ".concat(typeof r),i}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},"9f9d":function(e,t,r){(function(t){var r;if(t.browser)r="utf-8";else{var n=parseInt(t.version.split(".")[0].slice(1),10);r=n>=6?"utf-8":"binary"}e.exports=r}).call(this,r("4362"))},a099:function(e,t,r){t.pbkdf2=r("206d"),t.pbkdf2Sync=r("e07b")},a255:function(e,t,r){var n=r("3fb5"),i=r("b672"),a=r("8707").Buffer,o=[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],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function f(e,t,r){return e&t|r&(e|t)}function h(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function l(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function p(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}n(u,i),u.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},u.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,s=0|this._e,u=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)t[v]=e.readInt32BE(4*v);for(;v<64;++v)t[v]=p(t[v-2])+t[v-7]+d(t[v-15])+t[v-16]|0;for(var y=0;y<64;++y){var b=g+l(s)+c(s,u,m)+o[y]+t[y]|0,w=h(r)+f(r,n,i)|0;g=m,m=u,u=s,s=a+b|0,a=i,i=n,n=r,r=b+w|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=a+this._d|0,this._e=s+this._e|0,this._f=u+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},u.prototype._hash=function(){var e=a.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},a25c:function(e,t,r){(function(e){(function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(10).Buffer}catch(E){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a<i;a++){var o=e.charCodeAt(a)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function u(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=e.length-6,n=0;r>=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,a+=24,a>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,f=r;f<s;f+=n)c=u(e,f,f+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var h=1;for(c=u(e,f,e.length,t),f=0;f<o;f++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){while(this.length<e)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&0===this.words[this.length-1])this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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],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];function l(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;i=0|e.words[p],a=0|t.words[d],o=i*a+h,f+=o/67108864|0,h=67108863&o}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<i|a)).toString(16);a=s>>>24-i&16777215,r=0!==a||o!==this.length-1?c[6-u.length]+u+r:u+r,i+=2,i>=26&&(i-=26,o--)}0!==a&&(r=a.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(d).toString(e);p=p.idivn(d),r=p.isZero()?m+r:c[l-m.length]+m+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n("undefined"!==typeof o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===t,c=new e(a),f=this.clone();if(u){for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){while(this.length<e.length)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)t=(0|r.words[o])-(0|n.words[o])+a,a=t>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)t=(0|r.words[o])+a,a=t>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,s=t.words,u=r.words,c=0,f=0|o[0],h=8191&f,l=f>>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],w=8191&b,M=b>>>13,x=0|o[4],_=8191&x,S=x>>>13,N=0|o[5],E=8191&N,A=N>>>13,D=0|o[6],k=8191&D,O=D>>>13,C=0|o[7],T=8191&C,R=C>>>13,B=0|o[8],I=8191&B,q=B>>>13,P=0|o[9],j=8191&P,z=P>>>13,L=0|s[0],U=8191&L,F=L>>>13,H=0|s[1],Z=8191&H,W=H>>>13,V=0|s[2],G=8191&V,$=V>>>13,K=0|s[3],J=8191&K,Y=K>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,F),i=i+Math.imul(l,U)|0,a=Math.imul(l,F);var ge=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=Math.imul(p,F),i=i+Math.imul(m,U)|0,a=Math.imul(m,F),n=n+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(l,Z)|0,a=a+Math.imul(l,W)|0;var ve=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,U),i=Math.imul(v,F),i=i+Math.imul(y,U)|0,a=Math.imul(y,F),n=n+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(h,G)|0,i=i+Math.imul(h,$)|0,i=i+Math.imul(l,G)|0,a=a+Math.imul(l,$)|0;var ye=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=Math.imul(w,F),i=i+Math.imul(M,U)|0,a=Math.imul(M,F),n=n+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(y,Z)|0,a=a+Math.imul(y,W)|0,n=n+Math.imul(p,G)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(m,G)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,Y)|0,i=i+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0;var be=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,U),i=Math.imul(_,F),i=i+Math.imul(S,U)|0,a=Math.imul(S,F),n=n+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,n=n+Math.imul(v,G)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(y,G)|0,a=a+Math.imul(y,$)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,ee)|0,i=i+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0;var we=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,U),i=Math.imul(E,F),i=i+Math.imul(A,U)|0,a=Math.imul(A,F),n=n+Math.imul(_,Z)|0,i=i+Math.imul(_,W)|0,i=i+Math.imul(S,Z)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(w,G)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(M,G)|0,a=a+Math.imul(M,$)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(h,re)|0,i=i+Math.imul(h,ne)|0,i=i+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0;var Me=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(k,U),i=Math.imul(k,F),i=i+Math.imul(O,U)|0,a=Math.imul(O,F),n=n+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,i=i+Math.imul(A,Z)|0,a=a+Math.imul(A,W)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(S,G)|0,a=a+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,i=i+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,n=n+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(h,ae)|0,i=i+Math.imul(h,oe)|0,i=i+Math.imul(l,ae)|0,a=a+Math.imul(l,oe)|0;var xe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),i=Math.imul(T,F),i=i+Math.imul(R,U)|0,a=Math.imul(R,F),n=n+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(O,Z)|0,a=a+Math.imul(O,W)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(A,G)|0,a=a+Math.imul(A,$)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Y)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(h,ue)|0,i=i+Math.imul(h,ce)|0,i=i+Math.imul(l,ue)|0,a=a+Math.imul(l,ce)|0;var _e=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,U),i=Math.imul(I,F),i=i+Math.imul(q,U)|0,a=Math.imul(q,F),n=n+Math.imul(T,Z)|0,i=i+Math.imul(T,W)|0,i=i+Math.imul(R,Z)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(k,G)|0,i=i+Math.imul(k,$)|0,i=i+Math.imul(O,G)|0,a=a+Math.imul(O,$)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Y)|0,i=i+Math.imul(A,J)|0,a=a+Math.imul(A,Y)|0,n=n+Math.imul(_,Q)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,n=n+Math.imul(p,ue)|0,i=i+Math.imul(p,ce)|0,i=i+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(h,he)|0,i=i+Math.imul(h,le)|0,i=i+Math.imul(l,he)|0,a=a+Math.imul(l,le)|0;var Se=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,U),i=Math.imul(j,F),i=i+Math.imul(z,U)|0,a=Math.imul(z,F),n=n+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0,i=i+Math.imul(q,Z)|0,a=a+Math.imul(q,W)|0,n=n+Math.imul(T,G)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(R,G)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,i=i+Math.imul(O,J)|0,a=a+Math.imul(O,Y)|0,n=n+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,n=n+Math.imul(v,ue)|0,i=i+Math.imul(v,ce)|0,i=i+Math.imul(y,ue)|0,a=a+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=i+Math.imul(p,le)|0,i=i+Math.imul(m,he)|0,a=a+Math.imul(m,le)|0,n=n+Math.imul(h,pe)|0,i=i+Math.imul(h,me)|0,i=i+Math.imul(l,pe)|0,a=a+Math.imul(l,me)|0;var Ne=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,Z),i=Math.imul(j,W),i=i+Math.imul(z,Z)|0,a=Math.imul(z,W),n=n+Math.imul(I,G)|0,i=i+Math.imul(I,$)|0,i=i+Math.imul(q,G)|0,a=a+Math.imul(q,$)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Y)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,i=i+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,ue)|0,i=i+Math.imul(w,ce)|0,i=i+Math.imul(M,ue)|0,a=a+Math.imul(M,ce)|0,n=n+Math.imul(v,he)|0,i=i+Math.imul(v,le)|0,i=i+Math.imul(y,he)|0,a=a+Math.imul(y,le)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,me)|0;var Ee=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,G),i=Math.imul(j,$),i=i+Math.imul(z,G)|0,a=Math.imul(z,$),n=n+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,i=i+Math.imul(q,J)|0,a=a+Math.imul(q,Y)|0,n=n+Math.imul(T,Q)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,i=i+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(_,ue)|0,i=i+Math.imul(_,ce)|0,i=i+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,he)|0,i=i+Math.imul(w,le)|0,i=i+Math.imul(M,he)|0,a=a+Math.imul(M,le)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(y,pe)|0,a=a+Math.imul(y,me)|0;var Ae=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=Math.imul(j,Y),i=i+Math.imul(z,J)|0,a=Math.imul(z,Y),n=n+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,i=i+Math.imul(q,Q)|0,a=a+Math.imul(q,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(k,ae)|0,i=i+Math.imul(k,oe)|0,i=i+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(E,ue)|0,i=i+Math.imul(E,ce)|0,i=i+Math.imul(A,ue)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(_,he)|0,i=i+Math.imul(_,le)|0,i=i+Math.imul(S,he)|0,a=a+Math.imul(S,le)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(M,pe)|0,a=a+Math.imul(M,me)|0;var De=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,Q),i=Math.imul(j,ee),i=i+Math.imul(z,Q)|0,a=Math.imul(z,ee),n=n+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,i=i+Math.imul(q,re)|0,a=a+Math.imul(q,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(k,ue)|0,i=i+Math.imul(k,ce)|0,i=i+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(E,he)|0,i=i+Math.imul(E,le)|0,i=i+Math.imul(A,he)|0,a=a+Math.imul(A,le)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(S,pe)|0,a=a+Math.imul(S,me)|0;var ke=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,re),i=Math.imul(j,ne),i=i+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(I,ae)|0,i=i+Math.imul(I,oe)|0,i=i+Math.imul(q,ae)|0,a=a+Math.imul(q,oe)|0,n=n+Math.imul(T,ue)|0,i=i+Math.imul(T,ce)|0,i=i+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(k,he)|0,i=i+Math.imul(k,le)|0,i=i+Math.imul(O,he)|0,a=a+Math.imul(O,le)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(A,pe)|0,a=a+Math.imul(A,me)|0;var Oe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ae),i=Math.imul(j,oe),i=i+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(I,ue)|0,i=i+Math.imul(I,ce)|0,i=i+Math.imul(q,ue)|0,a=a+Math.imul(q,ce)|0,n=n+Math.imul(T,he)|0,i=i+Math.imul(T,le)|0,i=i+Math.imul(R,he)|0,a=a+Math.imul(R,le)|0,n=n+Math.imul(k,pe)|0,i=i+Math.imul(k,me)|0,i=i+Math.imul(O,pe)|0,a=a+Math.imul(O,me)|0;var Ce=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=Math.imul(j,ce),i=i+Math.imul(z,ue)|0,a=Math.imul(z,ce),n=n+Math.imul(I,he)|0,i=i+Math.imul(I,le)|0,i=i+Math.imul(q,he)|0,a=a+Math.imul(q,le)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(R,pe)|0,a=a+Math.imul(R,me)|0;var Te=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,he),i=Math.imul(j,le),i=i+Math.imul(z,he)|0,a=Math.imul(z,le),n=n+Math.imul(I,pe)|0,i=i+Math.imul(I,me)|0,i=i+Math.imul(q,pe)|0,a=a+Math.imul(q,me)|0;var Re=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,pe),i=Math.imul(j,me),i=i+Math.imul(z,pe)|0,a=Math.imul(z,me);var Be=(c+n|0)+((8191&i)<<13)|0;return c=(a+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=Me,u[6]=xe,u[7]=_e,u[8]=Se,u[9]=Ne,u[10]=Ee,u[11]=Ae,u[12]=De,u[13]=ke,u[14]=Oe,u[15]=Ce,u[16]=Te,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,u=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=u;c++){var f=a-c,h=0|e.words[f],l=0|t.words[c],d=h*l,p=67108863&d;o=o+(d/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function g(e,t,r){var n=new v;return n.mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?d(this,e,t):n<1024?m(this,e,t):g(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},v.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<o;d++){var p=r[f+d],m=n[f+d],g=r[f+d+o],v=n[f+d+o],y=h*g-l*v;v=h*v+l*g,g=y,r[f+d]=p+g,n[f+d]=m+v,r[f+d+o]=p-g,n[f+d+o]=m-v,d!==s&&(y=u*h-c*l,l=u*l+c*h,h=y)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0===(-8192&a))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,s,u,n,i),this.transform(c,a,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),g(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"===typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=l(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length;n++,r=r.sqr())if(0!==t[n])break;if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-a|h>>>a,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return!1;var a=this.words[r];return!!(a&i)},a.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;a-=67108863&u,s=(a>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)a=(0|this.words[i+r])+s,s=a>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)a=-(0|this.words[i])+s,s=a>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1],s=this._countBits(o);r=26-s,0!==r&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var u,c=n.length-i.length;if("mod"!==t){u=new a(null),u.length=c+1,u.words=new Array(u.length);for(var f=0;f<u.length;f++)u.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,c);0===h.negative&&(n=h,u&&(u.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,l);while(0!==n.negative)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:u||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++c;var f=r.clone(),h=t.clone();while(!t.isZero()){for(var l=0,d=1;0===(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0){t.iushrn(l);while(l-- >0)(i.isOdd()||o.isOdd())&&(i.iadd(f),o.isub(h)),i.iushrn(1),o.iushrn(1)}for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0){r.iushrn(p);while(p-- >0)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1)}t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(u)):(r.isub(t),s.isub(i),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i,o=new a(1),s=new a(0),u=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0){t.iushrn(c);while(c-- >0)o.isOdd()&&o.iadd(u),o.iushrn(1)}for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0){r.iushrn(h);while(h-- >0)s.isOdd()&&s.iadd(u),s.iushrn(1)}t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return i=0===t.cmpn(1)?o:s,i.cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(w,b),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,b),i(x,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new M;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1),o=0;while(!i.isZero()&&0===i.andln(1))o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new a(2*f*f).toRed(this);while(0!==this.pow(f,c).cmp(u))f.redIAdd(u);var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;while(0!==d.cmp(s)){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new a(1).iushln(p-g-1));l=l.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return l},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=4,n=new Array(1<<r);n[0]=new a(1).toRed(this),n[1]=e;for(var i=2;i<n.length;i++)n[i]=this.mul(n[i-1],e);var o=n[0],s=0,u=0,c=t.bitLength()%26;for(0===c&&(c=26),i=t.length-1;i>=0;i--){for(var f=t.words[i],h=c-1;h>=0;h--){var l=f>>h&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,u++,(u===r||0===i&&0===h)&&(o=this.mul(o,n[s]),u=0,s=0)):u=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new N(e)},i(N,S),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},N.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(e,this)}).call(this,r("62e4")(e))},a49d:function(e,t,r){var n;(function(i,a,o){var s,u=256,c=6,f=52,h="random",l=o.pow(u,c),d=o.pow(2,f),p=2*d,m=u-1;function g(e,t,r){var n=[];t=1==t?{entropy:!0}:t||{};var i=w(b(t.entropy?[e,x(a)]:null==e?M():e,3),n),s=new v(n),f=function(){var e=s.g(c),t=l,r=0;while(e<d)e=(e+r)*u,t*=u,r=s.g(1);while(e>=p)e/=2,t/=2,r>>>=1;return(e+r)/t};return f.int32=function(){return 0|s.g(4)},f.quick=function(){return s.g(4)/4294967296},f.double=f,w(x(s.S),a),(t.pass||r||function(e,t,r,n){return n&&(n.S&&y(n,s),e.state=function(){return y(s,{})}),r?(o[h]=e,t):e})(f,i,"global"in t?t.global:this==o,t.state)}function v(e){var t,r=e.length,n=this,i=0,a=n.i=n.j=0,o=n.S=[];r||(e=[r++]);while(i<u)o[i]=i++;for(i=0;i<u;i++)o[i]=o[a=m&a+e[i%r]+(t=o[i])],o[a]=t;(n.g=function(e){var t,r=0,i=n.i,a=n.j,o=n.S;while(e--)t=o[i=m&i+1],r=r*u+o[m&(o[i]=o[a=m&a+t])+(o[a]=t)];return n.i=i,n.j=a,r})(u)}function y(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function b(e,t){var r,n=[],i=typeof e;if(t&&"object"==i)for(r in e)try{n.push(b(e[r],t-1))}catch(a){}return n.length?n:"string"==i?e:e+"\0"}function w(e,t){var r,n=e+"",i=0;while(i<n.length)t[m&i]=m&(r^=19*t[m&i])+n.charCodeAt(i++);return x(t)}function M(){try{var e;return s&&(e=s.randomBytes)?e=e(u):(e=new Uint8Array(u),(i.crypto||i.msCrypto).getRandomValues(e)),x(e)}catch(n){var t=i.navigator,r=t&&t.plugins;return[+new Date,i,r,i.screen,x(a)]}}function x(e){return String.fromCharCode.apply(0,e)}if(w(o.random(),a),e.exports){e.exports=g;try{s=r(0)}catch(_){}}else n=function(){return g}.call(t,r,t,e),void 0===n||(e.exports=n)})("undefined"!==typeof self?self:this,[],Math)},a49e:function(e,t,r){(function(e){var n;(function(e,i,a){function o(e){var t=this,r="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,t.v=0,e===(0|e)?t.x=e:r+=e;for(var n=0;n<r.length+64;n++)t.x^=0|r.charCodeAt(n),n==r.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function s(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function u(e,t){var r=new o(e),n=t&&t.state,i=function(){return(r.next()>>>0)/4294967296};return i.double=function(){do{var e=r.next()>>>11,t=(r.next()>>>0)/4294967296,n=(e+t)/(1<<21)}while(0===n);return n},i.int32=r.next,i.quick=i,n&&("object"==typeof n&&s(n,r),i.state=function(){return s(r,{})}),i}i&&i.exports?i.exports=u:r("07d6")&&r("3c35")?(n=function(){return u}.call(t,r,t,i),void 0===n||(i.exports=n)):this.xorwow=u})(0,e,r("07d6"))}).call(this,r("62e4")(e))},a559:function(e,t,r){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports["default"]=e.exports,e.exports.__esModule=!0,n.apply(this,arguments)}r("cca6"),e.exports=n,e.exports["default"]=e.exports,e.exports.__esModule=!0},a691:function(e,t){var r=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:r)(e)}},a8f0:function(e,t,r){var n=r("b639"),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),a(i,o),o.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"===typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},a958:function(e,t,r){(function(t){var n=r("a25c"),i=r("11dc");function a(e){var t=s(e),r=t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed();return{blinder:r,unblinder:t.invm(e.modulus)}}function o(e,r){var i=a(r),o=r.modulus.byteLength(),s=(n.mont(r.modulus),new n(e).mul(i.blinder).umod(r.modulus)),u=s.toRed(n.mont(r.prime1)),c=s.toRed(n.mont(r.prime2)),f=r.coefficient,h=r.prime1,l=r.prime2,d=u.redPow(r.exponent1),p=c.redPow(r.exponent2);d=d.fromRed(),p=p.fromRed();var m=d.isub(p).imul(f).umod(h);return m.imul(l),p.iadd(m),new t(p.imul(i.unblinder).umod(r.modulus).toArray(!1,o))}function s(e){var t=e.modulus.byteLength(),r=new n(i(t));while(r.cmp(e.modulus)>=0||!r.umod(e.prime1)||!r.umod(e.prime2))r=new n(i(t));return r}e.exports=o,o.getr=s}).call(this,r("b639").Buffer)},aa56:function(e,t,r){"use strict";var n=r("c3c0"),i=n.rotr32;function a(e,t,r,n){return 0===e?o(t,r,n):1===e||3===e?u(t,r,n):2===e?s(t,r,n):void 0}function o(e,t,r){return e&t^~e&r}function s(e,t,r){return e&t^e&r^t&r}function u(e,t,r){return e^t^r}function c(e){return i(e,2)^i(e,13)^i(e,22)}function f(e){return i(e,6)^i(e,11)^i(e,25)}function h(e){return i(e,7)^i(e,18)^e>>>3}function l(e){return i(e,17)^i(e,19)^e>>>10}t.ft_1=a,t.ch32=o,t.maj32=s,t.p32=u,t.s0_256=c,t.s1_256=f,t.g0_256=h,t.g1_256=l},ac4f:function(e,t,r){"use strict";var n;function i(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var a=r("d113").codes,o=a.ERR_MISSING_ARGS,s=a.ERR_STREAM_DESTROYED;function u(e){if(e)throw e}function c(e){return e.setHeader&&"function"===typeof e.abort}function f(e,t,a,o){o=i(o);var u=!1;e.on("close",(function(){u=!0})),void 0===n&&(n=r("42a7")),n(e,{readable:t,writable:a},(function(e){if(e)return o(e);u=!0,o()}));var f=!1;return function(t){if(!u&&!f)return f=!0,c(e)?e.abort():"function"===typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}function h(e){e()}function l(e,t){return e.pipe(t)}function d(e){return e.length?"function"!==typeof e[e.length-1]?u:e.pop():u}function p(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=d(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,r){var o=r<t.length-1,s=r>0;return f(e,o,s,(function(e){n||(n=e),e&&a.forEach(h),o||(a.forEach(h),i(n))}))}));return t.reduce(l)}e.exports=p},ad25:function(e,t,r){var n=r("2aee"),i=r("11dc"),a=r("98e6"),o=r("f460"),s=r("83d5"),u=r("0106"),c=r("5291"),f=r("a958"),h=r("8707").Buffer;function l(e,t){var r=e.modulus.byteLength(),n=t.length,c=a("sha1").update(h.alloc(0)).digest(),f=c.length,l=2*f;if(n>r-l-2)throw new Error("message too long");var d=h.alloc(r-n-l-2),p=r-f-1,m=i(f),g=s(h.concat([c,d,h.alloc(1,1),t],p),o(m,p)),v=s(m,o(g,f));return new u(h.concat([h.alloc(1),v,g],r))}function d(e,t,r){var n,i=t.length,a=e.modulus.byteLength();if(i>a-11)throw new Error("message too long");return n=r?h.alloc(a-i-3,255):p(a-i-3),new u(h.concat([h.from([0,r?1:2]),n,h.alloc(1),t],a))}function p(e){var t,r=h.allocUnsafe(e),n=0,a=i(2*e),o=0;while(n<e)o===a.length&&(a=i(2*e),o=0),t=a[o++],t&&(r[n++]=t);return r}e.exports=function(e,t,r){var i;i=e.padding?e.padding:r?1:4;var a,o=n(e);if(4===i)a=l(o,t);else if(1===i)a=d(o,t,r);else{if(3!==i)throw new Error("unknown padding");if(a=new u(t),a.cmp(o.modulus)>=0)throw new Error("data too long for modulus")}return r?f(a,o):c(a,o)}},ad6d:function(e,t,r){"use strict";var n=r("825a");e.exports=function(){var e=n(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},ad71:function(e,t,r){"use strict";(function(t,n){var i=r("966d");e.exports=x;var a,o=r("e3db");x.ReadableState=M;r("faa1").EventEmitter;var s=function(e,t){return e.listeners(t).length},u=r("429b"),c=r("a8f0").Buffer,f=t.Uint8Array||function(){};function h(e){return c.from(e)}function l(e){return c.isBuffer(e)||e instanceof f}var d=Object.create(r("3a7c"));d.inherits=r("3fb5");var p=r(3),m=void 0;m=p&&p.debuglog?p.debuglog("stream"):function(){};var g,v=r("5e1a"),y=r("4681");d.inherits(x,u);var b=["error","close","destroy","pause","resume"];function w(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?o(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function M(e,t){a=a||r("b19a"),e=e||{};var n=t instanceof a;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,o=e.readableHighWaterMark,s=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(o||0===o)?o:s,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new v,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=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(g||(g=r("7d72").StringDecoder),this.decoder=new g(e.encoding),this.encoding=e.encoding)}function x(e){if(a=a||r("b19a"),!(this instanceof x))return new x(e);this._readableState=new M(e,this),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function _(e,t,r,n,i){var a,o=e._readableState;null===t?(o.reading=!1,O(e,o)):(i||(a=N(o,t)),a?e.emit("error",a):o.objectMode||t&&t.length>0?("string"===typeof t||o.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=h(t)),n?o.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):S(e,o,t,!0):o.ended?e.emit("error",new Error("stream.push() after EOF")):(o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?S(e,o,t,!1):R(e,o)):S(e,o,t,!1))):n||(o.reading=!1));return E(o)}function S(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&C(e)),R(e,t)}function N(e,t){var r;return l(t)||"string"===typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function E(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}Object.defineProperty(x.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),x.prototype.destroy=y.destroy,x.prototype._undestroy=y.undestroy,x.prototype._destroy=function(e,t){this.push(null),t(e)},x.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"===typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=c.from(e,t),t=""),r=!0),_(this,e,t,!1,r)},x.prototype.unshift=function(e){return _(this,e,null,!0,!1)},x.prototype.isPaused=function(){return!1===this._readableState.flowing},x.prototype.setEncoding=function(e){return g||(g=r("7d72").StringDecoder),this._readableState.decoder=new g(e),this._readableState.encoding=e,this};var A=8388608;function D(e){return e>=A?e=A:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function k(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=D(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,C(e)}}function C(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(m("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(T,e):T(e))}function T(e){m("emit readable"),e.emit("readable"),z(e)}function R(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(B,e,t))}function B(e,t){var r=t.length;while(!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark){if(m("maybeReadMore read 0"),e.read(0),r===t.length)break;r=t.length}t.readingMore=!1}function I(e){return function(){var t=e._readableState;m("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,z(e))}}function q(e){m("readable nexttick read 0"),e.read(0)}function P(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(j,e,t))}function j(e,t){t.reading||(m("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),z(e),t.flowing&&!t.reading&&e.read(0)}function z(e){var t=e._readableState;m("flow",t.flowing);while(t.flowing&&null!==e.read());}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=U(e,t.buffer,t.decoder),r);var r}function U(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?F(e,t):H(e,t),n}function F(e,t){var r=t.head,n=1,i=r.data;e-=i.length;while(r=r.next){var a=r.data,o=e>a.length?a.length:e;if(o===a.length?i+=a:i+=a.slice(0,e),e-=o,0===e){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}function H(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;n.data.copy(r),e-=n.data.length;while(n=n.next){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),e-=o,0===e){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}function Z(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(W,t,e))}function W(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function V(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}x.prototype.read=function(e){m("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return m("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?Z(this):C(this),null;if(e=k(e,t),0===e&&t.ended)return 0===t.length&&Z(this),null;var n,i=t.needReadable;return m("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,m("length less than watermark",i)),t.ended||t.reading?(i=!1,m("reading or ended",i)):i&&(m("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=k(r,t))),n=e>0?L(e,t):null,null===n?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Z(this)),null!==n&&this.emit("data",n),n},x.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},x.prototype.pipe=function(e,t){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e);break}a.pipesCount+=1,m("pipe count=%d opts=%j",a.pipesCount,t);var o=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr,u=o?f:M;function c(e,t){m("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,d())}function f(){m("onend"),e.end()}a.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",c);var h=I(r);e.on("drain",h);var l=!1;function d(){m("cleanup"),e.removeListener("close",y),e.removeListener("finish",b),e.removeListener("drain",h),e.removeListener("error",v),e.removeListener("unpipe",c),r.removeListener("end",f),r.removeListener("end",M),r.removeListener("data",g),l=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||h()}var p=!1;function g(t){m("ondata"),p=!1;var n=e.write(t);!1!==n||p||((1===a.pipesCount&&a.pipes===e||a.pipesCount>1&&-1!==V(a.pipes,e))&&!l&&(m("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function v(t){m("onerror",t),M(),e.removeListener("error",v),0===s(e,"error")&&e.emit("error",t)}function y(){e.removeListener("finish",b),M()}function b(){m("onfinish"),e.removeListener("close",y),M()}function M(){m("unpipe"),r.unpipe(e)}return r.on("data",g),w(e,"error",v),e.once("close",y),e.once("finish",b),e.emit("pipe",r),a.flowing||(m("pipe resume"),r.resume()),e},x.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,r);return this}var o=V(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},x.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&C(this):i.nextTick(q,this))}return r},x.prototype.addListener=x.prototype.on,x.prototype.resume=function(){var e=this._readableState;return e.flowing||(m("resume"),e.flowing=!0,P(this,e)),this},x.prototype.pause=function(){return m("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(m("pause"),this._readableState.flowing=!1,this.emit("pause")),this},x.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(m("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){if(m("wrapped data"),r.decoder&&(i=r.decoder.write(i)),(!r.objectMode||null!==i&&void 0!==i)&&(r.objectMode||i&&i.length)){var a=t.push(i);a||(n=!0,e.pause())}})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<b.length;a++)e.on(b[a],this.emit.bind(this,b[a]));return this._read=function(t){m("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(x.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),x._fromList=L}).call(this,r("c8ba"),r("4362"))},ae84:function(e,t,r){var n=r("8707").Buffer,i=r("f576");function a(e,t,r,a){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");var o=r/8,s=n.alloc(o),u=n.alloc(a||0),c=n.alloc(0);while(o>0||a>0){var f=new i;f.update(c),f.update(e),t&&f.update(t),c=f.digest();var h=0;if(o>0){var l=s.length-o;h=Math.min(o,c.length),c.copy(s,l,0,h),o-=h}if(h<c.length&&a>0){var d=u.length-a,p=Math.min(a,c.length-h);c.copy(u,d,h,h+p),a-=p}}return c.fill(0),{key:s,iv:u}}e.exports=a},b041:function(e,t,r){"use strict";var n=r("00ee"),i=r("f5df");e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},b0c0:function(e,t,r){var n=r("83ab"),i=r("9bf2").f,a=Function.prototype,o=a.toString,s=/^\s*function ([^ (]*)/,u="name";n&&!(u in a)&&i(a,u,{configurable:!0,get:function(){try{return o.call(this).match(s)[1]}catch(e){return""}}})},b19a:function(e,t,r){"use strict";var n=r("966d"),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=h;var a=Object.create(r("3a7c"));a.inherits=r("3fb5");var o=r("ad71"),s=r("dc14");a.inherits(h,o);for(var u=i(s.prototype),c=0;c<u.length;c++){var f=u[c];h.prototype[f]||(h.prototype[f]=s.prototype[f])}function h(e){if(!(this instanceof h))return new h(e);o.call(this,e),s.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",l)}function l(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),h.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},b4e8:function(e){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},b525:function(e,t,r){"use strict";var n=r("c3c0"),i=r("edc9"),a=r("da3e"),o=n.rotr64_hi,s=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,f=n.sum64,h=n.sum64_hi,l=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,v=i.BlockHash,y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=y,this.W=new Array(160)}function w(e,t,r,n,i){var a=e&r^~e&i;return a<0&&(a+=4294967296),a}function M(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function x(e,t,r,n,i){var a=e&r^e&i^r&i;return a<0&&(a+=4294967296),a}function _(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function S(e,t){var r=o(e,t,28),n=o(t,e,2),i=o(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function N(e,t){var r=s(e,t,28),n=s(t,e,2),i=s(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function E(e,t){var r=o(e,t,14),n=o(e,t,18),i=o(t,e,9),a=r^n^i;return a<0&&(a+=4294967296),a}function A(e,t){var r=s(e,t,14),n=s(e,t,18),i=s(t,e,9),a=r^n^i;return a<0&&(a+=4294967296),a}function D(e,t){var r=o(e,t,1),n=o(e,t,8),i=u(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function k(e,t){var r=s(e,t,1),n=s(e,t,8),i=c(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function O(e,t){var r=o(e,t,19),n=o(t,e,29),i=u(e,t,6),a=r^n^i;return a<0&&(a+=4294967296),a}function C(e,t){var r=s(e,t,19),n=s(t,e,29),i=c(e,t,6),a=r^n^i;return a<0&&(a+=4294967296),a}n.inherits(b,v),e.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=O(r[n-4],r[n-3]),a=C(r[n-4],r[n-3]),o=r[n-14],s=r[n-13],u=D(r[n-30],r[n-29]),c=k(r[n-30],r[n-29]),f=r[n-32],h=r[n-31];r[n]=d(i,a,o,s,u,c,f,h),r[n+1]=p(i,a,o,s,u,c,f,h)}},b.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],o=this.h[2],s=this.h[3],u=this.h[4],c=this.h[5],d=this.h[6],p=this.h[7],v=this.h[8],y=this.h[9],b=this.h[10],D=this.h[11],k=this.h[12],O=this.h[13],C=this.h[14],T=this.h[15];a(this.k.length===r.length);for(var R=0;R<r.length;R+=2){var B=C,I=T,q=E(v,y),P=A(v,y),j=w(v,y,b,D,k,O),z=M(v,y,b,D,k,O),L=this.k[R],U=this.k[R+1],F=r[R],H=r[R+1],Z=m(B,I,q,P,j,z,L,U,F,H),W=g(B,I,q,P,j,z,L,U,F,H);B=S(n,i),I=N(n,i),q=x(n,i,o,s,u,c),P=_(n,i,o,s,u,c);var V=h(B,I,q,P),G=l(B,I,q,P);C=k,T=O,k=b,O=D,b=v,D=y,v=h(d,p,Z,W),y=l(p,p,Z,W),d=u,p=c,u=o,c=s,o=n,s=i,n=h(Z,W,V,G),i=l(Z,W,V,G)}f(this.h,0,n,i),f(this.h,2,o,s),f(this.h,4,u,c),f(this.h,6,d,p),f(this.h,8,v,y),f(this.h,10,b,D),f(this.h,12,k,O),f(this.h,14,C,T)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},b5ca:function(e,t,r){"use strict";var n=r("b639").Buffer,i=r("3fb5"),a=r("93e6"),o=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function d(){a.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,r,n,i,a,o,s){return p(e+(t^r^n)+a+o|0,s)+i|0}function g(e,t,r,n,i,a,o,s){return p(e+(t&r|~t&n)+a+o|0,s)+i|0}function v(e,t,r,n,i,a,o,s){return p(e+((t|~r)^n)+a+o|0,s)+i|0}function y(e,t,r,n,i,a,o,s){return p(e+(t&n|r&~n)+a+o|0,s)+i|0}function b(e,t,r,n,i,a,o,s){return p(e+(t^(r|~n))+a+o|0,s)+i|0}i(d,a),d.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,a=0|this._d,d=0|this._e,w=0|this._a,M=0|this._b,x=0|this._c,_=0|this._d,S=0|this._e,N=0;N<80;N+=1){var E,A;N<16?(E=m(r,n,i,a,d,e[s[N]],h[0],c[N]),A=b(w,M,x,_,S,e[u[N]],l[0],f[N])):N<32?(E=g(r,n,i,a,d,e[s[N]],h[1],c[N]),A=y(w,M,x,_,S,e[u[N]],l[1],f[N])):N<48?(E=v(r,n,i,a,d,e[s[N]],h[2],c[N]),A=v(w,M,x,_,S,e[u[N]],l[2],f[N])):N<64?(E=y(r,n,i,a,d,e[s[N]],h[3],c[N]),A=g(w,M,x,_,S,e[u[N]],l[3],f[N])):(E=b(r,n,i,a,d,e[s[N]],h[4],c[N]),A=m(w,M,x,_,S,e[u[N]],l[4],f[N])),r=d,d=a,a=p(i,10),i=n,n=E,w=S,S=_,_=p(x,10),x=M,M=A}var D=this._b+i+_|0;this._b=this._c+a+S|0,this._c=this._d+d+w|0,this._d=this._e+r+M|0,this._e=this._a+n+x|0,this._a=D},d.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 e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=d},b622:function(e,t,r){var n=r("da84"),i=r("5692"),a=r("5135"),o=r("90e3"),s=r("4930"),u=r("fdbf"),c=i("wks"),f=n.Symbol,h=u?f:f&&f.withoutSetter||o;e.exports=function(e){return a(c,e)||(s&&a(f,e)?c[e]=f[e]:c[e]=h("Symbol."+e)),c[e]}},b639:function(e,t,r){"use strict";(function(e){
|
|
13
|
-
/*!
|
|
14
|
-
* The buffer module from node.js, for the browser.
|
|
15
|
-
*
|
|
16
|
-
* @author Feross Aboukhadijeh <http://feross.org>
|
|
17
|
-
* @license MIT
|
|
18
|
-
*/
|
|
19
|
-
var n=r("1fb5"),i=r("9152"),a=r("e3db");function o(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"===typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(t){return!1}}function s(){return c.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return c.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=c.prototype):(null===e&&(e=new c(t)),e.length=t),e}function c(e,t,r){if(!c.TYPED_ARRAY_SUPPORT&&!(this instanceof c))return new c(e,t,r);if("number"===typeof e){if("string"===typeof t)throw new Error("If encoding is specified then the first argument must be a string");return d(this,e)}return f(this,e,t,r)}function f(e,t,r,n){if("number"===typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!==typeof ArrayBuffer&&t instanceof ArrayBuffer?g(e,t,r,n):"string"===typeof t?p(e,t,r):v(e,t)}function h(e){if("number"!==typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function l(e,t,r,n){return h(t),t<=0?u(e,t):void 0!==r?"string"===typeof n?u(e,t).fill(r,n):u(e,t).fill(r):u(e,t)}function d(e,t){if(h(t),e=u(e,t<0?0:0|y(t)),!c.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function p(e,t,r){if("string"===typeof r&&""!==r||(r="utf8"),!c.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|w(t,r);e=u(e,n);var i=e.write(t,r);return i!==n&&(e=e.slice(0,i)),e}function m(e,t){var r=t.length<0?0:0|y(t.length);e=u(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function g(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),c.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=c.prototype):e=m(e,t),e}function v(e,t){if(c.isBuffer(t)){var r=0|y(t.length);return e=u(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!==typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!==typeof t.length||te(t.length)?u(e,0):m(e,t);if("Buffer"===t.type&&a(t.data))return m(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function y(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function b(e){return+e!=e&&(e=0),c.alloc(+e)}function w(e,t){if(c.isBuffer(e))return e.length;if("undefined"!==typeof ArrayBuffer&&"function"===typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!==typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Q(e).length;default:if(n)return J(e).length;t=(""+t).toLowerCase(),n=!0}}function M(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";e||(e="utf8");while(1)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return q(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function x(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function _(e,t,r,n,i){if(0===e.length)return-1;if("string"===typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"===typeof t&&(t=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:S(e,t,r,n,i);if("number"===typeof t)return t&=255,c.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):S(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function S(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var f=-1;for(a=r;a<s;a++)if(c(e,a)===c(t,-1===f?0:a-f)){if(-1===f&&(f=a),a-f+1===u)return f*o}else-1!==f&&(a-=a-f),f=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var h=!0,l=0;l<u;l++)if(c(e,a+l)!==c(t,l)){h=!1;break}if(h)return a}return-1}function N(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n),n>i&&(n=i)):n=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function E(e,t,r,n){return ee(J(t,e.length-r),e,r,n)}function A(e,t,r,n){return ee(Y(t),e,r,n)}function D(e,t,r,n){return A(e,t,r,n)}function k(e,t,r,n){return ee(Q(t),e,r,n)}function O(e,t,r,n){return ee(X(t,e.length-r),e,r,n)}function C(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);var n=[],i=t;while(i<r){var a,o,s,u,c=e[i],f=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(f=c);break;case 2:a=e[i+1],128===(192&a)&&(u=(31&c)<<6|63&a,u>127&&(f=u));break;case 3:a=e[i+1],o=e[i+2],128===(192&a)&&128===(192&o)&&(u=(15&c)<<12|(63&a)<<6|63&o,u>2047&&(u<55296||u>57343)&&(f=u));break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128===(192&a)&&128===(192&o)&&128===(192&s)&&(u=(15&c)<<18|(63&a)<<12|(63&o)<<6|63&s,u>65535&&u<1114112&&(f=u))}null===f?(f=65533,h=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=h}return B(n)}t.Buffer=c,t.SlowBuffer=b,t.INSPECT_MAX_BYTES=50,c.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:o(),t.kMaxLength=s(),c.poolSize=8192,c._augment=function(e){return e.__proto__=c.prototype,e},c.from=function(e,t,r){return f(null,e,t,r)},c.TYPED_ARRAY_SUPPORT&&(c.prototype.__proto__=Uint8Array.prototype,c.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&c[Symbol.species]===c&&Object.defineProperty(c,Symbol.species,{value:null,configurable:!0})),c.alloc=function(e,t,r){return l(null,e,t,r)},c.allocUnsafe=function(e){return d(null,e)},c.allocUnsafeSlow=function(e){return d(null,e)},c.isBuffer=function(e){return!(null==e||!e._isBuffer)},c.compare=function(e,t){if(!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!a(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=c.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!c.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},c.byteLength=w,c.prototype._isBuffer=!0,c.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)x(this,t,t+1);return this},c.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},c.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},c.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?T(this,0,e):M.apply(this,arguments)},c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},c.prototype.compare=function(e,t,r,n,i){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,o=r-t,s=Math.min(a,o),u=this.slice(n,i),f=e.slice(t,r),h=0;h<s;++h)if(u[h]!==f[h]){a=u[h],o=f[h];break}return a<o?-1:o<a?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return _(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return _(this,e,t,r,!1)},c.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"===typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return N(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":return A(this,e,t,r);case"latin1":case"binary":return D(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function B(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var r="",n=0;while(n<t)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}function I(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function q(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=K(e[a]);return i}function j(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function z(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,r,n,i,a){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function U(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i<a;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function F(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i<a;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function H(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Z(e,t,r,n,a){return a||H(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function W(e,t,r,n,a){return a||H(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}c.prototype.slice=function(e,t){var r,n=this.length;if(e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e),c.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=c.prototype;else{var i=t-e;r=new c(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e]}return r},c.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||z(e,t,this.length);var n=this[e],i=1,a=0;while(++a<t&&(i*=256))n+=this[e+a]*i;return n},c.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||z(e,t,this.length);var n=this[e+--t],i=1;while(t>0&&(i*=256))n+=this[e+--t]*i;return n},c.prototype.readUInt8=function(e,t){return t||z(e,1,this.length),this[e]},c.prototype.readUInt16LE=function(e,t){return t||z(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUInt16BE=function(e,t){return t||z(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUInt32LE=function(e,t){return t||z(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUInt32BE=function(e,t){return t||z(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||z(e,t,this.length);var n=this[e],i=1,a=0;while(++a<t&&(i*=256))n+=this[e+a]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||z(e,t,this.length);var n=t,i=1,a=this[e+--n];while(n>0&&(i*=256))a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},c.prototype.readInt8=function(e,t){return t||z(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){t||z(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){t||z(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(e,t){return t||z(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return t||z(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readFloatLE=function(e,t){return t||z(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return t||z(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return t||z(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return t||z(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;L(this,e,t,r,i,0)}var a=1,o=0;this[t]=255&e;while(++o<r&&(a*=256))this[t+o]=e/a&255;return t+r},c.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;L(this,e,t,r,i,0)}var a=r-1,o=1;this[t+a]=255&e;while(--a>=0&&(o*=256))this[t+a]=e/o&255;return t+r},c.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,1,255,0),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,65535,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):F(this,e,t,!0),t+4},c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,4294967295,0),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);L(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;this[t]=255&e;while(++a<r&&(o*=256))e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);L(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;this[t+a]=255&e;while(--a>=0&&(o*=256))e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,1,127,-128),c.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):U(this,e,t,!0),t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,2,32767,-32768),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):U(this,e,t,!1),t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,2147483647,-2147483648),c.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):F(this,e,t,!0),t+4},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),c.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):F(this,e,t,!1),t+4},c.prototype.writeFloatLE=function(e,t,r){return Z(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return Z(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return W(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return W(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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-t<n-r&&(n=e.length-t+r);var i,a=n-r;if(this===e&&r<t&&t<n)for(i=a-1;i>=0;--i)e[i+t]=this[i+r];else if(a<1e3||!c.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},c.prototype.fill=function(e,t,r,n){if("string"===typeof e){if("string"===typeof t?(n=t,t=0,r=this.length):"string"===typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!==typeof n)throw new TypeError("encoding must be a string");if("string"===typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"===typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=c.isBuffer(e)?e:J(new c(e,n).toString()),s=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%s]}return this};var V=/[^+\/0-9A-Za-z-_]/g;function G(e){if(e=$(e).replace(V,""),e.length<2)return"";while(e.length%4!==0)e+="=";return e}function $(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function J(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function Y(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function X(e,t){for(var r,n,i,a=[],o=0;o<e.length;++o){if((t-=2)<0)break;r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n)}return a}function Q(e){return n.toByteArray(G(e))}function ee(e,t,r,n){for(var i=0;i<n;++i){if(i+r>=t.length||i>=e.length)break;t[i+r]=e[i]}return i}function te(e){return e!==e}}).call(this,r("c8ba"))},b672:function(e,t,r){var n=r("8707").Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"===typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,a=e.length,o=this._len,s=0;s<a;){for(var u=o%i,c=Math.min(a-s,i-u),f=0;f<c;f++)r[u+f]=e[s+f];o+=c,s+=c,o%i===0&&this._update(r)}return this._len+=a,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=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 n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},b692:function(e,t,r){var n=r("8707").Buffer,i=r("98e6"),a=r("34d5"),o=r("3fb5"),s=r("6fe7"),u=r("980c"),c=r("b4e8");function f(e){a.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){a.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function l(e){return new f(e)}function d(e){return new h(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),o(f,a.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return"string"===typeof e&&(e=n.from(e,t)),this._hash.update(e),this},f.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=s(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},o(h,a.Writable),h.prototype._write=function(e,t,r){this._hash.update(e),r()},h.prototype.update=function(e,t){return"string"===typeof e&&(e=n.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,r){"string"===typeof t&&(t=n.from(t,r)),this.end();var i=this._hash.digest();return u(t,i,e,this._signType,this._tag)},e.exports={Sign:l,Verify:d,createSign:l,createVerify:d}},b73f:function(e,t,r){"use strict";var n=r("80af"),i=r("f3a3"),a=i.assert;function o(e,t){if(e instanceof o)return e;this._importDER(e,t)||(a(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,a=0,o=t.place;a<n;a++,o++)i<<=8,i|=e[o],i>>>=0;return!(i<=127)&&(t.place=o,i)}function c(e){var t=0,r=e.length-1;while(!e[t]&&!(128&e[t+1])&&t<r)t++;return 0===t?e:e.slice(t)}function f(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);e.push(128|r);while(--r)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=o,o.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new s;if(48!==e[r.place++])return!1;var a=u(e,r);if(!1===a)return!1;if(a+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;var c=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var f=u(e,r);if(!1===f)return!1;if(e.length!==f+r.place)return!1;var h=e.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new n(c),this.s=new n(h),this.recoveryParam=null,!0},o.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);while(!r[0]&&!(128&r[1]))r=r.slice(1);var n=[2];f(n,t.length),n=n.concat(t),n.push(2),f(n,r.length);var a=n.concat(r),o=[48];return f(o,a.length),o=o.concat(a),i.encode(o,e)}},b7d1:function(e,t,r){(function(t){function r(e,t){if(n("noDeprecation"))return e;var r=!1;function i(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return i}function n(e){try{if(!t.localStorage)return!1}catch(n){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=r}).call(this,r("c8ba"))},b837:function(e,t,r){var n=r("3fb5"),i=r("4fd1"),a=r("b672"),o=r("8707").Buffer,s=new Array(160);function u(){this.init(),this._w=s,a.call(this,128,112)}n(u,i),u.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},u.prototype._hash=function(){var e=o.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},b838:function(e,t,r){(function(e){var n;(function(e,i,a){function o(e){var t=this,r="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:r+=e;for(var n=0;n<r.length+64;n++)t.x^=0|r.charCodeAt(n),t.next()}function s(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function u(e,t){var r=new o(e),n=t&&t.state,i=function(){return(r.next()>>>0)/4294967296};return i.double=function(){do{var e=r.next()>>>11,t=(r.next()>>>0)/4294967296,n=(e+t)/(1<<21)}while(0===n);return n},i.int32=r.next,i.quick=i,n&&("object"==typeof n&&s(n,r),i.state=function(){return s(r,{})}),i}i&&i.exports?i.exports=u:r("07d6")&&r("3c35")?(n=function(){return u}.call(t,r,t,i),void 0===n||(i.exports=n)):this.xor128=u})(0,e,r("07d6"))}).call(this,r("62e4")(e))},b9a8:function(e,t,r){"use strict";var n=r("80af"),i=r("6aa2"),a=r("f3a3"),o=r("0cbb"),s=r("fdac"),u=a.assert,c=r("bb34"),f=r("b73f");function h(e){if(!(this instanceof h))return new h(e);"string"===typeof e&&(u(o.hasOwnProperty(e),"Unknown curve "+e),e=o[e]),e instanceof o.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=h,h.prototype.keyPair=function(e){return new c(this,e)},h.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},h.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},h.prototype.genKeyPair=function(e){e||(e={});var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),a=this.n.sub(new n(2));do{var o=new n(t.generate(r));if(!(o.cmp(a)>0))return o.iaddn(1),this.keyFromPrivate(o)}while(1)},h.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},h.prototype.sign=function(e,t,r,a){"object"===typeof r&&(a=r,r=null),a||(a={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new n(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),u=e.toArray("be",o),c=new i({hash:this.hash,entropy:s,nonce:u,pers:a.pers,persEnc:a.persEnc||"utf8"}),h=this.n.sub(new n(1)),l=0;1;l++){var d=a.k?a.k(l):new n(c.generate(this.n.byteLength()));if(d=this._truncateToN(d,!0),!(d.cmpn(1)<=0||d.cmp(h)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=d.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(v=v.umod(this.n),0!==v.cmpn(0)){var y=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return a.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),y^=1),new f({r:g,s:v,recoveryParam:y})}}}}}},h.prototype.verify=function(e,t,r,i){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,i),t=new f(t,"hex");var a=t.r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),u=s.mul(e).umod(this.n),c=s.mul(a).umod(this.n);if(!this.curve._maxwellTrick){var h=this.g.mulAdd(u,r.getPublic(),c);return!h.isInfinity()&&0===h.getX().umod(this.n).cmp(a)}h=this.g.jmulAdd(u,r.getPublic(),c);return!h.isInfinity()&&h.eqXToP(a)},h.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new f(t,i);var a=this.n,o=new n(e),s=t.r,c=t.s,h=1&r,l=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");s=l?this.curve.pointFromX(s.add(this.curve.n),h):this.curve.pointFromX(s,h);var d=t.r.invm(a),p=a.sub(o).mul(d).umod(a),m=c.mul(d).umod(a);return this.g.mulAdd(p,s,m)},h.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new f(t,n),null!==t.recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},b9b5:function(e,t,r){"use strict";var n=r("9d8a").codes.ERR_INVALID_OPT_VALUE;function i(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function a(e,t,r,a){var o=i(t,a,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0){var s=a?r:"highWaterMark";throw new n(s,o)}return Math.floor(o)}return e.objectMode?16:16384}e.exports={getHighWaterMark:a}},bac2:function(e,t,r){var n={ECB:r("0145"),CBC:r("c119"),CFB:r("3505"),CFB8:r("62c9"),CFB1:r("5239"),OFB:r("5165"),CTR:r("6ade"),GCM:r("6ade")},i=r("e85f");for(var a in i)i[a].module=n[i[a].mode];e.exports=i},bb34:function(e,t,r){"use strict";var n=r("80af"),i=r("f3a3"),a=i.assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?a(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||a(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},bb44:function(e,t,r){"use strict";var n=r("c3c0"),i=r("edc9"),a=n.rotl32,o=n.sum32,s=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function l(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(f,c),t.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],f=this.h[4],y=r,b=n,w=i,M=c,x=f,_=0;_<80;_++){var S=o(a(u(r,h(_,n,i,c),e[p[_]+t],l(_)),g[_]),f);r=f,f=c,c=a(i,10),i=n,n=S,S=o(a(u(y,h(79-_,b,w,M),e[m[_]+t],d(_)),v[_]),x),y=x,x=M,M=a(w,10),w=b,b=S}S=s(this.h[1],i,M),this.h[1]=s(this.h[2],c,x),this.h[2]=s(this.h[3],f,y),this.h[3]=s(this.h[4],r,b),this.h[4]=s(this.h[0],n,w),this.h[0]=S},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],m=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],v=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},bc12:function(e,t,r){(function(e){(function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(13).Buffer}catch(E){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a<i;a++){var o=e.charCodeAt(a)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function u(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=e.length-6,n=0;r>=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,a+=24,a>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,f=r;f<s;f+=n)c=u(e,f,f+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var h=1;for(c=u(e,f,e.length,t),f=0;f<o;f++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){while(this.length<e)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&0===this.words[this.length-1])this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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],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];function l(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;i=0|e.words[p],a=0|t.words[d],o=i*a+h,f+=o/67108864|0,h=67108863&o}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<i|a)).toString(16);a=s>>>24-i&16777215,r=0!==a||o!==this.length-1?c[6-u.length]+u+r:u+r,i+=2,i>=26&&(i-=26,o--)}0!==a&&(r=a.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(d).toString(e);p=p.idivn(d),r=p.isZero()?m+r:c[l-m.length]+m+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n("undefined"!==typeof o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===t,c=new e(a),f=this.clone();if(u){for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){while(this.length<e.length)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)t=(0|r.words[o])-(0|n.words[o])+a,a=t>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)t=(0|r.words[o])+a,a=t>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,s=t.words,u=r.words,c=0,f=0|o[0],h=8191&f,l=f>>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],w=8191&b,M=b>>>13,x=0|o[4],_=8191&x,S=x>>>13,N=0|o[5],E=8191&N,A=N>>>13,D=0|o[6],k=8191&D,O=D>>>13,C=0|o[7],T=8191&C,R=C>>>13,B=0|o[8],I=8191&B,q=B>>>13,P=0|o[9],j=8191&P,z=P>>>13,L=0|s[0],U=8191&L,F=L>>>13,H=0|s[1],Z=8191&H,W=H>>>13,V=0|s[2],G=8191&V,$=V>>>13,K=0|s[3],J=8191&K,Y=K>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,F),i=i+Math.imul(l,U)|0,a=Math.imul(l,F);var ge=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=Math.imul(p,F),i=i+Math.imul(m,U)|0,a=Math.imul(m,F),n=n+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(l,Z)|0,a=a+Math.imul(l,W)|0;var ve=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,U),i=Math.imul(v,F),i=i+Math.imul(y,U)|0,a=Math.imul(y,F),n=n+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(h,G)|0,i=i+Math.imul(h,$)|0,i=i+Math.imul(l,G)|0,a=a+Math.imul(l,$)|0;var ye=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=Math.imul(w,F),i=i+Math.imul(M,U)|0,a=Math.imul(M,F),n=n+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(y,Z)|0,a=a+Math.imul(y,W)|0,n=n+Math.imul(p,G)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(m,G)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,Y)|0,i=i+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0;var be=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,U),i=Math.imul(_,F),i=i+Math.imul(S,U)|0,a=Math.imul(S,F),n=n+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,n=n+Math.imul(v,G)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(y,G)|0,a=a+Math.imul(y,$)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,ee)|0,i=i+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0;var we=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,U),i=Math.imul(E,F),i=i+Math.imul(A,U)|0,a=Math.imul(A,F),n=n+Math.imul(_,Z)|0,i=i+Math.imul(_,W)|0,i=i+Math.imul(S,Z)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(w,G)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(M,G)|0,a=a+Math.imul(M,$)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(h,re)|0,i=i+Math.imul(h,ne)|0,i=i+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0;var Me=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(k,U),i=Math.imul(k,F),i=i+Math.imul(O,U)|0,a=Math.imul(O,F),n=n+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,i=i+Math.imul(A,Z)|0,a=a+Math.imul(A,W)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(S,G)|0,a=a+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,i=i+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,n=n+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(h,ae)|0,i=i+Math.imul(h,oe)|0,i=i+Math.imul(l,ae)|0,a=a+Math.imul(l,oe)|0;var xe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),i=Math.imul(T,F),i=i+Math.imul(R,U)|0,a=Math.imul(R,F),n=n+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(O,Z)|0,a=a+Math.imul(O,W)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(A,G)|0,a=a+Math.imul(A,$)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Y)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(h,ue)|0,i=i+Math.imul(h,ce)|0,i=i+Math.imul(l,ue)|0,a=a+Math.imul(l,ce)|0;var _e=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,U),i=Math.imul(I,F),i=i+Math.imul(q,U)|0,a=Math.imul(q,F),n=n+Math.imul(T,Z)|0,i=i+Math.imul(T,W)|0,i=i+Math.imul(R,Z)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(k,G)|0,i=i+Math.imul(k,$)|0,i=i+Math.imul(O,G)|0,a=a+Math.imul(O,$)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Y)|0,i=i+Math.imul(A,J)|0,a=a+Math.imul(A,Y)|0,n=n+Math.imul(_,Q)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,n=n+Math.imul(p,ue)|0,i=i+Math.imul(p,ce)|0,i=i+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(h,he)|0,i=i+Math.imul(h,le)|0,i=i+Math.imul(l,he)|0,a=a+Math.imul(l,le)|0;var Se=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,U),i=Math.imul(j,F),i=i+Math.imul(z,U)|0,a=Math.imul(z,F),n=n+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0,i=i+Math.imul(q,Z)|0,a=a+Math.imul(q,W)|0,n=n+Math.imul(T,G)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(R,G)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,i=i+Math.imul(O,J)|0,a=a+Math.imul(O,Y)|0,n=n+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,n=n+Math.imul(v,ue)|0,i=i+Math.imul(v,ce)|0,i=i+Math.imul(y,ue)|0,a=a+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=i+Math.imul(p,le)|0,i=i+Math.imul(m,he)|0,a=a+Math.imul(m,le)|0,n=n+Math.imul(h,pe)|0,i=i+Math.imul(h,me)|0,i=i+Math.imul(l,pe)|0,a=a+Math.imul(l,me)|0;var Ne=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,Z),i=Math.imul(j,W),i=i+Math.imul(z,Z)|0,a=Math.imul(z,W),n=n+Math.imul(I,G)|0,i=i+Math.imul(I,$)|0,i=i+Math.imul(q,G)|0,a=a+Math.imul(q,$)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Y)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,i=i+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,ue)|0,i=i+Math.imul(w,ce)|0,i=i+Math.imul(M,ue)|0,a=a+Math.imul(M,ce)|0,n=n+Math.imul(v,he)|0,i=i+Math.imul(v,le)|0,i=i+Math.imul(y,he)|0,a=a+Math.imul(y,le)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,me)|0;var Ee=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,G),i=Math.imul(j,$),i=i+Math.imul(z,G)|0,a=Math.imul(z,$),n=n+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,i=i+Math.imul(q,J)|0,a=a+Math.imul(q,Y)|0,n=n+Math.imul(T,Q)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,i=i+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(_,ue)|0,i=i+Math.imul(_,ce)|0,i=i+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,he)|0,i=i+Math.imul(w,le)|0,i=i+Math.imul(M,he)|0,a=a+Math.imul(M,le)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(y,pe)|0,a=a+Math.imul(y,me)|0;var Ae=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=Math.imul(j,Y),i=i+Math.imul(z,J)|0,a=Math.imul(z,Y),n=n+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,i=i+Math.imul(q,Q)|0,a=a+Math.imul(q,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(k,ae)|0,i=i+Math.imul(k,oe)|0,i=i+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(E,ue)|0,i=i+Math.imul(E,ce)|0,i=i+Math.imul(A,ue)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(_,he)|0,i=i+Math.imul(_,le)|0,i=i+Math.imul(S,he)|0,a=a+Math.imul(S,le)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(M,pe)|0,a=a+Math.imul(M,me)|0;var De=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,Q),i=Math.imul(j,ee),i=i+Math.imul(z,Q)|0,a=Math.imul(z,ee),n=n+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,i=i+Math.imul(q,re)|0,a=a+Math.imul(q,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(k,ue)|0,i=i+Math.imul(k,ce)|0,i=i+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(E,he)|0,i=i+Math.imul(E,le)|0,i=i+Math.imul(A,he)|0,a=a+Math.imul(A,le)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(S,pe)|0,a=a+Math.imul(S,me)|0;var ke=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,re),i=Math.imul(j,ne),i=i+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(I,ae)|0,i=i+Math.imul(I,oe)|0,i=i+Math.imul(q,ae)|0,a=a+Math.imul(q,oe)|0,n=n+Math.imul(T,ue)|0,i=i+Math.imul(T,ce)|0,i=i+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(k,he)|0,i=i+Math.imul(k,le)|0,i=i+Math.imul(O,he)|0,a=a+Math.imul(O,le)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(A,pe)|0,a=a+Math.imul(A,me)|0;var Oe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ae),i=Math.imul(j,oe),i=i+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(I,ue)|0,i=i+Math.imul(I,ce)|0,i=i+Math.imul(q,ue)|0,a=a+Math.imul(q,ce)|0,n=n+Math.imul(T,he)|0,i=i+Math.imul(T,le)|0,i=i+Math.imul(R,he)|0,a=a+Math.imul(R,le)|0,n=n+Math.imul(k,pe)|0,i=i+Math.imul(k,me)|0,i=i+Math.imul(O,pe)|0,a=a+Math.imul(O,me)|0;var Ce=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=Math.imul(j,ce),i=i+Math.imul(z,ue)|0,a=Math.imul(z,ce),n=n+Math.imul(I,he)|0,i=i+Math.imul(I,le)|0,i=i+Math.imul(q,he)|0,a=a+Math.imul(q,le)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(R,pe)|0,a=a+Math.imul(R,me)|0;var Te=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,he),i=Math.imul(j,le),i=i+Math.imul(z,he)|0,a=Math.imul(z,le),n=n+Math.imul(I,pe)|0,i=i+Math.imul(I,me)|0,i=i+Math.imul(q,pe)|0,a=a+Math.imul(q,me)|0;var Re=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,pe),i=Math.imul(j,me),i=i+Math.imul(z,pe)|0,a=Math.imul(z,me);var Be=(c+n|0)+((8191&i)<<13)|0;return c=(a+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=Me,u[6]=xe,u[7]=_e,u[8]=Se,u[9]=Ne,u[10]=Ee,u[11]=Ae,u[12]=De,u[13]=ke,u[14]=Oe,u[15]=Ce,u[16]=Te,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,u=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=u;c++){var f=a-c,h=0|e.words[f],l=0|t.words[c],d=h*l,p=67108863&d;o=o+(d/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function g(e,t,r){var n=new v;return n.mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?d(this,e,t):n<1024?m(this,e,t):g(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},v.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<o;d++){var p=r[f+d],m=n[f+d],g=r[f+d+o],v=n[f+d+o],y=h*g-l*v;v=h*v+l*g,g=y,r[f+d]=p+g,n[f+d]=m+v,r[f+d+o]=p-g,n[f+d+o]=m-v,d!==s&&(y=u*h-c*l,l=u*l+c*h,h=y)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0===(-8192&a))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,s,u,n,i),this.transform(c,a,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),g(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"===typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=l(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length;n++,r=r.sqr())if(0!==t[n])break;if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-a|h>>>a,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return!1;var a=this.words[r];return!!(a&i)},a.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;a-=67108863&u,s=(a>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)a=(0|this.words[i+r])+s,s=a>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)a=-(0|this.words[i])+s,s=a>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1],s=this._countBits(o);r=26-s,0!==r&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var u,c=n.length-i.length;if("mod"!==t){u=new a(null),u.length=c+1,u.words=new Array(u.length);for(var f=0;f<u.length;f++)u.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,c);0===h.negative&&(n=h,u&&(u.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,l);while(0!==n.negative)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:u||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++c;var f=r.clone(),h=t.clone();while(!t.isZero()){for(var l=0,d=1;0===(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0){t.iushrn(l);while(l-- >0)(i.isOdd()||o.isOdd())&&(i.iadd(f),o.isub(h)),i.iushrn(1),o.iushrn(1)}for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0){r.iushrn(p);while(p-- >0)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1)}t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(u)):(r.isub(t),s.isub(i),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i,o=new a(1),s=new a(0),u=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0){t.iushrn(c);while(c-- >0)o.isOdd()&&o.iadd(u),o.iushrn(1)}for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0){r.iushrn(h);while(h-- >0)s.isOdd()&&s.iadd(u),s.iushrn(1)}t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return i=0===t.cmpn(1)?o:s,i.cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(w,b),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,b),i(x,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new M;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1),o=0;while(!i.isZero()&&0===i.andln(1))o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new a(2*f*f).toRed(this);while(0!==this.pow(f,c).cmp(u))f.redIAdd(u);var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;while(0!==d.cmp(s)){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new a(1).iushln(p-g-1));l=l.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return l},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=4,n=new Array(1<<r);n[0]=new a(1).toRed(this),n[1]=e;for(var i=2;i<n.length;i++)n[i]=this.mul(n[i-1],e);var o=n[0],s=0,u=0,c=t.bitLength()%26;for(0===c&&(c=26),i=t.length-1;i>=0;i--){for(var f=t.words[i],h=c-1;h>=0;h--){var l=f>>h&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,u++,(u===r||0===i&&0===h)&&(o=this.mul(o,n[s]),u=0,s=0)):u=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new N(e)},i(N,S),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},N.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(e,this)}).call(this,r("62e4")(e))},bd9d:function(e,t){function r(e){var t,r=e.length;while(r--){if(t=e.readUInt8(r),255!==t){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}e.exports=r},c04e:function(e,t,r){var n=r("861d");e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},c0e2:function(e,t){function r(){}r.prototype={on:function(e,t,r){var n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:r}),this},once:function(e,t,r){var n=this;function i(){n.off(e,i),t.apply(r,arguments)}return i._=t,this.on(e,i,r)},emit:function(e){var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=r.length;for(n;n<i;n++)r[n].fn.apply(r[n].ctx,t);return this},off:function(e,t){var r=this.e||(this.e={}),n=r[e],i=[];if(n&&t)for(var a=0,o=n.length;a<o;a++)n[a].fn!==t&&n[a].fn._!==t&&i.push(n[a]);return i.length?r[e]=i:delete r[e],this}},e.exports=r,e.exports.TinyEmitter=r},c119:function(e,t,r){var n=r("8c8a");t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},c24d:function(e){e.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"}}')},c2ae:function(e,t,r){e.exports=r("e372").PassThrough},c3c0:function(e,t,r){"use strict";var n=r("da3e"),i=r("3fb5");function a(e,t){return 55296===(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1)))}function o(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for(e=e.replace(/[^a-z0-9]+/gi,""),e.length%2!==0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);o<128?r[n++]=o:o<2048?(r[n++]=o>>6|192,r[n++]=63&o|128):a(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r}function s(e){for(var t="",r=0;r<e.length;r++)t+=f(e[r].toString(16));return t}function u(e){var t=e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24;return t>>>0}function c(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=u(i)),r+=h(i.toString(16))}return r}function f(e){return 1===e.length?"0"+e:e}function h(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}function l(e,t,r,i){var a=r-t;n(a%4===0);for(var o=new Array(a/4),s=0,u=t;s<o.length;s++,u+=4){var c;c="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],o[s]=c>>>0}return o}function d(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var a=e[n];"big"===t?(r[i]=a>>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r}function p(e,t){return e>>>t|e<<32-t}function m(e,t){return e<<t|e>>>32-t}function g(e,t){return e+t>>>0}function v(e,t,r){return e+t+r>>>0}function y(e,t,r,n){return e+t+r+n>>>0}function b(e,t,r,n,i){return e+t+r+n+i>>>0}function w(e,t,r,n){var i=e[t],a=e[t+1],o=n+a>>>0,s=(o<n?1:0)+r+i;e[t]=s>>>0,e[t+1]=o}function M(e,t,r,n){var i=t+n>>>0,a=(i<t?1:0)+e+r;return a>>>0}function x(e,t,r,n){var i=t+n;return i>>>0}function _(e,t,r,n,i,a,o,s){var u=0,c=t;c=c+n>>>0,u+=c<t?1:0,c=c+a>>>0,u+=c<a?1:0,c=c+s>>>0,u+=c<s?1:0;var f=e+r+i+o+u;return f>>>0}function S(e,t,r,n,i,a,o,s){var u=t+n+a+s;return u>>>0}function N(e,t,r,n,i,a,o,s,u,c){var f=0,h=t;h=h+n>>>0,f+=h<t?1:0,h=h+a>>>0,f+=h<a?1:0,h=h+s>>>0,f+=h<s?1:0,h=h+c>>>0,f+=h<c?1:0;var l=e+r+i+o+u+f;return l>>>0}function E(e,t,r,n,i,a,o,s,u,c){var f=t+n+a+s+c;return f>>>0}function A(e,t,r){var n=t<<32-r|e>>>r;return n>>>0}function D(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}function k(e,t,r){return e>>>r}function O(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}t.inherits=i,t.toArray=o,t.toHex=s,t.htonl=u,t.toHex32=c,t.zero2=f,t.zero8=h,t.join32=l,t.split32=d,t.rotr32=p,t.rotl32=m,t.sum32=g,t.sum32_3=v,t.sum32_4=y,t.sum32_5=b,t.sum64=w,t.sum64_hi=M,t.sum64_lo=x,t.sum64_4_hi=_,t.sum64_4_lo=S,t.sum64_5_hi=N,t.sum64_5_lo=E,t.rotr64_hi=A,t.rotr64_lo=D,t.shr64_hi=k,t.shr64_lo=O},c430:function(e,t){e.exports=!1},c6b6:function(e,t){var r={}.toString;e.exports=function(e){return r.call(e).slice(8,-1)}},c6cd:function(e,t,r){var n=r("da84"),i=r("ce4e"),a="__core-js_shared__",o=n[a]||i(a,{});e.exports=o},c70b:function(e,t,r){"use strict";r.r(t),r.d(t,"config",(function(){return ce})),r.d(t,"ResultSet",(function(){return zb})),r.d(t,"Complex",(function(){return Lb})),r.d(t,"Range",(function(){return Ub})),r.d(t,"_false",(function(){return Fb})),r.d(t,"_null",(function(){return Hb})),r.d(t,"_true",(function(){return Zb})),r.d(t,"BigNumber",(function(){return Wb})),r.d(t,"Matrix",(function(){return Vb})),r.d(t,"replacer",(function(){return Gb})),r.d(t,"i",(function(){return $b})),r.d(t,"LN10",(function(){return Kb})),r.d(t,"LOG10E",(function(){return Jb})),r.d(t,"_NaN",(function(){return Yb})),r.d(t,"pi",(function(){return Xb})),r.d(t,"SQRT1_2",(function(){return Qb})),r.d(t,"tau",(function(){return ew})),r.d(t,"efimovFactor",(function(){return tw})),r.d(t,"fineStructure",(function(){return rw})),r.d(t,"sackurTetrode",(function(){return nw})),r.d(t,"weakMixingAngle",(function(){return iw})),r.d(t,"Fraction",(function(){return aw})),r.d(t,"e",(function(){return ow})),r.d(t,"_Infinity",(function(){return sw})),r.d(t,"LOG2E",(function(){return uw})),r.d(t,"version",(function(){return cw})),r.d(t,"DenseMatrix",(function(){return fw})),r.d(t,"phi",(function(){return hw})),r.d(t,"typed",(function(){return lw})),r.d(t,"isInteger",(function(){return dw})),r.d(t,"isNumeric",(function(){return pw})),r.d(t,"isPositive",(function(){return mw})),r.d(t,"isNaN",(function(){return gw})),r.d(t,"equalScalar",(function(){return vw})),r.d(t,"number",(function(){return yw})),r.d(t,"boolean",(function(){return bw})),r.d(t,"complex",(function(){return ww})),r.d(t,"splitUnit",(function(){return Mw})),r.d(t,"unaryPlus",(function(){return xw})),r.d(t,"apply",(function(){return _w})),r.d(t,"cube",(function(){return Sw})),r.d(t,"expm1",(function(){return Nw})),r.d(t,"log10",(function(){return Ew})),r.d(t,"multiplyScalar",(function(){return Aw})),r.d(t,"sign",(function(){return Dw})),r.d(t,"square",(function(){return kw})),r.d(t,"bitNot",(function(){return Ow})),r.d(t,"arg",(function(){return Cw})),r.d(t,"im",(function(){return Tw})),r.d(t,"not",(function(){return Rw})),r.d(t,"filter",(function(){return Bw})),r.d(t,"forEach",(function(){return Iw})),r.d(t,"map",(function(){return qw})),r.d(t,"erf",(function(){return Pw})),r.d(t,"format",(function(){return jw})),r.d(t,"oct",(function(){return zw})),r.d(t,"print",(function(){return Lw})),r.d(t,"isPrime",(function(){return Uw})),r.d(t,"acos",(function(){return Fw})),r.d(t,"acot",(function(){return Hw})),r.d(t,"acsc",(function(){return Zw})),r.d(t,"asec",(function(){return Ww})),r.d(t,"asin",(function(){return Vw})),r.d(t,"atan",(function(){return Gw})),r.d(t,"atanh",(function(){return $w})),r.d(t,"cosh",(function(){return Kw})),r.d(t,"coth",(function(){return Jw})),r.d(t,"csch",(function(){return Yw})),r.d(t,"sech",(function(){return Xw})),r.d(t,"sinh",(function(){return Qw})),r.d(t,"tanh",(function(){return eM})),r.d(t,"combinations",(function(){return tM})),r.d(t,"pickRandom",(function(){return rM})),r.d(t,"randomInt",(function(){return nM})),r.d(t,"LN2",(function(){return iM})),r.d(t,"clone",(function(){return aM})),r.d(t,"hasNumericValue",(function(){return oM})),r.d(t,"typeOf",(function(){return sM})),r.d(t,"string",(function(){return uM})),r.d(t,"fraction",(function(){return cM})),r.d(t,"unaryMinus",(function(){return fM})),r.d(t,"addScalar",(function(){return hM})),r.d(t,"exp",(function(){return lM})),r.d(t,"log2",(function(){return dM})),r.d(t,"sqrt",(function(){return pM})),r.d(t,"conj",(function(){return mM})),r.d(t,"getMatrixDataType",(function(){return gM})),r.d(t,"mode",(function(){return vM})),r.d(t,"bin",(function(){return yM})),r.d(t,"acosh",(function(){return bM})),r.d(t,"acsch",(function(){return wM})),r.d(t,"asinh",(function(){return MM})),r.d(t,"cos",(function(){return xM})),r.d(t,"csc",(function(){return _M})),r.d(t,"sin",(function(){return SM})),r.d(t,"combinationsWithRep",(function(){return NM})),r.d(t,"random",(function(){return EM})),r.d(t,"SQRT2",(function(){return AM})),r.d(t,"isNegative",(function(){return DM})),r.d(t,"SparseMatrix",(function(){return kM})),r.d(t,"matrix",(function(){return OM})),r.d(t,"abs",(function(){return CM})),r.d(t,"gcd",(function(){return TM})),r.d(t,"mod",(function(){return RM})),r.d(t,"nthRoot",(function(){return BM})),r.d(t,"xgcd",(function(){return IM})),r.d(t,"bitAnd",(function(){return qM})),r.d(t,"bitXor",(function(){return PM})),r.d(t,"or",(function(){return jM})),r.d(t,"concat",(function(){return zM})),r.d(t,"diag",(function(){return LM})),r.d(t,"identity",(function(){return UM})),r.d(t,"ones",(function(){return FM})),r.d(t,"reshape",(function(){return HM})),r.d(t,"size",(function(){return ZM})),r.d(t,"subset",(function(){return WM})),r.d(t,"zeros",(function(){return VM})),r.d(t,"hex",(function(){return GM})),r.d(t,"round",(function(){return $M})),r.d(t,"leftShift",(function(){return KM})),r.d(t,"rightLogShift",(function(){return JM})),r.d(t,"compare",(function(){return YM})),r.d(t,"compareText",(function(){return XM})),r.d(t,"smaller",(function(){return QM})),r.d(t,"larger",(function(){return ex})),r.d(t,"unequal",(function(){return tx})),r.d(t,"ImmutableDenseMatrix",(function(){return rx})),r.d(t,"FibonacciHeap",(function(){return nx})),r.d(t,"sparse",(function(){return ix})),r.d(t,"acoth",(function(){return ax})),r.d(t,"atan2",(function(){return ox})),r.d(t,"sec",(function(){return sx})),r.d(t,"add",(function(){return ux})),r.d(t,"dot",(function(){return cx})),r.d(t,"composition",(function(){return fx})),r.d(t,"isZero",(function(){return hx})),r.d(t,"matrixFromFunction",(function(){return lx})),r.d(t,"cbrt",(function(){return dx})),r.d(t,"floor",(function(){return px})),r.d(t,"multiply",(function(){return mx})),r.d(t,"dotMultiply",(function(){return gx})),r.d(t,"re",(function(){return vx})),r.d(t,"flatten",(function(){return yx})),r.d(t,"resize",(function(){return bx})),r.d(t,"squeeze",(function(){return wx})),r.d(t,"to",(function(){return Mx})),r.d(t,"pow",(function(){return xx})),r.d(t,"dotPow",(function(){return _x})),r.d(t,"rightArithShift",(function(){return Sx})),r.d(t,"compareNatural",(function(){return Nx})),r.d(t,"equalText",(function(){return Ex})),r.d(t,"largerEq",(function(){return Ax})),r.d(t,"partitionSelect",(function(){return Dx})),r.d(t,"Index",(function(){return kx})),r.d(t,"asech",(function(){return Ox})),r.d(t,"tan",(function(){return Cx})),r.d(t,"setDifference",(function(){return Tx})),r.d(t,"setIntersect",(function(){return Rx})),r.d(t,"setMultiplicity",(function(){return Bx})),r.d(t,"setSize",(function(){return Ix})),r.d(t,"trace",(function(){return qx})),r.d(t,"quantileSeq",(function(){return Px})),r.d(t,"gamma",(function(){return jx})),r.d(t,"bignumber",(function(){return zx})),r.d(t,"matrixFromColumns",(function(){return Lx})),r.d(t,"lcm",(function(){return Ux})),r.d(t,"bitOr",(function(){return Fx})),r.d(t,"kron",(function(){return Hx})),r.d(t,"transpose",(function(){return Zx})),r.d(t,"numeric",(function(){return Wx})),r.d(t,"and",(function(){return Vx})),r.d(t,"smallerEq",(function(){return Gx})),r.d(t,"sort",(function(){return $x})),r.d(t,"min",(function(){return Kx})),r.d(t,"cot",(function(){return Jx})),r.d(t,"setDistinct",(function(){return Yx})),r.d(t,"setPowerset",(function(){return Xx})),r.d(t,"index",(function(){return Qx})),r.d(t,"sum",(function(){return e_})),r.d(t,"factorial",(function(){return t_})),r.d(t,"permutations",(function(){return r_})),r.d(t,"matrixFromRows",(function(){return n_})),r.d(t,"subtract",(function(){return i_})),r.d(t,"cross",(function(){return a_})),r.d(t,"range",(function(){return o_})),r.d(t,"row",(function(){return s_})),r.d(t,"prod",(function(){return u_})),r.d(t,"equal",(function(){return c_})),r.d(t,"max",(function(){return f_})),r.d(t,"setCartesian",(function(){return h_})),r.d(t,"setSymDifference",(function(){return l_})),r.d(t,"ceil",(function(){return d_})),r.d(t,"xor",(function(){return p_})),r.d(t,"count",(function(){return m_})),r.d(t,"ctranspose",(function(){return g_})),r.d(t,"deepEqual",(function(){return v_})),r.d(t,"setIsSubset",(function(){return y_})),r.d(t,"fix",(function(){return b_})),r.d(t,"diff",(function(){return w_})),r.d(t,"divideScalar",(function(){return M_})),r.d(t,"nthRoots",(function(){return x_})),r.d(t,"lsolve",(function(){return __})),r.d(t,"lsolveAll",(function(){return S_})),r.d(t,"Spa",(function(){return N_})),r.d(t,"setUnion",(function(){return E_})),r.d(t,"lup",(function(){return A_})),r.d(t,"slu",(function(){return D_})),r.d(t,"det",(function(){return k_})),r.d(t,"distance",(function(){return O_})),r.d(t,"stirlingS2",(function(){return C_})),r.d(t,"catalan",(function(){return T_})),r.d(t,"column",(function(){return R_})),r.d(t,"log",(function(){return B_})),r.d(t,"dotDivide",(function(){return I_})),r.d(t,"usolveAll",(function(){return q_})),r.d(t,"hypot",(function(){return P_})),r.d(t,"qr",(function(){return j_})),r.d(t,"inv",(function(){return z_})),r.d(t,"expm",(function(){return L_})),r.d(t,"divide",(function(){return U_})),r.d(t,"mean",(function(){return F_})),r.d(t,"variance",(function(){return H_})),r.d(t,"kldivergence",(function(){return Z_})),r.d(t,"bellNumbers",(function(){return W_})),r.d(t,"log1p",(function(){return V_})),r.d(t,"Unit",(function(){return G_})),r.d(t,"createUnit",(function(){return $_})),r.d(t,"sqrtm",(function(){return K_})),r.d(t,"median",(function(){return J_})),r.d(t,"std",(function(){return Y_})),r.d(t,"atomicMass",(function(){return X_})),r.d(t,"bohrMagneton",(function(){return Q_})),r.d(t,"boltzmann",(function(){return eS})),r.d(t,"conductanceQuantum",(function(){return tS})),r.d(t,"deuteronMass",(function(){return rS})),r.d(t,"electronMass",(function(){return nS})),r.d(t,"faraday",(function(){return iS})),r.d(t,"firstRadiation",(function(){return aS})),r.d(t,"gravitationConstant",(function(){return oS})),r.d(t,"hartreeEnergy",(function(){return sS})),r.d(t,"klitzing",(function(){return uS})),r.d(t,"magneticConstant",(function(){return cS})),r.d(t,"molarMass",(function(){return fS})),r.d(t,"molarPlanckConstant",(function(){return hS})),r.d(t,"neutronMass",(function(){return lS})),r.d(t,"planckCharge",(function(){return dS})),r.d(t,"planckLength",(function(){return pS})),r.d(t,"planckTemperature",(function(){return mS})),r.d(t,"protonMass",(function(){return gS})),r.d(t,"reducedPlanckConstant",(function(){return vS})),r.d(t,"secondRadiation",(function(){return yS})),r.d(t,"stefanBoltzmann",(function(){return bS})),r.d(t,"vacuumImpedance",(function(){return wS})),r.d(t,"usolve",(function(){return MS})),r.d(t,"lusolve",(function(){return xS})),r.d(t,"eigs",(function(){return _S})),r.d(t,"mad",(function(){return SS})),r.d(t,"avogadro",(function(){return NS})),r.d(t,"classicalElectronRadius",(function(){return ES})),r.d(t,"electricConstant",(function(){return AS})),r.d(t,"fermiCoupling",(function(){return DS})),r.d(t,"gravity",(function(){return kS})),r.d(t,"loschmidt",(function(){return OS})),r.d(t,"molarMassC12",(function(){return CS})),r.d(t,"nuclearMagneton",(function(){return TS})),r.d(t,"planckMass",(function(){return RS})),r.d(t,"quantumOfCirculation",(function(){return BS})),r.d(t,"speedOfLight",(function(){return IS})),r.d(t,"wienDisplacement",(function(){return qS})),r.d(t,"unit",(function(){return PS})),r.d(t,"intersect",(function(){return jS})),r.d(t,"coulomb",(function(){return zS})),r.d(t,"gasConstant",(function(){return LS})),r.d(t,"magneticFluxQuantum",(function(){return US})),r.d(t,"planckConstant",(function(){return FS})),r.d(t,"rydberg",(function(){return HS})),r.d(t,"norm",(function(){return ZS})),r.d(t,"elementaryCharge",(function(){return WS})),r.d(t,"molarVolume",(function(){return VS})),r.d(t,"thomsonCrossSection",(function(){return GS})),r.d(t,"rotationMatrix",(function(){return $S})),r.d(t,"bohrRadius",(function(){return KS})),r.d(t,"planckTime",(function(){return JS})),r.d(t,"rotate",(function(){return YS})),r.d(t,"multinomial",(function(){return XS})),r.d(t,"inverseConductanceQuantum",(function(){return QS})),r.d(t,"Node",(function(){return wT})),r.d(t,"ArrayNode",(function(){return MT})),r.d(t,"BlockNode",(function(){return xT})),r.d(t,"ConstantNode",(function(){return _T})),r.d(t,"ObjectNode",(function(){return ST})),r.d(t,"ParenthesisNode",(function(){return NT})),r.d(t,"RelationalNode",(function(){return ET})),r.d(t,"Chain",(function(){return AT})),r.d(t,"reviver",(function(){return DT})),r.d(t,"ConditionalNode",(function(){return kT})),r.d(t,"OperatorNode",(function(){return OT})),r.d(t,"RangeNode",(function(){return CT})),r.d(t,"FunctionAssignmentNode",(function(){return TT})),r.d(t,"chain",(function(){return RT})),r.d(t,"AccessorNode",(function(){return BT})),r.d(t,"IndexNode",(function(){return IT})),r.d(t,"AssignmentNode",(function(){return qT})),r.d(t,"SymbolNode",(function(){return PT})),r.d(t,"FunctionNode",(function(){return jT})),r.d(t,"parse",(function(){return zT})),r.d(t,"evaluate",(function(){return LT})),r.d(t,"Help",(function(){return UT})),r.d(t,"simplify",(function(){return FT})),r.d(t,"rationalize",(function(){return HT})),r.d(t,"Parser",(function(){return ZT})),r.d(t,"help",(function(){return WT})),r.d(t,"derivative",(function(){return VT})),r.d(t,"parser",(function(){return GT})),r.d(t,"compile",(function(){return $T})),r.d(t,"docs",(function(){return nC})),r.d(t,"isAccessorNode",(function(){return k})),r.d(t,"isArray",(function(){return d})),r.d(t,"isArrayNode",(function(){return O})),r.d(t,"isAssignmentNode",(function(){return C})),r.d(t,"isBigNumber",(function(){return u})),r.d(t,"isBlockNode",(function(){return T})),r.d(t,"isBoolean",(function(){return w})),r.d(t,"isChain",(function(){return Z})),r.d(t,"isCollection",(function(){return m})),r.d(t,"isComplex",(function(){return c})),r.d(t,"isConditionalNode",(function(){return R})),r.d(t,"isConstantNode",(function(){return B})),r.d(t,"isDate",(function(){return S})),r.d(t,"isDenseMatrix",(function(){return g})),r.d(t,"isFraction",(function(){return f})),r.d(t,"isFunction",(function(){return _})),r.d(t,"isFunctionAssignmentNode",(function(){return I})),r.d(t,"isFunctionNode",(function(){return q})),r.d(t,"isHelp",(function(){return x})),r.d(t,"isIndex",(function(){return b})),r.d(t,"isIndexNode",(function(){return P})),r.d(t,"isMatrix",(function(){return p})),r.d(t,"isNode",(function(){return j})),r.d(t,"isNull",(function(){return A})),r.d(t,"isNumber",(function(){return s})),r.d(t,"isString",(function(){return l})),r.d(t,"isUndefined",(function(){return D})),r.d(t,"isObject",(function(){return E})),r.d(t,"isObjectNode",(function(){return z})),r.d(t,"isOperatorNode",(function(){return L})),r.d(t,"isParenthesisNode",(function(){return U})),r.d(t,"isRange",(function(){return y})),r.d(t,"isRangeNode",(function(){return F})),r.d(t,"isRegExp",(function(){return N})),r.d(t,"isResultSet",(function(){return M})),r.d(t,"isSparseMatrix",(function(){return v})),r.d(t,"isSymbolNode",(function(){return H})),r.d(t,"isUnit",(function(){return h})),r.d(t,"IndexError",(function(){return $e})),r.d(t,"DimensionError",(function(){return Ge})),r.d(t,"ArgumentsError",(function(){return Dd})),r.d(t,"typedDependencies",(function(){return eR})),r.d(t,"ResultSetDependencies",(function(){return tR})),r.d(t,"BigNumberDependencies",(function(){return KT})),r.d(t,"ComplexDependencies",(function(){return JT})),r.d(t,"FractionDependencies",(function(){return QT})),r.d(t,"RangeDependencies",(function(){return rR})),r.d(t,"MatrixDependencies",(function(){return YT})),r.d(t,"DenseMatrixDependencies",(function(){return XT})),r.d(t,"cloneDependencies",(function(){return nR})),r.d(t,"isIntegerDependencies",(function(){return iR})),r.d(t,"isNegativeDependencies",(function(){return aR})),r.d(t,"isNumericDependencies",(function(){return oR})),r.d(t,"hasNumericValueDependencies",(function(){return sR})),r.d(t,"isPositiveDependencies",(function(){return uR})),r.d(t,"isZeroDependencies",(function(){return cR})),r.d(t,"isNaNDependencies",(function(){return fR})),r.d(t,"typeOfDependencies",(function(){return hR})),r.d(t,"equalScalarDependencies",(function(){return lR})),r.d(t,"SparseMatrixDependencies",(function(){return dR})),r.d(t,"numberDependencies",(function(){return pR})),r.d(t,"stringDependencies",(function(){return mR})),r.d(t,"booleanDependencies",(function(){return gR})),r.d(t,"bignumberDependencies",(function(){return vR})),r.d(t,"complexDependencies",(function(){return yR})),r.d(t,"fractionDependencies",(function(){return bR})),r.d(t,"matrixDependencies",(function(){return wR})),r.d(t,"matrixFromFunctionDependencies",(function(){return MR})),r.d(t,"matrixFromRowsDependencies",(function(){return SR})),r.d(t,"matrixFromColumnsDependencies",(function(){return NR})),r.d(t,"splitUnitDependencies",(function(){return ER})),r.d(t,"unaryMinusDependencies",(function(){return AR})),r.d(t,"unaryPlusDependencies",(function(){return DR})),r.d(t,"absDependencies",(function(){return kR})),r.d(t,"applyDependencies",(function(){return OR})),r.d(t,"addScalarDependencies",(function(){return CR})),r.d(t,"cbrtDependencies",(function(){return TR})),r.d(t,"ceilDependencies",(function(){return IR})),r.d(t,"cubeDependencies",(function(){return qR})),r.d(t,"expDependencies",(function(){return PR})),r.d(t,"expm1Dependencies",(function(){return jR})),r.d(t,"fixDependencies",(function(){return LR})),r.d(t,"floorDependencies",(function(){return zR})),r.d(t,"gcdDependencies",(function(){return UR})),r.d(t,"lcmDependencies",(function(){return FR})),r.d(t,"log10Dependencies",(function(){return HR})),r.d(t,"log2Dependencies",(function(){return ZR})),r.d(t,"modDependencies",(function(){return WR})),r.d(t,"multiplyScalarDependencies",(function(){return VR})),r.d(t,"multiplyDependencies",(function(){return KR})),r.d(t,"nthRootDependencies",(function(){return JR})),r.d(t,"signDependencies",(function(){return YR})),r.d(t,"sqrtDependencies",(function(){return XR})),r.d(t,"squareDependencies",(function(){return QR})),r.d(t,"subtractDependencies",(function(){return eB})),r.d(t,"xgcdDependencies",(function(){return tB})),r.d(t,"dotMultiplyDependencies",(function(){return rB})),r.d(t,"bitAndDependencies",(function(){return nB})),r.d(t,"bitNotDependencies",(function(){return iB})),r.d(t,"bitOrDependencies",(function(){return aB})),r.d(t,"bitXorDependencies",(function(){return oB})),r.d(t,"argDependencies",(function(){return sB})),r.d(t,"conjDependencies",(function(){return GR})),r.d(t,"imDependencies",(function(){return uB})),r.d(t,"reDependencies",(function(){return cB})),r.d(t,"notDependencies",(function(){return fB})),r.d(t,"orDependencies",(function(){return hB})),r.d(t,"xorDependencies",(function(){return lB})),r.d(t,"concatDependencies",(function(){return dB})),r.d(t,"columnDependencies",(function(){return MB})),r.d(t,"countDependencies",(function(){return SB})),r.d(t,"crossDependencies",(function(){return NB})),r.d(t,"diagDependencies",(function(){return EB})),r.d(t,"filterDependencies",(function(){return AB})),r.d(t,"flattenDependencies",(function(){return xR})),r.d(t,"forEachDependencies",(function(){return DB})),r.d(t,"getMatrixDataTypeDependencies",(function(){return kB})),r.d(t,"identityDependencies",(function(){return OB})),r.d(t,"kronDependencies",(function(){return CB})),r.d(t,"mapDependencies",(function(){return TB})),r.d(t,"diffDependencies",(function(){return RB})),r.d(t,"onesDependencies",(function(){return BB})),r.d(t,"rangeDependencies",(function(){return wB})),r.d(t,"reshapeDependencies",(function(){return IB})),r.d(t,"resizeDependencies",(function(){return qB})),r.d(t,"rotateDependencies",(function(){return nI})),r.d(t,"rotationMatrixDependencies",(function(){return rI})),r.d(t,"rowDependencies",(function(){return iI})),r.d(t,"sizeDependencies",(function(){return _R})),r.d(t,"squeezeDependencies",(function(){return aI})),r.d(t,"subsetDependencies",(function(){return oI})),r.d(t,"transposeDependencies",(function(){return zB})),r.d(t,"ctransposeDependencies",(function(){return LB})),r.d(t,"zerosDependencies",(function(){return RR})),r.d(t,"erfDependencies",(function(){return sI})),r.d(t,"modeDependencies",(function(){return uI})),r.d(t,"prodDependencies",(function(){return _B})),r.d(t,"formatDependencies",(function(){return cI})),r.d(t,"binDependencies",(function(){return fI})),r.d(t,"octDependencies",(function(){return hI})),r.d(t,"hexDependencies",(function(){return lI})),r.d(t,"printDependencies",(function(){return dI})),r.d(t,"toDependencies",(function(){return pI})),r.d(t,"isPrimeDependencies",(function(){return mI})),r.d(t,"numericDependencies",(function(){return xB})),r.d(t,"divideScalarDependencies",(function(){return FB})),r.d(t,"powDependencies",(function(){return eI})),r.d(t,"roundDependencies",(function(){return BR})),r.d(t,"logDependencies",(function(){return gI})),r.d(t,"log1pDependencies",(function(){return vI})),r.d(t,"nthRootsDependencies",(function(){return yI})),r.d(t,"dotPowDependencies",(function(){return bI})),r.d(t,"dotDivideDependencies",(function(){return wI})),r.d(t,"lsolveDependencies",(function(){return MI})),r.d(t,"usolveDependencies",(function(){return YB})),r.d(t,"lsolveAllDependencies",(function(){return xI})),r.d(t,"usolveAllDependencies",(function(){return XB})),r.d(t,"leftShiftDependencies",(function(){return _I})),r.d(t,"rightArithShiftDependencies",(function(){return SI})),r.d(t,"rightLogShiftDependencies",(function(){return NI})),r.d(t,"andDependencies",(function(){return EI})),r.d(t,"compareDependencies",(function(){return AI})),r.d(t,"compareNaturalDependencies",(function(){return DI})),r.d(t,"compareTextDependencies",(function(){return kI})),r.d(t,"equalDependencies",(function(){return HB})),r.d(t,"equalTextDependencies",(function(){return OI})),r.d(t,"smallerDependencies",(function(){return pB})),r.d(t,"smallerEqDependencies",(function(){return bB})),r.d(t,"largerDependencies",(function(){return vB})),r.d(t,"largerEqDependencies",(function(){return yB})),r.d(t,"deepEqualDependencies",(function(){return CI})),r.d(t,"unequalDependencies",(function(){return TI})),r.d(t,"partitionSelectDependencies",(function(){return RI})),r.d(t,"sortDependencies",(function(){return BI})),r.d(t,"maxDependencies",(function(){return II})),r.d(t,"minDependencies",(function(){return qI})),r.d(t,"ImmutableDenseMatrixDependencies",(function(){return mB})),r.d(t,"IndexDependencies",(function(){return gB})),r.d(t,"FibonacciHeapDependencies",(function(){return ZB})),r.d(t,"SpaDependencies",(function(){return WB})),r.d(t,"UnitDependencies",(function(){return PI})),r.d(t,"unitDependencies",(function(){return jI})),r.d(t,"sparseDependencies",(function(){return zI})),r.d(t,"createUnitDependencies",(function(){return LI})),r.d(t,"acosDependencies",(function(){return UI})),r.d(t,"acoshDependencies",(function(){return FI})),r.d(t,"acotDependencies",(function(){return HI})),r.d(t,"acothDependencies",(function(){return ZI})),r.d(t,"acscDependencies",(function(){return WI})),r.d(t,"acschDependencies",(function(){return VI})),r.d(t,"asecDependencies",(function(){return GI})),r.d(t,"asechDependencies",(function(){return $I})),r.d(t,"asinDependencies",(function(){return KI})),r.d(t,"asinhDependencies",(function(){return JI})),r.d(t,"atanDependencies",(function(){return UB})),r.d(t,"atan2Dependencies",(function(){return YI})),r.d(t,"atanhDependencies",(function(){return XI})),r.d(t,"cosDependencies",(function(){return PB})),r.d(t,"coshDependencies",(function(){return QI})),r.d(t,"cotDependencies",(function(){return eq})),r.d(t,"cothDependencies",(function(){return tq})),r.d(t,"cscDependencies",(function(){return rq})),r.d(t,"cschDependencies",(function(){return nq})),r.d(t,"secDependencies",(function(){return iq})),r.d(t,"sechDependencies",(function(){return aq})),r.d(t,"sinDependencies",(function(){return JB})),r.d(t,"sinhDependencies",(function(){return oq})),r.d(t,"tanDependencies",(function(){return sq})),r.d(t,"tanhDependencies",(function(){return uq})),r.d(t,"setCartesianDependencies",(function(){return cq})),r.d(t,"setDifferenceDependencies",(function(){return fq})),r.d(t,"setDistinctDependencies",(function(){return hq})),r.d(t,"setIntersectDependencies",(function(){return lq})),r.d(t,"setIsSubsetDependencies",(function(){return dq})),r.d(t,"setMultiplicityDependencies",(function(){return pq})),r.d(t,"setPowersetDependencies",(function(){return mq})),r.d(t,"setSizeDependencies",(function(){return gq})),r.d(t,"setSymDifferenceDependencies",(function(){return vq})),r.d(t,"setUnionDependencies",(function(){return yq})),r.d(t,"addDependencies",(function(){return jB})),r.d(t,"hypotDependencies",(function(){return bq})),r.d(t,"normDependencies",(function(){return tI})),r.d(t,"dotDependencies",(function(){return $R})),r.d(t,"traceDependencies",(function(){return wq})),r.d(t,"indexDependencies",(function(){return Mq})),r.d(t,"NodeDependencies",(function(){return xq})),r.d(t,"AccessorNodeDependencies",(function(){return _q})),r.d(t,"ArrayNodeDependencies",(function(){return Sq})),r.d(t,"AssignmentNodeDependencies",(function(){return Nq})),r.d(t,"BlockNodeDependencies",(function(){return Eq})),r.d(t,"ConditionalNodeDependencies",(function(){return Aq})),r.d(t,"ConstantNodeDependencies",(function(){return Dq})),r.d(t,"FunctionAssignmentNodeDependencies",(function(){return kq})),r.d(t,"IndexNodeDependencies",(function(){return Oq})),r.d(t,"ObjectNodeDependencies",(function(){return Cq})),r.d(t,"OperatorNodeDependencies",(function(){return Tq})),r.d(t,"ParenthesisNodeDependencies",(function(){return Rq})),r.d(t,"RangeNodeDependencies",(function(){return Bq})),r.d(t,"RelationalNodeDependencies",(function(){return Iq})),r.d(t,"SymbolNodeDependencies",(function(){return qq})),r.d(t,"FunctionNodeDependencies",(function(){return Pq})),r.d(t,"parseDependencies",(function(){return jq})),r.d(t,"compileDependencies",(function(){return zq})),r.d(t,"evaluateDependencies",(function(){return Lq})),r.d(t,"ParserDependencies",(function(){return Uq})),r.d(t,"parserDependencies",(function(){return Fq})),r.d(t,"lupDependencies",(function(){return VB})),r.d(t,"qrDependencies",(function(){return KB})),r.d(t,"sluDependencies",(function(){return Hq})),r.d(t,"lusolveDependencies",(function(){return Zq})),r.d(t,"HelpDependencies",(function(){return Wq})),r.d(t,"ChainDependencies",(function(){return Vq})),r.d(t,"helpDependencies",(function(){return Gq})),r.d(t,"chainDependencies",(function(){return $q})),r.d(t,"detDependencies",(function(){return GB})),r.d(t,"invDependencies",(function(){return $B})),r.d(t,"eigsDependencies",(function(){return QB})),r.d(t,"expmDependencies",(function(){return Kq})),r.d(t,"sqrtmDependencies",(function(){return Jq})),r.d(t,"divideDependencies",(function(){return Yq})),r.d(t,"distanceDependencies",(function(){return Xq})),r.d(t,"intersectDependencies",(function(){return Qq})),r.d(t,"sumDependencies",(function(){return eP})),r.d(t,"meanDependencies",(function(){return tP})),r.d(t,"medianDependencies",(function(){return rP})),r.d(t,"madDependencies",(function(){return nP})),r.d(t,"varianceDependencies",(function(){return iP})),r.d(t,"quantileSeqDependencies",(function(){return aP})),r.d(t,"stdDependencies",(function(){return oP})),r.d(t,"combinationsDependencies",(function(){return sP})),r.d(t,"combinationsWithRepDependencies",(function(){return uP})),r.d(t,"gammaDependencies",(function(){return cP})),r.d(t,"factorialDependencies",(function(){return fP})),r.d(t,"kldivergenceDependencies",(function(){return hP})),r.d(t,"multinomialDependencies",(function(){return lP})),r.d(t,"permutationsDependencies",(function(){return dP})),r.d(t,"pickRandomDependencies",(function(){return pP})),r.d(t,"randomDependencies",(function(){return mP})),r.d(t,"randomIntDependencies",(function(){return gP})),r.d(t,"stirlingS2Dependencies",(function(){return vP})),r.d(t,"bellNumbersDependencies",(function(){return yP})),r.d(t,"catalanDependencies",(function(){return bP})),r.d(t,"compositionDependencies",(function(){return wP})),r.d(t,"simplifyDependencies",(function(){return MP})),r.d(t,"derivativeDependencies",(function(){return xP})),r.d(t,"rationalizeDependencies",(function(){return _P})),r.d(t,"reviverDependencies",(function(){return SP})),r.d(t,"replacerDependencies",(function(){return NP})),r.d(t,"eDependencies",(function(){return EP})),r.d(t,"EDependencies",(function(){return AP})),r.d(t,"falseDependencies",(function(){return DP})),r.d(t,"iDependencies",(function(){return kP})),r.d(t,"InfinityDependencies",(function(){return OP})),r.d(t,"LN10Dependencies",(function(){return CP})),r.d(t,"LN2Dependencies",(function(){return TP})),r.d(t,"LOG10EDependencies",(function(){return RP})),r.d(t,"LOG2EDependencies",(function(){return BP})),r.d(t,"NaNDependencies",(function(){return IP})),r.d(t,"nullDependencies",(function(){return qP})),r.d(t,"phiDependencies",(function(){return PP})),r.d(t,"piDependencies",(function(){return jP})),r.d(t,"PIDependencies",(function(){return zP})),r.d(t,"SQRT1_2Dependencies",(function(){return LP})),r.d(t,"SQRT2Dependencies",(function(){return UP})),r.d(t,"tauDependencies",(function(){return FP})),r.d(t,"trueDependencies",(function(){return HP})),r.d(t,"versionDependencies",(function(){return ZP})),r.d(t,"atomicMassDependencies",(function(){return WP})),r.d(t,"avogadroDependencies",(function(){return VP})),r.d(t,"bohrMagnetonDependencies",(function(){return GP})),r.d(t,"bohrRadiusDependencies",(function(){return $P})),r.d(t,"boltzmannDependencies",(function(){return KP})),r.d(t,"classicalElectronRadiusDependencies",(function(){return JP})),r.d(t,"conductanceQuantumDependencies",(function(){return YP})),r.d(t,"coulombDependencies",(function(){return XP})),r.d(t,"deuteronMassDependencies",(function(){return QP})),r.d(t,"efimovFactorDependencies",(function(){return ej})),r.d(t,"electricConstantDependencies",(function(){return tj})),r.d(t,"electronMassDependencies",(function(){return rj})),r.d(t,"elementaryChargeDependencies",(function(){return nj})),r.d(t,"faradayDependencies",(function(){return ij})),r.d(t,"fermiCouplingDependencies",(function(){return aj})),r.d(t,"fineStructureDependencies",(function(){return oj})),r.d(t,"firstRadiationDependencies",(function(){return sj})),r.d(t,"gasConstantDependencies",(function(){return uj})),r.d(t,"gravitationConstantDependencies",(function(){return cj})),r.d(t,"gravityDependencies",(function(){return fj})),r.d(t,"hartreeEnergyDependencies",(function(){return hj})),r.d(t,"inverseConductanceQuantumDependencies",(function(){return lj})),r.d(t,"klitzingDependencies",(function(){return dj})),r.d(t,"loschmidtDependencies",(function(){return pj})),r.d(t,"magneticConstantDependencies",(function(){return mj})),r.d(t,"magneticFluxQuantumDependencies",(function(){return gj})),r.d(t,"molarMassDependencies",(function(){return vj})),r.d(t,"molarMassC12Dependencies",(function(){return yj})),r.d(t,"molarPlanckConstantDependencies",(function(){return bj})),r.d(t,"molarVolumeDependencies",(function(){return wj})),r.d(t,"neutronMassDependencies",(function(){return Mj})),r.d(t,"nuclearMagnetonDependencies",(function(){return xj})),r.d(t,"planckChargeDependencies",(function(){return _j})),r.d(t,"planckConstantDependencies",(function(){return Sj})),r.d(t,"planckLengthDependencies",(function(){return Nj})),r.d(t,"planckMassDependencies",(function(){return Ej})),r.d(t,"planckTemperatureDependencies",(function(){return Aj})),r.d(t,"planckTimeDependencies",(function(){return Dj})),r.d(t,"protonMassDependencies",(function(){return kj})),r.d(t,"quantumOfCirculationDependencies",(function(){return Oj})),r.d(t,"reducedPlanckConstantDependencies",(function(){return Cj})),r.d(t,"rydbergDependencies",(function(){return Tj})),r.d(t,"sackurTetrodeDependencies",(function(){return Rj})),r.d(t,"secondRadiationDependencies",(function(){return Bj})),r.d(t,"speedOfLightDependencies",(function(){return Ij})),r.d(t,"stefanBoltzmannDependencies",(function(){return qj})),r.d(t,"thomsonCrossSectionDependencies",(function(){return Pj})),r.d(t,"vacuumImpedanceDependencies",(function(){return jj})),r.d(t,"weakMixingAngleDependencies",(function(){return zj})),r.d(t,"wienDisplacementDependencies",(function(){return Lj})),r.d(t,"applyTransformDependencies",(function(){return Uj})),r.d(t,"columnTransformDependencies",(function(){return Fj})),r.d(t,"filterTransformDependencies",(function(){return Hj})),r.d(t,"forEachTransformDependencies",(function(){return Zj})),r.d(t,"indexTransformDependencies",(function(){return Wj})),r.d(t,"mapTransformDependencies",(function(){return Vj})),r.d(t,"maxTransformDependencies",(function(){return Gj})),r.d(t,"meanTransformDependencies",(function(){return $j})),r.d(t,"minTransformDependencies",(function(){return Kj})),r.d(t,"rangeTransformDependencies",(function(){return Jj})),r.d(t,"rowTransformDependencies",(function(){return Yj})),r.d(t,"subsetTransformDependencies",(function(){return Xj})),r.d(t,"concatTransformDependencies",(function(){return Qj})),r.d(t,"diffTransformDependencies",(function(){return ez})),r.d(t,"stdTransformDependencies",(function(){return tz})),r.d(t,"sumTransformDependencies",(function(){return rz})),r.d(t,"varianceTransformDependencies",(function(){return nz})),r.d(t,"all",(function(){return iz})),r.d(t,"createTyped",(function(){return Yn})),r.d(t,"createResultSet",(function(){return Et})),r.d(t,"createBigNumberClass",(function(){return yr})),r.d(t,"createComplexClass",(function(){return Ct})),r.d(t,"createFractionClass",(function(){return Dn})),r.d(t,"createRangeClass",(function(){return Bt})),r.d(t,"createMatrixClass",(function(){return Mr})),r.d(t,"createDenseMatrixClass",(function(){return Cn})),r.d(t,"createClone",(function(){return Uu})),r.d(t,"createIsInteger",(function(){return hi})),r.d(t,"createIsNegative",(function(){return ef})),r.d(t,"createIsNumeric",(function(){return pi})),r.d(t,"createHasNumericValue",(function(){return Zu})),r.d(t,"createIsPositive",(function(){return _i})),r.d(t,"createIsZero",(function(){return od})),r.d(t,"createIsNaN",(function(){return Ei})),r.d(t,"createTypeOf",(function(){return Gu})),r.d(t,"createEqualScalar",(function(){return Ci})),r.d(t,"createSparseMatrixClass",(function(){return nf})),r.d(t,"createNumber",(function(){return qi})),r.d(t,"createString",(function(){return Ju})),r.d(t,"createBoolean",(function(){return zi})),r.d(t,"createBignumber",(function(){return Hp})),r.d(t,"createComplex",(function(){return Fi})),r.d(t,"createFraction",(function(){return Qu})),r.d(t,"createMatrix",(function(){return sf})),r.d(t,"createMatrixFromFunction",(function(){return cd})),r.d(t,"createMatrixFromRows",(function(){return Wm})),r.d(t,"createMatrixFromColumns",(function(){return Vp})),r.d(t,"createSplitUnit",(function(){return Wi})),r.d(t,"createUnaryMinus",(function(){return rc})),r.d(t,"createUnaryPlus",(function(){return Na})),r.d(t,"createAbs",(function(){return ff})),r.d(t,"createApply",(function(){return Da})),r.d(t,"createAddScalar",(function(){return ac})),r.d(t,"createCbrt",(function(){return ld})),r.d(t,"createCeil",(function(){return xg})),r.d(t,"createCube",(function(){return Ra})),r.d(t,"createExp",(function(){return uc})),r.d(t,"createExpm1",(function(){return qa})),r.d(t,"createFix",(function(){return Lg})),r.d(t,"createFloor",(function(){return md})),r.d(t,"createGcd",(function(){return Df})),r.d(t,"createLcm",(function(){return Kp})),r.d(t,"createLog10",(function(){return za})),r.d(t,"createLog2",(function(){return hc})),r.d(t,"createMod",(function(){return Vf})),r.d(t,"createMultiplyScalar",(function(){return Fa})),r.d(t,"createMultiply",(function(){return yd})),r.d(t,"createNthRoot",(function(){return Xf})),r.d(t,"createSign",(function(){return Wa})),r.d(t,"createSqrt",(function(){return pc})),r.d(t,"createSquare",(function(){return $a})),r.d(t,"createSubtract",(function(){return $m})),r.d(t,"createXgcd",(function(){return th})),r.d(t,"createDotMultiply",(function(){return Md})),r.d(t,"createBitAnd",(function(){return ih})),r.d(t,"createBitNot",(function(){return mo})),r.d(t,"createBitOr",(function(){return Xp})),r.d(t,"createBitXor",(function(){return fh})),r.d(t,"createArg",(function(){return yo})),r.d(t,"createConj",(function(){return vc})),r.d(t,"createIm",(function(){return Mo})),r.d(t,"createRe",(function(){return Sd})),r.d(t,"createNot",(function(){return Oo})),r.d(t,"createOr",(function(){return dh})),r.d(t,"createXor",(function(){return Ng})),r.d(t,"createConcat",(function(){return gh})),r.d(t,"createColumn",(function(){return ry})),r.d(t,"createCount",(function(){return Dg})),r.d(t,"createCross",(function(){return Xm})),r.d(t,"createDiag",(function(){return wh})),r.d(t,"createFilter",(function(){return Ro})),r.d(t,"createFlatten",(function(){return Ad})),r.d(t,"createForEach",(function(){return Po})),r.d(t,"createGetMatrixDataType",(function(){return wc})),r.d(t,"createIdentity",(function(){return _h})),r.d(t,"createKron",(function(){return tm})),r.d(t,"createMap",(function(){return Uo})),r.d(t,"createDiff",(function(){return Hg})),r.d(t,"createOnes",(function(){return Eh})),r.d(t,"createRange",(function(){return tg})),r.d(t,"createReshape",(function(){return kh})),r.d(t,"createResize",(function(){return Cd})),r.d(t,"createRotate",(function(){return Ib})),r.d(t,"createRotationMatrix",(function(){return Tb})),r.d(t,"createRow",(function(){return ig})),r.d(t,"createSize",(function(){return Ih})),r.d(t,"createSqueeze",(function(){return Bd})),r.d(t,"createSubset",(function(){return jh})),r.d(t,"createTranspose",(function(){return im})),r.d(t,"createCtranspose",(function(){return Cg})),r.d(t,"createZeros",(function(){return Wh})),r.d(t,"createErf",(function(){return Wo})),r.d(t,"createMode",(function(){return _c})),r.d(t,"createProd",(function(){return sg})),r.d(t,"createFormat",(function(){return Qo})),r.d(t,"createBin",(function(){return Ec})),r.d(t,"createOct",(function(){return rs})),r.d(t,"createHex",(function(){return $h})),r.d(t,"createPrint",(function(){return as})),r.d(t,"createTo",(function(){return Pd})),r.d(t,"createIsPrime",(function(){return cs})),r.d(t,"createNumeric",(function(){return sm})),r.d(t,"createDivideScalar",(function(){return Vg})),r.d(t,"createPow",(function(){return Ld})),r.d(t,"createRound",(function(){return rl})),r.d(t,"createLog",(function(){return ay}));r.d(t,"createLog1p",(function(){return Fy})),r.d(t,"createNthRoots",(function(){return Kg})),r.d(t,"createDotPow",(function(){return Hd})),r.d(t,"createDotDivide",(function(){return uy})),r.d(t,"createLsolve",(function(){return Qg})),r.d(t,"createUsolve",(function(){return ub})),r.d(t,"createLsolveAll",(function(){return rv})),r.d(t,"createUsolveAll",(function(){return hy})),r.d(t,"createLeftShift",(function(){return cl})),r.d(t,"createRightArithShift",(function(){return Vd})),r.d(t,"createRightLogShift",(function(){return ll})),r.d(t,"createAnd",(function(){return fm})),r.d(t,"createCompare",(function(){return ml})),r.d(t,"createCompareNatural",(function(){return Yd})),r.d(t,"createCompareText",(function(){return yl})),r.d(t,"createEqual",(function(){return fg})),r.d(t,"createEqualText",(function(){return tp})),r.d(t,"createSmaller",(function(){return Ml})),r.d(t,"createSmallerEq",(function(){return dm})),r.d(t,"createLarger",(function(){return Sl})),r.d(t,"createLargerEq",(function(){return ip})),r.d(t,"createDeepEqual",(function(){return Bg})),r.d(t,"createUnequal",(function(){return Al})),r.d(t,"createPartitionSelect",(function(){return sp})),r.d(t,"createSort",(function(){return gm})),r.d(t,"createMax",(function(){return dg})),r.d(t,"createMin",(function(){return wm})),r.d(t,"createImmutableDenseMatrixClass",(function(){return Ol})),r.d(t,"createIndexClass",(function(){return fp})),r.d(t,"createFibonacciHeapClass",(function(){return Rl})),r.d(t,"createSpaClass",(function(){return av})),r.d(t,"createUnitClass",(function(){return Gy})),r.d(t,"createUnitFunction",(function(){return _b})),r.d(t,"createSparse",(function(){return ql})),r.d(t,"createCreateUnit",(function(){return Jy})),r.d(t,"createAcos",(function(){return ls})),r.d(t,"createAcosh",(function(){return kc})),r.d(t,"createAcot",(function(){return Fs})),r.d(t,"createAcoth",(function(){return zl})),r.d(t,"createAcsc",(function(){return Ws})),r.d(t,"createAcsch",(function(){return Tc})),r.d(t,"createAsec",(function(){return $s})),r.d(t,"createAsech",(function(){return dp})),r.d(t,"createAsin",(function(){return Ys})),r.d(t,"createAsinh",(function(){return Ic})),r.d(t,"createAtan",(function(){return eu})),r.d(t,"createAtan2",(function(){return Wl})),r.d(t,"createAtanh",(function(){return nu})),r.d(t,"createCos",(function(){return jc})),r.d(t,"createCosh",(function(){return ou})),r.d(t,"createCot",(function(){return _m})),r.d(t,"createCoth",(function(){return cu})),r.d(t,"createCsc",(function(){return Uc})),r.d(t,"createCsch",(function(){return lu})),r.d(t,"createSec",(function(){return $l})),r.d(t,"createSech",(function(){return mu})),r.d(t,"createSin",(function(){return Zc})),r.d(t,"createSinh",(function(){return yu})),r.d(t,"createTan",(function(){return gp})),r.d(t,"createTanh",(function(){return Mu})),r.d(t,"createSetCartesian",(function(){return gg})),r.d(t,"createSetDifference",(function(){return bp})),r.d(t,"createSetDistinct",(function(){return Em})),r.d(t,"createSetIntersect",(function(){return xp})),r.d(t,"createSetIsSubset",(function(){return Pg})),r.d(t,"createSetMultiplicity",(function(){return Np})),r.d(t,"createSetPowerset",(function(){return km})),r.d(t,"createSetSize",(function(){return Dp})),r.d(t,"createSetSymDifference",(function(){return bg})),r.d(t,"createSetUnion",(function(){return uv})),r.d(t,"createAdd",(function(){return Yl})),r.d(t,"createHypot",(function(){return py})),r.d(t,"createNorm",(function(){return kb})),r.d(t,"createDot",(function(){return ed})),r.d(t,"createTrace",(function(){return Cp})),r.d(t,"createIndex",(function(){return Tm})),r.d(t,"createNode",(function(){return nN})),r.d(t,"createAccessorNode",(function(){return oE})),r.d(t,"createArrayNode",(function(){return oN})),r.d(t,"createAssignmentNode",(function(){return dE})),r.d(t,"createBlockNode",(function(){return cN})),r.d(t,"createConditionalNode",(function(){return HN})),r.d(t,"createConstantNode",(function(){return MN})),r.d(t,"createFunctionAssignmentNode",(function(){return XN})),r.d(t,"createIndexNode",(function(){return cE})),r.d(t,"createObjectNode",(function(){return SN})),r.d(t,"createOperatorNode",(function(){return VN})),r.d(t,"createParenthesisNode",(function(){return AN})),r.d(t,"createRangeNode",(function(){return KN})),r.d(t,"createRelationalNode",(function(){return BN})),r.d(t,"createSymbolNode",(function(){return gE})),r.d(t,"createFunctionNode",(function(){return wE})),r.d(t,"createParse",(function(){return _E})),r.d(t,"createCompile",(function(){return mC})),r.d(t,"createEvaluate",(function(){return EE})),r.d(t,"createParserClass",(function(){return JE})),r.d(t,"createParser",(function(){return lC})),r.d(t,"createLup",(function(){return hv})),r.d(t,"createQr",(function(){return vy})),r.d(t,"createSlu",(function(){return Uv})),r.d(t,"createLusolve",(function(){return lb})),r.d(t,"createHelpClass",(function(){return kE})),r.d(t,"createChainClass",(function(){return PN})),r.d(t,"createHelp",(function(){return oC})),r.d(t,"createChain",(function(){return tE})),r.d(t,"createDet",(function(){return Zv})),r.d(t,"createInv",(function(){return wy})),r.d(t,"createEigs",(function(){return vb})),r.d(t,"createExpm",(function(){return _y})),r.d(t,"createSqrtm",(function(){return Qy})),r.d(t,"createDivide",(function(){return Ey})),r.d(t,"createDistance",(function(){return Gv})),r.d(t,"createIntersect",(function(){return Eb})),r.d(t,"createSum",(function(){return Im})),r.d(t,"createMean",(function(){return ky})),r.d(t,"createMedian",(function(){return rb})),r.d(t,"createMad",(function(){return wb})),r.d(t,"createVariance",(function(){return Ry})),r.d(t,"createQuantileSeq",(function(){return Bp})),r.d(t,"createStd",(function(){return ab})),r.d(t,"createCombinations",(function(){return Eu})),r.d(t,"createCombinationsWithRep",(function(){return Gc})),r.d(t,"createGamma",(function(){return Lp})),r.d(t,"createFactorial",(function(){return jm})),r.d(t,"createKldivergence",(function(){return qy})),r.d(t,"createMultinomial",(function(){return jb})),r.d(t,"createPermutations",(function(){return Um})),r.d(t,"createPickRandom",(function(){return Bu})),r.d(t,"createRandom",(function(){return Yc})),r.d(t,"createRandomInt",(function(){return ju})),r.d(t,"createStirlingS2",(function(){return Jv})),r.d(t,"createBellNumbers",(function(){return zy})),r.d(t,"createCatalan",(function(){return Qv})),r.d(t,"createComposition",(function(){return nd})),r.d(t,"createSimplify",(function(){return ZE})),r.d(t,"createDerivative",(function(){return cC})),r.d(t,"createRationalize",(function(){return GE})),r.d(t,"createReviver",(function(){return LN})),r.d(t,"createReplacer",(function(){return Sr})),r.d(t,"createE",(function(){return tr})),r.d(t,"createUppercaseE",(function(){return hr})),r.d(t,"createFalse",(function(){return Kt})),r.d(t,"createI",(function(){return cr})),r.d(t,"createInfinity",(function(){return Yt})),r.d(t,"createLN10",(function(){return ir})),r.d(t,"createLN2",(function(){return nr})),r.d(t,"createLOG10E",(function(){return or})),r.d(t,"createLOG2E",(function(){return ar})),r.d(t,"createNaN",(function(){return Xt})),r.d(t,"createNull",(function(){return Jt})),r.d(t,"createPhi",(function(){return rr})),r.d(t,"createPi",(function(){return Qt})),r.d(t,"createUppercasePi",(function(){return fr})),r.d(t,"createSQRT1_2",(function(){return sr})),r.d(t,"createSQRT2",(function(){return ur})),r.d(t,"createTau",(function(){return er})),r.d(t,"createTrue",(function(){return $t})),r.d(t,"createVersion",(function(){return lr})),r.d(t,"createAtomicMass",(function(){return en})),r.d(t,"createAvogadro",(function(){return tn})),r.d(t,"createBohrMagneton",(function(){return Br})),r.d(t,"createBohrRadius",(function(){return Lr})),r.d(t,"createBoltzmann",(function(){return rn})),r.d(t,"createClassicalElectronRadius",(function(){return Ur})),r.d(t,"createConductanceQuantum",(function(){return Ir})),r.d(t,"createCoulomb",(function(){return Tr})),r.d(t,"createDeuteronMass",(function(){return Gr})),r.d(t,"createEfimovFactor",(function(){return Qr})),r.d(t,"createElectricConstant",(function(){return Or})),r.d(t,"createElectronMass",(function(){return Fr})),r.d(t,"createElementaryCharge",(function(){return Rr})),r.d(t,"createFaraday",(function(){return nn})),r.d(t,"createFermiCoupling",(function(){return Hr})),r.d(t,"createFineStructure",(function(){return Zr})),r.d(t,"createFirstRadiation",(function(){return an})),r.d(t,"createGasConstant",(function(){return sn})),r.d(t,"createGravitationConstant",(function(){return Er})),r.d(t,"createGravity",(function(){return gn})),r.d(t,"createHartreeEnergy",(function(){return Wr})),r.d(t,"createInverseConductanceQuantum",(function(){return qr})),r.d(t,"createKlitzing",(function(){return zr})),r.d(t,"createLoschmidt",(function(){return on})),r.d(t,"createMagneticConstant",(function(){return kr})),r.d(t,"createMagneticFluxQuantum",(function(){return Pr})),r.d(t,"createMolarMass",(function(){return pn})),r.d(t,"createMolarMassC12",(function(){return mn})),r.d(t,"createMolarPlanckConstant",(function(){return un})),r.d(t,"createMolarVolume",(function(){return cn})),r.d(t,"createNeutronMass",(function(){return $r})),r.d(t,"createNuclearMagneton",(function(){return jr})),r.d(t,"createPlanckCharge",(function(){return wn})),r.d(t,"createPlanckConstant",(function(){return Ar})),r.d(t,"createPlanckLength",(function(){return vn})),r.d(t,"createPlanckMass",(function(){return yn})),r.d(t,"createPlanckTemperature",(function(){return Mn})),r.d(t,"createPlanckTime",(function(){return bn})),r.d(t,"createProtonMass",(function(){return Vr})),r.d(t,"createQuantumOfCirculation",(function(){return Kr})),r.d(t,"createReducedPlanckConstant",(function(){return Dr})),r.d(t,"createRydberg",(function(){return Jr})),r.d(t,"createSackurTetrode",(function(){return fn})),r.d(t,"createSecondRadiation",(function(){return hn})),r.d(t,"createSpeedOfLight",(function(){return Nr})),r.d(t,"createStefanBoltzmann",(function(){return ln})),r.d(t,"createThomsonCrossSection",(function(){return Yr})),r.d(t,"createVacuumImpedance",(function(){return Cr})),r.d(t,"createWeakMixingAngle",(function(){return Xr})),r.d(t,"createWienDisplacement",(function(){return dn})),r.d(t,"createApplyTransform",(function(){return yC})),r.d(t,"createColumnTransform",(function(){return XC})),r.d(t,"createFilterTransform",(function(){return xC})),r.d(t,"createForEachTransform",(function(){return OC})),r.d(t,"createIndexTransform",(function(){return qC})),r.d(t,"createMapTransform",(function(){return EC})),r.d(t,"createMaxTransform",(function(){return HC})),r.d(t,"createMeanTransform",(function(){return fT})),r.d(t,"createMinTransform",(function(){return VC})),r.d(t,"createRangeTransform",(function(){return tT})),r.d(t,"createRowTransform",(function(){return sT})),r.d(t,"createSubsetTransform",(function(){return RC})),r.d(t,"createConcatTransform",(function(){return zC})),r.d(t,"createDiffTransform",(function(){return iT})),r.d(t,"createStdTransform",(function(){return gT})),r.d(t,"createSumTransform",(function(){return KC})),r.d(t,"createVarianceTransform",(function(){return dT})),r.d(t,"create",(function(){return cz})),r.d(t,"factory",(function(){return bt}));var n={};r.r(n),r.d(n,"createTyped",(function(){return Yn})),r.d(n,"createResultSet",(function(){return Et})),r.d(n,"createBigNumberClass",(function(){return yr})),r.d(n,"createComplexClass",(function(){return Ct})),r.d(n,"createFractionClass",(function(){return Dn})),r.d(n,"createRangeClass",(function(){return Bt})),r.d(n,"createMatrixClass",(function(){return Mr})),r.d(n,"createDenseMatrixClass",(function(){return Cn})),r.d(n,"createClone",(function(){return Uu})),r.d(n,"createIsInteger",(function(){return hi})),r.d(n,"createIsNegative",(function(){return ef})),r.d(n,"createIsNumeric",(function(){return pi})),r.d(n,"createHasNumericValue",(function(){return Zu})),r.d(n,"createIsPositive",(function(){return _i})),r.d(n,"createIsZero",(function(){return od})),r.d(n,"createIsNaN",(function(){return Ei})),r.d(n,"createTypeOf",(function(){return Gu})),r.d(n,"createEqualScalar",(function(){return Ci})),r.d(n,"createSparseMatrixClass",(function(){return nf})),r.d(n,"createNumber",(function(){return qi})),r.d(n,"createString",(function(){return Ju})),r.d(n,"createBoolean",(function(){return zi})),r.d(n,"createBignumber",(function(){return Hp})),r.d(n,"createComplex",(function(){return Fi})),r.d(n,"createFraction",(function(){return Qu})),r.d(n,"createMatrix",(function(){return sf})),r.d(n,"createMatrixFromFunction",(function(){return cd})),r.d(n,"createMatrixFromRows",(function(){return Wm})),r.d(n,"createMatrixFromColumns",(function(){return Vp})),r.d(n,"createSplitUnit",(function(){return Wi})),r.d(n,"createUnaryMinus",(function(){return rc})),r.d(n,"createUnaryPlus",(function(){return Na})),r.d(n,"createAbs",(function(){return ff})),r.d(n,"createApply",(function(){return Da})),r.d(n,"createAddScalar",(function(){return ac})),r.d(n,"createCbrt",(function(){return ld})),r.d(n,"createCeil",(function(){return xg})),r.d(n,"createCube",(function(){return Ra})),r.d(n,"createExp",(function(){return uc})),r.d(n,"createExpm1",(function(){return qa})),r.d(n,"createFix",(function(){return Lg})),r.d(n,"createFloor",(function(){return md})),r.d(n,"createGcd",(function(){return Df})),r.d(n,"createLcm",(function(){return Kp})),r.d(n,"createLog10",(function(){return za})),r.d(n,"createLog2",(function(){return hc})),r.d(n,"createMod",(function(){return Vf})),r.d(n,"createMultiplyScalar",(function(){return Fa})),r.d(n,"createMultiply",(function(){return yd})),r.d(n,"createNthRoot",(function(){return Xf})),r.d(n,"createSign",(function(){return Wa})),r.d(n,"createSqrt",(function(){return pc})),r.d(n,"createSquare",(function(){return $a})),r.d(n,"createSubtract",(function(){return $m})),r.d(n,"createXgcd",(function(){return th})),r.d(n,"createDotMultiply",(function(){return Md})),r.d(n,"createBitAnd",(function(){return ih})),r.d(n,"createBitNot",(function(){return mo})),r.d(n,"createBitOr",(function(){return Xp})),r.d(n,"createBitXor",(function(){return fh})),r.d(n,"createArg",(function(){return yo})),r.d(n,"createConj",(function(){return vc})),r.d(n,"createIm",(function(){return Mo})),r.d(n,"createRe",(function(){return Sd})),r.d(n,"createNot",(function(){return Oo})),r.d(n,"createOr",(function(){return dh})),r.d(n,"createXor",(function(){return Ng})),r.d(n,"createConcat",(function(){return gh})),r.d(n,"createColumn",(function(){return ry})),r.d(n,"createCount",(function(){return Dg})),r.d(n,"createCross",(function(){return Xm})),r.d(n,"createDiag",(function(){return wh})),r.d(n,"createFilter",(function(){return Ro})),r.d(n,"createFlatten",(function(){return Ad})),r.d(n,"createForEach",(function(){return Po})),r.d(n,"createGetMatrixDataType",(function(){return wc})),r.d(n,"createIdentity",(function(){return _h})),r.d(n,"createKron",(function(){return tm})),r.d(n,"createMap",(function(){return Uo})),r.d(n,"createDiff",(function(){return Hg})),r.d(n,"createOnes",(function(){return Eh})),r.d(n,"createRange",(function(){return tg})),r.d(n,"createReshape",(function(){return kh})),r.d(n,"createResize",(function(){return Cd})),r.d(n,"createRotate",(function(){return Ib})),r.d(n,"createRotationMatrix",(function(){return Tb})),r.d(n,"createRow",(function(){return ig})),r.d(n,"createSize",(function(){return Ih})),r.d(n,"createSqueeze",(function(){return Bd})),r.d(n,"createSubset",(function(){return jh})),r.d(n,"createTranspose",(function(){return im})),r.d(n,"createCtranspose",(function(){return Cg})),r.d(n,"createZeros",(function(){return Wh})),r.d(n,"createErf",(function(){return Wo})),r.d(n,"createMode",(function(){return _c})),r.d(n,"createProd",(function(){return sg})),r.d(n,"createFormat",(function(){return Qo})),r.d(n,"createBin",(function(){return Ec})),r.d(n,"createOct",(function(){return rs})),r.d(n,"createHex",(function(){return $h})),r.d(n,"createPrint",(function(){return as})),r.d(n,"createTo",(function(){return Pd})),r.d(n,"createIsPrime",(function(){return cs})),r.d(n,"createNumeric",(function(){return sm})),r.d(n,"createDivideScalar",(function(){return Vg})),r.d(n,"createPow",(function(){return Ld})),r.d(n,"createRound",(function(){return rl})),r.d(n,"createLog",(function(){return ay})),r.d(n,"createLog1p",(function(){return Fy})),r.d(n,"createNthRoots",(function(){return Kg})),r.d(n,"createDotPow",(function(){return Hd})),r.d(n,"createDotDivide",(function(){return uy})),r.d(n,"createLsolve",(function(){return Qg})),r.d(n,"createUsolve",(function(){return ub})),r.d(n,"createLsolveAll",(function(){return rv})),r.d(n,"createUsolveAll",(function(){return hy})),r.d(n,"createLeftShift",(function(){return cl})),r.d(n,"createRightArithShift",(function(){return Vd})),r.d(n,"createRightLogShift",(function(){return ll})),r.d(n,"createAnd",(function(){return fm})),r.d(n,"createCompare",(function(){return ml})),r.d(n,"createCompareNatural",(function(){return Yd})),r.d(n,"createCompareText",(function(){return yl})),r.d(n,"createEqual",(function(){return fg})),r.d(n,"createEqualText",(function(){return tp})),r.d(n,"createSmaller",(function(){return Ml})),r.d(n,"createSmallerEq",(function(){return dm})),r.d(n,"createLarger",(function(){return Sl})),r.d(n,"createLargerEq",(function(){return ip})),r.d(n,"createDeepEqual",(function(){return Bg})),r.d(n,"createUnequal",(function(){return Al})),r.d(n,"createPartitionSelect",(function(){return sp})),r.d(n,"createSort",(function(){return gm})),r.d(n,"createMax",(function(){return dg})),r.d(n,"createMin",(function(){return wm})),r.d(n,"createImmutableDenseMatrixClass",(function(){return Ol})),r.d(n,"createIndexClass",(function(){return fp})),r.d(n,"createFibonacciHeapClass",(function(){return Rl})),r.d(n,"createSpaClass",(function(){return av})),r.d(n,"createUnitClass",(function(){return Gy})),r.d(n,"createUnitFunction",(function(){return _b})),r.d(n,"createSparse",(function(){return ql})),r.d(n,"createCreateUnit",(function(){return Jy})),r.d(n,"createAcos",(function(){return ls})),r.d(n,"createAcosh",(function(){return kc})),r.d(n,"createAcot",(function(){return Fs})),r.d(n,"createAcoth",(function(){return zl})),r.d(n,"createAcsc",(function(){return Ws})),r.d(n,"createAcsch",(function(){return Tc})),r.d(n,"createAsec",(function(){return $s})),r.d(n,"createAsech",(function(){return dp})),r.d(n,"createAsin",(function(){return Ys})),r.d(n,"createAsinh",(function(){return Ic})),r.d(n,"createAtan",(function(){return eu})),r.d(n,"createAtan2",(function(){return Wl})),r.d(n,"createAtanh",(function(){return nu})),r.d(n,"createCos",(function(){return jc})),r.d(n,"createCosh",(function(){return ou})),r.d(n,"createCot",(function(){return _m})),r.d(n,"createCoth",(function(){return cu})),r.d(n,"createCsc",(function(){return Uc})),r.d(n,"createCsch",(function(){return lu})),r.d(n,"createSec",(function(){return $l})),r.d(n,"createSech",(function(){return mu})),r.d(n,"createSin",(function(){return Zc})),r.d(n,"createSinh",(function(){return yu})),r.d(n,"createTan",(function(){return gp})),r.d(n,"createTanh",(function(){return Mu})),r.d(n,"createSetCartesian",(function(){return gg})),r.d(n,"createSetDifference",(function(){return bp})),r.d(n,"createSetDistinct",(function(){return Em})),r.d(n,"createSetIntersect",(function(){return xp})),r.d(n,"createSetIsSubset",(function(){return Pg})),r.d(n,"createSetMultiplicity",(function(){return Np})),r.d(n,"createSetPowerset",(function(){return km})),r.d(n,"createSetSize",(function(){return Dp})),r.d(n,"createSetSymDifference",(function(){return bg})),r.d(n,"createSetUnion",(function(){return uv})),r.d(n,"createAdd",(function(){return Yl})),r.d(n,"createHypot",(function(){return py})),r.d(n,"createNorm",(function(){return kb})),r.d(n,"createDot",(function(){return ed})),r.d(n,"createTrace",(function(){return Cp})),r.d(n,"createIndex",(function(){return Tm})),r.d(n,"createNode",(function(){return nN})),r.d(n,"createAccessorNode",(function(){return oE})),r.d(n,"createArrayNode",(function(){return oN})),r.d(n,"createAssignmentNode",(function(){return dE})),r.d(n,"createBlockNode",(function(){return cN})),r.d(n,"createConditionalNode",(function(){return HN})),r.d(n,"createConstantNode",(function(){return MN})),r.d(n,"createFunctionAssignmentNode",(function(){return XN})),r.d(n,"createIndexNode",(function(){return cE})),r.d(n,"createObjectNode",(function(){return SN})),r.d(n,"createOperatorNode",(function(){return VN})),r.d(n,"createParenthesisNode",(function(){return AN})),r.d(n,"createRangeNode",(function(){return KN})),r.d(n,"createRelationalNode",(function(){return BN})),r.d(n,"createSymbolNode",(function(){return gE})),r.d(n,"createFunctionNode",(function(){return wE})),r.d(n,"createParse",(function(){return _E})),r.d(n,"createCompile",(function(){return mC})),r.d(n,"createEvaluate",(function(){return EE})),r.d(n,"createParserClass",(function(){return JE})),r.d(n,"createParser",(function(){return lC})),r.d(n,"createLup",(function(){return hv})),r.d(n,"createQr",(function(){return vy})),r.d(n,"createSlu",(function(){return Uv})),r.d(n,"createLusolve",(function(){return lb})),r.d(n,"createHelpClass",(function(){return kE})),r.d(n,"createChainClass",(function(){return PN})),r.d(n,"createHelp",(function(){return oC})),r.d(n,"createChain",(function(){return tE})),r.d(n,"createDet",(function(){return Zv})),r.d(n,"createInv",(function(){return wy})),r.d(n,"createEigs",(function(){return vb})),r.d(n,"createExpm",(function(){return _y})),r.d(n,"createSqrtm",(function(){return Qy})),r.d(n,"createDivide",(function(){return Ey})),r.d(n,"createDistance",(function(){return Gv})),r.d(n,"createIntersect",(function(){return Eb})),r.d(n,"createSum",(function(){return Im})),r.d(n,"createMean",(function(){return ky})),r.d(n,"createMedian",(function(){return rb})),r.d(n,"createMad",(function(){return wb})),r.d(n,"createVariance",(function(){return Ry})),r.d(n,"createQuantileSeq",(function(){return Bp})),r.d(n,"createStd",(function(){return ab})),r.d(n,"createCombinations",(function(){return Eu})),r.d(n,"createCombinationsWithRep",(function(){return Gc})),r.d(n,"createGamma",(function(){return Lp})),r.d(n,"createFactorial",(function(){return jm})),r.d(n,"createKldivergence",(function(){return qy})),r.d(n,"createMultinomial",(function(){return jb})),r.d(n,"createPermutations",(function(){return Um})),r.d(n,"createPickRandom",(function(){return Bu})),r.d(n,"createRandom",(function(){return Yc})),r.d(n,"createRandomInt",(function(){return ju})),r.d(n,"createStirlingS2",(function(){return Jv})),r.d(n,"createBellNumbers",(function(){return zy})),r.d(n,"createCatalan",(function(){return Qv})),r.d(n,"createComposition",(function(){return nd})),r.d(n,"createSimplify",(function(){return ZE})),r.d(n,"createDerivative",(function(){return cC})),r.d(n,"createRationalize",(function(){return GE})),r.d(n,"createReviver",(function(){return LN})),r.d(n,"createReplacer",(function(){return Sr})),r.d(n,"createE",(function(){return tr})),r.d(n,"createUppercaseE",(function(){return hr})),r.d(n,"createFalse",(function(){return Kt})),r.d(n,"createI",(function(){return cr})),r.d(n,"createInfinity",(function(){return Yt})),r.d(n,"createLN10",(function(){return ir})),r.d(n,"createLN2",(function(){return nr})),r.d(n,"createLOG10E",(function(){return or})),r.d(n,"createLOG2E",(function(){return ar})),r.d(n,"createNaN",(function(){return Xt})),r.d(n,"createNull",(function(){return Jt})),r.d(n,"createPhi",(function(){return rr})),r.d(n,"createPi",(function(){return Qt})),r.d(n,"createUppercasePi",(function(){return fr})),r.d(n,"createSQRT1_2",(function(){return sr})),r.d(n,"createSQRT2",(function(){return ur})),r.d(n,"createTau",(function(){return er})),r.d(n,"createTrue",(function(){return $t})),r.d(n,"createVersion",(function(){return lr})),r.d(n,"createAtomicMass",(function(){return en})),r.d(n,"createAvogadro",(function(){return tn})),r.d(n,"createBohrMagneton",(function(){return Br})),r.d(n,"createBohrRadius",(function(){return Lr})),r.d(n,"createBoltzmann",(function(){return rn})),r.d(n,"createClassicalElectronRadius",(function(){return Ur})),r.d(n,"createConductanceQuantum",(function(){return Ir})),r.d(n,"createCoulomb",(function(){return Tr})),r.d(n,"createDeuteronMass",(function(){return Gr})),r.d(n,"createEfimovFactor",(function(){return Qr})),r.d(n,"createElectricConstant",(function(){return Or})),r.d(n,"createElectronMass",(function(){return Fr})),r.d(n,"createElementaryCharge",(function(){return Rr})),r.d(n,"createFaraday",(function(){return nn})),r.d(n,"createFermiCoupling",(function(){return Hr})),r.d(n,"createFineStructure",(function(){return Zr})),r.d(n,"createFirstRadiation",(function(){return an})),r.d(n,"createGasConstant",(function(){return sn})),r.d(n,"createGravitationConstant",(function(){return Er})),r.d(n,"createGravity",(function(){return gn})),r.d(n,"createHartreeEnergy",(function(){return Wr})),r.d(n,"createInverseConductanceQuantum",(function(){return qr})),r.d(n,"createKlitzing",(function(){return zr})),r.d(n,"createLoschmidt",(function(){return on})),r.d(n,"createMagneticConstant",(function(){return kr})),r.d(n,"createMagneticFluxQuantum",(function(){return Pr})),r.d(n,"createMolarMass",(function(){return pn})),r.d(n,"createMolarMassC12",(function(){return mn})),r.d(n,"createMolarPlanckConstant",(function(){return un})),r.d(n,"createMolarVolume",(function(){return cn})),r.d(n,"createNeutronMass",(function(){return $r})),r.d(n,"createNuclearMagneton",(function(){return jr})),r.d(n,"createPlanckCharge",(function(){return wn})),r.d(n,"createPlanckConstant",(function(){return Ar})),r.d(n,"createPlanckLength",(function(){return vn})),r.d(n,"createPlanckMass",(function(){return yn})),r.d(n,"createPlanckTemperature",(function(){return Mn})),r.d(n,"createPlanckTime",(function(){return bn})),r.d(n,"createProtonMass",(function(){return Vr})),r.d(n,"createQuantumOfCirculation",(function(){return Kr})),r.d(n,"createReducedPlanckConstant",(function(){return Dr})),r.d(n,"createRydberg",(function(){return Jr})),r.d(n,"createSackurTetrode",(function(){return fn})),r.d(n,"createSecondRadiation",(function(){return hn})),r.d(n,"createSpeedOfLight",(function(){return Nr})),r.d(n,"createStefanBoltzmann",(function(){return ln})),r.d(n,"createThomsonCrossSection",(function(){return Yr})),r.d(n,"createVacuumImpedance",(function(){return Cr})),r.d(n,"createWeakMixingAngle",(function(){return Xr})),r.d(n,"createWienDisplacement",(function(){return dn})),r.d(n,"createApplyTransform",(function(){return yC})),r.d(n,"createColumnTransform",(function(){return XC})),r.d(n,"createFilterTransform",(function(){return xC})),r.d(n,"createForEachTransform",(function(){return OC})),r.d(n,"createIndexTransform",(function(){return qC})),r.d(n,"createMapTransform",(function(){return EC})),r.d(n,"createMaxTransform",(function(){return HC})),r.d(n,"createMeanTransform",(function(){return fT})),r.d(n,"createMinTransform",(function(){return VC})),r.d(n,"createRangeTransform",(function(){return tT})),r.d(n,"createRowTransform",(function(){return sT})),r.d(n,"createSubsetTransform",(function(){return RC})),r.d(n,"createConcatTransform",(function(){return zC})),r.d(n,"createDiffTransform",(function(){return iT})),r.d(n,"createStdTransform",(function(){return gT})),r.d(n,"createSumTransform",(function(){return KC})),r.d(n,"createVarianceTransform",(function(){return dT}));var i=r("a559"),a=r.n(i),o={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function s(e){return"number"===typeof e}function u(e){return!(!e||"object"!==typeof e||"function"!==typeof e.constructor)&&(!0===e.isBigNumber&&"object"===typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"===typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function c(e){return e&&"object"===typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function f(e){return e&&"object"===typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function h(e){return e&&!0===e.constructor.prototype.isUnit||!1}function l(e){return"string"===typeof e}var d=Array.isArray;function p(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function m(e){return Array.isArray(e)||p(e)}function g(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function v(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function y(e){return e&&!0===e.constructor.prototype.isRange||!1}function b(e){return e&&!0===e.constructor.prototype.isIndex||!1}function w(e){return"boolean"===typeof e}function M(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function x(e){return e&&!0===e.constructor.prototype.isHelp||!1}function _(e){return"function"===typeof e}function S(e){return e instanceof Date}function N(e){return e instanceof RegExp}function E(e){return!(!e||"object"!==typeof e||e.constructor!==Object||c(e)||f(e))}function A(e){return null===e}function D(e){return void 0===e}function k(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function O(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function C(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function T(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function R(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function B(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function I(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function q(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function P(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function j(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function z(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function L(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function U(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function F(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function H(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function Z(e){return e&&!0===e.constructor.prototype.isChain||!1}function W(e){var t=typeof e;return"object"===t?null===e?"null":Array.isArray(e)?"Array":e instanceof Date?"Date":e instanceof RegExp?"RegExp":u(e)?"BigNumber":c(e)?"Complex":f(e)?"Fraction":p(e)?"Matrix":h(e)?"Unit":b(e)?"Index":y(e)?"Range":M(e)?"ResultSet":j(e)?e.type:Z(e)?"Chain":x(e)?"Help":"Object":"function"===t?"Function":t}function V(e){var t=typeof e;if("number"===t||"string"===t||"boolean"===t||null===e||void 0===e)return e;if("function"===typeof e.clone)return e.clone();if(Array.isArray(e))return e.map((function(e){return V(e)}));if(e instanceof Date)return new Date(e.valueOf());if(u(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return G(e,V)}function G(e,t){var r={};for(var n in e)ee(e,n)&&(r[n]=t(e[n]));return r}function $(e,t){for(var r in t)ee(t,r)&&(e[r]=t[r]);return e}function K(e,t){if(Array.isArray(t))throw new TypeError("Arrays are not supported by deepExtend");for(var r in t)if(ee(t,r)&&!(r in Object.prototype)&&!(r in Function.prototype))if(t[r]&&t[r].constructor===Object)void 0===e[r]&&(e[r]={}),e[r]&&e[r].constructor===Object?K(e[r],t[r]):e[r]=t[r];else{if(Array.isArray(t[r]))throw new TypeError("Arrays are not supported by deepExtend");e[r]=t[r]}return e}function J(e,t){var r,n,i;if(Array.isArray(e)){if(!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(n=0,i=e.length;n<i;n++)if(!J(e[n],t[n]))return!1;return!0}if("function"===typeof e)return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(r in e)if(!(r in t)||!J(e[r],t[r]))return!1;for(r in t)if(!(r in e))return!1;return!0}return e===t}function Y(e){var t={};return X(e,t),t}function X(e,t){for(var r in e)if(ee(e,r)){var n=e[r];"object"===typeof n&&null!==n?X(n,t):t[r]=n}}function Q(e,t,r){var n,i=!0;Object.defineProperty(e,t,{get:function(){return i&&(n=r(),i=!1),n},set:function(e){n=e,i=!1},configurable:!0,enumerable:!0})}function ee(e,t){return e&&Object.hasOwnProperty.call(e,t)}function te(e){return e&&"function"===typeof e.factory}function re(e,t){for(var r={},n=0;n<t.length;n++){var i=t[n],a=e[i];void 0!==a&&(r[i]=a)}return r}function ne(e){return Object.keys(e).map(t=>e[t])}var ie=["Matrix","Array"],ae=["number","BigNumber","Fraction"];function oe(e,t){function r(r){if(r){var n=G(e,V);ue(r,"matrix",ie),ue(r,"number",ae),K(e,r);var i=G(e,V),a=G(r,V);return t("config",i,n,a),i}return G(e,V)}return r.MATRIX_OPTIONS=ie,r.NUMBER_OPTIONS=ae,Object.keys(o).forEach(t=>{Object.defineProperty(r,t,{get:()=>e[t],enumerable:!0,configurable:!0})}),r}function se(e,t){return-1!==e.indexOf(t)}function ue(e,t,r){void 0===e[t]||se(r,e[t])||console.warn('Warning: Unknown value "'+e[t]+'" for configuration option "'+t+'". Available options: '+r.map(e=>JSON.stringify(e)).join(", ")+".")}var ce=function(e){if(e)throw new Error("The global config is readonly. \nPlease create a mathjs instance if you want to change the default configuration. \nExample:\n\n import { create, all } from 'mathjs';\n const mathjs = create(all);\n mathjs.config({ number: 'BigNumber' });\n");return Object.freeze(o)};function fe(e){return"boolean"===typeof e||!!isFinite(e)&&e===Math.round(e)}a()(ce,o,{MATRIX_OPTIONS:ie,NUMBER_OPTIONS:ae});var he=Math.sign||function(e){return e>0?1:e<0?-1:0},le=Math.log2||function(e){return Math.log(e)/Math.LN2},de=Math.log10||function(e){return Math.log(e)/Math.LN10},pe=Math.log1p||function(e){return Math.log(e+1)},me=Math.cbrt||function(e){if(0===e)return e;var t,r=e<0;return r&&(e=-e),isFinite(e)?(t=Math.exp(Math.log(e)/3),t=(e/(t*t)+2*t)/3):t=e,r?-t:t},ge=Math.expm1||function(e){return e>=2e-4||e<=-2e-4?Math.exp(e)-1:e+e*e/2+e*e*e/6};function ve(e,t,r){var n={2:"0b",8:"0o",16:"0x"},i=n[t],a="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!fe(r))throw new Error("size must be an integer");if(e>2**(r-1)-1||e<-(2**(r-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!fe(e))throw new Error("Value must be an integer");e<0&&(e+=2**r),a="i".concat(r)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(i).concat(e.toString(t)).concat(a)}function ye(e,t){if("function"===typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var r,n,i="auto";if(t&&(t.notation&&(i=t.notation),s(t)?r=t:s(t.precision)&&(r=t.precision),t.wordSize&&(n=t.wordSize,"number"!==typeof n)))throw new Error('Option "wordSize" must be a number');switch(i){case"fixed":return Me(e,r);case"exponential":return xe(e,r);case"engineering":return we(e,r);case"bin":return ve(e,2,n);case"oct":return ve(e,8,n);case"hex":return ve(e,16,n);case"auto":return _e(e,r,t&&t).replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+i+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function be(e){var t=String(e).toLowerCase().match(/^0*?(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var r=t[1],n=t[2],i=parseFloat(t[4]||"0"),a=n.indexOf(".");i+=-1!==a?a-1:n.length-1;var o=n.replace(".","").replace(/^0*/,(function(e){return i-=e.length,""})).replace(/0*$/,"").split("").map((function(e){return parseInt(e)}));return 0===o.length&&(o.push(0),i++),{sign:r,coefficients:o,exponent:i}}function we(e,t){if(isNaN(e)||!isFinite(e))return String(e);var r=be(e),n=Se(r,t),i=n.exponent,a=n.coefficients,o=i%3===0?i:i<0?i-3-i%3:i-i%3;if(s(t))while(t>a.length||i-o+1>a.length)a.push(0);else for(var u=Math.abs(i-o)-(a.length-1),c=0;c<u;c++)a.push(0);var f=Math.abs(i-o),h=1;while(f>0)h++,f--;var l=a.slice(h).join(""),d=s(t)&&l.length||l.match(/[1-9]/)?"."+l:"",p=a.slice(0,h).join("")+d+"e"+(i>=0?"+":"")+o.toString();return n.sign+p}function Me(e,t){if(isNaN(e)||!isFinite(e))return String(e);var r=be(e),n="number"===typeof t?Se(r,r.exponent+1+t):r,i=n.coefficients,a=n.exponent+1,o=a+(t||0);return i.length<o&&(i=i.concat(Ne(o-i.length))),a<0&&(i=Ne(1-a).concat(i),a=1),a<i.length&&i.splice(a,0,0===a?"0.":"."),n.sign+i.join("")}function xe(e,t){if(isNaN(e)||!isFinite(e))return String(e);var r=be(e),n=t?Se(r,t):r,i=n.coefficients,a=n.exponent;i.length<t&&(i=i.concat(Ne(t-i.length)));var o=i.shift();return n.sign+o+(i.length>0?"."+i.join(""):"")+"e"+(a>=0?"+":"")+a}function _e(e,t,r){if(isNaN(e)||!isFinite(e))return String(e);var n=r&&void 0!==r.lowerExp?r.lowerExp:-3,i=r&&void 0!==r.upperExp?r.upperExp:5,a=be(e),o=t?Se(a,t):a;if(o.exponent<n||o.exponent>=i)return xe(e,t);var s=o.coefficients,u=o.exponent;s.length<t&&(s=s.concat(Ne(t-s.length))),s=s.concat(Ne(u-s.length+1+(s.length<t?t-s.length:0))),s=Ne(-u).concat(s);var c=u>0?u:0;return c<s.length-1&&s.splice(c+1,0,"."),o.sign+s.join("")}function Se(e,t){var r={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},n=r.coefficients;while(t<=0)n.unshift(0),r.exponent++,t++;if(n.length>t){var i=n.splice(t,n.length-t);if(i[0]>=5){var a=t-1;n[a]++;while(10===n[a])n.pop(),0===a&&(n.unshift(0),r.exponent++,a++),a--,n[a]++}}return r}function Ne(e){for(var t=[],r=0;r<e;r++)t.push(0);return t}function Ee(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var Ae=Number.EPSILON||2220446049250313e-31;function De(e,t,r){if(null===r||void 0===r)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var n=Math.abs(e-t);return n<Ae||n<=Math.max(Math.abs(e),Math.abs(t))*r}return!1}var ke=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},Oe=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},Ce=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},Te=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},Re=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},Be=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};function Ie(e,t,r){var n=e.constructor,i=new n(2),a="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!fe(r))throw new Error("size must be an integer");if(e.greaterThan(i.pow(r-1).sub(1))||e.lessThan(i.pow(r-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(i.pow(r))),a="i".concat(r)}switch(t){case 2:return"".concat(e.toBinary()).concat(a);case 8:return"".concat(e.toOctal()).concat(a);case 16:return"".concat(e.toHexadecimal()).concat(a);default:throw new Error("Base ".concat(t," not supported "))}}function qe(e,t){if("function"===typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var r,n,i="auto";if(void 0!==t&&(t.notation&&(i=t.notation),"number"===typeof t?r=t:t.precision&&(r=t.precision),t.wordSize&&(n=t.wordSize,"number"!==typeof n)))throw new Error('Option "wordSize" must be a number');switch(i){case"fixed":return ze(e,r);case"exponential":return je(e,r);case"engineering":return Pe(e,r);case"bin":return Ie(e,2,n);case"oct":return Ie(e,8,n);case"hex":return Ie(e,16,n);case"auto":var a,o=t&&void 0!==t.lowerExp?t.lowerExp:-3,s=t&&void 0!==t.upperExp?t.upperExp:5;if(e.isZero())return"0";var u=e.toSignificantDigits(r),c=u.e;return a=c>=o&&c<s?u.toFixed():je(e,r),a.replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+i+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Pe(e,t){var r=e.e,n=r%3===0?r:r<0?r-3-r%3:r-r%3,i=e.mul(Math.pow(10,-n)),a=i.toPrecision(t);return-1!==a.indexOf("e")&&(a=i.toString()),a+"e"+(r>=0?"+":"")+n.toString()}function je(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function ze(e,t){return e.toFixed(t)}function Le(e,t){var r=e.length-t.length,n=e.length;return e.substring(r,n)===t}function Ue(e,t){if("number"===typeof e)return ye(e,t);if(u(e))return qe(e,t);if(We(e))return t&&"decimal"===t.fraction?e.toString():e.s*e.n+"/"+e.d;if(Array.isArray(e))return Ze(e,t);if(l(e))return'"'+e+'"';if("function"===typeof e)return e.syntax?String(e.syntax):"function";if(e&&"object"===typeof e){if("function"===typeof e.format)return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var r=Object.keys(e).map(r=>'"'+r+'": '+Ue(e[r],t));return"{"+r.join(", ")+"}"}return String(e)}function Fe(e){var t=String(e),r="",n=0;while(n<t.length){var i=t.charAt(n);"\\"===i?(r+=i,n++,i=t.charAt(n),""!==i&&-1!=='"\\/bfnrtu'.indexOf(i)||(r+="\\"),r+=i):r+='"'===i?'\\"':i,n++}return'"'+r+'"'}function He(e){var t=String(e);return t=t.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">"),t}function Ze(e,t){if(Array.isArray(e)){for(var r="[",n=e.length,i=0;i<n;i++)0!==i&&(r+=", "),r+=Ze(e[i],t);return r+="]",r}return Ue(e,t)}function We(e){return e&&"object"===typeof e&&"number"===typeof e.s&&"number"===typeof e.n&&"number"===typeof e.d||!1}function Ve(e,t){if(!l(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+W(e)+", index: 0)");if(!l(t))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+W(t)+", index: 1)");return e===t?0:e>t?1:-1}function Ge(e,t,r){if(!(this instanceof Ge))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=(new Error).stack}function $e(e,t,r){if(!(this instanceof $e))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=r),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}function Ke(e){var t=[];while(Array.isArray(e))t.push(e.length),e=e[0];return t}function Je(e,t,r){var n,i=e.length;if(i!==t[r])throw new Ge(i,t[r]);if(r<t.length-1){var a=r+1;for(n=0;n<i;n++){var o=e[n];if(!Array.isArray(o))throw new Ge(t.length-1,t.length,"<");Je(e[n],t,a)}}else for(n=0;n<i;n++)if(Array.isArray(e[n]))throw new Ge(t.length+1,t.length,">")}function Ye(e,t){var r=0===t.length;if(r){if(Array.isArray(e))throw new Ge(e.length,0)}else Je(e,t,0)}function Xe(e,t){if(!s(e)||!fe(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"===typeof t&&e>=t)throw new $e(e,t)}function Qe(e,t,r){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(0===t.length)throw new Error("Resizing to scalar is not supported");t.forEach((function(e){if(!s(e)||!fe(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Ue(t)+")")}));var n=void 0!==r?r:0;return et(e,t,0,n),e}function et(e,t,r,n){var i,a,o=e.length,s=t[r],u=Math.min(o,s);if(e.length=s,r<t.length-1){var c=r+1;for(i=0;i<u;i++)a=e[i],Array.isArray(a)||(a=[a],e[i]=a),et(a,t,c,n);for(i=u;i<s;i++)a=[],e[i]=a,et(a,t,c,n)}else{for(i=0;i<u;i++)while(Array.isArray(e[i]))e[i]=e[i][0];for(i=u;i<s;i++)e[i]=n}}function tt(e,t){var r=ct(e),n=r.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(0===t.length)throw new Ge(0,n,"!=");t=rt(t,n);var i=nt(t);if(n!==i)throw new Ge(i,n,"!=");try{return it(r,t)}catch(a){if(a instanceof Ge)throw new Ge(i,n,"!=");throw a}}function rt(e,t){var r=nt(e),n=e.slice(),i=-1,a=e.indexOf(i),o=e.indexOf(i,a+1)>=0;if(o)throw new Error("More than one wildcard in sizes");var s=a>=0,u=t%r===0;if(s){if(!u)throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-r);n[a]=-t/r}return n}function nt(e){return e.reduce((e,t)=>e*t,1)}function it(e,t){for(var r,n=e,i=t.length-1;i>0;i--){var a=t[i];r=[];for(var o=n.length/a,s=0;s<o;s++)r.push(n.slice(s*a,(s+1)*a));n=r}return n}function at(e,t){var r=t||Ke(e);while(Array.isArray(e)&&1===e.length)e=e[0],r.shift();var n=r.length;while(1===r[n-1])n--;return n<r.length&&(e=ot(e,n,0),r.length=n),e}function ot(e,t,r){var n,i;if(r<t){var a=r+1;for(n=0,i=e.length;n<i;n++)e[n]=ot(e[n],t,a)}else while(Array.isArray(e))e=e[0];return e}function st(e,t,r,n){var i=n||Ke(e);if(r)for(var a=0;a<r;a++)e=[e],i.unshift(1);e=ut(e,t,0);while(i.length<t)i.push(1);return e}function ut(e,t,r){var n,i;if(Array.isArray(e)){var a=r+1;for(n=0,i=e.length;n<i;n++)e[n]=ut(e[n],t,a)}else for(var o=r;o<t;o++)e=[e];return e}function ct(e){if(!Array.isArray(e))return e;var t=[];return e.forEach((function e(r){Array.isArray(r)?r.forEach(e):t.push(r)})),t}function ft(e,t){return Array.prototype.map.call(e,t)}function ht(e,t){Array.prototype.forEach.call(e,t)}function lt(e,t){if(1!==Ke(e).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,t)}function dt(e,t){if(1!==Ke(e).length)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,e=>t.test(e))}function pt(e,t){return Array.prototype.join.call(e,t)}function mt(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(0===e.length)return e;var t=[],r=0;t[0]={value:e[0],identifier:0};for(var n=1;n<e.length;n++)e[n]===e[n-1]?r++:r=0,t.push({value:e[n],identifier:r});return t}function gt(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(0===e.length)return e;for(var t=[],r=0;r<e.length;r++)t.push(e[r].value);return t}function vt(e,t){for(var r,n=0,i=0;i<e.length;i++){var a=e[i],o=Array.isArray(a);if(0===i&&o&&(n=a.length),o&&a.length!==n)return;var s=o?vt(a,t):t(a);if(void 0===r)r=s;else if(r!==s)return"mixed"}return r}function yt(e,t){return-1!==e.indexOf(t)}function bt(e,t,r,n){function i(n){var i=re(n,t.map(_t));return Mt(e,t,n),r(i)}return i.isFactory=!0,i.fn=e,i.dependencies=t.slice().sort(),n&&(i.meta=n),i}function wt(e){return"function"===typeof e&&"string"===typeof e.fn&&Array.isArray(e.dependencies)}function Mt(e,t,r){var n=t.filter(e=>!xt(e)).every(e=>void 0!==r[e]);if(!n){var i=t.filter(e=>void 0===r[e]);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(i.map(e=>'"'.concat(e,'"')).join(", "),"."))}}function xt(e){return e&&"?"===e[0]}function _t(e){return e&&"?"===e[0]?e.slice(1):e}Ge.prototype=new RangeError,Ge.prototype.constructor=RangeError,Ge.prototype.name="DimensionError",Ge.prototype.isDimensionError=!0,$e.prototype=new RangeError,$e.prototype.constructor=RangeError,$e.prototype.name="IndexError",$e.prototype.isIndexError=!0;var St="ResultSet",Nt=[],Et=bt(St,Nt,()=>{function e(t){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0}),At=r("edaf"),Dt=r.n(At),kt="Complex",Ot=[],Ct=bt(kt,Ot,()=>(Dt.a.prototype.type="Complex",Dt.a.prototype.isComplex=!0,Dt.a.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},Dt.a.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},Dt.a.prototype.format=function(e){var t="",r=this.im,n=this.re,i=ye(this.re,e),a=ye(this.im,e),o=s(e)?e:e?e.precision:null;if(null!==o){var u=Math.pow(10,-o);Math.abs(n/r)<u&&(n=0),Math.abs(r/n)<u&&(r=0)}return t=0===r?i:0===n?1===r?"i":-1===r?"-i":a+"i":r<0?-1===r?i+" - i":i+" - "+a.substring(1)+"i":1===r?i+" + i":i+" + "+a+"i",t},Dt.a.fromPolar=function(e){switch(arguments.length){case 1:var t=arguments[0];if("object"===typeof t)return Dt()(t);throw new TypeError("Input has to be an object with r and phi keys.");case 2:var r=arguments[0],n=arguments[1];if(s(r)){if(h(n)&&n.hasBase("ANGLE")&&(n=n.toNumber("rad")),s(n))return new Dt.a({r:r,phi:n});throw new TypeError("Phi is not a number nor an angle unit.")}throw new TypeError("Radius r is not a number.");default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},Dt.a.prototype.valueOf=Dt.a.prototype.toString,Dt.a.fromJSON=function(e){return new Dt.a(e)},Dt.a.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},Dt.a),{isClass:!0}),Tt="Range",Rt=[],Bt=bt(Tt,Rt,()=>{function e(t,r,n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var i=null!==t&&void 0!==t,a=null!==r&&void 0!==r,o=null!==n&&void 0!==n;if(i)if(u(t))t=t.toNumber();else if("number"!==typeof t)throw new TypeError("Parameter start must be a number");if(a)if(u(r))r=r.toNumber();else if("number"!==typeof r)throw new TypeError("Parameter end must be a number");if(o)if(u(n))n=n.toNumber();else if("number"!==typeof n)throw new TypeError("Parameter step must be a number");this.start=i?parseFloat(t):0,this.end=a?parseFloat(r):0,this.step=o?parseFloat(n):1}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(t){if("string"!==typeof t)return null;var r=t.split(":"),n=r.map((function(e){return parseFloat(e)})),i=n.some((function(e){return isNaN(e)}));if(i)return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var e=0,t=this.start,r=this.step,n=this.end,i=n-t;return he(r)===he(i)?e=Math.ceil(i/r):0===i&&(e=0),isNaN(e)&&(e=0),[e]},e.prototype.min=function(){var e=this.size()[0];return e>0?this.step>0?this.start:this.start+(e-1)*this.step:void 0},e.prototype.max=function(){var e=this.size()[0];return e>0?this.step>0?this.start+(e-1)*this.step:this.start:void 0},e.prototype.forEach=function(e){var t=this.start,r=this.step,n=this.end,i=0;if(r>0)while(t<n)e(t,[i],this),t+=r,i++;else if(r<0)while(t>n)e(t,[i],this),t+=r,i++},e.prototype.map=function(e){var t=[];return this.forEach((function(r,n,i){t[n[0]]=e(r,n,i)})),t},e.prototype.toArray=function(){var e=[];return this.forEach((function(t,r){e[r[0]]=t})),e},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(e){var t=ye(this.start,e);return 1!==this.step&&(t+=":"+ye(this.step,e)),t+=":"+ye(this.end,e),t},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(t){return new e(t.start,t.end,t.step)},e},{isClass:!0}),It="9.5.2";function qt(e){var t=0,r=1,n=Object.create(null),i=Object.create(null),a=0,o=function(e){var o=i[e];if(o&&(delete n[o],delete i[e],--t,r===o)){if(!t)return a=0,void(r=1);while(!hasOwnProperty.call(n,++r));}};return e=Math.abs(e),{hit:function(s){var u=i[s],c=++a;if(n[c]=s,i[s]=c,!u){if(++t,t<=e)return;return s=n[r],o(s),s}if(delete n[u],r===u)while(!hasOwnProperty.call(n,++r));},delete:o,clear:function(){t=a=0,r=1,n=Object.create(null),i=Object.create(null)}}}function Pt(e){var{hasher:t,limit:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return r=null==r?Number.POSITIVE_INFINITY:r,t=null==t?JSON.stringify:t,function n(){"object"!==typeof n.cache&&(n.cache={values:new Map,lru:qt(r||Number.POSITIVE_INFINITY)});for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var o=t(i);if(n.cache.values.has(o))return n.cache.lru.hit(o),n.cache.values.get(o);var s=e.apply(e,i);return n.cache.values.set(o,s),n.cache.values.delete(n.cache.lru.hit(o)),s}}function jt(e){return Object.keys(e.signatures||{}).reduce((function(e,t){var r=(t.match(/,/g)||[]).length+1;return Math.max(e,r)}),-1)}var zt=Pt((function(e){return new e(1).exp()}),{hasher:Ht}),Lt=Pt((function(e){return new e(1).plus(new e(5).sqrt()).div(2)}),{hasher:Ht}),Ut=Pt((function(e){return e.acos(-1)}),{hasher:Ht}),Ft=Pt((function(e){return Ut(e).times(2)}),{hasher:Ht});function Ht(e){return e[0].precision}var Zt=Math.PI,Wt=2*Math.PI,Vt=Math.E,Gt=1.618033988749895,$t=bt("true",[],()=>!0),Kt=bt("false",[],()=>!1),Jt=bt("null",[],()=>null),Yt=dr("Infinity",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(1/0):1/0}),Xt=dr("NaN",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(NaN):NaN}),Qt=dr("pi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?Ut(r):Zt}),er=dr("tau",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?Ft(r):Wt}),tr=dr("e",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?zt(r):Vt}),rr=dr("phi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?Lt(r):Gt}),nr=dr("LN2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(2).ln():Math.LN2}),ir=dr("LN10",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(10).ln():Math.LN10}),ar=dr("LOG2E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(1).div(new r(2).ln()):Math.LOG2E}),or=dr("LOG10E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(1).div(new r(10).ln()):Math.LOG10E}),sr=dr("SQRT1_2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r("0.5").sqrt():Math.SQRT1_2}),ur=dr("SQRT2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return"BigNumber"===t.number?new r(2).sqrt():Math.SQRT2}),cr=dr("i",["Complex"],e=>{var{Complex:t}=e;return t.I}),fr=bt("PI",["pi"],e=>{var{pi:t}=e;return t}),hr=bt("E",["e"],e=>{var{e:t}=e;return t}),lr=bt("version",[],()=>It);function dr(e,t,r){return bt(e,t,r,{recreateOnConfigChange:!0})}var pr=r("4128"),mr=r.n(pr),gr="BigNumber",vr=["?on","config"],yr=bt(gr,vr,e=>{var{on:t,config:r}=e,n=mr.a.clone({precision:r.precision,modulo:mr.a.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(e){return new n(e.value)},t&&t("config",(function(e,t){e.precision!==t.precision&&n.config({precision:e.precision})})),n},{isClass:!0}),br="Matrix",wr=[],Mr=bt(br,wr,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,t){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,t,r){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,t,r){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,t){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,t){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,t){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0}),xr="replacer",_r=[],Sr=bt(xr,_r,()=>function(e,t){return"number"!==typeof t||isFinite(t)&&!isNaN(t)?t:{mathjs:"number",value:String(t)}}),Nr=xn("speedOfLight","299792458","m s^-1"),Er=xn("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),Ar=xn("planckConstant","6.62607015e-34","J s"),Dr=xn("reducedPlanckConstant","1.0545718176461565e-34","J s"),kr=xn("magneticConstant","1.25663706212e-6","N A^-2"),Or=xn("electricConstant","8.8541878128e-12","F m^-1"),Cr=xn("vacuumImpedance","376.730313667","ohm"),Tr=xn("coulomb","8.987551792261171e9","N m^2 C^-2"),Rr=xn("elementaryCharge","1.602176634e-19","C"),Br=xn("bohrMagneton","9.2740100783e-24","J T^-1"),Ir=xn("conductanceQuantum","7.748091729863649e-5","S"),qr=xn("inverseConductanceQuantum","12906.403729652257","ohm"),Pr=xn("magneticFluxQuantum","2.0678338484619295e-15","Wb"),jr=xn("nuclearMagneton","5.0507837461e-27","J T^-1"),zr=xn("klitzing","25812.807459304513","ohm"),Lr=xn("bohrRadius","5.29177210903e-11","m"),Ur=xn("classicalElectronRadius","2.8179403262e-15","m"),Fr=xn("electronMass","9.1093837015e-31","kg"),Hr=xn("fermiCoupling","1.1663787e-5","GeV^-2"),Zr=_n("fineStructure",.0072973525693),Wr=xn("hartreeEnergy","4.3597447222071e-18","J"),Vr=xn("protonMass","1.67262192369e-27","kg"),Gr=xn("deuteronMass","3.3435830926e-27","kg"),$r=xn("neutronMass","1.6749271613e-27","kg"),Kr=xn("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),Jr=xn("rydberg","10973731.568160","m^-1"),Yr=xn("thomsonCrossSection","6.6524587321e-29","m^2"),Xr=_n("weakMixingAngle",.2229),Qr=_n("efimovFactor",22.7),en=xn("atomicMass","1.66053906660e-27","kg"),tn=xn("avogadro","6.02214076e23","mol^-1"),rn=xn("boltzmann","1.380649e-23","J K^-1"),nn=xn("faraday","96485.33212331001","C mol^-1"),an=xn("firstRadiation","3.7417718521927573e-16","W m^2"),on=xn("loschmidt","2.686780111798444e25","m^-3"),sn=xn("gasConstant","8.31446261815324","J K^-1 mol^-1"),un=xn("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),cn=xn("molarVolume","0.022413969545014137","m^3 mol^-1"),fn=_n("sackurTetrode",-1.16487052358),hn=xn("secondRadiation","0.014387768775039337","m K"),ln=xn("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),dn=xn("wienDisplacement","2.897771955e-3","m K"),pn=xn("molarMass","0.99999999965e-3","kg mol^-1"),mn=xn("molarMassC12","11.9999999958e-3","kg mol^-1"),gn=xn("gravity","9.80665","m s^-2"),vn=xn("planckLength","1.616255e-35","m"),yn=xn("planckMass","2.176435e-8","kg"),bn=xn("planckTime","5.391245e-44","s"),wn=xn("planckCharge","1.87554603778e-18","C"),Mn=xn("planckTemperature","1.416785e+32","K");function xn(e,t,r){var n=["config","Unit","BigNumber"];return bt(e,n,e=>{var{config:n,Unit:i,BigNumber:a}=e,o="BigNumber"===n.number?new a(t):parseFloat(t),s=new i(o,r);return s.fixPrefix=!0,s})}function _n(e,t){var r=["config","BigNumber"];return bt(e,r,e=>{var{config:r,BigNumber:n}=e;return"BigNumber"===r.number?new n(t):t})}var Sn=r("d61e"),Nn=r.n(Sn),En="Fraction",An=[],Dn=bt(En,An,()=>(Nn.a.prototype.type="Fraction",Nn.a.prototype.isFraction=!0,Nn.a.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Nn.a.fromJSON=function(e){return new Nn.a(e)},Nn.a),{isClass:!0}),kn="DenseMatrix",On=["Matrix"],Cn=bt(kn,On,e=>{var{Matrix:t}=e;function r(e,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(t&&!l(t))throw new Error("Invalid datatype: "+t);if(p(e))"DenseMatrix"===e.type?(this._data=V(e._data),this._size=V(e._size),this._datatype=t||e._datatype):(this._data=e.toArray(),this._size=e.size(),this._datatype=t||e._datatype);else if(e&&d(e.data)&&d(e.size))this._data=e.data,this._size=e.size,Ye(this._data,this._size),this._datatype=t||e.datatype;else if(d(e))this._data=h(e),this._size=Ke(this._data),Ye(this._data,this._size),this._datatype=t;else{if(e)throw new TypeError("Unsupported type of data ("+W(e)+")");this._data=[],this._size=[0],this._datatype=t}}function n(e,t){if(!b(t))throw new TypeError("Invalid index");var n=t.isScalar();if(n)return e.get(t.min());var a=t.size();if(a.length!==e._size.length)throw new Ge(a.length,e._size.length);for(var o=t.min(),s=t.max(),u=0,c=e._size.length;u<c;u++)Xe(o[u],e._size[u]),Xe(s[u],e._size[u]);return new r(i(e._data,t,a.length,0),e._datatype)}function i(e,t,r,n){var a=n===r-1,o=t.dimension(n);return a?o.map((function(t){return Xe(t,e.length),e[t]})).valueOf():o.map((function(a){Xe(a,e.length);var o=e[a];return i(o,t,r,n+1)})).valueOf()}function a(e,t,r,n){if(!t||!0!==t.isIndex)throw new TypeError("Invalid index");var i,a=t.size(),s=t.isScalar();if(p(r)?(i=r.size(),r=r.valueOf()):i=Ke(r),s){if(0!==i.length)throw new TypeError("Scalar expected");e.set(t.min(),r,n)}else{if(a.length<e._size.length)throw new Ge(a.length,e._size.length,"<");if(i.length<a.length){var u=0,c=0;while(1===a[u]&&1===i[u])u++;while(1===a[u])c++,u++;r=st(r,a.length,c,i)}if(!J(a,i))throw new Ge(a,i,">");var h=t.max().map((function(e){return e+1}));f(e,h,n);var l=a.length,d=0;o(e._data,t,r,l,d)}return e}function o(e,t,r,n,i){var a=i===n-1,s=t.dimension(i);a?s.forEach((function(t,n){Xe(t),e[t]=r[n[0]]})):s.forEach((function(a,s){Xe(a),o(e[a],t,r[s[0]],n,i+1)}))}function c(e,t,r){if(0===t.length){var n=e._data;while(d(n))n=n[0];return n}return e._size=t.slice(0),e._data=Qe(e._data,e._size,r),e}function f(e,t,r){var n=e._size.slice(0),i=!1;while(n.length<t.length)n.push(0),i=!0;for(var a=0,o=t.length;a<o;a++)t[a]>n[a]&&(n[a]=t[a],i=!0);i&&c(e,n,r)}function h(e){for(var t=0,r=e.length;t<r;t++){var n=e[t];d(n)?e[t]=h(n):n&&!0===n.isMatrix&&(e[t]=h(n.valueOf()))}return e}return r.prototype=new t,r.prototype.createDenseMatrix=function(e,t){return new r(e,t)},r.prototype.type="DenseMatrix",r.prototype.isDenseMatrix=!0,r.prototype.getDataType=function(){return vt(this._data,W)},r.prototype.storage=function(){return"dense"},r.prototype.datatype=function(){return this._datatype},r.prototype.create=function(e,t){return new r(e,t)},r.prototype.subset=function(e,t,r){switch(arguments.length){case 1:return n(this,e);case 2:case 3:return a(this,e,t,r);default:throw new SyntaxError("Wrong number of arguments")}},r.prototype.get=function(e){if(!d(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new Ge(e.length,this._size.length);for(var t=0;t<e.length;t++)Xe(e[t],this._size[t]);for(var r=this._data,n=0,i=e.length;n<i;n++){var a=e[n];Xe(a,r.length),r=r[a]}return r},r.prototype.set=function(e,t,r){if(!d(e))throw new TypeError("Array expected");if(e.length<this._size.length)throw new Ge(e.length,this._size.length,"<");var n,i,a,o=e.map((function(e){return e+1}));f(this,o,r);var s=this._data;for(n=0,i=e.length-1;n<i;n++)a=e[n],Xe(a,s.length),s=s[a];return a=e[e.length-1],Xe(a,s.length),s[a]=t,this},r.prototype.resize=function(e,t,r){if(!m(e))throw new TypeError("Array or Matrix expected");var n=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e),i=r?this.clone():this;return c(i,n,t)},r.prototype.reshape=function(e,t){var r=t?this.clone():this;r._data=tt(r._data,e);var n=r._size.reduce((e,t)=>e*t);return r._size=rt(e,n),r},r.prototype.clone=function(){var e=new r({data:V(this._data),size:V(this._size),datatype:this._datatype});return e},r.prototype.size=function(){return this._size.slice(0)},r.prototype.map=function(e){var t=this,n=function r(n,i){return d(n)?n.map((function(e,t){return r(e,i.concat(t))})):e(n,i,t)},i=n(this._data,[]),a=void 0!==this._datatype?vt(i,W):void 0;return new r(i,a)},r.prototype.forEach=function(e){var t=this,r=function r(n,i){d(n)?n.forEach((function(e,t){r(e,i.concat(t))})):e(n,i,t)};r(this._data,[])},r.prototype[Symbol.iterator]=function*(){var e=function*e(t,r){if(d(t))for(var n=0;n<t.length;n++)yield*e(t[n],r.concat(n));else yield{value:t,index:r}};yield*e(this._data,[])},r.prototype.rows=function(){var e=[],t=this.size();if(2!==t.length)throw new TypeError("Rows can only be returned for a 2D matrix.");var n=this._data;for(var i of n)e.push(new r([i],this._datatype));return e},r.prototype.columns=function(){var e=this,t=[],n=this.size();if(2!==n.length)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var i=this._data,a=function(n){var a=i.map(e=>[e[n]]);t.push(new r(a,e._datatype))},o=0;o<n[1];o++)a(o);return t},r.prototype.toArray=function(){return V(this._data)},r.prototype.valueOf=function(){return this._data},r.prototype.format=function(e){return Ue(this._data,e)},r.prototype.toString=function(){return Ue(this._data)},r.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},r.prototype.diagonal=function(e){if(e){if(u(e)&&(e=e.toNumber()),!s(e)||!fe(e))throw new TypeError("The parameter k must be an integer number")}else e=0;for(var t=e>0?e:0,n=e<0?-e:0,i=this._size[0],a=this._size[1],o=Math.min(i-n,a-t),c=[],f=0;f<o;f++)c[f]=this._data[f+n][f+t];return new r({data:c,size:[o],datatype:this._datatype})},r.diagonal=function(e,t,n,i){if(!d(e))throw new TypeError("Array expected, size parameter");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");if(e=e.map((function(e){if(u(e)&&(e=e.toNumber()),!s(e)||!fe(e)||e<1)throw new Error("Size values must be positive integers");return e})),n){if(u(n)&&(n=n.toNumber()),!s(n)||!fe(n))throw new TypeError("The parameter k must be an integer number")}else n=0;var a,o=n>0?n:0,c=n<0?-n:0,f=e[0],h=e[1],l=Math.min(f-c,h-o);if(d(t)){if(t.length!==l)throw new Error("Invalid value array length");a=function(e){return t[e]}}else if(p(t)){var m=t.size();if(1!==m.length||m[0]!==l)throw new Error("Invalid matrix length");a=function(e){return t.get([e])}}else a=function(){return t};i||(i=u(a(0))?a(0).mul(0):0);var g=[];if(e.length>0){g=Qe(g,e,i);for(var v=0;v<l;v++)g[v+c][v+o]=a(v)}return new r({data:g,size:[f,h]})},r.fromJSON=function(e){return new r(e)},r.prototype.swapRows=function(e,t){if(!s(e)||!fe(e)||!s(t)||!fe(t))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return Xe(e,this._size[0]),Xe(t,this._size[0]),r._swapRows(e,t,this._data),this},r._swapRows=function(e,t,r){var n=r[e];r[e]=r[t],r[t]=n},r},{isClass:!0}),Tn=r("7634"),Rn=r.n(Tn);function Bn(e,t){if(Ln(e)&&Pn(e,t))return e[t];if("function"===typeof e[t]&&zn(e,t))throw new Error('Cannot access method "'+t+'" as a property');throw new Error('No access to property "'+t+'"')}function In(e,t,r){if(Ln(e)&&Pn(e,t))return e[t]=r,r;throw new Error('No access to property "'+t+'"')}function qn(e,t){return t in e}function Pn(e,t){return!(!e||"object"!==typeof e)&&(!!ee(Un,t)||!(t in Object.prototype)&&!(t in Function.prototype))}function jn(e,t){if(!zn(e,t))throw new Error('No access to method "'+t+'"')}function zn(e,t){return null!==e&&void 0!==e&&"function"===typeof e[t]&&(!(ee(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e))&&(!!ee(Fn,t)||!(t in Object.prototype)&&!(t in Function.prototype)))}function Ln(e){return"object"===typeof e&&e&&e.constructor===Object}var Un={length:!0,name:!0},Fn={toString:!0,valueOf:!0,toLocaleString:!0};class Hn{constructor(e){this.wrappedObject=e}keys(){return Object.keys(this.wrappedObject)}get(e){return Bn(this.wrappedObject,e)}set(e,t){return In(this.wrappedObject,e,t),this}has(e){return qn(this.wrappedObject,e)}}function Zn(){return new Map}function Wn(e){if(!e)return Zn();if(Gn(e))return e;if(E(e))return new Hn(e);throw new Error("createMap can create maps from objects or Maps")}function Vn(e){if(e instanceof Hn)return e.wrappedObject;var t={};for(var r of e.keys()){var n=e.get(r);In(t,r,n)}return t}function Gn(e){return!!e&&(e instanceof Map||e instanceof Hn||"function"===typeof e.set&&"function"===typeof e.get&&"function"===typeof e.keys&&"function"===typeof e.has)}function $n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];for(var i of r)if(i)if(Gn(i))for(var a of i.keys())e.set(a,i.get(a));else if(E(i))for(var o of Object.keys(i))e.set(o,i[o]);return e}var Kn=function(){return Kn=Rn.a.create,Rn.a},Jn=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],Yn=bt("typed",Jn,(function(e){var{BigNumber:t,Complex:r,DenseMatrix:n,Fraction:i}=e,a=Kn();return a.types=[{name:"number",test:s},{name:"Complex",test:c},{name:"BigNumber",test:u},{name:"Fraction",test:f},{name:"Unit",test:h},{name:"string",test:l},{name:"Chain",test:Z},{name:"Array",test:d},{name:"Matrix",test:p},{name:"DenseMatrix",test:g},{name:"SparseMatrix",test:v},{name:"Range",test:y},{name:"Index",test:b},{name:"boolean",test:w},{name:"ResultSet",test:M},{name:"Help",test:x},{name:"function",test:_},{name:"Date",test:S},{name:"RegExp",test:N},{name:"null",test:A},{name:"undefined",test:D},{name:"AccessorNode",test:k},{name:"ArrayNode",test:O},{name:"AssignmentNode",test:C},{name:"BlockNode",test:T},{name:"ConditionalNode",test:R},{name:"ConstantNode",test:B},{name:"FunctionNode",test:q},{name:"FunctionAssignmentNode",test:I},{name:"IndexNode",test:P},{name:"Node",test:j},{name:"ObjectNode",test:z},{name:"OperatorNode",test:L},{name:"ParenthesisNode",test:U},{name:"RangeNode",test:F},{name:"SymbolNode",test:H},{name:"Map",test:Gn},{name:"Object",test:E}],a.conversions=[{from:"number",to:"BigNumber",convert:function(e){if(t||Xn(e),Ee(e)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return r||Qn(e),new r(e,0)}},{from:"number",to:"string",convert:function(e){return e+""}},{from:"BigNumber",to:"Complex",convert:function(e){return r||Qn(e),new r(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return r||Qn(e),new r(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||ti(e);var t=new i(e);if(t.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||Xn(e);try{return new t(e)}catch(r){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){i||ti(e);try{return new i(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){r||Qn(e);try{return new r(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||Xn(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||ti(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){return n||ei(),new n(e)}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}],a}));function Xn(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Qn(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function ei(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function ti(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}function ri(e){for(var t=0;t<e.length;t++)if(m(e[t]))return!0;return!1}function ni(e,t){p(e)&&(e=e.valueOf());for(var r=0,n=e.length;r<n;r++){var i=e[r];Array.isArray(i)?ni(i,t):t(i)}}function ii(e,t,r){return e&&"function"===typeof e.map?e.map((function(e){return ii(e,t,r)})):t(e)}function ai(e,t,r){var n=Array.isArray(e)?Ke(e):e.size();if(t<0||t>=n.length)throw new $e(t,n.length);return p(e)?e.create(oi(e.valueOf(),t,r)):oi(e,t,r)}function oi(e,t,r){var n,i,a,o;if(t<=0){if(Array.isArray(e[0])){for(o=si(e),i=[],n=0;n<o.length;n++)i[n]=oi(o[n],t-1,r);return i}for(a=e[0],n=1;n<e.length;n++)a=r(a,e[n]);return a}for(i=[],n=0;n<e.length;n++)i[n]=oi(e[n],t-1,r);return i}function si(e){var t,r,n=e.length,i=e[0].length,a=[];for(r=0;r<i;r++){var o=[];for(t=0;t<n;t++)o.push(e[t][r]);a.push(o)}return a}function ui(e,t,r,n,i,a,o,s,u,c,f){var h,l,d,p,m=e._values,g=e._index,v=e._ptr;if(n)for(l=v[t],d=v[t+1],h=l;h<d;h++)p=g[h],r[p]!==a?(r[p]=a,o.push(p),c?(n[p]=u?s(m[h],f):s(f,m[h]),i[p]=a):n[p]=m[h]):(n[p]=u?s(m[h],n[p]):s(n[p],m[h]),i[p]=a);else for(l=v[t],d=v[t+1],h=l;h<d;h++)p=g[h],r[p]!==a?(r[p]=a,o.push(p)):i[p]=a}var ci="isInteger",fi=["typed"],hi=bt(ci,fi,e=>{var{typed:t}=e;return t(ci,{number:fe,BigNumber:function(e){return e.isInt()},Fraction:function(e){return 1===e.d&&isFinite(e.n)},"Array | Matrix":function(e){return ii(e,this)}})}),li="isNumeric",di=["typed"],pi=bt(li,di,e=>{var{typed:t}=e;return t(li,{"number | BigNumber | Fraction | boolean":function(){return!0},"Complex | Unit | string | null | undefined | Node":function(){return!1},"Array | Matrix":function(e){return ii(e,this)}})}),mi="number";function gi(e){return fe(e)}function vi(e){return e<0}function yi(e){return e>0}function bi(e){return 0===e}function wi(e){return Number.isNaN(e)}gi.signature=mi,vi.signature=mi,yi.signature=mi,bi.signature=mi,wi.signature=mi;var Mi="isPositive",xi=["typed"],_i=bt(Mi,xi,e=>{var{typed:t}=e;return t(Mi,{number:yi,BigNumber:function(e){return!e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return e.s>0&&e.n>0},Unit:function(e){return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),Si="isNaN",Ni=["typed"],Ei=bt(Si,Ni,e=>{var{typed:t}=e;return t(Si,{number:wi,BigNumber:function(e){return e.isNaN()},Fraction:function(e){return!1},Complex:function(e){return e.isNaN()},Unit:function(e){return Number.isNaN(e.value)},"Array | Matrix":function(e){return ii(e,Number.isNaN)}})});function Ai(e,t,r){if(null===r||void 0===r)return e.eq(t);if(e.eq(t))return!0;if(e.isNaN()||t.isNaN())return!1;if(e.isFinite()&&t.isFinite()){var n=e.minus(t).abs();if(n.isZero())return!0;var i=e.constructor.max(e.abs(),t.abs());return n.lte(i.times(r))}return!1}function Di(e,t,r){return De(e.re,t.re,r)&&De(e.im,t.im,r)}var ki="equalScalar",Oi=["typed","config"],Ci=bt(ki,Oi,e=>{var{typed:t,config:r}=e;return t(ki,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,t){return De(e,t,r.epsilon)},"BigNumber, BigNumber":function(e,t){return e.eq(t)||Ai(e,t,r.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,t){return Di(e,t,r.epsilon)},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)}})}),Ti=(bt(ki,["typed","config"],e=>{var{typed:t,config:r}=e;return t(ki,{"number, number":function(e,t){return De(e,t,r.epsilon)}})}),"number"),Ri=["typed"];function Bi(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var r={"0b":2,"0o":8,"0x":16}[t[1]],n=t[2],i=t[3];return{input:e,radix:r,integerPart:n,fractionalPart:i}}return null}function Ii(e){for(var t=parseInt(e.integerPart,e.radix),r=0,n=0;n<e.fractionalPart.length;n++){var i=parseInt(e.fractionalPart[n],e.radix);r+=i/Math.pow(e.radix,n+1)}var a=t+r;if(isNaN(a))throw new SyntaxError('String "'+e.input+'" is no valid number');return a}var qi=bt(Ti,Ri,e=>{var{typed:t}=e,r=t("number",{"":function(){return 0},number:function(e){return e},string:function(e){if("NaN"===e)return NaN;var t=Bi(e);if(t)return Ii(t);var r=0,n=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);n&&(r=Number(n[2]),e=n[1]);var i=Number(e);if(isNaN(i))throw new SyntaxError('String "'+e+'" is no valid number');if(n){if(i>2**r-1)throw new SyntaxError('String "'.concat(e,'" is out of range'));i>=2**(r-1)&&(i-=2**r)}return i},BigNumber:function(e){return e.toNumber()},Fraction:function(e){return e.valueOf()},Unit:function(e){throw new Error("Second argument with valueless unit expected")},null:function(e){return 0},"Unit, string | Unit":function(e,t){return e.toNumber(t)},"Array | Matrix":function(e){return ii(e,this)}});return r.fromJSON=function(e){return parseFloat(e.value)},r}),Pi="boolean",ji=["typed"],zi=bt(Pi,ji,e=>{var{typed:t}=e;return t(Pi,{"":function(){return!1},boolean:function(e){return e},number:function(e){return!!e},null:function(e){return!1},BigNumber:function(e){return!e.isZero()},string:function(e){var t=e.toLowerCase();if("true"===t)return!0;if("false"===t)return!1;var r=Number(e);if(""!==e&&!isNaN(r))return!!r;throw new Error('Cannot convert "'+e+'" to a boolean')},"Array | Matrix":function(e){return ii(e,this)}})}),Li="complex",Ui=["typed","Complex"],Fi=bt(Li,Ui,e=>{var{typed:t,Complex:r}=e;return t("complex",{"":function(){return r.ZERO},number:function(e){return new r(e,0)},"number, number":function(e,t){return new r(e,t)},"BigNumber, BigNumber":function(e,t){return new r(e.toNumber(),t.toNumber())},Fraction:function(e){return new r(e.valueOf(),0)},Complex:function(e){return e.clone()},string:function(e){return r(e)},null:function(e){return r(0)},Object:function(e){if("re"in e&&"im"in e)return new r(e.re,e.im);if("r"in e&&"phi"in e||"abs"in e&&"arg"in e)return new r(e);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":function(e){return ii(e,this)}})}),Hi="splitUnit",Zi=["typed"],Wi=bt(Hi,Zi,e=>{var{typed:t}=e;return t(Hi,{"Unit, Array":function(e,t){return e.splitUnit(t)}})}),Vi="number",Gi="number, number";function $i(e){return Math.abs(e)}function Ki(e,t){return e+t}function Ji(e,t){return e-t}function Yi(e,t){return e*t}function Xi(e,t){return e/t}function Qi(e){return-e}function ea(e){return e}function ta(e){return me(e)}function ra(e){return Math.ceil(e)}function na(e){return e*e*e}function ia(e){return Math.exp(e)}function aa(e){return ge(e)}function oa(e){return e>0?Math.floor(e):Math.ceil(e)}function sa(e){return Math.floor(e)}function ua(e,t){if(!fe(e)||!fe(t))throw new Error("Parameters in function gcd must be integer numbers");var r;while(0!==t)r=e%t,e=t,t=r;return e<0?-e:e}function ca(e,t){if(!fe(e)||!fe(t))throw new Error("Parameters in function lcm must be integer numbers");if(0===e||0===t)return 0;var r,n=e*t;while(0!==t)r=t,t=e%r,e=r;return Math.abs(n/e)}function fa(e){return Math.log(e)}function ha(e){return de(e)}function la(e){return le(e)}function da(e){return pe(e)}function pa(e,t){if(t>0)return e-t*Math.floor(e/t);if(0===t)return e;throw new Error("Cannot calculate mod for a negative divisor")}function ma(e,t){var r=t<0;if(r&&(t=-t),0===t)throw new Error("Root must be non-zero");if(e<0&&Math.abs(t)%2!==1)throw new Error("Root must be odd when a is negative.");if(0===e)return r?1/0:0;if(!isFinite(e))return r?0:e;var n=Math.pow(Math.abs(e),1/t);return n=e<0?-n:n,r?1/n:n}function ga(e){return he(e)}function va(e){return Math.sqrt(e)}function ya(e){return e*e}function ba(e,t){var r,n,i,a,o=0,s=1,u=1,c=0;if(!fe(e)||!fe(t))throw new Error("Parameters in function xgcd must be integer numbers");while(t)n=Math.floor(e/t),i=e-n*t,r=o,o=s-n*o,s=r,r=u,u=c-n*u,c=r,e=t,t=i;return a=e<0?[-e,-s,-c]:[e,e?s:0,c],a}function wa(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}function Ma(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return parseFloat(Me(e,t))}function xa(e){return Math.abs(e)}$i.signature=Vi,Ki.signature=Gi,Ji.signature=Gi,Yi.signature=Gi,Xi.signature=Gi,Qi.signature=Vi,ea.signature=Vi,ta.signature=Vi,ra.signature=Vi,na.signature=Vi,ia.signature=Vi,aa.signature=Vi,oa.signature=Vi,sa.signature=Vi,ua.signature=Gi,ca.signature=Gi,fa.signature=Vi,ha.signature=Vi,la.signature=Vi,da.signature=Vi,pa.signature=Gi,ma.signature=Gi,ga.signature=Vi,va.signature=Vi,ya.signature=Vi,ba.signature=Gi,wa.signature=Gi,Ma.signature=Gi,xa.signature=Vi;var _a="unaryPlus",Sa=["typed","config","BigNumber"],Na=bt(_a,Sa,e=>{var{typed:t,config:r,BigNumber:n}=e;return t(_a,{number:ea,Complex:function(e){return e},BigNumber:function(e){return e},Fraction:function(e){return e},Unit:function(e){return e.clone()},"Array | Matrix":function(e){return ii(e,this,!0)},"boolean | string":function(e){return"BigNumber"===r.number?new n(+e):+e}})}),Ea="apply",Aa=["typed","isInteger"],Da=bt(Ea,Aa,e=>{var{typed:t,isInteger:r}=e;return t(Ea,{"Array | Matrix, number | BigNumber, function":function(e,t,n){if(!r(t))throw new TypeError("Integer number expected for dimension");var i=Array.isArray(e)?Ke(e):e.size();if(t<0||t>=i.length)throw new $e(t,i.length);return p(e)?e.create(ka(e.valueOf(),t,n)):ka(e,t,n)}})});function ka(e,t,r){var n,i,a;if(t<=0){if(Array.isArray(e[0])){for(a=Oa(e),i=[],n=0;n<a.length;n++)i[n]=ka(a[n],t-1,r);return i}return r(e)}for(i=[],n=0;n<e.length;n++)i[n]=ka(e[n],t-1,r);return i}function Oa(e){var t,r,n=e.length,i=e[0].length,a=[];for(r=0;r<i;r++){var o=[];for(t=0;t<n;t++)o.push(e[t][r]);a.push(o)}return a}var Ca="cube",Ta=["typed"],Ra=bt(Ca,Ta,e=>{var{typed:t}=e;return t(Ca,{number:na,Complex:function(e){return e.mul(e).mul(e)},BigNumber:function(e){return e.times(e).times(e)},Fraction:function(e){return e.pow(3)},"Array | Matrix":function(e){return ii(e,this,!0)},Unit:function(e){return e.pow(3)}})}),Ba="expm1",Ia=["typed","Complex"],qa=bt(Ba,Ia,e=>{var{typed:t,Complex:r}=e;return t(Ba,{number:aa,Complex:function(e){var t=Math.exp(e.re);return new r(t*Math.cos(e.im)-1,t*Math.sin(e.im))},BigNumber:function(e){return e.exp().minus(1)},"Array | Matrix":function(e){return ii(e,this)}})}),Pa="log10",ja=["typed","config","Complex"],za=bt(Pa,ja,e=>{var{typed:t,config:r,Complex:n}=e;return t(Pa,{number:function(e){return e>=0||r.predictable?ha(e):new n(e,0).log().div(Math.LN10)},Complex:function(e){return new n(e).log().div(Math.LN10)},BigNumber:function(e){return!e.isNegative()||r.predictable?e.log():new n(e.toNumber(),0).log().div(Math.LN10)},"Array | Matrix":function(e){return ii(e,this)}})}),La="multiplyScalar",Ua=["typed"],Fa=bt(La,Ua,e=>{var{typed:t}=e;return t("multiplyScalar",{"number, number":Yi,"Complex, Complex":function(e,t){return e.mul(t)},"BigNumber, BigNumber":function(e,t){return e.times(t)},"Fraction, Fraction":function(e,t){return e.mul(t)},"number | Fraction | BigNumber | Complex, Unit":function(e,t){var r=t.clone();return r.value=null===r.value?r._normalize(e):this(r.value,e),r},"Unit, number | Fraction | BigNumber | Complex":function(e,t){var r=e.clone();return r.value=null===r.value?r._normalize(t):this(r.value,t),r},"Unit, Unit":function(e,t){return e.multiply(t)}})}),Ha="sign",Za=["typed","BigNumber","Fraction","complex"],Wa=bt(Ha,Za,e=>{var{typed:t,BigNumber:r,complex:n,Fraction:i}=e;return t(Ha,{number:ga,Complex:function(e){return 0===e.im?n(ga(e.re)):e.sign()},BigNumber:function(e){return new r(e.cmp(0))},Fraction:function(e){return new i(e.s,1)},"Array | Matrix":function(e){return ii(e,this,!0)},Unit:function(e){return this(e.value)}})}),Va="square",Ga=["typed"],$a=bt(Va,Ga,e=>{var{typed:t}=e;return t(Va,{number:ya,Complex:function(e){return e.mul(e)},BigNumber:function(e){return e.times(e)},Fraction:function(e){return e.mul(e)},"Array | Matrix":function(e){return ii(e,this,!0)},Unit:function(e){return e.pow(2)}})});function Ka(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitAnd");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero()||t.eq(-1)||e.eq(t))return e;if(t.isZero()||e.eq(-1))return t;if(!e.isFinite()||!t.isFinite()){if(!e.isFinite()&&!t.isFinite())return e.isNegative()===t.isNegative()?e:new r(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new r(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new r(0):e}return Xa(e,t,(function(e,t){return e&t}))}function Ja(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var t=e.constructor,r=t.precision;t.config({precision:1e9});var n=e.plus(new t(1));return n.s=-n.s||null,t.config({precision:r}),n}function Ya(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitOr");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);var n=new r(-1);return e.isZero()||t.eq(n)||e.eq(t)?t:t.isZero()||e.eq(n)?e:e.isFinite()&&t.isFinite()?Xa(e,t,(function(e,t){return e|t})):!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?n:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e}function Xa(e,t,r){var n,i,a,o,s,u=e.constructor,c=+(e.s<0),f=+(t.s<0);if(c){n=Qa(Ja(e));for(var h=0;h<n.length;++h)n[h]^=1}else n=Qa(e);if(f){i=Qa(Ja(t));for(var l=0;l<i.length;++l)i[l]^=1}else i=Qa(t);n.length<=i.length?(a=n,o=i,s=c):(a=i,o=n,s=f);var d=a.length,p=o.length,m=1^r(c,f),g=new u(1^m),v=new u(1),y=new u(2),b=u.precision;u.config({precision:1e9});while(d>0)r(a[--d],o[--p])===m&&(g=g.plus(v)),v=v.times(y);while(p>0)r(s,o[--p])===m&&(g=g.plus(v)),v=v.times(y);return u.config({precision:b}),0===m&&(g.s=-g.s),g}function Qa(e){for(var t=e.d,r=t[0]+"",n=1;n<t.length;++n){for(var i=t[n]+"",a=7-i.length;a--;)i="0"+i;r+=i}var o=r.length;while("0"===r.charAt(o))o--;var s=e.e,u=r.slice(0,o+1||1),c=u.length;if(s>0)if(++s>c){s-=c;while(s--)u+="0"}else s<c&&(u=u.slice(0,s)+"."+u.slice(s));for(var f=[0],h=0;h<u.length;){var l=f.length;while(l--)f[l]*=10;f[0]+=parseInt(u.charAt(h++));for(var d=0;d<f.length;++d)f[d]>1&&(null!==f[d+1]&&void 0!==f[d+1]||(f[d+1]=0),f[d+1]+=f[d]>>1,f[d]&=1)}return f.reverse()}function eo(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitXor");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero())return t;if(t.isZero())return e;if(e.eq(t))return new r(0);var n=new r(-1);return e.eq(n)?Ja(t):t.eq(n)?Ja(e):e.isFinite()&&t.isFinite()?Xa(e,t,(function(e,t){return e^t})):e.isFinite()||t.isFinite()?new r(e.isNegative()===t.isNegative()?1/0:-1/0):n}function to(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function leftShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:e.isFinite()||t.isFinite()?t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new r(2).pow(t)):new r(NaN)}function ro(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function rightArithShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(Math.pow(2,t.toNumber())+"").floor():e.div(new r(2).pow(t)).floor():e.isNegative()?new r(-1):e.isFinite()?new r(0):new r(NaN)}var no="number",io="number, number";function ao(e,t){if(!fe(e)||!fe(t))throw new Error("Integers expected in function bitAnd");return e&t}function oo(e){if(!fe(e))throw new Error("Integer expected in function bitNot");return~e}function so(e,t){if(!fe(e)||!fe(t))throw new Error("Integers expected in function bitOr");return e|t}function uo(e,t){if(!fe(e)||!fe(t))throw new Error("Integers expected in function bitXor");return e^t}function co(e,t){if(!fe(e)||!fe(t))throw new Error("Integers expected in function leftShift");return e<<t}function fo(e,t){if(!fe(e)||!fe(t))throw new Error("Integers expected in function rightArithShift");return e>>t}function ho(e,t){if(!fe(e)||!fe(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}ao.signature=io,oo.signature=no,so.signature=io,uo.signature=io,co.signature=io,fo.signature=io,ho.signature=io;var lo="bitNot",po=["typed"],mo=bt(lo,po,e=>{var{typed:t}=e;return t(lo,{number:oo,BigNumber:Ja,"Array | Matrix":function(e){return ii(e,this)}})}),go="arg",vo=["typed"],yo=bt(go,vo,e=>{var{typed:t}=e;return t(go,{number:function(e){return Math.atan2(0,e)},BigNumber:function(e){return e.constructor.atan2(0,e)},Complex:function(e){return e.arg()},"Array | Matrix":function(e){return ii(e,this)}})}),bo="im",wo=["typed"],Mo=bt(bo,wo,e=>{var{typed:t}=e;return t(bo,{number:function(e){return 0},BigNumber:function(e){return e.mul(0)},Fraction:function(e){return e.mul(0)},Complex:function(e){return e.im},"Array | Matrix":function(e){return ii(e,this)}})}),xo="number",_o="number, number";function So(e){return!e}function No(e,t){return!(!e&&!t)}function Eo(e,t){return!!e!==!!t}function Ao(e,t){return!(!e||!t)}So.signature=xo,No.signature=_o,Eo.signature=_o,Ao.signature=_o;var Do="not",ko=["typed"],Oo=bt(Do,ko,e=>{var{typed:t}=e;return t(Do,{number:So,Complex:function(e){return 0===e.re&&0===e.im},BigNumber:function(e){return e.isZero()||e.isNaN()},Unit:function(e){return null===e.value||this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),Co="filter",To=["typed"],Ro=bt(Co,To,e=>{var{typed:t}=e;return t("filter",{"Array, function":Bo,"Matrix, function":function(e,t){return e.create(Bo(e.toArray(),t))},"Array, RegExp":dt,"Matrix, RegExp":function(e,t){return e.create(dt(e.toArray(),t))}})});function Bo(e,t){var r=jt(t);return lt(e,(function(e,n,i){return 1===r?t(e):2===r?t(e,[n]):t(e,[n],i)}))}var Io="forEach",qo=["typed"],Po=bt(Io,qo,e=>{var{typed:t}=e;return t(Io,{"Array, function":jo,"Matrix, function":function(e,t){return e.forEach(t)}})});function jo(e,t){var r=jt(t),n=function n(i,a){Array.isArray(i)?ht(i,(function(e,t){n(e,a.concat(t))})):1===r?t(i):2===r?t(i,a):t(i,a,e)};n(e,[])}var zo="map",Lo=["typed"],Uo=bt(zo,Lo,e=>{var{typed:t}=e;return t(zo,{"Array, function":Fo,"Matrix, function":function(e,t){return e.map(t)}})});function Fo(e,t){var r=jt(t),n=function n(i,a){return Array.isArray(i)?i.map((function(e,t){return n(e,a.concat(t))})):1===r?t(i):2===r?t(i,a):t(i,a,e)};return n(e,[])}var Ho="erf",Zo=["typed"],Wo=bt(Ho,Zo,e=>{var{typed:t}=e;return t("name",{number:function(e){var t=Math.abs(e);return t>=Jo?he(e):t<=Vo?he(e)*r(t):t<=4?he(e)*(1-n(t)):he(e)*(1-i(t))},"Array | Matrix":function(e){return ii(e,this)}});function r(e){var t,r=e*e,n=$o[0][4]*r,i=r;for(t=0;t<3;t+=1)n=(n+$o[0][t])*r,i=(i+Ko[0][t])*r;return e*(n+$o[0][3])/(i+Ko[0][3])}function n(e){var t,r=$o[1][8]*e,n=e;for(t=0;t<7;t+=1)r=(r+$o[1][t])*e,n=(n+Ko[1][t])*e;var i=(r+$o[1][7])/(n+Ko[1][7]),a=parseInt(16*e)/16,o=(e-a)*(e+a);return Math.exp(-a*a)*Math.exp(-o)*i}function i(e){var t,r=1/(e*e),n=$o[2][5]*r,i=r;for(t=0;t<4;t+=1)n=(n+$o[2][t])*r,i=(i+Ko[2][t])*r;var a=r*(n+$o[2][4])/(i+Ko[2][4]);a=(Go-a)/e,r=parseInt(16*e)/16;var o=(e-r)*(e+r);return Math.exp(-r*r)*Math.exp(-o)*a}}),Vo=.46875,Go=.5641895835477563,$o=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,2.1531153547440383e-8],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],Ko=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],Jo=Math.pow(2,53),Yo="format",Xo=["typed"],Qo=bt(Yo,Xo,e=>{var{typed:t}=e;return t(Yo,{any:Ue,"any, Object | function | number":Ue})}),es="oct",ts=["typed","format"],rs=bt(es,ts,e=>{var{typed:t,format:r}=e;return t(es,{"number | BigNumber":function(e){return r(e,{notation:"oct"})},"number | BigNumber, number":function(e,t){return r(e,{notation:"oct",wordSize:t})}})}),ns="print",is=["typed"],as=bt(ns,is,e=>{var{typed:t}=e;return t(ns,{"string, Object | Array":os,"string, Object | Array, number | Object":os})});function os(e,t,r){return e.replace(/\$([\w.]+)/g,(function(e,n){var i=n.split("."),a=t[i.shift()];while(i.length&&void 0!==a){var o=i.shift();a=o?a[o]:a+"."}return void 0!==a?l(a)?a:Ue(a,r):e}))}var ss="isPrime",us=["typed"],cs=bt(ss,us,e=>{var{typed:t}=e;return t(ss,{number:function(e){if(0*e!==0)return!1;if(e<=3)return e>1;if(e%2===0||e%3===0)return!1;for(var t=5;t*t<=e;t+=6)if(e%t===0||e%(t+2)===0)return!1;return!0},BigNumber:function(e){if(0*e.toNumber()!==0)return!1;if(e.lte(3))return e.gt(1);if(e.mod(2).eq(0)||e.mod(3).eq(0))return!1;if(e.lt(Math.pow(2,32))){for(var t=e.toNumber(),r=5;r*r<=t;r+=6)if(t%r===0||t%(r+2)===0)return!1;return!0}function n(e,t,r){var n=1;while(!t.eq(0))t.mod(2).eq(0)?(t=t.div(2),e=e.mul(e).mod(r)):(t=t.sub(1),n=e.mul(n).mod(r));return n}var i=e.constructor.clone({precision:2*e.toFixed(0).length});e=new i(e);var a=0,o=e.sub(1);while(o.mod(2).eq(0))o=o.div(2),a+=1;var s=null;if(e.lt("3317044064679887385961981"))s=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(t=>t<e);else{var u=Math.min(e.toNumber()-2,Math.floor(2*Math.pow(e.toFixed(0).length*Math.log(10),2)));s=[];for(var c=2;c<=u;c+=1)s.push(u)}for(var f=0;f<s.length;f+=1){var h=s[f],l=n(e.sub(e).add(h),o,e);if(!l.eq(1))for(var d=0,p=l;!p.eq(e.sub(1));d+=1,p=p.mul(p).mod(e))if(d===a-1)return!1}return!0},"Array | Matrix":function(e){return ii(e,this)}})}),fs="acos",hs=["typed","config","Complex"],ls=bt(fs,hs,e=>{var{typed:t,config:r,Complex:n}=e;return t(fs,{number:function(e){return e>=-1&&e<=1||r.predictable?Math.acos(e):new n(e,0).acos()},Complex:function(e){return e.acos()},BigNumber:function(e){return e.acos()},"Array | Matrix":function(e){return ii(e,this)}})}),ds="number",ps="number, number";function ms(e){return Math.acos(e)}function gs(e){return ke(e)}function vs(e){return Math.atan(1/e)}function ys(e){return isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}function bs(e){return Math.asin(1/e)}function ws(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}function Ms(e){return Math.acos(1/e)}function xs(e){var t=1/e,r=Math.sqrt(t*t-1);return Math.log(r+t)}function _s(e){return Math.asin(e)}function Ss(e){return Oe(e)}function Ns(e){return Math.atan(e)}function Es(e,t){return Math.atan2(e,t)}function As(e){return Ce(e)}function Ds(e){return Math.cos(e)}function ks(e){return Te(e)}function Os(e){return 1/Math.tan(e)}function Cs(e){var t=Math.exp(2*e);return(t+1)/(t-1)}function Ts(e){return 1/Math.sin(e)}function Rs(e){return 0===e?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*he(e)}function Bs(e){return 1/Math.cos(e)}function Is(e){return 2/(Math.exp(e)+Math.exp(-e))}function qs(e){return Math.sin(e)}function Ps(e){return Re(e)}function js(e){return Math.tan(e)}function zs(e){return Be(e)}ms.signature=ds,gs.signature=ds,vs.signature=ds,ys.signature=ds,bs.signature=ds,ws.signature=ds,Ms.signature=ds,xs.signature=ds,_s.signature=ds,Ss.signature=ds,Ns.signature=ds,Es.signature=ps,As.signature=ds,Ds.signature=ds,ks.signature=ds,Os.signature=ds,Cs.signature=ds,Ts.signature=ds,Rs.signature=ds,Bs.signature=ds,Is.signature=ds,qs.signature=ds,Ps.signature=ds,js.signature=ds,zs.signature=ds;var Ls="acot",Us=["typed","BigNumber"],Fs=bt(Ls,Us,e=>{var{typed:t,BigNumber:r}=e;return t(Ls,{number:vs,Complex:function(e){return e.acot()},BigNumber:function(e){return new r(1).div(e).atan()},"Array | Matrix":function(e){return ii(e,this)}})}),Hs="acsc",Zs=["typed","config","Complex","BigNumber"],Ws=bt(Hs,Zs,e=>{var{typed:t,config:r,Complex:n,BigNumber:i}=e;return t(Hs,{number:function(e){return e<=-1||e>=1||r.predictable?bs(e):new n(e,0).acsc()},Complex:function(e){return e.acsc()},BigNumber:function(e){return new i(1).div(e).asin()},"Array | Matrix":function(e){return ii(e,this)}})}),Vs="asec",Gs=["typed","config","Complex","BigNumber"],$s=bt(Vs,Gs,e=>{var{typed:t,config:r,Complex:n,BigNumber:i}=e;return t(Vs,{number:function(e){return e<=-1||e>=1||r.predictable?Ms(e):new n(e,0).asec()},Complex:function(e){return e.asec()},BigNumber:function(e){return new i(1).div(e).acos()},"Array | Matrix":function(e){return ii(e,this)}})}),Ks="asin",Js=["typed","config","Complex"],Ys=bt(Ks,Js,e=>{var{typed:t,config:r,Complex:n}=e;return t(Ks,{number:function(e){return e>=-1&&e<=1||r.predictable?Math.asin(e):new n(e,0).asin()},Complex:function(e){return e.asin()},BigNumber:function(e){return e.asin()},"Array | Matrix":function(e){return ii(e,this,!0)}})}),Xs="atan",Qs=["typed"],eu=bt(Xs,Qs,e=>{var{typed:t}=e;return t("atan",{number:function(e){return Math.atan(e)},Complex:function(e){return e.atan()},BigNumber:function(e){return e.atan()},"Array | Matrix":function(e){return ii(e,this,!0)}})}),tu="atanh",ru=["typed","config","Complex"],nu=bt(tu,ru,e=>{var{typed:t,config:r,Complex:n}=e;return t(tu,{number:function(e){return e<=1&&e>=-1||r.predictable?As(e):new n(e,0).atanh()},Complex:function(e){return e.atanh()},BigNumber:function(e){return e.atanh()},"Array | Matrix":function(e){return ii(e,this,!0)}})}),iu="cosh",au=["typed"],ou=bt(iu,au,e=>{var{typed:t}=e;return t(iu,{number:Te,Complex:function(e){return e.cosh()},BigNumber:function(e){return e.cosh()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cosh is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),su="coth",uu=["typed","BigNumber"],cu=bt(su,uu,e=>{var{typed:t,BigNumber:r}=e;return t(su,{number:Cs,Complex:function(e){return e.coth()},BigNumber:function(e){return new r(1).div(e.tanh())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function coth is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),fu="csch",hu=["typed","BigNumber"],lu=bt(fu,hu,e=>{var{typed:t,BigNumber:r}=e;return t(fu,{number:Rs,Complex:function(e){return e.csch()},BigNumber:function(e){return new r(1).div(e.sinh())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csch is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),du="sech",pu=["typed","BigNumber"],mu=bt(du,pu,e=>{var{typed:t,BigNumber:r}=e;return t(du,{number:Is,Complex:function(e){return e.sech()},BigNumber:function(e){return new r(1).div(e.cosh())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sech is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),gu="sinh",vu=["typed"],yu=bt(gu,vu,e=>{var{typed:t}=e;return t(gu,{number:Ps,Complex:function(e){return e.sinh()},BigNumber:function(e){return e.sinh()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sinh is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this,!0)}})}),bu="tanh",wu=["typed"],Mu=bt(bu,wu,e=>{var{typed:t}=e;return t("tanh",{number:Be,Complex:function(e){return e.tanh()},BigNumber:function(e){return e.tanh()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tanh is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this,!0)}})});function xu(e,t){if(t<e)return 1;if(t===e)return t;var r=t+e>>1;return xu(e,r)*xu(r+1,t)}function _u(e,t){if(!fe(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!fe(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(t>e)throw new TypeError("k must be less than or equal to n");var r,n=e-t;return t<n?(r=xu(n+1,e),r/xu(1,t)):(r=xu(t+1,e),r/xu(1,n))}_u.signature="number, number";var Su="combinations",Nu=["typed"],Eu=bt(Su,Nu,e=>{var{typed:t}=e;return t(Su,{"number, number":_u,"BigNumber, BigNumber":function(e,t){var r,n,i=e.constructor,a=e.minus(t),o=new i(1);if(!Au(e)||!Au(t))throw new TypeError("Positive integer value expected in function combinations");if(t.gt(e))throw new TypeError("k must be less than n in function combinations");if(r=o,t.lt(a))for(n=o;n.lte(a);n=n.plus(o))r=r.times(t.plus(n)).dividedBy(n);else for(n=o;n.lte(t);n=n.plus(o))r=r.times(a.plus(n)).dividedBy(n);return r}})});function Au(e){return e.isInteger()&&e.gte(0)}var Du=r("6125"),ku=r.n(Du),Ou=ku()(Date.now());function Cu(e){var t;function r(e){t=null===e?Ou:ku()(String(e))}function n(){return t()}return r(e),n}var Tu="pickRandom",Ru=["typed","config","?on"],Bu=bt(Tu,Ru,e=>{var{typed:t,config:r,on:n}=e,i=Cu(r.randomSeed);return n&&n("config",(function(e,t){e.randomSeed!==t.randomSeed&&(i=Cu(e.randomSeed))})),t(Tu,{"Array | Matrix":function(e){return a(e,{})},"Array | Matrix, Object":function(e,t){return a(e,t)},"Array | Matrix, number":function(e,t){return a(e,{number:t})},"Array | Matrix, Array | Matrix":function(e,t){return a(e,{weights:t})},"Array | Matrix, Array | Matrix, number":function(e,t,r){return a(e,{number:r,weights:t})},"Array | Matrix, number, Array | Matrix":function(e,t,r){return a(e,{number:t,weights:r})}});function a(e,t){var{number:r,weights:n,elementWise:a=!0}=t,o="undefined"===typeof r;o&&(r=1);var u=p(e)?e.create:p(n)?n.create:null;e=e.valueOf(),n&&(n=n.valueOf()),!0===a&&(e=ct(e),n=ct(n));var c=0;if("undefined"!==typeof n){if(n.length!==e.length)throw new Error("Weights must have the same length as possibles");for(var f=0,h=n.length;f<h;f++){if(!s(n[f])||n[f]<0)throw new Error("Weights must be an array of positive numbers");c+=n[f]}}var l,d=e.length,m=[];while(m.length<r){if("undefined"===typeof n)l=e[Math.floor(i()*d)];else for(var g=i()*c,v=0,y=e.length;v<y;v++)if(g-=n[v],g<0){l=e[v];break}m.push(l)}return o?m[0]:u?u(m):m}});function Iu(e,t){var r=[];if(e=e.slice(0),e.length>1)for(var n=0,i=e.shift();n<i;n++)r.push(Iu(e,t));else for(var a=0,o=e.shift();a<o;a++)r.push(t());return r}var qu="randomInt",Pu=["typed","config","?on"],ju=bt(qu,Pu,e=>{var{typed:t,config:r,on:n}=e,i=Cu(r.randomSeed);return n&&n("config",(function(e,t){e.randomSeed!==t.randomSeed&&(i=Cu(e.randomSeed))})),t(qu,{"":()=>o(0,1),number:e=>o(0,e),"number, number":(e,t)=>o(e,t),"Array | Matrix":e=>a(e,0,1),"Array | Matrix, number":(e,t)=>a(e,0,t),"Array | Matrix, number, number":(e,t,r)=>a(e,t,r)});function a(e,t,r){var n=Iu(e.valueOf(),()=>o(t,r));return p(e)?e.create(n):n}function o(e,t){return Math.floor(e+i()*(t-e))}}),zu="clone",Lu=["typed"],Uu=bt(zu,Lu,e=>{var{typed:t}=e;return t(zu,{any:V})}),Fu="hasNumericValue",Hu=["typed","isNumeric"],Zu=bt(Fu,Hu,e=>{var{typed:t,isNumeric:r}=e;return t(Fu,{string:function(e){return e.trim().length>0&&!isNaN(Number(e))},any:function(e){return r(e)}})}),Wu="typeOf",Vu=["typed"],Gu=bt(Wu,Vu,e=>{var{typed:t}=e;return t(Wu,{any:W})}),$u="string",Ku=["typed"],Ju=bt($u,Ku,e=>{var{typed:t}=e;return t($u,{"":function(){return""},number:ye,null:function(e){return"null"},boolean:function(e){return e+""},string:function(e){return e},"Array | Matrix":function(e){return ii(e,this)},any:function(e){return String(e)}})}),Yu="fraction",Xu=["typed","Fraction"],Qu=bt(Yu,Xu,e=>{var{typed:t,Fraction:r}=e;return t("fraction",{number:function(e){if(!isFinite(e)||isNaN(e))throw new Error(e+" cannot be represented as a fraction");return new r(e)},string:function(e){return new r(e)},"number, number":function(e,t){return new r(e,t)},null:function(e){return new r(0)},BigNumber:function(e){return new r(e.toString())},Fraction:function(e){return e},Object:function(e){return new r(e)},"Array | Matrix":function(e){return ii(e,this)}})}),ec="unaryMinus",tc=["typed"],rc=bt(ec,tc,e=>{var{typed:t}=e;return t(ec,{number:Qi,Complex:function(e){return e.neg()},BigNumber:function(e){return e.neg()},Fraction:function(e){return e.neg()},Unit:function(e){var t=e.clone();return t.value=this(e.value),t},"Array | Matrix":function(e){return ii(e,this,!0)}})}),nc="addScalar",ic=["typed"],ac=bt(nc,ic,e=>{var{typed:t}=e;return t(nc,{"number, number":Ki,"Complex, Complex":function(e,t){return e.add(t)},"BigNumber, BigNumber":function(e,t){return e.plus(t)},"Fraction, Fraction":function(e,t){return e.add(t)},"Unit, Unit":function(e,t){if(null===e.value||void 0===e.value)throw new Error("Parameter x contains a unit with undefined value");if(null===t.value||void 0===t.value)throw new Error("Parameter y contains a unit with undefined value");if(!e.equalBase(t))throw new Error("Units do not match");var r=e.clone();return r.value=this(r.value,t.value),r.fixPrefix=!1,r}})}),oc="exp",sc=["typed"],uc=bt(oc,sc,e=>{var{typed:t}=e;return t(oc,{number:ia,Complex:function(e){return e.exp()},BigNumber:function(e){return e.exp()},"Array | Matrix":function(e){return ii(e,this)}})}),cc="log2",fc=["typed","config","Complex"],hc=bt(cc,fc,e=>{var{typed:t,config:r,Complex:n}=e;return t(cc,{number:function(e){return e>=0||r.predictable?la(e):i(new n(e,0))},Complex:i,BigNumber:function(e){return!e.isNegative()||r.predictable?e.log(2):i(new n(e.toNumber(),0))},"Array | Matrix":function(e){return ii(e,this)}});function i(e){var t=Math.sqrt(e.re*e.re+e.im*e.im);return new n(Math.log2?Math.log2(t):Math.log(t)/Math.LN2,Math.atan2(e.im,e.re)/Math.LN2)}}),lc="sqrt",dc=["config","typed","Complex"],pc=bt(lc,dc,e=>{var{config:t,typed:r,Complex:n}=e;return r("sqrt",{number:i,Complex:function(e){return e.sqrt()},BigNumber:function(e){return!e.isNegative()||t.predictable?e.sqrt():i(e.toNumber())},"Array | Matrix":function(e){return ii(e,this,!0)},Unit:function(e){return e.pow(.5)}});function i(e){return isNaN(e)?NaN:e>=0||t.predictable?Math.sqrt(e):new n(e,0).sqrt()}}),mc="conj",gc=["typed"],vc=bt(mc,gc,e=>{var{typed:t}=e;return t(mc,{number:function(e){return e},BigNumber:function(e){return e},Complex:function(e){return e.conjugate()},"Array | Matrix":function(e){return ii(e,this)}})}),yc="getMatrixDataType",bc=["typed"],wc=bt(yc,bc,e=>{var{typed:t}=e;return t(yc,{Array:function(e){return vt(e,W)},Matrix:function(e){return e.getDataType()}})}),Mc="mode",xc=["typed","isNaN","isNumeric"],_c=bt(Mc,xc,e=>{var{typed:t,isNaN:r,isNumeric:n}=e;return t(Mc,{"Array | Matrix":i,"...":function(e){return i(e)}});function i(e){e=ct(e.valueOf());var t=e.length;if(0===t)throw new Error("Cannot calculate mode of an empty array");for(var i={},a=[],o=0,s=0;s<e.length;s++){var u=e[s];if(n(u)&&r(u))throw new Error("Cannot calculate mode of an array containing NaN values");u in i||(i[u]=0),i[u]++,i[u]===o?a.push(u):i[u]>o&&(o=i[u],a=[u])}return a}}),Sc="bin",Nc=["typed","format"],Ec=bt(Sc,Nc,e=>{var{typed:t,format:r}=e;return t(Sc,{"number | BigNumber":function(e){return r(e,{notation:"bin"})},"number | BigNumber, number":function(e,t){return r(e,{notation:"bin",wordSize:t})}})}),Ac="acosh",Dc=["typed","config","Complex"],kc=bt(Ac,Dc,e=>{var{typed:t,config:r,Complex:n}=e;return t(Ac,{number:function(e){return e>=1||r.predictable?gs(e):e<=-1?new n(Math.log(Math.sqrt(e*e-1)-e),Math.PI):new n(e,0).acosh()},Complex:function(e){return e.acosh()},BigNumber:function(e){return e.acosh()},"Array | Matrix":function(e){return ii(e,this)}})}),Oc="acsch",Cc=["typed","BigNumber"],Tc=bt(Oc,Cc,e=>{var{typed:t,BigNumber:r}=e;return t(Oc,{number:ws,Complex:function(e){return e.acsch()},BigNumber:function(e){return new r(1).div(e).asinh()},"Array | Matrix":function(e){return ii(e,this)}})}),Rc="asinh",Bc=["typed"],Ic=bt(Rc,Bc,e=>{var{typed:t}=e;return t("asinh",{number:Ss,Complex:function(e){return e.asinh()},BigNumber:function(e){return e.asinh()},"Array | Matrix":function(e){return ii(e,this,!0)}})}),qc="cos",Pc=["typed"],jc=bt(qc,Pc,e=>{var{typed:t}=e;return t(qc,{number:Math.cos,Complex:function(e){return e.cos()},BigNumber:function(e){return e.cos()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cos is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),zc="csc",Lc=["typed","BigNumber"],Uc=bt(zc,Lc,e=>{var{typed:t,BigNumber:r}=e;return t(zc,{number:Ts,Complex:function(e){return e.csc()},BigNumber:function(e){return new r(1).div(e.sin())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function csc is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),Fc="sin",Hc=["typed"],Zc=bt(Fc,Hc,e=>{var{typed:t}=e;return t(Fc,{number:Math.sin,Complex:function(e){return e.sin()},BigNumber:function(e){return e.sin()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sin is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this,!0)}})}),Wc="combinationsWithRep",Vc=["typed"],Gc=bt(Wc,Vc,e=>{var{typed:t}=e;return t(Wc,{"number, number":function(e,t){if(!fe(e)||e<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!fe(t)||t<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(e<1)throw new TypeError("k must be less than or equal to n + k - 1");if(t<e-1){var r=xu(e,e+t-1);return r/xu(1,t)}var n=xu(t+1,e+t-1);return n/xu(1,e-1)},"BigNumber, BigNumber":function(e,t){var r,n,i=e.constructor,a=new i(1),o=e.minus(a);if(!$c(e)||!$c(t))throw new TypeError("Positive integer value expected in function combinationsWithRep");if(e.lt(a))throw new TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(r=a,t.lt(o))for(n=a;n.lte(o);n=n.plus(a))r=r.times(t.plus(n)).dividedBy(n);else for(n=a;n.lte(t);n=n.plus(a))r=r.times(o.plus(n)).dividedBy(n);return r}})});function $c(e){return e.isInteger()&&e.gte(0)}var Kc="random",Jc=["typed","config","?on"],Yc=bt(Kc,Jc,e=>{var{typed:t,config:r,on:n}=e,i=Cu(r.randomSeed);return n&&n("config",(function(e,t){e.randomSeed!==t.randomSeed&&(i=Cu(e.randomSeed))})),t(Kc,{"":()=>o(0,1),number:e=>o(0,e),"number, number":(e,t)=>o(e,t),"Array | Matrix":e=>a(e,0,1),"Array | Matrix, number":(e,t)=>a(e,0,t),"Array | Matrix, number, number":(e,t,r)=>a(e,t,r)});function a(e,t,r){var n=Iu(e.valueOf(),()=>o(t,r));return p(e)?e.create(n):n}function o(e,t){return e+i()*(t-e)}}),Xc="isNegative",Qc=["typed"],ef=bt(Xc,Qc,e=>{var{typed:t}=e;return t(Xc,{number:vi,BigNumber:function(e){return e.isNeg()&&!e.isZero()&&!e.isNaN()},Fraction:function(e){return e.s<0},Unit:function(e){return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),tf="SparseMatrix",rf=["typed","equalScalar","Matrix"],nf=bt(tf,rf,e=>{var{typed:t,equalScalar:r,Matrix:n}=e;function i(e,t){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(t&&!l(t))throw new Error("Invalid datatype: "+t);if(p(e))a(this,e,t);else if(e&&d(e.index)&&d(e.ptr)&&d(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(d(e))o(this,e,t);else{if(e)throw new TypeError("Unsupported type of data ("+W(e)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}}function a(e,t,r){"SparseMatrix"===t.type?(e._values=t._values?V(t._values):void 0,e._index=V(t._index),e._ptr=V(t._ptr),e._size=V(t._size),e._datatype=r||t._datatype):o(e,t.valueOf(),r||t._datatype)}function o(e,n,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var a=n.length,o=0,s=r,u=0;if(l(i)&&(s=t.find(r,[i,i])||r,u=t.convert(0,i)),a>0){var c=0;do{e._ptr.push(e._index.length);for(var f=0;f<a;f++){var h=n[f];if(d(h)){if(0===c&&o<h.length&&(o=h.length),c<h.length){var p=h[c];s(p,u)||(e._values.push(p),e._index.push(f))}}else 0===c&&o<1&&(o=1),s(h,u)||(e._values.push(h),e._index.push(f))}c++}while(c<o)}e._ptr.push(e._index.length),e._size=[a,o]}function c(e,t){if(!b(t))throw new TypeError("Invalid index");var r=t.isScalar();if(r)return e.get(t.min());var n,a,o,s,u=t.size();if(u.length!==e._size.length)throw new Ge(u.length,e._size.length);var c=t.min(),f=t.max();for(n=0,a=e._size.length;n<a;n++)Xe(c[n],e._size[n]),Xe(f[n],e._size[n]);var h=e._values,l=e._index,d=e._ptr,p=t.dimension(0),m=t.dimension(1),g=[],v=[];p.forEach((function(e,t){v[e]=t[0],g[e]=!0}));var y=h?[]:void 0,w=[],M=[];return m.forEach((function(e){for(M.push(w.length),o=d[e],s=d[e+1];o<s;o++)n=l[o],!0===g[n]&&(w.push(v[n]),y&&y.push(h[o]))})),M.push(w.length),new i({values:y,index:w,ptr:M,size:u,datatype:e._datatype})}function f(e,t,r,n){if(!t||!0!==t.isIndex)throw new TypeError("Invalid index");var i,a=t.size(),o=t.isScalar();if(p(r)?(i=r.size(),r=r.toArray()):i=Ke(r),o){if(0!==i.length)throw new TypeError("Scalar expected");e.set(t.min(),r,n)}else{if(1!==a.length&&2!==a.length)throw new Ge(a.length,e._size.length,"<");if(i.length<a.length){var s=0,u=0;while(1===a[s]&&1===i[s])s++;while(1===a[s])u++,s++;r=st(r,a.length,u,i)}if(!J(a,i))throw new Ge(a,i,">");for(var c=t.min()[0],f=t.min()[1],h=i[0],l=i[1],d=0;d<h;d++)for(var m=0;m<l;m++){var g=r[d][m];e.set([d+c,m+f],g,n)}}return e}function h(e,t,r,n){if(r-t===0)return r;for(var i=t;i<r;i++)if(n[i]===e)return i;return t}function g(e,t,r,n,i){r.splice(e,1),n.splice(e,1);for(var a=t+1;a<i.length;a++)i[a]--}function v(e,t,r,n,i,a,o){i.splice(e,0,n),a.splice(e,0,t);for(var s=r+1;s<o.length;s++)o[s]++}function y(e,n,i,a){var o=a||0,s=r,u=0;l(e._datatype)&&(s=t.find(r,[e._datatype,e._datatype])||r,u=t.convert(0,e._datatype),o=t.convert(o,e._datatype));var c,f,h,d=!s(o,u),p=e._size[0],m=e._size[1];if(i>m){for(f=m;f<i;f++)if(e._ptr[f]=e._values.length,d)for(c=0;c<p;c++)e._values.push(o),e._index.push(c);e._ptr[i]=e._values.length}else i<m&&(e._ptr.splice(i+1,m-i),e._values.splice(e._ptr[i],e._values.length),e._index.splice(e._ptr[i],e._index.length));if(m=i,n>p){if(d){var g=0;for(f=0;f<m;f++){e._ptr[f]=e._ptr[f]+g,h=e._ptr[f+1]+g;var v=0;for(c=p;c<n;c++,v++)e._values.splice(h+v,0,o),e._index.splice(h+v,0,c),g++}e._ptr[m]=e._values.length}}else if(n<p){var y=0;for(f=0;f<m;f++){e._ptr[f]=e._ptr[f]-y;var b=e._ptr[f],w=e._ptr[f+1]-y;for(h=b;h<w;h++)c=e._index[h],c>n-1&&(e._values.splice(h,1),e._index.splice(h,1),y++)}e._ptr[f]=e._values.length}return e._size[0]=n,e._size[1]=i,e}function w(e,n,a,o,s,u,c){var f=[],h=[],d=[],p=r,m=0;l(e._datatype)&&(p=t.find(r,[e._datatype,e._datatype])||r,m=t.convert(0,e._datatype));for(var g=function(e,t,r){e=u(e,t,r),p(e,m)||(f.push(e),h.push(t))},v=o;v<=s;v++){d.push(f.length);var y=e._ptr[v],b=e._ptr[v+1];if(c)for(var w=y;w<b;w++){var M=e._index[w];M>=n&&M<=a&&g(e._values[w],M-n,v-o)}else{for(var x={},_=y;_<b;_++){var S=e._index[_];x[S]=e._values[_]}for(var N=n;N<=a;N++){var E=N in x?x[N]:0;g(E,N-n,v-o)}}}return d.push(f.length),new i({values:f,index:h,ptr:d,size:[a-n+1,s-o+1]})}function M(e,t,r,n,i){var a,o,s=n[0],u=n[1],c=[];for(a=0;a<s;a++)for(c[a]=[],o=0;o<u;o++)c[a][o]=0;for(o=0;o<u;o++)for(var f=r[o],h=r[o+1],l=f;l<h;l++)a=t[l],c[a][o]=e?i?V(e[l]):e[l]:1;return c}return i.prototype=new n,i.prototype.createSparseMatrix=function(e,t){return new i(e,t)},i.prototype.type="SparseMatrix",i.prototype.isSparseMatrix=!0,i.prototype.getDataType=function(){return vt(this._values,W)},i.prototype.storage=function(){return"sparse"},i.prototype.datatype=function(){return this._datatype},i.prototype.create=function(e,t){return new i(e,t)},i.prototype.density=function(){var e=this._size[0],t=this._size[1];return 0!==e&&0!==t?this._index.length/(e*t):0},i.prototype.subset=function(e,t,r){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return c(this,e);case 2:case 3:return f(this,e,t,r);default:throw new SyntaxError("Wrong number of arguments")}},i.prototype.get=function(e){if(!d(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new Ge(e.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var t=e[0],r=e[1];Xe(t,this._size[0]),Xe(r,this._size[1]);var n=h(t,this._ptr[r],this._ptr[r+1],this._index);return n<this._ptr[r+1]&&this._index[n]===t?this._values[n]:0},i.prototype.set=function(e,n,i){if(!d(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new Ge(e.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var a=e[0],o=e[1],s=this._size[0],u=this._size[1],c=r,f=0;l(this._datatype)&&(c=t.find(r,[this._datatype,this._datatype])||r,f=t.convert(0,this._datatype)),(a>s-1||o>u-1)&&(y(this,Math.max(a+1,s),Math.max(o+1,u),i),s=this._size[0],u=this._size[1]),Xe(a,s),Xe(o,u);var p=h(a,this._ptr[o],this._ptr[o+1],this._index);return p<this._ptr[o+1]&&this._index[p]===a?c(n,f)?g(p,o,this._values,this._index,this._ptr):this._values[p]=n:v(p,a,o,n,this._values,this._index,this._ptr),this},i.prototype.resize=function(e,t,r){if(!m(e))throw new TypeError("Array or Matrix expected");var n=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);if(2!==n.length)throw new Error("Only two dimensions matrix are supported");n.forEach((function(e){if(!s(e)||!fe(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Ue(n)+")")}));var i=r?this.clone():this;return y(i,n[0],n[1],t)},i.prototype.reshape=function(e,t){if(!d(e))throw new TypeError("Array expected");if(2!==e.length)throw new Error("Sparse matrices can only be reshaped in two dimensions");e.forEach((function(t){if(!s(t)||!fe(t)||t<=-2||0===t)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+Ue(e)+")")}));var r=this._size[0]*this._size[1];e=rt(e,r);var n=e[0]*e[1];if(r!==n)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var i=t?this.clone():this;if(this._size[0]===e[0]&&this._size[1]===e[1])return i;for(var a=[],o=0;o<i._ptr.length;o++)for(var u=0;u<i._ptr[o+1]-i._ptr[o];u++)a.push(o);for(var c=i._values.slice(),f=i._index.slice(),l=0;l<i._index.length;l++){var p=f[l],m=a[l],g=p*i._size[1]+m;a[l]=g%e[1],f[l]=Math.floor(g/e[1])}i._values.length=0,i._index.length=0,i._ptr.length=e[1]+1,i._size=e.slice();for(var y=0;y<i._ptr.length;y++)i._ptr[y]=0;for(var b=0;b<c.length;b++){var w=f[b],M=a[b],x=c[b],_=h(w,i._ptr[M],i._ptr[M+1],i._index);v(_,w,M,x,i._values,i._index,i._ptr)}return i},i.prototype.clone=function(){var e=new i({values:this._values?V(this._values):void 0,index:V(this._index),ptr:V(this._ptr),size:V(this._size),datatype:this._datatype});return e},i.prototype.size=function(){return this._size.slice(0)},i.prototype.map=function(e,t){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var r=this,n=this._size[0],i=this._size[1],a=function(t,n,i){return e(t,[n,i],r)};return w(this,0,n-1,0,i-1,a,t)},i.prototype.forEach=function(e,t){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var r=this,n=this._size[0],i=this._size[1],a=0;a<i;a++){var o=this._ptr[a],s=this._ptr[a+1];if(t)for(var u=o;u<s;u++){var c=this._index[u];e(this._values[u],[c,a],r)}else{for(var f={},h=o;h<s;h++){var l=this._index[h];f[l]=this._values[h]}for(var d=0;d<n;d++){var p=d in f?f[d]:0;e(p,[d,a],r)}}}},i.prototype[Symbol.iterator]=function*(){if(!this._values)throw new Error("Cannot iterate a Pattern only matrix");for(var e=this._size[1],t=0;t<e;t++)for(var r=this._ptr[t],n=this._ptr[t+1],i=r;i<n;i++){var a=this._index[i];yield{value:this._values[i],index:[a,t]}}},i.prototype.toArray=function(){return M(this._values,this._index,this._ptr,this._size,!0)},i.prototype.valueOf=function(){return M(this._values,this._index,this._ptr,this._size,!1)},i.prototype.format=function(e){for(var t=this._size[0],r=this._size[1],n=this.density(),i="Sparse Matrix ["+Ue(t,e)+" x "+Ue(r,e)+"] density: "+Ue(n,e)+"\n",a=0;a<r;a++)for(var o=this._ptr[a],s=this._ptr[a+1],u=o;u<s;u++){var c=this._index[u];i+="\n ("+Ue(c,e)+", "+Ue(a,e)+") ==> "+(this._values?Ue(this._values[u],e):"X")}return i},i.prototype.toString=function(){return Ue(this.toArray())},i.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},i.prototype.diagonal=function(e){if(e){if(u(e)&&(e=e.toNumber()),!s(e)||!fe(e))throw new TypeError("The parameter k must be an integer number")}else e=0;var t=e>0?e:0,r=e<0?-e:0,n=this._size[0],a=this._size[1],o=Math.min(n-r,a-t),c=[],f=[],h=[];h[0]=0;for(var l=t;l<a&&c.length<o;l++)for(var d=this._ptr[l],p=this._ptr[l+1],m=d;m<p;m++){var g=this._index[m];if(g===l-t+r){c.push(this._values[m]),f[c.length-1]=g-r;break}}return h.push(c.length),new i({values:c,index:f,ptr:h,size:[o,1]})},i.fromJSON=function(e){return new i(e)},i.diagonal=function(e,n,a,o,c){if(!d(e))throw new TypeError("Array expected, size parameter");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");if(e=e.map((function(e){if(u(e)&&(e=e.toNumber()),!s(e)||!fe(e)||e<1)throw new Error("Size values must be positive integers");return e})),a){if(u(a)&&(a=a.toNumber()),!s(a)||!fe(a))throw new TypeError("The parameter k must be an integer number")}else a=0;var f=r,h=0;l(c)&&(f=t.find(r,[c,c])||r,h=t.convert(0,c));var m,g=a>0?a:0,v=a<0?-a:0,y=e[0],b=e[1],w=Math.min(y-v,b-g);if(d(n)){if(n.length!==w)throw new Error("Invalid value array length");m=function(e){return n[e]}}else if(p(n)){var M=n.size();if(1!==M.length||M[0]!==w)throw new Error("Invalid matrix length");m=function(e){return n.get([e])}}else m=function(){return n};for(var x=[],_=[],S=[],N=0;N<b;N++){S.push(x.length);var E=N-g;if(E>=0&&E<w){var A=m(E);f(A,h)||(_.push(E+v),x.push(A))}}return S.push(x.length),new i({values:x,index:_,ptr:S,size:[y,b]})},i.prototype.swapRows=function(e,t){if(!s(e)||!fe(e)||!s(t)||!fe(t))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return Xe(e,this._size[0]),Xe(t,this._size[0]),i._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this},i._forEachRow=function(e,t,r,n,i){for(var a=n[e],o=n[e+1],s=a;s<o;s++)i(r[s],t[s])},i._swapRows=function(e,t,r,n,i,a){for(var o=0;o<r;o++){var s=a[o],u=a[o+1],c=h(e,s,u,i),f=h(t,s,u,i);if(c<u&&f<u&&i[c]===e&&i[f]===t){if(n){var l=n[c];n[c]=n[f],n[f]=l}}else if(c<u&&i[c]===e&&(f>=u||i[f]!==t)){var d=n?n[c]:void 0;i.splice(f,0,t),n&&n.splice(f,0,d),i.splice(f<=c?c+1:c,1),n&&n.splice(f<=c?c+1:c,1)}else if(f<u&&i[f]===t&&(c>=u||i[c]!==e)){var p=n?n[f]:void 0;i.splice(c,0,e),n&&n.splice(c,0,p),i.splice(c<=f?f+1:f,1),n&&n.splice(c<=f?f+1:f,1)}}},i},{isClass:!0}),af="matrix",of=["typed","Matrix","DenseMatrix","SparseMatrix"],sf=bt(af,of,e=>{var{typed:t,Matrix:r,DenseMatrix:n,SparseMatrix:i}=e;return t(af,{"":function(){return a([])},string:function(e){return a([],e)},"string, string":function(e,t){return a([],e,t)},Array:function(e){return a(e)},Matrix:function(e){return a(e,e.storage())},"Array | Matrix, string":a,"Array | Matrix, string, string":a});function a(e,t,r){if("dense"===t||"default"===t||void 0===t)return new n(e,r);if("sparse"===t)return new i(e,r);throw new TypeError("Unknown matrix type "+JSON.stringify(t)+".")}}),uf="abs",cf=["typed"],ff=bt(uf,cf,e=>{var{typed:t}=e;return t(uf,{number:$i,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},Fraction:function(e){return e.abs()},"Array | Matrix":function(e){return ii(e,this,!0)},Unit:function(e){return e.abs()}})}),hf="algorithm01",lf=["typed"],df=bt(hf,lf,e=>{var{typed:t}=e;return function(e,r,n,i){var a=e._data,o=e._size,s=e._datatype,u=r._values,c=r._index,f=r._ptr,h=r._size,l=r._datatype;if(o.length!==h.length)throw new Ge(o.length,h.length);if(o[0]!==h[0]||o[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+h+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d,p,m=o[0],g=o[1],v="string"===typeof s&&s===l?s:void 0,y=v?t.find(n,[v,v]):n,b=[];for(d=0;d<m;d++)b[d]=[];var w=[],M=[];for(p=0;p<g;p++){for(var x=p+1,_=f[p],S=f[p+1],N=_;N<S;N++)d=c[N],w[d]=i?y(u[N],a[d][p]):y(a[d][p],u[N]),M[d]=x;for(d=0;d<m;d++)M[d]===x?b[d][p]=w[d]:b[d][p]=a[d][p]}return e.createDenseMatrix({data:b,size:[m,g],datatype:v})}}),pf="algorithm04",mf=["typed","equalScalar"],gf=bt(pf,mf,e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i){var a=e._values,o=e._index,s=e._ptr,u=e._size,c=e._datatype,f=n._values,h=n._index,l=n._ptr,d=n._size,p=n._datatype;if(u.length!==d.length)throw new Ge(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");var m,g=u[0],v=u[1],y=r,b=0,w=i;"string"===typeof c&&c===p&&(m=c,y=t.find(r,[m,m]),b=t.convert(0,m),w=t.find(i,[m,m]));var M,x,_,S,N,E=a&&f?[]:void 0,A=[],D=[],k=a&&f?[]:void 0,O=a&&f?[]:void 0,C=[],T=[];for(x=0;x<v;x++){D[x]=A.length;var R=x+1;for(S=s[x],N=s[x+1],_=S;_<N;_++)M=o[_],A.push(M),C[M]=R,k&&(k[M]=a[_]);for(S=l[x],N=l[x+1],_=S;_<N;_++)if(M=h[_],C[M]===R){if(k){var B=w(k[M],f[_]);y(B,b)?C[M]=null:k[M]=B}}else A.push(M),T[M]=R,O&&(O[M]=f[_]);if(k&&O){_=D[x];while(_<A.length)M=A[_],C[M]===R?(E[_]=k[M],_++):T[M]===R?(E[_]=O[M],_++):A.splice(_,1)}}return D[v]=A.length,e.createSparseMatrix({values:E,index:A,ptr:D,size:[g,v],datatype:m})}}),vf="algorithm10",yf=["typed","DenseMatrix"],bf=bt(vf,yf,e=>{var{typed:t,DenseMatrix:r}=e;return function(e,n,i,a){var o=e._values,s=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!o)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h,l=c[0],d=c[1],p=i;"string"===typeof f&&(h=f,n=t.convert(n,h),p=t.find(i,[h,h]));for(var m=[],g=[],v=[],y=0;y<d;y++){for(var b=y+1,w=u[y],M=u[y+1],x=w;x<M;x++){var _=s[x];g[_]=o[x],v[_]=b}for(var S=0;S<l;S++)0===y&&(m[S]=[]),v[S]===b?m[S][y]=a?p(n,g[S]):p(g[S],n):m[S][y]=n}return new r({data:m,size:[l,d],datatype:h})}}),wf="algorithm13",Mf=["typed"],xf=bt(wf,Mf,e=>{var{typed:t}=e;return function(e,n,i){var a,o=e._data,s=e._size,u=e._datatype,c=n._data,f=n._size,h=n._datatype,l=[];if(s.length!==f.length)throw new Ge(s.length,f.length);for(var d=0;d<s.length;d++){if(s[d]!==f[d])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+f+")");l[d]=s[d]}var p=i;"string"===typeof u&&u===h&&(a=u,p=t.find(i,[a,a]));var m=l.length>0?r(p,0,l,l[0],o,c):[];return e.createDenseMatrix({data:m,size:l,datatype:a})};function r(e,t,n,i,a,o){var s=[];if(t===n.length-1)for(var u=0;u<i;u++)s[u]=e(a[u],o[u]);else for(var c=0;c<i;c++)s[c]=r(e,t+1,n,n[t+1],a[c],o[c]);return s}}),_f="algorithm14",Sf=["typed"],Nf=bt(_f,Sf,e=>{var{typed:t}=e;return function(e,n,i,a){var o,s=e._data,u=e._size,c=e._datatype,f=i;"string"===typeof c&&(o=c,n=t.convert(n,o),f=t.find(i,[o,o]));var h=u.length>0?r(f,0,u,u[0],s,n,a):[];return e.createDenseMatrix({data:h,size:V(u),datatype:o})};function r(e,t,n,i,a,o,s){var u=[];if(t===n.length-1)for(var c=0;c<i;c++)u[c]=s?e(o,a[c]):e(a[c],o);else for(var f=0;f<i;f++)u[f]=r(e,t+1,n,n[t+1],a[f],o,s);return u}}),Ef="gcd",Af=["typed","matrix","equalScalar","BigNumber","DenseMatrix"],Df=bt(Ef,Af,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:i,DenseMatrix:a}=e,o=df({typed:t}),s=gf({typed:t,equalScalar:n}),u=bf({typed:t,DenseMatrix:a}),c=xf({typed:t}),f=Nf({typed:t});return t(Ef,{"number, number":ua,"BigNumber, BigNumber":h,"Fraction, Fraction":function(e,t){return e.gcd(t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return c(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return f(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return u(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return f(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return f(r(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return f(r(t),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,r){for(var n=this(e,t),i=0;i<r.length;i++)n=this(n,r[i]);return n}});function h(e,t){if(!e.isInt()||!t.isInt())throw new Error("Parameters in function gcd must be integer numbers");var r=new i(0);while(!t.isZero()){var n=e.mod(t);e=t,t=n}return e.lt(r)?e.neg():e}}),kf="algorithm02",Of=["typed","equalScalar"],Cf=bt(kf,Of,e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i,a){var o=e._data,s=e._size,u=e._datatype,c=n._values,f=n._index,h=n._ptr,l=n._size,d=n._datatype;if(s.length!==l.length)throw new Ge(s.length,l.length);if(s[0]!==l[0]||s[1]!==l[1])throw new RangeError("Dimension mismatch. Matrix A ("+s+") must match Matrix B ("+l+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var p,m=s[0],g=s[1],v=r,y=0,b=i;"string"===typeof u&&u===d&&(p=u,v=t.find(r,[p,p]),y=t.convert(0,p),b=t.find(i,[p,p]));for(var w=[],M=[],x=[],_=0;_<g;_++){x[_]=M.length;for(var S=h[_],N=h[_+1],E=S;E<N;E++){var A=f[E],D=a?b(c[E],o[A][_]):b(o[A][_],c[E]);v(D,y)||(M.push(A),w.push(D))}}return x[g]=M.length,n.createSparseMatrix({values:w,index:M,ptr:x,size:[m,g],datatype:p})}}),Tf="algorithm03",Rf=["typed"],Bf=bt(Tf,Rf,e=>{var{typed:t}=e;return function(e,r,n,i){var a=e._data,o=e._size,s=e._datatype,u=r._values,c=r._index,f=r._ptr,h=r._size,l=r._datatype;if(o.length!==h.length)throw new Ge(o.length,h.length);if(o[0]!==h[0]||o[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+h+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var d,p=o[0],m=o[1],g=0,v=n;"string"===typeof s&&s===l&&(d=s,g=t.convert(0,d),v=t.find(n,[d,d]));for(var y=[],b=0;b<p;b++)y[b]=[];for(var w=[],M=[],x=0;x<m;x++){for(var _=x+1,S=f[x],N=f[x+1],E=S;E<N;E++){var A=c[E];w[A]=i?v(u[E],a[A][x]):v(a[A][x],u[E]),M[A]=_}for(var D=0;D<p;D++)M[D]===_?y[D][x]=w[D]:y[D][x]=i?v(g,a[D][x]):v(a[D][x],g)}return e.createDenseMatrix({data:y,size:[p,m],datatype:d})}}),If="algorithm05",qf=["typed","equalScalar"],Pf=bt(If,qf,e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i){var a=e._values,o=e._index,s=e._ptr,u=e._size,c=e._datatype,f=n._values,h=n._index,l=n._ptr,d=n._size,p=n._datatype;if(u.length!==d.length)throw new Ge(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");var m,g=u[0],v=u[1],y=r,b=0,w=i;"string"===typeof c&&c===p&&(m=c,y=t.find(r,[m,m]),b=t.convert(0,m),w=t.find(i,[m,m]));var M,x,_,S,N=a&&f?[]:void 0,E=[],A=[],D=N?[]:void 0,k=N?[]:void 0,O=[],C=[];for(x=0;x<v;x++){A[x]=E.length;var T=x+1;for(_=s[x],S=s[x+1];_<S;_++)M=o[_],E.push(M),O[M]=T,D&&(D[M]=a[_]);for(_=l[x],S=l[x+1];_<S;_++)M=h[_],O[M]!==T&&E.push(M),C[M]=T,k&&(k[M]=f[_]);if(N){_=A[x];while(_<E.length){M=E[_];var R=O[M],B=C[M];if(R===T||B===T){var I=R===T?D[M]:b,q=B===T?k[M]:b,P=w(I,q);y(P,b)?E.splice(_,1):(N.push(P),_++)}}}}return A[v]=E.length,e.createSparseMatrix({values:N,index:E,ptr:A,size:[g,v],datatype:m})}}),jf="algorithm11",zf=["typed","equalScalar"],Lf=bt(jf,zf,e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i,a){var o=e._values,s=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!o)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h,l=c[0],d=c[1],p=r,m=0,g=i;"string"===typeof f&&(h=f,p=t.find(r,[h,h]),m=t.convert(0,h),n=t.convert(n,h),g=t.find(i,[h,h]));for(var v=[],y=[],b=[],w=0;w<d;w++){b[w]=y.length;for(var M=u[w],x=u[w+1],_=M;_<x;_++){var S=s[_],N=a?g(n,o[_]):g(o[_],n);p(N,m)||(y.push(S),v.push(N))}}return b[d]=y.length,e.createSparseMatrix({values:v,index:y,ptr:b,size:[l,d],datatype:h})}}),Uf="algorithm12",Ff=["typed","DenseMatrix"],Hf=bt(Uf,Ff,e=>{var{typed:t,DenseMatrix:r}=e;return function(e,n,i,a){var o=e._values,s=e._index,u=e._ptr,c=e._size,f=e._datatype;if(!o)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var h,l=c[0],d=c[1],p=i;"string"===typeof f&&(h=f,n=t.convert(n,h),p=t.find(i,[h,h]));for(var m=[],g=[],v=[],y=0;y<d;y++){for(var b=y+1,w=u[y],M=u[y+1],x=w;x<M;x++){var _=s[x];g[_]=o[x],v[_]=b}for(var S=0;S<l;S++)0===y&&(m[S]=[]),v[S]===b?m[S][y]=a?p(n,g[S]):p(g[S],n):m[S][y]=a?p(n,0):p(0,n)}return new r({data:m,size:[l,d],datatype:h})}}),Zf="mod",Wf=["typed","matrix","equalScalar","DenseMatrix"],Vf=bt(Zf,Wf,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i}=e,a=Cf({typed:t,equalScalar:n}),o=Bf({typed:t}),s=Pf({typed:t,equalScalar:n}),u=Lf({typed:t,equalScalar:n}),c=Hf({typed:t,DenseMatrix:i}),f=xf({typed:t}),h=Nf({typed:t});return t(Zf,{"number, number":pa,"BigNumber, BigNumber":function(e,t){if(t.isNeg())throw new Error("Cannot calculate mod for a negative divisor");return t.isZero()?e:e.mod(t)},"Fraction, Fraction":function(e,t){if(t.compare(0)<0)throw new Error("Cannot calculate mod for a negative divisor");return e.compare(0)>=0?e.mod(t):e.mod(t).add(t).mod(t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return u(e,t,this,!1)},"DenseMatrix, any":function(e,t){return h(e,t,this,!1)},"any, SparseMatrix":function(e,t){return c(t,e,this,!0)},"any, DenseMatrix":function(e,t){return h(t,e,this,!0)},"Array, any":function(e,t){return h(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return h(r(t),e,this,!0).valueOf()}})}),Gf="algorithm06",$f=["typed","equalScalar"],Kf=bt(Gf,$f,e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i){var a=e._values,o=e._size,s=e._datatype,u=n._values,c=n._size,f=n._datatype;if(o.length!==c.length)throw new Ge(o.length,c.length);if(o[0]!==c[0]||o[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+c+")");var h,l=o[0],d=o[1],p=r,m=0,g=i;"string"===typeof s&&s===f&&(h=s,p=t.find(r,[h,h]),m=t.convert(0,h),g=t.find(i,[h,h]));for(var v=a&&u?[]:void 0,y=[],b=[],w=v?[]:void 0,M=[],x=[],_=0;_<d;_++){b[_]=y.length;var S=_+1;if(ui(e,_,M,w,x,S,y,g),ui(n,_,M,w,x,S,y,g),w){var N=b[_];while(N<y.length){var E=y[N];if(x[E]===S){var A=w[E];p(A,m)?y.splice(N,1):(v.push(A),N++)}else y.splice(N,1)}}else{var D=b[_];while(D<y.length){var k=y[D];x[k]!==S?y.splice(D,1):D++}}}return b[d]=y.length,e.createSparseMatrix({values:v,index:y,ptr:b,size:[l,d],datatype:h})}}),Jf="nthRoot",Yf=["typed","matrix","equalScalar","BigNumber"],Xf=bt(Jf,Yf,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:i}=e,a=df({typed:t}),o=Cf({typed:t,equalScalar:n}),s=Kf({typed:t,equalScalar:n}),u=Lf({typed:t,equalScalar:n}),c=xf({typed:t}),f=Nf({typed:t}),h="Complex number not supported in function nthRoot. Use nthRoots instead.";return t(Jf,{number:function(e){return ma(e,2)},"number, number":ma,BigNumber:function(e){return l(e,new i(2))},Complex:function(e){throw new Error(h)},"Complex, number":function(e,t){throw new Error(h)},"BigNumber, BigNumber":l,"Array | Matrix":function(e){return this(e,2)},"SparseMatrix, SparseMatrix":function(e,t){if(1===t.density())return s(e,t,this);throw new Error("Root must be non-zero")},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){if(1===t.density())return a(e,t,this,!1);throw new Error("Root must be non-zero")},"DenseMatrix, DenseMatrix":function(e,t){return c(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return f(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){if(1===t.density())return u(t,e,this,!0);throw new Error("Root must be non-zero")},"number | BigNumber, DenseMatrix":function(e,t){return f(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return this(r(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return this(e,r(t)).valueOf()}});function l(e,t){var r=i.precision,n=i.clone({precision:r+2}),a=new i(0),o=new n(1),s=t.isNegative();if(s&&(t=t.neg()),t.isZero())throw new Error("Root must be non-zero");if(e.isNegative()&&!t.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(e.isZero())return s?new n(1/0):0;if(!e.isFinite())return s?a:e;var u=e.abs().pow(o.div(t));return u=e.isNeg()?u.neg():u,new i((s?o.div(u):u).toPrecision(r))}}),Qf="xgcd",eh=["typed","config","matrix","BigNumber"],th=bt(Qf,eh,e=>{var{typed:t,config:r,matrix:n,BigNumber:i}=e;return t(Qf,{"number, number":function(e,t){var i=ba(e,t);return"Array"===r.matrix?i:n(i)},"BigNumber, BigNumber":a});function a(e,t){var a,o,s,u,c=new i(0),f=new i(1),h=c,l=f,d=f,p=c;if(!e.isInt()||!t.isInt())throw new Error("Parameters in function xgcd must be integer numbers");while(!t.isZero())o=e.div(t).floor(),s=e.mod(t),a=h,h=l.minus(o.times(h)),l=a,a=d,d=p.minus(o.times(d)),p=a,e=t,t=s;return u=e.lt(c)?[e.neg(),l.neg(),p.neg()]:[e,e.isZero()?0:l,p],"Array"===r.matrix?u:n(u)}}),rh="bitAnd",nh=["typed","matrix","equalScalar"],ih=bt(rh,nh,e=>{var{typed:t,matrix:r,equalScalar:n}=e,i=Cf({typed:t,equalScalar:n}),a=Kf({typed:t,equalScalar:n}),o=Lf({typed:t,equalScalar:n}),s=xf({typed:t}),u=Nf({typed:t});return t(rh,{"number, number":ao,"BigNumber, BigNumber":Ka,"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return o(e,t,this,!1)},"DenseMatrix, any":function(e,t){return u(e,t,this,!1)},"any, SparseMatrix":function(e,t){return o(t,e,this,!0)},"any, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, any":function(e,t){return u(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return u(r(t),e,this,!0).valueOf()}})}),ah="algorithm07",oh=["typed","DenseMatrix"],sh=bt(ah,oh,e=>{var{typed:t,DenseMatrix:r}=e;return function(e,i,a){var o=e._size,s=e._datatype,u=i._size,c=i._datatype;if(o.length!==u.length)throw new Ge(o.length,u.length);if(o[0]!==u[0]||o[1]!==u[1])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+u+")");var f,h,l,d=o[0],p=o[1],m=0,g=a;"string"===typeof s&&s===c&&(f=s,m=t.convert(0,f),g=t.find(a,[f,f]));var v=[];for(h=0;h<d;h++)v[h]=[];var y=[],b=[],w=[],M=[];for(l=0;l<p;l++){var x=l+1;for(n(e,l,w,y,x),n(i,l,M,b,x),h=0;h<d;h++){var _=w[h]===x?y[h]:m,S=M[h]===x?b[h]:m;v[h][l]=g(_,S)}}return new r({data:v,size:[d,p],datatype:f})};function n(e,t,r,n,i){for(var a=e._values,o=e._index,s=e._ptr,u=s[t],c=s[t+1];u<c;u++){var f=o[u];r[f]=i,n[f]=a[u]}}}),uh="bitXor",ch=["typed","matrix","DenseMatrix"],fh=bt(uh,ch,e=>{var{typed:t,matrix:r,DenseMatrix:n}=e,i=Bf({typed:t}),a=sh({typed:t,DenseMatrix:n}),o=Hf({typed:t,DenseMatrix:n}),s=xf({typed:t}),u=Nf({typed:t});return t(uh,{"number, number":uo,"BigNumber, BigNumber":eo,"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return o(e,t,this,!1)},"DenseMatrix, any":function(e,t){return u(e,t,this,!1)},"any, SparseMatrix":function(e,t){return o(t,e,this,!0)},"any, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, any":function(e,t){return u(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return u(r(t),e,this,!0).valueOf()}})}),hh="or",lh=["typed","matrix","equalScalar","DenseMatrix"],dh=bt(hh,lh,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i}=e,a=Bf({typed:t}),o=Pf({typed:t,equalScalar:n}),s=Hf({typed:t,DenseMatrix:i}),u=xf({typed:t}),c=Nf({typed:t});return t(hh,{"number, number":No,"Complex, Complex":function(e,t){return 0!==e.re||0!==e.im||0!==t.re||0!==t.im},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!e.isNaN()||!t.isZero()&&!t.isNaN()},"Unit, Unit":function(e,t){return this(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return s(t,e,this,!0)},"any, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, any":function(e,t){return c(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return c(r(t),e,this,!0).valueOf()}})}),ph="concat",mh=["typed","matrix","isInteger"],gh=bt(ph,mh,e=>{var{typed:t,matrix:r,isInteger:n}=e;return t(ph,{"...Array | Matrix | number | BigNumber":function(e){var t,i,a=e.length,o=-1,c=!1,f=[];for(t=0;t<a;t++){var h=e[t];if(p(h)&&(c=!0),s(h)||u(h)){if(t!==a-1)throw new Error("Dimension must be specified as last argument");if(i=o,o=h.valueOf(),!n(o))throw new TypeError("Integer number expected for dimension");if(o<0||t>0&&o>i)throw new $e(o,i+1)}else{var l=V(h).valueOf(),d=Ke(l);if(f[t]=l,i=o,o=d.length-1,t>0&&o!==i)throw new Ge(i+1,o+1)}}if(0===f.length)throw new SyntaxError("At least one matrix expected");var m=f.shift();while(f.length)m=vh(m,f.shift(),o,0);return c?r(m):m},"...string":function(e){return e.join("")}})});function vh(e,t,r,n){if(n<r){if(e.length!==t.length)throw new Ge(e.length,t.length);for(var i=[],a=0;a<e.length;a++)i[a]=vh(e[a],t[a],r,n+1);return i}return e.concat(t)}var yh="diag",bh=["typed","matrix","DenseMatrix","SparseMatrix"],wh=bt(yh,bh,e=>{var{typed:t,matrix:r,DenseMatrix:n,SparseMatrix:i}=e;return t(yh,{Array:function(e){return a(e,0,Ke(e),null)},"Array, number":function(e,t){return a(e,t,Ke(e),null)},"Array, BigNumber":function(e,t){return a(e,t.toNumber(),Ke(e),null)},"Array, string":function(e,t){return a(e,0,Ke(e),t)},"Array, number, string":function(e,t,r){return a(e,t,Ke(e),r)},"Array, BigNumber, string":function(e,t,r){return a(e,t.toNumber(),Ke(e),r)},Matrix:function(e){return a(e,0,e.size(),e.storage())},"Matrix, number":function(e,t){return a(e,t,e.size(),e.storage())},"Matrix, BigNumber":function(e,t){return a(e,t.toNumber(),e.size(),e.storage())},"Matrix, string":function(e,t){return a(e,0,e.size(),t)},"Matrix, number, string":function(e,t,r){return a(e,t,e.size(),r)},"Matrix, BigNumber, string":function(e,t,r){return a(e,t.toNumber(),e.size(),r)}});function a(e,t,r,n){if(!fe(t))throw new TypeError("Second parameter in function diag must be an integer");var i=t>0?t:0,a=t<0?-t:0;switch(r.length){case 1:return o(e,t,n,r[0],a,i);case 2:return s(e,t,n,r,a,i)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function o(e,t,r,a,o,s){var u=[a+o,a+s];if(r&&"sparse"!==r&&"dense"!==r)throw new TypeError("Unknown matrix type ".concat(r,'"'));var c="sparse"===r?i.diagonal(u,e,t):n.diagonal(u,e,t);return null!==r?c:c.valueOf()}function s(e,t,n,i,a,o){if(p(e)){var s=e.diagonal(t);return null!==n?n!==s.storage()?r(s,n):s:s.valueOf()}for(var u=Math.min(i[0]-a,i[1]-o),c=[],f=0;f<u;f++)c[f]=e[f+a][f+o];return null!==n?r(c):c}}),Mh="identity",xh=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],_h=bt(Mh,xh,e=>{var{typed:t,config:r,matrix:n,BigNumber:i,DenseMatrix:a,SparseMatrix:o}=e;return t(Mh,{"":function(){return"Matrix"===r.matrix?n([]):[]},string:function(e){return n(e)},"number | BigNumber":function(e){return c(e,e,"Matrix"===r.matrix?"dense":void 0)},"number | BigNumber, string":function(e,t){return c(e,e,t)},"number | BigNumber, number | BigNumber":function(e,t){return c(e,t,"Matrix"===r.matrix?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(e,t,r){return c(e,t,r)},Array:function(e){return s(e)},"Array, string":function(e,t){return s(e,t)},Matrix:function(e){return s(e.valueOf(),e.storage())},"Matrix, string":function(e,t){return s(e.valueOf(),t)}});function s(e,t){switch(e.length){case 0:return t?n(t):[];case 1:return c(e[0],e[0],t);case 2:return c(e[0],e[1],t);default:throw new Error("Vector containing two values expected")}}function c(e,t,r){var n=u(e)||u(t)?i:null;if(u(e)&&(e=e.toNumber()),u(t)&&(t=t.toNumber()),!fe(e)||e<1)throw new Error("Parameters in function identity must be positive integers");if(!fe(t)||t<1)throw new Error("Parameters in function identity must be positive integers");var s=n?new i(1):1,c=n?new n(0):0,f=[e,t];if(r){if("sparse"===r)return o.diagonal(f,s,0,c);if("dense"===r)return a.diagonal(f,s,0,c);throw new TypeError('Unknown matrix type "'.concat(r,'"'))}for(var h=Qe([],f,c),l=e<t?e:t,d=0;d<l;d++)h[d][d]=s;return h}}),Sh="ones",Nh=["typed","config","matrix","BigNumber"],Eh=bt(Sh,Nh,e=>{var{typed:t,config:r,matrix:n,BigNumber:i}=e;return t("ones",{"":function(){return"Array"===r.matrix?a([]):a([],"default")},"...number | BigNumber | string":function(e){var t=e[e.length-1];if("string"===typeof t){var n=e.pop();return a(e,n)}return"Array"===r.matrix?a(e):a(e,"default")},Array:a,Matrix:function(e){var t=e.storage();return a(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return a(e.valueOf(),t)}});function a(e,t){var r=o(e),a=r?new i(1):1;if(s(e),t){var u=n(t);return e.length>0?u.resize(e,a):u}var c=[];return e.length>0?Qe(c,e,a):c}function o(e){var t=!1;return e.forEach((function(e,r,n){u(e)&&(t=!0,n[r]=e.toNumber())})),t}function s(e){e.forEach((function(e){if("number"!==typeof e||!fe(e)||e<0)throw new Error("Parameters in function ones must be positive integers")}))}}),Ah="reshape",Dh=["typed","isInteger","matrix"],kh=bt(Ah,Dh,e=>{var{typed:t,isInteger:r}=e;return t(Ah,{"Matrix, Array":function(e,t){return e.reshape(t)},"Array, Array":function(e,t){return t.forEach((function(e){if(!r(e))throw new TypeError("Invalid size for dimension: "+e)})),tt(e,t)}})});function Oh(){throw new Error('No "bignumber" implementation available')}function Ch(){throw new Error('No "fraction" implementation available')}function Th(){throw new Error('No "matrix" implementation available')}var Rh="size",Bh=["typed","config","?matrix"],Ih=bt(Rh,Bh,e=>{var{typed:t,config:r,matrix:n}=e;return t(Rh,{Matrix:function(e){return e.create(e.size())},Array:Ke,string:function(e){return"Array"===r.matrix?[e.length]:n([e.length])},"number | Complex | BigNumber | Unit | boolean | null":function(e){return"Array"===r.matrix?[]:n?n([]):Th()}})}),qh="subset",Ph=["typed","matrix"],jh=bt(qh,Ph,e=>{var{typed:t,matrix:r}=e;return t(qh,{"Array, Index":function(e,t){var n=r(e),i=n.subset(t);return t.isScalar()?i:i.valueOf()},"Matrix, Index":function(e,t){return e.subset(t)},"Object, Index":Uh,"string, Index":zh,"Array, Index, any":function(e,t,n){return r(V(e)).subset(t,n,void 0).valueOf()},"Array, Index, any, any":function(e,t,n,i){return r(V(e)).subset(t,n,i).valueOf()},"Matrix, Index, any":function(e,t,r){return e.clone().subset(t,r)},"Matrix, Index, any, any":function(e,t,r,n){return e.clone().subset(t,r,n)},"string, Index, string":Lh,"string, Index, string, string":Lh,"Object, Index, any":Fh})});function zh(e,t){if(!b(t))throw new TypeError("Index expected");if(1!==t.size().length)throw new Ge(t.size().length,1);var r=e.length;Xe(t.min()[0],r),Xe(t.max()[0],r);var n=t.dimension(0),i="";return n.forEach((function(t){i+=e.charAt(t)})),i}function Lh(e,t,r,n){if(!t||!0!==t.isIndex)throw new TypeError("Index expected");if(1!==t.size().length)throw new Ge(t.size().length,1);if(void 0!==n){if("string"!==typeof n||1!==n.length)throw new TypeError("Single character expected as defaultValue")}else n=" ";var i=t.dimension(0),a=i.size()[0];if(a!==r.length)throw new Ge(i.size()[0],r.length);var o=e.length;Xe(t.min()[0]),Xe(t.max()[0]);for(var s=[],u=0;u<o;u++)s[u]=e.charAt(u);if(i.forEach((function(e,t){s[e]=r.charAt(t[0])})),s.length>o)for(var c=o-1,f=s.length;c<f;c++)s[c]||(s[c]=n);return s.join("")}function Uh(e,t){if(1!==t.size().length)throw new Ge(t.size(),1);var r=t.dimension(0);if("string"!==typeof r)throw new TypeError("String expected as index to retrieve an object property");return Bn(e,r)}function Fh(e,t,r){if(1!==t.size().length)throw new Ge(t.size(),1);var n=t.dimension(0);if("string"!==typeof n)throw new TypeError("String expected as index to retrieve an object property");var i=V(e);return In(i,n,r),i}var Hh="zeros",Zh=["typed","config","matrix","BigNumber"],Wh=bt(Hh,Zh,e=>{var{typed:t,config:r,matrix:n,BigNumber:i}=e;return t(Hh,{"":function(){return"Array"===r.matrix?a([]):a([],"default")},"...number | BigNumber | string":function(e){var t=e[e.length-1];if("string"===typeof t){var n=e.pop();return a(e,n)}return"Array"===r.matrix?a(e):a(e,"default")},Array:a,Matrix:function(e){var t=e.storage();return a(e.valueOf(),t)},"Array | Matrix, string":function(e,t){return a(e.valueOf(),t)}});function a(e,t){var r=o(e),a=r?new i(0):0;if(s(e),t){var u=n(t);return e.length>0?u.resize(e,a):u}var c=[];return e.length>0?Qe(c,e,a):c}function o(e){var t=!1;return e.forEach((function(e,r,n){u(e)&&(t=!0,n[r]=e.toNumber())})),t}function s(e){e.forEach((function(e){if("number"!==typeof e||!fe(e)||e<0)throw new Error("Parameters in function zeros must be positive integers")}))}}),Vh="hex",Gh=["typed","format"],$h=bt(Vh,Gh,e=>{var{typed:t,format:r}=e;return t(Vh,{"number | BigNumber":function(e){return r(e,{notation:"hex"})},"number | BigNumber, number":function(e,t){return r(e,{notation:"hex",wordSize:t})}})}),Kh=r("9523"),Jh=r.n(Kh);function Yh(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xh(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Yh(Object(r),!0).forEach((function(t){Jh()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yh(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Qh="Number of decimals in function round must be an integer",el="round",tl=["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],rl=bt(el,tl,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,BigNumber:a,DenseMatrix:o}=e,s=Lf({typed:t,equalScalar:n}),u=Hf({typed:t,DenseMatrix:o}),c=Nf({typed:t});return t(el,Xh(Xh({},nl),{},{Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw new TypeError(Qh);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(Qh);var r=t.toNumber();return e.round(r)},"number, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(Qh);return new a(e).toDecimalPlaces(t.toNumber())},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(Qh);return e.toDecimalPlaces(t.toNumber())},Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw new TypeError(Qh);return e.round(t)},"Array | Matrix":function(e){return ii(e,this,!0)},"SparseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"number | Complex | BigNumber, SparseMatrix":function(e,t){return n(e,0)?i(t.size(),t.storage()):u(t,e,this,!0)},"number | Complex | BigNumber, DenseMatrix":function(e,t){return n(e,0)?i(t.size(),t.storage()):c(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return c(r(e),t,this,!1).valueOf()},"number | Complex | BigNumber, Array":function(e,t){return c(r(t),e,this,!0).valueOf()}}))}),nl={number:Ma,"number, number":function(e,t){if(!fe(t))throw new TypeError(Qh);if(t<0||t>15)throw new Error("Number of decimals in function round must be in the range of 0-15");return Ma(e,t)}},il="algorithm08",al=["typed","equalScalar"],ol=bt(il,al,e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i){var a=e._values,o=e._index,s=e._ptr,u=e._size,c=e._datatype,f=n._values,h=n._index,l=n._ptr,d=n._size,p=n._datatype;if(u.length!==d.length)throw new Ge(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!a||!f)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var m,g=u[0],v=u[1],y=r,b=0,w=i;"string"===typeof c&&c===p&&(m=c,y=t.find(r,[m,m]),b=t.convert(0,m),w=t.find(i,[m,m]));for(var M,x,_,S,N=[],E=[],A=[],D=[],k=[],O=0;O<v;O++){A[O]=E.length;var C=O+1;for(x=s[O],_=s[O+1],M=x;M<_;M++)S=o[M],k[S]=C,D[S]=a[M],E.push(S);for(x=l[O],_=l[O+1],M=x;M<_;M++)S=h[M],k[S]===C&&(D[S]=w(D[S],f[M]));M=A[O];while(M<E.length){S=E[M];var T=D[S];y(T,b)?E.splice(M,1):(N.push(T),M++)}}return A[v]=E.length,e.createSparseMatrix({values:N,index:E,ptr:A,size:[g,v],datatype:m})}}),sl="leftShift",ul=["typed","matrix","equalScalar","zeros","DenseMatrix"],cl=bt(sl,ul,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,DenseMatrix:a}=e,o=df({typed:t}),s=Cf({typed:t,equalScalar:n}),u=ol({typed:t,equalScalar:n}),c=bf({typed:t,DenseMatrix:a}),f=Lf({typed:t,equalScalar:n}),h=xf({typed:t}),l=Nf({typed:t});return t(sl,{"number, number":co,"BigNumber, BigNumber":to,"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return h(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():f(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():l(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return n(e,0)?i(t.size(),t.storage()):c(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return n(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return this(r(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return this(e,r(t)).valueOf()}})}),fl="rightLogShift",hl=["typed","matrix","equalScalar","zeros","DenseMatrix"],ll=bt(fl,hl,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,DenseMatrix:a}=e,o=df({typed:t}),s=Cf({typed:t,equalScalar:n}),u=ol({typed:t,equalScalar:n}),c=bf({typed:t,DenseMatrix:a}),f=Lf({typed:t,equalScalar:n}),h=xf({typed:t}),l=Nf({typed:t});return t(fl,{"number, number":ho,"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return h(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():f(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():l(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return n(e,0)?i(t.size(),t.storage()):c(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return n(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return this(r(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return this(e,r(t)).valueOf()}})}),dl="compare",pl=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix"],ml=bt(dl,pl,e=>{var{typed:t,config:r,equalScalar:n,matrix:i,BigNumber:a,Fraction:o,DenseMatrix:s}=e,u=Bf({typed:t}),c=Pf({typed:t,equalScalar:n}),f=Hf({typed:t,DenseMatrix:s}),h=xf({typed:t}),l=Nf({typed:t});return t(dl,{"boolean, boolean":function(e,t){return e===t?0:e>t?1:-1},"number, number":function(e,t){return De(e,t,r.epsilon)?0:e>t?1:-1},"BigNumber, BigNumber":function(e,t){return Ai(e,t,r.epsilon)?new a(0):new a(e.cmp(t))},"Fraction, Fraction":function(e,t){return new o(e.compare(t))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return c(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return u(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return u(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return h(e,t,this)},"Array, Array":function(e,t){return this(i(e),i(t)).valueOf()},"Array, Matrix":function(e,t){return this(i(e),t)},"Matrix, Array":function(e,t){return this(e,i(t))},"SparseMatrix, any":function(e,t){return f(e,t,this,!1)},"DenseMatrix, any":function(e,t){return l(e,t,this,!1)},"any, SparseMatrix":function(e,t){return f(t,e,this,!0)},"any, DenseMatrix":function(e,t){return l(t,e,this,!0)},"Array, any":function(e,t){return l(i(e),t,this,!1).valueOf()},"any, Array":function(e,t){return l(i(t),e,this,!0).valueOf()}})}),gl="compareText",vl=["typed","matrix"],yl=bt(gl,vl,e=>{var{typed:t,matrix:r}=e,n=xf({typed:t}),i=Nf({typed:t});return t(gl,{"any, any":Ve,"DenseMatrix, DenseMatrix":function(e,t){return n(e,t,Ve)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"DenseMatrix, any":function(e,t){return i(e,t,Ve,!1)},"any, DenseMatrix":function(e,t){return i(t,e,Ve,!0)},"Array, any":function(e,t){return i(r(e),t,Ve,!1).valueOf()},"any, Array":function(e,t){return i(r(t),e,Ve,!0).valueOf()}})}),bl="smaller",wl=["typed","config","matrix","DenseMatrix"],Ml=bt(bl,wl,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:i}=e,a=Bf({typed:t}),o=sh({typed:t,DenseMatrix:i}),s=Hf({typed:t,DenseMatrix:i}),u=xf({typed:t}),c=Nf({typed:t});return t(bl,{"boolean, boolean":function(e,t){return e<t},"number, number":function(e,t){return e<t&&!De(e,t,r.epsilon)},"BigNumber, BigNumber":function(e,t){return e.lt(t)&&!Ai(e,t,r.epsilon)},"Fraction, Fraction":function(e,t){return-1===e.compare(t)},"Complex, Complex":function(e,t){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return s(t,e,this,!0)},"any, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, any":function(e,t){return c(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return c(n(t),e,this,!0).valueOf()}})}),xl="larger",_l=["typed","config","matrix","DenseMatrix"],Sl=bt(xl,_l,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:i}=e,a=Bf({typed:t}),o=sh({typed:t,DenseMatrix:i}),s=Hf({typed:t,DenseMatrix:i}),u=xf({typed:t}),c=Nf({typed:t});return t(xl,{"boolean, boolean":function(e,t){return e>t},"number, number":function(e,t){return e>t&&!De(e,t,r.epsilon)},"BigNumber, BigNumber":function(e,t){return e.gt(t)&&!Ai(e,t,r.epsilon)},"Fraction, Fraction":function(e,t){return 1===e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return s(t,e,this,!0)},"any, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, any":function(e,t){return c(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return c(n(t),e,this,!0).valueOf()}})}),Nl="unequal",El=["typed","config","equalScalar","matrix","DenseMatrix"],Al=bt(Nl,El,e=>{var{typed:t,config:r,equalScalar:n,matrix:i,DenseMatrix:a}=e,o=Bf({typed:t}),s=sh({typed:t,DenseMatrix:a}),u=Hf({typed:t,DenseMatrix:a}),c=xf({typed:t}),f=Nf({typed:t});return t("unequal",{"any, any":function(e,t){return null===e?null!==t:null===t?null!==e:void 0===e?void 0!==t:void 0===t?void 0!==e:h(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,h)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,h,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,h,!1)},"DenseMatrix, DenseMatrix":function(e,t){return c(e,t,h)},"Array, Array":function(e,t){return this(i(e),i(t)).valueOf()},"Array, Matrix":function(e,t){return this(i(e),t)},"Matrix, Array":function(e,t){return this(e,i(t))},"SparseMatrix, any":function(e,t){return u(e,t,h,!1)},"DenseMatrix, any":function(e,t){return f(e,t,h,!1)},"any, SparseMatrix":function(e,t){return u(t,e,h,!0)},"any, DenseMatrix":function(e,t){return f(t,e,h,!0)},"Array, any":function(e,t){return f(i(e),t,h,!1).valueOf()},"any, Array":function(e,t){return f(i(t),e,h,!0).valueOf()}});function h(e,t){return!n(e,t)}}),Dl=(bt(Nl,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(Nl,{"any, any":function(e,t){return null===e?null!==t:null===t?null!==e:void 0===e?void 0!==t:void 0===t?void 0!==e:!r(e,t)}})}),"ImmutableDenseMatrix"),kl=["smaller","DenseMatrix"],Ol=bt(Dl,kl,e=>{var{smaller:t,DenseMatrix:r}=e;function n(e,t){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(t&&!l(t))throw new Error("Invalid datatype: "+t);if(p(e)||d(e)){var i=new r(e,t);this._data=i._data,this._size=i._size,this._datatype=i._datatype,this._min=null,this._max=null}else if(e&&d(e.data)&&d(e.size))this._data=e.data,this._size=e.size,this._datatype=e.datatype,this._min="undefined"!==typeof e.min?e.min:null,this._max="undefined"!==typeof e.max?e.max:null;else{if(e)throw new TypeError("Unsupported type of data ("+W(e)+")");this._data=[],this._size=[0],this._datatype=t,this._min=null,this._max=null}}return n.prototype=new r,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(e){switch(arguments.length){case 1:var t=r.prototype.subset.call(this,e);return p(t)?new n({data:t._data,size:t._size,datatype:t._datatype}):t;case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:V(this._data),size:V(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(e){return new n(e)},n.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(null===this._min){var e=null;this.forEach((function(r){(null===e||t(r,e))&&(e=r)})),this._min=null!==e?e:void 0}return this._min},n.prototype.max=function(){if(null===this._max){var e=null;this.forEach((function(r){(null===e||t(e,r))&&(e=r)})),this._max=null!==e?e:void 0}return this._max},n},{isClass:!0}),Cl="FibonacciHeap",Tl=["smaller","larger"],Rl=bt(Cl,Tl,e=>{var{smaller:t,larger:r}=e,n=1/Math.log((1+Math.sqrt(5))/2);function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}function a(e,r,n){r.key=n;var i=r.parent;return i&&t(r.key,i.key)&&(o(e,r,i),s(e,i)),t(r.key,e.key)&&(e=r),e}function o(e,t,r){t.left.right=t.right,t.right.left=t.left,r.degree--,r.child===t&&(r.child=t.right),0===r.degree&&(r.child=null),t.left=e,t.right=e.right,e.right=t,t.right.left=t,t.parent=null,t.mark=!1}function s(e,t){var r=t.parent;r&&(t.mark?(o(e,t,r),s(r)):t.mark=!0)}i.prototype.type="FibonacciHeap",i.prototype.isFibonacciHeap=!0,i.prototype.insert=function(e,r){var n={key:e,value:r,degree:0};if(this._minimum){var i=this._minimum;n.left=i,n.right=i.right,i.right=n,n.right.left=n,t(e,i.key)&&(this._minimum=n)}else n.left=n,n.right=n,this._minimum=n;return this._size++,n},i.prototype.size=function(){return this._size},i.prototype.clear=function(){this._minimum=null,this._size=0},i.prototype.isEmpty=function(){return 0===this._size},i.prototype.extractMinimum=function(){var e=this._minimum;if(null===e)return e;var t=this._minimum,r=e.degree,n=e.child;while(r>0){var i=n.right;n.left.right=n.right,n.right.left=n.left,n.left=t,n.right=t.right,t.right=n,n.right.left=n,n.parent=null,n=i,r--}return e.left.right=e.right,e.right.left=e.left,e===e.right?t=null:(t=e.right,t=c(t,this._size)),this._size--,this._minimum=t,e},i.prototype.remove=function(e){this._minimum=a(this._minimum,e,-1),this.extractMinimum()};var u=function(e,t){e.left.right=e.right,e.right.left=e.left,e.parent=t,t.child?(e.left=t.child,e.right=t.child.right,t.child.right=e,e.right.left=e):(t.child=e,e.right=e,e.left=e),t.degree++,e.mark=!1};function c(e,i){var a,o=Math.floor(Math.log(i)*n)+1,s=new Array(o),c=0,f=e;if(f){c++,f=f.right;while(f!==e)c++,f=f.right}while(c>0){var h=f.degree,l=f.right;while(1){if(a=s[h],!a)break;if(r(f.key,a.key)){var d=a;a=f,f=d}u(a,f),s[h]=null,h++}s[h]=f,f=l,c--}e=null;for(var p=0;p<o;p++)a=s[p],a&&(e?(a.left.right=a.right,a.right.left=a.left,a.left=e,a.right=e.right,e.right=a,a.right.left=a,t(a.key,e.key)&&(e=a)):e=a);return e}return i},{isClass:!0}),Bl="sparse",Il=["typed","SparseMatrix"],ql=bt(Bl,Il,e=>{var{typed:t,SparseMatrix:r}=e;return t(Bl,{"":function(){return new r([])},string:function(e){return new r([],e)},"Array | Matrix":function(e){return new r(e)},"Array | Matrix, string":function(e,t){return new r(e,t)}})}),Pl="acoth",jl=["typed","config","Complex","BigNumber"],zl=bt(Pl,jl,e=>{var{typed:t,config:r,Complex:n,BigNumber:i}=e;return t(Pl,{number:function(e){return e>=1||e<=-1||r.predictable?ys(e):new n(e,0).acoth()},Complex:function(e){return e.acoth()},BigNumber:function(e){return new i(1).div(e).atanh()},"Array | Matrix":function(e){return ii(e,this)}})}),Ll="algorithm09",Ul=["typed","equalScalar"],Fl=bt(Ll,Ul,e=>{var{typed:t,equalScalar:r}=e;return function(e,n,i){var a=e._values,o=e._index,s=e._ptr,u=e._size,c=e._datatype,f=n._values,h=n._index,l=n._ptr,d=n._size,p=n._datatype;if(u.length!==d.length)throw new Ge(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");var m,g=u[0],v=u[1],y=r,b=0,w=i;"string"===typeof c&&c===p&&(m=c,y=t.find(r,[m,m]),b=t.convert(0,m),w=t.find(i,[m,m]));var M,x,_,S,N,E=a&&f?[]:void 0,A=[],D=[],k=E?[]:void 0,O=[];for(x=0;x<v;x++){D[x]=A.length;var C=x+1;if(k)for(S=l[x],N=l[x+1],_=S;_<N;_++)M=h[_],O[M]=C,k[M]=f[_];for(S=s[x],N=s[x+1],_=S;_<N;_++)if(M=o[_],k){var T=O[M]===C?k[M]:b,R=w(a[_],T);y(R,b)||(A.push(M),E.push(R))}else A.push(M)}return D[v]=A.length,e.createSparseMatrix({values:E,index:A,ptr:D,size:[g,v],datatype:m})}}),Hl="atan2",Zl=["typed","matrix","equalScalar","BigNumber","DenseMatrix"],Wl=bt(Hl,Zl,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:i,DenseMatrix:a}=e,o=Cf({typed:t,equalScalar:n}),s=Bf({typed:t}),u=Fl({typed:t,equalScalar:n}),c=Lf({typed:t,equalScalar:n}),f=Hf({typed:t,DenseMatrix:a}),h=xf({typed:t}),l=Nf({typed:t});return t(Hl,{"number, number":Math.atan2,"BigNumber, BigNumber":function(e,t){return i.atan2(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return h(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, number | BigNumber":function(e,t){return c(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return l(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return f(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return l(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return l(r(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return l(r(t),e,this,!0).valueOf()}})}),Vl="sec",Gl=["typed","BigNumber"],$l=bt(Vl,Gl,e=>{var{typed:t,BigNumber:r}=e;return t(Vl,{number:Bs,Complex:function(e){return e.sec()},BigNumber:function(e){return new r(1).div(e.cos())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function sec is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),Kl="add",Jl=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix"],Yl=bt(Kl,Jl,e=>{var{typed:t,matrix:r,addScalar:n,equalScalar:i,DenseMatrix:a,SparseMatrix:o}=e,s=df({typed:t}),u=gf({typed:t,equalScalar:i}),c=bf({typed:t,DenseMatrix:a}),f=xf({typed:t}),h=Nf({typed:t});return t(Kl,$({"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,n)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,n,!1)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,n,!0)},"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,n)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"DenseMatrix, any":function(e,t){return h(e,t,n,!1)},"SparseMatrix, any":function(e,t){return c(e,t,n,!1)},"any, DenseMatrix":function(e,t){return h(t,e,n,!0)},"any, SparseMatrix":function(e,t){return c(t,e,n,!0)},"Array, any":function(e,t){return h(r(e),t,n,!1).valueOf()},"any, Array":function(e,t){return h(r(t),e,n,!0).valueOf()},"any, any":n,"any, any, ...any":function(e,t,r){for(var n=this(e,t),i=0;i<r.length;i++)n=this(n,r[i]);return n}},n.signatures))}),Xl="dot",Ql=["typed","addScalar","multiplyScalar","conj","size"],ed=bt(Xl,Ql,e=>{var{typed:t,addScalar:r,multiplyScalar:n,conj:i,size:a}=e;return t(Xl,{"Array | DenseMatrix, Array | DenseMatrix":s,"SparseMatrix, SparseMatrix":u});function o(e,t){var r,n,i=c(e),a=c(t);if(1===i.length)r=i[0];else{if(2!==i.length||1!==i[1])throw new RangeError("Expected a column vector, instead got a matrix of size ("+i.join(", ")+")");r=i[0]}if(1===a.length)n=a[0];else{if(2!==a.length||1!==a[1])throw new RangeError("Expected a column vector, instead got a matrix of size ("+a.join(", ")+")");n=a[0]}if(r!==n)throw new RangeError("Vectors must have equal length ("+r+" != "+n+")");if(0===r)throw new RangeError("Cannot calculate the dot product of empty vectors");return r}function s(e,a){var s=o(e,a),u=p(e)?e._data:e,f=p(e)?e._datatype:void 0,h=p(a)?a._data:a,l=p(a)?a._datatype:void 0,d=2===c(e).length,m=2===c(a).length,g=r,v=n;if(f&&l&&f===l&&"string"===typeof f){var y=f;g=t.find(r,[y,y]),v=t.find(n,[y,y])}if(!d&&!m){for(var b=v(i(u[0]),h[0]),w=1;w<s;w++)b=g(b,v(i(u[w]),h[w]));return b}if(!d&&m){for(var M=v(i(u[0]),h[0][0]),x=1;x<s;x++)M=g(M,v(i(u[x]),h[x][0]));return M}if(d&&!m){for(var _=v(i(u[0][0]),h[0]),S=1;S<s;S++)_=g(_,v(i(u[S][0]),h[S]));return _}if(d&&m){for(var N=v(i(u[0][0]),h[0][0]),E=1;E<s;E++)N=g(N,v(i(u[E][0]),h[E][0]));return N}}function u(e,t){o(e,t);var i=e._index,a=e._values,s=t._index,u=t._values,c=0,f=r,h=n,l=0,d=0;while(l<i.length&&d<s.length){var p=i[l],m=s[d];p<m?l++:p>m?d++:p===m&&(c=f(c,h(a[l],u[d])),l++,d++)}return c}function c(e){return p(e)?e.size():a(e)}}),td="composition",rd=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],nd=bt(td,rd,e=>{var{typed:t,addScalar:r,combinations:n,isPositive:i,isNegative:a,isInteger:o,larger:s}=e;return t(td,{"number | BigNumber, number | BigNumber":function(e,t){if(!(o(e)&&i(e)&&o(t)&&i(t)))throw new TypeError("Positive integer value expected in function composition");if(s(t,e))throw new TypeError("k must be less than or equal to n in function composition");return n(r(e,-1),r(t,-1))}})}),id="isZero",ad=["typed"],od=bt(id,ad,e=>{var{typed:t}=e;return t(id,{number:bi,BigNumber:function(e){return e.isZero()},Complex:function(e){return 0===e.re&&0===e.im},Fraction:function(e){return 1===e.d&&0===e.n},Unit:function(e){return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),sd="matrixFromFunction",ud=["typed","matrix","isZero"],cd=bt(sd,ud,e=>{var{typed:t,matrix:r,isZero:n}=e;return t(sd,{"Array | Matrix, function, string, string":function(e,t,r,n){return i(e,t,r,n)},"Array | Matrix, function, string":function(e,t,r){return i(e,t,r)},"Matrix, function":function(e,t){return i(e,t,"dense")},"Array, function":function(e,t){return i(e,t,"dense").toArray()},"Array | Matrix, string, function":function(e,t,r){return i(e,r,t)},"Array | Matrix, string, string, function":function(e,t,r,n){return i(e,n,t,r)}});function i(e,t,i,a){var o;return o=void 0!==a?r(i,a):r(i),o.resize(e),o.forEach((function(e,r){var i=t(r);n(i)||o.set(r,i)})),o}}),fd="cbrt",hd=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],ld=bt(fd,hd,e=>{var{config:t,typed:r,isNegative:n,unaryMinus:i,matrix:a,Complex:o,BigNumber:s,Fraction:h}=e;return r(fd,{number:ta,Complex:l,"Complex, boolean":l,BigNumber:function(e){return e.cbrt()},Unit:d,"Array | Matrix":function(e){return ii(e,this,!0)}});function l(e,r){var n=e.arg()/3,i=e.abs(),s=new o(ta(i),0).mul(new o(0,n).exp());if(r){var u=[s,new o(ta(i),0).mul(new o(0,n+2*Math.PI/3).exp()),new o(ta(i),0).mul(new o(0,n-2*Math.PI/3).exp())];return"Array"===t.matrix?u:a(u)}return s}function d(e){if(e.value&&c(e.value)){var t=e.clone();return t.value=1,t=t.pow(1/3),t.value=l(e.value),t}var r,a=n(e.value);a&&(e.value=i(e.value)),r=u(e.value)?new s(1).div(3):f(e.value)?new h(1,3):1/3;var o=e.pow(r);return a&&(o.value=i(o.value)),o}}),dd="floor",pd=["typed","config","round","matrix","equalScalar"],md=bt(dd,pd,e=>{var{typed:t,config:r,round:n,matrix:i,equalScalar:a}=e,o=Lf({typed:t,equalScalar:a}),s=Nf({typed:t});return t("floor",{number:function(e){return De(e,n(e),r.epsilon)?n(e):Math.floor(e)},"number, number":function(e,t){if(De(e,n(e,t),r.epsilon))return n(e,t);var[i,a]="".concat(e,"e").split("e"),o=Math.floor(Number("".concat(i,"e").concat(Number(a)+t)));return[i,a]="".concat(o,"e").split("e"),Number("".concat(i,"e").concat(Number(a)-t))},Complex:function(e){return e.floor()},"Complex, number":function(e,t){return e.floor(t)},BigNumber:function(e){return Ai(e,n(e),r.epsilon)?n(e):e.floor()},"BigNumber, BigNumber":function(e,t){return Ai(e,n(e,t),r.epsilon)?n(e,t):e.toDecimalPlaces(t.toNumber(),mr.a.ROUND_FLOOR)},Fraction:function(e){return e.floor()},"Fraction, number":function(e,t){return e.floor(t)},"Array | Matrix":function(e){return ii(e,this,!0)},"Array | Matrix, number":function(e,t){return ii(e,e=>this(e,t),!0)},"SparseMatrix, number | BigNumber":function(e,t){return o(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"number | Complex | BigNumber, Array":function(e,t){return s(i(t),e,this,!0).valueOf()}})}),gd="multiply",vd=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],yd=bt(gd,vd,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:i,equalScalar:a,dot:o}=e,s=Lf({typed:t,equalScalar:a}),u=Nf({typed:t});function c(e,t){switch(e.length){case 1:switch(t.length){case 1:if(e[0]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(e[0]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+e[0]+") must match Matrix rows ("+t[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;case 2:switch(t.length){case 1:if(e[1]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+e[1]+") must match Vector length ("+t[0]+")");break;case 2:if(e[1]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+e[1]+") must match Matrix B rows ("+t[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+e.length+" dimensions)")}}function f(e,t,r){if(0===r)throw new Error("Cannot multiply two empty vectors");return o(e,t)}function h(e,t){if("dense"!==t.storage())throw new Error("Support for SparseMatrix not implemented");return l(e,t)}function l(e,r){var a,o=e._data,s=e._size,u=e._datatype,c=r._data,f=r._size,h=r._datatype,l=s[0],d=f[1],p=n,m=i;u&&h&&u===h&&"string"===typeof u&&(a=u,p=t.find(n,[a,a]),m=t.find(i,[a,a]));for(var g=[],v=0;v<d;v++){for(var y=m(o[0],c[0][v]),b=1;b<l;b++)y=p(y,m(o[b],c[b][v]));g[v]=y}return e.createDenseMatrix({data:g,size:[d],datatype:a})}var d=t("_multiplyMatrixVector",{"DenseMatrix, any":g,"SparseMatrix, any":b}),m=t("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":v,"DenseMatrix, SparseMatrix":y,"SparseMatrix, DenseMatrix":w,"SparseMatrix, SparseMatrix":M});function g(e,r){var a,o=e._data,s=e._size,u=e._datatype,c=r._data,f=r._datatype,h=s[0],l=s[1],d=n,p=i;u&&f&&u===f&&"string"===typeof u&&(a=u,d=t.find(n,[a,a]),p=t.find(i,[a,a]));for(var m=[],g=0;g<h;g++){for(var v=o[g],y=p(v[0],c[0]),b=1;b<l;b++)y=d(y,p(v[b],c[b]));m[g]=y}return e.createDenseMatrix({data:m,size:[h],datatype:a})}function v(e,r){var a,o=e._data,s=e._size,u=e._datatype,c=r._data,f=r._size,h=r._datatype,l=s[0],d=s[1],p=f[1],m=n,g=i;u&&h&&u===h&&"string"===typeof u&&(a=u,m=t.find(n,[a,a]),g=t.find(i,[a,a]));for(var v=[],y=0;y<l;y++){var b=o[y];v[y]=[];for(var w=0;w<p;w++){for(var M=g(b[0],c[0][w]),x=1;x<d;x++)M=m(M,g(b[x],c[x][w]));v[y][w]=M}}return e.createDenseMatrix({data:v,size:[l,p],datatype:a})}function y(e,r){var o=e._data,s=e._size,u=e._datatype,c=r._values,f=r._index,h=r._ptr,l=r._size,d=r._datatype;if(!c)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var p,m=s[0],g=l[1],v=n,y=i,b=a,w=0;u&&d&&u===d&&"string"===typeof u&&(p=u,v=t.find(n,[p,p]),y=t.find(i,[p,p]),b=t.find(a,[p,p]),w=t.convert(0,p));for(var M=[],x=[],_=[],S=r.createSparseMatrix({values:M,index:x,ptr:_,size:[m,g],datatype:p}),N=0;N<g;N++){_[N]=x.length;var E=h[N],A=h[N+1];if(A>E)for(var D=0,k=0;k<m;k++){for(var O=k+1,C=void 0,T=E;T<A;T++){var R=f[T];D!==O?(C=y(o[k][R],c[T]),D=O):C=v(C,y(o[k][R],c[T]))}D!==O||b(C,w)||(x.push(k),M.push(C))}}return _[g]=x.length,S}function b(e,r){var o=e._values,s=e._index,u=e._ptr,c=e._datatype;if(!o)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var f,h=r._data,l=r._datatype,d=e._size[0],p=r._size[0],m=[],g=[],v=[],y=n,b=i,w=a,M=0;c&&l&&c===l&&"string"===typeof c&&(f=c,y=t.find(n,[f,f]),b=t.find(i,[f,f]),w=t.find(a,[f,f]),M=t.convert(0,f));var x=[],_=[];v[0]=0;for(var S=0;S<p;S++){var N=h[S];if(!w(N,M))for(var E=u[S],A=u[S+1],D=E;D<A;D++){var k=s[D];_[k]?x[k]=y(x[k],b(N,o[D])):(_[k]=!0,g.push(k),x[k]=b(N,o[D]))}}for(var O=g.length,C=0;C<O;C++){var T=g[C];m[C]=x[T]}return v[1]=g.length,e.createSparseMatrix({values:m,index:g,ptr:v,size:[d,1],datatype:f})}function w(e,r){var o=e._values,s=e._index,u=e._ptr,c=e._datatype;if(!o)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var f,h=r._data,l=r._datatype,d=e._size[0],p=r._size[0],m=r._size[1],g=n,v=i,y=a,b=0;c&&l&&c===l&&"string"===typeof c&&(f=c,g=t.find(n,[f,f]),v=t.find(i,[f,f]),y=t.find(a,[f,f]),b=t.convert(0,f));for(var w=[],M=[],x=[],_=e.createSparseMatrix({values:w,index:M,ptr:x,size:[d,m],datatype:f}),S=[],N=[],E=0;E<m;E++){x[E]=M.length;for(var A=E+1,D=0;D<p;D++){var k=h[D][E];if(!y(k,b))for(var O=u[D],C=u[D+1],T=O;T<C;T++){var R=s[T];N[R]!==A?(N[R]=A,M.push(R),S[R]=v(k,o[T])):S[R]=g(S[R],v(k,o[T]))}}for(var B=x[E],I=M.length,q=B;q<I;q++){var P=M[q];w[q]=S[P]}}return x[m]=M.length,_}function M(e,r){var a,o=e._values,s=e._index,u=e._ptr,c=e._datatype,f=r._values,h=r._index,l=r._ptr,d=r._datatype,p=e._size[0],m=r._size[1],g=o&&f,v=n,y=i;c&&d&&c===d&&"string"===typeof c&&(a=c,v=t.find(n,[a,a]),y=t.find(i,[a,a]));for(var b,w,M,x,_,S,N,E,A=g?[]:void 0,D=[],k=[],O=e.createSparseMatrix({values:A,index:D,ptr:k,size:[p,m],datatype:a}),C=g?[]:void 0,T=[],R=0;R<m;R++){k[R]=D.length;var B=R+1;for(_=l[R],S=l[R+1],x=_;x<S;x++)if(E=h[x],g)for(w=u[E],M=u[E+1],b=w;b<M;b++)N=s[b],T[N]!==B?(T[N]=B,D.push(N),C[N]=y(f[x],o[b])):C[N]=v(C[N],y(f[x],o[b]));else for(w=u[E],M=u[E+1],b=w;b<M;b++)N=s[b],T[N]!==B&&(T[N]=B,D.push(N));if(g)for(var I=k[R],q=D.length,P=I;P<q;P++){var j=D[P];A[P]=C[j]}}return k[m]=D.length,O}return t(gd,$({"Array, Array":function(e,t){c(Ke(e),Ke(t));var n=this(r(e),r(t));return p(n)?n.valueOf():n},"Matrix, Matrix":function(e,t){var r=e.size(),n=t.size();return c(r,n),1===r.length?1===n.length?f(e,t,r[0]):h(e,t):1===n.length?d(e,t):m(e,t)},"Matrix, Array":function(e,t){return this(e,r(t))},"Array, Matrix":function(e,t){return this(r(e,t.storage()),t)},"SparseMatrix, any":function(e,t){return s(e,t,i,!1)},"DenseMatrix, any":function(e,t){return u(e,t,i,!1)},"any, SparseMatrix":function(e,t){return s(t,e,i,!0)},"any, DenseMatrix":function(e,t){return u(t,e,i,!0)},"Array, any":function(e,t){return u(r(e),t,i,!1).valueOf()},"any, Array":function(e,t){return u(r(t),e,i,!0).valueOf()},"any, any":i,"any, any, ...any":function(e,t,r){for(var n=this(e,t),i=0;i<r.length;i++)n=this(n,r[i]);return n}},i.signatures))}),bd="dotMultiply",wd=["typed","matrix","equalScalar","multiplyScalar"],Md=bt(bd,wd,e=>{var{typed:t,matrix:r,equalScalar:n,multiplyScalar:i}=e,a=Cf({typed:t,equalScalar:n}),o=Fl({typed:t,equalScalar:n}),s=Lf({typed:t,equalScalar:n}),u=xf({typed:t}),c=Nf({typed:t});return t(bd,{"any, any":i,"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,i,!1)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,i,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,i,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,i)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return s(e,t,i,!1)},"DenseMatrix, any":function(e,t){return c(e,t,i,!1)},"any, SparseMatrix":function(e,t){return s(t,e,i,!0)},"any, DenseMatrix":function(e,t){return c(t,e,i,!0)},"Array, any":function(e,t){return c(r(e),t,i,!1).valueOf()},"any, Array":function(e,t){return c(r(t),e,i,!0).valueOf()}})}),xd="re",_d=["typed"],Sd=bt(xd,_d,e=>{var{typed:t}=e;return t(xd,{number:function(e){return e},BigNumber:function(e){return e},Fraction:function(e){return e},Complex:function(e){return e.re},"Array | Matrix":function(e){return ii(e,this)}})}),Nd="flatten",Ed=["typed","matrix"],Ad=bt(Nd,Ed,e=>{var{typed:t,matrix:r}=e;return t(Nd,{Array:function(e){return ct(V(e))},Matrix:function(e){var t=ct(V(e.toArray()));return r(t)}})});function Dd(e,t,r,n){if(!(this instanceof Dd))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=r,this.max=n,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+r+(void 0!==n&&null!==n?"-"+n:"")+" expected)",this.stack=(new Error).stack}Dd.prototype=new Error,Dd.prototype.constructor=Error,Dd.prototype.name="ArgumentsError",Dd.prototype.isArgumentsError=!0;var kd="resize",Od=["config","matrix"],Cd=bt(kd,Od,e=>{var{config:t,matrix:r}=e;return function(e,i,a){if(2!==arguments.length&&3!==arguments.length)throw new Dd("resize",arguments.length,2,3);if(p(i)&&(i=i.valueOf()),u(i[0])&&(i=i.map((function(e){return u(e)?e.toNumber():e}))),p(e))return e.resize(i,a,!0);if("string"===typeof e)return n(e,i,a);var o=!Array.isArray(e)&&"Array"!==t.matrix;if(0===i.length){while(Array.isArray(e))e=e[0];return V(e)}Array.isArray(e)||(e=[e]),e=V(e);var s=Qe(e,i,a);return o?r(s):s};function n(e,t,r){if(void 0!==r){if("string"!==typeof r||1!==r.length)throw new TypeError("Single character expected as defaultValue")}else r=" ";if(1!==t.length)throw new Ge(t.length,1);var n=t[0];if("number"!==typeof n||!fe(n))throw new TypeError("Invalid size, must contain positive integers (size: "+Ue(t)+")");if(e.length>n)return e.substring(0,n);if(e.length<n){for(var i=e,a=0,o=n-e.length;a<o;a++)i+=r;return i}return e}}),Td="squeeze",Rd=["typed","matrix"],Bd=bt(Td,Rd,e=>{var{typed:t,matrix:r}=e;return t(Td,{Array:function(e){return at(V(e))},Matrix:function(e){var t=at(e.toArray());return Array.isArray(t)?r(t):t},any:function(e){return V(e)}})}),Id="to",qd=["typed","matrix"],Pd=bt(Id,qd,e=>{var{typed:t,matrix:r}=e,n=xf({typed:t}),i=Nf({typed:t});return t(Id,{"Unit, Unit | string":function(e,t){return e.to(t)},"Matrix, Matrix":function(e,t){return n(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"Matrix, any":function(e,t){return i(e,t,this,!1)},"any, Matrix":function(e,t){return i(t,e,this,!0)},"Array, any":function(e,t){return i(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return i(r(t),e,this,!0).valueOf()}})}),jd="pow",zd=["typed","config","identity","multiply","matrix","fraction","number","Complex"],Ld=bt(jd,zd,e=>{var{typed:t,config:r,identity:n,multiply:i,matrix:a,number:o,fraction:s,Complex:u}=e;return t(jd,{"number, number":c,"Complex, Complex":function(e,t){return e.pow(t)},"BigNumber, BigNumber":function(e,t){return t.isInteger()||e>=0||r.predictable?e.pow(t):new u(e.toNumber(),0).pow(t.toNumber(),0)},"Fraction, Fraction":function(e,t){var n=e.pow(t);if(null!=n)return n;if(r.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(e.valueOf(),t.valueOf())},"Array, number":f,"Array, BigNumber":function(e,t){return f(e,t.toNumber())},"Matrix, number":h,"Matrix, BigNumber":function(e,t){return h(e,t.toNumber())},"Unit, number | BigNumber":function(e,t){return e.pow(t)}});function c(e,t){if(r.predictable&&!fe(t)&&e<0)try{var n=s(t),i=o(n);if((t===i||Math.abs((t-i)/t)<1e-14)&&n.d%2===1)return(n.n%2===0?1:-1)*Math.pow(-e,t)}catch(a){}return r.predictable&&(e<-1&&t===1/0||e>-1&&e<0&&t===-1/0)?NaN:fe(t)||e>=0||r.predictable?wa(e,t):e*e<1&&t===1/0||e*e>1&&t===-1/0?0:new u(e,0).pow(t,0)}function f(e,t){if(!fe(t)||t<0)throw new TypeError("For A^b, b must be a positive integer (value is "+t+")");var r=Ke(e);if(2!==r.length)throw new Error("For A^b, A must be 2 dimensional (A has "+r.length+" dimensions)");if(r[0]!==r[1])throw new Error("For A^b, A must be square (size is "+r[0]+"x"+r[1]+")");var a=n(r[0]).valueOf(),o=e;while(t>=1)1===(1&t)&&(a=i(o,a)),t>>=1,o=i(o,o);return a}function h(e,t){return a(f(e.valueOf(),t))}}),Ud="dotPow",Fd=["typed","equalScalar","matrix","pow","DenseMatrix"],Hd=bt(Ud,Fd,e=>{var{typed:t,equalScalar:r,matrix:n,pow:i,DenseMatrix:a}=e,o=Bf({typed:t}),s=sh({typed:t,DenseMatrix:a}),u=Lf({typed:t,equalScalar:r}),c=Hf({typed:t,DenseMatrix:a}),f=xf({typed:t}),h=Nf({typed:t});return t(Ud,{"any, any":i,"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,i,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,i,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,i,!1)},"DenseMatrix, DenseMatrix":function(e,t){return f(e,t,i)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return u(e,t,this,!1)},"DenseMatrix, any":function(e,t){return h(e,t,this,!1)},"any, SparseMatrix":function(e,t){return c(t,e,this,!0)},"any, DenseMatrix":function(e,t){return h(t,e,this,!0)},"Array, any":function(e,t){return h(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return h(n(t),e,this,!0).valueOf()}})}),Zd="rightArithShift",Wd=["typed","matrix","equalScalar","zeros","DenseMatrix"],Vd=bt(Zd,Wd,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,DenseMatrix:a}=e,o=df({typed:t}),s=Cf({typed:t,equalScalar:n}),u=ol({typed:t,equalScalar:n}),c=bf({typed:t,DenseMatrix:a}),f=Lf({typed:t,equalScalar:n}),h=xf({typed:t}),l=Nf({typed:t});return t(Zd,{"number, number":fo,"BigNumber, BigNumber":ro,"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return s(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return h(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():f(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return n(t,0)?e.clone():l(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return n(e,0)?i(t.size(),t.storage()):c(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return n(e,0)?i(t.size(),t.storage()):l(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return this(r(e),t).valueOf()},"number | BigNumber, Array":function(e,t){return this(e,r(t)).valueOf()}})}),Gd=r("e975"),$d=r.n(Gd),Kd="compareNatural",Jd=["typed","compare"],Yd=bt(Kd,Jd,e=>{var{typed:t,compare:r}=e,n=r.signatures["boolean,boolean"];return t(Kd,{"any, any":function(e,t){var s,u=W(e),c=W(t);if(("number"===u||"BigNumber"===u||"Fraction"===u)&&("number"===c||"BigNumber"===c||"Fraction"===c))return s=r(e,t),"0"!==s.toString()?s>0?1:-1:$d()(u,c);if("Array"===u||"Matrix"===u||"Array"===c||"Matrix"===c)return s=i(this,e,t),0!==s?s:$d()(u,c);if(u!==c)return $d()(u,c);if("Complex"===u)return Xd(e,t);if("Unit"===u)return e.equalBase(t)?this(e.value,t.value):a(this,e.formatUnits(),t.formatUnits());if("boolean"===u)return n(e,t);if("string"===u)return $d()(e,t);if("Object"===u)return o(this,e,t);if("null"===u)return 0;if("undefined"===u)return 0;throw new TypeError('Unsupported type of value "'+u+'"')}});function i(e,t,r){return v(t)&&v(r)?a(e,t.toJSON().values,r.toJSON().values):v(t)?i(e,t.toArray(),r):v(r)?i(e,t,r.toArray()):g(t)?i(e,t.toJSON().data,r):g(r)?i(e,t,r.toJSON().data):Array.isArray(t)?Array.isArray(r)?a(e,t,r):i(e,t,[r]):i(e,[t],r)}function a(e,t,r){for(var n=0,i=Math.min(t.length,r.length);n<i;n++){var a=e(t[n],r[n]);if(0!==a)return a}return t.length>r.length?1:t.length<r.length?-1:0}function o(e,t,r){var n=Object.keys(t),i=Object.keys(r);n.sort($d.a),i.sort($d.a);var o=a(e,n,i);if(0!==o)return o;for(var s=0;s<n.length;s++){var u=e(t[n[s]],r[i[s]]);if(0!==u)return u}return 0}});function Xd(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0}var Qd="equalText",ep=["typed","compareText","isZero"],tp=bt(Qd,ep,e=>{var{typed:t,compareText:r,isZero:n}=e;return t(Qd,{"any, any":function(e,t){return n(r(e,t))}})}),rp="largerEq",np=["typed","config","matrix","DenseMatrix"],ip=bt(rp,np,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:i}=e,a=Bf({typed:t}),o=sh({typed:t,DenseMatrix:i}),s=Hf({typed:t,DenseMatrix:i}),u=xf({typed:t}),c=Nf({typed:t});return t(rp,{"boolean, boolean":function(e,t){return e>=t},"number, number":function(e,t){return e>=t||De(e,t,r.epsilon)},"BigNumber, BigNumber":function(e,t){return e.gte(t)||Ai(e,t,r.epsilon)},"Fraction, Fraction":function(e,t){return-1!==e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return s(t,e,this,!0)},"any, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, any":function(e,t){return c(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return c(n(t),e,this,!0).valueOf()}})}),ap="partitionSelect",op=["typed","isNumeric","isNaN","compare"],sp=bt(ap,op,e=>{var{typed:t,isNumeric:r,isNaN:n,compare:i}=e,a=i,o=(e,t)=>-i(e,t);return t(ap,{"Array | Matrix, number":function(e,t){return s(e,t,a)},"Array | Matrix, number, string":function(e,t,r){if("asc"===r)return s(e,t,a);if("desc"===r)return s(e,t,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":s});function s(e,t,r){if(!fe(t)||t<0)throw new Error("k must be a non-negative integer");if(p(e)){var n=e.size();if(n.length>1)throw new Error("Only one dimensional matrices supported");return u(e.valueOf(),t,r)}if(Array.isArray(e))return u(e,t,r)}function u(e,t,i){if(t>=e.length)throw new Error("k out of bounds");for(var a=0;a<e.length;a++)if(r(e[a])&&n(e[a]))return e[a];var o=0,s=e.length-1;while(o<s){var u=o,c=s,f=e[Math.floor(Math.random()*(s-o+1))+o];while(u<c)if(i(e[u],f)>=0){var h=e[c];e[c]=e[u],e[u]=h,--c}else++u;i(e[u],f)>0&&--u,t<=u?s=u:o=u+1}return e[t]}}),up="Index",cp=["ImmutableDenseMatrix"],fp=bt(up,cp,e=>{var{ImmutableDenseMatrix:t}=e;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._isScalar=!0;for(var t=0,i=arguments.length;t<i;t++){var a=arguments[t];if(y(a))this._dimensions.push(a),this._isScalar=!1;else if(Array.isArray(a)||p(a)){var o=n(a.valueOf());this._dimensions.push(o);var s=o.size();1===s.length&&1===s[0]||(this._isScalar=!1)}else if("number"===typeof a)this._dimensions.push(n([a]));else{if("string"!==typeof a)throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");this._dimensions.push(a)}}}function n(e){for(var r=0,n=e.length;r<n;r++)if("number"!==typeof e[r]||!fe(e[r]))throw new TypeError("Index parameters must be positive integer numbers");return new t(e)}return r.prototype.type="Index",r.prototype.isIndex=!0,r.prototype.clone=function(){var e=new r;return e._dimensions=V(this._dimensions),e._isScalar=this._isScalar,e},r.create=function(e){var t=new r;return r.apply(t,e),t},r.prototype.size=function(){for(var e=[],t=0,r=this._dimensions.length;t<r;t++){var n=this._dimensions[t];e[t]="string"===typeof n?1:n.size()[0]}return e},r.prototype.max=function(){for(var e=[],t=0,r=this._dimensions.length;t<r;t++){var n=this._dimensions[t];e[t]="string"===typeof n?n:n.max()}return e},r.prototype.min=function(){for(var e=[],t=0,r=this._dimensions.length;t<r;t++){var n=this._dimensions[t];e[t]="string"===typeof n?n:n.min()}return e},r.prototype.forEach=function(e){for(var t=0,r=this._dimensions.length;t<r;t++)e(this._dimensions[t],t,this)},r.prototype.dimension=function(e){return this._dimensions[e]||null},r.prototype.isObjectProperty=function(){return 1===this._dimensions.length&&"string"===typeof this._dimensions[0]},r.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},r.prototype.isScalar=function(){return this._isScalar},r.prototype.toArray=function(){for(var e=[],t=0,r=this._dimensions.length;t<r;t++){var n=this._dimensions[t];e.push("string"===typeof n?n:n.toArray())}return e},r.prototype.valueOf=r.prototype.toArray,r.prototype.toString=function(){for(var e=[],t=0,r=this._dimensions.length;t<r;t++){var n=this._dimensions[t];"string"===typeof n?e.push(JSON.stringify(n)):e.push(n.toString())}return"["+e.join(", ")+"]"},r.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},r.fromJSON=function(e){return r.create(e.dimensions)},r},{isClass:!0}),hp="asech",lp=["typed","config","Complex","BigNumber"],dp=bt(hp,lp,e=>{var{typed:t,config:r,Complex:n,BigNumber:i}=e;return t(hp,{number:function(e){if(e<=1&&e>=-1||r.predictable){var t=1/e;if(t>0||r.predictable)return xs(e);var i=Math.sqrt(t*t-1);return new n(Math.log(i-t),Math.PI)}return new n(e,0).asech()},Complex:function(e){return e.asech()},BigNumber:function(e){return new i(1).div(e).acosh()},"Array | Matrix":function(e){return ii(e,this)}})}),pp="tan",mp=["typed"],gp=bt(pp,mp,e=>{var{typed:t}=e;return t(pp,{number:Math.tan,Complex:function(e){return e.tan()},BigNumber:function(e){return e.tan()},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function tan is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this,!0)}})}),vp="setDifference",yp=["typed","size","subset","compareNatural","Index","DenseMatrix"],bp=bt(vp,yp,e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a,DenseMatrix:o}=e;return t(vp,{"Array | Matrix, Array | Matrix":function(e,t){var s;if(0===n(r(e),new a(0)))s=[];else{if(0===n(r(t),new a(0)))return ct(e.toArray());var u,c=mt(ct(Array.isArray(e)?e:e.toArray()).sort(i)),f=mt(ct(Array.isArray(t)?t:t.toArray()).sort(i));s=[];for(var h=0;h<c.length;h++){u=!1;for(var l=0;l<f.length;l++)if(0===i(c[h].value,f[l].value)&&c[h].identifier===f[l].identifier){u=!0;break}u||s.push(c[h])}}return Array.isArray(e)&&Array.isArray(t)?gt(s):new o(gt(s))}})}),wp="setIntersect",Mp=["typed","size","subset","compareNatural","Index","DenseMatrix"],xp=bt(wp,Mp,e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a,DenseMatrix:o}=e;return t(wp,{"Array | Matrix, Array | Matrix":function(e,t){var s;if(0===n(r(e),new a(0))||0===n(r(t),new a(0)))s=[];else{var u=mt(ct(Array.isArray(e)?e:e.toArray()).sort(i)),c=mt(ct(Array.isArray(t)?t:t.toArray()).sort(i));s=[];for(var f=0;f<u.length;f++)for(var h=0;h<c.length;h++)if(0===i(u[f].value,c[h].value)&&u[f].identifier===c[h].identifier){s.push(u[f]);break}}return Array.isArray(e)&&Array.isArray(t)?gt(s):new o(gt(s))}})}),_p="setMultiplicity",Sp=["typed","size","subset","compareNatural","Index"],Np=bt(_p,Sp,e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a}=e;return t(_p,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(e,t){if(0===n(r(t),new a(0)))return 0;for(var o=ct(Array.isArray(t)?t:t.toArray()),s=0,u=0;u<o.length;u++)0===i(o[u],e)&&s++;return s}})}),Ep="setSize",Ap=["typed","compareNatural"],Dp=bt(Ep,Ap,e=>{var{typed:t,compareNatural:r}=e;return t(Ep,{"Array | Matrix":function(e){return Array.isArray(e)?ct(e).length:ct(e.toArray()).length},"Array | Matrix, boolean":function(e,t){if(!1===t||0===e.length)return Array.isArray(e)?ct(e).length:ct(e.toArray()).length;for(var n=ct(Array.isArray(e)?e:e.toArray()).sort(r),i=1,a=1;a<n.length;a++)0!==r(n[a],n[a-1])&&i++;return i}})}),kp="trace",Op=["typed","matrix","add"],Cp=bt(kp,Op,e=>{var{typed:t,matrix:r,add:n}=e;return t("trace",{Array:function(e){return i(r(e))},SparseMatrix:a,DenseMatrix:i,any:V});function i(e){var t=e._size,r=e._data;switch(t.length){case 1:if(1===t[0])return V(r[0]);throw new RangeError("Matrix must be square (size: "+Ue(t)+")");case 2:var i=t[0],a=t[1];if(i===a){for(var o=0,s=0;s<i;s++)o=n(o,r[s][s]);return o}throw new RangeError("Matrix must be square (size: "+Ue(t)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Ue(t)+")")}}function a(e){var t=e._values,r=e._index,i=e._ptr,a=e._size,o=a[0],s=a[1];if(o===s){var u=0;if(t.length>0)for(var c=0;c<s;c++)for(var f=i[c],h=i[c+1],l=f;l<h;l++){var d=r[l];if(d===c){u=n(u,t[l]);break}if(d>c)break}return u}throw new RangeError("Matrix must be square (size: "+Ue(a)+")")}}),Tp="quantileSeq",Rp=["typed","add","multiply","partitionSelect","compare"],Bp=bt(Tp,Rp,e=>{var{typed:t,add:r,multiply:n,partitionSelect:i,compare:a}=e;function o(e,t,r){var n,i,a;if(arguments.length<2||arguments.length>3)throw new SyntaxError("Function quantileSeq requires two or three parameters");if(m(e)){if(r=r||!1,"boolean"===typeof r){if(i=e.valueOf(),s(t)){if(t<0)throw new Error("N/prob must be non-negative");if(t<=1)return c(i,t,r);if(t>1){if(!fe(t))throw new Error("N must be a positive integer");var o=t+1;n=new Array(t);for(var f=0;f<t;)n[f]=c(i,++f/o,r);return n}}if(u(t)){var h=t.constructor;if(t.isNegative())throw new Error("N/prob must be non-negative");if(a=new h(1),t.lte(a))return new h(c(i,t,r));if(t.gt(a)){if(!t.isInteger())throw new Error("N must be a positive integer");var l=t.toNumber();if(l>4294967295)throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var d=new h(l+1);n=new Array(l);for(var p=0;p<l;)n[p]=new h(c(i,new h(++p).div(d),r));return n}}if(Array.isArray(t)){n=new Array(t.length);for(var g=0;g<n.length;++g){var v=t[g];if(s(v)){if(v<0||v>1)throw new Error("Probability must be between 0 and 1, inclusive")}else{if(!u(v))throw new TypeError("Unexpected type of argument in function quantileSeq");if(a=new v.constructor(1),v.isNegative()||v.gt(a))throw new Error("Probability must be between 0 and 1, inclusive")}n[g]=c(i,v,r)}return n}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}throw new TypeError("Unexpected type of argument in function quantileSeq")}function c(e,t,o){var u=ct(e),c=u.length;if(0===c)throw new Error("Cannot calculate quantile of an empty sequence");if(s(t)){var h=t*(c-1),l=h%1;if(0===l){var d=o?u[h]:i(u,h);return f(d),d}var p,m,g=Math.floor(h);if(o)p=u[g],m=u[g+1];else{m=i(u,g+1),p=u[g];for(var v=0;v<g;++v)a(u[v],p)>0&&(p=u[v])}return f(p),f(m),r(n(p,1-l),n(m,l))}var y=t.times(c-1);if(y.isInteger()){y=y.toNumber();var b=o?u[y]:i(u,y);return f(b),b}var w,M,x=y.floor(),_=y.minus(x),S=x.toNumber();if(o)w=u[S],M=u[S+1];else{M=i(u,S+1),w=u[S];for(var N=0;N<S;++N)a(u[N],w)>0&&(w=u[N])}f(w),f(M);var E=new _.constructor(1);return r(n(w,E.minus(_)),n(M,_))}var f=t({"number | BigNumber | Unit":function(e){return e}});return o});function Ip(e){var t;if(fe(e))return e<=0?isFinite(e)?1/0:NaN:e>171?1/0:xu(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*Ip(1-e));if(e>=171.35)return 1/0;if(e>85){var r=e*e,n=r*e,i=n*e,a=i*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*r)-139/(51840*n)-571/(2488320*i)+163879/(209018880*a)+5246819/(75246796800*a*e))}--e,t=Pp[0];for(var o=1;o<Pp.length;++o)t+=Pp[o]/(e+o);var s=e+qp+.5;return Math.sqrt(2*Math.PI)*Math.pow(s,e+.5)*Math.exp(-s)*t}Ip.signature="number";var qp=4.7421875,Pp=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],jp="gamma",zp=["typed","config","multiplyScalar","pow","BigNumber","Complex"],Lp=bt(jp,zp,e=>{var{typed:t,config:r,multiplyScalar:n,pow:i,BigNumber:a,Complex:o}=e;return t(jp,{number:Ip,Complex:function(e){if(0===e.im)return this(e.re);e=new o(e.re-1,e.im);for(var t=new o(Pp[0],0),r=1;r<Pp.length;++r){var a=e.re+r,s=a*a+e.im*e.im;0!==s?(t.re+=Pp[r]*a/s,t.im+=-Pp[r]*e.im/s):t.re=Pp[r]<0?-1/0:1/0}var u=new o(e.re+qp+.5,e.im),c=Math.sqrt(2*Math.PI);e.re+=.5;var f=i(u,e);0===f.im?f.re*=c:(0===f.re||(f.re*=c),f.im*=c);var h=Math.exp(-u.re);return u.re=h*Math.cos(-u.im),u.im=h*Math.sin(-u.im),n(n(f,u),t)},BigNumber:function(e){if(e.isInteger())return e.isNegative()||e.isZero()?new a(1/0):s(e.minus(1));if(!e.isFinite())return new a(e.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")},"Array | Matrix":function(e){return ii(e,this)}});function s(e){if(e<8)return new a([1,1,2,6,24,120,720,5040][e]);var t=r.precision+(0|Math.log(e.toNumber())),n=a.clone({precision:t});if(e%2===1)return e.times(s(new a(e-1)));var i=e,o=new n(e),u=e.toNumber();while(i>2)i-=2,u+=i,o=o.times(u);return new a(o.toPrecision(a.precision))}}),Up="bignumber",Fp=["typed","BigNumber"],Hp=bt(Up,Fp,e=>{var{typed:t,BigNumber:r}=e;return t("bignumber",{"":function(){return new r(0)},number:function(e){return new r(e+"")},string:function(e){var t=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(t){var n=t[2],i=r(t[1]),a=new r(2).pow(Number(n));if(i.gt(a.sub(1)))throw new SyntaxError('String "'.concat(e,'" is out of range'));var o=new r(2).pow(Number(n)-1);return i.gte(o)?i.sub(a):i}return new r(e)},BigNumber:function(e){return e},Fraction:function(e){return new r(e.n).div(e.d).times(e.s)},null:function(e){return new r(0)},"Array | Matrix":function(e){return ii(e,this)}})}),Zp="matrixFromColumns",Wp=["typed","matrix","flatten","size"],Vp=bt(Zp,Wp,e=>{var{typed:t,matrix:r,flatten:n,size:i}=e;return t(Zp,{"...Array":function(e){return a(e)},"...Matrix":function(e){return r(a(e.map(e=>e.toArray())))}});function a(e){if(0===e.length)throw new TypeError("At least one column is needed to construct a matrix.");for(var t=o(e[0]),r=[],i=0;i<t;i++)r[i]=[];for(var a of e){var s=o(a);if(s!==t)throw new TypeError("The vectors had different length: "+(0|t)+" ≠ "+(0|s));for(var u=n(a),c=0;c<t;c++)r[c].push(u[c])}return r}function o(e){var t=i(e);if(1===t.length)return t[0];if(2===t.length){if(1===t[0])return t[1];if(1===t[1])return t[0];throw new TypeError("At least one of the arguments is not a vector.")}throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),Gp="lcm",$p=["typed","matrix","equalScalar"],Kp=bt(Gp,$p,e=>{var{typed:t,matrix:r,equalScalar:n}=e,i=Cf({typed:t,equalScalar:n}),a=Kf({typed:t,equalScalar:n}),o=Lf({typed:t,equalScalar:n}),s=xf({typed:t}),u=Nf({typed:t});return t(Gp,{"number, number":ca,"BigNumber, BigNumber":c,"Fraction, Fraction":function(e,t){return e.lcm(t)},"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, number | BigNumber":function(e,t){return o(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return u(e,t,this,!1)},"number | BigNumber, SparseMatrix":function(e,t){return o(t,e,this,!0)},"number | BigNumber, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, number | BigNumber":function(e,t){return u(r(e),t,this,!1).valueOf()},"number | BigNumber, Array":function(e,t){return u(r(t),e,this,!0).valueOf()},"Array | Matrix | number | BigNumber, Array | Matrix | number | BigNumber, ...Array | Matrix | number | BigNumber":function(e,t,r){for(var n=this(e,t),i=0;i<r.length;i++)n=this(n,r[i]);return n}});function c(e,t){if(!e.isInt()||!t.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(e.isZero())return e;if(t.isZero())return t;var r=e.times(t);while(!t.isZero()){var n=t;t=e.mod(n),e=n}return r.div(e).abs()}}),Jp="bitOr",Yp=["typed","matrix","equalScalar","DenseMatrix"],Xp=bt(Jp,Yp,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i}=e,a=df({typed:t}),o=gf({typed:t,equalScalar:n}),s=bf({typed:t,DenseMatrix:i}),u=xf({typed:t}),c=Nf({typed:t});return t(Jp,{"number, number":so,"BigNumber, BigNumber":Ya,"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return s(t,e,this,!0)},"any, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, any":function(e,t){return c(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return c(r(t),e,this,!0).valueOf()}})}),Qp="kron",em=["typed","matrix","multiplyScalar"],tm=bt(Qp,em,e=>{var{typed:t,matrix:r,multiplyScalar:n}=e;return t(Qp,{"Matrix, Matrix":function(e,t){return r(i(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return r(i(e.toArray(),t))},"Array, Matrix":function(e,t){return r(i(e,t.toArray()))},"Array, Array":i});function i(e,t){if(1===Ke(e).length&&(e=[e]),1===Ke(t).length&&(t=[t]),Ke(e).length>2||Ke(t).length>2)throw new RangeError("Vectors with dimensions greater then 2 are not supported expected (Size x = "+JSON.stringify(e.length)+", y = "+JSON.stringify(t.length)+")");var r=[],i=[];return e.map((function(e){return t.map((function(t){return i=[],r.push(i),e.map((function(e){return t.map((function(t){return i.push(n(e,t))}))}))}))}))&&r}}),rm="transpose",nm=["typed","matrix"],im=bt(rm,nm,e=>{var{typed:t,matrix:r}=e;return t("transpose",{Array:function(e){return this(r(e)).valueOf()},Matrix:function(e){var t,r=e.size();switch(r.length){case 1:t=e.clone();break;case 2:var a=r[0],o=r[1];if(0===o)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+Ue(r)+")");switch(e.storage()){case"dense":t=n(e,a,o);break;case"sparse":t=i(e,a,o);break}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+Ue(this._size)+")")}return t},any:function(e){return V(e)}});function n(e,t,r){for(var n,i=e._data,a=[],o=0;o<r;o++){n=a[o]=[];for(var s=0;s<t;s++)n[s]=V(i[s][o])}return e.createDenseMatrix({data:a,size:[r,t],datatype:e._datatype})}function i(e,t,r){for(var n,i,a,o=e._values,s=e._index,u=e._ptr,c=o?[]:void 0,f=[],h=[],l=[],d=0;d<t;d++)l[d]=0;for(n=0,i=s.length;n<i;n++)l[s[n]]++;for(var p=0,m=0;m<t;m++)h.push(p),p+=l[m],l[m]=h[m];for(h.push(p),a=0;a<r;a++)for(var g=u[a],v=u[a+1],y=g;y<v;y++){var b=l[s[y]]++;f[b]=a,o&&(c[b]=V(o[y]))}return e.createSparseMatrix({values:c,index:f,ptr:h,size:[r,t],datatype:e._datatype})}}),am="numeric",om=["number","?bignumber","?fraction"],sm=bt(am,om,e=>{var{number:t,bignumber:r,fraction:n}=e,i={string:!0,number:!0,BigNumber:!0,Fraction:!0},a={number:e=>t(e),BigNumber:r?e=>r(e):Oh,Fraction:n?e=>n(e):Ch};return function(e,t){var r=W(e);if(!(r in i))throw new TypeError("Cannot convert "+e+' of type "'+r+'"; valid input types are '+Object.keys(i).join(", "));if(!(t in a))throw new TypeError("Cannot convert "+e+' to type "'+t+'"; valid output types are '+Object.keys(a).join(", "));return t===r?e:a[t](e)}}),um="and",cm=["typed","matrix","equalScalar","zeros","not"],fm=bt(um,cm,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:i,not:a}=e,o=Cf({typed:t,equalScalar:n}),s=Kf({typed:t,equalScalar:n}),u=Lf({typed:t,equalScalar:n}),c=xf({typed:t}),f=Nf({typed:t});return t(um,{"number, number":Ao,"Complex, Complex":function(e,t){return(0!==e.re||0!==e.im)&&(0!==t.re||0!==t.im)},"BigNumber, BigNumber":function(e,t){return!e.isZero()&&!t.isZero()&&!e.isNaN()&&!t.isNaN()},"Unit, Unit":function(e,t){return this(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return s(e,t,this,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return o(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return c(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return a(t)?i(e.size(),e.storage()):u(e,t,this,!1)},"DenseMatrix, any":function(e,t){return a(t)?i(e.size(),e.storage()):f(e,t,this,!1)},"any, SparseMatrix":function(e,t){return a(e)?i(e.size(),e.storage()):u(t,e,this,!0)},"any, DenseMatrix":function(e,t){return a(e)?i(e.size(),e.storage()):f(t,e,this,!0)},"Array, any":function(e,t){return this(r(e),t).valueOf()},"any, Array":function(e,t){return this(e,r(t)).valueOf()}})}),hm="smallerEq",lm=["typed","config","matrix","DenseMatrix"],dm=bt(hm,lm,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:i}=e,a=Bf({typed:t}),o=sh({typed:t,DenseMatrix:i}),s=Hf({typed:t,DenseMatrix:i}),u=xf({typed:t}),c=Nf({typed:t});return t(hm,{"boolean, boolean":function(e,t){return e<=t},"number, number":function(e,t){return e<=t||De(e,t,r.epsilon)},"BigNumber, BigNumber":function(e,t){return e.lte(t)||Ai(e,t,r.epsilon)},"Fraction, Fraction":function(e,t){return 1!==e.compare(t)},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")},"Unit, Unit":function(e,t){if(!e.equalBase(t))throw new Error("Cannot compare units with different base");return this(e.value,t.value)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,this)},"Array, Array":function(e,t){return this(n(e),n(t)).valueOf()},"Array, Matrix":function(e,t){return this(n(e),t)},"Matrix, Array":function(e,t){return this(e,n(t))},"SparseMatrix, any":function(e,t){return s(e,t,this,!1)},"DenseMatrix, any":function(e,t){return c(e,t,this,!1)},"any, SparseMatrix":function(e,t){return s(t,e,this,!0)},"any, DenseMatrix":function(e,t){return c(t,e,this,!0)},"Array, any":function(e,t){return c(n(e),t,this,!1).valueOf()},"any, Array":function(e,t){return c(n(t),e,this,!0).valueOf()}})}),pm="sort",mm=["typed","matrix","compare","compareNatural"],gm=bt(pm,mm,e=>{var{typed:t,matrix:r,compare:n,compareNatural:i}=e,a=n,o=(e,t)=>-n(e,t);return t(pm,{Array:function(e){return u(e),e.sort(a)},Matrix:function(e){return c(e),r(e.toArray().sort(a),e.storage())},"Array, function":function(e,t){return u(e),e.sort(t)},"Matrix, function":function(e,t){return c(e),r(e.toArray().sort(t),e.storage())},"Array, string":function(e,t){return u(e),e.sort(s(t))},"Matrix, string":function(e,t){return c(e),r(e.toArray().sort(s(t)),e.storage())}});function s(e){if("asc"===e)return a;if("desc"===e)return o;if("natural"===e)return i;throw new Error('String "asc", "desc", or "natural" expected')}function u(e){if(1!==Ke(e).length)throw new Error("One dimensional array expected")}function c(e){if(1!==e.size().length)throw new Error("One dimensional matrix expected")}});function vm(e,t,r){var n;return-1!==String(e).indexOf("Unexpected type")?(n=arguments.length>2?" (type: "+W(r)+", value: "+JSON.stringify(r)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+t+", unexpected type of argument"+n)):-1!==String(e).indexOf("complex numbers")?(n=arguments.length>2?" (type: "+W(r)+", value: "+JSON.stringify(r)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+n)):e}var ym="min",bm=["typed","config","numeric","smaller"],wm=bt(ym,bm,e=>{var{typed:t,config:r,numeric:n,smaller:i}=e;return t(ym,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,t){return ai(e,t.valueOf(),a)},"...":function(e){if(ri(e))throw new TypeError("Scalar values expected in function min");return o(e)}});function a(e,t){try{return i(e,t)?e:t}catch(r){throw vm(r,"min",t)}}function o(e){var t;if(ni(e,(function(e){try{isNaN(e)&&"number"===typeof e?t=NaN:(void 0===t||i(e,t))&&(t=e)}catch(r){throw vm(r,"min",e)}})),void 0===t)throw new Error("Cannot calculate min of an empty array");return"string"===typeof t&&(t=n(t,r.number)),t}}),Mm="cot",xm=["typed","BigNumber"],_m=bt(Mm,xm,e=>{var{typed:t,BigNumber:r}=e;return t(Mm,{number:Os,Complex:function(e){return e.cot()},BigNumber:function(e){return new r(1).div(e.tan())},Unit:function(e){if(!e.hasBase(e.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return this(e.value)},"Array | Matrix":function(e){return ii(e,this)}})}),Sm="setDistinct",Nm=["typed","size","subset","compareNatural","Index","DenseMatrix"],Em=bt(Sm,Nm,e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a,DenseMatrix:o}=e;return t(Sm,{"Array | Matrix":function(e){var t;if(0===n(r(e),new a(0)))t=[];else{var s=ct(Array.isArray(e)?e:e.toArray()).sort(i);t=[],t.push(s[0]);for(var u=1;u<s.length;u++)0!==i(s[u],s[u-1])&&t.push(s[u])}return Array.isArray(e)?t:new o(t)}})}),Am="setPowerset",Dm=["typed","size","subset","compareNatural","Index"],km=bt(Am,Dm,e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a}=e;return t(Am,{"Array | Matrix":function(e){if(0===n(r(e),new a(0)))return[];var t=ct(Array.isArray(e)?e:e.toArray()).sort(i),u=[],c=0;while(c.toString(2).length<=t.length)u.push(o(t,c.toString(2).split("").reverse())),c++;return s(u)}});function o(e,t){for(var r=[],n=0;n<t.length;n++)"1"===t[n]&&r.push(e[n]);return r}function s(e){for(var t=[],r=e.length-1;r>0;r--)for(var n=0;n<r;n++)e[n].length>e[n+1].length&&(t=e[n],e[n]=e[n+1],e[n+1]=t);return e}}),Om="index",Cm=["typed","Index"],Tm=bt(Om,Cm,e=>{var{typed:t,Index:r}=e;return t(Om,{"...number | string | BigNumber | Range | Array | Matrix":function(e){var t=e.map((function(e){return u(e)?e.toNumber():Array.isArray(e)||p(e)?e.map((function(e){return u(e)?e.toNumber():e})):e})),n=new r;return r.apply(n,t),n}})}),Rm="sum",Bm=["typed","config","add","numeric"],Im=bt(Rm,Bm,e=>{var{typed:t,config:r,add:n,numeric:i}=e;return t(Rm,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":o,"...":function(e){if(ri(e))throw new TypeError("Scalar values expected in function sum");return a(e)}});function a(e){var t;return ni(e,(function(e){try{t=void 0===t?e:n(t,e)}catch(r){throw vm(r,"sum",e)}})),void 0===t&&(t=i(0,r.number)),"string"===typeof t&&(t=i(t,r.number)),t}function o(e,t){try{var r=ai(e,t,n);return r}catch(i){throw vm(i,"sum")}}}),qm="factorial",Pm=["typed","gamma"],jm=bt(qm,Pm,e=>{var{typed:t,gamma:r}=e;return t(qm,{number:function(e){if(e<0)throw new Error("Value must be non-negative");return r(e+1)},BigNumber:function(e){if(e.isNegative())throw new Error("Value must be non-negative");return r(e.plus(1))},"Array | Matrix":function(e){return ii(e,this)}})}),zm="permutations",Lm=["typed","factorial"],Um=bt(zm,Lm,e=>{var{typed:t,factorial:r}=e;return t(zm,{"number | BigNumber":r,"number, number":function(e,t){if(!fe(e)||e<0)throw new TypeError("Positive integer value expected in function permutations");if(!fe(t)||t<0)throw new TypeError("Positive integer value expected in function permutations");if(t>e)throw new TypeError("second argument k must be less than or equal to first argument n");return xu(e-t+1,e)},"BigNumber, BigNumber":function(e,t){var r,n;if(!Fm(e)||!Fm(t))throw new TypeError("Positive integer value expected in function permutations");if(t.gt(e))throw new TypeError("second argument k must be less than or equal to first argument n");var i=e.mul(0).add(1);for(r=i,n=e.minus(t).plus(1);n.lte(e);n=n.plus(1))r=r.times(n);return r}})});function Fm(e){return e.isInteger()&&e.gte(0)}var Hm="matrixFromRows",Zm=["typed","matrix","flatten","size"],Wm=bt(Hm,Zm,e=>{var{typed:t,matrix:r,flatten:n,size:i}=e;return t(Hm,{"...Array":function(e){return a(e)},"...Matrix":function(e){return r(a(e.map(e=>e.toArray())))}});function a(e){if(0===e.length)throw new TypeError("At least one row is needed to construct a matrix.");var t=o(e[0]),r=[];for(var i of e){var a=o(i);if(a!==t)throw new TypeError("The vectors had different length: "+(0|t)+" ≠ "+(0|a));r.push(n(i))}return r}function o(e){var t=i(e);if(1===t.length)return t[0];if(2===t.length){if(1===t[0])return t[1];if(1===t[1])return t[0];throw new TypeError("At least one of the arguments is not a vector.")}throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),Vm="subtract",Gm=["typed","matrix","equalScalar","addScalar","unaryMinus","DenseMatrix"],$m=bt(Vm,Gm,e=>{var{typed:t,matrix:r,equalScalar:n,addScalar:i,unaryMinus:a,DenseMatrix:o}=e,s=df({typed:t}),u=Bf({typed:t}),c=Pf({typed:t,equalScalar:n}),f=bf({typed:t,DenseMatrix:o}),h=xf({typed:t}),l=Nf({typed:t});return t(Vm,{"number, number":function(e,t){return e-t},"Complex, Complex":function(e,t){return e.sub(t)},"BigNumber, BigNumber":function(e,t){return e.minus(t)},"Fraction, Fraction":function(e,t){return e.sub(t)},"Unit, Unit":function(e,t){if(null===e.value)throw new Error("Parameter x contains a unit with undefined value");if(null===t.value)throw new Error("Parameter y contains a unit with undefined value");if(!e.equalBase(t))throw new Error("Units do not match");var r=e.clone();return r.value=this(r.value,t.value),r.fixPrefix=!1,r},"SparseMatrix, SparseMatrix":function(e,t){return Km(e,t),c(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return Km(e,t),u(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return Km(e,t),s(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return Km(e,t),h(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return f(e,a(t),i)},"DenseMatrix, any":function(e,t){return l(e,t,this)},"any, SparseMatrix":function(e,t){return f(t,e,this,!0)},"any, DenseMatrix":function(e,t){return l(t,e,this,!0)},"Array, any":function(e,t){return l(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return l(r(t),e,this,!0).valueOf()}})});function Km(e,t){var r=e.size(),n=t.size();if(r.length!==n.length)throw new Ge(r.length,n.length)}var Jm="cross",Ym=["typed","matrix","subtract","multiply"],Xm=bt(Jm,Ym,e=>{var{typed:t,matrix:r,subtract:n,multiply:i}=e;return t(Jm,{"Matrix, Matrix":function(e,t){return r(a(e.toArray(),t.toArray()))},"Matrix, Array":function(e,t){return r(a(e.toArray(),t))},"Array, Matrix":function(e,t){return r(a(e,t.toArray()))},"Array, Array":a});function a(e,t){var r=Math.max(Ke(e).length,Ke(t).length);e=at(e),t=at(t);var a=Ke(e),o=Ke(t);if(1!==a.length||1!==o.length||3!==a[0]||3!==o[0])throw new RangeError("Vectors with length 3 expected (Size A = ["+a.join(", ")+"], B = ["+o.join(", ")+"])");var s=[n(i(e[1],t[2]),i(e[2],t[1])),n(i(e[2],t[0]),i(e[0],t[2])),n(i(e[0],t[1]),i(e[1],t[0]))];return r>1?[s]:s}}),Qm="range",eg=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],tg=bt(Qm,eg,e=>{var{typed:t,config:r,matrix:n,bignumber:i,smaller:a,smallerEq:o,larger:s,largerEq:u}=e;return t(Qm,{string:f,"string, boolean":f,"number, number":function(e,t){return c(h(e,t,1))},"number, number, number":function(e,t,r){return c(h(e,t,r))},"number, number, boolean":function(e,t,r){return c(r?l(e,t,1):h(e,t,1))},"number, number, number, boolean":function(e,t,r,n){return c(n?l(e,t,r):h(e,t,r))},"BigNumber, BigNumber":function(e,t){var r=e.constructor;return c(d(e,t,new r(1)))},"BigNumber, BigNumber, BigNumber":function(e,t,r){return c(d(e,t,r))},"BigNumber, BigNumber, boolean":function(e,t,r){var n=e.constructor;return c(r?p(e,t,new n(1)):d(e,t,new n(1)))},"BigNumber, BigNumber, BigNumber, boolean":function(e,t,r,n){return c(n?p(e,t,r):d(e,t,r))}});function c(e){return"Matrix"===r.matrix?n?n(e):Th():e}function f(e,t){var n,a=m(e);if(!a)throw new SyntaxError('String "'+e+'" is no valid range');return"BigNumber"===r.number?(void 0===i&&Oh(),n=t?p:d,c(n(i(a.start),i(a.end),i(a.step)))):(n=t?l:h,c(n(a.start,a.end,a.step)))}function h(e,t,r){var n=[],i=e;if(r>0)while(a(i,t))n.push(i),i+=r;else if(r<0)while(s(i,t))n.push(i),i+=r;return n}function l(e,t,r){var n=[],i=e;if(r>0)while(o(i,t))n.push(i),i+=r;else if(r<0)while(u(i,t))n.push(i),i+=r;return n}function d(e,t,r){var n=i(0),o=[],u=e;if(r.gt(n))while(a(u,t))o.push(u),u=u.plus(r);else if(r.lt(n))while(s(u,t))o.push(u),u=u.plus(r);return o}function p(e,t,r){var n=i(0),a=[],s=e;if(r.gt(n))while(o(s,t))a.push(s),s=s.plus(r);else if(r.lt(n))while(u(s,t))a.push(s),s=s.plus(r);return a}function m(e){var t=e.split(":"),r=t.map((function(e){return Number(e)})),n=r.some((function(e){return isNaN(e)}));if(n)return null;switch(r.length){case 2:return{start:r[0],end:r[1],step:1};case 3:return{start:r[0],end:r[2],step:r[1]};default:return null}}}),rg="row",ng=["typed","Index","matrix","range"],ig=bt(rg,ng,e=>{var{typed:t,Index:r,matrix:n,range:i}=e;return t(rg,{"Matrix, number":a,"Array, number":function(e,t){return a(n(V(e)),t).valueOf()}});function a(e,t){if(2!==e.size().length)throw new Error("Only two dimensional matrix is supported");Xe(t,e.size()[0]);var n=i(0,e.size()[1]),a=new r(t,n);return e.subset(a)}}),ag="prod",og=["typed","config","multiplyScalar","numeric"],sg=bt(ag,og,e=>{var{typed:t,config:r,multiplyScalar:n,numeric:i}=e;return t(ag,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":function(e,t){throw new Error("prod(A, dim) is not yet supported")},"...":function(e){return a(e)}});function a(e){var t;if(ni(e,(function(e){try{t=void 0===t?e:n(t,e)}catch(r){throw vm(r,"prod",e)}})),"string"===typeof t&&(t=i(t,r.number)),void 0===t)throw new Error("Cannot calculate prod of an empty array");return t}}),ug="equal",cg=["typed","matrix","equalScalar","DenseMatrix"],fg=bt(ug,cg,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:i}=e,a=Bf({typed:t}),o=sh({typed:t,DenseMatrix:i}),s=Hf({typed:t,DenseMatrix:i}),u=xf({typed:t}),c=Nf({typed:t});return t(ug,{"any, any":function(e,t){return null===e?null===t:null===t?null===e:void 0===e?void 0===t:void 0===t?void 0===e:n(e,t)},"SparseMatrix, SparseMatrix":function(e,t){return o(e,t,n)},"SparseMatrix, DenseMatrix":function(e,t){return a(t,e,n,!0)},"DenseMatrix, SparseMatrix":function(e,t){return a(e,t,n,!1)},"DenseMatrix, DenseMatrix":function(e,t){return u(e,t,n)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return s(e,t,n,!1)},"DenseMatrix, any":function(e,t){return c(e,t,n,!1)},"any, SparseMatrix":function(e,t){return s(t,e,n,!0)},"any, DenseMatrix":function(e,t){return c(t,e,n,!0)},"Array, any":function(e,t){return c(r(e),t,n,!1).valueOf()},"any, Array":function(e,t){return c(r(t),e,n,!0).valueOf()}})}),hg=(bt(ug,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(ug,{"any, any":function(e,t){return null===e?null===t:null===t?null===e:void 0===e?void 0===t:void 0===t?void 0===e:r(e,t)}})}),"max"),lg=["typed","config","numeric","larger"],dg=bt(hg,lg,e=>{var{typed:t,config:r,numeric:n,larger:i}=e;return t(hg,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,t){return ai(e,t.valueOf(),a)},"...":function(e){if(ri(e))throw new TypeError("Scalar values expected in function max");return o(e)}});function a(e,t){try{return i(e,t)?e:t}catch(r){throw vm(r,"max",t)}}function o(e){var t;if(ni(e,(function(e){try{isNaN(e)&&"number"===typeof e?t=NaN:(void 0===t||i(e,t))&&(t=e)}catch(r){throw vm(r,"max",e)}})),void 0===t)throw new Error("Cannot calculate max of an empty array");return"string"===typeof t&&(t=n(t,r.number)),t}}),pg="setCartesian",mg=["typed","size","subset","compareNatural","Index","DenseMatrix"],gg=bt(pg,mg,e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a,DenseMatrix:o}=e;return t(pg,{"Array | Matrix, Array | Matrix":function(e,t){var s=[];if(0!==n(r(e),new a(0))&&0!==n(r(t),new a(0))){var u=ct(Array.isArray(e)?e:e.toArray()).sort(i),c=ct(Array.isArray(t)?t:t.toArray()).sort(i);s=[];for(var f=0;f<u.length;f++)for(var h=0;h<c.length;h++)s.push([u[f],c[h]])}return Array.isArray(e)&&Array.isArray(t)?s:new o(s)}})}),vg="setSymDifference",yg=["typed","size","concat","subset","setDifference","Index"],bg=bt(vg,yg,e=>{var{typed:t,size:r,concat:n,subset:i,setDifference:a,Index:o}=e;return t(vg,{"Array | Matrix, Array | Matrix":function(e,t){if(0===i(r(e),new o(0)))return ct(t);if(0===i(r(t),new o(0)))return ct(e);var s=ct(e),u=ct(t);return n(a(s,u),a(u,s))}})}),wg="ceil",Mg=["typed","config","round","matrix","equalScalar"],xg=bt(wg,Mg,e=>{var{typed:t,config:r,round:n,matrix:i,equalScalar:a}=e,o=Lf({typed:t,equalScalar:a}),s=Nf({typed:t});return t("ceil",{number:function(e){return De(e,n(e),r.epsilon)?n(e):ra(e)},"number, number":function(e,t){if(De(e,n(e,t),r.epsilon))return n(e,t);var[i,a]="".concat(e,"e").split("e"),o=Math.ceil(Number("".concat(i,"e").concat(Number(a)+t)));return[i,a]="".concat(o,"e").split("e"),Number("".concat(i,"e").concat(Number(a)-t))},Complex:function(e){return e.ceil()},"Complex, number":function(e,t){return e.ceil(t)},BigNumber:function(e){return Ai(e,n(e),r.epsilon)?n(e):e.ceil()},"BigNumber, BigNumber":function(e,t){return Ai(e,n(e,t),r.epsilon)?n(e,t):e.toDecimalPlaces(t.toNumber(),mr.a.ROUND_CEIL)},Fraction:function(e){return e.ceil()},"Fraction, number":function(e,t){return e.ceil(t)},"Array | Matrix":function(e){return ii(e,this,!0)},"Array | Matrix, number":function(e,t){return ii(e,e=>this(e,t),!0)},"SparseMatrix, number | BigNumber":function(e,t){return o(e,t,this,!1)},"DenseMatrix, number | BigNumber":function(e,t){return s(e,t,this,!1)},"number | Complex | BigNumber, Array":function(e,t){return s(i(t),e,this,!0).valueOf()}})}),_g="xor",Sg=["typed","matrix","DenseMatrix"],Ng=bt(_g,Sg,e=>{var{typed:t,matrix:r,DenseMatrix:n}=e,i=Bf({typed:t}),a=sh({typed:t,DenseMatrix:n}),o=Hf({typed:t,DenseMatrix:n}),s=xf({typed:t}),u=Nf({typed:t});return t(_g,{"number, number":Eo,"Complex, Complex":function(e,t){return(0!==e.re||0!==e.im)!==(0!==t.re||0!==t.im)},"BigNumber, BigNumber":function(e,t){return(!e.isZero()&&!e.isNaN())!==(!t.isZero()&&!t.isNaN())},"Unit, Unit":function(e,t){return this(e.value||0,t.value||0)},"SparseMatrix, SparseMatrix":function(e,t){return a(e,t,this)},"SparseMatrix, DenseMatrix":function(e,t){return i(t,e,this,!0)},"DenseMatrix, SparseMatrix":function(e,t){return i(e,t,this,!1)},"DenseMatrix, DenseMatrix":function(e,t){return s(e,t,this)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return o(e,t,this,!1)},"DenseMatrix, any":function(e,t){return u(e,t,this,!1)},"any, SparseMatrix":function(e,t){return o(t,e,this,!0)},"any, DenseMatrix":function(e,t){return u(t,e,this,!0)},"Array, any":function(e,t){return u(r(e),t,this,!1).valueOf()},"any, Array":function(e,t){return u(r(t),e,this,!0).valueOf()}})}),Eg="count",Ag=["typed","size","prod"],Dg=bt(Eg,Ag,e=>{var{typed:t,size:r,prod:n}=e;return t(Eg,{string:function(e){return e.length},"Matrix | Array":function(e){return n(r(e))}})}),kg="ctranspose",Og=["typed","transpose","conj"],Cg=bt(kg,Og,e=>{var{typed:t,transpose:r,conj:n}=e;return t(kg,{any:function(e){return n(r(e))}})}),Tg="deepEqual",Rg=["typed","equal"],Bg=bt(Tg,Rg,e=>{var{typed:t,equal:r}=e;return t(Tg,{"any, any":function(e,t){return n(e.valueOf(),t.valueOf())}});function n(e,t){if(Array.isArray(e)){if(Array.isArray(t)){var i=e.length;if(i!==t.length)return!1;for(var a=0;a<i;a++)if(!n(e[a],t[a]))return!1;return!0}return!1}return!Array.isArray(t)&&r(e,t)}}),Ig="setIsSubset",qg=["typed","size","subset","compareNatural","Index"],Pg=bt(Ig,qg,e=>{var{typed:t,size:r,subset:n,compareNatural:i,Index:a}=e;return t(Ig,{"Array | Matrix, Array | Matrix":function(e,t){if(0===n(r(e),new a(0)))return!0;if(0===n(r(t),new a(0)))return!1;for(var o,s=mt(ct(Array.isArray(e)?e:e.toArray()).sort(i)),u=mt(ct(Array.isArray(t)?t:t.toArray()).sort(i)),c=0;c<s.length;c++){o=!1;for(var f=0;f<u.length;f++)if(0===i(s[c].value,u[f].value)&&s[c].identifier===u[f].identifier){o=!0;break}if(!1===o)return!1}return!0}})}),jg="fix",zg=["typed","Complex","matrix","ceil","floor"],Lg=bt(jg,zg,e=>{var{typed:t,Complex:r,matrix:n,ceil:i,floor:a}=e,o=Nf({typed:t});return t("fix",{number:function(e){return e>0?a(e):i(e)},"number, number | BigNumber":function(e,t){return e>0?a(e,t):i(e,t)},Complex:function(e){return new r(e.re>0?Math.floor(e.re):Math.ceil(e.re),e.im>0?Math.floor(e.im):Math.ceil(e.im))},"Complex, number | BigNumber":function(e,t){return new r(e.re>0?a(e.re,t):i(e.re,t),e.im>0?a(e.im,t):i(e.im,t))},BigNumber:function(e){return e.isNegative()?i(e):a(e)},"BigNumber, number | BigNumber":function(e,t){return e.isNegative()?i(e,t):a(e,t)},Fraction:function(e){return e.s<0?e.ceil():e.floor()},"Fraction, number | BigNumber":function(e,t){return e.s<0?e.ceil(t):e.floor(t)},"Array | Matrix":function(e){return ii(e,this,!0)},"Array | Matrix, number | BigNumber":function(e,t){return ii(e,e=>this(e,t),!0)},"number | Complex | BigNumber, Array":function(e,t){return o(n(t),e,this,!0).valueOf()}})}),Ug="diff",Fg=["typed","matrix","subtract","number"],Hg=bt(Ug,Fg,e=>{var{typed:t,matrix:r,subtract:n,number:i}=e;return t(Ug,{"Array | Matrix":function(e){return p(e)?r(o(e.toArray())):o(e)},"Array | Matrix, number":function(e,t){if(!fe(t))throw new RangeError("Dimension must be a whole number");return p(e)?r(a(e.toArray(),t)):a(e,t)},"Array | Matrix, BigNumber":function(e,t){return this(e,i(t))}});function a(e,t){if(p(e)&&(e=e.toArray()),!Array.isArray(e))throw RangeError("Array/Matrix does not have that many dimensions");if(t>0){var r=[];return e.forEach(e=>{r.push(a(e,t-1))}),r}if(0===t)return o(e);throw RangeError("Cannot have negative dimension")}function o(e){var t=[],r=e.length;if(r<2)return e;for(var n=1;n<r;n++)t.push(s(e[n-1],e[n]));return t}function s(e,t){p(e)&&(e=e.toArray()),p(t)&&(t=t.toArray());var r=Array.isArray(e),i=Array.isArray(t);if(r&&i)return u(e,t);if(!r&&!i)return n(t,e);throw TypeError("Cannot calculate difference between 1 array and 1 non-array")}function u(e,t){if(e.length!==t.length)throw RangeError("Not all sub-arrays have the same length");for(var r=[],n=e.length,i=0;i<n;i++)r.push(s(e[i],t[i]));return r}}),Zg="divideScalar",Wg=["typed","numeric"],Vg=bt(Zg,Wg,e=>{var{typed:t,numeric:r}=e;return t(Zg,{"number, number":function(e,t){return e/t},"Complex, Complex":function(e,t){return e.div(t)},"BigNumber, BigNumber":function(e,t){return e.div(t)},"Fraction, Fraction":function(e,t){return e.div(t)},"Unit, number | Fraction | BigNumber":function(e,t){var n=e.clone(),i=r(1,W(t));return n.value=this(null===n.value?n._normalize(i):n.value,t),n},"number | Fraction | BigNumber, Unit":function(e,t){var n=t.clone();n=n.pow(-1);var i=r(1,W(e));return n.value=this(e,null===t.value?t._normalize(i):t.value),n},"Unit, Unit":function(e,t){return e.divide(t)}})}),Gg="nthRoots",$g=["config","typed","divideScalar","Complex"],Kg=bt(Gg,$g,e=>{var{typed:t,config:r,divideScalar:n,Complex:i}=e,a=[function(e){return new i(e,0)},function(e){return new i(0,e)},function(e){return new i(-e,0)},function(e){return new i(0,-e)}];function o(e,t){if(t<0)throw new Error("Root must be greater than zero");if(0===t)throw new Error("Root must be non-zero");if(t%1!==0)throw new Error("Root must be an integer");if(0===e||0===e.abs())return[new i(0,0)];var r,n="number"===typeof e;(n||0===e.re||0===e.im)&&(r=n?2*+(e<0):0===e.im?2*+(e.re<0):2*+(e.im<0)+1);for(var o=e.arg(),s=e.abs(),u=[],c=Math.pow(s,1/t),f=0;f<t;f++){var h=(r+4*f)/t;h!==Math.round(h)?u.push(new i({r:c,phi:(o+2*Math.PI*f)/t})):u.push(a[h%4](c))}return u}return t(Gg,{Complex:function(e){return o(e,2)},"Complex, number":o})});function Jg(e){var{DenseMatrix:t}=e;return function(e,r,n){var i=e.size();if(2!==i.length)throw new RangeError("Matrix must be two dimensional (size: "+Ue(i)+")");var a=i[0],o=i[1];if(a!==o)throw new RangeError("Matrix must be square (size: "+Ue(i)+")");var s=[];if(p(r)){var u=r.size(),c=r._data;if(1===u.length){if(u[0]!==a)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var f=0;f<a;f++)s[f]=[c[f]];return new t({data:s,size:[a,1],datatype:r._datatype})}if(2===u.length){if(u[0]!==a||1!==u[1])throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(g(r)){if(n){s=[];for(var h=0;h<a;h++)s[h]=[c[h][0]];return new t({data:s,size:[a,1],datatype:r._datatype})}return r}if(v(r)){for(var l=0;l<a;l++)s[l]=[0];for(var m=r._values,y=r._index,b=r._ptr,w=b[1],M=b[0];M<w;M++){var x=y[M];s[x][0]=m[M]}return new t({data:s,size:[a,1],datatype:r._datatype})}}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}if(d(r)){var _=Ke(r);if(1===_.length){if(_[0]!==a)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var S=0;S<a;S++)s[S]=[r[S]];return new t({data:s,size:[a,1]})}if(2===_.length){if(_[0]!==a||1!==_[1])throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var N=0;N<a;N++)s[N]=[r[N][0]];return new t({data:s,size:[a,1]})}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}}}var Yg="lsolve",Xg=["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],Qg=bt(Yg,Xg,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:i,subtract:a,equalScalar:o,DenseMatrix:s}=e,u=Jg({DenseMatrix:s});return t(Yg,{"SparseMatrix, Array | Matrix":function(e,t){return f(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return c(e,t)},"Array, Array | Matrix":function(e,t){var n=r(e),i=c(n,t);return i.valueOf()}});function c(e,t){t=u(e,t,!0);for(var r=t._data,c=e._size[0],f=e._size[1],h=[],l=e._data,d=0;d<f;d++){var p=r[d][0]||0,m=void 0;if(o(p,0))m=0;else{var g=l[d][d];if(o(g,0))throw new Error("Linear system cannot be solved since matrix is singular");m=n(p,g);for(var v=d+1;v<c;v++)r[v]=[a(r[v][0]||0,i(m,l[v][d]))]}h[d]=[m]}return new s({data:h,size:[c,1]})}function f(e,t){t=u(e,t,!0);for(var r=t._data,c=e._size[0],f=e._size[1],h=e._values,l=e._index,d=e._ptr,p=[],m=0;m<f;m++){var g=r[m][0]||0;if(o(g,0))p[m]=[0];else{for(var v=0,y=[],b=[],w=d[m],M=d[m+1],x=w;x<M;x++){var _=l[x];_===m?v=h[x]:_>m&&(y.push(h[x]),b.push(_))}if(o(v,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var S=n(g,v),N=0,E=b.length;N<E;N++){var A=b[N];r[A]=[a(r[A][0]||0,i(S,y[N]))]}p[m]=[S]}}return new s({data:p,size:[c,1]})}}),ev="lsolveAll",tv=["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],rv=bt(ev,tv,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:i,subtract:a,equalScalar:o,DenseMatrix:s}=e,u=Jg({DenseMatrix:s});return t(ev,{"SparseMatrix, Array | Matrix":function(e,t){return f(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return c(e,t)},"Array, Array | Matrix":function(e,t){var n=r(e),i=c(n,t);return i.map(e=>e.valueOf())}});function c(e,t){for(var r=[u(e,t,!0)._data.map(e=>e[0])],c=e._data,f=e._size[0],h=e._size[1],l=0;l<h;l++)for(var d=r.length,p=0;p<d;p++){var m=r[p];if(o(c[l][l],0))if(o(m[l],0)){if(0===p){var g=[...m];g[l]=1;for(var v=l+1;v<h;v++)g[v]=a(g[v],c[v][l]);r.push(g)}}else{if(0===p)return[];r.splice(p,1),p-=1,d-=1}else{m[l]=n(m[l],c[l][l]);for(var y=l+1;y<h;y++)m[y]=a(m[y],i(m[l],c[y][l]))}}return r.map(e=>new s({data:e.map(e=>[e]),size:[f,1]}))}function f(e,t){for(var r=[u(e,t,!0)._data.map(e=>e[0])],c=e._size[0],f=e._size[1],h=e._values,l=e._index,d=e._ptr,p=0;p<f;p++)for(var m=r.length,g=0;g<m;g++){for(var v=r[g],y=[],b=[],w=d[p],M=d[p+1],x=0,_=w;_<M;_++){var S=l[_];S===p?x=h[_]:S>p&&(y.push(h[_]),b.push(S))}if(o(x,0))if(o(v[p],0)){if(0===g){var N=[...v];N[p]=1;for(var E=0,A=b.length;E<A;E++){var D=b[E];N[D]=a(N[D],y[E])}r.push(N)}}else{if(0===g)return[];r.splice(g,1),g-=1,m-=1}else{v[p]=n(v[p],x);for(var k=0,O=b.length;k<O;k++){var C=b[k];v[C]=a(v[C],i(v[p],y[k]))}}}return r.map(e=>new s({data:e.map(e=>[e]),size:[c,1]}))}}),nv="Spa",iv=["addScalar","equalScalar","FibonacciHeap"],av=bt(nv,iv,e=>{var{addScalar:t,equalScalar:r,FibonacciHeap:n}=e;function i(){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return i.prototype.type="Spa",i.prototype.isSpa=!0,i.prototype.set=function(e,t){if(this._values[e])this._values[e].value=t;else{var r=this._heap.insert(e,t);this._values[e]=r}},i.prototype.get=function(e){var t=this._values[e];return t?t.value:0},i.prototype.accumulate=function(e,r){var n=this._values[e];n?n.value=t(n.value,r):(n=this._heap.insert(e,r),this._values[e]=n)},i.prototype.forEach=function(e,t,n){var i=this._heap,a=this._values,o=[],s=i.extractMinimum();s&&o.push(s);while(s&&s.key<=t)s.key>=e&&(r(s.value,0)||n(s.key,s.value,this)),s=i.extractMinimum(),s&&o.push(s);for(var u=0;u<o.length;u++){var c=o[u];s=i.insert(c.key,c.value),a[s.key]=s}},i.prototype.swap=function(e,t){var r=this._values[e],n=this._values[t];if(!r&&n)r=this._heap.insert(e,n.value),this._heap.remove(n),this._values[e]=r,this._values[t]=void 0;else if(r&&!n)n=this._heap.insert(t,r.value),this._heap.remove(r),this._values[t]=n,this._values[e]=void 0;else if(r&&n){var i=r.value;r.value=n.value,n.value=i}},i},{isClass:!0}),ov="setUnion",sv=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],uv=bt(ov,sv,e=>{var{typed:t,size:r,concat:n,subset:i,setIntersect:a,setSymDifference:o,Index:s}=e;return t(ov,{"Array | Matrix, Array | Matrix":function(e,t){if(0===i(r(e),new s(0)))return ct(t);if(0===i(r(t),new s(0)))return ct(e);var u=ct(e),c=ct(t);return n(o(u,c),a(u,c))}})}),cv="lup",fv=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtract","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],hv=bt(cv,fv,e=>{var{typed:t,matrix:r,abs:n,addScalar:i,divideScalar:a,multiplyScalar:o,subtract:s,larger:u,equalScalar:c,unaryMinus:f,DenseMatrix:h,SparseMatrix:l,Spa:d}=e;return t(cv,{DenseMatrix:function(e){return p(e)},SparseMatrix:function(e){return m(e)},Array:function(e){var t=r(e),n=p(t);return{L:n.L.valueOf(),U:n.U.valueOf(),p:n.p}}});function p(e){var t,r,f,l=e._size[0],d=e._size[1],p=Math.min(l,d),m=V(e._data),g=[],v=[l,p],y=[],b=[p,d],w=[];for(t=0;t<l;t++)w[t]=t;for(r=0;r<d;r++){if(r>0)for(t=0;t<l;t++){var M=Math.min(t,r),x=0;for(f=0;f<M;f++)x=i(x,o(m[t][f],m[f][r]));m[t][r]=s(m[t][r],x)}var _=r,S=0,N=0;for(t=r;t<l;t++){var E=m[t][r],A=n(E);u(A,S)&&(_=t,S=A,N=E)}if(r!==_&&(w[r]=[w[_],w[_]=w[r]][0],h._swapRows(r,_,m)),r<l)for(t=r+1;t<l;t++){var D=m[t][r];c(D,0)||(m[t][r]=a(m[t][r],N))}}for(r=0;r<d;r++)for(t=0;t<l;t++)0===r&&(t<d&&(y[t]=[]),g[t]=[]),t<r?(t<d&&(y[t][r]=m[t][r]),r<l&&(g[t][r]=0)):t!==r?(t<d&&(y[t][r]=0),r<l&&(g[t][r]=m[t][r])):(t<d&&(y[t][r]=m[t][r]),r<l&&(g[t][r]=1));var k=new h({data:g,size:v}),O=new h({data:y,size:b}),C=[];for(t=0,p=w.length;t<p;t++)C[w[t]]=t;return{L:k,U:O,p:C,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}function m(e){var t,r,i,s=e._size[0],h=e._size[1],p=Math.min(s,h),m=e._values,g=e._index,v=e._ptr,y=[],b=[],w=[],M=[s,p],x=[],_=[],S=[],N=[p,h],E=[],A=[];for(t=0;t<s;t++)E[t]=t,A[t]=t;var D=function(e,t){var r=A[e],n=A[t];E[r]=t,E[n]=e,A[e]=n,A[t]=r},k=function(){var e=new d;r<s&&(w.push(y.length),y.push(1),b.push(r)),S.push(x.length);var h=v[r],p=v[r+1];for(i=h;i<p;i++)t=g[i],e.set(E[t],m[i]);r>0&&e.forEach(0,r-1,(function(t,r){l._forEachRow(t,y,b,w,(function(n,i){n>t&&e.accumulate(n,f(o(i,r)))}))}));var A=r,k=e.get(r),O=n(k);e.forEach(r+1,s-1,(function(e,t){var r=n(t);u(r,O)&&(A=e,O=r,k=t)})),r!==A&&(l._swapRows(r,A,M[1],y,b,w),l._swapRows(r,A,N[1],x,_,S),e.swap(r,A),D(r,A)),e.forEach(0,s-1,(function(e,t){e<=r?(x.push(t),_.push(e)):(t=a(t,k),c(t,0)||(y.push(t),b.push(e)))}))};for(r=0;r<h;r++)k();return S.push(x.length),w.push(y.length),{L:new l({values:y,index:b,ptr:w,size:M}),U:new l({values:x,index:_,ptr:S,size:N}),p:E,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\nP: "+this.p}}}});function lv(e,t,r,n){for(var i=e._values,a=e._index,o=e._ptr,s=e._size,u=e._datatype,c=s[0],f=s[1],h=n&&e._values?[]:null,l=[],d=[],p=0,m=0;m<f;m++){d[m]=p;for(var g=r?r[m]:m,v=o[g],y=o[g+1],b=v;b<y;b++){var w=t?t[a[b]]:a[b];l[p]=w,h&&(h[p]=i[b]),p++}}return d[f]=p,e.createSparseMatrix({values:h,index:l,ptr:d,size:[c,f],datatype:u})}function dv(e,t,r,n,i,a,o){var s=0;r[o]=e;while(s>=0){var u=r[o+s],c=r[n+u];-1===c?(s--,a[t++]=u):(r[n+u]=r[i+c],++s,r[o+s]=c)}return t}function pv(e,t){if(!e)return null;var r,n=0,i=[],a=[],o=0,s=t,u=2*t;for(r=0;r<t;r++)a[o+r]=-1;for(r=t-1;r>=0;r--)-1!==e[r]&&(a[s+r]=a[o+e[r]],a[o+e[r]]=r);for(r=0;r<t;r++)-1===e[r]&&(n=dv(r,n,a,o,s,i,u));return i}function mv(e,t){if(!e)return null;var r,n,i=e._index,a=e._ptr,o=e._size,s=o[0],u=o[1],c=[],f=[],h=0,l=u;if(t)for(r=0;r<s;r++)f[l+r]=-1;for(var d=0;d<u;d++){c[d]=-1,f[h+d]=-1;for(var p=a[d],m=a[d+1],g=p;g<m;g++){var v=i[g];for(r=t?f[l+v]:v;-1!==r&&r<d;r=n)n=f[h+r],f[h+r]=d,-1===n&&(c[r]=d);t&&(f[l+v]=d)}}return c}function gv(e,t,r){for(var n=e._values,i=e._index,a=e._ptr,o=e._size,s=o[1],u=0,c=0;c<s;c++){var f=a[c];for(a[c]=u;f<a[c+1];f++)t(i[f],c,n?n[f]:1,r)&&(i[u]=i[f],n&&(n[u]=n[f]),u++)}return a[s]=u,i.splice(u,i.length-u),n&&n.splice(u,n.length-u),u}function vv(e){return-e-2}var yv="csAmd",bv=["add","multiply","transpose"],wv=bt(yv,bv,e=>{var{add:t,multiply:r,transpose:n}=e;return function(e,t){if(!t||e<=0||e>3)return null;var r=t._size,n=r[0],c=r[1],f=0,h=Math.max(16,10*Math.sqrt(c));h=Math.min(c-2,h);var l=i(e,t,n,c,h);gv(l,u,null);var d,p,m,g,v,y,b,w,M,x,_,S,N,E,A,D,k=l._index,O=l._ptr,C=O[c],T=[],R=[],B=0,I=c+1,q=2*(c+1),P=3*(c+1),j=4*(c+1),z=5*(c+1),L=6*(c+1),U=7*(c+1),F=T,H=a(c,O,R,B,P,F,q,U,I,L,j,z),Z=o(c,O,R,z,j,L,h,I,P,F,q),W=0;while(Z<c){for(m=-1;W<c&&-1===(m=R[P+W]);W++);-1!==R[q+m]&&(F[R[q+m]]=-1),R[P+W]=R[q+m];var V=R[j+m],G=R[I+m];Z+=G;var $=0;R[I+m]=-G;var K=O[m],J=0===V?K:C,Y=J;for(g=1;g<=V+1;g++){for(g>V?(y=m,b=K,w=R[B+m]-V):(y=k[K++],b=O[y],w=R[B+y]),v=1;v<=w;v++)d=k[b++],(M=R[I+d])<=0||($+=M,R[I+d]=-M,k[Y++]=d,-1!==R[q+d]&&(F[R[q+d]]=F[d]),-1!==F[d]?R[q+F[d]]=R[q+d]:R[P+R[z+d]]=R[q+d]);y!==m&&(O[y]=vv(m),R[L+y]=0)}for(0!==V&&(C=Y),R[z+m]=$,O[m]=J,R[B+m]=Y-J,R[j+m]=-2,H=s(H,f,R,L,c),x=J;x<Y;x++)if(d=k[x],!((_=R[j+d])<=0)){M=-R[I+d];var X=H-M;for(K=O[d],S=O[d]+_-1;K<=S;K++)y=k[K],R[L+y]>=H?R[L+y]-=M:0!==R[L+y]&&(R[L+y]=R[z+y]+X)}for(x=J;x<Y;x++){for(d=k[x],S=O[d],N=S+R[j+d]-1,E=S,A=0,D=0,K=S;K<=N;K++)if(y=k[K],0!==R[L+y]){var Q=R[L+y]-H;Q>0?(D+=Q,k[E++]=y,A+=y):(O[y]=vv(m),R[L+y]=0)}R[j+d]=E-S+1;var ee=E,te=S+R[B+d];for(K=N+1;K<te;K++){p=k[K];var re=R[I+p];re<=0||(D+=re,k[E++]=p,A+=p)}0===D?(O[d]=vv(m),M=-R[I+d],$-=M,G+=M,Z+=M,R[I+d]=0,R[j+d]=-1):(R[z+d]=Math.min(R[z+d],D),k[E]=k[ee],k[ee]=k[S],k[S]=m,R[B+d]=E-S+1,A=(A<0?-A:A)%c,R[q+d]=R[U+A],R[U+A]=d,F[d]=A)}for(R[z+m]=$,f=Math.max(f,$),H=s(H+f,f,R,L,c),x=J;x<Y;x++)if(d=k[x],!(R[I+d]>=0))for(A=F[d],d=R[U+A],R[U+A]=-1;-1!==d&&-1!==R[q+d];d=R[q+d],H++){for(w=R[B+d],_=R[j+d],K=O[d]+1;K<=O[d]+w-1;K++)R[L+k[K]]=H;var ne=d;for(p=R[q+d];-1!==p;){var ie=R[B+p]===w&&R[j+p]===_;for(K=O[p]+1;ie&&K<=O[p]+w-1;K++)R[L+k[K]]!==H&&(ie=0);ie?(O[p]=vv(d),R[I+d]+=R[I+p],R[I+p]=0,R[j+p]=-1,p=R[q+p],R[q+ne]=p):(ne=p,p=R[q+p])}}for(K=J,x=J;x<Y;x++)d=k[x],(M=-R[I+d])<=0||(R[I+d]=M,D=R[z+d]+$-M,D=Math.min(D,c-Z-M),-1!==R[P+D]&&(F[R[P+D]]=d),R[q+d]=R[P+D],F[d]=-1,R[P+D]=d,W=Math.min(W,D),R[z+d]=D,k[K++]=d);R[I+m]=G,0===(R[B+m]=K-J)&&(O[m]=-1,R[L+m]=0),0!==V&&(C=K)}for(d=0;d<c;d++)O[d]=vv(O[d]);for(p=0;p<=c;p++)R[P+p]=-1;for(p=c;p>=0;p--)R[I+p]>0||(R[q+p]=R[P+O[p]],R[P+O[p]]=p);for(y=c;y>=0;y--)R[I+y]<=0||-1!==O[y]&&(R[q+y]=R[P+O[y]],R[P+O[y]]=y);for(m=0,d=0;d<=c;d++)-1===O[d]&&(m=dv(d,m,R,P,q,T,L));return T.splice(T.length-1,1),T};function i(e,i,a,o,s){var u=n(i);if(1===e&&o===a)return t(i,u);if(2===e){for(var c=u._index,f=u._ptr,h=0,l=0;l<a;l++){var d=f[l];if(f[l]=h,!(f[l+1]-d>s))for(var p=f[l+1];d<p;d++)c[h++]=c[d]}return f[a]=h,i=n(u),r(u,i)}return r(u,i)}function a(e,t,r,n,i,a,o,u,c,f,h,l){for(var d=0;d<e;d++)r[n+d]=t[d+1]-t[d];r[n+e]=0;for(var p=0;p<=e;p++)r[i+p]=-1,a[p]=-1,r[o+p]=-1,r[u+p]=-1,r[c+p]=1,r[f+p]=1,r[h+p]=0,r[l+p]=r[n+p];var m=s(0,0,r,f,e);return r[h+e]=-2,t[e]=-1,r[f+e]=0,m}function o(e,t,r,n,i,a,o,s,u,c,f){for(var h=0,l=0;l<e;l++){var d=r[n+l];if(0===d)r[i+l]=-2,h++,t[l]=-1,r[a+l]=0;else if(d>o)r[s+l]=0,r[i+l]=-1,h++,t[l]=vv(e),r[s+e]++;else{var p=r[u+d];-1!==p&&(c[p]=l),r[f+l]=r[u+d],r[u+d]=l}}return h}function s(e,t,r,n,i){if(e<2||e+t<0){for(var a=0;a<i;a++)0!==r[n+a]&&(r[n+a]=1);e=2}return e}function u(e,t){return e!==t}});function Mv(e,t,r,n,i,a,o){var s,u,c,f=0;if(e<=t||r[n+t]<=r[i+e])return-1;r[i+e]=r[n+t];var h=r[a+e];if(r[a+e]=t,-1===h)f=1,c=e;else{for(f=2,c=h;c!==r[o+c];c=r[o+c]);for(s=h;s!==c;s=u)u=r[o+s],r[o+s]=c}return{jleaf:f,q:c}}var xv="csCounts",_v=["transpose"],Sv=bt(xv,_v,e=>{var{transpose:t}=e;return function(e,r,n,i){if(!e||!r||!n)return null;var a,o,s,u,c,f,h,l=e._size,d=l[0],p=l[1],m=4*p+(i?p+d+1:0),g=[],v=0,y=p,b=2*p,w=3*p,M=4*p,x=5*p+1;for(s=0;s<m;s++)g[s]=-1;var _=[],S=t(e),N=S._index,E=S._ptr;for(s=0;s<p;s++)for(o=n[s],_[o]=-1===g[w+o]?1:0;-1!==o&&-1===g[w+o];o=r[o])g[w+o]=s;if(i){for(s=0;s<p;s++)g[n[s]]=s;for(a=0;a<d;a++){for(s=p,f=E[a],h=E[a+1],c=f;c<h;c++)s=Math.min(s,g[N[c]]);g[x+a]=g[M+s],g[M+s]=a}}for(a=0;a<p;a++)g[v+a]=a;for(s=0;s<p;s++){for(o=n[s],-1!==r[o]&&_[r[o]]--,u=i?g[M+s]:o;-1!==u;u=i?g[x+u]:-1)for(c=E[u];c<E[u+1];c++){a=N[c];var A=Mv(a,o,g,w,y,b,v);A.jleaf>=1&&_[o]++,2===A.jleaf&&_[A.q]--}-1!==r[o]&&(g[v+o]=r[o])}for(o=0;o<p;o++)-1!==r[o]&&(_[r[o]]+=_[o]);return _}}),Nv="csSqr",Ev=["add","multiply","transpose"],Av=bt(Nv,Ev,e=>{var{add:t,multiply:r,transpose:n}=e,i=wv({add:t,multiply:r,transpose:n}),a=Sv({transpose:n});return function(e,t,r){var n,s=t._ptr,u=t._size,c=u[1],f={};if(f.q=i(e,t),e&&!f.q)return null;if(r){var h=e?lv(t,null,f.q,0):t;f.parent=mv(h,1);var l=pv(f.parent,c);if(f.cp=a(h,f.parent,l,1),h&&f.parent&&f.cp&&o(h,f))for(f.unz=0,n=0;n<c;n++)f.unz+=f.cp[n]}else f.unz=4*s[c]+c,f.lnz=f.unz;return f};function o(e,t){var r=e._ptr,n=e._index,i=e._size,a=i[0],o=i[1];t.pinv=[],t.leftmost=[];var s,u,c,f,h,l=t.parent,d=t.pinv,p=t.leftmost,m=[],g=0,v=a,y=a+o,b=a+2*o;for(u=0;u<o;u++)m[v+u]=-1,m[y+u]=-1,m[b+u]=0;for(s=0;s<a;s++)p[s]=-1;for(u=o-1;u>=0;u--)for(f=r[u],h=r[u+1],c=f;c<h;c++)p[n[c]]=u;for(s=a-1;s>=0;s--)d[s]=-1,u=p[s],-1!==u&&(0===m[b+u]++&&(m[y+u]=s),m[g+s]=m[v+u],m[v+u]=s);for(t.lnz=0,t.m2=a,u=0;u<o;u++)if(s=m[v+u],t.lnz++,s<0&&(s=t.m2++),d[s]=u,!(--b[u]<=0)){t.lnz+=m[b+u];var w=l[u];-1!==w&&(0===m[b+w]&&(m[y+w]=m[y+u]),m[g+m[y+u]]=m[v+w],m[v+w]=m[g+s],m[b+w]+=m[b+u])}for(s=0;s<a;s++)d[s]<0&&(d[s]=u++);return!0}});function Dv(e,t){return e[t]<0}function kv(e,t){e[t]=vv(e[t])}function Ov(e){return e<0?vv(e):e}function Cv(e,t,r,n,i){var a,o,s,u=t._index,c=t._ptr,f=t._size,h=f[1],l=0;n[0]=e;while(l>=0){e=n[l];var d=i?i[e]:e;Dv(c,e)||(kv(c,e),n[h+l]=d<0?0:Ov(c[d]));var p=1;for(o=n[h+l],s=d<0?0:Ov(c[d+1]);o<s;o++)if(a=u[o],!Dv(c,a)){n[h+l]=o,n[++l]=a,p=0;break}p&&(l--,n[--r]=e)}return r}function Tv(e,t,r,n,i){var a,o,s,u=e._ptr,c=e._size,f=t._index,h=t._ptr,l=c[1],d=l;for(o=h[r],s=h[r+1],a=o;a<s;a++){var p=f[a];Dv(u,p)||(d=Cv(p,e,d,n,i))}for(a=d;a<l;a++)kv(u,n[a]);return d}var Rv="csSpsolve",Bv=["divideScalar","multiply","subtract"],Iv=bt(Rv,Bv,e=>{var{divideScalar:t,multiply:r,subtract:n}=e;return function(e,i,a,o,s,u,c){var f,h,l,d,p=e._values,m=e._index,g=e._ptr,v=e._size,y=v[1],b=i._values,w=i._index,M=i._ptr,x=Tv(e,i,a,o,u);for(f=x;f<y;f++)s[o[f]]=0;for(h=M[a],l=M[a+1],f=h;f<l;f++)s[w[f]]=b[f];for(var _=x;_<y;_++){var S=o[_],N=u?u[S]:S;if(!(N<0))for(h=g[N],l=g[N+1],s[S]=t(s[S],p[c?h:l-1]),f=c?h+1:h,d=c?l:l-1;f<d;f++){var E=m[f];s[E]=n(s[E],r(p[f],s[S]))}}return x}}),qv="csLu",Pv=["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],jv=bt(qv,Pv,e=>{var{abs:t,divideScalar:r,multiply:n,subtract:i,larger:a,largerEq:o,SparseMatrix:s}=e,u=Iv({divideScalar:r,multiply:n,subtract:i});return function(e,i,c){if(!e)return null;var f,h=e._size,l=h[1],d=100,p=100;i&&(f=i.q,d=i.lnz||d,p=i.unz||p);var m,g,v=[],y=[],b=[],w=new s({values:v,index:y,ptr:b,size:[l,l]}),M=[],x=[],_=[],S=new s({values:M,index:x,ptr:_,size:[l,l]}),N=[],E=[],A=[];for(m=0;m<l;m++)E[m]=0,N[m]=-1,b[m+1]=0;d=0,p=0;for(var D=0;D<l;D++){b[D]=d,_[D]=p;var k=f?f[D]:D,O=u(w,e,k,A,E,N,1),C=-1,T=-1;for(g=O;g<l;g++)if(m=A[g],N[m]<0){var R=t(E[m]);a(R,T)&&(T=R,C=m)}else x[p]=N[m],M[p++]=E[m];if(-1===C||T<=0)return null;N[k]<0&&o(t(E[k]),n(T,c))&&(C=k);var B=E[C];for(x[p]=D,M[p++]=B,N[C]=D,y[d]=C,v[d++]=1,g=O;g<l;g++)m=A[g],N[m]<0&&(y[d]=m,v[d++]=r(E[m],B)),E[m]=0}for(b[l]=d,_[l]=p,g=0;g<d;g++)y[g]=N[y[g]];return v.splice(d,v.length-d),y.splice(d,y.length-d),M.splice(p,M.length-p),x.splice(p,x.length-p),{L:w,U:S,pinv:N}}}),zv="slu",Lv=["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],Uv=bt(zv,Lv,e=>{var{typed:t,abs:r,add:n,multiply:i,transpose:a,divideScalar:o,subtract:s,larger:u,largerEq:c,SparseMatrix:f}=e,h=Av({add:n,multiply:i,transpose:a}),l=jv({abs:r,divideScalar:o,multiply:i,subtract:s,larger:u,largerEq:c,SparseMatrix:f});return t(zv,{"SparseMatrix, number, number":function(e,t,r){if(!fe(t)||t<0||t>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(r<0||r>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var n=h(t,e,!1),i=l(e,n,r);return{L:i.L,U:i.U,p:i.pinv,q:n.q,toString:function(){return"L: "+this.L.toString()+"\nU: "+this.U.toString()+"\np: "+this.p.toString()+(this.q?"\nq: "+this.q.toString():"")+"\n"}}}})}),Fv="det",Hv=["typed","matrix","subtract","multiply","unaryMinus","lup"],Zv=bt(Fv,Hv,e=>{var{typed:t,matrix:r,subtract:n,multiply:i,unaryMinus:a,lup:o}=e;return t(Fv,{any:function(e){return V(e)},"Array | Matrix":function(e){var t;switch(p(e)?t=e.size():Array.isArray(e)?(e=r(e),t=e.size()):t=[],t.length){case 0:return V(e);case 1:if(1===t[0])return V(e.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+Ue(t)+")");case 2:var n=t[0],i=t[1];if(n===i)return s(e.clone().valueOf(),n,i);throw new RangeError("Matrix must be square (size: "+Ue(t)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Ue(t)+")")}}});function s(e,t,r){if(1===t)return V(e[0][0]);if(2===t)return n(i(e[0][0],e[1][1]),i(e[1][0],e[0][1]));for(var s=o(e),u=s.U[0][0],c=1;c<t;c++)u=i(u,s.U[c][c]);var f=0,h=0,l=[];while(1){while(l[h])h++;if(h>=t)break;var d=h,p=0;while(!l[s.p[d]])l[s.p[d]]=!0,d=s.p[d],p++;p%2===0&&f++}return f%2===0?u:a(u)}}),Wv="distance",Vv=["typed","addScalar","subtract","divideScalar","multiplyScalar","unaryMinus","sqrt","abs"],Gv=bt(Wv,Vv,e=>{var{typed:t,addScalar:r,subtract:n,multiplyScalar:i,divideScalar:a,unaryMinus:o,sqrt:s,abs:c}=e;return t(Wv,{"Array, Array, Array":function(e,t,r){if(2===e.length&&2===t.length&&2===r.length){if(!h(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!h(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!h(r))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");var s=a(n(r[1],r[0]),n(t[1],t[0])),u=i(i(s,s),t[0]),c=o(i(s,t[0])),f=e[1];return v(e[0],e[1],u,c,f)}throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(e,t,r){if(2===Object.keys(e).length&&2===Object.keys(t).length&&2===Object.keys(r).length){if(!h(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!h(t))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!h(r))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if("pointX"in e&&"pointY"in e&&"lineOnePtX"in t&&"lineOnePtY"in t&&"lineTwoPtX"in r&&"lineTwoPtY"in r){var s=a(n(r.lineTwoPtY,r.lineTwoPtX),n(t.lineOnePtY,t.lineOnePtX)),u=i(i(s,s),t.lineOnePtX),c=o(i(s,t.lineOnePtX)),f=e.pointX;return v(e.pointX,e.pointY,u,c,f)}throw new TypeError("Key names do not match")}throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(e,t){if(2===e.length&&3===t.length){if(!h(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!l(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return v(e[0],e[1],t[0],t[1],t[2])}if(3===e.length&&6===t.length){if(!l(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!p(t))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return y(e[0],e[1],e[2],t[0],t[1],t[2],t[3],t[4],t[5])}if(e.length===t.length&&e.length>0){if(!d(e))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!d(t))throw new TypeError("All values of an array should be numbers or BigNumbers");return b(e,t)}throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(e,t){if(2===Object.keys(e).length&&3===Object.keys(t).length){if(!h(e))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!l(t))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in e&&"pointY"in e&&"xCoeffLine"in t&&"yCoeffLine"in t&&"constant"in t)return v(e.pointX,e.pointY,t.xCoeffLine,t.yCoeffLine,t.constant);throw new TypeError("Key names do not match")}if(3===Object.keys(e).length&&6===Object.keys(t).length){if(!l(e))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!p(t))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in e&&"pointY"in e&&"x0"in t&&"y0"in t&&"z0"in t&&"a"in t&&"b"in t&&"c"in t)return y(e.pointX,e.pointY,e.pointZ,t.x0,t.y0,t.z0,t.a,t.b,t.c);throw new TypeError("Key names do not match")}if(2===Object.keys(e).length&&2===Object.keys(t).length){if(!h(e))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!h(t))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in e&&"pointOneY"in e&&"pointTwoX"in t&&"pointTwoY"in t)return b([e.pointOneX,e.pointOneY],[t.pointTwoX,t.pointTwoY]);throw new TypeError("Key names do not match")}if(3===Object.keys(e).length&&3===Object.keys(t).length){if(!l(e))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!l(t))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in e&&"pointOneY"in e&&"pointOneZ"in e&&"pointTwoX"in t&&"pointTwoY"in t&&"pointTwoZ"in t)return b([e.pointOneX,e.pointOneY,e.pointOneZ],[t.pointTwoX,t.pointTwoY,t.pointTwoZ]);throw new TypeError("Key names do not match")}throw new TypeError("Invalid Arguments: Try again")},Array:function(e){if(!g(e))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return w(e)}});function f(e){return"number"===typeof e||u(e)}function h(e){return e.constructor!==Array&&(e=m(e)),f(e[0])&&f(e[1])}function l(e){return e.constructor!==Array&&(e=m(e)),f(e[0])&&f(e[1])&&f(e[2])}function d(e){return Array.isArray(e)||(e=m(e)),e.every(f)}function p(e){return e.constructor!==Array&&(e=m(e)),f(e[0])&&f(e[1])&&f(e[2])&&f(e[3])&&f(e[4])&&f(e[5])}function m(e){for(var t=Object.keys(e),r=[],n=0;n<t.length;n++)r.push(e[t[n]]);return r}function g(e){if(2===e[0].length&&f(e[0][0])&&f(e[0][1])){if(e.some(e=>2!==e.length||!f(e[0])||!f(e[1])))return!1}else{if(!(3===e[0].length&&f(e[0][0])&&f(e[0][1])&&f(e[0][2])))return!1;if(e.some(e=>3!==e.length||!f(e[0])||!f(e[1])||!f(e[2])))return!1}return!0}function v(e,t,n,o,u){var f=c(r(r(i(n,e),i(o,t)),u)),h=s(r(i(n,n),i(o,o)));return a(f,h)}function y(e,t,o,u,c,f,h,l,d){var p=[n(i(n(c,t),d),i(n(f,o),l)),n(i(n(f,o),h),i(n(u,e),d)),n(i(n(u,e),l),i(n(c,t),h))];p=s(r(r(i(p[0],p[0]),i(p[1],p[1])),i(p[2],p[2])));var m=s(r(r(i(h,h),i(l,l)),i(d,d)));return a(p,m)}function b(e,t){for(var a=e.length,o=0,u=0,c=0;c<a;c++)u=n(e[c],t[c]),o=r(i(u,u),o);return s(o)}function w(e){for(var t=[],r=[],n=[],i=0;i<e.length-1;i++)for(var a=i+1;a<e.length;a++)2===e[0].length?(r=[e[i][0],e[i][1]],n=[e[a][0],e[a][1]]):3===e[0].length&&(r=[e[i][0],e[i][1],e[i][2]],n=[e[a][0],e[a][1],e[a][2]]),t.push(b(r,n));return t}}),$v="stirlingS2",Kv=["typed","addScalar","subtract","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","larger"],Jv=bt($v,Kv,e=>{var{typed:t,addScalar:r,subtract:n,multiplyScalar:i,divideScalar:a,pow:o,factorial:s,combinations:u,isNegative:c,isInteger:f,larger:h}=e;return t($v,{"number | BigNumber, number | BigNumber":function(e,t){if(!f(e)||c(e)||!f(t)||c(t))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(h(t,e))throw new TypeError("k must be less than or equal to n in function stirlingS2");for(var l=s(t),d=0,p=0;p<=t;p++){var m=o(-1,n(t,p)),g=u(t,p),v=o(p,e);d=r(d,i(i(g,v),m))}return a(d,l)}})}),Yv="catalan",Xv=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],Qv=bt(Yv,Xv,e=>{var{typed:t,addScalar:r,divideScalar:n,multiplyScalar:i,combinations:a,isNegative:o,isInteger:s}=e;return t(Yv,{"number | BigNumber":function(e){if(!s(e)||o(e))throw new TypeError("Non-negative integer value expected in function catalan");return n(a(i(e,2),e),r(e,1))}})}),ey="column",ty=["typed","Index","matrix","range"],ry=bt(ey,ty,e=>{var{typed:t,Index:r,matrix:n,range:i}=e;return t(ey,{"Matrix, number":a,"Array, number":function(e,t){return a(n(V(e)),t).valueOf()}});function a(e,t){if(2!==e.size().length)throw new Error("Only two dimensional matrix is supported");Xe(t,e.size()[1]);var n=i(0,e.size()[0]),a=new r(n,t);return e.subset(a)}}),ny="log",iy=["config","typed","divideScalar","Complex"],ay=bt(ny,iy,e=>{var{typed:t,config:r,divideScalar:n,Complex:i}=e;return t(ny,{number:function(e){return e>=0||r.predictable?fa(e):new i(e,0).log()},Complex:function(e){return e.log()},BigNumber:function(e){return!e.isNegative()||r.predictable?e.ln():new i(e.toNumber(),0).log()},"Array | Matrix":function(e){return ii(e,this)},"any, any":function(e,t){return n(this(e),this(t))}})}),oy="dotDivide",sy=["typed","matrix","equalScalar","divideScalar","DenseMatrix"],uy=bt(oy,sy,e=>{var{typed:t,matrix:r,equalScalar:n,divideScalar:i,DenseMatrix:a}=e,o=Cf({typed:t,equalScalar:n}),s=Bf({typed:t}),u=sh({typed:t,DenseMatrix:a}),c=Lf({typed:t,equalScalar:n}),f=Hf({typed:t,DenseMatrix:a}),h=xf({typed:t}),l=Nf({typed:t});return t(oy,{"any, any":i,"SparseMatrix, SparseMatrix":function(e,t){return u(e,t,i,!1)},"SparseMatrix, DenseMatrix":function(e,t){return o(t,e,i,!0)},"DenseMatrix, SparseMatrix":function(e,t){return s(e,t,i,!1)},"DenseMatrix, DenseMatrix":function(e,t){return h(e,t,i)},"Array, Array":function(e,t){return this(r(e),r(t)).valueOf()},"Array, Matrix":function(e,t){return this(r(e),t)},"Matrix, Array":function(e,t){return this(e,r(t))},"SparseMatrix, any":function(e,t){return c(e,t,i,!1)},"DenseMatrix, any":function(e,t){return l(e,t,i,!1)},"any, SparseMatrix":function(e,t){return f(t,e,i,!0)},"any, DenseMatrix":function(e,t){return l(t,e,i,!0)},"Array, any":function(e,t){return l(r(e),t,i,!1).valueOf()},"any, Array":function(e,t){return l(r(t),e,i,!0).valueOf()}})}),cy="usolveAll",fy=["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],hy=bt(cy,fy,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:i,subtract:a,equalScalar:o,DenseMatrix:s}=e,u=Jg({DenseMatrix:s});return t(cy,{"SparseMatrix, Array | Matrix":function(e,t){return f(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return c(e,t)},"Array, Array | Matrix":function(e,t){var n=r(e),i=c(n,t);return i.map(e=>e.valueOf())}});function c(e,t){for(var r=[u(e,t,!0)._data.map(e=>e[0])],c=e._data,f=e._size[0],h=e._size[1],l=h-1;l>=0;l--)for(var d=r.length,p=0;p<d;p++){var m=r[p];if(o(c[l][l],0))if(o(m[l],0)){if(0===p){var g=[...m];g[l]=1;for(var v=l-1;v>=0;v--)g[v]=a(g[v],c[v][l]);r.push(g)}}else{if(0===p)return[];r.splice(p,1),p-=1,d-=1}else{m[l]=n(m[l],c[l][l]);for(var y=l-1;y>=0;y--)m[y]=a(m[y],i(m[l],c[y][l]))}}return r.map(e=>new s({data:e.map(e=>[e]),size:[f,1]}))}function f(e,t){for(var r=[u(e,t,!0)._data.map(e=>e[0])],c=e._size[0],f=e._size[1],h=e._values,l=e._index,d=e._ptr,p=f-1;p>=0;p--)for(var m=r.length,g=0;g<m;g++){for(var v=r[g],y=[],b=[],w=d[p],M=d[p+1],x=0,_=M-1;_>=w;_--){var S=l[_];S===p?x=h[_]:S<p&&(y.push(h[_]),b.push(S))}if(o(x,0))if(o(v[p],0)){if(0===g){var N=[...v];N[p]=1;for(var E=0,A=b.length;E<A;E++){var D=b[E];N[D]=a(N[D],y[E])}r.push(N)}}else{if(0===g)return[];r.splice(g,1),g-=1,m-=1}else{v[p]=n(v[p],x);for(var k=0,O=b.length;k<O;k++){var C=b[k];v[C]=a(v[C],i(v[p],y[k]))}}}return r.map(e=>new s({data:e.map(e=>[e]),size:[c,1]}))}}),ly="hypot",dy=["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],py=bt(ly,dy,e=>{var{typed:t,abs:r,addScalar:n,divideScalar:i,multiplyScalar:a,sqrt:o,smaller:s,isPositive:u}=e;return t(ly,{"... number | BigNumber":c,Array:function(e){return this.apply(this,ct(e))},Matrix:function(e){return this.apply(this,ct(e.toArray()))}});function c(e){for(var t=0,c=0,f=0;f<e.length;f++){var h=r(e[f]);s(c,h)?(t=a(t,a(i(c,h),i(c,h))),t=n(t,1),c=h):t=n(t,u(h)?a(i(h,c),i(h,c)):h)}return a(c,o(t))}}),my="qr",gy=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtract","complex"],vy=bt(my,gy,e=>{var{typed:t,matrix:r,zeros:n,identity:i,isZero:o,equal:s,sign:u,sqrt:c,conj:f,unaryMinus:h,addScalar:l,divideScalar:d,multiplyScalar:p,subtract:m,complex:g}=e;return a()(t(my,{DenseMatrix:function(e){return y(e)},SparseMatrix:function(e){return b(e)},Array:function(e){var t=r(e),n=y(t);return{Q:n.Q.valueOf(),R:n.R.valueOf()}}}),{_denseQRimpl:v});function v(e){var t,r,a,g=e._size[0],v=e._size[1],y=i([g],"dense"),b=y._data,w=e.clone(),M=w._data,x=n([g],"");for(a=0;a<Math.min(v,g);++a){var _=M[a][a],S=h(s(_,0)?1:u(_)),N=f(S),E=0;for(t=a;t<g;t++)E=l(E,p(M[t][a],f(M[t][a])));var A=p(S,c(E));if(!o(A)){var D=m(_,A);for(x[a]=1,t=a+1;t<g;t++)x[t]=d(M[t][a],D);var k=h(f(d(D,A))),O=void 0;for(r=a;r<v;r++){for(O=0,t=a;t<g;t++)O=l(O,p(f(x[t]),M[t][r]));for(O=p(O,k),t=a;t<g;t++)M[t][r]=p(m(M[t][r],p(x[t],O)),N)}for(t=0;t<g;t++){for(O=0,r=a;r<g;r++)O=l(O,p(b[t][r],x[r]));for(O=p(O,k),r=a;r<g;++r)b[t][r]=d(m(b[t][r],p(O,f(x[r]))),N)}}}return{Q:y,R:w,toString:function(){return"Q: "+this.Q.toString()+"\nR: "+this.R.toString()}}}function y(e){var t=v(e),r=t.R._data;if(e._data.length>0)for(var n="Complex"===r[0][0].type?g(0):0,i=0;i<r.length;++i)for(var a=0;a<i&&a<(r[0]||[]).length;++a)r[i][a]=n;return t}function b(e){throw new Error("qr not implemented for sparse matrices yet")}}),yy="inv",by=["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],wy=bt(yy,by,e=>{var{typed:t,matrix:r,divideScalar:n,addScalar:i,multiply:a,unaryMinus:o,det:s,identity:u,abs:c}=e;return t(yy,{"Array | Matrix":function(e){var t=p(e)?e.size():Ke(e);switch(t.length){case 1:if(1===t[0])return p(e)?r([n(1,e.valueOf()[0])]):[n(1,e[0])];throw new RangeError("Matrix must be square (size: "+Ue(t)+")");case 2:var i=t[0],a=t[1];if(i===a)return p(e)?r(f(e.valueOf(),i,a),e.storage()):f(e,i,a);throw new RangeError("Matrix must be square (size: "+Ue(t)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+Ue(t)+")")}},any:function(e){return n(1,e)}});function f(e,t,r){var f,h,l,d,p;if(1===t){if(d=e[0][0],0===d)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,d)]]}if(2===t){var m=s(e);if(0===m)throw Error("Cannot calculate inverse, determinant is zero");return[[n(e[1][1],m),n(o(e[0][1]),m)],[n(o(e[1][0]),m),n(e[0][0],m)]]}var g=e.concat();for(f=0;f<t;f++)g[f]=g[f].concat();for(var v=u(t).valueOf(),y=0;y<r;y++){var b=c(g[y][y]),w=y;f=y+1;while(f<t)c(g[f][y])>b&&(b=c(g[f][y]),w=f),f++;if(0===b)throw Error("Cannot calculate inverse, determinant is zero");f=w,f!==y&&(p=g[y],g[y]=g[f],g[f]=p,p=v[y],v[y]=v[f],v[f]=p);var M=g[y],x=v[y];for(f=0;f<t;f++){var _=g[f],S=v[f];if(f!==y){if(0!==_[y]){for(l=n(o(_[y]),M[y]),h=y;h<r;h++)_[h]=i(_[h],a(l,M[h]));for(h=0;h<r;h++)S[h]=i(S[h],a(l,x[h]))}}else{for(l=M[y],h=y;h<r;h++)_[h]=n(_[h],l);for(h=0;h<r;h++)S[h]=n(S[h],l)}}}return v}}),My="expm",xy=["typed","abs","add","identity","inv","multiply"],_y=bt(My,xy,e=>{var{typed:t,abs:r,add:n,identity:i,inv:a,multiply:o}=e;return t(My,{Matrix:function(e){var t=e.size();if(2!==t.length||t[0]!==t[1])throw new RangeError("Matrix must be square (size: "+Ue(t)+")");for(var r=t[0],c=1e-15,f=s(e),h=u(f,c),l=h.q,d=h.j,p=o(e,Math.pow(2,-d)),m=i(r),g=i(r),y=1,b=p,w=-1,M=1;M<=l;M++)M>1&&(b=o(b,p),w=-w),y=y*(l-M+1)/((2*l-M+1)*M),m=n(m,o(y,b)),g=n(g,o(y*w,b));for(var x=o(a(g),m),_=0;_<d;_++)x=o(x,x);return v(e)?e.createSparseMatrix(x):x}});function s(e){for(var t=e.size()[0],n=0,i=0;i<t;i++){for(var a=0,o=0;o<t;o++)a+=r(e.get([i,o]));n=Math.max(a,n)}return n}function u(e,t){for(var r=30,n=0;n<r;n++)for(var i=0;i<=n;i++){var a=n-i;if(c(e,i,a)<t)return{q:i,j:a}}throw new Error("Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)")}function c(e,t,r){for(var n=1,i=2;i<=t;i++)n*=i;for(var a=n,o=t+1;o<=2*t;o++)a*=o;var s=a*(2*t+1);return 8*Math.pow(e/Math.pow(2,r),2*t)*n*n/(a*s)}}),Sy="divide",Ny=["typed","matrix","multiply","equalScalar","divideScalar","inv"],Ey=bt(Sy,Ny,e=>{var{typed:t,matrix:r,multiply:n,equalScalar:i,divideScalar:a,inv:o}=e,s=Lf({typed:t,equalScalar:i}),u=Nf({typed:t});return t("divide",$({"Array | Matrix, Array | Matrix":function(e,t){return n(e,o(t))},"DenseMatrix, any":function(e,t){return u(e,t,a,!1)},"SparseMatrix, any":function(e,t){return s(e,t,a,!1)},"Array, any":function(e,t){return u(r(e),t,a,!1).valueOf()},"any, Array | Matrix":function(e,t){return n(e,o(t))}},a.signatures))}),Ay="mean",Dy=["typed","add","divide"],ky=bt(Ay,Dy,e=>{var{typed:t,add:r,divide:n}=e;return t(Ay,{"Array | Matrix":a,"Array | Matrix, number | BigNumber":i,"...":function(e){if(ri(e))throw new TypeError("Scalar values expected in function mean");return a(e)}});function i(e,t){try{var i=ai(e,t,r),a=Array.isArray(e)?Ke(e):e.size();return n(i,a[t])}catch(o){throw vm(o,"mean")}}function a(e){var t,i=0;if(ni(e,(function(e){try{t=void 0===t?e:r(t,e),i++}catch(n){throw vm(n,"mean",e)}})),0===i)throw new Error("Cannot calculate the mean of an empty array");return n(t,i)}}),Oy="unbiased",Cy="variance",Ty=["typed","add","subtract","multiply","divide","apply","isNaN"],Ry=bt(Cy,Ty,e=>{var{typed:t,add:r,subtract:n,multiply:i,divide:a,apply:o,isNaN:s}=e;return t(Cy,{"Array | Matrix":function(e){return c(e,Oy)},"Array | Matrix, string":c,"Array | Matrix, number | BigNumber":function(e,t){return f(e,t,Oy)},"Array | Matrix, number | BigNumber, string":f,"...":function(e){return c(e,Oy)}});function c(e,t){var o,c=0;if(0===e.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(ni(e,(function(e){try{o=void 0===o?e:r(o,e),c++}catch(t){throw vm(t,"variance",e)}})),0===c)throw new Error("Cannot calculate variance of an empty array");var f=a(o,c);if(o=void 0,ni(e,(function(e){var t=n(e,f);o=void 0===o?i(t,t):r(o,i(t,t))})),s(o))return o;switch(t){case"uncorrected":return a(o,c);case"biased":return a(o,c+1);case"unbiased":var h=u(o)?o.mul(0):0;return 1===c?h:a(o,c-1);default:throw new Error('Unknown normalization "'+t+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function f(e,t,r){try{if(0===e.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(e,t,e=>c(e,r))}catch(n){throw vm(n,"variance")}}}),By="kldivergence",Iy=["typed","matrix","divide","sum","multiply","dotDivide","log","isNumeric"],qy=bt(By,Iy,e=>{var{typed:t,matrix:r,divide:n,sum:i,multiply:a,dotDivide:o,log:s,isNumeric:u}=e;return t(By,{"Array, Array":function(e,t){return c(r(e),r(t))},"Matrix, Array":function(e,t){return c(e,r(t))},"Array, Matrix":function(e,t){return c(r(e),t)},"Matrix, Matrix":function(e,t){return c(e,t)}});function c(e,t){var r=t.size().length,c=e.size().length;if(r>1)throw new Error("first object must be one dimensional");if(c>1)throw new Error("second object must be one dimensional");if(r!==c)throw new Error("Length of two vectors must be equal");var f=i(e);if(0===f)throw new Error("Sum of elements in first object must be non zero");var h=i(t);if(0===h)throw new Error("Sum of elements in second object must be non zero");var l=n(e,i(e)),d=n(t,i(t)),p=i(a(l,s(o(l,d))));return u(p)?p:Number.NaN}}),Py="bellNumbers",jy=["typed","addScalar","isNegative","isInteger","stirlingS2"],zy=bt(Py,jy,e=>{var{typed:t,addScalar:r,isNegative:n,isInteger:i,stirlingS2:a}=e;return t(Py,{"number | BigNumber":function(e){if(!i(e)||n(e))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var t=0,o=0;o<=e;o++)t=r(t,a(e,o));return t}})}),Ly="log1p",Uy=["typed","config","divideScalar","log","Complex"],Fy=bt(Ly,Uy,e=>{var{typed:t,config:r,divideScalar:n,log:i,Complex:a}=e;return t(Ly,{number:function(e){return e>=-1||r.predictable?pe(e):o(new a(e,0))},Complex:o,BigNumber:function(e){var t=e.plus(1);return!t.isNegative()||r.predictable?t.ln():o(new a(e.toNumber(),0))},"Array | Matrix":function(e){return ii(e,this)},"any, any":function(e,t){return n(this(e),i(t))}});function o(e){var t=e.re+1;return new a(Math.log(Math.sqrt(t*t+e.im*e.im)),Math.atan2(e.im,t))}});function Hy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zy(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Hy(Object(r),!0).forEach((function(t){Jh()(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Hy(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Wy="Unit",Vy=["?on","config","addScalar","subtract","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],Gy=bt(Wy,Vy,e=>{var t,r,n,{on:i,config:o,addScalar:s,subtract:u,multiplyScalar:f,divideScalar:l,pow:d,abs:p,fix:m,round:g,equal:v,isNumeric:y,format:b,number:w,Complex:M,BigNumber:x,Fraction:_}=e,S=w;function N(e,t){if(!(this instanceof N))throw new Error("Constructor must be called with the new operator");if(null!==e&&void 0!==e&&!y(e)&&!c(e))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(void 0!==t&&("string"!==typeof t||""===t))throw new TypeError("Second parameter in Unit constructor must be a string");if(void 0!==t){var r=N.parse(t);this.units=r.units,this.dimensions=r.dimensions}else{this.units=[{unit:U,prefix:q.NONE,power:0}],this.dimensions=[];for(var n=0;n<P.length;n++)this.dimensions[n]=0}this.value=void 0!==e&&null!==e?this._normalize(e):null,this.fixPrefix=!1,this.skipAutomaticSimplification=!0}function E(){while(" "===n||"\t"===n)k()}function A(e){return e>="0"&&e<="9"||"."===e}function D(e){return e>="0"&&e<="9"}function k(){r++,n=t.charAt(r)}function O(e){r=e,n=t.charAt(r)}function C(){var e="",t=r;if("+"===n?k():"-"===n&&(e+=n,k()),!A(n))return O(t),null;if("."===n){if(e+=n,k(),!D(n))return O(t),null}else{while(D(n))e+=n,k();"."===n&&(e+=n,k())}while(D(n))e+=n,k();if("E"===n||"e"===n){var i="",a=r;if(i+=n,k(),"+"!==n&&"-"!==n||(i+=n,k()),!D(n))return O(a),e;e+=i;while(D(n))e+=n,k()}return e}function T(){var e="";while(D(n)||N.isValidAlpha(n))e+=n,k();var t=e.charAt(0);return N.isValidAlpha(t)?e:null}function R(e){return n===e?(k(),e):null}N.prototype.type="Unit",N.prototype.isUnit=!0,N.parse=function(e,i){if(i=i||{},t=e,r=-1,n="","string"!==typeof t)throw new TypeError("Invalid argument in Unit.parse, string expected");var a=new N;a.units=[];var s=1,u=!1;k(),E();var c=C(),f=null;if(c){if("BigNumber"===o.number)f=new x(c);else if("Fraction"===o.number)try{f=new _(c)}catch(w){f=parseFloat(c)}else f=parseFloat(c);E(),R("*")?(s=1,u=!0):R("/")&&(s=-1,u=!0)}var h=[],l=1;while(1){E();while("("===n)h.push(s),l*=s,s=1,k(),E();var d=void 0;if(!n)break;var p=n;if(d=T(),null===d)throw new SyntaxError('Unexpected "'+p+'" in "'+t+'" at index '+r.toString());var m=B(d);if(null===m)throw new SyntaxError('Unit "'+d+'" not found.');var g=s*l;if(E(),R("^")){E();var v=C();if(null===v)throw new SyntaxError('In "'+e+'", "^" must be followed by a floating-point number');g*=v}a.units.push({unit:m.unit,prefix:m.prefix,power:g});for(var y=0;y<P.length;y++)a.dimensions[y]+=(m.unit.dimensions[y]||0)*g;E();while(")"===n){if(0===h.length)throw new SyntaxError('Unmatched ")" in "'+t+'" at index '+r.toString());l/=h.pop(),k(),E()}if(u=!1,R("*")?(s=1,u=!0):R("/")?(s=-1,u=!0):s=1,m.unit.base){var b=m.unit.base.key;G.auto[b]={unit:m.unit,prefix:m.prefix}}}if(E(),n)throw new SyntaxError('Could not parse: "'+e+'"');if(u)throw new SyntaxError('Trailing characters: "'+e+'"');if(0!==h.length)throw new SyntaxError('Unmatched "(" in "'+t+'"');if(0===a.units.length&&!i.allowNoUnits)throw new SyntaxError('"'+e+'" contains no units');return a.value=void 0!==f?a._normalize(f):null,a},N.prototype.clone=function(){var e=new N;e.fixPrefix=this.fixPrefix,e.skipAutomaticSimplification=this.skipAutomaticSimplification,e.value=V(this.value),e.dimensions=this.dimensions.slice(0),e.units=[];for(var t=0;t<this.units.length;t++)for(var r in e.units[t]={},this.units[t])ee(this.units[t],r)&&(e.units[t][r]=this.units[t][r]);return e},N.prototype._isDerived=function(){return 0!==this.units.length&&(this.units.length>1||Math.abs(this.units[0].power-1)>1e-15)},N.prototype._normalize=function(e){var t,r,n,i,a;if(null===e||void 0===e||0===this.units.length)return e;if(this._isDerived()){var o=e;a=N._getNumberConverter(W(e));for(var u=0;u<this.units.length;u++)t=a(this.units[u].unit.value),i=a(this.units[u].prefix.value),n=a(this.units[u].power),o=f(o,d(f(t,i),n));return o}return a=N._getNumberConverter(W(e)),t=a(this.units[0].unit.value),r=a(this.units[0].unit.offset),i=a(this.units[0].prefix.value),f(s(e,r),f(t,i))},N.prototype._denormalize=function(e,t){var r,n,i,a,o;if(null===e||void 0===e||0===this.units.length)return e;if(this._isDerived()){var s=e;o=N._getNumberConverter(W(e));for(var c=0;c<this.units.length;c++)r=o(this.units[c].unit.value),a=o(this.units[c].prefix.value),i=o(this.units[c].power),s=l(s,d(f(r,a),i));return s}return o=N._getNumberConverter(W(e)),r=o(this.units[0].unit.value),a=o(this.units[0].prefix.value),n=o(this.units[0].unit.offset),u(l(l(e,r),void 0===t||null===t?a:t),n)};var B=Pt(e=>{if(ee(F,e)){var t=F[e],r=t.prefixes[""];return{unit:t,prefix:r}}for(var n in F)if(ee(F,n)&&Le(e,n)){var i=F[n],a=e.length-n.length,o=e.substring(0,a),s=ee(i.prefixes,o)?i.prefixes[o]:void 0;if(void 0!==s)return{unit:i,prefix:s}}return null},{hasher:e=>e[0],limit:100});function I(e){return e.equalBase(j.NONE)&&null!==e.value&&!o.predictable?e.value:e}N.isValuelessUnit=function(e){return null!==B(e)},N.prototype.hasBase=function(e){if("string"===typeof e&&(e=j[e]),!e)return!1;for(var t=0;t<P.length;t++)if(Math.abs((this.dimensions[t]||0)-(e.dimensions[t]||0))>1e-12)return!1;return!0},N.prototype.equalBase=function(e){for(var t=0;t<P.length;t++)if(Math.abs((this.dimensions[t]||0)-(e.dimensions[t]||0))>1e-12)return!1;return!0},N.prototype.equals=function(e){return this.equalBase(e)&&v(this.value,e.value)},N.prototype.multiply=function(e){for(var t=this.clone(),r=0;r<P.length;r++)t.dimensions[r]=(this.dimensions[r]||0)+(e.dimensions[r]||0);for(var n=0;n<e.units.length;n++){var i=Zy({},e.units[n]);t.units.push(i)}if(null!==this.value||null!==e.value){var a=null===this.value?this._normalize(1):this.value,o=null===e.value?e._normalize(1):e.value;t.value=f(a,o)}else t.value=null;return t.skipAutomaticSimplification=!1,I(t)},N.prototype.divide=function(e){for(var t=this.clone(),r=0;r<P.length;r++)t.dimensions[r]=(this.dimensions[r]||0)-(e.dimensions[r]||0);for(var n=0;n<e.units.length;n++){var i=Zy(Zy({},e.units[n]),{},{power:-e.units[n].power});t.units.push(i)}if(null!==this.value||null!==e.value){var a=null===this.value?this._normalize(1):this.value,o=null===e.value?e._normalize(1):e.value;t.value=l(a,o)}else t.value=null;return t.skipAutomaticSimplification=!1,I(t)},N.prototype.pow=function(e){for(var t=this.clone(),r=0;r<P.length;r++)t.dimensions[r]=(this.dimensions[r]||0)*e;for(var n=0;n<t.units.length;n++)t.units[n].power*=e;return null!==t.value?t.value=d(t.value,e):t.value=null,t.skipAutomaticSimplification=!1,I(t)},N.prototype.abs=function(){var e=this.clone();for(var t in e.value=null!==e.value?p(e.value):null,e.units)"VA"!==e.units[t].unit.name&&"VAR"!==e.units[t].unit.name||(e.units[t].unit=F.W);return e},N.prototype.to=function(e){var t,r=null===this.value?this._normalize(1):this.value;if("string"===typeof e){if(t=N.parse(e),!this.equalBase(t))throw new Error("Units do not match ('".concat(t.toString(),"' != '").concat(this.toString(),"')"));if(null!==t.value)throw new Error("Cannot convert to a unit with a value");return t.value=V(r),t.fixPrefix=!0,t.skipAutomaticSimplification=!0,t}if(h(e)){if(!this.equalBase(e))throw new Error("Units do not match ('".concat(e.toString(),"' != '").concat(this.toString(),"')"));if(null!==e.value)throw new Error("Cannot convert to a unit with a value");return t=e.clone(),t.value=V(r),t.fixPrefix=!0,t.skipAutomaticSimplification=!0,t}throw new Error("String or Unit expected as parameter")},N.prototype.toNumber=function(e){return S(this.toNumeric(e))},N.prototype.toNumeric=function(e){var t;return t=e?this.to(e):this.clone(),t._isDerived()||0===t.units.length?t._denormalize(t.value):t._denormalize(t.value,t.units[0].prefix.value)},N.prototype.toString=function(){return this.format()},N.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.formatUnits(),fixPrefix:this.fixPrefix}},N.fromJSON=function(e){var t=new N(e.value,e.unit);return t.fixPrefix=e.fixPrefix||!1,t},N.prototype.valueOf=N.prototype.toString,N.prototype.simplify=function(){var e,t,r=this.clone(),n=[];for(var i in $)if(ee($,i)&&r.hasBase(j[i])){e=i;break}if("NONE"===e)r.units=[];else if(e&&ee($,e)&&(t=$[e]),t)r.units=[{unit:t.unit,prefix:t.prefix,power:1}];else{for(var a=!1,o=0;o<P.length;o++){var s=P[o];Math.abs(r.dimensions[o]||0)>1e-12&&(ee($,s)?n.push({unit:$[s].unit,prefix:$[s].prefix,power:r.dimensions[o]||0}):a=!0)}n.length<r.units.length&&!a&&(r.units=n)}return r},N.prototype.toSI=function(){for(var e=this.clone(),t=[],r=0;r<P.length;r++){var n=P[r];if(Math.abs(e.dimensions[r]||0)>1e-12){if(!ee(G.si,n))throw new Error("Cannot express custom unit "+n+" in SI units");t.push({unit:G.si[n].unit,prefix:G.si[n].prefix,power:e.dimensions[r]||0})}}return e.units=t,e.fixPrefix=!0,e.skipAutomaticSimplification=!0,e},N.prototype.formatUnits=function(){for(var e="",t="",r=0,n=0,i=0;i<this.units.length;i++)this.units[i].power>0?(r++,e+=" "+this.units[i].prefix.name+this.units[i].unit.name,Math.abs(this.units[i].power-1)>1e-15&&(e+="^"+this.units[i].power)):this.units[i].power<0&&n++;if(n>0)for(var a=0;a<this.units.length;a++)this.units[a].power<0&&(r>0?(t+=" "+this.units[a].prefix.name+this.units[a].unit.name,Math.abs(this.units[a].power+1)>1e-15&&(t+="^"+-this.units[a].power)):(t+=" "+this.units[a].prefix.name+this.units[a].unit.name,t+="^"+this.units[a].power));e=e.substr(1),t=t.substr(1),r>1&&n>0&&(e="("+e+")"),n>1&&r>0&&(t="("+t+")");var o=e;return r>0&&n>0&&(o+=" / "),o+=t,o},N.prototype.format=function(e){var t=this.skipAutomaticSimplification||null===this.value?this.clone():this.simplify(),r=!1;for(var n in"undefined"!==typeof t.value&&null!==t.value&&c(t.value)&&(r=Math.abs(t.value.re)<1e-14),t.units)ee(t.units,n)&&t.units[n].unit&&("VA"===t.units[n].unit.name&&r?t.units[n].unit=F.VAR:"VAR"!==t.units[n].unit.name||r||(t.units[n].unit=F.VA));1!==t.units.length||t.fixPrefix||Math.abs(t.units[0].power-Math.round(t.units[0].power))<1e-14&&(t.units[0].prefix=t._bestPrefix());var i=t._denormalize(t.value),a=null!==t.value?b(i,e||{}):"",o=t.formatUnits();return t.value&&c(t.value)&&(a="("+a+")"),o.length>0&&a.length>0&&(a+=" "),a+=o,a},N.prototype._bestPrefix=function(){if(1!==this.units.length)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var e=null!==this.value?p(this.value):0,t=p(this.units[0].unit.value),r=this.units[0].prefix;if(0===e)return r;var n=this.units[0].power,i=Math.log(e/Math.pow(r.value*t,n))/Math.LN10-1.2;if(i>-2.200001&&i<1.800001)return r;i=Math.abs(i);var a=this.units[0].unit.prefixes;for(var o in a)if(ee(a,o)){var s=a[o];if(s.scientific){var u=Math.abs(Math.log(e/Math.pow(s.value*t,n))/Math.LN10-1.2);(u<i||u===i&&s.name.length<r.name.length)&&(r=s,i=u)}}return r},N.prototype.splitUnit=function(e){for(var t=this.clone(),r=[],n=0;n<e.length;n++){if(t=t.to(e[n]),n===e.length-1)break;var i=t.toNumeric(),a=g(i),o=void 0,c=v(a,i);o=c?a:m(t.toNumeric());var f=new N(o,e[n].toString());r.push(f),t=u(t,f)}for(var h=0,l=0;l<r.length;l++)h=s(h,r[l].value);return v(h,this.value)&&(t.value=0),r.push(t),r};var q={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!1},h:{name:"h",value:100,scientific:!1},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1e-6,scientific:!0},n:{name:"n",value:1e-9,scientific:!0},p:{name:"p",value:1e-12,scientific:!0},f:{name:"f",value:1e-15,scientific:!0},a:{name:"a",value:1e-18,scientific:!0},z:{name:"z",value:1e-21,scientific:!0},y:{name:"y",value:1e-24,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1e-6,scientific:!0},nano:{name:"nano",value:1e-9,scientific:!0},pico:{name:"pico",value:1e-12,scientific:!0},femto:{name:"femto",value:1e-15,scientific:!0},atto:{name:"atto",value:1e-18,scientific:!0},zepto:{name:"zepto",value:1e-21,scientific:!0},yocto:{name:"yocto",value:1e-24,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1e4,scientific:!1},k:{name:"k",value:1e6,scientific:!0},M:{name:"M",value:1e12,scientific:!0},G:{name:"G",value:1e18,scientific:!0},T:{name:"T",value:1e24,scientific:!0},P:{name:"P",value:1e30,scientific:!0},E:{name:"E",value:1e36,scientific:!0},Z:{name:"Z",value:1e42,scientific:!0},Y:{name:"Y",value:1e48,scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1e-4,scientific:!1},m:{name:"m",value:1e-6,scientific:!0},u:{name:"u",value:1e-12,scientific:!0},n:{name:"n",value:1e-18,scientific:!0},p:{name:"p",value:1e-24,scientific:!0},f:{name:"f",value:1e-30,scientific:!0},a:{name:"a",value:1e-36,scientific:!0},z:{name:"z",value:1e-42,scientific:!0},y:{name:"y",value:1e-48,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1e3,scientific:!1},h:{name:"h",value:1e6,scientific:!1},k:{name:"k",value:1e9,scientific:!0},M:{name:"M",value:1e18,scientific:!0},G:{name:"G",value:1e27,scientific:!0},T:{name:"T",value:1e36,scientific:!0},P:{name:"P",value:1e45,scientific:!0},E:{name:"E",value:1e54,scientific:!0},Z:{name:"Z",value:1e63,scientific:!0},Y:{name:"Y",value:1e72,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1e-6,scientific:!1},m:{name:"m",value:1e-9,scientific:!0},u:{name:"u",value:1e-18,scientific:!0},n:{name:"n",value:1e-27,scientific:!0},p:{name:"p",value:1e-36,scientific:!0},f:{name:"f",value:1e-45,scientific:!0},a:{name:"a",value:1e-54,scientific:!0},z:{name:"z",value:1e-63,scientific:!0},y:{name:"y",value:1e-72,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(1024,8),scientific:!0}},BINARY_LONG_SI:{"":{name:"",value:1,scientific:!0},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:Math.pow(1024,2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};q.SHORTLONG=a()({},q.SHORT,q.LONG),q.BINARY_SHORT=a()({},q.BINARY_SHORT_SI,q.BINARY_SHORT_IEC),q.BINARY_LONG=a()({},q.BINARY_LONG_SI,q.BINARY_LONG_IEC);var P=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],j={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var z in j)ee(j,z)&&(j[z].key=z);var L={},U={name:"",base:L,value:1,offset:0,dimensions:P.map(e=>0)},F={meter:{name:"meter",base:j.LENGTH,prefixes:q.LONG,value:1,offset:0},inch:{name:"inch",base:j.LENGTH,prefixes:q.NONE,value:.0254,offset:0},foot:{name:"foot",base:j.LENGTH,prefixes:q.NONE,value:.3048,offset:0},yard:{name:"yard",base:j.LENGTH,prefixes:q.NONE,value:.9144,offset:0},mile:{name:"mile",base:j.LENGTH,prefixes:q.NONE,value:1609.344,offset:0},link:{name:"link",base:j.LENGTH,prefixes:q.NONE,value:.201168,offset:0},rod:{name:"rod",base:j.LENGTH,prefixes:q.NONE,value:5.0292,offset:0},chain:{name:"chain",base:j.LENGTH,prefixes:q.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:j.LENGTH,prefixes:q.NONE,value:1e-10,offset:0},m:{name:"m",base:j.LENGTH,prefixes:q.SHORT,value:1,offset:0},in:{name:"in",base:j.LENGTH,prefixes:q.NONE,value:.0254,offset:0},ft:{name:"ft",base:j.LENGTH,prefixes:q.NONE,value:.3048,offset:0},yd:{name:"yd",base:j.LENGTH,prefixes:q.NONE,value:.9144,offset:0},mi:{name:"mi",base:j.LENGTH,prefixes:q.NONE,value:1609.344,offset:0},li:{name:"li",base:j.LENGTH,prefixes:q.NONE,value:.201168,offset:0},rd:{name:"rd",base:j.LENGTH,prefixes:q.NONE,value:5.02921,offset:0},ch:{name:"ch",base:j.LENGTH,prefixes:q.NONE,value:20.1168,offset:0},mil:{name:"mil",base:j.LENGTH,prefixes:q.NONE,value:254e-7,offset:0},m2:{name:"m2",base:j.SURFACE,prefixes:q.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:j.SURFACE,prefixes:q.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:j.SURFACE,prefixes:q.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:j.SURFACE,prefixes:q.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:j.SURFACE,prefixes:q.NONE,value:2589988.110336,offset:0},sqrd:{name:"sqrd",base:j.SURFACE,prefixes:q.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:j.SURFACE,prefixes:q.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:j.SURFACE,prefixes:q.NONE,value:6.4516e-10,offset:0},acre:{name:"acre",base:j.SURFACE,prefixes:q.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:j.SURFACE,prefixes:q.NONE,value:1e4,offset:0},m3:{name:"m3",base:j.VOLUME,prefixes:q.CUBIC,value:1,offset:0},L:{name:"L",base:j.VOLUME,prefixes:q.SHORT,value:.001,offset:0},l:{name:"l",base:j.VOLUME,prefixes:q.SHORT,value:.001,offset:0},litre:{name:"litre",base:j.VOLUME,prefixes:q.LONG,value:.001,offset:0},cuin:{name:"cuin",base:j.VOLUME,prefixes:q.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:j.VOLUME,prefixes:q.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:j.VOLUME,prefixes:q.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:j.VOLUME,prefixes:q.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:j.VOLUME,prefixes:q.NONE,value:15e-6,offset:0},drop:{name:"drop",base:j.VOLUME,prefixes:q.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:j.VOLUME,prefixes:q.NONE,value:5e-8,offset:0},minim:{name:"minim",base:j.VOLUME,prefixes:q.NONE,value:6.161152e-8,offset:0},fluiddram:{name:"fluiddram",base:j.VOLUME,prefixes:q.NONE,value:36966911e-13,offset:0},fluidounce:{name:"fluidounce",base:j.VOLUME,prefixes:q.NONE,value:2957353e-11,offset:0},gill:{name:"gill",base:j.VOLUME,prefixes:q.NONE,value:.0001182941,offset:0},cc:{name:"cc",base:j.VOLUME,prefixes:q.NONE,value:1e-6,offset:0},cup:{name:"cup",base:j.VOLUME,prefixes:q.NONE,value:.0002365882,offset:0},pint:{name:"pint",base:j.VOLUME,prefixes:q.NONE,value:.0004731765,offset:0},quart:{name:"quart",base:j.VOLUME,prefixes:q.NONE,value:.0009463529,offset:0},gallon:{name:"gallon",base:j.VOLUME,prefixes:q.NONE,value:.003785412,offset:0},beerbarrel:{name:"beerbarrel",base:j.VOLUME,prefixes:q.NONE,value:.1173478,offset:0},oilbarrel:{name:"oilbarrel",base:j.VOLUME,prefixes:q.NONE,value:.1589873,offset:0},hogshead:{name:"hogshead",base:j.VOLUME,prefixes:q.NONE,value:.238481,offset:0},fldr:{name:"fldr",base:j.VOLUME,prefixes:q.NONE,value:36966911e-13,offset:0},floz:{name:"floz",base:j.VOLUME,prefixes:q.NONE,value:2957353e-11,offset:0},gi:{name:"gi",base:j.VOLUME,prefixes:q.NONE,value:.0001182941,offset:0},cp:{name:"cp",base:j.VOLUME,prefixes:q.NONE,value:.0002365882,offset:0},pt:{name:"pt",base:j.VOLUME,prefixes:q.NONE,value:.0004731765,offset:0},qt:{name:"qt",base:j.VOLUME,prefixes:q.NONE,value:.0009463529,offset:0},gal:{name:"gal",base:j.VOLUME,prefixes:q.NONE,value:.003785412,offset:0},bbl:{name:"bbl",base:j.VOLUME,prefixes:q.NONE,value:.1173478,offset:0},obl:{name:"obl",base:j.VOLUME,prefixes:q.NONE,value:.1589873,offset:0},g:{name:"g",base:j.MASS,prefixes:q.SHORT,value:.001,offset:0},gram:{name:"gram",base:j.MASS,prefixes:q.LONG,value:.001,offset:0},ton:{name:"ton",base:j.MASS,prefixes:q.SHORT,value:907.18474,offset:0},t:{name:"t",base:j.MASS,prefixes:q.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:j.MASS,prefixes:q.LONG,value:1e3,offset:0},grain:{name:"grain",base:j.MASS,prefixes:q.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:j.MASS,prefixes:q.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:j.MASS,prefixes:q.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:j.MASS,prefixes:q.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:j.MASS,prefixes:q.NONE,value:45.359237,offset:0},stick:{name:"stick",base:j.MASS,prefixes:q.NONE,value:.115,offset:0},stone:{name:"stone",base:j.MASS,prefixes:q.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:j.MASS,prefixes:q.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:j.MASS,prefixes:q.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:j.MASS,prefixes:q.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:j.MASS,prefixes:q.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:j.MASS,prefixes:q.NONE,value:45.359237,offset:0},s:{name:"s",base:j.TIME,prefixes:q.SHORT,value:1,offset:0},min:{name:"min",base:j.TIME,prefixes:q.NONE,value:60,offset:0},h:{name:"h",base:j.TIME,prefixes:q.NONE,value:3600,offset:0},second:{name:"second",base:j.TIME,prefixes:q.LONG,value:1,offset:0},sec:{name:"sec",base:j.TIME,prefixes:q.LONG,value:1,offset:0},minute:{name:"minute",base:j.TIME,prefixes:q.NONE,value:60,offset:0},hour:{name:"hour",base:j.TIME,prefixes:q.NONE,value:3600,offset:0},day:{name:"day",base:j.TIME,prefixes:q.NONE,value:86400,offset:0},week:{name:"week",base:j.TIME,prefixes:q.NONE,value:604800,offset:0},month:{name:"month",base:j.TIME,prefixes:q.NONE,value:2629800,offset:0},year:{name:"year",base:j.TIME,prefixes:q.NONE,value:31557600,offset:0},decade:{name:"decade",base:j.TIME,prefixes:q.NONE,value:315576e3,offset:0},century:{name:"century",base:j.TIME,prefixes:q.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:j.TIME,prefixes:q.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:j.FREQUENCY,prefixes:q.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:j.FREQUENCY,prefixes:q.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:j.ANGLE,prefixes:q.SHORT,value:1,offset:0},radian:{name:"radian",base:j.ANGLE,prefixes:q.LONG,value:1,offset:0},deg:{name:"deg",base:j.ANGLE,prefixes:q.SHORT,value:null,offset:0},degree:{name:"degree",base:j.ANGLE,prefixes:q.LONG,value:null,offset:0},grad:{name:"grad",base:j.ANGLE,prefixes:q.SHORT,value:null,offset:0},gradian:{name:"gradian",base:j.ANGLE,prefixes:q.LONG,value:null,offset:0},cycle:{name:"cycle",base:j.ANGLE,prefixes:q.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:j.ANGLE,prefixes:q.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:j.ANGLE,prefixes:q.NONE,value:null,offset:0},A:{name:"A",base:j.CURRENT,prefixes:q.SHORT,value:1,offset:0},ampere:{name:"ampere",base:j.CURRENT,prefixes:q.LONG,value:1,offset:0},K:{name:"K",base:j.TEMPERATURE,prefixes:q.NONE,value:1,offset:0},degC:{name:"degC",base:j.TEMPERATURE,prefixes:q.NONE,value:1,offset:273.15},degF:{name:"degF",base:j.TEMPERATURE,prefixes:q.NONE,value:1/1.8,offset:459.67},degR:{name:"degR",base:j.TEMPERATURE,prefixes:q.NONE,value:1/1.8,offset:0},kelvin:{name:"kelvin",base:j.TEMPERATURE,prefixes:q.NONE,value:1,offset:0},celsius:{name:"celsius",base:j.TEMPERATURE,prefixes:q.NONE,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:j.TEMPERATURE,prefixes:q.NONE,value:1/1.8,offset:459.67},rankine:{name:"rankine",base:j.TEMPERATURE,prefixes:q.NONE,value:1/1.8,offset:0},mol:{name:"mol",base:j.AMOUNT_OF_SUBSTANCE,prefixes:q.SHORT,value:1,offset:0},mole:{name:"mole",base:j.AMOUNT_OF_SUBSTANCE,prefixes:q.LONG,value:1,offset:0},cd:{name:"cd",base:j.LUMINOUS_INTENSITY,prefixes:q.SHORT,value:1,offset:0},candela:{name:"candela",base:j.LUMINOUS_INTENSITY,prefixes:q.LONG,value:1,offset:0},N:{name:"N",base:j.FORCE,prefixes:q.SHORT,value:1,offset:0},newton:{name:"newton",base:j.FORCE,prefixes:q.LONG,value:1,offset:0},dyn:{name:"dyn",base:j.FORCE,prefixes:q.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:j.FORCE,prefixes:q.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:j.FORCE,prefixes:q.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:j.FORCE,prefixes:q.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:j.FORCE,prefixes:q.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:j.FORCE,prefixes:q.NONE,value:9.80665,offset:0},J:{name:"J",base:j.ENERGY,prefixes:q.SHORT,value:1,offset:0},joule:{name:"joule",base:j.ENERGY,prefixes:q.SHORT,value:1,offset:0},erg:{name:"erg",base:j.ENERGY,prefixes:q.NONE,value:1e-7,offset:0},Wh:{name:"Wh",base:j.ENERGY,prefixes:q.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:j.ENERGY,prefixes:q.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:j.ENERGY,prefixes:q.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:j.ENERGY,prefixes:q.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:j.POWER,prefixes:q.SHORT,value:1,offset:0},watt:{name:"watt",base:j.POWER,prefixes:q.LONG,value:1,offset:0},hp:{name:"hp",base:j.POWER,prefixes:q.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:j.POWER,prefixes:q.SHORT,value:M.I,offset:0},VA:{name:"VA",base:j.POWER,prefixes:q.SHORT,value:1,offset:0},Pa:{name:"Pa",base:j.PRESSURE,prefixes:q.SHORT,value:1,offset:0},psi:{name:"psi",base:j.PRESSURE,prefixes:q.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:j.PRESSURE,prefixes:q.NONE,value:101325,offset:0},bar:{name:"bar",base:j.PRESSURE,prefixes:q.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:j.PRESSURE,prefixes:q.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:j.PRESSURE,prefixes:q.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:j.PRESSURE,prefixes:q.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:j.PRESSURE,prefixes:q.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:j.ELECTRIC_CHARGE,prefixes:q.LONG,value:1,offset:0},C:{name:"C",base:j.ELECTRIC_CHARGE,prefixes:q.SHORT,value:1,offset:0},farad:{name:"farad",base:j.ELECTRIC_CAPACITANCE,prefixes:q.LONG,value:1,offset:0},F:{name:"F",base:j.ELECTRIC_CAPACITANCE,prefixes:q.SHORT,value:1,offset:0},volt:{name:"volt",base:j.ELECTRIC_POTENTIAL,prefixes:q.LONG,value:1,offset:0},V:{name:"V",base:j.ELECTRIC_POTENTIAL,prefixes:q.SHORT,value:1,offset:0},ohm:{name:"ohm",base:j.ELECTRIC_RESISTANCE,prefixes:q.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:j.ELECTRIC_INDUCTANCE,prefixes:q.LONG,value:1,offset:0},H:{name:"H",base:j.ELECTRIC_INDUCTANCE,prefixes:q.SHORT,value:1,offset:0},siemens:{name:"siemens",base:j.ELECTRIC_CONDUCTANCE,prefixes:q.LONG,value:1,offset:0},S:{name:"S",base:j.ELECTRIC_CONDUCTANCE,prefixes:q.SHORT,value:1,offset:0},weber:{name:"weber",base:j.MAGNETIC_FLUX,prefixes:q.LONG,value:1,offset:0},Wb:{name:"Wb",base:j.MAGNETIC_FLUX,prefixes:q.SHORT,value:1,offset:0},tesla:{name:"tesla",base:j.MAGNETIC_FLUX_DENSITY,prefixes:q.LONG,value:1,offset:0},T:{name:"T",base:j.MAGNETIC_FLUX_DENSITY,prefixes:q.SHORT,value:1,offset:0},b:{name:"b",base:j.BIT,prefixes:q.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:j.BIT,prefixes:q.BINARY_LONG,value:1,offset:0},B:{name:"B",base:j.BIT,prefixes:q.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:j.BIT,prefixes:q.BINARY_LONG,value:8,offset:0}},H={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fluiddrams:"fluiddram",fluidounces:"fluidounce",gills:"gill",cups:"cup",pints:"pint",quarts:"quart",gallons:"gallon",beerbarrels:"beerbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function Z(e){if("BigNumber"===e.number){var t=Ut(x);F.rad.value=new x(1),F.deg.value=t.div(180),F.grad.value=t.div(200),F.cycle.value=t.times(2),F.arcsec.value=t.div(648e3),F.arcmin.value=t.div(10800)}else F.rad.value=1,F.deg.value=Math.PI/180,F.grad.value=Math.PI/200,F.cycle.value=2*Math.PI,F.arcsec.value=Math.PI/648e3,F.arcmin.value=Math.PI/10800;F.radian.value=F.rad.value,F.degree.value=F.deg.value,F.gradian.value=F.grad.value}Z(o),i&&i("config",(function(e,t){e.number!==t.number&&Z(e)}));var G={si:{NONE:{unit:U,prefix:q.NONE[""]},LENGTH:{unit:F.m,prefix:q.SHORT[""]},MASS:{unit:F.g,prefix:q.SHORT.k},TIME:{unit:F.s,prefix:q.SHORT[""]},CURRENT:{unit:F.A,prefix:q.SHORT[""]},TEMPERATURE:{unit:F.K,prefix:q.SHORT[""]},LUMINOUS_INTENSITY:{unit:F.cd,prefix:q.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:F.mol,prefix:q.SHORT[""]},ANGLE:{unit:F.rad,prefix:q.SHORT[""]},BIT:{unit:F.bits,prefix:q.SHORT[""]},FORCE:{unit:F.N,prefix:q.SHORT[""]},ENERGY:{unit:F.J,prefix:q.SHORT[""]},POWER:{unit:F.W,prefix:q.SHORT[""]},PRESSURE:{unit:F.Pa,prefix:q.SHORT[""]},ELECTRIC_CHARGE:{unit:F.C,prefix:q.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:F.F,prefix:q.SHORT[""]},ELECTRIC_POTENTIAL:{unit:F.V,prefix:q.SHORT[""]},ELECTRIC_RESISTANCE:{unit:F.ohm,prefix:q.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:F.H,prefix:q.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:F.S,prefix:q.SHORT[""]},MAGNETIC_FLUX:{unit:F.Wb,prefix:q.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:F.T,prefix:q.SHORT[""]},FREQUENCY:{unit:F.Hz,prefix:q.SHORT[""]}}};G.cgs=JSON.parse(JSON.stringify(G.si)),G.cgs.LENGTH={unit:F.m,prefix:q.SHORT.c},G.cgs.MASS={unit:F.g,prefix:q.SHORT[""]},G.cgs.FORCE={unit:F.dyn,prefix:q.SHORT[""]},G.cgs.ENERGY={unit:F.erg,prefix:q.NONE[""]},G.us=JSON.parse(JSON.stringify(G.si)),G.us.LENGTH={unit:F.ft,prefix:q.NONE[""]},G.us.MASS={unit:F.lbm,prefix:q.NONE[""]},G.us.TEMPERATURE={unit:F.degF,prefix:q.NONE[""]},G.us.FORCE={unit:F.lbf,prefix:q.NONE[""]},G.us.ENERGY={unit:F.BTU,prefix:q.BTU[""]},G.us.POWER={unit:F.hp,prefix:q.NONE[""]},G.us.PRESSURE={unit:F.psi,prefix:q.NONE[""]},G.auto=JSON.parse(JSON.stringify(G.si));var $=G.auto;for(var K in N.setUnitSystem=function(e){if(!ee(G,e))throw new Error("Unit system "+e+" does not exist. Choices are: "+Object.keys(G).join(", "));$=G[e]},N.getUnitSystem=function(){for(var e in G)if(ee(G,e)&&G[e]===$)return e},N.typeConverters={BigNumber:function(e){return new x(e+"")},Fraction:function(e){return new _(e)},Complex:function(e){return e},number:function(e){return e}},N._getNumberConverter=function(e){if(!N.typeConverters[e])throw new TypeError('Unsupported type "'+e+'"');return N.typeConverters[e]},F)if(ee(F,K)){var J=F[K];J.dimensions=J.base.dimensions}for(var Y in H)if(ee(H,Y)){var X=F[H[Y]],Q={};for(var te in X)ee(X,te)&&(Q[te]=X[te]);Q.name=Y,F[Y]=Q}function re(e){for(var t=0;t<e.length;t++){if(n=e.charAt(t),0===t&&!N.isValidAlpha(n))throw new Error('Invalid unit name (must begin with alpha character): "'+e+'"');if(t>0&&!N.isValidAlpha(n)&&!D(n))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+e+'"')}}return N.isValidAlpha=function(e){return/^[a-zA-Z]$/.test(e)},N.createUnit=function(e,t){if("object"!==typeof e)throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(t&&t.override)for(var r in e)if(ee(e,r)&&N.deleteUnit(r),e[r].aliases)for(var n=0;n<e[r].aliases.length;n++)N.deleteUnit(e[r].aliases[n]);var i;for(var a in e)ee(e,a)&&(i=N.createUnitSingle(a,e[a]));return i},N.createUnitSingle=function(e,t,r){if("undefined"!==typeof t&&null!==t||(t={}),"string"!==typeof e)throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(ee(F,e))throw new Error('Cannot create unit "'+e+'": a unit with that name already exists');re(e);var n,i,a,o=null,s=[],u=0;if(t&&"Unit"===t.type)o=t.clone();else if("string"===typeof t)""!==t&&(n=t);else{if("object"!==typeof t)throw new TypeError('Cannot create unit "'+e+'" from "'+t.toString()+'": expecting "string" or "Unit" or "Object"');n=t.definition,i=t.prefixes,u=t.offset,a=t.baseName,t.aliases&&(s=t.aliases.valueOf())}if(s)for(var c=0;c<s.length;c++)if(ee(F,s[c]))throw new Error('Cannot create alias "'+s[c]+'": a unit with that name already exists');if(n&&"string"===typeof n&&!o)try{o=N.parse(n,{allowNoUnits:!0})}catch(_){throw _.message='Could not create unit "'+e+'" from "'+n+'": '+_.message,_}else n&&"Unit"===n.type&&(o=n.clone());s=s||[],u=u||0,i=i&&i.toUpperCase&&q[i.toUpperCase()]||q.NONE;var f={};if(o){f={name:e,value:o.value,dimensions:o.dimensions.slice(0),prefixes:i,offset:u};var h=!1;for(var l in j)if(ee(j,l)){for(var d=!0,p=0;p<P.length;p++)if(Math.abs((f.dimensions[p]||0)-(j[l].dimensions[p]||0))>1e-12){d=!1;break}if(d){h=!0,f.base=j[l];break}}if(!h){a=a||e+"_STUFF";var m={dimensions:o.dimensions.slice(0)};m.key=a,j[a]=m,$[a]={unit:f,prefix:q.NONE[""]},f.base=j[a]}}else{if(a=a||e+"_STUFF",P.indexOf(a)>=0)throw new Error('Cannot create new base unit "'+e+'": a base unit with that name already exists (and cannot be overridden)');for(var g in P.push(a),j)ee(j,g)&&(j[g].dimensions[P.length-1]=0);for(var v={dimensions:[]},y=0;y<P.length;y++)v.dimensions[y]=0;v.dimensions[P.length-1]=1,v.key=a,j[a]=v,f={name:e,value:1,dimensions:j[a].dimensions.slice(0),prefixes:i,offset:u,base:j[a]},$[a]={unit:f,prefix:q.NONE[""]}}N.UNITS[e]=f;for(var b=0;b<s.length;b++){var w=s[b],M={};for(var x in f)ee(f,x)&&(M[x]=f[x]);M.name=w,N.UNITS[w]=M}return delete B.cache,new N(null,e)},N.deleteUnit=function(e){delete N.UNITS[e]},N.PREFIXES=q,N.BASE_DIMENSIONS=P,N.BASE_UNITS=j,N.UNIT_SYSTEMS=G,N.UNITS=F,N},{isClass:!0}),$y="createUnit",Ky=["typed","Unit"],Jy=bt($y,Ky,e=>{var{typed:t,Unit:r}=e;return t($y,{"Object, Object":function(e,t){return r.createUnit(e,t)},Object:function(e){return r.createUnit(e,{})},"string, Unit | string | Object, Object":function(e,t,n){var i={};return i[e]=t,r.createUnit(i,n)},"string, Unit | string | Object":function(e,t){var n={};return n[e]=t,r.createUnit(n,{})},string:function(e){var t={};return t[e]={},r.createUnit(t,{})}})}),Yy="sqrtm",Xy=["typed","abs","add","multiply","sqrt","subtract","inv","size","max","identity"],Qy=bt(Yy,Xy,e=>{var{typed:t,abs:r,add:n,multiply:i,sqrt:a,subtract:o,inv:s,size:u,max:c,identity:f}=e,h=1e3,l=1e-6;function d(e){var t,a=0,d=e,p=f(u(e));do{var m=d;if(d=i(.5,n(m,s(p))),p=i(.5,n(p,s(m))),t=c(r(o(d,m))),t>l&&++a>h)throw new Error("computing square root of matrix: iterative method could not converge")}while(t>l);return d}return t(Yy,{"Array | Matrix":function(e){var t=p(e)?e.size():Ke(e);switch(t.length){case 1:if(1===t[0])return a(e);throw new RangeError("Matrix must be square (size: "+Ue(t)+")");case 2:var r=t[0],n=t[1];if(r===n)return d(e);throw new RangeError("Matrix must be square (size: "+Ue(t)+")");default:throw new RangeError("Matrix must be at most two dimensional (size: "+Ue(t)+")")}}})}),eb="median",tb=["typed","add","divide","compare","partitionSelect"],rb=bt(eb,tb,e=>{var{typed:t,add:r,divide:n,compare:i,partitionSelect:a}=e;function o(e){try{e=ct(e.valueOf());var t=e.length;if(0===t)throw new Error("Cannot calculate median of an empty array");if(t%2===0){for(var r=t/2-1,n=a(e,r+1),o=e[r],c=0;c<r;++c)i(e[c],o)>0&&(o=e[c]);return u(o,n)}var f=a(e,(t-1)/2);return s(f)}catch(h){throw vm(h,"median")}}var s=t({"number | BigNumber | Complex | Unit":function(e){return e}}),u=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(e,t){return n(r(e,t),2)}});return t(eb,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,t){throw new Error("median(A, dim) is not yet supported")},"...":function(e){if(ri(e))throw new TypeError("Scalar values expected in function median");return o(e)}})}),nb="std",ib=["typed","sqrt","variance"],ab=bt(nb,ib,e=>{var{typed:t,sqrt:r,variance:n}=e;return t(nb,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(e){return i(e)}});function i(e,t){if(0===e.length)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{return r(n.apply(null,arguments))}catch(i){throw i instanceof TypeError&&-1!==i.message.indexOf(" variance")?new TypeError(i.message.replace(" variance"," std")):i}}}),ob="usolve",sb=["typed","matrix","divideScalar","multiplyScalar","subtract","equalScalar","DenseMatrix"],ub=bt(ob,sb,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:i,subtract:a,equalScalar:o,DenseMatrix:s}=e,u=Jg({DenseMatrix:s});return t(ob,{"SparseMatrix, Array | Matrix":function(e,t){return f(e,t)},"DenseMatrix, Array | Matrix":function(e,t){return c(e,t)},"Array, Array | Matrix":function(e,t){var n=r(e),i=c(n,t);return i.valueOf()}});function c(e,t){t=u(e,t,!0);for(var r=t._data,c=e._size[0],f=e._size[1],h=[],l=e._data,d=f-1;d>=0;d--){var p=r[d][0]||0,m=void 0;if(o(p,0))m=0;else{var g=l[d][d];if(o(g,0))throw new Error("Linear system cannot be solved since matrix is singular");m=n(p,g);for(var v=d-1;v>=0;v--)r[v]=[a(r[v][0]||0,i(m,l[v][d]))]}h[d]=[m]}return new s({data:h,size:[c,1]})}function f(e,t){t=u(e,t,!0);for(var r=t._data,c=e._size[0],f=e._size[1],h=e._values,l=e._index,d=e._ptr,p=[],m=f-1;m>=0;m--){var g=r[m][0]||0;if(o(g,0))p[m]=[0];else{for(var v=0,y=[],b=[],w=d[m],M=d[m+1],x=M-1;x>=w;x--){var _=l[x];_===m?v=h[x]:_<m&&(y.push(h[x]),b.push(_))}if(o(v,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var S=n(g,v),N=0,E=b.length;N<E;N++){var A=b[N];r[A]=[a(r[A][0],i(S,y[N]))]}p[m]=[S]}}return new s({data:p,size:[c,1]})}});function cb(e,t){var r,n=t.length,i=[];if(e)for(r=0;r<n;r++)i[e[r]]=t[r];else for(r=0;r<n;r++)i[r]=t[r];return i}var fb="lusolve",hb=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],lb=bt(fb,hb,e=>{var{typed:t,matrix:r,lup:n,slu:i,usolve:a,lsolve:o,DenseMatrix:s}=e,u=Jg({DenseMatrix:s});return t(fb,{"Array, Array | Matrix":function(e,t){e=r(e);var i=n(e),a=f(i.L,i.U,i.p,null,t);return a.valueOf()},"DenseMatrix, Array | Matrix":function(e,t){var r=n(e);return f(r.L,r.U,r.p,null,t)},"SparseMatrix, Array | Matrix":function(e,t){var r=n(e);return f(r.L,r.U,r.p,null,t)},"SparseMatrix, Array | Matrix, number, number":function(e,t,r,n){var a=i(e,r,n);return f(a.L,a.U,a.p,a.q,t)},"Object, Array | Matrix":function(e,t){return f(e.L,e.U,e.p,e.q,t)}});function c(e){if(p(e))return e;if(d(e))return r(e);throw new TypeError("Invalid Matrix LU decomposition")}function f(e,t,r,n,i){e=c(e),t=c(t),r&&(i=u(e,i,!0),i._data=cb(r,i._data));var s=o(e,i),f=a(t,s);return n&&(f._data=cb(n,f._data)),f}});function db(e){var{addScalar:t,subtract:r,flatten:n,multiply:i,multiplyScalar:a,divideScalar:o,sqrt:s,abs:u,bignumber:c,diag:f,inv:h,qr:l,usolve:d,usolveAll:p,equal:m,complex:g,larger:v,smaller:y,matrixFromColumns:b,dot:w}=e;function M(e,t,r,n,a){void 0===a&&(a=!0);var o=x(e,t,r,n,a);_(e,t,r,n,a,o);var s,{values:u,C:c}=S(e,t,r,n,a);return c=i(h(o),c),a&&(s=N(e,t,c,u,r,n),s=b(...s)),{values:u,vectors:s}}function x(e,r,n,i,s){var h,l="BigNumber"===i,d="Complex"===i,p=l?c(0):d?g(0):0,b=l?c(1):d?g(1):1,w=l?c(10):2,M=a(w,w);s&&(h=Array(r).fill(b));var x=!1;while(!x){x=!0;for(var _=0;_<r;_++){for(var S=p,N=p,E=0;E<r;E++)if(_!==E){var A=u(e[_][E]);S=t(S,A),N=t(N,A)}if(!m(S,0)&&!m(N,0)){var D=b,k=S,O=o(N,w),C=a(N,w);while(y(k,O))k=a(k,M),D=a(D,w);while(v(k,C))k=o(k,M),D=o(D,w);var T=y(o(t(k,N),D),a(t(S,N),.95));if(T){x=!1;for(var R=o(1,D),B=0;B<r;B++)_!==B&&(e[_][B]=a(e[_][B],D),e[B][_]=a(e[B][_],R));s&&(h[_]=a(h[_],D))}}}}return f(h)}function _(e,n,i,s,f,h){var l="BigNumber"===s,d="Complex"===s,p=l?c(0):d?g(0):0;l&&(i=c(i));for(var m=0;m<n-2;m++){for(var v=0,b=p,w=m+1;w<n;w++){var M=e[w][m];y(u(b),u(M))&&(b=M,v=w)}if(!y(u(b),i)){if(v!==m+1){var x=e[v];e[v]=e[m+1],e[m+1]=x;for(var _=0;_<n;_++){var S=e[_][v];e[_][v]=e[_][m+1],e[_][m+1]=S}if(f){var N=h[v];h[v]=h[m+1],h[m+1]=N}}for(var E=m+2;E<n;E++){var A=o(e[E][m],b);if(0!==A){for(var D=0;D<n;D++)e[E][D]=r(e[E][D],a(A,e[m+1][D]));for(var k=0;k<n;k++)e[k][m+1]=t(e[k][m+1],a(A,e[k][E]));if(f)for(var O=0;O<n;O++)h[E][O]=r(h[E][O],a(A,h[m+1][O]))}}}}return h}function S(e,n,a,o,s){var h="BigNumber"===o,d="Complex"===o,p=h?c(1):d?g(1):1;h&&(a=c(a));var m=V(e),v=[],b=n,w=[],M=s?f(Array(n).fill(p)):void 0,x=s?f(Array(b).fill(p)):void 0,_=0;while(_<=100){_+=1;for(var S=0,N=0;N<b;N++)m[N][N]=r(m[N][N],S);var{Q:O,R:C}=l(m);m=i(C,O);for(var T=0;T<b;T++)m[T][T]=t(m[T][T],S);if(s&&(x=i(x,O)),1===b||y(u(m[b-1][b-2]),a)){_=0,v.push(m[b-1][b-1]),s&&(w.unshift([[1]]),D(x,n),M=i(M,x),b>1&&(x=f(Array(b-1).fill(p)))),b-=1,m.pop();for(var R=0;R<b;R++)m[R].pop()}else if(2===b||y(u(m[b-2][b-3]),a)){_=0;var B=E(m[b-2][b-2],m[b-2][b-1],m[b-1][b-2],m[b-1][b-1]);v.push(...B),s&&(w.unshift(A(m[b-2][b-2],m[b-2][b-1],m[b-1][b-2],m[b-1][b-1],B[0],B[1],a,o)),D(x,n),M=i(M,x),b>2&&(x=f(Array(b-2).fill(p)))),b-=2,m.pop(),m.pop();for(var I=0;I<b;I++)m[I].pop(),m[I].pop()}if(0===b)break}if(v.sort((e,t)=>+r(u(e),u(t))),_>100){var q=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+v.join(", "));throw q.values=v,q.vectors=[],q}var P=s?i(M,k(w,n)):void 0;return{values:v,C:P}}function N(e,t,a,o,s,u){var l=h(a),d=i(l,e,a),v="BigNumber"===u,y="Complex"===u,b=v?c(0):y?g(0):0,w=v?c(1):y?g(1):1,M=[],x=[];for(var _ of o){var S=O(M,_,m);-1===S?(M.push(_),x.push(1)):x[S]+=1}for(var N=[],E=M.length,A=Array(t).fill(b),D=f(Array(t).fill(w)),k=[],T=0;T<E;T++){var R=M[T],B=r(d,i(R,D)),I=p(B,A);I=I.map(e=>i(a,e)),I.shift();while(I.length<x[T]){var q=C(B,t,I,s,u);if(null==q){k.push(R);break}I.push(q)}N.push(...I.map(e=>n(e)))}if(0!==k.length){var P=new Error("Failed to find eigenvectors for the following eigenvalues: "+k.join(", "));throw P.values=o,P.vectors=N,P}return N}function E(e,n,i,o){var u=t(e,o),c=r(a(e,o),a(n,i)),f=a(u,.5),h=a(s(r(a(u,u),a(4,c))),.5);return[t(f,h),r(f,h)]}function A(e,t,n,i,a,o,s,f){var h="BigNumber"===f,l="Complex"===f,d=h?c(0):l?g(0):0,p=h?c(1):l?g(1):1;if(y(u(n),s))return[[p,d],[d,p]];if(v(u(r(a,o)),s))return[[r(a,i),r(o,i)],[n,n]];var m=r(e,a),b=r(t,a),w=r(n,a),M=r(i,a);return y(u(b),s)?[[m,p],[w,d]]:[[b,d],[M,p]]}function D(e,t){for(var r=0;r<e.length;r++)e[r].push(...Array(t-e[r].length).fill(0));for(var n=e.length;n<t;n++)e.push(Array(t).fill(0)),e[n][n]=1;return e}function k(e,t){for(var r=[],n=0;n<t;n++)r[n]=Array(t).fill(0);var i=0;for(var a of e){for(var o=a.length,s=0;s<o;s++)for(var u=0;u<o;u++)r[i+s][i+u]=a[s][u];i+=o}return r}function O(e,t,r){for(var n=0;n<e.length;n++)if(r(e[n],t))return n;return-1}function C(e,t,r,n,i){var a,o="BigNumber"===i?c(1e3):1e3,s=0;while(1){if(a=T(t,r,i),a=d(e,a),v(B(a),o))break;if(++s>=5)return null}s=0;while(1){var u=d(e,a);if(y(B(R(a,[u])),n))break;if(++s>=10)return null;a=I(u)}return a}function T(e,t,r){var n="BigNumber"===r,i="Complex"===r,a=Array(e).fill(0).map(e=>2*Math.random()-1);return n&&(a=a.map(e=>c(e))),i&&(a=a.map(e=>g(e))),a=R(a,t),I(a,r)}function R(e,t){for(var n of t)e=r(e,i(o(w(n,e),w(n,n)),n));return e}function B(e){return u(s(w(e,e)))}function I(e,t){var r="BigNumber"===t,n="Complex"===t,a=r?c(1):n?g(1):1;return i(o(a,B(e)),e)}return M}function pb(e){var{config:t,addScalar:r,subtract:n,abs:i,atan:a,cos:o,sin:s,multiplyScalar:u,inv:c,bignumber:f,multiply:h,add:l}=e;function d(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.epsilon,i=arguments.length>3?arguments[3]:void 0;if("number"===i)return p(e,n);if("BigNumber"===i)return m(e,n);throw TypeError("Unsupported data type: "+i)}function p(e,t){for(var r,n=e.length,i=Math.abs(t/n),a=new Array(n),o=0;o<n;o++)a[o]=N(n,0),a[o][o]=1;var s=x(e);while(Math.abs(s[1])>=Math.abs(i)){var u=s[0][0],c=s[0][1];r=g(e[u][u],e[c][c],e[u][c]),e=M(e,r,u,c),a=y(a,r,u,c),s=x(e)}for(var f=N(n,0),h=0;h<n;h++)f[h]=e[h][h];return S(V(f),V(a))}function m(e,t){for(var r,n=e.length,a=i(t/n),o=new Array(n),s=0;s<n;s++)o[s]=N(n,0),o[s][s]=1;var u=_(e);while(i(u[1])>=i(a)){var c=u[0][0],f=u[0][1];r=v(e[c][c],e[f][f],e[c][f]),e=w(e,r,c,f),o=b(o,r,c,f),u=_(e)}for(var h=N(n,0),l=0;l<n;l++)h[l]=e[l][l];return S(V(h),V(o))}function g(e,r,n){var i=r-e;return Math.abs(i)<=t.epsilon?Math.PI/4:.5*Math.atan(2*n/(r-e))}function v(e,r,o){var s=n(r,e);return i(s)<=t.epsilon?f(-1).acos().div(4):u(.5,a(h(2,o,c(s))))}function y(e,t,r,n){for(var i=e.length,a=Math.cos(t),o=Math.sin(t),s=N(i,0),u=N(i,0),c=0;c<i;c++)s[c]=a*e[c][r]-o*e[c][n],u[c]=o*e[c][r]+a*e[c][n];for(var f=0;f<i;f++)e[f][r]=s[f],e[f][n]=u[f];return e}function b(e,t,i,a){for(var c=e.length,h=o(t),l=s(t),d=N(c,f(0)),p=N(c,f(0)),m=0;m<c;m++)d[m]=n(u(h,e[m][i]),u(l,e[m][a])),p[m]=r(u(l,e[m][i]),u(h,e[m][a]));for(var g=0;g<c;g++)e[g][i]=d[g],e[g][a]=p[g];return e}function w(e,t,i,a){for(var c=e.length,d=f(o(t)),p=f(s(t)),m=u(d,d),g=u(p,p),v=N(c,f(0)),y=N(c,f(0)),b=h(f(2),d,p,e[i][a]),w=r(n(u(m,e[i][i]),b),u(g,e[a][a])),M=l(u(g,e[i][i]),b,u(m,e[a][a])),x=0;x<c;x++)v[x]=n(u(d,e[i][x]),u(p,e[a][x])),y[x]=r(u(p,e[i][x]),u(d,e[a][x]));e[i][i]=w,e[a][a]=M,e[i][a]=f(0),e[a][i]=f(0);for(var _=0;_<c;_++)_!==i&&_!==a&&(e[i][_]=v[_],e[_][i]=v[_],e[a][_]=y[_],e[_][a]=y[_]);return e}function M(e,t,r,n){for(var i=e.length,a=Math.cos(t),o=Math.sin(t),s=a*a,u=o*o,c=N(i,0),f=N(i,0),h=s*e[r][r]-2*a*o*e[r][n]+u*e[n][n],l=u*e[r][r]+2*a*o*e[r][n]+s*e[n][n],d=0;d<i;d++)c[d]=a*e[r][d]-o*e[n][d],f[d]=o*e[r][d]+a*e[n][d];e[r][r]=h,e[n][n]=l,e[r][n]=0,e[n][r]=0;for(var p=0;p<i;p++)p!==r&&p!==n&&(e[r][p]=c[p],e[p][r]=c[p],e[n][p]=f[p],e[p][n]=f[p]);return e}function x(e){for(var t=e.length,r=0,n=[0,1],i=0;i<t;i++)for(var a=i+1;a<t;a++)Math.abs(r)<Math.abs(e[i][a])&&(r=Math.abs(e[i][a]),n=[i,a]);return[n,r]}function _(e){for(var t=e.length,r=0,n=[0,1],a=0;a<t;a++)for(var o=a+1;o<t;o++)i(r)<i(e[a][o])&&(r=i(e[a][o]),n=[a,o]);return[n,r]}function S(e,t){for(var r=e.length,n=Array(r),a=Array(r),o=0;o<r;o++)a[o]=Array(r);for(var s=0;s<r;s++){for(var u=0,c=e[0],f=0;f<e.length;f++)i(e[f])<i(c)&&(u=f,c=e[u]);n[s]=e.splice(u,1)[0];for(var h=0;h<r;h++)a[h][s]=t[h][u],t[h].splice(u,1)}return{values:n,vectors:a}}function N(e,t){for(var r=new Array(e),n=0;n<e;n++)r[n]=t;return r}return d}var mb="eigs",gb=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],vb=bt(mb,gb,e=>{var{config:t,typed:r,matrix:n,addScalar:i,subtract:a,equal:o,abs:h,atan:l,cos:d,sin:p,multiplyScalar:m,divideScalar:g,inv:v,bignumber:y,multiply:b,add:w,larger:M,column:x,flatten:_,number:S,complex:N,sqrt:E,diag:A,qr:D,usolve:k,usolveAll:O,im:C,re:T,smaller:R,matrixFromColumns:B,dot:I}=e,q=pb({config:t,addScalar:i,subtract:a,column:x,flatten:_,equal:o,abs:h,atan:l,cos:d,sin:p,multiplyScalar:m,inv:v,bignumber:y,complex:N,multiply:b,add:w}),P=db({config:t,addScalar:i,subtract:a,multiply:b,multiplyScalar:m,flatten:_,divideScalar:g,sqrt:E,abs:h,bignumber:y,diag:A,qr:D,inv:v,usolve:k,usolveAll:O,equal:o,complex:N,larger:M,smaller:R,matrixFromColumns:B,dot:I});return r("eigs",{Array:function(e){var t=n(e);return j(t)},"Array, number|BigNumber":function(e,t){var r=n(e);return j(r,t)},Matrix:function(e){var{values:t,vectors:r}=j(e);return{values:n(t),vectors:n(r)}},"Matrix, number|BigNumber":function(e,t){var{values:r,vectors:i}=j(e,t);return{values:n(r),vectors:n(i)}}});function j(e,r){void 0===r&&(r=t.epsilon);var n=e.size();if(2!==n.length||n[0]!==n[1])throw new RangeError("Matrix must be square (size: "+Ue(n)+")");var i=e.toArray(),a=n[0];if(L(i,a,r)&&(U(i,a),z(i,a,r))){var o=F(e,i,a);return q(i,a,r,o)}var s=F(e,i,a);return P(i,a,r,s)}function z(e,t,r){for(var n=0;n<t;n++)for(var i=n;i<t;i++)if(M(y(h(a(e[n][i],e[i][n]))),r))return!1;return!0}function L(e,t,r){for(var n=0;n<t;n++)for(var i=0;i<t;i++)if(M(y(h(C(e[n][i]))),r))return!1;return!0}function U(e,t){for(var r=0;r<t;r++)for(var n=0;n<t;n++)e[r][n]=T(e[r][n])}function F(e,t,r){var n=e.datatype();if("number"===n||"BigNumber"===n||"Complex"===n)return n;for(var i=!1,a=!1,o=!1,h=0;h<r;h++)for(var l=0;l<r;l++){var d=t[h][l];if(s(d)||f(d))i=!0;else if(u(d))a=!0;else{if(!c(d))throw TypeError("Unsupported type in Matrix: "+W(d));o=!0}}if(a&&o&&console.warn("Complex BigNumbers not supported, this operation will lose precission."),o){for(var p=0;p<r;p++)for(var m=0;m<r;m++)t[p][m]=N(t[p][m]);return"Complex"}if(a){for(var g=0;g<r;g++)for(var v=0;v<r;v++)t[g][v]=y(t[g][v]);return"BigNumber"}if(i){for(var b=0;b<r;b++)for(var w=0;w<r;w++)t[b][w]=S(t[b][w]);return"number"}throw TypeError("Matrix contains unsupported types only.")}}),yb="mad",bb=["typed","abs","map","median","subtract"],wb=bt(yb,bb,e=>{var{typed:t,abs:r,map:n,median:i,subtract:a}=e;return t(yb,{"Array | Matrix":o,"...":function(e){return o(e)}});function o(e){if(e=ct(e.valueOf()),0===e.length)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var t=i(e);return i(n(e,(function(e){return r(a(e,t))})))}catch(o){throw o instanceof TypeError&&-1!==o.message.indexOf("median")?new TypeError(o.message.replace("median","mad")):vm(o,"mad")}}}),Mb="unit",xb=["typed","Unit"],_b=bt(Mb,xb,e=>{var{typed:t,Unit:r}=e;return t(Mb,{Unit:function(e){return e.clone()},string:function(e){return r.isValuelessUnit(e)?new r(null,e):r.parse(e,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string":function(e,t){return new r(e,t)},"Array | Matrix":function(e){return ii(e,this)}})}),Sb="intersect",Nb=["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar","flatten"],Eb=bt(Sb,Nb,e=>{var{typed:t,config:r,abs:n,add:i,addScalar:a,matrix:o,multiply:s,multiplyScalar:c,divideScalar:f,subtract:h,smaller:l,equalScalar:d,flatten:p}=e;return t("intersect",{"Array, Array, Array":m,"Array, Array, Array, Array":g,"Matrix, Matrix, Matrix":function(e,t,r){var n=m(e.valueOf(),t.valueOf(),r.valueOf());return null===n?null:o(n)},"Matrix, Matrix, Matrix, Matrix":function(e,t,r,n){var i=g(e.valueOf(),t.valueOf(),r.valueOf(),n.valueOf());return null===i?null:o(i)}});function m(e,t,r){if(e=v(e),t=v(t),r=v(r),!w(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!w(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!M(r))throw new TypeError("Array with 4 numbers expected as third argument");return N(e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2],r[3])}function g(e,t,r,n){if(e=v(e),t=v(t),r=v(r),n=v(n),2===e.length){if(!b(e))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!b(t))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!b(r))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!b(n))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return x(e,t,r,n)}if(3===e.length){if(!w(e))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!w(t))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!w(r))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!w(n))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return S(e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2],n[0],n[1],n[2])}throw new TypeError("Arrays with two or thee dimensional points expected")}function v(e){return 1===e.length?e[0]:e.length>1&&Array.isArray(e[0])&&e.every(e=>Array.isArray(e)&&1===e.length)?p(e):e}function y(e){return"number"===typeof e||u(e)}function b(e){return 2===e.length&&y(e[0])&&y(e[1])}function w(e){return 3===e.length&&y(e[0])&&y(e[1])&&y(e[2])}function M(e){return 4===e.length&&y(e[0])&&y(e[1])&&y(e[2])&&y(e[3])}function x(e,t,o,u){var d=e,p=o,m=h(d,t),g=h(p,u),v=h(c(m[0],g[1]),c(g[0],m[1]));if(l(n(v),r.epsilon))return null;var y=c(g[0],d[1]),b=c(g[1],d[0]),w=c(g[0],p[1]),M=c(g[1],p[0]),x=f(a(h(h(y,b),w),M),v);return i(s(m,x),d)}function _(e,t,r,n,i,o,s,u,f,l,d,p){var m=c(h(e,t),h(r,n)),g=c(h(i,o),h(s,u)),v=c(h(f,l),h(d,p));return a(a(m,g),v)}function S(e,t,r,n,i,o,s,u,l,p,m,g){var v=_(e,s,p,s,t,u,m,u,r,l,g,l),y=_(p,s,n,e,m,u,i,t,g,l,o,r),b=_(e,s,n,e,t,u,i,t,r,l,o,r),w=_(p,s,p,s,m,u,m,u,g,l,g,l),M=_(n,e,n,e,i,t,i,t,o,r,o,r),x=f(h(c(v,y),c(b,w)),h(c(M,w),c(y,y))),S=f(a(v,c(x,y)),w),N=a(e,c(x,h(n,e))),E=a(t,c(x,h(i,t))),A=a(r,c(x,h(o,r))),D=a(s,c(S,h(p,s))),k=a(u,c(S,h(m,u))),O=a(l,c(S,h(g,l)));return d(N,D)&&d(E,k)&&d(A,O)?[N,E,A]:null}function N(e,t,r,n,i,o,s,u,l,d){var p=c(e,s),m=c(n,s),g=c(t,u),v=c(i,u),y=c(r,l),b=c(o,l),w=h(h(h(d,p),g),y),M=h(h(h(a(a(m,v),b),p),g),y),x=f(w,M),_=a(e,c(x,h(n,e))),S=a(t,c(x,h(i,t))),N=a(r,c(x,h(o,r)));return[_,S,N]}}),Ab="norm",Db=["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix","ctranspose","eigs"],kb=bt(Ab,Db,e=>{var{typed:t,abs:r,add:n,pow:i,conj:a,sqrt:o,multiply:s,equalScalar:u,larger:c,smaller:f,matrix:h,ctranspose:l,eigs:d}=e;return t(Ab,{number:Math.abs,Complex:function(e){return e.abs()},BigNumber:function(e){return e.abs()},boolean:function(e){return Math.abs(e)},Array:function(e){return x(h(e),2)},Matrix:function(e){return x(e,2)},"number | Complex | BigNumber | boolean, number | BigNumber | string":function(e){return this(e)},"Array, number | BigNumber | string":function(e,t){return x(h(e),t)},"Matrix, number | BigNumber | string":function(e,t){return x(e,t)}});function p(e){var t=0;return e.forEach((function(e){var n=r(e);c(n,t)&&(t=n)}),!0),t}function m(e){var t;return e.forEach((function(e){var n=r(e);t&&!f(n,t)||(t=n)}),!0),t||0}function g(e,t){if(t===Number.POSITIVE_INFINITY||"inf"===t)return p(e);if(t===Number.NEGATIVE_INFINITY||"-inf"===t)return m(e);if("fro"===t)return x(e,2);if("number"===typeof t&&!isNaN(t)){if(!u(t,0)){var a=0;return e.forEach((function(e){a=n(i(r(e),t),a)}),!0),i(a,1/t)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function v(e){var t=0;return e.forEach((function(e,r){t=n(t,s(e,a(e)))})),r(o(t))}function y(e){var t=[],i=0;return e.forEach((function(e,a){var o=a[1],s=n(t[o]||0,r(e));c(s,i)&&(i=s),t[o]=s}),!0),i}function b(e){var t=e.size();if(t[0]!==t[1])throw new RangeError("Invalid matrix dimensions");var n=l(e),i=s(n,e),a=d(i).values.toArray(),u=a[a.length-1];return r(o(u))}function w(e){var t=[],i=0;return e.forEach((function(e,a){var o=a[0],s=n(t[o]||0,r(e));c(s,i)&&(i=s),t[o]=s}),!0),i}function M(e,t){if(1===t)return y(e);if(t===Number.POSITIVE_INFINITY||"inf"===t)return w(e);if("fro"===t)return v(e);if(2===t)return b(e);throw new Error("Unsupported parameter value "+t)}function x(e,t){var r=e.size();if(1===r.length)return g(e,t);if(2===r.length){if(r[0]&&r[1])return M(e,t);throw new RangeError("Invalid matrix dimensions")}}}),Ob="rotationMatrix",Cb=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],Tb=bt(Ob,Cb,e=>{var{typed:t,config:r,multiplyScalar:n,addScalar:i,unaryMinus:a,norm:o,BigNumber:s,matrix:c,DenseMatrix:f,SparseMatrix:h,cos:l,sin:d}=e;return t(Ob,{"":function(){return"Matrix"===r.matrix?c([]):[]},string:function(e){return c(e)},"number | BigNumber | Complex | Unit":function(e){return p(e,"Matrix"===r.matrix?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(e,t){return p(e,t)},"number | BigNumber | Complex | Unit, Array":function(e,t){var r=c(t);return m(r),y(e,r,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(e,t){m(t);var n=t.storage()||("Matrix"===r.matrix?"dense":void 0);return y(e,t,n)},"number | BigNumber | Complex | Unit, Array, string":function(e,t,r){var n=c(t);return m(n),y(e,n,r)},"number | BigNumber | Complex | Unit, Matrix, string":function(e,t,r){return m(t),y(e,t,r)}});function p(e,t){var r=u(e),i=r?new s(-1):-1,a=l(e),o=d(e),c=[[a,n(i,o)],[o,a]];return v(c,t)}function m(e){var t=e.size();if(t.length<1||3!==t[0])throw new RangeError("Vector must be of dimensions 1x3")}function g(e){return e.reduce((e,t)=>n(e,t))}function v(e,t){if(t){if("sparse"===t)return new h(e);if("dense"===t)return new f(e);throw new TypeError('Unknown matrix type "'.concat(t,'"'))}return e}function y(e,t,r){var n=o(t);if(0===n)throw new RangeError("Rotation around zero vector");var c=u(e)?s:null,f=c?new c(1):1,h=c?new c(-1):-1,p=c?new c(t.get([0])/n):t.get([0])/n,m=c?new c(t.get([1])/n):t.get([1])/n,y=c?new c(t.get([2])/n):t.get([2])/n,b=l(e),w=i(f,a(b)),M=d(e),x=i(b,g([p,p,w])),_=i(g([p,m,w]),g([h,y,M])),S=i(g([p,y,w]),g([m,M])),N=i(g([p,m,w]),g([y,M])),E=i(b,g([m,m,w])),A=i(g([m,y,w]),g([h,p,M])),D=i(g([p,y,w]),g([h,m,M])),k=i(g([m,y,w]),g([p,M])),O=i(b,g([y,y,w])),C=[[x,_,S],[N,E,A],[D,k,O]];return v(C,r)}}),Rb="rotate",Bb=["typed","multiply","rotationMatrix"],Ib=bt(Rb,Bb,e=>{var{typed:t,multiply:r,rotationMatrix:n}=e;return t(Rb,{"Array , number | BigNumber | Complex | Unit":function(e,t){i(e,2);var a=r(n(t),e);return a.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(e,t){return i(e,2),r(n(t),e)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(e,t,a){i(e,3);var o=r(n(t,a),e);return o},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(e,t,a){return i(e,3),r(n(t,a),e)}});function i(e,t){var r=Array.isArray(e)?Ke(e):e.size();if(r.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(t));if(2===r.length&&1!==r[1])throw new RangeError("Vector must be of dimensions 1x".concat(t));if(r[0]!==t)throw new RangeError("Vector must be of dimensions 1x".concat(t))}}),qb="multinomial",Pb=["typed","add","divide","multiply","factorial","isInteger","isPositive"],jb=bt(qb,Pb,e=>{var{typed:t,add:r,divide:n,multiply:i,factorial:a,isInteger:o,isPositive:s}=e;return t(qb,{"Array | Matrix":function(e){var t=0,u=1;return ni(e,(function(e){if(!o(e)||!s(e))throw new TypeError("Positive integer value expected in function multinomial");t=r(t,e),u=i(u,a(e))})),n(a(t),u)}})}),zb=Et({}),Lb=Ct({}),Ub=Bt({}),Fb=Kt({}),Hb=Jt({}),Zb=$t({}),Wb=yr({config:ce}),Vb=Mr({}),Gb=Sr({}),$b=cr({Complex:Lb}),Kb=ir({BigNumber:Wb,config:ce}),Jb=or({BigNumber:Wb,config:ce}),Yb=Xt({BigNumber:Wb,config:ce}),Xb=Qt({BigNumber:Wb,config:ce}),Qb=sr({BigNumber:Wb,config:ce}),ew=er({BigNumber:Wb,config:ce}),tw=Qr({BigNumber:Wb,config:ce}),rw=Zr({BigNumber:Wb,config:ce}),nw=fn({BigNumber:Wb,config:ce}),iw=Xr({BigNumber:Wb,config:ce}),aw=Dn({}),ow=tr({BigNumber:Wb,config:ce}),sw=Yt({BigNumber:Wb,config:ce}),uw=ar({BigNumber:Wb,config:ce}),cw=lr({}),fw=Cn({Matrix:Vb}),hw=rr({BigNumber:Wb,config:ce}),lw=Yn({BigNumber:Wb,Complex:Lb,DenseMatrix:fw,Fraction:aw}),dw=hi({typed:lw}),pw=pi({typed:lw}),mw=_i({typed:lw}),gw=Ei({typed:lw}),vw=Ci({config:ce,typed:lw}),yw=qi({typed:lw}),bw=zi({typed:lw}),ww=Fi({Complex:Lb,typed:lw}),Mw=Wi({typed:lw}),xw=Na({BigNumber:Wb,config:ce,typed:lw}),_w=Da({isInteger:dw,typed:lw}),Sw=Ra({typed:lw}),Nw=qa({Complex:Lb,typed:lw}),Ew=za({Complex:Lb,config:ce,typed:lw}),Aw=Fa({typed:lw}),Dw=Wa({BigNumber:Wb,Fraction:aw,complex:ww,typed:lw}),kw=$a({typed:lw}),Ow=mo({typed:lw}),Cw=yo({typed:lw}),Tw=Mo({typed:lw}),Rw=Oo({typed:lw}),Bw=Ro({typed:lw}),Iw=Po({typed:lw}),qw=Uo({typed:lw}),Pw=Wo({typed:lw}),jw=Qo({typed:lw}),zw=rs({format:jw,typed:lw}),Lw=as({typed:lw}),Uw=cs({typed:lw}),Fw=ls({Complex:Lb,config:ce,typed:lw}),Hw=Fs({BigNumber:Wb,typed:lw}),Zw=Ws({BigNumber:Wb,Complex:Lb,config:ce,typed:lw}),Ww=$s({BigNumber:Wb,Complex:Lb,config:ce,typed:lw}),Vw=Ys({Complex:Lb,config:ce,typed:lw}),Gw=eu({typed:lw}),$w=nu({Complex:Lb,config:ce,typed:lw}),Kw=ou({typed:lw}),Jw=cu({BigNumber:Wb,typed:lw}),Yw=lu({BigNumber:Wb,typed:lw}),Xw=mu({BigNumber:Wb,typed:lw}),Qw=yu({typed:lw}),eM=Mu({typed:lw}),tM=Eu({typed:lw}),rM=Bu({config:ce,typed:lw}),nM=ju({config:ce,typed:lw}),iM=nr({BigNumber:Wb,config:ce}),aM=Uu({typed:lw}),oM=Zu({isNumeric:pw,typed:lw}),sM=Gu({typed:lw}),uM=Ju({typed:lw}),cM=Qu({Fraction:aw,typed:lw}),fM=rc({typed:lw}),hM=ac({typed:lw}),lM=uc({typed:lw}),dM=hc({Complex:Lb,config:ce,typed:lw}),pM=pc({Complex:Lb,config:ce,typed:lw}),mM=vc({typed:lw}),gM=wc({typed:lw}),vM=_c({isNaN:gw,isNumeric:pw,typed:lw}),yM=Ec({format:jw,typed:lw}),bM=kc({Complex:Lb,config:ce,typed:lw}),wM=Tc({BigNumber:Wb,typed:lw}),MM=Ic({typed:lw}),xM=jc({typed:lw}),_M=Uc({BigNumber:Wb,typed:lw}),SM=Zc({typed:lw}),NM=Gc({typed:lw}),EM=Yc({config:ce,typed:lw}),AM=ur({BigNumber:Wb,config:ce}),DM=ef({typed:lw}),kM=nf({Matrix:Vb,equalScalar:vw,typed:lw}),OM=sf({DenseMatrix:fw,Matrix:Vb,SparseMatrix:kM,typed:lw}),CM=ff({typed:lw}),TM=Df({BigNumber:Wb,DenseMatrix:fw,equalScalar:vw,matrix:OM,typed:lw}),RM=Vf({DenseMatrix:fw,equalScalar:vw,matrix:OM,typed:lw}),BM=Xf({BigNumber:Wb,equalScalar:vw,matrix:OM,typed:lw}),IM=th({BigNumber:Wb,config:ce,matrix:OM,typed:lw}),qM=ih({equalScalar:vw,matrix:OM,typed:lw}),PM=fh({DenseMatrix:fw,matrix:OM,typed:lw}),jM=dh({DenseMatrix:fw,equalScalar:vw,matrix:OM,typed:lw}),zM=gh({isInteger:dw,matrix:OM,typed:lw}),LM=wh({DenseMatrix:fw,SparseMatrix:kM,matrix:OM,typed:lw}),UM=_h({BigNumber:Wb,DenseMatrix:fw,SparseMatrix:kM,config:ce,matrix:OM,typed:lw}),FM=Eh({BigNumber:Wb,config:ce,matrix:OM,typed:lw}),HM=kh({isInteger:dw,matrix:OM,typed:lw}),ZM=Ih({matrix:OM,config:ce,typed:lw}),WM=jh({matrix:OM,typed:lw}),VM=Wh({BigNumber:Wb,config:ce,matrix:OM,typed:lw}),GM=$h({format:jw,typed:lw}),$M=rl({BigNumber:Wb,DenseMatrix:fw,equalScalar:vw,matrix:OM,typed:lw,zeros:VM}),KM=cl({DenseMatrix:fw,equalScalar:vw,matrix:OM,typed:lw,zeros:VM}),JM=ll({DenseMatrix:fw,equalScalar:vw,matrix:OM,typed:lw,zeros:VM}),YM=ml({BigNumber:Wb,DenseMatrix:fw,Fraction:aw,config:ce,equalScalar:vw,matrix:OM,typed:lw}),XM=yl({matrix:OM,typed:lw}),QM=Ml({DenseMatrix:fw,config:ce,matrix:OM,typed:lw}),ex=Sl({DenseMatrix:fw,config:ce,matrix:OM,typed:lw}),tx=Al({DenseMatrix:fw,config:ce,equalScalar:vw,matrix:OM,typed:lw}),rx=Ol({DenseMatrix:fw,smaller:QM}),nx=Rl({larger:ex,smaller:QM}),ix=ql({SparseMatrix:kM,typed:lw}),ax=zl({BigNumber:Wb,Complex:Lb,config:ce,typed:lw}),ox=Wl({BigNumber:Wb,DenseMatrix:fw,equalScalar:vw,matrix:OM,typed:lw}),sx=$l({BigNumber:Wb,typed:lw}),ux=Yl({DenseMatrix:fw,SparseMatrix:kM,addScalar:hM,equalScalar:vw,matrix:OM,typed:lw}),cx=ed({addScalar:hM,conj:mM,multiplyScalar:Aw,size:ZM,typed:lw}),fx=nd({addScalar:hM,combinations:tM,isInteger:dw,isNegative:DM,isPositive:mw,larger:ex,typed:lw}),hx=od({typed:lw}),lx=cd({isZero:hx,matrix:OM,typed:lw}),dx=ld({BigNumber:Wb,Complex:Lb,Fraction:aw,config:ce,isNegative:DM,matrix:OM,typed:lw,unaryMinus:fM}),px=md({config:ce,equalScalar:vw,matrix:OM,round:$M,typed:lw}),mx=yd({addScalar:hM,dot:cx,equalScalar:vw,matrix:OM,multiplyScalar:Aw,typed:lw}),gx=Md({equalScalar:vw,matrix:OM,multiplyScalar:Aw,typed:lw}),vx=Sd({typed:lw}),yx=Ad({matrix:OM,typed:lw}),bx=Cd({config:ce,matrix:OM}),wx=Bd({matrix:OM,typed:lw}),Mx=Pd({matrix:OM,typed:lw}),xx=Ld({Complex:Lb,config:ce,fraction:cM,identity:UM,matrix:OM,multiply:mx,number:yw,typed:lw}),_x=Hd({DenseMatrix:fw,equalScalar:vw,matrix:OM,pow:xx,typed:lw}),Sx=Vd({DenseMatrix:fw,equalScalar:vw,matrix:OM,typed:lw,zeros:VM}),Nx=Yd({compare:YM,typed:lw}),Ex=tp({compareText:XM,isZero:hx,typed:lw}),Ax=ip({DenseMatrix:fw,config:ce,matrix:OM,typed:lw}),Dx=sp({compare:YM,isNaN:gw,isNumeric:pw,typed:lw}),kx=fp({ImmutableDenseMatrix:rx}),Ox=dp({BigNumber:Wb,Complex:Lb,config:ce,typed:lw}),Cx=gp({typed:lw}),Tx=bp({DenseMatrix:fw,Index:kx,compareNatural:Nx,size:ZM,subset:WM,typed:lw}),Rx=xp({DenseMatrix:fw,Index:kx,compareNatural:Nx,size:ZM,subset:WM,typed:lw}),Bx=Np({Index:kx,compareNatural:Nx,size:ZM,subset:WM,typed:lw}),Ix=Dp({compareNatural:Nx,typed:lw}),qx=Cp({add:ux,matrix:OM,typed:lw}),Px=Bp({add:ux,compare:YM,multiply:mx,partitionSelect:Dx,typed:lw}),jx=Lp({BigNumber:Wb,Complex:Lb,config:ce,multiplyScalar:Aw,pow:xx,typed:lw}),zx=Hp({BigNumber:Wb,typed:lw}),Lx=Vp({flatten:yx,matrix:OM,size:ZM,typed:lw}),Ux=Kp({equalScalar:vw,matrix:OM,typed:lw}),Fx=Xp({DenseMatrix:fw,equalScalar:vw,matrix:OM,typed:lw}),Hx=tm({matrix:OM,multiplyScalar:Aw,typed:lw}),Zx=im({matrix:OM,typed:lw}),Wx=sm({bignumber:zx,fraction:cM,number:yw}),Vx=fm({equalScalar:vw,matrix:OM,not:Rw,typed:lw,zeros:VM}),Gx=dm({DenseMatrix:fw,config:ce,matrix:OM,typed:lw}),$x=gm({compare:YM,compareNatural:Nx,matrix:OM,typed:lw}),Kx=wm({config:ce,numeric:Wx,smaller:QM,typed:lw}),Jx=_m({BigNumber:Wb,typed:lw}),Yx=Em({DenseMatrix:fw,Index:kx,compareNatural:Nx,size:ZM,subset:WM,typed:lw}),Xx=km({Index:kx,compareNatural:Nx,size:ZM,subset:WM,typed:lw}),Qx=Tm({Index:kx,typed:lw}),e_=Im({add:ux,config:ce,numeric:Wx,typed:lw}),t_=jm({gamma:jx,typed:lw}),r_=Um({factorial:t_,typed:lw}),n_=Wm({flatten:yx,matrix:OM,size:ZM,typed:lw}),i_=$m({DenseMatrix:fw,addScalar:hM,equalScalar:vw,matrix:OM,typed:lw,unaryMinus:fM}),a_=Xm({matrix:OM,multiply:mx,subtract:i_,typed:lw}),o_=tg({bignumber:zx,matrix:OM,config:ce,larger:ex,largerEq:Ax,smaller:QM,smallerEq:Gx,typed:lw}),s_=ig({Index:kx,matrix:OM,range:o_,typed:lw}),u_=sg({config:ce,multiplyScalar:Aw,numeric:Wx,typed:lw}),c_=fg({DenseMatrix:fw,equalScalar:vw,matrix:OM,typed:lw}),f_=dg({config:ce,larger:ex,numeric:Wx,typed:lw}),h_=gg({DenseMatrix:fw,Index:kx,compareNatural:Nx,size:ZM,subset:WM,typed:lw}),l_=bg({Index:kx,concat:zM,setDifference:Tx,size:ZM,subset:WM,typed:lw}),d_=xg({config:ce,equalScalar:vw,matrix:OM,round:$M,typed:lw}),p_=Ng({DenseMatrix:fw,matrix:OM,typed:lw}),m_=Dg({prod:u_,size:ZM,typed:lw}),g_=Cg({conj:mM,transpose:Zx,typed:lw}),v_=Bg({equal:c_,typed:lw}),y_=Pg({Index:kx,compareNatural:Nx,size:ZM,subset:WM,typed:lw}),b_=Lg({Complex:Lb,ceil:d_,floor:px,matrix:OM,typed:lw}),w_=Hg({matrix:OM,number:yw,subtract:i_,typed:lw}),M_=Vg({numeric:Wx,typed:lw}),x_=Kg({Complex:Lb,config:ce,divideScalar:M_,typed:lw}),__=Qg({DenseMatrix:fw,divideScalar:M_,equalScalar:vw,matrix:OM,multiplyScalar:Aw,subtract:i_,typed:lw}),S_=rv({DenseMatrix:fw,divideScalar:M_,equalScalar:vw,matrix:OM,multiplyScalar:Aw,subtract:i_,typed:lw}),N_=av({FibonacciHeap:nx,addScalar:hM,equalScalar:vw}),E_=uv({Index:kx,concat:zM,setIntersect:Rx,setSymDifference:l_,size:ZM,subset:WM,typed:lw}),A_=hv({DenseMatrix:fw,Spa:N_,SparseMatrix:kM,abs:CM,addScalar:hM,divideScalar:M_,equalScalar:vw,larger:ex,matrix:OM,multiplyScalar:Aw,subtract:i_,typed:lw,unaryMinus:fM}),D_=Uv({SparseMatrix:kM,abs:CM,add:ux,divideScalar:M_,larger:ex,largerEq:Ax,multiply:mx,subtract:i_,transpose:Zx,typed:lw}),k_=Zv({lup:A_,matrix:OM,multiply:mx,subtract:i_,typed:lw,unaryMinus:fM}),O_=Gv({abs:CM,addScalar:hM,divideScalar:M_,multiplyScalar:Aw,sqrt:pM,subtract:i_,typed:lw,unaryMinus:fM}),C_=Jv({addScalar:hM,combinations:tM,divideScalar:M_,factorial:t_,isInteger:dw,isNegative:DM,larger:ex,multiplyScalar:Aw,pow:xx,subtract:i_,typed:lw}),T_=Qv({addScalar:hM,combinations:tM,divideScalar:M_,isInteger:dw,isNegative:DM,multiplyScalar:Aw,typed:lw}),R_=ry({Index:kx,matrix:OM,range:o_,typed:lw}),B_=ay({Complex:Lb,config:ce,divideScalar:M_,typed:lw}),I_=uy({DenseMatrix:fw,divideScalar:M_,equalScalar:vw,matrix:OM,typed:lw}),q_=hy({DenseMatrix:fw,divideScalar:M_,equalScalar:vw,matrix:OM,multiplyScalar:Aw,subtract:i_,typed:lw}),P_=py({abs:CM,addScalar:hM,divideScalar:M_,isPositive:mw,multiplyScalar:Aw,smaller:QM,sqrt:pM,typed:lw}),j_=vy({addScalar:hM,complex:ww,conj:mM,divideScalar:M_,equal:c_,identity:UM,isZero:hx,matrix:OM,multiplyScalar:Aw,sign:Dw,sqrt:pM,subtract:i_,typed:lw,unaryMinus:fM,zeros:VM}),z_=wy({abs:CM,addScalar:hM,det:k_,divideScalar:M_,identity:UM,matrix:OM,multiply:mx,typed:lw,unaryMinus:fM}),L_=_y({abs:CM,add:ux,identity:UM,inv:z_,multiply:mx,typed:lw}),U_=Ey({divideScalar:M_,equalScalar:vw,inv:z_,matrix:OM,multiply:mx,typed:lw}),F_=ky({add:ux,divide:U_,typed:lw}),H_=Ry({add:ux,apply:_w,divide:U_,isNaN:gw,multiply:mx,subtract:i_,typed:lw}),Z_=qy({divide:U_,dotDivide:I_,isNumeric:pw,log:B_,matrix:OM,multiply:mx,sum:e_,typed:lw}),W_=zy({addScalar:hM,isInteger:dw,isNegative:DM,stirlingS2:C_,typed:lw}),V_=Fy({Complex:Lb,config:ce,divideScalar:M_,log:B_,typed:lw}),G_=Gy({BigNumber:Wb,Complex:Lb,Fraction:aw,abs:CM,addScalar:hM,config:ce,divideScalar:M_,equal:c_,fix:b_,format:jw,isNumeric:pw,multiplyScalar:Aw,number:yw,pow:xx,round:$M,subtract:i_}),$_=Jy({Unit:G_,typed:lw}),K_=Qy({abs:CM,add:ux,identity:UM,inv:z_,max:f_,multiply:mx,size:ZM,sqrt:pM,subtract:i_,typed:lw}),J_=rb({add:ux,compare:YM,divide:U_,partitionSelect:Dx,typed:lw}),Y_=ab({sqrt:pM,typed:lw,variance:H_}),X_=en({BigNumber:Wb,Unit:G_,config:ce}),Q_=Br({BigNumber:Wb,Unit:G_,config:ce}),eS=rn({BigNumber:Wb,Unit:G_,config:ce}),tS=Ir({BigNumber:Wb,Unit:G_,config:ce}),rS=Gr({BigNumber:Wb,Unit:G_,config:ce}),nS=Fr({BigNumber:Wb,Unit:G_,config:ce}),iS=nn({BigNumber:Wb,Unit:G_,config:ce}),aS=an({BigNumber:Wb,Unit:G_,config:ce}),oS=Er({BigNumber:Wb,Unit:G_,config:ce}),sS=Wr({BigNumber:Wb,Unit:G_,config:ce}),uS=zr({BigNumber:Wb,Unit:G_,config:ce}),cS=kr({BigNumber:Wb,Unit:G_,config:ce}),fS=pn({BigNumber:Wb,Unit:G_,config:ce}),hS=un({BigNumber:Wb,Unit:G_,config:ce}),lS=$r({BigNumber:Wb,Unit:G_,config:ce}),dS=wn({BigNumber:Wb,Unit:G_,config:ce}),pS=vn({BigNumber:Wb,Unit:G_,config:ce}),mS=Mn({BigNumber:Wb,Unit:G_,config:ce}),gS=Vr({BigNumber:Wb,Unit:G_,config:ce}),vS=Dr({BigNumber:Wb,Unit:G_,config:ce}),yS=hn({BigNumber:Wb,Unit:G_,config:ce}),bS=ln({BigNumber:Wb,Unit:G_,config:ce}),wS=Cr({BigNumber:Wb,Unit:G_,config:ce}),MS=ub({DenseMatrix:fw,divideScalar:M_,equalScalar:vw,matrix:OM,multiplyScalar:Aw,subtract:i_,typed:lw}),xS=lb({DenseMatrix:fw,lsolve:__,lup:A_,matrix:OM,slu:D_,typed:lw,usolve:MS}),_S=vb({abs:CM,add:ux,addScalar:hM,atan:Gw,bignumber:zx,column:R_,complex:ww,config:ce,cos:xM,diag:LM,divideScalar:M_,dot:cx,equal:c_,flatten:yx,im:Tw,inv:z_,larger:ex,matrix:OM,matrixFromColumns:Lx,multiply:mx,multiplyScalar:Aw,number:yw,qr:j_,re:vx,sin:SM,smaller:QM,sqrt:pM,subtract:i_,typed:lw,usolve:MS,usolveAll:q_}),SS=wb({abs:CM,map:qw,median:J_,subtract:i_,typed:lw}),NS=tn({BigNumber:Wb,Unit:G_,config:ce}),ES=Ur({BigNumber:Wb,Unit:G_,config:ce}),AS=Or({BigNumber:Wb,Unit:G_,config:ce}),DS=Hr({BigNumber:Wb,Unit:G_,config:ce}),kS=gn({BigNumber:Wb,Unit:G_,config:ce}),OS=on({BigNumber:Wb,Unit:G_,config:ce}),CS=mn({BigNumber:Wb,Unit:G_,config:ce}),TS=jr({BigNumber:Wb,Unit:G_,config:ce}),RS=yn({BigNumber:Wb,Unit:G_,config:ce}),BS=Kr({BigNumber:Wb,Unit:G_,config:ce}),IS=Nr({BigNumber:Wb,Unit:G_,config:ce}),qS=dn({BigNumber:Wb,Unit:G_,config:ce}),PS=_b({Unit:G_,typed:lw}),jS=Eb({abs:CM,add:ux,addScalar:hM,config:ce,divideScalar:M_,equalScalar:vw,flatten:yx,matrix:OM,multiply:mx,multiplyScalar:Aw,smaller:QM,subtract:i_,typed:lw}),zS=Tr({BigNumber:Wb,Unit:G_,config:ce}),LS=sn({BigNumber:Wb,Unit:G_,config:ce}),US=Pr({BigNumber:Wb,Unit:G_,config:ce}),FS=Ar({BigNumber:Wb,Unit:G_,config:ce}),HS=Jr({BigNumber:Wb,Unit:G_,config:ce}),ZS=kb({abs:CM,add:ux,conj:mM,ctranspose:g_,eigs:_S,equalScalar:vw,larger:ex,matrix:OM,multiply:mx,pow:xx,smaller:QM,sqrt:pM,typed:lw}),WS=Rr({BigNumber:Wb,Unit:G_,config:ce}),VS=cn({BigNumber:Wb,Unit:G_,config:ce}),GS=Yr({BigNumber:Wb,Unit:G_,config:ce}),$S=Tb({BigNumber:Wb,DenseMatrix:fw,SparseMatrix:kM,addScalar:hM,config:ce,cos:xM,matrix:OM,multiplyScalar:Aw,norm:ZS,sin:SM,typed:lw,unaryMinus:fM}),KS=Lr({BigNumber:Wb,Unit:G_,config:ce}),JS=bn({BigNumber:Wb,Unit:G_,config:ce}),YS=Ib({multiply:mx,rotationMatrix:$S,typed:lw}),XS=jb({add:ux,divide:U_,factorial:t_,isInteger:dw,isPositive:mw,multiply:mx,typed:lw}),QS=qr({BigNumber:Wb,Unit:G_,config:ce}),eN=new Set(["end"]),tN="Node",rN=["mathWithTransform"],nN=bt(tN,rN,e=>{var{mathWithTransform:t}=e;function r(){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator")}function n(e){for(var t of[...eN])if(e.has(t))throw new Error('Scope contains an illegal symbol, "'+t+'" is a reserved keyword')}return r.prototype.evaluate=function(e){return this.compile().evaluate(e)},r.prototype.type="Node",r.prototype.isNode=!0,r.prototype.comment="",r.prototype.compile=function(){var e=this._compile(t,{}),r={},i=null;function a(t){var a=Wn(t);return n(a),e(a,r,i)}return{evaluate:a}},r.prototype._compile=function(e,t){throw new Error("Method _compile should be implemented by type "+this.type)},r.prototype.forEach=function(e){throw new Error("Cannot run forEach on a Node interface")},r.prototype.map=function(e){throw new Error("Cannot run map on a Node interface")},r.prototype._ifNode=function(e){if(!j(e))throw new TypeError("Callback function must return a Node");return e},r.prototype.traverse=function(e){function t(e,r){e.forEach((function(e,n,i){r(e,n,i),t(e,r)}))}e(this,null,null),t(this,e)},r.prototype.transform=function(e){function t(r,n,i){var a=e(r,n,i);return a!==r?a:r.map(t)}return t(this,null,null)},r.prototype.filter=function(e){var t=[];return this.traverse((function(r,n,i){e(r,n,i)&&t.push(r)})),t},r.prototype.clone=function(){throw new Error("Cannot clone a Node interface")},r.prototype.cloneDeep=function(){return this.map((function(e){return e.cloneDeep()}))},r.prototype.equals=function(e){return!!e&&J(this,e)},r.prototype.toString=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this._toString(e)},r.prototype.toJSON=function(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)},r.prototype.toHTML=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this.toHTML(e)},r.prototype._toString=function(){throw new Error("_toString not implemented for "+this.type)},r.prototype.toTex=function(e){var t=this._getCustomString(e);return"undefined"!==typeof t?t:this._toTex(e)},r.prototype._toTex=function(e){throw new Error("_toTex not implemented for "+this.type)},r.prototype._getCustomString=function(e){if(e&&"object"===typeof e)switch(typeof e.handler){case"object":case"undefined":return;case"function":return e.handler(this,e);default:throw new TypeError("Object or function expected as callback")}},r.prototype.getIdentifier=function(){return this.type},r.prototype.getContent=function(){return this},r},{isClass:!0,isNode:!0}),iN="ArrayNode",aN=["Node"],oN=bt(iN,aN,e=>{var{Node:t}=e;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(this.items=e||[],!Array.isArray(this.items)||!this.items.every(j))throw new TypeError("Array containing Nodes expected")}return r.prototype=new t,r.prototype.type="ArrayNode",r.prototype.isArrayNode=!0,r.prototype._compile=function(e,t){var r=ft(this.items,(function(r){return r._compile(e,t)})),n="Array"!==e.config.matrix;if(n){var i=e.matrix;return function(e,t,n){return i(ft(r,(function(r){return r(e,t,n)})))}}return function(e,t,n){return ft(r,(function(r){return r(e,t,n)}))}},r.prototype.forEach=function(e){for(var t=0;t<this.items.length;t++){var r=this.items[t];e(r,"items["+t+"]",this)}},r.prototype.map=function(e){for(var t=[],n=0;n<this.items.length;n++)t[n]=this._ifNode(e(this.items[n],"items["+n+"]",this));return new r(t)},r.prototype.clone=function(){return new r(this.items.slice(0))},r.prototype._toString=function(e){var t=this.items.map((function(t){return t.toString(e)}));return"["+t.join(", ")+"]"},r.prototype.toJSON=function(){return{mathjs:"ArrayNode",items:this.items}},r.fromJSON=function(e){return new r(e.items)},r.prototype.toHTML=function(e){var t=this.items.map((function(t){return t.toHTML(e)}));return'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},r.prototype._toTex=function(e){function t(r,n){var i=r.some(O)&&!r.every(O),a=n||i,o=a?"&":"\\\\",s=r.map((function(r){return r.items?t(r.items,!n):r.toTex(e)})).join(o);return i||!a||a&&!n?"\\begin{bmatrix}"+s+"\\end{bmatrix}":s}return t(this.items,!1)},r},{isClass:!0,isNode:!0}),sN="BlockNode",uN=["ResultSet","Node"],cN=bt(sN,uN,e=>{var{ResultSet:t,Node:r}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new Error("Array expected");this.blocks=e.map((function(e){var t=e&&e.node,r=!e||void 0===e.visible||e.visible;if(!j(t))throw new TypeError('Property "node" must be a Node');if("boolean"!==typeof r)throw new TypeError('Property "visible" must be a boolean');return{node:t,visible:r}}))}return n.prototype=new r,n.prototype.type="BlockNode",n.prototype.isBlockNode=!0,n.prototype._compile=function(e,r){var n=ft(this.blocks,(function(t){return{evaluate:t.node._compile(e,r),visible:t.visible}}));return function(e,r,i){var a=[];return ht(n,(function(t){var n=t.evaluate(e,r,i);t.visible&&a.push(n)})),new t(a)}},n.prototype.forEach=function(e){for(var t=0;t<this.blocks.length;t++)e(this.blocks[t].node,"blocks["+t+"].node",this)},n.prototype.map=function(e){for(var t=[],r=0;r<this.blocks.length;r++){var i=this.blocks[r],a=this._ifNode(e(i.node,"blocks["+r+"].node",this));t[r]={node:a,visible:i.visible}}return new n(t)},n.prototype.clone=function(){var e=this.blocks.map((function(e){return{node:e.node,visible:e.visible}}));return new n(e)},n.prototype._toString=function(e){return this.blocks.map((function(t){return t.node.toString(e)+(t.visible?"":";")})).join("\n")},n.prototype.toJSON=function(){return{mathjs:"BlockNode",blocks:this.blocks}},n.fromJSON=function(e){return new n(e.blocks)},n.prototype.toHTML=function(e){return this.blocks.map((function(t){return t.node.toHTML(e)+(t.visible?"":'<span class="math-separator">;</span>')})).join('<span class="math-separator"><br /></span>')},n.prototype._toTex=function(e){return this.blocks.map((function(t){return t.node.toTex(e)+(t.visible?"":";")})).join("\\;\\;\n")},n},{isClass:!0,isNode:!0}),fN=r("4788"),hN=r.n(fN),lN={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},dN={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},pN={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(dN.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(dN.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(dN.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(dN.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(dN.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(dN.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(dN.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : $y^{args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(dN.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(dN.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(dN.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(dN.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(dN.bitAnd,"${args[1]}\\right)")},bitNot:{1:dN.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(dN.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(dN.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(dN.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(dN.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(dN.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(dN.and,"${args[1]}\\right)")},not:{1:dN.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(dN.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(dN.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(dN.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},sqrtm:{1:"{${args[0]}}".concat(dN.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(dN.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(dN.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(dN.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(dN.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(dN.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(dN.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(dN.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(dN.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(dN.to,"${args[1]}\\right)")},numeric:function(e,t){return e.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(lN.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},mN="\\mathrm{${name}}\\left(${args}\\right)",gN={deg:"^\\circ"};function vN(e){return hN()(e,{preserveFormatting:!0})}function yN(e,t){return t="undefined"!==typeof t&&t,t?ee(gN,e)?gN[e]:"\\mathrm{"+vN(e)+"}":ee(lN,e)?lN[e]:vN(e)}var bN="ConstantNode",wN=["Node"],MN=bt(bN,wN,e=>{var{Node:t}=e;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");this.value=e}return r.prototype=new t,r.prototype.type="ConstantNode",r.prototype.isConstantNode=!0,r.prototype._compile=function(e,t){var r=this.value;return function(){return r}},r.prototype.forEach=function(e){},r.prototype.map=function(e){return this.clone()},r.prototype.clone=function(){return new r(this.value)},r.prototype._toString=function(e){return Ue(this.value,e)},r.prototype.toHTML=function(e){var t=this._toString(e);switch(W(this.value)){case"number":case"BigNumber":case"Fraction":return'<span class="math-number">'+t+"</span>";case"string":return'<span class="math-string">'+t+"</span>";case"boolean":return'<span class="math-boolean">'+t+"</span>";case"null":return'<span class="math-null-symbol">'+t+"</span>";case"undefined":return'<span class="math-undefined">'+t+"</span>";default:return'<span class="math-symbol">'+t+"</span>"}},r.prototype.toJSON=function(){return{mathjs:"ConstantNode",value:this.value}},r.fromJSON=function(e){return new r(e.value)},r.prototype._toTex=function(e){var t=this._toString(e);switch(W(this.value)){case"string":return"\\mathtt{"+vN(t)+"}";case"number":case"BigNumber":if(!isFinite(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var r=t.toLowerCase().indexOf("e");return-1!==r?t.substring(0,r)+"\\cdot10^{"+t.substring(r+1)+"}":t;case"Fraction":return this.value.toLatex();default:return t}},r},{isClass:!0,isNode:!0}),xN="ObjectNode",_N=["Node"],SN=bt(xN,_N,e=>{var{Node:t}=e;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(this.properties=e||{},e&&("object"!==typeof e||!Object.keys(e).every((function(t){return j(e[t])}))))throw new TypeError("Object containing Nodes expected")}return r.prototype=new t,r.prototype.type="ObjectNode",r.prototype.isObjectNode=!0,r.prototype._compile=function(e,t){var r={};for(var n in this.properties)if(ee(this.properties,n)){var i=Fe(n),a=JSON.parse(i);if(!Pn(this.properties,a))throw new Error('No access to property "'+a+'"');r[a]=this.properties[n]._compile(e,t)}return function(e,t,n){var i={};for(var a in r)ee(r,a)&&(i[a]=r[a](e,t,n));return i}},r.prototype.forEach=function(e){for(var t in this.properties)ee(this.properties,t)&&e(this.properties[t],"properties["+Fe(t)+"]",this)},r.prototype.map=function(e){var t={};for(var n in this.properties)ee(this.properties,n)&&(t[n]=this._ifNode(e(this.properties[n],"properties["+Fe(n)+"]",this)));return new r(t)},r.prototype.clone=function(){var e={};for(var t in this.properties)ee(this.properties,t)&&(e[t]=this.properties[t]);return new r(e)},r.prototype._toString=function(e){var t=[];for(var r in this.properties)ee(this.properties,r)&&t.push(Fe(r)+": "+this.properties[r].toString(e));return"{"+t.join(", ")+"}"},r.prototype.toJSON=function(){return{mathjs:"ObjectNode",properties:this.properties}},r.fromJSON=function(e){return new r(e.properties)},r.prototype.toHTML=function(e){var t=[];for(var r in this.properties)ee(this.properties,r)&&t.push('<span class="math-symbol math-property">'+He(r)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[r].toHTML(e));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'},r.prototype._toTex=function(e){var t=[];for(var r in this.properties)ee(this.properties,r)&&t.push("\\mathbf{"+r+":} & "+this.properties[r].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}".concat(t.join("\n"),"\\end{array}\\right\\}")},r},{isClass:!0,isNode:!0}),NN="ParenthesisNode",EN=["Node"],AN=bt(NN,EN,e=>{var{Node:t}=e;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!j(e))throw new TypeError('Node expected for parameter "content"');this.content=e}return r.prototype=new t,r.prototype.type="ParenthesisNode",r.prototype.isParenthesisNode=!0,r.prototype._compile=function(e,t){return this.content._compile(e,t)},r.prototype.getContent=function(){return this.content.getContent()},r.prototype.forEach=function(e){e(this.content,"content",this)},r.prototype.map=function(e){var t=e(this.content,"content",this);return new r(t)},r.prototype.clone=function(){return new r(this.content)},r.prototype._toString=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"("+this.content.toString(e)+")":this.content.toString(e)},r.prototype.toJSON=function(){return{mathjs:"ParenthesisNode",content:this.content}},r.fromJSON=function(e){return new r(e.content)},r.prototype.toHTML=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(e)},r.prototype._toTex=function(e){return!e||e&&!e.parenthesis||e&&"keep"===e.parenthesis?"\\left(".concat(this.content.toTex(e),"\\right)"):this.content.toTex(e)},r},{isClass:!0,isNode:!0}),DN=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{associativity:"left",associativeWith:[]}},{"OperatorNode:and":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{associativity:"left",associativeWith:[]},"OperatorNode:unequal":{associativity:"left",associativeWith:[]},"OperatorNode:smaller":{associativity:"left",associativeWith:[]},"OperatorNode:larger":{associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{associativity:"left",associativeWith:[]}},{"OperatorNode:to":{associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{associativity:"left",associativeWith:[]},"OperatorNode:mod":{associativity:"left",associativeWith:[]}},{"OperatorNode:unaryPlus":{associativity:"right"},"OperatorNode:unaryMinus":{associativity:"right"},"OperatorNode:bitNot":{associativity:"right"},"OperatorNode:not":{associativity:"right"}},{"OperatorNode:pow":{associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{associativity:"left"}},{"OperatorNode:transpose":{associativity:"left"}}];function kN(e,t){var r=e;"keep"!==t&&(r=e.getContent());for(var n=r.getIdentifier(),i=0;i<DN.length;i++)if(n in DN[i])return i;return null}function ON(e,t){var r=e;"keep"!==t&&(r=e.getContent());var n=r.getIdentifier(),i=kN(r,t);if(null===i)return null;var a=DN[i][n];if(ee(a,"associativity")){if("left"===a.associativity)return"left";if("right"===a.associativity)return"right";throw Error("'"+n+"' has the invalid associativity '"+a.associativity+"'.")}return null}function CN(e,t,r){var n="keep"!==r?e.getContent():e,i="keep"!==r?e.getContent():t,a=n.getIdentifier(),o=i.getIdentifier(),s=kN(n,r);if(null===s)return null;var u=DN[s][a];if(ee(u,"associativeWith")&&u.associativeWith instanceof Array){for(var c=0;c<u.associativeWith.length;c++)if(u.associativeWith[c]===o)return!0;return!1}return null}var TN="RelationalNode",RN=["Node"],BN=bt(TN,RN,e=>{var{Node:t}=e;function r(e,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!Array.isArray(e))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(t))throw new TypeError("Parameter params must be an array");if(e.length!==t.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=e,this.params=t}return r.prototype=new t,r.prototype.type="RelationalNode",r.prototype.isRelationalNode=!0,r.prototype._compile=function(e,t){var r=this,n=this.params.map(r=>r._compile(e,t));return function(t,i,a){for(var o,s=n[0](t,i,a),u=0;u<r.conditionals.length;u++){o=s,s=n[u+1](t,i,a);var c=Bn(e,r.conditionals[u]);if(!c(o,s))return!1}return!0}},r.prototype.forEach=function(e){this.params.forEach((t,r)=>e(t,"params["+r+"]",this),this)},r.prototype.map=function(e){return new r(this.conditionals.slice(),this.params.map((t,r)=>this._ifNode(e(t,"params["+r+"]",this)),this))},r.prototype.clone=function(){return new r(this.conditionals,this.params)},r.prototype._toString=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",r=kN(this,t),n=this.params.map((function(n,i){var a=kN(n,t);return"all"===t||null!==a&&a<=r?"("+n.toString(e)+")":n.toString(e)})),i={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},a=n[0],o=0;o<this.conditionals.length;o++)a+=" "+i[this.conditionals[o]]+" "+n[o+1];return a},r.prototype.toJSON=function(){return{mathjs:"RelationalNode",conditionals:this.conditionals,params:this.params}},r.fromJSON=function(e){return new r(e.conditionals,e.params)},r.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",r=kN(this,t),n=this.params.map((function(n,i){var a=kN(n,t);return"all"===t||null!==a&&a<=r?'<span class="math-parenthesis math-round-parenthesis">(</span>'+n.toHTML(e)+'<span class="math-parenthesis math-round-parenthesis">)</span>':n.toHTML(e)})),i={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},a=n[0],o=0;o<this.conditionals.length;o++)a+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+He(i[this.conditionals[o]])+"</span>"+n[o+1];return a},r.prototype._toTex=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",r=kN(this,t),n=this.params.map((function(n,i){var a=kN(n,t);return"all"===t||null!==a&&a<=r?"\\left("+n.toTex(e)+"\right)":n.toTex(e)})),i=n[0],a=0;a<this.conditionals.length;a++)i+=dN[this.conditionals[a]]+n[a+1];return i},r},{isClass:!0,isNode:!0}),IN="Chain",qN=["?on","math"],PN=bt(IN,qN,e=>{var{on:t,math:r}=e;function n(e){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");Z(e)?this.value=e.value:this.value=e}function i(e,t){"function"===typeof t&&(n.prototype[e]=o(t))}function a(e,t){Q(n.prototype,e,(function(){var e=t();if("function"===typeof e)return o(e)}))}function o(e){return function(){for(var t=[this.value],r=0;r<arguments.length;r++)t[r+1]=arguments[r];return new n(e.apply(e,t))}}n.prototype.type="Chain",n.prototype.isChain=!0,n.prototype.done=function(){return this.value},n.prototype.valueOf=function(){return this.value},n.prototype.toString=function(){return Ue(this.value)},n.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},n.fromJSON=function(e){return new n(e.value)},n.createProxy=function(e,t){if("string"===typeof e)i(e,t);else{var r=function(t){ee(e,t)&&void 0===s[t]&&a(t,()=>e[t])};for(var n in e)r(n)}};var s={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return n.createProxy(r),t&&t("import",(function(e,t,r){r||a(e,t)})),n},{isClass:!0}),jN="reviver",zN=["classes"],LN=bt(jN,zN,e=>{var{classes:t}=e;return function(e,r){var n=t[r&&r.mathjs];return n&&"function"===typeof n.fromJSON?n.fromJSON(r):r}}),UN="ConditionalNode",FN=["Node"],HN=bt(UN,FN,e=>{var{Node:t}=e;function r(e,t,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!j(e))throw new TypeError("Parameter condition must be a Node");if(!j(t))throw new TypeError("Parameter trueExpr must be a Node");if(!j(n))throw new TypeError("Parameter falseExpr must be a Node");this.condition=e,this.trueExpr=t,this.falseExpr=n}function n(e){if("number"===typeof e||"boolean"===typeof e||"string"===typeof e)return!!e;if(e){if(u(e))return!e.isZero();if(c(e))return!(!e.re&&!e.im);if(h(e))return!!e.value}if(null===e||void 0===e)return!1;throw new TypeError('Unsupported type of condition "'+W(e)+'"')}return r.prototype=new t,r.prototype.type="ConditionalNode",r.prototype.isConditionalNode=!0,r.prototype._compile=function(e,t){var r=this.condition._compile(e,t),i=this.trueExpr._compile(e,t),a=this.falseExpr._compile(e,t);return function(e,t,o){return n(r(e,t,o))?i(e,t,o):a(e,t,o)}},r.prototype.forEach=function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)},r.prototype.map=function(e){return new r(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))},r.prototype.clone=function(){return new r(this.condition,this.trueExpr,this.falseExpr)},r.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=kN(this,t),n=this.condition.toString(e),i=kN(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=r)&&(n="("+n+")");var a=this.trueExpr.toString(e),o=kN(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==o&&o<=r)&&(a="("+a+")");var s=this.falseExpr.toString(e),u=kN(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==u&&u<=r)&&(s="("+s+")"),n+" ? "+a+" : "+s},r.prototype.toJSON=function(){return{mathjs:"ConditionalNode",condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}},r.fromJSON=function(e){return new r(e.condition,e.trueExpr,e.falseExpr)},r.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=kN(this,t),n=this.condition.toHTML(e),i=kN(this.condition,t);("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=r)&&(n='<span class="math-parenthesis math-round-parenthesis">(</span>'+n+'<span class="math-parenthesis math-round-parenthesis">)</span>');var a=this.trueExpr.toHTML(e),o=kN(this.trueExpr,t);("all"===t||"OperatorNode"===this.trueExpr.type||null!==o&&o<=r)&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>');var s=this.falseExpr.toHTML(e),u=kN(this.falseExpr,t);return("all"===t||"OperatorNode"===this.falseExpr.type||null!==u&&u<=r)&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),n+'<span class="math-operator math-conditional-operator">?</span>'+a+'<span class="math-operator math-conditional-operator">:</span>'+s},r.prototype._toTex=function(e){return"\\begin{cases} {"+this.trueExpr.toTex(e)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(e)+"}\\\\{"+this.falseExpr.toTex(e)+"}, &\\quad{\\text{otherwise}}\\end{cases}"},r},{isClass:!0,isNode:!0}),ZN="OperatorNode",WN=["Node"],VN=bt(ZN,WN,e=>{var{Node:t}=e;function r(e,t,n,i,a){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('string expected for parameter "op"');if("string"!==typeof t)throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(n)||!n.every(j))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=!0===i,this.isPercentage=!0===a,this.op=e,this.fn=t,this.args=n||[]}function n(e,t,r,n,i){var a,o=kN(e,t),s=ON(e,t);if("all"===t||n.length>2&&"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier())return n.map((function(e){switch(e.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}}));switch(n.length){case 0:a=[];break;case 1:var u=kN(n[0],t);if(i&&null!==u){var c,f;if("keep"===t?(c=n[0].getIdentifier(),f=e.getIdentifier()):(c=n[0].getContent().getIdentifier(),f=e.getContent().getIdentifier()),!1===DN[o][f].latexLeftParens){a=[!1];break}if(!1===DN[u][c].latexParens){a=[!1];break}}if(null===u){a=[!1];break}if(u<=o){a=[!0];break}a=[!1];break;case 2:var h,l,d=kN(n[0],t),p=CN(e,n[0],t);h=null!==d&&(d===o&&"right"===s&&!p||d<o);var m,g,v,y=kN(n[1],t),b=CN(e,n[1],t);if(l=null!==y&&(y===o&&"left"===s&&!b||y<o),i)"keep"===t?(m=e.getIdentifier(),g=e.args[0].getIdentifier(),v=e.args[1].getIdentifier()):(m=e.getContent().getIdentifier(),g=e.args[0].getContent().getIdentifier(),v=e.args[1].getContent().getIdentifier()),null!==d&&(!1===DN[o][m].latexLeftParens&&(h=!1),!1===DN[d][g].latexParens&&(h=!1)),null!==y&&(!1===DN[o][m].latexRightParens&&(l=!1),!1===DN[y][v].latexParens&&(l=!1));a=[h,l];break;default:"OperatorNode:add"!==e.getIdentifier()&&"OperatorNode:multiply"!==e.getIdentifier()||(a=n.map((function(r){var n=kN(r,t),i=CN(e,r,t),a=ON(r,t);return null!==n&&(o===n&&s===a&&!i||n<o)})));break}return n.length>=2&&"OperatorNode:multiply"===e.getIdentifier()&&e.implicit&&"auto"===t&&"hide"===r&&(a=n.map((function(e,t){var r="ParenthesisNode"===e.getIdentifier();return!(!a[t]&&!r)}))),a}return r.prototype=new t,r.prototype.type="OperatorNode",r.prototype.isOperatorNode=!0,r.prototype._compile=function(e,t){if("string"!==typeof this.fn||!zn(e,this.fn))throw e[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var r=Bn(e,this.fn),n=ft(this.args,(function(r){return r._compile(e,t)}));if(1===n.length){var i=n[0];return function(e,t,n){return r(i(e,t,n))}}if(2===n.length){var a=n[0],o=n[1];return function(e,t,n){return r(a(e,t,n),o(e,t,n))}}return function(e,t,i){return r.apply(null,ft(n,(function(r){return r(e,t,i)})))}},r.prototype.forEach=function(e){for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},r.prototype.map=function(e){for(var t=[],n=0;n<this.args.length;n++)t[n]=this._ifNode(e(this.args[n],"args["+n+"]",this));return new r(this.op,this.fn,t,this.implicit,this.isPercentage)},r.prototype.clone=function(){return new r(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)},r.prototype.isUnary=function(){return 1===this.args.length},r.prototype.isBinary=function(){return 2===this.args.length},r.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=e&&e.implicit?e.implicit:"hide",i=this.args,a=n(this,t,r,i,!1);if(1===i.length){var o=ON(this,t),s=i[0].toString(e);a[0]&&(s="("+s+")");var u=/[a-zA-Z]+/.test(this.op);return"right"===o?this.op+(u?" ":"")+s:"left"===o?s+(u?" ":"")+this.op:s+this.op}if(2===i.length){var c=i[0].toString(e),f=i[1].toString(e);return a[0]&&(c="("+c+")"),a[1]&&(f="("+f+")"),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===r?c+" "+f:c+" "+this.op+" "+f}if(i.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var h=i.map((function(t,r){return t=t.toString(e),a[r]&&(t="("+t+")"),t}));return this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===r?h.join(" "):h.join(" "+this.op+" ")}return this.fn+"("+this.args.join(", ")+")"},r.prototype.toJSON=function(){return{mathjs:"OperatorNode",op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}},r.fromJSON=function(e){return new r(e.op,e.fn,e.args,e.implicit,e.isPercentage)},r.prototype.toHTML=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=e&&e.implicit?e.implicit:"hide",i=this.args,a=n(this,t,r,i,!1);if(1===i.length){var o=ON(this,t),s=i[0].toHTML(e);return a[0]&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),"right"===o?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+He(this.op)+"</span>"+s:s+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+He(this.op)+"</span>"}if(2===i.length){var u=i[0].toHTML(e),c=i[1].toHTML(e);return a[0]&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>'),a[1]&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===r?u+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+c:u+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+He(this.op)+"</span>"+c}var f=i.map((function(t,r){return t=t.toHTML(e),a[r]&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t}));return i.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())?this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===r?f.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):f.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+He(this.op)+"</span>"):'<span class="math-function">'+He(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+f.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'},r.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=e&&e.implicit?e.implicit:"hide",i=this.args,a=n(this,t,r,i,!0),o=dN[this.fn];if(o="undefined"===typeof o?this.op:o,1===i.length){var s=ON(this,t),u=i[0].toTex(e);return a[0]&&(u="\\left(".concat(u,"\\right)")),"right"===s?o+u:u+o}if(2===i.length){var c=i[0],f=c.toTex(e);a[0]&&(f="\\left(".concat(f,"\\right)"));var h,l=i[1],d=l.toTex(e);switch(a[1]&&(d="\\left(".concat(d,"\\right)")),h="keep"===t?c.getIdentifier():c.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return o+"{"+f+"}{"+d+"}";case"OperatorNode:pow":switch(f="{"+f+"}",d="{"+d+"}",h){case"ConditionalNode":case"OperatorNode:divide":f="\\left(".concat(f,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&"hide"===r)return f+"~"+d}return f+o+d}if(i.length>2&&("OperatorNode:add"===this.getIdentifier()||"OperatorNode:multiply"===this.getIdentifier())){var p=i.map((function(t,r){return t=t.toTex(e),a[r]&&(t="\\left(".concat(t,"\\right)")),t}));return"OperatorNode:multiply"===this.getIdentifier()&&this.implicit?p.join("~"):p.join(o)}return"\\mathrm{"+this.fn+"}\\left("+i.map((function(t){return t.toTex(e)})).join(",")+"\\right)"},r.prototype.getIdentifier=function(){return this.type+":"+this.fn},r},{isClass:!0,isNode:!0}),GN="RangeNode",$N=["Node"],KN=bt(GN,$N,e=>{var{Node:t}=e;function r(e,t,n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!j(e))throw new TypeError("Node expected");if(!j(t))throw new TypeError("Node expected");if(n&&!j(n))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=e,this.end=t,this.step=n||null}function n(e,t){var r=kN(e,t),n={},i=kN(e.start,t);if(n.start=null!==i&&i<=r||"all"===t,e.step){var a=kN(e.step,t);n.step=null!==a&&a<=r||"all"===t}var o=kN(e.end,t);return n.end=null!==o&&o<=r||"all"===t,n}return r.prototype=new t,r.prototype.type="RangeNode",r.prototype.isRangeNode=!0,r.prototype.needsEnd=function(){var e=this.filter((function(e){return H(e)&&"end"===e.name}));return e.length>0},r.prototype._compile=function(e,t){var r=e.range,n=this.start._compile(e,t),i=this.end._compile(e,t);if(this.step){var a=this.step._compile(e,t);return function(e,t,o){return r(n(e,t,o),i(e,t,o),a(e,t,o))}}return function(e,t,a){return r(n(e,t,a),i(e,t,a))}},r.prototype.forEach=function(e){e(this.start,"start",this),e(this.end,"end",this),this.step&&e(this.step,"step",this)},r.prototype.map=function(e){return new r(this._ifNode(e(this.start,"start",this)),this._ifNode(e(this.end,"end",this)),this.step&&this._ifNode(e(this.step,"step",this)))},r.prototype.clone=function(){return new r(this.start,this.end,this.step&&this.step)},r.prototype._toString=function(e){var t,r=e&&e.parenthesis?e.parenthesis:"keep",i=n(this,r),a=this.start.toString(e);if(i.start&&(a="("+a+")"),t=a,this.step){var o=this.step.toString(e);i.step&&(o="("+o+")"),t+=":"+o}var s=this.end.toString(e);return i.end&&(s="("+s+")"),t+=":"+s,t},r.prototype.toJSON=function(){return{mathjs:"RangeNode",start:this.start,end:this.end,step:this.step}},r.fromJSON=function(e){return new r(e.start,e.end,e.step)},r.prototype.toHTML=function(e){var t,r=e&&e.parenthesis?e.parenthesis:"keep",i=n(this,r),a=this.start.toHTML(e);if(i.start&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t=a,this.step){var o=this.step.toHTML(e);i.step&&(o='<span class="math-parenthesis math-round-parenthesis">(</span>'+o+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+o}var s=this.end.toHTML(e);return i.end&&(s='<span class="math-parenthesis math-round-parenthesis">(</span>'+s+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+='<span class="math-operator math-range-operator">:</span>'+s,t},r.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=n(this,t),i=this.start.toTex(e);if(r.start&&(i="\\left(".concat(i,"\\right)")),this.step){var a=this.step.toTex(e);r.step&&(a="\\left(".concat(a,"\\right)")),i+=":"+a}var o=this.end.toTex(e);return r.end&&(o="\\left(".concat(o,"\\right)")),i+=":"+o,i},r},{isClass:!0,isNode:!0}),JN="FunctionAssignmentNode",YN=["typed","Node"],XN=bt(JN,YN,e=>{var{typed:t,Node:r}=e;function n(e,t,r){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('String expected for parameter "name"');if(!Array.isArray(t))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!j(r))throw new TypeError('Node expected for parameter "expr"');if(eN.has(e))throw new Error('Illegal function name, "'+e+'" is a reserved keyword');this.name=e,this.params=t.map((function(e){return e&&e.name||e})),this.types=t.map((function(e){return e&&e.type||"any"})),this.expr=r}function i(e,t){var r=kN(e,t),n=kN(e.expr,t);return"all"===t||null!==n&&n<=r}return n.prototype=new r,n.prototype.type="FunctionAssignmentNode",n.prototype.isFunctionAssignmentNode=!0,n.prototype._compile=function(e,r){var n=Object.create(r);ht(this.params,(function(e){n[e]=!0}));var i=this.expr._compile(e,n),a=this.name,o=this.params,s=pt(this.types,","),u=a+"("+pt(this.params,", ")+")";return function(e,r,n){var c={};c[s]=function(){for(var t=Object.create(r),a=0;a<o.length;a++)t[o[a]]=arguments[a];return i(e,t,n)};var f=t(a,c);return f.syntax=u,e.set(a,f),f}},n.prototype.forEach=function(e){e(this.expr,"expr",this)},n.prototype.map=function(e){var t=this._ifNode(e(this.expr,"expr",this));return new n(this.name,this.params.slice(0),t)},n.prototype.clone=function(){return new n(this.name,this.params.slice(0),this.expr)},n.prototype._toString=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=this.expr.toString(e);return i(this,t)&&(r="("+r+")"),this.name+"("+this.params.join(", ")+") = "+r},n.prototype.toJSON=function(){var e=this.types;return{mathjs:"FunctionAssignmentNode",name:this.name,params:this.params.map((function(t,r){return{name:t,type:e[r]}})),expr:this.expr}},n.fromJSON=function(e){return new n(e.name,e.params,e.expr)},n.prototype.toHTML=function(e){for(var t=e&&e.parenthesis?e.parenthesis:"keep",r=[],n=0;n<this.params.length;n++)r.push('<span class="math-symbol math-parameter">'+He(this.params[n])+"</span>");var a=this.expr.toHTML(e);return i(this,t)&&(a='<span class="math-parenthesis math-round-parenthesis">(</span>'+a+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+He(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+r.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+a},n.prototype._toTex=function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=this.expr.toTex(e);return i(this,t)&&(r="\\left(".concat(r,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(yN).join(",")+"\\right):="+r},n},{isClass:!0,isNode:!0}),QN="chain",eE=["typed","Chain"],tE=bt(QN,eE,e=>{var{typed:t,Chain:r}=e;return t(QN,{"":function(){return new r},any:function(e){return new r(e)}})});function rE(e){return e&&e.isIndexError?new $e(e.index+1,e.min+1,void 0!==e.max?e.max+1:void 0):e}function nE(e){var{subset:t}=e;return function(e,r){try{if(Array.isArray(e))return t(e,r);if(e&&"function"===typeof e.subset)return e.subset(r);if("string"===typeof e)return t(e,r);if("object"===typeof e){if(!r.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return Bn(e,r.getObjectProperty())}throw new TypeError("Cannot apply index: unsupported type of object")}catch(n){throw rE(n)}}}var iE="AccessorNode",aE=["subset","Node"],oE=bt(iE,aE,e=>{var{subset:t,Node:r}=e,n=nE({subset:t});function i(e,t){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(!j(e))throw new TypeError('Node expected for parameter "object"');if(!P(t))throw new TypeError('IndexNode expected for parameter "index"');this.object=e||null,this.index=t,Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function a(e){return!(k(e)||O(e)||B(e)||q(e)||z(e)||U(e)||H(e))}return i.prototype=new r,i.prototype.type="AccessorNode",i.prototype.isAccessorNode=!0,i.prototype._compile=function(e,t){var r=this.object._compile(e,t),i=this.index._compile(e,t);if(this.index.isObjectProperty()){var a=this.index.getObjectProperty();return function(e,t,n){return Bn(r(e,t,n),a)}}return function(e,t,a){var o=r(e,t,a),s=i(e,t,o);return n(o,s)}},i.prototype.forEach=function(e){e(this.object,"object",this),e(this.index,"index",this)},i.prototype.map=function(e){return new i(this._ifNode(e(this.object,"object",this)),this._ifNode(e(this.index,"index",this)))},i.prototype.clone=function(){return new i(this.object,this.index)},i.prototype._toString=function(e){var t=this.object.toString(e);return a(this.object)&&(t="("+t+")"),t+this.index.toString(e)},i.prototype.toHTML=function(e){var t=this.object.toHTML(e);return a(this.object)&&(t='<span class="math-parenthesis math-round-parenthesis">(</span>'+t+'<span class="math-parenthesis math-round-parenthesis">)</span>'),t+this.index.toHTML(e)},i.prototype._toTex=function(e){var t=this.object.toTex(e);return a(this.object)&&(t="\\left(' + object + '\\right)"),t+this.index.toTex(e)},i.prototype.toJSON=function(){return{mathjs:"AccessorNode",object:this.object,index:this.index}},i.fromJSON=function(e){return new i(e.object,e.index)},i},{isClass:!0,isNode:!0}),sE="IndexNode",uE=["Range","Node","size"],cE=bt(sE,uE,e=>{var{Range:t,Node:r,size:n}=e;function i(e,t){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if(this.dimensions=e,this.dotNotation=t||!1,!Array.isArray(e)||!e.every(j))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}function a(e,r,n){return new t(u(e)?e.toNumber():e,u(r)?r.toNumber():r,u(n)?n.toNumber():n)}return i.prototype=new r,i.prototype.type="IndexNode",i.prototype.isIndexNode=!0,i.prototype._compile=function(e,t){var r=ft(this.dimensions,(function(r,i){if(F(r)){if(r.needsEnd()){var o=Object.create(t);o.end=!0;var s=r.start._compile(e,o),u=r.end._compile(e,o),c=r.step?r.step._compile(e,o):function(){return 1};return function(e,t,r){var o=n(r).valueOf(),f=Object.create(t);return f.end=o[i],a(s(e,f,r),u(e,f,r),c(e,f,r))}}var f=r.start._compile(e,t),h=r.end._compile(e,t),l=r.step?r.step._compile(e,t):function(){return 1};return function(e,t,r){return a(f(e,t,r),h(e,t,r),l(e,t,r))}}if(H(r)&&"end"===r.name){var d=Object.create(t);d.end=!0;var p=r._compile(e,d);return function(e,t,r){var a=n(r).valueOf(),o=Object.create(t);return o.end=a[i],p(e,o,r)}}var m=r._compile(e,t);return function(e,t,r){return m(e,t,r)}})),i=Bn(e,"index");return function(e,t,n){var a=ft(r,(function(r){return r(e,t,n)}));return i(...a)}},i.prototype.forEach=function(e){for(var t=0;t<this.dimensions.length;t++)e(this.dimensions[t],"dimensions["+t+"]",this)},i.prototype.map=function(e){for(var t=[],r=0;r<this.dimensions.length;r++)t[r]=this._ifNode(e(this.dimensions[r],"dimensions["+r+"]",this));return new i(t,this.dotNotation)},i.prototype.clone=function(){return new i(this.dimensions.slice(0),this.dotNotation)},i.prototype.isObjectProperty=function(){return 1===this.dimensions.length&&B(this.dimensions[0])&&"string"===typeof this.dimensions[0].value},i.prototype.getObjectProperty=function(){return this.isObjectProperty()?this.dimensions[0].value:null},i.prototype._toString=function(e){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"},i.prototype.toJSON=function(){return{mathjs:"IndexNode",dimensions:this.dimensions,dotNotation:this.dotNotation}},i.fromJSON=function(e){return new i(e.dimensions,e.dotNotation)},i.prototype.toHTML=function(e){for(var t=[],r=0;r<this.dimensions.length;r++)t[r]=this.dimensions[r].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+He(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'},i.prototype._toTex=function(e){var t=this.dimensions.map((function(t){return t.toTex(e)}));return this.dotNotation?"."+this.getObjectProperty():"_{"+t.join(",")+"}"},i},{isClass:!0,isNode:!0});function fE(e){var{subset:t,matrix:r}=e;return function(e,n,i){try{if(Array.isArray(e))return r(e).subset(n,i).valueOf();if(e&&"function"===typeof e.subset)return e.subset(n,i);if("string"===typeof e)return t(e,n,i);if("object"===typeof e){if(!n.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return In(e,n.getObjectProperty(),i),e}throw new TypeError("Cannot apply index: unsupported type of object")}catch(a){throw rE(a)}}}var hE="AssignmentNode",lE=["subset","?matrix","Node"],dE=bt(hE,lE,e=>{var{subset:t,matrix:r,Node:n}=e,i=nE({subset:t}),a=fE({subset:t,matrix:r});function o(e,t,r){if(!(this instanceof o))throw new SyntaxError("Constructor must be called with the new operator");if(this.object=e,this.index=r?t:null,this.value=r||t,!H(e)&&!k(e))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(H(e)&&"end"===e.name)throw new Error('Cannot assign to symbol "end"');if(this.index&&!P(this.index))throw new TypeError('IndexNode expected as "index"');if(!j(this.value))throw new TypeError('Node expected as "value"');Object.defineProperty(this,"name",{get:function(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}function s(e,t){t||(t="keep");var r=kN(e,t),n=kN(e.value,t);return"all"===t||null!==n&&n<=r}return o.prototype=new n,o.prototype.type="AssignmentNode",o.prototype.isAssignmentNode=!0,o.prototype._compile=function(e,t){var r=this.object._compile(e,t),n=this.index?this.index._compile(e,t):null,o=this.value._compile(e,t),s=this.object.name;if(this.index){if(this.index.isObjectProperty()){var u=this.index.getObjectProperty();return function(e,t,n){var i=r(e,t,n),a=o(e,t,n);return In(i,u,a),a}}if(H(this.object))return function(e,t,i){var u=r(e,t,i),c=o(e,t,i),f=n(e,t,u);return e.set(s,a(u,f,c)),c};var c=this.object.object._compile(e,t);if(this.object.index.isObjectProperty()){var f=this.object.index.getObjectProperty();return function(e,t,r){var i=c(e,t,r),s=Bn(i,f),u=n(e,t,s),h=o(e,t,r);return In(i,f,a(s,u,h)),h}}var h=this.object.index._compile(e,t);return function(e,t,r){var s=c(e,t,r),u=h(e,t,s),f=i(s,u),l=n(e,t,f),d=o(e,t,r);return a(s,u,a(f,l,d)),d}}if(!H(this.object))throw new TypeError("SymbolNode expected as object");return function(e,t,r){var n=o(e,t,r);return e.set(s,n),n}},o.prototype.forEach=function(e){e(this.object,"object",this),this.index&&e(this.index,"index",this),e(this.value,"value",this)},o.prototype.map=function(e){var t=this._ifNode(e(this.object,"object",this)),r=this.index?this._ifNode(e(this.index,"index",this)):null,n=this._ifNode(e(this.value,"value",this));return new o(t,r,n)},o.prototype.clone=function(){return new o(this.object,this.index,this.value)},o.prototype._toString=function(e){var t=this.object.toString(e),r=this.index?this.index.toString(e):"",n=this.value.toString(e);return s(this,e&&e.parenthesis)&&(n="("+n+")"),t+r+" = "+n},o.prototype.toJSON=function(){return{mathjs:"AssignmentNode",object:this.object,index:this.index,value:this.value}},o.fromJSON=function(e){return new o(e.object,e.index,e.value)},o.prototype.toHTML=function(e){var t=this.object.toHTML(e),r=this.index?this.index.toHTML(e):"",n=this.value.toHTML(e);return s(this,e&&e.parenthesis)&&(n='<span class="math-paranthesis math-round-parenthesis">(</span>'+n+'<span class="math-paranthesis math-round-parenthesis">)</span>'),t+r+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+n},o.prototype._toTex=function(e){var t=this.object.toTex(e),r=this.index?this.index.toTex(e):"",n=this.value.toTex(e);return s(this,e&&e.parenthesis)&&(n="\\left(".concat(n,"\\right)")),t+r+":="+n},o},{isClass:!0,isNode:!0}),pE="SymbolNode",mE=["math","?Unit","Node"],gE=bt(pE,mE,e=>{var{math:t,Unit:r,Node:n}=e;function i(e){return!!r&&r.isValuelessUnit(e)}function a(e){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if("string"!==typeof e)throw new TypeError('String expected for parameter "name"');this.name=e}return a.prototype=new n,a.prototype.type="SymbolNode",a.prototype.isSymbolNode=!0,a.prototype._compile=function(e,t){var n=this.name;if(!0===t[n])return function(e,t,r){return t[n]};if(n in e)return function(t,r,i){return t.has(n)?t.get(n):Bn(e,n)};var o=i(n);return function(e,t,i){return e.has(n)?e.get(n):o?new r(null,n):a.onUndefinedSymbol(n)}},a.prototype.forEach=function(e){},a.prototype.map=function(e){return this.clone()},a.onUndefinedSymbol=function(e){throw new Error("Undefined symbol "+e)},a.prototype.clone=function(){return new a(this.name)},a.prototype._toString=function(e){return this.name},a.prototype.toHTML=function(e){var t=He(this.name);return"true"===t||"false"===t?'<span class="math-symbol math-boolean">'+t+"</span>":"i"===t?'<span class="math-symbol math-imaginary-symbol">'+t+"</span>":"Infinity"===t?'<span class="math-symbol math-infinity-symbol">'+t+"</span>":"NaN"===t?'<span class="math-symbol math-nan-symbol">'+t+"</span>":"null"===t?'<span class="math-symbol math-null-symbol">'+t+"</span>":"undefined"===t?'<span class="math-symbol math-undefined-symbol">'+t+"</span>":'<span class="math-symbol">'+t+"</span>"},a.prototype.toJSON=function(){return{mathjs:"SymbolNode",name:this.name}},a.fromJSON=function(e){return new a(e.name)},a.prototype._toTex=function(e){var r=!1;"undefined"===typeof t[this.name]&&i(this.name)&&(r=!0);var n=yN(this.name,r);return"\\"===n[0]?n:" "+n},a},{isClass:!0,isNode:!0});function vE(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return"function"===typeof e.createSubScope?$n(e.createSubScope(),...r):$n(Zn(),e,...r)}var yE="FunctionNode",bE=["math","Node","SymbolNode"],wE=bt(yE,bE,e=>{var{math:t,Node:r,SymbolNode:n}=e;function i(e,t){if(!(this instanceof i))throw new SyntaxError("Constructor must be called with the new operator");if("string"===typeof e&&(e=new n(e)),!j(e))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(t)||!t.every(j))throw new TypeError('Array containing Nodes expected for parameter "args"');this.fn=e,this.args=t||[],Object.defineProperty(this,"name",{get:function(){return this.fn.name||""}.bind(this),set:function(){throw new Error("Cannot assign a new name, name is read-only")}})}i.prototype=new r,i.prototype.type="FunctionNode",i.prototype.isFunctionNode=!0,i.prototype._compile=function(e,t){if(!(this instanceof i))throw new TypeError("No valid FunctionNode");var r=this.args.map(r=>r._compile(e,t));if(!H(this.fn)){if(k(this.fn)&&P(this.fn.index)&&this.fn.index.isObjectProperty()){var n=this.fn.object._compile(e,t),a=this.fn.index.getObjectProperty(),o=this.args;return function(t,i,s){var u=n(t,i,s);jn(u,a);var c=u[a]&&u[a].rawArgs;if(c)return u[a](o,e,vE(t,i),t);var f=r.map(e=>e(t,i,s));return u[a].apply(u,f)}}var s=this.fn._compile(e,t),u=this.args;return function(t,n,i){var a=s(t,n,i),o=a&&a.rawArgs;if(o)return a(u,e,vE(t,n),t);var c=r.map(e=>e(t,n,i));return a.apply(a,c)}}var c=this.fn.name,f=c in e?Bn(e,c):void 0,h="function"===typeof f&&!0===f.rawArgs,l=t=>t.has(c)?t.get(c):c in e?Bn(e,c):i.onUndefinedFunction(c);if(h){var d=this.args;return function(t,r,n){var i=l(t);return i(d,e,vE(t,r),t)}}switch(r.length){case 0:return function(e,t,r){var n=l(e);return n()};case 1:return function(e,t,n){var i=l(e),a=r[0];return i(a(e,t,n))};case 2:return function(e,t,n){var i=l(e),a=r[0],o=r[1];return i(a(e,t,n),o(e,t,n))};default:return function(e,t,n){var i=l(e),a=r.map(r=>r(e,t,n));return i(...a)}}},i.prototype.forEach=function(e){e(this.fn,"fn",this);for(var t=0;t<this.args.length;t++)e(this.args[t],"args["+t+"]",this)},i.prototype.map=function(e){for(var t=this._ifNode(e(this.fn,"fn",this)),r=[],n=0;n<this.args.length;n++)r[n]=this._ifNode(e(this.args[n],"args["+n+"]",this));return new i(t,r)},i.prototype.clone=function(){return new i(this.fn,this.args.slice(0))},i.onUndefinedFunction=function(e){throw new Error("Undefined function "+e)};var a=i.prototype.toString;function o(e,t,r){var n,i="",a=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,o=0;while(null!==(n=a.exec(e)))if(i+=e.substring(o,n.index),o=n.index,"$$"===n[0])i+="$",o++;else{o+=n[0].length;var s=t[n[1]];if(!s)throw new ReferenceError("Template: Property "+n[1]+" does not exist.");if(void 0===n[2])switch(typeof s){case"string":i+=s;break;case"object":if(j(s))i+=s.toTex(r);else{if(!Array.isArray(s))throw new TypeError("Template: "+n[1]+" has to be a Node, String or array of Nodes");i+=s.map((function(e,t){if(j(e))return e.toTex(r);throw new TypeError("Template: "+n[1]+"["+t+"] is not a Node.")})).join(",")}break;default:throw new TypeError("Template: "+n[1]+" has to be a Node, String or array of Nodes")}else{if(!j(s[n[2]]&&s[n[2]]))throw new TypeError("Template: "+n[1]+"["+n[2]+"] is not a Node.");i+=s[n[2]].toTex(r)}}return i+=e.slice(o),i}i.prototype.toString=function(e){var t,r=this.fn.toString(e);return e&&"object"===typeof e.handler&&ee(e.handler,r)&&(t=e.handler[r](this,e)),"undefined"!==typeof t?t:a.call(this,e)},i.prototype._toString=function(e){var t=this.args.map((function(t){return t.toString(e)})),r=I(this.fn)?"("+this.fn.toString(e)+")":this.fn.toString(e);return r+"("+t.join(", ")+")"},i.prototype.toJSON=function(){return{mathjs:"FunctionNode",fn:this.fn,args:this.args}},i.fromJSON=function(e){return new i(e.fn,e.args)},i.prototype.toHTML=function(e){var t=this.args.map((function(t){return t.toHTML(e)}));return'<span class="math-function">'+He(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+t.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'};var s=i.prototype.toTex;return i.prototype.toTex=function(e){var t;return e&&"object"===typeof e.handler&&ee(e.handler,this.name)&&(t=e.handler[this.name](this,e)),"undefined"!==typeof t?t:s.call(this,e)},i.prototype._toTex=function(e){var r,n,i=this.args.map((function(t){return t.toTex(e)}));switch(pN[this.name]&&(r=pN[this.name]),!t[this.name]||"function"!==typeof t[this.name].toTex&&"object"!==typeof t[this.name].toTex&&"string"!==typeof t[this.name].toTex||(r=t[this.name].toTex),typeof r){case"function":n=r(this,e);break;case"string":n=o(r,this,e);break;case"object":switch(typeof r[i.length]){case"function":n=r[i.length](this,e);break;case"string":n=o(r[i.length],this,e);break}}return"undefined"!==typeof n?n:o(mN,this,e)},i.prototype.getIdentifier=function(){return this.type+":"+this.name},i},{isClass:!0,isNode:!0}),ME="parse",xE=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],_E=bt(ME,xE,e=>{var{typed:t,numeric:r,config:n,AccessorNode:i,ArrayNode:o,AssignmentNode:s,BlockNode:u,ConditionalNode:c,ConstantNode:f,FunctionAssignmentNode:h,FunctionNode:l,IndexNode:d,ObjectNode:p,OperatorNode:m,ParenthesisNode:g,RangeNode:v,RelationalNode:y,SymbolNode:b}=e,w=t(ME,{string:function(e){return U(e,{})},"Array | Matrix":function(e){return M(e,{})},"string, Object":function(e,t){var r=void 0!==t.nodes?t.nodes:{};return U(e,r)},"Array | Matrix, Object":M});function M(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=void 0!==t.nodes?t.nodes:{};return ii(e,(function(e){if("string"!==typeof e)throw new TypeError("String expected");return U(e,r)}))}var x={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},_={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},S={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},N={true:!0,false:!1,null:null,undefined:void 0},E=["NaN","Infinity"];function A(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:x.NULL,nestingLevel:0,conditionalLevel:null}}function D(e,t){return e.expression.substr(e.index,t)}function O(e){return D(e,1)}function C(e){e.index++}function T(e){return e.expression.charAt(e.index-1)}function R(e){return e.expression.charAt(e.index+1)}function I(e){e.tokenType=x.NULL,e.token="",e.comment="";while(w.isWhitespace(O(e),e.nestingLevel))C(e);if("#"===O(e))while("\n"!==O(e)&&""!==O(e))e.comment+=O(e),C(e);if(""!==O(e)){if("\n"===O(e)&&!e.nestingLevel)return e.tokenType=x.DELIMITER,e.token=O(e),void C(e);var t=O(e),r=D(e,2),n=D(e,3);if(3===n.length&&_[n])return e.tokenType=x.DELIMITER,e.token=n,C(e),C(e),void C(e);if(2===r.length&&_[r])return e.tokenType=x.DELIMITER,e.token=r,C(e),void C(e);if(_[t])return e.tokenType=x.DELIMITER,e.token=t,void C(e);if(w.isDigitDot(t)){e.tokenType=x.NUMBER;var i=D(e,2);if("0b"===i||"0o"===i||"0x"===i){e.token+=O(e),C(e),e.token+=O(e),C(e);while(w.isHexDigit(O(e)))e.token+=O(e),C(e);if("."===O(e)){e.token+=".",C(e);while(w.isHexDigit(O(e)))e.token+=O(e),C(e)}else if("i"===O(e)){e.token+="i",C(e);while(w.isDigit(O(e)))e.token+=O(e),C(e)}return}if("."===O(e)){if(e.token+=O(e),C(e),!w.isDigit(O(e)))return void(e.tokenType=x.DELIMITER)}else{while(w.isDigit(O(e)))e.token+=O(e),C(e);w.isDecimalMark(O(e),R(e))&&(e.token+=O(e),C(e))}while(w.isDigit(O(e)))e.token+=O(e),C(e);if("E"===O(e)||"e"===O(e))if(w.isDigit(R(e))||"-"===R(e)||"+"===R(e)){if(e.token+=O(e),C(e),"+"!==O(e)&&"-"!==O(e)||(e.token+=O(e),C(e)),!w.isDigit(O(e)))throw Ne(e,'Digit expected, got "'+O(e)+'"');while(w.isDigit(O(e)))e.token+=O(e),C(e);if(w.isDecimalMark(O(e),R(e)))throw Ne(e,'Digit expected, got "'+O(e)+'"')}else if("."===R(e))throw C(e),Ne(e,'Digit expected, got "'+O(e)+'"')}else{if(!w.isAlpha(O(e),T(e),R(e))){e.tokenType=x.UNKNOWN;while(""!==O(e))e.token+=O(e),C(e);throw Ne(e,'Syntax error in part "'+e.token+'"')}while(w.isAlpha(O(e),T(e),R(e))||w.isDigit(O(e)))e.token+=O(e),C(e);ee(S,e.token)?e.tokenType=x.DELIMITER:e.tokenType=x.SYMBOL}}else e.tokenType=x.DELIMITER}function P(e){do{I(e)}while("\n"===e.token)}function j(e){e.nestingLevel++}function z(e){e.nestingLevel--}function U(e,t){var r=A();a()(r,{expression:e,extraNodes:t}),I(r);var n=F(r);if(""!==r.token)throw r.tokenType===x.DELIMITER?Ee(r,"Unexpected operator "+r.token):Ne(r,'Unexpected part "'+r.token+'"');return n}function F(e){var t,r,n=[];""!==e.token&&"\n"!==e.token&&";"!==e.token&&(t=Z(e),t.comment=e.comment);while("\n"===e.token||";"===e.token)0===n.length&&t&&(r=";"!==e.token,n.push({node:t,visible:r})),I(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&(t=Z(e),t.comment=e.comment,r=";"!==e.token,n.push({node:t,visible:r}));return n.length>0?new u(n):(t||(t=new f(void 0),t.comment=e.comment),t)}function Z(e){var t,r,n,i,a=W(e);if("="===e.token){if(H(a))return t=a.name,P(e),n=Z(e),new s(new b(t),n);if(k(a))return P(e),n=Z(e),new s(a.object,a.index,n);if(q(a)&&H(a.fn)&&(i=!0,r=[],t=a.name,a.args.forEach((function(e,t){H(e)?r[t]=e.name:i=!1})),i))return P(e),n=Z(e),new h(t,r,n);throw Ne(e,"Invalid left hand side of assignment operator =")}return a}function W(e){var t=V(e);while("?"===e.token){var r=e.conditionalLevel;e.conditionalLevel=e.nestingLevel,P(e);var n=t,i=Z(e);if(":"!==e.token)throw Ne(e,"False part of conditional expression expected");e.conditionalLevel=null,P(e);var a=Z(e);t=new c(n,i,a),e.conditionalLevel=r}return t}function V(e){var t=G(e);while("or"===e.token)P(e),t=new m("or","or",[t,G(e)]);return t}function G(e){var t=$(e);while("xor"===e.token)P(e),t=new m("xor","xor",[t,$(e)]);return t}function $(e){var t=K(e);while("and"===e.token)P(e),t=new m("and","and",[t,K(e)]);return t}function K(e){var t=J(e);while("|"===e.token)P(e),t=new m("|","bitOr",[t,J(e)]);return t}function J(e){var t=Y(e);while("^|"===e.token)P(e),t=new m("^|","bitXor",[t,Y(e)]);return t}function Y(e){var t=X(e);while("&"===e.token)P(e),t=new m("&","bitAnd",[t,X(e)]);return t}function X(e){var t=[Q(e)],r=[],n={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};while(ee(n,e.token)){var i={name:e.token,fn:n[e.token]};r.push(i),P(e),t.push(Q(e))}return 1===t.length?t[0]:2===t.length?new m(r[0].name,r[0].fn,t):new y(r.map(e=>e.fn),t)}function Q(e){var t,r,n,i;t=te(e);var a={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};while(ee(a,e.token))r=e.token,n=a[r],P(e),i=[t,te(e)],t=new m(r,n,i);return t}function te(e){var t,r,n,i;t=re(e);var a={to:"to",in:"to"};while(ee(a,e.token))r=e.token,n=a[r],P(e),"in"===r&&""===e.token?t=new m("*","multiply",[t,new b("in")],!0):(i=[t,re(e)],t=new m(r,n,i));return t}function re(e){var t,r=[];if(t=":"===e.token?new f(1):ne(e),":"===e.token&&e.conditionalLevel!==e.nestingLevel){r.push(t);while(":"===e.token&&r.length<3)P(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?r.push(new b("end")):r.push(ne(e));t=3===r.length?new v(r[0],r[2],r[1]):new v(r[0],r[1])}return t}function ne(e){var t,r,n,i;t=ie(e);var a={"+":"add","-":"subtract"};while(ee(a,e.token)){r=e.token,n=a[r],P(e);var o=ie(e);i=o.isPercentage?[t,new m("*","multiply",[t,o])]:[t,o],t=new m(r,n,i)}return t}function ie(e){var t,r,n,i;t=ae(e),r=t;var a={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};while(1){if(!ee(a,e.token))break;n=e.token,i=a[n],P(e),r=ae(e),t=new m(n,i,[t,r])}return t}function ae(e){var t,r;t=oe(e),r=t;while(1){if(!(e.tokenType===x.SYMBOL||"in"===e.token&&B(t))&&(e.tokenType!==x.NUMBER||B(r)||L(r)&&"!"!==r.op)&&"("!==e.token)break;r=oe(e),t=new m("*","multiply",[t,r],!0)}return t}function oe(e){var t=se(e),r=t,n=[];while(1){if("/"!==e.token||!B(r))break;if(n.push(a()({},e)),P(e),e.tokenType!==x.NUMBER){a()(e,n.pop());break}if(n.push(a()({},e)),P(e),e.tokenType!==x.SYMBOL&&"("!==e.token){n.pop(),a()(e,n.pop());break}a()(e,n.pop()),n.pop(),r=se(e),t=new m("/","divide",[t,r])}return t}function se(e){var t,r,n,i;t=ue(e);var a={"%":"mod",mod:"mod"};while(ee(a,e.token))r=e.token,n=a[r],P(e),"%"===r&&e.tokenType===x.DELIMITER&&"("!==e.token?t=new m("/","divide",[t,new f(100)],!1,!0):(i=[t,ue(e)],t=new m(r,n,i));return t}function ue(e){var t,r,n,i={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return ee(i,e.token)?(n=i[e.token],t=e.token,P(e),r=[ue(e)],new m(t,n,r)):ce(e)}function ce(e){var t,r,n,i;return t=fe(e),"^"!==e.token&&".^"!==e.token||(r=e.token,n="^"===r?"pow":"dotPow",P(e),i=[t,ue(e)],t=new m(r,n,i)),t}function fe(e){var t,r,n,i;t=he(e);var a={"!":"factorial","'":"ctranspose"};while(ee(a,e.token))r=e.token,n=a[r],I(e),i=[t],t=new m(r,n,i),t=de(e,t);return t}function he(e){var t=[];if(e.tokenType===x.SYMBOL&&ee(e.extraNodes,e.token)){var r=e.extraNodes[e.token];if(I(e),"("===e.token){if(t=[],j(e),I(e),")"!==e.token){t.push(Z(e));while(","===e.token)I(e),t.push(Z(e))}if(")"!==e.token)throw Ne(e,"Parenthesis ) expected");z(e),I(e)}return new r(t)}return le(e)}function le(e){var t,n;return e.tokenType===x.SYMBOL||e.tokenType===x.DELIMITER&&e.token in S?(n=e.token,I(e),t=ee(N,n)?new f(N[n]):-1!==E.indexOf(n)?new f(r(n,"number")):new b(n),t=de(e,t),t):pe(e)}function de(e,t,r){var n;while(("("===e.token||"["===e.token||"."===e.token)&&(!r||-1!==r.indexOf(e.token)))if(n=[],"("===e.token){if(!H(t)&&!k(t))return t;if(j(e),I(e),")"!==e.token){n.push(Z(e));while(","===e.token)I(e),n.push(Z(e))}if(")"!==e.token)throw Ne(e,"Parenthesis ) expected");z(e),I(e),t=new l(t,n)}else if("["===e.token){if(j(e),I(e),"]"!==e.token){n.push(Z(e));while(","===e.token)I(e),n.push(Z(e))}if("]"!==e.token)throw Ne(e,"Parenthesis ] expected");z(e),I(e),t=new i(t,new d(n))}else{if(I(e),e.tokenType!==x.SYMBOL)throw Ne(e,"Property name expected after dot");n.push(new f(e.token)),I(e);var a=!0;t=new i(t,new d(n,a))}return t}function pe(e){var t,r;return'"'===e.token?(r=me(e),t=new f(r),t=de(e,t),t):ge(e)}function me(e){var t="";while(""!==O(e)&&'"'!==O(e))"\\"===O(e)&&(t+=O(e),C(e)),t+=O(e),C(e);if(I(e),'"'!==e.token)throw Ne(e,'End of string " expected');return I(e),JSON.parse('"'+t+'"')}function ge(e){var t,r;return"'"===e.token?(r=ve(e),t=new f(r),t=de(e,t),t):ye(e)}function ve(e){var t="";while(""!==O(e)&&"'"!==O(e))"\\"===O(e)&&(t+=O(e),C(e)),t+=O(e),C(e);if(I(e),"'"!==e.token)throw Ne(e,"End of string ' expected");return I(e),JSON.parse('"'+t+'"')}function ye(e){var t,r,n,i;if("["===e.token){if(j(e),I(e),"]"!==e.token){var a=be(e);if(";"===e.token){n=1,r=[a];while(";"===e.token)I(e),r[n]=be(e),n++;if("]"!==e.token)throw Ne(e,"End of matrix ] expected");z(e),I(e),i=r[0].items.length;for(var s=1;s<n;s++)if(r[s].items.length!==i)throw Ee(e,"Column dimensions mismatch ("+r[s].items.length+" !== "+i+")");t=new o(r)}else{if("]"!==e.token)throw Ne(e,"End of matrix ] expected");z(e),I(e),t=a}}else z(e),I(e),t=new o([]);return de(e,t)}return we(e)}function be(e){var t=[Z(e)],r=1;while(","===e.token)I(e),t[r]=Z(e),r++;return new o(t)}function we(e){if("{"===e.token){var t;j(e);var r={};do{if(I(e),"}"!==e.token){if('"'===e.token)t=me(e);else if("'"===e.token)t=ve(e);else{if(!(e.tokenType===x.SYMBOL||e.tokenType===x.DELIMITER&&e.token in S))throw Ne(e,"Symbol or string expected as object key");t=e.token,I(e)}if(":"!==e.token)throw Ne(e,"Colon : expected after object key");I(e),r[t]=Z(e)}}while(","===e.token);if("}"!==e.token)throw Ne(e,"Comma , or bracket } expected after object value");z(e),I(e);var n=new p(r);return n=de(e,n),n}return Me(e)}function Me(e){var t;return e.tokenType===x.NUMBER?(t=e.token,I(e),new f(r(t,n.number))):xe(e)}function xe(e){var t;if("("===e.token){if(j(e),I(e),t=Z(e),")"!==e.token)throw Ne(e,"Parenthesis ) expected");return z(e),I(e),t=new g(t),t=de(e,t),t}return _e(e)}function _e(e){throw""===e.token?Ne(e,"Unexpected end of expression"):Ne(e,"Value expected")}function Se(e){return e.index-e.token.length+1}function Ne(e,t){var r=Se(e),n=new SyntaxError(t+" (char "+r+")");return n.char=r,n}function Ee(e,t){var r=Se(e),n=new SyntaxError(t+" (char "+r+")");return n.char=r,n}return w.isAlpha=function(e,t,r){return w.isValidLatinOrGreek(e)||w.isValidMathSymbol(e,r)||w.isValidMathSymbol(t,e)},w.isValidLatinOrGreek=function(e){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(e)},w.isValidMathSymbol=function(e,t){return/^[\uD835]$/.test(e)&&/^[\uDC00-\uDFFF]$/.test(t)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(t)},w.isWhitespace=function(e,t){return" "===e||"\t"===e||"\n"===e&&t>0},w.isDecimalMark=function(e,t){return"."===e&&"/"!==t&&"*"!==t&&"^"!==t},w.isDigitDot=function(e){return e>="0"&&e<="9"||"."===e},w.isDigit=function(e){return e>="0"&&e<="9"},w.isHexDigit=function(e){return e>="0"&&e<="9"||e>="a"&&e<="f"||e>="A"&&e<="F"},w}),SE="evaluate",NE=["typed","parse"],EE=bt(SE,NE,e=>{var{typed:t,parse:r}=e;return t(SE,{string:function(e){var t=Zn();return r(e).compile().evaluate(t)},"string, Map | Object":function(e,t){return r(e).compile().evaluate(t)},"Array | Matrix":function(e){var t=Zn();return ii(e,(function(e){return r(e).compile().evaluate(t)}))},"Array | Matrix, Map | Object":function(e,t){return ii(e,(function(e){return r(e).compile().evaluate(t)}))}})}),AE="Help",DE=["parse"],kE=bt(AE,DE,e=>{var{parse:t}=e;function r(e){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!e)throw new Error('Argument "doc" missing');this.doc=e}return r.prototype.type="Help",r.prototype.isHelp=!0,r.prototype.toString=function(){var e=this.doc||{},r="\n";if(e.name&&(r+="Name: "+e.name+"\n\n"),e.category&&(r+="Category: "+e.category+"\n\n"),e.description&&(r+="Description:\n "+e.description+"\n\n"),e.syntax&&(r+="Syntax:\n "+e.syntax.join("\n ")+"\n\n"),e.examples){r+="Examples:\n";for(var n={},i=0;i<e.examples.length;i++){var a=e.examples[i];r+=" "+a+"\n";var o=void 0;try{o=t(a).compile().evaluate(n)}catch(s){o=s}void 0===o||x(o)||(r+=" "+Ue(o,{precision:14})+"\n")}r+="\n"}return e.seealso&&e.seealso.length&&(r+="See also: "+e.seealso.join(", ")+"\n"),r},r.prototype.toJSON=function(){var e=V(this.doc);return e.mathjs="Help",e},r.fromJSON=function(e){var t={};return Object.keys(e).filter(e=>"mathjs"!==e).forEach(r=>{t[r]=e[r]}),new r(t)},r.prototype.valueOf=r.prototype.toString,r},{isClass:!0}),OE="simplifyUtil",CE=["FunctionNode","OperatorNode","SymbolNode"],TE=bt(OE,CE,e=>{var{FunctionNode:t,OperatorNode:r,SymbolNode:n}=e,i={add:!0,multiply:!0},a={add:!0,multiply:!0};function o(e,t){if(!L(e))return!0;var r=e.fn.toString();return t&&ee(t,r)&&ee(t[r],"commutative")?t[r].commutative:i[r]||!1}function s(e,t){if(!L(e))return!1;var r=e.fn.toString();return t&&ee(t,r)&&ee(t[r],"associative")?t[r].associative:a[r]||!1}function u(e){if(!e.args||0===e.args.length)return e;e.args=c(e);for(var t=0;t<e.args.length;t++)u(e.args[t])}function c(e){var t,r=[],n=function e(n){for(var i=0;i<n.args.length;i++){var a=n.args[i];L(a)&&t===a.op?e(a):r.push(a)}};return s(e)?(t=e.op,n(e),r):e.args}function f(e){if(e.args&&0!==e.args.length){for(var t=l(e),r=e.args.length,n=0;n<r;n++)f(e.args[n]);if(r>2&&s(e)){var i=e.args.pop();while(e.args.length>0)i=t([e.args.pop(),i]);e.args=i.args}}}function h(e){if(e.args&&0!==e.args.length){for(var t=l(e),r=e.args.length,n=0;n<r;n++)h(e.args[n]);if(r>2&&s(e)){var i=e.args.shift();while(e.args.length>0)i=t([i,e.args.shift()]);e.args=i.args}}}function l(e){return L(e)?function(t){try{return new r(e.op,e.fn,t,e.implicit)}catch(n){return console.error(n),[]}}:function(r){return new t(new n(e.name),r)}}return{createMakeNodeFunction:l,isCommutative:o,isAssociative:s,flatten:u,allChildren:c,unflattenr:f,unflattenl:h}}),RE="simplifyCore",BE=["equal","isZero","add","subtract","multiply","divide","pow","ConstantNode","OperatorNode","FunctionNode","ParenthesisNode"],IE=bt(RE,BE,e=>{var{equal:t,isZero:r,add:n,subtract:i,multiply:a,divide:o,pow:s,ConstantNode:u,OperatorNode:c,FunctionNode:f,ParenthesisNode:h}=e,l=new u(0),d=new u(1);function p(e){if(L(e)&&e.isUnary()){var m=p(e.args[0]);if("+"===e.op)return m;if("-"===e.op){if(L(m)){if(m.isUnary()&&"-"===m.op)return m.args[0];if(m.isBinary()&&"subtract"===m.fn)return new c("-","subtract",[m.args[1],m.args[0]])}return new c(e.op,e.fn,[m])}}else if(L(e)&&e.isBinary()){var g=p(e.args[0]),v=p(e.args[1]);if("+"===e.op){if(B(g)){if(r(g.value))return v;if(B(v))return new u(n(g.value,v.value))}return B(v)&&r(v.value)?g:L(v)&&v.isUnary()&&"-"===v.op?new c("-","subtract",[g,v.args[0]]):new c(e.op,e.fn,v?[g,v]:[g])}if("-"===e.op){if(B(g)&&v){if(B(v))return new u(i(g.value,v.value));if(r(g.value))return new c("-","unaryMinus",[v])}if("subtract"===e.fn)return B(v)&&r(v.value)?g:L(v)&&v.isUnary()&&"-"===v.op?p(new c("+","add",[g,v.args[0]])):new c(e.op,e.fn,[g,v])}else{if("*"===e.op){if(B(g)){if(r(g.value))return l;if(t(g.value,1))return v;if(B(v))return new u(a(g.value,v.value))}if(B(v)){if(r(v.value))return l;if(t(v.value,1))return g;if(L(g)&&g.isBinary()&&g.op===e.op){var y=g.args[0];if(B(y)){var b=new u(a(y.value,v.value));return new c(e.op,e.fn,[b,g.args[1]],e.implicit)}}return new c(e.op,e.fn,[v,g],e.implicit)}return new c(e.op,e.fn,[g,v],e.implicit)}if("/"===e.op){if(B(g)){if(r(g.value))return l;if(B(v)&&(t(v.value,1)||t(v.value,2)||t(v.value,4)))return new u(o(g.value,v.value))}return new c(e.op,e.fn,[g,v])}if("^"===e.op){if(B(v)){if(r(v.value))return d;if(t(v.value,1))return g;if(B(g))return new u(s(g.value,v.value));if(L(g)&&g.isBinary()&&"^"===g.op){var w=g.args[1];if(B(w))return new c(e.op,e.fn,[g.args[0],new u(a(w.value,v.value))])}}return new c(e.op,e.fn,[g,v])}}}else{if(U(e)){var M=p(e.content);return U(M)||H(M)||B(M)?M:new h(M)}if(q(e)){var x=e.args.map(p).map((function(e){return U(e)?e.content:e}));return new f(p(e.fn),x)}}return e}return p}),qE="simplifyConstant",PE=["typed","config","mathWithTransform","?fraction","?bignumber","ConstantNode","OperatorNode","FunctionNode","SymbolNode"],jE=bt(qE,PE,e=>{var{typed:t,config:r,mathWithTransform:n,fraction:i,bignumber:a,ConstantNode:o,OperatorNode:s,FunctionNode:u,SymbolNode:c}=e,{isCommutative:h,isAssociative:l,allChildren:d,createMakeNodeFunction:p}=TE({FunctionNode:u,OperatorNode:s,SymbolNode:c});function m(e,t){var r=_(e,t);return j(r)?r:v(r)}function g(e,t,r){try{return b(n[e].apply(null,t),r)}catch(i){return t=t.map((function(e){return f(e)?e.valueOf():e})),b(n[e].apply(null,t),r)}}var v=t({Fraction:M,number:function(e){return e<0?w(new o(-e)):new o(e)},BigNumber:function(e){return e<0?w(new o(-e)):new o(e)},Complex:function(e){throw new Error("Cannot convert Complex number to Node")}});function y(e,t){var r=t&&!1!==t.exactFractions;if(r&&isFinite(e)&&i){var n=i(e),a=t&&"number"===typeof t.fractionsLimit?t.fractionsLimit:1/0;if(n.valueOf()===e&&n.n<a&&n.d<a)return n}return e}var b=t({"string, Object":function(e,t){if("BigNumber"===r.number)return void 0===a&&Oh(),a(e);if("Fraction"===r.number)return void 0===i&&Ch(),i(e);var n=parseFloat(e);return y(n,t)},"Fraction, Object":function(e,t){return e},"BigNumber, Object":function(e,t){return e},"number, Object":function(e,t){return y(e,t)},"Complex, Object":function(e,t){return 0!==e.im?e:y(e.re,t)}});function w(e){return new s("-","unaryMinus",[e])}function M(e){var t,r=e.s*e.n;return t=r<0?new s("-","unaryMinus",[new o(-r)]):new o(r),1===e.d?t:new s("/","divide",[t,new o(e.d)])}function x(e,t,r,n){return t.reduce((function(t,i){if(j(t)||j(i))j(t)?j(i)||(i=v(i)):t=v(t);else{try{return g(e,[t,i],n)}catch(a){}t=v(t),i=v(i)}return r([t,i])}))}function _(e,t){switch(e.type){case"SymbolNode":return e;case"ConstantNode":return"number"!==typeof e.value&&isNaN(e.value)?e:b(e.value,t);case"FunctionNode":if(n[e.name]&&n[e.name].rawArgs)return e;var r=["add","multiply"];if(-1===r.indexOf(e.name)){var i=e.args.map(e=>_(e,t));if(!i.some(j))try{return g(e.name,i,t)}catch(w){}return i=i.map((function(e){return j(e)?e:v(e)})),new u(e.name,i)}case"OperatorNode":var a,o,s=e.fn.toString(),c=p(e);if(L(e)&&e.isUnary())a=[_(e.args[0],t)],o=j(a[0])?c(a):g(s,a,t);else if(l(e))if(a=d(e),a=a.map(e=>_(e,t)),h(s)){for(var f=[],m=[],y=0;y<a.length;y++)j(a[y])?m.push(a[y]):f.push(a[y]);f.length>1?(o=x(s,f,c,t),m.unshift(o),o=x(s,m,c,t)):o=x(s,a,c,t)}else o=x(s,a,c,t);else a=e.args.map(e=>_(e,t)),o=x(s,a,c,t);return o;case"ParenthesisNode":return _(e.content,t);case"AccessorNode":case"ArrayNode":case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"IndexNode":case"ObjectNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(e.type))}}return m}),zE="resolve",LE=["parse","FunctionNode","OperatorNode","ParenthesisNode"],UE=bt(zE,LE,e=>{var{parse:t,FunctionNode:r,OperatorNode:n,ParenthesisNode:i}=e;function a(e,o){if(!o)return e;if(Gn(o)||(o=Wn(o)),H(e)){var s=o.get(e.name);if(j(s))return a(s,o);if("number"===typeof s)return t(String(s))}else{if(L(e)){var u=e.args.map((function(e){return a(e,o)}));return new n(e.op,e.fn,u,e.implicit)}if(U(e))return new i(a(e.content,o));if(q(e)){var c=e.args.map((function(e){return a(e,o)}));return new r(e.name,c)}}return e}return a}),FE="simplify",HE=["config","typed","parse","add","subtract","multiply","divide","pow","isZero","equal","?fraction","?bignumber","mathWithTransform","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],ZE=bt(FE,HE,e=>{var{config:t,typed:r,parse:n,add:i,subtract:a,multiply:o,divide:s,pow:u,isZero:c,equal:f,fraction:h,bignumber:l,mathWithTransform:d,ConstantNode:p,FunctionNode:m,OperatorNode:g,ParenthesisNode:v,SymbolNode:y}=e,b=jE({typed:r,config:t,mathWithTransform:d,fraction:h,bignumber:l,ConstantNode:p,OperatorNode:g,FunctionNode:m,SymbolNode:y}),w=IE({equal:f,isZero:c,add:i,subtract:a,multiply:o,divide:s,pow:u,ConstantNode:p,OperatorNode:g,FunctionNode:m,ParenthesisNode:v}),M=UE({parse:n,FunctionNode:m,OperatorNode:g,ParenthesisNode:v}),{isCommutative:x,isAssociative:_,flatten:S,unflattenr:N,unflattenl:E,createMakeNodeFunction:A}=TE({FunctionNode:m,OperatorNode:g,SymbolNode:y}),D=r("simplify",{string:function(e){return this(n(e),this.rules,Zn(),{})},"string, Map | Object":function(e,t){return this(n(e),this.rules,t,{})},"string, Map | Object, Object":function(e,t,r){return this(n(e),this.rules,t,r)},"string, Array":function(e,t){return this(n(e),t,Zn(),{})},"string, Array, Map | Object":function(e,t,r){return this(n(e),t,r,{})},"string, Array, Map | Object, Object":function(e,t,r,i){return this(n(e),t,r,i)},"Node, Map | Object":function(e,t){return this(e,this.rules,t,{})},"Node, Map | Object, Object":function(e,t,r){return this(e,this.rules,t,r)},Node:function(e){return this(e,this.rules,Zn(),{})},"Node, Array":function(e,t){return this(e,t,Zn(),{})},"Node, Array, Map | Object":function(e,t,r){return this(e,t,r,{})},"Node, Array, Object, Object":function(e,t,r,n){return this(e,t,Wn(r),n)},"Node, Array, Map, Object":function(e,t,r,n){t=C(t);var i=M(e,r);i=k(i);var a={},o=i.toString({parenthesis:"all"});while(!a[o]){a[o]=!0,T=0;for(var s=0;s<t.length;s++)"function"===typeof t[s]?i=t[s](i,n):(S(i),i=I(i,t[s])),E(i);o=i.toString({parenthesis:"all"})}return i}});function k(e){return e.transform((function(e,t,r){return U(e)?k(e.content):e}))}D.simplifyCore=w,D.resolve=M;var O={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};function C(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],a=void 0,o=typeof i;switch(o){case"string":var s=i.split("->");if(2!==s.length)throw SyntaxError("Could not parse rule: "+i);i={l:s[0],r:s[1]};case"object":if(a={l:k(n(i.l)),r:k(n(i.r))},i.context&&(a.evaluate=i.context),i.evaluate&&(a.evaluate=n(i.evaluate)),_(a.l)){var u=A(a.l),c=R();a.expanded={},a.expanded.l=u([a.l.clone(),c]),S(a.expanded.l),N(a.expanded.l),a.expanded.r=u([a.r,c])}break;case"function":a=i;break;default:throw TypeError("Unsupported type of rule: "+o)}t.push(a)}return t}D.rules=[w,{l:"log(e)",r:"1"},{l:"n-n1",r:"n+-n1"},{l:"-(c*v)",r:"(-c) * v"},{l:"-v",r:"(-1) * v"},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{l:"(n ^ n1) ^ n2",r:"n ^ (n1 * n2)"},{l:"n*n",r:"n^2"},{l:"n * n^n1",r:"n^(n1+1)"},{l:"n^n1 * n^n2",r:"n^(n1+n2)"},{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},{l:"n1*n2 + n2",r:"(n1+1)*n2"},{l:"n1*n3 + n2*n3",r:"(n1+n2)*n3"},{l:"n1 + -1 * (n2 + n3)",r:"n1 + -1 * n2 + -1 * n3"},b,{l:"(-n)*n1",r:"-(n*n1)"},{l:"c+v",r:"v+c",context:{add:{commutative:!1}}},{l:"v*c",r:"c*v",context:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"n-(n1+n2)",r:"n-n1-n2"},{l:"1*n",r:"n"},{l:"n1/(n2/n3)",r:"(n1*n3)/n2"}];var T=0;function R(){return new y("_p"+T++)}var I=r("applyRule",{"Node, Object":function(e,t){var r=e;if(r instanceof g||r instanceof m){if(r.args)for(var n=0;n<r.args.length;n++)r.args[n]=I(r.args[n],t)}else r instanceof v&&r.content&&(r.content=I(r.content,t));var i=t.r,a=L(t.l,r)[0];if(!a&&t.expanded&&(i=t.expanded.r,a=L(t.expanded.l,r)[0]),a){var o=r.implicit;r=i.clone(),o&&"implicit"in i&&(r.implicit=!0),r=r.transform((function(e){return e.isSymbolNode&&ee(a.placeholders,e.name)?a.placeholders[e.name].clone():e}))}return r}});function q(e,t){var r,n,i=[],a=A(e);if(x(e,t))for(var o=0;o<e.args.length;o++)n=e.args.slice(0),n.splice(o,1),r=1===n.length?n[0]:a(n),i.push(a([e.args[o],r]));else n=e.args.slice(1),r=1===n.length?n[0]:a(n),i.push(a([e.args[0],r]));return i}function P(e,t){var r={placeholders:{}};if(!e.placeholders&&!t.placeholders)return r;if(!e.placeholders)return t;if(!t.placeholders)return e;for(var n in e.placeholders)if(ee(e.placeholders,n)&&(r.placeholders[n]=e.placeholders[n],ee(t.placeholders,n)&&!F(e.placeholders[n],t.placeholders[n])))return null;for(var i in t.placeholders)ee(t.placeholders,i)&&(r.placeholders[i]=t.placeholders[i]);return r}function j(e,t){var r,n=[];if(0===e.length||0===t.length)return n;for(var i=0;i<e.length;i++)for(var a=0;a<t.length;a++)r=P(e[i],t[a]),r&&n.push(r);return n}function z(e){if(0===e.length)return e;for(var t=e.reduce(j),r=[],n={},i=0;i<t.length;i++){var a=JSON.stringify(t[i]);n[a]||(n[a]=!0,r.push(t[i]))}return r}function L(e,t,r){var n=[{placeholders:{}}];if(e instanceof g&&t instanceof g||e instanceof m&&t instanceof m){if(e instanceof g){if(e.op!==t.op||e.fn!==t.fn)return[]}else if(e instanceof m&&e.name!==t.name)return[];if(!(1===t.args.length&&1===e.args.length||!_(t)&&t.args.length===e.args.length||r)){if(t.args.length>=2&&2===e.args.length){for(var i=q(t,e.context),a=[],o=0;o<i.length;o++){var s=L(e,i[o],!0);a=a.concat(s)}return a}if(e.args.length>2)throw Error("Unexpected non-binary associative function: "+e.toString());return[]}for(var u=[],c=0;c<e.args.length;c++){var h=L(e.args[c],t.args[c]);if(0===h.length)return[];u.push(h)}n=z(u)}else if(e instanceof y){if(0===e.name.length)throw new Error("Symbol in rule has 0 length...!?");if(O[e.name]){if(e.name!==t.name)return[]}else if("n"===e.name[0]||"_p"===e.name.substring(0,2))n[0].placeholders[e.name]=t;else if("v"===e.name[0]){if(B(t))return[];n[0].placeholders[e.name]=t}else{if("c"!==e.name[0])throw new Error("Invalid symbol in rule: "+e.name);if(!(t instanceof p))return[];n[0].placeholders[e.name]=t}}else{if(!(e instanceof p))return[];if(!f(e.value,t.value))return[]}return n}function F(e,t){if(e instanceof p&&t instanceof p){if(!f(e.value,t.value))return!1}else if(e instanceof y&&t instanceof y){if(e.name!==t.name)return!1}else{if(!(e instanceof g&&t instanceof g||e instanceof m&&t instanceof m))return!1;if(e instanceof g){if(e.op!==t.op||e.fn!==t.fn)return!1}else if(e instanceof m&&e.name!==t.name)return!1;if(e.args.length!==t.args.length)return!1;for(var r=0;r<e.args.length;r++)if(!F(e.args[r],t.args[r]))return!1}return!0}return D}),WE="rationalize",VE=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplify","?bignumber","?fraction","mathWithTransform","ConstantNode","OperatorNode","FunctionNode","SymbolNode","ParenthesisNode"],GE=bt(WE,VE,e=>{var{config:t,typed:r,equal:n,isZero:i,add:a,subtract:o,multiply:s,divide:u,pow:c,parse:f,simplify:h,fraction:l,bignumber:d,mathWithTransform:p,ConstantNode:m,OperatorNode:g,FunctionNode:v,SymbolNode:y,ParenthesisNode:b}=e,w=jE({typed:r,config:t,mathWithTransform:p,fraction:l,bignumber:d,ConstantNode:m,OperatorNode:g,FunctionNode:v,SymbolNode:y}),M=IE({equal:n,isZero:i,add:a,subtract:o,multiply:s,divide:u,pow:c,ConstantNode:m,OperatorNode:g,FunctionNode:v,ParenthesisNode:b});return r(WE,{string:function(e){return this(f(e),{},!1)},"string, boolean":function(e,t){return this(f(e),{},t)},"string, Object":function(e,t){return this(f(e),t,!1)},"string, Object, boolean":function(e,t,r){return this(f(e),t,r)},Node:function(e){return this(e,{},!1)},"Node, boolean":function(e,t){return this(e,{},t)},"Node, Object":function(e,t){return this(e,t,!1)},"Node, Object, boolean":function(e,t,r){var n=_(),i=x(e,t,!0,n.firstRules),a=i.variables.length;if(e=i.expression,a>=1){var o,s;e=S(e);var u,c=!0,f=!1;e=h(e,n.firstRules,{},{exactFractions:!1});while(1){if(s=c?n.distrDivRules:n.sucDivRules,e=h(e,s),c=!c,u=e.toString(),u===o)break;f=!0,o=u}f&&(e=h(e,n.firstRulesAgain,{},{exactFractions:!1})),e=h(e,n.finalRules,{},{exactFractions:!1})}var l=[],d={};return"OperatorNode"===e.type&&e.isBinary()&&"/"===e.op?(1===a&&(e.args[0]=N(e.args[0],l),e.args[1]=N(e.args[1])),r&&(d.numerator=e.args[0],d.denominator=e.args[1])):(1===a&&(e=N(e,l)),r&&(d.numerator=e,d.denominator=null)),r?(d.coefficients=l,d.variables=i.variables,d.expression=e,d):e}});function x(e,t,r,n){var i=[],a=h(e,n,t,{exactFractions:!1});r=!!r;var o="+-*"+(r?"/":"");u(a);var s={};return s.expression=a,s.variables=i,s;function u(e){var t=e.type;if("FunctionNode"===t)throw new Error("There is an unsolved function call");if("OperatorNode"===t)if("^"===e.op){if("ConstantNode"!==e.args[1].type||!fe(parseFloat(e.args[1].value)))throw new Error("There is a non-integer exponent");u(e.args[0])}else{if(-1===o.indexOf(e.op))throw new Error("Operator "+e.op+" invalid in polynomial expression");for(var r=0;r<e.args.length;r++)u(e.args[r])}else if("SymbolNode"===t){var n=e.name,a=i.indexOf(n);-1===a&&i.push(n)}else if("ParenthesisNode"===t)u(e.content);else if("ConstantNode"!==t)throw new Error("type "+t+" is not allowed in polynomial expression")}}function _(){var e=[M,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},w,{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"1*n",r:"n"}],t=[{l:"(-n1)/(-n2)",r:"n1/n2"},{l:"(-n1)*(-n2)",r:"n1*n2"},{l:"n1--n2",r:"n1+n2"},{l:"n1-n2",r:"n1+(-n2)"},{l:"(n1+n2)*n3",r:"(n1*n3 + n2*n3)"},{l:"n1*(n2+n3)",r:"(n1*n2+n1*n3)"},{l:"c1*n + c2*n",r:"(c1+c2)*n"},{l:"c1*n + n",r:"(c1+1)*n"},{l:"c1*n - c2*n",r:"(c1-c2)*n"},{l:"c1*n - n",r:"(c1-1)*n"},{l:"v/c",r:"(1/c)*v"},{l:"v/-c",r:"-(1/c)*v"},{l:"-v*-c",r:"c*v"},{l:"-v*c",r:"-c*v"},{l:"v*-c",r:"-c*v"},{l:"v*c",r:"c*v"},{l:"-(-n1*n2)",r:"(n1*n2)"},{l:"-(n1*n2)",r:"(-n1*n2)"},{l:"-(-n1+n2)",r:"(n1-n2)"},{l:"-(n1+n2)",r:"(-n1-n2)"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"},{l:"-(-n1/n2)",r:"(n1/n2)"},{l:"-(n1/n2)",r:"(-n1/n2)"}],r=[{l:"(n1/n2 + n3/n4)",r:"((n1*n4 + n3*n2)/(n2*n4))"},{l:"(n1/n2 + n3)",r:"((n1 + n3*n2)/n2)"},{l:"(n1 + n2/n3)",r:"((n1*n3 + n2)/n3)"}],n=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}],i={};return i.firstRules=e.concat(t,n),i.distrDivRules=r,i.sucDivRules=n,i.firstRulesAgain=e.concat(t),i.finalRules=[M,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},w,{l:"n*-n^n1",r:"-n^(n1+1)"},{l:"n*n^n1",r:"n^(n1+1)"},{l:"n^n1*-n^n2",r:"-n^(n1+n2)"},{l:"n^n1*n^n2",r:"n^(n1+n2)"},{l:"n^n1*-n",r:"-n^(n1+1)"},{l:"n^n1*n",r:"n^(n1+1)"},{l:"n^n1/-n",r:"-n^(n1-1)"},{l:"n^n1/n",r:"n^(n1-1)"},{l:"n/-n^n1",r:"-n^(1-n1)"},{l:"n/n^n1",r:"n^(1-n1)"},{l:"n^n1/-n^n2",r:"n^(n1-n2)"},{l:"n^n1/n^n2",r:"n^(n1-n2)"},{l:"n1+(-n2*n3)",r:"n1-n2*n3"},{l:"v*(-c)",r:"-c*v"},{l:"n1+-n2",r:"n1-n2"},{l:"v*c",r:"c*v"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"}],i}function S(e,t,r){var n=e.type,i=arguments.length>1;if("OperatorNode"===n&&e.isBinary()){var a,o=!1;if("^"===e.op&&("ParenthesisNode"!==e.args[0].type&&"OperatorNode"!==e.args[0].type||"ConstantNode"!==e.args[1].type||(a=parseFloat(e.args[1].value),o=a>=2&&fe(a))),o){if(a>2){var s=e.args[0],u=new g("^","pow",[e.args[0].cloneDeep(),new m(a-1)]);e=new g("*","multiply",[s,u])}else e=new g("*","multiply",[e.args[0],e.args[0].cloneDeep()]);i&&("content"===r?t.content=e:t.args[r]=e)}}if("ParenthesisNode"===n)S(e.content,e,"content");else if("ConstantNode"!==n&&"SymbolNode"!==n)for(var c=0;c<e.args.length;c++)S(e.args[c],e,c);if(!i)return e}function N(e,t){void 0===t&&(t=[]),t[0]=0;var r={cte:1,oper:"+",fire:""},n=0,i="";l(e,null,r),n=t.length-1;for(var a,o=!0,s=n;s>=0;s--)if(0!==t[s]){var u=new m(o?t[s]:Math.abs(t[s])),c=t[s]<0?"-":"+";if(s>0){var f=new y(i);if(s>1){var h=new m(s);f=new g("^","pow",[f,h])}u=-1===t[s]&&o?new g("-","unaryMinus",[f]):1===Math.abs(t[s])?f:new g("*","multiply",[u,f])}a=o?u:"+"===c?new g("+","add",[a,u]):new g("-","subtract",[a,u]),o=!1}return o?new m(0):a;function l(e,r,a){var o=e.type;if("FunctionNode"===o)throw new Error("There is an unsolved function call");if("OperatorNode"===o){if(-1==="+-*^".indexOf(e.op))throw new Error("Operator "+e.op+" invalid");if(null!==r){if(("unaryMinus"===e.fn||"pow"===e.fn)&&"add"!==r.fn&&"subtract"!==r.fn&&"multiply"!==r.fn)throw new Error("Invalid "+e.op+" placing");if(("subtract"===e.fn||"add"===e.fn||"multiply"===e.fn)&&"add"!==r.fn&&"subtract"!==r.fn)throw new Error("Invalid "+e.op+" placing");if(("subtract"===e.fn||"add"===e.fn||"unaryMinus"===e.fn)&&0!==a.noFil)throw new Error("Invalid "+e.op+" placing")}"^"!==e.op&&"*"!==e.op||(a.fire=e.op);for(var s=0;s<e.args.length;s++)"unaryMinus"===e.fn&&(a.oper="-"),"+"!==e.op&&"subtract"!==e.fn||(a.fire="",a.cte=1,a.oper=0===s?"+":e.op),a.noFil=s,l(e.args[s],e,a)}else if("SymbolNode"===o){if(e.name!==i&&""!==i)throw new Error("There is more than one variable");if(i=e.name,null===r)return void(t[1]=1);if("^"===r.op&&0!==a.noFil)throw new Error("In power the variable should be the first parameter");if("*"===r.op&&1!==a.noFil)throw new Error("In multiply the variable should be the second parameter");""!==a.fire&&"*"!==a.fire||(n<1&&(t[1]=0),t[1]+=a.cte*("+"===a.oper?1:-1),n=Math.max(1,n))}else{if("ConstantNode"!==o)throw new Error("Type "+o+" is not allowed");var u=parseFloat(e.value);if(null===r)return void(t[0]=u);if("^"===r.op){if(1!==a.noFil)throw new Error("Constant cannot be powered");if(!fe(u)||u<=0)throw new Error("Non-integer exponent is not allowed");for(var c=n+1;c<u;c++)t[c]=0;return u>n&&(t[u]=0),t[u]+=a.cte*("+"===a.oper?1:-1),void(n=Math.max(u,n))}a.cte=u,""===a.fire&&(t[0]+=a.cte*("+"===a.oper?1:-1))}}}}),$E="Parser",KE=["evaluate"],JE=bt($E,KE,e=>{var{evaluate:t}=e;function r(){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:Zn(),writable:!1})}return r.prototype.type="Parser",r.prototype.isParser=!0,r.prototype.evaluate=function(e){return t(e,this.scope)},r.prototype.get=function(e){if(this.scope.has(e))return this.scope.get(e)},r.prototype.getAll=function(){return Vn(this.scope)},r.prototype.getAllAsMap=function(){return this.scope},r.prototype.set=function(e,t){return this.scope.set(e,t),t},r.prototype.remove=function(e){this.scope.delete(e)},r.prototype.clear=function(){this.scope.clear()},r},{isClass:!0}),YE={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","complex","fraction","index","matrix","string","unit"]},XE={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},QE={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},eA={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},tA={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},rA={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue"]},nA={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},iA={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},aA={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},oA={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero"]},sA={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},uA={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},cA={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},fA={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},hA={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables,and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},lA={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},dA={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},pA={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},mA={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},gA={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},vA={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},yA={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},bA={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},wA={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},MA={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},xA={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},_A={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},SA={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},NA={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},EA={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},AA={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},DA={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},kA={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},OA={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},CA={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the hyperbolic arccosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},TA={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},RA={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the hyperbolic arccotangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},BA={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},IA={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},qA={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},PA={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","sum","variance"]},jA={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},zA={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:"Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probablity are: Number, BigNumber. \n\nIn case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.",examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},LA={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},UA={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},FA={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dim)"],description:"Compute the minimum value of a list of values.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},HA={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},ZA={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dim)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},WA={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dim)"],description:"Compute the maximum value of a list of values.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},VA={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},GA={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},$A={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},KA={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},JA={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},YA={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},XA={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},QA={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},eD={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},tD={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},rD={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},nD={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},iD={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},aD={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},oD={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},sD={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},uD={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]},cD={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},fD={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},hD={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},lD={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},dD={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},pD={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},mD={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},gD={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},vD={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},yD={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},bD={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},wD={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},MD={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},xD={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},_D={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},SD={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},ND={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},ED={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},AD={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},DD={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of a matrix or string. Indexes are one-based. Both the ranges lower-bound and upper-bound are included.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},kD={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},OD={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"])',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},CD={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},TD={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicant the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["diff([1, 2, 4, 7, 0])","diff([1, 2, 4, 7, 0], 0)","diff(matrix([1, 2, 4, 7, 0]))","diff([[1, 2], [3, 4]])","diff([[1, 2], [3, 4]], 0)","diff([[1, 2], [3, 4]], 1)","diff([[1, 2], [3, 4]], bignumber(1))","diff(matrix([[1, 2], [3, 4]]), 1)","diff([[1, 2], matrix([3, 4])], 1)"],seealso:["subtract","partitionSelect"]},RD={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])"],seealso:["size","squeeze","resize"]},BD={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},ID={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},qD={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1)'],seealso:["sort"]},PD={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},jD={name:"map",category:"Matrix",syntax:["map(x, callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array.",examples:["map([1, 2, 3], square)"],seealso:["filter","forEach"]},zD={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},LD={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},UD={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["forEach([1, 2, 3], function(val) { console.log(val) })"],seealso:["map","sort","filter"]},FD={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]},HD={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},ZD={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},WD={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},VD={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},GD={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},$D={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},KD={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},JD={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]},YD={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},XD={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]},QD={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},ek={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},tk={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},rk={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},nk={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},ik={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},ak={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},ok={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate([expr1, expr2, expr3, ...])"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(" + 4 + ")")'],seealso:[]},sk={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},uk={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},ck={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},fk={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},hk={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number, number": f(x)=x+x })',"double(2)",'double("hello")'],seealso:[]},lk={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},dk={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},pk={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"he Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers"]},mk={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},gk={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},vk={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},yk={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},bk={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},wk={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},Mk={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},xk={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},_k={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},Sk={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},Nk={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},Ek={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},Ak={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},Dk={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},kk={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[1, 2], [3, 4]])"],seealso:["sqrt","abs","square","multiply"]},Ok={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},Ck={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>1, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},Tk={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)"],seealso:["ceil","floor","fix"]},Rk={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},Bk={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},Ik={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},qk={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},Pk={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},jk={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]},zk={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},Lk={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},Uk={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},Fk={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},Hk={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},Zk={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenusa of a list with values. ",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},Wk={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},Vk={name:"floor",category:"Arithmetic",syntax:["floor(x)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)"],seealso:["ceil","fix","round"]},Gk={name:"fix",category:"Arithmetic",syntax:["fix(x)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)"],seealso:["ceil","floor","round"]},$k={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},Kk={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},Jk={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and eigenvectors of a real symmetric matrix",examples:["eigs([[5, 2.3], [2.3, 1]])"],seealso:["inv"]},Yk={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]},Xk={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},Qk={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},eO={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},tO={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},rO={name:"ceil",category:"Arithmetic",syntax:["ceil(x)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)"],seealso:["floor","fix","round"]},nO={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},iO={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},aO={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},oO={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]},sO={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]},uO={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]},cO={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},fO={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},hO={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["derivative","parse","evaluate"]},lO={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},dO={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]},pO={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]},mO={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},gO={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},vO={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},yO={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},bO={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},wO={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},MO={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},xO={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]},_O={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},SO={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},NO={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},EO={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},AO={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},DO={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},kO={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},OO={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},CO={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},TO={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]},RO={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},BO={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},IO={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},qO={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},PO={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","boolean","complex","fraction","index","matrix","string","unit"]},jO={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},zO={name:"matrixFromFunction",category:"Matrix",syntax:["math.matrixFromFunction(size, fn)","math.matrixFromFunction(size, fn, format)","math.matrixFromFunction(size, fn, format, datatype)","math.matrixFromFunction(size, format, fn)","math.matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]},LO={name:"matrixFromRows",category:"Matrix",syntax:["math.matrixFromRows(...arr)","math.matrixFromRows(row1, row2)","math.matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]},UO={name:"matrixFromColumns",category:"Matrix",syntax:["math.matrixFromColumns(...arr)","math.matrixFromColumns(row1, row2)","math.matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]},FO={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["[]","[1, 2, 3]","A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[0:2, 0:2] = ones(2, 2)"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]},HO={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(num,den)"],description:"Create a fraction from a number or from a numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},ZO={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},WO={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},VO={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},GO={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},$O={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},KO={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},JO={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},YO={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},XO={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "BigNumber")','numeric("4", "Fraction)','numeric(4, "Fraction")','numeric(fraction(2, 5), "number)'],seealso:["number","fraction","bignumber","string","format"]},QO={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]},eC={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]},tC={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]},rC={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], math.pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]},nC={bignumber:YE,boolean:VO,complex:WO,createUnit:ZO,fraction:HO,index:FO,matrix:jO,number:PO,sparse:qO,splitUnit:IO,string:BO,unit:RO,e:TO,E:TO,false:CO,i:OO,Infinity:kO,LN2:DO,LN10:AO,LOG2E:EO,LOG10E:NO,NaN:SO,null:_O,pi:xO,PI:xO,phi:MO,SQRT1_2:wO,SQRT2:bO,tau:yO,true:vO,version:gO,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant",examples:["coulomb"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Borh magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Borh radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:mO,lsolve:dO,lsolveAll:pO,lup:lO,lusolve:$O,simplify:hO,rationalize:fO,slu:cO,usolve:sO,usolveAll:uO,qr:oO,abs:aO,add:iO,cbrt:nO,ceil:rO,cube:tO,divide:eO,dotDivide:Qk,dotMultiply:Xk,dotPow:GO,exp:Yk,expm:Kk,expm1:$k,fix:Gk,floor:Vk,gcd:Wk,hypot:Zk,lcm:Hk,log:Fk,log2:Uk,log1p:Lk,log10:zk,mod:jk,multiply:Pk,norm:qk,nthRoot:Ik,nthRoots:Bk,pow:Rk,round:Tk,sign:Ck,sqrt:Ok,sqrtm:kk,square:Dk,subtract:KO,unaryMinus:Ak,unaryPlus:Ek,xgcd:Nk,bitAnd:Sk,bitNot:_k,bitOr:xk,bitXor:Mk,leftShift:wk,rightArithShift:bk,rightLogShift:yk,bellNumbers:vk,catalan:gk,composition:mk,stirlingS2:pk,config:dk,import:lk,typed:hk,arg:fk,conj:ck,re:uk,im:sk,evaluate:ok,help:ak,distance:ik,intersect:nk,and:rk,not:tk,or:ek,xor:QD,concat:YD,count:XD,cross:JD,column:QO,ctranspose:KD,det:$D,diag:GD,diff:TD,dot:VD,getMatrixDataType:WD,identity:ZD,filter:HD,flatten:FD,forEach:UD,inv:LD,eigs:Jk,kron:zD,matrixFromFunction:zO,matrixFromRows:LO,matrixFromColumns:UO,map:jD,ones:PD,partitionSelect:qD,range:ID,resize:BD,reshape:RD,rotate:rC,rotationMatrix:tC,row:eC,size:CD,sort:OD,squeeze:kD,subset:DD,trace:AD,transpose:ED,zeros:ND,combinations:_D,combinationsWithRep:SD,factorial:xD,gamma:MD,kldivergence:wD,multinomial:bD,permutations:yD,pickRandom:vD,random:gD,randomInt:mD,compare:pD,compareNatural:dD,compareText:lD,deepEqual:hD,equal:fD,equalText:cD,larger:uD,largerEq:sD,smaller:oD,smallerEq:aD,unequal:iD,setCartesian:nD,setDifference:rD,setDistinct:tD,setIntersect:eD,setIsSubset:QA,setMultiplicity:XA,setPowerset:YA,setSize:JA,setSymDifference:KA,setUnion:$A,erf:GA,mad:VA,max:WA,mean:ZA,median:HA,min:FA,mode:UA,prod:LA,quantileSeq:zA,std:jA,sum:PA,variance:JO,acos:qA,acosh:IA,acot:BA,acoth:RA,acsc:TA,acsch:CA,asec:OA,asech:kA,asin:DA,asinh:AA,atan:EA,atanh:NA,atan2:SA,cos:_A,cosh:xA,cot:MA,coth:wA,csc:bA,csch:yA,sec:vA,sech:gA,sin:YO,sinh:mA,tan:pA,tanh:dA,to:lA,clone:hA,format:sA,bin:uA,oct:cA,hex:fA,isNaN:oA,isInteger:aA,isNegative:iA,isNumeric:rA,hasNumericValue:nA,isPositive:tA,isPrime:eA,isZero:QE,typeOf:XE,numeric:XO},iC="help",aC=["typed","mathWithTransform","Help"],oC=bt(iC,aC,e=>{var{typed:t,mathWithTransform:r,Help:n}=e;return t(iC,{any:function(e){var t,i=e;if("string"!==typeof e)for(t in r)if(ee(r,t)&&e===r[t]){i=t;break}var a=Bn(nC,i);if(!a){var o="function"===typeof i?i.name:i;throw new Error('No documentation found on "'+o+'"')}return new n(a)}})}),sC="derivative",uC=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],cC=bt(sC,uC,e=>{var{typed:t,config:r,parse:n,simplify:i,equal:a,isZero:o,numeric:s,ConstantNode:u,FunctionNode:c,OperatorNode:f,ParenthesisNode:h,SymbolNode:l}=e,d=t("derivative",{"Node, SymbolNode, Object":function(e,t,r){var n={};m(n,e,t.name);var a=g(e,n);return r.simplify?i(a):a},"Node, SymbolNode":function(e,t){return this(e,t,{simplify:!0})},"string, SymbolNode":function(e,t){return this(n(e),t)},"string, SymbolNode, Object":function(e,t,r){return this(n(e),t,r)},"string, string":function(e,t){return this(n(e),n(t))},"string, string, Object":function(e,t,r){return this(n(e),n(t),r)},"Node, string":function(e,t){return this(e,n(t))},"Node, string, Object":function(e,t,r){return this(e,n(t),r)}});d._simplify=!0,d.toTex=function(e){return p.apply(null,e.args)};var p=t("_derivTex",{"Node, SymbolNode":function(e,t){return B(e)&&"string"===W(e.value)?p(n(e.value).toString(),t.toString(),1):p(e.toString(),t.toString(),1)},"Node, ConstantNode":function(e,t){if("string"===W(t.value))return p(e,n(t.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(e,t,r){return p(e.toString(),t.name,r.value)},"string, string, number":function(e,t,r){var n;return n=1===r?"{d\\over d"+t+"}":"{d^{"+r+"}\\over d"+t+"^{"+r+"}}",n+"\\left[".concat(e,"\\right]")}}),m=t("constTag",{"Object, ConstantNode, string":function(e,t){return e[t]=!0,!0},"Object, SymbolNode, string":function(e,t,r){return t.name!==r&&(e[t]=!0,!0)},"Object, ParenthesisNode, string":function(e,t,r){return m(e,t.content,r)},"Object, FunctionAssignmentNode, string":function(e,t,r){return-1===t.params.indexOf(r)?(e[t]=!0,!0):m(e,t.expr,r)},"Object, FunctionNode | OperatorNode, string":function(e,t,r){if(t.args.length>0){for(var n=m(e,t.args[0],r),i=1;i<t.args.length;++i)n=m(e,t.args[i],r)&&n;if(n)return e[t]=!0,!0}return!1}}),g=t("_derivative",{"ConstantNode, Object":function(e){return y(0)},"SymbolNode, Object":function(e,t){return void 0!==t[e]?y(0):y(1)},"ParenthesisNode, Object":function(e,t){return new h(g(e.content,t))},"FunctionAssignmentNode, Object":function(e,t){return void 0!==t[e]?y(0):g(e.expr,t)},"FunctionNode, Object":function(e,t){if(1!==e.args.length&&v(e),void 0!==t[e])return y(0);var r,n,i,a,o=e.args[0],s=!1,u=!1;switch(e.name){case"cbrt":s=!0,n=new f("*","multiply",[y(3),new f("^","pow",[o,new f("/","divide",[y(2),y(3)])])]);break;case"sqrt":case"nthRoot":if(1===e.args.length)s=!0,n=new f("*","multiply",[y(2),new c("sqrt",[o])]);else if(2===e.args.length)return r=new f("/","divide",[y(1),e.args[1]]),t[r]=t[e.args[1]],g(new f("^","pow",[o,r]),t);break;case"log10":r=y(10);case"log":if(r||1!==e.args.length){if(1===e.args.length&&r||2===e.args.length&&void 0!==t[e.args[1]])n=new f("*","multiply",[o.clone(),new c("log",[r||e.args[1]])]),s=!0;else if(2===e.args.length)return g(new f("/","divide",[new c("log",[o]),new c("log",[e.args[1]])]),t)}else n=o.clone(),s=!0;break;case"pow":return t[r]=t[e.args[1]],g(new f("^","pow",[o,e.args[1]]),t);case"exp":n=new c("exp",[o.clone()]);break;case"sin":n=new c("cos",[o.clone()]);break;case"cos":n=new f("-","unaryMinus",[new c("sin",[o.clone()])]);break;case"tan":n=new f("^","pow",[new c("sec",[o.clone()]),y(2)]);break;case"sec":n=new f("*","multiply",[e,new c("tan",[o.clone()])]);break;case"csc":u=!0,n=new f("*","multiply",[e,new c("cot",[o.clone()])]);break;case"cot":u=!0,n=new f("^","pow",[new c("csc",[o.clone()]),y(2)]);break;case"asin":s=!0,n=new c("sqrt",[new f("-","subtract",[y(1),new f("^","pow",[o.clone(),y(2)])])]);break;case"acos":s=!0,u=!0,n=new c("sqrt",[new f("-","subtract",[y(1),new f("^","pow",[o.clone(),y(2)])])]);break;case"atan":s=!0,n=new f("+","add",[new f("^","pow",[o.clone(),y(2)]),y(1)]);break;case"asec":s=!0,n=new f("*","multiply",[new c("abs",[o.clone()]),new c("sqrt",[new f("-","subtract",[new f("^","pow",[o.clone(),y(2)]),y(1)])])]);break;case"acsc":s=!0,u=!0,n=new f("*","multiply",[new c("abs",[o.clone()]),new c("sqrt",[new f("-","subtract",[new f("^","pow",[o.clone(),y(2)]),y(1)])])]);break;case"acot":s=!0,u=!0,n=new f("+","add",[new f("^","pow",[o.clone(),y(2)]),y(1)]);break;case"sinh":n=new c("cosh",[o.clone()]);break;case"cosh":n=new c("sinh",[o.clone()]);break;case"tanh":n=new f("^","pow",[new c("sech",[o.clone()]),y(2)]);break;case"sech":u=!0,n=new f("*","multiply",[e,new c("tanh",[o.clone()])]);break;case"csch":u=!0,n=new f("*","multiply",[e,new c("coth",[o.clone()])]);break;case"coth":u=!0,n=new f("^","pow",[new c("csch",[o.clone()]),y(2)]);break;case"asinh":s=!0,n=new c("sqrt",[new f("+","add",[new f("^","pow",[o.clone(),y(2)]),y(1)])]);break;case"acosh":s=!0,n=new c("sqrt",[new f("-","subtract",[new f("^","pow",[o.clone(),y(2)]),y(1)])]);break;case"atanh":s=!0,n=new f("-","subtract",[y(1),new f("^","pow",[o.clone(),y(2)])]);break;case"asech":s=!0,u=!0,n=new f("*","multiply",[o.clone(),new c("sqrt",[new f("-","subtract",[y(1),new f("^","pow",[o.clone(),y(2)])])])]);break;case"acsch":s=!0,u=!0,n=new f("*","multiply",[new c("abs",[o.clone()]),new c("sqrt",[new f("+","add",[new f("^","pow",[o.clone(),y(2)]),y(1)])])]);break;case"acoth":s=!0,u=!0,n=new f("-","subtract",[y(1),new f("^","pow",[o.clone(),y(2)])]);break;case"abs":n=new f("/","divide",[new c(new l("abs"),[o.clone()]),o.clone()]);break;case"gamma":default:throw new Error('Function "'+e.name+'" is not supported by derivative, or a wrong number of arguments is passed')}s?(i="/",a="divide"):(i="*",a="multiply");var h=g(o,t);return u&&(h=new f("-","unaryMinus",[h])),new f(i,a,[h,n])},"OperatorNode, Object":function(e,t){if(void 0!==t[e])return y(0);if("+"===e.op)return new f(e.op,e.fn,e.args.map((function(e){return g(e,t)})));if("-"===e.op){if(e.isUnary())return new f(e.op,e.fn,[g(e.args[0],t)]);if(e.isBinary())return new f(e.op,e.fn,[g(e.args[0],t),g(e.args[1],t)])}if("*"===e.op){var r=e.args.filter((function(e){return void 0!==t[e]}));if(r.length>0){var n=e.args.filter((function(e){return void 0===t[e]})),i=1===n.length?n[0]:new f("*","multiply",n),s=r.concat(g(i,t));return new f("*","multiply",s)}return new f("+","add",e.args.map((function(r){return new f("*","multiply",e.args.map((function(e){return e===r?g(e,t):e.clone()})))})))}if("/"===e.op&&e.isBinary()){var u=e.args[0],h=e.args[1];return void 0!==t[h]?new f("/","divide",[g(u,t),h]):void 0!==t[u]?new f("*","multiply",[new f("-","unaryMinus",[u]),new f("/","divide",[g(h,t),new f("^","pow",[h.clone(),y(2)])])]):new f("/","divide",[new f("-","subtract",[new f("*","multiply",[g(u,t),h.clone()]),new f("*","multiply",[u.clone(),g(h,t)])]),new f("^","pow",[h.clone(),y(2)])])}if("^"===e.op&&e.isBinary()){var l=e.args[0],d=e.args[1];if(void 0!==t[l])return B(l)&&(o(l.value)||a(l.value,1))?y(0):new f("*","multiply",[e,new f("*","multiply",[new c("log",[l.clone()]),g(d.clone(),t)])]);if(void 0!==t[d]){if(B(d)){if(o(d.value))return y(0);if(a(d.value,1))return g(l,t)}var p=new f("^","pow",[l.clone(),new f("-","subtract",[d,y(1)])]);return new f("*","multiply",[d.clone(),new f("*","multiply",[g(l,t),p])])}return new f("*","multiply",[new f("^","pow",[l.clone(),d.clone()]),new f("+","add",[new f("*","multiply",[g(l,t),new f("/","divide",[d.clone(),l.clone()])]),new f("*","multiply",[g(d,t),new c("log",[l.clone()])])])])}throw new Error('Operator "'+e.op+'" is not supported by derivative, or a wrong number of arguments is passed')}});function v(e){if("log"!==e.name&&"nthRoot"!==e.name&&"pow"!==e.name||2!==e.args.length){for(var t=0;t<e.args.length;++t)e.args[t]=y(0);throw e.compile().evaluate(),new Error("Expected TypeError, but none found")}}function y(e,t){return new u(s(e,t||r.number))}return d}),fC="parser",hC=["typed","Parser"],lC=bt(fC,hC,e=>{var{typed:t,Parser:r}=e;return t(fC,{"":function(){return new r}})}),dC="compile",pC=["typed","parse"],mC=bt(dC,pC,e=>{var{typed:t,parse:r}=e;return t(dC,{string:function(e){return r(e).compile()},"Array | Matrix":function(e){return ii(e,(function(e){return r(e).compile()}))}})}),gC="apply",vC=["typed","isInteger"],yC=bt(gC,vC,e=>{var{typed:t,isInteger:r}=e,n=Da({typed:t,isInteger:r});return t("apply",{"...any":function(e){var t=e[1];s(t)?e[1]=t-1:u(t)&&(e[1]=t.minus(1));try{return n.apply(null,e)}catch(r){throw rE(r)}}})},{isTransformFunction:!0});function bC(e,t,r){var n=e.filter((function(e){return H(e)&&!(e.name in t)&&!r.has(e.name)}))[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var i=n.name,a=vE(r),o=e.compile();return function(e){return a.set(i,e),o.evaluate(a)}}var wC="filter",MC=["typed"],xC=bt(wC,MC,e=>{var{typed:t}=e;function r(e,t,r){var i,a;return e[0]&&(i=e[0].compile().evaluate(r)),e[1]&&(a=H(e[1])||I(e[1])?e[1].compile().evaluate(r):bC(e[1],t,r)),n(i,a)}r.rawArgs=!0;var n=t("filter",{"Array, function":_C,"Matrix, function":function(e,t){return e.create(_C(e.toArray(),t))},"Array, RegExp":dt,"Matrix, RegExp":function(e,t){return e.create(dt(e.toArray(),t))}});return r},{isTransformFunction:!0});function _C(e,t){var r=jt(t);return lt(e,(function(e,n,i){return 1===r?t(e):2===r?t(e,[n+1]):t(e,[n+1],i)}))}var SC="map",NC=["typed"],EC=bt(SC,NC,e=>{var{typed:t}=e;function r(e,t,r){var i,a;return e[0]&&(i=e[0].compile().evaluate(r)),e[1]&&(a=H(e[1])||I(e[1])?e[1].compile().evaluate(r):bC(e[1],t,r)),n(i,a)}r.rawArgs=!0;var n=t("map",{"Array, function":function(e,t){return AC(e,t,e)},"Matrix, function":function(e,t){return e.create(AC(e.valueOf(),t,e))}});return r},{isTransformFunction:!0});function AC(e,t,r){var n=jt(t);function i(e,a){return Array.isArray(e)?ft(e,(function(e,t){return i(e,a.concat(t+1))})):1===n?t(e):2===n?t(e,a):t(e,a,r)}return i(e,[])}var DC="forEach",kC=["typed"],OC=bt(DC,kC,e=>{var{typed:t}=e;function r(e,t,r){var i,a;return e[0]&&(i=e[0].compile().evaluate(r)),e[1]&&(a=H(e[1])||I(e[1])?e[1].compile().evaluate(r):bC(e[1],t,r)),n(i,a)}r.rawArgs=!0;var n=t("forEach",{"Array | Matrix, function":function(e,t){var r=jt(t),n=function n(i,a){Array.isArray(i)?ht(i,(function(e,t){n(e,a.concat(t+1))})):1===r?t(i):2===r?t(i,a):t(i,a,e)};n(e.valueOf(),[])}});return r},{isTransformFunction:!0}),CC="subset",TC=["typed","matrix"],RC=bt(CC,TC,e=>{var{typed:t,matrix:r}=e,n=jh({typed:t,matrix:r});return t("subset",{"...any":function(e){try{return n.apply(null,e)}catch(t){throw rE(t)}}})},{isTransformFunction:!0}),BC="index",IC=["Index"],qC=bt(BC,IC,e=>{var{Index:t}=e;return function(){for(var e=[],r=0,n=arguments.length;r<n;r++){var i=arguments[r];if(y(i))i.start--,i.end-=i.step>0?0:2;else if(i&&!0===i.isSet)i=i.map((function(e){return e-1}));else if(d(i)||p(i))i=i.map((function(e){return e-1}));else if(s(i))i--;else if(u(i))i=i.toNumber()-1;else if("string"!==typeof i)throw new TypeError("Dimension must be an Array, Matrix, number, string, or Range");e[r]=i}var a=new t;return t.apply(a,e),a}},{isTransformFunction:!0}),PC="concat",jC=["typed","matrix","isInteger"],zC=bt(PC,jC,e=>{var{typed:t,matrix:r,isInteger:n}=e,i=gh({typed:t,matrix:r,isInteger:n});return t("concat",{"...any":function(e){var t=e.length-1,r=e[t];s(r)?e[t]=r-1:u(r)&&(e[t]=r.minus(1));try{return i.apply(null,e)}catch(n){throw rE(n)}}})},{isTransformFunction:!0});function LC(e){if(2===e.length&&m(e[0])){e=e.slice();var t=e[1];s(t)?e[1]=t-1:u(t)&&(e[1]=t.minus(1))}return e}var UC="max",FC=["typed","config","numeric","larger"],HC=bt(UC,FC,e=>{var{typed:t,config:r,numeric:n,larger:i}=e,a=dg({typed:t,config:r,numeric:n,larger:i});return t("max",{"...any":function(e){e=LC(e);try{return a.apply(null,e)}catch(t){throw rE(t)}}})},{isTransformFunction:!0}),ZC="min",WC=["typed","config","numeric","smaller"],VC=bt(ZC,WC,e=>{var{typed:t,config:r,numeric:n,smaller:i}=e,a=wm({typed:t,config:r,numeric:n,smaller:i});return t("min",{"...any":function(e){e=LC(e);try{return a.apply(null,e)}catch(t){throw rE(t)}}})},{isTransformFunction:!0}),GC="sum",$C=["typed","config","add","numeric"],KC=bt(GC,$C,e=>{var{typed:t,config:r,add:n,numeric:i}=e,a=Im({typed:t,config:r,add:n,numeric:i});return t(GC,{"...any":function(e){e=LC(e);try{return a.apply(null,e)}catch(t){throw rE(t)}}})},{isTransformFunction:!0}),JC="column",YC=["typed","Index","matrix","range"],XC=bt(JC,YC,e=>{var{typed:t,Index:r,matrix:n,range:i}=e,a=ry({typed:t,Index:r,matrix:n,range:i});return t("column",{"...any":function(e){var t=e.length-1,r=e[t];s(r)&&(e[t]=r-1);try{return a.apply(null,e)}catch(n){throw rE(n)}}})},{isTransformFunction:!0}),QC="range",eT=["typed","config","?matrix","?bignumber","smaller","smallerEq","larger","largerEq"],tT=bt(QC,eT,e=>{var{typed:t,config:r,matrix:n,bignumber:i,smaller:a,smallerEq:o,larger:s,largerEq:u}=e,c=tg({typed:t,config:r,matrix:n,bignumber:i,smaller:a,smallerEq:o,larger:s,largerEq:u});return t("range",{"...any":function(e){var t=e.length-1,r=e[t];return"boolean"!==typeof r&&e.push(!0),c.apply(null,e)}})},{isTransformFunction:!0}),rT="diff",nT=["typed","matrix","subtract","number","bignumber"],iT=bt(rT,nT,e=>{var{typed:t,matrix:r,subtract:n,number:i,bignumber:a}=e,o=Hg({typed:t,matrix:r,subtract:n,number:i,bignumber:a});return t(rT,{"...any":function(e){e=LC(e);try{return o.apply(null,e)}catch(t){throw rE(t)}}})},{isTransformFunction:!0}),aT="row",oT=["typed","Index","matrix","range"],sT=bt(aT,oT,e=>{var{typed:t,Index:r,matrix:n,range:i}=e,a=ig({typed:t,Index:r,matrix:n,range:i});return t("row",{"...any":function(e){var t=e.length-1,r=e[t];s(r)&&(e[t]=r-1);try{return a.apply(null,e)}catch(n){throw rE(n)}}})},{isTransformFunction:!0}),uT="mean",cT=["typed","add","divide"],fT=bt(uT,cT,e=>{var{typed:t,add:r,divide:n}=e,i=ky({typed:t,add:r,divide:n});return t("mean",{"...any":function(e){e=LC(e);try{return i.apply(null,e)}catch(t){throw rE(t)}}})},{isTransformFunction:!0}),hT="variance",lT=["typed","add","subtract","multiply","divide","apply","isNaN"],dT=bt(hT,lT,e=>{var{typed:t,add:r,subtract:n,multiply:i,divide:a,apply:o,isNaN:s}=e,u=Ry({typed:t,add:r,subtract:n,multiply:i,divide:a,apply:o,isNaN:s});return t(hT,{"...any":function(e){e=LC(e);try{return u.apply(null,e)}catch(t){throw rE(t)}}})},{isTransformFunction:!0}),pT="std",mT=["typed","sqrt","variance"],gT=bt(pT,mT,e=>{var{typed:t,sqrt:r,variance:n}=e,i=ab({typed:t,sqrt:r,variance:n});return t("std",{"...any":function(e){e=LC(e);try{return i.apply(null,e)}catch(t){throw rE(t)}}})},{isTransformFunction:!0}),vT={},yT={},bT={},wT=nN({mathWithTransform:yT}),MT=oN({Node:wT}),xT=cN({Node:wT,ResultSet:zb}),_T=MN({Node:wT}),ST=SN({Node:wT}),NT=AN({Node:wT}),ET=BN({Node:wT}),AT=PN({math:vT}),DT=LN({classes:bT}),kT=HN({Node:wT}),OT=VN({Node:wT}),CT=KN({Node:wT}),TT=XN({Node:wT,typed:lw}),RT=tE({Chain:AT,typed:lw}),BT=oE({Node:wT,subset:WM}),IT=cE({Node:wT,Range:Ub,size:ZM}),qT=dE({matrix:OM,Node:wT,subset:WM}),PT=gE({Unit:G_,Node:wT,math:vT}),jT=wE({Node:wT,SymbolNode:PT,math:vT}),zT=_E({AccessorNode:BT,ArrayNode:MT,AssignmentNode:qT,BlockNode:xT,ConditionalNode:kT,ConstantNode:_T,FunctionAssignmentNode:TT,FunctionNode:jT,IndexNode:IT,ObjectNode:ST,OperatorNode:OT,ParenthesisNode:NT,RangeNode:CT,RelationalNode:ET,SymbolNode:PT,config:ce,numeric:Wx,typed:lw}),LT=EE({parse:zT,typed:lw}),UT=kE({parse:zT}),FT=ZE({bignumber:zx,fraction:cM,ConstantNode:_T,FunctionNode:jT,OperatorNode:OT,ParenthesisNode:NT,SymbolNode:PT,add:ux,config:ce,divide:U_,equal:c_,isZero:hx,mathWithTransform:yT,multiply:mx,parse:zT,pow:xx,subtract:i_,typed:lw}),HT=GE({bignumber:zx,fraction:cM,ConstantNode:_T,FunctionNode:jT,OperatorNode:OT,ParenthesisNode:NT,SymbolNode:PT,add:ux,config:ce,divide:U_,equal:c_,isZero:hx,mathWithTransform:yT,multiply:mx,parse:zT,pow:xx,simplify:FT,subtract:i_,typed:lw}),ZT=JE({evaluate:LT}),WT=oC({Help:UT,mathWithTransform:yT,typed:lw}),VT=cC({ConstantNode:_T,FunctionNode:jT,OperatorNode:OT,ParenthesisNode:NT,SymbolNode:PT,config:ce,equal:c_,isZero:hx,numeric:Wx,parse:zT,simplify:FT,typed:lw}),GT=lC({Parser:ZT,typed:lw}),$T=mC({parse:zT,typed:lw});a()(vT,{reviver:DT,false:Fb,null:Hb,true:Zb,replacer:Gb,i:$b,LN10:Kb,LOG10E:Jb,NaN:Yb,pi:Xb,SQRT1_2:Qb,tau:ew,efimovFactor:tw,fineStructure:rw,sackurTetrode:nw,weakMixingAngle:iw,e:ow,Infinity:sw,LOG2E:uw,PI:Xb,version:cw,E:ow,phi:hw,typed:lw,isInteger:dw,isNumeric:pw,isPositive:mw,isNaN:gw,equalScalar:vw,number:yw,boolean:bw,complex:ww,splitUnit:Mw,unaryPlus:xw,apply:_w,cube:Sw,expm1:Nw,log10:Ew,multiplyScalar:Aw,sign:Dw,square:kw,bitNot:Ow,arg:Cw,im:Tw,not:Rw,filter:Bw,forEach:Iw,map:qw,erf:Pw,format:jw,oct:zw,print:Lw,isPrime:Uw,acos:Fw,acot:Hw,acsc:Zw,asec:Ww,asin:Vw,atan:Gw,atanh:$w,cosh:Kw,coth:Jw,csch:Yw,sech:Xw,sinh:Qw,tanh:eM,chain:RT,combinations:tM,pickRandom:rM,randomInt:nM,LN2:iM,clone:aM,hasNumericValue:oM,typeOf:sM,string:uM,fraction:cM,unaryMinus:fM,addScalar:hM,exp:lM,log2:dM,sqrt:pM,conj:mM,getMatrixDataType:gM,mode:vM,bin:yM,acosh:bM,acsch:wM,asinh:MM,cos:xM,csc:_M,sin:SM,combinationsWithRep:NM,random:EM,SQRT2:AM,isNegative:DM,matrix:OM,abs:CM,gcd:TM,mod:RM,nthRoot:BM,xgcd:IM,bitAnd:qM,bitXor:PM,or:jM,concat:zM,diag:LM,identity:UM,ones:FM,reshape:HM,size:ZM,subset:WM,zeros:VM,hex:GM,round:$M,leftShift:KM,rightLogShift:JM,compare:YM,compareText:XM,smaller:QM,larger:ex,unequal:tx,sparse:ix,acoth:ax,atan2:ox,sec:sx,add:ux,dot:cx,composition:fx,isZero:hx,matrixFromFunction:lx,cbrt:dx,floor:px,multiply:mx,dotMultiply:gx,re:vx,flatten:yx,resize:bx,squeeze:wx,to:Mx,pow:xx,dotPow:_x,rightArithShift:Sx,compareNatural:Nx,equalText:Ex,largerEq:Ax,partitionSelect:Dx,asech:Ox,tan:Cx,setDifference:Tx,setIntersect:Rx,setMultiplicity:Bx,setSize:Ix,trace:qx,quantileSeq:Px,gamma:jx,bignumber:zx,matrixFromColumns:Lx,lcm:Ux,bitOr:Fx,kron:Hx,transpose:Zx,numeric:Wx,and:Vx,smallerEq:Gx,sort:$x,min:Kx,cot:Jx,setDistinct:Yx,setPowerset:Xx,index:Qx,sum:e_,factorial:t_,permutations:r_,matrixFromRows:n_,subtract:i_,cross:a_,range:o_,row:s_,prod:u_,equal:c_,max:f_,setCartesian:h_,setSymDifference:l_,ceil:d_,xor:p_,count:m_,ctranspose:g_,deepEqual:v_,setIsSubset:y_,fix:b_,diff:w_,divideScalar:M_,nthRoots:x_,lsolve:__,lsolveAll:S_,setUnion:E_,lup:A_,slu:D_,det:k_,distance:O_,stirlingS2:C_,catalan:T_,column:R_,log:B_,dotDivide:I_,usolveAll:q_,hypot:P_,qr:j_,inv:z_,expm:L_,divide:U_,mean:F_,variance:H_,kldivergence:Z_,bellNumbers:W_,log1p:V_,createUnit:$_,sqrtm:K_,median:J_,std:Y_,atomicMass:X_,bohrMagneton:Q_,boltzmann:eS,conductanceQuantum:tS,deuteronMass:rS,electronMass:nS,faraday:iS,firstRadiation:aS,gravitationConstant:oS,hartreeEnergy:sS,klitzing:uS,magneticConstant:cS,molarMass:fS,molarPlanckConstant:hS,neutronMass:lS,planckCharge:dS,planckLength:pS,planckTemperature:mS,protonMass:gS,reducedPlanckConstant:vS,secondRadiation:yS,stefanBoltzmann:bS,vacuumImpedance:wS,usolve:MS,lusolve:xS,eigs:_S,mad:SS,avogadro:NS,classicalElectronRadius:ES,electricConstant:AS,fermiCoupling:DS,gravity:kS,loschmidt:OS,molarMassC12:CS,nuclearMagneton:TS,planckMass:RS,quantumOfCirculation:BS,speedOfLight:IS,wienDisplacement:qS,unit:PS,parse:zT,evaluate:LT,intersect:jS,simplify:FT,rationalize:HT,coulomb:zS,gasConstant:LS,magneticFluxQuantum:US,planckConstant:FS,rydberg:HS,norm:ZS,help:WT,derivative:VT,elementaryCharge:WS,molarVolume:VS,thomsonCrossSection:GS,rotationMatrix:$S,parser:GT,bohrRadius:KS,planckTime:JS,rotate:YS,multinomial:XS,compile:$T,inverseConductanceQuantum:QS,config:ce}),a()(yT,vT,{apply:yC({isInteger:dw,typed:lw}),filter:xC({typed:lw}),map:EC({typed:lw}),forEach:OC({typed:lw}),subset:RC({matrix:OM,typed:lw}),index:qC({Index:kx}),concat:zC({isInteger:dw,matrix:OM,typed:lw}),max:HC({config:ce,larger:ex,numeric:Wx,typed:lw}),min:VC({config:ce,numeric:Wx,smaller:QM,typed:lw}),sum:KC({add:ux,config:ce,numeric:Wx,typed:lw}),column:XC({Index:kx,matrix:OM,range:o_,typed:lw}),range:tT({bignumber:zx,matrix:OM,config:ce,larger:ex,largerEq:Ax,smaller:QM,smallerEq:Gx,typed:lw}),diff:iT({bignumber:zx,matrix:OM,number:yw,subtract:i_,typed:lw}),row:sT({Index:kx,matrix:OM,range:o_,typed:lw}),mean:fT({add:ux,divide:U_,typed:lw}),variance:dT({add:ux,apply:_w,divide:U_,isNaN:gw,multiply:mx,subtract:i_,typed:lw}),std:gT({sqrt:pM,typed:lw,variance:H_})}),a()(bT,{ResultSet:zb,Complex:Lb,Range:Ub,Node:wT,ArrayNode:MT,BlockNode:xT,ConstantNode:_T,ObjectNode:ST,ParenthesisNode:NT,RelationalNode:ET,Chain:AT,BigNumber:Wb,Matrix:Vb,ConditionalNode:kT,OperatorNode:OT,Fraction:aw,RangeNode:CT,DenseMatrix:fw,FunctionAssignmentNode:TT,SparseMatrix:kM,ImmutableDenseMatrix:rx,FibonacciHeap:nx,AccessorNode:BT,IndexNode:IT,Index:kx,AssignmentNode:qT,Spa:N_,Unit:G_,SymbolNode:PT,FunctionNode:jT,Help:UT,Parser:ZT}),AT.createProxy(vT);var KT={createBigNumberClass:yr},JT={createComplexClass:Ct},YT={createMatrixClass:Mr},XT={MatrixDependencies:YT,createDenseMatrixClass:Cn},QT={createFractionClass:Dn},eR={BigNumberDependencies:KT,ComplexDependencies:JT,DenseMatrixDependencies:XT,FractionDependencies:QT,createTyped:Yn},tR={createResultSet:Et},rR={createRangeClass:Bt},nR={typedDependencies:eR,createClone:Uu},iR={typedDependencies:eR,createIsInteger:hi},aR={typedDependencies:eR,createIsNegative:ef},oR={typedDependencies:eR,createIsNumeric:pi},sR={isNumericDependencies:oR,typedDependencies:eR,createHasNumericValue:Zu},uR={typedDependencies:eR,createIsPositive:_i},cR={typedDependencies:eR,createIsZero:od},fR={typedDependencies:eR,createIsNaN:Ei},hR={typedDependencies:eR,createTypeOf:Gu},lR={typedDependencies:eR,createEqualScalar:Ci},dR={MatrixDependencies:YT,equalScalarDependencies:lR,typedDependencies:eR,createSparseMatrixClass:nf},pR={typedDependencies:eR,createNumber:qi},mR={typedDependencies:eR,createString:Ju},gR={typedDependencies:eR,createBoolean:zi},vR={BigNumberDependencies:KT,typedDependencies:eR,createBignumber:Hp},yR={ComplexDependencies:JT,typedDependencies:eR,createComplex:Fi},bR={FractionDependencies:QT,typedDependencies:eR,createFraction:Qu},wR={DenseMatrixDependencies:XT,MatrixDependencies:YT,SparseMatrixDependencies:dR,typedDependencies:eR,createMatrix:sf},MR={isZeroDependencies:cR,matrixDependencies:wR,typedDependencies:eR,createMatrixFromFunction:cd},xR={matrixDependencies:wR,typedDependencies:eR,createFlatten:Ad},_R={matrixDependencies:wR,typedDependencies:eR,createSize:Ih},SR={flattenDependencies:xR,matrixDependencies:wR,sizeDependencies:_R,typedDependencies:eR,createMatrixFromRows:Wm},NR={flattenDependencies:xR,matrixDependencies:wR,sizeDependencies:_R,typedDependencies:eR,createMatrixFromColumns:Vp},ER={typedDependencies:eR,createSplitUnit:Wi},AR={typedDependencies:eR,createUnaryMinus:rc},DR={BigNumberDependencies:KT,typedDependencies:eR,createUnaryPlus:Na},kR={typedDependencies:eR,createAbs:ff},OR={isIntegerDependencies:iR,typedDependencies:eR,createApply:Da},CR={typedDependencies:eR,createAddScalar:ac},TR={BigNumberDependencies:KT,ComplexDependencies:JT,FractionDependencies:QT,isNegativeDependencies:aR,matrixDependencies:wR,typedDependencies:eR,unaryMinusDependencies:AR,createCbrt:ld},RR={BigNumberDependencies:KT,matrixDependencies:wR,typedDependencies:eR,createZeros:Wh},BR={BigNumberDependencies:KT,DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,zerosDependencies:RR,createRound:rl},IR={equalScalarDependencies:lR,matrixDependencies:wR,roundDependencies:BR,typedDependencies:eR,createCeil:xg},qR={typedDependencies:eR,createCube:Ra},PR={typedDependencies:eR,createExp:uc},jR={ComplexDependencies:JT,typedDependencies:eR,createExpm1:qa},zR={equalScalarDependencies:lR,matrixDependencies:wR,roundDependencies:BR,typedDependencies:eR,createFloor:md},LR={ComplexDependencies:JT,ceilDependencies:IR,floorDependencies:zR,matrixDependencies:wR,typedDependencies:eR,createFix:Lg},UR={BigNumberDependencies:KT,DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createGcd:Df},FR={equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createLcm:Kp},HR={ComplexDependencies:JT,typedDependencies:eR,createLog10:za},ZR={ComplexDependencies:JT,typedDependencies:eR,createLog2:hc},WR={DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createMod:Vf},VR={typedDependencies:eR,createMultiplyScalar:Fa},GR={typedDependencies:eR,createConj:vc},$R={addScalarDependencies:CR,conjDependencies:GR,multiplyScalarDependencies:VR,sizeDependencies:_R,typedDependencies:eR,createDot:ed},KR={addScalarDependencies:CR,dotDependencies:$R,equalScalarDependencies:lR,matrixDependencies:wR,multiplyScalarDependencies:VR,typedDependencies:eR,createMultiply:yd},JR={BigNumberDependencies:KT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createNthRoot:Xf},YR={BigNumberDependencies:KT,FractionDependencies:QT,complexDependencies:yR,typedDependencies:eR,createSign:Wa},XR={ComplexDependencies:JT,typedDependencies:eR,createSqrt:pc},QR={typedDependencies:eR,createSquare:$a},eB={DenseMatrixDependencies:XT,addScalarDependencies:CR,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,unaryMinusDependencies:AR,createSubtract:$m},tB={BigNumberDependencies:KT,matrixDependencies:wR,typedDependencies:eR,createXgcd:th},rB={equalScalarDependencies:lR,matrixDependencies:wR,multiplyScalarDependencies:VR,typedDependencies:eR,createDotMultiply:Md},nB={equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createBitAnd:ih},iB={typedDependencies:eR,createBitNot:mo},aB={DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createBitOr:Xp},oB={DenseMatrixDependencies:XT,matrixDependencies:wR,typedDependencies:eR,createBitXor:fh},sB={typedDependencies:eR,createArg:yo},uB={typedDependencies:eR,createIm:Mo},cB={typedDependencies:eR,createRe:Sd},fB={typedDependencies:eR,createNot:Oo},hB={DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createOr:dh},lB={DenseMatrixDependencies:XT,matrixDependencies:wR,typedDependencies:eR,createXor:Ng},dB={isIntegerDependencies:iR,matrixDependencies:wR,typedDependencies:eR,createConcat:gh},pB={DenseMatrixDependencies:XT,matrixDependencies:wR,typedDependencies:eR,createSmaller:Ml},mB={DenseMatrixDependencies:XT,smallerDependencies:pB,createImmutableDenseMatrixClass:Ol},gB={ImmutableDenseMatrixDependencies:mB,createIndexClass:fp},vB={DenseMatrixDependencies:XT,matrixDependencies:wR,typedDependencies:eR,createLarger:Sl},yB={DenseMatrixDependencies:XT,matrixDependencies:wR,typedDependencies:eR,createLargerEq:ip},bB={DenseMatrixDependencies:XT,matrixDependencies:wR,typedDependencies:eR,createSmallerEq:dm},wB={bignumberDependencies:vR,matrixDependencies:wR,largerDependencies:vB,largerEqDependencies:yB,smallerDependencies:pB,smallerEqDependencies:bB,typedDependencies:eR,createRange:tg},MB={IndexDependencies:gB,matrixDependencies:wR,rangeDependencies:wB,typedDependencies:eR,createColumn:ry},xB={bignumberDependencies:vR,fractionDependencies:bR,numberDependencies:pR,createNumeric:sm},_B={multiplyScalarDependencies:VR,numericDependencies:xB,typedDependencies:eR,createProd:sg},SB={prodDependencies:_B,sizeDependencies:_R,typedDependencies:eR,createCount:Dg},NB={matrixDependencies:wR,multiplyDependencies:KR,subtractDependencies:eB,typedDependencies:eR,createCross:Xm},EB={DenseMatrixDependencies:XT,SparseMatrixDependencies:dR,matrixDependencies:wR,typedDependencies:eR,createDiag:wh},AB={typedDependencies:eR,createFilter:Ro},DB={typedDependencies:eR,createForEach:Po},kB={typedDependencies:eR,createGetMatrixDataType:wc},OB={BigNumberDependencies:KT,DenseMatrixDependencies:XT,SparseMatrixDependencies:dR,matrixDependencies:wR,typedDependencies:eR,createIdentity:_h},CB={matrixDependencies:wR,multiplyScalarDependencies:VR,typedDependencies:eR,createKron:tm},TB={typedDependencies:eR,createMap:Uo},RB={matrixDependencies:wR,numberDependencies:pR,subtractDependencies:eB,typedDependencies:eR,createDiff:Hg},BB={BigNumberDependencies:KT,matrixDependencies:wR,typedDependencies:eR,createOnes:Eh},IB={isIntegerDependencies:iR,matrixDependencies:wR,typedDependencies:eR,createReshape:kh},qB={matrixDependencies:wR,createResize:Cd},PB={typedDependencies:eR,createCos:jc},jB={DenseMatrixDependencies:XT,SparseMatrixDependencies:dR,addScalarDependencies:CR,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createAdd:Yl},zB={matrixDependencies:wR,typedDependencies:eR,createTranspose:im},LB={conjDependencies:GR,transposeDependencies:zB,typedDependencies:eR,createCtranspose:Cg},UB={typedDependencies:eR,createAtan:eu},FB={numericDependencies:xB,typedDependencies:eR,createDivideScalar:Vg},HB={DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createEqual:fg},ZB={largerDependencies:vB,smallerDependencies:pB,createFibonacciHeapClass:Rl},WB={FibonacciHeapDependencies:ZB,addScalarDependencies:CR,equalScalarDependencies:lR,createSpaClass:av},VB={DenseMatrixDependencies:XT,SpaDependencies:WB,SparseMatrixDependencies:dR,absDependencies:kR,addScalarDependencies:CR,divideScalarDependencies:FB,equalScalarDependencies:lR,largerDependencies:vB,matrixDependencies:wR,multiplyScalarDependencies:VR,subtractDependencies:eB,typedDependencies:eR,unaryMinusDependencies:AR,createLup:hv},GB={lupDependencies:VB,matrixDependencies:wR,multiplyDependencies:KR,subtractDependencies:eB,typedDependencies:eR,unaryMinusDependencies:AR,createDet:Zv},$B={absDependencies:kR,addScalarDependencies:CR,detDependencies:GB,divideScalarDependencies:FB,identityDependencies:OB,matrixDependencies:wR,multiplyDependencies:KR,typedDependencies:eR,unaryMinusDependencies:AR,createInv:wy},KB={addScalarDependencies:CR,complexDependencies:yR,conjDependencies:GR,divideScalarDependencies:FB,equalDependencies:HB,identityDependencies:OB,isZeroDependencies:cR,matrixDependencies:wR,multiplyScalarDependencies:VR,signDependencies:YR,sqrtDependencies:XR,subtractDependencies:eB,typedDependencies:eR,unaryMinusDependencies:AR,zerosDependencies:RR,createQr:vy},JB={typedDependencies:eR,createSin:Zc},YB={DenseMatrixDependencies:XT,divideScalarDependencies:FB,equalScalarDependencies:lR,matrixDependencies:wR,multiplyScalarDependencies:VR,subtractDependencies:eB,typedDependencies:eR,createUsolve:ub},XB={DenseMatrixDependencies:XT,divideScalarDependencies:FB,equalScalarDependencies:lR,matrixDependencies:wR,multiplyScalarDependencies:VR,subtractDependencies:eB,typedDependencies:eR,createUsolveAll:hy},QB={absDependencies:kR,addDependencies:jB,addScalarDependencies:CR,atanDependencies:UB,bignumberDependencies:vR,columnDependencies:MB,complexDependencies:yR,cosDependencies:PB,diagDependencies:EB,divideScalarDependencies:FB,dotDependencies:$R,equalDependencies:HB,flattenDependencies:xR,imDependencies:uB,invDependencies:$B,largerDependencies:vB,matrixDependencies:wR,matrixFromColumnsDependencies:NR,multiplyDependencies:KR,multiplyScalarDependencies:VR,numberDependencies:pR,qrDependencies:KB,reDependencies:cB,sinDependencies:JB,smallerDependencies:pB,sqrtDependencies:XR,subtractDependencies:eB,typedDependencies:eR,usolveDependencies:YB,usolveAllDependencies:XB,createEigs:vb},eI={ComplexDependencies:JT,fractionDependencies:bR,identityDependencies:OB,matrixDependencies:wR,multiplyDependencies:KR,numberDependencies:pR,typedDependencies:eR,createPow:Ld},tI={absDependencies:kR,addDependencies:jB,conjDependencies:GR,ctransposeDependencies:LB,eigsDependencies:QB,equalScalarDependencies:lR,largerDependencies:vB,matrixDependencies:wR,multiplyDependencies:KR,powDependencies:eI,smallerDependencies:pB,sqrtDependencies:XR,typedDependencies:eR,createNorm:kb},rI={BigNumberDependencies:KT,DenseMatrixDependencies:XT,SparseMatrixDependencies:dR,addScalarDependencies:CR,cosDependencies:PB,matrixDependencies:wR,multiplyScalarDependencies:VR,normDependencies:tI,sinDependencies:JB,typedDependencies:eR,unaryMinusDependencies:AR,createRotationMatrix:Tb},nI={multiplyDependencies:KR,rotationMatrixDependencies:rI,typedDependencies:eR,createRotate:Ib},iI={IndexDependencies:gB,matrixDependencies:wR,rangeDependencies:wB,typedDependencies:eR,createRow:ig},aI={matrixDependencies:wR,typedDependencies:eR,createSqueeze:Bd},oI={matrixDependencies:wR,typedDependencies:eR,createSubset:jh},sI={typedDependencies:eR,createErf:Wo},uI={isNaNDependencies:fR,isNumericDependencies:oR,typedDependencies:eR,createMode:_c},cI={typedDependencies:eR,createFormat:Qo},fI={formatDependencies:cI,typedDependencies:eR,createBin:Ec},hI={formatDependencies:cI,typedDependencies:eR,createOct:rs},lI={formatDependencies:cI,typedDependencies:eR,createHex:$h},dI={typedDependencies:eR,createPrint:as},pI={matrixDependencies:wR,typedDependencies:eR,createTo:Pd},mI={typedDependencies:eR,createIsPrime:cs},gI={ComplexDependencies:JT,divideScalarDependencies:FB,typedDependencies:eR,createLog:ay},vI={ComplexDependencies:JT,divideScalarDependencies:FB,logDependencies:gI,typedDependencies:eR,createLog1p:Fy},yI={ComplexDependencies:JT,divideScalarDependencies:FB,typedDependencies:eR,createNthRoots:Kg},bI={DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,powDependencies:eI,typedDependencies:eR,createDotPow:Hd},wI={DenseMatrixDependencies:XT,divideScalarDependencies:FB,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createDotDivide:uy},MI={DenseMatrixDependencies:XT,divideScalarDependencies:FB,equalScalarDependencies:lR,matrixDependencies:wR,multiplyScalarDependencies:VR,subtractDependencies:eB,typedDependencies:eR,createLsolve:Qg},xI={DenseMatrixDependencies:XT,divideScalarDependencies:FB,equalScalarDependencies:lR,matrixDependencies:wR,multiplyScalarDependencies:VR,subtractDependencies:eB,typedDependencies:eR,createLsolveAll:rv},_I={DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,zerosDependencies:RR,createLeftShift:cl},SI={DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,zerosDependencies:RR,createRightArithShift:Vd},NI={DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,zerosDependencies:RR,createRightLogShift:ll},EI={equalScalarDependencies:lR,matrixDependencies:wR,notDependencies:fB,typedDependencies:eR,zerosDependencies:RR,createAnd:fm},AI={BigNumberDependencies:KT,DenseMatrixDependencies:XT,FractionDependencies:QT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createCompare:ml},DI={compareDependencies:AI,typedDependencies:eR,createCompareNatural:Yd},kI={matrixDependencies:wR,typedDependencies:eR,createCompareText:yl},OI={compareTextDependencies:kI,isZeroDependencies:cR,typedDependencies:eR,createEqualText:tp},CI={equalDependencies:HB,typedDependencies:eR,createDeepEqual:Bg},TI={DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createUnequal:Al},RI={compareDependencies:AI,isNaNDependencies:fR,isNumericDependencies:oR,typedDependencies:eR,createPartitionSelect:sp},BI={compareDependencies:AI,compareNaturalDependencies:DI,matrixDependencies:wR,typedDependencies:eR,createSort:gm},II={largerDependencies:vB,numericDependencies:xB,typedDependencies:eR,createMax:dg},qI={numericDependencies:xB,smallerDependencies:pB,typedDependencies:eR,createMin:wm},PI={BigNumberDependencies:KT,ComplexDependencies:JT,FractionDependencies:QT,absDependencies:kR,addScalarDependencies:CR,divideScalarDependencies:FB,equalDependencies:HB,fixDependencies:LR,formatDependencies:cI,isNumericDependencies:oR,multiplyScalarDependencies:VR,numberDependencies:pR,powDependencies:eI,roundDependencies:BR,subtractDependencies:eB,createUnitClass:Gy},jI={UnitDependencies:PI,typedDependencies:eR,createUnitFunction:_b},zI={SparseMatrixDependencies:dR,typedDependencies:eR,createSparse:ql},LI={UnitDependencies:PI,typedDependencies:eR,createCreateUnit:Jy},UI={ComplexDependencies:JT,typedDependencies:eR,createAcos:ls},FI={ComplexDependencies:JT,typedDependencies:eR,createAcosh:kc},HI={BigNumberDependencies:KT,typedDependencies:eR,createAcot:Fs},ZI={BigNumberDependencies:KT,ComplexDependencies:JT,typedDependencies:eR,createAcoth:zl},WI={BigNumberDependencies:KT,ComplexDependencies:JT,typedDependencies:eR,createAcsc:Ws},VI={BigNumberDependencies:KT,typedDependencies:eR,createAcsch:Tc},GI={BigNumberDependencies:KT,ComplexDependencies:JT,typedDependencies:eR,createAsec:$s},$I={BigNumberDependencies:KT,ComplexDependencies:JT,typedDependencies:eR,createAsech:dp},KI={ComplexDependencies:JT,typedDependencies:eR,createAsin:Ys},JI={typedDependencies:eR,createAsinh:Ic},YI={BigNumberDependencies:KT,DenseMatrixDependencies:XT,equalScalarDependencies:lR,matrixDependencies:wR,typedDependencies:eR,createAtan2:Wl},XI={ComplexDependencies:JT,typedDependencies:eR,createAtanh:nu},QI={typedDependencies:eR,createCosh:ou},eq={BigNumberDependencies:KT,typedDependencies:eR,createCot:_m},tq={BigNumberDependencies:KT,typedDependencies:eR,createCoth:cu},rq={BigNumberDependencies:KT,typedDependencies:eR,createCsc:Uc},nq={BigNumberDependencies:KT,typedDependencies:eR,createCsch:lu},iq={BigNumberDependencies:KT,typedDependencies:eR,createSec:$l},aq={BigNumberDependencies:KT,typedDependencies:eR,createSech:mu},oq={typedDependencies:eR,createSinh:yu},sq={typedDependencies:eR,createTan:gp},uq={typedDependencies:eR,createTanh:Mu},cq={DenseMatrixDependencies:XT,IndexDependencies:gB,compareNaturalDependencies:DI,sizeDependencies:_R,subsetDependencies:oI,typedDependencies:eR,createSetCartesian:gg},fq={DenseMatrixDependencies:XT,IndexDependencies:gB,compareNaturalDependencies:DI,sizeDependencies:_R,subsetDependencies:oI,typedDependencies:eR,createSetDifference:bp},hq={DenseMatrixDependencies:XT,IndexDependencies:gB,compareNaturalDependencies:DI,sizeDependencies:_R,subsetDependencies:oI,typedDependencies:eR,createSetDistinct:Em},lq={DenseMatrixDependencies:XT,IndexDependencies:gB,compareNaturalDependencies:DI,sizeDependencies:_R,subsetDependencies:oI,typedDependencies:eR,createSetIntersect:xp},dq={IndexDependencies:gB,compareNaturalDependencies:DI,sizeDependencies:_R,subsetDependencies:oI,typedDependencies:eR,createSetIsSubset:Pg},pq={IndexDependencies:gB,compareNaturalDependencies:DI,sizeDependencies:_R,subsetDependencies:oI,typedDependencies:eR,createSetMultiplicity:Np},mq={IndexDependencies:gB,compareNaturalDependencies:DI,sizeDependencies:_R,subsetDependencies:oI,typedDependencies:eR,createSetPowerset:km},gq={compareNaturalDependencies:DI,typedDependencies:eR,createSetSize:Dp},vq={IndexDependencies:gB,concatDependencies:dB,setDifferenceDependencies:fq,sizeDependencies:_R,subsetDependencies:oI,typedDependencies:eR,createSetSymDifference:bg},yq={IndexDependencies:gB,concatDependencies:dB,setIntersectDependencies:lq,setSymDifferenceDependencies:vq,sizeDependencies:_R,subsetDependencies:oI,typedDependencies:eR,createSetUnion:uv},bq={absDependencies:kR,addScalarDependencies:CR,divideScalarDependencies:FB,isPositiveDependencies:uR,multiplyScalarDependencies:VR,smallerDependencies:pB,sqrtDependencies:XR,typedDependencies:eR,createHypot:py},wq={addDependencies:jB,matrixDependencies:wR,typedDependencies:eR,createTrace:Cp},Mq={IndexDependencies:gB,typedDependencies:eR,createIndex:Tm},xq={createNode:nN},_q={NodeDependencies:xq,subsetDependencies:oI,createAccessorNode:oE},Sq={NodeDependencies:xq,createArrayNode:oN},Nq={matrixDependencies:wR,NodeDependencies:xq,subsetDependencies:oI,createAssignmentNode:dE},Eq={NodeDependencies:xq,ResultSetDependencies:tR,createBlockNode:cN},Aq={NodeDependencies:xq,createConditionalNode:HN},Dq={NodeDependencies:xq,createConstantNode:MN},kq={NodeDependencies:xq,typedDependencies:eR,createFunctionAssignmentNode:XN},Oq={NodeDependencies:xq,RangeDependencies:rR,sizeDependencies:_R,createIndexNode:cE},Cq={NodeDependencies:xq,createObjectNode:SN},Tq={NodeDependencies:xq,createOperatorNode:VN},Rq={NodeDependencies:xq,createParenthesisNode:AN},Bq={NodeDependencies:xq,createRangeNode:KN},Iq={NodeDependencies:xq,createRelationalNode:BN},qq={UnitDependencies:PI,NodeDependencies:xq,createSymbolNode:gE},Pq={NodeDependencies:xq,SymbolNodeDependencies:qq,createFunctionNode:wE},jq={AccessorNodeDependencies:_q,ArrayNodeDependencies:Sq,AssignmentNodeDependencies:Nq,BlockNodeDependencies:Eq,ConditionalNodeDependencies:Aq,ConstantNodeDependencies:Dq,FunctionAssignmentNodeDependencies:kq,FunctionNodeDependencies:Pq,IndexNodeDependencies:Oq,ObjectNodeDependencies:Cq,OperatorNodeDependencies:Tq,ParenthesisNodeDependencies:Rq,RangeNodeDependencies:Bq,RelationalNodeDependencies:Iq,SymbolNodeDependencies:qq,numericDependencies:xB,typedDependencies:eR,createParse:_E},zq={parseDependencies:jq,typedDependencies:eR,createCompile:mC},Lq={parseDependencies:jq,typedDependencies:eR,createEvaluate:EE},Uq={evaluateDependencies:Lq,createParserClass:JE},Fq={ParserDependencies:Uq,typedDependencies:eR,createParser:lC},Hq={SparseMatrixDependencies:dR,absDependencies:kR,addDependencies:jB,divideScalarDependencies:FB,largerDependencies:vB,largerEqDependencies:yB,multiplyDependencies:KR,subtractDependencies:eB,transposeDependencies:zB,typedDependencies:eR,createSlu:Uv},Zq={DenseMatrixDependencies:XT,lsolveDependencies:MI,lupDependencies:VB,matrixDependencies:wR,sluDependencies:Hq,typedDependencies:eR,usolveDependencies:YB,createLusolve:lb},Wq={parseDependencies:jq,createHelpClass:kE},Vq={createChainClass:PN},Gq={HelpDependencies:Wq,typedDependencies:eR,createHelp:oC},$q={ChainDependencies:Vq,typedDependencies:eR,createChain:tE},Kq={absDependencies:kR,addDependencies:jB,identityDependencies:OB,invDependencies:$B,multiplyDependencies:KR,typedDependencies:eR,createExpm:_y},Jq={absDependencies:kR,addDependencies:jB,identityDependencies:OB,invDependencies:$B,maxDependencies:II,multiplyDependencies:KR,sizeDependencies:_R,sqrtDependencies:XR,subtractDependencies:eB,typedDependencies:eR,createSqrtm:Qy},Yq={divideScalarDependencies:FB,equalScalarDependencies:lR,invDependencies:$B,matrixDependencies:wR,multiplyDependencies:KR,typedDependencies:eR,createDivide:Ey},Xq={absDependencies:kR,addScalarDependencies:CR,divideScalarDependencies:FB,multiplyScalarDependencies:VR,sqrtDependencies:XR,subtractDependencies:eB,typedDependencies:eR,unaryMinusDependencies:AR,createDistance:Gv},Qq={absDependencies:kR,addDependencies:jB,addScalarDependencies:CR,divideScalarDependencies:FB,equalScalarDependencies:lR,flattenDependencies:xR,matrixDependencies:wR,multiplyDependencies:KR,multiplyScalarDependencies:VR,smallerDependencies:pB,subtractDependencies:eB,typedDependencies:eR,createIntersect:Eb},eP={addDependencies:jB,numericDependencies:xB,typedDependencies:eR,createSum:Im},tP={addDependencies:jB,divideDependencies:Yq,typedDependencies:eR,createMean:ky},rP={addDependencies:jB,compareDependencies:AI,divideDependencies:Yq,partitionSelectDependencies:RI,typedDependencies:eR,createMedian:rb},nP={absDependencies:kR,mapDependencies:TB,medianDependencies:rP,subtractDependencies:eB,typedDependencies:eR,createMad:wb},iP={addDependencies:jB,applyDependencies:OR,divideDependencies:Yq,isNaNDependencies:fR,multiplyDependencies:KR,subtractDependencies:eB,typedDependencies:eR,createVariance:Ry},aP={addDependencies:jB,compareDependencies:AI,multiplyDependencies:KR,partitionSelectDependencies:RI,typedDependencies:eR,createQuantileSeq:Bp},oP={sqrtDependencies:XR,typedDependencies:eR,varianceDependencies:iP,createStd:ab},sP={typedDependencies:eR,createCombinations:Eu},uP={typedDependencies:eR,createCombinationsWithRep:Gc},cP={BigNumberDependencies:KT,ComplexDependencies:JT,multiplyScalarDependencies:VR,powDependencies:eI,typedDependencies:eR,createGamma:Lp},fP={gammaDependencies:cP,typedDependencies:eR,createFactorial:jm},hP={divideDependencies:Yq,dotDivideDependencies:wI,isNumericDependencies:oR,logDependencies:gI,matrixDependencies:wR,multiplyDependencies:KR,sumDependencies:eP,typedDependencies:eR,createKldivergence:qy},lP={addDependencies:jB,divideDependencies:Yq,factorialDependencies:fP,isIntegerDependencies:iR,isPositiveDependencies:uR,multiplyDependencies:KR,typedDependencies:eR,createMultinomial:jb},dP={factorialDependencies:fP,typedDependencies:eR,createPermutations:Um},pP={typedDependencies:eR,createPickRandom:Bu},mP={typedDependencies:eR,createRandom:Yc},gP={typedDependencies:eR,createRandomInt:ju},vP={addScalarDependencies:CR,combinationsDependencies:sP,divideScalarDependencies:FB,factorialDependencies:fP,isIntegerDependencies:iR,isNegativeDependencies:aR,largerDependencies:vB,multiplyScalarDependencies:VR,powDependencies:eI,subtractDependencies:eB,typedDependencies:eR,createStirlingS2:Jv},yP={addScalarDependencies:CR,isIntegerDependencies:iR,isNegativeDependencies:aR,stirlingS2Dependencies:vP,typedDependencies:eR,createBellNumbers:zy},bP={addScalarDependencies:CR,combinationsDependencies:sP,divideScalarDependencies:FB,isIntegerDependencies:iR,isNegativeDependencies:aR,multiplyScalarDependencies:VR,typedDependencies:eR,createCatalan:Qv},wP={addScalarDependencies:CR,combinationsDependencies:sP,isIntegerDependencies:iR,isNegativeDependencies:aR,isPositiveDependencies:uR,largerDependencies:vB,typedDependencies:eR,createComposition:nd},MP={bignumberDependencies:vR,fractionDependencies:bR,ConstantNodeDependencies:Dq,FunctionNodeDependencies:Pq,OperatorNodeDependencies:Tq,ParenthesisNodeDependencies:Rq,SymbolNodeDependencies:qq,addDependencies:jB,divideDependencies:Yq,equalDependencies:HB,isZeroDependencies:cR,multiplyDependencies:KR,parseDependencies:jq,powDependencies:eI,subtractDependencies:eB,typedDependencies:eR,createSimplify:ZE},xP={ConstantNodeDependencies:Dq,FunctionNodeDependencies:Pq,OperatorNodeDependencies:Tq,ParenthesisNodeDependencies:Rq,SymbolNodeDependencies:qq,equalDependencies:HB,isZeroDependencies:cR,numericDependencies:xB,parseDependencies:jq,simplifyDependencies:MP,typedDependencies:eR,createDerivative:cC},_P={bignumberDependencies:vR,fractionDependencies:bR,ConstantNodeDependencies:Dq,FunctionNodeDependencies:Pq,OperatorNodeDependencies:Tq,ParenthesisNodeDependencies:Rq,SymbolNodeDependencies:qq,addDependencies:jB,divideDependencies:Yq,equalDependencies:HB,isZeroDependencies:cR,multiplyDependencies:KR,parseDependencies:jq,powDependencies:eI,simplifyDependencies:MP,subtractDependencies:eB,typedDependencies:eR,createRationalize:GE},SP={createReviver:LN},NP={createReplacer:Sr},EP={BigNumberDependencies:KT,createE:tr},AP={eDependencies:EP,createUppercaseE:hr},DP={createFalse:Kt},kP={ComplexDependencies:JT,createI:cr},OP={BigNumberDependencies:KT,createInfinity:Yt},CP={BigNumberDependencies:KT,createLN10:ir},TP={BigNumberDependencies:KT,createLN2:nr},RP={BigNumberDependencies:KT,createLOG10E:or},BP={BigNumberDependencies:KT,createLOG2E:ar},IP={BigNumberDependencies:KT,createNaN:Xt},qP={createNull:Jt},PP={BigNumberDependencies:KT,createPhi:rr},jP={BigNumberDependencies:KT,createPi:Qt},zP={piDependencies:jP,createUppercasePi:fr},LP={BigNumberDependencies:KT,createSQRT1_2:sr},UP={BigNumberDependencies:KT,createSQRT2:ur},FP={BigNumberDependencies:KT,createTau:er},HP={createTrue:$t},ZP={createVersion:lr},WP={BigNumberDependencies:KT,UnitDependencies:PI,createAtomicMass:en},VP={BigNumberDependencies:KT,UnitDependencies:PI,createAvogadro:tn},GP={BigNumberDependencies:KT,UnitDependencies:PI,createBohrMagneton:Br},$P={BigNumberDependencies:KT,UnitDependencies:PI,createBohrRadius:Lr},KP={BigNumberDependencies:KT,UnitDependencies:PI,createBoltzmann:rn},JP={BigNumberDependencies:KT,UnitDependencies:PI,createClassicalElectronRadius:Ur},YP={BigNumberDependencies:KT,UnitDependencies:PI,createConductanceQuantum:Ir},XP={BigNumberDependencies:KT,UnitDependencies:PI,createCoulomb:Tr},QP={BigNumberDependencies:KT,UnitDependencies:PI,createDeuteronMass:Gr},ej={BigNumberDependencies:KT,createEfimovFactor:Qr},tj={BigNumberDependencies:KT,UnitDependencies:PI,createElectricConstant:Or},rj={BigNumberDependencies:KT,UnitDependencies:PI,createElectronMass:Fr},nj={BigNumberDependencies:KT,UnitDependencies:PI,createElementaryCharge:Rr},ij={BigNumberDependencies:KT,UnitDependencies:PI,createFaraday:nn},aj={BigNumberDependencies:KT,UnitDependencies:PI,createFermiCoupling:Hr},oj={BigNumberDependencies:KT,createFineStructure:Zr},sj={BigNumberDependencies:KT,UnitDependencies:PI,createFirstRadiation:an},uj={BigNumberDependencies:KT,UnitDependencies:PI,createGasConstant:sn},cj={BigNumberDependencies:KT,UnitDependencies:PI,createGravitationConstant:Er},fj={BigNumberDependencies:KT,UnitDependencies:PI,createGravity:gn},hj={BigNumberDependencies:KT,UnitDependencies:PI,createHartreeEnergy:Wr},lj={BigNumberDependencies:KT,UnitDependencies:PI,createInverseConductanceQuantum:qr},dj={BigNumberDependencies:KT,UnitDependencies:PI,createKlitzing:zr},pj={BigNumberDependencies:KT,UnitDependencies:PI,createLoschmidt:on},mj={BigNumberDependencies:KT,UnitDependencies:PI,createMagneticConstant:kr},gj={BigNumberDependencies:KT,UnitDependencies:PI,createMagneticFluxQuantum:Pr},vj={BigNumberDependencies:KT,UnitDependencies:PI,createMolarMass:pn},yj={BigNumberDependencies:KT,UnitDependencies:PI,createMolarMassC12:mn},bj={BigNumberDependencies:KT,UnitDependencies:PI,createMolarPlanckConstant:un},wj={BigNumberDependencies:KT,UnitDependencies:PI,createMolarVolume:cn},Mj={BigNumberDependencies:KT,UnitDependencies:PI,createNeutronMass:$r},xj={BigNumberDependencies:KT,UnitDependencies:PI,createNuclearMagneton:jr},_j={BigNumberDependencies:KT,UnitDependencies:PI,createPlanckCharge:wn},Sj={BigNumberDependencies:KT,UnitDependencies:PI,createPlanckConstant:Ar},Nj={BigNumberDependencies:KT,UnitDependencies:PI,createPlanckLength:vn},Ej={BigNumberDependencies:KT,UnitDependencies:PI,createPlanckMass:yn},Aj={BigNumberDependencies:KT,UnitDependencies:PI,createPlanckTemperature:Mn},Dj={BigNumberDependencies:KT,UnitDependencies:PI,createPlanckTime:bn},kj={BigNumberDependencies:KT,UnitDependencies:PI,createProtonMass:Vr},Oj={BigNumberDependencies:KT,UnitDependencies:PI,createQuantumOfCirculation:Kr},Cj={BigNumberDependencies:KT,UnitDependencies:PI,createReducedPlanckConstant:Dr},Tj={BigNumberDependencies:KT,UnitDependencies:PI,createRydberg:Jr},Rj={BigNumberDependencies:KT,createSackurTetrode:fn},Bj={BigNumberDependencies:KT,UnitDependencies:PI,createSecondRadiation:hn},Ij={BigNumberDependencies:KT,UnitDependencies:PI,createSpeedOfLight:Nr},qj={BigNumberDependencies:KT,UnitDependencies:PI,createStefanBoltzmann:ln},Pj={BigNumberDependencies:KT,UnitDependencies:PI,createThomsonCrossSection:Yr},jj={BigNumberDependencies:KT,UnitDependencies:PI,createVacuumImpedance:Cr},zj={BigNumberDependencies:KT,createWeakMixingAngle:Xr},Lj={BigNumberDependencies:KT,UnitDependencies:PI,createWienDisplacement:dn},Uj={isIntegerDependencies:iR,typedDependencies:eR,createApplyTransform:yC},Fj={IndexDependencies:gB,matrixDependencies:wR,rangeDependencies:wB,typedDependencies:eR,createColumnTransform:XC},Hj={typedDependencies:eR,createFilterTransform:xC},Zj={typedDependencies:eR,createForEachTransform:OC},Wj={IndexDependencies:gB,createIndexTransform:qC},Vj={typedDependencies:eR,createMapTransform:EC},Gj={largerDependencies:vB,numericDependencies:xB,typedDependencies:eR,createMaxTransform:HC},$j={addDependencies:jB,divideDependencies:Yq,typedDependencies:eR,createMeanTransform:fT},Kj={numericDependencies:xB,smallerDependencies:pB,typedDependencies:eR,createMinTransform:VC},Jj={bignumberDependencies:vR,matrixDependencies:wR,largerDependencies:vB,largerEqDependencies:yB,smallerDependencies:pB,smallerEqDependencies:bB,typedDependencies:eR,createRangeTransform:tT},Yj={IndexDependencies:gB,matrixDependencies:wR,rangeDependencies:wB,typedDependencies:eR,createRowTransform:sT},Xj={matrixDependencies:wR,typedDependencies:eR,createSubsetTransform:RC},Qj={isIntegerDependencies:iR,matrixDependencies:wR,typedDependencies:eR,createConcatTransform:zC},ez={bignumberDependencies:vR,matrixDependencies:wR,numberDependencies:pR,subtractDependencies:eB,typedDependencies:eR,createDiffTransform:iT},tz={sqrtDependencies:XR,typedDependencies:eR,varianceDependencies:iP,createStdTransform:gT},rz={addDependencies:jB,numericDependencies:xB,typedDependencies:eR,createSumTransform:KC},nz={addDependencies:jB,applyDependencies:OR,divideDependencies:Yq,isNaNDependencies:fR,multiplyDependencies:KR,subtractDependencies:eB,typedDependencies:eR,createVarianceTransform:dT},iz=n,az=r("c0e2"),oz=r.n(az);function sz(e){var t=new oz.a;return e.on=t.on.bind(t),e.off=t.off.bind(t),e.once=t.once.bind(t),e.emit=t.emit.bind(t),e}function uz(e,t,r,n){function i(e,t){var r=arguments.length;if(1!==r&&2!==r)throw new Dd("import",r,1,2);function n(e,r,i){if(Array.isArray(r))r.forEach(t=>n(e,t));else if("object"===typeof r)for(var a in r)ee(r,a)&&n(e,r[a],a);else if(wt(r)||void 0!==i){var o=wt(r)?w(r)?r.fn+".transform":r.fn:i;if(ee(e,o)&&e[o]!==r&&!t.silent)throw new Error('Cannot import "'+o+'" twice');e[o]=r}else if(!t.silent)throw new TypeError("Factory, Object, or Array expected")}t||(t={});var i={};for(var o in n(i,e),i)if(ee(i,o)){var s=i[o];if(wt(s))d(s,t);else if(m(s))a(o,s,t);else if(!t.silent)throw new TypeError("Factory, Object, or Array expected")}}function a(t,i,a){if(a.wrap&&"function"===typeof i&&(i=l(i)),v(i)&&(i=e(t,{[i.signature]:i})),g(r[t])&&g(i))return i=a.override?e(t,i.signatures):e(r[t],i),r[t]=i,delete n[t],o(t,i),void r.emit("import",t,(function(){return i}));if(void 0===r[t]||a.override)return r[t]=i,delete n[t],o(t,i),void r.emit("import",t,(function(){return i}));if(!a.silent)throw new Error('Cannot import "'+t+'": already exists')}function o(e,t){t&&"function"===typeof t.transform?(r.expression.transform[e]=t.transform,y(e)&&(r.expression.mathWithTransform[e]=t.transform)):(delete r.expression.transform[e],y(e)&&(r.expression.mathWithTransform[e]=t))}function s(e){delete r.expression.transform[e],y(e)?r.expression.mathWithTransform[e]=r[e]:delete r.expression.mathWithTransform[e]}function l(e){var t=function(){for(var t=[],n=0,i=arguments.length;n<i;n++){var a=arguments[n];t[n]=a&&a.valueOf()}return e.apply(r,t)};return e.transform&&(t.transform=e.transform),t}function d(t,i){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t.fn;if(yt(a,"."))throw new Error("Factory name should not contain a nested path. Name: "+JSON.stringify(a));var o=w(t)?r.expression.transform:r,u=a in r.expression.transform,c=ee(o,a)?o[a]:void 0,f=function(){var n={};t.dependencies.map(_t).forEach(e=>{if(yt(e,"."))throw new Error("Factory dependency should not contain a nested path. Name: "+JSON.stringify(e));"math"===e?n.math=r:"mathWithTransform"===e?n.mathWithTransform=r.expression.mathWithTransform:"classes"===e?n.classes=r:n[e]=r[e]});var o=t(n);if(o&&"function"===typeof o.transform)throw new Error('Transforms cannot be attached to factory functions. Please create a separate function for it with exports.path="expression.transform"');if(void 0===c||i.override)return o;if(g(c)&&g(o))return e(c,o);if(i.silent)return c;throw new Error('Cannot import "'+a+'": already exists')};t.meta&&!1===t.meta.lazy?(o[a]=f(),c&&u?s(a):(w(t)||b(t))&&Q(r.expression.mathWithTransform,a,()=>o[a])):(Q(o,a,f),c&&u?s(a):(w(t)||b(t))&&Q(r.expression.mathWithTransform,a,()=>o[a])),n[a]=t,r.emit("import",a,f)}function m(e){return"function"===typeof e||"number"===typeof e||"string"===typeof e||"boolean"===typeof e||null===e||h(e)||c(e)||u(e)||f(e)||p(e)||Array.isArray(e)}function g(e){return"function"===typeof e&&"object"===typeof e.signatures}function v(e){return"function"===typeof e&&"string"===typeof e.signature}function y(e){return!ee(M,e)}function b(e){return-1===e.fn.indexOf(".")&&!ee(M,e.fn)&&(!e.meta||!e.meta.isClass)}function w(e){return void 0!==e&&void 0!==e.meta&&!0===e.meta.isTransformFunction||!1}var M={expression:!0,type:!0,docs:!0,error:!0,json:!0,chain:!0};return i}function cz(e,t){var r=a()({},o,t);if("function"!==typeof Object.create)throw new Error("ES5 not supported by this JavaScript engine. Please load the es5-shim and es5-sham library for compatibility.");var n=sz({isNumber:s,isComplex:c,isBigNumber:u,isFraction:f,isUnit:h,isString:l,isArray:d,isMatrix:p,isCollection:m,isDenseMatrix:g,isSparseMatrix:v,isRange:y,isIndex:b,isBoolean:w,isResultSet:M,isHelp:x,isFunction:_,isDate:S,isRegExp:N,isObject:E,isNull:A,isUndefined:D,isAccessorNode:k,isArrayNode:O,isAssignmentNode:C,isBlockNode:T,isConditionalNode:R,isConstantNode:B,isFunctionAssignmentNode:I,isFunctionNode:q,isIndexNode:P,isNode:j,isObjectNode:z,isOperatorNode:L,isParenthesisNode:U,isRangeNode:F,isSymbolNode:H,isChain:Z});n.config=oe(r,n.emit),n.expression={transform:{},mathWithTransform:{config:n.config}};var i=[],W=[];function V(e){if(wt(e))return e(n);var t=e[Object.keys(e)[0]];if(wt(t))return t(n);if(!te(e))throw console.warn("Factory object with properties `type`, `name`, and `factory` expected",e),new Error("Factory object with properties `type`, `name`, and `factory` expected");var a,o=i.indexOf(e);return-1===o?(a=!0===e.math?e.factory(n.type,r,V,n.typed,n):e.factory(n.type,r,V,n.typed),i.push(e),W.push(a)):a=W[o],a}var G={};function $(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.typed.apply(n.typed,t)}var K=uz($,V,n,G);return n.import=K,n.on("config",()=>{ne(G).forEach(e=>{e&&e.meta&&e.meta.recreateOnConfigChange&&K(e,{override:!0})})}),n.create=cz.bind(null,e),n.factory=bt,n.import(ne(Y(e))),n.ArgumentsError=Dd,n.DimensionError=Ge,n.IndexError=$e,n}},c8ba:function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}e.exports=r},ca84:function(e,t,r){var n=r("5135"),i=r("fc6a"),a=r("4d64").indexOf,o=r("d012");e.exports=function(e,t){var r,s=i(e),u=0,c=[];for(r in s)!n(o,r)&&n(s,r)&&c.push(r);while(t.length>u)n(s,r=t[u++])&&(~a(c,r)||c.push(r));return c}},cae0:function(e,t,r){(function(e){var n;(function(e,i,a){function o(e){var t=this;function r(e,t){var r,n=[];if(t===(0|t))n[0]=t;else for(t=""+t,r=0;r<t.length;++r)n[7&r]=n[7&r]<<15^t.charCodeAt(r)+n[r+1&7]<<13;while(n.length<8)n.push(0);for(r=0;r<8&&0===n[r];++r);for(8==r?n[7]=-1:n[r],e.x=n,e.i=0,r=256;r>0;--r)e.next()}t.next=function(){var e,r,n=t.x,i=t.i;return e=n[i],e^=e>>>7,r=e^e<<24,e=n[i+1&7],r^=e^e>>>10,e=n[i+3&7],r^=e^e>>>3,e=n[i+4&7],r^=e^e<<7,e=n[i+7&7],e^=e<<13,r^=e^e<<9,n[i]=r,t.i=i+1&7,r},r(t,e)}function s(e,t){return t.x=e.x.slice(),t.i=e.i,t}function u(e,t){null==e&&(e=+new Date);var r=new o(e),n=t&&t.state,i=function(){return(r.next()>>>0)/4294967296};return i.double=function(){do{var e=r.next()>>>11,t=(r.next()>>>0)/4294967296,n=(e+t)/(1<<21)}while(0===n);return n},i.int32=r.next,i.quick=i,n&&(n.x&&s(n,r),i.state=function(){return s(r,{})}),i}i&&i.exports?i.exports=u:r("07d6")&&r("3c35")?(n=function(){return u}.call(t,r,t,i),void 0===n||(i.exports=n)):this.xorshift7=u})(0,e,r("07d6"))}).call(this,r("62e4")(e))},cc12:function(e,t,r){var n=r("da84"),i=r("861d"),a=n.document,o=i(a)&&i(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},cca6:function(e,t,r){var n=r("23e7"),i=r("60da");n({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},cd91:function(e){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},ce4e:function(e,t,r){var n=r("da84"),i=r("9112");e.exports=function(e,t){try{i(n,e,t)}catch(r){n[e]=t}return t}},cf35:function(e,t,r){"use strict";(function(t,n){var i;e.exports=k,k.ReadableState=D;r("faa1").EventEmitter;var a=function(e,t){return e.listeners(t).length},o=r("f12a"),s=r("b639").Buffer,u=t.Uint8Array||function(){};function c(e){return s.from(e)}function f(e){return s.isBuffer(e)||e instanceof u}var h,l=r(8);h=l&&l.debuglog?l.debuglog("stream"):function(){};var d,p,m,g=r("22ab"),v=r("9019"),y=r("05f0"),b=y.getHighWaterMark,w=r("d113").codes,M=w.ERR_INVALID_ARG_TYPE,x=w.ERR_STREAM_PUSH_AFTER_EOF,_=w.ERR_METHOD_NOT_IMPLEMENTED,S=w.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r("3fb5")(k,o);var N=v.errorOrDestroy,E=["error","close","destroy","pause","resume"];function A(e,t,r){if("function"===typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}function D(e,t,n){i=i||r("5e7d"),e=e||{},"boolean"!==typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=b(this,e,"readableHighWaterMark",n),this.buffer=new g,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!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=r("7d72").StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function k(e){if(i=i||r("5e7d"),!(this instanceof k))return new k(e);var t=this instanceof i;this._readableState=new D(e,this,t),this.readable=!0,e&&("function"===typeof e.read&&(this._read=e.read),"function"===typeof e.destroy&&(this._destroy=e.destroy)),o.call(this)}function O(e,t,r,n,i){h("readableAddChunk",t);var a,o=e._readableState;if(null===t)o.reading=!1,q(e,o);else if(i||(a=T(o,t)),a)N(e,a);else if(o.objectMode||t&&t.length>0)if("string"===typeof t||o.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=c(t)),n)o.endEmitted?N(e,new S):C(e,o,t,!0);else if(o.ended)N(e,new x);else{if(o.destroyed)return!1;o.reading=!1,o.decoder&&!r?(t=o.decoder.write(t),o.objectMode||0!==t.length?C(e,o,t,!1):z(e,o)):C(e,o,t,!1)}else n||(o.reading=!1,z(e,o));return!o.ended&&(o.length<o.highWaterMark||0===o.length)}function C(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&P(e)),z(e,t)}function T(e,t){var r;return f(t)||"string"===typeof t||void 0===t||e.objectMode||(r=new M("chunk",["string","Buffer","Uint8Array"],t)),r}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),k.prototype.destroy=v.destroy,k.prototype._undestroy=v.undestroy,k.prototype._destroy=function(e,t){t(e)},k.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"===typeof e&&(t=t||n.defaultEncoding,t!==n.encoding&&(e=s.from(e,t),t=""),r=!0),O(this,e,t,!1,r)},k.prototype.unshift=function(e){return O(this,e,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(e){d||(d=r("7d72").StringDecoder);var t=new d(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;var n=this._readableState.buffer.head,i="";while(null!==n)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var R=1073741824;function B(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=B(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function q(e,t){if(h("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?P(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,j(e)))}}function P(e){var t=e._readableState;h("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(h("emitReadable",t.flowing),t.emittedReadable=!0,n.nextTick(j,e))}function j(e){var t=e._readableState;h("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,V(e)}function z(e,t){t.readingMore||(t.readingMore=!0,n.nextTick(L,e,t))}function L(e,t){while(!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length)){var r=t.length;if(h("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function U(e){return function(){var t=e._readableState;h("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,V(e))}}function F(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function H(e){h("readable nexttick read 0"),e.read(0)}function Z(e,t){t.resumeScheduled||(t.resumeScheduled=!0,n.nextTick(W,e,t))}function W(e,t){h("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),V(e),t.flowing&&!t.reading&&e.read(0)}function V(e){var t=e._readableState;h("flow",t.flowing);while(t.flowing&&null!==e.read());}function G(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function $(e){var t=e._readableState;h("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,n.nextTick(K,t,e))}function K(e,t){if(h("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function J(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}k.prototype.read=function(e){h("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return h("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?$(this):P(this),null;if(e=I(e,t),0===e&&t.ended)return 0===t.length&&$(this),null;var n,i=t.needReadable;return h("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&(i=!0,h("length less than watermark",i)),t.ended||t.reading?(i=!1,h("reading or ended",i)):i&&(h("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(r,t))),n=e>0?G(e,t):null,null===n?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&$(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(e){N(this,new _("_read()"))},k.prototype.pipe=function(e,t){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e);break}i.pipesCount+=1,h("pipe count=%d opts=%j",i.pipesCount,t);var o=(!t||!1!==t.end)&&e!==n.stdout&&e!==n.stderr,s=o?c:y;function u(e,t){h("onunpipe"),e===r&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,d())}function c(){h("onend"),e.end()}i.endEmitted?n.nextTick(s):r.once("end",s),e.on("unpipe",u);var f=U(r);e.on("drain",f);var l=!1;function d(){h("cleanup"),e.removeListener("close",g),e.removeListener("finish",v),e.removeListener("drain",f),e.removeListener("error",m),e.removeListener("unpipe",u),r.removeListener("end",c),r.removeListener("end",y),r.removeListener("data",p),l=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||f()}function p(t){h("ondata");var n=e.write(t);h("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==J(i.pipes,e))&&!l&&(h("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function m(t){h("onerror",t),y(),e.removeListener("error",m),0===a(e,"error")&&N(e,t)}function g(){e.removeListener("finish",v),y()}function v(){h("onfinish"),e.removeListener("close",g),y()}function y(){h("unpipe"),r.unpipe(e)}return r.on("data",p),A(e,"error",m),e.once("close",g),e.once("finish",v),e.emit("pipe",r),i.flowing||(h("pipe resume"),r.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=J(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},k.prototype.on=function(e,t){var r=o.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,h("on readable",i.length,i.reading),i.length?P(this):i.reading||n.nextTick(H,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=o.prototype.removeListener.call(this,e,t);return"readable"===e&&n.nextTick(F,this),r},k.prototype.removeAllListeners=function(e){var t=o.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||n.nextTick(F,this),t},k.prototype.resume=function(){var e=this._readableState;return e.flowing||(h("resume"),e.flowing=!e.readableListening,Z(this,e)),e.paused=!1,this},k.prototype.pause=function(){return h("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(h("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(h("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){if(h("wrapped data"),r.decoder&&(i=r.decoder.write(i)),(!r.objectMode||null!==i&&void 0!==i)&&(r.objectMode||i&&i.length)){var a=t.push(i);a||(n=!0,e.pause())}})),e)void 0===this[i]&&"function"===typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var a=0;a<E.length;a++)e.on(E[a],this.emit.bind(this,E[a]));return this._read=function(t){h("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"===typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===p&&(p=r("57e2")),p(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=G,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(k.from=function(e,t){return void 0===m&&(m=r("f83c")),m(k,e,t)})}).call(this,r("c8ba"),r("4362"))},cfbd:function(e,t,r){var n=r("3fb5"),i=r("7f7a"),a=i.base,o=i.bignum,s=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.Node.call(this,"der",e)}function f(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],i=0===(32&r);if(31===(31&r)){var a=r;r=0;while(128===(128&a)){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;var o=s.tag[r];return{cls:n,primitive:i,tag:r,tagStr:o}}function h(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0===(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var a=0;a<i;a++){n<<=8;var o=e.readUInt8(r);if(e.isError(o))return o;n|=o}return n}e.exports=u,u.prototype.decode=function(e,t){return e instanceof a.DecoderBuffer||(e=new a.DecoderBuffer(e,t)),this.tree._decode(e,t)},n(c,a.Node),c.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var n=e.save(),i=f(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},c.prototype._decodeTag=function(e,t,r){var n=f(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;var i=h(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');var a=e.save(),o=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(o)?o:(i=e.offset-a.offset,e.restore(a),e.skip(i,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){while(1){var r=f(e,t);if(e.isError(r))return r;var n,i=h(e,r.primitive,t);if(e.isError(i))return i;if(n=r.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===r.tagStr)break}},c.prototype._decodeList=function(e,t,r,n){var i=[];while(!e.isEmpty()){var a=this._peekTag(e,"end");if(e.isError(a))return a;var o=r.decode(e,"der",n);if(e.isError(o)&&a)break;i.push(o)}return i},c.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var n=e.raw();if(n.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",a=0;a<n.length/2;a++)i+=String.fromCharCode(n.readUInt16BE(2*a));return i}if("numstr"===t){var o=e.raw().toString("ascii");return this._isNumstr(o)?o:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var s=e.raw().toString("ascii");return this._isPrintstr(s)?s:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,r){var n,i=[],a=0;while(!e.isEmpty()){var o=e.readUInt8();a<<=7,a|=127&o,0===(128&o)&&(i.push(a),a=0)}128&o&&i.push(a);var s=i[0]/40|0,u=i[0]%40;if(n=r?i:[s,u].concat(i.slice(1)),t){var c=t[n.join(" ")];void 0===c&&(c=t[n.join(".")]),void 0!==c&&(n=c)}return n},c.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var n=0|r.slice(0,4),i=0|r.slice(4,6),a=0|r.slice(6,8),o=0|r.slice(8,10),s=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),a=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),u=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,a,o,s,u,0)},c.prototype._decodeNull=function(e){return null},c.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){var r=e.raw(),n=new o(r);return t&&(n=t[n.toString(10)]||n),n},c.prototype._use=function(e,t){return"function"===typeof e&&(e=e(t)),e._getDecoder("der").tree}},cfc9:function(e,t,r){"use strict";var n=r("01d3"),i=r.n(n);i.a},d012:function(e,t){e.exports={}},d039:function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},d066:function(e,t,r){var n=r("428f"),i=r("da84"),a=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?a(n[e])||a(i[e]):n[e]&&n[e][t]||i[e]&&i[e][t]}},d0eb:function(e,t,r){(function(e){(function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{o=r(6).Buffer}catch(E){}function s(e,t,r){for(var n=0,i=Math.min(e.length,r),a=t;a<i;a++){var o=e.charCodeAt(a)-48;n<<=4,n|=o>=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function u(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o<a;o++){var s=e.charCodeAt(o)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"===typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"===typeof e)return this._initNumber(e,t,r);if("object"===typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var a,o,s=0;if("be"===r)for(i=e.length-1,a=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[a]|=o<<s&67108863,this.words[a+1]=o>>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var n,i,a=0;for(r=e.length-6,n=0;r>=t;r-=6)i=s(e,r,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303,a+=24,a>=26&&(a-=26,n++);r+6!==t&&(i=s(e,t,r+6),this.words[n]|=i<<a&67108863,this.words[n+1]|=i>>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,s=Math.min(a,a-o)+r,c=0,f=r;f<s;f+=n)c=u(e,f,f+n,t),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==o){var h=1;for(c=u(e,f,e.length,t),f=0;f<o;f++)h*=t;this.imuln(h),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},a.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},a.prototype.clone=function(){var e=new a(null);return this.copy(e),e},a.prototype._expand=function(e){while(this.length<e)this.words[this.length++]=0;return this},a.prototype.strip=function(){while(this.length>1&&0===this.words[this.length-1])this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","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],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];function l(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,u=o/67108864|0;r.words[0]=s;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=l;d++){var p=c-d|0;i=0|e.words[p],a=0|t.words[d],o=i*a+h,f+=o/67108864|0,h=67108863&o}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}a.prototype.toString=function(e,t){var r;if(e=e||10,t=0|t||1,16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o<this.length;o++){var s=this.words[o],u=(16777215&(s<<i|a)).toString(16);a=s>>>24-i&16777215,r=0!==a||o!==this.length-1?c[6-u.length]+u+r:u+r,i+=2,i>=26&&(i-=26,o--)}0!==a&&(r=a.toString(16)+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],d=h[e];r="";var p=this.clone();p.negative=0;while(!p.isZero()){var m=p.modn(d).toString(e);p=p.idivn(d),r=p.isZero()?m+r:c[l-m.length]+m+r}this.isZero()&&(r="0"+r);while(r.length%t!==0)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n("undefined"!==typeof o),this.toArrayLike(o,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,u="le"===t,c=new e(a),f=this.clone();if(u){for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[s]=o;for(;s<a;s++)c[s]=0}else{for(s=0;s<a-i;s++)c[s]=0;for(s=0;!f.isZero();s++)o=f.andln(255),f.iushrn(8),c[a-s-1]=o}return c},Math.clz32?a.prototype._countBits=function(e){return 32-Math.clz32(e)}:a.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},a.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},a.prototype.isNeg=function(){return 0!==this.negative},a.prototype.neg=function(){return this.clone().ineg()},a.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},a.prototype.iuor=function(e){while(this.length<e.length)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},a.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},a.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},a.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},a.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},a.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},a.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"===typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},a.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a<n.length;a++)t=(0|r.words[a])+(0|n.words[a])+i,this.words[a]=67108863&t,i=t>>>26;for(;0!==i&&a<r.length;a++)t=(0|r.words[a])+i,this.words[a]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this},a.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var a=0,o=0;o<n.length;o++)t=(0|r.words[o])-(0|n.words[o])+a,a=t>>26,this.words[o]=67108863&t;for(;0!==a&&o<r.length;o++)t=(0|r.words[o])+a,a=t>>26,this.words[o]=67108863&t;if(0===a&&o<r.length&&r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this.length=Math.max(this.length,o),r!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,a,o=e.words,s=t.words,u=r.words,c=0,f=0|o[0],h=8191&f,l=f>>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],v=8191&g,y=g>>>13,b=0|o[3],w=8191&b,M=b>>>13,x=0|o[4],_=8191&x,S=x>>>13,N=0|o[5],E=8191&N,A=N>>>13,D=0|o[6],k=8191&D,O=D>>>13,C=0|o[7],T=8191&C,R=C>>>13,B=0|o[8],I=8191&B,q=B>>>13,P=0|o[9],j=8191&P,z=P>>>13,L=0|s[0],U=8191&L,F=L>>>13,H=0|s[1],Z=8191&H,W=H>>>13,V=0|s[2],G=8191&V,$=V>>>13,K=0|s[3],J=8191&K,Y=K>>>13,X=0|s[4],Q=8191&X,ee=X>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ue=8191&se,ce=se>>>13,fe=0|s[8],he=8191&fe,le=fe>>>13,de=0|s[9],pe=8191&de,me=de>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(h,U),i=Math.imul(h,F),i=i+Math.imul(l,U)|0,a=Math.imul(l,F);var ge=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(p,U),i=Math.imul(p,F),i=i+Math.imul(m,U)|0,a=Math.imul(m,F),n=n+Math.imul(h,Z)|0,i=i+Math.imul(h,W)|0,i=i+Math.imul(l,Z)|0,a=a+Math.imul(l,W)|0;var ve=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,U),i=Math.imul(v,F),i=i+Math.imul(y,U)|0,a=Math.imul(y,F),n=n+Math.imul(p,Z)|0,i=i+Math.imul(p,W)|0,i=i+Math.imul(m,Z)|0,a=a+Math.imul(m,W)|0,n=n+Math.imul(h,G)|0,i=i+Math.imul(h,$)|0,i=i+Math.imul(l,G)|0,a=a+Math.imul(l,$)|0;var ye=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(w,U),i=Math.imul(w,F),i=i+Math.imul(M,U)|0,a=Math.imul(M,F),n=n+Math.imul(v,Z)|0,i=i+Math.imul(v,W)|0,i=i+Math.imul(y,Z)|0,a=a+Math.imul(y,W)|0,n=n+Math.imul(p,G)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(m,G)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(h,J)|0,i=i+Math.imul(h,Y)|0,i=i+Math.imul(l,J)|0,a=a+Math.imul(l,Y)|0;var be=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(_,U),i=Math.imul(_,F),i=i+Math.imul(S,U)|0,a=Math.imul(S,F),n=n+Math.imul(w,Z)|0,i=i+Math.imul(w,W)|0,i=i+Math.imul(M,Z)|0,a=a+Math.imul(M,W)|0,n=n+Math.imul(v,G)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(y,G)|0,a=a+Math.imul(y,$)|0,n=n+Math.imul(p,J)|0,i=i+Math.imul(p,Y)|0,i=i+Math.imul(m,J)|0,a=a+Math.imul(m,Y)|0,n=n+Math.imul(h,Q)|0,i=i+Math.imul(h,ee)|0,i=i+Math.imul(l,Q)|0,a=a+Math.imul(l,ee)|0;var we=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,U),i=Math.imul(E,F),i=i+Math.imul(A,U)|0,a=Math.imul(A,F),n=n+Math.imul(_,Z)|0,i=i+Math.imul(_,W)|0,i=i+Math.imul(S,Z)|0,a=a+Math.imul(S,W)|0,n=n+Math.imul(w,G)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(M,G)|0,a=a+Math.imul(M,$)|0,n=n+Math.imul(v,J)|0,i=i+Math.imul(v,Y)|0,i=i+Math.imul(y,J)|0,a=a+Math.imul(y,Y)|0,n=n+Math.imul(p,Q)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(h,re)|0,i=i+Math.imul(h,ne)|0,i=i+Math.imul(l,re)|0,a=a+Math.imul(l,ne)|0;var Me=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(k,U),i=Math.imul(k,F),i=i+Math.imul(O,U)|0,a=Math.imul(O,F),n=n+Math.imul(E,Z)|0,i=i+Math.imul(E,W)|0,i=i+Math.imul(A,Z)|0,a=a+Math.imul(A,W)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(S,G)|0,a=a+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=i+Math.imul(w,Y)|0,i=i+Math.imul(M,J)|0,a=a+Math.imul(M,Y)|0,n=n+Math.imul(v,Q)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(y,Q)|0,a=a+Math.imul(y,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(h,ae)|0,i=i+Math.imul(h,oe)|0,i=i+Math.imul(l,ae)|0,a=a+Math.imul(l,oe)|0;var xe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,U),i=Math.imul(T,F),i=i+Math.imul(R,U)|0,a=Math.imul(R,F),n=n+Math.imul(k,Z)|0,i=i+Math.imul(k,W)|0,i=i+Math.imul(O,Z)|0,a=a+Math.imul(O,W)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(A,G)|0,a=a+Math.imul(A,$)|0,n=n+Math.imul(_,J)|0,i=i+Math.imul(_,Y)|0,i=i+Math.imul(S,J)|0,a=a+Math.imul(S,Y)|0,n=n+Math.imul(w,Q)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(y,re)|0,a=a+Math.imul(y,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(h,ue)|0,i=i+Math.imul(h,ce)|0,i=i+Math.imul(l,ue)|0,a=a+Math.imul(l,ce)|0;var _e=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,U),i=Math.imul(I,F),i=i+Math.imul(q,U)|0,a=Math.imul(q,F),n=n+Math.imul(T,Z)|0,i=i+Math.imul(T,W)|0,i=i+Math.imul(R,Z)|0,a=a+Math.imul(R,W)|0,n=n+Math.imul(k,G)|0,i=i+Math.imul(k,$)|0,i=i+Math.imul(O,G)|0,a=a+Math.imul(O,$)|0,n=n+Math.imul(E,J)|0,i=i+Math.imul(E,Y)|0,i=i+Math.imul(A,J)|0,a=a+Math.imul(A,Y)|0,n=n+Math.imul(_,Q)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(M,re)|0,a=a+Math.imul(M,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(y,ae)|0,a=a+Math.imul(y,oe)|0,n=n+Math.imul(p,ue)|0,i=i+Math.imul(p,ce)|0,i=i+Math.imul(m,ue)|0,a=a+Math.imul(m,ce)|0,n=n+Math.imul(h,he)|0,i=i+Math.imul(h,le)|0,i=i+Math.imul(l,he)|0,a=a+Math.imul(l,le)|0;var Se=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(j,U),i=Math.imul(j,F),i=i+Math.imul(z,U)|0,a=Math.imul(z,F),n=n+Math.imul(I,Z)|0,i=i+Math.imul(I,W)|0,i=i+Math.imul(q,Z)|0,a=a+Math.imul(q,W)|0,n=n+Math.imul(T,G)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(R,G)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(k,J)|0,i=i+Math.imul(k,Y)|0,i=i+Math.imul(O,J)|0,a=a+Math.imul(O,Y)|0,n=n+Math.imul(E,Q)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(A,Q)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(S,re)|0,a=a+Math.imul(S,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,n=n+Math.imul(v,ue)|0,i=i+Math.imul(v,ce)|0,i=i+Math.imul(y,ue)|0,a=a+Math.imul(y,ce)|0,n=n+Math.imul(p,he)|0,i=i+Math.imul(p,le)|0,i=i+Math.imul(m,he)|0,a=a+Math.imul(m,le)|0,n=n+Math.imul(h,pe)|0,i=i+Math.imul(h,me)|0,i=i+Math.imul(l,pe)|0,a=a+Math.imul(l,me)|0;var Ne=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(j,Z),i=Math.imul(j,W),i=i+Math.imul(z,Z)|0,a=Math.imul(z,W),n=n+Math.imul(I,G)|0,i=i+Math.imul(I,$)|0,i=i+Math.imul(q,G)|0,a=a+Math.imul(q,$)|0,n=n+Math.imul(T,J)|0,i=i+Math.imul(T,Y)|0,i=i+Math.imul(R,J)|0,a=a+Math.imul(R,Y)|0,n=n+Math.imul(k,Q)|0,i=i+Math.imul(k,ee)|0,i=i+Math.imul(O,Q)|0,a=a+Math.imul(O,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(S,ae)|0,a=a+Math.imul(S,oe)|0,n=n+Math.imul(w,ue)|0,i=i+Math.imul(w,ce)|0,i=i+Math.imul(M,ue)|0,a=a+Math.imul(M,ce)|0,n=n+Math.imul(v,he)|0,i=i+Math.imul(v,le)|0,i=i+Math.imul(y,he)|0,a=a+Math.imul(y,le)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,me)|0;var Ee=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(j,G),i=Math.imul(j,$),i=i+Math.imul(z,G)|0,a=Math.imul(z,$),n=n+Math.imul(I,J)|0,i=i+Math.imul(I,Y)|0,i=i+Math.imul(q,J)|0,a=a+Math.imul(q,Y)|0,n=n+Math.imul(T,Q)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(k,re)|0,i=i+Math.imul(k,ne)|0,i=i+Math.imul(O,re)|0,a=a+Math.imul(O,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(_,ue)|0,i=i+Math.imul(_,ce)|0,i=i+Math.imul(S,ue)|0,a=a+Math.imul(S,ce)|0,n=n+Math.imul(w,he)|0,i=i+Math.imul(w,le)|0,i=i+Math.imul(M,he)|0,a=a+Math.imul(M,le)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(y,pe)|0,a=a+Math.imul(y,me)|0;var Ae=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(j,J),i=Math.imul(j,Y),i=i+Math.imul(z,J)|0,a=Math.imul(z,Y),n=n+Math.imul(I,Q)|0,i=i+Math.imul(I,ee)|0,i=i+Math.imul(q,Q)|0,a=a+Math.imul(q,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(k,ae)|0,i=i+Math.imul(k,oe)|0,i=i+Math.imul(O,ae)|0,a=a+Math.imul(O,oe)|0,n=n+Math.imul(E,ue)|0,i=i+Math.imul(E,ce)|0,i=i+Math.imul(A,ue)|0,a=a+Math.imul(A,ce)|0,n=n+Math.imul(_,he)|0,i=i+Math.imul(_,le)|0,i=i+Math.imul(S,he)|0,a=a+Math.imul(S,le)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(M,pe)|0,a=a+Math.imul(M,me)|0;var De=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(j,Q),i=Math.imul(j,ee),i=i+Math.imul(z,Q)|0,a=Math.imul(z,ee),n=n+Math.imul(I,re)|0,i=i+Math.imul(I,ne)|0,i=i+Math.imul(q,re)|0,a=a+Math.imul(q,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(k,ue)|0,i=i+Math.imul(k,ce)|0,i=i+Math.imul(O,ue)|0,a=a+Math.imul(O,ce)|0,n=n+Math.imul(E,he)|0,i=i+Math.imul(E,le)|0,i=i+Math.imul(A,he)|0,a=a+Math.imul(A,le)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(S,pe)|0,a=a+Math.imul(S,me)|0;var ke=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(j,re),i=Math.imul(j,ne),i=i+Math.imul(z,re)|0,a=Math.imul(z,ne),n=n+Math.imul(I,ae)|0,i=i+Math.imul(I,oe)|0,i=i+Math.imul(q,ae)|0,a=a+Math.imul(q,oe)|0,n=n+Math.imul(T,ue)|0,i=i+Math.imul(T,ce)|0,i=i+Math.imul(R,ue)|0,a=a+Math.imul(R,ce)|0,n=n+Math.imul(k,he)|0,i=i+Math.imul(k,le)|0,i=i+Math.imul(O,he)|0,a=a+Math.imul(O,le)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(A,pe)|0,a=a+Math.imul(A,me)|0;var Oe=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(j,ae),i=Math.imul(j,oe),i=i+Math.imul(z,ae)|0,a=Math.imul(z,oe),n=n+Math.imul(I,ue)|0,i=i+Math.imul(I,ce)|0,i=i+Math.imul(q,ue)|0,a=a+Math.imul(q,ce)|0,n=n+Math.imul(T,he)|0,i=i+Math.imul(T,le)|0,i=i+Math.imul(R,he)|0,a=a+Math.imul(R,le)|0,n=n+Math.imul(k,pe)|0,i=i+Math.imul(k,me)|0,i=i+Math.imul(O,pe)|0,a=a+Math.imul(O,me)|0;var Ce=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(j,ue),i=Math.imul(j,ce),i=i+Math.imul(z,ue)|0,a=Math.imul(z,ce),n=n+Math.imul(I,he)|0,i=i+Math.imul(I,le)|0,i=i+Math.imul(q,he)|0,a=a+Math.imul(q,le)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(R,pe)|0,a=a+Math.imul(R,me)|0;var Te=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(j,he),i=Math.imul(j,le),i=i+Math.imul(z,he)|0,a=Math.imul(z,le),n=n+Math.imul(I,pe)|0,i=i+Math.imul(I,me)|0,i=i+Math.imul(q,pe)|0,a=a+Math.imul(q,me)|0;var Re=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(j,pe),i=Math.imul(j,me),i=i+Math.imul(z,pe)|0,a=Math.imul(z,me);var Be=(c+n|0)+((8191&i)<<13)|0;return c=(a+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,u[0]=ge,u[1]=ve,u[2]=ye,u[3]=be,u[4]=we,u[5]=Me,u[6]=xe,u[7]=_e,u[8]=Se,u[9]=Ne,u[10]=Ee,u[11]=Ae,u[12]=De,u[13]=ke,u[14]=Oe,u[15]=Ce,u[16]=Te,u[17]=Re,u[18]=Be,0!==c&&(u[19]=c,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a<r.length-1;a++){var o=i;i=0;for(var s=67108863&n,u=Math.min(a,t.length-1),c=Math.max(0,a-e.length+1);c<=u;c++){var f=a-c,h=0|e.words[f],l=0|t.words[c],d=h*l,p=67108863&d;o=o+(d/67108864|0)|0,p=p+s|0,s=67108863&p,o=o+(p>>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function g(e,t,r){var n=new v;return n.mulp(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?d(this,e,t):n<1024?m(this,e,t):g(this,e,t),r},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o<a;o++)n[o]=t[e[o]],i[o]=r[e[o]]},v.prototype.transform=function(e,t,r,n,i,a){this.permute(a,e,t,r,n,i);for(var o=1;o<i;o<<=1)for(var s=o<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var h=u,l=c,d=0;d<o;d++){var p=r[f+d],m=n[f+d],g=r[f+d+o],v=n[f+d+o],y=h*g-l*v;v=h*v+l*g,g=y,r[f+d]=p+g,n[f+d]=m+v,r[f+d+o]=p-g,n[f+d+o]=m-v,d!==s&&(y=u*h-c*l,l=u*l+c*h,h=y)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var a=0,o=0;o<t;o++)a+=0|e[o],r[2*o]=8191&a,a>>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o<i;++o)r[o]=0;n(0===a),n(0===(-8192&a))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),a=this.stub(n),o=new Array(n),s=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,o,n),this.convert13b(t.words,t.length,c,n),this.transform(o,a,s,u,n,i),this.transform(c,a,f,h,n,i);for(var d=0;d<n;d++){var p=s[d]*f[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*f[d],s[d]=p}return this.conjugate(s,u,n),this.transform(s,u,l,a,n,i),this.conjugate(l,a,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},a.prototype.mul=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},a.prototype.mulf=function(e){var t=new a(null);return t.words=new Array(this.length+e.length),g(this,e,t)},a.prototype.imul=function(e){return this.clone().mulTo(e,this)},a.prototype.imuln=function(e){n("number"===typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=l(e);if(0===t.length)return new a(1);for(var r=this,n=0;n<t.length;n++,r=r.sqr())if(0!==t[n])break;if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},a.prototype.iushln=function(e){n("number"===typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t<this.length;t++){var s=this.words[t]&a,u=(0|this.words[t])-s<<r;this.words[t]=u|o,o=s>>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},a.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},a.prototype.iushrn=function(e,t,r){var i;n("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<<a,u=r;if(i-=o,i=Math.max(0,i),u){for(var c=0;c<o;c++)u.words[c]=this.words[c];u.length=o}if(0===o);else if(this.length>o)for(this.length-=o,c=0;c<this.length;c++)this.words[c]=this.words[c+o];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-a|h>>>a,f=h&s}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return!1;var a=this.words[r];return!!(a&i)},a.prototype.imaskn=function(e){n("number"===typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},a.prototype.maskn=function(e){return this.clone().imaskn(e)},a.prototype.iaddn=function(e){return n("number"===typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},a.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"===typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},a.prototype.addn=function(e){return this.clone().iaddn(e)},a.prototype.subn=function(e){return this.clone().isubn(e)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(e,t,r){var i,a,o=e.length+r;this._expand(o);var s=0;for(i=0;i<e.length;i++){a=(0|this.words[i+r])+s;var u=(0|e.words[i])*t;a-=67108863&u,s=(a>>26)-(u/67108864|0),this.words[i+r]=67108863&a}for(;i<this.length-r;i++)a=(0|this.words[i+r])+s,s=a>>26,this.words[i+r]=67108863&a;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i<this.length;i++)a=-(0|this.words[i])+s,s=a>>26,this.words[i]=67108863&a;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1],s=this._countBits(o);r=26-s,0!==r&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var u,c=n.length-i.length;if("mod"!==t){u=new a(null),u.length=c+1,u.words=new Array(u.length);for(var f=0;f<u.length;f++)u.words[f]=0}var h=n.clone()._ishlnsubmul(i,1,c);0===h.negative&&(n=h,u&&(u.words[c]=1));for(var l=c-1;l>=0;l--){var d=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);d=Math.min(d/o|0,67108863),n._ishlnsubmul(i,d,l);while(0!==n.negative)d--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);u&&(u.words[l]=d)}return u&&u.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:u||null,mod:n}},a.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,o,s},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i=new a(1),o=new a(0),s=new a(0),u=new a(1),c=0;while(t.isEven()&&r.isEven())t.iushrn(1),r.iushrn(1),++c;var f=r.clone(),h=t.clone();while(!t.isZero()){for(var l=0,d=1;0===(t.words[0]&d)&&l<26;++l,d<<=1);if(l>0){t.iushrn(l);while(l-- >0)(i.isOdd()||o.isOdd())&&(i.iadd(f),o.isub(h)),i.iushrn(1),o.iushrn(1)}for(var p=0,m=1;0===(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0){r.iushrn(p);while(p-- >0)(s.isOdd()||u.isOdd())&&(s.iadd(f),u.isub(h)),s.iushrn(1),u.iushrn(1)}t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(u)):(r.isub(t),s.isub(i),u.isub(o))}return{a:s,b:u,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();var i,o=new a(1),s=new a(0),u=r.clone();while(t.cmpn(1)>0&&r.cmpn(1)>0){for(var c=0,f=1;0===(t.words[0]&f)&&c<26;++c,f<<=1);if(c>0){t.iushrn(c);while(c-- >0)o.isOdd()&&o.iadd(u),o.iushrn(1)}for(var h=0,l=1;0===(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0){r.iushrn(h);while(h-- >0)s.isOdd()&&s.iadd(u),s.iushrn(1)}t.cmp(r)>=0?(t.isub(r),o.isub(s)):(r.isub(t),s.isub(o))}return i=0===t.cmpn(1)?o:s,i.cmpn(0)<0&&i.iadd(e),i},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);do{while(t.isEven())t.iushrn(1);while(r.isEven())r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}while(1);return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"===typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var a=i,o=r;0!==a&&o<this.length;o++){var s=0|this.words[o];s+=a,a=s>>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},a.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},a.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return-1===this.cmpn(e)},a.prototype.lt=function(e){return-1===this.cmp(e)},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new S(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(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)}b.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},i(w,b),w.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var a=e.words[9];for(t.words[t.length++]=a&r,i=10;i<e.length;i++){var o=0|e.words[i];e.words[i-10]=(o&r)<<4|a>>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(M,b),i(x,b),i(_,b),_.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new M;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return y[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}var i=this.m.subn(1),o=0;while(!i.isZero()&&0===i.andln(1))o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),u=s.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();f=new a(2*f*f).toRed(this);while(0!==this.pow(f,c).cmp(u))f.redIAdd(u);var h=this.pow(f,i),l=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;while(0!==d.cmp(s)){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(h,new a(1).iushln(p-g-1));l=l.redMul(v),h=v.redSqr(),d=d.redMul(h),p=g}return l},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new a(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=4,n=new Array(1<<r);n[0]=new a(1).toRed(this),n[1]=e;for(var i=2;i<n.length;i++)n[i]=this.mul(n[i-1],e);var o=n[0],s=0,u=0,c=t.bitLength()%26;for(0===c&&(c=26),i=t.length-1;i>=0;i--){for(var f=t.words[i],h=c-1;h>=0;h--){var l=f>>h&1;o!==n[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,u++,(u===r||0===i&&0===h)&&(o=this.mul(o,n[s]),u=0,s=0)):u=0}c=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new N(e)},i(N,S),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},N.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},N.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}})(e,this)}).call(this,r("62e4")(e))},d113:function(e,t,r){"use strict";function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var i={};function a(e,t,r){function a(e,r,n){return"string"===typeof t?t:t(e,r,n)}r||(r=Error);var o=function(e){function t(t,r,n){return e.call(this,a(t,r,n))||this}return n(t,e),t}(r);o.prototype.name=r.name,o.prototype.code=e,i[e]=o}function o(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}function s(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function u(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function c(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}a("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),a("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i;if("string"===typeof t&&s(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be",u(e," argument"))i="The ".concat(e," ").concat(n," ").concat(o(t,"type"));else{var a=c(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(a," ").concat(n," ").concat(o(t,"type"))}return i+=". Received type ".concat(typeof r),i}),TypeError),a("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),a("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),a("ERR_STREAM_PREMATURE_CLOSE","Premature close"),a("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),a("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),a("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),a("ERR_STREAM_WRITE_AFTER_END","write after end"),a("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),a("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),a("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=i},d17b:function(e,t,r){e.exports=r("e372").Transform},d1c8:function(e,t,r){var n=r("3fb5");function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function a(e,t){this.path=e,this.rethrow(t)}t.Reporter=i,i.prototype.isError=function(e){return e instanceof a},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof a;if(t=n?e:new a(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(a,Error),a.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,a),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},d1e7:function(e,t,r){"use strict";var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,a=i&&!n.call({1:2},1);t.f=a?function(e){var t=i(this,e);return!!t&&t.enumerable}:n},d3b7:function(e,t,r){var n=r("00ee"),i=r("6eeb"),a=r("b041");n||i(Object.prototype,"toString",a,{unsafe:!0})},d424:function(e,t,r){"use strict";var n=r("3fb5"),i=r("8707").Buffer,a=r("6430"),o=i.alloc(128),s=64;function u(e,t){a.call(this,"digest"),"string"===typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=i.concat([t,o],s));for(var r=this._ipad=i.allocUnsafe(s),n=this._opad=i.allocUnsafe(s),u=0;u<s;u++)r[u]=54^t[u],n[u]=92^t[u];this._hash=[r]}n(u,a),u.prototype._update=function(e){this._hash.push(e)},u.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=u},d480:function(e,t,r){var n=r("24fb");t=n(!1),t.push([e.i,".fade-enter-active[data-v-b6ea1562],.fade-leave-active[data-v-b6ea1562]{transition:opacity .5s}.fade-enter[data-v-b6ea1562],.fade-leave-to[data-v-b6ea1562]{opacity:0}input.is-invalid[data-v-b6ea1562],input[data-v-b6ea1562]:invalid{color:red}.invalid-feedback[data-v-b6ea1562]{display:block;margin:.5rem 0 0;color:red;font-size:.8rem}.dice-roller[data-v-b6ea1562]{margin:1rem 0;padding:1rem 1.5rem;border-radius:.4rem;background-color:#f0f4f8}.output[data-v-b6ea1562]{display:block;margin:0 0 1rem;padding:.5rem 1.9rem;font-size:1.5rem;border-radius:.4rem;background:#fff}footer[data-v-b6ea1562]{font-size:.8rem}",""]),e.exports=t},d485:function(e,t,r){e.exports=a;var n=r("faa1").EventEmitter,i=r("3fb5");function a(){n.call(this)}i(a,n),a.Readable=r("e372"),a.Writable=r("2c63"),a.Duplex=r("0960"),a.Transform=r("d17b"),a.PassThrough=r("c2ae"),a.Stream=a,a.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var o=!1;function s(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"===typeof e.destroy&&e.destroy())}function c(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",a),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",c),e.on("error",c),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},d61e:function(e,t,r){var n,i;
|
|
20
|
-
/**
|
|
21
|
-
* @license Fraction.js v4.1.2 23/05/2021
|
|
22
|
-
* https://www.xarg.org/2014/03/rational-numbers-in-javascript/
|
|
23
|
-
*
|
|
24
|
-
* Copyright (c) 2021, Robert Eisele (robert@xarg.org)
|
|
25
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
26
|
-
**/(function(r){"use strict";var a=2e3,o={s:1,n:0,d:1};function s(e){function t(){var t=Error.apply(this,arguments);t["name"]=this["name"]=e,this["stack"]=t["stack"],this["message"]=t["message"]}function r(){}return r.prototype=Error.prototype,t.prototype=new r,t}var u=y["DivisionByZero"]=s("DivisionByZero"),c=y["InvalidParameter"]=s("InvalidParameter");function f(e,t){return isNaN(e=parseInt(e,10))&&h(),e*t}function h(){throw new c}function l(e){var t={},r=e,n=2,i=4;while(i<=r){while(r%n===0)r/=n,t[n]=(t[n]||0)+1;i+=1+2*n++}return r!==e?r>1&&(t[r]=(t[r]||0)+1):t[e]=(t[e]||0)+1,t}var d=function(e,t){var r,n=0,i=1,a=1,s=0,c=0,l=0,d=1,p=1,m=0,g=1,v=1,y=1,b=1e7;if(void 0===e||null===e);else if(void 0!==t)n=e,i=t,a=n*i;else switch(typeof e){case"object":"d"in e&&"n"in e?(n=e["n"],i=e["d"],"s"in e&&(n*=e["s"])):0 in e?(n=e[0],1 in e&&(i=e[1])):h(),a=n*i;break;case"number":if(e<0&&(a=e,e=-e),e%1===0)n=e;else if(e>0){e>=1&&(p=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)),e/=p);while(g<=b&&y<=b){if(r=(m+v)/(g+y),e===r){g+y<=b?(n=m+v,i=g+y):y>g?(n=v,i=y):(n=m,i=g);break}e>r?(m+=v,g+=y):(v+=m,y+=g),g>b?(n=v,i=y):(n=m,i=g)}n*=p}else(isNaN(e)||isNaN(t))&&(i=n=NaN);break;case"string":if(g=e.match(/\d+|./g),null===g&&h(),"-"===g[m]?(a=-1,m++):"+"===g[m]&&m++,g.length===m+1?c=f(g[m++],a):"."===g[m+1]||"."===g[m]?("."!==g[m]&&(s=f(g[m++],a)),m++,(m+1===g.length||"("===g[m+1]&&")"===g[m+3]||"'"===g[m+1]&&"'"===g[m+3])&&(c=f(g[m],a),d=Math.pow(10,g[m].length),m++),("("===g[m]&&")"===g[m+2]||"'"===g[m]&&"'"===g[m+2])&&(l=f(g[m+1],a),p=Math.pow(10,g[m+1].length)-1,m+=3)):"/"===g[m+1]||":"===g[m+1]?(c=f(g[m],a),d=f(g[m+2],1),m+=3):"/"===g[m+3]&&" "===g[m+1]&&(s=f(g[m],a),c=f(g[m+2],a),d=f(g[m+4],1),m+=5),g.length<=m){i=d*p,a=n=l+i*s+p*c;break}default:h()}if(0===i)throw new u;o["s"]=a<0?-1:1,o["n"]=Math.abs(n),o["d"]=Math.abs(i)};function p(e,t,r){for(var n=1;t>0;e=e*e%r,t>>=1)1&t&&(n=n*e%r);return n}function m(e,t){for(;t%2===0;t/=2);for(;t%5===0;t/=5);if(1===t)return 0;for(var r=10%t,n=1;1!==r;n++)if(r=10*r%t,n>a)return 0;return n}function g(e,t,r){for(var n=1,i=p(10,r,t),a=0;a<300;a++){if(n===i)return a;n=10*n%t,i=10*i%t}return 0}function v(e,t){if(!e)return t;if(!t)return e;while(1){if(e%=t,!e)return t;if(t%=e,!t)return e}}function y(e,t){if(!(this instanceof y))return new y(e,t);d(e,t),e=v(o["d"],o["n"]),this["s"]=o["s"],this["n"]=o["n"]/e,this["d"]=o["d"]/e}y.prototype={s:1,n:0,d:1,abs:function(){return new y(this["n"],this["d"])},neg:function(){return new y(-this["s"]*this["n"],this["d"])},add:function(e,t){return d(e,t),new y(this["s"]*this["n"]*o["d"]+o["s"]*this["d"]*o["n"],this["d"]*o["d"])},sub:function(e,t){return d(e,t),new y(this["s"]*this["n"]*o["d"]-o["s"]*this["d"]*o["n"],this["d"]*o["d"])},mul:function(e,t){return d(e,t),new y(this["s"]*o["s"]*this["n"]*o["n"],this["d"]*o["d"])},div:function(e,t){return d(e,t),new y(this["s"]*o["s"]*this["n"]*o["d"],this["d"]*o["n"])},clone:function(){return new y(this)},mod:function(e,t){return isNaN(this["n"])||isNaN(this["d"])?new y(NaN):void 0===e?new y(this["s"]*this["n"]%this["d"],1):(d(e,t),0===o["n"]&&0===this["d"]&&y(0,0),new y(this["s"]*(o["d"]*this["n"])%(o["n"]*this["d"]),o["d"]*this["d"]))},gcd:function(e,t){return d(e,t),new y(v(o["n"],this["n"])*v(o["d"],this["d"]),o["d"]*this["d"])},lcm:function(e,t){return d(e,t),0===o["n"]&&0===this["n"]?new y:new y(o["n"]*this["n"],v(o["n"],this["n"])*v(o["d"],this["d"]))},ceil:function(e){return e=Math.pow(10,e||0),isNaN(this["n"])||isNaN(this["d"])?new y(NaN):new y(Math.ceil(e*this["s"]*this["n"]/this["d"]),e)},floor:function(e){return e=Math.pow(10,e||0),isNaN(this["n"])||isNaN(this["d"])?new y(NaN):new y(Math.floor(e*this["s"]*this["n"]/this["d"]),e)},round:function(e){return e=Math.pow(10,e||0),isNaN(this["n"])||isNaN(this["d"])?new y(NaN):new y(Math.round(e*this["s"]*this["n"]/this["d"]),e)},inverse:function(){return new y(this["s"]*this["d"],this["n"])},pow:function(e,t){if(d(e,t),1===o["d"])return o["s"]<0?new y(Math.pow(this["s"]*this["d"],o["n"]),Math.pow(this["n"],o["n"])):new y(Math.pow(this["s"]*this["n"],o["n"]),Math.pow(this["d"],o["n"]));if(this["s"]<0)return null;var r=l(this["n"]),n=l(this["d"]),i=1,a=1;for(var s in r)if("1"!==s){if("0"===s){i=0;break}if(r[s]*=o["n"],r[s]%o["d"]!==0)return null;r[s]/=o["d"],i*=Math.pow(s,r[s])}for(var s in n)if("1"!==s){if(n[s]*=o["n"],n[s]%o["d"]!==0)return null;n[s]/=o["d"],a*=Math.pow(s,n[s])}return o["s"]<0?new y(a,i):new y(i,a)},equals:function(e,t){return d(e,t),this["s"]*this["n"]*o["d"]===o["s"]*o["n"]*this["d"]},compare:function(e,t){d(e,t);var r=this["s"]*this["n"]*o["d"]-o["s"]*o["n"]*this["d"];return(0<r)-(r<0)},simplify:function(e){if(isNaN(this["n"])||isNaN(this["d"]))return this;var t=this["abs"]()["toContinued"]();function r(e){return 1===e.length?new y(e[0]):r(e.slice(1))["inverse"]()["add"](e[0])}e=e||.001;for(var n=0;n<t.length;n++){var i=r(t.slice(0,n+1));if(i["sub"](this["abs"]())["abs"]().valueOf()<e)return i["mul"](this["s"])}return this},divisible:function(e,t){return d(e,t),!(!(o["n"]*this["d"])||this["n"]*o["d"]%(o["n"]*this["d"]))},valueOf:function(){return this["s"]*this["n"]/this["d"]},toFraction:function(e){var t,r="",n=this["n"],i=this["d"];return this["s"]<0&&(r+="-"),1===i?r+=n:(e&&(t=Math.floor(n/i))>0&&(r+=t,r+=" ",n%=i),r+=n,r+="/",r+=i),r},toLatex:function(e){var t,r="",n=this["n"],i=this["d"];return this["s"]<0&&(r+="-"),1===i?r+=n:(e&&(t=Math.floor(n/i))>0&&(r+=t,n%=i),r+="\\frac{",r+=n,r+="}{",r+=i,r+="}"),r},toContinued:function(){var e,t=this["n"],r=this["d"],n=[];if(isNaN(t)||isNaN(r))return n;do{n.push(Math.floor(t/r)),e=t%r,t=r,r=e}while(1!==t);return n},toString:function(e){var t=this["n"],r=this["d"];if(isNaN(t)||isNaN(r))return"NaN";e=e||15;var n=m(t,r),i=g(t,r,n),a=-1===this["s"]?"-":"";if(a+=t/r|0,t%=r,t*=10,t&&(a+="."),n){for(var o=i;o--;)a+=t/r|0,t%=r,t*=10;a+="(";for(o=n;o--;)a+=t/r|0,t%=r,t*=10;a+=")"}else for(o=e;t&&o--;)a+=t/r|0,t%=r,t*=10;return a}},n=[],i=function(){return y}.apply(t,n),void 0===i||(e.exports=i)})()},d70e:function(e){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},da3e:function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=r,r.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},da84:function(e,t,r){(function(t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")()}).call(this,r("c8ba"))},dc14:function(e,t,r){"use strict";(function(t,n){var i=r("966d");function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){q(t,e)}}e.exports=b;var o,s=!t.browser&&["v0.10","v0.9."].indexOf(t.version.slice(0,5))>-1?setImmediate:i.nextTick;b.WritableState=y;var u=Object.create(r("3a7c"));u.inherits=r("3fb5");var c={deprecate:r("b7d1")},f=r("429b"),h=r("a8f0").Buffer,l=n.Uint8Array||function(){};function d(e){return h.from(e)}function p(e){return h.isBuffer(e)||e instanceof l}var m,g=r("4681");function v(){}function y(e,t){o=o||r("b19a"),e=e||{};var n=t instanceof o;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var i=e.highWaterMark,s=e.writableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:u,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 c=!1===e.decodeStrings;this.decodeStrings=!c,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){A(t,e)},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 a(this)}function b(e){if(o=o||r("b19a"),!m.call(b,this)&&!(this instanceof o))return new b(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev),"function"===typeof e.destroy&&(this._destroy=e.destroy),"function"===typeof e.final&&(this._final=e.final)),f.call(this)}function w(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}function M(e,t,r,n){var a=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):"string"===typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),i.nextTick(n,o),a=!1),a}function x(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=h.from(t,r)),t}function _(e,t,r,n,i,a){if(!r){var o=x(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,s,n,i,a);return u}function S(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function N(e,t,r,n,a){--t.pendingcb,r?(i.nextTick(a,n),i.nextTick(B,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(a(n),e._writableState.errorEmitted=!0,e.emit("error",n),B(e,t))}function E(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function A(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(E(r),t)N(e,r,n,t,i);else{var a=C(r);a||r.corked||r.bufferProcessing||!r.bufferedRequest||O(e,r),n?s(D,e,r,a,i):D(e,r,a,i)}}function D(e,t,r,n){r||k(e,t),t.pendingcb--,n(),B(e,t)}function k(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function O(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;var s=0,u=!0;while(r)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,S(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{while(r){var c=r.chunk,f=r.encoding,h=r.callback,l=t.objectMode?1:c.length;if(S(e,t,!1,l,c,f,h),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function C(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function T(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),B(e,t)}))}function R(e,t){t.prefinished||t.finalCalled||("function"===typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(T,e,t)):(t.prefinished=!0,e.emit("prefinish")))}function B(e,t){var r=C(t);return r&&(R(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}function I(e,t,r){t.ending=!0,B(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function q(e,t,r){var n=e.entry;e.entry=null;while(n){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}u.inherits(b,f),y.prototype.getBuffer=function(){var e=this.bufferedRequest,t=[];while(e)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(y.prototype,"buffer",{get:c.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"===typeof Symbol&&Symbol.hasInstance&&"function"===typeof Function.prototype[Symbol.hasInstance]?(m=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(e){return!!m.call(this,e)||this===b&&(e&&e._writableState instanceof y)}})):m=function(e){return e instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&p(e);return a&&!h.isBuffer(e)&&(e=d(e)),"function"===typeof t&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!==typeof r&&(r=v),n.ended?w(this,r):(a||M(this,n,e,r))&&(n.pendingcb++,i=_(this,n,a,e,t,r)),i},b.prototype.cork=function(){var e=this._writableState;e.corked++},b.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||O(this,e))},b.prototype.setDefaultEncoding=function(e){if("string"===typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(e,t,r){var n=this._writableState;"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||I(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),b.prototype.destroy=g.destroy,b.prototype._undestroy=g.undestroy,b.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,r("4362"),r("c8ba"))},df75:function(e,t,r){var n=r("ca84"),i=r("7839");e.exports=Object.keys||function(e){return n(e,i)}},df7c:function(e,t,r){(function(e){function r(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e){"string"!==typeof e&&(e+="");var t,r=0,n=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){r=t+1;break}}else-1===n&&(i=!1,n=t+1);return-1===n?"":e.slice(r,n)}function i(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}t.resolve=function(){for(var t="",n=!1,a=arguments.length-1;a>=-1&&!n;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!==typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(t=o+"/"+t,n="/"===o.charAt(0))}return t=r(i(t.split("/"),(function(e){return!!e})),!n).join("/"),(n?"/":"")+t||"."},t.normalize=function(e){var n=t.isAbsolute(e),o="/"===a(e,-1);return e=r(i(e.split("/"),(function(e){return!!e})),!n).join("/"),e||n||(e="."),e&&o&&(e+="/"),(n?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(i(e,(function(e,t){if("string"!==typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,r){function n(e){for(var t=0;t<e.length;t++)if(""!==e[t])break;for(var r=e.length-1;r>=0;r--)if(""!==e[r])break;return t>r?[]:e.slice(t,r-t+1)}e=t.resolve(e).substr(1),r=t.resolve(r).substr(1);for(var i=n(e.split("/")),a=n(r.split("/")),o=Math.min(i.length,a.length),s=o,u=0;u<o;u++)if(i[u]!==a[u]){s=u;break}var c=[];for(u=s;u<i.length;u++)c.push("..");return c=c.concat(a.slice(s)),c.join("/")},t.sep="/",t.delimiter=":",t.dirname=function(e){if("string"!==typeof e&&(e+=""),0===e.length)return".";for(var t=e.charCodeAt(0),r=47===t,n=-1,i=!0,a=e.length-1;a>=1;--a)if(t=e.charCodeAt(a),47===t){if(!i){n=a;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":e.slice(0,n)},t.basename=function(e,t){var r=n(e);return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r},t.extname=function(e){"string"!==typeof e&&(e+="");for(var t=-1,r=0,n=-1,i=!0,a=0,o=e.length-1;o>=0;--o){var s=e.charCodeAt(o);if(47!==s)-1===n&&(i=!1,n=o+1),46===s?-1===t?t=o:1!==a&&(a=1):-1!==t&&(a=-1);else if(!i){r=o+1;break}}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)};var a="b"==="ab".substr(-1)?function(e,t,r){return e.substr(t,r)}:function(e,t,r){return t<0&&(t=e.length+t),e.substr(t,r)}}).call(this,r("4362"))},e07b:function(e,t,r){var n=r("5a76"),i=r("b5ca"),a=r("69f2"),o=r("7d2a"),s=r("9f9d"),u=r("8707").Buffer,c=u.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,r){var n=l(e),i="sha512"===e||"sha384"===e?128:64;t.length>i?t=n(t):t.length<i&&(t=u.concat([t,c],i));for(var a=u.allocUnsafe(i+f[e]),o=u.allocUnsafe(i+f[e]),s=0;s<i;s++)a[s]=54^t[s],o[s]=92^t[s];var h=u.allocUnsafe(i+r+4);a.copy(h,0,0,i),this.ipad1=h,this.ipad2=a,this.opad=o,this.alg=e,this.blocksize=i,this.hash=n,this.size=f[e]}function l(e){function t(t){return a(e).update(t).digest()}function r(e){return(new i).update(e).digest()}return"rmd160"===e||"ripemd160"===e?r:"md5"===e?n:t}function d(e,t,r,n,i){o(e,t,r,n),u.isBuffer(e)||(e=u.from(e,s)),u.isBuffer(t)||(t=u.from(t,s)),i=i||"sha1";var a=new h(i,e,t.length),c=u.allocUnsafe(n),l=u.allocUnsafe(t.length+4);t.copy(l,0,0,t.length);for(var d=0,p=f[i],m=Math.ceil(n/p),g=1;g<=m;g++){l.writeUInt32BE(g,t.length);for(var v=a.run(l,a.ipad1),y=v,b=1;b<r;b++){y=a.run(y,a.ipad2);for(var w=0;w<p;w++)v[w]^=y[w]}v.copy(c,d),d+=p}return c}h.prototype.run=function(e,t){e.copy(t,this.blocksize);var r=this.hash(t);return r.copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=d},e1d3:function(e,t,r){(function(t){var n=r("3337"),i=r("37e6");e.exports=function(e){return new o(e)};var a={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function o(e){this.curveType=a[e],this.curveType||(this.curveType={name:e}),this.curve=new n.ec(this.curveType.name),this.keys=void 0}function s(e,r,n){Array.isArray(e)||(e=e.toArray());var i=new t(e);if(n&&i.length<n){var a=new t(n-i.length);a.fill(0),i=t.concat([a,i])}return r?i.toString(r):i}a.p224=a.secp224r1,a.p256=a.secp256r1=a.prime256v1,a.p192=a.secp192r1=a.prime192v1,a.p384=a.secp384r1,a.p521=a.secp521r1,o.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},o.prototype.computeSecret=function(e,r,n){r=r||"utf8",t.isBuffer(e)||(e=new t(e,r));var i=this.curve.keyFromPublic(e).getPublic(),a=i.mul(this.keys.getPrivate()).getX();return s(a,n,this.curveType.byteLength)},o.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),s(r,e)},o.prototype.getPrivateKey=function(e){return s(this.keys.getPrivate(),e)},o.prototype.setPublicKey=function(e,r){return r=r||"utf8",t.isBuffer(e)||(e=new t(e,r)),this.keys._importPublic(e),this},o.prototype.setPrivateKey=function(e,r){r=r||"utf8",t.isBuffer(e)||(e=new t(e,r));var n=new i(e);return n=n.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(n),this}}).call(this,r("b639").Buffer)},e372:function(e,t,r){t=e.exports=r("ad71"),t.Stream=t,t.Readable=t,t.Writable=r("dc14"),t.Duplex=r("b19a"),t.Transform=r("27bf"),t.PassThrough=r("780f")},e3db:function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},e666:function(e,t,r){"use strict";(function(t){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var i=r("4250"),a=r("19ea");r("3fb5")(c,i);for(var o=n(a.prototype),s=0;s<o.length;s++){var u=o[s];c.prototype[u]||(c.prototype[u]=a.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||t.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,r("4362"))},e85f:function(e){e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},e893:function(e,t,r){var n=r("5135"),i=r("56ef"),a=r("06cf"),o=r("9bf2");e.exports=function(e,t){for(var r=i(t),s=o.f,u=a.f,c=0;c<r.length;c++){var f=r[c];n(e,f)||s(e,f,u(t,f))}}},e975:function(e,t){e.exports=function e(t,r){"use strict";var n,i,a=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,o=/(^[ ]*|[ ]*$)/g,s=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,u=/^0x[0-9a-f]+$/i,c=/^0/,f=function(t){return e.insensitive&&(""+t).toLowerCase()||""+t},h=f(t).replace(o,"")||"",l=f(r).replace(o,"")||"",d=h.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=l.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=parseInt(h.match(u),16)||1!==d.length&&h.match(s)&&Date.parse(h),g=parseInt(l.match(u),16)||m&&l.match(s)&&Date.parse(l)||null;if(g){if(m<g)return-1;if(m>g)return 1}for(var v=0,y=Math.max(d.length,p.length);v<y;v++){if(n=!(d[v]||"").match(c)&&parseFloat(d[v])||d[v]||0,i=!(p[v]||"").match(c)&&parseFloat(p[v])||p[v]||0,isNaN(n)!==isNaN(i))return isNaN(n)?1:-1;if(typeof n!==typeof i&&(n+="",i+=""),n<i)return-1;if(n>i)return 1}return 0}},ea53:function(e,t,r){"use strict";var n=r("80af"),i=r("f3a3"),a=i.getNAF,o=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.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 c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var r=e._getDoubles(),n=a(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2===0?2:1);i/=3;for(var o=[],u=0;u<n.length;u+=r.step){var c=0;for(t=u+r.step-1;t>=u;t--)c=(c<<1)+n[t];o.push(c)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),l=i;l>0;l--){for(u=0;u<o.length;u++){c=o[u];c===l?h=h.mixedAdd(r.points[u]):c===-l&&(h=h.mixedAdd(r.points[u].neg()))}f=f.add(h)}return f.toP()},u.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=a(t,r,this._bitLength),u=this.jpoint(null,null,null),c=o.length-1;c>=0;c--){for(t=0;c>=0&&0===o[c];c--)t++;if(c>=0&&t++,u=u.dblp(t),c<0)break;var f=o[c];s(0!==f),u="affine"===e.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,f=0,h=0;h<n;h++){var l=t[h],d=l._getNAFPoints(e);s[h]=d.wnd,u[h]=d.points}for(h=n-1;h>=1;h-=2){var p=h-1,m=h;if(1===s[p]&&1===s[m]){var g=[t[p],null,null,t[m]];0===t[p].y.cmp(t[m].y)?(g[1]=t[p].add(t[m]),g[2]=t[p].toJ().mixedAdd(t[m].neg())):0===t[p].y.cmp(t[m].y.redNeg())?(g[1]=t[p].toJ().mixedAdd(t[m]),g[2]=t[p].add(t[m].neg())):(g[1]=t[p].toJ().mixedAdd(t[m]),g[2]=t[p].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=o(r[p],r[m]);f=Math.max(y[0].length,f),c[p]=new Array(f),c[m]=new Array(f);for(var b=0;b<f;b++){var w=0|y[0][b],M=0|y[1][b];c[p][b]=v[3*(w+1)+(M+1)],c[m][b]=0,u[p]=g}}else c[p]=a(r[p],s[p],this._bitLength),c[m]=a(r[m],s[m],this._bitLength),f=Math.max(c[p].length,f),f=Math.max(c[m].length,f)}var x=this.jpoint(null,null,null),_=this._wnafT4;for(h=f;h>=0;h--){var S=0;while(h>=0){var N=!0;for(b=0;b<n;b++)_[b]=0|c[b][h],0!==_[b]&&(N=!1);if(!N)break;S++,h--}if(h>=0&&S++,x=x.dblp(S),h<0)break;for(b=0;b<n;b++){var E=_[b];0!==E&&(E>0?l=u[b][E-1>>1]:E<0&&(l=u[b][-E-1>>1].neg()),x="affine"===l.type?x.mixedAdd(l):x.add(l))}}for(h=0;h<n;h++)u[h]=null;return i?x:x.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1===2*r){6===e[0]?s(e[e.length-1]%2===0):7===e[0]&&s(e[e.length-1]%2===1);var n=this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));return n}if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var a=0;a<e;a++)n=n.dbl();r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},edaf:function(e,t,r){var n,i;
|
|
27
|
-
/**
|
|
28
|
-
* @license Complex.js v2.0.15 12/05/2020
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) 2020, Robert Eisele (robert@xarg.org)
|
|
31
|
-
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
32
|
-
**/(function(r){"use strict";var a=function(e){return.5*(Math.exp(e)+Math.exp(-e))},o=function(e){return.5*(Math.exp(e)-Math.exp(-e))},s=function(e){var t=Math.PI/4;if(-t>e||e>t)return Math.cos(e)-1;var r=e*e;return r*(r*(r*(r*(r*(r*(r*(r/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-.5)},u=function(e,t){var r=Math.abs(e),n=Math.abs(t);return r<3e3&&n<3e3?Math.sqrt(r*r+n*n):(r<n?(r=n,n=e/t):n=t/e,r*Math.sqrt(1+n*n))},c=function(){throw SyntaxError("Invalid Param")};function f(e,t){var r=Math.abs(e),n=Math.abs(t);return 0===e?Math.log(n):0===t?Math.log(r):r<3e3&&n<3e3?.5*Math.log(e*e+t*t):Math.log(e/Math.cos(Math.atan2(t,e)))}var h=function(e,t){var r={re:0,im:0};if(void 0===e||null===e)r["re"]=r["im"]=0;else if(void 0!==t)r["re"]=e,r["im"]=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)r["re"]=e["re"],r["im"]=e["im"];else if("abs"in e&&"arg"in e){if(!Number.isFinite(e["abs"])&&Number.isFinite(e["arg"]))return l["INFINITY"];r["re"]=e["abs"]*Math.cos(e["arg"]),r["im"]=e["abs"]*Math.sin(e["arg"])}else if("r"in e&&"phi"in e){if(!Number.isFinite(e["r"])&&Number.isFinite(e["phi"]))return l["INFINITY"];r["re"]=e["r"]*Math.cos(e["phi"]),r["im"]=e["r"]*Math.sin(e["phi"])}else 2===e.length?(r["re"]=e[0],r["im"]=e[1]):c();break;case"string":r["im"]=r["re"]=0;var n=e.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),i=1,a=0;null===n&&c();for(var o=0;o<n.length;o++){var s=n[o];" "===s||"\t"===s||"\n"===s||("+"===s?i++:"-"===s?a++:"i"===s||"I"===s?(i+a===0&&c()," "===n[o+1]||isNaN(n[o+1])?r["im"]+=parseFloat((a%2?"-":"")+"1"):(r["im"]+=parseFloat((a%2?"-":"")+n[o+1]),o++),i=a=0):((i+a===0||isNaN(s))&&c(),"i"===n[o+1]||"I"===n[o+1]?(r["im"]+=parseFloat((a%2?"-":"")+s),o++):r["re"]+=parseFloat((a%2?"-":"")+s),i=a=0))}i+a>0&&c();break;case"number":r["im"]=0,r["re"]=e;break;default:c()}return isNaN(r["re"])||isNaN(r["im"]),r};function l(e,t){if(!(this instanceof l))return new l(e,t);var r=h(e,t);this["re"]=r["re"],this["im"]=r["im"]}l.prototype={re:0,im:0,sign:function(){var e=this["abs"]();return new l(this["re"]/e,this["im"]/e)},add:function(e,t){var r=new l(e,t);return this["isInfinite"]()&&r["isInfinite"]()?l["NAN"]:this["isInfinite"]()||r["isInfinite"]()?l["INFINITY"]:new l(this["re"]+r["re"],this["im"]+r["im"])},sub:function(e,t){var r=new l(e,t);return this["isInfinite"]()&&r["isInfinite"]()?l["NAN"]:this["isInfinite"]()||r["isInfinite"]()?l["INFINITY"]:new l(this["re"]-r["re"],this["im"]-r["im"])},mul:function(e,t){var r=new l(e,t);return this["isInfinite"]()&&r["isZero"]()||this["isZero"]()&&r["isInfinite"]()?l["NAN"]:this["isInfinite"]()||r["isInfinite"]()?l["INFINITY"]:0===r["im"]&&0===this["im"]?new l(this["re"]*r["re"],0):new l(this["re"]*r["re"]-this["im"]*r["im"],this["re"]*r["im"]+this["im"]*r["re"])},div:function(e,t){var r=new l(e,t);if(this["isZero"]()&&r["isZero"]()||this["isInfinite"]()&&r["isInfinite"]())return l["NAN"];if(this["isInfinite"]()||r["isZero"]())return l["INFINITY"];if(this["isZero"]()||r["isInfinite"]())return l["ZERO"];e=this["re"],t=this["im"];var n,i,a=r["re"],o=r["im"];return 0===o?new l(e/a,t/a):Math.abs(a)<Math.abs(o)?(i=a/o,n=a*i+o,new l((e*i+t)/n,(t*i-e)/n)):(i=o/a,n=o*i+a,new l((e+t*i)/n,(t-e*i)/n))},pow:function(e,t){var r=new l(e,t);if(e=this["re"],t=this["im"],r["isZero"]())return l["ONE"];if(0===r["im"]){if(0===t&&e>0)return new l(Math.pow(e,r["re"]),0);if(0===e)switch((r["re"]%4+4)%4){case 0:return new l(Math.pow(t,r["re"]),0);case 1:return new l(0,Math.pow(t,r["re"]));case 2:return new l(-Math.pow(t,r["re"]),0);case 3:return new l(0,-Math.pow(t,r["re"]))}}if(0===e&&0===t&&r["re"]>0&&r["im"]>=0)return l["ZERO"];var n=Math.atan2(t,e),i=f(e,t);return e=Math.exp(r["re"]*i-r["im"]*n),t=r["im"]*i+r["re"]*n,new l(e*Math.cos(t),e*Math.sin(t))},sqrt:function(){var e,t,r=this["re"],n=this["im"],i=this["abs"]();if(r>=0){if(0===n)return new l(Math.sqrt(r),0);e=.5*Math.sqrt(2*(i+r))}else e=Math.abs(n)/Math.sqrt(2*(i-r));return t=r<=0?.5*Math.sqrt(2*(i-r)):Math.abs(n)/Math.sqrt(2*(i+r)),new l(e,n<0?-t:t)},exp:function(){var e=Math.exp(this["re"]);return this["im"],new l(e*Math.cos(this["im"]),e*Math.sin(this["im"]))},expm1:function(){var e=this["re"],t=this["im"];return new l(Math.expm1(e)*Math.cos(t)+s(t),Math.exp(e)*Math.sin(t))},log:function(){var e=this["re"],t=this["im"];return new l(f(e,t),Math.atan2(t,e))},abs:function(){return u(this["re"],this["im"])},arg:function(){return Math.atan2(this["im"],this["re"])},sin:function(){var e=this["re"],t=this["im"];return new l(Math.sin(e)*a(t),Math.cos(e)*o(t))},cos:function(){var e=this["re"],t=this["im"];return new l(Math.cos(e)*a(t),-Math.sin(e)*o(t))},tan:function(){var e=2*this["re"],t=2*this["im"],r=Math.cos(e)+a(t);return new l(Math.sin(e)/r,o(t)/r)},cot:function(){var e=2*this["re"],t=2*this["im"],r=Math.cos(e)-a(t);return new l(-Math.sin(e)/r,o(t)/r)},sec:function(){var e=this["re"],t=this["im"],r=.5*a(2*t)+.5*Math.cos(2*e);return new l(Math.cos(e)*a(t)/r,Math.sin(e)*o(t)/r)},csc:function(){var e=this["re"],t=this["im"],r=.5*a(2*t)-.5*Math.cos(2*e);return new l(Math.sin(e)*a(t)/r,-Math.cos(e)*o(t)/r)},asin:function(){var e=this["re"],t=this["im"],r=new l(t*t-e*e+1,-2*e*t)["sqrt"](),n=new l(r["re"]-t,r["im"]+e)["log"]();return new l(n["im"],-n["re"])},acos:function(){var e=this["re"],t=this["im"],r=new l(t*t-e*e+1,-2*e*t)["sqrt"](),n=new l(r["re"]-t,r["im"]+e)["log"]();return new l(Math.PI/2-n["im"],n["re"])},atan:function(){var e=this["re"],t=this["im"];if(0===e){if(1===t)return new l(0,1/0);if(-1===t)return new l(0,-1/0)}var r=e*e+(1-t)*(1-t),n=new l((1-t*t-e*e)/r,-2*e/r).log();return new l(-.5*n["im"],.5*n["re"])},acot:function(){var e=this["re"],t=this["im"];if(0===t)return new l(Math.atan2(1,e),0);var r=e*e+t*t;return 0!==r?new l(e/r,-t/r).atan():new l(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){var e=this["re"],t=this["im"];if(0===e&&0===t)return new l(0,1/0);var r=e*e+t*t;return 0!==r?new l(e/r,-t/r).acos():new l(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){var e=this["re"],t=this["im"];if(0===e&&0===t)return new l(Math.PI/2,1/0);var r=e*e+t*t;return 0!==r?new l(e/r,-t/r).asin():new l(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){var e=this["re"],t=this["im"];return new l(o(e)*Math.cos(t),a(e)*Math.sin(t))},cosh:function(){var e=this["re"],t=this["im"];return new l(a(e)*Math.cos(t),o(e)*Math.sin(t))},tanh:function(){var e=2*this["re"],t=2*this["im"],r=a(e)+Math.cos(t);return new l(o(e)/r,Math.sin(t)/r)},coth:function(){var e=2*this["re"],t=2*this["im"],r=a(e)-Math.cos(t);return new l(o(e)/r,-Math.sin(t)/r)},csch:function(){var e=this["re"],t=this["im"],r=Math.cos(2*t)-a(2*e);return new l(-2*o(e)*Math.cos(t)/r,2*a(e)*Math.sin(t)/r)},sech:function(){var e=this["re"],t=this["im"],r=Math.cos(2*t)+a(2*e);return new l(2*a(e)*Math.cos(t)/r,-2*o(e)*Math.sin(t)/r)},asinh:function(){var e=this["im"];this["im"]=-this["re"],this["re"]=e;var t=this["asin"]();return this["re"]=-this["im"],this["im"]=e,e=t["re"],t["re"]=-t["im"],t["im"]=e,t},acosh:function(){var e=this["acos"]();if(e["im"]<=0){var t=e["re"];e["re"]=-e["im"],e["im"]=t}else{t=e["im"];e["im"]=-e["re"],e["re"]=t}return e},atanh:function(){var e=this["re"],t=this["im"],r=e>1&&0===t,n=1-e,i=1+e,a=n*n+t*t,o=0!==a?new l((i*n-t*t)/a,(t*n+i*t)/a):new l(-1!==e?e/0:0,0!==t?t/0:0),s=o["re"];return o["re"]=f(o["re"],o["im"])/2,o["im"]=Math.atan2(o["im"],s)/2,r&&(o["im"]=-o["im"]),o},acoth:function(){var e=this["re"],t=this["im"];if(0===e&&0===t)return new l(0,Math.PI/2);var r=e*e+t*t;return 0!==r?new l(e/r,-t/r).atanh():new l(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){var e=this["re"],t=this["im"];if(0===t)return new l(0!==e?Math.log(e+Math.sqrt(e*e+1)):1/0,0);var r=e*e+t*t;return 0!==r?new l(e/r,-t/r).asinh():new l(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){var e=this["re"],t=this["im"];if(this["isZero"]())return l["INFINITY"];var r=e*e+t*t;return 0!==r?new l(e/r,-t/r).acosh():new l(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this["isZero"]())return l["INFINITY"];if(this["isInfinite"]())return l["ZERO"];var e=this["re"],t=this["im"],r=e*e+t*t;return new l(e/r,-t/r)},conjugate:function(){return new l(this["re"],-this["im"])},neg:function(){return new l(-this["re"],-this["im"])},ceil:function(e){return e=Math.pow(10,e||0),new l(Math.ceil(this["re"]*e)/e,Math.ceil(this["im"]*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new l(Math.floor(this["re"]*e)/e,Math.floor(this["im"]*e)/e)},round:function(e){return e=Math.pow(10,e||0),new l(Math.round(this["re"]*e)/e,Math.round(this["im"]*e)/e)},equals:function(e,t){var r=new l(e,t);return Math.abs(r["re"]-this["re"])<=l["EPSILON"]&&Math.abs(r["im"]-this["im"])<=l["EPSILON"]},clone:function(){return new l(this["re"],this["im"])},toString:function(){var e=this["re"],t=this["im"],r="";return this["isNaN"]()?"NaN":this["isInfinite"]()?"Infinity":(Math.abs(e)<l["EPSILON"]&&(e=0),Math.abs(t)<l["EPSILON"]&&(t=0),0===t?r+e:(0!==e?(r+=e,r+=" ",t<0?(t=-t,r+="-"):r+="+",r+=" "):t<0&&(t=-t,r+="-"),1!==t&&(r+=t),r+"i"))},toVector:function(){return[this["re"],this["im"]]},valueOf:function(){return 0===this["im"]?this["re"]:null},isNaN:function(){return isNaN(this["re"])||isNaN(this["im"])},isZero:function(){return 0===this["im"]&&0===this["re"]},isFinite:function(){return isFinite(this["re"])&&isFinite(this["im"])},isInfinite:function(){return!(this["isNaN"]()||this["isFinite"]())}},l["ZERO"]=new l(0,0),l["ONE"]=new l(1,0),l["I"]=new l(0,1),l["PI"]=new l(Math.PI,0),l["E"]=new l(Math.E,0),l["INFINITY"]=new l(1/0,1/0),l["NAN"]=new l(NaN,NaN),l["EPSILON"]=1e-15,n=[],i=function(){return l}.apply(t,n),void 0===i||(e.exports=i)})()},edc9:function(e,t,r){"use strict";var n=r("c3c0"),i=r("da3e");function a(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=a,a.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},a.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},a.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var a=8;a<this.padLength;a++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,a=8;a<this.padLength;a++)n[i++]=0;return n}},ee93:function(e,t,r){"use strict";var n=r("9d8a").codes.ERR_STREAM_PREMATURE_CLOSE;function i(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}function a(){}function o(e){return e.setHeader&&"function"===typeof e.abort}function s(e,t,r){if("function"===typeof t)return s(e,null,t);t||(t={}),r=i(r||a);var u=t.readable||!1!==t.readable&&e.readable,c=t.writable||!1!==t.writable&&e.writable,f=function(){e.writable||l()},h=e._writableState&&e._writableState.finished,l=function(){c=!1,h=!0,u||r.call(e)},d=e._readableState&&e._readableState.endEmitted,p=function(){u=!1,d=!0,c||r.call(e)},m=function(t){r.call(e,t)},g=function(){var t;return u&&!d?(e._readableState&&e._readableState.ended||(t=new n),r.call(e,t)):c&&!h?(e._writableState&&e._writableState.ended||(t=new n),r.call(e,t)):void 0},v=function(){e.req.on("finish",l)};return o(e)?(e.on("complete",l),e.on("abort",g),e.req?v():e.on("request",v)):c&&!e._writableState&&(e.on("end",f),e.on("close",f)),e.on("end",p),e.on("finish",l),!1!==t.error&&e.on("error",m),e.on("close",g),function(){e.removeListener("complete",l),e.removeListener("abort",g),e.removeListener("request",v),e.req&&e.req.removeListener("finish",l),e.removeListener("end",f),e.removeListener("close",f),e.removeListener("finish",l),e.removeListener("end",p),e.removeListener("error",m),e.removeListener("close",g)}}e.exports=s},ef3a:function(e,t,r){var n=r("7f7a"),i=r("3fb5"),a=t;function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}a.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){var t;try{t=r("0706").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(n){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},f12a:function(e,t,r){e.exports=r("faa1").EventEmitter},f1c8:function(e,t,r){"use strict";e.exports=f;var n=r("d113").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r("5e7d");function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"===typeof e.transform&&(this._transform=e.transform),"function"===typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",h)}function h(){var e=this;"function"!==typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,r){l(e,t,r)}))}function l(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}r("3fb5")(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},f3a3:function(e,t,r){"use strict";var n=t,i=r("80af"),a=r("da3e"),o=r("7658");function s(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,a=e.clone(),o=0;o<n.length;o++){var s,u=a.andln(i-1);a.isOdd()?(s=u>(i>>1)-1?(i>>1)-u:u,a.isubn(s)):s=0,n[o]=s,a.iushrn(1)}return n}function u(e,t){var r=[[],[]];e=e.clone(),t=t.clone();var n=0,i=0;while(e.cmpn(-n)>0||t.cmpn(-i)>0){var a,o,s=e.andln(3)+n&3,u=t.andln(3)+i&3;if(3===s&&(s=-1),3===u&&(u=-1),0===(1&s))a=0;else{var c=e.andln(7)+n&7;a=3!==c&&5!==c||2!==u?s:-s}if(r[0].push(a),0===(1&u))o=0;else{c=t.andln(7)+i&7;o=3!==c&&5!==c||2!==s?u:-u}r[1].push(o),2*n===a+1&&(n=1-n),2*i===o+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function c(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function f(e){return"string"===typeof e?n.toArray(e,"hex"):e}function h(e){return new i(e,"hex","le")}n.assert=a,n.toArray=o.toArray,n.zero2=o.zero2,n.toHex=o.toHex,n.encode=o.encode,n.getNAF=s,n.getJSF=u,n.cachedProperty=c,n.parseBytes=f,n.intFromLE=h},f460:function(e,t,r){var n=r("98e6"),i=r("8707").Buffer;function a(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){var r,o=i.alloc(0),s=0;while(o.length<t)r=a(s++),o=i.concat([o,n("sha1").update(e).update(r).digest()]);return o.slice(0,t)}},f576:function(e,t,r){"use strict";var n=r("3fb5"),i=r("93e6"),a=r("8707").Buffer,o=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function c(e,t,r,n,i,a,o){return u(e+(t&r|~t&n)+i+a|0,o)+t|0}function f(e,t,r,n,i,a,o){return u(e+(t&n|r&~n)+i+a|0,o)+t|0}function h(e,t,r,n,i,a,o){return u(e+(t^r^n)+i+a|0,o)+t|0}function l(e,t,r,n,i,a,o){return u(e+(r^(t|~n))+i+a|0,o)+t|0}n(s,i),s.prototype._update=function(){for(var e=o,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,a=this._d;r=c(r,n,i,a,e[0],3614090360,7),a=c(a,r,n,i,e[1],3905402710,12),i=c(i,a,r,n,e[2],606105819,17),n=c(n,i,a,r,e[3],3250441966,22),r=c(r,n,i,a,e[4],4118548399,7),a=c(a,r,n,i,e[5],1200080426,12),i=c(i,a,r,n,e[6],2821735955,17),n=c(n,i,a,r,e[7],4249261313,22),r=c(r,n,i,a,e[8],1770035416,7),a=c(a,r,n,i,e[9],2336552879,12),i=c(i,a,r,n,e[10],4294925233,17),n=c(n,i,a,r,e[11],2304563134,22),r=c(r,n,i,a,e[12],1804603682,7),a=c(a,r,n,i,e[13],4254626195,12),i=c(i,a,r,n,e[14],2792965006,17),n=c(n,i,a,r,e[15],1236535329,22),r=f(r,n,i,a,e[1],4129170786,5),a=f(a,r,n,i,e[6],3225465664,9),i=f(i,a,r,n,e[11],643717713,14),n=f(n,i,a,r,e[0],3921069994,20),r=f(r,n,i,a,e[5],3593408605,5),a=f(a,r,n,i,e[10],38016083,9),i=f(i,a,r,n,e[15],3634488961,14),n=f(n,i,a,r,e[4],3889429448,20),r=f(r,n,i,a,e[9],568446438,5),a=f(a,r,n,i,e[14],3275163606,9),i=f(i,a,r,n,e[3],4107603335,14),n=f(n,i,a,r,e[8],1163531501,20),r=f(r,n,i,a,e[13],2850285829,5),a=f(a,r,n,i,e[2],4243563512,9),i=f(i,a,r,n,e[7],1735328473,14),n=f(n,i,a,r,e[12],2368359562,20),r=h(r,n,i,a,e[5],4294588738,4),a=h(a,r,n,i,e[8],2272392833,11),i=h(i,a,r,n,e[11],1839030562,16),n=h(n,i,a,r,e[14],4259657740,23),r=h(r,n,i,a,e[1],2763975236,4),a=h(a,r,n,i,e[4],1272893353,11),i=h(i,a,r,n,e[7],4139469664,16),n=h(n,i,a,r,e[10],3200236656,23),r=h(r,n,i,a,e[13],681279174,4),a=h(a,r,n,i,e[0],3936430074,11),i=h(i,a,r,n,e[3],3572445317,16),n=h(n,i,a,r,e[6],76029189,23),r=h(r,n,i,a,e[9],3654602809,4),a=h(a,r,n,i,e[12],3873151461,11),i=h(i,a,r,n,e[15],530742520,16),n=h(n,i,a,r,e[2],3299628645,23),r=l(r,n,i,a,e[0],4096336452,6),a=l(a,r,n,i,e[7],1126891415,10),i=l(i,a,r,n,e[14],2878612391,15),n=l(n,i,a,r,e[5],4237533241,21),r=l(r,n,i,a,e[12],1700485571,6),a=l(a,r,n,i,e[3],2399980690,10),i=l(i,a,r,n,e[10],4293915773,15),n=l(n,i,a,r,e[1],2240044497,21),r=l(r,n,i,a,e[8],1873313359,6),a=l(a,r,n,i,e[15],4264355552,10),i=l(i,a,r,n,e[6],2734768916,15),n=l(n,i,a,r,e[13],1309151649,21),r=l(r,n,i,a,e[4],4149444226,6),a=l(a,r,n,i,e[11],3174756917,10),i=l(i,a,r,n,e[2],718787259,15),n=l(n,i,a,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+a|0},s.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 e=a.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s},f5df:function(e,t,r){var n=r("00ee"),i=r("c6b6"),a=r("b622"),o=a("toStringTag"),s="Arguments"==i(function(){return arguments}()),u=function(e,t){try{return e[t]}catch(r){}};e.exports=n?i:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=u(t=Object(e),o))?r:s?i(t):"Object"==(n=i(t))&&"function"==typeof t.callee?"Arguments":n}},f772:function(e,t,r){var n=r("5692"),i=r("90e3"),a=n("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},f83c:function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},faa1:function(e,t,r){"use strict";var n,i="object"===typeof Reflect?Reflect:null,a=i&&"function"===typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};function o(e){console&&console.warn&&console.warn(e)}n=i&&"function"===typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var s=Number.isNaN||function(e){return e!==e};function u(){u.init.call(this)}e.exports=u,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var c=10;function f(e){if("function"!==typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function h(e){return void 0===e._maxListeners?u.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,a,s;if(f(r),a=e._events,void 0===a?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),s=a[t]),void 0===s)s=a[t]=r,++e._eventsCount;else if("function"===typeof s?s=a[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),i=h(e),i>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=s.length,o(u)}return e}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(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=d.bind(n);return i.listener=r,n.wrapFn=i,i}function m(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"===typeof i?r?[i.listener||i]:[i]:r?b(i):v(i,i.length)}function g(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"===typeof r)return 1;if(void 0!==r)return r.length}return 0}function v(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function y(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}function b(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!==typeof e||e<0||s(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");c=e}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||s(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},u.prototype.getMaxListeners=function(){return h(this)},u.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[e];if(void 0===u)return!1;if("function"===typeof u)a(u,this,t);else{var c=u.length,f=v(u,c);for(r=0;r<c;++r)a(f[r],this,t)}return!0},u.prototype.addListener=function(e,t){return l(this,e,t,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(e,t){return l(this,e,t,!0)},u.prototype.once=function(e,t){return f(t),this.on(e,p(this,e,t)),this},u.prototype.prependOnceListener=function(e,t){return f(t),this.prependListener(e,p(this,e,t)),this},u.prototype.removeListener=function(e,t){var r,n,i,a,o;if(f(t),n=this._events,void 0===n)return this;if(r=n[e],void 0===r)return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!==typeof r){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():y(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(e){var t,r,n;if(r=this._events,void 0===r)return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,a=Object.keys(r);for(n=0;n<a.length;++n)i=a[n],"removeListener"!==i&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(t=r[e],"function"===typeof t)this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},u.prototype.listeners=function(e){return m(this,e,!0)},u.prototype.rawListeners=function(e){return m(this,e,!1)},u.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},u.prototype.listenerCount=g,u.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},fb15:function(e,t,r){"use strict";r.r(t);r("1eb2");var n=r("3903");for(var i in n)["default"].indexOf(i)<0&&function(e){r.d(t,e,(function(){return n[e]}))}(i);t["default"]=n["default"]},fbd5:function(e,t,r){"use strict";var n;function i(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var a=r("9d8a").codes,o=a.ERR_MISSING_ARGS,s=a.ERR_STREAM_DESTROYED;function u(e){if(e)throw e}function c(e){return e.setHeader&&"function"===typeof e.abort}function f(e,t,a,o){o=i(o);var u=!1;e.on("close",(function(){u=!0})),void 0===n&&(n=r("ee93")),n(e,{readable:t,writable:a},(function(e){if(e)return o(e);u=!0,o()}));var f=!1;return function(t){if(!u&&!f)return f=!0,c(e)?e.abort():"function"===typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}function h(e){e()}function l(e,t){return e.pipe(t)}function d(e){return e.length?"function"!==typeof e[e.length-1]?u:e.pop():u}function p(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=d(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,r){var o=r<t.length-1,s=r>0;return f(e,o,s,(function(e){n||(n=e),e&&a.forEach(h),o||(a.forEach(h),i(n))}))}));return t.reduce(l)}e.exports=p},fc6a:function(e,t,r){var n=r("44ad"),i=r("1d80");e.exports=function(e){return n(i(e))}},fda6:function(e,t,r){var n=r("8947"),i=r("4228"),a=r("e85f");function o(){return Object.keys(a)}t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=o},fdac:function(e,t,r){var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"===typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"===typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=r(7);if("function"!==typeof a.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return a.randomBytes(e)}}catch(o){}},fdbf:function(e,t,r){var n=r("4930");e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})["default"]}));
|
|
33
|
-
//# sourceMappingURL=vue.umd.min.js.map
|