/** * math.js * https://github.com/josdejong/mathjs * * Math.js is an extensive math library for JavaScript and Node.js, * It features real and complex numbers, units, matrices, a large set of * mathematical functions, and a flexible expression parser. * * @version 10.4.3 * @date 2022-04-08 * * @license * Copyright (C) 2013-2022 Jos de Jong * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ !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,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=254)}([function(e,t,r){var n=r(110),i=r(36),a=r(192);n||i(Object.prototype,"toString",a,{unsafe:!0})},function(e,t,r){(function(t){var r=function(e){return e&&e.Math==Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,r(188))},,function(e,t){function r(t){return e.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},e.exports.__esModule=!0,e.exports.default=e.exports,r(t)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){"use strict";var n=r(6),i=r(81).map;n({target:"Array",proto:!0,forced:!r(82)("map")},{map:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,r){var n=r(1),i=r(144),a=r(145),o=r(193),s=r(53),u=function(e){if(e&&e.forEach!==o)try{s(e,"forEach",o)}catch(t){e.forEach=o}};for(var c in i)i[c]&&u(n[c]&&n[c].prototype);u(a)},function(e,t,r){var n=r(1),i=r(58).f,a=r(53),o=r(36),s=r(107),u=r(140),c=r(80);e.exports=function(e,t){var r,f,l,p,m,h=e.target,d=e.global,v=e.stat;if(r=d?n:v?n[h]||s(h,{}):(n[h]||{}).prototype)for(f in t){if(p=t[f],l=e.noTargetGet?(m=i(r,f))&&m.value:r[f],!c(d?f:h+(v?".":"#")+f,e.forced)&&void 0!==l){if(typeof p==typeof l)continue;u(p,l)}(e.sham||l&&l.sham)&&a(p,"sham",!0),o(r,f,p,e)}}},function(e,t,r){"use strict";var n=r(9),i=r(78).PROPER,a=r(36),o=r(21),s=r(52),u=r(34),c=r(8),f=r(116),l=RegExp.prototype,p=l.toString,m=n(f),h=c((function(){return"/a/b"!=p.call({source:"a",flags:"b"})})),d=i&&"toString"!=p.name;(h||d)&&a(RegExp.prototype,"toString",(function(){var e=o(this),t=u(e.source),r=e.flags;return"/"+t+"/"+u(void 0===r&&s(l,e)&&!("flags"in l)?m(e):r)}),{unsafe:!0})},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){var n=r(86),i=Function.prototype,a=i.bind,o=i.call,s=n&&a.bind(o,o);e.exports=n?function(e){return e&&s(e)}:function(e){return e&&function(){return o.apply(e,arguments)}}},function(e,t,r){"use strict";var n=r(6),i=r(100);n({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(e,t,r){"use strict";var n,i,a,o,s=r(6),u=r(67),c=r(1),f=r(49),l=r(22),p=r(224),m=r(36),h=r(174),d=r(115),v=r(85),y=r(117),g=r(66),x=r(15),b=r(23),w=r(128),N=r(93),M=r(126),E=r(129),S=r(155),A=r(177).set,O=r(226),C=r(229),_=r(230),T=r(179),I=r(231),k=r(232),z=r(44),q=r(80),R=r(16),B=r(233),D=r(130),j=r(76),P=R("species"),F="Promise",U=z.getterFor(F),L=z.set,$=z.getterFor(F),H=p&&p.prototype,G=p,V=H,Z=c.TypeError,W=c.document,Y=c.process,J=T.f,X=J,Q=!!(W&&W.createEvent&&c.dispatchEvent),K=x(c.PromiseRejectionEvent),ee=!1,te=q(F,(function(){var e=N(G),t=e!==String(G);if(!t&&66===j)return!0;if(u&&!V.finally)return!0;if(j>=51&&/native code/.test(e))return!1;var r=new G((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[P]=n,!(ee=r.then((function(){}))instanceof n)||!t&&B&&!K})),re=te||!E((function(e){G.all(e).catch((function(){}))})),ne=function(e){var t;return!(!b(e)||!x(t=e.then))&&t},ie=function(e,t){var r,n,i,a=t.value,o=1==t.state,s=o?e.ok:e.fail,u=e.resolve,c=e.reject,f=e.domain;try{s?(o||(2===t.rejection&&ce(t),t.rejection=1),!0===s?r=a:(f&&f.enter(),r=s(a),f&&(f.exit(),i=!0)),r===e.promise?c(Z("Promise-chain cycle")):(n=ne(r))?l(n,r,u,c):u(r)):c(a)}catch(e){f&&!i&&f.exit(),c(e)}},ae=function(e,t){e.notified||(e.notified=!0,O((function(){for(var r,n=e.reactions;r=n.get();)ie(r,e);e.notified=!1,t&&!e.rejection&&se(e)})))},oe=function(e,t,r){var n,i;Q?((n=W.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),c.dispatchEvent(n)):n={promise:t,reason:r},!K&&(i=c["on"+e])?i(n):"unhandledrejection"===e&&_("Unhandled promise rejection",r)},se=function(e){l(A,c,(function(){var t,r=e.facade,n=e.value;if(ue(e)&&(t=I((function(){D?Y.emit("unhandledRejection",n,r):oe("unhandledrejection",r,n)})),e.rejection=D||ue(e)?2:1,t.error))throw t.value}))},ue=function(e){return 1!==e.rejection&&!e.parent},ce=function(e){l(A,c,(function(){var t=e.facade;D?Y.emit("rejectionHandled",t):oe("rejectionhandled",t,e.value)}))},fe=function(e,t,r){return function(n){e(t,n,r)}},le=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,ae(e,!0))},pe=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Z("Promise can't be resolved itself");var n=ne(t);n?O((function(){var r={done:!1};try{l(n,t,fe(pe,r,e),fe(le,r,e))}catch(t){le(r,t,e)}})):(e.value=t,e.state=1,ae(e,!1))}catch(t){le({done:!1},t,e)}}};if(te&&(V=(G=function(e){w(this,V),g(e),l(n,this);var t=U(this);try{e(fe(pe,t),fe(le,t))}catch(e){le(t,e)}}).prototype,(n=function(e){L(this,{type:F,done:!1,notified:!1,parent:!1,reactions:new k,rejection:!1,state:0,value:void 0})}).prototype=h(V,{then:function(e,t){var r=$(this),n=J(S(this,G));return r.parent=!0,n.ok=!x(e)||e,n.fail=x(t)&&t,n.domain=D?Y.domain:void 0,0==r.state?r.reactions.add(n):O((function(){ie(n,r)})),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new n,t=U(e);this.promise=e,this.resolve=fe(pe,t),this.reject=fe(le,t)},T.f=J=function(e){return e===G||e===a?new i(e):X(e)},!u&&x(p)&&H!==Object.prototype)){o=H.then,ee||(m(H,"then",(function(e,t){var r=this;return new G((function(e,t){l(o,r,e,t)})).then(e,t)}),{unsafe:!0}),m(H,"catch",V.catch,{unsafe:!0}));try{delete H.constructor}catch(e){}d&&d(H,V)}s({global:!0,wrap:!0,forced:te},{Promise:G}),v(G,F,!1,!0),y(F),a=f(F),s({target:F,stat:!0,forced:te},{reject:function(e){var t=J(this);return l(t.reject,void 0,e),t.promise}}),s({target:F,stat:!0,forced:u||te},{resolve:function(e){return C(u&&this===a?G:this,e)}}),s({target:F,stat:!0,forced:re},{all:function(e){var t=this,r=J(t),n=r.resolve,i=r.reject,a=I((function(){var r=g(t.resolve),a=[],o=0,s=1;M(e,(function(e){var u=o++,c=!1;s++,l(r,t,e).then((function(e){c||(c=!0,a[u]=e,--s||n(a))}),i)})),--s||n(a)}));return a.error&&i(a.value),r.promise},race:function(e){var t=this,r=J(t),n=r.reject,i=I((function(){var i=g(t.resolve);M(e,(function(e){l(i,t,e).then(r.resolve,n)}))}));return i.error&&n(i.value),r.promise}})},function(e,t,r){var n=r(18),i=r(78).EXISTS,a=r(9),o=r(20).f,s=Function.prototype,u=a(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,f=a(c.exec);n&&!i&&o(s,"name",{configurable:!0,get:function(){try{return f(c,u(this))[1]}catch(e){return""}}})},function(e,t,r){"use strict";var n=r(6),i=r(22);n({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},function(e,t,r){"use strict";var n=r(6),i=r(9),a=r(104),o=r(40),s=r(112),u=i([].join),c=a!=Object,f=s("join",",");n({target:"Array",proto:!0,forced:c||!f},{join:function(e){return u(o(this),void 0===e?",":e)}})},function(e,t){e.exports=function(e){return"function"==typeof e}},function(e,t,r){var n=r(1),i=r(90),a=r(26),o=r(91),s=r(105),u=r(137),c=i("wks"),f=n.Symbol,l=f&&f.for,p=u?f:f&&f.withoutSetter||o;e.exports=function(e){if(!a(c,e)||!s&&"string"!=typeof c[e]){var t="Symbol."+e;s&&a(f,e)?c[e]=f[e]:c[e]=u&&l?l(t):p(t)}return c[e]}},function(e,t,r){"use strict";var n=r(6),i=r(1),a=r(97),o=r(98),s=r(23),u=r(79),c=r(45),f=r(40),l=r(71),p=r(16),m=r(82),h=r(123),d=m("slice"),v=p("species"),y=i.Array,g=Math.max;n({target:"Array",proto:!0,forced:!d},{slice:function(e,t){var r,n,i,p=f(this),m=c(p),d=u(e,m),x=u(void 0===t?m:t,m);if(a(p)&&(r=p.constructor,(o(r)&&(r===y||a(r.prototype))||s(r)&&null===(r=r[v]))&&(r=void 0),r===y||void 0===r))return h(p,d,x);for(n=new(void 0===r?y:r)(g(x-d,0)),i=0;d=51||!a((function(){var e=[];return e[d]=!1,e.concat()[0]!==e})),g=p("concat"),x=function(e){if(!s(e))return!1;var t=e[d];return void 0!==t?!!t:o(e)};n({target:"Array",proto:!0,forced:!y||!g},{concat:function(e){var t,r,n,i,a,o=u(this),s=l(o,0),p=0;for(t=-1,n=arguments.length;t9007199254740991)throw v("Maximum allowed index exceeded");for(r=0;r=9007199254740991)throw v("Maximum allowed index exceeded");f(s,p++,a)}return s.length=p,s}})},function(e,t,r){var n=r(1),i=r(18),a=r(138),o=r(139),s=r(21),u=r(87),c=n.TypeError,f=Object.defineProperty,l=Object.getOwnPropertyDescriptor;t.f=i?o?function(e,t,r){if(s(e),t=u(t),s(r),"function"==typeof e&&"prototype"===t&&"value"in r&&"writable"in r&&!r.writable){var n=l(e,t);n&&n.writable&&(e[t]=r.value,r={configurable:"configurable"in r?r.configurable:n.configurable,enumerable:"enumerable"in r?r.enumerable:n.enumerable,writable:!1})}return f(e,t,r)}:f:function(e,t,r){if(s(e),t=u(t),s(r),a)try{return f(e,t,r)}catch(e){}if("get"in r||"set"in r)throw c("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){var n=r(1),i=r(23),a=n.String,o=n.TypeError;e.exports=function(e){if(i(e))return e;throw o(a(e)+" is not an object")}},function(e,t,r){var n=r(86),i=Function.prototype.call;e.exports=n?i.bind(i):function(){return i.apply(i,arguments)}},function(e,t,r){var n=r(15);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},function(e,t,r){"use strict";var n=r(6),i=r(81).find,a=r(124),o=!0;"find"in[]&&Array(1).find((function(){o=!1})),n({target:"Array",proto:!0,forced:o},{find:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}}),a("find")},function(e,t,r){var n=r(240),i=r(241),a=r(181),o=r(242);e.exports=function(e){return n(e)||i(e)||a(e)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,r){var n=r(9),i=r(35),a=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return a(i(e),t)}},function(e,t,r){"use strict";var n=r(40),i=r(124),a=r(84),o=r(44),s=r(20).f,u=r(125),c=r(67),f=r(18),l=o.set,p=o.getterFor("Array Iterator");e.exports=u(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:n(e),index:0,kind:t})}),(function(){var e=p(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values");var m=a.Arguments=a.Array;if(i("keys"),i("values"),i("entries"),!c&&f&&"values"!==m.name)try{s(m,"name",{value:"values"})}catch(e){}},function(e,t,r){var n=r(6),i=r(35),a=r(109);n({target:"Object",stat:!0,forced:r(8)((function(){a(1)}))},{keys:function(e){return a(i(e))}})},function(e,t,r){"use strict";var n=r(6),i=r(1),a=r(79),o=r(60),s=r(45),u=r(35),c=r(111),f=r(71),l=r(82)("splice"),p=i.TypeError,m=Math.max,h=Math.min;n({target:"Array",proto:!0,forced:!l},{splice:function(e,t){var r,n,i,l,d,v,y=u(this),g=s(y),x=a(e,g),b=arguments.length;if(0===b?r=n=0:1===b?(r=0,n=g-x):(r=b-2,n=h(m(o(t),0),g-x)),g+r-n>9007199254740991)throw p("Maximum allowed length exceeded");for(i=c(y,n),l=0;lg-n+r;l--)delete y[l-1]}else if(r>n)for(l=g-n;l>x;l--)v=l+r-1,(d=l+n-1)in y?y[v]=y[d]:delete y[v];for(l=0;l2)if(c=g(c),43===(t=M(c,0))||45===t){if(88===(r=M(c,2))||120===r)return NaN}else if(48===t){switch(M(c,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+c}for(o=(a=N(c,2)).length,s=0;si)return NaN;return parseInt(a,n)}return+c};if(o("Number",!x(" 0o1")||!x("0b1")||x("+0x1"))){for(var A,O=function(e){var t=arguments.length<1?0:x(E(e)),r=this;return f(b,r)&&m((function(){y(r)}))?c(Object(t),r,O):t},C=n?h(x):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),_=0;C.length>_;_++)u(x,A=C[_])&&!u(O,A)&&v(O,A,d(x,A));O.prototype=b,b.constructor=O,s(i,"Number",O)}},function(e,t,r){var n=r(1),i=r(144),a=r(145),o=r(27),s=r(53),u=r(16),c=u("iterator"),f=u("toStringTag"),l=o.values,p=function(e,t){if(e){if(e[c]!==l)try{s(e,c,l)}catch(t){e[c]=l}if(e[f]||s(e,f,t),i[t])for(var r in o)if(e[r]!==o[r])try{s(e,r,o[r])}catch(t){e[r]=o[r]}}};for(var m in i)p(n[m]&&n[m].prototype,m);p(a,"DOMTokenList")},function(e,t){function r(){return e.exports=r=Object.assign||function(e){for(var t=1;t0&&o();break;case"number":r.im=0,r.re=e;break;default:o()}return isNaN(r.re)||isNaN(r.im),r}(e,t);this.re=r.re,this.im=r.im}u.prototype={re:0,im:0,sign:function(){var e=this.abs();return new u(this.re/e,this.im/e)},add:function(e,t){var r=new u(e,t);return this.isInfinite()&&r.isInfinite()?u.NAN:this.isInfinite()||r.isInfinite()?u.INFINITY:new u(this.re+r.re,this.im+r.im)},sub:function(e,t){var r=new u(e,t);return this.isInfinite()&&r.isInfinite()?u.NAN:this.isInfinite()||r.isInfinite()?u.INFINITY:new u(this.re-r.re,this.im-r.im)},mul:function(e,t){var r=new u(e,t);return this.isInfinite()&&r.isZero()||this.isZero()&&r.isInfinite()?u.NAN:this.isInfinite()||r.isInfinite()?u.INFINITY:0===r.im&&0===this.im?new u(this.re*r.re,0):new u(this.re*r.re-this.im*r.im,this.re*r.im+this.im*r.re)},div:function(e,t){var r=new u(e,t);if(this.isZero()&&r.isZero()||this.isInfinite()&&r.isInfinite())return u.NAN;if(this.isInfinite()||r.isZero())return u.INFINITY;if(this.isZero()||r.isInfinite())return u.ZERO;e=this.re,t=this.im;var n,i,a=r.re,o=r.im;return 0===o?new u(e/a,t/a):Math.abs(a)0)return new u(Math.pow(e,r.re),0);if(0===e)switch((r.re%4+4)%4){case 0:return new u(Math.pow(t,r.re),0);case 1:return new u(0,Math.pow(t,r.re));case 2:return new u(-Math.pow(t,r.re),0);case 3:return new u(0,-Math.pow(t,r.re))}}if(0===e&&0===t&&r.re>0&&r.im>=0)return u.ZERO;var n=Math.atan2(t,e),i=s(e,t);return e=Math.exp(r.re*i-r.im*n),t=r.im*i+r.re*n,new u(e*Math.cos(t),e*Math.sin(t))},sqrt:function(){var e,t,r=this.re,n=this.im,i=this.abs();if(r>=0){if(0===n)return new u(Math.sqrt(r),0);e=.5*Math.sqrt(2*(i+r))}else e=Math.abs(n)/Math.sqrt(2*(i-r));return t=r<=0?.5*Math.sqrt(2*(i-r)):Math.abs(n)/Math.sqrt(2*(i+r)),new u(e,n<0?-t:t)},exp:function(){var e=Math.exp(this.re);return this.im,new u(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){var e=this.re,t=this.im;return new u(Math.expm1(e)*Math.cos(t)+function(e){var t=Math.PI/4;if(-t>e||e>t)return Math.cos(e)-1;var r=e*e;return r*(r*(r*(r*(r*(r*(r*(r/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-.5)}(t),Math.exp(e)*Math.sin(t))},log:function(){var e=this.re,t=this.im;return new u(s(e,t),Math.atan2(t,e))},abs:function(){return e=this.re,t=this.im,r=Math.abs(e),n=Math.abs(t),r<3e3&&n<3e3?Math.sqrt(r*r+n*n):(r1&&0===t,n=1-e,i=1+e,a=n*n+t*t,o=0!==a?new u((i*n-t*t)/a,(t*n+i*t)/a):new u(-1!==e?e/0:0,0!==t?t/0:0),c=o.re;return o.re=s(o.re,o.im)/2,o.im=Math.atan2(o.im,c)/2,r&&(o.im=-o.im),o},acoth:function(){var e=this.re,t=this.im;if(0===e&&0===t)return new u(0,Math.PI/2);var r=e*e+t*t;return 0!==r?new u(e/r,-t/r).atanh():new u(0!==e?e/0:0,0!==t?-t/0:0).atanh()},acsch:function(){var e=this.re,t=this.im;if(0===t)return new u(0!==e?Math.log(e+Math.sqrt(e*e+1)):1/0,0);var r=e*e+t*t;return 0!==r?new u(e/r,-t/r).asinh():new u(0!==e?e/0:0,0!==t?-t/0:0).asinh()},asech:function(){var e=this.re,t=this.im;if(this.isZero())return u.INFINITY;var r=e*e+t*t;return 0!==r?new u(e/r,-t/r).acosh():new u(0!==e?e/0:0,0!==t?-t/0:0).acosh()},inverse:function(){if(this.isZero())return u.INFINITY;if(this.isInfinite())return u.ZERO;var e=this.re,t=this.im,r=e*e+t*t;return new u(e/r,-t/r)},conjugate:function(){return new u(this.re,-this.im)},neg:function(){return new u(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new u(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new u(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new u(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){var r=new u(e,t);return Math.abs(r.re-this.re)<=u.EPSILON&&Math.abs(r.im-this.im)<=u.EPSILON},clone:function(){return new u(this.re,this.im)},toString:function(){var e=this.re,t=this.im,r="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)1?arguments[1]:void 0)}})},function(e,t,r){"use strict";var n=r(6),i=r(1),a=r(49),o=r(83),s=r(22),u=r(9),c=r(67),f=r(18),l=r(105),p=r(8),m=r(26),h=r(97),d=r(15),v=r(23),y=r(52),g=r(88),x=r(21),b=r(35),w=r(40),N=r(87),M=r(34),E=r(75),S=r(70),A=r(109),O=r(68),C=r(169),_=r(143),T=r(58),I=r(20),k=r(152),z=r(135),q=r(123),R=r(36),B=r(90),D=r(94),j=r(77),P=r(91),F=r(16),U=r(175),L=r(176),$=r(85),H=r(44),G=r(81).forEach,V=D("hidden"),Z=F("toPrimitive"),W=H.set,Y=H.getterFor("Symbol"),J=Object.prototype,X=i.Symbol,Q=X&&X.prototype,K=i.TypeError,ee=i.QObject,te=a("JSON","stringify"),re=T.f,ne=I.f,ie=C.f,ae=z.f,oe=u([].push),se=B("symbols"),ue=B("op-symbols"),ce=B("string-to-symbol-registry"),fe=B("symbol-to-string-registry"),le=B("wks"),pe=!ee||!ee.prototype||!ee.prototype.findChild,me=f&&p((function(){return 7!=S(ne({},"a",{get:function(){return ne(this,"a",{value:7}).a}})).a}))?function(e,t,r){var n=re(J,t);n&&delete J[t],ne(e,t,r),n&&e!==J&&ne(J,t,n)}:ne,he=function(e,t){var r=se[e]=S(Q);return W(r,{type:"Symbol",tag:e,description:t}),f||(r.description=t),r},de=function(e,t,r){e===J&&de(ue,t,r),x(e);var n=N(t);return x(r),m(se,n)?(r.enumerable?(m(e,V)&&e[V][n]&&(e[V][n]=!1),r=S(r,{enumerable:E(0,!1)})):(m(e,V)||ne(e,V,E(1,{})),e[V][n]=!0),me(e,n,r)):ne(e,n,r)},ve=function(e,t){x(e);var r=w(t),n=A(r).concat(be(r));return G(n,(function(t){f&&!s(ye,r,t)||de(e,t,r[t])})),e},ye=function(e){var t=N(e),r=s(ae,this,t);return!(this===J&&m(se,t)&&!m(ue,t))&&(!(r||!m(this,t)||!m(se,t)||m(this,V)&&this[V][t])||r)},ge=function(e,t){var r=w(e),n=N(t);if(r!==J||!m(se,n)||m(ue,n)){var i=re(r,n);return!i||!m(se,n)||m(r,V)&&r[V][n]||(i.enumerable=!0),i}},xe=function(e){var t=ie(w(e)),r=[];return G(t,(function(e){m(se,e)||m(j,e)||oe(r,e)})),r},be=function(e){var t=e===J,r=ie(t?ue:w(e)),n=[];return G(r,(function(e){!m(se,e)||t&&!m(J,e)||oe(n,se[e])})),n};(l||(R(Q=(X=function(){if(y(Q,this))throw K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?M(arguments[0]):void 0,t=P(e),r=function(e){this===J&&s(r,ue,e),m(this,V)&&m(this[V],t)&&(this[V][t]=!1),me(this,t,E(1,e))};return f&&pe&&me(J,t,{configurable:!0,set:r}),he(t,e)}).prototype,"toString",(function(){return Y(this).tag})),R(X,"withoutSetter",(function(e){return he(P(e),e)})),z.f=ye,I.f=de,k.f=ve,T.f=ge,O.f=C.f=xe,_.f=be,U.f=function(e){return he(F(e),e)},f&&(ne(Q,"description",{configurable:!0,get:function(){return Y(this).description}}),c||R(J,"propertyIsEnumerable",ye,{unsafe:!0}))),n({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:X}),G(A(le),(function(e){L(e)})),n({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=M(e);if(m(ce,t))return ce[t];var r=X(t);return ce[t]=r,fe[r]=t,r},keyFor:function(e){if(!g(e))throw K(e+" is not a symbol");if(m(fe,e))return fe[e]},useSetter:function(){pe=!0},useSimple:function(){pe=!1}}),n({target:"Object",stat:!0,forced:!l,sham:!f},{create:function(e,t){return void 0===t?S(e):ve(S(e),t)},defineProperty:de,defineProperties:ve,getOwnPropertyDescriptor:ge}),n({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:xe,getOwnPropertySymbols:be}),n({target:"Object",stat:!0,forced:p((function(){_.f(1)}))},{getOwnPropertySymbols:function(e){return _.f(b(e))}}),te)&&n({target:"JSON",stat:!0,forced:!l||p((function(){var e=X();return"[null]"!=te([e])||"{}"!=te({a:e})||"{}"!=te(Object(e))}))},{stringify:function(e,t,r){var n=q(arguments),i=t;if((v(t)||void 0!==e)&&!g(e))return h(t)||(t=function(e,t){if(d(i)&&(t=s(i,this,e,t)),!g(t))return t}),n[1]=t,o(te,null,n)}});if(!Q[Z]){var we=Q.valueOf;R(Q,Z,(function(e){return s(we,this)}))}$(X,"Symbol"),j[V]=!0},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,r){var n=r(104),i=r(48);e.exports=function(e){return n(i(e))}},function(e,t,r){"use strict";var n=r(6),i=r(9),a=r(66),o=r(35),s=r(45),u=r(34),c=r(8),f=r(197),l=r(112),p=r(198),m=r(199),h=r(76),d=r(200),v=[],y=i(v.sort),g=i(v.push),x=c((function(){v.sort(void 0)})),b=c((function(){v.sort(null)})),w=l("sort"),N=!c((function(){if(h)return h<70;if(!(p&&p>3)){if(m)return!0;if(d)return d<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)v.push({k:t+n,v:r})}for(v.sort((function(e,t){return t.v-e.v})),n=0;nu(r)?1:-1}}(e)),r=i.length,n=0;n=r.length?{value:void 0,done:!0}:(e=n(r,i),t.index+=e.length,{value:e,done:!1})}))},function(e,t,r){var n=r(9),i=n({}.toString),a=n("".slice);e.exports=function(e){return a(i(e),8,-1)}},function(e,t,r){var n,i,a,o=r(190),s=r(1),u=r(9),c=r(23),f=r(53),l=r(26),p=r(106),m=r(94),h=r(77),d=s.TypeError,v=s.WeakMap;if(o||p.state){var y=p.state||(p.state=new v),g=u(y.get),x=u(y.has),b=u(y.set);n=function(e,t){if(x(y,e))throw new d("Object already initialized");return t.facade=e,b(y,e,t),t},i=function(e){return g(y,e)||{}},a=function(e){return x(y,e)}}else{var w=m("state");h[w]=!0,n=function(e,t){if(l(e,w))throw new d("Object already initialized");return t.facade=e,f(e,w,t),t},i=function(e){return l(e,w)?e[w]:{}},a=function(e){return l(e,w)}}e.exports={set:n,get:i,has:a,enforce:function(e){return a(e)?i(e):n(e,{})},getterFor:function(e){return function(t){var r;if(!c(t)||(r=i(t)).type!==e)throw d("Incompatible receiver, "+e+" required");return r}}}},function(e,t,r){var n=r(95);e.exports=function(e){return n(e.length)}},function(e,t,r){var n=r(6),i=r(1),a=r(49),o=r(83),s=r(9),u=r(8),c=i.Array,f=a("JSON","stringify"),l=s(/./.exec),p=s("".charAt),m=s("".charCodeAt),h=s("".replace),d=s(1..toString),v=/[\uD800-\uDFFF]/g,y=/^[\uD800-\uDBFF]$/,g=/^[\uDC00-\uDFFF]$/,x=function(e,t,r){var n=p(r,t-1),i=p(r,t+1);return l(y,e)&&!l(g,i)||l(g,e)&&!l(y,n)?"\\u"+d(m(e,0),16):e},b=u((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")}));f&&n({target:"JSON",stat:!0,forced:b},{stringify:function(e,t,r){for(var n=0,i=arguments.length,a=c(i);n1||"".split(/.?/).length?function(e,r){var a=m(c(this)),o=void 0===r?4294967295:r>>>0;if(0===o)return[];if(void 0===e)return[a];if(!s(e))return i(t,a,e,o);for(var u,f,l,p=[],h=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),v=0,g=new RegExp(e.source,h+"g");(u=i(y,g,a))&&!((f=g.lastIndex)>v&&(E(p,S(a,v,u.index)),u.length>1&&u.index=o));)g.lastIndex===u.index&&g.lastIndex++;return v===a.length?!l&&M(g,"")||E(p,""):E(p,S(a,v)),p.length>o?d(p,0,o):p}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:i(t,this,e,r)}:t,[function(t,r){var n=c(this),o=null==t?void 0:h(t,e);return o?i(o,t,n,r):i(a,m(n),t,r)},function(e,n){var i=u(this),o=m(e),s=r(a,i,o,n,a!==t);if(s.done)return s.value;var c=f(i,RegExp),h=i.unicode,d=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(b?"g":"y"),y=new c(b?"^(?:"+i.source+")":i,d),g=void 0===n?4294967295:n>>>0;if(0===g)return[];if(0===o.length)return null===v(y,o)?[o]:[];for(var x=0,N=0,M=[];N0?n:r)(t)}},function(e,t,r){var n=r(6),i=r(221);n({target:"Array",stat:!0,forced:!r(129)((function(e){Array.from(e)}))},{from:i})},function(e,t,r){var n;!function(i){"use strict";var a,o,s,u=9e15,c="0123456789abcdef",f="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",l="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",p={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-u,maxE:u,crypto:!1},m=!0,h="[DecimalError] Invalid argument: ",d="[object Decimal]",v=Math.floor,y=Math.pow,g=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,x=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,b=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,w=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,N=1e7,M=f.length-1,E=l.length-1,S={toStringTag:d};function A(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;tr)throw Error(h+e)}function C(e,t,r,n){var i,a,o,s;for(a=e[0];a>=10;a/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),a=y(10,7-t),s=e[i]%a|0,null==n?t<3?(0==t?s=s/100|0:1==t&&(s=s/10|0),o=r<4&&99999==s||r>3&&49999==s||5e4==s||0==s):o=(r<4&&s+1==a||r>3&&s+1==a/2)&&(e[i+1]/a/100|0)==y(10,t-2)-1||(s==a/2||0==s)&&0==(e[i+1]/a/100|0):t<4?(0==t?s=s/1e3|0:1==t?s=s/100|0:2==t&&(s=s/10|0),o=(n||r<4)&&9999==s||!n&&r>3&&4999==s):o=((n||r<4)&&s+1==a||!n&&r>3&&s+1==a/2)&&(e[i+1]/a/1e3|0)==y(10,t-3)-1,o}function _(e,t,r){for(var n,i,a=[0],o=0,s=e.length;or-1&&(void 0===a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}S.absoluteValue=S.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),I(e)},S.ceil=function(){return I(new this.constructor(this),this.e+1,2)},S.clampedTo=S.clamp=function(e,t){var r=this,n=r.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(h+t);return r.cmp(e)<0?e:r.cmp(t)>0?t:new n(r)},S.comparedTo=S.cmp=function(e){var t,r,n,i,a=this,o=a.d,s=(e=new a.constructor(e)).d,u=a.s,c=e.s;if(!o||!s)return u&&c?u!==c?u:o===s?0:!o^u<0?1:-1:NaN;if(!o[0]||!s[0])return o[0]?u:s[0]?-c:0;if(u!==c)return u;if(a.e!==e.e)return a.e>e.e^u<0?1:-1;for(t=0,r=(n=o.length)<(i=s.length)?n:i;ts[t]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1},S.cosine=S.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+7,n.rounding=1,r=function(e,t){var r,n,i;if(t.isZero())return t;(n=t.d.length)<32?(r=Math.ceil(n/3),i=(1/Z(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10");e.precision+=r,t=V(e,1,t.times(i),new e(1));for(var a=r;a--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=r,t}(n,W(n,r)),n.precision=e,n.rounding=t,I(2==s||3==s?r.neg():r,e,t,!0)):new n(1):new n(NaN)},S.cubeRoot=S.cbrt=function(){var e,t,r,n,i,a,o,s,u,c,f=this,l=f.constructor;if(!f.isFinite()||f.isZero())return new l(f);for(m=!1,(a=f.s*y(f.s*f,1/3))&&Math.abs(a)!=1/0?n=new l(a.toString()):(r=A(f.d),(a=((e=f.e)-r.length+1)%3)&&(r+=1==a||-2==a?"0":"00"),a=y(r,1/3),e=v((e+1)/3)-(e%3==(e<0?-1:2)),(n=new l(r=a==1/0?"5e"+e:(r=a.toExponential()).slice(0,r.indexOf("e")+1)+e)).s=f.s),o=(e=l.precision)+3;;)if(c=(u=(s=n).times(s).times(s)).plus(f),n=T(c.plus(f).times(s),c.plus(u),o+2,1),A(s.d).slice(0,o)===(r=A(n.d)).slice(0,o)){if("9999"!=(r=r.slice(o-3,o+1))&&(i||"4999"!=r)){+r&&(+r.slice(1)||"5"!=r.charAt(0))||(I(n,e+1,1),t=!n.times(n).times(n).eq(f));break}if(!i&&(I(s,e+1,0),s.times(s).times(s).eq(f))){n=s;break}o+=4,i=1}return m=!0,I(n,e,l.rounding,t)},S.decimalPlaces=S.dp=function(){var e,t=this.d,r=NaN;if(t){if(r=7*((e=t.length-1)-v(this.e/7)),e=t[e])for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r},S.dividedBy=S.div=function(e){return T(this,new this.constructor(e))},S.dividedToIntegerBy=S.divToInt=function(e){var t=this.constructor;return I(T(this,new t(e),0,1,1),t.precision,t.rounding)},S.equals=S.eq=function(e){return 0===this.cmp(e)},S.floor=function(){return I(new this.constructor(this),this.e+1,3)},S.greaterThan=S.gt=function(e){return this.cmp(e)>0},S.greaterThanOrEqualTo=S.gte=function(e){var t=this.cmp(e);return 1==t||0===t},S.hyperbolicCosine=S.cosh=function(){var e,t,r,n,i,a=this,o=a.constructor,s=new o(1);if(!a.isFinite())return new o(a.s?1/0:NaN);if(a.isZero())return s;r=o.precision,n=o.rounding,o.precision=r+Math.max(a.e,a.sd())+4,o.rounding=1,(i=a.d.length)<32?t=(1/Z(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),a=V(o,1,a.times(t),new o(1),!0);for(var u,c=e,f=new o(8);c--;)u=a.times(a),a=s.minus(u.times(f.minus(u.times(f))));return I(a,o.precision=r,o.rounding=n,!0)},S.hyperbolicSine=S.sinh=function(){var e,t,r,n,i=this,a=i.constructor;if(!i.isFinite()||i.isZero())return new a(i);if(t=a.precision,r=a.rounding,a.precision=t+Math.max(i.e,i.sd())+4,a.rounding=1,(n=i.d.length)<3)i=V(a,2,i,i,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,i=V(a,2,i=i.times(1/Z(5,e)),i,!0);for(var o,s=new a(5),u=new a(16),c=new a(20);e--;)o=i.times(i),i=i.times(s.plus(o.times(u.times(o).plus(c))))}return a.precision=t,a.rounding=r,I(i,t,r,!0)},S.hyperbolicTangent=S.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,T(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)},S.inverseCosine=S.acos=function(){var e,t=this,r=t.constructor,n=t.abs().cmp(1),i=r.precision,a=r.rounding;return-1!==n?0===n?t.isNeg()?R(r,i,a):new r(0):new r(NaN):t.isZero()?R(r,i+4,a).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=R(r,i+4,a).times(.5),r.precision=i,r.rounding=a,e.minus(t))},S.inverseHyperbolicCosine=S.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,m=!1,r=r.times(r).minus(1).sqrt().plus(r),m=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)},S.inverseHyperbolicSine=S.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,m=!1,r=r.times(r).plus(1).sqrt().plus(r),m=!0,n.precision=e,n.rounding=t,r.ln())},S.inverseHyperbolicTangent=S.atanh=function(){var e,t,r,n,i=this,a=i.constructor;return i.isFinite()?i.e>=0?new a(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(e=a.precision,t=a.rounding,n=i.sd(),Math.max(n,e)<2*-i.e-1?I(new a(i),e,t,!0):(a.precision=r=n-i.e,i=T(i.plus(1),new a(1).minus(i),r+e,1),a.precision=e+4,a.rounding=1,i=i.ln(),a.precision=e,a.rounding=t,i.times(.5))):new a(NaN)},S.inverseSine=S.asin=function(){var e,t,r,n,i=this,a=i.constructor;return i.isZero()?new a(i):(t=i.abs().cmp(1),r=a.precision,n=a.rounding,-1!==t?0===t?((e=R(a,r+4,n).times(.5)).s=i.s,e):new a(NaN):(a.precision=r+6,a.rounding=1,i=i.div(new a(1).minus(i.times(i)).sqrt().plus(1)).atan(),a.precision=r,a.rounding=n,i.times(2)))},S.inverseTangent=S.atan=function(){var e,t,r,n,i,a,o,s,u,c=this,f=c.constructor,l=f.precision,p=f.rounding;if(c.isFinite()){if(c.isZero())return new f(c);if(c.abs().eq(1)&&l+4<=E)return(o=R(f,l+4,p).times(.25)).s=c.s,o}else{if(!c.s)return new f(NaN);if(l+4<=E)return(o=R(f,l+4,p).times(.5)).s=c.s,o}for(f.precision=s=l+10,f.rounding=1,e=r=Math.min(28,s/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(m=!1,t=Math.ceil(s/7),n=1,u=c.times(c),o=new f(c),i=c;-1!==e;)if(i=i.times(u),a=o.minus(i.div(n+=2)),i=i.times(u),void 0!==(o=a.plus(i.div(n+=2))).d[t])for(e=t;o.d[e]===a.d[e]&&e--;);return r&&(o=o.times(2<this.d.length-2},S.isNaN=function(){return!this.s},S.isNegative=S.isNeg=function(){return this.s<0},S.isPositive=S.isPos=function(){return this.s>0},S.isZero=function(){return!!this.d&&0===this.d[0]},S.lessThan=S.lt=function(e){return this.cmp(e)<0},S.lessThanOrEqualTo=S.lte=function(e){return this.cmp(e)<1},S.logarithm=S.log=function(e){var t,r,n,i,a,o,s,u,c=this.constructor,f=c.precision,l=c.rounding;if(null==e)e=new c(10),t=!0;else{if(r=(e=new c(e)).d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=this.d,this.s<0||!r||!r[0]||this.eq(1))return new c(r&&!r[0]?-1/0:1!=this.s?NaN:r?0:1/0);if(t)if(r.length>1)a=!0;else{for(i=r[0];i%10==0;)i/=10;a=1!==i}if(m=!1,o=L(this,s=f+5),n=t?q(c,s+10):L(e,s),C((u=T(o,n,s,1)).d,i=f,l))do{if(o=L(this,s+=10),n=t?q(c,s+10):L(e,s),u=T(o,n,s,1),!a){+A(u.d).slice(i+1,i+15)+1==1e14&&(u=I(u,f+1,0));break}}while(C(u.d,i+=10,l));return m=!0,I(u,f,l)},S.minus=S.sub=function(e){var t,r,n,i,a,o,s,u,c,f,l,p,h=this,d=h.constructor;if(e=new d(e),!h.d||!e.d)return h.s&&e.s?h.d?e.s=-e.s:e=new d(e.d||h.s!==e.s?h:NaN):e=new d(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.plus(e);if(c=h.d,p=e.d,s=d.precision,u=d.rounding,!c[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!c[0])return new d(3===u?-0:0);e=new d(h)}return m?I(e,s,u):e}if(r=v(e.e/7),f=v(h.e/7),c=c.slice(),a=f-r){for((l=a<0)?(t=c,a=-a,o=p.length):(t=p,r=f,o=c.length),a>(n=Math.max(Math.ceil(s/7),o)+2)&&(a=n,t.length=1),t.reverse(),n=a;n--;)t.push(0);t.reverse()}else{for((l=(n=c.length)<(o=p.length))&&(o=n),n=0;n0;--n)c[o++]=0;for(n=p.length;n>a;){if(c[--n](o=(a=Math.ceil(s/7))>o?a+1:o+1)&&(i=o,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for((o=c.length)-(i=f.length)<0&&(i=o,r=f,f=c,c=r),t=0;i;)t=(c[--i]=c[i]+f[i]+t)/N|0,c[i]%=N;for(t&&(c.unshift(t),++n),o=c.length;0==c[--o];)c.pop();return e.d=c,e.e=z(c,n),m?I(e,s,u):e},S.precision=S.sd=function(e){var t,r=this;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(h+e);return r.d?(t=B(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t},S.round=function(){var e=this,t=e.constructor;return I(new t(e),e.e+1,t.rounding)},S.sine=S.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())+7,n.rounding=1,r=function(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:V(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=t.times(1/Z(5,r)),t=V(e,2,t,t);for(var i,a=new e(5),o=new e(16),s=new e(20);r--;)i=t.times(t),t=t.times(a.plus(i.times(o.times(i).minus(s))));return t}(n,W(n,r)),n.precision=e,n.rounding=t,I(s>2?r.neg():r,e,t,!0)):new n(NaN)},S.squareRoot=S.sqrt=function(){var e,t,r,n,i,a,o=this,s=o.d,u=o.e,c=o.s,f=o.constructor;if(1!==c||!s||!s[0])return new f(!c||c<0&&(!s||s[0])?NaN:s?o:1/0);for(m=!1,0==(c=Math.sqrt(+o))||c==1/0?(((t=A(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=v((u+1)/2)-(u<0||u%2),n=new f(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):n=new f(c.toString()),r=(u=f.precision)+3;;)if(n=(a=n).plus(T(o,a,r+2,1)).times(.5),A(a.d).slice(0,r)===(t=A(n.d)).slice(0,r)){if("9999"!=(t=t.slice(r-3,r+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(I(n,u+1,1),e=!n.times(n).eq(o));break}if(!i&&(I(a,u+1,0),a.times(a).eq(o))){n=a;break}r+=4,i=1}return m=!0,I(n,u,f.rounding,e)},S.tangent=S.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,(r=r.sin()).s=1,r=T(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,I(2==s||4==s?r.neg():r,e,t,!0)):new n(NaN)},S.times=S.mul=function(e){var t,r,n,i,a,o,s,u,c,f=this,l=f.constructor,p=f.d,h=(e=new l(e)).d;if(e.s*=f.s,!(p&&p[0]&&h&&h[0]))return new l(!e.s||p&&!p[0]&&!h||h&&!h[0]&&!p?NaN:p&&h?0*e.s:e.s/0);for(r=v(f.e/7)+v(e.e/7),(u=p.length)<(c=h.length)&&(a=p,p=h,h=a,o=u,u=c,c=o),a=[],n=o=u+c;n--;)a.push(0);for(n=c;--n>=0;){for(t=0,i=u+n;i>n;)s=a[i]+h[n]*p[i-n-1]+t,a[i--]=s%N|0,t=s/N|0;a[i]=(a[i]+t)%N|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=z(a,r),m?I(e,l.precision,l.rounding):e},S.toBinary=function(e,t){return Y(this,2,e,t)},S.toDecimalPlaces=S.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),void 0===e?r:(O(e,0,1e9),void 0===t?t=n.rounding:O(t,0,8),I(r,e+r.e+1,t))},S.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=k(n,!0):(O(e,0,1e9),void 0===t?t=i.rounding:O(t,0,8),r=k(n=I(new i(n),e+1,t),!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r},S.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return void 0===e?r=k(i):(O(e,0,1e9),void 0===t?t=a.rounding:O(t,0,8),r=k(n=I(new a(i),e+i.e+1,t),!1,e+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r},S.toFraction=function(e){var t,r,n,i,a,o,s,u,c,f,l,p,d=this,v=d.d,g=d.constructor;if(!v)return new g(d);if(c=r=new g(1),n=u=new g(0),o=(a=(t=new g(n)).e=B(v)-d.e-1)%7,t.d[0]=y(10,o<0?7+o:o),null==e)e=a>0?t:c;else{if(!(s=new g(e)).isInt()||s.lt(c))throw Error(h+s);e=s.gt(t)?a>0?t:c:s}for(m=!1,s=new g(A(v)),f=g.precision,g.precision=a=7*v.length*2;l=T(s,t,0,1,1),1!=(i=r.plus(l.times(n))).cmp(e);)r=n,n=i,i=c,c=u.plus(l.times(i)),u=i,i=t,t=s.minus(l.times(i)),s=i;return i=T(e.minus(r),n,0,1,1),u=u.plus(i.times(c)),r=r.plus(i.times(n)),u.s=c.s=d.s,p=T(c,n,a,1).minus(d).abs().cmp(T(u,r,a,1).minus(d).abs())<1?[c,n]:[u,r],g.precision=f,m=!0,p},S.toHexadecimal=S.toHex=function(e,t){return Y(this,16,e,t)},S.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:O(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(m=!1,r=T(r,e,0,t,1).times(e),m=!0,I(r)):(e.s=r.s,r=e),r},S.toNumber=function(){return+this},S.toOctal=function(e,t){return Y(this,8,e,t)},S.toPower=S.pow=function(e){var t,r,n,i,a,o,s=this,u=s.constructor,c=+(e=new u(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new u(y(+s,c));if((s=new u(s)).eq(1))return s;if(n=u.precision,a=u.rounding,e.eq(1))return I(s,n,a);if((t=v(e.e/7))>=e.d.length-1&&(r=c<0?-c:c)<=9007199254740991)return i=j(u,s,r,n),e.s<0?new u(1).div(i):I(i,n,a);if((o=s.s)<0){if(tu.maxE+1||t0?o/0:0):(m=!1,u.rounding=s.s=1,r=Math.min(12,(t+"").length),(i=U(e.times(L(s,n+r)),n)).d&&C((i=I(i,n+5,1)).d,n,a)&&(t=n+10,+A((i=I(U(e.times(L(s,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=I(i,n+1,0))),i.s=o,m=!0,u.rounding=a,I(i,n,a))},S.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=k(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(O(e,1,1e9),void 0===t?t=i.rounding:O(t,0,8),r=k(n=I(new i(n),e,t),e<=n.e||n.e<=i.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r},S.toSignificantDigits=S.toSD=function(e,t){var r=this.constructor;return void 0===e?(e=r.precision,t=r.rounding):(O(e,1,1e9),void 0===t?t=r.rounding:O(t,0,8)),I(new r(this),e,t)},S.toString=function(){var e=this,t=e.constructor,r=k(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},S.truncated=S.trunc=function(){return I(new this.constructor(this),this.e+1,1)},S.valueOf=S.toJSON=function(){var e=this,t=e.constructor,r=k(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var T=function(){function e(e,t,r){var n,i=0,a=e.length;for(e=e.slice();a--;)n=e[a]*t+i,e[a]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;it[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]1;)e.shift()}return function(n,i,a,s,u,c){var f,l,p,m,h,d,y,g,x,b,w,M,E,S,A,O,C,_,T,k,z=n.constructor,q=n.s==i.s?1:-1,R=n.d,B=i.d;if(!(R&&R[0]&&B&&B[0]))return new z(n.s&&i.s&&(R?!B||R[0]!=B[0]:B)?R&&0==R[0]||!B?0*q:q/0:NaN);for(c?(h=1,l=n.e-i.e):(c=N,h=7,l=v(n.e/h)-v(i.e/h)),T=B.length,C=R.length,b=(x=new z(q)).d=[],p=0;B[p]==(R[p]||0);p++);if(B[p]>(R[p]||0)&&l--,null==a?(S=a=z.precision,s=z.rounding):S=u?a+(n.e-i.e)+1:a,S<0)b.push(1),d=!0;else{if(S=S/h+2|0,p=0,1==T){for(m=0,B=B[0],S++;(p1&&(B=e(B,m,c),R=e(R,m,c),T=B.length,C=R.length),O=T,M=(w=R.slice(0,T)).length;M=c/2&&++_;do{m=0,(f=t(B,w,T,M))<0?(E=w[0],T!=M&&(E=E*c+(w[1]||0)),(m=E/_|0)>1?(m>=c&&(m=c-1),1==(f=t(y=e(B,m,c),w,g=y.length,M=w.length))&&(m--,r(y,T=10;m/=10)p++;x.e=p+l*h-1,I(x,u?a+x.e+1:a,s,d)}return x}}();function I(e,t,r,n){var i,a,o,s,u,c,f,l,p,h=e.constructor;e:if(null!=t){if(!(l=e.d))return e;for(i=1,s=l[0];s>=10;s/=10)i++;if((a=t-i)<0)a+=7,o=t,u=(f=l[p=0])/y(10,i-o-1)%10|0;else if((p=Math.ceil((a+1)/7))>=(s=l.length)){if(!n)break e;for(;s++<=p;)l.push(0);f=u=0,i=1,o=(a%=7)-7+1}else{for(f=s=l[p],i=1;s>=10;s/=10)i++;u=(o=(a%=7)-7+i)<0?0:f/y(10,i-o-1)%10|0}if(n=n||t<0||void 0!==l[p+1]||(o<0?f:f%y(10,i-o-1)),c=r<4?(u||n)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||n||6==r&&(a>0?o>0?f/y(10,i-o):0:l[p-1])%10&1||r==(e.s<0?8:7)),t<1||!l[0])return l.length=0,c?(t-=e.e+1,l[0]=y(10,(7-t%7)%7),e.e=-t||0):l[0]=e.e=0,e;if(0==a?(l.length=p,s=1,p--):(l.length=p+1,s=y(10,7-a),l[p]=o>0?(f/y(10,i-o)%y(10,o)|0)*s:0),c)for(;;){if(0==p){for(a=1,o=l[0];o>=10;o/=10)a++;for(o=l[0]+=s,s=1;o>=10;o/=10)s++;a!=s&&(e.e++,l[0]==N&&(l[0]=1));break}if(l[p]+=s,l[p]!=N)break;l[p--]=0,s=1}for(a=l.length;0===l[--a];)l.pop()}return m&&(e.e>h.maxE?(e.d=null,e.e=NaN):e.e0?a=a.charAt(0)+"."+a.slice(1)+D(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(e.e<0?"e":"e+")+e.e):i<0?(a="0."+D(-i-1)+a,r&&(n=r-o)>0&&(a+=D(n))):i>=o?(a+=D(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+D(n))):((n=i+1)0&&(i+1===o&&(a+="."),a+=D(n))),a}function z(e,t){var r=e[0];for(t*=7;r>=10;r/=10)t++;return t}function q(e,t,r){if(t>M)throw m=!0,r&&(e.precision=r),Error("[DecimalError] Precision limit exceeded");return I(new e(f),t,1,!0)}function R(e,t,r){if(t>E)throw Error("[DecimalError] Precision limit exceeded");return I(new e(l),t,r,!0)}function B(e){var t=e.length-1,r=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function D(e){for(var t="";e--;)t+="0";return t}function j(e,t,r,n){var i,a=new e(1),o=Math.ceil(n/7+4);for(m=!1;;){if(r%2&&J((a=a.times(t)).d,o)&&(i=!0),0===(r=v(r/2))){r=a.d.length-1,i&&0===a.d[r]&&++a.d[r];break}J((t=t.times(t)).d,o)}return m=!0,a}function P(e){return 1&e.d[e.d.length-1]}function F(e,t,r){for(var n,i=new e(t[0]),a=0;++a17)return new p(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(null==t?(m=!1,u=d):u=t,s=new p(.03125);e.e>-2;)e=e.times(s),l+=5;for(u+=n=Math.log(y(2,l))/Math.LN10*2+5|0,r=a=o=new p(1),p.precision=u;;){if(a=I(a.times(e),u,1),r=r.times(++f),A((s=o.plus(T(a,r,u,1))).d).slice(0,u)===A(o.d).slice(0,u)){for(i=l;i--;)o=I(o.times(o),u,1);if(null!=t)return p.precision=d,o;if(!(c<3&&C(o.d,u-n,h,c)))return I(o,p.precision=d,h,m=!0);p.precision=u+=10,r=a=s=new p(1),f=0,c++}o=s}}function L(e,t){var r,n,i,a,o,s,u,c,f,l,p,h=1,d=e,v=d.d,y=d.constructor,g=y.rounding,x=y.precision;if(d.s<0||!v||!v[0]||!d.e&&1==v[0]&&1==v.length)return new y(v&&!v[0]?-1/0:1!=d.s?NaN:v?0:d);if(null==t?(m=!1,f=x):f=t,y.precision=f+=10,n=(r=A(v)).charAt(0),!(Math.abs(a=d.e)<15e14))return c=q(y,f+2,x).times(a+""),d=L(new y(n+"."+r.slice(1)),f-10).plus(c),y.precision=x,null==t?I(d,x,g,m=!0):d;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=A((d=d.times(e)).d)).charAt(0),h++;for(a=d.e,n>1?(d=new y("0."+r),a++):d=new y(n+"."+r.slice(1)),l=d,u=o=d=T(d.minus(1),d.plus(1),f,1),p=I(d.times(d),f,1),i=3;;){if(o=I(o.times(p),f,1),A((c=u.plus(T(o,new y(i),f,1))).d).slice(0,f)===A(u.d).slice(0,f)){if(u=u.times(2),0!==a&&(u=u.plus(q(y,f+2,x).times(a+""))),u=T(u,new y(h),f,1),null!=t)return y.precision=x,u;if(!C(u.d,f-10,g,s))return I(u,y.precision=x,g,m=!0);y.precision=f+=10,c=o=d=T(l.minus(1),l.plus(1),f,1),p=I(d.times(d),f,1),i=s=1}u=c,i+=2}}function $(e){return String(e.s*e.s/0)}function H(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;48===t.charCodeAt(n);n++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(n,i)){if(i-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%7,r<0&&(n+=7),ne.constructor.maxE?(e.d=null,e.e=NaN):e.e-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),w.test(t))return H(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(x.test(t))r=16,t=t.toLowerCase();else if(g.test(t))r=2;else{if(!b.test(t))throw Error(h+t);r=8}for((o=t.search(/p/i))>0?(c=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),s=(o=t.indexOf("."))>=0,n=e.constructor,s&&(o=(u=(t=t.replace(".","")).length)-o,i=j(n,new n(r),o,2*o)),o=l=(f=_(t,r,N)).length-1;0===f[o];--o)f.pop();return o<0?new n(0*e.s):(e.e=z(f,l),e.d=f,m=!1,s&&(e=T(e,i,4*u)),c&&(e=e.times(Math.abs(c)<54?y(2,c):a.pow(2,c))),m=!0,e)}function V(e,t,r,n,i){var a,o,s,u,c=e.precision,f=Math.ceil(c/7);for(m=!1,u=r.times(r),s=new e(n);;){if(o=T(s.times(u),new e(t++*t++),c,1),s=i?n.plus(o):n.minus(o),n=T(o.times(u),new e(t++*t++),c,1),void 0!==(o=s.plus(n)).d[f]){for(a=f;o.d[a]===s.d[a]&&a--;);if(-1==a)break}a=s,s=n,n=o,o=a}return m=!0,o.d.length=f+1,o}function Z(e,t){for(var r=e;--t;)r*=e;return r}function W(e,t){var r,n=t.s<0,i=R(e,e.precision,1),a=i.times(.5);if((t=t.abs()).lte(a))return s=n?4:1,t;if((r=t.divToInt(i)).isZero())s=n?3:2;else{if((t=t.minus(r.times(i))).lte(a))return s=P(r)?n?2:3:n?4:1,t;s=P(r)?n?1:4:n?3:2}return t.minus(i).abs()}function Y(e,t,r,n){var i,a,s,u,f,l,p,m,h,d=e.constructor,v=void 0!==r;if(v?(O(r,1,1e9),void 0===n?n=d.rounding:O(n,0,8)):(r=d.precision,n=d.rounding),e.isFinite()){for(v?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,(s=(p=k(e)).indexOf("."))>=0&&(p=p.replace(".",""),(h=new d(1)).e=p.length-s,h.d=_(k(h),10,i),h.e=h.d.length),a=f=(m=_(p,10,i)).length;0==m[--f];)m.pop();if(m[0]){if(s<0?a--:((e=new d(e)).d=m,e.e=a,m=(e=T(e,h,r,n,0,i)).d,a=e.e,l=o),s=m[r],u=i/2,l=l||void 0!==m[r+1],l=n<4?(void 0!==s||l)&&(0===n||n===(e.s<0?3:2)):s>u||s===u&&(4===n||l||6===n&&1&m[r-1]||n===(e.s<0?8:7)),m.length=r,l)for(;++m[--r]>i-1;)m[r]=0,r||(++a,m.unshift(1));for(f=m.length;!m[f-1];--f);for(s=0,p="";s1)if(16==t||8==t){for(s=16==t?4:3,--f;f%s;f++)p+="0";for(f=(m=_(p,i,t)).length;!m[f-1];--f);for(s=1,p="1.";sf)for(a-=f;a--;)p+="0";else at)return e.length=t,!0}function X(e){return new this(e).abs()}function Q(e){return new this(e).acos()}function K(e){return new this(e).acosh()}function ee(e,t){return new this(e).plus(t)}function te(e){return new this(e).asin()}function re(e){return new this(e).asinh()}function ne(e){return new this(e).atan()}function ie(e){return new this(e).atanh()}function ae(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?R(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=R(this,a,1).times(.5)).s=e.s:t.s<0?(this.precision=a,this.rounding=1,r=this.atan(T(e,t,a,1)),t=R(this,a,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(T(e,t,a,1)):(r=R(this,a,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function oe(e){return new this(e).cbrt()}function se(e){return I(e=new this(e),e.e+1,2)}function ue(e,t,r){return new this(e).clamp(t,r)}function ce(e){if(!e||"object"!=typeof e)throw Error("[DecimalError] Object expected");var t,r,n,i=!0===e.defaults,a=["precision",1,1e9,"rounding",0,8,"toExpNeg",-u,0,"toExpPos",0,u,"maxE",0,u,"minE",-u,0,"modulo",0,9];for(t=0;t=a[t+1]&&n<=a[t+2]))throw Error(h+r+": "+n);this[r]=n}if(r="crypto",i&&(this[r]=p[r]),void 0!==(n=e[r])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(h+r+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");this[r]=!0}else this[r]=!1}return this}function fe(e){return new this(e).cos()}function le(e){return new this(e).cosh()}function pe(e,t){return new this(e).div(t)}function me(e){return new this(e).exp()}function he(e){return I(e=new this(e),e.e+1,3)}function de(){var e,t,r=new this(0);for(m=!1,e=0;e=429e7?t[a]=crypto.getRandomValues(new Uint32Array(1))[0]:s[a++]=i%1e7;else{if(!crypto.randomBytes)throw Error("[DecimalError] crypto unavailable");for(t=crypto.randomBytes(n*=4);a=214e7?crypto.randomBytes(4).copy(t,a):(s.push(i%1e7),a+=4);a=n/4}else for(;a=10;i/=10)n++;n<7&&(r-=7-n)}return o.e=r,o.d=s,o}function Oe(e){return I(e=new this(e),e.e+1,this.rounding)}function Ce(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function _e(e){return new this(e).sin()}function Te(e){return new this(e).sinh()}function Ie(e){return new this(e).sqrt()}function ke(e,t){return new this(e).sub(t)}function ze(){var e=0,t=arguments,r=new this(t[e]);for(m=!1;r.s&&++ea.maxE?(i.e=NaN,i.d=null):e.e=10;r/=10)t++;return void(m?t>a.maxE?(i.e=NaN,i.d=null):t1&&(t[r]=(t[r]||0)+1):t[e]=(t[e]||0)+1,t}var u=function(e,t){var r,n=0,o=1,s=1,u=0,c=0,l=0,p=1,m=1,h=0,d=1,v=1,y=1,g=1e7;if(null==e);else if(void 0!==t){if(s=(n=e)*(o=t),n%1!=0||o%1!=0)throw f.NonIntegerParameter}else switch(typeof e){case"object":if("d"in e&&"n"in e)n=e.n,o=e.d,"s"in e&&(n*=e.s);else{if(!(0 in e))throw f.InvalidParameter;n=e[0],1 in e&&(o=e[1])}s=n*o;break;case"number":if(e<0&&(s=e,e=-e),e%1==0)n=e;else if(e>0){for(e>=1&&(e/=m=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)));d<=g&&y<=g;){if(e===(r=(h+v)/(d+y))){d+y<=g?(n=h+v,o=d+y):y>d?(n=v,o=y):(n=h,o=d);break}e>r?(h+=v,d+=y):(v+=h,y+=d),d>g?(n=v,o=y):(n=h,o=d)}n*=m}else(isNaN(e)||isNaN(t))&&(o=n=NaN);break;case"string":if(null===(d=e.match(/\d+|./g)))throw f.InvalidParameter;if("-"===d[h]?(s=-1,h++):"+"===d[h]&&h++,d.length===h+1?c=a(d[h++],s):"."===d[h+1]||"."===d[h]?("."!==d[h]&&(u=a(d[h++],s)),(++h+1===d.length||"("===d[h+1]&&")"===d[h+3]||"'"===d[h+1]&&"'"===d[h+3])&&(c=a(d[h],s),p=Math.pow(10,d[h].length),h++),("("===d[h]&&")"===d[h+2]||"'"===d[h]&&"'"===d[h+2])&&(l=a(d[h+1],s),m=Math.pow(10,d[h+1].length)-1,h+=3)):"/"===d[h+1]||":"===d[h+1]?(c=a(d[h],s),p=a(d[h+2],1),h+=3):"/"===d[h+3]&&" "===d[h+1]&&(u=a(d[h],s),c=a(d[h+2],s),p=a(d[h+4],1),h+=5),d.length<=h){s=n=l+(o=p*m)*u+m*c;break}default:throw f.InvalidParameter}if(0===o)throw f.DivisionByZero;i.s=s<0?-1:1,i.n=Math.abs(n),i.d=Math.abs(o)};function c(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function f(e,t){if(u(e,t),!(this instanceof f))return o(i.s*i.n,i.d);e=c(i.d,i.n),this.s=i.s,this.n=i.n/e,this.d=i.d/e}f.DivisionByZero=new Error("Division by Zero"),f.InvalidParameter=new Error("Invalid argument"),f.NonIntegerParameter=new Error("Parameters must be integer"),f.prototype={s:1,n:0,d:1,abs:function(){return o(this.n,this.d)},neg:function(){return o(-this.s*this.n,this.d)},add:function(e,t){return u(e,t),o(this.s*this.n*i.d+i.s*this.d*i.n,this.d*i.d)},sub:function(e,t){return u(e,t),o(this.s*this.n*i.d-i.s*this.d*i.n,this.d*i.d)},mul:function(e,t){return u(e,t),o(this.s*i.s*this.n*i.n,this.d*i.d)},div:function(e,t){return u(e,t),o(this.s*i.s*this.n*i.d,this.d*i.n)},clone:function(){return o(this.s*this.n,this.d)},mod:function(e,t){if(isNaN(this.n)||isNaN(this.d))return new f(NaN);if(void 0===e)return o(this.s*this.n%this.d,1);if(u(e,t),0===i.n&&0===this.d)throw f.DivisionByZero;return o(this.s*(i.d*this.n)%(i.n*this.d),i.d*this.d)},gcd:function(e,t){return u(e,t),o(c(i.n,this.n)*c(i.d,this.d),i.d*this.d)},lcm:function(e,t){return u(e,t),0===i.n&&0===this.n?o(0,1):o(i.n*this.n,c(i.n,this.n)*c(i.d,this.d))},ceil:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):o(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):o(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new f(NaN):o(Math.round(e*this.s*this.n/this.d),e)},inverse:function(){return o(this.s*this.d,this.n)},pow:function(e,t){if(u(e,t),1===i.d)return i.s<0?o(Math.pow(this.s*this.d,i.n),Math.pow(this.n,i.n)):o(Math.pow(this.s*this.n,i.n),Math.pow(this.d,i.n));if(this.s<0)return null;var r=s(this.n),n=s(this.d),a=1,c=1;for(var f in r)if("1"!==f){if("0"===f){a=0;break}if(r[f]*=i.n,r[f]%i.d!=0)return null;r[f]/=i.d,a*=Math.pow(f,r[f])}for(var f in n)if("1"!==f){if(n[f]*=i.n,n[f]%i.d!=0)return null;n[f]/=i.d,c*=Math.pow(f,n[f])}return i.s<0?o(c,a):o(a,c)},equals:function(e,t){return u(e,t),this.s*this.n*i.d==i.s*i.n*this.d},compare:function(e,t){u(e,t);var r=this.s*this.n*i.d-i.s*i.n*this.d;return(0=0;a--)i=i.inverse().add(r[a]);if(i.sub(t).abs().valueOf()0&&(r+=t,r+=" ",n%=i),r+=n,r+="/",r+=i),r},toLatex:function(e){var t,r="",n=this.n,i=this.d;return this.s<0&&(r+="-"),1===i?r+=n:(e&&(t=Math.floor(n/i))>0&&(r+=t,n%=i),r+="\\frac{",r+=n,r+="}{",r+=i,r+="}"),r},toContinued:function(){var e,t=this.n,r=this.d,n=[];if(isNaN(t)||isNaN(r))return n;do{n.push(Math.floor(t/r)),e=t%r,t=r,r=e}while(1!==t);return n},toString:function(e){var t=this.n,r=this.d;if(isNaN(t)||isNaN(r))return"NaN";e=e||15;var n=function(e,t){for(;t%2==0;t/=2);for(;t%5==0;t/=5);if(1===t)return 0;for(var r=10%t,n=1;1!==r;n++)if(r=10*r%t,n>2e3)return 0;return n}(0,r),i=function(e,t,r){for(var n=1,i=function(e,t,r){for(var n=1;t>0;e=e*e%r,t>>=1)1&t&&(n=n*e%r);return n}(10,r,t),a=0;a<300;a++){if(n===i)return a;n=10*n%t,i=10*i%t}return 0}(0,r,n),a=this.s<0?"-":"";if(a+=t/r|0,t%=r,(t*=10)&&(a+="."),n){for(var o=i;o--;)a+=t/r|0,t%=r,t*=10;a+="(";for(o=n;o--;)a+=t/r|0,t%=r,t*=10;a+=")"}else for(o=e;t&&o--;)a+=t/r|0,t%=r,t*=10;return a}},void 0===(n=function(){return f}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=function e(t,r){"use strict";var n,i,a=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,o=/(^[ ]*|[ ]*$)/g,s=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,u=/^0x[0-9a-f]+$/i,c=/^0/,f=function(t){return e.insensitive&&(""+t).toLowerCase()||""+t},l=f(t).replace(o,"")||"",p=f(r).replace(o,"")||"",m=l.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),h=p.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),d=parseInt(l.match(u),16)||1!==m.length&&l.match(s)&&Date.parse(l),v=parseInt(p.match(u),16)||d&&p.match(s)&&Date.parse(p)||null;if(v){if(dv)return 1}for(var y=0,g=Math.max(m.length,h.length);yi)return 1}return 0}},function(e,t,r){var n=r(66);e.exports=function(e,t){var r=e[t];return null==r?void 0:n(r)}},function(e,t,r){var n=r(1),i=r(15),a=r(89),o=n.TypeError;e.exports=function(e){if(i(e))return e;throw o(a(e)+" is not a function")}},function(e,t){e.exports=!1},function(e,t,r){var n=r(142),i=r(108).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},function(e,t,r){var n=r(9),i=r(66),a=r(86),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)}}},function(e,t,r){var n,i=r(21),a=r(152),o=r(108),s=r(77),u=r(153),c=r(92),f=r(94),l=f("IE_PROTO"),p=function(){},m=function(e){return"