@stonecrop/graphql-client 0.2.32 → 0.2.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,13 +4,13 @@
4
4
  * https://github.com/MikeMcl/decimal.js
5
5
  * Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
6
6
  * MIT Licence
7
- */var oe=9e15,W=1e9,Fe="0123456789abcdef",ve="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",we="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Pe={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-oe,maxE:oe,crypto:!1},Ke,Q,O=!0,Te="[DecimalError] ",K=Te+"Invalid argument: ",et=Te+"Precision limit exceeded",tt=Te+"crypto unavailable",nt="[object Decimal]",U=Math.floor,F=Math.pow,kt=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Rt=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Lt=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,it=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,G=1e7,A=7,Ft=9007199254740991,Pt=ve.length-1,Me=we.length-1,m={toStringTag:nt};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),T(e)},m.ceil=function(){return T(new this.constructor(this),this.e+1,2)},m.clampedTo=m.clamp=function(e,t){var n,i=this,r=i.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(K+t);return n=i.cmp(e),n<0?e:i.cmp(t)>0?t:new r(i)},m.comparedTo=m.cmp=function(e){var t,n,i,r,s=this,o=s.d,a=(e=new s.constructor(e)).d,u=s.s,c=e.s;if(!o||!a)return!u||!c?NaN:u!==c?u:o===a?0:!o^u<0?1:-1;if(!o[0]||!a[0])return o[0]?u:a[0]?-c:0;if(u!==c)return u;if(s.e!==e.e)return s.e>e.e^u<0?1:-1;for(i=o.length,r=a.length,t=0,n=i<r?i:r;t<n;++t)if(o[t]!==a[t])return o[t]>a[t]^u<0?1:-1;return i===r?0:i>r^u<0?1:-1},m.cosine=m.cos=function(){var e,t,n=this,i=n.constructor;return n.d?n.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+A,i.rounding=1,n=Mt(i,ut(i,n)),i.precision=e,i.rounding=t,T(Q==2||Q==3?n.neg():n,e,t,!0)):new i(1):new i(NaN)},m.cubeRoot=m.cbrt=function(){var e,t,n,i,r,s,o,a,u,c,l=this,f=l.constructor;if(!l.isFinite()||l.isZero())return new f(l);for(O=!1,s=l.s*F(l.s*l,1/3),!s||Math.abs(s)==1/0?(n=M(l.d),e=l.e,(s=(e-n.length+1)%3)&&(n+=s==1||s==-2?"0":"00"),s=F(n,1/3),e=U((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?n="5e"+e:(n=s.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n),i.s=l.s):i=new f(s.toString()),o=(e=f.precision)+3;;)if(a=i,u=a.times(a).times(a),c=u.plus(l),i=C(c.plus(l).times(a),c.plus(u),o+2,1),M(a.d).slice(0,o)===(n=M(i.d)).slice(0,o))if(n=n.slice(o-3,o+1),n=="9999"||!r&&n=="4999"){if(!r&&(T(a,e+1,0),a.times(a).times(a).eq(l))){i=a;break}o+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(T(i,e+1,1),t=!i.times(i).times(i).eq(l));break}return O=!0,T(i,e,f.rounding,t)},m.decimalPlaces=m.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-U(this.e/A))*A,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},m.dividedBy=m.div=function(e){return C(this,new this.constructor(e))},m.dividedToIntegerBy=m.divToInt=function(e){var t=this,n=t.constructor;return T(C(t,new n(e),0,1,1),n.precision,n.rounding)},m.equals=m.eq=function(e){return this.cmp(e)===0},m.floor=function(){return T(new this.constructor(this),this.e+1,3)},m.greaterThan=m.gt=function(e){return this.cmp(e)>0},m.greaterThanOrEqualTo=m.gte=function(e){var t=this.cmp(e);return t==1||t===0},m.hyperbolicCosine=m.cosh=function(){var e,t,n,i,r,s=this,o=s.constructor,a=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return a;n=o.precision,i=o.rounding,o.precision=n+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),t=(1/_e(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),s=ae(o,1,s.times(t),new o(1),!0);for(var u,c=e,l=new o(8);c--;)u=s.times(s),s=a.minus(u.times(l.minus(u.times(l))));return T(s,o.precision=n,o.rounding=i,!0)},m.hyperbolicSine=m.sinh=function(){var e,t,n,i,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(t=s.precision,n=s.rounding,s.precision=t+Math.max(r.e,r.sd())+4,s.rounding=1,i=r.d.length,i<3)r=ae(s,2,r,r,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,r=r.times(1/_e(5,e)),r=ae(s,2,r,r,!0);for(var o,a=new s(5),u=new s(16),c=new s(20);e--;)o=r.times(r),r=r.times(a.plus(o.times(u.times(o).plus(c))))}return s.precision=t,s.rounding=n,T(r,t,n,!0)},m.hyperbolicTangent=m.tanh=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+7,i.rounding=1,C(n.sinh(),n.cosh(),i.precision=e,i.rounding=t)):new i(n.s)},m.inverseCosine=m.acos=function(){var e,t=this,n=t.constructor,i=t.abs().cmp(1),r=n.precision,s=n.rounding;return i!==-1?i===0?t.isNeg()?Y(n,r,s):new n(0):new n(NaN):t.isZero()?Y(n,r+4,s).times(.5):(n.precision=r+6,n.rounding=1,t=t.asin(),e=Y(n,r+4,s).times(.5),n.precision=r,n.rounding=s,e.minus(t))},m.inverseHyperbolicCosine=m.acosh=function(){var e,t,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(e=i.precision,t=i.rounding,i.precision=e+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,O=!1,n=n.times(n).minus(1).sqrt().plus(n),O=!0,i.precision=e,i.rounding=t,n.ln()):new i(n)},m.inverseHyperbolicSine=m.asinh=function(){var e,t,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,O=!1,n=n.times(n).plus(1).sqrt().plus(n),O=!0,i.precision=e,i.rounding=t,n.ln())},m.inverseHyperbolicTangent=m.atanh=function(){var e,t,n,i,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,t=s.rounding,i=r.sd(),Math.max(i,e)<2*-r.e-1?T(new s(r),e,t,!0):(s.precision=n=i-r.e,r=C(r.plus(1),new s(1).minus(r),n+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=t,r.times(.5))):new s(NaN)},m.inverseSine=m.asin=function(){var e,t,n,i,r=this,s=r.constructor;return r.isZero()?new s(r):(t=r.abs().cmp(1),n=s.precision,i=s.rounding,t!==-1?t===0?(e=Y(s,n+4,i).times(.5),e.s=r.s,e):new s(NaN):(s.precision=n+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=n,s.rounding=i,r.times(2)))},m.inverseTangent=m.atan=function(){var e,t,n,i,r,s,o,a,u,c=this,l=c.constructor,f=l.precision,h=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&f+4<=Me)return o=Y(l,f+4,h).times(.25),o.s=c.s,o}else{if(!c.s)return new l(NaN);if(f+4<=Me)return o=Y(l,f+4,h).times(.5),o.s=c.s,o}for(l.precision=a=f+10,l.rounding=1,n=Math.min(28,a/A+2|0),e=n;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(O=!1,t=Math.ceil(a/A),i=1,u=c.times(c),o=new l(c),r=c;e!==-1;)if(r=r.times(u),s=o.minus(r.div(i+=2)),r=r.times(u),o=s.plus(r.div(i+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===s.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),O=!0,T(o,l.precision=f,l.rounding=h,!0)},m.isFinite=function(){return!!this.d},m.isInteger=m.isInt=function(){return!!this.d&&U(this.e/A)>this.d.length-2},m.isNaN=function(){return!this.s},m.isNegative=m.isNeg=function(){return this.s<0},m.isPositive=m.isPos=function(){return this.s>0},m.isZero=function(){return!!this.d&&this.d[0]===0},m.lessThan=m.lt=function(e){return this.cmp(e)<0},m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1},m.logarithm=m.log=function(e){var t,n,i,r,s,o,a,u,c=this,l=c.constructor,f=l.precision,h=l.rounding,E=5;if(e==null)e=new l(10),t=!0;else{if(e=new l(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:c.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)s=!0;else{for(r=n[0];r%10===0;)r/=10;s=r!==1}if(O=!1,a=f+E,o=te(c,a),i=t?Oe(l,a+10):te(e,a),u=C(o,i,a,1),pe(u.d,r=f,h))do if(a+=10,o=te(c,a),i=t?Oe(l,a+10):te(e,a),u=C(o,i,a,1),!s){+M(u.d).slice(r+1,r+15)+1==1e14&&(u=T(u,f+1,0));break}while(pe(u.d,r+=10,h));return O=!0,T(u,f,h)},m.minus=m.sub=function(e){var t,n,i,r,s,o,a,u,c,l,f,h,E=this,N=E.constructor;if(e=new N(e),!E.d||!e.d)return!E.s||!e.s?e=new N(NaN):E.d?e.s=-e.s:e=new N(e.d||E.s!==e.s?E:NaN),e;if(E.s!=e.s)return e.s=-e.s,E.plus(e);if(c=E.d,h=e.d,a=N.precision,u=N.rounding,!c[0]||!h[0]){if(h[0])e.s=-e.s;else if(c[0])e=new N(E);else return new N(u===3?-0:0);return O?T(e,a,u):e}if(n=U(e.e/A),l=U(E.e/A),c=c.slice(),s=l-n,s){for(f=s<0,f?(t=c,s=-s,o=h.length):(t=h,n=l,o=c.length),i=Math.max(Math.ceil(a/A),o)+2,s>i&&(s=i,t.length=1),t.reverse(),i=s;i--;)t.push(0);t.reverse()}else{for(i=c.length,o=h.length,f=i<o,f&&(o=i),i=0;i<o;i++)if(c[i]!=h[i]){f=c[i]<h[i];break}s=0}for(f&&(t=c,c=h,h=t,e.s=-e.s),o=c.length,i=h.length-o;i>0;--i)c[o++]=0;for(i=h.length;i>s;){if(c[--i]<h[i]){for(r=i;r&&c[--r]===0;)c[r]=G-1;--c[r],c[i]+=G}c[i]-=h[i]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=Ie(c,n),O?T(e,a,u):e):new N(u===3?-0:0)},m.modulo=m.mod=function(e){var t,n=this,i=n.constructor;return e=new i(e),!n.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||n.d&&!n.d[0]?T(new i(n),i.precision,i.rounding):(O=!1,i.modulo==9?(t=C(n,e.abs(),0,3,1),t.s*=e.s):t=C(n,e,0,i.modulo,1),t=t.times(e),O=!0,n.minus(t))},m.naturalExponential=m.exp=function(){return Be(this)},m.naturalLogarithm=m.ln=function(){return te(this)},m.negated=m.neg=function(){var e=new this.constructor(this);return e.s=-e.s,T(e)},m.plus=m.add=function(e){var t,n,i,r,s,o,a,u,c,l,f=this,h=f.constructor;if(e=new h(e),!f.d||!e.d)return!f.s||!e.s?e=new h(NaN):f.d||(e=new h(e.d||f.s===e.s?f:NaN)),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(c=f.d,l=e.d,a=h.precision,u=h.rounding,!c[0]||!l[0])return l[0]||(e=new h(f)),O?T(e,a,u):e;if(s=U(f.e/A),i=U(e.e/A),c=c.slice(),r=s-i,r){for(r<0?(n=c,r=-r,o=l.length):(n=l,i=s,o=c.length),s=Math.ceil(a/A),o=s>o?s+1:o+1,r>o&&(r=o,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for(o=c.length,r=l.length,o-r<0&&(r=o,n=l,l=c,c=n),t=0;r;)t=(c[--r]=c[r]+l[r]+t)/G|0,c[r]%=G;for(t&&(c.unshift(t),++i),o=c.length;c[--o]==0;)c.pop();return e.d=c,e.e=Ie(c,i),O?T(e,a,u):e},m.precision=m.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(K+e);return n.d?(t=rt(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},m.round=function(){var e=this,t=e.constructor;return T(new t(e),e.e+1,t.rounding)},m.sine=m.sin=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+A,i.rounding=1,n=Ut(i,ut(i,n)),i.precision=e,i.rounding=t,T(Q>2?n.neg():n,e,t,!0)):new i(NaN)},m.squareRoot=m.sqrt=function(){var e,t,n,i,r,s,o=this,a=o.d,u=o.e,c=o.s,l=o.constructor;if(c!==1||!a||!a[0])return new l(!c||c<0&&(!a||a[0])?NaN:a?o:1/0);for(O=!1,c=Math.sqrt(+o),c==0||c==1/0?(t=M(a),(t.length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=U((u+1)/2)-(u<0||u%2),c==1/0?t="5e"+u:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),i=new l(t)):i=new l(c.toString()),n=(u=l.precision)+3;;)if(s=i,i=s.plus(C(o,s,n+2,1)).times(.5),M(s.d).slice(0,n)===(t=M(i.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!r&&t=="4999"){if(!r&&(T(s,u+1,0),s.times(s).eq(o))){i=s;break}n+=4,r=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(T(i,u+1,1),e=!i.times(i).eq(o));break}return O=!0,T(i,u,l.rounding,e)},m.tangent=m.tan=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,n=n.sin(),n.s=1,n=C(n,new i(1).minus(n.times(n)).sqrt(),e+10,0),i.precision=e,i.rounding=t,T(Q==2||Q==4?n.neg():n,e,t,!0)):new i(NaN)},m.times=m.mul=function(e){var t,n,i,r,s,o,a,u,c,l=this,f=l.constructor,h=l.d,E=(e=new f(e)).d;if(e.s*=l.s,!h||!h[0]||!E||!E[0])return new f(!e.s||h&&!h[0]&&!E||E&&!E[0]&&!h?NaN:!h||!E?e.s/0:e.s*0);for(n=U(l.e/A)+U(e.e/A),u=h.length,c=E.length,u<c&&(s=h,h=E,E=s,o=u,u=c,c=o),s=[],o=u+c,i=o;i--;)s.push(0);for(i=c;--i>=0;){for(t=0,r=u+i;r>i;)a=s[r]+E[i]*h[r-i-1]+t,s[r--]=a%G|0,t=a/G|0;s[r]=(s[r]+t)%G|0}for(;!s[--o];)s.pop();return t?++n:s.shift(),e.d=s,e.e=Ie(s,n),O?T(e,f.precision,f.rounding):e},m.toBinary=function(e,t){return qe(this,2,e,t)},m.toDecimalPlaces=m.toDP=function(e,t){var n=this,i=n.constructor;return n=new i(n),e===void 0?n:(j(e,0,W),t===void 0?t=i.rounding:j(t,0,8),T(n,e+n.e+1,t))},m.toExponential=function(e,t){var n,i=this,r=i.constructor;return e===void 0?n=X(i,!0):(j(e,0,W),t===void 0?t=r.rounding:j(t,0,8),i=T(new r(i),e+1,t),n=X(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},m.toFixed=function(e,t){var n,i,r=this,s=r.constructor;return e===void 0?n=X(r):(j(e,0,W),t===void 0?t=s.rounding:j(t,0,8),i=T(new s(r),e+r.e+1,t),n=X(i,!1,e+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},m.toFraction=function(e){var t,n,i,r,s,o,a,u,c,l,f,h,E=this,N=E.d,y=E.constructor;if(!N)return new y(E);if(c=n=new y(1),i=u=new y(0),t=new y(i),s=t.e=rt(N)-E.e-1,o=s%A,t.d[0]=F(10,o<0?A+o:o),e==null)e=s>0?t:c;else{if(a=new y(e),!a.isInt()||a.lt(c))throw Error(K+a);e=a.gt(t)?s>0?t:c:a}for(O=!1,a=new y(M(N)),l=y.precision,y.precision=s=N.length*A*2;f=C(a,t,0,1,1),r=n.plus(f.times(i)),r.cmp(e)!=1;)n=i,i=r,r=c,c=u.plus(f.times(r)),u=r,r=t,t=a.minus(f.times(r)),a=r;return r=C(e.minus(n),i,0,1,1),u=u.plus(r.times(c)),n=n.plus(r.times(i)),u.s=c.s=E.s,h=C(c,i,s,1).minus(E).abs().cmp(C(u,n,s,1).minus(E).abs())<1?[c,i]:[u,n],y.precision=l,O=!0,h},m.toHexadecimal=m.toHex=function(e,t){return qe(this,16,e,t)},m.toNearest=function(e,t){var n=this,i=n.constructor;if(n=new i(n),e==null){if(!n.d)return n;e=new i(1),t=i.rounding}else{if(e=new i(e),t===void 0?t=i.rounding:j(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(O=!1,n=C(n,e,0,t,1).times(e),O=!0,T(n)):(e.s=n.s,n=e),n},m.toNumber=function(){return+this},m.toOctal=function(e,t){return qe(this,8,e,t)},m.toPower=m.pow=function(e){var t,n,i,r,s,o,a=this,u=a.constructor,c=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(F(+a,c));if(a=new u(a),a.eq(1))return a;if(i=u.precision,s=u.rounding,e.eq(1))return T(a,i,s);if(t=U(e.e/A),t>=e.d.length-1&&(n=c<0?-c:c)<=Ft)return r=st(u,a,n,i),e.s<0?new u(1).div(r):T(r,i,s);if(o=a.s,o<0){if(t<e.d.length-1)return new u(NaN);if(e.d[t]&1||(o=1),a.e==0&&a.d[0]==1&&a.d.length==1)return a.s=o,a}return n=F(+a,c),t=n==0||!isFinite(n)?U(c*(Math.log("0."+M(a.d))/Math.LN10+a.e+1)):new u(n+"").e,t>u.maxE+1||t<u.minE-1?new u(t>0?o/0:0):(O=!1,u.rounding=a.s=1,n=Math.min(12,(t+"").length),r=Be(e.times(te(a,i+n)),i),r.d&&(r=T(r,i+5,1),pe(r.d,i,s)&&(t=i+10,r=T(Be(e.times(te(a,t+n)),t),t+5,1),+M(r.d).slice(i+1,i+15)+1==1e14&&(r=T(r,i+1,0)))),r.s=o,O=!0,u.rounding=s,T(r,i,s))},m.toPrecision=function(e,t){var n,i=this,r=i.constructor;return e===void 0?n=X(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(j(e,1,W),t===void 0?t=r.rounding:j(t,0,8),i=T(new r(i),e,t),n=X(i,e<=i.e||i.e<=r.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+n:n},m.toSignificantDigits=m.toSD=function(e,t){var n=this,i=n.constructor;return e===void 0?(e=i.precision,t=i.rounding):(j(e,1,W),t===void 0?t=i.rounding:j(t,0,8)),T(new i(n),e,t)},m.toString=function(){var e=this,t=e.constructor,n=X(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},m.truncated=m.trunc=function(){return T(new this.constructor(this),this.e+1,1)},m.valueOf=m.toJSON=function(){var e=this,t=e.constructor,n=X(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function M(e){var t,n,i,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,t=1;t<r;t++)i=e[t]+"",n=A-i.length,n&&(s+=ee(n)),s+=i;o=e[t],i=o+"",n=A-i.length,n&&(s+=ee(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}function j(e,t,n){if(e!==~~e||e<t||e>n)throw Error(K+e)}function pe(e,t,n,i){var r,s,o,a;for(s=e[0];s>=10;s/=10)--t;return--t<0?(t+=A,r=0):(r=Math.ceil((t+1)/A),t%=A),s=F(10,A-t),a=e[r]%s|0,i==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),o=n<4&&a==99999||n>3&&a==49999||a==5e4||a==0):o=(n<4&&a+1==s||n>3&&a+1==s/2)&&(e[r+1]/s/100|0)==F(10,t-2)-1||(a==s/2||a==0)&&(e[r+1]/s/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),o=(i||n<4)&&a==9999||!i&&n>3&&a==4999):o=((i||n<4)&&a+1==s||!i&&n>3&&a+1==s/2)&&(e[r+1]/s/1e3|0)==F(10,t-3)-1,o}function Ae(e,t,n){for(var i,r=[0],s,o=0,a=e.length;o<a;){for(s=r.length;s--;)r[s]*=t;for(r[0]+=Fe.indexOf(e.charAt(o++)),i=0;i<r.length;i++)r[i]>n-1&&(r[i+1]===void 0&&(r[i+1]=0),r[i+1]+=r[i]/n|0,r[i]%=n)}return r.reverse()}function Mt(e,t){var n,i,r;if(t.isZero())return t;i=t.d.length,i<32?(n=Math.ceil(i/3),r=(1/_e(4,n)).toString()):(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=ae(e,1,t.times(r),new e(1));for(var s=n;s--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var C=function(){function e(i,r,s){var o,a=0,u=i.length;for(i=i.slice();u--;)o=i[u]*r+a,i[u]=o%s|0,a=o/s|0;return a&&i.unshift(a),i}function t(i,r,s,o){var a,u;if(s!=o)u=s>o?1:-1;else for(a=u=0;a<s;a++)if(i[a]!=r[a]){u=i[a]>r[a]?1:-1;break}return u}function n(i,r,s,o){for(var a=0;s--;)i[s]-=a,a=i[s]<r[s]?1:0,i[s]=a*o+i[s]-r[s];for(;!i[0]&&i.length>1;)i.shift()}return function(i,r,s,o,a,u){var c,l,f,h,E,N,y,S,b,q,_,x,z,$,ne,H,se,Ne,R,he,ie=i.constructor,d=i.s==r.s?1:-1,g=i.d,v=r.d;if(!g||!g[0]||!v||!v[0])return new ie(!i.s||!r.s||(g?v&&g[0]==v[0]:!v)?NaN:g&&g[0]==0||!v?d*0:d/0);for(u?(E=1,l=i.e-r.e):(u=G,E=A,l=U(i.e/E)-U(r.e/E)),R=v.length,se=g.length,b=new ie(d),q=b.d=[],f=0;v[f]==(g[f]||0);f++);if(v[f]>(g[f]||0)&&l--,s==null?($=s=ie.precision,o=ie.rounding):a?$=s+(i.e-r.e)+1:$=s,$<0)q.push(1),N=!0;else{if($=$/E+2|0,f=0,R==1){for(h=0,v=v[0],$++;(f<se||h)&&$--;f++)ne=h*u+(g[f]||0),q[f]=ne/v|0,h=ne%v|0;N=h||f<se}else{for(h=u/(v[0]+1)|0,h>1&&(v=e(v,h,u),g=e(g,h,u),R=v.length,se=g.length),H=R,_=g.slice(0,R),x=_.length;x<R;)_[x++]=0;he=v.slice(),he.unshift(0),Ne=v[0],v[1]>=u/2&&++Ne;do h=0,c=t(v,_,R,x),c<0?(z=_[0],R!=x&&(z=z*u+(_[1]||0)),h=z/Ne|0,h>1?(h>=u&&(h=u-1),y=e(v,h,u),S=y.length,x=_.length,c=t(y,_,S,x),c==1&&(h--,n(y,R<S?he:v,S,u))):(h==0&&(c=h=1),y=v.slice()),S=y.length,S<x&&y.unshift(0),n(_,y,x,u),c==-1&&(x=_.length,c=t(v,_,R,x),c<1&&(h++,n(_,R<x?he:v,x,u))),x=_.length):c===0&&(h++,_=[0]),q[f++]=h,c&&_[0]?_[x++]=g[H]||0:(_=[g[H]],x=1);while((H++<se||_[0]!==void 0)&&$--);N=_[0]!==void 0}q[0]||q.shift()}if(E==1)b.e=l,Ke=N;else{for(f=1,h=q[0];h>=10;h/=10)f++;b.e=f+l*E-1,T(b,a?s+b.e+1:s,o,N)}return b}}();function T(e,t,n,i){var r,s,o,a,u,c,l,f,h,E=e.constructor;e:if(t!=null){if(f=e.d,!f)return e;for(r=1,a=f[0];a>=10;a/=10)r++;if(s=t-r,s<0)s+=A,o=t,l=f[h=0],u=l/F(10,r-o-1)%10|0;else if(h=Math.ceil((s+1)/A),a=f.length,h>=a)if(i){for(;a++<=h;)f.push(0);l=u=0,r=1,s%=A,o=s-A+1}else break e;else{for(l=a=f[h],r=1;a>=10;a/=10)r++;s%=A,o=s-A+r,u=o<0?0:l/F(10,r-o-1)%10|0}if(i=i||t<0||f[h+1]!==void 0||(o<0?l:l%F(10,r-o-1)),c=n<4?(u||i)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||i||n==6&&(s>0?o>0?l/F(10,r-o):0:f[h-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=F(10,(A-t%A)%A),e.e=-t||0):f[0]=e.e=0,e;if(s==0?(f.length=h,a=1,h--):(f.length=h+1,a=F(10,A-s),f[h]=o>0?(l/F(10,r-o)%F(10,o)|0)*a:0),c)for(;;)if(h==0){for(s=1,o=f[0];o>=10;o/=10)s++;for(o=f[0]+=a,a=1;o>=10;o/=10)a++;s!=a&&(e.e++,f[0]==G&&(f[0]=1));break}else{if(f[h]+=a,f[h]!=G)break;f[h--]=0,a=1}for(s=f.length;f[--s]===0;)f.pop()}return O&&(e.e>E.maxE?(e.d=null,e.e=NaN):e.e<E.minE&&(e.e=0,e.d=[0])),e}function X(e,t,n){if(!e.isFinite())return ct(e);var i,r=e.e,s=M(e.d),o=s.length;return t?(n&&(i=n-o)>0?s=s.charAt(0)+"."+s.slice(1)+ee(i):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+ee(-r-1)+s,n&&(i=n-o)>0&&(s+=ee(i))):r>=o?(s+=ee(r+1-o),n&&(i=n-r-1)>0&&(s=s+"."+ee(i))):((i=r+1)<o&&(s=s.slice(0,i)+"."+s.slice(i)),n&&(i=n-o)>0&&(r+1===o&&(s+="."),s+=ee(i))),s}function Ie(e,t){var n=e[0];for(t*=A;n>=10;n/=10)t++;return t}function Oe(e,t,n){if(t>Pt)throw O=!0,n&&(e.precision=n),Error(et);return T(new e(ve),t,1,!0)}function Y(e,t,n){if(t>Me)throw Error(et);return T(new e(we),t,n,!0)}function rt(e){var t=e.length-1,n=t*A+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function ee(e){for(var t="";e--;)t+="0";return t}function st(e,t,n,i){var r,s=new e(1),o=Math.ceil(i/A+4);for(O=!1;;){if(n%2&&(s=s.times(t),lt(s.d,o)&&(r=!0)),n=U(n/2),n===0){n=s.d.length-1,r&&s.d[n]===0&&++s.d[n];break}t=t.times(t),lt(t.d,o)}return O=!0,s}function ot(e){return e.d[e.d.length-1]&1}function at(e,t,n){for(var i,r=new e(t[0]),s=0;++s<t.length;)if(i=new e(t[s]),i.s)r[n](i)&&(r=i);else{r=i;break}return r}function Be(e,t){var n,i,r,s,o,a,u,c=0,l=0,f=0,h=e.constructor,E=h.rounding,N=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(O=!1,u=N):u=t,a=new h(.03125);e.e>-2;)e=e.times(a),f+=5;for(i=Math.log(F(2,f))/Math.LN10*2+5|0,u+=i,n=s=o=new h(1),h.precision=u;;){if(s=T(s.times(e),u,1),n=n.times(++l),a=o.plus(C(s,n,u,1)),M(a.d).slice(0,u)===M(o.d).slice(0,u)){for(r=f;r--;)o=T(o.times(o),u,1);if(t==null)if(c<3&&pe(o.d,u-i,E,c))h.precision=u+=10,n=s=a=new h(1),l=0,c++;else return T(o,h.precision=N,E,O=!0);else return h.precision=N,o}o=a}}function te(e,t){var n,i,r,s,o,a,u,c,l,f,h,E=1,N=10,y=e,S=y.d,b=y.constructor,q=b.rounding,_=b.precision;if(y.s<0||!S||!S[0]||!y.e&&S[0]==1&&S.length==1)return new b(S&&!S[0]?-1/0:y.s!=1?NaN:S?0:y);if(t==null?(O=!1,l=_):l=t,b.precision=l+=N,n=M(S),i=n.charAt(0),Math.abs(s=y.e)<15e14){for(;i<7&&i!=1||i==1&&n.charAt(1)>3;)y=y.times(e),n=M(y.d),i=n.charAt(0),E++;s=y.e,i>1?(y=new b("0."+n),s++):y=new b(i+"."+n.slice(1))}else return c=Oe(b,l+2,_).times(s+""),y=te(new b(i+"."+n.slice(1)),l-N).plus(c),b.precision=_,t==null?T(y,_,q,O=!0):y;for(f=y,u=o=y=C(y.minus(1),y.plus(1),l,1),h=T(y.times(y),l,1),r=3;;){if(o=T(o.times(h),l,1),c=u.plus(C(o,new b(r),l,1)),M(c.d).slice(0,l)===M(u.d).slice(0,l))if(u=u.times(2),s!==0&&(u=u.plus(Oe(b,l+2,_).times(s+""))),u=C(u,new b(E),l,1),t==null)if(pe(u.d,l-N,q,a))b.precision=l+=N,c=o=y=C(f.minus(1),f.plus(1),l,1),h=T(y.times(y),l,1),r=a=1;else return T(u,b.precision=_,q,O=!0);else return b.precision=_,u;u=c,r+=2}}function ct(e){return String(e.s*e.s/0)}function Ue(e,t){var n,i,r;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(n<0&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):n<0&&(n=t.length),i=0;t.charCodeAt(i)===48;i++);for(r=t.length;t.charCodeAt(r-1)===48;--r);if(t=t.slice(i,r),t){if(r-=i,e.e=n=n-i-1,e.d=[],i=(n+1)%A,n<0&&(i+=A),i<r){for(i&&e.d.push(+t.slice(0,i)),r-=A;i<r;)e.d.push(+t.slice(i,i+=A));t=t.slice(i),i=A-t.length}else i-=r;for(;i--;)t+="0";e.d.push(+t),O&&(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 Bt(e,t){var n,i,r,s,o,a,u,c,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),it.test(t))return Ue(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Rt.test(t))n=16,t=t.toLowerCase();else if(kt.test(t))n=2;else if(Lt.test(t))n=8;else throw Error(K+t);for(s=t.search(/p/i),s>0?(u=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),s=t.indexOf("."),o=s>=0,i=e.constructor,o&&(t=t.replace(".",""),a=t.length,s=a-s,r=st(i,new i(n),s,s*2)),c=Ae(t,n,G),l=c.length-1,s=l;c[s]===0;--s)c.pop();return s<0?new i(e.s*0):(e.e=Ie(c,l),e.d=c,O=!1,o&&(e=C(e,r,a*4)),u&&(e=e.times(Math.abs(u)<54?F(2,u):ce.pow(2,u))),O=!0,e)}function Ut(e,t){var n,i=t.d.length;if(i<3)return t.isZero()?t:ae(e,2,t,t);n=1.4*Math.sqrt(i),n=n>16?16:n|0,t=t.times(1/_e(5,n)),t=ae(e,2,t,t);for(var r,s=new e(5),o=new e(16),a=new e(20);n--;)r=t.times(t),t=t.times(s.plus(r.times(o.times(r).minus(a))));return t}function ae(e,t,n,i,r){var s,o,a,u,c=e.precision,l=Math.ceil(c/A);for(O=!1,u=n.times(n),a=new e(i);;){if(o=C(a.times(u),new e(t++*t++),c,1),a=r?i.plus(o):i.minus(o),i=C(o.times(u),new e(t++*t++),c,1),o=a.plus(i),o.d[l]!==void 0){for(s=l;o.d[s]===a.d[s]&&s--;);if(s==-1)break}s=a,a=i,i=o,o=s}return O=!0,o.d.length=l+1,o}function _e(e,t){for(var n=e;--t;)n*=e;return n}function ut(e,t){var n,i=t.s<0,r=Y(e,e.precision,1),s=r.times(.5);if(t=t.abs(),t.lte(s))return Q=i?4:1,t;if(n=t.divToInt(r),n.isZero())Q=i?3:2;else{if(t=t.minus(n.times(r)),t.lte(s))return Q=ot(n)?i?2:3:i?4:1,t;Q=ot(n)?i?1:4:i?3:2}return t.minus(r).abs()}function qe(e,t,n,i){var r,s,o,a,u,c,l,f,h,E=e.constructor,N=n!==void 0;if(N?(j(n,1,W),i===void 0?i=E.rounding:j(i,0,8)):(n=E.precision,i=E.rounding),!e.isFinite())l=ct(e);else{for(l=X(e),o=l.indexOf("."),N?(r=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):r=t,o>=0&&(l=l.replace(".",""),h=new E(1),h.e=l.length-o,h.d=Ae(X(h),10,r),h.e=h.d.length),f=Ae(l,10,r),s=u=f.length;f[--u]==0;)f.pop();if(!f[0])l=N?"0p+0":"0";else{if(o<0?s--:(e=new E(e),e.d=f,e.e=s,e=C(e,h,n,i,0,r),f=e.d,s=e.e,c=Ke),o=f[n],a=r/2,c=c||f[n+1]!==void 0,c=i<4?(o!==void 0||c)&&(i===0||i===(e.s<0?3:2)):o>a||o===a&&(i===4||c||i===6&&f[n-1]&1||i===(e.s<0?8:7)),f.length=n,c)for(;++f[--n]>r-1;)f[n]=0,n||(++s,f.unshift(1));for(u=f.length;!f[u-1];--u);for(o=0,l="";o<u;o++)l+=Fe.charAt(f[o]);if(N){if(u>1)if(t==16||t==8){for(o=t==16?4:3,--u;u%o;u++)l+="0";for(f=Ae(l,r,t),u=f.length;!f[u-1];--u);for(o=1,l="1.";o<u;o++)l+=Fe.charAt(f[o])}else l=l.charAt(0)+"."+l.slice(1);l=l+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)l="0"+l;l="0."+l}else if(++s>u)for(s-=u;s--;)l+="0";else s<u&&(l=l.slice(0,s)+"."+l.slice(s))}l=(t==16?"0x":t==2?"0b":t==8?"0o":"")+l}return e.s<0?"-"+l:l}function lt(e,t){if(e.length>t)return e.length=t,!0}function qt(e){return new this(e).abs()}function Vt(e){return new this(e).acos()}function jt(e){return new this(e).acosh()}function $t(e,t){return new this(e).plus(t)}function Ht(e){return new this(e).asin()}function Gt(e){return new this(e).asinh()}function Yt(e){return new this(e).atan()}function Jt(e){return new this(e).atanh()}function zt(e,t){e=new this(e),t=new this(t);var n,i=this.precision,r=this.rounding,s=i+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=Y(this,s,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?Y(this,i,r):new this(0),n.s=e.s):!e.d||t.isZero()?(n=Y(this,s,1).times(.5),n.s=e.s):t.s<0?(this.precision=s,this.rounding=1,n=this.atan(C(e,t,s,1)),t=Y(this,s,1),this.precision=i,this.rounding=r,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(C(e,t,s,1)),n}function Xt(e){return new this(e).cbrt()}function Qt(e){return T(e=new this(e),e.e+1,2)}function Zt(e,t,n){return new this(e).clamp(t,n)}function Wt(e){if(!e||typeof e!="object")throw Error(Te+"Object expected");var t,n,i,r=e.defaults===!0,s=["precision",1,W,"rounding",0,8,"toExpNeg",-oe,0,"toExpPos",0,oe,"maxE",0,oe,"minE",-oe,0,"modulo",0,9];for(t=0;t<s.length;t+=3)if(n=s[t],r&&(this[n]=Pe[n]),(i=e[n])!==void 0)if(U(i)===i&&i>=s[t+1]&&i<=s[t+2])this[n]=i;else throw Error(K+n+": "+i);if(n="crypto",r&&(this[n]=Pe[n]),(i=e[n])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(tt);else this[n]=!1;else throw Error(K+n+": "+i);return this}function Kt(e){return new this(e).cos()}function en(e){return new this(e).cosh()}function ft(e){var t,n,i;function r(s){var o,a,u,c=this;if(!(c instanceof r))return new r(s);if(c.constructor=r,ht(s)){c.s=s.s,O?!s.d||s.e>r.maxE?(c.e=NaN,c.d=null):s.e<r.minE?(c.e=0,c.d=[0]):(c.e=s.e,c.d=s.d.slice()):(c.e=s.e,c.d=s.d?s.d.slice():s.d);return}if(u=typeof s,u==="number"){if(s===0){c.s=1/s<0?-1:1,c.e=0,c.d=[0];return}if(s<0?(s=-s,c.s=-1):c.s=1,s===~~s&&s<1e7){for(o=0,a=s;a>=10;a/=10)o++;O?o>r.maxE?(c.e=NaN,c.d=null):o<r.minE?(c.e=0,c.d=[0]):(c.e=o,c.d=[s]):(c.e=o,c.d=[s]);return}else if(s*0!==0){s||(c.s=NaN),c.e=NaN,c.d=null;return}return Ue(c,s.toString())}else if(u!=="string")throw Error(K+s);return(a=s.charCodeAt(0))===45?(s=s.slice(1),c.s=-1):(a===43&&(s=s.slice(1)),c.s=1),it.test(s)?Ue(c,s):Bt(c,s)}if(r.prototype=m,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.EUCLID=9,r.config=r.set=Wt,r.clone=ft,r.isDecimal=ht,r.abs=qt,r.acos=Vt,r.acosh=jt,r.add=$t,r.asin=Ht,r.asinh=Gt,r.atan=Yt,r.atanh=Jt,r.atan2=zt,r.cbrt=Xt,r.ceil=Qt,r.clamp=Zt,r.cos=Kt,r.cosh=en,r.div=tn,r.exp=nn,r.floor=rn,r.hypot=sn,r.ln=on,r.log=an,r.log10=un,r.log2=cn,r.max=ln,r.min=fn,r.mod=hn,r.mul=dn,r.pow=pn,r.random=mn,r.round=gn,r.sign=En,r.sin=Nn,r.sinh=yn,r.sqrt=vn,r.sub=wn,r.sum=Tn,r.tan=An,r.tanh=In,r.trunc=On,e===void 0&&(e={}),e&&e.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)e.hasOwnProperty(n=i[t++])||(e[n]=this[n]);return r.config(e),r}function tn(e,t){return new this(e).div(t)}function nn(e){return new this(e).exp()}function rn(e){return T(e=new this(e),e.e+1,3)}function sn(){var e,t,n=new this(0);for(O=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return O=!0,new this(1/0);n=t}return O=!0,n.sqrt()}function ht(e){return e instanceof ce||e&&e.toStringTag===nt||!1}function on(e){return new this(e).ln()}function an(e,t){return new this(e).log(t)}function cn(e){return new this(e).log(2)}function un(e){return new this(e).log(10)}function ln(){return at(this,arguments,"lt")}function fn(){return at(this,arguments,"gt")}function hn(e,t){return new this(e).mod(t)}function dn(e,t){return new this(e).mul(t)}function pn(e,t){return new this(e).pow(t)}function mn(e){var t,n,i,r,s=0,o=new this(1),a=[];if(e===void 0?e=this.precision:j(e,1,W),i=Math.ceil(e/A),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));s<i;)r=t[s],r>=429e7?t[s]=crypto.getRandomValues(new Uint32Array(1))[0]:a[s++]=r%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=4);s<i;)r=t[s]+(t[s+1]<<8)+(t[s+2]<<16)+((t[s+3]&127)<<24),r>=214e7?crypto.randomBytes(4).copy(t,s):(a.push(r%1e7),s+=4);s=i/4}else throw Error(tt);else for(;s<i;)a[s++]=Math.random()*1e7|0;for(i=a[--s],e%=A,i&&e&&(r=F(10,A-e),a[s]=(i/r|0)*r);a[s]===0;s--)a.pop();if(s<0)n=0,a=[0];else{for(n=-1;a[0]===0;n-=A)a.shift();for(i=1,r=a[0];r>=10;r/=10)i++;i<A&&(n-=A-i)}return o.e=n,o.d=a,o}function gn(e){return T(e=new this(e),e.e+1,this.rounding)}function En(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function Nn(e){return new this(e).sin()}function yn(e){return new this(e).sinh()}function vn(e){return new this(e).sqrt()}function wn(e,t){return new this(e).sub(t)}function Tn(){var e=0,t=arguments,n=new this(t[e]);for(O=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return O=!0,T(n,this.precision,this.rounding)}function An(e){return new this(e).tan()}function In(e){return new this(e).tanh()}function On(e){return T(e=new this(e),e.e+1,1)}m[Symbol.for("nodejs.util.inspect.custom")]=m.toString,m[Symbol.toStringTag]="Decimal";var ce=m.constructor=ft(Pe);ve=new ce(ve),we=new ce(we);const Ve=JSON,_n=e=>e.toUpperCase(),bn=e=>{const t={};return e.forEach((n,i)=>{t[i]=n}),t},Dn=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Sn=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},xn=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0};function be(e,t){if(!!!e)throw new Error(t)}function Cn(e){return typeof e=="object"&&e!==null}function kn(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const Rn=/\r\n|[\n\r]/g;function je(e,t){let n=0,i=1;for(const r of e.body.matchAll(Rn)){if(typeof r.index=="number"||kn(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function Ln(e){return dt(e.source,je(e.source,e.start))}function dt(e,t){const n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,c=`${e.name}:${o}:${u}
7
+ */var oe=9e15,W=1e9,Fe="0123456789abcdef",ve="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",we="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Pe={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-oe,maxE:oe,crypto:!1},Ke,Q,O=!0,Te="[DecimalError] ",K=Te+"Invalid argument: ",et=Te+"Precision limit exceeded",tt=Te+"crypto unavailable",nt="[object Decimal]",U=Math.floor,F=Math.pow,kt=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Rt=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Lt=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,it=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,G=1e7,A=7,Ft=9007199254740991,Pt=ve.length-1,Me=we.length-1,m={toStringTag:nt};m.absoluteValue=m.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),T(e)},m.ceil=function(){return T(new this.constructor(this),this.e+1,2)},m.clampedTo=m.clamp=function(e,t){var n,i=this,r=i.constructor;if(e=new r(e),t=new r(t),!e.s||!t.s)return new r(NaN);if(e.gt(t))throw Error(K+t);return n=i.cmp(e),n<0?e:i.cmp(t)>0?t:new r(i)},m.comparedTo=m.cmp=function(e){var t,n,i,r,s=this,o=s.d,a=(e=new s.constructor(e)).d,u=s.s,c=e.s;if(!o||!a)return!u||!c?NaN:u!==c?u:o===a?0:!o^u<0?1:-1;if(!o[0]||!a[0])return o[0]?u:a[0]?-c:0;if(u!==c)return u;if(s.e!==e.e)return s.e>e.e^u<0?1:-1;for(i=o.length,r=a.length,t=0,n=i<r?i:r;t<n;++t)if(o[t]!==a[t])return o[t]>a[t]^u<0?1:-1;return i===r?0:i>r^u<0?1:-1},m.cosine=m.cos=function(){var e,t,n=this,i=n.constructor;return n.d?n.d[0]?(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+A,i.rounding=1,n=Mt(i,ut(i,n)),i.precision=e,i.rounding=t,T(Q==2||Q==3?n.neg():n,e,t,!0)):new i(1):new i(NaN)},m.cubeRoot=m.cbrt=function(){var e,t,n,i,r,s,o,a,u,c,l=this,f=l.constructor;if(!l.isFinite()||l.isZero())return new f(l);for(O=!1,s=l.s*F(l.s*l,1/3),!s||Math.abs(s)==1/0?(n=M(l.d),e=l.e,(s=(e-n.length+1)%3)&&(n+=s==1||s==-2?"0":"00"),s=F(n,1/3),e=U((e+1)/3)-(e%3==(e<0?-1:2)),s==1/0?n="5e"+e:(n=s.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),i=new f(n),i.s=l.s):i=new f(s.toString()),o=(e=f.precision)+3;;)if(a=i,u=a.times(a).times(a),c=u.plus(l),i=C(c.plus(l).times(a),c.plus(u),o+2,1),M(a.d).slice(0,o)===(n=M(i.d)).slice(0,o))if(n=n.slice(o-3,o+1),n=="9999"||!r&&n=="4999"){if(!r&&(T(a,e+1,0),a.times(a).times(a).eq(l))){i=a;break}o+=4,r=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(T(i,e+1,1),t=!i.times(i).times(i).eq(l));break}return O=!0,T(i,e,f.rounding,t)},m.decimalPlaces=m.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-U(this.e/A))*A,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},m.dividedBy=m.div=function(e){return C(this,new this.constructor(e))},m.dividedToIntegerBy=m.divToInt=function(e){var t=this,n=t.constructor;return T(C(t,new n(e),0,1,1),n.precision,n.rounding)},m.equals=m.eq=function(e){return this.cmp(e)===0},m.floor=function(){return T(new this.constructor(this),this.e+1,3)},m.greaterThan=m.gt=function(e){return this.cmp(e)>0},m.greaterThanOrEqualTo=m.gte=function(e){var t=this.cmp(e);return t==1||t===0},m.hyperbolicCosine=m.cosh=function(){var e,t,n,i,r,s=this,o=s.constructor,a=new o(1);if(!s.isFinite())return new o(s.s?1/0:NaN);if(s.isZero())return a;n=o.precision,i=o.rounding,o.precision=n+Math.max(s.e,s.sd())+4,o.rounding=1,r=s.d.length,r<32?(e=Math.ceil(r/3),t=(1/_e(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),s=ae(o,1,s.times(t),new o(1),!0);for(var u,c=e,l=new o(8);c--;)u=s.times(s),s=a.minus(u.times(l.minus(u.times(l))));return T(s,o.precision=n,o.rounding=i,!0)},m.hyperbolicSine=m.sinh=function(){var e,t,n,i,r=this,s=r.constructor;if(!r.isFinite()||r.isZero())return new s(r);if(t=s.precision,n=s.rounding,s.precision=t+Math.max(r.e,r.sd())+4,s.rounding=1,i=r.d.length,i<3)r=ae(s,2,r,r,!0);else{e=1.4*Math.sqrt(i),e=e>16?16:e|0,r=r.times(1/_e(5,e)),r=ae(s,2,r,r,!0);for(var o,a=new s(5),u=new s(16),c=new s(20);e--;)o=r.times(r),r=r.times(a.plus(o.times(u.times(o).plus(c))))}return s.precision=t,s.rounding=n,T(r,t,n,!0)},m.hyperbolicTangent=m.tanh=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+7,i.rounding=1,C(n.sinh(),n.cosh(),i.precision=e,i.rounding=t)):new i(n.s)},m.inverseCosine=m.acos=function(){var e,t=this,n=t.constructor,i=t.abs().cmp(1),r=n.precision,s=n.rounding;return i!==-1?i===0?t.isNeg()?Y(n,r,s):new n(0):new n(NaN):t.isZero()?Y(n,r+4,s).times(.5):(n.precision=r+6,n.rounding=1,t=t.asin(),e=Y(n,r+4,s).times(.5),n.precision=r,n.rounding=s,e.minus(t))},m.inverseHyperbolicCosine=m.acosh=function(){var e,t,n=this,i=n.constructor;return n.lte(1)?new i(n.eq(1)?0:NaN):n.isFinite()?(e=i.precision,t=i.rounding,i.precision=e+Math.max(Math.abs(n.e),n.sd())+4,i.rounding=1,O=!1,n=n.times(n).minus(1).sqrt().plus(n),O=!0,i.precision=e,i.rounding=t,n.ln()):new i(n)},m.inverseHyperbolicSine=m.asinh=function(){var e,t,n=this,i=n.constructor;return!n.isFinite()||n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,i.rounding=1,O=!1,n=n.times(n).plus(1).sqrt().plus(n),O=!0,i.precision=e,i.rounding=t,n.ln())},m.inverseHyperbolicTangent=m.atanh=function(){var e,t,n,i,r=this,s=r.constructor;return r.isFinite()?r.e>=0?new s(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=s.precision,t=s.rounding,i=r.sd(),Math.max(i,e)<2*-r.e-1?T(new s(r),e,t,!0):(s.precision=n=i-r.e,r=C(r.plus(1),new s(1).minus(r),n+e,1),s.precision=e+4,s.rounding=1,r=r.ln(),s.precision=e,s.rounding=t,r.times(.5))):new s(NaN)},m.inverseSine=m.asin=function(){var e,t,n,i,r=this,s=r.constructor;return r.isZero()?new s(r):(t=r.abs().cmp(1),n=s.precision,i=s.rounding,t!==-1?t===0?(e=Y(s,n+4,i).times(.5),e.s=r.s,e):new s(NaN):(s.precision=n+6,s.rounding=1,r=r.div(new s(1).minus(r.times(r)).sqrt().plus(1)).atan(),s.precision=n,s.rounding=i,r.times(2)))},m.inverseTangent=m.atan=function(){var e,t,n,i,r,s,o,a,u,c=this,l=c.constructor,f=l.precision,h=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&f+4<=Me)return o=Y(l,f+4,h).times(.25),o.s=c.s,o}else{if(!c.s)return new l(NaN);if(f+4<=Me)return o=Y(l,f+4,h).times(.5),o.s=c.s,o}for(l.precision=a=f+10,l.rounding=1,n=Math.min(28,a/A+2|0),e=n;e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(O=!1,t=Math.ceil(a/A),i=1,u=c.times(c),o=new l(c),r=c;e!==-1;)if(r=r.times(u),s=o.minus(r.div(i+=2)),r=r.times(u),o=s.plus(r.div(i+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===s.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),O=!0,T(o,l.precision=f,l.rounding=h,!0)},m.isFinite=function(){return!!this.d},m.isInteger=m.isInt=function(){return!!this.d&&U(this.e/A)>this.d.length-2},m.isNaN=function(){return!this.s},m.isNegative=m.isNeg=function(){return this.s<0},m.isPositive=m.isPos=function(){return this.s>0},m.isZero=function(){return!!this.d&&this.d[0]===0},m.lessThan=m.lt=function(e){return this.cmp(e)<0},m.lessThanOrEqualTo=m.lte=function(e){return this.cmp(e)<1},m.logarithm=m.log=function(e){var t,n,i,r,s,o,a,u,c=this,l=c.constructor,f=l.precision,h=l.rounding,E=5;if(e==null)e=new l(10),t=!0;else{if(e=new l(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new l(NaN);t=e.eq(10)}if(n=c.d,c.s<0||!n||!n[0]||c.eq(1))return new l(n&&!n[0]?-1/0:c.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)s=!0;else{for(r=n[0];r%10===0;)r/=10;s=r!==1}if(O=!1,a=f+E,o=te(c,a),i=t?Oe(l,a+10):te(e,a),u=C(o,i,a,1),pe(u.d,r=f,h))do if(a+=10,o=te(c,a),i=t?Oe(l,a+10):te(e,a),u=C(o,i,a,1),!s){+M(u.d).slice(r+1,r+15)+1==1e14&&(u=T(u,f+1,0));break}while(pe(u.d,r+=10,h));return O=!0,T(u,f,h)},m.minus=m.sub=function(e){var t,n,i,r,s,o,a,u,c,l,f,h,E=this,N=E.constructor;if(e=new N(e),!E.d||!e.d)return!E.s||!e.s?e=new N(NaN):E.d?e.s=-e.s:e=new N(e.d||E.s!==e.s?E:NaN),e;if(E.s!=e.s)return e.s=-e.s,E.plus(e);if(c=E.d,h=e.d,a=N.precision,u=N.rounding,!c[0]||!h[0]){if(h[0])e.s=-e.s;else if(c[0])e=new N(E);else return new N(u===3?-0:0);return O?T(e,a,u):e}if(n=U(e.e/A),l=U(E.e/A),c=c.slice(),s=l-n,s){for(f=s<0,f?(t=c,s=-s,o=h.length):(t=h,n=l,o=c.length),i=Math.max(Math.ceil(a/A),o)+2,s>i&&(s=i,t.length=1),t.reverse(),i=s;i--;)t.push(0);t.reverse()}else{for(i=c.length,o=h.length,f=i<o,f&&(o=i),i=0;i<o;i++)if(c[i]!=h[i]){f=c[i]<h[i];break}s=0}for(f&&(t=c,c=h,h=t,e.s=-e.s),o=c.length,i=h.length-o;i>0;--i)c[o++]=0;for(i=h.length;i>s;){if(c[--i]<h[i]){for(r=i;r&&c[--r]===0;)c[r]=G-1;--c[r],c[i]+=G}c[i]-=h[i]}for(;c[--o]===0;)c.pop();for(;c[0]===0;c.shift())--n;return c[0]?(e.d=c,e.e=Ie(c,n),O?T(e,a,u):e):new N(u===3?-0:0)},m.modulo=m.mod=function(e){var t,n=this,i=n.constructor;return e=new i(e),!n.d||!e.s||e.d&&!e.d[0]?new i(NaN):!e.d||n.d&&!n.d[0]?T(new i(n),i.precision,i.rounding):(O=!1,i.modulo==9?(t=C(n,e.abs(),0,3,1),t.s*=e.s):t=C(n,e,0,i.modulo,1),t=t.times(e),O=!0,n.minus(t))},m.naturalExponential=m.exp=function(){return Be(this)},m.naturalLogarithm=m.ln=function(){return te(this)},m.negated=m.neg=function(){var e=new this.constructor(this);return e.s=-e.s,T(e)},m.plus=m.add=function(e){var t,n,i,r,s,o,a,u,c,l,f=this,h=f.constructor;if(e=new h(e),!f.d||!e.d)return!f.s||!e.s?e=new h(NaN):f.d||(e=new h(e.d||f.s===e.s?f:NaN)),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(c=f.d,l=e.d,a=h.precision,u=h.rounding,!c[0]||!l[0])return l[0]||(e=new h(f)),O?T(e,a,u):e;if(s=U(f.e/A),i=U(e.e/A),c=c.slice(),r=s-i,r){for(r<0?(n=c,r=-r,o=l.length):(n=l,i=s,o=c.length),s=Math.ceil(a/A),o=s>o?s+1:o+1,r>o&&(r=o,n.length=1),n.reverse();r--;)n.push(0);n.reverse()}for(o=c.length,r=l.length,o-r<0&&(r=o,n=l,l=c,c=n),t=0;r;)t=(c[--r]=c[r]+l[r]+t)/G|0,c[r]%=G;for(t&&(c.unshift(t),++i),o=c.length;c[--o]==0;)c.pop();return e.d=c,e.e=Ie(c,i),O?T(e,a,u):e},m.precision=m.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(K+e);return n.d?(t=rt(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},m.round=function(){var e=this,t=e.constructor;return T(new t(e),e.e+1,t.rounding)},m.sine=m.sin=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+Math.max(n.e,n.sd())+A,i.rounding=1,n=Ut(i,ut(i,n)),i.precision=e,i.rounding=t,T(Q>2?n.neg():n,e,t,!0)):new i(NaN)},m.squareRoot=m.sqrt=function(){var e,t,n,i,r,s,o=this,a=o.d,u=o.e,c=o.s,l=o.constructor;if(c!==1||!a||!a[0])return new l(!c||c<0&&(!a||a[0])?NaN:a?o:1/0);for(O=!1,c=Math.sqrt(+o),c==0||c==1/0?(t=M(a),(t.length+u)%2==0&&(t+="0"),c=Math.sqrt(t),u=U((u+1)/2)-(u<0||u%2),c==1/0?t="5e"+u:(t=c.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),i=new l(t)):i=new l(c.toString()),n=(u=l.precision)+3;;)if(s=i,i=s.plus(C(o,s,n+2,1)).times(.5),M(s.d).slice(0,n)===(t=M(i.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!r&&t=="4999"){if(!r&&(T(s,u+1,0),s.times(s).eq(o))){i=s;break}n+=4,r=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(T(i,u+1,1),e=!i.times(i).eq(o));break}return O=!0,T(i,u,l.rounding,e)},m.tangent=m.tan=function(){var e,t,n=this,i=n.constructor;return n.isFinite()?n.isZero()?new i(n):(e=i.precision,t=i.rounding,i.precision=e+10,i.rounding=1,n=n.sin(),n.s=1,n=C(n,new i(1).minus(n.times(n)).sqrt(),e+10,0),i.precision=e,i.rounding=t,T(Q==2||Q==4?n.neg():n,e,t,!0)):new i(NaN)},m.times=m.mul=function(e){var t,n,i,r,s,o,a,u,c,l=this,f=l.constructor,h=l.d,E=(e=new f(e)).d;if(e.s*=l.s,!h||!h[0]||!E||!E[0])return new f(!e.s||h&&!h[0]&&!E||E&&!E[0]&&!h?NaN:!h||!E?e.s/0:e.s*0);for(n=U(l.e/A)+U(e.e/A),u=h.length,c=E.length,u<c&&(s=h,h=E,E=s,o=u,u=c,c=o),s=[],o=u+c,i=o;i--;)s.push(0);for(i=c;--i>=0;){for(t=0,r=u+i;r>i;)a=s[r]+E[i]*h[r-i-1]+t,s[r--]=a%G|0,t=a/G|0;s[r]=(s[r]+t)%G|0}for(;!s[--o];)s.pop();return t?++n:s.shift(),e.d=s,e.e=Ie(s,n),O?T(e,f.precision,f.rounding):e},m.toBinary=function(e,t){return qe(this,2,e,t)},m.toDecimalPlaces=m.toDP=function(e,t){var n=this,i=n.constructor;return n=new i(n),e===void 0?n:(j(e,0,W),t===void 0?t=i.rounding:j(t,0,8),T(n,e+n.e+1,t))},m.toExponential=function(e,t){var n,i=this,r=i.constructor;return e===void 0?n=X(i,!0):(j(e,0,W),t===void 0?t=r.rounding:j(t,0,8),i=T(new r(i),e+1,t),n=X(i,!0,e+1)),i.isNeg()&&!i.isZero()?"-"+n:n},m.toFixed=function(e,t){var n,i,r=this,s=r.constructor;return e===void 0?n=X(r):(j(e,0,W),t===void 0?t=s.rounding:j(t,0,8),i=T(new s(r),e+r.e+1,t),n=X(i,!1,e+i.e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},m.toFraction=function(e){var t,n,i,r,s,o,a,u,c,l,f,h,E=this,N=E.d,y=E.constructor;if(!N)return new y(E);if(c=n=new y(1),i=u=new y(0),t=new y(i),s=t.e=rt(N)-E.e-1,o=s%A,t.d[0]=F(10,o<0?A+o:o),e==null)e=s>0?t:c;else{if(a=new y(e),!a.isInt()||a.lt(c))throw Error(K+a);e=a.gt(t)?s>0?t:c:a}for(O=!1,a=new y(M(N)),l=y.precision,y.precision=s=N.length*A*2;f=C(a,t,0,1,1),r=n.plus(f.times(i)),r.cmp(e)!=1;)n=i,i=r,r=c,c=u.plus(f.times(r)),u=r,r=t,t=a.minus(f.times(r)),a=r;return r=C(e.minus(n),i,0,1,1),u=u.plus(r.times(c)),n=n.plus(r.times(i)),u.s=c.s=E.s,h=C(c,i,s,1).minus(E).abs().cmp(C(u,n,s,1).minus(E).abs())<1?[c,i]:[u,n],y.precision=l,O=!0,h},m.toHexadecimal=m.toHex=function(e,t){return qe(this,16,e,t)},m.toNearest=function(e,t){var n=this,i=n.constructor;if(n=new i(n),e==null){if(!n.d)return n;e=new i(1),t=i.rounding}else{if(e=new i(e),t===void 0?t=i.rounding:j(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(O=!1,n=C(n,e,0,t,1).times(e),O=!0,T(n)):(e.s=n.s,n=e),n},m.toNumber=function(){return+this},m.toOctal=function(e,t){return qe(this,8,e,t)},m.toPower=m.pow=function(e){var t,n,i,r,s,o,a=this,u=a.constructor,c=+(e=new u(e));if(!a.d||!e.d||!a.d[0]||!e.d[0])return new u(F(+a,c));if(a=new u(a),a.eq(1))return a;if(i=u.precision,s=u.rounding,e.eq(1))return T(a,i,s);if(t=U(e.e/A),t>=e.d.length-1&&(n=c<0?-c:c)<=Ft)return r=st(u,a,n,i),e.s<0?new u(1).div(r):T(r,i,s);if(o=a.s,o<0){if(t<e.d.length-1)return new u(NaN);if(e.d[t]&1||(o=1),a.e==0&&a.d[0]==1&&a.d.length==1)return a.s=o,a}return n=F(+a,c),t=n==0||!isFinite(n)?U(c*(Math.log("0."+M(a.d))/Math.LN10+a.e+1)):new u(n+"").e,t>u.maxE+1||t<u.minE-1?new u(t>0?o/0:0):(O=!1,u.rounding=a.s=1,n=Math.min(12,(t+"").length),r=Be(e.times(te(a,i+n)),i),r.d&&(r=T(r,i+5,1),pe(r.d,i,s)&&(t=i+10,r=T(Be(e.times(te(a,t+n)),t),t+5,1),+M(r.d).slice(i+1,i+15)+1==1e14&&(r=T(r,i+1,0)))),r.s=o,O=!0,u.rounding=s,T(r,i,s))},m.toPrecision=function(e,t){var n,i=this,r=i.constructor;return e===void 0?n=X(i,i.e<=r.toExpNeg||i.e>=r.toExpPos):(j(e,1,W),t===void 0?t=r.rounding:j(t,0,8),i=T(new r(i),e,t),n=X(i,e<=i.e||i.e<=r.toExpNeg,e)),i.isNeg()&&!i.isZero()?"-"+n:n},m.toSignificantDigits=m.toSD=function(e,t){var n=this,i=n.constructor;return e===void 0?(e=i.precision,t=i.rounding):(j(e,1,W),t===void 0?t=i.rounding:j(t,0,8)),T(new i(n),e,t)},m.toString=function(){var e=this,t=e.constructor,n=X(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},m.truncated=m.trunc=function(){return T(new this.constructor(this),this.e+1,1)},m.valueOf=m.toJSON=function(){var e=this,t=e.constructor,n=X(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function M(e){var t,n,i,r=e.length-1,s="",o=e[0];if(r>0){for(s+=o,t=1;t<r;t++)i=e[t]+"",n=A-i.length,n&&(s+=ee(n)),s+=i;o=e[t],i=o+"",n=A-i.length,n&&(s+=ee(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return s+o}function j(e,t,n){if(e!==~~e||e<t||e>n)throw Error(K+e)}function pe(e,t,n,i){var r,s,o,a;for(s=e[0];s>=10;s/=10)--t;return--t<0?(t+=A,r=0):(r=Math.ceil((t+1)/A),t%=A),s=F(10,A-t),a=e[r]%s|0,i==null?t<3?(t==0?a=a/100|0:t==1&&(a=a/10|0),o=n<4&&a==99999||n>3&&a==49999||a==5e4||a==0):o=(n<4&&a+1==s||n>3&&a+1==s/2)&&(e[r+1]/s/100|0)==F(10,t-2)-1||(a==s/2||a==0)&&(e[r+1]/s/100|0)==0:t<4?(t==0?a=a/1e3|0:t==1?a=a/100|0:t==2&&(a=a/10|0),o=(i||n<4)&&a==9999||!i&&n>3&&a==4999):o=((i||n<4)&&a+1==s||!i&&n>3&&a+1==s/2)&&(e[r+1]/s/1e3|0)==F(10,t-3)-1,o}function Ae(e,t,n){for(var i,r=[0],s,o=0,a=e.length;o<a;){for(s=r.length;s--;)r[s]*=t;for(r[0]+=Fe.indexOf(e.charAt(o++)),i=0;i<r.length;i++)r[i]>n-1&&(r[i+1]===void 0&&(r[i+1]=0),r[i+1]+=r[i]/n|0,r[i]%=n)}return r.reverse()}function Mt(e,t){var n,i,r;if(t.isZero())return t;i=t.d.length,i<32?(n=Math.ceil(i/3),r=(1/_e(4,n)).toString()):(n=16,r="2.3283064365386962890625e-10"),e.precision+=n,t=ae(e,1,t.times(r),new e(1));for(var s=n;s--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var C=function(){function e(i,r,s){var o,a=0,u=i.length;for(i=i.slice();u--;)o=i[u]*r+a,i[u]=o%s|0,a=o/s|0;return a&&i.unshift(a),i}function t(i,r,s,o){var a,u;if(s!=o)u=s>o?1:-1;else for(a=u=0;a<s;a++)if(i[a]!=r[a]){u=i[a]>r[a]?1:-1;break}return u}function n(i,r,s,o){for(var a=0;s--;)i[s]-=a,a=i[s]<r[s]?1:0,i[s]=a*o+i[s]-r[s];for(;!i[0]&&i.length>1;)i.shift()}return function(i,r,s,o,a,u){var c,l,f,h,E,N,y,S,b,q,_,x,z,$,ne,H,se,Ne,R,he,ie=i.constructor,d=i.s==r.s?1:-1,g=i.d,v=r.d;if(!g||!g[0]||!v||!v[0])return new ie(!i.s||!r.s||(g?v&&g[0]==v[0]:!v)?NaN:g&&g[0]==0||!v?d*0:d/0);for(u?(E=1,l=i.e-r.e):(u=G,E=A,l=U(i.e/E)-U(r.e/E)),R=v.length,se=g.length,b=new ie(d),q=b.d=[],f=0;v[f]==(g[f]||0);f++);if(v[f]>(g[f]||0)&&l--,s==null?($=s=ie.precision,o=ie.rounding):a?$=s+(i.e-r.e)+1:$=s,$<0)q.push(1),N=!0;else{if($=$/E+2|0,f=0,R==1){for(h=0,v=v[0],$++;(f<se||h)&&$--;f++)ne=h*u+(g[f]||0),q[f]=ne/v|0,h=ne%v|0;N=h||f<se}else{for(h=u/(v[0]+1)|0,h>1&&(v=e(v,h,u),g=e(g,h,u),R=v.length,se=g.length),H=R,_=g.slice(0,R),x=_.length;x<R;)_[x++]=0;he=v.slice(),he.unshift(0),Ne=v[0],v[1]>=u/2&&++Ne;do h=0,c=t(v,_,R,x),c<0?(z=_[0],R!=x&&(z=z*u+(_[1]||0)),h=z/Ne|0,h>1?(h>=u&&(h=u-1),y=e(v,h,u),S=y.length,x=_.length,c=t(y,_,S,x),c==1&&(h--,n(y,R<S?he:v,S,u))):(h==0&&(c=h=1),y=v.slice()),S=y.length,S<x&&y.unshift(0),n(_,y,x,u),c==-1&&(x=_.length,c=t(v,_,R,x),c<1&&(h++,n(_,R<x?he:v,x,u))),x=_.length):c===0&&(h++,_=[0]),q[f++]=h,c&&_[0]?_[x++]=g[H]||0:(_=[g[H]],x=1);while((H++<se||_[0]!==void 0)&&$--);N=_[0]!==void 0}q[0]||q.shift()}if(E==1)b.e=l,Ke=N;else{for(f=1,h=q[0];h>=10;h/=10)f++;b.e=f+l*E-1,T(b,a?s+b.e+1:s,o,N)}return b}}();function T(e,t,n,i){var r,s,o,a,u,c,l,f,h,E=e.constructor;e:if(t!=null){if(f=e.d,!f)return e;for(r=1,a=f[0];a>=10;a/=10)r++;if(s=t-r,s<0)s+=A,o=t,l=f[h=0],u=l/F(10,r-o-1)%10|0;else if(h=Math.ceil((s+1)/A),a=f.length,h>=a)if(i){for(;a++<=h;)f.push(0);l=u=0,r=1,s%=A,o=s-A+1}else break e;else{for(l=a=f[h],r=1;a>=10;a/=10)r++;s%=A,o=s-A+r,u=o<0?0:l/F(10,r-o-1)%10|0}if(i=i||t<0||f[h+1]!==void 0||(o<0?l:l%F(10,r-o-1)),c=n<4?(u||i)&&(n==0||n==(e.s<0?3:2)):u>5||u==5&&(n==4||i||n==6&&(s>0?o>0?l/F(10,r-o):0:f[h-1])%10&1||n==(e.s<0?8:7)),t<1||!f[0])return f.length=0,c?(t-=e.e+1,f[0]=F(10,(A-t%A)%A),e.e=-t||0):f[0]=e.e=0,e;if(s==0?(f.length=h,a=1,h--):(f.length=h+1,a=F(10,A-s),f[h]=o>0?(l/F(10,r-o)%F(10,o)|0)*a:0),c)for(;;)if(h==0){for(s=1,o=f[0];o>=10;o/=10)s++;for(o=f[0]+=a,a=1;o>=10;o/=10)a++;s!=a&&(e.e++,f[0]==G&&(f[0]=1));break}else{if(f[h]+=a,f[h]!=G)break;f[h--]=0,a=1}for(s=f.length;f[--s]===0;)f.pop()}return O&&(e.e>E.maxE?(e.d=null,e.e=NaN):e.e<E.minE&&(e.e=0,e.d=[0])),e}function X(e,t,n){if(!e.isFinite())return ct(e);var i,r=e.e,s=M(e.d),o=s.length;return t?(n&&(i=n-o)>0?s=s.charAt(0)+"."+s.slice(1)+ee(i):o>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(e.e<0?"e":"e+")+e.e):r<0?(s="0."+ee(-r-1)+s,n&&(i=n-o)>0&&(s+=ee(i))):r>=o?(s+=ee(r+1-o),n&&(i=n-r-1)>0&&(s=s+"."+ee(i))):((i=r+1)<o&&(s=s.slice(0,i)+"."+s.slice(i)),n&&(i=n-o)>0&&(r+1===o&&(s+="."),s+=ee(i))),s}function Ie(e,t){var n=e[0];for(t*=A;n>=10;n/=10)t++;return t}function Oe(e,t,n){if(t>Pt)throw O=!0,n&&(e.precision=n),Error(et);return T(new e(ve),t,1,!0)}function Y(e,t,n){if(t>Me)throw Error(et);return T(new e(we),t,n,!0)}function rt(e){var t=e.length-1,n=t*A+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function ee(e){for(var t="";e--;)t+="0";return t}function st(e,t,n,i){var r,s=new e(1),o=Math.ceil(i/A+4);for(O=!1;;){if(n%2&&(s=s.times(t),lt(s.d,o)&&(r=!0)),n=U(n/2),n===0){n=s.d.length-1,r&&s.d[n]===0&&++s.d[n];break}t=t.times(t),lt(t.d,o)}return O=!0,s}function ot(e){return e.d[e.d.length-1]&1}function at(e,t,n){for(var i,r=new e(t[0]),s=0;++s<t.length;)if(i=new e(t[s]),i.s)r[n](i)&&(r=i);else{r=i;break}return r}function Be(e,t){var n,i,r,s,o,a,u,c=0,l=0,f=0,h=e.constructor,E=h.rounding,N=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(O=!1,u=N):u=t,a=new h(.03125);e.e>-2;)e=e.times(a),f+=5;for(i=Math.log(F(2,f))/Math.LN10*2+5|0,u+=i,n=s=o=new h(1),h.precision=u;;){if(s=T(s.times(e),u,1),n=n.times(++l),a=o.plus(C(s,n,u,1)),M(a.d).slice(0,u)===M(o.d).slice(0,u)){for(r=f;r--;)o=T(o.times(o),u,1);if(t==null)if(c<3&&pe(o.d,u-i,E,c))h.precision=u+=10,n=s=a=new h(1),l=0,c++;else return T(o,h.precision=N,E,O=!0);else return h.precision=N,o}o=a}}function te(e,t){var n,i,r,s,o,a,u,c,l,f,h,E=1,N=10,y=e,S=y.d,b=y.constructor,q=b.rounding,_=b.precision;if(y.s<0||!S||!S[0]||!y.e&&S[0]==1&&S.length==1)return new b(S&&!S[0]?-1/0:y.s!=1?NaN:S?0:y);if(t==null?(O=!1,l=_):l=t,b.precision=l+=N,n=M(S),i=n.charAt(0),Math.abs(s=y.e)<15e14){for(;i<7&&i!=1||i==1&&n.charAt(1)>3;)y=y.times(e),n=M(y.d),i=n.charAt(0),E++;s=y.e,i>1?(y=new b("0."+n),s++):y=new b(i+"."+n.slice(1))}else return c=Oe(b,l+2,_).times(s+""),y=te(new b(i+"."+n.slice(1)),l-N).plus(c),b.precision=_,t==null?T(y,_,q,O=!0):y;for(f=y,u=o=y=C(y.minus(1),y.plus(1),l,1),h=T(y.times(y),l,1),r=3;;){if(o=T(o.times(h),l,1),c=u.plus(C(o,new b(r),l,1)),M(c.d).slice(0,l)===M(u.d).slice(0,l))if(u=u.times(2),s!==0&&(u=u.plus(Oe(b,l+2,_).times(s+""))),u=C(u,new b(E),l,1),t==null)if(pe(u.d,l-N,q,a))b.precision=l+=N,c=o=y=C(f.minus(1),f.plus(1),l,1),h=T(y.times(y),l,1),r=a=1;else return T(u,b.precision=_,q,O=!0);else return b.precision=_,u;u=c,r+=2}}function ct(e){return String(e.s*e.s/0)}function Ue(e,t){var n,i,r;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(i=t.search(/e/i))>0?(n<0&&(n=i),n+=+t.slice(i+1),t=t.substring(0,i)):n<0&&(n=t.length),i=0;t.charCodeAt(i)===48;i++);for(r=t.length;t.charCodeAt(r-1)===48;--r);if(t=t.slice(i,r),t){if(r-=i,e.e=n=n-i-1,e.d=[],i=(n+1)%A,n<0&&(i+=A),i<r){for(i&&e.d.push(+t.slice(0,i)),r-=A;i<r;)e.d.push(+t.slice(i,i+=A));t=t.slice(i),i=A-t.length}else i-=r;for(;i--;)t+="0";e.d.push(+t),O&&(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 Bt(e,t){var n,i,r,s,o,a,u,c,l;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),it.test(t))return Ue(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Rt.test(t))n=16,t=t.toLowerCase();else if(kt.test(t))n=2;else if(Lt.test(t))n=8;else throw Error(K+t);for(s=t.search(/p/i),s>0?(u=+t.slice(s+1),t=t.substring(2,s)):t=t.slice(2),s=t.indexOf("."),o=s>=0,i=e.constructor,o&&(t=t.replace(".",""),a=t.length,s=a-s,r=st(i,new i(n),s,s*2)),c=Ae(t,n,G),l=c.length-1,s=l;c[s]===0;--s)c.pop();return s<0?new i(e.s*0):(e.e=Ie(c,l),e.d=c,O=!1,o&&(e=C(e,r,a*4)),u&&(e=e.times(Math.abs(u)<54?F(2,u):ce.pow(2,u))),O=!0,e)}function Ut(e,t){var n,i=t.d.length;if(i<3)return t.isZero()?t:ae(e,2,t,t);n=1.4*Math.sqrt(i),n=n>16?16:n|0,t=t.times(1/_e(5,n)),t=ae(e,2,t,t);for(var r,s=new e(5),o=new e(16),a=new e(20);n--;)r=t.times(t),t=t.times(s.plus(r.times(o.times(r).minus(a))));return t}function ae(e,t,n,i,r){var s,o,a,u,c=e.precision,l=Math.ceil(c/A);for(O=!1,u=n.times(n),a=new e(i);;){if(o=C(a.times(u),new e(t++*t++),c,1),a=r?i.plus(o):i.minus(o),i=C(o.times(u),new e(t++*t++),c,1),o=a.plus(i),o.d[l]!==void 0){for(s=l;o.d[s]===a.d[s]&&s--;);if(s==-1)break}s=a,a=i,i=o,o=s}return O=!0,o.d.length=l+1,o}function _e(e,t){for(var n=e;--t;)n*=e;return n}function ut(e,t){var n,i=t.s<0,r=Y(e,e.precision,1),s=r.times(.5);if(t=t.abs(),t.lte(s))return Q=i?4:1,t;if(n=t.divToInt(r),n.isZero())Q=i?3:2;else{if(t=t.minus(n.times(r)),t.lte(s))return Q=ot(n)?i?2:3:i?4:1,t;Q=ot(n)?i?1:4:i?3:2}return t.minus(r).abs()}function qe(e,t,n,i){var r,s,o,a,u,c,l,f,h,E=e.constructor,N=n!==void 0;if(N?(j(n,1,W),i===void 0?i=E.rounding:j(i,0,8)):(n=E.precision,i=E.rounding),!e.isFinite())l=ct(e);else{for(l=X(e),o=l.indexOf("."),N?(r=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):r=t,o>=0&&(l=l.replace(".",""),h=new E(1),h.e=l.length-o,h.d=Ae(X(h),10,r),h.e=h.d.length),f=Ae(l,10,r),s=u=f.length;f[--u]==0;)f.pop();if(!f[0])l=N?"0p+0":"0";else{if(o<0?s--:(e=new E(e),e.d=f,e.e=s,e=C(e,h,n,i,0,r),f=e.d,s=e.e,c=Ke),o=f[n],a=r/2,c=c||f[n+1]!==void 0,c=i<4?(o!==void 0||c)&&(i===0||i===(e.s<0?3:2)):o>a||o===a&&(i===4||c||i===6&&f[n-1]&1||i===(e.s<0?8:7)),f.length=n,c)for(;++f[--n]>r-1;)f[n]=0,n||(++s,f.unshift(1));for(u=f.length;!f[u-1];--u);for(o=0,l="";o<u;o++)l+=Fe.charAt(f[o]);if(N){if(u>1)if(t==16||t==8){for(o=t==16?4:3,--u;u%o;u++)l+="0";for(f=Ae(l,r,t),u=f.length;!f[u-1];--u);for(o=1,l="1.";o<u;o++)l+=Fe.charAt(f[o])}else l=l.charAt(0)+"."+l.slice(1);l=l+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)l="0"+l;l="0."+l}else if(++s>u)for(s-=u;s--;)l+="0";else s<u&&(l=l.slice(0,s)+"."+l.slice(s))}l=(t==16?"0x":t==2?"0b":t==8?"0o":"")+l}return e.s<0?"-"+l:l}function lt(e,t){if(e.length>t)return e.length=t,!0}function qt(e){return new this(e).abs()}function Vt(e){return new this(e).acos()}function jt(e){return new this(e).acosh()}function $t(e,t){return new this(e).plus(t)}function Ht(e){return new this(e).asin()}function Gt(e){return new this(e).asinh()}function Yt(e){return new this(e).atan()}function Jt(e){return new this(e).atanh()}function zt(e,t){e=new this(e),t=new this(t);var n,i=this.precision,r=this.rounding,s=i+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=Y(this,s,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?Y(this,i,r):new this(0),n.s=e.s):!e.d||t.isZero()?(n=Y(this,s,1).times(.5),n.s=e.s):t.s<0?(this.precision=s,this.rounding=1,n=this.atan(C(e,t,s,1)),t=Y(this,s,1),this.precision=i,this.rounding=r,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(C(e,t,s,1)),n}function Xt(e){return new this(e).cbrt()}function Qt(e){return T(e=new this(e),e.e+1,2)}function Zt(e,t,n){return new this(e).clamp(t,n)}function Wt(e){if(!e||typeof e!="object")throw Error(Te+"Object expected");var t,n,i,r=e.defaults===!0,s=["precision",1,W,"rounding",0,8,"toExpNeg",-oe,0,"toExpPos",0,oe,"maxE",0,oe,"minE",-oe,0,"modulo",0,9];for(t=0;t<s.length;t+=3)if(n=s[t],r&&(this[n]=Pe[n]),(i=e[n])!==void 0)if(U(i)===i&&i>=s[t+1]&&i<=s[t+2])this[n]=i;else throw Error(K+n+": "+i);if(n="crypto",r&&(this[n]=Pe[n]),(i=e[n])!==void 0)if(i===!0||i===!1||i===0||i===1)if(i)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(tt);else this[n]=!1;else throw Error(K+n+": "+i);return this}function Kt(e){return new this(e).cos()}function en(e){return new this(e).cosh()}function ft(e){var t,n,i;function r(s){var o,a,u,c=this;if(!(c instanceof r))return new r(s);if(c.constructor=r,ht(s)){c.s=s.s,O?!s.d||s.e>r.maxE?(c.e=NaN,c.d=null):s.e<r.minE?(c.e=0,c.d=[0]):(c.e=s.e,c.d=s.d.slice()):(c.e=s.e,c.d=s.d?s.d.slice():s.d);return}if(u=typeof s,u==="number"){if(s===0){c.s=1/s<0?-1:1,c.e=0,c.d=[0];return}if(s<0?(s=-s,c.s=-1):c.s=1,s===~~s&&s<1e7){for(o=0,a=s;a>=10;a/=10)o++;O?o>r.maxE?(c.e=NaN,c.d=null):o<r.minE?(c.e=0,c.d=[0]):(c.e=o,c.d=[s]):(c.e=o,c.d=[s]);return}else if(s*0!==0){s||(c.s=NaN),c.e=NaN,c.d=null;return}return Ue(c,s.toString())}else if(u!=="string")throw Error(K+s);return(a=s.charCodeAt(0))===45?(s=s.slice(1),c.s=-1):(a===43&&(s=s.slice(1)),c.s=1),it.test(s)?Ue(c,s):Bt(c,s)}if(r.prototype=m,r.ROUND_UP=0,r.ROUND_DOWN=1,r.ROUND_CEIL=2,r.ROUND_FLOOR=3,r.ROUND_HALF_UP=4,r.ROUND_HALF_DOWN=5,r.ROUND_HALF_EVEN=6,r.ROUND_HALF_CEIL=7,r.ROUND_HALF_FLOOR=8,r.EUCLID=9,r.config=r.set=Wt,r.clone=ft,r.isDecimal=ht,r.abs=qt,r.acos=Vt,r.acosh=jt,r.add=$t,r.asin=Ht,r.asinh=Gt,r.atan=Yt,r.atanh=Jt,r.atan2=zt,r.cbrt=Xt,r.ceil=Qt,r.clamp=Zt,r.cos=Kt,r.cosh=en,r.div=tn,r.exp=nn,r.floor=rn,r.hypot=sn,r.ln=on,r.log=an,r.log10=un,r.log2=cn,r.max=ln,r.min=fn,r.mod=hn,r.mul=dn,r.pow=pn,r.random=mn,r.round=gn,r.sign=En,r.sin=Nn,r.sinh=yn,r.sqrt=vn,r.sub=wn,r.sum=Tn,r.tan=An,r.tanh=In,r.trunc=On,e===void 0&&(e={}),e&&e.defaults!==!0)for(i=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<i.length;)e.hasOwnProperty(n=i[t++])||(e[n]=this[n]);return r.config(e),r}function tn(e,t){return new this(e).div(t)}function nn(e){return new this(e).exp()}function rn(e){return T(e=new this(e),e.e+1,3)}function sn(){var e,t,n=new this(0);for(O=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return O=!0,new this(1/0);n=t}return O=!0,n.sqrt()}function ht(e){return e instanceof ce||e&&e.toStringTag===nt||!1}function on(e){return new this(e).ln()}function an(e,t){return new this(e).log(t)}function cn(e){return new this(e).log(2)}function un(e){return new this(e).log(10)}function ln(){return at(this,arguments,"lt")}function fn(){return at(this,arguments,"gt")}function hn(e,t){return new this(e).mod(t)}function dn(e,t){return new this(e).mul(t)}function pn(e,t){return new this(e).pow(t)}function mn(e){var t,n,i,r,s=0,o=new this(1),a=[];if(e===void 0?e=this.precision:j(e,1,W),i=Math.ceil(e/A),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(i));s<i;)r=t[s],r>=429e7?t[s]=crypto.getRandomValues(new Uint32Array(1))[0]:a[s++]=r%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(i*=4);s<i;)r=t[s]+(t[s+1]<<8)+(t[s+2]<<16)+((t[s+3]&127)<<24),r>=214e7?crypto.randomBytes(4).copy(t,s):(a.push(r%1e7),s+=4);s=i/4}else throw Error(tt);else for(;s<i;)a[s++]=Math.random()*1e7|0;for(i=a[--s],e%=A,i&&e&&(r=F(10,A-e),a[s]=(i/r|0)*r);a[s]===0;s--)a.pop();if(s<0)n=0,a=[0];else{for(n=-1;a[0]===0;n-=A)a.shift();for(i=1,r=a[0];r>=10;r/=10)i++;i<A&&(n-=A-i)}return o.e=n,o.d=a,o}function gn(e){return T(e=new this(e),e.e+1,this.rounding)}function En(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function Nn(e){return new this(e).sin()}function yn(e){return new this(e).sinh()}function vn(e){return new this(e).sqrt()}function wn(e,t){return new this(e).sub(t)}function Tn(){var e=0,t=arguments,n=new this(t[e]);for(O=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return O=!0,T(n,this.precision,this.rounding)}function An(e){return new this(e).tan()}function In(e){return new this(e).tanh()}function On(e){return T(e=new this(e),e.e+1,1)}m[Symbol.for("nodejs.util.inspect.custom")]=m.toString,m[Symbol.toStringTag]="Decimal";var ce=m.constructor=ft(Pe);ve=new ce(ve),we=new ce(we);const Ve=JSON,_n=e=>e.toUpperCase(),bn=e=>{const t={};return e.forEach((n,i)=>{t[i]=n}),t},Dn=(e,t,n)=>e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0},Sn=(e,t,n)=>e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0},xn=(e,t)=>e.documents?e:{documents:e,requestHeaders:t,signal:void 0};function be(e,t){if(!!!e)throw new Error(t)}function Cn(e){return typeof e=="object"&&e!==null}function kn(e,t){if(!!!e)throw new Error("Unexpected invariant triggered.")}const Rn=/\r\n|[\n\r]/g;function je(e,t){let n=0,i=1;for(const r of e.body.matchAll(Rn)){if(typeof r.index=="number"||kn(!1),r.index>=t)break;n=r.index+r[0].length,i+=1}return{line:i,column:t+1-n}}function Ln(e){return dt(e.source,je(e.source,e.start))}function dt(e,t){const n=e.locationOffset.column-1,i="".padStart(n)+e.body,r=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?n:0,u=t.column+a,c=`${e.name}:${o}:${u}
8
8
  `,l=i.split(/\r\n|[\n\r]/g),f=l[r];if(f.length>120){const h=Math.floor(u/80),E=u%80,N=[];for(let y=0;y<f.length;y+=80)N.push(f.slice(y,y+80));return c+pt([[`${o} |`,N[0]],...N.slice(1,h+1).map(y=>["|",y]),["|","^".padStart(E)],["|",N[h+1]]])}return c+pt([[`${o-1} |`,l[r-1]],[`${o} |`,f],["|","^".padStart(u)],[`${o+1} |`,l[r+1]]])}function pt(e){const t=e.filter(([i,r])=>r!==void 0),n=Math.max(...t.map(([i])=>i.length));return t.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
9
9
  `)}function Fn(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class $e extends Error{constructor(t,...n){var i,r,s;const{nodes:o,source:a,positions:u,path:c,originalError:l,extensions:f}=Fn(n);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=l??void 0,this.nodes=mt(Array.isArray(o)?o:o?[o]:void 0);const h=mt((i=this.nodes)===null||i===void 0?void 0:i.map(N=>N.loc).filter(N=>N!=null));this.source=a??(h==null||(r=h[0])===null||r===void 0?void 0:r.source),this.positions=u??(h==null?void 0:h.map(N=>N.start)),this.locations=u&&a?u.map(N=>je(a,N)):h==null?void 0:h.map(N=>je(N.source,N.start));const E=Cn(l==null?void 0:l.extensions)?l==null?void 0:l.extensions:void 0;this.extensions=(s=f??E)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,$e):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(t+=`
10
10
 
11
11
  `+Ln(n.loc));else if(this.source&&this.locations)for(const n of this.locations)t+=`
12
12
 
13
- `+dt(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function mt(e){return e===void 0||e.length===0?void 0:e}function P(e,t,n){return new $e(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Pn{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class gt{constructor(t,n,i,r,s,o){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Et={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Mn=new Set(Object.keys(Et));function Nt(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&Mn.has(t)}var ue;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ue||(ue={}));var He;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(He||(He={}));var I;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(I||(I={}));function Ge(e){return e===9||e===32}function me(e){return e>=48&&e<=57}function yt(e){return e>=97&&e<=122||e>=65&&e<=90}function vt(e){return yt(e)||e===95}function Bn(e){return yt(e)||me(e)||e===95}function Un(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let o=0;o<e.length;++o){var s;const a=e[o],u=qn(a);u!==a.length&&(i=(s=i)!==null&&s!==void 0?s:o,r=o,o!==0&&u<n&&(n=u))}return e.map((o,a)=>a===0?o:o.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function qn(e){let t=0;for(;t<e.length&&Ge(e.charCodeAt(t));)++t;return t}function Vn(e,t){const n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=i.length===1,s=i.length>1&&i.slice(1).every(E=>E.length===0||Ge(E.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,u=e.endsWith("\\"),c=a||u,l=!(t!=null&&t.minimize)&&(!r||e.length>70||c||s||o);let f="";const h=r&&Ge(e.charCodeAt(0));return(l&&!h||s)&&(f+=`
13
+ `+dt(this.source,n);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function mt(e){return e===void 0||e.length===0?void 0:e}function P(e,t,n){return new $e(`Syntax Error: ${n}`,{source:e,positions:[t]})}class Pn{constructor(t,n,i){this.start=t.start,this.end=n.end,this.startToken=t,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class gt{constructor(t,n,i,r,s,o){this.kind=t,this.start=n,this.end=i,this.line=r,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Et={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},Mn=new Set(Object.keys(Et));function Nt(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&Mn.has(t)}var ue;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ue||(ue={}));var He;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(He||(He={}));var I;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(I||(I={}));function Ge(e){return e===9||e===32}function me(e){return e>=48&&e<=57}function yt(e){return e>=97&&e<=122||e>=65&&e<=90}function vt(e){return yt(e)||e===95}function Bn(e){return yt(e)||me(e)||e===95}function Un(e){var t;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let o=0;o<e.length;++o){var s;const a=e[o],u=qn(a);u!==a.length&&(i=(s=i)!==null&&s!==void 0?s:o,r=o,o!==0&&u<n&&(n=u))}return e.map((o,a)=>a===0?o:o.slice(n)).slice((t=i)!==null&&t!==void 0?t:0,r+1)}function qn(e){let t=0;for(;t<e.length&&Ge(e.charCodeAt(t));)++t;return t}function Vn(e,t){const n=e.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=i.length===1,s=i.length>1&&i.slice(1).every(E=>E.length===0||Ge(E.charCodeAt(0))),o=n.endsWith('\\"""'),a=e.endsWith('"')&&!o,u=e.endsWith("\\"),c=a||u,l=!r||e.length>70||c||s||o;let f="";const h=r&&Ge(e.charCodeAt(0));return(l&&!h||s)&&(f+=`
14
14
  `),f+=n,(l||c)&&(f+=`
15
15
  `),'"""'+f+'"""'}var p;(function(e){e.SOF="<SOF>",e.EOF="<EOF>",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(p||(p={}));class jn{constructor(t){const n=new gt(p.SOF,0,0,0,0);this.source=t,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==p.EOF)do if(t.next)t=t.next;else{const n=Hn(this,t.end);t.next=n,n.prev=t,t=n}while(t.kind===p.COMMENT);return t}}function $n(e){return e===p.BANG||e===p.DOLLAR||e===p.AMP||e===p.PAREN_L||e===p.PAREN_R||e===p.SPREAD||e===p.COLON||e===p.EQUALS||e===p.AT||e===p.BRACKET_L||e===p.BRACKET_R||e===p.BRACE_L||e===p.PIPE||e===p.BRACE_R}function le(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function De(e,t){return wt(e.charCodeAt(t))&&Tt(e.charCodeAt(t+1))}function wt(e){return e>=55296&&e<=56319}function Tt(e){return e>=56320&&e<=57343}function re(e,t){const n=e.source.body.codePointAt(t);if(n===void 0)return p.EOF;if(n>=32&&n<=126){const i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function L(e,t,n,i,r){const s=e.line,o=1+n-e.lineStart;return new gt(t,n,i,s,o,r)}function Hn(e,t){const n=e.source.body,i=n.length;let r=t;for(;r<i;){const s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++e.line,e.lineStart=r;continue;case 35:return Gn(e,r);case 33:return L(e,p.BANG,r,r+1);case 36:return L(e,p.DOLLAR,r,r+1);case 38:return L(e,p.AMP,r,r+1);case 40:return L(e,p.PAREN_L,r,r+1);case 41:return L(e,p.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n.charCodeAt(r+2)===46)return L(e,p.SPREAD,r,r+3);break;case 58:return L(e,p.COLON,r,r+1);case 61:return L(e,p.EQUALS,r,r+1);case 64:return L(e,p.AT,r,r+1);case 91:return L(e,p.BRACKET_L,r,r+1);case 93:return L(e,p.BRACKET_R,r,r+1);case 123:return L(e,p.BRACE_L,r,r+1);case 124:return L(e,p.PIPE,r,r+1);case 125:return L(e,p.BRACE_R,r,r+1);case 34:return n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34?Zn(e,r):Jn(e,r)}if(me(s)||s===45)return Yn(e,r,s);if(vt(s))return Wn(e,r);throw P(e.source,r,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:le(s)||De(n,r)?`Unexpected character: ${re(e,r)}.`:`Invalid character: ${re(e,r)}.`)}return L(e,p.EOF,i,i)}function Gn(e,t){const n=e.source.body,i=n.length;let r=t+1;for(;r<i;){const s=n.charCodeAt(r);if(s===10||s===13)break;if(le(s))++r;else if(De(n,r))r+=2;else break}return L(e,p.COMMENT,t,r,n.slice(t+1,r))}function Yn(e,t,n){const i=e.source.body;let r=t,s=n,o=!1;if(s===45&&(s=i.charCodeAt(++r)),s===48){if(s=i.charCodeAt(++r),me(s))throw P(e.source,r,`Invalid number, unexpected digit after 0: ${re(e,r)}.`)}else r=Ye(e,r,s),s=i.charCodeAt(r);if(s===46&&(o=!0,s=i.charCodeAt(++r),r=Ye(e,r,s),s=i.charCodeAt(r)),(s===69||s===101)&&(o=!0,s=i.charCodeAt(++r),(s===43||s===45)&&(s=i.charCodeAt(++r)),r=Ye(e,r,s),s=i.charCodeAt(r)),s===46||vt(s))throw P(e.source,r,`Invalid number, expected digit but got: ${re(e,r)}.`);return L(e,o?p.FLOAT:p.INT,t,r,i.slice(t,r))}function Ye(e,t,n){if(!me(n))throw P(e.source,t,`Invalid number, expected digit but got: ${re(e,t)}.`);const i=e.source.body;let r=t+1;for(;me(i.charCodeAt(r));)++r;return r}function Jn(e,t){const n=e.source.body,i=n.length;let r=t+1,s=r,o="";for(;r<i;){const a=n.charCodeAt(r);if(a===34)return o+=n.slice(s,r),L(e,p.STRING,t,r+1,o);if(a===92){o+=n.slice(s,r);const u=n.charCodeAt(r+1)===117?n.charCodeAt(r+2)===123?zn(e,r):Xn(e,r):Qn(e,r);o+=u.value,r+=u.size,s=r;continue}if(a===10||a===13)break;if(le(a))++r;else if(De(n,r))r+=2;else throw P(e.source,r,`Invalid character within String: ${re(e,r)}.`)}throw P(e.source,r,"Unterminated string.")}function zn(e,t){const n=e.source.body;let i=0,r=3;for(;r<12;){const s=n.charCodeAt(t+r++);if(s===125){if(r<5||!le(i))break;return{value:String.fromCodePoint(i),size:r}}if(i=i<<4|ge(s),i<0)break}throw P(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+r)}".`)}function Xn(e,t){const n=e.source.body,i=At(n,t+2);if(le(i))return{value:String.fromCodePoint(i),size:6};if(wt(i)&&n.charCodeAt(t+6)===92&&n.charCodeAt(t+7)===117){const r=At(n,t+8);if(Tt(r))return{value:String.fromCodePoint(i,r),size:12}}throw P(e.source,t,`Invalid Unicode escape sequence: "${n.slice(t,t+6)}".`)}function At(e,t){return ge(e.charCodeAt(t))<<12|ge(e.charCodeAt(t+1))<<8|ge(e.charCodeAt(t+2))<<4|ge(e.charCodeAt(t+3))}function ge(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function Qn(e,t){const n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
16
16
  `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw P(e.source,t,`Invalid character escape sequence: "${n.slice(t,t+2)}".`)}function Zn(e,t){const n=e.source.body,i=n.length;let r=e.lineStart,s=t+3,o=s,a="";const u=[];for(;s<i;){const c=n.charCodeAt(s);if(c===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){a+=n.slice(o,s),u.push(a);const l=L(e,p.BLOCK_STRING,t,s+3,Un(u).join(`