kaabalah 2.0.4 → 2.1.1
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.
- package/dist/astrology/index.d.mts +11 -6
- package/dist/astrology/index.d.ts +11 -6
- package/dist/astrology/index.js +35 -3470
- package/dist/astrology/index.js.map +1 -1
- package/dist/astrology/index.mjs +3 -3460
- package/dist/astrology/index.mjs.map +1 -1
- package/dist/chunk-2TUXWMP5.js +47 -0
- package/dist/chunk-2TUXWMP5.js.map +1 -0
- package/dist/chunk-AD7T42HJ.js +4 -0
- package/dist/chunk-AD7T42HJ.js.map +1 -0
- package/dist/chunk-AV7WBVPS.mjs +3362 -0
- package/dist/chunk-AV7WBVPS.mjs.map +1 -0
- package/dist/chunk-L3TS24DH.js +6456 -0
- package/dist/chunk-L3TS24DH.js.map +1 -0
- package/dist/chunk-PY5SMMJB.mjs +41 -0
- package/dist/chunk-PY5SMMJB.mjs.map +1 -0
- package/dist/chunk-Q4N3V34Y.mjs +800 -0
- package/dist/chunk-Q4N3V34Y.mjs.map +1 -0
- package/dist/chunk-RFSO3JRG.mjs +3 -0
- package/dist/chunk-RFSO3JRG.mjs.map +1 -0
- package/dist/chunk-RGMSQCP5.js +163 -0
- package/dist/chunk-RGMSQCP5.js.map +1 -0
- package/dist/chunk-S3BZNG6Y.mjs +6419 -0
- package/dist/chunk-S3BZNG6Y.mjs.map +1 -0
- package/dist/chunk-SZXDOHKV.js +3371 -0
- package/dist/chunk-SZXDOHKV.js.map +1 -0
- package/dist/chunk-UXQDJUG6.js +804 -0
- package/dist/chunk-UXQDJUG6.js.map +1 -0
- package/dist/chunk-W7GBKP5K.mjs +159 -0
- package/dist/chunk-W7GBKP5K.mjs.map +1 -0
- package/dist/chunk-Y4DMTARN.js +233 -0
- package/dist/chunk-Y4DMTARN.js.map +1 -0
- package/dist/chunk-ZH3SBEH6.mjs +231 -0
- package/dist/chunk-ZH3SBEH6.mjs.map +1 -0
- package/dist/core/index.d.mts +2 -2
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +142 -6482
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +4 -6434
- package/dist/core/index.mjs.map +1 -1
- package/dist/gematria/index.d.mts +1 -1
- package/dist/gematria/index.d.ts +1 -1
- package/dist/gematria/index.js +8 -6599
- package/dist/gematria/index.js.map +1 -1
- package/dist/gematria/index.mjs +4 -6583
- package/dist/gematria/index.mjs.map +1 -1
- package/dist/ifa/index.js +6 -27
- package/dist/ifa/index.js.map +1 -1
- package/dist/ifa/index.mjs +5 -3
- package/dist/ifa/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +205 -11122
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -11077
- package/dist/index.mjs.map +1 -1
- package/dist/numerology/index.js +17 -184
- package/dist/numerology/index.js.map +1 -1
- package/dist/numerology/index.mjs +3 -160
- package/dist/numerology/index.mjs.map +1 -1
- package/dist/{registry-CCPfn46N.d.mts → registry-BoqJvsPr.d.mts} +1 -1
- package/dist/{registry-CCPfn46N.d.ts → registry-BoqJvsPr.d.ts} +1 -1
- package/dist/swisseph-YPVN5VCI.wasm +0 -0
- package/dist/swisseph.js +30 -0
- package/dist/swisseph.wasm +0 -0
- package/dist/tarot/index.js +17 -825
- package/dist/tarot/index.js.map +1 -1
- package/dist/tarot/index.mjs +3 -801
- package/dist/tarot/index.mjs.map +1 -1
- package/dist/wasm/build/swisseph-YPVN5VCI.wasm +0 -0
- package/dist/wasm/build/swisseph.js +30 -0
- package/dist/wasm/build/swisseph.wasm +0 -0
- package/package.json +6 -2
- package/wasm/build/swisseph-YPVN5VCI.wasm +0 -0
package/dist/numerology/index.js
CHANGED
|
@@ -1,188 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
'use strict';
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
3
|
+
var chunkRGMSQCP5_js = require('../chunk-RGMSQCP5.js');
|
|
4
|
+
require('../chunk-2TUXWMP5.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "CYCLE_MEANINGS", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkRGMSQCP5_js.CYCLE_MEANINGS; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "calculateCycles", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkRGMSQCP5_js.calculateCycles; }
|
|
26
15
|
});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const dateWithoutDashes = dateString.replace(/-/g, "");
|
|
31
|
-
let sum = dateWithoutDashes.split("").reduce((total, digit) => {
|
|
32
|
-
return total + parseInt(digit, 10);
|
|
33
|
-
}, 0);
|
|
34
|
-
while (sum > 9 && sum !== 11 && sum !== 22 && sum !== 33) {
|
|
35
|
-
sum = sum.toString().split("").reduce((total, digit) => {
|
|
36
|
-
return total + parseInt(digit, 10);
|
|
37
|
-
}, 0);
|
|
38
|
-
}
|
|
39
|
-
return sum;
|
|
40
|
-
}
|
|
41
|
-
var CYCLE_MEANINGS = [
|
|
42
|
-
{
|
|
43
|
-
"title": "Learning",
|
|
44
|
-
"shortDescription": "A period for assertive action and learning through direct experience.",
|
|
45
|
-
"personalDescription": "This period emphasizes assertive action and learning through direct experience. Utilize personal influence to seek favors, loans, or recognition from influential individuals such as government officials or community leaders. Ideal for enhancing personal reputation and prestige, keeping in mind that all actions carry consequences.",
|
|
46
|
-
"businessDescription": "Ideal for promotional activities aimed at building goodwill, public recognition, and securing endorsements from prominent individuals. Prioritize the company's image and reputation over immediate profits.",
|
|
47
|
-
"astrologySign": "Aries (Actions Have Consequences)"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"title": "Hard Work",
|
|
51
|
-
"shortDescription": "A time for diligent effort and adaptability to temporary changes.",
|
|
52
|
-
"personalDescription": "A period where diligent effort and adaptability are crucial. Suitable for temporary changes such as moving homes, short trips, or career shifts. Avoid long-term commitments or significant investments unless carefully formalized.",
|
|
53
|
-
"businessDescription": "Ideal for short-term experiments, temporary staffing adjustments, and forming beneficial business connections. Steer clear of verbal agreements or long-term commitments unless formally documented. Flexibility leads to progress.",
|
|
54
|
-
"astrologySign": "Taurus (Stop Being Stubborn)"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"title": "Friendship",
|
|
58
|
-
"shortDescription": "A dynamic phase for ambitious projects and strengthening relationships.",
|
|
59
|
-
"personalDescription": "A dynamic and energetic phase ideal for initiating ambitious projects requiring persistence and physical strength. Effective communication strengthens relationships, but impulsiveness should be avoided to prevent conflicts.",
|
|
60
|
-
"businessDescription": "Ideal for expansion, energetic ventures, and assertive promotional activities. Excellent for debt collection but avoid legal conflicts. Maintain vigilance against accidents and disputes while leveraging strong communication.",
|
|
61
|
-
"astrologySign": "Gemini (Communication is Power)"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"title": "Opportunities",
|
|
65
|
-
"shortDescription": "An intellectually fertile time for creativity and quick decision-making.",
|
|
66
|
-
"personalDescription": "An intellectually fertile phase ideal for creative projects, innovation, and quick decision-making. Beware of deception, especially concerning documents or agreements. Foster mental growth and create valuable connections, but remain cautious.",
|
|
67
|
-
"businessDescription": "Perfect for launching impactful marketing campaigns and securing new agreements. Excellent for promotional activities and intellectual creativity, but carefully scrutinize documents to avoid fraud.",
|
|
68
|
-
"astrologySign": "Cancer (Nurture Mental Growth)"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"title": "Tears/Decision",
|
|
72
|
-
"shortDescription": "The most prosperous phase for financial resolution and spiritual advancement.",
|
|
73
|
-
"personalDescription": "The most prosperous phase of the year, suitable for resolving financial issues, starting long journeys, and advancing spiritually. Interact with influential figures, manage debts, and engage in expansive social activities. Keep ego and selfishness balanced for optimal outcomes.",
|
|
74
|
-
"businessDescription": "A prime time for investments, financial growth, global promotion, debt collection, and favorable legal outcomes. Emphasize fairness and generosity to enhance business success.",
|
|
75
|
-
"astrologySign": "Leo (Balance Ego and Generosity)"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"title": "Triple Blessing",
|
|
79
|
-
"shortDescription": "Perfect for pleasures, social activities, and creative pursuits.",
|
|
80
|
-
"personalDescription": "Ideal for enjoying pleasures, social activities, artistic endeavors, and short travels. Favorable for romantic interactions, relaxation, and creative pursuits. Organize personal life to balance enjoyment and refinement effectively.",
|
|
81
|
-
"businessDescription": "Excellent time for promoting luxury products, arts, entertainment, and speculative investments. Ideal for forming friendly business alliances and strategic partnerships.",
|
|
82
|
-
"astrologySign": "Virgo (Organize Your Pleasures)"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"title": "Rest",
|
|
86
|
-
"shortDescription": "A period of rest, introspection, and preparation for renewal.",
|
|
87
|
-
"personalDescription": "A critical period of rest, introspection, and cautious preparation for renewal. Avoid initiating new ventures and instead focus on completing pending matters, managing legal affairs carefully, and protecting existing resources. Balance and patience are essential.",
|
|
88
|
-
"businessDescription": "Period to conserve resources, avoid major expansions, and carefully manage internal restructuring. Postpone significant new ventures until the next cycle. Act diplomatically and cautiously to ensure stability.",
|
|
89
|
-
"astrologySign": "Libra (Seek Balance and Reconstruction)"
|
|
90
|
-
}
|
|
91
|
-
];
|
|
92
|
-
var addDays = (date, days) => {
|
|
93
|
-
const result = new Date(date);
|
|
94
|
-
result.setDate(result.getDate() + days);
|
|
95
|
-
return result;
|
|
96
|
-
};
|
|
97
|
-
var getMostRecentStartDate = (startDate, today) => {
|
|
98
|
-
const startMonth = startDate.getMonth();
|
|
99
|
-
const startDay = startDate.getDate();
|
|
100
|
-
let recentStart = new Date(today.getFullYear(), startMonth, startDay);
|
|
101
|
-
if (recentStart > today) {
|
|
102
|
-
recentStart = new Date(today.getFullYear() - 1, startMonth, startDay);
|
|
103
|
-
}
|
|
104
|
-
return recentStart;
|
|
105
|
-
};
|
|
106
|
-
var calculateCycles = (startDate, today) => {
|
|
107
|
-
const mostRecentStart = getMostRecentStartDate(startDate, today);
|
|
108
|
-
const cycleLength = 52;
|
|
109
|
-
const isFutureDate = startDate > today;
|
|
110
|
-
let currentYearlyCycle = null;
|
|
111
|
-
let currentAgeCycle = null;
|
|
112
|
-
const ageCycles = [];
|
|
113
|
-
const yearlyCycles = [];
|
|
114
|
-
if (!isFutureDate) {
|
|
115
|
-
const birthYear = startDate.getFullYear();
|
|
116
|
-
const currentYear = today.getFullYear();
|
|
117
|
-
const ageInYears = currentYear - birthYear;
|
|
118
|
-
currentAgeCycle = Math.floor(ageInYears / 7) % 7 + 1;
|
|
119
|
-
for (let i = 0; i < 7; i++) {
|
|
120
|
-
const cycleStart = new Date(birthYear + i * 7, startDate.getMonth(), startDate.getDate());
|
|
121
|
-
const cycle = i + 1;
|
|
122
|
-
const isCurrentCycle = cycle === currentAgeCycle;
|
|
123
|
-
if (isCurrentCycle) {
|
|
124
|
-
const yearsSinceBirth = ageInYears;
|
|
125
|
-
const yearWithinAgeCycle = yearsSinceBirth % 7;
|
|
126
|
-
currentYearlyCycle = yearWithinAgeCycle + 1;
|
|
127
|
-
for (let j = 0; j < 7; j++) {
|
|
128
|
-
const ageCycleStartYear = birthYear + Math.floor(ageInYears / 7) * 7;
|
|
129
|
-
const yearlyCycleStart = new Date(ageCycleStartYear + j, startDate.getMonth(), startDate.getDate());
|
|
130
|
-
const yearlyCycle = j + 1;
|
|
131
|
-
const isCurrentYearlyCycle = yearlyCycle === currentYearlyCycle;
|
|
132
|
-
yearlyCycles.push({
|
|
133
|
-
number: yearlyCycle,
|
|
134
|
-
description: CYCLE_MEANINGS[j],
|
|
135
|
-
isActive: isCurrentYearlyCycle,
|
|
136
|
-
cycleStart: yearlyCycleStart
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
ageCycles.push({
|
|
141
|
-
number: cycle,
|
|
142
|
-
description: CYCLE_MEANINGS[i],
|
|
143
|
-
isActive: isCurrentCycle,
|
|
144
|
-
cycleStart
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
const monthlyCycles = [];
|
|
149
|
-
for (let i = 0; i < 7; i++) {
|
|
150
|
-
const cycleStart = addDays(mostRecentStart, i * cycleLength);
|
|
151
|
-
monthlyCycles.push({
|
|
152
|
-
number: i + 1,
|
|
153
|
-
description: CYCLE_MEANINGS[i],
|
|
154
|
-
isActive: false,
|
|
155
|
-
cycleStart
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
let currentMonthlyCycle = null;
|
|
159
|
-
let daysInMonthlyCycle = 0;
|
|
160
|
-
for (let i = 0; i < 7; i++) {
|
|
161
|
-
const cycleStart = addDays(mostRecentStart, i * cycleLength);
|
|
162
|
-
const nextCycleStart = i < 6 ? addDays(mostRecentStart, (i + 1) * cycleLength) : addDays(mostRecentStart, 366);
|
|
163
|
-
if (today >= cycleStart && today < nextCycleStart) {
|
|
164
|
-
currentMonthlyCycle = i + 1;
|
|
165
|
-
daysInMonthlyCycle = Math.floor((today.getTime() - cycleStart.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
|
|
166
|
-
monthlyCycles[i].isActive = true;
|
|
167
|
-
break;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
const totalDays = Math.floor((today.getTime() - mostRecentStart.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
|
|
171
|
-
return {
|
|
172
|
-
yearlyCycles,
|
|
173
|
-
ageCycles,
|
|
174
|
-
monthlyCycles,
|
|
175
|
-
currentYearlyCycle,
|
|
176
|
-
currentAgeCycle,
|
|
177
|
-
currentMonthlyCycle,
|
|
178
|
-
daysInMonthlyCycle,
|
|
179
|
-
totalDays
|
|
180
|
-
};
|
|
181
|
-
};
|
|
182
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
183
|
-
0 && (module.exports = {
|
|
184
|
-
CYCLE_MEANINGS,
|
|
185
|
-
calculateCycles,
|
|
186
|
-
calculateLifePath
|
|
16
|
+
Object.defineProperty(exports, "calculateLifePath", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkRGMSQCP5_js.calculateLifePath; }
|
|
187
19
|
});
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
188
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/numerology/index.ts"],"sourcesContent":["/**\n * Numerology calculations\n */\n\n/**\n * Calculate the life path number based on a birth date\n * @param birthDate - Birth date as a Date object\n * @returns Life path number (1-9, 11, 22, or 33)\n */\nexport function calculateLifePath(birthDate: Date): number {\n const dateString = birthDate.toISOString().split('T')[0]; // YYYY-MM-DD\n const dateWithoutDashes = dateString.replace(/-/g, '');\n \n // Initial sum of all digits\n let sum = dateWithoutDashes.split('').reduce((total, digit) => {\n return total + parseInt(digit, 10);\n }, 0);\n \n // Reduce to a single digit or master number\n while (sum > 9 && sum !== 11 && sum !== 22 && sum !== 33) {\n sum = sum.toString().split('').reduce((total, digit) => {\n return total + parseInt(digit, 10);\n }, 0);\n }\n \n return sum;\n}\n\n\nexport const CYCLE_MEANINGS = [\n {\n \"title\": \"Learning\",\n \"shortDescription\": \"A period for assertive action and learning through direct experience.\",\n \"personalDescription\": \"This period emphasizes assertive action and learning through direct experience. Utilize personal influence to seek favors, loans, or recognition from influential individuals such as government officials or community leaders. Ideal for enhancing personal reputation and prestige, keeping in mind that all actions carry consequences.\",\n \"businessDescription\": \"Ideal for promotional activities aimed at building goodwill, public recognition, and securing endorsements from prominent individuals. Prioritize the company's image and reputation over immediate profits.\",\n \"astrologySign\": \"Aries (Actions Have Consequences)\"\n },\n {\n \"title\": \"Hard Work\",\n \"shortDescription\": \"A time for diligent effort and adaptability to temporary changes.\",\n \"personalDescription\": \"A period where diligent effort and adaptability are crucial. Suitable for temporary changes such as moving homes, short trips, or career shifts. Avoid long-term commitments or significant investments unless carefully formalized.\",\n \"businessDescription\": \"Ideal for short-term experiments, temporary staffing adjustments, and forming beneficial business connections. Steer clear of verbal agreements or long-term commitments unless formally documented. Flexibility leads to progress.\",\n \"astrologySign\": \"Taurus (Stop Being Stubborn)\"\n },\n {\n \"title\": \"Friendship\",\n \"shortDescription\": \"A dynamic phase for ambitious projects and strengthening relationships.\",\n \"personalDescription\": \"A dynamic and energetic phase ideal for initiating ambitious projects requiring persistence and physical strength. Effective communication strengthens relationships, but impulsiveness should be avoided to prevent conflicts.\",\n \"businessDescription\": \"Ideal for expansion, energetic ventures, and assertive promotional activities. Excellent for debt collection but avoid legal conflicts. Maintain vigilance against accidents and disputes while leveraging strong communication.\",\n \"astrologySign\": \"Gemini (Communication is Power)\"\n },\n {\n \"title\": \"Opportunities\",\n \"shortDescription\": \"An intellectually fertile time for creativity and quick decision-making.\",\n \"personalDescription\": \"An intellectually fertile phase ideal for creative projects, innovation, and quick decision-making. Beware of deception, especially concerning documents or agreements. Foster mental growth and create valuable connections, but remain cautious.\",\n \"businessDescription\": \"Perfect for launching impactful marketing campaigns and securing new agreements. Excellent for promotional activities and intellectual creativity, but carefully scrutinize documents to avoid fraud.\",\n \"astrologySign\": \"Cancer (Nurture Mental Growth)\"\n },\n {\n \"title\": \"Tears/Decision\",\n \"shortDescription\": \"The most prosperous phase for financial resolution and spiritual advancement.\",\n \"personalDescription\": \"The most prosperous phase of the year, suitable for resolving financial issues, starting long journeys, and advancing spiritually. Interact with influential figures, manage debts, and engage in expansive social activities. Keep ego and selfishness balanced for optimal outcomes.\",\n \"businessDescription\": \"A prime time for investments, financial growth, global promotion, debt collection, and favorable legal outcomes. Emphasize fairness and generosity to enhance business success.\",\n \"astrologySign\": \"Leo (Balance Ego and Generosity)\"\n },\n {\n \"title\": \"Triple Blessing\",\n \"shortDescription\": \"Perfect for pleasures, social activities, and creative pursuits.\",\n \"personalDescription\": \"Ideal for enjoying pleasures, social activities, artistic endeavors, and short travels. Favorable for romantic interactions, relaxation, and creative pursuits. Organize personal life to balance enjoyment and refinement effectively.\",\n \"businessDescription\": \"Excellent time for promoting luxury products, arts, entertainment, and speculative investments. Ideal for forming friendly business alliances and strategic partnerships.\",\n \"astrologySign\": \"Virgo (Organize Your Pleasures)\"\n },\n {\n \"title\": \"Rest\",\n \"shortDescription\": \"A period of rest, introspection, and preparation for renewal.\",\n \"personalDescription\": \"A critical period of rest, introspection, and cautious preparation for renewal. Avoid initiating new ventures and instead focus on completing pending matters, managing legal affairs carefully, and protecting existing resources. Balance and patience are essential.\",\n \"businessDescription\": \"Period to conserve resources, avoid major expansions, and carefully manage internal restructuring. Postpone significant new ventures until the next cycle. Act diplomatically and cautiously to ensure stability.\",\n \"astrologySign\": \"Libra (Seek Balance and Reconstruction)\"\n }\n];\n\nexport interface Cycle {\n number: number;\n description: {\n title: string;\n shortDescription: string;\n personalDescription: string;\n businessDescription: string;\n astrologySign: string;\n };\n isActive?: boolean;\n cycleStart?: Date;\n}\n\nexport interface CycleInfo {\n yearlyCycles: Cycle[];\n ageCycles: Cycle[];\n monthlyCycles: Cycle[];\n currentYearlyCycle: number | null;\n currentAgeCycle: number | null;\n currentMonthlyCycle: number | null;\n daysInMonthlyCycle: number;\n totalDays: number;\n}\n\n// Add days to a date\nconst addDays = (date: Date, days: number) => {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n};\n\n// Find the most recent anniversary of the start date\nconst getMostRecentStartDate = (startDate: Date, today: Date) => {\n const startMonth = startDate.getMonth();\n const startDay = startDate.getDate();\n let recentStart = new Date(today.getFullYear(), startMonth, startDay);\n if (recentStart > today) {\n recentStart = new Date(today.getFullYear() - 1, startMonth, startDay);\n }\n return recentStart;\n};\n\n// Calculate cycles (annual and monthly)\nexport const calculateCycles = (startDate: Date, today: Date): CycleInfo => {\n const mostRecentStart = getMostRecentStartDate(startDate, today);\n const cycleLength = 52; // Fixed cycle length for monthly cycles\n\n // Skip annual cycle calculation if start date is in the future\n const isFutureDate = startDate > today;\n let currentYearlyCycle = null;\n let currentAgeCycle = null;\n const ageCycles: Cycle[] = [];\n const yearlyCycles: Cycle[] = [];\n if (!isFutureDate) {\n const birthYear = startDate.getFullYear();\n const currentYear = today.getFullYear();\n const ageInYears = currentYear - birthYear;\n currentAgeCycle = (Math.floor(ageInYears / 7) % 7) + 1;\n for (let i = 0; i < 7; i++) {\n // cycle start for year is which year it started\n const cycleStart = new Date(birthYear + (i * 7), startDate.getMonth(), startDate.getDate());\n\n const cycle = i + 1;\n const isCurrentCycle = cycle === currentAgeCycle;\n\n if (isCurrentCycle) {\n // Calculate yearly cycles within the current age cycle\n // The yearly cycle is based on the person's exact age in years\n // For example, if someone is 6 years old, they're in the 1st age cycle (0-7 years) and the 6th yearly cycle\n const yearsSinceBirth = ageInYears;\n const yearWithinAgeCycle = yearsSinceBirth % 7; // 0-6 representing which year within the current age cycle\n currentYearlyCycle = yearWithinAgeCycle + 1; // Convert to 1-7 range\n \n for (let j = 0; j < 7; j++) {\n // Calculate the start date for each yearly cycle within the current age cycle\n const ageCycleStartYear = birthYear + (Math.floor(ageInYears / 7) * 7); // Start year of current age cycle\n const yearlyCycleStart = new Date(ageCycleStartYear + j, startDate.getMonth(), startDate.getDate());\n const yearlyCycle = j + 1;\n \n const isCurrentYearlyCycle = yearlyCycle === currentYearlyCycle;\n \n yearlyCycles.push({\n number: yearlyCycle,\n description: CYCLE_MEANINGS[j],\n isActive: isCurrentYearlyCycle,\n cycleStart: yearlyCycleStart\n });\n }\n }\n\n ageCycles.push({\n number: cycle,\n description: CYCLE_MEANINGS[i],\n isActive: isCurrentCycle,\n cycleStart,\n });\n }\n }\n\n // Monthly cycles (relative to start date)\n const monthlyCycles: Cycle[] = [];\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n \n monthlyCycles.push({\n number: i + 1,\n description: CYCLE_MEANINGS[i],\n isActive: false,\n cycleStart: cycleStart\n });\n }\n\n // Find current monthly cycle\n let currentMonthlyCycle = null;\n let daysInMonthlyCycle = 0;\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n const nextCycleStart = i < 6 ? addDays(mostRecentStart, (i + 1) * cycleLength) : addDays(mostRecentStart, 366);\n if (today >= cycleStart && today < nextCycleStart) {\n currentMonthlyCycle = i + 1;\n daysInMonthlyCycle = Math.floor((today.getTime() - cycleStart.getTime()) / (1000 * 60 * 60 * 24)) + 1;\n monthlyCycles[i].isActive = true;\n break;\n }\n }\n\n const totalDays = Math.floor((today.getTime() - mostRecentStart.getTime()) / (1000 * 60 * 60 * 24)) + 1;\n\n return {\n yearlyCycles,\n ageCycles,\n monthlyCycles,\n currentYearlyCycle,\n currentAgeCycle,\n currentMonthlyCycle,\n daysInMonthlyCycle,\n totalDays\n };\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASO,SAAS,kBAAkB,WAAyB;AACzD,QAAM,aAAa,UAAU,YAAY,EAAE,MAAM,GAAG,EAAE,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AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
|
@@ -1,161 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const dateWithoutDashes = dateString.replace(/-/g, "");
|
|
5
|
-
let sum = dateWithoutDashes.split("").reduce((total, digit) => {
|
|
6
|
-
return total + parseInt(digit, 10);
|
|
7
|
-
}, 0);
|
|
8
|
-
while (sum > 9 && sum !== 11 && sum !== 22 && sum !== 33) {
|
|
9
|
-
sum = sum.toString().split("").reduce((total, digit) => {
|
|
10
|
-
return total + parseInt(digit, 10);
|
|
11
|
-
}, 0);
|
|
12
|
-
}
|
|
13
|
-
return sum;
|
|
14
|
-
}
|
|
15
|
-
var CYCLE_MEANINGS = [
|
|
16
|
-
{
|
|
17
|
-
"title": "Learning",
|
|
18
|
-
"shortDescription": "A period for assertive action and learning through direct experience.",
|
|
19
|
-
"personalDescription": "This period emphasizes assertive action and learning through direct experience. Utilize personal influence to seek favors, loans, or recognition from influential individuals such as government officials or community leaders. Ideal for enhancing personal reputation and prestige, keeping in mind that all actions carry consequences.",
|
|
20
|
-
"businessDescription": "Ideal for promotional activities aimed at building goodwill, public recognition, and securing endorsements from prominent individuals. Prioritize the company's image and reputation over immediate profits.",
|
|
21
|
-
"astrologySign": "Aries (Actions Have Consequences)"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"title": "Hard Work",
|
|
25
|
-
"shortDescription": "A time for diligent effort and adaptability to temporary changes.",
|
|
26
|
-
"personalDescription": "A period where diligent effort and adaptability are crucial. Suitable for temporary changes such as moving homes, short trips, or career shifts. Avoid long-term commitments or significant investments unless carefully formalized.",
|
|
27
|
-
"businessDescription": "Ideal for short-term experiments, temporary staffing adjustments, and forming beneficial business connections. Steer clear of verbal agreements or long-term commitments unless formally documented. Flexibility leads to progress.",
|
|
28
|
-
"astrologySign": "Taurus (Stop Being Stubborn)"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"title": "Friendship",
|
|
32
|
-
"shortDescription": "A dynamic phase for ambitious projects and strengthening relationships.",
|
|
33
|
-
"personalDescription": "A dynamic and energetic phase ideal for initiating ambitious projects requiring persistence and physical strength. Effective communication strengthens relationships, but impulsiveness should be avoided to prevent conflicts.",
|
|
34
|
-
"businessDescription": "Ideal for expansion, energetic ventures, and assertive promotional activities. Excellent for debt collection but avoid legal conflicts. Maintain vigilance against accidents and disputes while leveraging strong communication.",
|
|
35
|
-
"astrologySign": "Gemini (Communication is Power)"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"title": "Opportunities",
|
|
39
|
-
"shortDescription": "An intellectually fertile time for creativity and quick decision-making.",
|
|
40
|
-
"personalDescription": "An intellectually fertile phase ideal for creative projects, innovation, and quick decision-making. Beware of deception, especially concerning documents or agreements. Foster mental growth and create valuable connections, but remain cautious.",
|
|
41
|
-
"businessDescription": "Perfect for launching impactful marketing campaigns and securing new agreements. Excellent for promotional activities and intellectual creativity, but carefully scrutinize documents to avoid fraud.",
|
|
42
|
-
"astrologySign": "Cancer (Nurture Mental Growth)"
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"title": "Tears/Decision",
|
|
46
|
-
"shortDescription": "The most prosperous phase for financial resolution and spiritual advancement.",
|
|
47
|
-
"personalDescription": "The most prosperous phase of the year, suitable for resolving financial issues, starting long journeys, and advancing spiritually. Interact with influential figures, manage debts, and engage in expansive social activities. Keep ego and selfishness balanced for optimal outcomes.",
|
|
48
|
-
"businessDescription": "A prime time for investments, financial growth, global promotion, debt collection, and favorable legal outcomes. Emphasize fairness and generosity to enhance business success.",
|
|
49
|
-
"astrologySign": "Leo (Balance Ego and Generosity)"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"title": "Triple Blessing",
|
|
53
|
-
"shortDescription": "Perfect for pleasures, social activities, and creative pursuits.",
|
|
54
|
-
"personalDescription": "Ideal for enjoying pleasures, social activities, artistic endeavors, and short travels. Favorable for romantic interactions, relaxation, and creative pursuits. Organize personal life to balance enjoyment and refinement effectively.",
|
|
55
|
-
"businessDescription": "Excellent time for promoting luxury products, arts, entertainment, and speculative investments. Ideal for forming friendly business alliances and strategic partnerships.",
|
|
56
|
-
"astrologySign": "Virgo (Organize Your Pleasures)"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"title": "Rest",
|
|
60
|
-
"shortDescription": "A period of rest, introspection, and preparation for renewal.",
|
|
61
|
-
"personalDescription": "A critical period of rest, introspection, and cautious preparation for renewal. Avoid initiating new ventures and instead focus on completing pending matters, managing legal affairs carefully, and protecting existing resources. Balance and patience are essential.",
|
|
62
|
-
"businessDescription": "Period to conserve resources, avoid major expansions, and carefully manage internal restructuring. Postpone significant new ventures until the next cycle. Act diplomatically and cautiously to ensure stability.",
|
|
63
|
-
"astrologySign": "Libra (Seek Balance and Reconstruction)"
|
|
64
|
-
}
|
|
65
|
-
];
|
|
66
|
-
var addDays = (date, days) => {
|
|
67
|
-
const result = new Date(date);
|
|
68
|
-
result.setDate(result.getDate() + days);
|
|
69
|
-
return result;
|
|
70
|
-
};
|
|
71
|
-
var getMostRecentStartDate = (startDate, today) => {
|
|
72
|
-
const startMonth = startDate.getMonth();
|
|
73
|
-
const startDay = startDate.getDate();
|
|
74
|
-
let recentStart = new Date(today.getFullYear(), startMonth, startDay);
|
|
75
|
-
if (recentStart > today) {
|
|
76
|
-
recentStart = new Date(today.getFullYear() - 1, startMonth, startDay);
|
|
77
|
-
}
|
|
78
|
-
return recentStart;
|
|
79
|
-
};
|
|
80
|
-
var calculateCycles = (startDate, today) => {
|
|
81
|
-
const mostRecentStart = getMostRecentStartDate(startDate, today);
|
|
82
|
-
const cycleLength = 52;
|
|
83
|
-
const isFutureDate = startDate > today;
|
|
84
|
-
let currentYearlyCycle = null;
|
|
85
|
-
let currentAgeCycle = null;
|
|
86
|
-
const ageCycles = [];
|
|
87
|
-
const yearlyCycles = [];
|
|
88
|
-
if (!isFutureDate) {
|
|
89
|
-
const birthYear = startDate.getFullYear();
|
|
90
|
-
const currentYear = today.getFullYear();
|
|
91
|
-
const ageInYears = currentYear - birthYear;
|
|
92
|
-
currentAgeCycle = Math.floor(ageInYears / 7) % 7 + 1;
|
|
93
|
-
for (let i = 0; i < 7; i++) {
|
|
94
|
-
const cycleStart = new Date(birthYear + i * 7, startDate.getMonth(), startDate.getDate());
|
|
95
|
-
const cycle = i + 1;
|
|
96
|
-
const isCurrentCycle = cycle === currentAgeCycle;
|
|
97
|
-
if (isCurrentCycle) {
|
|
98
|
-
const yearsSinceBirth = ageInYears;
|
|
99
|
-
const yearWithinAgeCycle = yearsSinceBirth % 7;
|
|
100
|
-
currentYearlyCycle = yearWithinAgeCycle + 1;
|
|
101
|
-
for (let j = 0; j < 7; j++) {
|
|
102
|
-
const ageCycleStartYear = birthYear + Math.floor(ageInYears / 7) * 7;
|
|
103
|
-
const yearlyCycleStart = new Date(ageCycleStartYear + j, startDate.getMonth(), startDate.getDate());
|
|
104
|
-
const yearlyCycle = j + 1;
|
|
105
|
-
const isCurrentYearlyCycle = yearlyCycle === currentYearlyCycle;
|
|
106
|
-
yearlyCycles.push({
|
|
107
|
-
number: yearlyCycle,
|
|
108
|
-
description: CYCLE_MEANINGS[j],
|
|
109
|
-
isActive: isCurrentYearlyCycle,
|
|
110
|
-
cycleStart: yearlyCycleStart
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
ageCycles.push({
|
|
115
|
-
number: cycle,
|
|
116
|
-
description: CYCLE_MEANINGS[i],
|
|
117
|
-
isActive: isCurrentCycle,
|
|
118
|
-
cycleStart
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
const monthlyCycles = [];
|
|
123
|
-
for (let i = 0; i < 7; i++) {
|
|
124
|
-
const cycleStart = addDays(mostRecentStart, i * cycleLength);
|
|
125
|
-
monthlyCycles.push({
|
|
126
|
-
number: i + 1,
|
|
127
|
-
description: CYCLE_MEANINGS[i],
|
|
128
|
-
isActive: false,
|
|
129
|
-
cycleStart
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
let currentMonthlyCycle = null;
|
|
133
|
-
let daysInMonthlyCycle = 0;
|
|
134
|
-
for (let i = 0; i < 7; i++) {
|
|
135
|
-
const cycleStart = addDays(mostRecentStart, i * cycleLength);
|
|
136
|
-
const nextCycleStart = i < 6 ? addDays(mostRecentStart, (i + 1) * cycleLength) : addDays(mostRecentStart, 366);
|
|
137
|
-
if (today >= cycleStart && today < nextCycleStart) {
|
|
138
|
-
currentMonthlyCycle = i + 1;
|
|
139
|
-
daysInMonthlyCycle = Math.floor((today.getTime() - cycleStart.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
|
|
140
|
-
monthlyCycles[i].isActive = true;
|
|
141
|
-
break;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
const totalDays = Math.floor((today.getTime() - mostRecentStart.getTime()) / (1e3 * 60 * 60 * 24)) + 1;
|
|
145
|
-
return {
|
|
146
|
-
yearlyCycles,
|
|
147
|
-
ageCycles,
|
|
148
|
-
monthlyCycles,
|
|
149
|
-
currentYearlyCycle,
|
|
150
|
-
currentAgeCycle,
|
|
151
|
-
currentMonthlyCycle,
|
|
152
|
-
daysInMonthlyCycle,
|
|
153
|
-
totalDays
|
|
154
|
-
};
|
|
155
|
-
};
|
|
156
|
-
export {
|
|
157
|
-
CYCLE_MEANINGS,
|
|
158
|
-
calculateCycles,
|
|
159
|
-
calculateLifePath
|
|
160
|
-
};
|
|
1
|
+
export { CYCLE_MEANINGS, calculateCycles, calculateLifePath } from '../chunk-W7GBKP5K.mjs';
|
|
2
|
+
import '../chunk-PY5SMMJB.mjs';
|
|
3
|
+
//# sourceMappingURL=index.mjs.map
|
|
161
4
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/numerology/index.ts"],"sourcesContent":["/**\n * Numerology calculations\n */\n\n/**\n * Calculate the life path number based on a birth date\n * @param birthDate - Birth date as a Date object\n * @returns Life path number (1-9, 11, 22, or 33)\n */\nexport function calculateLifePath(birthDate: Date): number {\n const dateString = birthDate.toISOString().split('T')[0]; // YYYY-MM-DD\n const dateWithoutDashes = dateString.replace(/-/g, '');\n \n // Initial sum of all digits\n let sum = dateWithoutDashes.split('').reduce((total, digit) => {\n return total + parseInt(digit, 10);\n }, 0);\n \n // Reduce to a single digit or master number\n while (sum > 9 && sum !== 11 && sum !== 22 && sum !== 33) {\n sum = sum.toString().split('').reduce((total, digit) => {\n return total + parseInt(digit, 10);\n }, 0);\n }\n \n return sum;\n}\n\n\nexport const CYCLE_MEANINGS = [\n {\n \"title\": \"Learning\",\n \"shortDescription\": \"A period for assertive action and learning through direct experience.\",\n \"personalDescription\": \"This period emphasizes assertive action and learning through direct experience. Utilize personal influence to seek favors, loans, or recognition from influential individuals such as government officials or community leaders. Ideal for enhancing personal reputation and prestige, keeping in mind that all actions carry consequences.\",\n \"businessDescription\": \"Ideal for promotional activities aimed at building goodwill, public recognition, and securing endorsements from prominent individuals. Prioritize the company's image and reputation over immediate profits.\",\n \"astrologySign\": \"Aries (Actions Have Consequences)\"\n },\n {\n \"title\": \"Hard Work\",\n \"shortDescription\": \"A time for diligent effort and adaptability to temporary changes.\",\n \"personalDescription\": \"A period where diligent effort and adaptability are crucial. Suitable for temporary changes such as moving homes, short trips, or career shifts. Avoid long-term commitments or significant investments unless carefully formalized.\",\n \"businessDescription\": \"Ideal for short-term experiments, temporary staffing adjustments, and forming beneficial business connections. Steer clear of verbal agreements or long-term commitments unless formally documented. Flexibility leads to progress.\",\n \"astrologySign\": \"Taurus (Stop Being Stubborn)\"\n },\n {\n \"title\": \"Friendship\",\n \"shortDescription\": \"A dynamic phase for ambitious projects and strengthening relationships.\",\n \"personalDescription\": \"A dynamic and energetic phase ideal for initiating ambitious projects requiring persistence and physical strength. Effective communication strengthens relationships, but impulsiveness should be avoided to prevent conflicts.\",\n \"businessDescription\": \"Ideal for expansion, energetic ventures, and assertive promotional activities. Excellent for debt collection but avoid legal conflicts. Maintain vigilance against accidents and disputes while leveraging strong communication.\",\n \"astrologySign\": \"Gemini (Communication is Power)\"\n },\n {\n \"title\": \"Opportunities\",\n \"shortDescription\": \"An intellectually fertile time for creativity and quick decision-making.\",\n \"personalDescription\": \"An intellectually fertile phase ideal for creative projects, innovation, and quick decision-making. Beware of deception, especially concerning documents or agreements. Foster mental growth and create valuable connections, but remain cautious.\",\n \"businessDescription\": \"Perfect for launching impactful marketing campaigns and securing new agreements. Excellent for promotional activities and intellectual creativity, but carefully scrutinize documents to avoid fraud.\",\n \"astrologySign\": \"Cancer (Nurture Mental Growth)\"\n },\n {\n \"title\": \"Tears/Decision\",\n \"shortDescription\": \"The most prosperous phase for financial resolution and spiritual advancement.\",\n \"personalDescription\": \"The most prosperous phase of the year, suitable for resolving financial issues, starting long journeys, and advancing spiritually. Interact with influential figures, manage debts, and engage in expansive social activities. Keep ego and selfishness balanced for optimal outcomes.\",\n \"businessDescription\": \"A prime time for investments, financial growth, global promotion, debt collection, and favorable legal outcomes. Emphasize fairness and generosity to enhance business success.\",\n \"astrologySign\": \"Leo (Balance Ego and Generosity)\"\n },\n {\n \"title\": \"Triple Blessing\",\n \"shortDescription\": \"Perfect for pleasures, social activities, and creative pursuits.\",\n \"personalDescription\": \"Ideal for enjoying pleasures, social activities, artistic endeavors, and short travels. Favorable for romantic interactions, relaxation, and creative pursuits. Organize personal life to balance enjoyment and refinement effectively.\",\n \"businessDescription\": \"Excellent time for promoting luxury products, arts, entertainment, and speculative investments. Ideal for forming friendly business alliances and strategic partnerships.\",\n \"astrologySign\": \"Virgo (Organize Your Pleasures)\"\n },\n {\n \"title\": \"Rest\",\n \"shortDescription\": \"A period of rest, introspection, and preparation for renewal.\",\n \"personalDescription\": \"A critical period of rest, introspection, and cautious preparation for renewal. Avoid initiating new ventures and instead focus on completing pending matters, managing legal affairs carefully, and protecting existing resources. Balance and patience are essential.\",\n \"businessDescription\": \"Period to conserve resources, avoid major expansions, and carefully manage internal restructuring. Postpone significant new ventures until the next cycle. Act diplomatically and cautiously to ensure stability.\",\n \"astrologySign\": \"Libra (Seek Balance and Reconstruction)\"\n }\n];\n\nexport interface Cycle {\n number: number;\n description: {\n title: string;\n shortDescription: string;\n personalDescription: string;\n businessDescription: string;\n astrologySign: string;\n };\n isActive?: boolean;\n cycleStart?: Date;\n}\n\nexport interface CycleInfo {\n yearlyCycles: Cycle[];\n ageCycles: Cycle[];\n monthlyCycles: Cycle[];\n currentYearlyCycle: number | null;\n currentAgeCycle: number | null;\n currentMonthlyCycle: number | null;\n daysInMonthlyCycle: number;\n totalDays: number;\n}\n\n// Add days to a date\nconst addDays = (date: Date, days: number) => {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n};\n\n// Find the most recent anniversary of the start date\nconst getMostRecentStartDate = (startDate: Date, today: Date) => {\n const startMonth = startDate.getMonth();\n const startDay = startDate.getDate();\n let recentStart = new Date(today.getFullYear(), startMonth, startDay);\n if (recentStart > today) {\n recentStart = new Date(today.getFullYear() - 1, startMonth, startDay);\n }\n return recentStart;\n};\n\n// Calculate cycles (annual and monthly)\nexport const calculateCycles = (startDate: Date, today: Date): CycleInfo => {\n const mostRecentStart = getMostRecentStartDate(startDate, today);\n const cycleLength = 52; // Fixed cycle length for monthly cycles\n\n // Skip annual cycle calculation if start date is in the future\n const isFutureDate = startDate > today;\n let currentYearlyCycle = null;\n let currentAgeCycle = null;\n const ageCycles: Cycle[] = [];\n const yearlyCycles: Cycle[] = [];\n if (!isFutureDate) {\n const birthYear = startDate.getFullYear();\n const currentYear = today.getFullYear();\n const ageInYears = currentYear - birthYear;\n currentAgeCycle = (Math.floor(ageInYears / 7) % 7) + 1;\n for (let i = 0; i < 7; i++) {\n // cycle start for year is which year it started\n const cycleStart = new Date(birthYear + (i * 7), startDate.getMonth(), startDate.getDate());\n\n const cycle = i + 1;\n const isCurrentCycle = cycle === currentAgeCycle;\n\n if (isCurrentCycle) {\n // Calculate yearly cycles within the current age cycle\n // The yearly cycle is based on the person's exact age in years\n // For example, if someone is 6 years old, they're in the 1st age cycle (0-7 years) and the 6th yearly cycle\n const yearsSinceBirth = ageInYears;\n const yearWithinAgeCycle = yearsSinceBirth % 7; // 0-6 representing which year within the current age cycle\n currentYearlyCycle = yearWithinAgeCycle + 1; // Convert to 1-7 range\n \n for (let j = 0; j < 7; j++) {\n // Calculate the start date for each yearly cycle within the current age cycle\n const ageCycleStartYear = birthYear + (Math.floor(ageInYears / 7) * 7); // Start year of current age cycle\n const yearlyCycleStart = new Date(ageCycleStartYear + j, startDate.getMonth(), startDate.getDate());\n const yearlyCycle = j + 1;\n \n const isCurrentYearlyCycle = yearlyCycle === currentYearlyCycle;\n \n yearlyCycles.push({\n number: yearlyCycle,\n description: CYCLE_MEANINGS[j],\n isActive: isCurrentYearlyCycle,\n cycleStart: yearlyCycleStart\n });\n }\n }\n\n ageCycles.push({\n number: cycle,\n description: CYCLE_MEANINGS[i],\n isActive: isCurrentCycle,\n cycleStart,\n });\n }\n }\n\n // Monthly cycles (relative to start date)\n const monthlyCycles: Cycle[] = [];\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n \n monthlyCycles.push({\n number: i + 1,\n description: CYCLE_MEANINGS[i],\n isActive: false,\n cycleStart: cycleStart\n });\n }\n\n // Find current monthly cycle\n let currentMonthlyCycle = null;\n let daysInMonthlyCycle = 0;\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n const nextCycleStart = i < 6 ? addDays(mostRecentStart, (i + 1) * cycleLength) : addDays(mostRecentStart, 366);\n if (today >= cycleStart && today < nextCycleStart) {\n currentMonthlyCycle = i + 1;\n daysInMonthlyCycle = Math.floor((today.getTime() - cycleStart.getTime()) / (1000 * 60 * 60 * 24)) + 1;\n monthlyCycles[i].isActive = true;\n break;\n }\n }\n\n const totalDays = Math.floor((today.getTime() - mostRecentStart.getTime()) / (1000 * 60 * 60 * 24)) + 1;\n\n return {\n yearlyCycles,\n ageCycles,\n monthlyCycles,\n currentYearlyCycle,\n currentAgeCycle,\n currentMonthlyCycle,\n daysInMonthlyCycle,\n totalDays\n };\n};"],"mappings":";AASO,SAAS,kBAAkB,WAAyB;AACzD,QAAM,aAAa,UAAU,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC;AACvD,QAAM,oBAAoB,WAAW,QAAQ,MAAM,EAAE;AAGrD,MAAI,MAAM,kBAAkB,MAAM,EAAE,EAAE,OAAO,CAAC,OAAO,UAAU;AAC7D,WAAO,QAAQ,SAAS,OAAO,EAAE;AAAA,EACnC,GAAG,CAAC;AAGJ,SAAO,MAAM,KAAK,QAAQ,MAAM,QAAQ,MAAM,QAAQ,IAAI;AACxD,UAAM,IAAI,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,OAAO,UAAU;AACtD,aAAO,QAAQ,SAAS,OAAO,EAAE;AAAA,IACnC,GAAG,CAAC;AAAA,EACN;AAEA,SAAO;AACT;AAGO,IAAM,iBAAiB;AAAA,EAC5B;AAAA,IACE,SAAS;AAAA,IACT,oBAAoB;AAAA,IACpB,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,oBAAoB;AAAA,IACpB,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,oBAAoB;AAAA,IACpB,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,SAAS;AAAA,IACT,oBAAoB;AAAA,IACpB,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,iBAAiB;AAAA,E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AAc,QAAQ,gBAAgB;AACjD,4BAAsB,IAAI;AAC1B,2BAAqB,KAAK,OAAO,MAAM,QAAQ,IAAI,WAAW,QAAQ,MAAM,MAAO,KAAK,KAAK,GAAG,IAAI;AACpG,oBAAc,CAAC,EAAE,WAAW;AAC5B;AAAA,IACF;AAAA,EACF;AAEA,QAAM,YAAY,KAAK,OAAO,MAAM,QAAQ,IAAI,gBAAgB,QAAQ,MAAM,MAAO,KAAK,KAAK,GAAG,IAAI;AAEtG,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.mjs"}
|
|
@@ -7,7 +7,7 @@ declare enum LetterTypes {
|
|
|
7
7
|
HEBREW_LETTER = "hebrewLetter",
|
|
8
8
|
LATIN_LETTER = "latinLetter",
|
|
9
9
|
SANSKRIT_LETTER = "sanskritLetter",
|
|
10
|
-
|
|
10
|
+
VATTAN_LETTER = "vattanLetter"
|
|
11
11
|
}
|
|
12
12
|
declare enum WesternAstrologyTypes {
|
|
13
13
|
PLANET = "planet",
|
|
@@ -7,7 +7,7 @@ declare enum LetterTypes {
|
|
|
7
7
|
HEBREW_LETTER = "hebrewLetter",
|
|
8
8
|
LATIN_LETTER = "latinLetter",
|
|
9
9
|
SANSKRIT_LETTER = "sanskritLetter",
|
|
10
|
-
|
|
10
|
+
VATTAN_LETTER = "vattanLetter"
|
|
11
11
|
}
|
|
12
12
|
declare enum WesternAstrologyTypes {
|
|
13
13
|
PLANET = "planet",
|
|
Binary file
|