@tubular/astronomy
Version:
Astronomical calculations for planetary positions, moon phases, eclipses, rise, transit, and set times, and more.
99 lines • 248 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@tubular/time")):"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.tbAstro=t(require("@tubular/time")):e.tbAstro=t(e.tbTime)}(self,(e=>(()=>{var t={567:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=567,e.exports=t},253:t=>{"use strict";t.exports=e}},i={};function n(e){var r=i[e]
;if(void 0!==r)return r.exports;var a=i[e]={exports:{}};return t[e](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{ABERRATION:()=>kt,APHELION:()=>Ii,
ASTEROID_BASE:()=>Ln,ASTEROID_MAX:()=>On,ASTROMETRIC:()=>jt,ASTRONOMICAL_TWILIGHT:()=>Fi,AS_SEEN_FROM_EARTH:()=>Hr,AS_SEEN_FROM_SUN:()=>kr,AVG_SUN_MOON_RADIUS:()=>Ji,AdditionalOrbitingObjects:()=>zn,AstroEvent:()=>ta,CALLISTO:()=>pn,CANCEL_SELECTION:()=>Ot,CIVIL_TWILIGHT:()=>xi,COLORS_MOONLIGHT:()=>er,COLOR_ASTRONOMICAL_TWILIGHT:()=>Xn,COLOR_CIVIL_TWILIGHT:()=>Kn,COLOR_DAY:()=>$n,COLOR_EARLY_SUNRISE:()=>Wn,COLOR_LATE_SUNRISE:()=>Qn,COLOR_NAUTICAL_TWILIGHT:()=>Yn,COLOR_NEAR_SUNRISE:()=>Jn,
COLOR_NIGHT:()=>Vn,COMET_BASE:()=>Rn,COMET_MAX:()=>Pn,CONSTELLATION_BASE:()=>xn,CONSTELLATION_MAX:()=>Un,CircumstancesOfEclipse:()=>Rr,DAY:()=>an,DEFAULT_FLAGS:()=>Xt,DELAYED_TIME:()=>qt,DIONE:()=>bn,DataQuality:()=>qr,EARTH:()=>Tt,EARTH_RADIUS_KM:()=>ki,EARTH_RADIUS_POLAR_KM:()=>ji,ECLIPSE_EVENT_BASE:()=>Mi,ENCELADUS:()=>Nn,EQ_SOLSTICE_EVENT_BASE:()=>ai,EUROPA:()=>fn,Ecliptic:()=>Zn,EventFinder:()=>na,FALL_EQUINOX:()=>oi,FIRST_JUPITER_MOON:()=>dn,FIRST_PLANET:()=>mt,FIRST_QUARTER:()=>ei,
FIRST_SATURN_MOON:()=>Tn,FULL_MOON:()=>ti,GALACTIC_ASCENDING_NODE_B1950:()=>rn,GALACTIC_NORTH_B1950:()=>nn,GALILEAN_MOON_EVENT:()=>Oi,GANYMEDE:()=>mn,GREATEST_ELONGATION:()=>Si,GRS_TRANSIT_EVENT:()=>Pi,GRS_TRANSIT_EVENT_BASE:()=>Ri,HALF_DAY:()=>sn,HALF_HOUR:()=>on,HALF_MINUTE:()=>un,HALF_SECOND:()=>cn,HIGH_PRECISION:()=>Pt,HOUR:()=>An,HYPERION:()=>_n,IAPETUS:()=>Dn,INCLINATION_MEAN_LUNAR_EQUATOR:()=>tn,INFERIOR_CONJUNCTION:()=>Ti,IN_BETWEEN_PHASES:()=>Wt,IO:()=>gn,JD_B1950:()=>ft,JD_J2000:()=>gt,
JUPITER:()=>Nt,JUPITER_FLATTENING:()=>hn,JupiterInfo:()=>aa,JupitersMoons:()=>Jr,KM_PER_AU:()=>zi,K_DEG:()=>$i,K_RAD:()=>en,LABEL_ANCHOR:()=>Ea,LAST_JUPITER_MOON:()=>vn,LAST_PLANET:()=>Dt,LAST_QUARTER:()=>ii,LAST_SATURN_MOON:()=>wn,LIGHT_DAYS_PER_AU:()=>Vi,LINE_BREAK:()=>va,LOW_PRECISION:()=>Rt,LUNAR_ECLIPSE:()=>yi,LUNAR_ECLIPSE_LOCAL:()=>Di,MARS:()=>St,MAX_ALT_FOR_TWILIGHT:()=>Hi,MAX_YEAR:()=>Kt,MEAN_JUPITER_SYS_II:()=>Xi,MEAN_SYNODIC_MONTH:()=>Yi,MERCURY:()=>vt,MIMAS:()=>Sn,MINUTE:()=>Bn,MIN_YEAR:()=>Yt,
MOON:()=>_t,MOONS_EVENT_BASE:()=>Li,MOON_ITSELF:()=>jr,MOON_RADIUS_KM:()=>qi,MOON_SHADOW:()=>Zr,MeeusMoon:()=>Nr,MoonEvent:()=>Fr,MoonEvents:()=>Yr,NAUTICAL_TWILIGHT:()=>Ui,NEPTUNE:()=>Mt,NEW_MOON:()=>$t,NMode:()=>dt,NON_EVENT:()=>Jt,NOT_EQUINOX_OR_SOLSTICE:()=>ri,NO_MATCH:()=>wt,NO_PRECESSION:()=>Vt,NO_SELECTION:()=>Lt,NO_TWILIGHT:()=>Gi,NUTATION:()=>Gt,OBLIQUITY_J2000:()=>Qi,OPPOSITION:()=>vi,ObjectInfo:()=>qn,PERIHELION:()=>Ni,PHASE_EVENT_BASE:()=>Qt,PLANET_EVENT_BASE:()=>pi,PLUTO:()=>yt,
PlanetaryMoons:()=>Kr,Pluto:()=>Mr,QUADRATURE:()=>bi,QUARTER_HOUR:()=>Cn,QUICK_PLANET:()=>Ht,QUICK_SUN:()=>Ft,REFRACTION:()=>Ut,REFRACTION_AT_HORIZON:()=>Ki,RHEA:()=>Mn,RISE_EVENT:()=>ui,RISE_SET_EVENT_BASE:()=>Bi,SATURN:()=>It,SATURN_FLATTENING:()=>En,SECOND:()=>ln,SET_EVENT:()=>li,SET_EVENT_MINUS_1_MIN:()=>mi,SIGNED_HOUR_ANGLE:()=>zt,SOLAR_ECLIPSE:()=>_i,SOLAR_ECLIPSE_LOCAL:()=>wi,SOLAR_SYSTEM_MAX:()=>Gn,SPRING_EQUINOX:()=>si,SUMMER_SOLSTICE:()=>Ai,SUN:()=>pt,SUN_RADIUS_KM:()=>Zi,
SUPERIOR_CONJUNCTION:()=>Ei,SaturnMoons:()=>Ba,SkyObserver:()=>fa,SolarSystem:()=>Gr,StarCatalog:()=>Sa,TDB_to_UT:()=>ba,TETHYS:()=>In,THIRD_QUARTER:()=>ni,TITAN:()=>yn,TOPOCENTRIC:()=>xt,TRANSIT_EVENT:()=>di,TRUE_DISTANCE:()=>Zt,TWILIGHT_BEGINS:()=>gi,TWILIGHT_ENDS:()=>fi,UNKNOWN_MAGNITUDE:()=>Wi,UNSEEN_ALL_DAY:()=>hi,URANUS:()=>bt,UT_to_TDB:()=>Ia,VENUS:()=>Et,VISIBLE_ALL_DAY:()=>ci,Vsop87Planets:()=>_r,WINTER_SOLSTICE:()=>Ci,equatorialToGalactic:()=>gr,galacticToEquatorial:()=>fr,
getDeltaTAtJulianDate:()=>Na,getInsolationColor:()=>Br,getSkyColor:()=>Cr,lecToString:()=>Or,refractedAltitude:()=>ar,unrefractedAltitude:()=>Ar});var e=n(253),t=Math.abs,i=Math.acos;Math.acosh;function a(e){return Math.acos(e)/Math.PI*180}var s=Math.asin;Math.asinh;function A(e){return Math.asin(e)/Math.PI*180}var o=Math.atan,C=Math.atan2;Math.atanh;function B(e){return Math.atan(e)/Math.PI*180}function u(e,t){return Math.atan2(e,t)/Math.PI*180}Math.cbrt;Math.clz32;var l=Math.cos,c=Math.cosh
;function h(e){return Math.cos(e/180*Math.PI)}function d(e,t){return Math.floor(e/t)}var g=Math.exp;Math.expm1;function f(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===t?Math.floor(e):e-M(e,t)}Math.fround,Math.hypot,Math.imul;function m(e,t,i,n,r){return e===i?n:n+(t-e)*(r-n)/(i-e)}function p(e,t,i,n,r,a){var s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],A=a/2;for((n<0||n>=a)&&(n=M(n,a));r<n-A;)r+=a;for(;r>=n+A;)r-=a;var o=m(e,t,i,n,r)
;return s&&(o<A||o>=A)?o=y(o,a):(o<0||o>=a)&&(o=M(o,a)),o}function v(e,t,i,n,r){for(var a=0,s=n;s<=r;++s){for(var A=1,o=n;o<=r;++o)o!==s&&(A*=(i-e[o])/(e[s]-e[o]));a+=A*t[s]}return a}function E(e,t,i,n,r){for(var a=Math.min(e.length,t.length),s=-1,A=a-1,o=0;o<a;++o){var C=e[o];if(s<0&&C>=r-n&&(s=o),C>=r+n){A=o;break}}return v(e,t,i,Math.max(s,0),A)}function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01;return e<-1-t?-1:e>1+t?1:e<-1?-1:e>1?1:e}
var S=Math.log,N=Math.log10,I=(Math.log1p,Math.log2,Math.max),b=Math.min;function M(e,t){var i=e%t;return i<0&&t>0||i>0&&t<0?t+i:i}function y(e,t){var i=e-Math.floor(e/t)*t;return i>=t/2&&(i-=t),i}var _=Math.pow;function D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return 1===t?Math.round(e):e+t/2-M(e+t/2,t)}var w=Math.sign;function L(e){return e<0?-1:1}var O=Math.sin,R=Math.sinh;function P(e){return Math.sin(e/180*Math.PI)}var G=Math.sqrt;function x(e){return e*e}var U=Math.tan
;Math.tanh;function F(e){return Math.tan(e/180*Math.PI)}function H(e){return 180*e/Math.PI}function k(e){return e*Math.PI/180}Math.trunc;var j,Z,q=2*Math.PI;!function(e){e[e.RADIANS=0]="RADIANS",e[e.DEGREES=1]="DEGREES",e[e.ARC_MINUTES=2]="ARC_MINUTES",e[e.ARC_SECONDS=3]="ARC_SECONDS",e[e.HOURS=4]="HOURS",e[e.HOUR_ANGLE_MINUTES=5]="HOUR_ANGLE_MINUTES",e[e.HOUR_ANGLE_SECONDS=6]="HOUR_ANGLE_SECONDS",e[e.ROTATIONS=7]="ROTATIONS",e[e.GRADS=8]="GRADS"}(j||(j={})),function(e){
e[e.RANGE_LIMIT_SIGNED=0]="RANGE_LIMIT_SIGNED",e[e.RANGE_LIMIT_NONNEGATIVE=1]="RANGE_LIMIT_NONNEGATIVE",e[e.RANGE_UNLIMITED=2]="RANGE_UNLIMITED"}(Z||(Z={}));var z,V,X=Math.PI,Y=X/2,K=2*X;function J(e,t){switch(t){case j.RADIANS:return e;case j.DEGREES:return e/180*X;case j.ARC_MINUTES:return e/10800*X;case j.ARC_SECONDS:return e/648e3*X;case j.HOURS:return e/12*X;case j.HOUR_ANGLE_MINUTES:return e/720*X;case j.HOUR_ANGLE_SECONDS:return e/43200*X;case j.ROTATIONS:return e*K;case j.GRADS:return e/200*X}
return NaN}function W(e,t){switch(t){case j.RADIANS:return e;case j.DEGREES:return 180*e/X;case j.ARC_MINUTES:return 10800*e/X;case j.ARC_SECONDS:return 648e3*e/X;case j.HOURS:return 12*e/X;case j.HOUR_ANGLE_MINUTES:return 720*e/X;case j.HOUR_ANGLE_SECONDS:return 43200*e/X;case j.ROTATIONS:return e/K;case j.GRADS:return 200*e/X}return NaN}class Q{constructor(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Z.RANGE_LIMIT_SIGNED;this.cached_sin=2,this.cached_cos=2,this.cached_tan=0,void 0===t&&(t=j.RADIANS),i===Z.RANGE_LIMIT_SIGNED?this.angle=y(J(e,t),K):i===Z.RANGE_LIMIT_NONNEGATIVE?this.angle=M(J(e,t),K):this.angle=J(e,t)}static asin(e){return new Q(Math.asin(e))}static asin_nonneg(e){return new Q(Math.asin(e),j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}
static acos(e){return new Q(Math.acos(e))}static atan(e){return new Q(Math.atan(e))}static atan_nonneg(e){return new Q(Math.atan(e),j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}static atan2(e,t){return new Q(Math.atan2(e,t))}static atan2_nonneg(e,t){return new Q(Math.atan2(e,t),j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}get radians(){return this.angle}get degrees(){return W(this.angle,j.DEGREES)}get arcMinutes(){return W(this.angle,j.ARC_MINUTES)}get arcSeconds(){return W(this.angle,j.ARC_SECONDS)}get hours(){
return W(this.angle,j.HOURS)}get rotations(){return W(this.angle,j.ROTATIONS)}get grads(){return W(this.angle,j.GRADS)}getAngle(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j.RADIANS;return W(this.angle,e)}get sin(){return this.cached_sin>1&&(this.cached_sin=Math.sin(this.angle)),this.cached_sin}get cos(){return this.cached_cos>1&&(this.cached_cos=Math.cos(this.angle)),this.cached_cos}get tan(){return 0===this.angle?0:(0===this.cached_tan&&(this.cached_tan=Math.tan(this.angle)),
this.cached_tan)}add(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z.RANGE_LIMIT_SIGNED;return new Q(this.angle+e.angle,j.RADIANS,t)}add_nonneg(e){return new Q(this.angle+e.angle,j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}subtract(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z.RANGE_LIMIT_SIGNED;return new Q(this.angle-e.angle,j.RADIANS,t)}subtract_nonneg(e){return new Q(this.angle-e.angle,j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}complement(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z.RANGE_LIMIT_SIGNED;return new Q(Y-this.angle,j.RADIANS,e)}complement_nonneg(){return new Q(Y-this.angle,j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}supplement(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z.RANGE_LIMIT_SIGNED;return new Q(X-this.angle,j.RADIANS,e)}supplement_nonneg(){return new Q(X-this.angle,j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}opposite(){
var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z.RANGE_LIMIT_SIGNED;return new Q(this.angle+X,j.RADIANS,e)}opposite_nonneg(){return new Q(this.angle+X,j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}negate(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Z.RANGE_LIMIT_SIGNED;return new Q(-this.angle,j.RADIANS,void 0===e?Z.RANGE_UNLIMITED:e)}negate_nonneg(){return new Q(-this.angle,j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}multiply(e){
var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z.RANGE_LIMIT_SIGNED;return new Q(this.angle*e,j.RADIANS,t)}multiply_nonneg(e){return new Q(this.angle*e,j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}divide(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Z.RANGE_LIMIT_SIGNED;return new Q(this.angle/e,j.RADIANS,t)}divide_nonneg(e){return new Q(this.angle/e,j.RADIANS,Z.RANGE_LIMIT_NONNEGATIVE)}toString(e,t){return Q.toStringAux(this.degrees,"°","'",'"',e,t)}toSuffixedString(e,i,n,r){
return Q.toStringAux(t(this.degrees),"°","'",'"',n,r)+(this.degrees<0?i:e)}toHourString(e,t){return Q.toStringAux(this.hours,"h","m","s",e,t)}toTimeString(e,t){return Q.toStringAux(this.hours,":",4===e?"":":","",e,t,2)}static toStringAux(e,i,n,r,a,s){var A=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,o=!!(12&(a=a||0));1&a?A=2:!!(2&a)&&(A=3),null==s&&(s=null!=a&&o?0:3);var C,B=Math.sign(e);if(e=t(e),o){var u=_(10,s);if(4&a){var l=D(60*e*u)/u;C=(e=f(l/60))+i+((l%=60)<10?"0":"")+l.toFixed(s)+n
}else{var c=D(3600*e*u)/u,h=f(c/60);c%=60,C=(e=f(h/60))+i+((h%=60)<10?"0":"")+h+n+(c<10?"0":"")+c.toFixed(s)+r}}else C=e.toFixed(s)+i;if(A)for(var d=A-/^(\d+)\D/.exec(C)[1].length,g=0;g<d;++g)C="0"+C;return B<0?C="-"+C:!!(16&a)&&(C="+"+C),C}}Q.ZERO=new Q(0),Q.RIGHT=new Q(Y),Q.STRAIGHT=new Q(X);class ${constructor(e,t,i,n,r,a){this.minMaxSeekingFunction=e,this.tolerance=t,this.maxIterations=i,this.ax=n,this.bx=r,this.cx=a,this._iterationCount=0,this.isMin=!0}getXAtMinMax(){
var e,i,n,r,a,s,A,o,C,B,u,l,c,h,d,g,f=0,m=0,p=1;for(e=this.ax<this.cx?this.ax:this.cx,i=this.ax>this.cx?this.ax:this.cx,d=h=c=this.bx,this.fx=this.minMaxSeekingFunction(d),this.fx>this.minMaxSeekingFunction(this.ax)?(this.isMin=!1,this.fx*=-1,p=-1):this.isMin=!0,s=a=this.fx,this._iterationCount=0;++this._iterationCount<=this.maxIterations;){if(g=.5*(e+i),u=2*(B=this.tolerance*t(d)+1e-20),t(d-g)<=u-.5*(i-e))return this.fx*=p,d;t(m)>B?(C=(d-h)*(this.fx-a),A=(d-c)*(o=(d-c)*(this.fx-s))-(d-h)*C,
(o=2*(o-C))>0&&(A=-A),o=t(o),n=m,m=f,t(A)>=t(.5*o*n)||A<=o*(e-d)||A>=o*(i-d)?f=.381966011250105*(m=d>=g?e-d:i-d):((l=d+(f=A/o))-e<u||i-l<u)&&(f=Math.sign(g-d)*B)):f=.381966011250105*(m=d>=g?e-d:i-d),l=t(f)>=B?d+f:d+Math.sign(f)*B,(r=p*this.minMaxSeekingFunction(l))<=this.fx?(l>=d?e=d:i=d,c=h,h=d,d=l,a=s,s=this.fx,this.fx=r):(l<d?e=l:i=l,r<=s||h===d?(c=h,h=l,a=s,s=r):(r<=a||c===d||c===h)&&(c=l,a=r))}return this.fx*=p,d}get foundMaximum(){return!this.isMin}get foundMinimum(){return this.isMin}get lastY(){
return this.fx}get iterationCount(){return this._iterationCount}}class ee{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:j.RADIANS,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:j.RADIANS;this._longitude="number"==typeof e?new Q(e,i,Z.RANGE_LIMIT_NONNEGATIVE):e,this._latitude="number"==typeof t?new Q(t,n):t}get longitude(){return this._longitude}
get rightAscension(){return this._longitude}get altitude(){return this._latitude}get azimuth(){return this._longitude}get latitude(){return this._latitude}get declination(){return this._latitude}distanceFrom(e){var n=i(T(this._latitude.sin*e._latitude.sin+this._latitude.cos*e._latitude.cos*this._longitude.subtract(e._longitude).cos));return n=t(y(n,q)),new Q(n)}toString(){return"lon: "+this.longitude+", lat: "+this.latitude}}class te extends ee{constructor(e,t){
var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;super(e,t,arguments.length>3?arguments[3]:void 0,arguments.length>4?arguments[4]:void 0),this._radius=i}static convertRectangular(e,t,i){var n;if("number"==typeof e){if(n=e,void 0===t||void 0===i)throw new Error("Invalid arguments")}else n=e.x,t=e.y,i=e.z;return new te(Q.atan2_nonneg(t,n),Q.atan2(i,Math.sqrt(n*n+t*t)),Math.sqrt(n*n+t*t+i*i))}static from2D(e,t){return new te(e.longitude,e.latitude,t)}get radius(){return this._radius}get xyz(){
return{x:this._radius*this._latitude.cos*this._longitude.cos,y:this._radius*this._latitude.cos*this._longitude.sin,z:this._radius*this._latitude.sin}}translate(e){var t=e.longitude,i=e.latitude,n=e.radius,r=this.longitude,a=this.latitude,s=this.radius,A=s*a.cos*r.cos-n*i.cos*t.cos,o=s*a.cos*r.sin-n*i.cos*t.sin,C=s*a.sin-n*i.sin;return te.convertRectangular(A,o,C)}toString(){return super.toString()+", rad: "+this.radius.toFixed(5)}}class ie{constructor(e,t,i,n,r,a,s){this.zeroSeekingFunction=e,
this.tolerance=t,this.maxIterations=i,this.x1=n,this.y1=r,this._iterationCount=0,null==a?(this.x2=r,this.y1=e(n),this.y2=e(r)):(this.x2=a,this.y2=s)}getXAtZero(){var e;for(this._iterationCount=0;++this._iterationCount<=this.maxIterations&&(e=this.x1-this.y1/(this.y2-this.y1)*(this.x2-this.x1),this.y=this.zeroSeekingFunction(e),!(Math.abs(this.y)<=this.tolerance));)this.y1<this.y2&&this.y<0||this.y1>this.y2&&this.y>0?(this.x1=e,this.y1=this.y):(this.x2=e,this.y2=this.y);return e}get lastY(){return this.y}
get iterationCount(){return this._iterationCount}}function ne(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=ae(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}
var a,s=!0,A=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){A=!0,a=e},f:function(){try{s||null==i.return||i.return()}finally{if(A)throw a}}}}function re(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var i=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==i)return;var n,r,a=[],s=!0,A=!1;try{for(i=i.call(e);!(s=(n=i.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){A=!0,r=e}finally{
try{s||null==i.return||i.return()}finally{if(A)throw r}}return a}(e,t)||ae(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ae(e,t){if(e){if("string"==typeof e)return se(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),
"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?se(e,t):void 0}}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function Ae(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var oe,Ce=Math.max,Be=Math.min,ue=Math.round,le=/[a-z]+/i,ce=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([0-9.]+)\s*\)/,he=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/
;function de(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,n=fe(e),r=fe(t),a=n.r,s=n.g,A=n.b,o=n.alpha,C=1-i;return ge(a*i+r.r*C,s*i+r.g*C,A*i+r.b*C,o*i+r.alpha*C)}function ge(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;e=Be(Ce(ue(e),0),255),t=Be(Ce(ue(t),0),255),i=Be(Ce(ue(i),0),255);var r=Be(Ce(n,0),1).toFixed(4).replace(/([01]).0000/,"$1").replace(/([^0])0+$/,"$1")
;return"1"===r?("#"+e.toString(16).padStart(2,"0")+t.toString(16).padStart(2,"0")+i.toString(16).padStart(2,"0")).toUpperCase():"rgba(".concat(e,", ").concat(t,", ").concat(i,", ").concat(r,")")}function fe(e){var t=le.exec(e);if(t){if(!oe){var i=document.createElement("canvas");oe=i.getContext("2d",{willReadFrequently:!0})}oe.fillStyle=e,e=String(oe.fillStyle)}if(e.startsWith("#")){if(4===e.length)return{r:parseInt(e.substr(1,1)+e.substr(1,1),16),g:parseInt(e.substr(2,1)+e.substr(2,1),16),
b:parseInt(e.substr(3,1)+e.substr(3,1),16),alpha:1};if(7===e.length)return{r:parseInt(e.substr(1,2),16),g:parseInt(e.substr(3,2),16),b:parseInt(e.substr(5,2),16),alpha:1}}return(t=he.exec(e))?{r:Number(t[1]),g:Number(t[2]),b:Number(t[3]),alpha:1}:(t=ce.exec(e))?{r:Number(t[1]),g:Number(t[2]),b:Number(t[3]),alpha:Number(t[4])}:{r:0,g:0,b:0,alpha:0}}try{var me=String.fromCharCode(117);"m&m".split(new RegExp("(?<!4)[^\\p{L}]+",me)),new RegExp("\\P{L}","g"+me),new RegExp("^\\p{Nd}$",me),
new RegExp("^\\p{Lu}+$",me),new RegExp(String.raw(z||(z=Ae(["(?<=^|[^p{L}])['’ʼ]?["],["(?<=^|[^\\p{L}])['’ʼ]?["])))+"\\"+String.raw(V||(V=Ae(["p{L}'’ʼ̀-ͯ]+['’ʼ]?(?=[^p{L}]|$)"],["p{L}'’ʼ\\u0300-\\u036F]+['’ʼ]?(?=[^\\p{L}]|$)"]))),"g"+me)}catch(F){0}function pe(e,t){return e<t?-1:e>t?1:0}function ve(e,t){return e?e+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:", ")+t:t}function Ee(e){return e.toLowerCase().replace(/['’ʼ]/g,"'")}
new Set(["a","an","and","as","at","but","by","de","del","for","for","from","in","into","la","le","near","nor","of","on","onto","or","the","to","with"]);var Te=new Map;function Se(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:" ",n="";!/^\s$/.test(i)&&"number"==typeof e&&e<0&&"0"===i&&(n="-",e=-e,--t);for(var r=String(e);r.length<t;)r=i+r;return n+r}function Ne(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t=function(e){return e.replace(Ie,"\\$&")}(t),
e.replace(new RegExp(t,"g"+(n?"i":"")),i)}["eBay","FedEx","iCloud","iMac","iOS","iPad","iPhone","MacBook","macOS","PepsiCo","watchOS"].forEach((e=>Te.set(Ee(e),e)));var Ie=/[-\[\]/{}()*+?.\\^$|]/g
;for(var be,Me={},ye={},_e={},De=0,we=[[1632,"Arabic"],[1776,"Extended Arabic"],[1984,"N'Ko"],[2406,"Devanagari"],[2534,"Bengali"],[2662,"Gurmukhi"],[2790,"Gujarati"],[2918,"Oriya"],[3046,"Tamil"],[3174,"Telugu"],[3302,"Kannada"],[3430,"Malayalam"],[3558,"Sinhala Lith"],[3664,"Thai"],[3792,"Lao"],[3872,"Tibetan"],[4160,"Myanmar"],[4240,"Myanmar Shan"],[6112,"Khmer"],[6160,"Mongolian"],[6470,"Limbu"],[6608,"New Tai Lue"],[6784,"Tai Tham Hora"],[6800,"Tai Tham Tham"],[6992,"Balinese"],[7088,"Sundanese"],[7232,"Lepcha"],[7248,"Ol Chiki"],[42528,"Vai"],[43216,"Saurashtra"],[43264,"Kayah Li"],[43472,"Javanese"],[43504,"Myanmar Tai Laing"],[43600,"Cham"],[44016,"Meetei Mayek"]];De<we.length;De++)for(var Le=re(we[De],2),Oe=Le[0],Re=Le[1],Pe=String.fromCodePoint(Oe),Ge=0;Ge<=9;++Ge){
var xe=String.fromCodePoint(Oe+Ge);Me[xe]=String.fromCodePoint(48+Ge),ye[xe]=Pe,_e[xe]=Re}function Ue(){if("undefined"!=typeof performance)return performance.now();if("undefined"!=typeof process){if(process.hrtime.bigint)return Number(process.hrtime.bigint())/1e6;var e=process.hrtime();return 1e3*e[0]+e[1]/1e6}return Date.now()}!function(e){e[e.DATE_ONLY=0]="DATE_ONLY",e[e.NO_SECONDS=1]="NO_SECONDS",e[e.NO_ZONE=2]="NO_ZONE",e[e.TIME_ONLY=3]="TIME_ONLY",e[e.UTC=4]="UTC",e[e.USE_T=5]="USE_T",
e[e.USE_Z=6]="USE_Z",e[e.WITH_MILLIS=7]="WITH_MILLIS"}(be||(be={}));for(var Fe=[],He=2;He<=36;++He)Fe[He]=He<=10?new RegExp("^[-+]?[0-"+(He-1)+"]+$"):new RegExp("^[-+]?[0-9A-"+String.fromCharCode(54+He)+"]+$","i");function ke(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if("number"==typeof e)return e;if("string"==typeof e){var i=parseFloat(e);return isNaN(i)||!isFinite(i)?t:i}if("bigint"==typeof e){var n=Number(e);return isNaN(n)||!isFinite(n)?t:n}return t}function je(e){
return Array.isArray(e)}function Ze(e){return"function"==typeof e}function qe(e){return"number"==typeof e}function ze(e){return!!e&&("function"==typeof e||"object"==typeof e)}function Ve(e){return"string"==typeof e}function Xe(e){return Ye(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1],0,new WeakMap)}function Ye(e,t,i,n){if(Ze(e)||!ze(e)||!0===t&&i>0)return e;if(n.has(e))return n.get(e);if(t&&i>0)if(t instanceof Set){var r,a=ne(t.values());try{for(a.s();!(r=a.n()).done;){
if(e instanceof r.value)return e}}catch(e){a.e(e)}finally{a.f()}}else if(Ze(t)&&t(e,i))return e;var s;if(e instanceof Date)s=new Date(e);else if(e instanceof RegExp)s=new RegExp(e);else{if(e instanceof Map)return s=new Map,n.set(e,s),Array.from(e.entries()).forEach((e=>s.set(e[0],Ye(e[1],t,i+1,n)))),s;if(e instanceof Set)return s=new Set,n.set(e,s),e.forEach((e=>s.add(Ye(e,t,i+1,n)))),s
;"undefined"!=typeof BigInt64Array&&e instanceof BigInt64Array?s=new BigInt64Array(e):"undefined"!=typeof BigUint64Array&&e instanceof BigUint64Array?s=new BigUint64Array(e):e instanceof Float32Array?s=new Float32Array(e):e instanceof Float64Array?s=new Float64Array(e):e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array?s=new Int8Array(e):e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array?s=new Uint8Array(e):e instanceof Uint8ClampedArray&&(s=new Uint8ClampedArray(e))
}if(s)return n.set(e,s),s;var A=function(e){var t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return ze(e)?(null===(t=e.constructor)||void 0===t?void 0:t.name)?e.constructor.name:i?"no-class:object":null:i?"no-class:"+typeof e:null}(e);null!=A&&"Array"!==A?(s=Object.create(Object.getPrototypeOf(e)),je(e)&&(s.length=e.length)):je(e)?(s=[]).length=e.length:s={},n.set(e,s);var o,C=ne(Reflect.ownKeys(e));try{for(C.s();!(o=C.n()).done;){var B=o.value;s[B]=Ye(e[B],t,i+1,n)}}catch(e){C.e(e)}finally{
C.f()}return s}function Ke(e,t,i){var n,r=ne(t);try{for(r.s();!(n=r.n()).done;){var a=n.value;0!==i&&je(a)?Ke(e,a,i-1):e.push(a)}}catch(e){r.e(e)}finally{r.f()}return e}var Je,We,Qe;var $e;Math.ceil,Math.floor,Math.max,Math.min;try{"undefined"!=typeof navigator&&($e=navigator)}catch(e){}$e||($e={appVersion:"?",maxTouchPoints:0,platform:"?",userAgent:"?",vendor:"?"});var et,tt=$e.platform||(null===(Je=$e.userAgentData)||void 0===Je?void 0:Je.platform)||"?";try{"undefined"!=typeof window&&(et=window)
}catch(e){}var it={"<":"<",">":">","&":"&",'"':""","'":"'"},nt={};Object.keys(it).forEach((e=>nt[it[e]]=e));var rt=tt.startsWith("Mac")||/\bMac OS X\b/i.test($e.userAgent),at=(rt&&/\bmobile\b/i.test($e.userAgent),
/\bSamsungBrowser\b/i.test($e.userAgent)),st=(null===(We=$e.appVersion)||void 0===We?void 0:We.includes("Windows"))||tt.startsWith("Win"),At=/\bedge\b/i.test($e.userAgent)&&st,ot=!!(null==et?void 0:et.chrome),Ct=ot&&/\bedg\//i.test($e.userAgent)&&st,Bt=($e.userAgent.includes("Android"),void 0!==(null==et?void 0:et.opr)),ut=("Google Inc."===$e.vendor&&(/\bChrome\b/i.test($e.userAgent)&&!At&&!at&&!Bt&&!Ct||/\bCriOS\b/.test($e.userAgent)),"Google Inc."===$e.vendor&&/\bCrOS\b/i.test($e.userAgent),
$e.userAgent.includes("Raspbian")||tt.includes("Linux armv"),/firefox/i.test($e.userAgent)&&/seamonkey/i.test($e.userAgent),/^((?!chrome|android).)*safari/i.test($e.userAgent)&&!At),lt=/i(Pad|Pod|Phone)/i.test(tt)||rt&&ut&&$e.maxTouchPoints>1;function ct(){return lt}var ht=ke((null!==(Qe=ct()?/(((iPhone|iPad).+?OS\s+)|(Version\/))(\d+)/i.exec($e.userAgent):null)&&void 0!==Qe?Qe:[])[5]);ct()
;lt||/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|\bmobile\b/i.test($e.userAgent)||null==et||et.matchMedia("only screen and (max-width: 760px)").matches
;var dt,gt=2451545,ft=2433282.4235,mt=0,pt=0,vt=1,Et=2,Tt=3,St=4,Nt=5,It=6,bt=7,Mt=8,yt=9,_t=10,Dt=10,wt=Number.MIN_SAFE_INTEGER,Lt=wt,Ot=Number.MAX_SAFE_INTEGER,Rt=1,Pt=2,Gt=4,xt=8,Ut=16,Ft=32,Ht=64,kt=128,jt=256,Zt=512,qt=1024,zt=2048,Vt=4096,Xt=1073741824,Yt=-6e3,Kt=9999,Jt=-1,Wt=-1,Qt=0,$t=0,ei=1,ti=2,ii=3,ni=3,ri=-2,ai=100,si=100,Ai=101,oi=102,Ci=103,Bi=200,ui=200,li=201,ci=202,hi=203,di=204,gi=205,fi=206,mi=207,pi=300,vi=300,Ei=301,Ti=302,Si=303,Ni=304,Ii=305,bi=306,Mi=400,yi=400,_i=401,Di=402,wi=403,Li=500,Oi=500,Ri=600,Pi=600,Gi=0,xi=-6,Ui=-12,Fi=-18,Hi=xi,ki=6378.14,ji=6356.755,Zi=696e3,qi=1737.4,zi=149597870.691,Vi=.005775518328,Xi=.4137042242,Yi=29.530589,Ki=.5833,Ji=.25,Wi=1e4,Qi=23.43929111,$i=.98560766860142,en=$i*Math.PI/180,tn=1.54242,nn=new ee(192.25,27.4,j.DEGREES,j.DEGREES),rn=new Q(33,j.DEGREES),an=1,sn=.5,An=1/24,on=1/48,Cn=1/96,Bn=1/1440,un=1/2880,ln=1/86400,cn=1/172800,hn=1.069303,dn=5001,gn=5001,fn=5002,mn=5003,pn=5004,vn=5004,En=1.120699,Tn=6001,Sn=6001,Nn=6002,In=6003,bn=6004,Mn=6005,yn=6006,_n=6007,Dn=6008,wn=6008,Ln=2e4,On=29999,Rn=3e4,Pn=39999,Gn=Pn,xn=1e5,Un=100999
;function Fn(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return Hn(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Hn(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,
n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,A=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){A=!0,a=e},f:function(){try{s||null==i.return||i.return()}finally{if(A)throw a}}}}function Hn(e,t){(null==t||t>e.length)&&(t=e.length)
;for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}!function(e){e[e.NUTATED=0]="NUTATED",e[e.MEAN_OBLIQUITY=1]="MEAN_OBLIQUITY",e[e.J2000=2]="J2000",e[e.ANTI_NUTATED=3]="ANTI_NUTATED"}(dt||(dt={}));var kn,jn=[-4680.93,-1.55,1999.25,-51.38,-249.67,-39.05,7.12,27.87,5.79,2.45]
;kn=["0 0 0 0 1 -171996 -174.2T 92025 8.9T","-2 0 0 2 2 -13187 -1.6T 5736 -3.1T","0 0 0 2 2 -2274 -0.2T 977 -0.5T","0 0 0 0 2 2062 0.2T -895 0.5T","0 1 0 0 0 1426 -3.4T 54 -0.1T","0 0 1 0 0 712 0.1T -7","-2 1 0 2 2 -517 1.2T 224 -0.6T","0 0 0 2 1 -386 -0.4T 200","0 0 1 2 2 -301 129 -0.1T","-2 -1 0 2 2 217 -0.5T -95 0.3T","-2 0 1 0 0 -158","-2 0 0 2 1 129 0.1T -70","0 0 -1 2 2 123 -53","2 0 0 0 0 63","0 0 1 0 1 63 0.1T -33","2 0 -1 2 2 -59 26","0 0 -1 0 1 -58 -0.1T 32","0 0 1 2 1 -51 27","-2 0 2 0 0 48","0 0 -2 2 1 46 -24","2 0 0 2 2 -38 16","0 0 2 2 2 -31 13","0 0 2 0 0 29","-2 0 1 2 2 29 -12","0 0 0 2 0 26","-2 0 0 2 0 -22","0 0 -1 2 1 21 -10","0 2 0 0 0 17 -0.1T","2 0 -1 0 1 16 -8","-2 2 0 2 2 -16 0.1T 7","0 1 0 0 1 -15 9","-2 0 1 0 1 -13 7","0 -1 0 0 1 -12 6","0 0 2 -2 0 11","2 0 -1 2 1 -10 5","2 0 1 2 2 -8 3","0 1 0 2 2 7 -3","-2 1 1 0 0 -7","0 -1 0 2 2 -7 3","2 0 0 2 1 -7 3","2 0 1 0 0 6","-2 0 2 2 2 6 -3","-2 0 1 2 1 6 -3","2 0 -2 0 1 -6 3","2 0 0 0 1 -6 3","0 -1 1 0 0 5","-2 -1 0 2 1 -5 3","-2 0 0 0 1 -5 3","0 0 2 2 1 -5 3","-2 0 2 0 1 4","-2 1 0 2 1 4","0 0 1 -2 0 4","-1 0 1 0 0 -4","-2 1 0 0 0 -4","1 0 0 0 0 -4","0 0 1 2 0 3","0 0 -2 2 2 -3","-1 -1 1 0 0 -3","0 1 1 0 0 -3","0 -1 1 2 2 -3","2 -1 -1 2 2 -3","0 0 3 2 2 -3","2 -1 0 2 2 -3"].map((e=>{
var t,i,n=[0,0,0,0,0,0,0,0,0],r=0,a=Fn(e.split(" "));try{for(a.s();!(i=a.n()).done;){var s=i.value;s.endsWith("T")?(t=!0,s=s.substring(0,s.length-1)):t=!1,6!==r||t||++r,n[r]=Number(s),++r}}catch(e){a.e(e)}finally{a.f()}return{fD:n[0],fM:n[1],fM1:n[2],fF:n[3],fQ:n[4],cs0:n[5],cs1:n[6],cc0:n[7],cc1:n[8]}}));class Zn{constructor(){this.cachedTime=0,this.cachedMode=dt.NUTATED,this.cachedNutation=null}static precessEquatorial(e,i,n){var r;qe(n)?r=i:(r=gt,n=i)
;var a=(r-gt)/36525,A=Math.pow(a,2),o=(n-r)/36525,B=Math.pow(o,2),u=B*o,c=e.rightAscension.radians,h=e.declination.radians,d=(2306.2181+1.39656*a-139e-6*A)*o+(.30188-344e-6*a)*B+.017998*u,g=(2306.2181+1.39656*a-139e-6*A)*o+(1.09468+66e-6*a)*B+.018203*u,f=(2004.3109-.8533*a-217e-6*A)*o-(.42665+217e-6*a)*B-.041833*u;d*=X/648e3,g*=X/648e3,f*=X/648e3;var m,p=l(h)*O(c+d),v=l(f)*l(h)*l(c+d)-O(f)*O(h),E=O(f)*l(h)*l(c+d)+l(f)*O(h),T=C(p,v)+g;return m=Y-t(h)>485e-8?s(E):G(Math.pow(p,2)+Math.pow(v,2)),new ee(T,m)}
static precessEquatorial3D(e,t,i){var n=Zn.precessEquatorial(e,t,i);return new te(n.longitude,n.latitude,e.radius)}static precessEcliptical(e,t,i){var n;qe(i)?n=t:(n=gt,i=t);var r=(n-gt)/36525,a=Math.pow(r,2),A=(i-n)/36525,o=Math.pow(A,2),B=o*A,u=e.longitude.radians,c=e.latitude.radians,h=(47.0029-.06603*r+598e-6*a)*A+(598e-6*r-.03302)*o+6e-5*B,d=629554.9824+3289.4789*r+.60622*a-(869.8089+.50491*r)*A+.03536*o,g=(5029.0966+2.22226*r-42e-6*a)*A+(1.11113-42e-6*r)*o-6e-6*B;d*=X/648e3,g*=X/648e3
;var f=l(h*=X/648e3)*l(c)*O(d-u)-O(h)*O(c),m=l(c)*l(d-u),p=l(h)*O(c)+O(h)*l(c)*O(d-u),v=g+d-C(f,m),E=s(T(p));return new ee(v,E)}static precessEcliptical3D(e,t,i){var n=Zn.precessEcliptical(e,t,i);return new te(n.longitude,n.latitude,e.radius)}getNutation(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dt.NUTATED;if(this.cachedTime===e&&this.cachedMode===t)return this.cachedNutation;var i=(e-gt)/36525,n={};if(t===dt.J2000)n.Δψ=new Q(0),n.Δε=new Q(0),n.ε=new Q(Qi,j.DEGREES);else{
for(var r=i/100,a=Qi,s=0,A=jn;s<A.length;s++){a+=A[s]*r/3600,r*=r}if(n.ε=new Q(a,j.DEGREES),t===dt.MEAN_OBLIQUITY)n.Δψ=new Q(0),n.Δε=new Q(0);else{var o,C,B=Math.pow(i,2),u=B*i,l=297.85036+445267.11148*i-.0019142*B+u/189474,c=357.52772+35999.05034*i-1603e-7*B-u/3e5,d=134.96298+477198.867398*i+.0086972*B+u/56250,g=93.27191+483202.017538*i+.0036825*B+u/327270,f=125.04452-1934.136261*i+.0020708*B+u/45e4,m=0,p=0,v=Fn(kn);try{for(v.s();!(C=v.n()).done;){var E=C.value
;m+=P(o=l*E.fD+c*E.fM+d*E.fM1+g*E.fF+f*E.fQ)*(E.cs0+E.cs1*i),p+=h(o)*(E.cc0+E.cc1*i)}}catch(e){v.e(e)}finally{v.f()}n.Δψ=new Q(m/1e4,j.ARC_SECONDS),n.Δε=new Q(p/1e4,j.ARC_SECONDS),n.ε=n.ε.add(n.Δε)}}return this.cachedTime=e,this.cachedMode=t,this.cachedNutation=n,this.cachedNutation}nutateEclipticPosition(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dt.NUTATED;if(i===dt.J2000)return e;var n=this.getNutation(t,i===dt.ANTI_NUTATED?dt.NUTATED:i).Δψ
;return i===dt.ANTI_NUTATED&&(n=n.negate()),new ee(e.longitude.add_nonneg(n),e.latitude)}nutateEclipticPosition3D(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dt.NUTATED;return i===dt.J2000?e:te.from2D(this.nutateEclipticPosition(e,t,i),e.radius)}nutateEquatorialPosition(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dt.NUTATED;if(i===dt.J2000)return e;var n=this.equatorialToEcliptic(e,t,i);return n=this.nutateEclipticPosition(n,t,i),this.eclipticToEquatorial(n,t,i)}
nutateEquatorialPosition3D(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dt.NUTATED;return i===dt.J2000?e:te.from2D(this.nutateEquatorialPosition(e,t,i),e.radius)}eclipticToEquatorial(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dt.J2000,n=this.getNutation(t,i),r=e.rightAscension,a=e.declination,s=n.ε;return new ee(Q.atan2_nonneg(r.sin*s.cos-a.tan*s.sin,r.cos),Q.asin(T(a.sin*s.cos+a.cos*s.sin*r.sin)))}
eclipticToEquatorial3D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dt.J2000;return te.from2D(this.eclipticToEquatorial(e,t,i),e.radius)}equatorialToEcliptic(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dt.J2000,n=this.getNutation(t,i),r=e.rightAscension,a=e.declination,s=n.ε
;return new ee(Q.atan2_nonneg(r.sin*s.cos+a.tan*s.sin,r.cos),Q.asin(T(a.sin*s.cos-a.cos*s.sin*r.sin)))}equatorialToEcliptic3D(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:dt.J2000;return te.from2D(this.equatorialToEcliptic(e,t,i),e.radius)}}class qn{constructor(){this.cfMin=Number.MAX_VALUE,this.cfMax=-Number.MAX_VALUE}toString(){
var t=new e.DateTime(e.DateTime.millisFromJulianDay(this.epoch),e.Timezone.UT_ZONE).toYMDhmString(),i=new e.DateTime(e.DateTime.millisFromJulianDay(this.Tp),e.Timezone.UT_ZONE).toYMDhmString();return"".concat(this.name,": epoch=").concat(t,", a=").concat(this.a,", q=").concat(this.q,", e=").concat(this.e,", i=").concat(this.i,", w=").concat(this.ω,", ")+"L=".concat(this.L,", Tp=").concat(i,", n=").concat(this.n)+(this.hasMag?", H=".concat(this.H,", G=").concat(this.G):"")}}class zn{
static getAdditionalOrbitingObjects(e){return this.properlyInitialized?Promise.resolve(new zn):!1===this.properlyInitialized?Promise.reject(new Error("Failed to initialize AdditionalOrbitingObjects")):Promise.all([e.getAsteroidData(),e.getCometData()]).then((t=>(this.readElements(t[0],!0),this.readElements(t[1],!1),this.properlyInitialized=!0,this.getAdditionalOrbitingObjects(e)))).catch((e=>(this.properlyInitialized=!1,Promise.reject(new Error("Failed to initialize AdditionalOrbitingObjects: "+e)))))}
static readElements(t,i){t.forEach((t=>{var n=t.body.name,r=n,a=/([^(]+) \([^()]+\)/.exec(n);a&&(r=a[1]);var s,A=i?"Asteroid: ":"Comet: ",o=[];s=i?++this.lastAsteroidId:++this.lastCometId,t.elements.forEach((a=>{var C,B=new qn,u=(0,e.parseISODate)(a.epoch);B.name=n,B.menuName=A+n,B.shortMenuName=A+r,B.id=s,B.epoch=e.DateTime.julianDay_SGC(u.y,u.m,u.d,0,0,0),B.hasMag=i,B.asteroid=i,B.a=a.q/(1-a.e),B.q=a.q,B.e=a.e,B.i=a.i,B.ω=null!==(C=a.w)&&void 0!==C?C:a.ω,B.L=a.L,B.Tp=a.Tp,B.n=$i/B.a/G(B.a),
i&&(B.H=t.body.H,B.G=t.body.G),o.push(B)})),this.objects[s]=o,this.objectIds.push(s)}))}getObjectCount(){return zn.objectIds.length}getObjectNames(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=[];function n(e){var t="",i=(e=e.toLowerCase()).indexOf("\t");if(i>=0&&(t=Ne(t=e.substring(i+1),e=e.substring(0,i),"").trim()),(i=e.indexOf("/"))>0){var n=e.substring(0,i),r=n.charAt(0);"0"<=r&&r<="9"&&n.length<6&&(n=Se(n,6,"0")),
e=e.substring(i+1)+"/"+n}return t+e}return zn.objectIds.forEach((n=>{var r=zn.objects[n];r.length>0&&i.push(r[0].name+(e?"\t"+(t?r[0].shortMenuName:r[0].menuName):""))})),i.sort(((e,t)=>{var i=pe(n(e),n(t));return 0===i&&(i=function(e,t){var i=e.toLowerCase(),n=t.toLowerCase(),r=i<n?-1:i>n?1:0;return 0!==r?r:e<t?-1:e>t?1:0}(e,t)),i})),e&&(i=i.map((e=>e.substring(e.indexOf("\t")+1)))),i}getAsteroidCount(){return zn.lastAsteroidId-Ln}getCometCount(){return zn.lastCometId-Rn}getObjectName(e){
var t=this.getObjectInfo(e);return t?t.name:void 0}getObjectByName(e){e=e.toLowerCase();var t=zn.objectIds.find((t=>{var i=zn.objects[t];return i.length>0&&(i[0].name.toLowerCase()===e||i[0].menuName.toLowerCase()===e)}));return t||wt}getObjectInfo(e,t){if(zn.properlyInitialized){var i=zn.objects[e];if(i&&0!==i.length){if(void 0===t)return i[0];if(t<=i[0].epoch)return i[0];if(t>=i[i.length-1].epoch)return i[i.length-1];for(var n=0;n<i.length-1;++n){var r=i[n],a=i[n+1],s=r.epoch,A=a.epoch;if(A===t)return a
;if(s<t&&t<A){var o=Object.assign(Object.create(Object.getPrototypeOf(r)),r);o.epoch=t,o.prev=r,o.next=a,o.convergenceFails=r.convergenceFails||a.convergenceFails,o.cfMin=b(r.cfMin,a.cfMin),o.cfMax=I(r.cfMax,a.cfMax),o.q=m(s,t,A,r.q,a.q),o.e=m(s,t,A,r.e,a.e),o.i=p(s,t,A,r.i,a.i,360,!0),o.w=p(s,t,A,r.ω,a.ω,360),o.L=p(s,t,A,r.L,a.L,360),o.a=o.q/(1-o.e),o.n=$i/o.a/G(o.a);for(var C=a.Tp,B=360/o.n;C>=r.Tp+B/2;)C-=B;for(;C<r.Tp-B/2;)C+=B;return o.Tp=m(s,t,A,r.Tp,C),o}}}}}getMagnitudeParameters(e){
var t=this.getObjectInfo(e);return null!=t&&t.hasMag?[t.H,t.G]:void 0}getOrbitalElements(e,t){var i=this.getObjectInfo(e,t);if(i){var n={},r=Zn.precessEcliptical(new ee,t).longitude.degrees;return n.a=i.a,n.e=i.e,n.i=i.i,n.Ω=M(i.L+r,360),n.pi=M(i.ω+i.L+r,360),n.partial=!0,n}}getHeliocentricPosition(e,i){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(qe(e)){if(null==(n=this.getObjectInfo(e,i)))return null}else n=e;var a,s,A,C,B=i-n.Tp,u=n.e,d=n.a,g=n.q,f=M(n.n*B,360)
;if(n.convergenceFails&&n.cfMin<=i&&i<=n.cfMax&&(r=!0),1===u||r&&t(u-1)<1e-4){var m=.03649116245*B/g/G(g)/2,p=_(m+G(Math.pow(m,2)+1),1/3),v=p-1/p;C=g*(1+Math.pow(v,2)),A=2*o(v)}else if(u<.98||r&&u<1)a=zn.kepler(u,k(f)),t(a)===X?A=X:(s=G((1+u)/(1-u)),A=2*o(s*U(a/2))),C=d*(1-Math.pow(u,2))/(1+u*l(A));else if(u>1.1||r){a=zn.keplerH(u,k(f));var E=R(a),T=c(a);s=G((u+1)/(u-1)),A=2*o(s*U(.5*a));var S=t(d)*G(Math.pow(u,2)-1)*E,N=t(d)*(u-T);C=Math.pow(S,2)+Math.pow(N,2)}else if(0===B)C=g,A=0;else{
var I=en*G((1+u)/g)/2/g*B,b=2/3/t(I);b=2/U(2*o(_(U(o(b)/2),1/3)))*w(B);var y,D,L=1e-10,x=(1-u)/(1+u),F=0;do{var H=1,j=Math.pow(b,2),Z=-j*b,q=I+2*x*b*j/3,z=void 0;y=b;do{if(q+=z=(++H-(H+1)*x)/(2*H+1)*(Z=-Z*x*j),H>50||t(z)>1e4)return zn.failedToConverge(1,n,i),this.getHeliocentricPosition(n,i,!0)}while(t(z)>L);if(++F>50)return zn.failedToConverge(2,n,i),this.getHeliocentricPosition(n,i,!0);H=0;do{if(++H>50)return zn.failedToConverge(3,n,i),this.getHeliocentricPosition(n,i,!0);D=b,
b=(2*Math.pow(b,3)/3+q)/(Math.pow(b,2)+1)}while(t(b-D)>L)}while(t(b-y)>L);A=2*o(b),C=g*(1+u)/(1+u*l(A))}var V=n.i,Y=n.L,K=k(n.ω)+A,J=h(V),W=P(V),$=h(Y),ee=P(Y),ie=l(K),ne=O(K),re=C*($*ie-ee*ne*J),ae=C*(ee*ie+$*ne*J),se=C*W*ne,Ae=new te(Q.atan2_nonneg(ae,re),Q.atan2(se,G(Math.pow(re,2)+Math.pow(ae,2))),C);return Ae=Zn.precessEcliptical3D(Ae,i)}static failedToConverge(e,t,i){t.convergenceFails=!0,t.cfMin=b(i,t.cfMin),t.cfMax=I(i,t.cfMax),t.prev&&(t.prev.convergenceFails=!0,t.prev.cfMin=b(i,t.prev.cfMin),
t.prev.cfMax=I(i,t.prev.cfMax)),t.next&&(t.next.convergenceFails=!0,t.next.cfMin=b(i,t.next.cfMin),t.next.cfMax=I(i,t.next.cfMax))}static kepler(e,t){var i,n,r,a;(t=M(t,K))>X?(t=K-t,i=-1):i=1,n=Y,r=X/4;for(var s=0;s<60;++s)a=n-e*O(n),n+=r*w(t-a),r/=2;return n*i}static keplerH(e,i){var n,r,a,s,A,o,C=t(i);n=S(2*C/e+1.85);do{A=e*(o=R(n)),n+=r=-5*(a=e*o-n-C)/((s=e*c(n)-1)+L(s)*G(t(16*Math.pow(s,2)-20*a*A)))}while(t(r)>=1e-12);return i<0?-n:n}}zn.properlyInitialized=void 0,zn.lastAsteroidId=Ln,
zn.lastCometId=Rn,zn.objects={},zn.objectIds=[];var Vn="black",Xn="#000044",Yn="#000066",Kn="#990066",Jn="#CC6600",Wn="#DDBB33",Qn="#DDDDAA",$n="#99CCFF",er=["black","#333333","#666666","#999999"],tr=[Xn,Yn],ir=[];!function(){for(var e=0;e<2;++e){ir[e]=[];for(var t=0;t<3;++t)ir[e][t]=de(tr[e],er[t+1])}}();var nr=sr(90),rr=or(90);function ar(e){if(e<-4)return e;var t=e+sr(e)-nr;return e<-2?m(-4,e,-2,e,t):t}function sr(e){return 1.033879/F(e+10.3/(e+5.11))/60}function Ar(e){if(e<-4)return e;var t=e-or(e)+rr
;return e<-2?m(-4,e,-2,e,t):t}function or(e){return 1.015056/F(e+7.31/(e+4.4))/60}function Cr(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.altitude.degrees;if(n<=-18)return"black";var r=t.distanceFrom(e).degrees,a=t.altitude.degrees,s=b((18+n)/18,1),A=b(1.2*s,1),o=_(s,1.6),C=.8*_(.8*s,2.2),B=.4*s,u=.6*s,l=s;n<0&&(r=I(r+n,.2));var c=b(I((45-r)/45,0),1),h=1-c/2.5,d=1-G(I(a,0))/30,g=1-.8*i;i>.99&&(g=20.8*(1-i))
;var f=(A*c+B*h)*d*g,m=(o*c+u*h)*d*g,p=(C*c+l*h)*d*(.2+.8*g),v=255/I(f,m,p,1);return"rgb("+D(f*v)+","+D(m*v)+","+D(p*v)+")"}function Br(e,t,i){var n,r,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],A=-1,o=t.getHorizontalPosition(pt,i,e,Ft).altitude.degrees;return o<-18?n=Vn:o<-12?(n=Xn,A=0):o<-6?(n=Yn,A=1):n=o<-3?Kn:o<-.833?Jn:o<4?Wn:o<8?Qn:$n,
a&&o<-6&&t.getHorizontalPosition(_t,i,e,Rt).altitude.degrees>=0&&(r=f(3*(t.getLunarIlluminatedFraction(i)+.16)))>0&&(n=A>=0&&s?ir[A][r-1]:er[r]),n}var ur=nn.rightAscension,lr=nn.declination,cr=rn.add(new Q(270,j.DEGREES)),hr=rn.add(new Q(90,j.DEGREES)),dr=ur.subtract(new Q(180,j.DEGREES));function gr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt;e=Zn.precessEquatorial(e,t,ft);var i=ur.subtract(e.rightAscension),n=e.declination
;return new ee(cr.subtract(Q.atan2_nonneg(i.sin,i.cos*lr.sin-n.tan*lr.cos)),Q.asin(T(n.sin*lr.sin+n.cos*lr.cos*i.cos)))}function fr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:gt,i=e.rightAscension.subtract(hr),n=e.declination;return e=new ee(dr.add(Q.atan2_nonneg(i.sin,i.cos*lr.sin-n.tan*lr.cos)),Q.asin(T(n.sin*lr.sin+n.cos*lr.cos*i.cos))),Zn.precessEquatorial(e,ft,t)}function mr(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){
if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return pr(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return pr(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,A=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){A=!0,a=e},f:function(){try{s||null==i.return||i.return()}finally{if(A)throw a}}}}function pr(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}
var vr,Er,Tr=["0 0 0 1 5128122","0 0 1 1 280602","0 0 1 -1 277693","2 0 0 -1 173237","2 0 -1 1 55413","2 0 -1 -1 46271","2 0 0 1 32573","0 0 2 1 17198","2 0 1 -1 9266","0 0 2 -1 8822","2 -1 0 -1 8216","2 0 -2 -1 4324","2 0 1 1 4200","2 1 0 -1 -3359","2 -1 -1 1 2463","2 -1 0 1 2211","2 -1 -1 -1 2065","0 1 -1 -1 -1870","4 0 -1 -1 1828","0 1 0 1 -1794","0 0 0 3 -1749","0 1 -1 1 -1565","1 0 0 1 -1491","0 1 1 1 -1475","0 1 1 -1 -1410","0 1 0 -1 -1344","1 0 0 -1 -1335","0 0 3 1 1107","4 0 0 -1 1021","4 0 -1 1 833","0 0 1 -3 777","4 0 -2 1 671","2 0 0 -3 607","2 0 2 -1 596","2 -1 1 -1 491","2 0 -2 1 -451","0 0 3 -1 439","2 0 2 1 422","2 0 -3 -1 421","2 1 -1 1 -366","2 1 0 1 -351","4 0 0 1 331","2 -1 1 1 315","2 -2 0 -1 302","0 0 1 3 -283","2 1 1 -1 -229","1 1 0 -1 223","1 1 0 1 223","0 1 -2 -1 -220","2 1 -1 -1 -220","1 0 1 1 -185","2 -1 -2 -1 181","0 1 2 1 -177","4 0 -2 -1 176","4 -1 -1 -1 166","1 0 1 -1 -164","4 0 1 -1 132","1 0 -1 -1 -119","4 -1 0 -1 115","2 -2 0 1 107"]
;vr=["0 0 1 0 6288774 -20905355","2 0 -1 0 1274027 -3699111","2 0 0 0 658314 -2955968","0 0 2 0 213618 -569925","0 1 0 0 -185116 48888","0 0 0 2 -114332 -3149","2 0 -2 0 58793 246158","2 -1 -1 0 57066 -152138","2 0 1 0 53322 -170733","2 -1 0 0 45758 -204586","0 1 -1 0 -40923 -129620","1 0 0 0 -34720 108743","0 1 1 0 -30383 104755","2 0 0 -2 15327 10321","0 0 1 2 -12528 0","0 0 1 -2 10980 79661","4 0 -1 0 10675 -34782","0 0 3 0 10034 -23210","4 0 -2 0 8548 -21636","2 1 -1 0 -7888 24208","2 1 0 0 -6766 30824","1 0 -1 0 -5163 -8379","1 1 0 0 4987 -16675","2 -1 1 0 4036 -12831","2 0 2 0 3994 -10445","4 0 0 0 3861 -11650","2 0 -3 0 3665 14403","0 1 -2 0 -2689 -7003","2 0 -1 2 -2602 0","2 -1 -2 0 2390 10056","1 0 1 0 -2348 6322","2 -2 0 0 2236 -9884","0 1 2 0 -2120 5751","0 2 0 0 -2069 0","2 -2 -1 0 2048 -4950","2 0 1 -2 -1773 4130","2 0 0 2 -1595 0","4 -1 -1 0 1215 -3958","0 0 2 2 -1110 0","3 0 -1 0 -892 3258","2 1 1 0 -810 2616","4 -1 -2 0 759 -1897","0 2 -1 0 -713 -2117","2 2 -1 0 -700 2354","2 1 -2 0 691 0","2 -1 0 -2 596 0","4 0 1 0 549 -1423","0 0 4 0 537 -1117","4 -1 0 0 520 -1571","1 0 -2 0 -487 -1739","2 1 0 -2 -399 0","0 0 2 -2 -381 -4421","1 1 1 0 351 0","3 0 -2 0 -340 0","4 0 -3 0 330 0","2 -1 2 0 327 0","0 2 1 0 -323 1165","1 1 -1 0 299 0","2 0 3 0 294 0","2 0 -1 -2 0 8752"].map((e=>{
var t=e.split(" ");return{fD:Number(t[0]),fM:Number(t[1]),fM1:Number(t[2]),fF:Number(t[3]),cs:Number(t[4]),cc:Number(t[5])}})),Er=Tr.map((e=>{var t=e.split(" ");return{fD:Number(t[0]),fM:Number(t[1]),fM1:Number(t[2]),fF:Number(t[3]),cs:Number(t[4])}}));var Sr;class Nr{constructor(){this.cachedTimes=[],this.cachedPositions=[],this.cachedPositions.length=6,this.cachedPositions.fill(null,0,6)}getEclipticPosition(e){
for(var t=0;t<6;++t)if(null!==this.cachedPositions[t]&&this.cachedTimes[t]===e)return this.cachedPositions[t]
;var i,n,r=(e-gt)/36525,a=Math.pow(r,2),s=a*r,A=s*r,o=218.3164477+481267.88123421*r-.0015786*a+s/538841-A/65194e3+1944e-7,C=297.8501921+445267.1114034*r-.0018819*a+s/545868-A/113065e3,B=357.5291092+35999.0502909*r-1536e-7*a+s/2449e4,u=134.9633964+477198.8675055*r+.0087414*a+s/69699-A/14712e3,l=93.272095+483202.0175233*r-.0036539*a-s/3526e3+A/86331e4,c=119.75+131.849*r,d=53.09+479264.29*r,g=313.45+481266.484*r,f=1-.002516*r-74e-7*a,m=Math.pow(f,2),p=0,v=0,E=0,T=mr(vr);try{for(T.s();!(n=T.n()).done;){
var S=n.value;i=S.fD*C+S.fM*B+S.fM1*u+S.fF*l,-2===S.fM||2===S.fM?(p+=S.cs*m*P(i),E+=S.cc*m*h(i)):-1===S.fM||1===S.fM?(p+=S.cs*f*P(i),E+=S.cc*f*h(i)):(p+=S.cs*P(i),E+=S.cc*h(i))}}catch(e){T.e(e)}finally{T.f()}p=o+(p+=3958*P(c)+1962*P(o-l)+318*P(d))/1e6,E=385000.56+E/1e3;var N,I=mr(Er);try{for(I.s();!(N=I.n()).done;){var b=N.value;i=b.fD*C+b.fM*B+b.fM1*u+b.fF*l,-2===b.fM||2===b.fM?v+=b.cs*m*P(i):-1===b.fM||1===b.fM?v+=b.cs*f*P(i):v+=b.cs*P(i)}}catch(e){I.e(e)}finally{I.f()}
v+=-2235*P(o)+382*P(g)+175*P(c-l)+175*P(c+l)+127*P(o-u)-115*P(o+u);for(var M=new te(p,v/=1e6,E/zi,j.DEGREES,j.DEGREES),y=0;y<5;++y)this.cachedTimes[y]=this.cachedTimes[y+1],this.cachedPositions[y]=this.cachedPositions[y+1];return this.cachedTimes[5]=e,this.cachedPositions[5]=M,M}}function Ir(e,t){var i="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=function(e,t){if(!e)return;if("string"==typeof e)return br(e,t)
;var i=Object.prototype.toString.call(e).slice(8,-1);"Object"===i&&e.constructor&&(i=e.constructor.name);if("Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return br(e,t)}(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,A=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return s=e.done,e},e:function(e){A=!0,a=e},f:function(){try{s||null==i.return||i.return()}finally{if(A)throw a}}}}function br(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}
Sr=["0 0 1 -19799805 19850055 -5452852 -14974862 66865439 68951812","0 0 2 897144 -4954829 3527812 1672790 -11827535 -332538","0 0 3 611149 1211027 -1050748 327647 1593179 -1438890","0 0 4 -341243 -189585 178690 -292153 -18444 483220","0 0 5 129287 -34992 18650 100340 -65977 -85431","0 0 6 -38164 30893 -30697 -25823 31174 -6032","0 1 -1 20442 -9987 4878 11248 -5794 22161","0 1 0 -4063 -5071 226 -64 4601 4032","0 1 1 -6016 -3336 2030 -836 -1729 234","0 1 2 -3956 3039 69 -604 -415 702","0 1 3 -667 3572 -247 -567 239 723","0 2 -2 1276 501 -57 1 67 -67","0 2 -1 1152 -917 -122 175 1034 -451","0 2 0 630 -1277 -49 -164 -129 504","1 -1 0 2571 -459 -197 199 480 -231","1 -1 1 899 -1449 -25 217 2 -441","1 0 -3 -1016 1043 589 -248 -3359 265","1 0 -2 -2343 -1012 -269 711 7856 -7832","1 0 -1 7042 788 185 193 36 45763","1 0 0 1199 -338 315 807 8663 8547","1 0 1 418 -67 -130 -43 -809 -769","1 0 2 120 -274 5 3 263 -144","1 0 3 -60 -159 2 17 -126 32","1 0 4 -82 -29 2 5 -35 -16","1 1 -3 -36 -29 2 3 -19 -4","1 1 -2 -40 7 3 1 -15 8","1 1 -1 -14 22 2 -1 -4 12","1 1 0 4 13 1 -1 5 6","1 1 1 5 2 0 -1 3 1","1 1 3 -1 0 0 0 6 -2","2 0 -6 2 0 0 -2 2 2","2 0 -5 -4 5 2 2 -2 -2","2 0 -4 4 -7 -7 0 14 13","2 0 -3 14 24 10 -8 -63 13","2 0 -2 -49 -34 -3 20 136 -236","2 0 -1 163 -48 6 5 273 1065","2 0 0 9 -24 14 17 251 149","2 0 1 -4 1 -2 0 -25 -9","2 0 2 -3 1 0 0 9 -2","2 0 3 1 3 0 0 -8 7","3 0 -2 -3 -1 0 1 2 -10","3 0 -1 5 -3 0 0 19 35","3 0 0 0 0 1 0 10 3"].map((e=>{
var t=e.split(" ");return{fJ:Number(t[0]),fS:Number(t[1]),fP:Number(t[2]),La:Number(t[3])/1e6,Lb:Number(t[4])/1e