!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.math=t():e.math=t()}(this,()=>{var r={1977:function(e,t){var r;!function(){"use strict";function s(){throw SyntaxError("Invalid Param")}var n=Math.cosh||function(e){return Math.abs(e)<1e-9?1-e:.5*(Math.exp(e)+Math.exp(-e))},i=Math.sinh||function(e){return Math.abs(e)<1e-9?e:.5*(Math.exp(e)-Math.exp(-e))};function o(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):(e/=2,t/=2,.5*Math.log(e*e+t*t)+Math.LN2)}function c(e,t){if(!(this instanceof c))return new c(e,t);e=function(e,t){var r={re:0,im:0};if(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 c.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 c.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]):s();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&&s();for(var o=0;o{"use strict";function u(e,t){return s({},e,t)}var s=Object.assign||function(e){for(var t=1;t=e.length&&n.slice(0,e.length)===e&&(i+=a[o[t]],n=n.slice(e.length,n.length),r=!0)}),r||(i+=n.slice(0,1),n=n.slice(1,n.length))}();return i}},5628:function(e){!function(){"use strict";var d={s:1,n:0,d:1};function y(e,t){if(isNaN(e=parseInt(e,10)))throw g();return e*t}function u(e,t){if(0===t)throw v();var r=Object.create(a.prototype),n=(r.s=e<0?-1:1,i(e=e<0?-e:e,t));return r.n=e/n,r.d=t/n,r}function s(e){for(var t={},r=e,n=2,i=4;i<=r;){for(;r%n==0;)r/=n,t[n]=(t[n]||0)+1;i+=1+2*n++}return r!==e?1>=1)1&t&&(n=n*e%r);return n}(10,i,e),n=0;n<300;n++){if(t===r)return n;t=10*t%e,r=10*r%e}return 0}(r),a=this.s<0?"-":"";if(a+=t/r|0,(t=t%r*10)&&(a+="."),i){for(var o=n;o--;)a+=t/r|0,t=t%r*10;for(a+="(",o=i;o--;)a+=t/r|0,t=t%r*10;a+=")"}else for(o=e;t&&o--;)a+=t/r|0,t=t%r*10;return a}},Object.defineProperty(a,"__esModule",{value:!0}),e.exports=(a.default=a).Fraction=a}()},3228:e=>{e.exports=function t(e,r){"use strict";function n(e){return t.insensitive&&(""+e).toLowerCase()||""+e}var i,a,o=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,u=/(^[ ]*|[ ]*$)/g,s=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=/^0x[0-9a-f]+$/i,f=/^0/,e=n(e).replace(u,"")||"",r=n(r).replace(u,"")||"",l=e.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),p=r.replace(o,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),u=parseInt(e.match(c),16)||1!==l.length&&e.match(s)&&Date.parse(e),o=parseInt(r.match(c),16)||u&&r.match(s)&&Date.parse(r)||null;if(o){if(u{var n=r(4832),i=r(8652),a=r(801),o=r(2030),u=r(3618),s=r(9049),r=r(1971);r.alea=n,r.xor128=i,r.xorwow=a,r.xorshift7=o,r.xor4096=u,r.tychei=s,e.exports=r},4832:function(e,r,n){var o;!function(e){function i(e){var n,t=this,r=(n=4022871197,function(e){e=String(e);for(var t=0;t>>0)*n)>>>0,n+=4294967296*(r-=n)}return 2.3283064365386963e-10*(n>>>0)});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)}function a(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function t(e,t){var r=new i(e),e=t&&t.state,n=r.next;return n.int32=function(){return 4294967296*r.next()|0},n.double=function(){return n()+11102230246251565e-32*(2097152*n()|0)},n.quick=n,e&&("object"==typeof e&&a(e,r),n.state=function(){return a(r,{})}),n}e&&e.exports?e.exports=t:n.amdD&&n.amdO?void 0!==(o=function(){return t}.call(r,n,r,e))&&(e.exports=o):this.alea=t}(e=n.nmd(e),n.amdD)},9049:function(e,r,n){var o;!function(e){function i(e){var i=this,t="";i.next=function(){var e=(e=i.b)<<25^e>>>7^(t=i.c),t=t-(r=i.d)|0,r=r<<24^r>>>8^(n=i.a),n=n-e|0;return i.b=e=e<<20^e>>>12^t,i.c=t=t-r|0,i.d=r<<16^t>>>16^n,i.a=n-e|0},i.a=0,i.b=0,i.c=-1640531527,i.d=1367130551,e===Math.floor(e)?(i.a=e/4294967296|0,i.b=0|e):t+=e;for(var r=0;r>>0)/4294967296}var n=new i(e),e=t&&t.state;return r.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},r.int32=n.next,r.quick=r,e&&("object"==typeof e&&a(e,n),r.state=function(){return a(n,{})}),r}e&&e.exports?e.exports=t:n.amdD&&n.amdO?void 0!==(o=function(){return t}.call(r,n,r,e))&&(e.exports=o):this.tychei=t}(e=n.nmd(e),n.amdD)},8652:function(e,r,n){var o;!function(e){function i(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>>0)/4294967296}var n=new i(e),e=t&&t.state;return r.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},r.int32=n.next,r.quick=r,e&&("object"==typeof e&&a(e,n),r.state=function(){return a(n,{})}),r}e&&e.exports?e.exports=t:n.amdD&&n.amdO?void 0!==(o=function(){return t}.call(r,n,r,e))&&(e.exports=o):this.xor128=t}(e=n.nmd(e),n.amdD)},3618:function(e,r,n){var o;!function(e){function i(e){var t,r,n,i,a,o=this,u=(o.next=function(){var e,t,r=o.w,n=o.X,i=o.i;return o.w=r=r+1640531527|0,t=n[i+34&127],e=n[i=i+1&127],t=n[i]=(t^=t<<13)^t>>>15^((e^=e<<17)^e>>>12),o.i=i,t+(r^r>>>16)|0},o),s=e,c=[],f=128;for(s===(0|s)?(r=s,s=null):(s+="\0",r=0,f=Math.max(f,s.length)),n=0,i=-32;i>>15)^r<<4)^r>>>13,0<=i&&(n=0==(t=c[127&i]^=r+(a=a+1640531527|0))?n+1:0);for(128<=n&&(c[127&(s&&s.length||0)]=-1),n=127,i=512;0>>15)^(t=(t^=t<<17)^t>>>12);u.w=a,u.X=c,u.i=n}function a(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function t(e,t){function r(){return(n.next()>>>0)/4294967296}var n=new i(e=null==e?+new Date:e),e=t&&t.state;return r.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},r.int32=n.next,r.quick=r,e&&(e.X&&a(e,n),r.state=function(){return a(n,{})}),r}e&&e.exports?e.exports=t:n.amdD&&n.amdO?void 0!==(o=function(){return t}.call(r,n,r,e))&&(e.exports=o):this.xor4096=t}(e=n.nmd(e),n.amdD)},2030:function(e,r,n){var o;!function(e){function i(e){var t,i=this,r=(i.next=function(){var e=i.x,t=i.i,r=e[t],n=(r^=r>>>7)^r<<24;return n=(n=(n^=(r=e[t+1&7])^r>>>10)^((r=e[t+3&7])^r>>>3))^((r=e[t+4&7])^r<<7),r=e[t+7&7],n^=(r^=r<<13)^r<<9,e[t]=n,i.i=t+1&7,n},i),n=e,a=[];if(n===(0|n))a[0]=n;else for(n=""+n,t=0;t>>0)/4294967296}var n=new i(e=null==e?+new Date:e),e=t&&t.state;return r.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},r.int32=n.next,r.quick=r,e&&(e.x&&a(e,n),r.state=function(){return a(n,{})}),r}e&&e.exports?e.exports=t:n.amdD&&n.amdO?void 0!==(o=function(){return t}.call(r,n,r,e))&&(e.exports=o):this.xorshift7=t}(e=n.nmd(e),n.amdD)},801:function(e,r,n){var o;!function(e){function i(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,e===((t.v=0)|e)?t.x=e:r+=e;for(var n=0;n>>4),t.next()}function a(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 t(e,t){function r(){return(n.next()>>>0)/4294967296}var n=new i(e),e=t&&t.state;return r.double=function(){do{var e=((n.next()>>>11)+(n.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},r.int32=n.next,r.quick=r,e&&("object"==typeof e&&a(e,n),r.state=function(){return a(n,{})}),r}e&&e.exports?e.exports=t:n.amdD&&n.amdO?void 0!==(o=function(){return t}.call(r,n,r,e))&&(e.exports=o):this.xorwow=t}(e=n.nmd(e),n.amdD)},1971:function(e,t,r){var o,u="undefined"!=typeof self?self:this,s=[],c=Math,f=256,l=c.pow(f,6),p=c.pow(2,52),m=2*p,h=f-1;function n(e,t,r){function n(){for(var e=a.g(6),t=l,r=0;e>>=1;return(e+r)/t}var i=[],e=v(function e(t,r){var n,i=[],a=typeof t;if(r&&"object"==a)for(n in t)try{i.push(e(t[n],r-1))}catch(t){}return i.length?i:"string"==a?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[e,g(s)]:null==e?function(){try{var e;return o&&(e=o.randomBytes)?e=e(f):(e=new Uint8Array(f),(u.crypto||u.msCrypto).getRandomValues(e)),g(e)}catch(e){var t=u.navigator,t=t&&t.plugins;return[+new Date,u,t,u.screen,g(s)]}}():e,3),i),a=new d(i);return n.int32=function(){return 0|a.g(4)},n.quick=function(){return a.g(4)/4294967296},n.double=n,v(g(a.S),s),(t.pass||r||function(e,t,r,n){return n&&(n.S&&y(n,a),e.state=function(){return y(a,{})}),r?(c.random=e,t):e})(n,e,"global"in t?t.global:this==c,t.state)}function d(e){var t,r=e.length,o=this,n=0,i=o.i=o.j=0,a=o.S=[];for(r||(e=[r++]);n{function t(){}t.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){for(var t=[].slice.call(arguments,1),r=((this.e||(this.e={}))[e]||[]).slice(),n=0,i=r.length;n{},7061:(M,e,t)=>{var F=t(8698).default;function r(){"use strict";M.exports=function(){return o},M.exports.__esModule=!0,M.exports.default=M.exports;var s,o={},e=Object.prototype,c=e.hasOwnProperty,f=Object.defineProperty||function(e,t,r){e[t]=r.value},t="function"==typeof Symbol?Symbol:{},n=t.iterator||"@@iterator",r=t.asyncIterator||"@@asyncIterator",i=t.toStringTag||"@@toStringTag";function a(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(s){a=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var i,a,o,u,t=t&&t.prototype instanceof v?t:v,t=Object.create(t.prototype),n=new S(n||[]);return f(t,"_invoke",{value:(i=e,a=r,o=n,u=p,function(e,t){if(u===h)throw new Error("Generator is already running");if(u===d){if("throw"===e)throw t;return{value:s,done:!0}}for(o.method=e,o.arg=t;;){var r=o.delegate;if(r){r=function e(t,r){var n=r.method,i=t.iterator[n];if(i===s)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=s,e(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;n=l(i,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,y;i=n.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=s),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}(r,o);if(r){if(r===y)continue;return r}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(u===p)throw u=d,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);u=h;r=l(i,a,o);if("normal"===r.type){if(u=o.done?d:m,r.arg===y)continue;return{value:r.arg,done:o.done}}"throw"===r.type&&(u=d,o.method="throw",o.arg=r.arg)}})}),t}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}o.wrap=u;var p="suspendedStart",m="suspendedYield",h="executing",d="completed",y={};function v(){}function g(){}function x(){}var t={},b=(a(t,n,function(){return this}),Object.getPrototypeOf),b=b&&b(b(C([]))),w=(b&&b!==e&&c.call(b,n)&&(t=b),x.prototype=v.prototype=Object.create(t));function N(e){["next","throw","return"].forEach(function(t){a(e,t,function(e){return this._invoke(t,e)})})}function D(o,u){var t;f(this,"_invoke",{value:function(r,n){function e(){return new u(function(e,t){!function t(e,r,n,i){var a,e=l(o[e],o,r);if("throw"!==e.type)return(r=(a=e.arg).value)&&"object"==F(r)&&c.call(r,"__await")?u.resolve(r.__await).then(function(e){t("next",e,n,i)},function(e){t("throw",e,n,i)}):u.resolve(r).then(function(e){a.value=e,n(a)},function(e){return t("throw",e,n,i)});i(e.arg)}(r,n,e,t)})}return t=t?t.then(e,e):e()}})}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function C(t){if(t||""===t){var r,e=t[n];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return r=-1,(e=function e(){for(;++r{function r(e){return t.exports=r="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},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},4687:(e,t,r)=>{r=r(7061)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},509:(e,t,r)=>{"use strict";var n=r(9985),i=r(3691),a=TypeError;e.exports=function(e){if(n(e))return e;throw new a(i(e)+" is not a function")}},2655:(e,t,r)=>{"use strict";var n=r(9429),i=r(3691),a=TypeError;e.exports=function(e){if(n(e))return e;throw new a(i(e)+" is not a constructor")}},3550:(e,t,r)=>{"use strict";var n=r(9985),i=String,a=TypeError;e.exports=function(e){if("object"==typeof e||n(e))return e;throw new a("Can't set "+i(e)+" as a prototype")}},7370:(e,t,r)=>{"use strict";var n=r(4201),i=r(5391),r=r(2560).f,a=n("unscopables"),o=Array.prototype;void 0===o[a]&&r(o,a,{configurable:!0,value:i(null)}),e.exports=function(e){o[a][e]=!0}},1514:(e,t,r)=>{"use strict";var n=r(730).charAt;e.exports=function(e,t,r){return t+(r?n(e,t).length:1)}},767:(e,t,r)=>{"use strict";var n=r(3622),i=TypeError;e.exports=function(e,t){if(n(t,e))return e;throw new i("Incorrect invocation")}},5027:(e,t,r)=>{"use strict";var n=r(8999),i=String,a=TypeError;e.exports=function(e){if(n(e))return e;throw new a(i(e)+" is not an object")}},1655:(e,t,r)=>{"use strict";r=r(3689);e.exports=r(function(){var e;"function"==typeof ArrayBuffer&&(e=new ArrayBuffer(8),Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8}))})},2872:(e,t,r)=>{"use strict";var o=r(690),u=r(7578),s=r(6310);e.exports=function(e){for(var t=o(this),r=s(t),n=arguments.length,i=u(1{"use strict";var n=r(2960).forEach,r=r(6834)("forEach");e.exports=r?[].forEach:function(e){return n(this,e,1{"use strict";var p=r(4071),m=r(2615),h=r(690),d=r(1228),y=r(3292),v=r(9429),g=r(6310),x=r(6522),b=r(5185),w=r(1664),N=Array;e.exports=function(e){var t=h(e),e=v(this),r=arguments.length,n=1{"use strict";function n(u){return function(e,t,r){var n,i=s(e),a=f(i),o=c(r,a);if(u&&t!=t){for(;o{"use strict";function n(p){var m=1===p,h=2===p,d=3===p,y=4===p,v=6===p,g=7===p,x=5===p||v;return function(e,t,r,n){for(var i,a,o=N(e),u=w(o),s=b(t,r),c=D(u),f=0,t=n||E,l=m?t(e,c):h||g?t(e,0):void 0;f{"use strict";var n=r(3689),i=r(4201),a=r(3615),o=i("species");e.exports=function(t){return 51<=a||!n(function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}},1!==e[t](Boolean).foo})}},6834:(e,t,r)=>{"use strict";var n=r(3689);e.exports=function(e,t){var r=[][e];return!!r&&n(function(){r.call(null,t||function(){return 1},1)})}},8820:(e,t,r)=>{"use strict";function n(c){return function(e,t,r,n){f(t);var i=l(e),a=p(i),o=m(i),u=c?o-1:0,s=c?-1:1;if(r<2)for(;;){if(u in a){n=a[u],u+=s;break}if(u+=s,c?u<0:o<=u)throw new h("Reduce of empty array with no initial value")}for(;c?0<=u:u{"use strict";var n=r(7697),i=r(2297),a=TypeError,o=Object.getOwnPropertyDescriptor,r=n&&!function(){if(void 0!==this)return 1;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=r?function(e,t){if(i(e)&&!o(e,"length").writable)throw new a("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},9015:(e,t,r)=>{"use strict";var s=r(7578),c=r(6310),f=r(6522),l=Array,p=Math.max;e.exports=function(e,t,r){for(var n=c(e),i=s(t,n),a=s(void 0===r?n:r,n),o=l(p(a-i,0)),u=0;i{"use strict";r=r(8844);e.exports=r([].slice)},382:(e,t,r)=>{"use strict";function g(e,t){var r=e.length,n=b(r/2);if(r<8){for(var i,a,o=e,u=t,s=o.length,c=1;c{"use strict";var n=r(2297),i=r(9429),a=r(8999),o=r(4201)("species"),u=Array;e.exports=function(e){var t;return n(e)&&(t=e.constructor,(i(t)&&(t===u||n(t.prototype))||a(t)&&null===(t=t[o]))&&(t=void 0)),void 0===t?u:t}},7120:(e,t,r)=>{"use strict";var n=r(5271);e.exports=function(e,t){return new(n(e))(0===t?0:t)}},1228:(e,t,r)=>{"use strict";var i=r(5027),a=r(2125);e.exports=function(e,t,r,n){try{return n?t(i(r)[0],r[1]):t(r)}catch(t){a(e,"throw",t)}}},6431:(e,t,r)=>{"use strict";var i=r(4201)("iterator"),a=!1;try{var n=0,o={next:function(){return{done:!!n++}},return:function(){a=!0}};o[i]=function(){return this},Array.from(o,function(){throw 2})}catch(e){}e.exports=function(e,t){try{if(!t&&!a)return!1}catch(e){return!1}var r=!1;try{var n={};n[i]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r}},6648:(e,t,r)=>{"use strict";var r=r(8844),n=r({}.toString),i=r("".slice);e.exports=function(e){return i(n(e),8,-1)}},926:(e,t,r)=>{"use strict";var n=r(3043),i=r(9985),a=r(6648),o=r(4201)("toStringTag"),u=Object,s="Arguments"===a(function(){return arguments}());e.exports=n?a:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=u(e),o))?t:s?a(e):"Object"===(t=a(e))&&i(e.callee)?"Arguments":t}},800:(e,t,r)=>{"use strict";var c=r(5391),f=r(2148),l=r(6045),p=r(4071),m=r(767),h=r(981),d=r(8734),o=r(1934),u=r(7807),s=r(4241),y=r(7697),v=r(5375).fastKey,r=r(618),g=r.set,x=r.getterFor;e.exports={getConstructor:function(e,r,n,i){function a(e,t,r){var n,i=s(e),a=o(e,t);return a?a.value=r:(i.last=a={index:n=v(t,!0),key:t,value:r,previous:t=i.last,next:void 0,removed:!1},i.first||(i.first=a),t&&(t.next=a),y?i.size++:e.size++,"F"!==n&&(i.index[n]=a)),e}function o(e,t){var r,e=s(e),n=v(t);if("F"!==n)return e.index[n];for(r=e.first;r;r=r.next)if(r.key===t)return r}var e=e(function(e,t){m(e,u),g(e,{type:r,index:c(null),first:void 0,last:void 0,size:0}),y||(e.size=0),h(t)||d(t,e[i],{that:e,AS_ENTRIES:n})}),u=e.prototype,s=x(r);return l(u,{clear:function(){for(var e=s(this),t=e.index,r=e.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=void 0),delete t[r.index],r=r.next;e.first=e.last=void 0,y?e.size=0:this.size=0},delete:function(e){var t,r,n=s(this),e=o(this,e);return e&&(t=e.next,r=e.previous,delete n.index[e.index],e.removed=!0,r&&(r.next=t),t&&(t.previous=r),n.first===e&&(n.first=t),n.last===e&&(n.last=r),y?n.size--:this.size--),!!e},forEach:function(e){for(var t,r=s(this),n=p(e,1{"use strict";var y=r(9989),v=r(9037),g=r(8844),x=r(5266),b=r(1880),w=r(5375),N=r(8734),D=r(767),E=r(9985),A=r(981),S=r(8999),C=r(3689),M=r(6431),F=r(5997),O=r(3457);e.exports=function(e,t,r){function n(e){var r=g(m[e]);b(m,e,"add"===e?function(e){return r(this,0===e?0:e),this}:"delete"===e?function(e){return!(f&&!S(e))&&r(this,0===e?0:e)}:"get"===e?function(e){return f&&!S(e)?void 0:r(this,0===e?0:e)}:"has"===e?function(e){return!(f&&!S(e))&&r(this,0===e?0:e)}:function(e,t){return r(this,0===e?0:e,t),this})}var i,a,o,u,s,c=-1!==e.indexOf("Map"),f=-1!==e.indexOf("Weak"),l=c?"set":"add",p=v[e],m=p&&p.prototype,h=p,d={};return x(e,!E(p)||!(f||m.forEach&&!C(function(){(new p).entries().next()})))?(h=r.getConstructor(t,e,c,l),w.enable()):x(e,!0)&&(a=(i=new h)[l](f?{}:-0,1)!==i,o=C(function(){i.has(1)}),u=M(function(e){new p(e)}),s=!f&&C(function(){for(var e=new p,t=5;t--;)e[l](t,t);return!e.has(-0)}),u||(((h=t(function(e,t){D(e,m);e=O(new p,e,h);return A(t)||N(t,e[l],{that:e,AS_ENTRIES:c}),e})).prototype=m).constructor=h),(o||s)&&(n("delete"),n("has"),c&&n("get")),(s||a)&&n(l),f&&m.clear&&delete m.clear),d[e]=h,y({global:!0,constructor:!0,forced:h!==p},d),F(h,e),f||r.setStrong(h,e,c),h}},8758:(e,t,r)=>{"use strict";var s=r(6812),c=r(9152),f=r(2474),l=r(2560);e.exports=function(e,t,r){for(var n=c(t),i=l.f,a=f.f,o=0;o{"use strict";var n=r(4201)("match");e.exports=function(t){var r=/./;try{"/./"[t](r)}catch(e){try{return r[n]=!1,"/./"[t](r)}catch(t){}}return!1}},1748:(e,t,r)=>{"use strict";r=r(3689);e.exports=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},1568:(e,t,r)=>{"use strict";var n=r(8844),a=r(4684),o=r(4327),u=/"/g,s=n("".replace);e.exports=function(e,t,r,n){var e=o(a(e)),i="<"+t;return""!==r&&(i+=" "+r+'="'+s(o(n),u,""")+'"'),i+">"+e+""}},7807:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},5773:(e,t,r)=>{"use strict";var n=r(7697),i=r(2560),a=r(5684);e.exports=n?function(e,t,r){return i.f(e,t,a(1,r))}:function(e,t,r){return e[t]=r,e}},5684:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},6522:(e,t,r)=>{"use strict";var n=r(8360),i=r(2560),a=r(5684);e.exports=function(e,t,r){t=n(t);t in e?i.f(e,t,a(0,r)):e[t]=r}},2148:(e,t,r)=>{"use strict";var n=r(8702),i=r(2560);e.exports=function(e,t,r){return r.get&&n(r.get,t,{getter:!0}),r.set&&n(r.set,t,{setter:!0}),i.f(e,t,r)}},1880:(e,t,r)=>{"use strict";var o=r(9985),u=r(2560),s=r(8702),c=r(5014);e.exports=function(e,t,r,n){var i=(n=n||{}).enumerable,a=void 0!==n.name?n.name:t;if(o(r)&&s(r,a,n),n.global)i?e[t]=r:c(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:u.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e}},6045:(e,t,r)=>{"use strict";var i=r(1880);e.exports=function(e,t,r){for(var n in t)i(e,n,t[n],r);return e}},5014:(e,t,r)=>{"use strict";var n=r(9037),i=Object.defineProperty;e.exports=function(t,r){try{i(n,t,{value:r,configurable:!0,writable:!0})}catch(e){n[t]=r}return r}},8494:(e,t,r)=>{"use strict";var n=r(3691),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+n(t)+" of "+n(e))}},7697:(e,t,r)=>{"use strict";r=r(3689);e.exports=!r(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},2659:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports={all:t,IS_HTMLDDA:void 0===t&&void 0!==t}},6420:(e,t,r)=>{"use strict";var n=r(9037),r=r(8999),i=n.document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},5565:e=>{"use strict";var t=TypeError;e.exports=function(e){if(9007199254740991{"use strict";e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},3265:(e,t,r)=>{"use strict";r=r(6420)("span").classList,r=r&&r.constructor&&r.constructor.prototype;e.exports=r===Object.prototype?void 0:r},7365:(e,t,r)=>{"use strict";r=r(71).match(/firefox\/(\d+)/i);e.exports=!!r&&+r[1]},2532:(e,t,r)=>{"use strict";var n=r(8563),r=r(806);e.exports=!n&&!r&&"object"==typeof window&&"object"==typeof document},8563:e=>{"use strict";e.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},7298:(e,t,r)=>{"use strict";r=r(71);e.exports=/MSIE|Trident/.test(r)},3221:(e,t,r)=>{"use strict";r=r(71);e.exports=/ipad|iphone|ipod/i.test(r)&&"undefined"!=typeof Pebble},4764:(e,t,r)=>{"use strict";r=r(71);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},806:(e,t,r)=>{"use strict";var n=r(9037),r=r(6648);e.exports="process"===r(n.process)},7486:(e,t,r)=>{"use strict";r=r(71);e.exports=/web0s(?!.*chrome)/i.test(r)},71:e=>{"use strict";e.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},3615:(e,t,r)=>{"use strict";var n,i,a=r(9037),r=r(71),o=a.process,a=a.Deno,o=o&&o.versions||a&&a.version,a=o&&o.v8;!(i=a?0<(n=a.split("."))[0]&&n[0]<4?1:+(n[0]+n[1]):i)&&r&&(!(n=r.match(/Edge\/(\d+)/))||74<=n[1])&&(n=r.match(/Chrome\/(\d+)/))&&(i=+n[1]),e.exports=i},7922:(e,t,r)=>{"use strict";r=r(71).match(/AppleWebKit\/(\d+)\./);e.exports=!!r&&+r[1]},2739:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9989:(e,t,r)=>{"use strict";var c=r(9037),f=r(2474).f,l=r(5773),p=r(1880),m=r(5014),h=r(8758),d=r(5266);e.exports=function(e,t){var r,n,i,a,o=e.target,u=e.global,s=e.stat;if(r=u?c:s?c[o]||m(o,{}):(c[o]||{}).prototype)for(n in t){if(i=t[n],a=e.dontCallGetSet?(a=f(r,n))&&a.value:r[n],!d(u?n:o+(s?".":"#")+n,e.forced)&&void 0!==a){if(typeof i==typeof a)continue;h(i,a)}(e.sham||a&&a.sham)&&l(i,"sham",!0),p(r,n,i,e)}}},3689:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},8678:(e,t,r)=>{"use strict";r(4043);var s=r(6576),c=r(1880),f=r(6308),l=r(3689),p=r(4201),m=r(5773),h=p("species"),d=RegExp.prototype;e.exports=function(r,e,t,n){var o,i=p(r),u=!l(function(){var e={};return e[i]=function(){return 7},7!==""[r](e)}),a=u&&!l(function(){var e=!1,t=/a/;return"split"===r&&((t={}).constructor={},t.constructor[h]=function(){return t},t.flags="",t[i]=/./[i]),t.exec=function(){return e=!0,null},t[i](""),!e});u&&a&&!t||(o=s(/./[i]),a=e(i,""[r],function(e,t,r,n,i){var e=s(e),a=t.exec;return a===f||a===d.exec?u&&!i?{done:!0,value:o(t,r,n)}:{done:!0,value:e(r,t,n)}:{done:!1}}),c(String.prototype,r,a[0]),c(d,i,a[1])),n&&m(d[i],"sham",!0)}},1594:(e,t,r)=>{"use strict";r=r(3689);e.exports=!r(function(){return Object.isExtensible(Object.preventExtensions({}))})},1735:(e,t,r)=>{"use strict";var r=r(7215),n=Function.prototype,i=n.apply,a=n.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(i):function(){return a.apply(i,arguments)})},4071:(e,t,r)=>{"use strict";var n=r(6576),i=r(509),a=r(7215),o=n(n.bind);e.exports=function(e,t){return i(e),void 0===t?e:a?o(e,t):function(){return e.apply(t,arguments)}}},7215:(e,t,r)=>{"use strict";r=r(3689);e.exports=!r(function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},6761:(e,t,r)=>{"use strict";var n=r(8844),i=r(509),a=r(8999),f=r(6812),l=r(6004),r=r(7215),p=Function,m=n([].concat),h=n([].join),d={};e.exports=r?p.bind:function(o){var u=i(this),e=u.prototype,s=l(arguments,1),c=function(){var e=m(s,l(arguments));if(this instanceof c){var t=u,r=e.length,n=e;if(!f(d,r)){for(var i=[],a=0;a{"use strict";var r=r(7215),n=Function.prototype.call;e.exports=r?n.bind(n):function(){return n.apply(n,arguments)}},1236:(e,t,r)=>{"use strict";var n=r(7697),r=r(6812),i=Function.prototype,a=n&&Object.getOwnPropertyDescriptor,r=r(i,"name"),o=r&&"something"===function(){}.name,n=r&&(!n||a(i,"name").configurable);e.exports={EXISTS:r,PROPER:o,CONFIGURABLE:n}},2743:(e,t,r)=>{"use strict";var n=r(8844),i=r(509);e.exports=function(e,t,r){try{return n(i(Object.getOwnPropertyDescriptor(e,t)[r]))}catch(e){}}},6576:(e,t,r)=>{"use strict";var n=r(6648),i=r(8844);e.exports=function(e){if("Function"===n(e))return i(e)}},8844:(e,t,r)=>{"use strict";var r=r(7215),n=Function.prototype,i=n.call,n=r&&n.bind.bind(i,i);e.exports=r?n:function(e){return function(){return i.apply(e,arguments)}}},6058:(e,t,r)=>{"use strict";var n=r(9037),i=r(9985);e.exports=function(e,t){return arguments.length<2?(r=n[e],i(r)?r:void 0):n[e]&&n[e][t];var r}},1664:(e,t,r)=>{"use strict";var n=r(926),i=r(4849),a=r(981),o=r(9478),u=r(4201)("iterator");e.exports=function(e){if(!a(e))return i(e,u)||i(e,"@@iterator")||o[n(e)]}},5185:(e,t,r)=>{"use strict";var n=r(2615),i=r(509),a=r(5027),o=r(3691),u=r(1664),s=TypeError;e.exports=function(e,t){t=arguments.length<2?u(e):t;if(i(t))return a(n(t,e));throw new s(o(e)+" is not iterable")}},2643:(e,t,r)=>{"use strict";var n=r(8844),u=r(2297),s=r(9985),c=r(6648),f=r(4327),l=n([].push);e.exports=function(e){if(s(e))return e;if(u(e)){for(var t=e.length,n=[],r=0;r{"use strict";var n=r(509),i=r(981);e.exports=function(e,t){e=e[t];return i(e)?void 0:n(e)}},7017:(e,t,r)=>{"use strict";var n=r(8844),i=r(690),p=Math.floor,m=n("".charAt),h=n("".replace),d=n("".slice),y=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,v=/\$([$&'`]|\d{1,2})/g;e.exports=function(a,o,u,s,c,e){var f=u+a.length,l=s.length,t=v;return void 0!==c&&(c=i(c),t=y),h(e,t,function(e,t){var r;switch(m(t,0)){case"$":return"$";case"&":return a;case"`":return d(o,0,u);case"'":return d(o,f);case"<":r=c[d(t,1,-1)];break;default:var n,i=+t;if(0==i)return e;if(l{"use strict";var n=r(8844),i=r(690),a=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},7248:e=>{"use strict";e.exports={}},920:e=>{"use strict";e.exports=function(e,t){try{1===arguments.length?console.error(e):console.error(e,t)}catch(e){}}},2688:(e,t,r)=>{"use strict";r=r(6058);e.exports=r("document","documentElement")},8506:(e,t,r)=>{"use strict";var n=r(7697),i=r(3689),a=r(6420);e.exports=!n&&!i(function(){return 7!==Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a})},4413:(e,t,r)=>{"use strict";var n=r(8844),i=r(3689),a=r(6648),o=Object,u=n("".split);e.exports=i(function(){return!o("z").propertyIsEnumerable(0)})?function(e){return"String"===a(e)?u(e,""):o(e)}:o},3457:(e,t,r)=>{"use strict";var n=r(9985),i=r(8999),a=r(9385);e.exports=function(e,t,r){return a&&n(t=t.constructor)&&t!==r&&i(t=t.prototype)&&t!==r.prototype&&a(e,t),e}},6738:(e,t,r)=>{"use strict";var n=r(8844),i=r(9985),r=r(4091),a=n(Function.toString);i(r.inspectSource)||(r.inspectSource=function(e){return a(e)}),e.exports=r.inspectSource},5375:(e,t,r)=>{"use strict";function n(e){c(e,y,{value:{objectID:"O"+v++,weakData:{}}})}var o=r(9989),u=r(8844),i=r(7248),a=r(8999),s=r(6812),c=r(2560).f,f=r(2741),l=r(6062),p=r(7049),m=r(4630),h=r(1594),d=!1,y=m("meta"),v=0,g=e.exports={enable:function(){g.enable=function(){},d=!0;var i=f.f,a=u([].splice),e={};e[y]=1,i(e).length&&(f.f=function(e){for(var t=i(e),r=0,n=t.length;r{"use strict";var n,i,a,o,u=r(9834),s=r(9037),c=r(8999),f=r(5773),l=r(6812),p=r(4091),m=r(2713),r=r(7248),h="Object already initialized",d=s.TypeError,s=s.WeakMap,y=u||p.state?((a=p.state||(p.state=new s)).get=a.get,a.has=a.has,a.set=a.set,n=function(e,t){if(a.has(e))throw new d(h);return t.facade=e,a.set(e,t),t},i=function(e){return a.get(e)||{}},function(e){return a.has(e)}):(r[o=m("state")]=!0,n=function(e,t){if(l(e,o))throw new d(h);return t.facade=e,f(e,o,t),t},i=function(e){return l(e,o)?e[o]:{}},function(e){return l(e,o)});e.exports={set:n,get:i,has:y,enforce:function(e){return y(e)?i(e):n(e,{})},getterFor:function(t){return function(e){if(c(e)&&(e=i(e)).type===t)return e;throw new d("Incompatible receiver, "+t+" required")}}}},3292:(e,t,r)=>{"use strict";var n=r(4201),i=r(9478),a=n("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[a]===e)}},2297:(e,t,r)=>{"use strict";var n=r(6648);e.exports=Array.isArray||function(e){return"Array"===n(e)}},9985:(e,t,r)=>{"use strict";var r=r(2659),n=r.all;e.exports=r.IS_HTMLDDA?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},9429:(e,t,r)=>{"use strict";function n(){}function i(e){if(!s(e))return!1;try{return m(n,p,e),!0}catch(e){return!1}}function a(e){if(!s(e))return!1;switch(c(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return y||!!d(h,l(e))}catch(e){return!0}}var o=r(8844),u=r(3689),s=r(9985),c=r(926),f=r(6058),l=r(6738),p=[],m=f("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=o(h.exec),y=!h.test(n);a.sham=!0,e.exports=!m||u(function(){var e;return i(i.call)||!i(Object)||!i(function(){e=!0})||e})?a:i},5266:(e,t,r)=>{"use strict";function n(e,t){return(e=s[u(e)])===f||e!==c&&(a(t)?i(t):!!t)}var i=r(3689),a=r(9985),o=/#|\.prototype\./,u=n.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=n.data={},c=n.NATIVE="N",f=n.POLYFILL="P";e.exports=n},981:e=>{"use strict";e.exports=function(e){return null==e}},8999:(e,t,r)=>{"use strict";var n=r(9985),r=r(2659),i=r.all;e.exports=r.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:n(e)||e===i}:function(e){return"object"==typeof e?null!==e:n(e)}},3931:e=>{"use strict";e.exports=!1},1245:(e,t,r)=>{"use strict";var n=r(8999),i=r(6648),a=r(4201)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[a])?!!t:"RegExp"===i(e))}},734:(e,t,r)=>{"use strict";var n=r(6058),i=r(9985),a=r(3622),r=r(9525),o=Object;e.exports=r?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return i(t)&&a(t.prototype,o(e))}},8734:(e,t,r)=>{"use strict";function v(e,t){this.stopped=e,this.result=t}var g=r(4071),x=r(2615),b=r(5027),w=r(3691),N=r(3292),D=r(6310),E=r(3622),A=r(5185),S=r(1664),C=r(2125),M=TypeError,F=v.prototype;e.exports=function(e,t,r){function n(e){return a&&C(a,"normal",e),new v(!0,e)}function i(e){return p?(b(e),d?y(e[0],e[1],n):y(e[0],e[1])):d?y(e,n):y(e)}var a,o,u,s,c,f,l=r&&r.that,p=!(!r||!r.AS_ENTRIES),m=!(!r||!r.IS_RECORD),h=!(!r||!r.IS_ITERATOR),d=!(!r||!r.INTERRUPTED),y=g(t,l);if(m)a=e.iterator;else if(h)a=e;else{if(!(r=S(e)))throw new M(w(e)+" is not iterable");if(N(r)){for(o=0,u=D(e);o{"use strict";var a=r(2615),o=r(5027),u=r(4849);e.exports=function(e,t,r){var n,i;o(e);try{if(!(n=u(e,"return"))){if("throw"===t)throw r;return r}n=a(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return o(n),r}},974:(e,t,r)=>{"use strict";function i(){return this}var a=r(2013).IteratorPrototype,o=r(5391),u=r(5684),s=r(5997),c=r(9478);e.exports=function(e,t,r,n){t+=" Iterator";return e.prototype=o(a,{next:u(+!n,r)}),s(e,t,!1,!0),c[t]=i,e}},1934:(e,t,r)=>{"use strict";function d(){return this}var y=r(9989),v=r(2615),g=r(3931),n=r(1236),x=r(9985),b=r(974),w=r(1868),N=r(9385),D=r(5997),E=r(5773),A=r(1880),i=r(4201),S=r(9478),r=r(2013),C=n.PROPER,M=n.CONFIGURABLE,F=r.IteratorPrototype,O=r.BUGGY_SAFARI_ITERATORS,T=i("iterator"),B="values",_="entries";e.exports=function(e,t,r,n,i,a,o){b(r,t,n);function u(e){if(e===i&&m)return m;if(!O&&e&&e in l)return l[e];switch(e){case"keys":case B:case _:return function(){return new r(this,e)}}return function(){return new r(this)}}var s,c,n=t+" Iterator",f=!1,l=e.prototype,p=l[T]||l["@@iterator"]||i&&l[i],m=!O&&p||u(i),h="Array"===t&&l.entries||p;if(h&&(h=w(h.call(new e)))!==Object.prototype&&h.next&&(g||w(h)===F||(N?N(h,F):x(h[T])||A(h,T,d)),D(h,n,!0,!0),g&&(S[n]=d)),C&&i===B&&p&&p.name!==B&&(!g&&M?E(l,"name",B):(f=!0,m=function(){return v(p,this)})),i)if(s={values:u(B),keys:a?m:u("keys"),entries:u(_)},o)for(c in s)!O&&!f&&c in l||A(l,c,s[c]);else y({target:t,proto:!0,forced:O||f},s);return g&&!o||l[T]===m||A(l,T,m,{name:i}),S[t]=m,s}},2013:(e,t,r)=>{"use strict";var n,i,a=r(3689),o=r(9985),u=r(8999),s=r(5391),c=r(1868),f=r(1880),l=r(4201),r=r(3931),p=l("iterator"),l=!1;[].keys&&("next"in(i=[].keys())?(c=c(c(i)))!==Object.prototype&&(n=c):l=!0),!u(n)||a(function(){var e={};return n[p].call(e)!==e})?n={}:r&&(n=s(n)),o(n[p])||f(n,p,function(){return this}),e.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:l}},9478:e=>{"use strict";e.exports={}},6310:(e,t,r)=>{"use strict";var n=r(3126);e.exports=function(e){return n(e.length)}},8702:(e,t,r)=>{"use strict";var n=r(8844),i=r(3689),a=r(9985),o=r(6812),u=r(7697),s=r(1236).CONFIGURABLE,c=r(6738),r=r(618),f=r.enforce,l=r.get,p=String,m=Object.defineProperty,h=n("".slice),d=n("".replace),y=n([].join),v=u&&!i(function(){return 8!==m(function(){},"length",{value:8}).length}),g=String(String).split("String"),r=e.exports=function(e,t,r){"Symbol("===h(p(t),0,7)&&(t="["+d(p(t),/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!o(e,"name")||s&&e.name!==t)&&(u?m(e,"name",{value:t,configurable:!0}):e.name=t),v&&r&&o(r,"arity")&&e.length!==r.arity&&m(e,"length",{value:r.arity});try{r&&o(r,"constructor")&&r.constructor?u&&m(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}r=f(e);return o(r,"source")||(r.source=y(g,"string"==typeof t?t:"")),e};Function.prototype.toString=r(function(){return a(this)&&l(this).source||c(this)},"toString")},1745:e=>{"use strict";var t=Math.expm1,r=Math.exp;e.exports=!t||22025.465794806718{"use strict";var t=Math.log,r=Math.LOG10E;e.exports=Math.log10||function(e){return t(e)*r}},3956:e=>{"use strict";var t=Math.log;e.exports=Math.log1p||function(e){e=+e;return-1e-8{"use strict";e.exports=Math.sign||function(e){e=+e;return 0==e||e!=e?e:e<0?-1:1}},8828:e=>{"use strict";var t=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){e=+e;return(0{"use strict";var n,i,a,o,u,s,c=r(9037),f=r(4071),l=r(2474).f,p=r(9886).set,m=r(4410),h=r(4764),d=r(3221),y=r(7486),v=r(806),r=c.MutationObserver||c.WebKitMutationObserver,g=c.document,x=c.process,b=c.Promise,l=l(c,"queueMicrotask"),l=l&&l.value;l||(o=new m,u=function(){var e,t;for(v&&(e=x.domain)&&e.exit();t=o.get();)try{t()}catch(e){throw o.head&&s(),e}e&&e.enter()},s=h||v||y||!r||!g?!d&&b&&b.resolve?((m=b.resolve(void 0)).constructor=b,a=f(m.then,m),function(){a(u)}):v?function(){x.nextTick(u)}:(p=f(p,c),function(){p(u)}):(n=!0,i=g.createTextNode(""),new r(u).observe(i,{characterData:!0}),function(){i.data=n=!n}),l=function(e){o.head||s(),o.add(e)}),e.exports=l},2582:(e,t,r)=>{"use strict";function n(e){var r,n;this.promise=new e(function(e,t){if(void 0!==r||void 0!==n)throw new a("Bad Promise constructor");r=e,n=t}),this.resolve=i(r),this.reject=i(n)}var i=r(509),a=TypeError;e.exports.f=function(e){return new n(e)}},2124:(e,t,r)=>{"use strict";var n=r(1245),i=TypeError;e.exports=function(e){if(n(e))throw new i("The method doesn't accept regular expressions");return e}},4818:(e,t,r)=>{"use strict";var n=r(9037),i=r(3689),a=r(8844),o=r(4327),u=r(1435).trim,r=r(6350),s=a("".charAt),c=n.parseFloat,a=n.Symbol,f=a&&a.iterator,n=1/c(r+"-0")!=-1/0||f&&!i(function(){c(Object(f))});e.exports=n?function(e){var e=u(o(e)),t=c(e);return 0===t&&"-"===s(e,0)?-0:t}:c},7897:(e,t,r)=>{"use strict";var n=r(9037),i=r(3689),a=r(8844),o=r(4327),u=r(1435).trim,r=r(6350),s=n.parseInt,n=n.Symbol,c=n&&n.iterator,f=/^[+-]?0x/i,l=a(f.exec),n=8!==s(r+"08")||22!==s(r+"0x16")||c&&!i(function(){s(Object(c))});e.exports=n?function(e,t){e=u(o(e));return s(e,t>>>0||(l(f,e)?16:10))}:s},5391:(e,t,r)=>{"use strict";function n(){}function i(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}var a,o=r(5027),u=r(8920),s=r(2739),c=r(7248),f=r(2688),l=r(6420),r=r(2713),p="prototype",m="script",h=r("IE_PROTO"),d=function(e){return"<"+m+">"+e+""},y=function(){try{a=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;y="undefined"==typeof document||document.domain&&a?i(a):(t=l("iframe"),r="java"+m+":",t.style.display="none",f.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var n=s.length;n--;)delete y[p][s[n]];return y()};c[h]=!0,e.exports=Object.create||function(e,t){var r;return null!==e?(n[p]=o(e),r=new n,n[p]=null,r[h]=e):r=y(),void 0===t?r:u.f(r,t)}},8920:(e,t,r)=>{"use strict";var n=r(7697),i=r(5648),u=r(2560),s=r(5027),c=r(5290),f=r(300);t.f=n&&!i?Object.defineProperties:function(e,t){s(e);for(var r,n=c(t),i=f(t),a=i.length,o=0;o{"use strict";var n=r(7697),i=r(8506),a=r(5648),o=r(5027),u=r(8360),s=TypeError,c=Object.defineProperty,f=Object.getOwnPropertyDescriptor,l="enumerable",p="configurable",m="writable";t.f=n?a?function(e,t,r){var n;return o(e),t=u(t),o(r),"function"==typeof e&&"prototype"===t&&"value"in r&&m in r&&!r[m]&&(n=f(e,t))&&n[m]&&(e[t]=r.value,r={configurable:(p in r?r:n)[p],enumerable:(l in r?r:n)[l],writable:!1}),c(e,t,r)}:c:function(e,t,r){if(o(e),t=u(t),o(r),i)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new s("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},2474:(e,t,r)=>{"use strict";var n=r(7697),i=r(2615),a=r(9556),o=r(5684),u=r(5290),s=r(8360),c=r(6812),f=r(8506),l=Object.getOwnPropertyDescriptor;t.f=n?l:function(e,t){if(e=u(e),t=s(t),f)try{return l(e,t)}catch(e){}if(c(e,t))return o(!i(a.f,e,t),e[t])}},6062:(e,t,r)=>{"use strict";var n=r(6648),i=r(5290),a=r(2741).f,o=r(9015),u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){if(!u||"Window"!==n(e))return a(i(e));var t=e;try{return a(t)}catch(t){return o(u)}}},2741:(e,t,r)=>{"use strict";var n=r(4948),i=r(2739).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},7518:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},1868:(e,t,r)=>{"use strict";var n=r(6812),i=r(9985),a=r(690),o=r(2713),r=r(1748),u=o("IE_PROTO"),s=Object,c=s.prototype;e.exports=r?s.getPrototypeOf:function(e){e=a(e);if(n(e,u))return e[u];var t=e.constructor;return i(t)&&e instanceof t?t.prototype:e instanceof s?c:null}},7049:(e,t,r)=>{"use strict";var n=r(3689),i=r(8999),a=r(6648),o=r(1655),u=Object.isExtensible,r=n(function(){u(1)});e.exports=r||o?function(e){return!!i(e)&&(!o||"ArrayBuffer"!==a(e))&&(!u||u(e))}:u},3622:(e,t,r)=>{"use strict";r=r(8844);e.exports=r({}.isPrototypeOf)},4948:(e,t,r)=>{"use strict";var n=r(8844),o=r(6812),u=r(5290),s=r(4328).indexOf,c=r(7248),f=n([].push);e.exports=function(e,t){var r,n=u(e),i=0,a=[];for(r in n)!o(c,r)&&o(n,r)&&f(a,r);for(;t.length>i;)!o(n,r=t[i++])||~s(a,r)||f(a,r);return a}},300:(e,t,r)=>{"use strict";var n=r(4948),i=r(2739);e.exports=Object.keys||function(e){return n(e,i)}},9556:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,i=n&&!r.call({1:2},1);t.f=i?function(e){e=n(this,e);return!!e&&e.enumerable}:r},9385:(e,t,r)=>{"use strict";var i=r(2743),a=r(5027),o=r(3550);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var r,n=!1,e={};try{(r=i(Object.prototype,"__proto__","set"))(e,[]),n=e instanceof Array}catch(r){}return function(e,t){return a(e),o(t),n?r(e,t):e.__proto__=t,e}}():void 0)},5073:(e,t,r)=>{"use strict";var n=r(3043),i=r(926);e.exports=n?{}.toString:function(){return"[object "+i(this)+"]"}},5899:(e,t,r)=>{"use strict";var i=r(2615),a=r(9985),o=r(8999),u=TypeError;e.exports=function(e,t){var r,n;if("string"===t&&a(r=e.toString)&&!o(n=i(r,e)))return n;if(a(r=e.valueOf)&&!o(n=i(r,e)))return n;if("string"!==t&&a(r=e.toString)&&!o(n=i(r,e)))return n;throw new u("Can't convert object to primitive value")}},9152:(e,t,r)=>{"use strict";var n=r(6058),i=r(8844),a=r(2741),o=r(7518),u=r(5027),s=i([].concat);e.exports=n("Reflect","ownKeys")||function(e){var t=a.f(u(e)),r=o.f;return r?s(t,r(e)):t}},496:(e,t,r)=>{"use strict";r=r(9037);e.exports=r},9302:e=>{"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},7073:(e,t,r)=>{"use strict";var n=r(9037),i=r(7919),a=r(9985),o=r(5266),u=r(6738),s=r(4201),c=r(2532),f=r(8563),l=r(3931),p=r(3615),m=i&&i.prototype,h=s("species"),d=!1,y=a(n.PromiseRejectionEvent),r=o("Promise",function(){var e=u(i),t=e!==String(i);if(!t&&66===p)return!0;if(l&&(!m.catch||!m.finally))return!0;if(!p||p<51||!/native code/.test(e)){var e=new i(function(e){e(1)}),r=function(e){e(function(){},function(){})};if((e.constructor={})[h]=r,!(d=e.then(function(){})instanceof r))return!0}return!t&&(c||f)&&!y});e.exports={CONSTRUCTOR:r,REJECTION_EVENT:y,SUBCLASSING:d}},7919:(e,t,r)=>{"use strict";r=r(9037);e.exports=r.Promise},2945:(e,t,r)=>{"use strict";var n=r(5027),i=r(8999),a=r(2582);e.exports=function(e,t){if(n(e),i(t)&&t.constructor===e)return t;e=a.f(e);return(0,e.resolve)(t),e.promise}},562:(e,t,r)=>{"use strict";var n=r(7919),i=r(6431),r=r(7073).CONSTRUCTOR;e.exports=r||!i(function(e){n.all(e).then(void 0,function(){})})},8055:(e,t,r)=>{"use strict";var n=r(2560).f;e.exports=function(e,t,r){r in e||n(e,r,{configurable:!0,get:function(){return t[r]},set:function(e){t[r]=e}})}},4410:e=>{"use strict";function t(){this.head=null,this.tail=null}t.prototype={add:function(e){var e={item:e,next:null},t=this.tail;t?t.next=e:this.head=e,this.tail=e},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}},e.exports=t},6100:(e,t,r)=>{"use strict";var n=r(2615),i=r(5027),a=r(9985),o=r(6648),u=r(6308),s=TypeError;e.exports=function(e,t){var r=e.exec;if(a(r))return null!==(r=n(r,e,t))&&i(r),r;if("RegExp"===o(e))return n(u,e,t);throw new s("RegExp#exec called on incompatible receiver")}},6308:(e,t,r)=>{"use strict";var h=r(2615),n=r(8844),d=r(4327),y=r(9633),i=r(7901),a=r(3430),v=r(5391),g=r(618).get,o=r(2100),r=r(6422),x=a("native-string-replace",String.prototype.replace),b=RegExp.prototype.exec,w=b,N=n("".charAt),D=n("".indexOf),E=n("".replace),A=n("".slice),S=(a=/b*/g,h(b,n=/a/,"a"),h(b,a,"a"),0!==n.lastIndex||0!==a.lastIndex),C=i.BROKEN_CARET,M=void 0!==/()??/.exec("")[1];(S||M||C||o||r)&&(w=function(e){var t,r,n,i,a,o,u=this,s=g(u),e=d(e),c=s.raw;if(c)return c.lastIndex=u.lastIndex,l=h(w,c,e),u.lastIndex=c.lastIndex,l;var f=s.groups,c=C&&u.sticky,l=h(y,u),s=u.source,p=0,m=e;if(c&&(l=E(l,"y",""),-1===D(l,"g")&&(l+="g"),m=A(e,u.lastIndex),0{"use strict";var n=r(5027);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},3477:(e,t,r)=>{"use strict";var n=r(2615),i=r(6812),a=r(3622),o=r(9633),u=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in u||i(e,"flags")||!a(u,e)?t:n(o,e)}},7901:(e,t,r)=>{"use strict";var n=r(3689),i=r(9037).RegExp,r=n(function(){var e=i("a","y");return e.lastIndex=2,null!==e.exec("abcd")}),a=r||n(function(){return!i("a","y").sticky}),n=r||n(function(){var e=i("^r","gy");return e.lastIndex=2,null!==e.exec("str")});e.exports={BROKEN_CARET:n,MISSED_STICKY:a,UNSUPPORTED_Y:r}},2100:(e,t,r)=>{"use strict";var n=r(3689),i=r(9037).RegExp;e.exports=n(function(){var e=i(".","s");return!(e.dotAll&&e.test("\n")&&"s"===e.flags)})},6422:(e,t,r)=>{"use strict";var n=r(3689),i=r(9037).RegExp;e.exports=n(function(){var e=i("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})},4684:(e,t,r)=>{"use strict";var n=r(981),i=TypeError;e.exports=function(e){if(n(e))throw new i("Can't call method on "+e);return e}},4241:(e,t,r)=>{"use strict";var n=r(6058),i=r(2148),a=r(4201),o=r(7697),u=a("species");e.exports=function(e){e=n(e);o&&e&&!e[u]&&i(e,u,{configurable:!0,get:function(){return this}})}},5997:(e,t,r)=>{"use strict";var n=r(2560).f,i=r(6812),a=r(4201)("toStringTag");e.exports=function(e,t,r){(e=e&&!r?e.prototype:e)&&!i(e,a)&&n(e,a,{configurable:!0,value:t})}},2713:(e,t,r)=>{"use strict";var n=r(3430),i=r(4630),a=n("keys");e.exports=function(e){return a[e]||(a[e]=i(e))}},4091:(e,t,r)=>{"use strict";var n=r(9037),r=r(5014),i="__core-js_shared__",n=n[i]||r(i,{});e.exports=n},3430:(e,t,r)=>{"use strict";var n=r(3931),i=r(4091);(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.33.2",mode:n?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"})},6373:(e,t,r)=>{"use strict";var n=r(5027),i=r(2655),a=r(981),o=r(4201)("species");e.exports=function(e,t){var e=n(e).constructor;return void 0===e||a(e=n(e)[o])?t:i(e)}},4580:(e,t,r)=>{"use strict";var n=r(3689);e.exports=function(t){return n(function(){var e=""[t]('"');return e!==e.toLowerCase()||3{"use strict";function n(i){return function(e,t){var r,e=o(u(e)),t=a(t),n=e.length;return t<0||n<=t?i?"":void 0:(r=c(e,t))<55296||56319{"use strict";var i=r(8700),a=r(4327),o=r(4684),u=RangeError;e.exports=function(e){var t=a(o(this)),r="",n=i(e);if(n<0||n===1/0)throw new u("Wrong number of repetitions");for(;0>>=1)&&(t+=t))1&n&&(r+=t);return r}},5984:(e,t,r)=>{"use strict";var n=r(1236).PROPER,i=r(3689),a=r(6350);e.exports=function(e){return i(function(){return!!a[e]()||"​…᠎"!=="​…᠎"[e]()||n&&a[e].name!==e})}},1435:(e,t,r)=>{"use strict";function n(t){return function(e){e=o(a(e));return 1&t&&(e=u(e,s,"")),e=2&t?u(e,c,"$1"):e}}var i=r(8844),a=r(4684),o=r(4327),r=r(6350),u=i("".replace),s=RegExp("^["+r+"]+"),c=RegExp("(^|[^"+r+"])["+r+"]+$");e.exports={start:n(1),end:n(2),trim:n(3)}},146:(e,t,r)=>{"use strict";var n=r(3615),i=r(3689),a=r(9037).String;e.exports=!!Object.getOwnPropertySymbols&&!i(function(){var e=Symbol("symbol detection");return!a(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41})},3032:(e,t,r)=>{"use strict";var n=r(2615),i=r(6058),a=r(4201),o=r(1880);e.exports=function(){var e=i("Symbol"),e=e&&e.prototype,t=e&&e.valueOf,r=a("toPrimitive");e&&!e[r]&&o(e,r,function(e){return n(t,this)},{arity:1})}},6549:(e,t,r)=>{"use strict";r=r(146);e.exports=r&&!!Symbol.for&&!!Symbol.keyFor},9886:(e,t,r)=>{"use strict";function n(e){return function(){F(e)}}function i(e){F(e.data)}function a(e){s.postMessage(A(e),o.protocol+"//"+o.host)}var o,u,s=r(9037),c=r(1735),f=r(4071),l=r(9985),p=r(6812),m=r(3689),h=r(2688),d=r(6004),y=r(6420),v=r(1500),g=r(4764),r=r(806),x=s.setImmediate,b=s.clearImmediate,w=s.process,N=s.Dispatch,D=s.Function,E=s.MessageChannel,A=s.String,S=0,C={},M="onreadystatechange",F=(m(function(){o=s.location}),function(e){var t;p(C,e)&&(t=C[e],delete C[e],t())});x&&b||(x=function(e){v(arguments.length,1);var t=l(e)?e:D(e),r=d(arguments,1);return C[++S]=function(){c(t,void 0,r)},u(S),S},b=function(e){delete C[e]},r?u=function(e){w.nextTick(n(e))}:N&&N.now?u=function(e){N.now(n(e))}:E&&!g?(g=(r=new E).port2,r.port1.onmessage=i,u=f(g.postMessage,g)):s.addEventListener&&l(s.postMessage)&&!s.importScripts&&o&&"file:"!==o.protocol&&!m(a)?(u=a,s.addEventListener("message",i,!1)):u=M in y("script")?function(e){h.appendChild(y("script"))[M]=function(){h.removeChild(this),F(e)}}:function(e){setTimeout(n(e),0)}),e.exports={set:x,clear:b}},3648:(e,t,r)=>{"use strict";r=r(8844);e.exports=r(1..valueOf)},7578:(e,t,r)=>{"use strict";var n=r(8700),i=Math.max,a=Math.min;e.exports=function(e,t){e=n(e);return e<0?i(e+t,0):a(e,t)}},5290:(e,t,r)=>{"use strict";var n=r(4413),i=r(4684);e.exports=function(e){return n(i(e))}},8700:(e,t,r)=>{"use strict";var n=r(8828);e.exports=function(e){e=+e;return e!=e||0==e?0:n(e)}},3126:(e,t,r)=>{"use strict";var n=r(8700),i=Math.min;e.exports=function(e){return 0{"use strict";var n=r(4684),i=Object;e.exports=function(e){return i(n(e))}},8732:(e,t,r)=>{"use strict";var n=r(2615),i=r(8999),a=r(734),o=r(4849),u=r(5899),r=r(4201),s=TypeError,c=r("toPrimitive");e.exports=function(e,t){if(!i(e)||a(e))return e;var r=o(e,c);if(r){if(r=n(r,e,t=void 0===t?"default":t),!i(r)||a(r))return r;throw new s("Can't convert object to primitive value")}return u(e,t=void 0===t?"number":t)}},8360:(e,t,r)=>{"use strict";var n=r(8732),i=r(734);e.exports=function(e){e=n(e,"string");return i(e)?e:e+""}},3043:(e,t,r)=>{"use strict";var n={};n[r(4201)("toStringTag")]="z",e.exports="[object z]"===String(n)},4327:(e,t,r)=>{"use strict";var n=r(926),i=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},3691:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},4630:(e,t,r)=>{"use strict";var r=r(8844),n=0,i=Math.random(),a=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++n+i,36)}},9525:(e,t,r)=>{"use strict";r=r(146);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5648:(e,t,r)=>{"use strict";var n=r(7697),r=r(3689);e.exports=n&&r(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},1500:e=>{"use strict";var r=TypeError;e.exports=function(e,t){if(e{"use strict";var n=r(9037),r=r(9985),n=n.WeakMap;e.exports=r(n)&&/native code/.test(String(n))},5405:(e,t,r)=>{"use strict";var n=r(496),i=r(6812),a=r(6145),o=r(2560).f;e.exports=function(e){var t=n.Symbol||(n.Symbol={});i(t,e)||o(t,e,{value:a.f(e)})}},6145:(e,t,r)=>{"use strict";r=r(4201);t.f=r},4201:(e,t,r)=>{"use strict";var n=r(9037),i=r(3430),a=r(6812),o=r(4630),u=r(146),r=r(9525),s=n.Symbol,c=i("wks"),f=r?s.for||s:s&&s.withoutSetter||o;e.exports=function(e){return a(c,e)||(c[e]=u&&a(s,e)?s[e]:f("Symbol."+e)),c[e]}},6350:e=>{"use strict";e.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},4338:(e,t,r)=>{"use strict";var n=r(9989),i=r(3689),c=r(2297),f=r(8999),l=r(690),p=r(6310),m=r(5565),h=r(6522),d=r(7120),a=r(9042),o=r(4201),r=r(3615),y=o("isConcatSpreadable"),o=51<=r||!i(function(){var e=[];return e[y]=!1,e.concat()[0]!==e});n({target:"Array",proto:!0,arity:1,forced:!o||!a("concat")},{concat:function(e){for(var t,r,n,i=l(this),a=d(i,0),o=0,u=-1,s=arguments.length;u{"use strict";var n=r(9989),i=r(2960).every;n({target:"Array",proto:!0,forced:!r(6834)("every")},{every:function(e){return i(this,e,1{"use strict";var n=r(9989),i=r(2872),r=r(7370);n({target:"Array",proto:!0},{fill:i}),r("fill")},8077:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).filter;n({target:"Array",proto:!0,forced:!r(9042)("filter")},{filter:function(e){return i(this,e,1{"use strict";var n=r(9989),i=r(2960).find,r=r(7370),a="find",o=!0;a in[]&&Array(1)[a](function(){o=!1}),n({target:"Array",proto:!0,forced:o},{find:function(e){return i(this,e,1{"use strict";var n=r(9989),r=r(7612);n({target:"Array",proto:!0,forced:[].forEach!==r},{forEach:r})},7722:(e,t,r)=>{"use strict";var n=r(9989),i=r(1055);n({target:"Array",stat:!0,forced:!r(6431)(function(e){Array.from(e)})},{from:i})},6801:(e,t,r)=>{"use strict";var n=r(9989),i=r(4328).includes,a=r(3689),r=r(7370);n({target:"Array",proto:!0,forced:a(function(){return!Array(1).includes()})},{includes:function(e){return i(this,e,1{"use strict";var n=r(9989),i=r(6576),a=r(4328).indexOf,r=r(6834),o=i([].indexOf),u=!!o&&1/o([1],1,-0)<0;n({target:"Array",proto:!0,forced:u||!r("indexOf")},{indexOf:function(e){var t=1{"use strict";r(9989)({target:"Array",stat:!0},{isArray:r(2297)})},752:(e,t,r)=>{"use strict";var n=r(5290),i=r(7370),a=r(9478),o=r(618),u=r(2560).f,s=r(1934),c=r(7807),f=r(3931),r=r(7697),l="Array Iterator",p=o.set,m=o.getterFor(l),o=(e.exports=s(Array,"Array",function(e,t){p(this,{type:l,target:n(e),index:0,kind:t})},function(){var e=m(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,c(void 0,!0);switch(e.kind){case"keys":return c(r,!1);case"values":return c(t[r],!1)}return c([r,t[r]],!1)},"values"),a.Arguments=a.Array);if(i("keys"),i("values"),i("entries"),!f&&r&&"values"!==o.name)try{u(o,"name",{value:"values"})}catch(e){}},6203:(e,t,r)=>{"use strict";var n=r(9989),i=r(8844),a=r(4413),o=r(5290),r=r(6834),u=i([].join);n({target:"Array",proto:!0,forced:a!==Object||!r("join",",")},{join:function(e){return u(o(this),void 0===e?",":e)}})},886:(e,t,r)=>{"use strict";var n=r(9989),i=r(2960).map;n({target:"Array",proto:!0,forced:!r(9042)("map")},{map:function(e){return i(this,e,1{"use strict";var n=r(9989),i=r(8820).left,a=r(6834),o=r(3615);n({target:"Array",proto:!0,forced:!r(806)&&79{"use strict";var n=r(9989),i=r(8844),a=r(2297),o=i([].reverse),r=[1,2];n({target:"Array",proto:!0,forced:String(r)===String(r.reverse())},{reverse:function(){return a(this)&&(this.length=this.length),o(this)}})},9730:(e,t,r)=>{"use strict";var n=r(9989),c=r(2297),f=r(9429),l=r(8999),p=r(7578),m=r(6310),h=r(5290),d=r(6522),i=r(4201),a=r(9042),y=r(6004),r=a("slice"),v=i("species"),g=Array,x=Math.max;n({target:"Array",proto:!0,forced:!r},{slice:function(e,t){var r,n,i,a=h(this),o=m(a),u=p(e,o),s=p(void 0===t?o:t,o);if(c(a)&&(r=a.constructor,(r=f(r)&&(r===g||c(r.prototype))||l(r)&&null===(r=r[v])?void 0:r)===g||void 0===r))return y(a,u,s);for(n=new(void 0===r?g:r)(x(s-u,0)),i=0;u{"use strict";var n=r(9989),i=r(2960).some;n({target:"Array",proto:!0,forced:!r(6834)("some")},{some:function(e){return i(this,e,1{"use strict";var n=r(9989),i=r(8844),u=r(509),s=r(690),c=r(6310),f=r(8494),l=r(4327),a=r(3689),p=r(382),o=r(6834),m=r(7365),h=r(7298),d=r(3615),y=r(7922),v=[],g=i(v.sort),x=i(v.push),r=a(function(){v.sort(void 0)}),i=a(function(){v.sort(null)}),o=o("sort"),b=!a(function(){if(d)return d<70;if(!(m&&3l(t)?1:-1})),r=c(i),o=0;o{"use strict";var n=r(9989),l=r(690),p=r(7578),m=r(8700),h=r(6310),d=r(5649),y=r(5565),v=r(7120),g=r(6522),x=r(8494),r=r(9042)("splice"),b=Math.max,w=Math.min;n({target:"Array",proto:!0,forced:!r},{splice:function(e,t){var r,n,i,a,o,u,s=l(this),c=h(s),f=p(e,c),e=arguments.length;for(0===e?r=n=0:n=1===e?(r=0,c-f):(r=e-2,w(b(m(t),0),c-f)),y(c+r-n),i=v(s,n),a=0;a{"use strict";var n=r(9989),r=r(8844),i=Date,a=r(i.prototype.getTime);n({target:"Date",stat:!0},{now:function(){return a(new i)}})},8150:(e,t,r)=>{"use strict";var n=r(9989),i=r(3689),a=r(690),o=r(8732);n({target:"Date",proto:!0,arity:1,forced:i(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})},{toJSON:function(e){var t=a(this),r=o(t,"number");return"number"!=typeof r||isFinite(r)?t.toISOString():null}})},24:(e,t,r)=>{"use strict";var n=r(8844),r=r(1880),i=Date.prototype,a="Invalid Date",o="toString",u=n(i[o]),s=n(i.getTime);String(new Date(NaN))!==a&&r(i,o,function(){var e=s(this);return e==e?u(this):a})},1517:(e,t,r)=>{"use strict";var n=r(9989),r=r(6761);n({target:"Function",proto:!0,forced:Function.bind!==r},{bind:r})},4284:(e,t,r)=>{"use strict";var n=r(7697),i=r(1236).EXISTS,a=r(8844),r=r(2148),o=Function.prototype,u=a(o.toString),s=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,c=a(s.exec);n&&!i&&r(o,"name",{configurable:!0,get:function(){try{return c(s,u(this))[1]}catch(e){return""}}})},8324:(e,t,r)=>{"use strict";function i(e,t){var r=m(arguments),n=h(t);if(l(n)||void 0!==e&&!p(e))return r[1]=function(e,t){if(l(n)&&(t=s(n,this,d(e),t)),!p(t))return t},u(y,null,r)}function a(e,t,r){var n=g(r,t-1),r=g(r,t+1);return v(D,e)&&!v(E,r)||v(E,e)&&!v(D,n)?"\\u"+w(x(e,0),16):e}var n=r(9989),o=r(6058),u=r(1735),s=r(2615),c=r(8844),f=r(3689),l=r(9985),p=r(734),m=r(6004),h=r(2643),r=r(146),d=String,y=o("JSON","stringify"),v=c(/./.exec),g=c("".charAt),x=c("".charCodeAt),b=c("".replace),w=c(1..toString),N=/[\uD800-\uDFFF]/g,D=/^[\uD800-\uDBFF]$/,E=/^[\uDC00-\uDFFF]$/,A=!r||f(function(){var e=o("Symbol")("stringify detection");return"[null]"!==y([e])||"{}"!==y({a:e})||"{}"!==y(Object(e))}),S=f(function(){return'"\\udf06\\ud834"'!==y("\udf06\ud834")||'"\\udead"'!==y("\udead")});y&&n({target:"JSON",stat:!0,arity:3,forced:A||S},{stringify:function(e,t,r){var n=m(arguments),n=u(A?i:y,null,n);return S&&"string"==typeof n?b(n,N,a):n}})},9322:(e,t,r)=>{"use strict";r(319)("Map",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},r(800))},6646:(e,t,r)=>{"use strict";r(9322)},6557:(e,t,r)=>{"use strict";var n=r(9989),i=r(3956),r=Math.acosh,a=Math.log,o=Math.sqrt,u=Math.LN2;n({target:"Math",stat:!0,forced:!r||710!==Math.floor(r(Number.MAX_VALUE))||r(1/0)!==1/0},{acosh:function(e){e=+e;return e<1?NaN:94906265.62425156{"use strict";var r=r(9989),n=Math.asinh,i=Math.log,a=Math.sqrt;r({target:"Math",stat:!0,forced:!(n&&0<1/n(0))},{asinh:function e(t){t=+t;return isFinite(t)&&0!=t?t<0?-e(-t):i(t+a(t*t+1)):t}})},5263:(e,t,r)=>{"use strict";var r=r(9989),n=Math.atanh,i=Math.log;r({target:"Math",stat:!0,forced:!(n&&1/n(-0)<0)},{atanh:function(e){e=+e;return 0==e?e:i((1+e)/(1-e))/2}})},4712:(e,t,r)=>{"use strict";var n=r(9989),i=r(5680),a=Math.abs,o=Math.pow;n({target:"Math",stat:!0},{cbrt:function(e){e=+e;return i(e)*o(a(e),1/3)}})},7221:(e,t,r)=>{"use strict";var n=r(9989),i=r(1745),r=Math.cosh,a=Math.abs,o=Math.E;n({target:"Math",stat:!0,forced:!r||r(710)===1/0},{cosh:function(e){e=i(a(e)-1)+1;return(e+1/(e*o*o))*(o/2)}})},4992:(e,t,r)=>{"use strict";var n=r(9989),r=r(1745);n({target:"Math",stat:!0,forced:r!==Math.expm1},{expm1:r})},5239:(e,t,r)=>{"use strict";r(9989)({target:"Math",stat:!0},{log10:r(4736)})},2076:(e,t,r)=>{"use strict";r(9989)({target:"Math",stat:!0},{log1p:r(3956)})},8813:(e,t,r)=>{"use strict";var r=r(9989),n=Math.log,i=Math.LN2;r({target:"Math",stat:!0},{log2:function(e){return n(e)/i}})},6976:(e,t,r)=>{"use strict";r(9989)({target:"Math",stat:!0},{sign:r(5680)})},2700:(e,t,r)=>{"use strict";var n=r(9989),i=r(3689),a=r(1745),o=Math.abs,u=Math.exp,s=Math.E;n({target:"Math",stat:!0,forced:i(function(){return-2e-17!==Math.sinh(-2e-17)})},{sinh:function(e){e=+e;return o(e)<1?(a(e)-a(-e))/2:(u(e-1)-u(-e-1))*(s/2)}})},1554:(e,t,r)=>{"use strict";var n=r(9989),i=r(1745),a=Math.exp;n({target:"Math",stat:!0},{tanh:function(e){var e=+e,t=i(e),r=i(-e);return t===1/0?1:r===1/0?-1:(t-r)/(a(e)+a(-e))}})},9288:(e,t,r)=>{"use strict";function n(c){var e,t=arguments.length<1?0:D(function(){var e=y(c,"number");if("bigint"==typeof e)return e;var t,r,n,i,a,o,u,s=y(e,"number");if(d(s))throw new S("Cannot convert a Symbol value to a number");if("string"==typeof s&&2i;i++)p(t,r=n[i])&&!p(e,r)&&b(e,r,x(t,r))}var a=r(9989),o=r(3931),u=r(7697),s=r(9037),c=r(496),f=r(8844),l=r(5266),p=r(6812),m=r(3457),h=r(3622),d=r(734),y=r(8732),v=r(3689),g=r(2741).f,x=r(2474).f,b=r(2560).f,w=r(3648),N=r(1435).trim,r="Number",D=s[r],E=c[r],A=D.prototype,S=s.TypeError,C=f("".slice),M=f("".charCodeAt),s=l(r,!D(" 0o1")||!D("0b1")||D("+0x1"));n.prototype=A,s&&!o&&(A.constructor=n),a({global:!0,constructor:!0,wrap:!0,forced:s},{Number:n});o&&E&&i(c[r],E),(s||o)&&i(c[r],D)},3584:(e,t,r)=>{"use strict";r(9989)({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})},5993:(e,t,r)=>{"use strict";r(9989)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},7389:(e,t,r)=>{"use strict";function s(e,t,r){return 0===t?r:t%2==1?s(e,t-1,r*e):s(e*e,t/2,r)}function c(e,t,r){for(var n=-1,i=r;++n<6;)i+=t*e[n],e[n]=i%1e7,i=o(i/1e7)}function f(e,t){for(var r=6,n=0;0<=--r;)n+=e[r],e[r]=o(n/t),n=n%t*1e7}function l(e){for(var t,r=6,n="";0<=--r;)""===n&&0!==r&&0===e[r]||(t=d(e[r]),n=""===n?t:n+y("0",7-t.length)+t);return n}var n=r(9989),i=r(8844),p=r(8700),m=r(3648),a=r(534),r=r(3689),h=RangeError,d=String,o=Math.floor,y=i(a),v=i("".slice),u=i(1..toFixed);n({target:"Number",proto:!0,forced:r(function(){return"0.000"!==u(8e-5,3)||"1"!==u(.9,0)||"1.25"!==u(1.255,2)||"1000000000000000128"!==u(0xde0b6b3a7640080,0)})||!r(function(){u({})})},{toFixed:function(e){var t,r,n,i=m(this),e=p(e),a=[0,0,0,0,0,0],o="",u="0";if(e<0||20{"use strict";var n=r(9989),i=r(8844),a=r(3689),o=r(3648),u=i(1..toPrecision);n({target:"Number",proto:!0,forced:a(function(){return"1"!==u(1,void 0)})||!a(function(){u({})})},{toPrecision:function(e){return void 0===e?u(o(this)):u(o(this),e)}})},1013:(e,t,r)=>{"use strict";r(9989)({target:"Object",stat:!0,sham:!r(7697)},{create:r(5391)})},5082:(e,t,r)=>{"use strict";var n=r(9989),i=r(7697),r=r(8920).f;n({target:"Object",stat:!0,forced:Object.defineProperties!==r,sham:!i},{defineProperties:r})},739:(e,t,r)=>{"use strict";var n=r(9989),i=r(7697),r=r(2560).f;n({target:"Object",stat:!0,forced:Object.defineProperty!==r,sham:!i},{defineProperty:r})},1919:(e,t,r)=>{"use strict";var n=r(9989),i=r(3689),a=r(5290),o=r(2474).f,r=r(7697);n({target:"Object",stat:!0,forced:!r||i(function(){o(1)}),sham:!r},{getOwnPropertyDescriptor:function(e,t){return o(a(e),t)}})},9474:(e,t,r)=>{"use strict";var n=r(9989),i=r(7697),s=r(9152),c=r(5290),f=r(2474),l=r(6522);n({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(e){for(var t,r,n=c(e),i=f.f,a=s(n),o={},u=0;a.length>u;)void 0!==(r=i(n,t=a[u++]))&&l(o,t,r);return o}})},9434:(e,t,r)=>{"use strict";var n=r(9989),i=r(146),a=r(3689),o=r(7518),u=r(690);n({target:"Object",stat:!0,forced:!i||a(function(){o.f(1)})},{getOwnPropertySymbols:function(e){var t=o.f;return t?t(u(e)):[]}})},8052:(e,t,r)=>{"use strict";var n=r(9989),i=r(3689),a=r(690),o=r(1868),r=r(1748);n({target:"Object",stat:!0,forced:i(function(){o(1)}),sham:!r},{getPrototypeOf:function(e){return o(a(e))}})},9358:(e,t,r)=>{"use strict";var n=r(9989),i=r(690),a=r(300);n({target:"Object",stat:!0,forced:r(3689)(function(){a(1)})},{keys:function(e){return a(i(e))}})},228:(e,t,r)=>{"use strict";var n=r(3043),i=r(1880),r=r(5073);n||i(Object.prototype,"toString",r,{unsafe:!0})},939:(e,t,r)=>{"use strict";var n=r(9989),r=r(4818);n({global:!0,forced:parseFloat!==r},{parseFloat:r})},2320:(e,t,r)=>{"use strict";var n=r(9989),r=r(7897);n({global:!0,forced:parseInt!==r},{parseInt:r})},1692:(e,t,r)=>{"use strict";var n=r(9989),f=r(2615),l=r(509),i=r(2582),a=r(9302),p=r(8734);n({target:"Promise",stat:!0,forced:r(562)},{all:function(e){var u=this,t=i.f(u),s=t.resolve,c=t.reject,r=a(function(){var n=l(u.resolve),i=[],a=0,o=1;p(e,function(e){var t=a++,r=!1;o++,f(n,u,e).then(function(e){r||(r=!0,i[t]=e,--o||s(i))},c)}),--o||s(i)});return r.error&&c(r.value),t.promise}})},5089:(e,t,r)=>{"use strict";var n=r(9989),i=r(3931),a=r(7073).CONSTRUCTOR,o=r(7919),u=r(6058),s=r(9985),r=r(1880),c=o&&o.prototype;n({target:"Promise",proto:!0,forced:a,real:!0},{catch:function(e){return this.then(void 0,e)}}),!i&&s(o)&&(n=u("Promise").prototype.catch,c.catch!==n&&r(c,"catch",n,{unsafe:!0}))},6697:(e,R,t)=>{"use strict";function a(e,t){var r,n,i,a,o=t.value,u=1===t.state,s=u?e.ok:e.fail,c=e.resolve,f=e.reject,l=e.domain;try{s?(u||(2===t.rejection&&(a=t,h(d,m,function(){var e=a.facade;p?S.emit("rejectionHandled",e):T("rejectionhandled",e,a.value)})),t.rejection=1),!0===s?r=o:(l&&l.enter(),r=s(o),l&&(l.exit(),i=!0)),r===e.promise?f(new E("Promise-chain cycle")):(n=F(r))?h(n,r,c,f):c(r)):f(o)}catch(e){l&&!i&&l.exit(),f(e)}}var r,n,i,o=t(9989),u=t(3931),p=t(806),m=t(9037),h=t(2615),s=t(1880),c=t(9385),z=t(5997),q=t(4241),j=t(509),f=t(9985),P=t(8999),L=t(767),U=t(6373),d=t(9886).set,l=t(231),$=t(920),H=t(9302),G=t(4410),y=t(618),v=t(7919),g=t(7073),t=t(2582),x="Promise",b=g.CONSTRUCTOR,V=g.REJECTION_EVENT,g=g.SUBCLASSING,w=y.getterFor(x),Z=y.set,y=v&&v.prototype,N=v,D=y,E=m.TypeError,A=m.document,S=m.process,C=t.f,W=C,Y=!!(A&&A.createEvent&&m.dispatchEvent),M="unhandledrejection",F=function(e){var t;return!(!P(e)||!f(t=e.then))&&t},O=function(r,i){r.notified||(r.notified=!0,l(function(){for(var e,n,t=r.reactions;e=t.get();)a(e,r);r.notified=!1,i&&!r.rejection&&(n=r,h(d,m,function(){var e,t=n.facade,r=n.value;if(B(n)&&(e=H(function(){p?S.emit("unhandledRejection",r,t):T(M,t,r)}),n.rejection=p||B(n)?2:1,e.error))throw e.value}))}))},T=function(e,t,r){var n;Y?((n=A.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),m.dispatchEvent(n)):n={promise:t,reason:r},!V&&(t=m["on"+e])?t(n):e===M&&$("Unhandled promise rejection",r)},B=function(e){return 1!==e.rejection&&!e.parent},_=function(t,r,n){return function(e){t(r,e,n)}},k=function(e,t,r){e.done||(e.done=!0,(e=r?r:e).value=t,e.state=2,O(e,!0))},I=function(r,e,t){if(!r.done){r.done=!0,t&&(r=t);try{if(r.facade===e)throw new E("Promise can't be resolved itself");var n=F(e);n?l(function(){var t={done:!1};try{h(n,e,_(I,t,r),_(k,t,r))}catch(e){k(t,e,r)}}):(r.value=e,r.state=1,O(r,!1))}catch(e){k({done:!1},e,r)}}};if(b&&(D=(N=function(e){L(this,D),j(e),h(r,this);var t=w(this);try{e(_(I,t),_(k,t))}catch(e){k(t,e)}}).prototype,(r=function(e){Z(this,{type:x,done:!1,notified:!1,parent:!1,reactions:new G,rejection:!1,state:0,value:void 0})}).prototype=s(D,"then",function(e,t){var r=w(this),n=C(U(this,N));return r.parent=!0,n.ok=!f(e)||e,n.fail=f(t)&&t,n.domain=p?S.domain:void 0,0===r.state?r.reactions.add(n):l(function(){a(n,r)}),n.promise}),n=function(){var e=new r,t=w(e);this.promise=e,this.resolve=_(I,t),this.reject=_(k,t)},t.f=C=function(e){return e===N||void 0===e?new n:W(e)},!u&&f(v)&&y!==Object.prototype)){i=y.then,g||s(y,"then",function(e,t){var r=this;return new N(function(e,t){h(i,r,e,t)}).then(e,t)},{unsafe:!0});try{delete y.constructor}catch(e){}c&&c(y,D)}o({global:!0,constructor:!0,wrap:!0,forced:b},{Promise:N}),z(N,x,!1,!0),q(x)},3964:(e,t,r)=>{"use strict";r(6697),r(1692),r(5089),r(8829),r(2092),r(7905)},8829:(e,t,r)=>{"use strict";var n=r(9989),a=r(2615),o=r(509),u=r(2582),s=r(9302),c=r(8734);n({target:"Promise",stat:!0,forced:r(562)},{race:function(e){var r=this,n=u.f(r),i=n.reject,t=s(function(){var t=o(r.resolve);c(e,function(e){a(t,r,e).then(n.resolve,i)})});return t.error&&i(t.value),n.promise}})},2092:(e,t,r)=>{"use strict";var n=r(9989),i=r(2615),a=r(2582);n({target:"Promise",stat:!0,forced:r(7073).CONSTRUCTOR},{reject:function(e){var t=a.f(this);return i(t.reject,void 0,e),t.promise}})},7905:(e,t,r)=>{"use strict";var n=r(9989),i=r(6058),a=r(3931),o=r(7919),u=r(7073).CONSTRUCTOR,s=r(2945),c=i("Promise"),f=a&&!u;n({target:"Promise",stat:!0,forced:a||u},{resolve:function(e){return s(f&&this===c?o:this,e)}})},50:(e,t,r)=>{"use strict";var n=r(9989),i=r(6058),a=r(1735),o=r(6761),u=r(2655),s=r(5027),c=r(8999),f=r(5391),r=r(3689),l=i("Reflect","construct"),p=Object.prototype,m=[].push,h=r(function(){function e(){}return!(l(function(){},[],e)instanceof e)}),d=!r(function(){l(function(){})}),i=h||d;n({target:"Reflect",stat:!0,forced:i,sham:i},{construct:function(e,t){u(e),s(t);var r=arguments.length<3?e:u(arguments[2]);if(d&&!h)return l(e,t,r);if(e===r){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var n=[null];return a(m,n,t),new(a(o,e,n))}n=r.prototype,r=f(c(n)?n:p),n=a(e,r,t);return c(n)?n:r}})},6034:(e,t,r)=>{"use strict";var n=r(9989),i=r(9037),r=r(5997);n({global:!0},{Reflect:{}}),r(i.Reflect,"Reflect",!0)},2003:(R,z,e)=>{"use strict";var t=e(7697),r=e(9037),n=e(8844),i=e(5266),c=e(3457),f=e(5773),a=e(2741).f,l=e(3622),p=e(1245),m=e(4327),h=e(3477),o=e(7901),u=e(8055),s=e(1880),d=e(3689),y=e(6812),v=e(618).enforce,g=e(4241),x=e(4201),b=e(2100),w=e(6422),N=x("match"),D=r.RegExp,E=D.prototype,A=r.SyntaxError,S=n(E.exec),C=n("".charAt),M=n("".replace),F=n("".indexOf),q=n("".slice),j=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,O=/a/g,T=/a/g,e=new D(O)!==O,B=o.MISSED_STICKY,P=o.UNSUPPORTED_Y;if(i("RegExp",t&&(!e||B||b||w||d(function(){return T[N]=!1,D(O)!==O||D(T)===T||"/a/i"!==String(D(O,"i"))})))){for(var _=function(e,t){var r,n,i=l(E,this),a=p(e),o=void 0===t,u=[],s=e;if(!i&&a&&o&&e.constructor===_)return e;if((a||l(E,e))&&(e=e.source,o&&(t=h(s))),e=void 0===e?"":m(e),t=void 0===t?"":m(t),s=e,a=t=b&&"dotAll"in O&&(r=!!t&&-1"===t&&s:if(""===f||y(o,f))throw new A("Invalid capture group name");o[f]=!0,s=!(a[a.length]=[f,c]),f="";continue}s?f+=t:i+=t}return[i,a]}(e))[0],u=o[1]),o=c(D(e,t),i?this:E,_),(r||n||u.length)&&(t=v(o),r&&(t.dotAll=!0,t.raw=_(function(e){for(var t,r=e.length,n=0,i="",a=!1;n<=r;n++)"\\"!==(t=C(e,n))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+C(e,++n);return i}(e),a)),n&&(t.sticky=!0),u.length&&(t.groups=u)),e!==s)try{f(o,"source",""===s?"(?:)":s)}catch(e){}return o},k=a(D),I=0;k.length>I;)u(_,D,k[I++]);(E.constructor=_).prototype=E,s(r,"RegExp",_,{constructor:!0})}g("RegExp")},8518:(e,t,r)=>{"use strict";var n=r(7697),i=r(2100),a=r(6648),o=r(2148),u=r(618).get,s=RegExp.prototype,c=TypeError;n&&i&&o(s,"dotAll",{configurable:!0,get:function(){if(this!==s){if("RegExp"===a(this))return!!u(this).dotAll;throw new c("Incompatible receiver, RegExp required")}}})},4043:(e,t,r)=>{"use strict";var n=r(9989),r=r(6308);n({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},3440:(e,t,r)=>{"use strict";var n=r(7697),i=r(7901).MISSED_STICKY,a=r(6648),o=r(2148),u=r(618).get,s=RegExp.prototype,c=TypeError;n&&i&&o(s,"sticky",{configurable:!0,get:function(){if(this!==s){if("RegExp"===a(this))return!!u(this).sticky;throw new c("Incompatible receiver, RegExp required")}}})},7409:(e,t,r)=>{"use strict";r(4043);var n,i=r(9989),a=r(2615),o=r(9985),u=r(5027),s=r(4327),r=(n=!1,(r=/[ac]/).exec=function(){return n=!0,/./.exec.apply(this,arguments)},!0===r.test("abc")&&n),c=/./.test;i({target:"RegExp",proto:!0,forced:!r},{test:function(e){var t=u(this),e=s(e),r=t.exec;if(!o(r))return a(c,t,e);r=a(r,t,e);return null!==r&&(u(r),!0)}})},2826:(e,t,r)=>{"use strict";var n=r(1236).PROPER,i=r(1880),a=r(5027),o=r(4327),u=r(3689),s=r(3477),r="toString",c=RegExp.prototype[r],u=u(function(){return"/a/b"!==c.call({source:"a",flags:"b"})}),n=n&&c.name!==r;(u||n)&&i(RegExp.prototype,r,function(){var e=a(this);return"/"+o(e.source)+"/"+o(s(e))},{unsafe:!0})},7985:(e,t,r)=>{"use strict";r(319)("Set",function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},r(800))},9649:(e,t,r)=>{"use strict";r(7985)},3843:(e,t,r)=>{"use strict";var n=r(9989),i=r(8844),a=r(2124),o=r(4684),u=r(4327),r=r(7413),s=i("".indexOf);n({target:"String",proto:!0,forced:!r("includes")},{includes:function(e){return!!~s(u(o(this)),u(a(e)),1{"use strict";var n=r(730).charAt,i=r(4327),a=r(618),o=r(1934),u=r(7807),s="String Iterator",c=a.set,f=a.getterFor(s);o(String,"String",function(e){c(this,{type:s,string:i(e),index:0})},function(){var e=f(this),t=e.string,r=e.index;return r>=t.length?u(void 0,!0):(t=n(t,r),e.index+=t.length,u(t,!1))})},2462:(e,t,r)=>{"use strict";var i=r(2615),n=r(8678),c=r(5027),a=r(981),f=r(3126),l=r(4327),o=r(4684),p=r(4849),m=r(1514),h=r(6100);n("match",function(n,u,s){return[function(e){var t=o(this),r=a(e)?void 0:p(e,n);return r?i(r,e,t):new RegExp(e)[n](l(t))},function(e){var t=c(this),r=l(e),e=s(u,t,r);if(e.done)return e.value;if(!t.global)return h(t,r);for(var n=t.unicode,i=[],a=t.lastIndex=0;null!==(o=h(t,r));){var o=l(o[0]);""===(i[a]=o)&&(t.lastIndex=m(r,f(t.lastIndex),n)),a++}return 0===a?null:i}]})},9588:(e,t,r)=>{"use strict";r(9989)({target:"String",proto:!0},{repeat:r(534)})},7267:(e,t,r)=>{"use strict";var N=r(1735),i=r(2615),n=r(8844),a=r(8678),o=r(3689),D=r(5027),E=r(9985),u=r(981),A=r(8700),S=r(3126),C=r(4327),s=r(4684),M=r(1514),c=r(4849),F=r(7017),O=r(6100),f=r(4201)("replace"),T=Math.max,B=Math.min,_=n([].concat),k=n([].push),I=n("".indexOf),R=n("".slice),r="$0"==="a".replace(/./,"$0"),l=!!/./[f]&&""===/./[f]("a","$0");a("replace",function(e,x,b){var w=l?"$":"$0";return[function(e,t){var r=s(this),n=u(e)?void 0:c(e,f);return n?i(n,e,r,t):i(x,C(r),e,t)},function(e,t){var r=D(this),n=C(e);if("string"==typeof t&&-1===I(t,w)&&-1===I(t,"$<")){e=b(x,r,n,t);if(e.done)return e.value}var i=E(t);i||(t=C(t));var a,o=r.global;o&&(a=r.unicode,r.lastIndex=0);for(var u,s=[];null!==(u=O(r,n))&&(k(s,u),o);)""===C(u[0])&&(r.lastIndex=M(n,S(r.lastIndex),a));for(var c,f="",l=0,p=0;p")})||!r||l)},7729:(e,t,r)=>{"use strict";var n=r(9989),i=r(1568);n({target:"String",proto:!0,forced:r(4580)("sub")},{sub:function(){return i(this,"sub","","")}})},372:(e,t,r)=>{"use strict";var n=r(9989),i=r(8844),a=r(4684),o=r(8700),u=r(4327),s=i("".slice),c=Math.max,f=Math.min;n({target:"String",proto:!0,forced:!"".substr||"b"!=="ab".substr(-1)},{substr:function(e,t){var r=u(a(this)),n=r.length,e=o(e);return(e=e===1/0?0:e)<0&&(e=c(n+e,0)),(t=void 0===t?n:o(t))<=0||t===1/0||e>=(t=f(e+t,n))?"":s(r,e,t)}})},8436:(e,t,r)=>{"use strict";var n=r(9989),i=r(1435).trim;n({target:"String",proto:!0,forced:r(5984)("trim")},{trim:function(){return i(this)}})},7855:(R,z,e)=>{"use strict";function a(e,t,r){var n=ue(F,t);n&&delete F[t],T(e,t,r),n&&e!==F&&T(F,t,n)}function t(e,t){var r=B[e]=b(O);return ne(r,{type:M,tag:e,description:t}),m||(r.description=t),r}function n(e,t,r){return e===F&&n(_,t,r),y(e),t=g(t),y(r),d(B,t)?(r.enumerable?(d(e,C)&&e[C][t]&&(e[C][t]=!1),r=b(r,{enumerable:x(0,!1)})):(d(e,C)||T(e,C,x(1,{})),e[C][t]=!0),I(e,t,r)):T(e,t,r)}function r(t,e){y(t);var r=v(e),e=w(r).concat(s(r));return S(e,function(e){m&&!l(i,r,e)||n(t,e,r[e])}),t}function i(e){var e=g(e),t=l(ce,this,e);return!(this===F&&d(B,e)&&!d(_,e))&&(!(t||!d(this,e)||!d(B,e)||d(this,C)&&this[C][e])||t)}function o(e,t){var r,e=v(e),t=g(t);if(e!==F||!d(B,t)||d(_,t))return!(r=ue(e,t))||!d(B,t)||d(e,C)&&e[C][t]||(r.enumerable=!0),r}function u(e){var e=se(v(e)),t=[];return S(e,function(e){d(B,e)||d(J,e)||fe(t,e)}),t}function s(e){var t=e===F,e=se(t?_:v(e)),r=[];return S(e,function(e){!d(B,e)||t&&!d(F,e)||fe(r,B[e])}),r}var c=e(9989),f=e(9037),l=e(2615),p=e(8844),q=e(3931),m=e(7697),h=e(146),j=e(3689),d=e(6812),P=e(3622),y=e(5027),v=e(5290),g=e(8360),L=e(4327),x=e(5684),b=e(5391),w=e(300),U=e(2741),$=e(6062),H=e(7518),G=e(2474),V=e(2560),Z=e(8920),W=e(9556),N=e(1880),Y=e(2148),D=e(3430),E=e(2713),J=e(7248),X=e(4630),Q=e(4201),K=e(6145),ee=e(5405),te=e(3032),re=e(5997),A=e(618),S=e(2960).forEach,C=E("hidden"),M="Symbol",e="prototype",ne=A.set,ie=A.getterFor(M),F=Object[e],E=f.Symbol,O=E&&E[e],ae=f.RangeError,oe=f.TypeError,A=f.QObject,ue=G.f,T=V.f,se=$.f,ce=W.f,fe=p([].push),B=D("symbols"),_=D("op-symbols"),p=D("wks"),k=!A||!A[e]||!A[e].findChild,I=m&&j(function(){return 7!==b(T({},"a",{get:function(){return T(this,"a",{value:7}).a}})).a})?a:T;h||(N(O=(E=function(){if(P(O,this))throw new oe("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?L(arguments[0]):void 0,n=X(e),i=function(e){var t=void 0===this?f:this,r=(t===F&&l(i,_,e),d(t,C)&&d(t[C],n)&&(t[C][n]=!1),x(1,e));try{I(t,n,r)}catch(e){if(!(e instanceof ae))throw e;a(t,n,r)}};return m&&k&&I(F,n,{configurable:!0,set:i}),t(n,e)})[e],"toString",function(){return ie(this).tag}),N(E,"withoutSetter",function(e){return t(X(e),e)}),W.f=i,V.f=n,Z.f=r,G.f=o,U.f=$.f=u,H.f=s,K.f=function(e){return t(Q(e),e)},m&&(Y(O,"description",{configurable:!0,get:function(){return ie(this).description}}),q||N(F,"propertyIsEnumerable",i,{unsafe:!0}))),c({global:!0,constructor:!0,wrap:!0,forced:!h,sham:!h},{Symbol:E}),S(w(p),function(e){ee(e)}),c({target:M,stat:!0,forced:!h},{useSetter:function(){k=!0},useSimple:function(){k=!1}}),c({target:"Object",stat:!0,forced:!h,sham:!m},{create:function(e,t){return void 0===t?b(e):r(b(e),t)},defineProperty:n,defineProperties:r,getOwnPropertyDescriptor:o}),c({target:"Object",stat:!0,forced:!h},{getOwnPropertyNames:u}),te(),re(E,M),J[C]=!0},6544:(e,t,r)=>{"use strict";var n,i,a,o,u,s,c,f=r(9989),l=r(7697),p=r(9037),m=r(8844),h=r(6812),d=r(9985),y=r(3622),v=r(4327),g=r(2148),r=r(8758),x=p.Symbol,b=x&&x.prototype;!l||!d(x)||"description"in b&&void 0===x().description||(n={},r(p=function(){var e=arguments.length<1||void 0===arguments[0]?void 0:v(arguments[0]),t=y(b,this)?new x(e):void 0===e?x():x(e);return""===e&&(n[t]=!0),t},x),(p.prototype=b).constructor=p,i="Symbol(description detection)"===String(x("description detection")),a=m(b.valueOf),o=m(b.toString),u=/^Symbol\((.*)\)[^)]+$/,s=m("".replace),c=m("".slice),g(b,"description",{configurable:!0,get:function(){var e=a(this);if(h(n,e))return"";e=o(e),e=i?c(e,7,-1):s(e,u,"$1");return""===e?void 0:e}}),f({global:!0,constructor:!0,forced:!0},{Symbol:p}))},8074:(e,t,r)=>{"use strict";var n=r(9989),i=r(6058),a=r(6812),o=r(4327),u=r(3430),r=r(6549),s=u("string-to-symbol-registry"),c=u("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!r},{for:function(e){e=o(e);if(a(s,e))return s[e];var t=i("Symbol")(e);return s[e]=t,c[t]=e,t}})},4254:(e,t,r)=>{"use strict";r(5405)("iterator")},9749:(e,t,r)=>{"use strict";r(7855),r(8074),r(1445),r(8324),r(9434)},1445:(e,t,r)=>{"use strict";var n=r(9989),i=r(6812),a=r(734),o=r(3691),u=r(3430),r=r(6549),s=u("symbol-to-string-registry");n({target:"Symbol",stat:!0,forced:!r},{keyFor:function(e){if(!a(e))throw new TypeError(o(e)+" is not a symbol");if(i(s,e))return s[e]}})},7522:(e,t,r)=>{"use strict";function n(t){if(t&&t.forEach!==s)try{c(t,"forEach",s)}catch(e){t.forEach=s}}var i,a=r(9037),o=r(6338),u=r(3265),s=r(7612),c=r(5773);for(i in o)o[i]&&n(a[i]&&a[i].prototype);n(u)},6265:(e,t,r)=>{"use strict";function n(e,t){if(e){if(e[f]!==p)try{c(e,f,p)}catch(t){e[f]=p}if(e[l]||c(e,l,t),o[t])for(var r in s)if(e[r]!==s[r])try{c(e,r,s[r])}catch(t){e[r]=s[r]}}}var i,a=r(9037),o=r(6338),u=r(3265),s=r(752),c=r(5773),r=r(4201),f=r("iterator"),l=r("toStringTag"),p=s.values;for(i in o)n(a[i]&&a[i].prototype,i);n(u,"DOMTokenList")},9979:(e,t,r)=>{"use strict";var n=r(9989),i=r(2615);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},4814:function(e){e.exports=function(){"use strict";function M(){return!0}function fe(){return!1}function le(){}const F="Argument is not a typed-function.";return function e(){function f(e){return"object"==typeof e&&null!==e&&e.constructor===Object}const t=[{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:f},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],r={name:"any",test:M,isAny:!0};let a,o,n=0,J={createCount:0};function u(e){var t=a.get(e);if(t)return t;let r='Unknown type "'+e+'"';var n=e.toLowerCase();let i;for(i of o)if(i.toLowerCase()===n){r+='. Did you mean "'+i+'" ?';break}throw new TypeError(r)}function i(t){var e=1{const t=a.get(e);return!t.isAny&&t.test(r)});return e.length?e:["any"]}function l(e){return e&&"function"==typeof e&&"_typedFunctionData"in e}function p(r,n,i){if(!l(r))throw new TypeError(F);const a=i&&i.exact,o=Q(Array.isArray(n)?n.join(","):n),e=X(o);if(!a||e in r.signatures){const n=r._typedFunctionData.signatureMap.get(e);if(n)return n}var u=o.length;let s,t;if(a){let e;for(e in s=[],r.signatures)s.push(r._typedFunctionData.signatureMap.get(e))}else s=r._typedFunctionData.signatures;for(let t=0;t!r.has(e.name)))continue}i.push(e)}}if(0===(s=i).length)break}for(t of s)if(t.params.length<=u)return t;throw new TypeError("Signature not found (signature: "+(r.name||"unnamed")+"("+X(o,", ")+"))")}function X(e,t){t=1e.name).join(t)}function oe(e){const t=function(e){if(0===e.length)return[];const r=e.map(u);1e.index-t.index);let n=r[0].conversionsTo;if(1===e.length)return n;n=n.concat([]);const i=new Set(e);for(let t=1;te.name));let r=e.hasAny,n=e.name;var i=t.map(function(e){var t=u(e.from);return r=t.isAny||r,n+="|"+e.from,{name:e.from,typeIndex:t.index,test:t.test,isAny:t.isAny,conversion:e,conversionIndex:e.index}});return{types:e.types.concat(i),name:n,hasAny:r,hasConversion:0t.typeSet.add(e.name))),t.typeSet}function Q(e){const t=[];if("string"!=typeof e)throw new TypeError("Signatures must be strings");const r=e.trim();if(""===r)return t;const n=r.split(",");for(let e=0;eu(e.trim()));let n=!1,i=t?"...":"";return{types:r.map(function(e){return n=e.isAny||n,i+=e.name+"|",{name:e.name,typeIndex:e.index,test:e.test,isAny:e.isAny,conversion:null,conversionIndex:-1}}),name:i.slice(0,-1),hasAny:n,hasConversion:!1,restParam:t}}(n[e].trim());if(r.restParam&&e!==n.length-1)throw new SyntaxError('Unexpected rest parameter "'+n[e]+'": only allowed for the last parameter');if(0===r.types.length)return null;t.push(r)}return t}function K(e){e=ie(e);return!!e&&e.restParam}function ee(e){if(e&&0!==e.types.length){if(1===e.types.length)return u(e.types[0].name).test;if(2===e.types.length){const M=u(e.types[0].name).test,t=u(e.types[1].name).test;return function(e){return M(e)||t(e)}}{const M=e.types.map(function(e){return u(e.name).test});return function(t){for(let e=0;e{let t;for(t of te(e.params,r))n.add(t)}),n.has("any")?["any"]:Array.from(n)}function y(r,n,e){let t,i;var a=r||"unnamed";let o,u=e;for(o=0;o{const t=ee(h(e.params,o));(oe)return(t=new TypeError("Too many arguments in function "+a+" (expected: "+e+", actual: "+n.length+")")).data={category:"tooManyArgs",fn:a,index:n.length,expectedLength:e},t;const s=[];for(let e=0;eD(e)?w(e.referToSelf.callback):N(e)?b(e.referTo.references,e.referTo.callback):e),a=new Array(i.length).fill(!1);let o=!0;for(;o;){let t=!(o=!1);for(let e=0;e{const t=n[e];if(I.test(t.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}const i=[],a=[],o={},u=[];let s;for(s in r)if(Object.prototype.hasOwnProperty.call(r,s)){const t=Q(s);if(t){i.forEach(function(e){if(function(n,i){const a=Math.max(n.length,i.length);for(let r=0;r=e:r?e>=o:e===o}(e,t))throw new TypeError('Conflicting signatures "'+X(e)+'" and "'+X(t)+'".')}),i.push(t);const fe=a.length,le=(a.push(r[s]),t.map(oe));let e;for(e of function t(r,n,i){if(ne.name).join("|"),hasAny:t.some(e=>e.isAny),hasConversion:!1,restParam:!0}),e.push(o)}else e=o.types.map(function(e){return{types:[e],name:e.name,hasAny:e.isAny,hasConversion:e.conversion,restParam:!1}});return a=e,Array.prototype.concat.apply([],a.map(function(e){return t(r,n+1,i.concat([e]))}))}var a;return[i]}(le,0,[])){const t=X(e);u.push({params:e,name:t,fn:fe}),e.every(e=>!e.hasConversion)&&(o[t]=fe)}}}u.sort(ue);var e=ce(a,o,k);let c;for(c in o)Object.prototype.hasOwnProperty.call(o,c)&&(o[c]=e[o[c]]);const f=[],l=new Map;for(c of u)l.has(c.name)||(c.fn=e[c.fn],f.push(c),l.set(c.name,c));var p=f[0]&&f[0].params.length<=2&&!K(f[0].params),m=f[1]&&f[1].params.length<=2&&!K(f[1].params),h=f[2]&&f[2].params.length<=2&&!K(f[2].params),d=f[3]&&f[3].params.length<=2&&!K(f[3].params),y=f[4]&&f[4].params.length<=2&&!K(f[4].params),v=f[5]&&f[5].params.length<=2&&!K(f[5].params),g=p&&m&&h&&d&&y&&v;for(let e=0;e=n+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=ee(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=ee(e[0]),i=ee(e[1]),function(e){return n(e[0])&&i(e[1])&&2===e.length}):(r=e.map(ee),function(t){for(let e=0;ee.hasConversion)){const i=K(e),a=e.map(se);t=function(){const t=[],r=i?arguments.length-1:arguments.length;for(let e=0;ee.test),W=f.map(e=>e.implementation),Y=function(){for(let e=G;eX(Q(e))),t=ie(arguments);if("function"!=typeof t)throw new TypeError("Callback function expected as last argument");return b(e,t)},J.referToSelf=w,J.convert=function(t,e){const r=u(e);if(r.test(t))return t;const n=r.conversionsTo;if(0===n.length)throw new Error("There are no conversions to "+e+" defined.");for(let e=0;e{for(var r in t)uh.o(t,r)&&!uh.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},uh.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),uh.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},uh.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var sh={};return(()=>{"use strict";uh.d(sh,{default:()=>oh});var t={};function V(e){return(V="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})(e)}function Ee(e){return"number"==typeof e}function Ae(e){return!(!e||"object"!==V(e)||"function"!=typeof e.constructor)&&(!0===e.isBigNumber&&"object"===V(e.constructor.prototype)&&!0===e.constructor.prototype.isBigNumber||"function"==typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function Oe(e){return e&&"object"===V(e)&&!0===Object.getPrototypeOf(e).isComplex||!1}function Te(e){return e&&"object"===V(e)&&!0===Object.getPrototypeOf(e).isFraction||!1}function Z(e){return e&&!0===e.constructor.prototype.isUnit||!1}function S(e){return"string"==typeof e}uh.r(t),uh.d(t,{createAbs:()=>Ji,createAccessorNode:()=>gf,createAcos:()=>Xs,createAcosh:()=>hc,createAcot:()=>dc,createAcoth:()=>yc,createAcsc:()=>vc,createAcsch:()=>gc,createAdd:()=>nf,createAddScalar:()=>Ki,createAnd:()=>es,createApply:()=>Xi,createApplyTransform:()=>O0,createArg:()=>fo,createArrayNode:()=>bf,createAsec:()=>xc,createAsech:()=>bc,createAsin:()=>wc,createAsinh:()=>Nc,createAssignmentNode:()=>Cf,createAtan:()=>Dc,createAtan2:()=>Ec,createAtanh:()=>Ac,createAtomicMass:()=>s0,createAvogadro:()=>c0,createBellNumbers:()=>qp,createBigNumberClass:()=>Vr,createBignumber:()=>hi,createBin:()=>Du,createBitAnd:()=>ao,createBitNot:()=>oo,createBitOr:()=>uo,createBitXor:()=>co,createBlockNode:()=>Ff,createBohrMagneton:()=>Um,createBohrRadius:()=>Wm,createBoltzmann:()=>f0,createBoolean:()=>mi,createCatalan:()=>jp,createCbrt:()=>ra,createCeil:()=>ua,createChain:()=>Ol,createChainClass:()=>Cl,createClassicalElectronRadius:()=>Ym,createClone:()=>zn,createColumn:()=>Do,createColumnTransform:()=>T0,createCombinations:()=>op,createCombinationsWithRep:()=>cp,createCompare:()=>rs,createCompareNatural:()=>os,createCompareText:()=>ss,createCompile:()=>ul,createComplex:()=>di,createComplexClass:()=>Wr,createComposition:()=>Lp,createConcat:()=>No,createConcatTransform:()=>V0,createConditionalNode:()=>Tf,createConductanceQuantum:()=>$m,createConj:()=>lo,createConstantNode:()=>jf,createCorr:()=>rp,createCos:()=>Cc,createCosh:()=>Mc,createCot:()=>Fc,createCoth:()=>Oc,createCoulomb:()=>Pm,createCount:()=>Eo,createCreateUnit:()=>Js,createCross:()=>Ao,createCsc:()=>Tc,createCsch:()=>Bc,createCtranspose:()=>ou,createCube:()=>sa,createCumSum:()=>Zl,createCumSumTransform:()=>X0,createDeepEqual:()=>As,createDenseMatrixClass:()=>Rn,createDerivative:()=>nm,createDet:()=>Tl,createDeuteronMass:()=>t0,createDiag:()=>So,createDiff:()=>jo,createDiffTransform:()=>Z0,createDistance:()=>$l,createDivide:()=>Ul,createDivideScalar:()=>_u,createDot:()=>uf,createDotDivide:()=>Lu,createDotMultiply:()=>$a,createDotPow:()=>Pu,createE:()=>bm,createEfimovFactor:()=>u0,createEigs:()=>Rl,createElectricConstant:()=>qm,createElectronMass:()=>Jm,createElementaryCharge:()=>Lm,createEqual:()=>fs,createEqualScalar:()=>ci,createEqualText:()=>ps,createErf:()=>pu,createEvaluate:()=>sl,createExp:()=>ca,createExpm:()=>zl,createExpm1:()=>fa,createFactorial:()=>xp,createFalse:()=>hm,createFaraday:()=>l0,createFermiCoupling:()=>Xm,createFft:()=>su,createFibonacciHeapClass:()=>zs,createFilter:()=>Mo,createFilterTransform:()=>_0,createFineStructure:()=>Qm,createFirstRadiation:()=>p0,createFix:()=>pa,createFlatten:()=>Oo,createFloor:()=>ha,createForEach:()=>To,createForEachTransform:()=>I0,createFormat:()=>Nu,createFraction:()=>yi,createFractionClass:()=>Jr,createFreqz:()=>um,createFunctionAssignmentNode:()=>Uf,createFunctionNode:()=>al,createGamma:()=>vp,createGasConstant:()=>h0,createGcd:()=>Ca,createGetMatrixDataType:()=>ko,createGravitationConstant:()=>km,createGravity:()=>D0,createHartreeEnergy:()=>Km,createHasNumericValue:()=>ei,createHelp:()=>Fl,createHelpClass:()=>Sl,createHex:()=>Au,createHypot:()=>af,createI:()=>Mm,createIdentity:()=>Io,createIfft:()=>cu,createIm:()=>po,createImmutableDenseMatrixClass:()=>ks,createIndex:()=>cf,createIndexClass:()=>Is,createIndexNode:()=>Hf,createIndexTransform:()=>R0,createInfinity:()=>ym,createIntersect:()=>Hl,createInv:()=>Bl,createInverseConductanceQuantum:()=>Hm,createInvmod:()=>Pa,createIsInteger:()=>Hn,createIsNaN:()=>ii,createIsNegative:()=>Xn,createIsNumeric:()=>Qn,createIsPositive:()=>ri,createIsPrime:()=>Ou,createIsZero:()=>ni,createKldivergence:()=>wp,createKlitzing:()=>Zm,createKron:()=>Ro,createLN10:()=>Dm,createLN2:()=>Nm,createLOG10E:()=>Am,createLOG2E:()=>Em,createLarger:()=>bs,createLargerEq:()=>Ds,createLcm:()=>Fa,createLeafCount:()=>Up,createLeftShift:()=>Yu,createLgamma:()=>gp,createLog:()=>zu,createLog10:()=>Oa,createLog1p:()=>qu,createLog2:()=>Ta,createLoschmidt:()=>m0,createLsolve:()=>$u,createLsolveAll:()=>Gu,createLup:()=>ll,createLusolve:()=>Dl,createLyap:()=>Ll,createMad:()=>Jl,createMagneticConstant:()=>zm,createMagneticFluxQuantum:()=>Gm,createMap:()=>zo,createMapTransform:()=>z0,createMatrix:()=>vi,createMatrixClass:()=>Qr,createMatrixFromColumns:()=>Ai,createMatrixFromFunction:()=>xi,createMatrixFromRows:()=>Ni,createMax:()=>Bs,createMaxTransform:()=>P0,createMean:()=>Wl,createMeanTransform:()=>L0,createMedian:()=>Yl,createMin:()=>_s,createMinTransform:()=>U0,createMod:()=>ba,createMode:()=>xu,createMolarMass:()=>w0,createMolarMassC12:()=>N0,createMolarPlanckConstant:()=>d0,createMolarVolume:()=>y0,createMultinomial:()=>Dp,createMultiply:()=>_a,createMultiplyScalar:()=>Ba,createNaN:()=>vm,createNeutronMass:()=>r0,createNode:()=>lf,createNorm:()=>of,createNot:()=>xo,createNthRoot:()=>ka,createNthRoots:()=>ju,createNuclearMagneton:()=>Vm,createNull:()=>dm,createNumber:()=>li,createNumeric:()=>Tu,createObjectNode:()=>Vf,createOct:()=>Eu,createOnes:()=>Po,createOperatorNode:()=>Wf,createOr:()=>bo,createParenthesisNode:()=>Jf,createParse:()=>ol,createParser:()=>fl,createParserClass:()=>cl,createPartitionSelect:()=>Os,createPermutations:()=>Ap,createPhi:()=>wm,createPi:()=>gm,createPickRandom:()=>Tp,createPinv:()=>_l,createPlanckCharge:()=>C0,createPlanckConstant:()=>Im,createPlanckLength:()=>E0,createPlanckMass:()=>A0,createPlanckTemperature:()=>M0,createPlanckTime:()=>S0,createPolynomialRoot:()=>Al,createPow:()=>ku,createPrint:()=>Cu,createPrintTransform:()=>K0,createProd:()=>wu,createProtonMass:()=>e0,createQr:()=>pl,createQuantileSeq:()=>ep,createQuantileSeqTransform:()=>J0,createQuantumOfCirculation:()=>n0,createRandom:()=>_p,createRandomInt:()=>kp,createRange:()=>Ho,createRangeClass:()=>Xr,createRangeNode:()=>Qf,createRangeTransform:()=>$0,createRationalize:()=>am,createRe:()=>mo,createReducedPlanckConstant:()=>Rm,createRelationalNode:()=>el,createReplacer:()=>cm,createReshape:()=>Go,createResize:()=>Vo,createResolve:()=>Kp,createResultSet:()=>dt,createReviver:()=>sm,createRightArithShift:()=>Xu,createRightLogShift:()=>Ku,createRotate:()=>Zo,createRotationMatrix:()=>Yo,createRound:()=>Ru,createRow:()=>Jo,createRowTransform:()=>H0,createRydberg:()=>i0,createSQRT1_2:()=>Sm,createSQRT2:()=>Cm,createSackurTetrode:()=>v0,createSchur:()=>Pl,createSec:()=>_c,createSech:()=>kc,createSecondRadiation:()=>g0,createSetCartesian:()=>Pc,createSetDifference:()=>Uc,createSetDistinct:()=>Hc,createSetIntersect:()=>Vc,createSetIsSubset:()=>Wc,createSetMultiplicity:()=>Jc,createSetPowerset:()=>Qc,createSetSize:()=>Kc,createSetSymDifference:()=>tf,createSetUnion:()=>rf,createSign:()=>Ia,createSimplify:()=>Wp,createSimplifyConstant:()=>Jp,createSimplifyCore:()=>Qp,createSin:()=>Ic,createSinh:()=>Rc,createSize:()=>Xo,createSlu:()=>wl,createSmaller:()=>hs,createSmallerEq:()=>vs,createSolveODE:()=>lu,createSort:()=>Ts,createSpaClass:()=>qs,createSparse:()=>Ws,createSparseMatrixClass:()=>fi,createSpeedOfLight:()=>_m,createSplitUnit:()=>Si,createSqrt:()=>Ra,createSqrtm:()=>ql,createSquare:()=>za,createSqueeze:()=>Qo,createStd:()=>tp,createStdTransform:()=>W0,createStefanBoltzmann:()=>x0,createStirlingS2:()=>Rp,createString:()=>pi,createSubset:()=>Ko,createSubsetTransform:()=>G0,createSubtract:()=>qa,createSubtractScalar:()=>ta,createSum:()=>Gl,createSumTransform:()=>Y0,createSylvester:()=>jl,createSymbolNode:()=>tl,createSymbolicEqual:()=>tm,createTan:()=>zc,createTanh:()=>qc,createTau:()=>xm,createThomsonCrossSection:()=>a0,createTo:()=>Fu,createTrace:()=>sf,createTranspose:()=>iu,createTrue:()=>mm,createTypeOf:()=>ai,createTyped:()=>ct,createUnaryMinus:()=>Wi,createUnaryPlus:()=>Yi,createUnequal:()=>Cs,createUnitClass:()=>Vs,createUnitFunction:()=>Zs,createUppercaseE:()=>Om,createUppercasePi:()=>Fm,createUsolve:()=>Hu,createUsolveAll:()=>Vu,createVacuumImpedance:()=>jm,createVariance:()=>Ql,createVarianceTransform:()=>Q0,createVersion:()=>Tm,createWeakMixingAngle:()=>o0,createWienDisplacement:()=>b0,createXgcd:()=>ja,createXor:()=>wo,createZeros:()=>uu,createZeta:()=>gu,createZpk2tf:()=>om}),uh(4043),uh(7409),uh(9288),uh(6801),uh(8742),uh(228),uh(3843),uh(8052),uh(3975),uh(24),uh(2003),uh(8518),uh(3440),uh(2826),uh(4284);var b=Array.isArray;function P(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function C(e){return Array.isArray(e)||P(e)}function M(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function k(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function I(e){return e&&!0===e.constructor.prototype.isRange||!1}function R(e){return e&&!0===e.constructor.prototype.isIndex||!1}function z(e){return"boolean"==typeof e}function q(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function j(e){return e&&!0===e.constructor.prototype.isHelp||!1}function U(e){return"function"==typeof e}function $(e){return e instanceof Date}function H(e){return e instanceof RegExp}function G(e){return!(!e||"object"!==V(e)||e.constructor!==Object||Oe(e)||Te(e))}function W(e){return null===e}function Y(e){return void 0===e}function fe(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function J(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function X(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function Q(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function K(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function ae(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function le(e){return ae(e)||oe(e)&&1===e.args.length&&ae(e.args[0])&&"-+~".includes(e.op)}function ee(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function pe(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function te(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function L(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function re(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function oe(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function ne(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function ie(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function me(e){return e&&!0===e.isRelationalNode&&!0===e.constructor.prototype.isNode||!1}function ue(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function he(e){return e&&!0===e.constructor.prototype.isChain||!1}function Se(e){var t=V(e);return"object"===t?null===e?"null":Ae(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}var de=uh(4814);function w(e){return"boolean"==typeof e||!!isFinite(e)&&e===Math.round(e)}uh(6976),uh(8813),uh(5239),uh(2076),uh(4712),uh(4992),uh(4338),uh(7267),uh(2462),uh(939),uh(7195),uh(886),uh(2320),uh(6203),uh(9730),uh(2506),uh(3584),uh(6557),uh(2428),uh(5263),uh(7221),uh(2700),uh(1554);var n=Math.sign||function(e){return 0Math.pow(2,r-1)-1||e<-Math.pow(2,r-1))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!w(e))throw new Error("Value must be an integer");e<0&&(e+=Math.pow(2,r)),i="i".concat(r)}r="";return e<0&&(e=-e,r="-"),"".concat(r).concat(n).concat(e.toString(t)).concat(i)}function ve(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),Ee(t)?r=t:Ee(t.precision)&&(r=t.precision),t.wordSize&&"number"!=typeof(n=t.wordSize)))throw new Error('Option "wordSize" must be a number');switch(i){case"fixed":return xe(e,r);case"exponential":return be(e,r);case"engineering":var a=e,o=r;if(isNaN(a)||!isFinite(a))return String(a);var u=(a=we(ge(a),o)).exponent,s=a.coefficients,c=u%3==0?u:u<0?u-3-u%3:u-u%3;if(Ee(o))for(;o>s.length||u-c+1>s.length;)s.push(0);else for(var f=Math.abs(u-c)-(s.length-1),l=0;l=r)return be(e,t);n=i.coefficients,r=i.exponent,n=(n=n.lengtht&&5<=n.splice(t,n.length-t)[0]){var i=t-1;for(n[i]++;10===n[i];)n.pop(),0===i&&(n.unshift(0),r.exponent++,i++),n[--i]++}return r}function Ne(e){for(var t=[],r=0;r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new r(e)}},{from:"number",to:"Complex",convert:function(e){return n||lt(e),new n(e,0)}},{from:"BigNumber",to:"Complex",convert:function(e){return n||lt(e),new n(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 n||lt(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||pt(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(t){r||ft(t);try{return new r(t)}catch(e){throw new Error('Cannot convert "'+t+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(t){i||pt(t);try{return new i(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(t){n||lt(t);try{return new n(t)}catch(e){throw new Error('Cannot convert "'+t+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return r||ft(e),new r(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||pt(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){if(t)return new t(e);throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}]),a.onMismatch=function(e,t,r){var n=a.createError(e,t,r);if(["wrongType","mismatch"].includes(n.data.category)&&1===t.length&&C(t[0])&&r.some(function(e){return!e.params.includes(",")}))throw(t=new TypeError("Function '".concat(e,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(e,")'."))).data=n.data,t;throw n},a.onMismatch=function(e,t,r){var n=a.createError(e,t,r);if(["wrongType","mismatch"].includes(n.data.category)&&1===t.length&&C(t[0])&&r.some(function(e){return!e.params.includes(",")}))throw(t=new TypeError("Function '".concat(e,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(e,")'."))).data=n.data,t;throw n},a});function ft(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function lt(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function pt(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}uh(8150),uh(9979);var mt,ht,dt=N("ResultSet",[],function(){function t(e){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");this.entries=e||[]}return t.prototype.type="ResultSet",t.prototype.isResultSet=!0,t.prototype.valueOf=function(){return this.entries},t.prototype.toString=function(){return"["+this.entries.join(", ")+"]"},t.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},t.fromJSON=function(e){return new t(e.entries)},t},{isClass:!0}),yt=(uh(1013),"0123456789abcdef"),vt="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",gt="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",xt={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-9e15,maxE:9e15,crypto:!1},x=!0,bt="[DecimalError] ",wt=bt+"Invalid argument: ",Nt=bt+"Precision limit exceeded",Dt=bt+"crypto unavailable",Et="[object Decimal]",At=Math.floor,y=Math.pow,St=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Ct=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Mt=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ft=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ot=1e7,F=7,Tt=vt.length-1,Bt=gt.length-1,o={toStringTag:Et};function _t(e){var t,r,n,i=e.length-1,a="",o=e[0];if(0r-1&&(void 0===a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}o.absoluteValue=o.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),O(e)},o.ceil=function(){return O(new this.constructor(this),this.e+1,2)},o.clampedTo=o.clamp=function(e,t){var r=this.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(wt+t);return this.cmp(e)<0?e:0e.e^a<0?1:-1;for(t=0,r=(o=n.length)<(e=i.length)?o:e;ti[t]^a<0?1:-1;return o===e?0:ethis.d.length-2},o.isNaN=function(){return!this.s},o.isNegative=o.isNeg=function(){return this.s<0},o.isPositive=o.isPos=function(){return 0(n=Math.max(Math.ceil(u/F),o)+2)&&(a=n,t.length=1),t.reverse(),n=a;n--;)t.push(0);t.reverse()}else{for((f=(n=c.length)<(o=l.length))&&(o=n),n=0;n(i=(f=Math.ceil(a/F))>i?f+1:i+1)&&(n=i,r.length=1),r.reverse();n--;)r.push(0);r.reverse()}for((i=u.length)-(n=s.length)<0&&(n=i,r=s,s=u,u=r),t=0;n;)t=(u[--n]=u[n]+s[n]+t)/Ot|0,u[n]%=Ot;for(t&&(u.unshift(t),++c),i=u.length;0==u[--i];)u.pop();return e.d=u,e.e=Lt(u,c),x?O(e,a,o):e},o.precision=o.sd=function(e){var t;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(wt+e);return this.d?(t=Ht(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},o.round=function(){var e=this.constructor;return O(new e(this),this.e+1,e.rounding)},o.sine=o.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())+F,n.rounding=1,r=function(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Kt(e,2,t,t);r=16<(r=1.4*Math.sqrt(n))?16:0|r,t=Kt(e,2,t=t.times(1/er(5,r)),t);for(var i,a=new e(5),o=new e(16),u=new e(20);r--;)i=t.times(t),t=t.times(a.plus(i.times(o.times(i).minus(u))));return t}(n,tr(n,r)),n.precision=e,n.rounding=t,O(2=e.d.length-1&&(r=c<0?-c:c)<=9007199254740991)return i=Vt(s,u,r,n),e.s<0?new s(1).div(i):O(i,n,a);if((o=u.s)<0){if(ts.maxE+1||t=n.toExpPos):(kt(e,1,1e9),void 0===t?t=n.rounding:kt(t,0,8),Pt(r=O(new n(r),e,t),e<=r.e||r.e<=n.toExpNeg,e));return r.isNeg()&&!r.isZero()?"-"+t:t},o.toSignificantDigits=o.toSD=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(kt(e,1,1e9),void 0===t?t=r.rounding:kt(t,0,8)),O(new r(this),e,t)},o.toString=function(){var e=this.constructor,e=Pt(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+e:e},o.truncated=o.trunc=function(){return O(new this.constructor(this),this.e+1,1)},o.valueOf=o.toJSON=function(){var e=this.constructor,e=Pt(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+e:e};var D=function(e,t,r,n,i,a){var o,u,s,c,f,l,p,m,h,d,y,v,g,x,b,w,N,D,E,A=e.constructor,S=e.s==t.s?1:-1,C=e.d,M=t.d;if(!(C&&C[0]&&M&&M[0]))return new A(e.s&&t.s&&(C?!M||C[0]!=M[0]:M)?C&&0==C[0]||!M?0*S:S/0:NaN);for(u=a?(f=1,e.e-t.e):(a=Ot,At(e.e/(f=F))-At(t.e/f)),D=M.length,w=C.length,h=(S=new A(S)).d=[],s=0;M[s]==(C[s]||0);s++);if(M[s]>(C[s]||0)&&u--,null==r?(g=r=A.precision,n=A.rounding):g=i?r+(e.e-t.e)+1:r,g<0)h.push(1),l=!0;else{if(g=g/f+2|0,s=0,1==D){for(M=M[c=0],g++;(s=a/2&&++N;c=0,(o=qt(M,d,D,y))<0?(v=d[0],1<(c=(v=D!=y?v*a+(d[1]||0):v)/N|0)?1==(o=qt(p=zt(M,c=a<=c?a-1:c,a),d,m=p.length,y=d.length))&&(c--,jt(p,Dt[i]?1:-1;break}return a}function jt(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]=(u=f.length)){if(!n)break e;for(;u++<=l;)f.push(0);c=s=0,o=(a%=F)-F+(i=1)}else{for(c=u=f[l],i=1;10<=u;u/=10)i++;s=(o=(a%=F)-F+i)<0?0:c/y(10,i-o-1)%10|0}if(n=n||t<0||void 0!==f[l+1]||(o<0?c:c%y(10,i-o-1)),s=r<4?(s||n)&&(0==r||r==(e.s<0?3:2)):5p.maxE?(e.d=null,e.e=NaN):e.ee.constructor.maxE?(e.d=null,e.e=NaN):e.ei-1;)f[r]=0,r||(++a,f.unshift(1));for(u=f.length;!f[u-1];--u);for(o=0,c="";ou)for(a-=u;a--;)c+="0";else at&&(e.length=t,1)}function ir(e){return new this(e).abs()}function ar(e){return new this(e).acos()}function or(e){return new this(e).acosh()}function ur(e,t){return new this(e).plus(t)}function sr(e){return new this(e).asin()}function cr(e){return new this(e).asinh()}function fr(e){return new this(e).atan()}function lr(e){return new this(e).atanh()}function pr(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?$t(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=$t(this,a,1).times(.5)).s=e.s:r=t.s<0?(this.precision=a,this.rounding=1,r=this.atan(D(e,t,a,1)),t=$t(this,a,1),this.precision=n,this.rounding=i,e.s<0?r.minus(t):r.plus(t)):this.atan(D(e,t,a,1)):(r=$t(this,a,1).times(0a.maxE?(i.e=NaN,i.d=null):e.et.re?1:e.ret.im?1:e.ime.length)&&(t=e.length);for(var r=0,n=new Array(t);rt.truncate?e.substring(0,t.truncate-3)+"...":e}function on(e){for(var t=String(e),r="",n=0;n/g,">")}function cn(e,t){if(!S(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Se(e)+", index: 0)");if(S(t))return e===t?0:t=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 B(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function ln(e,t){if(0===t.length){if(Array.isArray(e))throw new _(e.length,0)}else!function e(t,r,n){var i=t.length;if(i!==r[n])throw new _(i,r[n]);if(n")}(e,t,0)}function pn(e,t){var r=e.isMatrix?e._size:B(e);t._sourceSize.forEach(function(e,t){if(null!==e&&e!==r[t])throw new _(e,r[t])})}function T(e,t){if(void 0!==e){if(!Ee(e)||!w(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&t<=e)throw new fn(e,t)}}function mn(e){for(var t=0;tt[a])throw new Error("shape missmatch: missmatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(n," with size ").concat(e[i]," to size ").concat(t[a]))}}function Tn(e,t){var r=B(e);if(je(r,t))return e;On(r,t);var n,i,a,o=function(){for(var e=arguments.length,t=new Array(e),r=0;ra[f]&&(a[f]=u[c])}for(var l=0;le.length)&&(t=e.length);for(var r=0,n=new Array(t);rn[a]&&(n[a]=t[a],i=!0);i&&u(e,n,r)}function r(e){return P(e)?r(e.valueOf()):b(e)?e.map(r):e}return(v.prototype=new e).createDenseMatrix=function(e,t){return new v(e,t)},Object.defineProperty(v,"name",{value:"DenseMatrix"}),(v.prototype.constructor=v).prototype.type="DenseMatrix",v.prototype.isDenseMatrix=!0,v.prototype.getDataType=function(){return Cn(this._data,Se)},v.prototype.storage=function(){return"dense"},v.prototype.datatype=function(){return this._datatype},v.prototype.create=function(e,t){return new v(e,t)},v.prototype.subset=function(e,t,r){switch(arguments.length){case 1:var n=this,i=e;if(!R(i))throw new TypeError("Invalid index");if(i.isScalar())return n.get(i.min());var a=i.size();if(a.length!==n._size.length)throw new _(a.length,n._size.length);for(var o=i.min(),u=i.max(),s=0,c=n._size.length;s");g(f,i.max().map(function(e){return e+1}),l);h=m.length;!function r(n,i,a,o,u){var e=u===o-1,t=i.dimension(u);e?t.forEach(function(e,t){T(e),n[e]=a[t[0]]}):t.forEach(function(e,t){T(e),r(n[e],i,a[t[0]],o,u+1)})}(f._data,i,a,h,0)}return f;default:throw new SyntaxError("Wrong number of arguments")}},v.prototype.get=function(e){if(!b(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new _(e.length,this._size.length);for(var t=0;t=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}(this._data);try{for(r.s();!(t=r.n()).done;){var n=t.value;e.push(new v([n],this._datatype))}}catch(e){r.e(e)}finally{r.f()}return e},v.prototype.columns=function(){var r=this,n=[],e=this.size();if(2!==e.length)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var i=this._data,t=0;t=n.length)throw new fn(t,n.length);return P(e)?e.create(Un(e.valueOf(),t,r)):Un(e,t,r)}function Un(e,t,r){var n,i,a,o;if(t<=0){if(Array.isArray(e[0])){for(o=qn(e),i=[],n=0;nt-1&&(e._values.splice(l,1),e._index.splice(l,1),h++)}e._ptr[f]=e._values.length}return e._size[0]=t,e._size[1]=r,e}function t(e,t,r,n,i){for(var a,o=n[0],u=n[1],s=[],c=0;c");1===S.length?d.dimension(0).forEach(function(e,t){T(e),w.set([e,0],N[t[0]],D)}):(i=d.dimension(0),A=d.dimension(1),i.forEach(function(r,n){T(r),A.forEach(function(e,t){T(e),w.set([r,e],N[n[0]][t[0]],D)})}))}return w;default:throw new SyntaxError("Wrong number of arguments")}},F.prototype.get=function(e){if(!b(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new _(e.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var t=e[0],e=e[1],r=(T(t,this._size[0]),T(e,this._size[1]),v(t,this._ptr[e],this._ptr[e+1],this._index));return r "+(this._values?Fe(this._values[s],e):"X");return i},F.prototype.toString=function(){return Fe(this.toArray())},F.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},F.prototype.diagonal=function(e){if(e){if(!Ee(e=Ae(e)?e.toNumber():e)||!w(e))throw new TypeError("The parameter k must be an integer number")}else e=0;var t=0Math.pow(2,t)-1)throw new SyntaxError('String "'.concat(e,'" is out of range'));o>=Math.pow(2,t-1)&&(o-=Math.pow(2,t))}return o},BigNumber:function(e){return e.toNumber()},Fraction:function(e){return e.valueOf()},Unit:e.referToSelf(function(r){return function(e){var t=e.clone();return t.value=r(e.value),t}}),null:function(e){return 0},"Unit, string | Unit":function(e,t){return e.toNumber(t)},"Array | Matrix":e.referToSelf(function(t){return function(e){return ce(e,t)}})});return e.fromJSON=function(e){return parseFloat(e.value)},e}),pi=N("string",["typed"],function(e){e=e.typed;return e("string",{"":function(){return""},number:ve,null:function(e){return"null"},boolean:function(e){return e+""},string:function(e){return e},"Array | Matrix":e.referToSelf(function(t){return function(e){return ce(e,t)}}),any:function(e){return String(e)}})}),mi=N("boolean",["typed"],function(e){e=e.typed;return e("boolean",{"":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;t=Number(e);if(""===e||isNaN(t))throw new Error('Cannot convert "'+e+'" to a boolean');return!!t},"Array | Matrix":e.referToSelf(function(t){return function(e){return ce(e,t)}})})}),hi=N("bignumber",["typed","BigNumber"],function(e){var t=e.typed,i=e.BigNumber;return t("bignumber",{"":function(){return new i(0)},number:function(e){return new i(e+"")},string:function(e){var t=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(t){var r=t[2],t=i(t[1]),n=new i(2).pow(Number(r));if(t.gt(n.sub(1)))throw new SyntaxError('String "'.concat(e,'" is out of range'));r=new i(2).pow(Number(r)-1);return t.gte(r)?t.sub(n):t}return new i(e)},BigNumber:function(e){return e},Unit:t.referToSelf(function(r){return function(e){var t=e.clone();return t.value=r(e.value),t}}),Fraction:function(e){return new i(e.n).div(e.d).times(e.s)},null:function(e){return new i(0)},"Array | Matrix":t.referToSelf(function(t){return function(e){return ce(e,t)}})})}),di=N("complex",["typed","Complex"],function(e){var t=e.typed,r=e.Complex;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":t.referToSelf(function(t){return function(e){return ce(e,t)}})})}),yi=N("fraction",["typed","Fraction"],function(e){var t=e.typed,r=e.Fraction;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},Unit:t.referToSelf(function(r){return function(e){var t=e.clone();return t.value=r(e.value),t}}),Object:function(e){return new r(e)},"Array | Matrix":t.referToSelf(function(t){return function(e){return ce(e,t)}})})}),vi=N("matrix",["typed","Matrix","DenseMatrix","SparseMatrix"],function(e){var t=e.typed,n=(e.Matrix,e.DenseMatrix),i=e.SparseMatrix;return t("matrix",{"":function(){return r([])},string:function(e){return r([],e)},"string, string":function(e,t){return r([],e,t)},Array:function(e){return r(e)},Matrix:function(e){return r(e,e.storage())},"Array | Matrix, string":r,"Array | Matrix, string, string":r});function r(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)+".")}}),gi="matrixFromFunction",xi=N(gi,["typed","matrix","isZero"],function(e){var t=e.typed,a=e.matrix,o=e.isZero;return t(gi,{"Array | Matrix, function, string, string":i,"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,n,t,r){var i;return(i=void 0!==r?a(t,r):a(t)).resize(e),i.forEach(function(e,t){var r=n(t);o(r)||i.set(t,r)}),i}});function bi(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}(e);try{for(i.s();!(t=i.n()).done;){var a=t.value,o=s(a);if(o!==r)throw new TypeError("The vectors had different length: "+(0|r)+" ≠ "+(0|o));n.push(u(a))}}catch(e){i.e(e)}finally{i.f()}return n}function s(e){e=n(e);if(1===e.length)return e[0];if(2!==e.length)throw new TypeError("Only one- or two-dimensional vectors are supported.");if(1===e[0])return e[1];if(1===e[1])return e[0];throw new TypeError("At least one of the arguments is not a vector.")}});function Di(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}(e);try{for(a.s();!(i=a.n()).done;){var o=i.value,u=l(o);if(u!==t)throw new TypeError("The vectors had different length: "+(0|t)+" ≠ "+(0|u));for(var s=f(o),c=0;c=n.length)throw new fn(t,n.length);return P(e)?e.create(Qi(e.valueOf(),t,r)):Qi(e,t,r)}})});function Qi(e,t,r){var n,i,a;if(t<=0){if(Array.isArray(e[0])){for(a=function(e){for(var t=e.length,r=e[0].length,n=[],i=0;ie)for(u-=e;u--;)s+="0";else u>1,c[p]&=1)}return c.reverse()}function Ya(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)?Ga(t):t.eq(n)?Ga(e):e.isFinite()&&t.isFinite()?Za(e,t,function(e,t){return e^t}):e.isFinite()||t.isFinite()?new r(e.isNegative()===t.isNegative()?1/0:-1/0):n}function Ja(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 Xa(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())+""):e.div(new r(2).pow(t))).floor():e.isNegative()?new r(-1):e.isFinite()?new r(0):new r(NaN)}uh(3374);Ci="number, number";function Qa(e,t){if(w(e)&&w(t))return e&t;throw new Error("Integers expected in function bitAnd")}function Ka(e){if(w(e))return~e;throw new Error("Integer expected in function bitNot")}function eo(e,t){if(w(e)&&w(t))return e|t;throw new Error("Integers expected in function bitOr")}function to(e,t){if(w(e)&&w(t))return e^t;throw new Error("Integers expected in function bitXor")}function ro(e,t){if(w(e)&&w(t))return e<>t;throw new Error("Integers expected in function rightArithShift")}function io(e,t){if(w(e)&&w(t))return e>>>t;throw new Error("Integers expected in function rightLogShift")}Qa.signature=Ci,Ka.signature="number",io.signature=no.signature=ro.signature=to.signature=eo.signature=Ci;var ao=N("bitAnd",["typed","matrix","equalScalar","concat"],function(e){var t=e.typed,r=e.matrix,n=e.equalScalar,e=e.concat,i=da({typed:t,equalScalar:n}),a=Ma({typed:t,equalScalar:n}),n=ia({typed:t,equalScalar:n});return t("bitAnd",{"number, number":Qa,"BigNumber, BigNumber":Ha},p({typed:t,matrix:r,concat:e})({SS:a,DS:i,Ss:n}))}),oo=N("bitNot",["typed"],function(e){e=e.typed;return e("bitNot",{number:Ka,BigNumber:Ga,"Array | Matrix":e.referToSelf(function(t){return function(e){return ce(e,t)}})})}),uo=N("bitOr",["typed","matrix","equalScalar","DenseMatrix","concat"],function(e){var t=e.typed,r=e.matrix,n=e.equalScalar,i=e.DenseMatrix,e=e.concat,a=wa({typed:t}),n=Na({typed:t,equalScalar:n}),i=Da({typed:t,DenseMatrix:i});return t("bitOr",{"number, number":eo,"BigNumber, BigNumber":Va},p({typed:t,matrix:r,concat:e})({SS:n,DS:a,Ss:i}))}),so=N("matAlgo07xSSf",["typed","DenseMatrix"],function(e){var b=e.typed,w=e.DenseMatrix;return function(e,t,r){var n=e._size,i=e._datatype,a=t._size,o=t._datatype;if(n.length!==a.length)throw new _(n.length,a.length);if(n[0]!==a[0]||n[1]!==a[1])throw new RangeError("Dimension mismatch. Matrix A ("+n+") must match Matrix B ("+a+")");for(var u,s=n[0],c=n[1],f=0,l=r,p=("string"==typeof i&&i===o&&(f=b.convert(0,u=i),l=b.find(r,[u,u])),[]),m=0;mo)return n.substring(0,o);if(n.lengtha)for(var s=a-1,c=o.length;sh)throw new Error("Maximum number of iterations reached, try changing options")}return{t:b,y:w}}}function o(e,t,r,n){return a({a:[[],[.5],[0,.75],[2/9,1/3,4/9]],c:[null,.5,.75,1],b:[2/9,1/3,4/9,0],bp:[7/24,.25,1/3,1/8]})(e,t,r,n)}function u(e,t,r,n){return a({a:[[],[.2],[.075,.225],[44/45,-56/15,32/9],[19372/6561,-25360/2187,64448/6561,-212/729],[9017/3168,-355/33,46732/5247,49/176,-5103/18656],[35/384,0,500/1113,125/192,-2187/6784,11/84]],c:[null,.2,.3,.8,8/9,1,1],b:[35/384,0,500/1113,125/192,-2187/6784,11/84,0],bp:[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,.025]})(e,t,r,n)}function s(e,t,r,n){var i=n.method||"RK45",a={RK23:o,RK45:u};if(i.toUpperCase()in a)return delete(n=function(t){for(var e=1;e-(i-1)/2){for(var a=e,o=t(i),i=t,u=p(1,f(b(i(0),o),y(1,l(2,y(1,a))))),s=i(0),c=i(1);m(c,o);c=v(c,1))s=v(s,p(f(Math.pow(-1,c-1),b(c,o)),l(c,a)));return f(u,s)}return i=f(l(2,e),l(t(g),y(e,1))),i=f(i,d(f(p(t(g),2),e))),i=f(i,h(y(1,e))),f(i,x(y(1,e),t,r,n))}}function b(e,t){for(var r=e,n=e;m(n,t);n=v(n,1))var i=p(f(a(v(t,y(n,1))),l(4,n)),f(a(y(t,n)),a(f(2,n)))),r=v(r,i);return f(t,r)}}),xu=N("mode",["typed","isNaN","isNumeric"],function(e){var t=e.typed,o=e.isNaN,u=e.isNumeric;return t("mode",{"Array | Matrix":r,"...":r});function r(e){if(0===(e=E(e.valueOf())).length)throw new Error("Cannot calculate mode of an empty array");for(var t={},r=[],n=0,i=0;in&&(n=t[a],r=[a])}return r}});function bu(e,t,r){var n;return-1!==String(e).indexOf("Unexpected type")?(n=2>=1,i=o(i,i);return n}function p(e,t){return r(l(e.valueOf(),t))}}),Iu="Number of decimals in function round must be an integer",Ru=N("round",["typed","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],function(e){var t=e.typed,n=e.matrix,i=e.equalScalar,a=e.zeros,r=e.BigNumber,e=e.DenseMatrix,o=ia({typed:t,equalScalar:i}),u=f({typed:t,DenseMatrix:e}),s=aa({typed:t});return t("round",{number:Vi,"number, number":Vi,"number, BigNumber":function(e,t){if(t.isInteger())return new r(e).toDecimalPlaces(t.toNumber());throw new TypeError(Iu)},Complex:function(e){return e.round()},"Complex, number":function(e,t){if(t%1)throw new TypeError(Iu);return e.round(t)},"Complex, BigNumber":function(e,t){if(!t.isInteger())throw new TypeError(Iu);t=t.toNumber();return e.round(t)},BigNumber:function(e){return e.toDecimalPlaces(0)},"BigNumber, BigNumber":function(e,t){if(t.isInteger())return e.toDecimalPlaces(t.toNumber());throw new TypeError(Iu)},Fraction:function(e){return e.round()},"Fraction, number":function(e,t){if(t%1)throw new TypeError(Iu);return e.round(t)},"Fraction, BigNumber":function(e,t){if(t.isInteger())return e.round(t.toNumber());throw new TypeError(Iu)},"Unit, number, Unit":t.referToSelf(function(n){return function(e,t,r){e=e.toNumeric(r);return r.multiply(n(e,t))}}),"Unit, BigNumber, Unit":t.referToSelf(function(n){return function(e,t,r){return n(e,t.toNumber(),r)}}),"Unit, Unit":t.referToSelf(function(r){return function(e,t){return r(e,0,t)}}),"Array | Matrix, number, Unit":t.referToSelf(function(n){return function(e,t,r){return ce(e,function(e){return n(e,t,r)},!0)}}),"Array | Matrix, BigNumber, Unit":t.referToSelf(function(n){return function(e,t,r){return n(e,t.toNumber(),r)}}),"Array | Matrix, Unit":t.referToSelf(function(r){return function(e,t){return r(e,0,t)}}),"Array | Matrix":t.referToSelf(function(t){return function(e){return ce(e,t,!0)}}),"SparseMatrix, number | BigNumber":t.referToSelf(function(r){return function(e,t){return o(e,t,r,!1)}}),"DenseMatrix, number | BigNumber":t.referToSelf(function(r){return function(e,t){return s(e,t,r,!1)}}),"Array, number | BigNumber":t.referToSelf(function(r){return function(e,t){return s(n(e),t,r,!1).valueOf()}}),"number | Complex | BigNumber | Fraction, SparseMatrix":t.referToSelf(function(r){return function(e,t){return i(e,0)?a(t.size(),t.storage()):u(t,e,r,!0)}}),"number | Complex | BigNumber | Fraction, DenseMatrix":t.referToSelf(function(r){return function(e,t){return i(e,0)?a(t.size(),t.storage()):s(t,e,r,!0)}}),"number | Complex | BigNumber | Fraction, Array":t.referToSelf(function(r){return function(e,t){return s(n(t),e,r,!0).valueOf()}})})}),zu=N("log",["config","typed","divideScalar","Complex"],function(e){var t=e.typed,r=e.config,n=e.divideScalar,i=e.Complex;return t("log",{number:function(e){return 0<=e||r.predictable?Math.log(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()},"any, any":t.referToSelf(function(r){return function(e,t){return n(r(e),r(t))}})})}),qu=N("log1p",["typed","config","divideScalar","log","Complex"],function(e){var t=e.typed,r=e.config,n=e.divideScalar,i=e.log,a=e.Complex;return t("log1p",{number:function(e){return-1<=e||r.predictable?u(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":t.referToSelf(function(t){return function(e){return ce(e,t)}}),"any, any":t.referToSelf(function(r){return function(e,t){return n(r(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))}}),ju=N("nthRoots",["config","typed","divideScalar","Complex"],function(e){var t=e.typed,c=(e.config,e.divideScalar,e.Complex),f=[function(e){return new c(e,0)},function(e){return new c(0,e)},function(e){return new c(-e,0)},function(e){return new c(0,-e)}];function r(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 c(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 i=e.arg(),n=e.abs(),a=[],o=Math.pow(n,1/t),u=0;ur.re?1:t.rer.im?1:t.imr.length?1:t.length=e.length)throw new Error("k out of bounds");for(var n=0;n=e&&(c(o.value,0)||r(o.key,o.value,this)),(o=n.extractMinimum())&&a.push(o);for(var u=0;ua[u+1].length&&(i=a[u],a[u]=a[u+1],a[u+1]=i);return a}})}),Kc=N("setSize",["typed","compareNatural"],function(e){var t=e.typed,a=e.compareNatural;return t("setSize",{"Array | Matrix":function(e){return(Array.isArray(e)?E(e):E(e.toArray())).length},"Array | Matrix, boolean":function(e,t){if(!1===t||0===e.length)return(Array.isArray(e)?E(e):E(e.toArray())).length;for(var r=E(Array.isArray(e)?e:e.toArray()).sort(a),n=1,i=1;i('+t+')':t)+this.index.toHTML(e)}},{key:"_toTex",value:function(e){var t=this.object.toTex(e);return(t=s(this.object)?"\\left(' + object + '\\right)":t)+this.index.toTex(e)}},{key:"toJSON",value:function(){return{mathjs:vf,object:this.object,index:this.index}}}],[{key:"fromJSON",value:function(e){return new a(e.object,e.index)}}]),a}();return A(e,"name",vf),e},{isClass:!0,isNode:!0}),xf="ArrayNode",bf=N(xf,["Node"],function(e){var t=function(){mf(a,e.Node);r=a,n=function(){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}}();var r,n,i=function(){var e,t=g(r);return hf(this,n?(e=g(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))};function a(e){var t;if(h(this,a),(t=i.call(this)).items=e||[],Array.isArray(t.items)&&t.items.every(L))return t;throw new TypeError("Array containing Nodes expected")}return d(a,[{key:"type",get:function(){return xf}},{key:"isArrayNode",get:function(){return!0}},{key:"_compile",value:function(t,r){var e,i=bn(this.items,function(e){return e._compile(t,r)});return"Array"!==t.config.matrix?(e=t.matrix,function(t,r,n){return e(bn(i,function(e){return e(t,r,n)}))}):function(t,r,n){return bn(i,function(e){return e(t,r,n)})}}},{key:"forEach",value:function(e){for(var t=0;t['+this.items.map(function(e){return e.toHTML(t)}).join(',')+']'}},{key:"_toTex",value:function(o){return function t(e,r){var n=e.some(J)&&!e.every(J),i=r||n,a=i?"&":"\\\\",e=e.map(function(e){return e.items?t(e.items,!r):e.toTex(o)}).join(a);return n||!i||i&&!r?"\\begin{bmatrix}"+e+"\\end{bmatrix}":e}(this.items,!1)}}],[{key:"fromJSON",value:function(e){return new a(e.items)}}]),a}();return A(t,"name",xf),t},{isClass:!0,isNode:!0});function wf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function Df(e,t){if(!t||"auto"!==t)return e;for(var r=e;ne(r);)r=r.content;return r}function v(e,t,r,n){for(var i=e,a=(i="keep"!==t?e.getContent():i).getIdentifier(),o=null,u=0;u='+(n=u(this,e&&e.parenthesis,e&&e.implicit)?'('+n+')':n)}},{key:"_toTex",value:function(e){var t=this.object.toTex(e),r=this.index?this.index.toTex(e):"",n=this.value.toTex(e);return t+r+"="+(n=u(this,e&&e.parenthesis,e&&e.implicit)?"\\left(".concat(n,"\\right)"):n)}}],[{key:"fromJSON",value:function(e){return new a(e.object,e.index,e.value)}}]),a}();return A(t,"name",Sf),t},{isClass:!0,isNode:!0}),Mf="BlockNode",Ff=N(Mf,["ResultSet","Node"],function(e){var o=e.ResultSet,t=function(){mf(a,e.Node);r=a,n=function(){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}}();var r,n,i=function(){var e,t=g(r);return hf(this,n?(e=g(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))};function a(e){var t;if(h(this,a),t=i.call(this),Array.isArray(e))return t.blocks=e.map(function(e){var t=e&&e.node,e=!e||void 0===e.visible||e.visible;if(!L(t))throw new TypeError('Property "node" must be a Node');if("boolean"!=typeof e)throw new TypeError('Property "visible" must be a boolean');return{node:t,visible:e}}),t;throw new Error("Array expected")}return d(a,[{key:"type",get:function(){return Mf}},{key:"isBlockNode",get:function(){return!0}},{key:"_compile",value:function(t,r){var e=bn(this.blocks,function(e){return{evaluate:e.node._compile(t,r),visible:e.visible}});return function(r,n,i){var a=[];return wn(e,function(e){var t=e.evaluate(r,n,i);e.visible&&a.push(t)}),new o(a)}}},{key:"forEach",value:function(e){for(var t=0;t;')}).join('
')}},{key:"_toTex",value:function(t){return this.blocks.map(function(e){return e.node.toTex(t)+(e.visible?"":";")}).join("\\;\\;\n")}}],[{key:"fromJSON",value:function(e){return new a(e.blocks)}}]),a}();return A(t,"name",Mf),t},{isClass:!0,isNode:!0}),Of="ConditionalNode",Tf=N(Of,["Node"],function(e){var t=function(){mf(a,e.Node);r=a,n=function(){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}}();var r,n,i=function(){var e,t=g(r);return hf(this,n?(e=g(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))};function a(e,t,r){var n;if(h(this,a),n=i.call(this),!L(e))throw new TypeError("Parameter condition must be a Node");if(!L(t))throw new TypeError("Parameter trueExpr must be a Node");if(L(r))return n.condition=e,n.trueExpr=t,n.falseExpr=r,n;throw new TypeError("Parameter falseExpr must be a Node")}return d(a,[{key:"type",get:function(){return Of}},{key:"isConditionalNode",get:function(){return!0}},{key:"_compile",value:function(e,t){var n=this.condition._compile(e,t),i=this.trueExpr._compile(e,t),a=this.falseExpr._compile(e,t);return function(e,t,r){return(function(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e)return e;if(e){if(Ae(e))return!e.isZero();if(Oe(e))return e.re||e.im;if(Z(e))return e.value}if(null!=e)throw new TypeError('Unsupported type of condition "'+Se(e)+'"')}(n(e,t,r))?i:a)(e,t,r)}}},{key:"forEach",value:function(e){e(this.condition,"condition",this),e(this.trueExpr,"trueExpr",this),e(this.falseExpr,"falseExpr",this)}},{key:"map",value:function(e){return new a(this._ifNode(e(this.condition,"condition",this)),this._ifNode(e(this.trueExpr,"trueExpr",this)),this._ifNode(e(this.falseExpr,"falseExpr",this)))}},{key:"clone",value:function(){return new a(this.condition,this.trueExpr,this.falseExpr)}},{key:"_toString",value:function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=v(this,t,e&&e.implicit),n=this.condition.toString(e),i=v(this.condition,t,e&&e.implicit),i=(("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=r)&&(n="("+n+")"),this.trueExpr.toString(e)),a=v(this.trueExpr,t,e&&e.implicit),a=(("all"===t||"OperatorNode"===this.trueExpr.type||null!==a&&a<=r)&&(i="("+i+")"),this.falseExpr.toString(e)),e=v(this.falseExpr,t,e&&e.implicit);return n+" ? "+i+" : "+(a="all"===t||"OperatorNode"===this.falseExpr.type||null!==e&&e<=r?"("+a+")":a)}},{key:"toJSON",value:function(){return{mathjs:Of,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}},{key:"toHTML",value:function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=v(this,t,e&&e.implicit),n=this.condition.toHTML(e),i=v(this.condition,t,e&&e.implicit),i=(("all"===t||"OperatorNode"===this.condition.type||null!==i&&i<=r)&&(n='('+n+')'),this.trueExpr.toHTML(e)),a=v(this.trueExpr,t,e&&e.implicit),a=(("all"===t||"OperatorNode"===this.trueExpr.type||null!==a&&a<=r)&&(i='('+i+')'),this.falseExpr.toHTML(e)),e=v(this.falseExpr,t,e&&e.implicit);return n+'?'+i+':'+(a="all"===t||"OperatorNode"===this.falseExpr.type||null!==e&&e<=r?'('+a+')':a)}},{key:"_toTex",value: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}"}}],[{key:"fromJSON",value:function(e){return new a(e.condition,e.trueExpr,e.falseExpr)}}]),a}();return A(t,"name",Of),t},{isClass:!0,isNode:!0}),Bf=uh(7928),_f={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{?}"},m={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"},kf={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(m.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(m.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(m.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(m.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(m.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(m.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(m.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(m.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(m.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(m.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(m.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(m.bitAnd,"${args[1]}\\right)")},bitNot:{1:m.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(m.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(m.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(m.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(m.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(m.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(m.and,"${args[1]}\\right)")},not:{1:m.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(m.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(m.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(m.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}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(m.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(m.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(m.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(m.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(m.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(m.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(m.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(m.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(m.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(m.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(_f.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)"}},If={deg:"^\\circ"};function Rf(e){return Bf(e,{preserveFormatting:!0})}function zf(e,t){return(t=void 0!==t&&t)?se(If,e)?If[e]:"\\mathrm{"+Rf(e)+"}":se(_f,e)?_f[e]:Rf(e)}var qf="ConstantNode",jf=N(qf,["Node"],function(e){var t=function(){mf(a,e.Node);r=a,n=function(){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}}();var r,n,i=function(){var e,t=g(r);return hf(this,n?(e=g(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))};function a(e){var t;return h(this,a),(t=i.call(this)).value=e,t}return d(a,[{key:"type",get:function(){return qf}},{key:"isConstantNode",get:function(){return!0}},{key:"_compile",value:function(e,t){var r=this.value;return function(){return r}}},{key:"forEach",value:function(e){}},{key:"map",value:function(e){return this.clone()}},{key:"clone",value:function(){return new a(this.value)}},{key:"_toString",value:function(e){return Fe(this.value,e)}},{key:"toHTML",value:function(e){var t=this._toString(e);switch(Se(this.value)){case"number":case"BigNumber":case"Fraction":return''+t+"";case"string":return''+t+"";case"boolean":return''+t+"";case"null":return''+t+"";case"undefined":return''+t+"";default:return''+t+""}}},{key:"toJSON",value:function(){return{mathjs:qf,value:this.value}}},{key:"_toTex",value:function(e){var t=this._toString(e);switch(Se(this.value)){case"string":return"\\mathtt{"+Rf(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}}}],[{key:"fromJSON",value:function(e){return new a(e.value)}}]),a}();return A(t,"name",qf),t},{isClass:!0,isNode:!0});function Pf(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}(t);try{for(o.s();!(i=o.n()).done;){var u=i.value,s="string"==typeof u?u:u.name;if(a.has(s))throw new Error('Duplicate parameter name "'.concat(s,'"'));a.add(s)}}catch(e){o.e(e)}finally{o.f()}return n.name=e,n.params=t.map(function(e){return e&&e.name||e}),n.types=t.map(function(e){return e&&e.type||"any"}),n.expr=r,n}return d(f,[{key:"type",get:function(){return Lf}},{key:"isFunctionAssignmentNode",get:function(){return!0}},{key:"_compile",value:function(e,t){var r=Object.create(t),a=(wn(this.params,function(e){r[e]=!0}),this.expr._compile(e,r)),o=this.name,u=this.params,s=En(this.types,","),c=o+"("+En(this.params,", ")+")";return function(r,n,i){var e={},e=(e[s]=function(){for(var e=Object.create(n),t=0;t'+sn(this.params[n])+"");var i=this.expr.toHTML(e);return a(this,t,e&&e.implicit)&&(i='('+i+')'),''+sn(this.name)+'('+r.join(',')+')='+i}},{key:"_toTex",value:function(e){var t=e&&e.parenthesis?e.parenthesis:"keep",r=this.expr.toTex(e);return a(this,t,e&&e.implicit)&&(r="\\left(".concat(r,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(zf).join(",")+"\\right)="+r}}],[{key:"fromJSON",value:function(e){return new f(e.name,e.params,e.expr)}}]),f}();return A(t,"name",Lf),t},{isClass:!0,isNode:!0}),$f="IndexNode",Hf=N($f,["Node","size"],function(e){var t=e.Node,o=e.size,e=function(){mf(a,t);r=a,n=function(){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}}();var r,n,i=function(){var e,t=g(r);return hf(this,n?(e=g(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))};function a(e,t){var r;if(h(this,a),(r=i.call(this)).dimensions=e,r.dotNotation=t||!1,!Array.isArray(e)||!e.every(L))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(r.dotNotation&&!r.isObjectProperty())throw new Error("dotNotation only applicable for object properties");return r}return d(a,[{key:"type",get:function(){return $f}},{key:"isIndexNode",get:function(){return!0}},{key:"_compile",value:function(r,n){var i=bn(this.dimensions,function(e,i){var t,a;return 0.'+sn(this.getObjectProperty())+"":'['+t.join(',')+']'}},{key:"_toTex",value:function(t){var e=this.dimensions.map(function(e){return e.toTex(t)});return this.dotNotation?"."+this.getObjectProperty():"_{"+e.join(",")+"}"}}],[{key:"fromJSON",value:function(e){return new a(e.dimensions,e.dotNotation)}}]),a}();return A(e,"name",$f),e},{isClass:!0,isNode:!0}),Gf="ObjectNode",Vf=N(Gf,["Node"],function(e){var t=function(){mf(a,e.Node);r=a,n=function(){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}}();var r,n,i=function(){var e,t=g(r);return hf(this,n?(e=g(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))};function a(t){var e;if(h(this,a),(e=i.call(this)).properties=t||{},!t||"object"===V(t)&&Object.keys(t).every(function(e){return L(t[e])}))return e;throw new TypeError("Object containing Nodes expected")}return d(a,[{key:"type",get:function(){return Gf}},{key:"isObjectNode",get:function(){return!0}},{key:"_compile",value:function(e,t){var r,n,i,a={};for(r in this.properties)se(this.properties,r)&&(n=on(r),n=JSON.parse(n),i=Ze(this.properties,r),a[n]=i._compile(e,t));return function(e,t,r){var n,i={};for(n in a)se(a,n)&&(i[n]=a[n](e,t,r));return i}}},{key:"forEach",value:function(e){for(var t in this.properties)se(this.properties,t)&&e(this.properties[t],"properties["+on(t)+"]",this)}},{key:"map",value:function(e){var t,r={};for(t in this.properties)se(this.properties,t)&&(r[t]=this._ifNode(e(this.properties[t],"properties["+on(t)+"]",this)));return new a(r)}},{key:"clone",value:function(){var e,t={};for(e in this.properties)se(this.properties,e)&&(t[e]=this.properties[e]);return new a(t)}},{key:"_toString",value:function(e){var t,r=[];for(t in this.properties)se(this.properties,t)&&r.push(on(t)+": "+this.properties[t].toString(e));return"{"+r.join(", ")+"}"}},{key:"toJSON",value:function(){return{mathjs:Gf,properties:this.properties}}},{key:"toHTML",value:function(e){var t,r=[];for(t in this.properties)se(this.properties,t)&&r.push(''+sn(t)+':'+this.properties[t].toHTML(e));return'{'+r.join(',')+'}'}},{key:"_toTex",value:function(e){var t,r=[];for(t in this.properties)se(this.properties,t)&&r.push("\\mathbf{"+t+":} & "+this.properties[t].toTex(e)+"\\\\");return"\\left\\{\\begin{array}{ll}"+r.join("\n")+"\\end{array}\\right\\}"}}],[{key:"fromJSON",value:function(e){return new a(e.properties)}}]),a}();return A(t,"name",Gf),t},{isClass:!0,isNode:!0}),Zf="OperatorNode",Wf=N(Zf,["Node"],function(e){function l(n,i,a,e,t){var r,o=v(n,i,a),u=Ef(n,i);if("all"===i||2('+e+')'),"right"===t?''+sn(this.op)+""+e:e+''+sn(this.op)+"";if(2===i.length)return t=i[0].toHTML(r),e=i[1].toHTML(r),a[0]&&(t='('+t+')'),a[1]&&(e='('+e+')'),this.implicit&&"OperatorNode:multiply"===this.getIdentifier()&&"hide"===n?t+''+e:t+''+sn(this.op)+""+e;t=i.map(function(e,t){return e=e.toHTML(r),e=a[t]?'('+e+')':e});return 2'):t.join(''+sn(this.op)+""):''+sn(this.fn)+'('+t.join(',')+')'}},{key:"_toTex",value:function(r){var e,t=r&&r.parenthesis?r.parenthesis:"keep",n=r&&r.implicit?r.implicit:"hide",i=this.args,a=l(this,t,n,i,!0),o=void 0===(o=m[this.fn])?this.op:o;if(1===i.length)return e=Ef(this,t),u=i[0].toTex(r),a[0]&&(u="\\left(".concat(u,"\\right)")),"right"===e?o+u:u+o;if(2!==i.length)return 2('+this.content.toHTML(e)+')':this.content.toHTML(e)}},{key:"_toTex",value:function(e){return!e||!e.parenthesis||e&&"keep"===e.parenthesis?"\\left(".concat(this.content.toTex(e),"\\right)"):this.content.toTex(e)}}],[{key:"fromJSON",value:function(e){return new a(e.content)}}]),a}();return A(t,"name",Yf),t},{isClass:!0,isNode:!0}),Xf="RangeNode",Qf=N(Xf,["Node"],function(e){function o(e,t,r){var n=v(e,t,r),i={},a=v(e.start,t,r),a=(i.start=null!==a&&a<=n||"all"===t,e.step&&(a=v(e.step,t,r),i.step=null!==a&&a<=n||"all"===t),v(e.end,t,r));return i.end=null!==a&&a<=n||"all"===t,i}var t=function(){mf(a,e.Node);r=a,n=function(){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}}();var r,n,i=function(){var e,t=g(r);return hf(this,n?(e=g(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))};function a(e,t,r){var n;if(h(this,a),n=i.call(this),!L(e))throw new TypeError("Node expected");if(!L(t))throw new TypeError("Node expected");if(r&&!L(r))throw new TypeError("Node expected");if(3('+r+')':r,n=(this.step&&(n=this.step.toHTML(e),r+=':'+(n=t.step?'('+n+')':n)),this.end.toHTML(e));return r+':'+(n=t.end?'('+n+')':n)}},{key:"_toTex",value:function(e){var t=o(this,e&&e.parenthesis?e.parenthesis:"keep",e&&e.implicit),r=this.start.toTex(e),n=(t.start&&(r="\\left(".concat(r,"\\right)")),this.step&&(n=this.step.toTex(e),r+=":"+(n=t.step?"\\left(".concat(n,"\\right)"):n)),this.end.toTex(e));return r+":"+(n=t.end?"\\left(".concat(n,"\\right)"):n)}}],[{key:"fromJSON",value:function(e){return new a(e.start,e.end,e.step)}}]),a}();return A(t,"name",Xf),t},{isClass:!0,isNode:!0}),Kf="RelationalNode",el=N(Kf,["Node"],function(e){var t=e.Node,o={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="},e=function(){mf(a,t);r=a,n=function(){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}}();var r,n,i=function(){var e,t=g(r);return hf(this,n?(e=g(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))};function a(e,t){var r;if(h(this,a),r=i.call(this),!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");return r.conditionals=e,r.params=t,r}return d(a,[{key:"type",get:function(){return Kf}},{key:"isRelationalNode",get:function(){return!0}},{key:"_compile",value:function(o,t){var u=this,s=this.params.map(function(e){return e._compile(o,t)});return function(e,t,r){for(var n,i=s[0](e,t,r),a=0;a('+e.toHTML(n)+')':e.toHTML(n)}),t=e[0],r=0;r'+sn(o[this.conditionals[r]])+""+e[r+1];return t}},{key:"_toTex",value:function(n){for(var i=n&&n.parenthesis?n.parenthesis:"keep",a=v(this,i,n&&n.implicit),e=this.params.map(function(e,t){var r=v(e,i,n&&n.implicit);return"all"===i||null!==r&&r<=a?"\\left("+e.toTex(n)+"\right)":e.toTex(n)}),t=e[0],r=0;r'+t+"":"i"===t?''+t+"":"Infinity"===t?''+t+"":"NaN"===t?''+t+"":"null"===t?''+t+"":"undefined"===t?''+t+"":''+t+""}},{key:"toJSON",value:function(){return{mathjs:"SymbolNode",name:this.name}}},{key:"_toTex",value:function(e){var t=!1,t=(void 0===r[this.name]&&u(this.name)&&(t=!0),zf(this.name,t));return"\\"===t[0]?t:" "+t}}],[{key:"onUndefinedSymbol",value:function(e){throw new Error("Undefined symbol "+e)}},{key:"fromJSON",value:function(e){return new s(e.name)}}]),s},{isClass:!0,isNode:!0});function rl(){return(rl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=g(e)););return e}(e,t);if(n)return(n=Object.getOwnPropertyDescriptor(n,t)).get?n.get.call(arguments.length<3?e:r):n.value}).apply(this,arguments)}function nl(e){for(var t=arguments.length,r=new Array(1'+sn(this.fn)+'('+e.join(',')+')'}},{key:"toTex",value:function(e){var t;return void 0!==(t=e&&"object"===V(e.handler)&&se(e.handler,this.name)?e.handler[this.name](this,e):t)?t:rl(g(y.prototype),"toTex",this).call(this,e)}},{key:"_toTex",value:function(t){var e,r,n=this.args.map(function(e){return e.toTex(t)});switch(kf[this.name]&&(e=kf[this.name]),!a[this.name]||"function"!=typeof a[this.name].toTex&&"object"!==V(a[this.name].toTex)&&"string"!=typeof a[this.name].toTex||(e=a[this.name].toTex),V(e)){case"function":r=e(this,t);break;case"string":r=u(e,this,t);break;case"object":switch(V(e[n.length])){case"function":r=e[n.length](this,t);break;case"string":r=u(e[n.length],this,t)}}return void 0!==r?r:u("\\mathrm{${name}}\\left(${args}\\right)",this,t)}},{key:"getIdentifier",value:function(){return this.type+":"+this.name}}]),y}(),r=e;return A(e,"name",il),A(e,"onUndefinedFunction",function(e){throw new Error("Undefined function "+e)}),A(e,"fromJSON",function(e){return new r(e.fn,e.args)}),e},{isClass:!0,isNode:!0}),ol=N("parse",["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],function(e){var t=e.typed,y=e.numeric,R=e.config,i=e.AccessorNode,v=e.ArrayNode,o=e.AssignmentNode,z=e.BlockNode,q=e.ConditionalNode,g=e.ConstantNode,j=e.FunctionAssignmentNode,P=e.FunctionNode,a=e.IndexNode,L=e.ObjectNode,u=e.OperatorNode,U=e.ParenthesisNode,n=e.RangeNode,$=e.RelationalNode,x=e.SymbolNode,s=t("parse",{string:function(e){return S(e,{})},"Array | Matrix":function(e){return r(e,{})},"string, Object":function(e,t){return S(e,void 0!==t.nodes?t.nodes:{})},"Array | Matrix, Object":r});function r(e){var t=1":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},w={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},N={true:!0,false:!1,null:null,undefined:void 0},H=["NaN","Infinity"],G={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function f(e,t){return e.expression.substr(e.index,t)}function l(e){return f(e,1)}function p(e){e.index++}function m(e){return e.expression.charAt(e.index-1)}function h(e){return e.expression.charAt(e.index+1)}function D(e){for(e.tokenType=b.NULL,e.token="",e.comment="";;){if("#"===l(e))for(;"\n"!==l(e)&&""!==l(e);)e.comment+=l(e),p(e);if(!s.isWhitespace(l(e),e.nestingLevel))break;p(e)}if(""!==l(e)){if("\n"===l(e)&&!e.nestingLevel)return e.tokenType=b.DELIMITER,e.token=l(e),p(e);var t=l(e),r=f(e,2),n=f(e,3);if(3===n.length&&c[n])return e.tokenType=b.DELIMITER,e.token=n,p(e),p(e),p(e);if(2===r.length&&c[r])return e.tokenType=b.DELIMITER,e.token=r,p(e),p(e);if(c[t])return e.tokenType=b.DELIMITER,e.token=t,p(e);if(s.isDigitDot(t)){e.tokenType=b.NUMBER;n=f(e,2);if("0b"===n||"0o"===n||"0x"===n){for(e.token+=l(e),p(e),e.token+=l(e),p(e);s.isHexDigit(l(e));)e.token+=l(e),p(e);if("."===l(e))for(e.token+=".",p(e);s.isHexDigit(l(e));)e.token+=l(e),p(e);else if("i"===l(e))for(e.token+="i",p(e);s.isDigit(l(e));)e.token+=l(e),p(e)}else{if("."===l(e)){if(e.token+=l(e),p(e),!s.isDigit(l(e)))return e.tokenType=b.DELIMITER}else{for(;s.isDigit(l(e));)e.token+=l(e),p(e);s.isDecimalMark(l(e),h(e))&&(e.token+=l(e),p(e))}for(;s.isDigit(l(e));)e.token+=l(e),p(e);if("E"===l(e)||"e"===l(e))if(s.isDigit(h(e))||"-"===h(e)||"+"===h(e)){if(e.token+=l(e),p(e),"+"!==l(e)&&"-"!==l(e)||(e.token+=l(e),p(e)),!s.isDigit(l(e)))throw I(e,'Digit expected, got "'+l(e)+'"');for(;s.isDigit(l(e));)e.token+=l(e),p(e);if(s.isDecimalMark(l(e),h(e)))throw I(e,'Digit expected, got "'+l(e)+'"')}else if("."===h(e))throw p(e),I(e,'Digit expected, got "'+l(e)+'"')}}else{if(!s.isAlpha(l(e),m(e),h(e))){for(e.tokenType=b.UNKNOWN;""!==l(e);)e.token+=l(e),p(e);throw I(e,'Syntax error in part "'+e.token+'"')}for(;s.isAlpha(l(e),m(e),h(e))||s.isDigit(l(e));)e.token+=l(e),p(e);se(w,e.token)?e.tokenType=b.DELIMITER:e.tokenType=b.SYMBOL}}else e.tokenType=b.DELIMITER}function d(e){for(;D(e),"\n"===e.token;);}function E(e){e.nestingLevel++}function A(e){e.nestingLevel--}function S(e,t){var r={extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:b.NULL,nestingLevel:0,conditionalLevel:null},e=(en(r,{expression:e,extraNodes:t}),D(r),function(e){var t,r=[];for(""!==e.token&&"\n"!==e.token&&";"!==e.token&&(t=C(e),e.comment&&(t.comment=e.comment));"\n"===e.token||";"===e.token;)0===r.length&&t&&r.push({node:t,visible:";"!==e.token}),D(e),"\n"!==e.token&&";"!==e.token&&""!==e.token&&(t=C(e),e.comment&&(t.comment=e.comment),r.push({node:t,visible:";"!==e.token}));return 0":"larger","<=":"smallerEq",">=":"largerEq"};se(n,e.token);){var i={name:e.token,fn:n[e.token]};r.push(i),d(e),t.push(Z(e))}return 1===t.length?t[0]:2===t.length?new u(r[0].name,r[0].fn,t):new $(r.map(function(e){return e.fn}),t)}function Z(e){for(var t,r,n,i=W(e),a={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};se(a,e.token);)r=a[t=e.token],d(e),n=[i,W(e)],i=new u(t,r,n);return i}function W(e){for(var t,r,n,i=Y(e),a={to:"to",in:"to"};se(a,e.token);)r=a[t=e.token],d(e),i="in"===t&&""===e.token?new u("*","multiply",[i,new x("in")],!0):(n=[i,Y(e)],new u(t,r,n));return i}function Y(e){var t=[],r=":"===e.token?new g(1):J(e);if(":"===e.token&&e.conditionalLevel!==e.nestingLevel){for(t.push(r);":"===e.token&&t.length<3;)d(e),")"===e.token||"]"===e.token||","===e.token||""===e.token?t.push(new x("end")):t.push(J(e));r=3===t.length?new n(t[0],t[2],t[1]):new n(t[0],t[1])}return r}function J(e){var t,r;a=X(e);for(var n={"+":"add","-":"subtract"};se(n,e.token);){r=n[t=e.token],d(e);var i=X(e),i=i.isPercentage?[a,new u("*","multiply",[a,i])]:[a,i],a=new u(t,r,i)}return a}function X(e){t=Q(e);for(var t,r,n,i,a={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide"};se(a,e.token);)n=a[r=e.token],d(e),i=Q(e),t=new u(r,n,[t,i]);return t}function Q(e){for(var t,r=t=K(e);e.tokenType===b.SYMBOL||"in"===e.token&&ae(t)||!(e.tokenType!==b.NUMBER||ae(r)||oe(r)&&"!"!==r.op)||"("===e.token;)r=K(e),t=new u("*","multiply",[t,r],!0);return t}function K(e){for(var t=ee(e),r=t,n=[];"/"===e.token&&le(r);){if(n.push(en({},e)),d(e),e.tokenType!==b.NUMBER){en(e,n.pop());break}if(n.push(en({},e)),d(e),e.tokenType!==b.SYMBOL&&"("!==e.token){n.pop(),en(e,n.pop());break}en(e,n.pop()),n.pop(),r=ee(e),t=new u("/","divide",[t,r])}return t}function ee(e){for(var t,r,n,i=_(e),a={"%":"mod",mod:"mod"};se(a,e.token);)r=a[t=e.token],d(e),i="%"===t&&e.tokenType===b.DELIMITER&&"("!==e.token?new u("/","divide",[i,new g(100)],!1,!0):(n=[i,_(e)],new u(t,r,n));return i}function _(e){var t,r,n={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return se(n,e.token)?(n=n[e.token],t=e.token,d(e),r=[_(e)],new u(t,n,r)):(n=function(e){for(var t,r,n=function(e){var t,r,n,i=[];if(e.tokenType===b.SYMBOL&&se(e.extraNodes,e.token)){var a=e.extraNodes[e.token];if(D(e),"("===e.token){if(i=[],E(e),D(e),")"!==e.token)for(i.push(C(e));","===e.token;)D(e),i.push(C(e));if(")"!==e.token)throw I(e,"Parenthesis ) expected");A(e),D(e)}return new a(i)}a=e;if(a.tokenType===b.SYMBOL||a.tokenType===b.DELIMITER&&a.token in w)return o=a.token,D(a),k(a,se(N,o)?new g(N[o]):-1!==H.indexOf(o)?new g(y(o,"number")):new x(o));var o=a;if('"'===o.token||"'"===o.token)return a=te(o,o.token),k(o,new g(a));var u=o;if("["!==u.token){var s=u;if("{"!==s.token){var c,f=s;if(f.tokenType===b.NUMBER)return l=f.token,D(f),new g(y(l,R.number));var l=f;if("("!==l.token)throw""===(c=l).token?I(c,"Unexpected end of expression"):I(c,"Value expected");if(E(l),D(l),c=C(l),")"!==l.token)throw I(l,"Parenthesis ) expected");return A(l),D(l),k(l,new U(c))}E(s);var p,m={};do{if(D(s),"}"!==s.token){if('"'===s.token||"'"===s.token)p=te(s,s.token);else{if(!(s.tokenType===b.SYMBOL||s.tokenType===b.DELIMITER&&s.token in w))throw I(s,"Symbol or string expected as object key");p=s.token,D(s)}if(":"!==s.token)throw I(s,"Colon : expected after object key");D(s),m[p]=C(s)}}while(","===s.token);if("}"!==s.token)throw I(s,"Comma , or bracket } expected after object value");return A(s),D(s),k(s,new L(m))}if(E(u),D(u),"]"!==u.token){f=re(u);if(";"===u.token){for(n=1,r=[f];";"===u.token;)D(u),r[n]=re(u),n++;if("]"!==u.token)throw I(u,"End of matrix ] expected");A(u),D(u);for(var h=r[0].items.length,d=1;di))for(var l=u[c+1];f=C?x[A+f]-=p:0!==x[A+f]&&(x[A+f]=x[E+f]+K);for(m=B;m<_;m++){for(G=(k=g[s=v[m]])+x[D+s]-1,y=d=0,T=h=k;T<=G;T++)0!==x[A+(f=v[T])]&&(0<(J=x[A+f]-C)?(y+=J,d+=v[h++]=f):(g[f]=-c-2,x[A+f]=0));x[D+s]=h-k+1;var ee=h,te=k+x[0+s];for(T=1+G;T1 and B<3]"],seealso:["bignumber","boolean","complex","matrix,","number","range","string","unit"]},matrix:{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"]},number:{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"]},sparse:{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"]},splitUnit:{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"]},string:{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"]},unit:{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"]},e:Gn,E:Gn,false:{name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},i:{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:[]},Infinity:{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:[]},LN2:{name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},LN10:{name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},LOG2E:{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:[]},LOG10E:{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:[]},NaN:{name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},null:{name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},pi:Ci,PI:Ci,phi:{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:[]},SQRT1_2:{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:[]},SQRT2:{name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},tau:{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"]},true:{name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},version:{name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},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:{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"]},lsolve:{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"]},lsolveAll:{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"]},lup:{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"]},lusolve:{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"]},leafCount:{name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]},polynomialRoot:{name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]},resolve:{name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]},simplify:{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:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]},simplifyConstant:{name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]},simplifyCore:{name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]},symbolicEqual:{name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]},rationalize:{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"]},slu:{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"]},usolve:{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"]},usolveAll:{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"]},qr:{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"]},abs:{name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},add:{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"]},cbrt:{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"]},ceil:{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"]},cube:{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"]},divide:{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"]},dotDivide:{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"]},dotMultiply:{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"]},dotPow:{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"]},exp:{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"]},expm:{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"]},expm1:{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"]},fix:{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"]},floor:{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"]},gcd:{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"]},hypot:{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"]},lcm:{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"]},log:{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"]},log2:{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"]},log1p:{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"]},log10:{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"]},mod:{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"]},multiply:{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"]},norm:{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")']},nthRoot:{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"]},nthRoots:{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"]},pow:{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)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},round:{name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],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)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]},sign:{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"]},sqrt:{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"]},sqrtm:{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([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]},square:{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"]},subtract:{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"]},unaryMinus:{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"]},unaryPlus:{name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},xgcd:{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"]},invmod:{name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)",examples:["invmod(8, 12)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]},bitAnd:{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"]},bitNot:{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"]},bitOr:{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"]},bitXor:{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"]},leftShift:{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"]},rightArithShift:{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"]},rightLogShift:{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"]},bellNumbers:{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"]},catalan:{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"]},composition:{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"]},stirlingS2:{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"]},config:{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:[]},import:{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:[]},typed:{name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]},arg:{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"]},conj:{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"]},re:{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"]},im:{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"]},evaluate:{name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:[]},help:{name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},distance:{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:[]},intersect:{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:[]},and:{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"]},not:{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"]},or:{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"]},xor:{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"]},concat:{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"]},count:{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"]},cross:{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"]},column:{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"]},ctranspose:{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"]},det:{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"]},diag:{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"]},diff:{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:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]},dot:{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"]},getMatrixDataType:{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"]},identity:{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"]},filter:{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"]},flatten:{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"]},forEach:{name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]},inv:{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"]},pinv:{name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore–Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]},eigs:{name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false }"],seealso:["inv"]},kron:{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"]},matrixFromFunction:{name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","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"]},matrixFromRows:{name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","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"]},matrixFromColumns:{name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","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"]},map:{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"]},ones:{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"]},partitionSelect:{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, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]},range:{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")',"range(1m, 1m, 3m)","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"]},resize:{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"]},reshape:{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])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]},rotate:{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], 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"]},rotationMatrix:{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"]},row:{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"]},size:{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"]},sort:{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"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},squeeze:{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"]},subset:{name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",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]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},trace:{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"]},transpose:{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"]},zeros:{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"]},fft:{name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},ifft:{name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},sylvester:{name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]},schur:{name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]},lyap:{name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]},solveODE:{name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]},combinations:{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"]},combinationsWithRep:{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"]},factorial:{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"]},gamma:{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"]},kldivergence:{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:[]},lgamma:{name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]},multinomial:{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"]},permutations:{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"]},pickRandom:{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"]},random:{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"]},randomInt:{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"]},compare:{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"]},compareNatural:{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"]},compareText:{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"]},deepEqual:{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"]},equal:{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"]},equalText:{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"]},larger:{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"]},largerEq:{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"]},smaller:{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"]},smallerEq:{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"]},unequal:{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"]},setCartesian:{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"]},setDifference:{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"]},setDistinct:{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"]},setIntersect:{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"]},setIsSubset:{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"]},setMultiplicity:{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"]},setPowerset:{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"]},setSize:{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"]},setSymDifference:{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"]},setUnion:{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"]},zpk2tf:{name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]},freqz:{name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]},erf:{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:[]},zeta:{name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemanns Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]},cumsum:{name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]},mad:{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"]},max:{name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],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"]},mean:{name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],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"]},median:{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"]},min:{name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],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"]},mode:{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"]},prod:{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"]},quantileSeq:{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"]},std:{name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, 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"]},sum:{name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],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"]},variance:{name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, 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"]},corr:{name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]},acos:{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"]},acosh:{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"]},acot:{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"]},acoth:{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"]},acsc:{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"]},acsch:{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"]},asec:{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"]},asech:{name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},asin:{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"]},asinh:{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"]},atan:{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"]},atanh:{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"]},atan2:{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"]},cos:{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"]},cosh:{name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},cot:{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"]},coth:{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"]},csc:{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"]},csch:{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"]},sec:{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"]},sech:{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"]},sin:{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"]},sinh:{name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},tan:{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"]},tanh:{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"]},to:{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:[]},clone:{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:[]},format:{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"]},bin:{name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},oct:{name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},hex:{name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},isNaN:{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"]},isInteger:{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"]},isNegative:{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"]},isNumeric:{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"]},hasNumericValue:{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"]},isPositive:{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"]},isPrime:{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"]},isZero:{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"]},print:{name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]},typeOf:{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"]},numeric:{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"]}},Fl=N("help",["typed","mathWithTransform","Help"],function(e){var t=e.typed,i=e.mathWithTransform,a=e.Help;return t("help",{any:function(e){var t,r=e;if("string"!=typeof e)for(t in i)if(se(i,t)&&e===i[t]){r=t;break}var n=Ze(Ml,r);if(n)return new a(n);throw n="function"==typeof r?r.name:r,new Error('No documentation found on "'+n+'"')}})}),Ol=N("chain",["typed","Chain"],function(e){var t=e.typed,r=e.Chain;return t("chain",{"":function(){return new r},any:function(e){return new r(e)}})}),Tl=N("det",["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],function(e){var t=e.typed,y=e.matrix,v=e.subtractScalar,g=e.multiply,x=e.divideScalar,b=e.isZero,w=e.unaryMinus;return t("det",{any:Ce,"Array | Matrix":function(e){var t;switch((t=P(e)?e.size():Array.isArray(e)?(e=y(e)).size():[]).length){case 0:return Ce(e);case 1:if(1===t[0])return Ce(e.valueOf()[0]);if(0===t[0])return 1;throw new RangeError("Matrix must be square (size: "+Fe(t)+")");case 2:var r=t[0],n=t[1];if(r===n){var i=e.clone().valueOf();var a=r;if(1===a)return Ce(i[0][0]);if(2===a)return v(g(i[0][0],i[1][1]),g(i[1][0],i[0][1]));for(var o=!1,u=new Array(a).fill(0).map(function(e,t){return t}),s=0;sf&&(f=D(u[p][c]),l=p),p++;if(0===f)throw Error("Cannot calculate inverse, determinant is zero");(p=l)!==c&&(a=u[c],u[c]=u[p],u[p]=a,a=s[c],s[c]=s[p],s[p]=a);var m=u[c],h=s[c];for(p=0;p=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}function Il(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=Math.abs(s);){var d=h[0][0],y=h[0][1];a=function(e,t,r,n){for(var i=e.length,a=Math.cos(t),o=Math.sin(t),t=a*a,u=o*o,s=Array(i).fill(0),c=Array(i).fill(0),f=t*e[r][r]-2*a*o*e[r][n]+u*e[n][n],u=u*e[r][r]+2*a*o*e[r][n]+t*e[n][n],l=0;l=H(N);){var F=M[0][0],O=M[0][1];x=function(e,t,r,n){for(var i=e.length,a=W(G(t)),o=W(V(t)),t=Z(a,a),u=Z(o,o),s=Array(i).fill(W(0)),c=Array(i).fill(W(0)),f=Y(W(2),a,o,e[r][n]),l=U($(Z(t,e[r][r]),f),Z(u,e[n][n])),u=te(Z(u,e[r][r]),f,Z(t,e[n][n])),p=0;p=r.length)throw new fn(t,r.length);try{return function e(t,r){var n,i,a;if(r<=0){var o=t[0][0];if(Array.isArray(o)){for(a=qn(t),i=[],n=0;n>1;return np(e,r)*np(1+r,t)}function ip(e,t){if(!w(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!w(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(eo)return n[a][o];for(var u=0;u<=a;++u)if(n[u]||(n[u]=[i(0===u?1:0)]),0!==u)for(var s=n[u],c=n[u-1],f=s.length;f<=u&&f<=o;++f)s[f]=f===u?1:l(p(i(f),c[f]),c[f-1]);return n[a][o]}})}),zp="bellNumbers",qp=N(zp,["typed","addScalar","isNegative","isInteger","stirlingS2"],function(e){var t=e.typed,n=e.addScalar,i=e.isNegative,a=e.isInteger,o=e.stirlingS2;return t(zp,{"number | BigNumber":function(e){if(!a(e)||i(e))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var t=0,r=0;r<=e;r++)t=n(t,o(e,r));return t}})}),jp=N("catalan",["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],function(e){var t=e.typed,r=e.addScalar,n=e.divideScalar,i=e.multiplyScalar,a=e.combinations,o=e.isNegative,u=e.isInteger;return t("catalan",{"number | BigNumber":function(e){if(!u(e)||o(e))throw new TypeError("Non-negative integer value expected in function catalan");return n(a(i(e,2),e),r(e,1))}})}),Pp="composition",Lp=N(Pp,["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],function(e){var t=e.typed,r=e.addScalar,n=e.combinations,i=e.isPositive,a=(e.isNegative,e.isInteger),o=e.larger;return t(Pp,{"number | BigNumber, number | BigNumber":function(e,t){if(!(a(e)&&i(e)&&a(t)&&i(t)))throw new TypeError("Positive integer value expected in function composition");if(o(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))}})}),Up=N("leafCount",["parse","typed"],function(e){return e.parse,(0,e.typed)("leafCount",{Node:function t(e){var r=0;return e.forEach(function(e){r+=t(e)}),r||1}})});function $p(e){return ae(e)||oe(e)&&e.isUnary()&&ae(e.args[0])}function Hp(e){return!!ae(e)||!(!pe(e)&&!oe(e)||!e.args.every(Hp))||!(!ne(e)||!Hp(e.content))}function Gp(t,e){var r,n=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)),n}function Vp(t){for(var e=1;e n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},r,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},r,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];var I=0;function R(){return new D("_p"+I++)}function o(e,t){var r=2");if(2!==n.length)throw SyntaxError("Could not parse rule: "+e.s);r.l=n[0],r.r=n[1]}else r.l=e.l,r.r=e.r;r.l=_(p(r.l)),r.r=_(p(r.r));for(var i,a,o,u=0,s=["imposeContext","repeat","assuming"];u ").concat(t[c].r.toString()))),i&&(f=a.toString({parenthesis:"all"}))!==s&&(console.log("Applying",l,"produced",f),s=f),O(a,n.context)}u=a.toString({parenthesis:"all"})}return a}function z(e,t,r){var n=e;if(e)for(var i=0;i2 commutative non-associative rule arguments not yet implemented");n=j(e.args[0],t.args[1],r);if(0===n.length)return[];var p=j(e.args[1],t.args[0],r);if(0===p.length)return[];c=[n,p]}i=function(e){if(0===e.length)return e;for(var t=e.reduce(P),r=[],n={},i=0;ie.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}(m);try{for(v.s();!(h=v.n()).done;){var g=h.value;if(J(g))y.push(g.items[d-1]);else{if(!P(f))break;y.push(g[d-1])}}}catch(f){v.e(f)}finally{v.f()}if(y.length!==m.length)break;f=J(f)?new A(y):D(y),p.splice(1,1)}return p.length===r.dimensions.length?new E(R(f),r):0=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:r};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){o=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(o)throw i}}}}(Nf);try{for(r.s();!(e=r.n()).done;){var n=e.value;if(t in n)return n[t].op}}catch(e){r.e(e)}finally{r.f()}return null}();if(!o)return new y(C(a.fn),a.args.map(function(e){return C(e,t)}));if(2