@zodiacs/engine 0.1.1-rc.14 → 0.1.1-rc.16

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.
Files changed (64) hide show
  1. package/CHANGELOG.md +797 -6
  2. package/LICENSING.md +354 -21
  3. package/NOTICE +166 -9
  4. package/README.md +327 -84
  5. package/dist/api-VOW6Umy5.d.ts +197 -0
  6. package/dist/calc.d.ts +279 -0
  7. package/dist/calc.js +853 -0
  8. package/dist/{chunk-NAJ735VN.js → chunk-2OWGBT3O.js} +1 -1
  9. package/dist/{chunk-4OSOCZY2.js → chunk-4NV4ZEFZ.js} +21 -6
  10. package/dist/chunk-A3U2ZS2W.js +29 -0
  11. package/dist/chunk-I7O5EGFV.js +25 -0
  12. package/dist/chunk-KFTJMMG7.js +61 -0
  13. package/dist/chunk-KHBLFXFG.js +227 -0
  14. package/dist/chunk-L6ZHWJZ6.js +355 -0
  15. package/dist/chunk-N4B5JNMA.js +473 -0
  16. package/dist/chunk-O3NJRGJ2.js +56 -0
  17. package/dist/{chunk-RETEVD4F.js → chunk-WOU7JVD3.js} +293 -154
  18. package/dist/crossings.d.ts +1 -1
  19. package/dist/deltat.d.ts +8 -8
  20. package/dist/geo.d.ts +137 -8
  21. package/dist/geo.js +28 -166
  22. package/dist/houses-extra.d.ts +81 -0
  23. package/dist/houses-extra.js +337 -0
  24. package/dist/houses-q1O2GGp4.d.ts +128 -0
  25. package/dist/index.d.ts +8 -201
  26. package/dist/index.js +38 -315
  27. package/dist/internal-math-CmJ9xtaW.d.ts +160 -0
  28. package/dist/internal-math.d.ts +3 -2
  29. package/dist/internal-math.js +2 -2
  30. package/dist/internal.d.ts +2 -1
  31. package/dist/internal.js +4 -4
  32. package/dist/receipt.d.ts +74 -29
  33. package/dist/receipt.js +194 -33
  34. package/dist/rulers-9wljfVaO.d.ts +10 -0
  35. package/dist/sky.d.ts +158 -0
  36. package/dist/sky.js +377 -0
  37. package/dist/techniques.d.ts +410 -0
  38. package/dist/techniques.js +830 -0
  39. package/dist/timing.d.ts +473 -0
  40. package/dist/timing.js +904 -0
  41. package/dist/{types-CeafogFp.d.ts → types-B4MCoCCS.d.ts} +35 -4
  42. package/dist/tzdb-2025c-00-6GVG6RYL.js +6 -0
  43. package/dist/tzdb-2025c-01-CEYMG3LE.js +6 -0
  44. package/dist/tzdb-2025c-02-NWQJCVUU.js +6 -0
  45. package/dist/tzdb-2025c-03-PLHP6VH4.js +6 -0
  46. package/dist/tzdb-2025c-04-MEKUJA6M.js +6 -0
  47. package/dist/tzdb-2025c-05-3K5YKZBL.js +6 -0
  48. package/dist/tzdb-2025c-06-L2VV5XJV.js +6 -0
  49. package/dist/tzdb-2025c-07-H3GLGJGY.js +6 -0
  50. package/dist/tzdb-2025c-08-DA7QQIGD.js +6 -0
  51. package/dist/tzdb-2025c-09-MTXIO3QL.js +6 -0
  52. package/dist/tzdb-2025c-10-ASL4UW5C.js +6 -0
  53. package/dist/tzdb-2025c-11-EQEOANYB.js +6 -0
  54. package/dist/tzdb-2025c-12-NKCCXJ5G.js +6 -0
  55. package/dist/tzdb-2025c-13-DYTF3UC7.js +6 -0
  56. package/dist/tzdb-2025c-14-C25H45R5.js +6 -0
  57. package/dist/tzdb-2025c-15-7OYYZWRY.js +6 -0
  58. package/dist/vedic.d.ts +393 -0
  59. package/dist/vedic.js +930 -0
  60. package/dist/window.d.ts +178 -0
  61. package/dist/window.js +961 -0
  62. package/package.json +31 -3
  63. package/dist/chunk-GFT24GFR.js +0 -25
  64. package/dist/internal-math-BE2hcSHd.d.ts +0 -271
package/dist/calc.js ADDED
@@ -0,0 +1,853 @@
1
+ import {
2
+ eclipticRows,
3
+ equatorRows
4
+ } from "./chunk-O3NJRGJ2.js";
5
+ import {
6
+ dateFrom
7
+ } from "./chunk-CPALRSPC.js";
8
+ import {
9
+ searchLongitudeCrossingsWith
10
+ } from "./chunk-AECKV73C.js";
11
+ import {
12
+ assertDerivedFlags,
13
+ snapshotFlags,
14
+ timeFlags,
15
+ validateBirthSettings
16
+ } from "./chunk-PFGUCNOK.js";
17
+ import {
18
+ bodyLongitude,
19
+ computeChart,
20
+ eclipticFrame,
21
+ eclipticOfDate,
22
+ gastHours,
23
+ meanApogee,
24
+ meanEcliptic,
25
+ meanNodeLongitude,
26
+ onChartClock,
27
+ tilt
28
+ } from "./chunk-WOU7JVD3.js";
29
+ import {
30
+ REFERENCE_SPAN,
31
+ elapsedDays,
32
+ timeBasis
33
+ } from "./chunk-KHBLFXFG.js";
34
+ import "./chunk-ONBZ4HK7.js";
35
+ import {
36
+ computeAngles,
37
+ computeHouses,
38
+ eastPointOf,
39
+ isPolarUndefinedHouseSystem,
40
+ ramcOf,
41
+ vertexOf
42
+ } from "./chunk-4NV4ZEFZ.js";
43
+ import {
44
+ ENGINE_VERSION,
45
+ EPHEMERIS,
46
+ normalizeLongitude
47
+ } from "./chunk-2OWGBT3O.js";
48
+
49
+ // src/calc.ts
50
+ import { GeoMoonState } from "astronomy-engine";
51
+
52
+ // src/calc-bounds.ts
53
+ var MEASURED_BASIS = "largest difference from JPL Horizons (DE441) over 32 instants from JD 2379457.498125 to 2520522.646618 (TT), in all eight frames; docs/evidence/calc-api/rc16";
54
+ var BARYCENTRIC_APPARENT = {
55
+ "Earth": [3, 14e-6, 0.18],
56
+ "Jupiter": [13, 4e-5, 0.025],
57
+ "Mars": [4.4, 21e-6, 0.08],
58
+ "Mercury": [23, 77e-6, 5.4],
59
+ "Moon": [3, 14e-6, 0.18],
60
+ "Neptune": [21, 44e-6, 63e-4],
61
+ "Pluto": [25, 61e-6, 14e-4],
62
+ "Saturn": [19, 65e-6, 0.023],
63
+ "Uranus": [19, 43e-6, 86e-4],
64
+ "Venus": [7.4, 15e-6, 0.22]
65
+ };
66
+ var HELIOCENTRIC_APPARENT = {
67
+ "Earth": [3, 15e-6, 0.18],
68
+ "Jupiter": [13, 4e-5, 0.025],
69
+ "Mars": [4.3, 23e-6, 0.079],
70
+ "Mercury": [23, 87e-6, 5.4],
71
+ "Moon": [3, 15e-6, 0.18],
72
+ "Neptune": [21, 44e-6, 63e-4],
73
+ "Pluto": [25, 6e-5, 17e-4],
74
+ "Saturn": [18, 65e-6, 0.023],
75
+ "Uranus": [19, 42e-6, 91e-4],
76
+ "Venus": [6.6, 12e-6, 0.21]
77
+ };
78
+ var MEASURED = {
79
+ "barycentric/apparent": BARYCENTRIC_APPARENT,
80
+ "barycentric/astrometric": BARYCENTRIC_APPARENT,
81
+ "barycentric/geometric": {
82
+ "Earth": [3, 14e-6, 0.18],
83
+ "Jupiter": [13, 4e-5, 0.025],
84
+ "Mars": [4.4, 21e-6, 0.08],
85
+ "Mercury": [23, 77e-6, 5.4],
86
+ "Moon": [3, 14e-6, 0.18],
87
+ "Neptune": [21, 44e-6, 63e-4],
88
+ "Pluto": [25, 61e-6, 18e-4],
89
+ "Saturn": [19, 65e-6, 0.023],
90
+ "Uranus": [19, 43e-6, 86e-4],
91
+ "Venus": [7.4, 15e-6, 0.22]
92
+ },
93
+ "geocentric/apparent": {
94
+ "Black Moon Lilith": [23e-4, null, 32e-4],
95
+ "Jupiter": [13, 47e-6, 0.061],
96
+ "Mars": [6.6, 58e-6, 0.45],
97
+ "Mean Node": [23e-4, null, 81e-5],
98
+ "Mean South Node": [23e-4, null, 81e-5],
99
+ "Mercury": [9.3, 36e-6, 2.2],
100
+ "Moon": [8.3, 14e-5, 1.1],
101
+ "Neptune": [21, 42e-6, 0.013],
102
+ "North Node": [16, null, null],
103
+ "Pluto": [25, 63e-6, 0.014],
104
+ "Saturn": [18, 68e-6, 0.03],
105
+ "South Node": [16, null, null],
106
+ "Sun": [3, 15e-6, 0.18],
107
+ "Uranus": [20, 42e-6, 0.02],
108
+ "Venus": [11, 32e-6, 0.64]
109
+ },
110
+ "geocentric/astrometric": {
111
+ "Jupiter": [13, 47e-6, 0.061],
112
+ "Mars": [6.6, 58e-6, 0.45],
113
+ "Mercury": [9.3, 36e-6, 2.2],
114
+ "Moon": [7.6, 36e-6, 1.1],
115
+ "Neptune": [21, 42e-6, 0.013],
116
+ "Pluto": [25, 63e-6, 0.014],
117
+ "Saturn": [18, 68e-6, 0.03],
118
+ "Sun": [3, 15e-6, 0.18],
119
+ "Uranus": [20, 42e-6, 0.02],
120
+ "Venus": [11, 32e-6, 0.64]
121
+ },
122
+ "geocentric/geometric": {
123
+ "Jupiter": [13, 47e-6, 0.061],
124
+ "Mars": [6.6, 58e-6, 0.45],
125
+ "Mercury": [9.3, 36e-6, 2.2],
126
+ "Moon": [7.6, 36e-6, 0.97],
127
+ "Neptune": [21, 42e-6, 0.013],
128
+ "Pluto": [25, 63e-6, 0.014],
129
+ "Saturn": [18, 68e-6, 0.03],
130
+ "Sun": [3, 15e-6, 0.18],
131
+ "Uranus": [20, 42e-6, 0.02],
132
+ "Venus": [11, 32e-6, 0.64]
133
+ },
134
+ "heliocentric/apparent": HELIOCENTRIC_APPARENT,
135
+ "heliocentric/astrometric": HELIOCENTRIC_APPARENT,
136
+ "heliocentric/geometric": {
137
+ "Earth": [3, 15e-6, 0.18],
138
+ "Jupiter": [13, 4e-5, 0.025],
139
+ "Mars": [4.3, 23e-6, 0.079],
140
+ "Mercury": [23, 87e-6, 5.4],
141
+ "Moon": [3, 15e-6, 0.18],
142
+ "Neptune": [21, 44e-6, 62e-4],
143
+ "Pluto": [25, 6e-5, 2e-3],
144
+ "Saturn": [18, 65e-6, 0.023],
145
+ "Uranus": [19, 42e-6, 9e-3],
146
+ "Venus": [6.6, 12e-6, 0.21]
147
+ },
148
+ "topocentric/apparent": {
149
+ "Mars": [6.6, 58e-6, 0.46],
150
+ "Moon": [7.8, 36e-6, 1.4],
151
+ "Sun": [3, 15e-6, 0.19]
152
+ },
153
+ "topocentric/astrometric": {
154
+ "Mars": [6.6, 58e-6, 0.45],
155
+ "Moon": [7.8, 36e-6, 1.4],
156
+ "Sun": [3, 15e-6, 0.18]
157
+ },
158
+ "topocentric/geometric": {
159
+ "Mars": [6.6, 58e-6, 0.45],
160
+ "Moon": [7.8, 36e-6, 1.5],
161
+ "Sun": [3, 15e-6, 0.18]
162
+ }
163
+ };
164
+
165
+ // src/calc-frames.ts
166
+ var CALC_FRAMES = [
167
+ "ecliptic-true-of-date",
168
+ "ecliptic-mean-of-date",
169
+ "ecliptic-j2000",
170
+ "ecliptic-icrs",
171
+ "equatorial-true-of-date",
172
+ "equatorial-mean-of-date",
173
+ "equatorial-j2000",
174
+ "equatorial-icrs"
175
+ ];
176
+ var DEG = Math.PI / 180;
177
+ var RAD = 180 / Math.PI;
178
+ var ARCSEC = DEG / 3600;
179
+ var at = (m, i) => m[i];
180
+ function apply(m, [x, y, z]) {
181
+ return [m[0] * x + m[1] * y + m[2] * z, m[3] * x + m[4] * y + m[5] * z, m[6] * x + m[7] * y + m[8] * z];
182
+ }
183
+ function product(a, b) {
184
+ const c = (row, column) => at(a, 3 * row) * at(b, column) + at(a, 3 * row + 1) * at(b, 3 + column) + at(a, 3 * row + 2) * at(b, 6 + column);
185
+ return [c(0, 0), c(0, 1), c(0, 2), c(1, 0), c(1, 1), c(1, 2), c(2, 0), c(2, 1), c(2, 2)];
186
+ }
187
+ function transpose(m) {
188
+ return [m[0], m[3], m[6], m[1], m[4], m[7], m[2], m[5], m[8]];
189
+ }
190
+ function r1(angle) {
191
+ const c = Math.cos(angle);
192
+ const s = Math.sin(angle);
193
+ return [1, 0, 0, 0, c, s, 0, -s, c];
194
+ }
195
+ function r2(angle) {
196
+ const c = Math.cos(angle);
197
+ const s = Math.sin(angle);
198
+ return [c, 0, -s, 0, 1, 0, s, 0, c];
199
+ }
200
+ function r3(angle) {
201
+ const c = Math.cos(angle);
202
+ const s = Math.sin(angle);
203
+ return [c, s, 0, -s, c, 0, 0, 0, 1];
204
+ }
205
+ var IDENTITY = [1, 0, 0, 0, 1, 0, 0, 0, 1];
206
+ var ECLIPTIC_J2000 = r1(84381.406 * ARCSEC);
207
+ var BIAS = product(
208
+ r1(68192e-7 * ARCSEC),
209
+ product(r2(-0.041775 * ARCSEC * Math.sin(84381.448 * ARCSEC)), r3(-0.0146 * ARCSEC))
210
+ );
211
+ var J2000_TO_ICRS = transpose(BIAS);
212
+ function frameMatrix(frame, time) {
213
+ switch (frame) {
214
+ case "ecliptic-true-of-date":
215
+ return eclipticRows(time.tt, "true");
216
+ case "equatorial-true-of-date":
217
+ return equatorRows(time.tt, "true");
218
+ case "ecliptic-mean-of-date":
219
+ return eclipticRows(time.tt, "mean");
220
+ case "equatorial-mean-of-date":
221
+ return equatorRows(time.tt, "mean");
222
+ case "ecliptic-j2000":
223
+ return ECLIPTIC_J2000;
224
+ case "equatorial-j2000":
225
+ return IDENTITY;
226
+ case "ecliptic-icrs":
227
+ return product(ECLIPTIC_J2000, J2000_TO_ICRS);
228
+ case "equatorial-icrs":
229
+ return J2000_TO_ICRS;
230
+ }
231
+ }
232
+ function inertial(frame) {
233
+ return frame.endsWith("j2000") || frame.endsWith("icrs");
234
+ }
235
+ function toSpherical([x, y, z]) {
236
+ return { lon: normalizeLongitude(Math.atan2(y, x) * RAD), lat: Math.asin(z / Math.hypot(x, y, z)) * RAD };
237
+ }
238
+ function fromSpherical(lon, lat, distance) {
239
+ const cosLat = Math.cos(lat * DEG);
240
+ return [
241
+ distance * cosLat * Math.cos(lon * DEG),
242
+ distance * cosLat * Math.sin(lon * DEG),
243
+ distance * Math.sin(lat * DEG)
244
+ ];
245
+ }
246
+ function sphericalRates([x, y, z], [vx, vy, vz]) {
247
+ const plane = x * x + y * y;
248
+ const square = plane + z * z;
249
+ return {
250
+ lon: (x * vy - y * vx) / plane * RAD,
251
+ lat: (vz * plane - z * (x * vx + y * vy)) / (square * Math.sqrt(plane)) * RAD,
252
+ dist: (x * vx + y * vy + z * vz) / Math.sqrt(square)
253
+ };
254
+ }
255
+
256
+ // src/calc-reduce.ts
257
+ import {
258
+ BaryState,
259
+ Body,
260
+ CorrectLightTravel,
261
+ DEG2RAD,
262
+ GeoMoon,
263
+ GeoVector,
264
+ HelioState,
265
+ HelioVector,
266
+ KM_PER_AU,
267
+ Vector
268
+ } from "astronomy-engine";
269
+ var ZERO = [0, 0, 0];
270
+ var vec = ({ x, y, z }) => [x, y, z];
271
+ var add = (a, b) => [a[0] + b[0], a[1] + b[1], a[2] + b[2]];
272
+ var sub = (a, b) => [a[0] - b[0], a[1] - b[1], a[2] - b[2]];
273
+ var length = ([x, y, z]) => Math.hypot(x, y, z);
274
+ var EARTH_FLATTENING = 0.996647180302104;
275
+ var EARTH_FLATTENING_SQUARED = EARTH_FLATTENING * EARTH_FLATTENING;
276
+ var EARTH_EQUATORIAL_RADIUS_KM = 6378.1366;
277
+ var ANGVEL = 7292115e-11;
278
+ function terra(site, st) {
279
+ const phi = site.latitude * DEG2RAD;
280
+ const sinphi = Math.sin(phi);
281
+ const cosphi = Math.cos(phi);
282
+ const c = 1 / Math.hypot(cosphi, EARTH_FLATTENING * sinphi);
283
+ const s = EARTH_FLATTENING_SQUARED * c;
284
+ const heightKm = site.height / 1e3;
285
+ const ach = EARTH_EQUATORIAL_RADIUS_KM * c + heightKm;
286
+ const ash = EARTH_EQUATORIAL_RADIUS_KM * s + heightKm;
287
+ const stlocl = (15 * st + site.longitude) * DEG2RAD;
288
+ const sinst = Math.sin(stlocl);
289
+ const cosst = Math.cos(stlocl);
290
+ return {
291
+ pos: [ach * cosphi * cosst / KM_PER_AU, ach * cosphi * sinst / KM_PER_AU, ash * sinphi / KM_PER_AU],
292
+ vel: [-ANGVEL * ach * cosphi * sinst * 86400 / KM_PER_AU, ANGVEL * ach * cosphi * cosst * 86400 / KM_PER_AU, 0]
293
+ };
294
+ }
295
+ function observerState(site, time) {
296
+ const { pos, vel } = terra(site, gastHours(time));
297
+ const back = transpose(equatorRows(time.tt, "true"));
298
+ return { r: apply(back, pos), v: apply(back, vel) };
299
+ }
300
+ function observerAt(center, time) {
301
+ return center.kind === "topocentric" ? observerState(center.site, time).r : ZERO;
302
+ }
303
+ function fromGeocentre(body, time) {
304
+ return body === Body.Moon ? vec(GeoMoon(time)) : sub(vec(HelioVector(body, time)), vec(HelioVector(Body.Earth, time)));
305
+ }
306
+ function retarded(at2, time) {
307
+ const found = CorrectLightTravel((t) => {
308
+ const [x, y, z] = at2(t);
309
+ return new Vector(x, y, z, t);
310
+ }, time);
311
+ return { v: vec(found), left: found.t };
312
+ }
313
+ var BARYCENTRE_ERROR = { au: 14e-6, auPerDay: 12e-8 };
314
+ function sunMotion(left, time) {
315
+ return sub(vec(BaryState(Body.Sun, left)), vec(BaryState(Body.Sun, time)));
316
+ }
317
+ function locate(body, center, correction, time) {
318
+ const found = (v2, dist = length(v2)) => ({ v: v2, dist });
319
+ if (center.kind === "barycentric") {
320
+ const bary = (t) => vec(BaryState(body, t));
321
+ return found(correction === "geometric" ? bary(time) : retarded(bary, time).v);
322
+ }
323
+ if (center.kind === "heliocentric") {
324
+ const helio = (t) => vec(HelioVector(body, t));
325
+ if (correction === "geometric") return found(helio(time));
326
+ const { v: v2, left: left2 } = retarded(helio, time);
327
+ const astrometric2 = add(v2, sunMotion(left2, time));
328
+ return correction === "apparent" ? found(v2, length(astrometric2)) : found(astrometric2);
329
+ }
330
+ const place = observerAt(center, time);
331
+ if (correction === "geometric") return found(sub(fromGeocentre(body, time), place));
332
+ if (correction === "apparent" && body === Body.Moon && center.kind === "geocentric") {
333
+ return found(vec(GeoMoon(time)));
334
+ }
335
+ const from = add(vec(HelioVector(Body.Earth, time)), place);
336
+ const { v, left } = retarded((t) => sub(vec(HelioVector(body, t)), from), time);
337
+ const astrometric = add(v, sunMotion(left, time));
338
+ if (correction === "astrometric") return found(astrometric);
339
+ const apparent = center.kind === "geocentric" ? vec(GeoVector(body, time, true)) : retarded((t) => sub(fromGeocentre(body, t), observerAt(center, t)), time).v;
340
+ return found(apparent, length(astrometric));
341
+ }
342
+ function geometricState(body, center, time) {
343
+ if (body === Body.Moon) return null;
344
+ const split = (s) => ({ r: vec(s), v: [s.vx, s.vy, s.vz] });
345
+ if (center.kind === "barycentric") return split(BaryState(body, time));
346
+ const target = split(HelioState(body, time));
347
+ if (center.kind === "heliocentric") return target;
348
+ const earth = split(HelioState(Body.Earth, time));
349
+ const r = sub(target.r, earth.r);
350
+ const v = sub(target.v, earth.v);
351
+ if (center.kind === "geocentric") return { r, v };
352
+ const site = observerState(center.site, time);
353
+ return { r: sub(r, site.r), v: sub(v, site.v) };
354
+ }
355
+
356
+ // src/calc.ts
357
+ var PLANETS = ["Sun", "Moon", "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto"];
358
+ var POINTS = ["North Node", "South Node", "Mean Node", "Mean South Node", "Black Moon Lilith"];
359
+ var CALC_BODIES = [...PLANETS, ...POINTS];
360
+ var CHART_BODIES = CALC_BODIES.filter((body) => body !== "Earth" && !/^Mean|Lilith/.test(body));
361
+ var CALC_AYANAMSAS = [
362
+ "lahiri",
363
+ "fagan-bradley",
364
+ "krishnamurti",
365
+ "raman",
366
+ "yukteswar",
367
+ "true-chitra",
368
+ "true-revati",
369
+ "true-pushya",
370
+ "galactic-center"
371
+ ];
372
+ var CALC_RECEIPT_SCHEMA = "zodiacs.calc-receipt.draft-v1";
373
+ var CALC_SPAN = REFERENCE_SPAN;
374
+ var DEG2 = Math.PI / 180;
375
+ var RAD2 = 180 / Math.PI;
376
+ var DAY_MS = 864e5;
377
+ var J2000_JD = 2451545;
378
+ var J2000_MS = Date.UTC(2e3, 0, 1, 12);
379
+ var SPAN_DAYS = [CALC_SPAN.from, CALC_SPAN.to].map((iso) => (Date.parse(iso) - J2000_MS) / DAY_MS);
380
+ var STEP_DAYS = 1e-3;
381
+ var NODE_STEP_DAYS = 0.25;
382
+ function fields(value, label, keys) {
383
+ if (value === null || typeof value !== "object" || Array.isArray(value) || value instanceof Date) {
384
+ throw new RangeError(`${label} must be an object.`);
385
+ }
386
+ if (Object.keys(value).some((key) => !keys.includes(key))) {
387
+ throw new RangeError(`${label} takes only ${keys.join(", ")}.`);
388
+ }
389
+ return value;
390
+ }
391
+ function oneOf(value, options, label, fallback) {
392
+ if (value === void 0 && fallback !== void 0) return fallback;
393
+ if (typeof value !== "string" || !options.includes(value)) {
394
+ throw new RangeError(`${label} must be one of ${options.join(", ")}.`);
395
+ }
396
+ return value;
397
+ }
398
+ function within(value, label, low, high) {
399
+ if (typeof value !== "number" || !Number.isFinite(value) || value < low || value > high) {
400
+ throw new RangeError(`${label} must be a number from ${low} to ${high}.`);
401
+ }
402
+ return value;
403
+ }
404
+ function yesNo(value, label, fallback) {
405
+ if (value === void 0) return fallback;
406
+ if (typeof value !== "boolean") throw new RangeError(`${label} must be true or false.`);
407
+ return value;
408
+ }
409
+ var SCALES = { UTC: "utc", UT1: "ut1", TT: "tt" };
410
+ function readTime(value, label) {
411
+ const iso = (text) => {
412
+ try {
413
+ return dateFrom(text, label);
414
+ } catch {
415
+ throw new RangeError(`${label} must be a valid Date, or an ISO 8601 date or date-time with a UTC offset.`);
416
+ }
417
+ };
418
+ if (typeof value === "string" || value instanceof Date) {
419
+ const date = iso(value);
420
+ const record = { iso: typeof value === "string" ? value : date.toISOString() };
421
+ return { record, ms: date.getTime(), scale: "utc", pin: void 0, civil: true };
422
+ }
423
+ if (typeof value === "number") throw new RangeError(`${label} must be an ISO string, a Date or { jd, scale }.`);
424
+ const time = fields(value, label, ["iso", "jd", "scale", "deltaT"]);
425
+ const pin = time.deltaT === void 0 ? void 0 : within(time.deltaT, `${label}.deltaT`, -1e10, 1e10);
426
+ const pinned = pin === void 0 ? {} : { deltaT: pin };
427
+ if (time.iso === void 0 === (time.jd === void 0)) throw new RangeError(`${label} takes iso, or jd and scale.`);
428
+ if (time.iso !== void 0) {
429
+ if (typeof time.iso !== "string" || time.scale !== void 0) throw new RangeError(`${label}.iso must be an ISO string, without a scale.`);
430
+ return { record: { iso: time.iso, ...pinned }, ms: iso(time.iso).getTime(), scale: "utc", pin, civil: true };
431
+ }
432
+ const jd = time.jd;
433
+ if (typeof jd !== "number" || !Number.isFinite(jd)) throw new RangeError(`${label}.jd must be a finite Julian date.`);
434
+ const scale = oneOf(time.scale, ["UTC", "UT1", "TT"], `${label}.scale`);
435
+ return { record: { jd, scale, ...pinned }, ms: J2000_MS + (jd - J2000_JD) * DAY_MS, scale: SCALES[scale], pin, civil: false };
436
+ }
437
+ function readPlace(value, label, withHeight = false) {
438
+ const place = fields(value, label, withHeight ? ["latitude", "longitude", "height"] : ["latitude", "longitude"]);
439
+ return {
440
+ latitude: within(place.latitude, `${label}.latitude`, -90, 90),
441
+ longitude: within(place.longitude, `${label}.longitude`, -180, 180),
442
+ height: place.height === void 0 ? 0 : within(place.height, `${label}.height`, -12e3, 1e5)
443
+ };
444
+ }
445
+ function refuse(reason, detail) {
446
+ return { status: "refused", reason, detail };
447
+ }
448
+ function sidereal(value) {
449
+ if (value === void 0 || value === "tropical") return null;
450
+ const name = oneOf(fields(value, "zodiac", ["sidereal"]).sidereal, CALC_AYANAMSAS, "zodiac.sidereal");
451
+ return refuse("not-in-this-version", `The sidereal zodiac (${name}) is not in the calc entry in this version; @zodiacs/engine/vedic gives sidereal longitudes on this ayanamsa.`);
452
+ }
453
+ var outOfRange = () => ({
454
+ status: "refused",
455
+ reason: "out-of-range",
456
+ detail: `The instant's UT1 or TT is outside ${CALC_SPAN.from} to ${CALC_SPAN.to}, where the engine's positions have been compared with an independent ephemeris.`,
457
+ span: CALC_SPAN
458
+ });
459
+ function resolve(time) {
460
+ const inside = (days2, margin = 0) => days2 >= SPAN_DAYS[0] - margin && days2 < SPAN_DAYS[1] + margin;
461
+ const days = (time.ms - J2000_MS) / DAY_MS;
462
+ const shift = (time.pin ?? 0) / 86400;
463
+ if (!(inside(days, 2) && inside(days + (time.scale === "tt" ? -shift : shift), 2))) return null;
464
+ const basis = timeBasis(time.ms, time.scale, time.pin);
465
+ return inside(basis.ut1Days) && inside(basis.ttDays) ? basis : null;
466
+ }
467
+ function inSpan(time, run) {
468
+ const basis = resolve(time);
469
+ return basis === null ? outOfRange() : run(basis);
470
+ }
471
+ function onInput(time, ms, evaluate) {
472
+ return onChartClock(ms, time.scale, time.pin, evaluate);
473
+ }
474
+ function instant(basis) {
475
+ return {
476
+ utc: new Date(Math.round(basis.utcMs)).toISOString(),
477
+ jdUt1: J2000_JD + basis.ut1Days,
478
+ jdTt: J2000_JD + basis.ttDays,
479
+ deltaT: basis.deltaT,
480
+ timeScale: basis.timeScale
481
+ };
482
+ }
483
+ var TIME_BASIS_ID = "time:tt-from-leap-seconds-and-ut1-from-iers-1972-to-table-end;delta-t-model-otherwise";
484
+ function receipt(request, instants, ids, pin) {
485
+ return {
486
+ schema: CALC_RECEIPT_SCHEMA,
487
+ request,
488
+ instants,
489
+ conventions: [
490
+ ...ids,
491
+ `ephemeris:astronomy-engine@${EPHEMERIS.version}`,
492
+ pin === void 0 ? "deltat:time-basis" : "deltat:pinned",
493
+ TIME_BASIS_ID
494
+ ],
495
+ engine: { name: "@zodiacs/engine", version: ENGINE_VERSION, ephemeris: { ...EPHEMERIS } }
496
+ };
497
+ }
498
+ var isPoint = (body) => POINTS.includes(body);
499
+ var isTrueNode = (body) => body === "North Node" || body === "South Node";
500
+ function trueNode(at2) {
501
+ const s = GeoMoonState(at2);
502
+ const frame = eclipticFrame(at2.tt);
503
+ const [x, y] = meanEcliptic(
504
+ frame,
505
+ s.y * s.vz - s.z * s.vy,
506
+ s.z * s.vx - s.x * s.vz,
507
+ s.x * s.vy - s.y * s.vx
508
+ );
509
+ return normalizeLongitude(Math.atan2(x, -y) * RAD2 + frame.tilt.dpsi / 3600);
510
+ }
511
+ function pointAt(body, at2) {
512
+ const row = (raw2, lon, lat = 0) => ({ lon, lat, dist: null, xyz: null, raw: raw2 });
513
+ if (isTrueNode(body)) {
514
+ const raw2 = trueNode(at2);
515
+ return row(raw2, body === "North Node" ? raw2 : normalizeLongitude(raw2 + 180));
516
+ }
517
+ const centuries = at2.tt / 36525;
518
+ const nutation = tilt(at2.tt).dpsi / 3600;
519
+ if (body === "Black Moon Lilith") {
520
+ const apogee = meanApogee(centuries, nutation);
521
+ return row(apogee.lon, normalizeLongitude(apogee.lon), apogee.lat);
522
+ }
523
+ const raw = meanNodeLongitude(centuries, nutation);
524
+ return row(raw, normalizeLongitude(body === "Mean Node" ? raw : raw + 180));
525
+ }
526
+ function evaluator(body, frame, center, correction) {
527
+ if (isPoint(body)) {
528
+ return (at2) => {
529
+ const point = pointAt(body, at2);
530
+ if (frame === "ecliptic-true-of-date") return point;
531
+ const eqj = apply(transpose(frameMatrix("ecliptic-true-of-date", at2)), fromSpherical(point.lon, point.lat, 1));
532
+ const { lon, lat } = toSpherical(apply(frameMatrix(frame, at2), eqj));
533
+ return { lon, lat, dist: null, xyz: null, raw: lon };
534
+ };
535
+ }
536
+ const target = body;
537
+ return (at2) => {
538
+ const { v, dist } = locate(target, center, correction, at2);
539
+ const turned = apply(frameMatrix(frame, at2), v);
540
+ const { lon, lat } = frame === "ecliptic-true-of-date" ? eclipticOfDate(v[0], v[1], v[2], at2.tt) : toSpherical(turned);
541
+ const k = dist / length(turned);
542
+ return { lon, lat, dist, xyz: [turned[0] * k, turned[1] * k, turned[2] * k], raw: lon };
543
+ };
544
+ }
545
+ function positionIds(body, frame, kind, correction) {
546
+ const ids = ["zodiac:tropical", `frame:${frame}`, `center:${kind}`];
547
+ if (isPoint(body)) {
548
+ ids.push("correction:not-applicable", body.endsWith("Lilith") ? "lilith:mean" : body.startsWith("Mean") ? "node:mean" : "node:true-osculating");
549
+ } else {
550
+ ids.push(`correction:${correction}`);
551
+ if (body === "Moon" && kind === "geocentric" && correction !== "astrometric") ids.push("moon:series-at-instant");
552
+ else if (correction !== "geometric") {
553
+ ids.push("light-time:newtonian", "deflection:none");
554
+ if (correction === "apparent" && kind !== "barycentric") ids.push("aberration:backdated-observer");
555
+ }
556
+ }
557
+ if (isPoint(body) || !inertial(frame)) ids.push("precession:iau2006");
558
+ if (frame.includes("true")) ids.push("nutation:iau2000b");
559
+ if (isPoint(body) || frame.startsWith("ecliptic")) ids.push("obliquity:iau2006");
560
+ if (frame.endsWith("icrs")) ids.push("frame-bias:iau2000");
561
+ if (kind === "barycentric") ids.push("barycentre:sun-and-giant-planets");
562
+ if (kind === "topocentric") ids.push("observer:iers2003-ellipsoid;no-polar-motion");
563
+ return ids;
564
+ }
565
+ function bound(value, unit, estimated) {
566
+ return value === void 0 || value === null ? { value: null, unit, label: "estimated", basis: "not compared with an independent ephemeris" } : { value, unit, label: estimated === null ? "measured" : "estimated", basis: estimated ?? MEASURED_BASIS };
567
+ }
568
+ function up2(x) {
569
+ const unit = 10 ** (Math.floor(Math.log10(x)) - 1);
570
+ return Number((Math.ceil(x / unit) * unit).toPrecision(2));
571
+ }
572
+ function barycentricSun(r, v) {
573
+ const { au: e, auPerDay: ev } = BARYCENTRE_ERROR;
574
+ const rate = v === null ? null : ev / r + (v + ev) * e * (1 / r ** 2 + 1 / (r * (r - e)));
575
+ return [up2(Math.asin(e / r) * RAD2 * 3600), up2(e / (r - e)), rate === null ? null : up2(rate * RAD2 * 3600)];
576
+ }
577
+ function calc(request) {
578
+ const asked = fields(request, "calc request", ["body", "time", "frame", "center", "zodiac", "flags"]);
579
+ const body = oneOf(asked.body, CALC_BODIES, "body");
580
+ const time = readTime(asked.time, "time");
581
+ const frame = oneOf(asked.frame, CALC_FRAMES, "frame", "ecliptic-true-of-date");
582
+ let center;
583
+ let centerRecord;
584
+ if (asked.center === void 0 || typeof asked.center === "string") {
585
+ const kind2 = oneOf(asked.center, ["geocentric", "heliocentric", "barycentric"], "center", "geocentric");
586
+ center = { kind: kind2 };
587
+ centerRecord = kind2;
588
+ } else {
589
+ const site = readPlace(fields(asked.center, "center", ["topocentric"]).topocentric, "center.topocentric", true);
590
+ center = { kind: "topocentric", site };
591
+ centerRecord = { topocentric: site };
592
+ }
593
+ const given = asked.flags === void 0 ? {} : fields(asked.flags, "flags", ["correction", "speeds", "cartesian", "units", "deflection"]);
594
+ const flags = {
595
+ correction: oneOf(given.correction, ["apparent", "astrometric", "geometric"], "flags.correction", "apparent"),
596
+ speeds: yesNo(given.speeds, "flags.speeds", true),
597
+ cartesian: yesNo(given.cartesian, "flags.cartesian", false),
598
+ units: oneOf(given.units, ["degrees", "radians"], "flags.units", "degrees"),
599
+ deflection: yesNo(given.deflection, "flags.deflection", false)
600
+ };
601
+ const point = isPoint(body);
602
+ const kind = center.kind;
603
+ const refusal = sidereal(asked.zodiac) ?? (flags.deflection ? refuse("not-in-this-version", "Gravitational light deflection is not modelled in this version.") : point && kind !== "geocentric" ? refuse("unsupported-combination", `${body} is a point of the Moon's geocentric orbit; only the geocentric center is offered.`) : point && flags.cartesian ? refuse("unsupported-combination", `${body} has no distance, so no cartesian position.`) : body === "Sun" && kind === "heliocentric" ? refuse("unsupported-combination", "The Sun is the heliocentric origin.") : body === "Earth" && (kind === "geocentric" || kind === "topocentric") ? refuse("unsupported-combination", "The Earth is offered heliocentric or barycentric only.") : null);
604
+ if (refusal) return refusal;
605
+ const correction = flags.correction;
606
+ return inSpan(time, (basis) => {
607
+ const evaluate = evaluator(body, frame, center, correction);
608
+ const now = onInput(time, time.ms, evaluate);
609
+ const step = isTrueNode(body) ? NODE_STEP_DAYS : STEP_DAYS;
610
+ const analytic = flags.speeds && correction === "geometric" && inertial(frame) && !point && body !== "Moon";
611
+ let speeds = null;
612
+ let velocity = null;
613
+ if (analytic) {
614
+ const { state, turn } = onInput(time, time.ms, (at2) => ({
615
+ state: geometricState(body, center, at2),
616
+ turn: frameMatrix(frame, at2)
617
+ }));
618
+ velocity = apply(turn, state.v);
619
+ speeds = sphericalRates(apply(turn, state.r), velocity);
620
+ } else if (flags.speeds) {
621
+ const shift = (days) => {
622
+ const ms = time.ms + days * DAY_MS;
623
+ return onInput(time, ms, (at2, sampled) => ({ row: evaluate(at2), basis: sampled }));
624
+ };
625
+ const before = shift(-step);
626
+ const after = shift(step);
627
+ const elapsed = elapsedDays(before.basis, after.basis, 2 * step);
628
+ const rate = (a2, b2) => (a2 - b2) / elapsed;
629
+ let turn = after.row.raw - before.row.raw;
630
+ if (turn > 180) turn -= 360;
631
+ if (turn < -180) turn += 360;
632
+ speeds = {
633
+ lon: turn / elapsed,
634
+ lat: rate(after.row.lat, before.row.lat),
635
+ dist: now.dist === null ? null : rate(after.row.dist, before.row.dist)
636
+ };
637
+ const [a, b] = [after.row.xyz, before.row.xyz];
638
+ if (a && b) velocity = [rate(a[0], b[0]), rate(a[1], b[1]), rate(a[2], b[2])];
639
+ }
640
+ const method = !flags.speeds ? null : analytic ? "analytic" : "central-difference";
641
+ const k = flags.units === "radians" ? DEG2 : 1;
642
+ let row = MEASURED[`${kind}/${point ? "apparent" : correction}`]?.[body];
643
+ let estimated = null;
644
+ if (!row && kind === "topocentric") {
645
+ row = MEASURED[`geocentric/${correction}`]?.[body];
646
+ estimated = "the geocentric bound for this correction; topocentric positions were compared only for the Sun, the Moon and Mars";
647
+ } else if (kind === "barycentric" && body === "Sun") {
648
+ row = barycentricSun(now.dist, velocity && length(velocity));
649
+ estimated = `the largest angle, relative distance and rate of direction that the error of astronomy-engine's barycentre, ${BARYCENTRE_ERROR.au.toExponential()} au and ${BARYCENTRE_ERROR.auPerDay.toExponential()} au/day from 1800 to 2200, allows at this distance and speed; docs/evidence/calc-api`;
650
+ }
651
+ const ids = positionIds(body, frame, kind, correction);
652
+ if (method) ids.push(method === "analytic" ? "speed:analytic" : `speed:central-difference-${step}d`);
653
+ return {
654
+ status: "ok",
655
+ body,
656
+ frame,
657
+ lon: now.lon * k,
658
+ lat: now.lat * k,
659
+ dist: now.dist,
660
+ speeds: speeds && { lon: speeds.lon * k, lat: speeds.lat * k, dist: speeds.dist },
661
+ cartesian: flags.cartesian && now.xyz ? { x: now.xyz[0], y: now.xyz[1], z: now.xyz[2], vx: velocity?.[0] ?? null, vy: velocity?.[1] ?? null, vz: velocity?.[2] ?? null } : null,
662
+ bounds: {
663
+ position: bound(row?.[0], "arcsec", estimated),
664
+ distance: point ? null : bound(row?.[1], "relative", estimated),
665
+ speed: method && { ...bound(row?.[2], "arcsec/day", estimated), method, stepDays: analytic ? null : step }
666
+ },
667
+ receipt: receipt(
668
+ { body, time: time.record, frame, center: centerRecord, zodiac: "tropical", flags },
669
+ [instant(basis)],
670
+ ids,
671
+ time.pin
672
+ )
673
+ };
674
+ });
675
+ }
676
+ function houses(request) {
677
+ const asked = fields(request, "houses request", ["time", "place", "system", "zodiac"]);
678
+ const time = readTime(asked.time, "time");
679
+ const { latitude, longitude } = readPlace(asked.place, "place");
680
+ const system = validateBirthSettings({ houseSystem: asked.system }).houseSystem ?? "whole";
681
+ const refusal = sidereal(asked.zodiac);
682
+ if (refusal) return refusal;
683
+ return inSpan(time, (used) => {
684
+ const input = onInput(time, time.ms, (at2) => ({ gastHours: gastHours(at2), latitude, longitude, obliquity: tilt(at2.tt).tobl }));
685
+ const angles = computeAngles(input);
686
+ const { houses: computed, fellBack } = computeHouses(system, input, angles);
687
+ const basis = (what) => `largest difference over the conformance suite's L2 ${what}, whose arbiter is ERFA with each system's definition`;
688
+ return {
689
+ status: "ok",
690
+ requested: system,
691
+ system: computed.system,
692
+ cusps: computed.cusps,
693
+ angles,
694
+ // Normalized once more, as chartPoints() reports them.
695
+ vertex: normalizeLongitude(vertexOf(input, angles)),
696
+ eastPoint: normalizeLongitude(eastPointOf(input)),
697
+ armc: ramcOf(input),
698
+ obliquity: input.obliquity,
699
+ flags: fellBack ? ["polar-fallback"] : [],
700
+ bounds: {
701
+ angles: { value: 0.02, unit: "arcsec", label: "measured", basis: basis("vectors of the ascendant, midheaven, Vertex and East Point") },
702
+ cusps: { value: 0.08, unit: "arcsec", label: "measured", basis: basis("cusp vectors, thirteen systems") }
703
+ },
704
+ receipt: receipt(
705
+ { time: time.record, place: { latitude, longitude }, system, zodiac: "tropical" },
706
+ [instant(used)],
707
+ [
708
+ "zodiac:tropical",
709
+ `house:${system}`,
710
+ ...fellBack ? ["polar-fallback:whole"] : [],
711
+ "angles:gast-and-true-obliquity",
712
+ "sidereal-time:gast-iau2006-era",
713
+ "nutation:iau2000b",
714
+ "obliquity:iau2006"
715
+ ],
716
+ time.pin
717
+ )
718
+ };
719
+ });
720
+ }
721
+ function events(request) {
722
+ const asked = fields(request, "events request", ["kind", "body", "longitude", "from", "to", "zodiac", "stepDays", "maxSamples"]);
723
+ const kind = oneOf(asked.kind, ["longitude-crossing"], "kind");
724
+ const body = oneOf(asked.body, CALC_BODIES, "body");
725
+ const longitude = within(asked.longitude, "longitude", -Number.MAX_VALUE, Number.MAX_VALUE);
726
+ const from = readTime(asked.from, "from");
727
+ const to = readTime(asked.to, "to");
728
+ const stepDays = asked.stepDays === void 0 ? 5 : asked.stepDays;
729
+ const budget = asked.maxSamples === Infinity ? void 0 : asked.maxSamples;
730
+ const limit = budget === void 0 ? {} : { maxSamples: budget };
731
+ const refusal = sidereal(asked.zodiac) ?? (!CHART_BODIES.includes(body) ? refuse("unsupported-combination", `Crossings are searched for the bodies positions() gives; ${body} is not one.`) : from.pin !== void 0 || to.pin !== void 0 ? refuse("unsupported-combination", "Crossing searches run on the engine's \u0394T model; a pinned \u0394T is not offered.") : null);
732
+ if (refusal) return refusal;
733
+ const start = resolve(from);
734
+ const end = resolve(to);
735
+ if (start === null || end === null) return outOfRange();
736
+ {
737
+ const dated = (basis) => new Date(Math.round(basis.utcMs));
738
+ const found = searchLongitudeCrossingsWith(
739
+ bodyLongitude,
740
+ body,
741
+ longitude,
742
+ dated(start),
743
+ dated(end),
744
+ { stepDays, ...limit }
745
+ );
746
+ if (found.status === "refused") {
747
+ const { samples, maxSamples } = found;
748
+ return { status: "refused", reason: "sample-budget", detail: `The search needs more than ${maxSamples} evaluations.`, samples, maxSamples };
749
+ }
750
+ return {
751
+ status: "ok",
752
+ kind,
753
+ events: found.crossings.map(({ at: at2, retrograde }) => {
754
+ const { ut1Days, ttDays } = timeBasis(at2.getTime(), "utc");
755
+ return { at: at2.toISOString(), jdUt1: J2000_JD + ut1Days, jdTt: J2000_JD + ttDays, retrograde };
756
+ }),
757
+ samples: found.samples,
758
+ bounds: {
759
+ timing: {
760
+ value: stepDays * 86400 / 2 ** 24,
761
+ unit: "s",
762
+ label: "estimated",
763
+ basis: "the bisection bracket, step / 2^24, on the engine's own longitudes; the ephemeris's error over the body's speed adds to it"
764
+ }
765
+ },
766
+ receipt: receipt(
767
+ { kind, body, longitude, from: from.record, to: to.record, zodiac: "tropical", stepDays, ...limit },
768
+ [instant(start), instant(end)],
769
+ [...positionIds(body, "ecliptic-true-of-date", "geocentric", "apparent"), "search:scan-and-bisect"]
770
+ )
771
+ };
772
+ }
773
+ }
774
+ function chart(request) {
775
+ const asked = fields(request, "chart request", ["time", "place", "houseSystem", "timeKnown", "timeFlags", "zodiac"]);
776
+ const time = readTime(asked.time, "time");
777
+ const site = asked.place === void 0 ? null : readPlace(asked.place, "place");
778
+ const place = site === null ? null : { latitude: site.latitude, longitude: site.longitude };
779
+ const settings = validateBirthSettings({ houseSystem: asked.houseSystem, timeKnown: asked.timeKnown });
780
+ const supplied = asked.timeFlags === void 0 ? void 0 : snapshotFlags(asked.timeFlags).values;
781
+ const refusal = sidereal(asked.zodiac);
782
+ if (refusal) return refusal;
783
+ const whole = { ...time, ms: Math.round(time.ms) };
784
+ return inSpan(whole, (basis) => {
785
+ const utc = new Date(whole.ms);
786
+ const houseSystem = settings.houseSystem ?? "whole";
787
+ const timeKnown = settings.timeKnown ?? true;
788
+ const possible = !timeKnown ? ["no-time"] : settings.houseSystem && isPolarUndefinedHouseSystem(houseSystem) && place ? ["polar-fallback"] : [];
789
+ assertDerivedFlags(supplied ?? [], possible);
790
+ const input = {
791
+ utc,
792
+ houseSystem,
793
+ timeKnown,
794
+ ...place,
795
+ ...supplied && { flags: timeFlags(supplied) },
796
+ ...whole.pin === void 0 ? {} : { deltaT: whole.pin },
797
+ ...whole.scale === "utc" ? {} : { timeScale: whole.scale }
798
+ };
799
+ const used = instant(basis);
800
+ const computed = computeChart(input);
801
+ assertDerivedFlags(supplied ?? [], computed.flags);
802
+ return {
803
+ status: "ok",
804
+ chart: computed,
805
+ receipt: receipt(
806
+ {
807
+ time: time.record,
808
+ ...place && { place },
809
+ houseSystem,
810
+ timeKnown,
811
+ ...supplied && { timeFlags: supplied },
812
+ zodiac: "tropical"
813
+ },
814
+ [used],
815
+ [
816
+ "zodiac:tropical",
817
+ "frame:ecliptic-true-of-date",
818
+ "center:geocentric",
819
+ "correction:apparent",
820
+ "light-time:newtonian",
821
+ "deflection:none",
822
+ "aberration:backdated-observer",
823
+ "moon:series-at-instant",
824
+ "node:true-osculating",
825
+ "precession:iau2006",
826
+ "nutation:iau2000b",
827
+ "obliquity:iau2006",
828
+ ...computed.houses === null ? [] : [
829
+ `house:${houseSystem}`,
830
+ ...computed.houses.system === houseSystem ? [] : ["polar-fallback:whole"],
831
+ "angles:gast-and-true-obliquity",
832
+ "sidereal-time:gast-iau2006-era"
833
+ ],
834
+ "aspects:major",
835
+ `speed:central-difference-${STEP_DAYS}d`,
836
+ `speed:central-difference-${NODE_STEP_DAYS}d`
837
+ ],
838
+ time.pin
839
+ )
840
+ };
841
+ });
842
+ }
843
+ export {
844
+ CALC_AYANAMSAS,
845
+ CALC_BODIES,
846
+ CALC_FRAMES,
847
+ CALC_RECEIPT_SCHEMA,
848
+ CALC_SPAN,
849
+ calc,
850
+ chart,
851
+ events,
852
+ houses
853
+ };