kaabalah 6.3.0 → 6.4.0

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.
@@ -0,0 +1,1741 @@
1
+ 'use strict';
2
+
3
+ var chunk6O7MTBZN_js = require('./chunk-6O7MTBZN.js');
4
+ var chunkPAKYKIZH_js = require('./chunk-PAKYKIZH.js');
5
+ var chunkCOPYH3O2_js = require('./chunk-COPYH3O2.js');
6
+ var chunkXTE5DSDO_js = require('./chunk-XTE5DSDO.js');
7
+ var chunkOKZUVGA3_js = require('./chunk-OKZUVGA3.js');
8
+ var chunkS6KNERP7_js = require('./chunk-S6KNERP7.js');
9
+
10
+ // src/semantic/kaabalistic.ts
11
+ var canonicalTree = chunkOKZUVGA3_js.getCanonicalTree({
12
+ system: "kaabalah",
13
+ parts: ["westernAstrology"]
14
+ });
15
+ var orderedSphereIds = [
16
+ chunkS6KNERP7_js.SPHERES.KETHER,
17
+ chunkS6KNERP7_js.SPHERES.CHOKHMAH,
18
+ chunkS6KNERP7_js.SPHERES.BINAH,
19
+ chunkS6KNERP7_js.SPHERES.DAATH,
20
+ chunkS6KNERP7_js.SPHERES.CHESED,
21
+ chunkS6KNERP7_js.SPHERES.GEBURAH,
22
+ chunkS6KNERP7_js.SPHERES.TIPHARETH,
23
+ chunkS6KNERP7_js.SPHERES.NETZACH,
24
+ chunkS6KNERP7_js.SPHERES.HOD,
25
+ chunkS6KNERP7_js.SPHERES.YESOD,
26
+ chunkS6KNERP7_js.SPHERES.MALKUTH
27
+ ].map((sphere) => chunkS6KNERP7_js.id("sphere" /* SPHERE */, sphere));
28
+ var orderedPathIds = Array.from(
29
+ { length: 22 },
30
+ (_, index) => chunkS6KNERP7_js.id("path" /* PATH */, index + 1)
31
+ );
32
+ var orderedSpheres = Object.freeze(
33
+ orderedSphereIds.map((sphereId) => canonicalTree.getNode(sphereId)).filter((node) => Boolean(node))
34
+ );
35
+ var orderedPaths = Object.freeze(
36
+ orderedPathIds.map((pathId) => canonicalTree.getNode(pathId)).filter((node) => Boolean(node))
37
+ );
38
+ var SIGN_SYMBOLS = [
39
+ { kind: "sign", key: "aries", label: "Aries", shortLabel: "Aries", glyph: "\u2648", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.ARIES) },
40
+ { kind: "sign", key: "taurus", label: "Taurus", shortLabel: "Taurus", glyph: "\u2649", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.TAURUS) },
41
+ { kind: "sign", key: "gemini", label: "Gemini", shortLabel: "Gemini", glyph: "\u264A", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.GEMINI) },
42
+ { kind: "sign", key: "cancer", label: "Cancer", shortLabel: "Cancer", glyph: "\u264B", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.CANCER) },
43
+ { kind: "sign", key: "leo", label: "Leo", shortLabel: "Leo", glyph: "\u264C", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.LEO) },
44
+ { kind: "sign", key: "virgo", label: "Virgo", shortLabel: "Virgo", glyph: "\u264D", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.VIRGO) },
45
+ { kind: "sign", key: "libra", label: "Libra", shortLabel: "Libra", glyph: "\u264E", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.LIBRA) },
46
+ { kind: "sign", key: "scorpio", label: "Scorpio", shortLabel: "Scorpio", glyph: "\u264F", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.SCORPIO) },
47
+ { kind: "sign", key: "sagittarius", label: "Sagittarius", shortLabel: "Sagittarius", glyph: "\u2650", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.SAGITTARIUS) },
48
+ { kind: "sign", key: "capricorn", label: "Capricorn", shortLabel: "Capricorn", glyph: "\u2651", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.CAPRICORN) },
49
+ { kind: "sign", key: "aquarius", label: "Aquarius", shortLabel: "Aquarius", glyph: "\u2652", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.AQUARIUS) },
50
+ { kind: "sign", key: "pisces", label: "Pisces", shortLabel: "Pisces", glyph: "\u2653", id: chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, chunkS6KNERP7_js.WESTERN_ZODIAC_SIGNS.PISCES) }
51
+ ];
52
+ var PLANET_SYMBOLS = [
53
+ { kind: "planet", key: "sun", label: chunkS6KNERP7_js.PLANETS.SUN, shortLabel: chunkS6KNERP7_js.PLANETS.SUN, glyph: "\u2609", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.SUN) },
54
+ { kind: "planet", key: "moon", label: chunkS6KNERP7_js.PLANETS.MOON, shortLabel: chunkS6KNERP7_js.PLANETS.MOON, glyph: "\u263D", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.MOON) },
55
+ { kind: "planet", key: "mercury", label: chunkS6KNERP7_js.PLANETS.MERCURY, shortLabel: chunkS6KNERP7_js.PLANETS.MERCURY, glyph: "\u263F", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.MERCURY) },
56
+ { kind: "planet", key: "venus", label: chunkS6KNERP7_js.PLANETS.VENUS, shortLabel: chunkS6KNERP7_js.PLANETS.VENUS, glyph: "\u2640", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.VENUS) },
57
+ { kind: "planet", key: "mars", label: chunkS6KNERP7_js.PLANETS.MARS, shortLabel: chunkS6KNERP7_js.PLANETS.MARS, glyph: "\u2642", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.MARS) },
58
+ { kind: "planet", key: "jupiter", label: chunkS6KNERP7_js.PLANETS.JUPITER, shortLabel: chunkS6KNERP7_js.PLANETS.JUPITER, glyph: "\u2643", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.JUPITER) },
59
+ { kind: "planet", key: "saturn", label: chunkS6KNERP7_js.PLANETS.SATURN, shortLabel: chunkS6KNERP7_js.PLANETS.SATURN, glyph: "\u2644", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.SATURN) },
60
+ { kind: "planet", key: "uranus", label: chunkS6KNERP7_js.PLANETS.URANUS, shortLabel: chunkS6KNERP7_js.PLANETS.URANUS, glyph: "\u2645", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.URANUS) },
61
+ { kind: "planet", key: "neptune", label: chunkS6KNERP7_js.PLANETS.NEPTUNE, shortLabel: chunkS6KNERP7_js.PLANETS.NEPTUNE, glyph: "\u2646", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.NEPTUNE) },
62
+ { kind: "planet", key: "pluto", label: chunkS6KNERP7_js.PLANETS.PLUTO, shortLabel: chunkS6KNERP7_js.PLANETS.PLUTO, glyph: "\u2647", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.PLUTO) },
63
+ { kind: "planet", key: "earth", label: chunkS6KNERP7_js.PLANETS.EARTH, shortLabel: chunkS6KNERP7_js.PLANETS.EARTH, glyph: "\u2295", id: chunkS6KNERP7_js.id("planet" /* PLANET */, chunkS6KNERP7_js.PLANETS.EARTH) },
64
+ { kind: "planet", key: "chiron", label: "Chiron", shortLabel: "Chiron", glyph: "\u26B7", aliases: [chunk6O7MTBZN_js.PLANET_AND_NODE_NAMES[15]] }
65
+ ];
66
+ var ANGLE_SYMBOLS = [
67
+ { kind: "angle", key: "asc", label: "ASC", shortLabel: "ASC", glyph: "ASC", id: chunkS6KNERP7_js.id("house" /* HOUSE */, chunkS6KNERP7_js.WESTERN_HOUSES.ASCENDANT), aliases: ["ascendant"] },
68
+ { kind: "angle", key: "mc", label: "MC", shortLabel: "MC", glyph: "MC", id: chunkS6KNERP7_js.id("house" /* HOUSE */, chunkS6KNERP7_js.WESTERN_HOUSES.MEDIUM_COELI), aliases: ["medium coeli"] },
69
+ { kind: "angle", key: "dc", label: "DC", shortLabel: "DC", glyph: "DC", id: chunkS6KNERP7_js.id("house" /* HOUSE */, chunkS6KNERP7_js.WESTERN_HOUSES.DESCENDANT), aliases: ["descendant"] },
70
+ { kind: "angle", key: "ic", label: "IC", shortLabel: "IC", glyph: "IC", id: chunkS6KNERP7_js.id("house" /* HOUSE */, chunkS6KNERP7_js.WESTERN_HOUSES.IMUM_COELI), aliases: ["imum coeli"] },
71
+ { kind: "angle", key: "vertex", label: "Vertex", shortLabel: "Vertex", glyph: "Vtx" }
72
+ ];
73
+ var NODE_SYMBOLS = [
74
+ { kind: "node", key: "wheel of fortune", label: "Wheel of Fortune", shortLabel: "Wheel of Fortune", glyph: "\u{1BC9C}", aliases: [chunk6O7MTBZN_js.PLANET_AND_NODE_NAMES["parsFortunae" /* PARS_FORTUNAE */], "pars fortunae", "parsfortunae"] },
75
+ { kind: "node", key: "mean node", label: "Mean Node", shortLabel: "Mean Node", glyph: "\u260A", aliases: [chunk6O7MTBZN_js.PLANET_AND_NODE_NAMES[10]] },
76
+ { kind: "node", key: "true node", label: "True Node", shortLabel: "True Node", glyph: "\u260A", aliases: [chunk6O7MTBZN_js.PLANET_AND_NODE_NAMES[11]] },
77
+ { kind: "node", key: "lilith mean", label: "Lilith Mean", shortLabel: "Lilith Mean", glyph: "\u26B8", aliases: [chunk6O7MTBZN_js.PLANET_AND_NODE_NAMES[12]] },
78
+ { kind: "node", key: "lilith true", label: "Lilith True", shortLabel: "Lilith True", glyph: "\u26B8", aliases: [chunk6O7MTBZN_js.PLANET_AND_NODE_NAMES[13]] }
79
+ ];
80
+ var symbolRegistry = createSymbolRegistry([
81
+ ...SIGN_SYMBOLS,
82
+ ...PLANET_SYMBOLS,
83
+ ...ANGLE_SYMBOLS,
84
+ ...NODE_SYMBOLS
85
+ ]);
86
+ var classicalPlanetKeys = /* @__PURE__ */ new Set([
87
+ normalizeLookupKey(chunkS6KNERP7_js.PLANETS.SUN),
88
+ normalizeLookupKey(chunkS6KNERP7_js.PLANETS.MOON),
89
+ normalizeLookupKey(chunkS6KNERP7_js.PLANETS.MERCURY),
90
+ normalizeLookupKey(chunkS6KNERP7_js.PLANETS.VENUS),
91
+ normalizeLookupKey(chunkS6KNERP7_js.PLANETS.MARS),
92
+ normalizeLookupKey(chunkS6KNERP7_js.PLANETS.JUPITER),
93
+ normalizeLookupKey(chunkS6KNERP7_js.PLANETS.SATURN)
94
+ ]);
95
+ var defaultExcludedAstrologyPoints = /* @__PURE__ */ new Set([
96
+ normalizeLookupKey("True Node"),
97
+ normalizeLookupKey("Lilith True")
98
+ ]);
99
+ var classicalPlanetPathIdsByKey = createClassicalPlanetPathIdsByKey(canonicalTree);
100
+ function normalizeLookupKey(value) {
101
+ return value.trim().toLowerCase();
102
+ }
103
+ function createSymbolRegistry(entries) {
104
+ const byKey = /* @__PURE__ */ new Map();
105
+ for (const entry of entries) {
106
+ const frozen = Object.freeze({
107
+ kind: entry.kind,
108
+ key: entry.key,
109
+ label: entry.label,
110
+ shortLabel: entry.shortLabel,
111
+ glyph: entry.glyph,
112
+ ...entry.id ? { id: entry.id } : {}
113
+ });
114
+ byKey.set(normalizeLookupKey(entry.key), frozen);
115
+ byKey.set(normalizeLookupKey(entry.label), frozen);
116
+ byKey.set(normalizeLookupKey(entry.shortLabel), frozen);
117
+ for (const alias of entry.aliases ?? []) {
118
+ byKey.set(normalizeLookupKey(alias), frozen);
119
+ }
120
+ if (entry.id) {
121
+ byKey.set(normalizeLookupKey(entry.id), frozen);
122
+ byKey.set(normalizeLookupKey(chunkS6KNERP7_js.parseId(entry.id)), frozen);
123
+ }
124
+ }
125
+ return Object.freeze({
126
+ byKey,
127
+ planets: Object.freeze(entries.filter((entry) => entry.kind === "planet").map((entry) => byKey.get(normalizeLookupKey(entry.key)))),
128
+ signs: Object.freeze(entries.filter((entry) => entry.kind === "sign").map((entry) => byKey.get(normalizeLookupKey(entry.key)))),
129
+ angles: Object.freeze(entries.filter((entry) => entry.kind === "angle").map((entry) => byKey.get(normalizeLookupKey(entry.key)))),
130
+ nodes: Object.freeze(entries.filter((entry) => entry.kind === "node").map((entry) => byKey.get(normalizeLookupKey(entry.key))))
131
+ });
132
+ }
133
+ function createClassicalPlanetPathIdsByKey(tree) {
134
+ const registry = /* @__PURE__ */ new Map();
135
+ const mutable = /* @__PURE__ */ new Map();
136
+ for (const pathId of orderedPathIds) {
137
+ const planet = tree.getCorrespondences(pathId, {
138
+ type: "planet" /* PLANET */,
139
+ depth: 1,
140
+ limit: 1
141
+ })[0]?.node;
142
+ if (!planet) {
143
+ continue;
144
+ }
145
+ const key = normalizeLookupKey(planet.name ?? chunkS6KNERP7_js.parseId(planet.id));
146
+ if (!classicalPlanetKeys.has(key)) {
147
+ continue;
148
+ }
149
+ const bucket = mutable.get(key) ?? [];
150
+ bucket.push(pathId);
151
+ mutable.set(key, bucket);
152
+ }
153
+ for (const [key, value] of mutable.entries()) {
154
+ registry.set(key, Object.freeze([...value]));
155
+ }
156
+ return registry;
157
+ }
158
+ function getTargetType(targetId) {
159
+ return String(targetId).startsWith(`${"sphere" /* SPHERE */}:`) ? "sphere" : "path";
160
+ }
161
+ function getTargetName(targetId) {
162
+ return getTargetType(targetId) === "sphere" ? chunkS6KNERP7_js.parseId(targetId) : `Path ${chunkS6KNERP7_js.parseId(targetId)}`;
163
+ }
164
+ function getTargetCountMap(targets) {
165
+ const reduceMap = {};
166
+ for (const target of targets) {
167
+ reduceMap[target.targetId] = (reduceMap[target.targetId] ?? 0) + 1;
168
+ }
169
+ return reduceMap;
170
+ }
171
+ function toSummaryTargets(reduceMap) {
172
+ return Object.entries(reduceMap).map(([targetId, count]) => ({
173
+ id: targetId,
174
+ type: getTargetType(targetId),
175
+ name: getTargetName(targetId),
176
+ count: count ?? 0
177
+ }));
178
+ }
179
+ function groupByKey(items, getKey) {
180
+ const grouped = {};
181
+ for (const item of items) {
182
+ const key = getKey(item);
183
+ const bucket = grouped[key] ?? [];
184
+ bucket.push(item);
185
+ grouped[key] = bucket;
186
+ }
187
+ return grouped;
188
+ }
189
+ function normalizeSignName(sign) {
190
+ const rawSign = typeof sign === "string" && sign.startsWith(`${"westernZodiacSign" /* WESTERN_ZODIAC_SIGN */}:`) ? chunkS6KNERP7_js.parseId(sign) : typeof sign === "string" ? sign : chunkS6KNERP7_js.parseId(sign);
191
+ const key = normalizeLookupKey(rawSign);
192
+ const metadata = symbolRegistry.byKey.get(key);
193
+ if (!metadata || metadata.kind !== "sign") {
194
+ return void 0;
195
+ }
196
+ return metadata.label;
197
+ }
198
+ function normalizePlanetName(planet) {
199
+ const rawPlanet = planet.startsWith(`${"planet" /* PLANET */}:`) ? chunkS6KNERP7_js.parseId(planet) : planet;
200
+ const key = normalizeLookupKey(rawPlanet);
201
+ const metadata = symbolRegistry.byKey.get(key);
202
+ if (metadata?.kind === "planet") {
203
+ return metadata.label;
204
+ }
205
+ return chunk6O7MTBZN_js.PLANET_AND_NODE_NAMES[rawPlanet] ?? rawPlanet;
206
+ }
207
+ function lookupPlanetSymbolMetadata(planet) {
208
+ const rawPlanet = planet.startsWith(`${"planet" /* PLANET */}:`) ? chunkS6KNERP7_js.parseId(planet) : planet;
209
+ const metadata = symbolRegistry.byKey.get(normalizeLookupKey(rawPlanet));
210
+ return metadata?.kind === "planet" ? metadata : void 0;
211
+ }
212
+ function lookupSignSymbolMetadata(sign) {
213
+ const rawSign = typeof sign === "string" && sign.startsWith(`${"westernZodiacSign" /* WESTERN_ZODIAC_SIGN */}:`) ? chunkS6KNERP7_js.parseId(sign) : typeof sign === "string" ? sign : chunkS6KNERP7_js.parseId(sign);
214
+ const metadata = symbolRegistry.byKey.get(normalizeLookupKey(rawSign));
215
+ return metadata?.kind === "sign" ? metadata : void 0;
216
+ }
217
+ function listPlanetSymbolMetadata() {
218
+ return symbolRegistry.planets;
219
+ }
220
+ function listZodiacSignSymbolMetadata() {
221
+ return symbolRegistry.signs;
222
+ }
223
+ function listAngleSymbolMetadata() {
224
+ return symbolRegistry.angles;
225
+ }
226
+ function listNodeSymbolMetadata() {
227
+ return symbolRegistry.nodes;
228
+ }
229
+ function getPlanetSymbolMetadata(lookup) {
230
+ return lookupPlanetSymbolMetadata(lookup);
231
+ }
232
+ function getZodiacSignSymbolMetadata(lookup) {
233
+ return lookupSignSymbolMetadata(lookup);
234
+ }
235
+ function getAngleSymbolMetadata(lookup) {
236
+ const rawLookup = lookup.startsWith(`${"house" /* HOUSE */}:`) ? chunkS6KNERP7_js.parseId(lookup) : lookup;
237
+ const metadata = symbolRegistry.byKey.get(normalizeLookupKey(rawLookup));
238
+ return metadata?.kind === "angle" ? metadata : void 0;
239
+ }
240
+ function getNodeSymbolMetadata(lookup) {
241
+ const metadata = symbolRegistry.byKey.get(normalizeLookupKey(lookup));
242
+ return metadata?.kind === "node" ? metadata : void 0;
243
+ }
244
+ function normalizeChartInput(input) {
245
+ const planets = Array.isArray(input.planets) ? [...input.planets] : Object.values(input.planets);
246
+ const nodes = input.nodes ? Array.isArray(input.nodes) ? [...input.nodes] : Object.values(input.nodes) : [];
247
+ return {
248
+ planets,
249
+ nodes,
250
+ houses: input.houses,
251
+ aspects: input.aspects
252
+ };
253
+ }
254
+ function getAstrologySourceType(name) {
255
+ return getNodeSymbolMetadata(name) ? "node" : "planet";
256
+ }
257
+ function getAstrologySourceGlyph(sourceType, sourceName) {
258
+ if (sourceType === "angle") {
259
+ return getAngleSymbolMetadata(sourceName)?.glyph ?? sourceName;
260
+ }
261
+ if (sourceType === "node") {
262
+ return getNodeSymbolMetadata(sourceName)?.glyph ?? sourceName.slice(0, 1).toUpperCase();
263
+ }
264
+ return lookupPlanetSymbolMetadata(sourceName)?.glyph ?? sourceName.slice(0, 1).toUpperCase();
265
+ }
266
+ function getHouseNodeByNumber(houseNumber) {
267
+ return canonicalTree.getCorrespondences(chunkS6KNERP7_js.id("number" /* NUMBER */, houseNumber), {
268
+ type: "house" /* HOUSE */,
269
+ depth: 1,
270
+ limit: 1
271
+ })[0]?.node;
272
+ }
273
+ function buildSignTargets(sign) {
274
+ const signId = chunkS6KNERP7_js.id("westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, sign);
275
+ const result = [];
276
+ for (const match of canonicalTree.getCorrespondences(signId, {
277
+ type: ["sphere" /* SPHERE */, "path" /* PATH */, "westernElement" /* WESTERN_ELEMENT */],
278
+ depth: 1
279
+ })) {
280
+ if (match.node.type === "sphere" /* SPHERE */) {
281
+ result.push({
282
+ targetId: match.node.id,
283
+ targetType: "sphere",
284
+ targetName: getTargetName(match.node.id),
285
+ mapping: "sign-sphere",
286
+ distance: match.distance,
287
+ sign
288
+ });
289
+ continue;
290
+ }
291
+ if (match.node.type === "path" /* PATH */) {
292
+ result.push({
293
+ targetId: match.node.id,
294
+ targetType: "path",
295
+ targetName: getTargetName(match.node.id),
296
+ mapping: "sign-path",
297
+ distance: match.distance,
298
+ sign
299
+ });
300
+ continue;
301
+ }
302
+ const element = chunkS6KNERP7_js.parseId(match.node.id);
303
+ for (const elementPath of canonicalTree.getCorrespondences(match.node.id, {
304
+ type: "path" /* PATH */,
305
+ depth: 1
306
+ })) {
307
+ result.push({
308
+ targetId: elementPath.node.id,
309
+ targetType: "path",
310
+ targetName: getTargetName(elementPath.node.id),
311
+ mapping: "element-path",
312
+ distance: elementPath.distance + match.distance,
313
+ sign,
314
+ element
315
+ });
316
+ }
317
+ for (const elementSphere of canonicalTree.getCorrespondences(match.node.id, {
318
+ type: "sphere" /* SPHERE */,
319
+ depth: 1
320
+ })) {
321
+ result.push({
322
+ targetId: elementSphere.node.id,
323
+ targetType: "sphere",
324
+ targetName: getTargetName(elementSphere.node.id),
325
+ mapping: "element-sphere",
326
+ distance: elementSphere.distance + match.distance,
327
+ sign,
328
+ element
329
+ });
330
+ }
331
+ }
332
+ return dedupeTargets(result);
333
+ }
334
+ function dedupeTargets(targets) {
335
+ const seen = /* @__PURE__ */ new Set();
336
+ return targets.filter((target) => {
337
+ const key = [
338
+ target.targetId,
339
+ target.mapping,
340
+ target.sign ?? "",
341
+ target.element ?? "",
342
+ target.planet ?? ""
343
+ ].join("|");
344
+ if (seen.has(key)) {
345
+ return false;
346
+ }
347
+ seen.add(key);
348
+ return true;
349
+ });
350
+ }
351
+ function createCorrespondenceSource(lookup, sign, element) {
352
+ if (lookup.kind === "sign") {
353
+ const symbol = lookupSignSymbolMetadata(sign ?? lookup.sign);
354
+ return {
355
+ kind: "sign",
356
+ key: symbol.key,
357
+ label: symbol.label,
358
+ shortLabel: symbol.shortLabel,
359
+ glyph: symbol.glyph,
360
+ ...sign ? { sign } : {},
361
+ ...element ? { element } : {}
362
+ };
363
+ }
364
+ if (lookup.kind === "planet") {
365
+ const symbol = lookupPlanetSymbolMetadata(lookup.planet);
366
+ const label = normalizePlanetName(lookup.planet);
367
+ return {
368
+ kind: "planet",
369
+ key: normalizeLookupKey(label),
370
+ label,
371
+ shortLabel: symbol?.shortLabel ?? label,
372
+ glyph: symbol?.glyph ?? label.slice(0, 1).toUpperCase(),
373
+ ...sign ? { sign } : {},
374
+ ...element ? { element } : {},
375
+ planet: label
376
+ };
377
+ }
378
+ if (lookup.kind === "angle") {
379
+ const symbol = getAngleSymbolMetadata(lookup.angle);
380
+ const label = symbol?.label ?? lookup.angle;
381
+ return {
382
+ kind: "angle",
383
+ key: normalizeLookupKey(label),
384
+ label,
385
+ shortLabel: symbol?.shortLabel ?? label,
386
+ glyph: symbol?.glyph ?? label,
387
+ ...sign ? { sign } : {},
388
+ ...element ? { element } : {}
389
+ };
390
+ }
391
+ if (lookup.kind === "node") {
392
+ const symbol = getNodeSymbolMetadata(lookup.node);
393
+ const label = symbol?.label ?? lookup.node;
394
+ return {
395
+ kind: "node",
396
+ key: normalizeLookupKey(label),
397
+ label,
398
+ shortLabel: symbol?.shortLabel ?? label,
399
+ glyph: symbol?.glyph ?? label.slice(0, 1).toUpperCase(),
400
+ ...sign ? { sign } : {},
401
+ ...element ? { element } : {}
402
+ };
403
+ }
404
+ if (lookup.kind === "number") {
405
+ const label = String(lookup.number);
406
+ return {
407
+ kind: "number",
408
+ key: label,
409
+ label,
410
+ shortLabel: label,
411
+ glyph: label,
412
+ number: lookup.number
413
+ };
414
+ }
415
+ const letterNode = canonicalTree.getNode(lookup.hebrewLetterId);
416
+ const letterLabel = letterNode?.name ?? chunkS6KNERP7_js.parseId(lookup.hebrewLetterId);
417
+ const glyph = letterNode?.data?.character ?? letterLabel;
418
+ return {
419
+ kind: "hebrewLetter",
420
+ key: normalizeLookupKey(lookup.hebrewLetterId),
421
+ label: letterLabel,
422
+ shortLabel: letterLabel,
423
+ glyph,
424
+ hebrewLetterId: lookup.hebrewLetterId
425
+ };
426
+ }
427
+ function getKaabalisticCorrespondenceTargets(lookup) {
428
+ if (lookup.kind === "number") {
429
+ const source = createCorrespondenceSource(lookup);
430
+ const numberId = chunkS6KNERP7_js.id("number" /* NUMBER */, lookup.number);
431
+ const targets = [
432
+ ...canonicalTree.getCorrespondences(numberId, { type: "sphere" /* SPHERE */, depth: 1 }).map((match) => ({
433
+ targetId: match.node.id,
434
+ targetType: "sphere",
435
+ targetName: getTargetName(match.node.id),
436
+ mapping: "number-sphere",
437
+ distance: match.distance
438
+ })),
439
+ ...canonicalTree.getCorrespondences(numberId, { type: "path" /* PATH */, depth: 1 }).map((match) => ({
440
+ targetId: match.node.id,
441
+ targetType: "path",
442
+ targetName: getTargetName(match.node.id),
443
+ mapping: "number-path",
444
+ distance: match.distance
445
+ }))
446
+ ];
447
+ return {
448
+ source,
449
+ targets
450
+ };
451
+ }
452
+ if (lookup.kind === "hebrewLetter") {
453
+ const source = createCorrespondenceSource(lookup);
454
+ const targets = canonicalTree.getCorrespondences(lookup.hebrewLetterId, {
455
+ type: "path" /* PATH */,
456
+ depth: 1
457
+ }).map((match) => ({
458
+ targetId: match.node.id,
459
+ targetType: "path",
460
+ targetName: getTargetName(match.node.id),
461
+ mapping: "letter-path",
462
+ distance: match.distance
463
+ }));
464
+ return {
465
+ source,
466
+ targets
467
+ };
468
+ }
469
+ const sign = normalizeSignName(lookup.sign);
470
+ if (!sign) {
471
+ return void 0;
472
+ }
473
+ const signTargets = buildSignTargets(sign);
474
+ const element = signTargets.find((target) => target.element)?.element;
475
+ if (lookup.kind === "sign") {
476
+ return {
477
+ source: createCorrespondenceSource(lookup, sign, element),
478
+ targets: signTargets
479
+ };
480
+ }
481
+ if (lookup.kind === "planet") {
482
+ const planet = normalizePlanetName(lookup.planet);
483
+ const planetKey = normalizeLookupKey(planet);
484
+ const planetPathTargets = (classicalPlanetPathIdsByKey.get(planetKey) ?? []).map((pathId) => ({
485
+ targetId: pathId,
486
+ targetType: "path",
487
+ targetName: getTargetName(pathId),
488
+ mapping: "planet-sign-path",
489
+ distance: 1,
490
+ sign,
491
+ planet
492
+ }));
493
+ return {
494
+ source: createCorrespondenceSource(lookup, sign, element),
495
+ targets: dedupeTargets([...signTargets, ...planetPathTargets])
496
+ };
497
+ }
498
+ return {
499
+ source: createCorrespondenceSource(lookup, sign, element),
500
+ targets: signTargets
501
+ };
502
+ }
503
+ function toAstrologyMarkers(result, source) {
504
+ const sourceGlyph = getAstrologySourceGlyph(source.sourceType, source.sourceName);
505
+ const signGlyph = result.source.sign ? lookupSignSymbolMetadata(result.source.sign)?.glyph ?? sourceGlyph : sourceGlyph;
506
+ return result.targets.map((target) => ({
507
+ kind: "astrology",
508
+ targetId: target.targetId,
509
+ targetType: target.targetType,
510
+ sourceType: source.sourceType,
511
+ sourceName: source.sourceName,
512
+ mapping: target.mapping,
513
+ label: target.mapping === "planet-sign-path" ? signGlyph : sourceGlyph,
514
+ ...target.sign ? { sign: target.sign } : {},
515
+ ...target.element ? { element: target.element } : {},
516
+ ...target.planet ? { planet: target.planet } : {}
517
+ }));
518
+ }
519
+ function dedupeMarkers(markers) {
520
+ const seen = /* @__PURE__ */ new Set();
521
+ return markers.filter((marker) => {
522
+ const key = [
523
+ marker.kind,
524
+ marker.targetId,
525
+ marker.sourceType,
526
+ marker.sourceName,
527
+ marker.mapping,
528
+ marker.label,
529
+ marker.sign ?? "",
530
+ marker.element ?? "",
531
+ marker.planet ?? ""
532
+ ].join("|");
533
+ if (seen.has(key)) {
534
+ return false;
535
+ }
536
+ seen.add(key);
537
+ return true;
538
+ });
539
+ }
540
+ function getAstrologyTreeMarkers(input) {
541
+ const chart = normalizeChartInput(input);
542
+ const markers = [];
543
+ for (const planet of chart.planets) {
544
+ const normalizedName = normalizeLookupKey(planet.name);
545
+ if (defaultExcludedAstrologyPoints.has(normalizedName)) {
546
+ continue;
547
+ }
548
+ const sourceType = getAstrologySourceType(planet.name);
549
+ const correspondences = getKaabalisticCorrespondenceTargets({
550
+ kind: sourceType,
551
+ [sourceType]: planet.name,
552
+ sign: planet.zodiacPosition.sign
553
+ });
554
+ if (!correspondences) {
555
+ continue;
556
+ }
557
+ markers.push(
558
+ ...toAstrologyMarkers(correspondences, {
559
+ sourceType,
560
+ sourceName: correspondences.source.label
561
+ })
562
+ );
563
+ }
564
+ for (const node of chart.nodes) {
565
+ const correspondences = getKaabalisticCorrespondenceTargets({
566
+ kind: "node",
567
+ node: node.name,
568
+ sign: node.sign
569
+ });
570
+ if (!correspondences) {
571
+ continue;
572
+ }
573
+ markers.push(
574
+ ...toAstrologyMarkers(correspondences, {
575
+ sourceType: "node",
576
+ sourceName: correspondences.source.label
577
+ })
578
+ );
579
+ }
580
+ const angleTargets = [
581
+ { angle: "ASC", position: chart.houses.ascendant },
582
+ { angle: "MC", position: chart.houses.mc },
583
+ { angle: "Vertex", position: chart.houses.ascmc?.vertex }
584
+ ];
585
+ for (const angle of angleTargets) {
586
+ if (!angle.position?.sign) {
587
+ continue;
588
+ }
589
+ const correspondences = getKaabalisticCorrespondenceTargets({
590
+ kind: "angle",
591
+ angle: angle.angle,
592
+ sign: angle.position.sign
593
+ });
594
+ if (!correspondences) {
595
+ continue;
596
+ }
597
+ markers.push(
598
+ ...toAstrologyMarkers(correspondences, {
599
+ sourceType: "angle",
600
+ sourceName: correspondences.source.label
601
+ })
602
+ );
603
+ }
604
+ return dedupeMarkers(markers);
605
+ }
606
+ function resolveNumerologyInput(input) {
607
+ const birthDate = input instanceof Date ? input : input.birthDate;
608
+ const kaabalisticLifePath = input instanceof Date ? chunkPAKYKIZH_js.calculateKaabalisticLifePath(birthDate) : input.kaabalisticLifePath ?? chunkPAKYKIZH_js.calculateKaabalisticLifePath(birthDate);
609
+ const straightAcrossReductionLifePath = input instanceof Date ? chunkPAKYKIZH_js.calculateStraightAcrossReductionLifePath(birthDate) : input.straightAcrossReductionLifePath ?? chunkPAKYKIZH_js.calculateStraightAcrossReductionLifePath(birthDate);
610
+ return {
611
+ birthDate,
612
+ kaabalisticLifePath,
613
+ straightAcrossReductionLifePath
614
+ };
615
+ }
616
+ function buildNumberMarkers(sourceName, numbers, kind) {
617
+ const markers = [];
618
+ for (const number of numbers) {
619
+ const correspondences = getKaabalisticCorrespondenceTargets({
620
+ kind: "number",
621
+ number});
622
+ if (!correspondences) {
623
+ continue;
624
+ }
625
+ for (const target of correspondences.targets) {
626
+ markers.push({
627
+ kind,
628
+ targetId: target.targetId,
629
+ targetType: target.targetType,
630
+ sourceType: "number",
631
+ sourceName,
632
+ mapping: target.mapping,
633
+ label: String(number)
634
+ });
635
+ }
636
+ }
637
+ return markers;
638
+ }
639
+ function getNumerologyTreeMarkers(input) {
640
+ const { kaabalisticLifePath, straightAcrossReductionLifePath } = resolveNumerologyInput(input);
641
+ const markers = [];
642
+ const sources = [
643
+ {
644
+ sourceName: "Day Energy",
645
+ numbers: straightAcrossReductionLifePath.dayEnergy.reductionSteps
646
+ },
647
+ {
648
+ sourceName: "Month Energy",
649
+ numbers: straightAcrossReductionLifePath.monthEnergy.reductionSteps
650
+ },
651
+ {
652
+ sourceName: "Year Energy",
653
+ numbers: straightAcrossReductionLifePath.yearEnergy.reductionSteps
654
+ },
655
+ {
656
+ sourceName: `Life Path (Kaabalistic) ${kaabalisticLifePath.lifePath.reducedValue}`,
657
+ numbers: kaabalisticLifePath.lifePath.reductionSteps
658
+ },
659
+ {
660
+ sourceName: `Life Path (Straight) ${straightAcrossReductionLifePath.lifePath.reducedValue}`,
661
+ numbers: straightAcrossReductionLifePath.lifePath.reductionSteps
662
+ }
663
+ ];
664
+ for (const source of sources) {
665
+ markers.push(...buildNumberMarkers(source.sourceName, source.numbers, "numerology"));
666
+ }
667
+ return markers;
668
+ }
669
+ function resolveGematriaInput(input) {
670
+ if (typeof input === "string") {
671
+ return chunkCOPYH3O2_js.calculateGematria(input);
672
+ }
673
+ if (input.result) {
674
+ return input.result;
675
+ }
676
+ if (input.phrase) {
677
+ return chunkCOPYH3O2_js.calculateGematria(input.phrase);
678
+ }
679
+ return void 0;
680
+ }
681
+ function getGematriaTreeMarkers(input) {
682
+ const result = resolveGematriaInput(input);
683
+ if (!result) {
684
+ return [];
685
+ }
686
+ const markers = [];
687
+ const numericSources = [
688
+ { sourceName: "Vowels", numbers: result.vowels.reductionSteps },
689
+ { sourceName: "Consonants", numbers: result.consonants.reductionSteps },
690
+ { sourceName: "Synthesis", numbers: result.synthesis.reductionSteps }
691
+ ];
692
+ for (const source of numericSources) {
693
+ markers.push(...buildNumberMarkers(source.sourceName, source.numbers, "gematria"));
694
+ }
695
+ for (const letter of result.includedLetters) {
696
+ const correspondences = getKaabalisticCorrespondenceTargets({
697
+ kind: "hebrewLetter",
698
+ hebrewLetterId: letter.hebrewLetterId});
699
+ if (!correspondences) {
700
+ continue;
701
+ }
702
+ for (const target of correspondences.targets) {
703
+ markers.push({
704
+ kind: "gematria",
705
+ targetId: target.targetId,
706
+ targetType: target.targetType,
707
+ sourceType: "letter",
708
+ sourceName: "Included Letters",
709
+ mapping: target.mapping,
710
+ label: letter.hebrewCharacter
711
+ });
712
+ }
713
+ }
714
+ return markers;
715
+ }
716
+ function incrementCounts(countsById, targetId, bucket) {
717
+ const current = countsById[targetId] ?? {
718
+ astro: 0,
719
+ numerology: 0,
720
+ gematria: 0,
721
+ total: 0
722
+ };
723
+ current[bucket] += 1;
724
+ current.total += 1;
725
+ countsById[targetId] = current;
726
+ }
727
+ function groupMarkersByTarget(markers, targetType) {
728
+ const grouped = {};
729
+ for (const marker of markers) {
730
+ if (marker.targetType !== targetType) {
731
+ continue;
732
+ }
733
+ const bucket = grouped[marker.targetId] ?? [];
734
+ bucket.push(marker);
735
+ grouped[marker.targetId] = bucket;
736
+ }
737
+ return grouped;
738
+ }
739
+ function buildAstrologySummary(input, markers, countsById) {
740
+ const chart = normalizeChartInput(input);
741
+ const itemConnections = [];
742
+ for (const marker of markers) {
743
+ incrementCounts(countsById, marker.targetId, "astro");
744
+ }
745
+ const groupedBySource = groupByKey(
746
+ markers,
747
+ (marker) => `${marker.sourceType}|${marker.sourceName}|${marker.sign ?? ""}`
748
+ );
749
+ for (const sourceMarkers of Object.values(groupedBySource)) {
750
+ if (!sourceMarkers.length) {
751
+ continue;
752
+ }
753
+ const firstMarker = sourceMarkers[0];
754
+ const itemLabel = firstMarker.sign ? `${firstMarker.sourceName} in ${firstMarker.sign}` : firstMarker.sourceName;
755
+ itemConnections.push({
756
+ itemLabel,
757
+ targets: toSummaryTargets(getTargetCountMap(sourceMarkers.map((marker) => ({
758
+ targetId: marker.targetId,
759
+ targetType: marker.targetType,
760
+ targetName: getTargetName(marker.targetId),
761
+ mapping: marker.mapping,
762
+ distance: 1
763
+ }))))
764
+ });
765
+ }
766
+ const planetsByName = Object.fromEntries(
767
+ chart.planets.filter((planet) => !defaultExcludedAstrologyPoints.has(normalizeLookupKey(planet.name))).map((planet) => [normalizeLookupKey(planet.name), { longitude: planet.longitude }])
768
+ );
769
+ const aspects = chart.aspects ?? chunk6O7MTBZN_js.computeAspects(planetsByName, chunk6O7MTBZN_js.DEFAULT_ASPECT_SPECS);
770
+ const aspectsByType = {};
771
+ for (const aspect of aspects) {
772
+ const aspectId = chunkS6KNERP7_js.id(
773
+ "aspect" /* ASPECT */,
774
+ chunkS6KNERP7_js.WESTERN_ASPECTS[aspect.aspect.toUpperCase()] ?? aspect.aspect
775
+ );
776
+ const sphere = canonicalTree.getCorrespondences(aspectId, {
777
+ type: "sphere" /* SPHERE */,
778
+ depth: 1,
779
+ limit: 1
780
+ })[0]?.node;
781
+ if (!sphere) {
782
+ continue;
783
+ }
784
+ incrementCounts(countsById, sphere.id, "astro");
785
+ const bucket = aspectsByType[aspect.aspect] ?? {};
786
+ bucket[sphere.id] = (bucket[sphere.id] ?? 0) + 1;
787
+ aspectsByType[aspect.aspect] = bucket;
788
+ }
789
+ for (const [aspectName, reduceMap] of Object.entries(aspectsByType)) {
790
+ itemConnections.push({
791
+ itemLabel: `Aspects \u2014 ${capitalizeWords(aspectName)}`,
792
+ targets: toSummaryTargets(reduceMap)
793
+ });
794
+ }
795
+ for (const planet of chart.planets) {
796
+ if (defaultExcludedAstrologyPoints.has(normalizeLookupKey(planet.name))) {
797
+ continue;
798
+ }
799
+ const house = getHouseNodeByNumber(planet.zodiacPosition.house);
800
+ if (!house) {
801
+ continue;
802
+ }
803
+ const sign = canonicalTree.getCorrespondences(house.id, {
804
+ type: "westernZodiacSign" /* WESTERN_ZODIAC_SIGN */,
805
+ depth: 1,
806
+ limit: 1
807
+ })[0]?.node;
808
+ if (!sign) {
809
+ continue;
810
+ }
811
+ const spheres = canonicalTree.getCorrespondences(sign.id, {
812
+ type: "sphere" /* SPHERE */,
813
+ depth: 1
814
+ });
815
+ if (!spheres.length) {
816
+ continue;
817
+ }
818
+ const reduceMap = {};
819
+ for (const sphere of spheres) {
820
+ const sphereId = sphere.node.id;
821
+ incrementCounts(countsById, sphereId, "astro");
822
+ reduceMap[sphereId] = (reduceMap[sphereId] ?? 0) + 1;
823
+ }
824
+ itemConnections.push({
825
+ itemLabel: `${planet.name} \u2022 House ${planet.zodiacPosition.house}`,
826
+ targets: toSummaryTargets(reduceMap)
827
+ });
828
+ }
829
+ return itemConnections;
830
+ }
831
+ function buildSourceSummary(markers, bucket, countsById) {
832
+ const groupedBySource = groupByKey(
833
+ markers,
834
+ (marker) => `${marker.sourceType}|${marker.sourceName}`
835
+ );
836
+ const connections = [];
837
+ for (const sourceMarkers of Object.values(groupedBySource)) {
838
+ if (!sourceMarkers.length) {
839
+ continue;
840
+ }
841
+ for (const marker of sourceMarkers) {
842
+ incrementCounts(countsById, marker.targetId, bucket);
843
+ }
844
+ connections.push({
845
+ itemLabel: sourceMarkers[0].sourceName,
846
+ targets: toSummaryTargets(getTargetCountMap(sourceMarkers.map((marker) => ({
847
+ targetId: marker.targetId,
848
+ targetType: marker.targetType,
849
+ targetName: getTargetName(marker.targetId),
850
+ mapping: marker.mapping,
851
+ distance: 1
852
+ }))))
853
+ });
854
+ }
855
+ return connections;
856
+ }
857
+ function capitalizeWords(value) {
858
+ return value.split(/\s+/).filter(Boolean).map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(" ");
859
+ }
860
+ function buildKaabalisticMapData(input) {
861
+ const countsById = {};
862
+ const allMarkers = [];
863
+ const astrologyMarkers = input.astrology ? getAstrologyTreeMarkers(input.astrology) : [];
864
+ const numerologyMarkers = input.numerology ? getNumerologyTreeMarkers(input.numerology) : [];
865
+ const gematriaMarkers = input.gematria ? getGematriaTreeMarkers(input.gematria) : [];
866
+ allMarkers.push(...astrologyMarkers, ...numerologyMarkers, ...gematriaMarkers);
867
+ const itemConnections = {
868
+ astrology: input.astrology ? buildAstrologySummary(input.astrology, astrologyMarkers, countsById) : [],
869
+ numerology: numerologyMarkers.length ? buildSourceSummary(numerologyMarkers, "numerology", countsById) : [],
870
+ gematria: gematriaMarkers.length ? buildSourceSummary(gematriaMarkers, "gematria", countsById) : []
871
+ };
872
+ const sphereMarkers = groupMarkersByTarget(allMarkers, "sphere");
873
+ const pathMarkers = groupMarkersByTarget(allMarkers, "path");
874
+ return {
875
+ spheres: orderedSpheres,
876
+ paths: orderedPaths,
877
+ markers: allMarkers,
878
+ sphereMarkers,
879
+ pathMarkers,
880
+ countsById,
881
+ itemConnections
882
+ };
883
+ }
884
+
885
+ // src/semantic/index.ts
886
+ var OCCULT_THEME_STOPWORDS = [
887
+ "the",
888
+ "and",
889
+ "for",
890
+ "with",
891
+ "that",
892
+ "this",
893
+ "was",
894
+ "were",
895
+ "been",
896
+ "have",
897
+ "has",
898
+ "had",
899
+ "just",
900
+ "from",
901
+ "into",
902
+ "about",
903
+ "over",
904
+ "under",
905
+ "very",
906
+ "more",
907
+ "less",
908
+ "then",
909
+ "than",
910
+ "when",
911
+ "what",
912
+ "where",
913
+ "which",
914
+ "while",
915
+ "would",
916
+ "could",
917
+ "should",
918
+ "again",
919
+ "still",
920
+ "really",
921
+ "gotta",
922
+ "lota",
923
+ "lotta",
924
+ "para",
925
+ "com",
926
+ "sem",
927
+ "por",
928
+ "uma",
929
+ "um",
930
+ "uns",
931
+ "das",
932
+ "dos",
933
+ "del",
934
+ "que",
935
+ "n\xE3o",
936
+ "nao",
937
+ "isso",
938
+ "essa",
939
+ "este",
940
+ "esta",
941
+ "como",
942
+ "mais",
943
+ "menos",
944
+ "muito",
945
+ "muita",
946
+ "their",
947
+ "your",
948
+ "mine",
949
+ "ours",
950
+ "onto",
951
+ "sobre",
952
+ "entre",
953
+ "depois",
954
+ "antes"
955
+ ];
956
+ var canonicalTree2 = chunkOKZUVGA3_js.getCanonicalTree({
957
+ system: "kaabalah",
958
+ parts: ["westernAstrology", "tarot"]
959
+ });
960
+ var HOUSE_LABELS_BY_NUMBER = [
961
+ chunkS6KNERP7_js.WESTERN_HOUSES.ASCENDANT,
962
+ chunkS6KNERP7_js.WESTERN_HOUSES.SECOND_HOUSE,
963
+ chunkS6KNERP7_js.WESTERN_HOUSES.THIRD_HOUSE,
964
+ chunkS6KNERP7_js.WESTERN_HOUSES.IMUM_COELI,
965
+ chunkS6KNERP7_js.WESTERN_HOUSES.FIFTH_HOUSE,
966
+ chunkS6KNERP7_js.WESTERN_HOUSES.SIXTH_HOUSE,
967
+ chunkS6KNERP7_js.WESTERN_HOUSES.DESCENDANT,
968
+ chunkS6KNERP7_js.WESTERN_HOUSES.EIGHTH_HOUSE,
969
+ chunkS6KNERP7_js.WESTERN_HOUSES.NINTH_HOUSE,
970
+ chunkS6KNERP7_js.WESTERN_HOUSES.MEDIUM_COELI,
971
+ chunkS6KNERP7_js.WESTERN_HOUSES.ELEVENTH_HOUSE,
972
+ chunkS6KNERP7_js.WESTERN_HOUSES.TWELFTH_HOUSE
973
+ ];
974
+ var HOUSE_THEME_SEEDS = {
975
+ 1: {
976
+ primaryLabel: "Images",
977
+ scope: "personal",
978
+ aliases: [
979
+ "First House",
980
+ "House 1",
981
+ "Casa 1",
982
+ "Imagens",
983
+ "Como me vejo e como outros me veem",
984
+ "Self-image"
985
+ ],
986
+ keywords: [
987
+ "images",
988
+ "imagens",
989
+ "identity",
990
+ "self-image",
991
+ "appearance",
992
+ "body",
993
+ "personality",
994
+ "first impression",
995
+ "persona",
996
+ "character",
997
+ "personagem",
998
+ "how I see myself",
999
+ "how others see me"
1000
+ ]
1001
+ },
1002
+ 2: {
1003
+ primaryLabel: "Money",
1004
+ scope: "personal",
1005
+ aliases: ["Second House", "House 2", "Casa 2", "Dinheiro", "Resources"],
1006
+ keywords: [
1007
+ "money",
1008
+ "dinheiro",
1009
+ "resources",
1010
+ "income",
1011
+ "finances",
1012
+ "possessions",
1013
+ "values",
1014
+ "material values",
1015
+ "self-worth"
1016
+ ]
1017
+ },
1018
+ 3: {
1019
+ primaryLabel: "Communication",
1020
+ scope: "personal",
1021
+ aliases: ["Third House", "House 3", "Casa 3", "Comunica\xE7\xE3o", "Comunica\xE7\xF5es"],
1022
+ keywords: [
1023
+ "communication",
1024
+ "comunica\xE7\xE3o",
1025
+ "comunica\xE7\xF5es",
1026
+ "siblings",
1027
+ "writing",
1028
+ "language",
1029
+ "study",
1030
+ "neighborhood",
1031
+ "short trips",
1032
+ "early education",
1033
+ "mind"
1034
+ ]
1035
+ },
1036
+ 4: {
1037
+ primaryLabel: "Family",
1038
+ scope: "personal",
1039
+ aliases: [
1040
+ "Fourth House",
1041
+ "House 4",
1042
+ "Casa 4",
1043
+ "IC",
1044
+ "Home Angle",
1045
+ "Fam\xEDlia",
1046
+ "Fam\xEDlias",
1047
+ "Family (not only blood)",
1048
+ "Familia (n\xE3o s\xF3 de sangue)"
1049
+ ],
1050
+ keywords: [
1051
+ "family",
1052
+ "familia",
1053
+ "families",
1054
+ "fam\xEDlias",
1055
+ "home",
1056
+ "roots",
1057
+ "belonging",
1058
+ "kinship",
1059
+ "chosen family",
1060
+ "vida \xEDntima",
1061
+ "inner foundation",
1062
+ "private life"
1063
+ ]
1064
+ },
1065
+ 5: {
1066
+ primaryLabel: "Hobbies",
1067
+ scope: "personal",
1068
+ aliases: ["Fifth House", "House 5", "Casa 5", "Hobbies", "Lazer", "Pleasures"],
1069
+ keywords: [
1070
+ "hobbies",
1071
+ "hobby",
1072
+ "lazer",
1073
+ "pleasure",
1074
+ "fun",
1075
+ "games",
1076
+ "creative leisure",
1077
+ "creativity",
1078
+ "children",
1079
+ "romance",
1080
+ "speculation"
1081
+ ]
1082
+ },
1083
+ 6: {
1084
+ primaryLabel: "Health",
1085
+ scope: "personal",
1086
+ aliases: ["Sixth House", "House 6", "Casa 6", "Sa\xFAde", "Health"],
1087
+ keywords: [
1088
+ "health",
1089
+ "sa\xFAde",
1090
+ "routine",
1091
+ "service",
1092
+ "care",
1093
+ "wellbeing",
1094
+ "body maintenance",
1095
+ "daily work",
1096
+ "pets"
1097
+ ]
1098
+ },
1099
+ 7: {
1100
+ primaryLabel: "Associations",
1101
+ scope: "transition",
1102
+ aliases: [
1103
+ "Seventh House",
1104
+ "House 7",
1105
+ "Casa 7",
1106
+ "Associa\xE7\xF5es",
1107
+ "Partnerships",
1108
+ "Associations"
1109
+ ],
1110
+ keywords: [
1111
+ "associations",
1112
+ "associa\xE7\xF5es",
1113
+ "partnerships",
1114
+ "partners",
1115
+ "alliances",
1116
+ "cooperation",
1117
+ "the other",
1118
+ "relationships",
1119
+ "marriage",
1120
+ "contracts",
1121
+ "open enemies"
1122
+ ]
1123
+ },
1124
+ 8: {
1125
+ primaryLabel: "Sex and Initiations",
1126
+ scope: "transpersonal",
1127
+ aliases: [
1128
+ "Eighth House",
1129
+ "House 8",
1130
+ "Casa 8",
1131
+ "Sexo",
1132
+ "Inicia\xE7\xF5es",
1133
+ "Sexo / Inicia\xE7\xF5es"
1134
+ ],
1135
+ keywords: [
1136
+ "sex",
1137
+ "sexo",
1138
+ "initiations",
1139
+ "inicia\xE7\xF5es",
1140
+ "transformation",
1141
+ "transmutations",
1142
+ "taboo",
1143
+ "death",
1144
+ "shared resources",
1145
+ "sexuality",
1146
+ "occult",
1147
+ "death rebirth"
1148
+ ]
1149
+ },
1150
+ 9: {
1151
+ primaryLabel: "Travel and Knowledge",
1152
+ scope: "transpersonal",
1153
+ aliases: [
1154
+ "Ninth House",
1155
+ "House 9",
1156
+ "Casa 9",
1157
+ "Viagens",
1158
+ "Travel",
1159
+ "Travel, Religion, Philosophy, Knowledge"
1160
+ ],
1161
+ keywords: [
1162
+ "travel",
1163
+ "viagens",
1164
+ "religion",
1165
+ "religi\xE3o",
1166
+ "philosophy",
1167
+ "filosofia",
1168
+ "knowledge",
1169
+ "conhecimento",
1170
+ "higher studies",
1171
+ "higher education",
1172
+ "publishing",
1173
+ "law"
1174
+ ]
1175
+ },
1176
+ 10: {
1177
+ primaryLabel: "Career and Work",
1178
+ scope: "transpersonal",
1179
+ aliases: [
1180
+ "Tenth House",
1181
+ "House 10",
1182
+ "Casa 10",
1183
+ "Midheaven",
1184
+ "MC",
1185
+ "Carreira",
1186
+ "Trabalho"
1187
+ ],
1188
+ keywords: [
1189
+ "career",
1190
+ "carreira",
1191
+ "work",
1192
+ "trabalho",
1193
+ "profession",
1194
+ "reputation",
1195
+ "vocation",
1196
+ "public life",
1197
+ "public image",
1198
+ "ambition",
1199
+ "authority",
1200
+ "legacy"
1201
+ ]
1202
+ },
1203
+ 11: {
1204
+ primaryLabel: "Friends",
1205
+ scope: "transpersonal",
1206
+ aliases: ["Eleventh House", "House 11", "Casa 11", "Friends", "Amigos", "Rela\xE7\xF5es"],
1207
+ keywords: [
1208
+ "friends",
1209
+ "amigos",
1210
+ "friendships",
1211
+ "relations",
1212
+ "network",
1213
+ "community",
1214
+ "groups",
1215
+ "projects",
1216
+ "ideals",
1217
+ "hopes",
1218
+ "humanitarian goals"
1219
+ ]
1220
+ },
1221
+ 12: {
1222
+ primaryLabel: "Past Lives",
1223
+ scope: "transpersonal",
1224
+ aliases: [
1225
+ "Twelfth House",
1226
+ "House 12",
1227
+ "Casa 12",
1228
+ "Vida passada",
1229
+ "Vidas passadas",
1230
+ "Past life",
1231
+ "Past lives",
1232
+ "Oculto"
1233
+ ],
1234
+ keywords: [
1235
+ "past life",
1236
+ "past lives",
1237
+ "vida passada",
1238
+ "vidas passadas",
1239
+ "karma",
1240
+ "occult",
1241
+ "hidden",
1242
+ "unconscious",
1243
+ "spiritual memory",
1244
+ "isolation",
1245
+ "spirituality",
1246
+ "hidden enemies",
1247
+ "self undoing"
1248
+ ]
1249
+ }
1250
+ };
1251
+ var TAROT_SUIT_ALIASES = {
1252
+ wands: ["Rods", "Staves", "Paus"],
1253
+ cups: ["Chalices", "Copas"],
1254
+ swords: ["Blades", "Espadas"],
1255
+ pentacles: ["Coins", "Disks", "Discs", "Ouros"]
1256
+ };
1257
+ var TAROT_SUIT_THEME_KEYWORDS = {
1258
+ wands: [
1259
+ "paus",
1260
+ "fire",
1261
+ "will",
1262
+ "inspiration",
1263
+ "creation",
1264
+ "force",
1265
+ "vigor",
1266
+ "initiative",
1267
+ "progress",
1268
+ "thinking",
1269
+ "associating ideas",
1270
+ "seeking results",
1271
+ "politicians",
1272
+ "workers",
1273
+ "producers",
1274
+ "salamanders"
1275
+ ],
1276
+ cups: [
1277
+ "copas",
1278
+ "water",
1279
+ "feelings",
1280
+ "emotions",
1281
+ "receptivity",
1282
+ "sensitivity",
1283
+ "ideals",
1284
+ "love",
1285
+ "artistic creation",
1286
+ "feeling",
1287
+ "affective",
1288
+ "relational",
1289
+ "emotional",
1290
+ "clergy",
1291
+ "spiritual class",
1292
+ "ondines",
1293
+ "mermaids"
1294
+ ],
1295
+ swords: [
1296
+ "espadas",
1297
+ "air",
1298
+ "thought",
1299
+ "intelligence",
1300
+ "exchanges",
1301
+ "cooperation of opposites",
1302
+ "maturity",
1303
+ "balance",
1304
+ "intuition",
1305
+ "sixth sense",
1306
+ "imagination",
1307
+ "future vision",
1308
+ "military",
1309
+ "warriors",
1310
+ "police",
1311
+ "sylphs",
1312
+ "giants"
1313
+ ],
1314
+ pentacles: [
1315
+ "ouros",
1316
+ "earth",
1317
+ "concretization",
1318
+ "manifestation",
1319
+ "practical intelligence",
1320
+ "effort",
1321
+ "study",
1322
+ "gains",
1323
+ "business",
1324
+ "sensation",
1325
+ "five senses",
1326
+ "concrete perception",
1327
+ "present",
1328
+ "bourgeoisie",
1329
+ "finances",
1330
+ "commerce",
1331
+ "gnomes"
1332
+ ]
1333
+ };
1334
+ var TAROT_COURT_RANK_THEME_KEYWORDS = {
1335
+ king: ["dynamic", "active", "lordly", "cardinal"],
1336
+ queen: ["stable", "receptive", "contained", "fixed"],
1337
+ knight: ["volatile", "mutant", "active", "mutable"],
1338
+ page: ["nascent", "fragile", "beginning", "starting"]
1339
+ };
1340
+ var TAROT_MINOR_PIP_STAGE_KEYWORDS = {
1341
+ ace: ["will", "pure potential", "something new emerging", "first spark"],
1342
+ two: ["imagining", "visualizing", "formulating the idea"],
1343
+ three: ["speaking", "understanding", "verbalizing", "giving form"],
1344
+ four: ["expanding", "planning", "growth", "good feelings"],
1345
+ five: ["restricting", "discipline", "justice", "pruning", "confronting limits"],
1346
+ six: ["harmonizing", "beauty", "ethics", "balance", "heart"],
1347
+ seven: ["winning silently", "emotional control", "quiet victory", "endurance"],
1348
+ eight: ["connecting", "rational control", "linking concepts", "strategy"],
1349
+ nine: ["foundations", "worthy", "solid base"],
1350
+ ten: ["manifesting", "materialized", "completion"]
1351
+ };
1352
+ var houseThemeProfilesCache;
1353
+ var tarotThemeProfilesCache;
1354
+ function getHouseThemeAxis(houseNumber) {
1355
+ const axisPairs = {
1356
+ 1: { key: "self-other", label: "Self and Other", oppositeHouseNumber: 7 },
1357
+ 2: { key: "resources-initiation", label: "Resources and Initiation", oppositeHouseNumber: 8 },
1358
+ 3: { key: "communication-journey", label: "Communication and Journey", oppositeHouseNumber: 9 },
1359
+ 4: { key: "private-public", label: "Private and Public Life", oppositeHouseNumber: 10 },
1360
+ 5: { key: "pleasure-friendship", label: "Pleasure and Friendship", oppositeHouseNumber: 11 },
1361
+ 6: { key: "health-occult", label: "Health and the Occult", oppositeHouseNumber: 12 },
1362
+ 7: { key: "self-other", label: "Self and Other", oppositeHouseNumber: 1 },
1363
+ 8: { key: "resources-initiation", label: "Resources and Initiation", oppositeHouseNumber: 2 },
1364
+ 9: { key: "communication-journey", label: "Communication and Journey", oppositeHouseNumber: 3 },
1365
+ 10: { key: "private-public", label: "Private and Public Life", oppositeHouseNumber: 4 },
1366
+ 11: { key: "pleasure-friendship", label: "Pleasure and Friendship", oppositeHouseNumber: 5 },
1367
+ 12: { key: "health-occult", label: "Health and the Occult", oppositeHouseNumber: 6 }
1368
+ };
1369
+ return axisPairs[houseNumber];
1370
+ }
1371
+ function normalizeThemeText(value) {
1372
+ return value.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
1373
+ }
1374
+ function uniqueStrings(values) {
1375
+ const seen = /* @__PURE__ */ new Set();
1376
+ const result = [];
1377
+ for (const value of values) {
1378
+ const trimmed = value?.trim();
1379
+ if (!trimmed || seen.has(trimmed)) {
1380
+ continue;
1381
+ }
1382
+ seen.add(trimmed);
1383
+ result.push(trimmed);
1384
+ }
1385
+ return result;
1386
+ }
1387
+ function titleCase(value) {
1388
+ return value.split(" ").map((part) => part ? `${part[0].toUpperCase()}${part.slice(1)}` : part).join(" ");
1389
+ }
1390
+ function humanizeTarotFilename(filename) {
1391
+ return titleCase(
1392
+ filename.replace(/^\d+_/, "").replace(/_/g, " ")
1393
+ );
1394
+ }
1395
+ function getNodeDisplayLabel(node) {
1396
+ const parsedId = chunkS6KNERP7_js.parseId(node.id);
1397
+ if (node.type === "path" /* PATH */) {
1398
+ return `Path ${parsedId}`;
1399
+ }
1400
+ if (node.type === "tarotSuit" /* TAROT_SUIT */) {
1401
+ return titleCase(parsedId);
1402
+ }
1403
+ return node.name ?? titleCase(parsedId);
1404
+ }
1405
+ function getNodeTextCandidates(node) {
1406
+ const data = node.data;
1407
+ return uniqueStrings([
1408
+ getNodeDisplayLabel(node),
1409
+ chunkS6KNERP7_js.parseId(node.id),
1410
+ typeof data?.englishName === "string" ? data.englishName : void 0,
1411
+ typeof data?.meaning === "string" ? data.meaning : void 0
1412
+ ]);
1413
+ }
1414
+ function getCorrespondenceRefs(nodeId, type, depth) {
1415
+ return canonicalTree2.getCorrespondences(nodeId, { type, depth }).map((match) => ({
1416
+ id: match.node.id,
1417
+ label: getNodeDisplayLabel(match.node),
1418
+ distance: match.distance
1419
+ }));
1420
+ }
1421
+ function collectCorrespondenceTexts(correspondences) {
1422
+ const texts = [];
1423
+ for (const correspondence of correspondences) {
1424
+ const node = canonicalTree2.getNode(correspondence.id);
1425
+ if (!node) {
1426
+ continue;
1427
+ }
1428
+ texts.push(...getNodeTextCandidates(node));
1429
+ }
1430
+ return texts;
1431
+ }
1432
+ function freezeCorrespondences(correspondences) {
1433
+ correspondences.forEach((correspondence) => Object.freeze(correspondence));
1434
+ return Object.freeze(correspondences);
1435
+ }
1436
+ function createTokenSurface(values) {
1437
+ return tokenizeOccultThemeText([...values]);
1438
+ }
1439
+ function getHouseLabelFromLookup(lookup) {
1440
+ if (typeof lookup === "number") {
1441
+ return HOUSE_LABELS_BY_NUMBER[lookup - 1];
1442
+ }
1443
+ if (String(lookup).startsWith(`${"house" /* HOUSE */}:`)) {
1444
+ return chunkS6KNERP7_js.parseId(lookup);
1445
+ }
1446
+ return void 0;
1447
+ }
1448
+ function buildHouseThemeProfile(houseNumber) {
1449
+ const houseLabel = HOUSE_LABELS_BY_NUMBER[houseNumber - 1];
1450
+ const houseId = chunkS6KNERP7_js.id("house" /* HOUSE */, houseLabel);
1451
+ const seed = HOUSE_THEME_SEEDS[houseNumber];
1452
+ const primaryLabel = seed.primaryLabel;
1453
+ const axis = getHouseThemeAxis(houseNumber);
1454
+ const aliases = uniqueStrings(seed.aliases);
1455
+ const signs = getCorrespondenceRefs(houseId, "westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, 1);
1456
+ const planets = getCorrespondenceRefs(houseId, "planet" /* PLANET */, 2);
1457
+ const elements = getCorrespondenceRefs(houseId, "westernElement" /* WESTERN_ELEMENT */, 2);
1458
+ const spheres = getCorrespondenceRefs(houseId, "sphere" /* SPHERE */, 2);
1459
+ const paths = getCorrespondenceRefs(houseId, "path" /* PATH */, 2);
1460
+ const correspondenceTexts = [
1461
+ ...collectCorrespondenceTexts(signs),
1462
+ ...collectCorrespondenceTexts(planets),
1463
+ ...collectCorrespondenceTexts(elements),
1464
+ ...collectCorrespondenceTexts(spheres),
1465
+ ...collectCorrespondenceTexts(paths)
1466
+ ];
1467
+ const keywords = uniqueStrings(seed.keywords);
1468
+ const tokens = createTokenSurface([
1469
+ primaryLabel,
1470
+ ...aliases,
1471
+ ...keywords,
1472
+ ...correspondenceTexts
1473
+ ]);
1474
+ const profile = {
1475
+ kind: "house",
1476
+ id: houseId,
1477
+ houseNumber,
1478
+ houseLabel: titleCase(houseLabel),
1479
+ primaryLabel,
1480
+ scope: seed.scope,
1481
+ axis: Object.freeze(axis),
1482
+ aliases: Object.freeze(aliases),
1483
+ keywords: Object.freeze(keywords),
1484
+ tokens: Object.freeze(tokens),
1485
+ correspondences: Object.freeze({
1486
+ planets: freezeCorrespondences(planets),
1487
+ signs: freezeCorrespondences(signs),
1488
+ elements: freezeCorrespondences(elements),
1489
+ spheres: freezeCorrespondences(spheres),
1490
+ paths: freezeCorrespondences(paths)
1491
+ })
1492
+ };
1493
+ return Object.freeze(profile);
1494
+ }
1495
+ function getHouseThemeProfileCache() {
1496
+ if (houseThemeProfilesCache) {
1497
+ return houseThemeProfilesCache;
1498
+ }
1499
+ houseThemeProfilesCache = Object.freeze(HOUSE_LABELS_BY_NUMBER.map(
1500
+ (_, index) => buildHouseThemeProfile(index + 1)
1501
+ ));
1502
+ return houseThemeProfilesCache;
1503
+ }
1504
+ function getTarotRank(card) {
1505
+ if (!card.tarotCard.includes(" of ")) {
1506
+ return void 0;
1507
+ }
1508
+ return card.tarotCard.split(" of ")[0].toLowerCase();
1509
+ }
1510
+ function buildTarotAliases(card, majorArchetype, descriptiveData) {
1511
+ const normalizedPrimaryLabel = normalizeThemeText(card.tarotCard);
1512
+ const cardNode = canonicalTree2.getNode(chunkS6KNERP7_js.id("tarotArkAnnu" /* TAROT_ARK_ANNU */, card.tarotCard));
1513
+ const aliases = [
1514
+ humanizeTarotFilename(card.tarotCardFilename),
1515
+ card.egyptianCardName,
1516
+ ...Object.values(descriptiveData ?? {}).map((description) => description?.name),
1517
+ ...cardNode?.data?.aliases ?? []
1518
+ ];
1519
+ if (majorArchetype) {
1520
+ aliases.push(titleCase(majorArchetype.pathSlug));
1521
+ }
1522
+ if (card.suit && card.tarotCard.includes(" of ")) {
1523
+ const rankLabel = card.tarotCard.split(" of ")[0];
1524
+ for (const suitAlias of TAROT_SUIT_ALIASES[card.suit] ?? []) {
1525
+ aliases.push(`${rankLabel} of ${suitAlias}`);
1526
+ }
1527
+ }
1528
+ return uniqueStrings(
1529
+ aliases.filter((alias) => Boolean(alias)).filter((alias) => normalizeThemeText(alias) !== normalizedPrimaryLabel)
1530
+ );
1531
+ }
1532
+ function buildTarotKeywordTexts(card, majorArchetype, descriptiveData) {
1533
+ const rank = getTarotRank(card);
1534
+ const deckKeywordTexts = Object.values(descriptiveData ?? {}).flatMap((description) => [
1535
+ description?.meaning,
1536
+ description?.reversedMeaning,
1537
+ ...description?.keywords ?? []
1538
+ ]);
1539
+ return uniqueStrings([
1540
+ card.meaning,
1541
+ card.papusMeaning,
1542
+ card.egyptianCardName,
1543
+ ...canonicalTree2.getNode(chunkS6KNERP7_js.id("tarotArkAnnu" /* TAROT_ARK_ANNU */, card.tarotCard))?.data?.keywords ?? [],
1544
+ ...deckKeywordTexts,
1545
+ ...card.suit ? TAROT_SUIT_THEME_KEYWORDS[card.suit] ?? [] : [],
1546
+ ...card.type === "minor" && rank ? TAROT_MINOR_PIP_STAGE_KEYWORDS[rank] ?? [] : [],
1547
+ ...rank ? TAROT_COURT_RANK_THEME_KEYWORDS[rank] ?? [] : [],
1548
+ majorArchetype?.hebrewLetter
1549
+ ]);
1550
+ }
1551
+ function buildTarotThemeProfile(card) {
1552
+ const cardId = chunkS6KNERP7_js.id("tarotArkAnnu" /* TAROT_ARK_ANNU */, card.tarotCard);
1553
+ const cardNode = canonicalTree2.getNode(cardId);
1554
+ if (!cardNode) {
1555
+ throw new Error(`Missing canonical tarot node for ${cardId}.`);
1556
+ }
1557
+ const majorArchetypeData = card.type === "major" ? chunkXTE5DSDO_js.getTarotArchetype({ tarotCardNumber: card.number }) : void 0;
1558
+ const majorArchetype = majorArchetypeData ? {
1559
+ pathId: majorArchetypeData.pathId,
1560
+ pathNumber: majorArchetypeData.pathNumber,
1561
+ pathSlug: majorArchetypeData.pathSlug,
1562
+ hebrewLetter: majorArchetypeData.hebrewLetter
1563
+ } : void 0;
1564
+ const aliases = buildTarotAliases(
1565
+ card,
1566
+ majorArchetype,
1567
+ cardNode.data?.descriptiveData
1568
+ );
1569
+ const suits = getCorrespondenceRefs(cardId, "tarotSuit" /* TAROT_SUIT */, 1);
1570
+ const planets = getCorrespondenceRefs(cardId, "planet" /* PLANET */, 3);
1571
+ const signs = getCorrespondenceRefs(cardId, "westernZodiacSign" /* WESTERN_ZODIAC_SIGN */, 3);
1572
+ const elements = getCorrespondenceRefs(cardId, "westernElement" /* WESTERN_ELEMENT */, 3);
1573
+ const spheres = getCorrespondenceRefs(cardId, "sphere" /* SPHERE */, 3);
1574
+ const paths = getCorrespondenceRefs(cardId, "path" /* PATH */, 2);
1575
+ const keywordTexts = buildTarotKeywordTexts(
1576
+ card,
1577
+ majorArchetype,
1578
+ cardNode.data?.descriptiveData
1579
+ );
1580
+ const keywords = createTokenSurface(keywordTexts);
1581
+ const correspondenceTexts = [
1582
+ ...collectCorrespondenceTexts(suits),
1583
+ ...collectCorrespondenceTexts(planets),
1584
+ ...collectCorrespondenceTexts(signs),
1585
+ ...collectCorrespondenceTexts(elements),
1586
+ ...collectCorrespondenceTexts(spheres),
1587
+ ...collectCorrespondenceTexts(paths)
1588
+ ];
1589
+ const tokens = uniqueStrings([
1590
+ ...keywords,
1591
+ ...createTokenSurface([
1592
+ card.tarotCard,
1593
+ ...aliases,
1594
+ ...correspondenceTexts,
1595
+ card.suit,
1596
+ majorArchetype?.pathSlug
1597
+ ])
1598
+ ]);
1599
+ const profile = {
1600
+ kind: "tarot",
1601
+ id: cardId,
1602
+ cardNumber: card.number,
1603
+ cardType: card.type,
1604
+ tarotCardFilename: card.tarotCardFilename,
1605
+ primaryLabel: card.tarotCard,
1606
+ aliases: Object.freeze(aliases),
1607
+ keywords: Object.freeze(keywords),
1608
+ tokens: Object.freeze(tokens),
1609
+ correspondences: Object.freeze({
1610
+ planets: freezeCorrespondences(planets),
1611
+ signs: freezeCorrespondences(signs),
1612
+ elements: freezeCorrespondences(elements),
1613
+ spheres: freezeCorrespondences(spheres),
1614
+ paths: freezeCorrespondences(paths),
1615
+ suits: freezeCorrespondences(suits)
1616
+ }),
1617
+ majorArchetype: majorArchetype ? Object.freeze(majorArchetype) : void 0
1618
+ };
1619
+ return Object.freeze(profile);
1620
+ }
1621
+ function getTarotThemeProfileCache() {
1622
+ if (tarotThemeProfilesCache) {
1623
+ return tarotThemeProfilesCache;
1624
+ }
1625
+ const profiles = Object.freeze(chunkXTE5DSDO_js.ARKANNUS.map((card) => buildTarotThemeProfile(card)));
1626
+ tarotThemeProfilesCache = {
1627
+ profiles,
1628
+ byId: new Map(profiles.map((profile) => [profile.id, profile])),
1629
+ byCardNumber: new Map(profiles.map((profile) => [profile.cardNumber, profile])),
1630
+ byFilename: new Map(
1631
+ profiles.map((profile) => [normalizeThemeText(profile.tarotCardFilename), profile])
1632
+ ),
1633
+ byName: new Map(
1634
+ profiles.flatMap((profile) => [
1635
+ [normalizeThemeText(profile.primaryLabel), profile],
1636
+ ...profile.aliases.map((alias) => [normalizeThemeText(alias), profile])
1637
+ ])
1638
+ ),
1639
+ byPathId: new Map(
1640
+ profiles.flatMap(
1641
+ (profile) => profile.majorArchetype ? [[profile.majorArchetype.pathId, profile]] : []
1642
+ )
1643
+ ),
1644
+ byPathSlug: new Map(
1645
+ profiles.flatMap(
1646
+ (profile) => profile.majorArchetype ? [[normalizeThemeText(profile.majorArchetype.pathSlug), profile]] : []
1647
+ )
1648
+ )
1649
+ };
1650
+ return tarotThemeProfilesCache;
1651
+ }
1652
+ function tokenizeOccultThemeText(input, options = {}) {
1653
+ const values = Array.isArray(input) ? input : [input];
1654
+ const minTokenLength = options.minTokenLength ?? 3;
1655
+ const stopwords = new Set((options.stopwords ?? OCCULT_THEME_STOPWORDS).map(normalizeThemeText));
1656
+ const seen = /* @__PURE__ */ new Set();
1657
+ const tokens = [];
1658
+ for (const value of values) {
1659
+ if (!value) {
1660
+ continue;
1661
+ }
1662
+ const normalized = normalizeThemeText(value);
1663
+ for (const token of normalized.split(/[^a-z0-9]+/)) {
1664
+ if (token.length < minTokenLength || stopwords.has(token) || seen.has(token)) {
1665
+ continue;
1666
+ }
1667
+ seen.add(token);
1668
+ tokens.push(token);
1669
+ }
1670
+ }
1671
+ return tokens;
1672
+ }
1673
+ function listHouseThemeProfiles() {
1674
+ return getHouseThemeProfileCache();
1675
+ }
1676
+ function getHouseThemeProfile(lookup) {
1677
+ const houseLabel = getHouseLabelFromLookup(lookup);
1678
+ if (!houseLabel) {
1679
+ return void 0;
1680
+ }
1681
+ return getHouseThemeProfileCache().find((profile) => chunkS6KNERP7_js.parseId(profile.id) === houseLabel);
1682
+ }
1683
+ function listTarotThemeProfiles() {
1684
+ return getTarotThemeProfileCache().profiles;
1685
+ }
1686
+ function getTarotThemeProfile(lookup) {
1687
+ const cache = getTarotThemeProfileCache();
1688
+ if (typeof lookup === "number") {
1689
+ return cache.byCardNumber.get(lookup);
1690
+ }
1691
+ if (typeof lookup === "string") {
1692
+ if (lookup.startsWith(`${"tarotArkAnnu" /* TAROT_ARK_ANNU */}:`)) {
1693
+ return cache.byId.get(lookup);
1694
+ }
1695
+ if (lookup.startsWith(`${"path" /* PATH */}:`)) {
1696
+ const archetype = chunkXTE5DSDO_js.getTarotArchetype({
1697
+ pathId: lookup
1698
+ });
1699
+ return archetype ? cache.byCardNumber.get(archetype.tarotCardNumber) : void 0;
1700
+ }
1701
+ return cache.byFilename.get(normalizeThemeText(lookup)) ?? cache.byName.get(normalizeThemeText(lookup)) ?? cache.byPathSlug.get(normalizeThemeText(lookup));
1702
+ }
1703
+ if ("tarotCardNumber" in lookup) {
1704
+ return cache.byCardNumber.get(lookup.tarotCardNumber);
1705
+ }
1706
+ if ("tarotCardFilename" in lookup) {
1707
+ return cache.byFilename.get(normalizeThemeText(lookup.tarotCardFilename));
1708
+ }
1709
+ if ("tarotCardName" in lookup) {
1710
+ return cache.byName.get(normalizeThemeText(lookup.tarotCardName));
1711
+ }
1712
+ if ("tarotArkAnnuId" in lookup) {
1713
+ return cache.byId.get(lookup.tarotArkAnnuId);
1714
+ }
1715
+ if ("pathId" in lookup) {
1716
+ return cache.byPathId.get(lookup.pathId);
1717
+ }
1718
+ return cache.byPathSlug.get(normalizeThemeText(lookup.pathSlug));
1719
+ }
1720
+
1721
+ exports.OCCULT_THEME_STOPWORDS = OCCULT_THEME_STOPWORDS;
1722
+ exports.buildKaabalisticMapData = buildKaabalisticMapData;
1723
+ exports.getAngleSymbolMetadata = getAngleSymbolMetadata;
1724
+ exports.getAstrologyTreeMarkers = getAstrologyTreeMarkers;
1725
+ exports.getGematriaTreeMarkers = getGematriaTreeMarkers;
1726
+ exports.getHouseThemeProfile = getHouseThemeProfile;
1727
+ exports.getKaabalisticCorrespondenceTargets = getKaabalisticCorrespondenceTargets;
1728
+ exports.getNodeSymbolMetadata = getNodeSymbolMetadata;
1729
+ exports.getNumerologyTreeMarkers = getNumerologyTreeMarkers;
1730
+ exports.getPlanetSymbolMetadata = getPlanetSymbolMetadata;
1731
+ exports.getTarotThemeProfile = getTarotThemeProfile;
1732
+ exports.getZodiacSignSymbolMetadata = getZodiacSignSymbolMetadata;
1733
+ exports.listAngleSymbolMetadata = listAngleSymbolMetadata;
1734
+ exports.listHouseThemeProfiles = listHouseThemeProfiles;
1735
+ exports.listNodeSymbolMetadata = listNodeSymbolMetadata;
1736
+ exports.listPlanetSymbolMetadata = listPlanetSymbolMetadata;
1737
+ exports.listTarotThemeProfiles = listTarotThemeProfiles;
1738
+ exports.listZodiacSignSymbolMetadata = listZodiacSignSymbolMetadata;
1739
+ exports.tokenizeOccultThemeText = tokenizeOccultThemeText;
1740
+ //# sourceMappingURL=chunk-7WG6PUEN.js.map
1741
+ //# sourceMappingURL=chunk-7WG6PUEN.js.map