1var k=20,_=1,v=1e6,S=1e6,L=-7,O=21,U=!1,M="[big.js] ",m=M+"Invalid ",B=m+"decimal places",T=m+"rounding mode",F=M+"Division by zero",h={},b=void 0,V=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function j(){function r(e){var t=this;if(!(t instanceof r))return e===b?j():new r(e);if(e instanceof r)t.s=e.s,t.e=e.e,t.c=e.c.slice();else{if(typeof e!="string"){if(r.strict===!0&&typeof e!="bigint")throw TypeError(m+"value");e=e===0&&1/e<0?"-0":String(e)}d(t,e)}t.constructor=r}return r.prototype=h,r.DP=k,r.RM=_,r.NE=L,r.PE=O,r.strict=U,r.roundDown=0,r.roundHalfUp=1,r.roundHalfEven=2,r.roundUp=3,r}function d(r,e){var t,i,n;if(!V.test(e))throw Error(m+"number");for(r.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(t=e.indexOf("."))>-1&&(e=e.replace(".","")),(i=e.search(/e/i))>0?(t<0&&(t=i),t+=+e.slice(i+1),e=e.substring(0,i)):t<0&&(t=e.length),n=e.length,i=0;i<n&&e.charAt(i)=="0";)++i;if(i==n)r.c=[r.e=0];else{for(;n>0&&e.charAt(--n)=="0";);for(r.e=t-i-1,r.c=[],t=0;i<=n;)r.c[t++]=+e.charAt(i++)}return r}function N(r,e,t,i){var n=r.c;if(t===b&&(t=r.constructor.RM),t!==0&&t!==1&&t!==2&&t!==3)throw Error(T);if(e<1)i=t===3&&(i||!!n[0])||e===0&&(t===1&&n[0]>=5||t===2&&(n[0]>5||n[0]===5&&(i||n[1]!==b))),n.length=1,i?(r.e=r.e-e+1,n[0]=1):n[0]=r.e=0;else if(e<n.length){if(i=t===1&&n[e]>=5||t===2&&(n[e]>5||n[e]===5&&(i||n[e+1]!==b||n[e-1]&1))||t===3&&(i||!!n[0]),n.length=e,i){for(;++n[--e]>9;)if(n[e]=0,e===0){++r.e,n.unshift(1);break}}for(e=n.length;!n[--e];)n.pop()}return r}function x(r,e,t){var i=r.e,n=r.c.join(""),f=n.length;if(e)n=n.charAt(0)+(f>1?"."+n.slice(1):"")+(i<0?"e":"e+")+i;else if(i<0){for(;++i;)n="0"+n;n="0."+n}else if(i>0)if(++i>f)for(i-=f;i--;)n+="0";else i<f&&(n=n.slice(0,i)+"."+n.slice(i));else f>1&&(n=n.charAt(0)+"."+n.slice(1));return r.s<0&&t?"-"+n:n}h.abs=function(){var r=new this.constructor(this);return r.s=1,r};h.cmp=function(r){var e,t=this,i=t.c,n=(r=new t.constructor(r)).c,f=t.s,u=r.s,o=t.e,c=r.e;if(!i[0]||!n[0])return i[0]?f:n[0]?-u:0;if(f!=u)return f;if(e=f<0,o!=c)return o>c^e?1:-1;for(u=(o=i.length)<(c=n.length)?o:c,f=-1;++f<u;)if(i[f]!=n[f])return i[f]>n[f]^e?1:-1;return o==c?0:o>c^e?1:-1};h.div=function(r){var e=this,t=e.constructor,i=e.c,n=(r=new t(r)).c,f=e.s==r.s?1:-1,u=t.DP;if(u!==~~u||u<0||u>v)throw Error(B);if(!n[0])throw Error(F);if(!i[0])return r.s=f,r.c=[r.e=0],r;var o,c,s,E,l,p=n.slice(),A=o=n.length,q=i.length,a=i.slice(0,o),g=a.length,D=r,R=D.c=[],I=0,P=u+(D.e=e.e-r.e)+1;for(D.s=f,f=P<0?0:P,p.unshift(0);g++<o;)a.push(0);do{for(s=0;s<10;s++){if(o!=(g=a.length))E=o>g?1:-1;else for(l=-1,E=0;++l<o;)if(n[l]!=a[l]){E=n[l]>a[l]?1:-1;break}if(E<0){for(c=g==o?n:p;g;){if(a[--g]<c[g]){for(l=g;l&&!a[--l];)a[l]=9;--a[l],a[g]+=10}a[g]-=c[g]}for(;!a[0];)a.shift()}else break}R[I++]=E?s:++s,a[0]&&E?a[g]=i[A]||0:a=[i[A]]}while((A++<q||a[0]!==b)&&f--);return!R[0]&&I!=1&&(R.shift(),D.e--,P--),I>P&&N(D,P,t.RM,a[0]!==b),D};h.eq=function(r){return this.cmp(r)===0};h.gt=function(r){return this.cmp(r)>0};h.gte=function(r){return this.cmp(r)>-1};h.lt=function(r){return this.cmp(r)<0};h.lte=function(r){return this.cmp(r)<1};h.minus=h.sub=function(r){var e,t,i,n,f=this,u=f.constructor,o=f.s,c=(r=new u(r)).s;if(o!=c)return r.s=-c,f.plus(r);var s=f.c.slice(),E=f.e,l=r.c,p=r.e;if(!s[0]||!l[0])return l[0]?r.s=-c:s[0]?r=new u(f):r.s=1,r;if(o=E-p){for((n=o<0)?(o=-o,i=s):(p=E,i=l),i.reverse(),c=o;c--;)i.push(0);i.reverse()}else for(t=((n=s.length<l.length)?s:l).length,o=c=0;c<t;c++)if(s[c]!=l[c]){n=s[c]<l[c];break}if(n&&(i=s,s=l,l=i,r.s=-r.s),(c=(t=l.length)-(e=s.length))>0)for(;c--;)s[e++]=0;for(c=e;t>o;){if(s[--t]<l[t]){for(e=t;e&&!s[--e];)s[e]=9;--s[e],s[t]+=10}s[t]-=l[t]}for(;s[--c]===0;)s.pop();for(;s[0]===0;)s.shift(),--p;return s[0]||(r.s=1,s=[p=0]),r.c=s,r.e=p,r};h.mod=function(r){var e,t=this,i=t.constructor,n=t.s,f=(r=new i(r)).s;if(!r.c[0])throw Error(F);return t.s=r.s=1,e=r.cmp(t)==1,t.s=n,r.s=f,e?new i(t):(n=i.DP,f=i.RM,i.DP=i.RM=0,t=t.div(r),i.DP=n,i.RM=f,this.minus(t.times(r)))};h.neg=function(){var r=new this.constructor(this);return r.s=-r.s,r};h.plus=h.add=function(r){var e,t,i,n=this,f=n.constructor;
1if(r=new f(r),n.s!=r.s)return r.s=-r.s,n.minus(r);var u=n.e,o=n.c,c=r.e,s=r.c;if(!o[0]||!s[0])return s[0]||(o[0]?r=new f(n):r.s=n.s),r;if(o=o.slice(),e=u-c){for(e>0?(c=u,i=s):(e=-e,i=o),i.reverse();e--;)i.push(0);i.reverse()}for(o.length-s.length<0&&(i=s,s=o,o=i),e=s.length,t=0;e;o[e]%=10)t=(o[--e]=o[e]+s[e]+t)/10|0;for(t&&(o.unshift(t),++c),e=o.length;o[--e]===0;)o.pop();return r.c=o,r.e=c,r};h.pow=function(r){var e=this,t=new e.constructor("1"),i=t,n=r<0;if(r!==~~r||r<-S||r>S)throw Error(m+"exponent");for(n&&(r=-r);r&1&&(i=i.times(e)),r>>=1,!!r;)e=e.times(e);return n?t.div(i):i};h.prec=function(r,e){if(r!==~~r||r<1||r>v)throw Error(m+"precision");return N(new this.constructor(this),r,e)};h.round=function(r,e){if(r===b)r=0;else if(r!==~~r||r<-v||r>v)throw Error(B);return N(new this.constructor(this),r+this.e+1,e)};h.sqrt=function(){var r,e,t,i=this,n=i.constructor,f=i.s,u=i.e,o=new n("0.5");if(!i.c[0])return new n(i);if(f<0)throw Error(M+"No square root");f=Math.sqrt(+x(i,!0,!0)),f===0||f===1/0?(e=i.c.join(""),e.length+u&1||(e+="0"),f=Math.sqrt(e),u=((u+1)/2|0)-(u<0||u&1),r=new n((f==1/0?"5e":(f=f.toExponential()).slice(0,f.indexOf("e")+1))+u)):r=new n(f+""),u=r.e+(n.DP+=4);do t=r,r=o.times(t.plus(i.div(t)));while(t.c.slice(0,u).join("")!==r.c.slice(0,u).join(""));return N(r,(n.DP-=4)+r.e+1,n.RM)};h.times=h.mul=function(r){var e,t=this,i=t.constructor,n=t.c,f=(r=new i(r)).c,u=n.length,o=f.length,c=t.e,s=r.e;if(r.s=t.s==r.s?1:-1,!n[0]||!f[0])return r.c=[r.e=0],r;for(r.e=c+s,u<o&&(e=n,n=f,f=e,s=u,u=o,o=s),e=new Array(s=u+o);s--;)e[s]=0;for(c=o;c--;){for(o=0,s=u+c;s>c;)o=e[s]+f[c]*n[s-c-1]+o,e[s--]=o%10,o=o/10|0;e[s]=o}for(o?++r.e:e.shift(),c=e.length;!e[--c];)e.pop();return r.c=e,r};h.toExponential=function(r,e){var t=this,i=t.c[0];if(r!==b){if(r!==~~r||r<0||r>v)throw Error(B);for(t=N(new t.constructor(t),++r,e);t.c.length<r;)t.c.push(0)}return x(t,!0,!!i)};h.toFixed=function(r,e){var t=this,i=t.c[0];if(r!==b){if(r!==~~r||r<0||r>v)throw Error(B);for(t=N(new t.constructor(t),r+t.e+1,e),r=r+t.e+1;t.c.length<r;)t.c.push(0)}return x(t,!1,!!i)};h[Symbol.for("nodejs.util.inspect.custom")]=h.toJSON=h.toString=function(){var r=this,e=r.constructor;return x(r,r.e<=e.NE||r.e>=e.PE,!!r.c[0])};h.toNumber=function(){var r=+x(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(r.toString()))throw Error(M+"Imprecise conversion");return r};h.toPrecision=function(r,e){var t=this,i=t.constructor,n=t.c[0];if(r!==b){if(r!==~~r||r<1||r>v)throw Error(m+"precision");for(t=N(new i(t),r,e);t.c.length<r;)t.c.push(0)}return x(t,r<=t.e||t.e<=i.NE||t.e>=i.PE,!!n)};h.valueOf=function(){var r=this,e=r.constructor;if(e.strict===!0)throw Error(M+"valueOf disallowed");return x(r,r.e<=e.NE||r.e>=e.PE,!0)};var w=j();const z={bigNumber(r,e={safe:!1}){try{return r?new w(r):new w(0)}catch(t){if(e.safe)return new w(0);throw t}},formatNumber(r,e){const{decimals:t,round:i=8,safe:n=!0}=e;return z.bigNumber(r,{safe:n}).div(new w(10).pow(t)).round(i)},multiply(r,e){if(r===void 0||e===void 0)return new w(0);const t=new w(r),i=new w(e);return t.times(i)},toFixed(r,e=2){return r===void 0||r===""?new w(0).toFixed(e):new w(r).toFixed(e)},formatNumberToLocalString(r,e=2){return r===void 0||r===""?"0.00":typeof r=="number"?r.toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e,roundingMode:"floor"}):parseFloat(r).toLocaleString("en-US",{maximumFractionDigits:e,minimumFractionDigits:e,roundingMode:"floor"})},parseLocalStringToNumber(r){if(r===void 0||r==="")return 0;const e=r.replace(/,/gu,"");return new w(e).toNumber()}};export{z as N};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.