UNPKG

de4js

Version:

JavaScript Deobfuscator and Unpacker

40 lines 572 kB
/** * 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 8.0.1 * @date 2020-11-09 * * @license * Copyright (C) 2013-2020 Jos de Jong <wjosdejong@gmail.com> * * 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(){try{return require("crypto")}catch(e){}}()):"function"==typeof define&&define.amd?define(["crypto"],t):"object"==typeof exports?exports.math=t(function(){try{return require("crypto")}catch(e){}}()):e.math=t(e.crypto)}(this,(function(e){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=20)}([,function(e,t,r){var n; /** * @license Complex.js v2.0.11 11/02/2016 * * Copyright (c) 2016, Robert Eisele (robert@xarg.org) * Dual licensed under the MIT or GPL Version 2 licenses. **/!function(r){"use strict";var i=function(e){return.5*(Math.exp(e)+Math.exp(-e))},a=function(e){return.5*(Math.exp(e)-Math.exp(-e))},o=function(){throw SyntaxError("Invalid Param")};function s(e,t){var r=Math.abs(e),n=Math.abs(t);return 0===e?Math.log(n):0===t?Math.log(r):r<3e3&&n<3e3?.5*Math.log(e*e+t*t):Math.log(e/Math.cos(Math.atan2(t,e)))}function u(e,t){if(!(this instanceof u))return new u(e,t);var r=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 u.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 u.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]):o();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&&o();for(var s=0;s<n.length;s++){var c=n[s];" "===c||"\t"===c||"\n"===c||("+"===c?i++:"-"===c?a++:"i"===c||"I"===c?(i+a===0&&o()," "===n[s+1]||isNaN(n[s+1])?r.im+=parseFloat((a%2?"-":"")+"1"):(r.im+=parseFloat((a%2?"-":"")+n[s+1]),s++),i=a=0):((i+a===0||isNaN(c))&&o(),"i"===n[s+1]||"I"===n[s+1]?(r.im+=parseFloat((a%2?"-":"")+c),s++):r.re+=parseFloat((a%2?"-":"")+c),i=a=0))}i+a>0&&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)<Math.abs(o)?new u((e*(i=a/o)+t)/(n=a*i+o),(t*i-e)/n):new u((e+t*(i=o/a))/(n=o*i+a),(t-e*i)/n)},pow:function(e,t){var r=new u(e,t);if(e=this.re,t=this.im,r.isZero())return u.ONE;if(0===r.im){if(0===t&&e>=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(e<-t||e>t)return Math.cos(e)-1;var r=e*e;return r*(r*(1/24+r*(-1/720+r*(1/40320+r*(-1/3628800+r*(1/4790014600+r*(-1/87178291200+r*(1/20922789888e3)))))))-.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):(r<n?(r=n,n=e/t):n=t/e,r*Math.sqrt(1+n*n));var e,t,r,n},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var e=this.re,t=this.im;return new u(Math.sin(e)*i(t),Math.cos(e)*a(t))},cos:function(){var e=this.re,t=this.im;return new u(Math.cos(e)*i(t),-Math.sin(e)*a(t))},tan:function(){var e=2*this.re,t=2*this.im,r=Math.cos(e)+i(t);return new u(Math.sin(e)/r,a(t)/r)},cot:function(){var e=2*this.re,t=2*this.im,r=Math.cos(e)-i(t);return new u(-Math.sin(e)/r,a(t)/r)},sec:function(){var e=this.re,t=this.im,r=.5*i(2*t)+.5*Math.cos(2*e);return new u(Math.cos(e)*i(t)/r,Math.sin(e)*a(t)/r)},csc:function(){var e=this.re,t=this.im,r=.5*i(2*t)-.5*Math.cos(2*e);return new u(Math.sin(e)*i(t)/r,-Math.cos(e)*a(t)/r)},asin:function(){var e=this.re,t=this.im,r=new u(t*t-e*e+1,-2*e*t).sqrt(),n=new u(r.re-t,r.im+e).log();return new u(n.im,-n.re)},acos:function(){var e=this.re,t=this.im,r=new u(t*t-e*e+1,-2*e*t).sqrt(),n=new u(r.re-t,r.im+e).log();return new u(Math.PI/2-n.im,n.re)},atan:function(){var e=this.re,t=this.im;if(0===e){if(1===t)return new u(0,1/0);if(-1===t)return new u(0,-1/0)}var r=e*e+(1-t)*(1-t),n=new u((1-t*t-e*e)/r,-2*e/r).log();return new u(-.5*n.im,.5*n.re)},acot:function(){var e=this.re,t=this.im;if(0===t)return new u(Math.atan2(1,e),0);var r=e*e+t*t;return 0!==r?new u(e/r,-t/r).atan():new u(0!==e?e/0:0,0!==t?-t/0:0).atan()},asec:function(){var e=this.re,t=this.im;if(0===e&&0===t)return new u(0,1/0);var r=e*e+t*t;return 0!==r?new u(e/r,-t/r).acos():new u(0!==e?e/0:0,0!==t?-t/0:0).acos()},acsc:function(){var e=this.re,t=this.im;if(0===e&&0===t)return new u(Math.PI/2,1/0);var r=e*e+t*t;return 0!==r?new u(e/r,-t/r).asin():new u(0!==e?e/0:0,0!==t?-t/0:0).asin()},sinh:function(){var e=this.re,t=this.im;return new u(a(e)*Math.cos(t),i(e)*Math.sin(t))},cosh:function(){var e=this.re,t=this.im;return new u(i(e)*Math.cos(t),a(e)*Math.sin(t))},tanh:function(){var e=2*this.re,t=2*this.im,r=i(e)+Math.cos(t);return new u(a(e)/r,Math.sin(t)/r)},coth:function(){var e=2*this.re,t=2*this.im,r=i(e)-Math.cos(t);return new u(a(e)/r,-Math.sin(t)/r)},csch:function(){var e=this.re,t=this.im,r=Math.cos(2*t)-i(2*e);return new u(-2*a(e)*Math.cos(t)/r,2*i(e)*Math.sin(t)/r)},sech:function(){var e=this.re,t=this.im,r=Math.cos(2*t)+i(2*e);return new u(2*i(e)*Math.cos(t)/r,-2*a(e)*Math.sin(t)/r)},asinh:function(){var e=this.im;this.im=-this.re,this.re=e;var t=this.asin();return this.re=-this.im,this.im=e,e=t.re,t.re=-t.im,t.im=e,t},acosh:function(){var e=this.acos();if(e.im<=0){var t=e.re;e.re=-e.im,e.im=t}else{t=e.im;e.im=-e.re,e.re=t}return e},atanh:function(){var e=this.re,t=this.im,r=e>1&&0===t,n=1-e,i=1+e,a=n*n+t*t,o=0!==a?new 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.isZero()?"0":this.isInfinite()?"Infinity":(0!==e&&(r+=e),0!==t&&(0!==e?r+=t<0?" - ":" + ":t<0&&(r+="-"),1!==(t=Math.abs(t))&&(r+=t),r+="i"),r||"0")},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return!(0!==this.re&&-0!==this.re||0!==this.im&&-0!==this.im)},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},u.ZERO=new u(0,0),u.ONE=new u(1,0),u.I=new u(0,1),u.PI=new u(Math.PI,0),u.E=new u(Math.E,0),u.INFINITY=new u(1/0,1/0),u.NAN=new u(NaN,NaN),u.EPSILON=1e-16,void 0===(n=function(){return u}.apply(t,[]))||(e.exports=n)}()},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,r){var n; /** * @license Fraction.js v4.0.12 09/09/2015 * http://www.xarg.org/2014/03/rational-numbers-in-javascript/ * * Copyright (c) 2015, Robert Eisele (robert@xarg.org) * Dual licensed under the MIT or GPL Version 2 licenses. **/!function(r){"use strict";var i={s:1,n:0,d:1};function a(e){function t(){var t=Error.apply(this,arguments);t.name=this.name=e,this.stack=t.stack,this.message=t.message}function r(){}return r.prototype=Error.prototype,t.prototype=new r,t}var o=p.DivisionByZero=a("DivisionByZero"),s=p.InvalidParameter=a("InvalidParameter");function u(e,t){return isNaN(e=parseInt(e,10))&&c(),e*t}function c(){throw new s}var f=function(e,t){var r,n=0,a=1,s=1,f=0,l=0,p=0,m=1,h=1,d=0,y=1,g=1,v=1,x=1e7;if(null==e);else if(void 0!==t)s=(n=e)*(a=t);else switch(typeof e){case"object":"d"in e&&"n"in e?(n=e.n,a=e.d,"s"in e&&(n*=e.s)):0 in e?(n=e[0],1 in e&&(a=e[1])):c(),s=n*a;break;case"number":if(e<0&&(s=e,e=-e),e%1==0)n=e;else if(e>0){for(e>=1&&(e/=h=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)));y<=x&&v<=x;){if(e===(r=(d+g)/(y+v))){y+v<=x?(n=d+g,a=y+v):v>y?(n=g,a=v):(n=d,a=y);break}e>r?(d+=g,y+=v):(g+=d,v+=y),y>x?(n=g,a=v):(n=d,a=y)}n*=h}else(isNaN(e)||isNaN(t))&&(a=n=NaN);break;case"string":if(null===(y=e.match(/\d+|./g))&&c(),"-"===y[d]?(s=-1,d++):"+"===y[d]&&d++,y.length===d+1?l=u(y[d++],s):"."===y[d+1]||"."===y[d]?("."!==y[d]&&(f=u(y[d++],s)),(++d+1===y.length||"("===y[d+1]&&")"===y[d+3]||"'"===y[d+1]&&"'"===y[d+3])&&(l=u(y[d],s),m=Math.pow(10,y[d].length),d++),("("===y[d]&&")"===y[d+2]||"'"===y[d]&&"'"===y[d+2])&&(p=u(y[d+1],s),h=Math.pow(10,y[d+1].length)-1,d+=3)):"/"===y[d+1]||":"===y[d+1]?(l=u(y[d],s),m=u(y[d+2],1),d+=3):"/"===y[d+3]&&" "===y[d+1]&&(f=u(y[d],s),l=u(y[d+2],s),m=u(y[d+4],1),d+=5),y.length<=d){s=n=p+(a=m*h)*f+h*l;break}default:c()}if(0===a)throw new o;i.s=s<0?-1:1,i.n=Math.abs(n),i.d=Math.abs(a)};function l(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function p(e,t){if(!(this instanceof p))return new p(e,t);f(e,t),e=p.REDUCE?l(i.d,i.n):1,this.s=i.s,this.n=i.n/e,this.d=i.d/e}p.REDUCE=1,p.prototype={s:1,n:0,d:1,abs:function(){return new p(this.n,this.d)},neg:function(){return new p(-this.s*this.n,this.d)},add:function(e,t){return f(e,t),new p(this.s*this.n*i.d+i.s*this.d*i.n,this.d*i.d)},sub:function(e,t){return f(e,t),new p(this.s*this.n*i.d-i.s*this.d*i.n,this.d*i.d)},mul:function(e,t){return f(e,t),new p(this.s*i.s*this.n*i.n,this.d*i.d)},div:function(e,t){return f(e,t),new p(this.s*i.s*this.n*i.d,this.d*i.n)},clone:function(){return new p(this)},mod:function(e,t){return isNaN(this.n)||isNaN(this.d)?new p(NaN):void 0===e?new p(this.s*this.n%this.d,1):(f(e,t),0===i.n&&0===this.d&&p(0,0),new p(this.s*(i.d*this.n)%(i.n*this.d),i.d*this.d))},gcd:function(e,t){return f(e,t),new p(l(i.n,this.n)*l(i.d,this.d),i.d*this.d)},lcm:function(e,t){return f(e,t),0===i.n&&0===this.n?new p:new p(i.n*this.n,l(i.n,this.n)*l(i.d,this.d))},ceil:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):new p(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 p(NaN):new p(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 p(NaN):new p(Math.round(e*this.s*this.n/this.d),e)},inverse:function(){return new p(this.s*this.d,this.n)},pow:function(e){return e<0?new p(Math.pow(this.s*this.d,-e),Math.pow(this.n,-e)):new p(Math.pow(this.s*this.n,e),Math.pow(this.d,e))},equals:function(e,t){return f(e,t),this.s*this.n*i.d==i.s*i.n*this.d},compare:function(e,t){f(e,t);var r=this.s*this.n*i.d-i.s*i.n*this.d;return(0<r)-(r<0)},simplify:function(e){if(isNaN(this.n)||isNaN(this.d))return this;var t=this.abs().toContinued();function r(e){return 1===e.length?new p(e[0]):r(e.slice(1)).inverse().add(e[0])}e=e||.001;for(var n=0;n<t.length;n++){var i=r(t.slice(0,n+1));if(i.sub(this.abs()).abs().valueOf()<e)return i.mul(this.s)}return this},divisible:function(e,t){return f(e,t),!(!(i.n*this.d)||this.n*i.d%(i.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var t,r="",n=this.n,i=this.d;return this.s<0&&(r+="-"),1===i?r+=n:(e&&(t=Math.floor(n/i))>0&&(r+=t,r+=" ",n%=i),r+=n,r+="/",r+=i),r},toLatex:function(e){var t,r="",n=this.n,i=this.d;return this.s<0&&(r+="-"),1===i?r+=n:(e&&(t=Math.floor(n/i))>0&&(r+=t,n%=i),r+="\\frac{",r+=n,r+="}{",r+=i,r+="}"),r},toContinued:function(){var e,t=this.n,r=this.d,n=[];if(isNaN(this.n)||isNaN(this.d))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,r=this.n,n=this.d;if(isNaN(r)||isNaN(n))return"NaN";p.REDUCE||(r/=t=l(r,n),n/=t),e=e||15;var i=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,n),a=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,n,i),o=-1===this.s?"-":"";if(o+=r/n|0,r%=n,(r*=10)&&(o+="."),i){for(var s=a;s--;)o+=r/n|0,r%=n,r*=10;o+="(";for(s=i;s--;)o+=r/n|0,r%=n,r*=10;o+=")"}else for(s=e;r&&s--;)o+=r/n|0,r%=n,r*=10;return o}},void 0===(n=function(){return p}.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),y=parseInt(p.match(u),16)||d&&p.match(s)&&Date.parse(p)||null;if(y){if(d<y)return-1;if(d>y)return 1}for(var g=0,v=Math.max(m.length,h.length);g<v;g++){if(n=!(m[g]||"").match(c)&&parseFloat(m[g])||m[g]||0,i=!(h[g]||"").match(c)&&parseFloat(h[g])||h[g]||0,isNaN(n)!==isNaN(i))return isNaN(n)?1:-1;if(typeof n!=typeof i&&(n+="",i+=""),n<i)return-1;if(n>i)return 1}return 0}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){(function(t){e.exports=t}).call(this,{})},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=Math.floor,y=Math.pow,g=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,v=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,x=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,b=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,w=1e7,N=f.length-1,M=l.length-1,S={name:"[object Decimal]"};function E(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)(r=7-(n=e[t]+"").length)&&(a+=D(r)),a+=n;(r=7-(n=(o=e[t])+"").length)&&(a+=D(r))}else if(0===o)return"0";for(;o%10==0;)o/=10;return a+o}function A(e,t,r){if(e!==~~e||e<t||e>r)throw Error(h+e)}function O(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 C(e,t,r){for(var n,i,a=[0],o=0,s=e.length;o<s;){for(i=a.length;i--;)a[i]*=t;for(a[0]+=c.indexOf(e.charAt(o++)),n=0;n<a.length;n++)a[n]>r-1&&(void 0===a[n+1]&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}S.absoluteValue=S.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),T(e)},S.ceil=function(){return T(new this.constructor(this),this.e+1,2)},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;t<r;++t)if(o[t]!==s[t])return o[t]>s[t]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1},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=t.d.length;i<32?(r=Math.ceil(i/3),n=(1/V(4,r)).toString()):(r=16,n="2.3283064365386962890625e-10");e.precision+=r,t=G(e,1,t.times(n),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,Z(n,r)),n.precision=e,n.rounding=t,T(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=E(f.d),(a=((e=f.e)-r.length+1)%3)&&(r+=1==a||-2==a?"0":"00"),a=y(r,1/3),e=d((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=_(c.plus(f).times(s),c.plus(u),o+2,1),E(s.d).slice(0,o)===(r=E(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))||(T(n,e+1,1),t=!n.times(n).times(n).eq(f));break}if(!i&&(T(s,e+1,0),s.times(s).times(s).eq(f))){n=s;break}o+=4,i=1}return m=!0,T(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)-d(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 _(this,new this.constructor(e))},S.dividedToIntegerBy=S.divToInt=function(e){var t=this.constructor;return 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 T(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/V(4,e=Math.ceil(i/3))).toString():(e=16,t="2.3283064365386962890625e-10"),a=G(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 T(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=G(a,2,i,i,!0);else{e=(e=1.4*Math.sqrt(n))>16?16:0|e,i=G(a,2,i=i.times(1/V(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,T(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,_(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()?I(r,i,a):new r(0):new r(NaN):t.isZero()?I(r,i+4,a).times(.5):(r.precision=i+6,r.rounding=1,t=t.asin(),e=I(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?T(new a(i),e,t,!0):(a.precision=r=n-i.e,i=_(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=I(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<=M)return(o=I(f,l+4,p).times(.25)).s=c.s,o}else{if(!c.s)return new f(NaN);if(l+4<=M)return(o=I(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<<r-1)),m=!0,T(o,f.precision=l,f.rounding=p,!0)},S.isFinite=function(){return!!this.d},S.isInteger=S.isInt=function(){return!!this.d&&d(this.e/7)>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=F(this,s=f+5),n=t?k(c,s+10):F(e,s),O((u=_(o,n,s,1)).d,i=f,l))do{if(o=F(this,s+=10),n=t?k(c,s+10):F(e,s),u=_(o,n,s,1),!a){+E(u.d).slice(i+1,i+15)+1==1e14&&(u=T(u,f+1,0));break}}while(O(u.d,i+=10,l));return m=!0,T(u,f,l)},S.minus=S.sub=function(e){var t,r,n,i,a,o,s,u,c,f,l,p,h=this,y=h.constructor;if(e=new y(e),!h.d||!e.d)return h.s&&e.s?h.d?e.s=-e.s:e=new y(e.d||h.s!==e.s?h:NaN):e=new y(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.plus(e);if(c=h.d,p=e.d,s=y.precision,u=y.rounding,!c[0]||!p[0]){if(p[0])e.s=-e.s;else{if(!c[0])return new y(3===u?-0:0);e=new y(h)}return m?T(e,s,u):e}if(r=d(e.e/7),f=d(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;n<o;n++)if(c[n]!=p[n]){l=c[n]<p[n];break}a=0}for(l&&(t=c,c=p,p=t,e.s=-e.s),o=c.length,n=p.length-o;n>0;--n)c[o++]=0;for(n=p.length;n>a;){if(c[--n]<p[n]){for(i=n;i&&0===c[--i];)c[i]=w-1;--c[i],c[n]+=w}c[n]-=p[n]}for(;0===c[--o];)c.pop();for(;0===c[0];c.shift())--r;return c[0]?(e.d=c,e.e=z(c,r),m?T(e,s,u):e):new y(3===u?-0:0)},S.modulo=S.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?T(new n(r),n.precision,n.rounding):(m=!1,9==n.modulo?(t=_(r,e.abs(),0,3,1)).s*=e.s:t=_(r,e,0,n.modulo,1),t=t.times(e),m=!0,r.minus(t))},S.naturalExponential=S.exp=function(){return U(this)},S.naturalLogarithm=S.ln=function(){return F(this)},S.negated=S.neg=function(){var e=new this.constructor(this);return e.s=-e.s,T(e)},S.plus=S.add=function(e){var t,r,n,i,a,o,s,u,c,f,l=this,p=l.constructor;if(e=new p(e),!l.d||!e.d)return l.s&&e.s?l.d||(e=new p(e.d||l.s===e.s?l:NaN)):e=new p(NaN),e;if(l.s!=e.s)return e.s=-e.s,l.minus(e);if(c=l.d,f=e.d,s=p.precision,u=p.rounding,!c[0]||!f[0])return f[0]||(e=new p(l)),m?T(e,s,u):e;if(a=d(l.e/7),n=d(e.e/7),c=c.slice(),i=a-n){for(i<0?(r=c,i=-i,o=f.length):(r=f,n=a,o=c.length),i>(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)/w|0,c[i]%=w;for(t&&(c.unshift(t),++n),o=c.length;0==c[--o];)c.pop();return e.d=c,e.e=z(c,n),m?T(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 T(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 G(e,2,t,t);r=(r=1.4*Math.sqrt(n))>16?16:0|r,t=t.times(1/V(5,r)),t=G(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,Z(n,r)),n.precision=e,n.rounding=t,T(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=E(s)).length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=d((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(_(o,a,r+2,1)).times(.5),E(a.d).slice(0,r)===(t=E(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))||(T(n,u+1,1),e=!n.times(n).eq(o));break}if(!i&&(T(a,u+1,0),a.times(a).eq(o))){n=a;break}r+=4,i=1}return m=!0,T(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=_(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,T(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=d(f.e/7)+d(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%w|0,t=s/w|0;a[i]=(a[i]+t)%w|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=z(a,r),m?T(e,l.precision,l.rounding):e},S.toBinary=function(e,t){return W(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:(A(e,0,1e9),void 0===t?t=n.rounding:A(t,0,8),T(r,e+r.e+1,t))},S.toExponential=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=q(n,!0):(A(e,0,1e9),void 0===t?t=i.rounding:A(t,0,8),r=q(n=T(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=q(i):(A(e,0,1e9),void 0===t?t=a.rounding:A(t,0,8),r=q(n=T(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,g=d.d,v=d.constructor;if(!g)return new v(d);if(c=r=new v(1),n=u=new v(0),o=(a=(t=new v(n)).e=B(g)-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 v(e)).isInt()||s.lt(c))throw Error(h+s);e=s.gt(t)?a>0?t:c:s}for(m=!1,s=new v(E(g)),f=v.precision,v.precision=a=7*g.length*2;l=_(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=_(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=_(c,n,a,1).minus(d).abs().cmp(_(u,r,a,1).minus(d).abs())<1?[c,n]:[u,r],v.precision=f,m=!0,p},S.toHexadecimal=S.toHex=function(e,t){return W(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:A(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=_(r,e,0,t,1).times(e),m=!0,T(r)):(e.s=r.s,r=e),r},S.toNumber=function(){return+this},S.toOctal=function(e,t){return W(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 T(s,n,a);if((t=d(e.e/7))>=e.d.length-1&&(r=c<0?-c:c)<=9007199254740991)return i=R(u,s,r,n),e.s<0?new u(1).div(i):T(i,n,a);if((o=s.s)<0){if(t<e.d.length-1)return new u(NaN);if(0==(1&e.d[t])&&(o=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=o,s}return(t=0!=(r=y(+s,c))&&isFinite(r)?new u(r+"").e:d(c*(Math.log("0."+E(s.d))/Math.LN10+s.e+1)))>u.maxE+1||t<u.minE-1?new u(t>0?o/0:0):(m=!1,u.rounding=s.s=1,r=Math.min(12,(t+"").length),(i=U(e.times(F(s,n+r)),n)).d&&O((i=T(i,n+5,1)).d,n,a)&&(t=n+10,+E((i=T(U(e.times(F(s,t+r)),t),t+5,1)).d).slice(n+1,n+15)+1==1e14&&(i=T(i,n+1,0))),i.s=o,m=!0,u.rounding=a,T(i,n,a))},S.toPrecision=function(e,t){var r,n=this,i=n.constructor;return void 0===e?r=q(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(A(e,1,1e9),void 0===t?t=i.rounding:A(t,0,8),r=q(n=T(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):(A(e,1,1e9),void 0===t?t=r.rounding:A(t,0,8)),T(new r(this),e,t)},S.toString=function(){var e=this,t=e.constructor,r=q(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r},S.truncated=S.trunc=function(){return T(new this.constructor(this),this.e+1,1)},S.valueOf=S.toJSON=function(){var e=this,t=e.constructor,r=q(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};var _=function(){function e(e,t,r){var n,i=0,a=e.length;for(e=e.slice();a--;)n=e[a]*t+i,e[a]=n%r|0,i=n/r|0;return i&&e.unshift(i),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;)e.shift()}return function(n,i,a,s,u,c){var f,l,p,m,h,y,g,v,x,b,N,M,S,E,A,O,C,_,q,z,k=n.constructor,I=n.s==i.s?1:-1,B=n.d,D=i.d;if(!(B&&B[0]&&D&&D[0]))return new k(n.s&&i.s&&(B?!D||B[0]!=D[0]:D)?B&&0==B[0]||!D?0*I:I/0:NaN);for(c?(h=1,l=n.e-i.e):(c=w,h=7,l=d(n.e/h)-d(i.e/h)),q=D.length,C=B.length,b=(x=new k(I)).d=[],p=0;D[p]==(B[p]||0);p++);if(D[p]>(B[p]||0)&&l--,null==a?(E=a=k.precision,s=k.rounding):E=u?a+(n.e-i.e)+1:a,E<0)b.push(1),y=!0;else{if(E=E/h+2|0,p=0,1==q){for(m=0,D=D[0],E++;(p<C||m)&&E--;p++)A=m*c+(B[p]||0),b[p]=A/D|0,m=A%D|0;y=m||p<C}else{for((m=c/(D[0]+1)|0)>1&&(D=e(D,m,c),B=e(B,m,c),q=D.length,C=B.length),O=q,M=(N=B.slice(0,q)).length;M<q;)N[M++]=0;(z=D.slice()).unshift(0),_=D[0],D[1]>=c/2&&++_;do{m=0,(f=t(D,N,q,M))<0?(S=N[0],q!=M&&(S=S*c+(N[1]||0)),(m=S/_|0)>1?(m>=c&&(m=c-1),1==(f=t(g=e(D,m,c),N,v=g.length,M=N.length))&&(m--,r(g,q<v?z:D,v,c))):(0==m&&(f=m=1),g=D.slice()),(v=g.length)<M&&g.unshift(0),r(N,g,M,c),-1==f&&(f=t(D,N,q,M=N.length))<1&&(m++,r(N,q<M?z:D,M,c)),M=N.length):0===f&&(m++,N=[0]),b[p++]=m,f&&N[0]?N[M++]=B[O]||0:(N=[B[O]],M=1)}while((O++<C||void 0!==N[0])&&E--);y=void 0!==N[0]}b[0]||b.shift()}if(1==h)x.e=l,o=y;else{for(p=1,m=b[0];m>=10;m/=10)p++;x.e=p+l*h-1,T(x,u?a+x.e+1:a,s,y)}return x}}();function T(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]==w&&(l[0]=1));break}if(l[p]+=s,l[p]!=w)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.e<h.minE&&(e.e=0,e.d=[0])),e}function q(e,t,r){if(!e.isFinite())return L(e);var n,i=e.e,a=E(e.d),o=a.length;return t?(r&&(n=r-o)>0?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)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>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 k(e,t,r){if(t>N)throw m=!0,r&&(e.precision=r),Error("[DecimalError] Precision limit exceeded");return T(new e(f),t,1,!0)}function I(e,t,r){if(t>M)throw Error("[DecimalError] Precision limit exceeded");return T(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 R(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=d(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 j(e){return 1&e.d[e.d.length-1]}function P(e,t,r){for(var n,i=new e(t[0]),a=0;++a<t.length;){if(!(n=new e(t[a])).s){i=n;break}i[r](n)&&(i=n)}return i}function U(e,t){var r,n,i,a,o,s,u,c=0,f=0,l=0,p=e.constructor,h=p.rounding,d=p.precision;if(!e.d||!e.d[0]||e.e>17)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=T(a.times(e),u,1),r=r.times(++f),E((s=o.plus(_(a,r,u,1))).d).slice(0,u)===E(o.d).slice(0,u)){for(i=l;i--;)o=T(o.times(o),u,1);if(null!=t)return p.precision=d,o;if(!(c<3&&O(o.d,u-n,h,c)))return T(o,p.precision=d,h,m=!0);p.precision=u+=10,r=a=s=new p(1),f=0,c++}o=s}}function F(e,t){var r,n,i,a,o,s,u,c,f,l,p,h=1,d=e,y=d.d,g=d.constructor,v=g.rounding,x=g.precision;if(d.s<0||!y||!y[0]||!d.e&&1==y[0]&&1==y.length)return new g(y&&!y[0]?-1/0:1!=d.s?NaN:y?0:d);if(null==t?(m=!1,f=x):f=t,g.precision=f+=10,n=(r=E(y)).charAt(0),!(Math.abs(a=d.e)<15e14))return c=k(g,f+2,x).times(a+""),d=F(new g(n+"."+r.slice(1)),f-10).plus(c),g.precision=x,null==t?T(d,x,v,m=!0):d;for(;n<7&&1!=n||1==n&&r.charAt(1)>3;)n=(r=E((d=d.times(e)).d)).charAt(0),h++;for(a=d.e,n>1?(d=new g("0."+r),a++):d=new g(n+"."+r.slice(1)),l=d,u=o=d=_(d.minus(1),d.plus(1),f,1),p=T(d.times(d),f,1),i=3;;){if(o=T(o.times(p),f,1),E((c=u.plus(_(o,new g(i),f,1))).d).slice(0,f)===E(u.d).slice(0,f)){if(u=u.times(2),0!==a&&(u=u.plus(k(g,f+2,x).times(a+""))),u=_(u,new g(h),f,1),null!=t)return g.precision=x,u;if(!O(u.d,f-10,v,s))return T(u,g.precision=x,v,m=!0);g.precision=f+=10,c=o=d=_(l.minus(1),l.plus(1),f,1),p=T(d.times(d),f,1),i=s=1}u=c,i+=2}}function L(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),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=7;n<i;)e.d.push(+t.slice(n,n+=7));n=7-(t=t.slice(n)).length}else n-=i;for(;n--;)t+="0";e.d.push(+t),m&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function $(e,t){var r,n,i,o,s,u,c,f,l;if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(v.test(t))r=16,t=t.toLowerCase();else if(g.test(t))r=2;else{if(!x.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=R(n,new n(r),o,2*o)),o=l=(f=C(t,r,w)).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=_(e,i,4*u)),c&&(e=e.times(Math.abs(c)<54?y(2,c):a.pow(2,c))),m=!0,e)}function G(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=_(s.times(u),new e(t++*t++),c,1),s=i?n.plus(o):n.minus(o),n=_(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 V(e,t){for(var r=e;--t;)r*=e;return r}function Z(e,t){var r,n=t.s<0,i=I(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=j(r)?n?2:3:n?4:1,t;s=j(r)?n?1:4:n?3:2}return t.minus(i).abs()}function W(e,t,r,n){var i,a,s,u,f,l,p,m,h,d=e.constructor,y=void 0!==r;if(y?(A(r,1,1e9),void 0===n?n=d.rounding:A(n,0,8)):(r=d.precision,n=d.rounding),e.isFinite()){for(y?(i=2,16==t?r=4*r-3:8==t&&(r=3*r-2)):i=t,(s=(p=q(e)).indexOf("."))>=0&&(p=p.replace(".",""),(h=new d(1)).e=p.length-s,h.d=C(q(h),10,i),h.e=h.d.length),a=f=(m=C(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=_(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="";s<f;s++)p+=c.charAt(m[s]);if(y){if(f>1)if(16==t||8==t){for(s=16==t?4:3,--f;f%s;f++)p+="0";for(f=(m=C(p,i,t)).length;!m[f-1];--f);for(s=1,p="1.";s<f;s++)p+=c.charAt(m[s])}else p=p.charAt(0)+"."+p.slice(1);p=p+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)p="0"+p;p="0."+p}else if(++a>f)for(a-=f;a--;)p+="0";else a<f&&(p=p.slice(0,a)+"."+p.slice(a))}else p=y?"0p+0":"0";p=(16==t?"0x":2==t?"0b":8==t?"0o":"")+p}else p=L(e);return e.s<0?"-"+p:p}function J(e,t){if(e.length>t)return e.length=t,!0}function Y(e){return new this(e).abs()}function X(e){return new this(e).acos()}function Q(e){return new this(e).acosh()}function K(e,t){return new this(e).plus(t)}function ee(e){return new this(e).asin()}function te(e){return new this(e).asinh()}function re(e){return new this(e).atan()}function ne(e){return new this(e).atanh()}function ie(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?I(this,n,i):new this(0)).s=e.s:!e.d||t.isZero()?(r=I(this,a,1).times(.5)).s=e.s:t.s<0?(this.precision=a,this.rounding=1,r=this.atan(_(e,t,a,1)),t=I(this,a,1),this.precision=n,this.rounding=i,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(_(e,t,a,1)):(r=I(this,a,1).times(t.s>0?.25:.75)).s=e.s:r=new this(NaN),r}function ae(e){return new this(e).cbrt()}function oe(e){return T(e=new this(e),e.e+1,2)}function se(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.length;t+=3)if(r=a[t],i&&(this[r]=p[r]),void 0!==(n=e[r])){if(!(d(n)===n&&n>=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 ue(e){return new this(e).cos()}function ce(e){return new this(e).cosh()}function fe(e,t){return new this(e).div(t)}function le(e){return new this(e).exp()}function pe(e){return T(e=new this(e),e.e+1,3)}function me(){var e,t,r=new this(0);for(m=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return m=!0,new this(1/0);r=t}return m=!0,r.sqrt()}function he(e){return e instanceof a||e&&"[object Decimal]"===e.name||!1}function de(e){return new this(e).ln()}function ye(e,t){return new this(e).log(t)}function ge(e){return new this(e).log(2)}function ve(e){return new this(e).log(10)}function xe(){return P(this,arguments,"lt")}function be(){return P(this,arguments,"gt")}function we(e,t){return new this(e).mod(t)}function Ne(e,t){return new this(e).mul(t)}function Me(e,t){return new this(e).pow(t)}function Se(e){var t,r,n,i,a=0,o=new this(1),s=[];if(void 0===e?e=this.precision:A(e,1,1e9),n=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));a<n;)(i=t[a])>=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<n;)(i=t[a]+(t[a+1]<<8)+(t[a+2]<<16)+((127&t[a+3])<<24))>=214e7?crypto.randomBytes(4).copy(t,a):(s.push(i%1e7),a+=4);a=n/4}else for(;a<n;)s[a++]=1e7*Math.random()|0;for(e%=7,(n=s[--a])&&e&&(i=y(10,7-e),s[a]=(n/i|0)*i);0===s[a];a--)s.pop();if(a<0)r=0,s=[0];else{for(r=-1;0===s[0];r-=7)s.shift();for(n=1,i=s[0];i>=10;i/=10)n++;n<7&&(r-=7-n)}return o.e=r,o.d=s,o}function Ee(e){return T(e=new this(e),e.e+1,this.rounding)}function Ae(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function Oe(e){return new this(e).sin()}function Ce(e){return new this(e).sinh()}function _e(e){return new this(e).sqrt()}function Te(e,t){return new this(e).sub(t)}function qe(e){return new this(e).tan()}function ze(e){return new this(e).tanh()}function ke(e){return T(e=new this(e),e.e+1,1)}(a=function e(t){var r,n,i;function a(e){var t,r,n,i=this;if(!(i instanceof a))return new a(e);if(i.constructor=a,e instanceof a)return i.s=e.s,void(m?!e.d||e.e>a.maxE?(i.e=NaN,i.d=null):e.e<a.minE?(i.e=0,i.d=[0]):(i.e=e.e,i.d=e.d.slice()):(i.e=e.e,i.d=e.d?e.d.slice():e.d));if("number"===(n=typeof e)){if(0===e)return i.s=1/e<0?-1:1,i.e=0,void(i.d=[0]);if(e<0?(e=-e,i.s=-1):i.s=1,e===~~e&&e<1e7){for(t=0,r=e;r>=10;r/=10)t++;return void(m?t>a.maxE?(i.e=NaN,i.d=null):t<a.minE?(i.e=0,i.d=[0]):(i.e=t,i.d=[e]):(i.e=t,i.d=[e]))}return 0*e!=0?(e||(i.s=NaN),i.e=NaN,void(i.d=null)):H(i,e.toString())}if("string"!==n)throw Error(h+e);return 45===(r=e.charCodeAt(0))?(e=e.slice(1),i.s=-1):(43===r&&(e=e.slice(1)),i.s=1),b.test(e)?H(i,e):$(i,e)}if(a.prototype=S,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=se,a.clone=e,a.isDecimal=he,a.abs=Y,a.acos=X,a.acosh=Q,a.add=K,a.asin=ee,a.asinh=te,a.atan=re,a.atanh=ne,a.atan2=ie,a.cbrt=ae,a.ceil=oe,a.cos=ue,a.cosh=ce,a.div=fe,a.exp=le,a.floor=pe,a.hypot=me,a.ln=de,a.log=ye,a.log10=ve,a.log2=ge,a.max=xe,a.min=be,a.mod=we,a.mul=Ne,a.pow=Me,a.random=Se,a.round=Ee,a.sign=Ae,a.sin=Oe,a.sinh=Ce,a.sqrt=_e,a.sub=Te,a.tan=qe,a.tanh=ze,a.trunc=ke,void 0===t&&(t={}),t&&!0!==t.defaults)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],r=0;r<i.length;)t.hasOwnProperty(n=i[r++])||(t[n]=this[n]);return a.config(t),a}(p)).default=a.Decimal=a,f=new a(f),l=new a(l),void 0===(n=function(){return a}.call(t,r,t,e))||(e.exports=n)}()},function(e,t,r){"use strict";var n,i,a;i=[],void 0===(a="function"==typeof(n=function(){function e(){return!0}function t(){return!1}function r(){}return function n(){var i=[{name:"number",test:function(e){return"number"==typeof e}},{name:"string",test:function(e){return"string"==typeof e}},{name:"boolean",test:function(e){return"boolean"==typeof e}},{name:"Function",test:function(e){return"function"==typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:function(e){return"object"==typeof e&&null!==e&&e.constructor===Object}},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],a={name:"any",test:e},o=[],s=[],u={type